Пример #1
0
        /// <summary>
        /// Gets Jobs for the given media server and returns Job View.
        /// </summary>
        /// <param name="mediaServer"></param>
        /// <returns></returns>
        public ActionResult Job(string mediaServer)
        {
            Trace.WriteLine("Entering Job method");
            ViewBag.DateSortParm = "date_desc";
            var jobs = DocumentDBDataController.GetJobs(mediaServer);

            ViewBag.Mediaserver = mediaServer;
            ViewBag.Jobs        = jobs;
            if (ViewBag.Name == null)
            {
                ViewBag.Name = "Name";
            }
            if (ViewBag.TaskName == null)
            {
                ViewBag.TaskName = "Task Name";
            }
            if (ViewBag.JobType == null)
            {
                ViewBag.JobType = "Job Type";
            }
            if (ViewBag.Status == null)
            {
                ViewBag.Status = "Status";
            }
            return(View(jobs));
        }
Пример #2
0
        public async Task <ActionResult> DocumentDBCredentials(DocumentDBCredentialsViewModel model)
        {
            Trace.WriteLine("Entering DocumentDBCredentials POST method");
            if (ModelState.IsValid)
            {
                //Check if Database is accessible
                Task <bool> flag = DocumentDBDataController.IsDatabaseAccessible(model.EndPointUrl, model.AuthorizationKey);
                if (flag.Result)
                {
                    //Helps to open the Root level web.config file.
                    Configuration webConfigApp = WebConfigurationManager.OpenWebConfiguration("~");

                    //Modifying the AppKey from AppValue to AppValue1
                    webConfigApp.AppSettings.Settings["EndpointUrl"].Value      = model.EndPointUrl;
                    webConfigApp.AppSettings.Settings["AuthorizationKey"].Value = model.AuthorizationKey;
                    //Save the Modified settings of AppSettings.
                    webConfigApp.Save();

                    //Update the configuration.xml file in Agent Application with Endpoint Url and Authorization Key.
                    AgentController agent = new AgentController();
                    Trace.TraceInformation(DateTime.Now.ToLongTimeString() + "Calling CreateSetting method");
                    agent.UpdateAgentConfiguration(model.EndPointUrl, model.AuthorizationKey);
                    return(RedirectToAction("AgentDownload", "Account"));
                }
                else
                {
                    ViewBag.ErrorMessage = "DocumentDB database is not accessible";
                    return(View("Error"));
                }
            }
            // If we got this far, something failed, redisplay form
            return(View(model));
        }
Пример #3
0
        /// <summary>
        /// Returns the filtered data to Home Page view
        /// </summary>
        /// <param name="customer"></param>
        /// <returns></returns>
        public ActionResult GetCustomer(string customer)
        {
            Trace.WriteLine("Entering GetCustomer method");
            ViewBag.TimeFilter = "Time Filter";
            if (customer.Equals("All"))
            {
                Trace.TraceInformation(DateTime.Now.ToLongTimeString() + "Fetching Media servers, critical alerts, failed Jobs, Missed Jobs, Succeeded jobs and Job completed with exception");
                var mediaServer1 = DocumentDBDataController.GetMediaServers();
                ViewBag.Alerts                  = DocumentDBDataController.GetCrititcalAlerts();
                ViewBag.FailedJobs              = DocumentDBDataController.GetFailedJobHistories();
                ViewBag.MissedJobs              = DocumentDBDataController.GetMissedJobHistories();
                ViewBag.SucceededJobs           = DocumentDBDataController.GetSucceededJobHistories();
                ViewBag.SucceededWithExceptions = DocumentDBDataController.GetExceptionJobHistories();
                ViewBag.Group = "All";
                return(PartialView("HomePage", mediaServer1));
            }

            var mediaServer = DocumentDBDataController.GetMediaServersByCustomerName(customer);

            ViewBag.Alerts                  = DocumentDBDataController.GetCrititcalAlerts();
            ViewBag.FailedJobs              = DocumentDBDataController.GetFailedJobHistories();
            ViewBag.MissedJobs              = DocumentDBDataController.GetMissedJobHistories();
            ViewBag.SucceededJobs           = DocumentDBDataController.GetSucceededJobHistories();
            ViewBag.SucceededWithExceptions = DocumentDBDataController.GetExceptionJobHistories();
            ViewBag.Group = customer;
            return(PartialView("HomePage", mediaServer));
        }
