Example #1
0
        /// <summary>
        /// Gets the critical alerts for given media server and returns Alert view
        /// </summary>
        /// <param name="mediaServer"></param>
        /// <returns></returns>
        public ActionResult CriticalAlert(string mediaServer)
        {
            Trace.WriteLine("Entering CriticalAlert method");
            ViewBag.DateSortParm = "date_desc";
            IEnumerable <Alert> alerts = DocumentDBDataController.GetAlertsBySeverity("Error", mediaServer);

            ViewBag.Mediaserver = mediaServer;
            ViewBag.Alerts      = alerts;
            return(View("Alert", alerts));
        }
Example #2
0
        /// <summary>
        ///  Gets the Alerts by severity and returns the the Alert partial view.
        /// </summary>
        /// <param name="Severity"></param>
        /// <param name="media"></param>
        /// <param name="alerts"></param>
        /// <returns></returns>
        public ActionResult GetSeverity(string Severity, string media, IEnumerable <Alert> alerts)
        {
            Trace.WriteLine("Entering GetSeverity method");
            ModelState.Clear();
            ViewBag.Name     = "Name";
            ViewBag.Category = "Category";
            if (Severity.Equals("All"))
            {
                IEnumerable <Alert> alerts2 = DocumentDBDataController.GetAlerts(media);
                ViewBag.Mediaserver = media;
                ViewBag.Severity    = "All";
                return(PartialView("Alert", alerts2));
            }
            ViewBag.Severity = Severity;
            var alerts1 = DocumentDBDataController.GetAlertsBySeverity(Severity, media);

            ViewBag.Mediaserver = media;
            return(PartialView("Alert", alerts1));
        }