1f4b48ac8c
- Fix gestione Task su multi-gruppo MacchineEnergy: - update gestione nuove view
138 lines
7.4 KiB
Plaintext
138 lines
7.4 KiB
Plaintext
<div class="card shadow my-2">
|
|
<div class="card-header bg-primary bg-opacity-50 bg-gradient fs-5">
|
|
Gruppo Task: @CodGroup
|
|
</div>
|
|
<div class="card-body">
|
|
<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>Ord</th>
|
|
<th>Task</th>
|
|
<th>Tipo</th>
|
|
@if (detRecord == null)
|
|
{
|
|
<th>Command</th>
|
|
}
|
|
<th>Sched.</th>
|
|
@if (detRecord == null)
|
|
{
|
|
<th class="text-end">Last</th>
|
|
<th class="text-end">Next</th>
|
|
<th class="text-end">Result</th>
|
|
<th>
|
|
<button class="btn btn-sm btn-danger me-1" @onclick="ForceAll" title="Force All"><i class="fas fa-play"></i></button>
|
|
</th>
|
|
}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var record in ListRecords)
|
|
{
|
|
<tr class="@checkSelect(@record)">
|
|
<td class="text-nowrap">
|
|
<button class="btn btn-sm btn-info" @onclick="() => DoSelect(record)" title="Select"><i class="fas fa-search"></i></button>
|
|
@if (detRecord == null)
|
|
{
|
|
@if (currRecord == null)
|
|
{
|
|
<button class="btn btn-sm btn-primary ms-1" @onclick="() => DoEdit(record)" title="Edit"><i class="fas fa-pencil-alt"></i></button>
|
|
<button class="btn btn-sm btn-success" @onclick="() => DoClone(record)" title="Clona"><i class="fas fa-magic"></i></button>
|
|
}
|
|
else
|
|
{
|
|
<button class="btn btn-sm btn-secondary ms-1" @onclick="() => DoCancel()" title="Cancel"><i class="fas fa-undo"></i></button>
|
|
}
|
|
}
|
|
</td>
|
|
<td class="text-nowrap">
|
|
@if (detRecord == null)
|
|
{
|
|
@if (record.Ordinal == minOrdinal)
|
|
{
|
|
<button class="btn btn-sm btn-outline-secondary mx-1" disabled title="Cannot Move"><i class="fas fa-caret-up"></i></button>
|
|
}
|
|
else
|
|
{
|
|
<button class="btn btn-sm btn-outline-primary mx-1" @onclick="() => DoMove(record, true)" title="Move Up"><i class="fas fa-caret-up"></i></button>
|
|
}
|
|
}
|
|
<b>@record.Ordinal</b>
|
|
@if (detRecord == null)
|
|
{
|
|
@if (record.Ordinal == maxOrdinal)
|
|
{
|
|
<button class="btn btn-sm btn-outline-secondary mx-1" disabled title="Cannot Move"><i class="fas fa-caret-down"></i></button>
|
|
}
|
|
else
|
|
{
|
|
<button class="btn btn-sm btn-outline-primary mx-1" @onclick="() => DoMove(record, false)" title="Move Down"><i class="fas fa-caret-down"></i></button>
|
|
}
|
|
}
|
|
</td>
|
|
<td class="text-nowrap @checkDis(@record)">
|
|
<div>@record.Name</div>
|
|
<div class="small text-truncate">@record.Descript</div>
|
|
</td>
|
|
<td class="@checkDis(@record)">
|
|
@record.TType
|
|
</td>
|
|
@if (detRecord == null)
|
|
{
|
|
<td class="small text-truncate text-break @checkDis(@record)">
|
|
<div class="font-monospace fw-bold" title="@record.Command">@TextReduce(record.Command, 32)</div>
|
|
<div class="small text-break" title="@record.Args">@TextReduce(record.Args, 40)</div>
|
|
</td>
|
|
}
|
|
<td>@record.Freq × @record.Cad</td>
|
|
@if (detRecord == null)
|
|
{
|
|
<td class="text-end text-nowrap @checkDis(@record)">
|
|
<div>@($"{record.DtLastExec:yyyy-MM-dd}")</div>
|
|
<div class="small">@($"{record.DtLastExec:ddd HH:mm:ss}")</div>
|
|
</td>
|
|
<td class="text-end text-nowrap @checkDis(@record)">
|
|
<div>@($"{record.DtNextExec:yyyy-MM-dd}")</div>
|
|
<div class="small">@($"{record.DtNextExec:ddd HH:mm:ss}")</div>
|
|
</td>
|
|
<td class="text-end @checkDis(@record)">
|
|
<b>@($"{record.LastDuration:N3}")</b> <sub>sec</sub> <button class="btn btn-sm @btnCss(record)" @onclick="() => ToggleDetail(record)" title="Ultima esecuzione"><i class="far @iconCss(record)"></i></button>
|
|
</td>
|
|
<td>
|
|
@if (record.Enabled)
|
|
{
|
|
<button class="btn btn-sm @btnRunCss(record.DtNextExec) me-1" @onclick="() => DoRun(record)" title="Run Now"><i class="fas fa-play"></i></button>
|
|
}
|
|
else
|
|
{
|
|
<button class="btn btn-sm btn-secondary me-1" title="Disabled / Cannot run!" disabled><i class="fas fa-play"></i></button>
|
|
}
|
|
</td>
|
|
}
|
|
</tr>
|
|
@if (DetailTaskId != null && DetailTaskId.TaskId == record.TaskId)
|
|
{
|
|
<tr>
|
|
<td colspan="10 @checkDis(@record)">
|
|
<div class="d-flex justify-content-end">
|
|
<div class="p-1 small alert @alCss(record)">
|
|
<div class="text-trim">@record.LastResult</div>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
}
|
|
}
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="10">
|
|
<DataPager PageSize="numRecord" currPage="currPage" numRecordChanged="SetNumRec" numPageChanged="SetPage" totalCount="totalCount" />
|
|
</td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
</div> |