Beispiel #1
0
        public ActionResult Index()
        {
            db.Database.Connection.Open();
            SystemInfoModel model = new SystemInfoModel();

            model.Databases = new List <DbConnectionModel>()
            {
                new DbConnectionModel {
                    Database   = db.Database.Connection.Database,
                    DataSource = db.Database.Connection.DataSource,
                    ServerInfo = db.Database.Connection.ServerVersion,
                    State      = db.Database.Connection.State.ToString()
                }
            };

            model.SideProcess = SideServicesManager.GetSideServicesInfo();

            try {
                model.WebSites = null;//IISWebServices();
            } catch { }

            db.Database.Connection.Close();

            return(View(model));
        }
Beispiel #2
0
        // GET: Dashboard
        public ActionResult DashboardProjects(string parent, int projectid)
        {
            var ProjectName = db.Project.Single(proj => proj.id.Equals(projectid)).name;

            // TODO Update the entire part
            var response = JObject.Parse(SideServicesManager.CallService("Xml Comment Drone", "Comments", "GET", "AllComments",
                                                                         new Dictionary <string, object>()
            {
                { "projectName", ProjectName }
            }));

            JArray files = response["files"].HasValues ? (JArray)response["files"] : null;

            ViewData["Project"] = projectid;
            //
            var root = parent.Substring(0, parent.LastIndexOf("/"));

            if (root.Any())
            {
                ViewData["Root"] = root.Substring(0, root.LastIndexOf("/") + 1);
            }
            //
            return(View(MergeModel(files?.ToArray(), parent)));
        }