Esempio n. 1
0
        public ActionResult Top(string node, SQLInstance.TopSearchOptions options, bool? detailed = false)
        {
            var i = SQLInstance.Get(node);
            options.SetDefaults();

            var vd = new DashboardModel
            {
                View = SQLViews.Top,
                Detailed = detailed.GetValueOrDefault(),
                CurrentInstance = i,
                TopSearchOptions = options
            };
            return View("Operations.Top", vd);
        }
Esempio n. 2
0
        public ActionResult Top(string node, SQLInstance.TopSearchOptions options, bool? detailed = false)
        {
            var i = SQLInstance.Get(node);
            options.SetDefaults();


            var vd = new OperationsTopModel
            {
                View = SQLViews.Top,
                Detailed = detailed.GetValueOrDefault(),
                CurrentInstance = i,
                TopSearchOptions = options
            };

            if (i != null)
            {
                var cache = i.GetTopOperations(options);
                vd.TopOperations = cache.SafeData(true);
                vd.ErrorMessage = cache.ErrorMessage;
            }

            return View("Operations.Top", vd);
        }