Пример #4
0
        /// <summary>
        /// Gets the Media server, Critical alerts and Job status information and returns HomePage View
        /// </summary>
        /// <returns></returns>
        public ActionResult HomePage()
        {
            Trace.WriteLine("Entering HomePage method");
            Trace.WriteLine("Entering HomePage method");
            try
            {
                Trace.TraceInformation(DateTime.Now.ToLongTimeString() + "Fetching Media servers, critical alerts, failed Jobs, Missed Jobs, Succeeded jobs and Job completed with exception");
                var mediaServer = DocumentDBDataController.GetMediaServers();

                ViewBag.Alerts                  = DocumentDBDataController.GetCrititcalAlerts();
                ViewBag.FailedJobs              = DocumentDBDataController.GetFailedJobHistories();
                ViewBag.MissedJobs              = DocumentDBDataController.GetMissedJobHistories();
                ViewBag.SucceededJobs           = DocumentDBDataController.GetSucceededJobHistories();
                ViewBag.SucceededWithExceptions = DocumentDBDataController.GetExceptionJobHistories();
                if (ViewBag.Group == null)
                {
                    ViewBag.Group = "Select Group";
                }
                if (ViewBag.TimeFilter == null)
                {
                    ViewBag.TimeFilter = "Time Filter";
                }
                return(View(mediaServer));
            }
            catch (Exception ex)
            {
                Exception baseException = ex.GetBaseException();
                Trace.TraceError("Error:" + ex.Message + "Message:" + baseException.Message);
                return(View("Error"));
            }
        }
Пример #5
0
        /// <summary>
        /// Gets the Alerts in ascending or decending order and returns Alert partial view.
        /// </summary>
        /// <param name="sortOrder"></param>
        /// <param name="media"></param>
        /// <returns></returns>
        public ActionResult GetSortedDate(string sortOrder, string media)
        {
            Trace.WriteLine("Entering GetSortedDate method");
            ViewBag.DateSortParm = sortOrder == "Date" ? "date_desc" : "Date";
            switch (sortOrder)
            {
            case "Date":
                IEnumerable <Alert> alerts1 = DocumentDBDataController.GetAlerts(media);
                ViewBag.Mediaserver = media;
                ViewBag.Alerts      = alerts1;
                return(PartialView("Alert", alerts1));

            case "date_desc":
                List <Alert> alerts2 = DocumentDBDataController.GetAlertsInDescOrder(media);
                ViewBag.Mediaserver = media;
                ViewBag.Alerts      = alerts2;
                return(PartialView("Alert", alerts2));

            default:
                List <Alert> alerts = DocumentDBDataController.GetAlertsInDescOrder(media);
                ViewBag.Mediaserver = media;
                ViewBag.Alerts      = alerts;
                return(PartialView("Alert", alerts));
            }
        }
Пример #6
0
 /// <summary>
 /// Gets the Alerts and returns the Alerts view.
 /// </summary>
 /// <param name="mediaServer"></param>
 /// <returns></returns>
 public ActionResult Alert(string mediaServer)
 {
     Trace.WriteLine("Entering Alert method");
     try
     {
         ViewBag.DateSortParm = "date_desc";
         IEnumerable <Alert> alerts = DocumentDBDataController.GetAlerts(mediaServer);
         ViewBag.Mediaserver = mediaServer;
         ViewBag.Alerts      = alerts;
         if (ViewBag.Name == null)
         {
             ViewBag.Name = "Name";
         }
         if (ViewBag.Severity == null)
         {
             ViewBag.Severity = "Severity";
         }
         if (ViewBag.Category == null)
         {
             ViewBag.Category = "Category";
         }
         var mediaServer1 = DocumentDBDataController.GetMediaServers();
         return(View(alerts));
     }
     catch (Exception ex)
     {
         Trace.TraceError("Error:" + ex.Message);
         return(View("Error"));
     }
 }
