blob: 8c23d9c60e6e39bf115e4dcfde67d77974e31fcb [file] [log] [blame]
Iftekharul Islam5912f752017-09-11 14:40:11 -05001<loader loading="dataService.loading"></loader>
Iftekharul Islamf157d372017-03-08 11:11:27 -06002<div id="power-operations">
Michael Davis19475752017-02-23 18:30:23 -06003
Michael Davis19475752017-02-23 18:30:23 -06004 <div class="row column">
Michael Davise126be72017-05-08 11:20:12 -05005 <h1>Server power operations</h1>
Michael Davis706b75b2017-08-18 16:40:03 -05006 <div class="power__current-status page-header">
Michael Davis5d014692017-03-02 13:37:40 -06007 <h2 class="inline h4">Current status</h2>
Michael Davis8819b7a2017-08-02 16:16:18 -05008 <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>
Michael Davis19475752017-02-23 18:30:23 -06009 </div>
10 </div>
11 <div class="row column">
Michael Davis78453482017-08-28 18:36:23 -050012 <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'}">
Iftekharul Islam6ca92ed2017-09-06 10:46:11 -050013 <p class="inline">{{dataService.hostname}} - {{dataService.server_id}}</p>
Iftekharul Islam5912f752017-09-11 14:40:11 -050014 <h3 class="power__state inline no-margin h3"><span>{{dataService.server_state | quiescedToStandBy}}</span></h3>
Michael Davis19475752017-02-23 18:30:23 -060015 </div>
16 </div>
17 <div class="row column">
18 <div class="row column">
Michael Davis46f0a1f2017-07-13 11:23:16 -050019 <h3 class="h4 subhead">Select a power operation</h3>
Michael Davis19475752017-02-23 18:30:23 -060020 </div>
21
Michael Davis0f03ad12017-02-27 16:54:18 -060022 <!-- Power on displays only when server is shutdown -->
Iftekharul Islamdb28a382017-11-02 13:16:17 -050023 <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}">
Ed Tanousbbcf6702017-10-06 13:53:06 -070024 <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>
Michael Davis46f0a1f2017-07-13 11:23:16 -050025 <p class="inline">Attempts to power on the server</p>
Michael Davis19475752017-02-23 18:30:23 -060026 </div>
27
Michael Davis0f03ad12017-02-27 16:54:18 -060028 <!-- Power reboot/shutdown options : when server is off all of these are hidden. When one option is selected, the others are disabled. -->
Iftekharul Islamdb28a382017-11-02 13:16:17 -050029 <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}">
Michael Davis706b75b2017-08-18 16:40:03 -050030 <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>
Michael Davis46f0a1f2017-07-13 11:23:16 -050031 <p class="inline">Attempts to perform an orderly shutdown before restarting the server</p>
Michael Davisb8a41c12017-08-14 14:59:46 -050032 <confirm title="warm reboot" confirm="warmboot_confirm" ng-show="warmboot_confirm" callback="warmReboot"></confirm>
Michael Davis19475752017-02-23 18:30:23 -060033 </div>
Iftekharul Islamdb28a382017-11-02 13:16:17 -050034 <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}">
Michael Davis706b75b2017-08-18 16:40:03 -050035 <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>
Michael Davis46f0a1f2017-07-13 11:23:16 -050036 <p class="inline">Shuts down the server immediately, then restarts it</p>
Michael Davisb8a41c12017-08-14 14:59:46 -050037 <confirm title="cold reboot" confirm="coldboot_confirm" ng-show="coldboot_confirm" cancel="coldbootCancel" callback="coldReboot"></confirm>
Michael Davis19475752017-02-23 18:30:23 -060038 </div>
Iftekharul Islamdb28a382017-11-02 13:16:17 -050039 <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}">
Ed Tanousbbcf6702017-10-06 13:53:06 -070040 <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>
Michael Davis46f0a1f2017-07-13 11:23:16 -050041 <p class="inline">Attempts to stop all software on the server before removing power</p>
Michael Davisb8a41c12017-08-14 14:59:46 -050042 <confirm title="orderly shutdown" confirm="orderly_confirm" ng-show="orderly_confirm" cancel="orderlyShutdownCancel" callback="orderlyShutdown"></confirm>
Michael Davis19475752017-02-23 18:30:23 -060043 </div>
Iftekharul Islamdb28a382017-11-02 13:16:17 -050044 <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}">
Ed Tanousbbcf6702017-10-06 13:53:06 -070045 <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>
Michael Davis46f0a1f2017-07-13 11:23:16 -050046 <p class="inline">Removes power from the server without waiting for software to stop</p>
Michael Davisb8a41c12017-08-14 14:59:46 -050047 <confirm title="immediate shutdown" confirm="immediately_confirm" ng-show="immediately_confirm" cancel="immediatelyShutdownCancel" callback="immediateShutdown"></confirm>
Michael Davis19475752017-02-23 18:30:23 -060048 </div>
49 </div>
Ed Tanousbbcf6702017-10-06 13:53:06 -070050</div>