public async Task <ActionResult> Dashboard()
        {
            var api = Module.API;
            await api.PollAsync();

            var vd = new PagerDutyModel
            {
                Schedule               = api.GetOnCall(),
                CachedDays             = api.Settings.DaysToCache,
                AllIncidents           = api.Incidents.SafeData(true),
                CurrentPagerDutyPerson = CurrentPagerDutyPerson
            };

            return(View("PagerDuty", vd));
        }
示例#2
0
        public ActionResult PagerDutyDashboard()
        {
            var i = PagerDutyApi.Instance;

            i.WaitForFirstPoll(5000);
            var vd = new PagerDutyModel
            {
                Schedule     = i.GetSchedule(),
                OnCallToShow = i.Settings.OnCallToShow,
                CachedDays   = i.Settings.DaysToCache,
                AllIncidents = i.Incidents.SafeData(true)
            };

            return(View("PagerDuty", vd));
        }
示例#3
0
        public async Task <ActionResult> Dashboard()
        {
            var i = PagerDutyAPI.Instance;
            await i.PollAsync().ConfigureAwait(false);

            var vd = new PagerDutyModel
            {
                Schedule               = i.GetOnCall(),
                CachedDays             = i.Settings.DaysToCache,
                AllIncidents           = i.Incidents.SafeData(true),
                CurrentPagerDutyPerson = CurrentPagerDutyPerson
            };

            return(View("PagerDuty", vd));
        }