blob: 207bc1c0fff87331f3251a377f507c92abc39b84 [file] [log] [blame]
Iftekharul Islamf157d372017-03-08 11:11:27 -06001<div id="power-operations">
Michael Davis19475752017-02-23 18:30:23 -06002
Michael Davis19475752017-02-23 18:30:23 -06003 <div class="row column">
Michael Davise126be72017-05-08 11:20:12 -05004 <h1>Server power operations</h1>
Michael Davis19475752017-02-23 18:30:23 -06005 </div>
6
7 <!-- Current status and bar display the state of the server. Class 'power__state-off' is applied to bar and 'power__state' text switches to say "off"-->
8 <div class="row column">
Michael Davis0f03ad12017-02-27 16:54:18 -06009 <div class="power__current-status ">
Michael Davis5d014692017-03-02 13:37:40 -060010 <h2 class="inline h4">Current status</h2>
Michael Davis68f929d2017-07-27 15:33:59 -050011 <div class="power__status-log inline float-right">Server last reboot at <span class="courier-bold">{{dataService.last_updated |date:'h:mm:ss on MMM dd yyyy'}}</span></div>
Michael Davis19475752017-02-23 18:30:23 -060012 </div>
13 </div>
14 <div class="row column">
Iftekharul Islamccfe2452017-03-16 10:47:04 -050015 <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 == 'Quiesced'}">
Iftekharul Islamf157d372017-03-08 11:11:27 -060016 <p class="inline">{{dataService.server_id}}</p>
Michael Davis7f89fad2017-07-31 18:36:45 -050017 <h3 class="power__state inline no-margin h3"><span>{{dataService.server_state}}</span></h3>
Michael Davis19475752017-02-23 18:30:23 -060018 </div>
19 </div>
20 <div class="row column">
21 <div class="row column">
Michael Davis46f0a1f2017-07-13 11:23:16 -050022 <h3 class="h4 subhead">Select a power operation</h3>
Michael Davis19475752017-02-23 18:30:23 -060023 </div>
24
Michael Davis0f03ad12017-02-27 16:54:18 -060025 <!-- Power on displays only when server is shutdown -->
Iftekharul Islamcd789502017-04-19 14:37:55 -050026 <div class="row column power-option" ng-hide="dataService.server_state == 'Running' || dataService.server_state == 'Quiesced'" ng-class="{disabled: dataService.server_unreachable || (confirm && !power_confirm) || dataService.loading, transitionAll: confirm && power_confirm}">
Michael Davis68f929d2017-07-27 15:33:59 -050027 <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">Power on</button>
Michael Davis46f0a1f2017-07-13 11:23:16 -050028 <p class="inline">Attempts to power on the server</p>
Iftekharul Islamf157d372017-03-08 11:11:27 -060029
Iftekharul Islamccfe2452017-03-16 10:47:04 -050030 <!---<confirm title="power off" message="Power off the server" confirm="power_confirm" ng-show="power_confirm" callback="togglePower"></confirm>-->
Michael Davis19475752017-02-23 18:30:23 -060031 </div>
32
Michael Davis0f03ad12017-02-27 16:54:18 -060033 <!-- Power reboot/shutdown options : when server is off all of these are hidden. When one option is selected, the others are disabled. -->
Iftekharul Islamcd789502017-04-19 14:37:55 -050034 <div class="row column power-option" ng-hide="dataService.server_state == 'Off'" ng-class="{disabled: dataService.server_unreachable || (confirm && !warmboot_confirm) || dataService.loading, transitionAll: confirm && warmboot_confirm}">
Michael Davis46f0a1f2017-07-13 11:23:16 -050035 <button id="power__warm-boot" class="btn-secondary inline" ng-click="warmRebootConfirm()" role="button" ng-disabled="dataService.server_unreachable"><i>&#x21BB</i> Warm reboot</button>
36 <p class="inline">Attempts to perform an orderly shutdown before restarting the server</p>
Michael Davis68f929d2017-07-27 15:33:59 -050037 <confirm title="Warm Reboot" confirm="warmboot_confirm" ng-show="warmboot_confirm" callback="warmReboot"></confirm>
Michael Davis19475752017-02-23 18:30:23 -060038 </div>
Iftekharul Islamcd789502017-04-19 14:37:55 -050039 <div class="row column power-option" ng-hide="dataService.server_state == 'Off'" ng-class="{disabled: dataService.server_unreachable || (confirm && !coldboot_confirm) || dataService.loading, transitionAll: confirm && coldboot_confirm}">
Michael Davis46f0a1f2017-07-13 11:23:16 -050040 <button id="power__cold-boot" class="btn-secondary inline" ng-click="coldRebootConfirm()" role="button" ng-disabled="dataService.server_unreachable"><i>&#x21BB</i> Cold reboot</button>
41 <p class="inline">Shuts down the server immediately, then restarts it</p>
Michael Davis68f929d2017-07-27 15:33:59 -050042 <confirm title="Cold Reboot" confirm="coldboot_confirm" ng-show="coldboot_confirm" cancel="coldbootCancel" callback="coldReboot"></confirm>
Michael Davis19475752017-02-23 18:30:23 -060043 </div>
Iftekharul Islamcd789502017-04-19 14:37:55 -050044 <div class="row column power-option" ng-hide="dataService.server_state == 'Off'" ng-class="{disabled: dataService.server_unreachable || (confirm && !orderly_confirm) || dataService.loading, transitionAll: confirm && orderly_confirm}">
Michael Davis46f0a1f2017-07-13 11:23:16 -050045 <button id="power__soft-shutdown" class="btn-secondary inline" ng-click="orderlyShutdownConfirm()" role="button" ng-disabled="dataService.server_unreachable"><img src="assets/images/icon-power.svg" />Orderly shutdown</button>
46 <p class="inline">Attempts to stop all software on the server before removing power</p>
Michael Davis68f929d2017-07-27 15:33:59 -050047 <confirm title="Orderly shutdown" confirm="orderly_confirm" ng-show="orderly_confirm" cancel="orderlyShutdownCancel" callback="orderlyShutdown"></confirm>
Michael Davis19475752017-02-23 18:30:23 -060048 </div>
Iftekharul Islamcd789502017-04-19 14:37:55 -050049 <div class="row column power-option" ng-hide="dataService.server_state == 'Off'" ng-class="{disabled: dataService.server_unreachable || (confirm && !immediately_confirm) || dataService.loading, transitionAll: confirm && immediately_confirm}">
Michael Davis46f0a1f2017-07-13 11:23:16 -050050 <button id="power__hard-shutdown" class="btn-secondary inline" ng-click="immediateShutdownConfirm()" role="button" ng-disabled="dataService.server_unreachable"><img src="assets/images/icon-power.svg" />Immediate shutdown</button>
51 <p class="inline">Removes power from the server without waiting for software to stop</p>
Michael Davis68f929d2017-07-27 15:33:59 -050052 <confirm title="Immediate shutdown" confirm="immediately_confirm" ng-show="immediately_confirm" cancel="immediatelyShutdownCancel" callback="immediateShutdown"></confirm>
Michael Davis19475752017-02-23 18:30:23 -060053 </div>
54 </div>
Iftekharul Islamf157d372017-03-08 11:11:27 -060055</div>