Пример #7
0
        /// <summary>
        /// Save Group data and return Group View
        /// </summary>
        /// <param name="mediaServer"></param>
        /// <param name="customer"></param>
        /// <returns></returns>
        public async Task <ActionResult> SaveGroupData(string[] mediaServer, string customer)
        {
            Trace.WriteLine("Entering SaveGroupData method");
            IEnumerable <string> mediServer = mediaServer.AsEnumerable();

            await DocumentDBDataController.SaveGroupData("", "", mediaServer, customer);

            return(RedirectToAction("Group", "MediaServer"));
        }
Пример #8
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));
        }
Пример #9
0
        /// <summary>
        /// Gets the Jobs completed with exception for given media server and returns JobHistory View
        /// </summary>
        /// <param name="mediaServer"></param>
        /// <returns></returns>
        public ActionResult CompletedWithExceptionJob(string mediaServer)
        {
            Trace.WriteLine("Entering CompleteWithExceptionJob method");
            ViewBag.DateSortParm = "date_desc";

            var jobHistories = DocumentDBDataController.GetJobHistoryByJobStatus("SucceededWithExceptions", mediaServer);

            ViewBag.Mediaserver = mediaServer;
            return(View("JobHistory", jobHistories));
        }
Пример #10
0
        /// <summary>
        /// Gets the Missed jobs for given media server and returns JobHistory View
        /// </summary>
        /// <param name="mediaServer"></param>
        /// <returns></returns>
        public ActionResult MissedJob(string mediaServer)
        {
            Trace.WriteLine("Entering MissedJob method");
            ViewBag.DateSortParm = "date_desc";

            var jobHistories = DocumentDBDataController.GetJobHistoryByJobStatus("Missed", mediaServer);

            ViewBag.Mediaserver = mediaServer;
            return(View("JobHistory", jobHistories));
        }
Пример #11
0
        /// <summary>
        /// Gets the media server details and returns the FilterPanel view.
        /// </summary>
        /// <param name="id"></param>
        /// <param name="mediaServer"></param>
        /// <param name="befilter"></param>
        /// <returns></returns>
        public ActionResult FilterPanel(string id, string[] mediaServer, string[] befilter)
        {
            Trace.WriteLine("Entering FilterPanel method");
            ViewBag.Customer    = id;
            ViewBag.MediaServer = mediaServer;
            ViewBag.BEFilter    = befilter;

            var mediaServer1 = DocumentDBDataController.GetMediaServers();

            return(View(mediaServer1));
        }
Пример #12
0
        /// <summary>
        /// Returns the filtered data to Home Page view
        /// </summary>
        /// <param name="mediaServer"></param>
        /// <param name="alerts"></param>
        /// <param name="failedJobs"></param>
        /// <param name="missedJobs"></param>
        /// <param name="succeededJobs"></param>
        /// <param name="succeededWithExceptionsJobs"></param>
        /// <param name="TimeFilter"></param>
        /// <returns></returns>
        public ActionResult FilteredImportantEvents(IEnumerable <MediaServer> mediaServer, List <Alert> alerts, List <JobHistory> failedJobs, List <JobHistory> missedJobs, List <JobHistory> succeededJobs, List <JobHistory> succeededWithExceptionsJobs, string TimeFilter)
        {
            Trace.WriteLine("Entering FileterImportatntEvents method");
            ViewBag.Group = "Select Group";
            var               media        = DocumentDBDataController.GetMediaServers();
            List <Alert>      alert        = DocumentDBDataController.GetCrititcalAlerts();
            List <JobHistory> failedJob    = DocumentDBDataController.GetFailedJobHistories();
            List <JobHistory> missedJob    = DocumentDBDataController.GetMissedJobHistories();
            List <JobHistory> succeededJob = DocumentDBDataController.GetSucceededJobHistories();
            List <JobHistory> succeededWithExceptionsJob = DocumentDBDataController.GetExceptionJobHistories();

            if (TimeFilter.Equals("All"))
            {
                ViewBag.Alerts                  = alert;
                ViewBag.FailedJobs              = failedJob;
                ViewBag.MissedJobs              = missedJob;
                ViewBag.SucceededJobs           = succeededJob;
                ViewBag.SucceededWithExceptions = succeededWithExceptionsJob;
                ViewBag.TimeFilter              = "All";
                return(PartialView("HomePage", media));
            }
            if (TimeFilter.Equals("-24"))
            {
                ViewBag.TimeFilter = "24 hrs";
            }
            if (TimeFilter.Equals("-48"))
            {
                ViewBag.TimeFilter = "48 hrs";
            }
            if (TimeFilter.Equals("-72"))
            {
                ViewBag.TimeFilter = "72 hrs";
            }
            if (TimeFilter.Equals("-168"))
            {
                ViewBag.TimeFilter = "1 Week";
            }
            if (TimeFilter.Equals("-730"))
            {
                ViewBag.TimeFilter = "1 Month";
            }
            int      hrs = Convert.ToInt32(TimeFilter);
            DateTime now = DateTime.Now;

            ViewBag.Alerts                  = alert.Where(o => o.Date > now.AddHours(hrs) && o.Date <= now).ToList();
            ViewBag.FailedJobs              = failedJob.Where(o => o.StartTime > now.AddHours(hrs) && o.StartTime <= now).ToList();
            ViewBag.MissedJobs              = missedJob.Where(o => o.StartTime > now.AddHours(hrs) && o.StartTime <= now).ToList();
            ViewBag.SucceededJobs           = succeededJob.Where(o => o.StartTime > now.AddHours(hrs) && o.StartTime <= now).ToList();
            ViewBag.SucceededWithExceptions = succeededWithExceptionsJob.Where(o => o.StartTime > now.AddHours(hrs) && o.StartTime <= now).ToList();
            return(PartialView("HomePage", media));
        }
