< Summary

Information
Class: OzonOrdersWeb.ViewModels.JobViewModels.JobResultViewModel
Assembly: OzonOrdersWeb
File(s): /home/runner/work/Studio2Prod/Studio2Prod/OzonOrdersWeb/Areas/Studio2/ViewModels/JobViewModels/JobResultViewModel.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 7
Coverable lines: 7
Total lines: 47
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Results()100%210%
get_Schedules()100%210%
get_ActivePageTab()100%210%
get_HangfireQueue()100%210%
get_PeriodStatusUpdateState()100%210%
get_PeriodStatusUpdateJobId()100%210%
get_PeriodStatusUpdateStartedAtUtc()100%210%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/OzonOrdersWeb/Areas/Studio2/ViewModels/JobViewModels/JobResultViewModel.cs

#LineLine coverage
 1using System.ComponentModel.DataAnnotations;
 2using OzonOrdersWeb.Areas.Studio2.ViewModels.HangfireQueue;
 3
 4namespace OzonOrdersWeb.ViewModels.JobViewModels
 5{
 6    public class JobResultViewModel
 7    {
 08        public List<string> Results { get; set; } = new();
 9
 10        /// <summary>
 11        /// Состояние настроенных Hangfire RecurringJobs (поставлено/не поставлено, последний/следующий запуск).
 12        /// </summary>
 013        public List<JobScheduleViewModel> Schedules { get; set; } = new();
 14
 15        /// <summary>Активная вкладка на странице Job: schedules / queue / results.</summary>
 016        public string ActivePageTab { get; set; } = "schedules";
 17
 18        /// <summary>Состояние вкладки очереди Hangfire (как на /HangfireQueue).</summary>
 019        public HangfireJobsViewModel HangfireQueue { get; set; } = new();
 20
 21        /// <summary>
 22        /// Состояние разового обновления статусов по периоду (UpdateStatusesByProcessingDateBackground).
 23        /// processing/enqueued/null.
 24        /// </summary>
 025        public string PeriodStatusUpdateState { get; set; } = string.Empty;
 026        public string PeriodStatusUpdateJobId { get; set; } = string.Empty;
 027        public DateTime? PeriodStatusUpdateStartedAtUtc { get; set; }
 28    }
 29
 30    public class JobScheduleViewModel
 31    {
 32        /// <summary>Ключ для UI (логическое имя задачи).</summary>
 33        public string Key { get; set; } = string.Empty;
 34        public string Title { get; set; } = string.Empty;
 35
 36        public bool IsConfigured { get; set; }
 37        public string RecurringJobId { get; set; } = string.Empty;
 38        public string Cron { get; set; } = string.Empty;
 39
 40        public DateTime? LastExecutionUtc { get; set; }
 41        public DateTime? NextExecutionUtc { get; set; }
 42
 43        public string LastJobId { get; set; } = string.Empty;
 44        public string LastJobState { get; set; } = string.Empty;
 45        public object[] Args { get; set; } = Array.Empty<object>();
 46    }
 47}