File tree Expand file tree Collapse file tree
src/components/BootstrapBlazor.Tasks.Dashboard Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- {
2-
1+ {
2+ "BootstrapBlazor.Components.Tasks.TaskDashboard" : {
3+ "Name" : " Name" ,
4+ "Status" : " Status" ,
5+ "NextRuntime" : " NextRuntime" ,
6+ "LastRuntime" : " LastRuntime" ,
7+ "LastRunResult" : " LastRunResult" ,
8+ "Exception" : " Exception" ,
9+ "Operation" : " Operation" ,
10+ "SchedulerStatus.Running" : " Running" ,
11+ "SchedulerStatus.Ready" : " Ready" ,
12+ "SchedulerStatus.Disabled" : " Disabled" ,
13+ "TriggerResult.Running" : " Running" ,
14+ "TriggerResult.Success" : " Success" ,
15+ "TriggerResult.Cancelled" : " Cancelled" ,
16+ "TriggerResult.Timeout" : " Timeout" ,
17+ "TriggerResult.Error" : " Error" ,
18+ "ButtonPause" : " Pause" ,
19+ "ButtonRun" : " Run" ,
20+ "ButtonLog" : " Log" ,
21+ "LogDilaogTitle" : " {0} - Log(Latest 20 Items)" ,
22+ "LogDilaogConsoleHeaderText" : " Action Log"
23+ }
324}
Original file line number Diff line number Diff line change 1- {
2-
1+ {
2+ "BootstrapBlazor.Components.Tasks.TaskDashboard" : {
3+ "Name" : " 名称" ,
4+ "Status" : " 调度状态" ,
5+ "NextRuntime" : " 下次运行时间" ,
6+ "LastRuntime" : " 上次运行时间" ,
7+ "LastRunResult" : " 上次结果" ,
8+ "Exception" : " 异常" ,
9+ "Operation" : " 操作" ,
10+ "SchedulerStatus.Running" : " 运行中" ,
11+ "SchedulerStatus.Ready" : " 已停止" ,
12+ "SchedulerStatus.Disabled" : " 禁用" ,
13+ "TriggerResult.Running" : " 运行" ,
14+ "TriggerResult.Success" : " 成功" ,
15+ "TriggerResult.Cancelled" : " 取消" ,
16+ "TriggerResult.Timeout" : " 超时" ,
17+ "TriggerResult.Error" : " 故障" ,
18+ "ButtonPause" : " 暂停" ,
19+ "ButtonRun" : " 运行" ,
20+ "ButtonLog" : " 日志" ,
21+ "LogDilaogTitle" : " {0} - 日志窗口(最新 20 条)" ,
22+ "LogDilaogConsoleHeaderText" : " 执行日志"
23+ }
324}
Original file line number Diff line number Diff line change 2929 <Tag Color =" GetResultColor(v.Row.LastRunResult)" >@FormatResult(v.Row.LastRunResult) </Tag >
3030 </Template >
3131 </TableTemplateColumn >
32- <TableTemplateColumn Text =" @Localizer[" TaskStatus " ]" >
33- <Template Context =" v" >
34- @v.Row.TaskStatus
35- </Template >
36- </TableTemplateColumn >
3732 <TableTemplateColumn Text =" @Localizer[" Exception " ]" >
3833 <Template Context =" v" >
3934 @if (v .Row .Exception != null )
4742 <Template Context =" v" >
4843 <div class =" btn-group" >
4944 <Button Size =" Size.ExtraSmall" Color =" Color.Warning" Icon =" fa-solid fa-pause-circle"
50- Text =" @Localizer[" ButtonPause " ]" OnClick =" () => OnPause(v.Row)" IsDisabled =" OnCheckTaskStatus (v.Row)" />
45+ Text =" @Localizer[" ButtonPause " ]" OnClick =" () => OnPause(v.Row)" IsDisabled =" OnCheckPauseTaskStatus (v.Row)" />
5146 <Button Size =" Size.ExtraSmall" Color =" Color.Success" Icon =" fa-solid fa-play-circle"
52- Text =" @Localizer[" ButtonRun " ]" OnClick =" () => OnRun(v.Row)" IsDisabled =" OnCheckTaskStatus (v.Row)" />
47+ Text =" @Localizer[" ButtonRun " ]" OnClick =" () => OnRun(v.Row)" IsDisabled =" OnCheckRunTaskStatus (v.Row)" />
5348 <Button Size =" Size.ExtraSmall" Color =" Color.Info" Icon =" fa-solid fa-info-circle"
54- Text =" @Localizer[" ButtonLog " ]" OnClick =" () => OnLog(v.Row)" IsDisabled = " OnCheckTaskStatus(v.Row) " />
49+ Text =" @Localizer[" ButtonLog " ]" OnClick =" () => OnLog(v.Row)" />
5550 </div >
5651 </Template >
5752 </TableTemplateColumn >
Original file line number Diff line number Diff line change @@ -100,7 +100,9 @@ private async Task OnLog(IScheduler scheduler)
100100 await DialogService . Show ( option ) ;
101101 }
102102
103- private static bool OnCheckTaskStatus ( IScheduler model ) => model . Status != SchedulerStatus . Running ;
103+ private static bool OnCheckPauseTaskStatus ( IScheduler model ) => model . Status != SchedulerStatus . Running ;
104+
105+ private static bool OnCheckRunTaskStatus ( IScheduler model ) => model . Status == SchedulerStatus . Running ;
104106
105107 private static string ? FormatDateTime ( DateTimeOffset ? dateTime ) => dateTime ? . ToString ( "yyyy-MM-dd HH:mm:ss" ) ;
106108
You can’t perform that action at this time.
0 commit comments