45 lines
2.3 KiB
HTML
45 lines
2.3 KiB
HTML
<div class="amt-devices-datatable">
|
|
<table class="table table-condensed table-hover nowrap-cells">
|
|
<thead>
|
|
<tr>
|
|
<th>Hostname</th>
|
|
<th>MPS Status</th>
|
|
<th>Power State</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr ng-repeat="device in $ctrl.devices">
|
|
<td>{{ device.hostname }}</td>
|
|
<td>{{ device.connectionStatus ? 'Connected' : 'Disconnected' }}</td>
|
|
<td>{{ $ctrl.parsePowerState(device.powerstate) }} <i class="fa fa-cog fa-spin" ng-show="$ctrl.state.executingAction[device.guid]" style="margin-left: 5px;"></i></td>
|
|
<td>
|
|
<div class="btn-group btn-group-xs" role="group" aria-label="..." style="display: inline-flex;">
|
|
<a style="margin: 0 2.5px;" title="Power up the device" ng-click="$ctrl.executeDeviceAction(device, 'power up')">
|
|
<i class="fa fa-plug space-right" ng-class="{ 'icon-disabled': !device.connectionStatus }" aria-hidden="true"></i>
|
|
</a>
|
|
<a style="margin: 0 2.5px;" title="Power off the device" ng-click="$ctrl.executeDeviceAction(device, 'power off')">
|
|
<i class="fa fa-power-off space-right" ng-class="{ 'icon-disabled': !device.connectionStatus }" aria-hidden="true"></i>
|
|
</a>
|
|
<a style="margin: 0 2.5px;" title="Restart the device" ng-click="$ctrl.executeDeviceAction(device, 'restart')">
|
|
<i class="fa fa-sync space-right" ng-class="{ 'icon-disabled': !device.connectionStatus }" aria-hidden="true"></i>
|
|
</a>
|
|
<a style="margin: 0 2.5px;" title="Connect KVM" target="_blank" ui-sref="portainer.endpoints.endpoint.kvm({id: $ctrl.endpointId, deviceId: device.guid, deviceName: device.hostname})">
|
|
<i class="fa fa-desktop space-right" ng-class="{ 'icon-disabled': !device.connectionStatus }" aria-hidden="true"></i>
|
|
</a>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr ng-if="!$ctrl.devices && !$ctrl.error">
|
|
<td colspan="5" class="text-center text-muted">Loading...</td>
|
|
</tr>
|
|
<tr ng-if="$ctrl.devices.length === 0">
|
|
<td colspan="5" class="text-center text-muted">No devices found.</td>
|
|
</tr>
|
|
<tr ng-if="$ctrl.error">
|
|
<td colspan="5" class="text-center text-muted">{{ $ctrl.error }}</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|