Пример #13
0
 /// <summary>
 /// Gets the Media server information and returns the GroupNew view
 /// </summary>
 /// <returns></returns>
 public ActionResult GroupNew()
 {
     Trace.WriteLine("Entering GroupNew method");
     try
     {
         Trace.TraceInformation(DateTime.Now.ToLongTimeString() + "Fetch the Media Server details");
         var mediaServer = DocumentDBDataController.GetMediaServers();
         return(View(mediaServer));
     }
     catch (Exception ex)
     {
         Trace.TraceError("Error:" + ex.Message);
         return(View("Error"));
     }
 }
Пример #14
0
 /// <summary>
 /// Gets the MediaServers and returns the AlertTab view.
 /// </summary>
 /// <param name="mediaServer"></param>
 /// <returns></returns>
 public ActionResult AlertTab(string mediaServer)
 {
     Trace.WriteLine("Entering AlertTab method");
     try
     {
         ViewBag.DateSortParm = "date_desc";
         ViewBag.Mediaserver  = mediaServer;
         var mediaServer1 = DocumentDBDataController.GetMediaServers();
         return(View(mediaServer1));
     }
     catch (Exception ex)
     {
         Trace.TraceError("Error:" + ex.Message);
         return(View("Error"));
     }
 }
Пример #15
0
 /// <summary>
 /// Gets the  Alerts and returns the AlertSingle view.
 /// </summary>
 /// <param name="mediaServer"></param>
 /// <param name="Id"></param>
 /// <returns></returns>
 public ActionResult AlertSingle(string mediaServer, string Id)
 {
     Trace.WriteLine("Entering AlertSingle method");
     try
     {
         IEnumerable <Alert> alerts = DocumentDBDataController.GetAlerts(mediaServer);
         ViewBag.Mediaserver = mediaServer;
         ViewBag.Alerts      = alerts;
         ViewBag.Id          = Id;
         return(View(alerts));
     }
     catch (Exception ex)
     {
         Trace.TraceError("Error:" + ex.Message);
         return(View("Error"));
     }
 }
Пример #16
0
        /// <summary>
        /// Gets the JobHistory and returns the JobHistorySingle view.
        /// </summary>
        /// <param name="mediaServer"></param>
        /// <param name="Id"></param>
        /// <returns></returns>
        public ActionResult JobHistorySingle(string mediaServer, string Id)
        {
            Trace.WriteLine("Entering JobHistorySingle method");
            try
            {
                ViewBag.Id = Id;
                var jobHistories = DocumentDBDataController.GetJobHistories(mediaServer);

                ViewBag.Mediaserver = mediaServer;
                return(View(jobHistories));
            }
            catch (Exception ex)
            {
                Trace.TraceError("Error:" + ex.Message);
                return(View("Error"));
            }
        }
