1a1d238f3SIftekharul Islam<loader loading="dataService.loading || loading"></loader> 2e368108fSDixsie Wolmers<div id="power-operations" class="power-operations"> 3cd789508SIftekharul Islam <div class="row column"> 4e126be7aSMichael Davis <h1>Server power operations</h1> 5706b75b3SMichael Davis <div class="power__current-status page-header"> 6edf1ab46Sbeccabroek <h2 class="inline">Current status</h2> 7e368108fSDixsie Wolmers <div class="power__status-log inline float-right"> 8e368108fSDixsie Wolmers Last power operation at 9e368108fSDixsie Wolmers <span class="courier-bold">{{ powerTime | localeDate }}</span> 10e368108fSDixsie Wolmers </div> 11e368108fSDixsie Wolmers </div> 12e368108fSDixsie Wolmers </div> 13e368108fSDixsie Wolmers <!-- Power Indicator Bar --> 14e368108fSDixsie Wolmers <div class="row column"> 15e368108fSDixsie Wolmers <div id="power-indicator-bar" class="power__indicator-bar" 16e368108fSDixsie Wolmers ng-class="{'power__state-on': dataService.server_state == 'Running', 'power__state-off': dataService.server_state == 'Off', 'power__state-indet': dataService.server_state == 'Standby', 'power__state-error': dataService.server_state == 'Quiesced'}"> 17e368108fSDixsie Wolmers <p class="inline"> 18e368108fSDixsie Wolmers {{ dataService.hostname }} - {{ dataService.server_id }} 19e368108fSDixsie Wolmers </p> 20e368108fSDixsie Wolmers <h3 class="power__state inline no-margin h3"> 21e368108fSDixsie Wolmers <span>{{ dataService.server_state | quiescedToError }}</span> 22e368108fSDixsie Wolmers </h3> 23cd789508SIftekharul Islam </div> 24cd789508SIftekharul Islam </div> 25cd789508SIftekharul Islam <div class="row column"> 26e368108fSDixsie Wolmers <!-- Boot Settings Column --> 27e368108fSDixsie Wolmers <div class="large-4 columns boot-options-wrapper"> 28e368108fSDixsie Wolmers <form id="host-boot-settings" name="hostBootSettings" class="host-boot-settings" novalidate> 29e368108fSDixsie Wolmers <h2 class="subhead boot-options">Host OS boot settings</h2> 30e368108fSDixsie Wolmers <div class="boot-settings-form"> 31e368108fSDixsie Wolmers <div class="boot-options"> 32e368108fSDixsie Wolmers <label for="boot-selected"> 33e368108fSDixsie Wolmers Boot setting override</label> 34*5dac9e15SYoshie Muranaka <select name="bootSelected" 35*5dac9e15SYoshie Muranaka id="boot-selected" 36*5dac9e15SYoshie Muranaka ng-disabled="dataService.server_unreachable || bootOverrideError" 37*5dac9e15SYoshie Muranaka ng-model="boot.BootSourceOverrideTarget" 38*5dac9e15SYoshie Muranaka ng-change="onChangeBootSetting()"> 39e368108fSDixsie Wolmers <option class="courier-bold" value="{{bootSource}}" ng-repeat="bootSource in bootSources"> 40e368108fSDixsie Wolmers {{ bootSource }} 41e368108fSDixsie Wolmers </option> 42e368108fSDixsie Wolmers </select> 43e368108fSDixsie Wolmers <div class="boot-options one-time-boot-setting"> 44e368108fSDixsie Wolmers <div class="align-self-center"> 45e368108fSDixsie Wolmers <label class="control-check" id="one-time-label"> <span class="inline boot-checkbox">Enable one time boot</span> 46*5dac9e15SYoshie Muranaka <input type="checkbox" 47*5dac9e15SYoshie Muranaka name="oneTime" 48*5dac9e15SYoshie Muranaka ng-disabled="dataService.server_unreachable || 49*5dac9e15SYoshie Muranaka bootOverrideError || 50*5dac9e15SYoshie Muranaka boot.BootSourceOverrideTarget =='None'" 51*5dac9e15SYoshie Muranaka ng-model="boot.oneTimeBootEnabled"/> 52e368108fSDixsie Wolmers <span class="control__indicator"> </span> 53e368108fSDixsie Wolmers </label> 54cd789508SIftekharul Islam </div> 55cd789508SIftekharul Islam </div> 56cd789508SIftekharul Islam </div> 57e368108fSDixsie Wolmers <!-- TPM Required --> 58e368108fSDixsie Wolmers <div class="boot-options one-time-boot-setting"> 59e368108fSDixsie Wolmers <div class="boot-options"> 60e368108fSDixsie Wolmers <h3 class="content-label"> 61e368108fSDixsie Wolmers TPM required policy</h3> 62e368108fSDixsie Wolmers <p> Enable to ensure the system only boots when the TPM is functional. </p> 63e368108fSDixsie Wolmers <!-- Toggle component --> 64e368108fSDixsie Wolmers <div class="toggle-container"> 65e368108fSDixsie Wolmers <div class="toggle"> 66e368108fSDixsie Wolmers <input 67e368108fSDixsie Wolmers id="toggle__switch-round" 68e368108fSDixsie Wolmers class="toggle-switch toggle-switch__round-flat" 69e368108fSDixsie Wolmers name="toggle" 70e368108fSDixsie Wolmers type="checkbox" 71e368108fSDixsie Wolmers tabindex="0" 72e368108fSDixsie Wolmers ng-model="TPMToggle.TPMEnable" 73e368108fSDixsie Wolmers ng-disabled="dataService.server_unreachable" 74e368108fSDixsie Wolmers /> 75e368108fSDixsie Wolmers <label for="toggle__switch-round" tabindex="0" 76e368108fSDixsie Wolmers >TPM required policy is {{ TPMToggle.TPMEnable ? "On" : "Off" }}</label 77e368108fSDixsie Wolmers > 785ff98780SYoshie Muranaka </div> 79e368108fSDixsie Wolmers <span> 80e368108fSDixsie Wolmers {{ TPMToggle.TPMEnable ? "On" : "Off" }} 81e368108fSDixsie Wolmers </span> 82e368108fSDixsie Wolmers </div> 83e368108fSDixsie Wolmers </div> 84e368108fSDixsie Wolmers </div> 85e368108fSDixsie Wolmers <!-- form actions --> 86e368108fSDixsie Wolmers <div class="boot-form-actions"> 87e368108fSDixsie Wolmers <button type="submit" class="btn btn-primary" ng-click="saveBootSettings();saveTPMPolicy();hostBootSettings.$setPristine()" ng-disabled="dataService.server_unreachable || hostBootSettings.$pristine;"> 88e368108fSDixsie Wolmers Save 89c86ce3c9SYoshie Muranaka </button> 90e368108fSDixsie Wolmers <button type="reset" class="btn btn-secondary" ng-disabled="dataService.server_unreachable || hostBootSettings.$pristine" ng-click="resetForm();hostBootSettings.$setPristine()"> 91e368108fSDixsie Wolmers Cancel 92e368108fSDixsie Wolmers </button> 93cd789508SIftekharul Islam </div> 94e368108fSDixsie Wolmers </form> 95cd789508SIftekharul Islam </div> 96cd789508SIftekharul Islam </div> 97e368108fSDixsie Wolmers <!-- Power Operations Column --> 98e368108fSDixsie Wolmers <div class="large-8 columns operations-wrapper"> 99e368108fSDixsie Wolmers <h2 class="subhead boot-operations">Operations</h2> 100e368108fSDixsie Wolmers <!-- Pending one time boot alert --> 101e368108fSDixsie Wolmers <div class="alert-warning" 102e368108fSDixsie Wolmers ng-if="boot.oneTimeBootEnabled" ng-hide="dataService.server_state == 'Unreachable'"> 103e368108fSDixsie Wolmers <div class="pending-icon"> 104e368108fSDixsie Wolmers <icon file="icon-pending.svg"></icon> 105cd789508SIftekharul Islam </div> 106e368108fSDixsie Wolmers <p class="alert-pending"> 107e368108fSDixsie Wolmers Pending one time boot. Next boot will be performed with the 108e368108fSDixsie Wolmers specified one time boot settings. Subsequent boots will be performed 109e368108fSDixsie Wolmers with the default settings. 110e368108fSDixsie Wolmers </p> 111e368108fSDixsie Wolmers </div> 112e368108fSDixsie Wolmers <!-- Pending reboot warning --> 113e368108fSDixsie Wolmers <p ng-show="operationPending"> 114e368108fSDixsie Wolmers There are no power operations to display while power operation is in 115e368108fSDixsie Wolmers progress. When complete, any new power operations will be displayed 116e368108fSDixsie Wolmers here. 117e368108fSDixsie Wolmers </p> 118e368108fSDixsie Wolmers <div ng-show="!operationPending"> 119e368108fSDixsie Wolmers <!-- Power on displays only when server is off --> 120e368108fSDixsie Wolmers <div class="row column" ng-show="dataService.server_state == 'Off'" 121e368108fSDixsie Wolmers ng-class="{disabled: dataService.server_unreachable}"> 122e368108fSDixsie Wolmers <button id="power__power-on" class="btn btn-primary inline" ng-click="powerOn()" role="button" 123e368108fSDixsie Wolmers ng-disabled="dataService.server_unreachable"> 124e368108fSDixsie Wolmers Power on 125e368108fSDixsie Wolmers </button> 126e368108fSDixsie Wolmers </div> 127e368108fSDixsie Wolmers <!-- Reboot/shutdown column --> 128e368108fSDixsie Wolmers <div 129e368108fSDixsie Wolmers ng-show="dataService.server_state !== 'Off'"> 130e368108fSDixsie Wolmers <div class="reboot__operations"> 131e368108fSDixsie Wolmers <form id="reboot-form" name="rebootForm" class="reboot-form"> 132e368108fSDixsie Wolmers <fieldset> 133e368108fSDixsie Wolmers <legend class="boot-operations">Reboot server</legend> 134e368108fSDixsie Wolmers <label class="control-radio">Orderly - OS shuts down, then server reboots 135e368108fSDixsie Wolmers <input type="radio" name="radioReboot" 136e368108fSDixsie Wolmers ng-model="defaultRebootSetting" value="warm-reboot" /> 137e368108fSDixsie Wolmers <span class="control__indicator control__indicator-on"></span> 138e368108fSDixsie Wolmers </label> 139e368108fSDixsie Wolmers <label class="control-radio">Immediate - Server reboots without OS shutting down; may cause data corruption 140e368108fSDixsie Wolmers <input type="radio" name="radioReboot" 141e368108fSDixsie Wolmers ng-model="defaultRebootSetting" value="cold-reboot" /> 142e368108fSDixsie Wolmers <span class="control__indicator control__indicator-on"></span> 143e368108fSDixsie Wolmers </label> 144e368108fSDixsie Wolmers </fieldset> 145e368108fSDixsie Wolmers <div> 146e368108fSDixsie Wolmers <button class="btn-primary" ng-click="rebootConfirmModal()" type="submit" ng-disabled="dataService.server_unreachable"> 147e368108fSDixsie Wolmers Reboot 148e368108fSDixsie Wolmers </button> 149e368108fSDixsie Wolmers </div> 150e368108fSDixsie Wolmers </form> 151e368108fSDixsie Wolmers </div> 152e368108fSDixsie Wolmers <!-- Shutdown Field Row --> 153e368108fSDixsie Wolmers <div class="shutdown__operations"> 154e368108fSDixsie Wolmers <form id="shutdown-form" name="shutdownForm" class="shutdown-form"> 155e368108fSDixsie Wolmers <fieldset> 156e368108fSDixsie Wolmers <legend class="boot-operations">Shutdown server</legend> 157e368108fSDixsie Wolmers <label class="control-radio">Orderly - OS shuts down, then server shuts down 158e368108fSDixsie Wolmers <input type="radio" name="radioShutdown" ng-model="defaultShutdownSetting" 159e368108fSDixsie Wolmers value='warm-shutdown' /> 160e368108fSDixsie Wolmers <span class="control__indicator control__indicator-on"></span> 161e368108fSDixsie Wolmers </label> 162e368108fSDixsie Wolmers <label class="control-radio">Immediate - Server shuts down without OS shutting down; may cause data corruption 163e368108fSDixsie Wolmers <input type="radio" name="radioShutdown" ng-model="defaultShutdownSetting" 164e368108fSDixsie Wolmers value='cold-shutdown' /> 165e368108fSDixsie Wolmers <span class="control__indicator control__indicator-on"></span> 166e368108fSDixsie Wolmers </label> 167e368108fSDixsie Wolmers </fieldset> 168e368108fSDixsie Wolmers <div> 169e368108fSDixsie Wolmers <button class="btn-primary" ng-click="shutdownConfirmModal()" type="submit" ng-disabled="dataService.server_unreachable"> 170e368108fSDixsie Wolmers Shut down 171e368108fSDixsie Wolmers </button> 172e368108fSDixsie Wolmers </div> 173e368108fSDixsie Wolmers </form> 174e368108fSDixsie Wolmers </div> 175cd789508SIftekharul Islam </div> 176cd789508SIftekharul Islam </div> 177cd789508SIftekharul Islam </div> 1785ff98780SYoshie Muranaka</div>