15912f757SIftekharul Islam<loader loading="dataService.loading"></loader>
2cd789508SIftekharul Islam<div id="power-operations">
3cd789508SIftekharul Islam
4cd789508SIftekharul Islam    <div class="row column">
5e126be7aSMichael Davis        <h1>Server power operations</h1>
6706b75b3SMichael Davis        <div class="power__current-status page-header">
7cd789508SIftekharul Islam            <h2 class="inline h4">Current status</h2>
88819b7a7SMichael Davis            <div class="power__status-log inline float-right">Last power operation at <span class="courier-bold">{{dataService.last_updated |date:'h:mm:ss on MMM dd yyyy'}}</span></div>
9cd789508SIftekharul Islam        </div>
10cd789508SIftekharul Islam    </div>
11cd789508SIftekharul Islam    <div class="row column">
1278453481SMichael Davis        <div id="power-indicator-bar" class="power__indicator-bar" ng-class="{'power__state-on': dataService.server_state == 'Running', 'power__state-off': dataService.server_state == 'Off', 'power__state-indet': dataService.server_state == 'Standby'}">
136ca92edcSIftekharul Islam            <p class="inline">{{dataService.hostname}} - {{dataService.server_id}}</p>
145912f757SIftekharul Islam            <h3 class="power__state inline no-margin h3"><span>{{dataService.server_state | quiescedToStandBy}}</span></h3>
15cd789508SIftekharul Islam        </div>
16cd789508SIftekharul Islam    </div>
17cd789508SIftekharul Islam    <div class="row column">
18cd789508SIftekharul Islam        <div class="row column">
1946f0a1f8SMichael Davis            <h3 class="h4 subhead">Select a power operation</h3>
20cd789508SIftekharul Islam        </div>
21cd789508SIftekharul Islam
22cd789508SIftekharul Islam        <!-- Power on displays only when server is shutdown -->
23*db28a387SIftekharul Islam        <div class="row column power-option" ng-hide="dataService.server_state == 'Running' || dataService.server_state == 'Quiesced' || dataService.server_state == 'Unreachable'" ng-class="{disabled: dataService.server_unreachable || (confirm && !power_confirm) || dataService.loading, transitionAll: confirm && power_confirm}">
24706b75b3SMichael Davis            <button id="power__power-on" class="btn-secondary inline" ng-click="togglePower()" role="button" ng-disabled="dataService.server_unreachable"><img src="assets/images/icon-power.svg" alt="power on" aria-hidden="true">Power on</button>
2546f0a1f8SMichael Davis            <p class="inline">Attempts to power on the server</p>
26cd789508SIftekharul Islam        </div>
27cd789508SIftekharul Islam
28cd789508SIftekharul Islam        <!-- Power reboot/shutdown options : when server is off all of these are hidden. When one option is selected, the others are disabled. -->
29*db28a387SIftekharul Islam        <div class="row column power-option" ng-hide="dataService.server_state == 'Off' || dataService.server_state == 'Unreachable'" ng-class="{disabled: dataService.server_unreachable || (confirm && !warmboot_confirm) || dataService.loading, transitionAll: confirm && warmboot_confirm}">
30706b75b3SMichael Davis            <button id="power__warm-boot" class="btn-secondary inline" ng-click="warmRebootConfirm()" role="button" ng-disabled="dataService.server_unreachable"><i aria-hidden="true">&#x21BB</i> Warm reboot</button>
3146f0a1f8SMichael Davis            <p class="inline">Attempts to perform an orderly shutdown before restarting the server</p>
32b8a41c18SMichael Davis            <confirm title="warm reboot" confirm="warmboot_confirm" ng-show="warmboot_confirm" callback="warmReboot"></confirm>
33cd789508SIftekharul Islam        </div>
34*db28a387SIftekharul Islam        <div class="row column power-option" ng-hide="dataService.server_state == 'Off' || dataService.server_state == 'Unreachable'" ng-class="{disabled: dataService.server_unreachable || (confirm && !coldboot_confirm) || dataService.loading, transitionAll: confirm && coldboot_confirm}">
35706b75b3SMichael Davis            <button id="power__cold-boot" class="btn-secondary inline" ng-click="coldRebootConfirm()" role="button" ng-disabled="dataService.server_unreachable"><i aria-hidden="true">&#x21BB</i> Cold reboot</button>
3646f0a1f8SMichael Davis            <p class="inline">Shuts down the server immediately, then restarts it</p>
37b8a41c18SMichael Davis            <confirm title="cold reboot" confirm="coldboot_confirm" ng-show="coldboot_confirm" cancel="coldbootCancel" callback="coldReboot"></confirm>
38cd789508SIftekharul Islam        </div>
39*db28a387SIftekharul Islam        <div class="row column power-option" ng-hide="dataService.server_state == 'Off' || dataService.server_state == 'Unreachable'" ng-class="{disabled: dataService.server_unreachable || (confirm && !orderly_confirm) || dataService.loading, transitionAll: confirm && orderly_confirm}">
40706b75b3SMichael Davis            <button id="power__soft-shutdown" class="btn-secondary inline" ng-click="orderlyShutdownConfirm()" role="button" ng-disabled="dataService.server_unreachable"><img aria-hidden="true" src="assets/images/icon-power.svg" />Orderly shutdown</button>
4146f0a1f8SMichael Davis            <p class="inline">Attempts to stop all software on the server before removing power</p>
42b8a41c18SMichael Davis            <confirm title="orderly shutdown" confirm="orderly_confirm" ng-show="orderly_confirm" cancel="orderlyShutdownCancel" callback="orderlyShutdown"></confirm>
43cd789508SIftekharul Islam        </div>
44*db28a387SIftekharul Islam        <div class="row column power-option" ng-hide="dataService.server_state == 'Off' || dataService.server_state == 'Unreachable'" ng-class="{disabled: dataService.server_unreachable || (confirm && !immediately_confirm) || dataService.loading, transitionAll: confirm && immediately_confirm}">
45706b75b3SMichael Davis            <button id="power__hard-shutdown" class="btn-secondary inline" ng-click="immediateShutdownConfirm()" role="button" ng-disabled="dataService.server_unreachable"><img aria-hidden="true" src="assets/images/icon-power.svg" />Immediate shutdown</button>
4646f0a1f8SMichael Davis            <p class="inline">Removes power from the server without waiting for software to stop</p>
47b8a41c18SMichael Davis            <confirm title="immediate shutdown" confirm="immediately_confirm" ng-show="immediately_confirm" cancel="immediatelyShutdownCancel" callback="immediateShutdown"></confirm>
48cd789508SIftekharul Islam        </div>
49cd789508SIftekharul Islam    </div>
50cd789508SIftekharul Islam</div>