Inizio aggiunta modalità select execLog x Task
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
<h3>TaskExeList</h3>
|
||||
|
||||
@code {
|
||||
|
||||
}
|
||||
@@ -4,8 +4,8 @@
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RootNamespace>MP.Stats</RootNamespace>
|
||||
<UserSecretsId>826e877c-ba70-4253-84cb-d0b1cafd4440</UserSecretsId>
|
||||
<Version>6.16.2403.2819</Version>
|
||||
<Version>6.16.2403.2819</Version>
|
||||
<Version>6.16.2404.0210</Version>
|
||||
<Version>6.16.2404.0210</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
+122
-105
@@ -1,112 +1,129 @@
|
||||
@page "/TaskScheduler"
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header table-primary p-1">
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="px-2">
|
||||
<b class="fs-4">TaskList</b>
|
||||
</div>
|
||||
<div class="px-2">
|
||||
<div class="input-group">
|
||||
@if (currRecord == null)
|
||||
{
|
||||
<button class="btn btn-success" @onclick="addNew" title="Add New"><i class="fas fa-plus"></i> Add New</button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button class="btn btn-secondary" @onclick="doCancel" title="Cancel"><i class="fas fa-undo"></i> Cancel</button>
|
||||
}
|
||||
<select class="form-select" @bind="@TypeSel">
|
||||
@foreach (var option in Enum.GetValues(typeof(MP.Data.Objects.Enums.Task2ExeType)))
|
||||
{
|
||||
<option value="@option">
|
||||
@option
|
||||
</option>
|
||||
}
|
||||
</select>
|
||||
<div class="row">
|
||||
<div class="@mainCss">
|
||||
<div class="card">
|
||||
<div class="card-header table-primary p-1">
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="px-2">
|
||||
<b class="fs-4">TaskList</b>
|
||||
</div>
|
||||
<div class="px-2">
|
||||
<div class="input-group">
|
||||
@if (currRecord == null)
|
||||
{
|
||||
<button class="btn btn-success" @onclick="addNew" title="Add New"><i class="fas fa-plus"></i> Add New</button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button class="btn btn-secondary" @onclick="doCancel" title="Cancel"><i class="fas fa-undo"></i> Cancel</button>
|
||||
}
|
||||
<select class="form-select" @bind="@TypeSel">
|
||||
@foreach (var option in Enum.GetValues(typeof(MP.Data.Objects.Enums.Task2ExeType)))
|
||||
{
|
||||
<option value="@option">
|
||||
@option
|
||||
</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<TaskEdit CurrRecord="@currRecord" EC_update="forceUpdate"></TaskEdit>
|
||||
</div>
|
||||
<div class="card-body py-0 px-1">
|
||||
@if (ListRecords == null)
|
||||
{
|
||||
<LoadingData></LoadingData>
|
||||
}
|
||||
else if (totalCount == 0)
|
||||
{
|
||||
<div class="alert alert-warning text-center display-4">Nessun record trovato</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<table class="table table-sm table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<button class="btn btn-sm btn-info" @onclick="doReset" title="Reset"><i class="fas fa-sync"></i></button>
|
||||
</th>
|
||||
<th>#</th>
|
||||
<th>Task</th>
|
||||
<th>Tipo</th>
|
||||
<th>Command</th>
|
||||
<th>Schedulazione</th>
|
||||
@if (detRecord == null)
|
||||
{
|
||||
<th class="text-right">Last</th>
|
||||
<th class="text-right">Next</th>
|
||||
<th class="text-right">Result</th>
|
||||
}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var record in ListRecords)
|
||||
{
|
||||
<tr class="@checkSelect(@record.TaskId)">
|
||||
<td>
|
||||
<button class="btn btn-sm btn-info me-1" @onclick="()=>doSelect(record)" title="Select"><i class="fas fa-search"></i></button>
|
||||
@if (currRecord == null)
|
||||
{
|
||||
<button class="btn btn-sm btn-primary me-1" @onclick="()=>doEdit(record)" title="Edit"><i class="fas fa-pencil-alt"></i></button>
|
||||
}
|
||||
else
|
||||
{
|
||||
@* <button class="btn btn-sm btn-success" @onclick="()=>doSave()" title="Save"><i class="far fa-save"></i></button> *@
|
||||
<button class="btn btn-sm btn-secondary" @onclick="()=>doCancel()" title="Cancel"><i class="fas fa-undo"></i></button>
|
||||
}
|
||||
</td>
|
||||
<td>@record.TaskId</td>
|
||||
<td>
|
||||
<div>@record.Name</div>
|
||||
<div class="small">@record.Descript</div>
|
||||
</td>
|
||||
<td>
|
||||
@record.TType
|
||||
</td>
|
||||
<td>
|
||||
<div>@record.Command</div>
|
||||
<div class="small">@record.Args</div>
|
||||
</td>
|
||||
<td>@record.Freq × @record.Cad</td>
|
||||
@if (detRecord == null)
|
||||
{
|
||||
<td class="text-right">
|
||||
<div>@($"{record.DtLastExec:yyyy-MM-dd}")</div>
|
||||
<div class="small">@($"{record.DtLastExec:ddd HH:mm:ss}")</div>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<div>@($"{record.DtNextExec:yyyy-MM-dd}")</div>
|
||||
<div class="small">@($"{record.DtNextExec:ddd HH:mm:ss}")</div>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<div>@record.LastDuration sec</div>
|
||||
<div class="small">@record.LastResult</div>
|
||||
</td>
|
||||
}
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="card-footer py-1">
|
||||
<DataPager PageSize="numRecord" currPage="currPage" numRecordChanged="ForceReload" numPageChanged="ForceReloadPage" exportEnabled="false" exportRequested="ExportCsv" fileName="@fileName" totalCount="totalCount" showLoading="isLoading" />
|
||||
</div>
|
||||
</div>
|
||||
<MP.Stats.Components.TaskEdit CurrRecord="@currRecord" EC_update="forceUpdate"></MP.Stats.Components.TaskEdit>
|
||||
</div>
|
||||
<div class="card-body py-0 px-1">
|
||||
@if (ListRecords == null)
|
||||
{
|
||||
<LoadingData></LoadingData>
|
||||
}
|
||||
else if (totalCount == 0)
|
||||
{
|
||||
<div class="alert alert-warning text-center display-4">Nessun record trovato</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<table class="table table-sm table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<button class="btn btn-sm btn-info" @onclick="doReset" title="Reset"><i class="fas fa-sync"></i></button>
|
||||
</th>
|
||||
<th>#</th>
|
||||
<th>Task</th>
|
||||
<th>Tipo</th>
|
||||
<th>Command</th>
|
||||
<th>Schedulazione</th>
|
||||
<th class="text-right">Last</th>
|
||||
<th class="text-right">Next</th>
|
||||
<th class="text-right">Result</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var record in ListRecords)
|
||||
{
|
||||
<tr class="@checkSelect(@record.TaskId)">
|
||||
<td>
|
||||
@if (currRecord == null)
|
||||
{
|
||||
<button class="btn btn-sm btn-primary me-1" @onclick="()=>doEdit(record)" title="Edit"><i class="fas fa-pencil-alt"></i></button>
|
||||
}
|
||||
else
|
||||
{
|
||||
@* <button class="btn btn-sm btn-success" @onclick="()=>doSave()" title="Save"><i class="far fa-save"></i></button> *@
|
||||
<button class="btn btn-sm btn-secondary" @onclick="()=>doCancel()" title="Cancel"><i class="fas fa-undo"></i></button>
|
||||
}
|
||||
</td>
|
||||
<td>@record.TaskId</td>
|
||||
<td>
|
||||
<div>@record.Name</div>
|
||||
<div class="small">@record.Descript</div>
|
||||
</td>
|
||||
<td>
|
||||
@record.TType
|
||||
</td>
|
||||
<td>
|
||||
<div>@record.Command</div>
|
||||
<div class="small">@record.Args</div>
|
||||
</td>
|
||||
<td>@record.Freq × @record.Cad</td>
|
||||
<td class="text-right">
|
||||
<div>@($"{record.DtLastExec:yyyy-MM-dd}")</div>
|
||||
<div class="small">@($"{record.DtLastExec:ddd HH:mm:ss}")</div>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<div>@($"{record.DtNextExec:yyyy-MM-dd}")</div>
|
||||
<div class="small">@($"{record.DtNextExec:ddd HH:mm:ss}")</div>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<div>@record.LastDuration sec</div>
|
||||
<div class="small">@record.LastResult</div>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="card-footer py-1">
|
||||
<DataPager PageSize="numRecord" currPage="currPage" numRecordChanged="ForceReload" numPageChanged="ForceReloadPage" exportEnabled="false" exportRequested="ExportCsv" fileName="@fileName" totalCount="totalCount" showLoading="isLoading" />
|
||||
</div>
|
||||
@if (detRecord != null)
|
||||
{
|
||||
<div class="col-4">
|
||||
<TaskExeList></TaskExeList>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@@ -28,6 +28,10 @@ namespace MP.Stats.Pages
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
else if (detRecord != null)
|
||||
{
|
||||
answ = (detRecord.TaskId == TaskId) ? "table-info" : "";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
@@ -58,6 +62,11 @@ namespace MP.Stats.Pages
|
||||
[Inject]
|
||||
protected IJSRuntime JSRuntime { get; set; }
|
||||
|
||||
protected string mainCss
|
||||
{
|
||||
get => detRecord == null ? "col-12" : "col-6";
|
||||
}
|
||||
|
||||
[Inject]
|
||||
protected MessageService MessageService { get; set; }
|
||||
|
||||
@@ -111,6 +120,7 @@ namespace MP.Stats.Pages
|
||||
protected async Task doCancel()
|
||||
{
|
||||
currRecord = null;
|
||||
detRecord = null;
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
@@ -131,32 +141,15 @@ namespace MP.Stats.Pages
|
||||
|
||||
protected async Task doReset()
|
||||
{
|
||||
detRecord = null;
|
||||
currRecord = null;
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
protected async Task doSave()
|
||||
protected async Task doSelect(TaskListModel selRec)
|
||||
{
|
||||
if (currRecord != null)
|
||||
{
|
||||
#if false
|
||||
bool done = false;
|
||||
// salvo verificando status...
|
||||
if (currOrder.OrderStatus == 10 || currOrder.OrderStatus == 10000)
|
||||
{
|
||||
done = await WDService.OrderUpdateDescript(currOrder.OrderId, currOrder.OrderExtCode, currOrder.OrderDescript);
|
||||
}
|
||||
else
|
||||
{
|
||||
done = await WDService.OrderUpdatePromDate(currOrder.OrderId, currOrder.DateProm);
|
||||
}
|
||||
// resetto info
|
||||
currOrder = null;
|
||||
isEdit = false;
|
||||
await WDService.OrdersFlushCache();
|
||||
#endif
|
||||
await ReloadData();
|
||||
}
|
||||
detRecord = selRec;
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
protected async Task ForceReload(int newNum)
|
||||
@@ -232,6 +225,7 @@ namespace MP.Stats.Pages
|
||||
#region Private Fields
|
||||
|
||||
private TaskListModel currRecord = null;
|
||||
private TaskListModel detRecord = null;
|
||||
|
||||
private List<TaskListModel> ListRecords;
|
||||
private List<TaskListModel> SearchRecords;
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
@page "/test"
|
||||
|
||||
@using MP.Stats.Components.ChartJs
|
||||
|
||||
<h1>Test Normal plot</h1>
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo statistiche MAPO</i>
|
||||
<h4>Versione: 6.16.2403.2819</h4>
|
||||
<h4>Versione: 6.16.2404.0210</h4>
|
||||
<br />
|
||||
Note di rilascio:
|
||||
<ul>
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.16.2403.2819
|
||||
6.16.2404.0210
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>6.16.2403.2819</version>
|
||||
<version>6.16.2404.0210</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-STATS/stable/LAST/MP.Stats.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-STATS/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
Reference in New Issue
Block a user