feat: 设置自动刷新

This commit is contained in:
Argo-Tianyi 2021-12-30 19:55:12 +08:00
parent bbe2631541
commit ed8dcc9296
2 changed files with 5 additions and 3 deletions

View File

@ -48,9 +48,9 @@
</TableColumn>
</ColumnsTemplete>
<RowButtonTemplate>
<TableCellButton Size="Size.ExtraSmall" Color="Color.Warning" Icon="fa fa-pause-circle" Text="暂停" OnClick="() => OnPause(context)" />
<TableCellButton Size="Size.ExtraSmall" Color="Color.Success" Icon="fa fa-play-circle" Text="运行" OnClick="() => OnRun(context)" />
<TableCellButton Size="Size.ExtraSmall" Color="Color.Info" Icon="fa fa-info-circle" Text="日志" OnClick="() => OnLog(context)" />
<TableCellButton Size="Size.ExtraSmall" Color="Color.Warning" Icon="fa fa-pause-circle" Text="暂停" OnClick="() => OnPause(context)" IsShow="OnCheckTaskStatus(context)" AutoRenderTableWhenClick="true" />
<TableCellButton Size="Size.ExtraSmall" Color="Color.Success" Icon="fa fa-play-circle" Text="运行" OnClick="() => OnRun(context)" IsShow="OnCheckTaskStatus(context)" AutoRenderTableWhenClick="true" />
<TableCellButton Size="Size.ExtraSmall" Color="Color.Info" Icon="fa fa-info-circle" Text="日志" OnClick="() => OnLog(context)" IsShow="OnCheckTaskStatus(context)" AutoRenderTableWhenClick="true" />
</RowButtonTemplate>
</AdminTable>
</div>

View File

@ -84,4 +84,6 @@ public partial class Tasks
{
return Task.CompletedTask;
}
private static bool OnCheckTaskStatus(TasksModel model) => model.Status != SchedulerStatus.Disabled;
}