Пример #17
0
        /// <summary>
        /// Gets Job Histories by Type for given media server and returns JobHistory partial view.
        /// </summary>
        /// <param name="JobType"></param>
        /// <param name="media"></param>
        /// <returns></returns>
        public ActionResult GetJobHistoryType(string JobType, string media)
        {
            Trace.WriteLine("Entering GetJobHistoryType method");
            ModelState.Clear();
            ViewBag.Name   = "Name";
            ViewBag.Status = "Status";
            ViewBag.Type   = JobType;
            if (JobType.Equals("All"))
            {
                var jobHistories2 = DocumentDBDataController.GetJobHistories(media);
                ViewBag.Mediaserver = media;
                return(PartialView("JobHistory", jobHistories2));
            }
            var jobsHistories1 = DocumentDBDataController.GetJobHistoryByJobType(JobType, media);

            ViewBag.Mediaserver = media;
            return(PartialView("JobHistory", jobsHistories1));
        }
Пример #18
0
        /// <summary>
        /// Add Media servers into the Group and returns the GroupInfo view
        /// </summary>
        /// <param name="customer"></param>
        /// <returns></returns>
        public async Task <ActionResult> GroupAddServersFinal(string customer, string[] mediaServer)
        {
            Trace.WriteLine("Entering GroupAddServersFinal method");
            try
            {
                Trace.TraceInformation(DateTime.Now.ToLongTimeString() + "Fetch the Media Server details");
                var mediaServer1 = DocumentDBDataController.GetMediaServers();
                var medialist    = mediaServer1.Where(o => o.CustomerName.Equals(customer));
                await DocumentDBDataController.SaveGroupData("", "", mediaServer, customer);

                return(RedirectToAction("GroupInfo", "MediaServer", new { @customer = customer }));
            }
            catch (Exception ex)
            {
                Trace.TraceError("Error:" + ex.Message);
                return(View("Error"));
            }
        }
Пример #19
0
        /// <summary>
        /// Gets the Alerts by name and returns the the Alert partial view.
        /// </summary>
        /// <param name="Name"></param>
        /// <param name="media"></param>
        /// <param name="alerts"></param>
        /// <returns></returns>
        public ActionResult GetAlertName(string Name, string media, IEnumerable <Alert> alerts)
        {
            Trace.WriteLine("Entering GetAlertName method");
            ModelState.Remove("Name");
            ViewBag.Severity = "Severity";
            ViewBag.Category = "Category";
            if (Name.Equals("All"))
            {
                IEnumerable <Alert> alerts2 = DocumentDBDataController.GetAlerts(media);
                ViewBag.Mediaserver = media;
                ViewBag.Name        = "All";
                return(PartialView("Alert", alerts2));
            }
            var alerts1 = DocumentDBDataController.GetAlertsByName(Name, media);

            ViewBag.Mediaserver = media;
            ViewBag.Name        = Name;
            return(PartialView("Alert", alerts1));
        }
Пример #20
0
        /// <summary>
        ///  Gets Jobs by Job Type for given media server and returns Job partial view.
        /// </summary>
        /// <param name="JobType"></param>
        /// <param name="media"></param>
        /// <param name="jobs"></param>
        /// <returns></returns>
        public ActionResult GetJobType(string JobType, string media, IEnumerable <Job> jobs)
        {
            Trace.WriteLine("Entering GetJobType method");
            ModelState.Clear();
            ViewBag.Name     = "Name";
            ViewBag.TaskName = "Task Name";
            ViewBag.JobType  = JobType;
            ViewBag.Status   = "Status";
            if (JobType.Equals("All"))
            {
                var jobs2 = DocumentDBDataController.GetJobs(media);
                ViewBag.Mediaserver = media;
                return(PartialView("Job", jobs2));
            }
            var jobs1 = DocumentDBDataController.GetJobsByJobType(JobType, media);

            ViewBag.Mediaserver = media;
            return(PartialView("Job", jobs1));
        }
Пример #21
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));
        }
