1*cd789508SIftekharul Islam<div id="power-operations"> 2*cd789508SIftekharul Islam 3*cd789508SIftekharul Islam <div class="row column"> 4*cd789508SIftekharul Islam <h1>Server power operation</h1> 5*cd789508SIftekharul Islam </div> 6*cd789508SIftekharul Islam 7*cd789508SIftekharul Islam <!-- 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*cd789508SIftekharul Islam <div class="row column"> 9*cd789508SIftekharul Islam <div class="power__current-status "> 10*cd789508SIftekharul Islam <h2 class="inline h4">Current status</h2> 11*cd789508SIftekharul Islam <span class="power__status-log inline float-right">Server last reset at {{dataService.last_updated |date:'h:mm:ss on MM/dd/yyyy'}}</span> 12*cd789508SIftekharul Islam </div> 13*cd789508SIftekharul Islam </div> 14*cd789508SIftekharul Islam <div class="row column"> 15*cd789508SIftekharul Islam <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'}"> 16*cd789508SIftekharul Islam <p class="inline">{{dataService.server_id}}</p> 17*cd789508SIftekharul Islam <h3 class="power__state inline float-right h3"><span>{{dataService.server_state}}</span></h3> 18*cd789508SIftekharul Islam </div> 19*cd789508SIftekharul Islam </div> 20*cd789508SIftekharul Islam <div class="row column"> 21*cd789508SIftekharul Islam <div class="row column"> 22*cd789508SIftekharul Islam <h3 class="h4">Select a power operation</h3> 23*cd789508SIftekharul Islam </div> 24*cd789508SIftekharul Islam 25*cd789508SIftekharul Islam <!-- Power on displays only when server is shutdown --> 26*cd789508SIftekharul Islam <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}"> 27*cd789508SIftekharul Islam <button id="power__power-on" class="btn-secondary" ng-click="togglePower()" role="button" ng-disabled="dataService.server_unreachable"><img src="assets/images/icon-power.svg">Power On</button> 28*cd789508SIftekharul Islam <p>Attempts to power on the server</p> 29*cd789508SIftekharul Islam 30*cd789508SIftekharul Islam <!---<confirm title="power off" message="Power off the server" confirm="power_confirm" ng-show="power_confirm" callback="togglePower"></confirm>--> 31*cd789508SIftekharul Islam </div> 32*cd789508SIftekharul Islam 33*cd789508SIftekharul Islam <!-- Power reboot/shutdown options : when server is off all of these are hidden. When one option is selected, the others are disabled. --> 34*cd789508SIftekharul Islam <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}"> 35*cd789508SIftekharul Islam <button id="power__warm-boot" class="btn-secondary" ng-click="warmRebootConfirm()" role="button" ng-disabled="dataService.server_unreachable"><i>↻</i> Warm reboot</button> 36*cd789508SIftekharul Islam <p>Attempts to perform an orderly shutdown before restarting the server</p> 37*cd789508SIftekharul Islam <confirm title="Warm Reboot" message="perform an orderly shutdown" confirm="warmboot_confirm" ng-show="warmboot_confirm" callback="warmReboot"></confirm> 38*cd789508SIftekharul Islam </div> 39*cd789508SIftekharul Islam <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}"> 40*cd789508SIftekharul Islam <button id="power__cold-boot" class="btn-secondary" ng-click="coldRebootConfirm()" role="button" ng-disabled="dataService.server_unreachable"><i>↻</i> Cold reboot</button> 41*cd789508SIftekharul Islam <p>Shuts down the server immediately, then restarts it</p> 42*cd789508SIftekharul Islam <confirm title="Cold Reboot" message="Shutdown server immediately." confirm="coldboot_confirm" ng-show="coldboot_confirm" cancel="coldbootCancel" callback="coldReboot"></confirm> 43*cd789508SIftekharul Islam </div> 44*cd789508SIftekharul Islam <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}"> 45*cd789508SIftekharul Islam <button id="power__soft-shutdown" class="btn-secondary" ng-click="orderlyShutdownConfirm()" role="button" ng-disabled="dataService.server_unreachable"><img src="assets/images/icon-power.svg" />Orderly shutdown</button> 46*cd789508SIftekharul Islam <p>Attempts to stop all software on the server before removing power</p> 47*cd789508SIftekharul Islam <confirm title="Orderly shutdown" message="Attempts to stop all software orderly." confirm="orderly_confirm" ng-show="orderly_confirm" cancel="orderlyShutdownCancel" callback="orderlyShutdown"></confirm> 48*cd789508SIftekharul Islam </div> 49*cd789508SIftekharul Islam <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}"> 50*cd789508SIftekharul Islam <button id="power__hard-shutdown" class="btn-secondary" ng-click="immediateShutdownConfirm()" role="button" ng-disabled="dataService.server_unreachable"><img src="assets/images/icon-power.svg" />Immediate shutdown</button> 51*cd789508SIftekharul Islam <p>Removes power from the server without waiting for software to stop</p> 52*cd789508SIftekharul Islam <confirm title="Immediate shutdown" message="Removes power from the server immediately." confirm="immediately_confirm" ng-show="immediately_confirm" cancel="immediatelyShutdownCancel" callback="immediateShutdown"></confirm> 53*cd789508SIftekharul Islam </div> 54*cd789508SIftekharul Islam </div> 55*cd789508SIftekharul Islam</div>