示例#1
0
        public BackgroundServerLifeTimer()
        {
            // Register Background task
            HostingEnvironment.RegisterObject(this);

            // Load clusters conf
            model        = new ClustersModel(MonitorDashoardConfiguration.Instance);
            clustersLife = model.Clusters;

            // Start without ping by default
            PingActivated = false;

            // Create Hub connection
            hub = GlobalHost.ConnectionManager.GetHubContext <MonitorHub>();

            // Generate timer to push the data to the hub
            refreshTime = 10;                                                                    // init with 10s
            taskTimer   = new Timer(OnTimerElapsed, null,
                                    TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(refreshTime)); // every x seconds
        }
示例#2
0
        public ActionResult Index()
        {
            ClustersModel model = new ClustersModel(MonitorDashoardConfiguration.Instance);

            return(View(model));
        }