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