Esempio n. 1
0
        public async Task <IActionResult> IndexAsync()
        {
            var getDbStatusTask = StatusService.GetDbReport();

            var result = new ReportsViewModel()
            {
                BotStatus       = StatusService.GetSimpleStatus(),
                Commands        = InternalStatistics.GetCommands(),
                Events          = InternalStatistics.GetEvents(),
                Logger          = StatusService.GetLoggerStats(),
                GCMemoryInfo    = GC.GetGCMemoryInfo(),
                Api             = ApiStatistics.Data.FindAll(o => o.Count > 0),
                LoginState      = DiscordClient.LoginState,
                ConnectionState = DiscordClient.ConnectionState,
                Latency         = DiscordClient.Latency
            };

            result.Database = await getDbStatusTask;
            return(View(result));
        }
Esempio n. 2
0
        public async Task <IActionResult> IndexAsync()
        {
            var getDbStatusTask       = StatusService.GetDbReport();
            var getCommandsReportTask = StatusService.GetCommandsReportAsync();

            var result = new ReportsViewModel()
            {
                BotStatus       = StatusService.GetSimpleStatus(),
                Events          = InternalStatistics.GetEvents(),
                GCMemoryInfo    = GC.GetGCMemoryInfo(),
                LoginState      = DiscordClient.LoginState,
                ConnectionState = DiscordClient.ConnectionState,
                Latency         = DiscordClient.Latency,
                BackgroundTasks = BackgroundTaskQueue.GetStatus()
            };

            result.Database = await getDbStatusTask;
            result.Commands = await getCommandsReportTask;
            return(View(result));
        }
Esempio n. 3
0
        public async Task <IActionResult> Index()
        {
            var dbStatus = await StatusService.GetDbReport();

            var activityStats = await UsersActivityStats.CreateAsync(DiscordClient);

            var data = new WebStatus()
            {
                Simple           = StatusService.GetSimpleStatus(),
                ExecutedCommands = InternalStatistics.GetCommands(),
                DBStatus         = dbStatus,
                LoggerStats      = StatusService.GetLoggerStats(),
                TriggeredEvents  = InternalStatistics.GetEvents(),
                Latency          = DiscordClient.Latency,
                ConnectionState  = DiscordClient.ConnectionState,
                LoginState       = DiscordClient.LoginState,
                BotUser          = DiscordClient.CurrentUser,
                ActivityStats    = activityStats
            };

            return(View(data));
        }