Пример #22
0
        /// <summary>
        /// Remove the Group and return GroupPage View
        /// </summary>
        /// <param name="customer"></param>
        /// <returns></returns>
        public async Task <ActionResult> RemoveGroup(string customer)
        {
            Trace.WriteLine("Entering RemoveGroup method");
            try
            {
                Trace.TraceInformation(DateTime.Now.ToLongTimeString() + "Fetch the Media Server details");
                var mediaServer1 = DocumentDBDataController.GetMediaServers();
                var medialist    = mediaServer1.Where(o => o.CustomerName.Equals(customer));
                var mediaServer  = medialist.Select(o => o.Name).Distinct();
                await DocumentDBDataController.SaveGroupData("", "", mediaServer, "Default Group");

                var mediaServer2 = DocumentDBDataController.GetMediaServers();
                ViewBag.MediaServer = mediaServer2;
                return(RedirectToAction("GroupPage", "MediaServer"));
            }
            catch (Exception ex)
            {
                Trace.TraceError("Error:" + ex.Message);
                return(View("Error"));
            }
        }
Пример #23
0
        /// <summary>
        /// Gets the Job Histories for the given media server and returns JobHistory View.
        /// </summary>
        /// <param name="mediaServer"></param>
        /// <returns></returns>
        public ActionResult JobHistory(string mediaServer)
        {
            Trace.WriteLine("Entering JobHistory method");
            ViewBag.DateSortParm = "date_desc";
            if (ViewBag.Name == null)
            {
                ViewBag.Name = "Name";
            }
            if (ViewBag.Status == null)
            {
                ViewBag.Status = "Status";
            }
            if (ViewBag.Type == null)
            {
                ViewBag.Type = "Type";
            }
            var jobHistories = DocumentDBDataController.GetJobHistories(mediaServer);

            ViewBag.Mediaserver = mediaServer;
            return(View(jobHistories));
        }
Пример #24
0
        /// <summary>
        /// Gets the Job Histories in ascending or decending order (of End Date) and returns Job History partial view.
        /// </summary>
        /// <param name="sortOrder"></param>
        /// <param name="media"></param>
        /// <returns></returns>
        public ActionResult GetSortedEndDate(string sortOrder, string media)
        {
            Trace.WriteLine("Entering GetSortedEndDate method");
            ViewBag.DateSortParm = sortOrder == "Date" ? "date_desc" : "Date";
            switch (sortOrder)
            {
            case "Date":
                var jobHistories1 = DocumentDBDataController.GetJobHistories(media);
                ViewBag.Mediaserver = media;
                return(PartialView("JobHistory", jobHistories1));

            case "date_desc":
                var jobHistories2 = DocumentDBDataController.GetEndDateInDescOrder(media);
                ViewBag.Mediaserver = media;
                return(PartialView("JobHistory", jobHistories2));

            default:
                var jobHistories = DocumentDBDataController.GetEndDateInDescOrder(media);
                ViewBag.Mediaserver = media;
                return(PartialView("JobHistory", jobHistories));
            }
        }
Пример #25
0
 /// <summary>
 /// Gets the Media server, Critical alerts and Job status information and returns MediaServerInfo View
 /// </summary>
 /// <param name="mediaServer"></param>
 /// <returns></returns>
 public ActionResult MediaServerInfo(string mediaServer)
 {
     Trace.WriteLine("Entering MediaServerInfo method");
     try
     {
         Trace.TraceInformation(DateTime.Now.ToLongTimeString() + "Fetching  critical alerts, failed Jobs, Missed Jobs, Succeeded jobs and Job completed with exception");
         ViewBag.MediaServer             = mediaServer;
         ViewBag.Alerts                  = DocumentDBDataController.GetCrititcalAlerts();
         ViewBag.FailedJobs              = DocumentDBDataController.GetFailedJobHistories();
         ViewBag.MissedJobs              = DocumentDBDataController.GetMissedJobHistories();
         ViewBag.SucceededJobs           = DocumentDBDataController.GetSucceededJobHistories();
         ViewBag.SucceededWithExceptions = DocumentDBDataController.GetExceptionJobHistories();
         var mediaServer1 = DocumentDBDataController.GetMediaServers();
         return(View(mediaServer1));
     }
     catch (Exception ex)
     {
         Exception baseException = ex.GetBaseException();
         Trace.TraceError("Error:" + ex.Message + "Message:" + baseException.Message);
         return(View("Error"));
     }
 }