|
16 | 16 | @namespace Synapse.Dashboard.Components |
17 | 17 | @inject JSInterop jsInterop |
18 | 18 |
|
| 19 | +<div class="d-flex flex-row justify-content-between align-items-center"> |
| 20 | + @Title |
| 21 | + <span>@(WorkflowInstances?.Count() ?? 0) items</span> |
| 22 | + <div class="d-flex"> |
| 23 | + @if (Workflows != null && Workflows.Count() > 0) |
| 24 | + { |
| 25 | + <select class="form-select m-2" @onchange="OnSelectWorkflowChangedAsync"> |
| 26 | + <option value="">All workflows</option> |
| 27 | + @foreach (var workflowResource in Workflows) |
| 28 | + { |
| 29 | + <option value="@workflowResource.GetQualifiedName()">@workflowResource.GetQualifiedName()</option> |
| 30 | + } |
| 31 | + </select> |
| 32 | + } |
| 33 | + @if (Namespaces != null && Namespaces.Count() > 0) |
| 34 | + { |
| 35 | + <select class="form-select m-2" @onchange="OnSelectNamespaceChangedAsync"> |
| 36 | + <option value="">All namespaces</option> |
| 37 | + @foreach (var namespaceResource in Namespaces) |
| 38 | + { |
| 39 | + <option value="@namespaceResource.GetName()" selected="@(@namespaceResource.GetName() == @namespace)">@namespaceResource.GetName()</option> |
| 40 | + } |
| 41 | + </select> |
| 42 | + } |
| 43 | + @if (Operators != null && Operators.Count() > 0) |
| 44 | + { |
| 45 | + <select class="form-select m-2" @onchange="OnSelectOperatorChangedAsync"> |
| 46 | + <option value="">All operators</option> |
| 47 | + @foreach (var operatorResource in Operators) |
| 48 | + { |
| 49 | + var name = operatorResource.GetName() + "." + operatorResource.GetNamespace(); |
| 50 | + <option value="@name" selected="@(name == operatorName)">@name</option> |
| 51 | + } |
| 52 | + </select> |
| 53 | + } |
| 54 | + <input type="search" class="form-control rounded my-2 me-2" placeholder="Search" @oninput="OnSearchInputAsync" /> |
| 55 | + <div class="dropdown d-flex align-content-center"> |
| 56 | + <button class="btn btn-sm" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false" title="" @onclick:stopPropagation="true"><i class="bi bi-three-dots-vertical"></i></button> |
| 57 | + <ul class="dropdown-menu"> |
| 58 | + <li><button class="dropdown-item @(selectedInstanceNames.Count() == 0 ? "text-mute" : "")" disabled="@(selectedInstanceNames.Count() == 0)" @onclick="OnSuspendSelectedClickedAsync" @onclick:preventDefault="true" @onclick:stopPropagation="true"><Icon Name="IconName.Pause" /> Suspend selected</button></li> |
| 59 | + <li><button class="dropdown-item @(selectedInstanceNames.Count() == 0 ? "text-mute" : "")" disabled="@(selectedInstanceNames.Count() == 0)" @onclick="OnResumeSelectedClickedAsync" @onclick:preventDefault="true" @onclick:stopPropagation="true"><Icon Name="IconName.Play" /> Resume selected</button></li> |
| 60 | + <li><button class="dropdown-item @(selectedInstanceNames.Count() == 0 ? "text-mute" : "")" disabled="@(selectedInstanceNames.Count() == 0)" @onclick="OnCancelSelectedClickedAsync" @onclick:preventDefault="true" @onclick:stopPropagation="true"><Icon Name="IconName.X" /> Cancel selected</button></li> |
| 61 | + <li><button class="dropdown-item @(selectedInstanceNames.Count() == 0 ? "text-mute" : "text-danger")" disabled="@(selectedInstanceNames.Count() == 0)" @onclick="OnDeleteSelected" @onclick:preventDefault="true" @onclick:stopPropagation="true"><Icon Name="IconName.Trash" /> Delete selected</button></li> |
| 62 | + </ul> |
| 63 | + </div> |
| 64 | + </div> |
| 65 | +</div> |
19 | 66 | <div class="table-container @ClassNames"> |
20 | 67 | @if (Loading) |
21 | 68 | { |
22 | 69 | <Loader /> |
23 | 70 | } |
24 | | - <div class="d-flex flex-row justify-content-between align-items-center"> |
25 | | - @Title |
26 | | - <span>@(WorkflowInstances?.Count() ?? 0) items</span> |
27 | | - <div class="d-flex"> |
28 | | - @if (Workflows != null && Workflows.Count() > 0) { |
29 | | - <select class="form-select m-2" @onchange="OnSelectWorkflowChangedAsync"> |
30 | | - <option value="">All workflows</option> |
31 | | - @foreach (var workflowResource in Workflows) |
32 | | - { |
33 | | - <option value="@workflowResource.GetQualifiedName()">@workflowResource.GetQualifiedName()</option> |
34 | | - } |
35 | | - </select> |
36 | | - } |
37 | | - @if (Namespaces != null && Namespaces.Count() > 0) { |
38 | | - <select class="form-select m-2" @onchange="OnSelectNamespaceChangedAsync"> |
39 | | - <option value="">All namespaces</option> |
40 | | - @foreach (var namespaceResource in Namespaces) |
41 | | - { |
42 | | - <option value="@namespaceResource.GetName()" selected="@(@namespaceResource.GetName() == @namespace)">@namespaceResource.GetName()</option> |
43 | | - } |
44 | | - </select> |
45 | | - } |
46 | | - @if (Operators != null && Operators.Count() > 0) |
47 | | - { |
48 | | - <select class="form-select m-2" @onchange="OnSelectOperatorChangedAsync"> |
49 | | - <option value="">All operators</option> |
50 | | - @foreach (var operatorResource in Operators) |
51 | | - { |
52 | | - var name = operatorResource.GetName() + "." + operatorResource.GetNamespace(); |
53 | | - <option value="@name" selected="@(name == operatorName)">@name</option> |
54 | | - } |
55 | | - </select> |
56 | | - } |
57 | | - <input type="search" class="form-control rounded my-2 me-2" placeholder="Search" @oninput="OnSearchInputAsync" /> |
58 | | - <div class="dropdown d-flex align-content-center"> |
59 | | - <button class="btn btn-sm" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false" title="" @onclick:stopPropagation="true"><i class="bi bi-three-dots-vertical"></i></button> |
60 | | - <ul class="dropdown-menu"> |
61 | | - <li><button class="dropdown-item @(selectedInstanceNames.Count() == 0 ? "text-mute" : "")" disabled="@(selectedInstanceNames.Count() == 0)" @onclick="OnSuspendSelectedClickedAsync" @onclick:preventDefault="true" @onclick:stopPropagation="true"><Icon Name="IconName.Pause" /> Suspend selected</button></li> |
62 | | - <li><button class="dropdown-item @(selectedInstanceNames.Count() == 0 ? "text-mute" : "")" disabled="@(selectedInstanceNames.Count() == 0)" @onclick="OnResumeSelectedClickedAsync" @onclick:preventDefault="true" @onclick:stopPropagation="true"><Icon Name="IconName.Play" /> Resume selected</button></li> |
63 | | - <li><button class="dropdown-item @(selectedInstanceNames.Count() == 0 ? "text-mute" : "")" disabled="@(selectedInstanceNames.Count() == 0)" @onclick="OnCancelSelectedClickedAsync" @onclick:preventDefault="true" @onclick:stopPropagation="true"><Icon Name="IconName.X" /> Cancel selected</button></li> |
64 | | - <li><button class="dropdown-item @(selectedInstanceNames.Count() == 0 ? "text-mute" : "text-danger")" disabled="@(selectedInstanceNames.Count() == 0)" @onclick="OnDeleteSelected" @onclick:preventDefault="true" @onclick:stopPropagation="true"><Icon Name="IconName.Trash" /> Delete selected</button></li> |
65 | | - </ul> |
66 | | - </div> |
67 | | - </div> |
68 | | - </div> |
69 | 71 | <table class="table table-hover"> |
70 | 72 | <thead> |
71 | 73 | <tr> |
|
0 commit comments