2022-08-12 02:56:48 +00:00
|
|
|
<div class="inner-datatable">
|
2018-07-20 16:31:34 +00:00
|
|
|
<table class="table table-condensed table-hover nowrap-cells">
|
2021-09-07 23:06:18 +00:00
|
|
|
<thead>
|
2018-06-11 13:13:19 +00:00
|
|
|
<tr>
|
2022-08-12 02:56:48 +00:00
|
|
|
<th uib-dropdown dropdown-append-to-body auto-close="disabled" is-open="$ctrl.filters.state.open" class="w-[10%]">
|
|
|
|
<div class="flex">
|
|
|
|
<table-column-header
|
|
|
|
col-title="'Status'"
|
|
|
|
can-sort="true"
|
|
|
|
is-sorted="$ctrl.state.orderBy === 'Status.State'"
|
|
|
|
is-sorted-desc="$ctrl.state.orderBy === 'Status.State' && $ctrl.state.reverseOrder"
|
|
|
|
ng-click="$ctrl.changeOrderBy('Status.State')"
|
|
|
|
></table-column-header>
|
|
|
|
<span class="space-left">
|
2022-11-28 02:00:28 +00:00
|
|
|
<span uib-dropdown-toggle class="table-filter" ng-if="!$ctrl.filters.state.enabled"
|
|
|
|
>Filter
|
|
|
|
<pr-icon icon="'filter'"></pr-icon>
|
|
|
|
</span>
|
|
|
|
<span uib-dropdown-toggle class="table-filter filter-active" ng-if="$ctrl.filters.state.enabled"
|
|
|
|
>Filter
|
|
|
|
<pr-icon icon="'check'"></pr-icon>
|
|
|
|
</span>
|
2022-08-12 02:56:48 +00:00
|
|
|
</span>
|
|
|
|
<div class="dropdown-menu" uib-dropdown-menu>
|
|
|
|
<div class="tableMenu">
|
|
|
|
<div class="menuHeader"> Filter by state </div>
|
|
|
|
<div class="menuContent">
|
|
|
|
<div class="md-checkbox" ng-repeat="filter in $ctrl.filters.state.values track by $index">
|
|
|
|
<input id="filter_state_{{ $ctrl.serviceId }}_{{ $index }}" type="checkbox" ng-model="filter.display" ng-change="$ctrl.onStateFilterChange()" />
|
|
|
|
<label for="filter_state_{{ $ctrl.serviceId }}_{{ $index }}">{{ filter.label }}</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<a type="button" class="btn btn-default btn-sm" ng-click="$ctrl.filters.state.open = false;">Close</a>
|
2018-06-11 13:13:19 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</th>
|
2022-01-17 05:53:32 +00:00
|
|
|
<th style="width: 22%">Task</th>
|
2018-06-11 13:13:19 +00:00
|
|
|
<th>Actions</th>
|
|
|
|
<th>
|
2022-08-03 09:43:29 +00:00
|
|
|
<table-column-header
|
|
|
|
col-title="'Slot'"
|
|
|
|
can-sort="true"
|
|
|
|
is-sorted="$ctrl.state.orderBy === 'Slot'"
|
|
|
|
is-sorted-desc="$ctrl.state.orderBy === 'Slot' && $ctrl.state.reverseOrder"
|
|
|
|
ng-click="$ctrl.changeOrderBy('Slot')"
|
|
|
|
></table-column-header>
|
2018-06-11 13:13:19 +00:00
|
|
|
</th>
|
|
|
|
<th>
|
2022-08-03 09:43:29 +00:00
|
|
|
<table-column-header
|
|
|
|
col-title="'Node'"
|
|
|
|
can-sort="true"
|
|
|
|
is-sorted="$ctrl.state.orderBy === 'NodeId'"
|
|
|
|
is-sorted-desc="$ctrl.state.orderBy === 'NodeId' && $ctrl.state.reverseOrder"
|
|
|
|
ng-click="$ctrl.changeOrderBy('NodeId')"
|
|
|
|
></table-column-header>
|
2018-06-11 13:13:19 +00:00
|
|
|
</th>
|
|
|
|
<th>
|
2022-08-03 09:43:29 +00:00
|
|
|
<table-column-header
|
|
|
|
col-title="'Last Update'"
|
|
|
|
can-sort="true"
|
|
|
|
is-sorted="$ctrl.state.orderBy === 'Updated'"
|
|
|
|
is-sorted-desc="$ctrl.state.orderBy === 'Updated' && $ctrl.state.reverseOrder"
|
|
|
|
ng-click="$ctrl.changeOrderBy('Updated')"
|
|
|
|
></table-column-header>
|
2018-06-11 13:13:19 +00:00
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
2021-09-07 23:06:18 +00:00
|
|
|
<tbody>
|
2020-04-10 21:54:53 +00:00
|
|
|
<tr
|
|
|
|
ng-repeat="item in ($ctrl.state.filteredDataSet = ($ctrl.dataset | filter: $ctrl.applyFilters | filter:$ctrl.textFilter | orderBy:$ctrl.state.orderBy:$ctrl.state.reverseOrder))"
|
|
|
|
>
|
2018-06-11 13:13:19 +00:00
|
|
|
<td class="text-center">
|
|
|
|
<span class="label label-{{ item.Status.State | taskstatusbadge }} space-right">{{ item.Status.State }}</span>
|
|
|
|
</td>
|
|
|
|
<td>
|
2019-03-11 03:48:00 +00:00
|
|
|
<a ng-if="!$ctrl.agentProxy || !item.Container" ui-sref="docker.tasks.task({id: item.Id})" class="monospaced">{{ item.Id }}</a>
|
2020-04-10 21:54:53 +00:00
|
|
|
<a ng-if="$ctrl.agentProxy && item.Container" ui-sref="docker.containers.container({ id: item.Container.Id, nodeName: item.Container.NodeName })" class="monospaced">{{
|
|
|
|
item.Id
|
|
|
|
}}</a>
|
2018-06-11 13:13:19 +00:00
|
|
|
</td>
|
|
|
|
<td>
|
2020-04-10 21:54:53 +00:00
|
|
|
<container-quick-actions
|
|
|
|
ng-if="!$ctrl.agentProxy || !item.Container"
|
|
|
|
container-id="item.ContainerId"
|
|
|
|
task-id="item.Id"
|
|
|
|
status="item.Status.State"
|
|
|
|
state="$ctrl.state"
|
|
|
|
></container-quick-actions>
|
|
|
|
<container-quick-actions
|
|
|
|
ng-if="$ctrl.agentProxy && item.Container"
|
|
|
|
container-id="item.Container.Id"
|
|
|
|
node-name="item.Container.NodeName"
|
|
|
|
status="item.Status.State"
|
|
|
|
state="$ctrl.state"
|
|
|
|
></container-quick-actions>
|
2018-06-11 13:13:19 +00:00
|
|
|
</td>
|
|
|
|
<td>{{ item.Slot ? item.Slot : '-' }}</td>
|
|
|
|
<td>{{ item.NodeId | tasknodename: $ctrl.nodes }}</td>
|
|
|
|
<td>{{ item.Updated | getisodate }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr ng-if="$ctrl.state.filteredDataSet.length === 0">
|
|
|
|
<td colspan="5" class="text-center text-muted">No task matching filter.</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|