private Dictionary <string, string> GetDictFromBlob(string name)
        {
            string json = BlobStorageService.Load(name);
            Dictionary <string, string> Dict = JsonConvert.DeserializeObject <Dictionary <string, string> >(json);

            return(Dict);
        }
Beispiel #2
0
        /// <summary>
        /// Returns the data for DB Troubleshooting for the given hour.
        /// </summary>
        /// <param name="hour"></param>
        /// <returns></returns>
        public ActionResult DBEventsSummary(string hour)
        {
            var content = BlobStorageService.Load("DBDetailed" + hour + "Hour.json");
            List <DatabaseEvent> listOfEvents = new List <DatabaseEvent>();

            if (content != null)
            {
                listOfEvents = new JavaScriptSerializer().Deserialize <List <DatabaseEvent> >(content);
            }
            return(PartialView("~/Views/Database/DBEventsSummary.cshtml", listOfEvents));
        }
Beispiel #3
0
        public ActionResult DBSizeDetails()
        {
            List <DatabaseSize> sizeDetails = new List <DatabaseSize>();
            var content = BlobStorageService.Load("DBSize.json");

            if (content != null)
            {
                sizeDetails = new JavaScriptSerializer().Deserialize <List <DatabaseSize> >(content);
            }
            return(PartialView("~/Views/Database/DBSizeDetails.cshtml", sizeDetails));
        }
Beispiel #4
0
        public ActionResult DBIndexFragmentation()
        {
            List <DatabaseIndex> indexDetails = new List <DatabaseIndex>();
            var content = BlobStorageService.Load("DBIndexFragmentation.json");

            if (content != null)
            {
                indexDetails = new JavaScriptSerializer().Deserialize <List <DatabaseIndex> >(content);
            }
            return(PartialView("~/Views/Database/DBIndexFragmentation.cshtml", indexDetails));
        }
Beispiel #5
0
        /// <summary>
        /// Returns the detailed report on Elmah for the past N hours.
        /// </summary>
        /// <param name="hour"></param>
        /// <returns></returns>
        public ActionResult ElmahErrorSummary(string hour)
        {
            var content = BlobStorageService.Load("ElmahErrorsDetailed" + hour + "hours.json");
            List <ElmahError> listOfEvents = new List <ElmahError>();

            if (content != null)
            {
                listOfEvents = new JavaScriptSerializer().Deserialize <List <ElmahError> >(content);
            }
            return(PartialView("~/Views/V2GalleryFrontEnd/ElmahErrorSummary.cshtml", listOfEvents));
        }
        public ActionResult OperationTrend()
        {
            int hour = 30;

            string[] Operation = new JavaScriptSerializer().Deserialize <string[]>(BlobStorageService.Load("OperationType.json"));

            List <string> blobNames = new List <string>();

            foreach (string opt in Operation)
            {
                blobNames.Add(opt + hour + "Day");
            }
            return(PartialView("~/Views/Shared/PartialChart.cshtml", ChartingUtilities.GetLineChartFromBlobName(blobNames.ToArray(), "Operations_Trend_For_Last_" + hour + "_Day", 24, 700)));
        }
        public ActionResult WorkJobs_Detail()
        {
            List <WorkInstanceDetail> jobDetail = new List <WorkInstanceDetail>();
            List <WorkServiceAdmin>   key       = new List <WorkServiceAdmin>();
            var content = BlobStorageService.Load("WorkJobDetail.json");
            var admin   = BlobStorageService.Load("WorkServiceAdminKey.json");

            if (content != null && key != null)
            {
                jobDetail = new JavaScriptSerializer().Deserialize <List <WorkInstanceDetail> >(content);
                key       = new JavaScriptSerializer().Deserialize <List <WorkServiceAdmin> >(admin);
            }

            ViewBag.work   = jobDetail;
            ViewBag.admin0 = key[0].username;
            ViewBag.admin1 = key[1].username;
            ViewBag.key0   = key[0].key;
            ViewBag.key1   = key[1].key;
            return(View("~/Views/WorkJobs/WorkJobs_detail.cshtml"));
        }