< Summary

Information
Class: OzonOrdersWeb.ViewModels.JobViewModels.JobScheduleViewModel
Assembly: OzonOrdersWeb
File(s): /home/runner/work/Studio2Prod/Studio2Prod/OzonOrdersWeb/Areas/Studio2/ViewModels/JobViewModels/JobResultViewModel.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 10
Coverable lines: 10
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_Key()100%210%
get_Title()100%210%
get_IsConfigured()100%210%
get_RecurringJobId()100%210%
get_Cron()100%210%
get_LastExecutionUtc()100%210%
get_NextExecutionUtc()100%210%
get_LastJobId()100%210%
get_LastJobState()100%210%
get_Args()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    {
 8        public List<string> Results { get; set; } = new();
 9
 10        /// <summary>
 11        /// Состояние настроенных Hangfire RecurringJobs (поставлено/не поставлено, последний/следующий запуск).
 12        /// </summary>
 13        public List<JobScheduleViewModel> Schedules { get; set; } = new();
 14
 15        /// <summary>Активная вкладка на странице Job: schedules / queue / results.</summary>
 16        public string ActivePageTab { get; set; } = "schedules";
 17
 18        /// <summary>Состояние вкладки очереди Hangfire (как на /HangfireQueue).</summary>
 19        public HangfireJobsViewModel HangfireQueue { get; set; } = new();
 20
 21        /// <summary>
 22        /// Состояние разового обновления статусов по периоду (UpdateStatusesByProcessingDateBackground).
 23        /// processing/enqueued/null.
 24        /// </summary>
 25        public string PeriodStatusUpdateState { get; set; } = string.Empty;
 26        public string PeriodStatusUpdateJobId { get; set; } = string.Empty;
 27        public DateTime? PeriodStatusUpdateStartedAtUtc { get; set; }
 28    }
 29
 30    public class JobScheduleViewModel
 31    {
 32        /// <summary>Ключ для UI (логическое имя задачи).</summary>
 033        public string Key { get; set; } = string.Empty;
 034        public string Title { get; set; } = string.Empty;
 35
 036        public bool IsConfigured { get; set; }
 037        public string RecurringJobId { get; set; } = string.Empty;
 038        public string Cron { get; set; } = string.Empty;
 39
 040        public DateTime? LastExecutionUtc { get; set; }
 041        public DateTime? NextExecutionUtc { get; set; }
 42
 043        public string LastJobId { get; set; } = string.Empty;
 044        public string LastJobState { get; set; } = string.Empty;
 045        public object[] Args { get; set; } = Array.Empty<object>();
 46    }
 47}