blob: f2db772d9009da2090d017bf70382069c535664b [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">
4 <h1>Server power operation</h1>
5 </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>
Iftekharul Islamf157d372017-03-08 11:11:27 -060011 <span class="power__status-log inline float-right">Server last reset at {{dataService.last_updated |date:'h:mm:ss on MM/dd/yyyy'}}</span>
Michael Davis19475752017-02-23 18:30:23 -060012 </div>
13 </div>
14 <div class="row column">
Iftekharul Islamf157d372017-03-08 11:11:27 -060015 <div id="power-indicator-bar" class="power__indicator-bar" ng-class="{'power__state-on': dataService.server_state == 'On', 'power__state-off': dataService.server_state == 'Off'}">
16 <p class="inline">{{dataService.server_id}}</p>
17 <h3 class="power__state inline float-right 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 Davis0f03ad12017-02-27 16:54:18 -060022 <h3 class="h4">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 Islamf157d372017-03-08 11:11:27 -060026 <div class="row column power-option" ng-hide="dataService.server_state == 'On'" ng-class="{disabled: confirm && !power_confirm, transitionAll: confirm && power_confirm}">
27 <button id="power__power-on" class="btn-secondary" ng-click="powerOnConfirm()" role="button">Power On</button>
Michael Davis19475752017-02-23 18:30:23 -060028 <p>Attempts to power on the server</p>
Iftekharul Islamf157d372017-03-08 11:11:27 -060029
30 <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 Islamf157d372017-03-08 11:11:27 -060034 <div class="row column power-option" ng-hide="dataService.server_state == 'Off'" ng-class="{disabled: confirm && !warmboot_confirm, transitionAll: confirm && warmboot_confirm}">
35 <button id="power__warm-boot" class="btn-secondary" ng-click="warmRebootConfirm()" role="button">Warm reboot</button>
Michael Davis19475752017-02-23 18:30:23 -060036 <p>Attempts to perform an orderly shutdown before restarting the server</p>
Iftekharul Islamf157d372017-03-08 11:11:27 -060037 <confirm title="Warm Reboot" message="perform an orderly shutdown" confirm="warmboot_confirm" ng-show="warmboot_confirm" callback="warmReboot"></confirm>
Michael Davis19475752017-02-23 18:30:23 -060038 </div>
Iftekharul Islamf157d372017-03-08 11:11:27 -060039 <div class="row column power-option" ng-hide="dataService.server_state == 'Off'" ng-class="{disabled: confirm && !coldboot_confirm, transitionAll: confirm && coldboot_confirm}">
40 <button id="power__cold-boot" class="btn-secondary" ng-click="coldRebootConfirm()" role="button">Cold reboot</button>
Michael Davis19475752017-02-23 18:30:23 -060041 <p>Shuts down the server immediately, then restarts it</p>
Iftekharul Islamf157d372017-03-08 11:11:27 -060042 <confirm title="Cold Reboot" message="Shutdown server immediately." confirm="coldboot_confirm" ng-show="coldboot_confirm" cancel="coldbootCancel" callback="toggleState"></confirm>
Michael Davis19475752017-02-23 18:30:23 -060043 </div>
Iftekharul Islamf157d372017-03-08 11:11:27 -060044 <div class="row column power-option" ng-hide="dataService.server_state == 'Off'" ng-class="{disabled: confirm && !orderly_confirm, transitionAll: confirm && orderly_confirm}">
45 <button id="power__soft-shutdown" class="btn-secondary" ng-click="orderlyShutdownConfirm()" role="button">Orderly shutdown</button>
Michael Davis19475752017-02-23 18:30:23 -060046 <p>Attempts to stop all software on the server before removing power</p>
Iftekharul Islamf157d372017-03-08 11:11:27 -060047 <confirm title="Orderly shutdown" message="Attempts to stop all software orderly." confirm="orderly_confirm" ng-show="orderly_confirm" cancel="orderlyShutdownCancel" callback="toggleState"></confirm>
Michael Davis19475752017-02-23 18:30:23 -060048 </div>
Iftekharul Islamf157d372017-03-08 11:11:27 -060049 <div class="row column power-option" ng-hide="dataService.server_state == 'Off'" ng-class="{disabled: confirm && !immediately_confirm, transitionAll: confirm && immediately_confirm}">
50 <button id="power__hard-shutdown" class="btn-secondary" ng-click="immediateShutdownConfirm()" role="button">Immediate shutdown</button>
Michael Davis19475752017-02-23 18:30:23 -060051 <p>Removes power from the server without waiting for software to stop</p>
Iftekharul Islamf157d372017-03-08 11:11:27 -060052 <confirm title="Immediate shutdown" message="Removes power from the server immediately." confirm="immediately_confirm" ng-show="immediately_confirm" cancel="immediatelyShutdownCancel" callback="toggleState"></confirm>
Michael Davis19475752017-02-23 18:30:23 -060053 </div>
54 </div>
Iftekharul Islamf157d372017-03-08 11:11:27 -060055</div>