blob: 491ab561428eb54bee7e1837ebed463b6c5709e8 [file] [log] [blame]
<loader loading="loading"></loader>
<div id="configuration-date-time">
<div class="row column">
<h1>Date and time settings</h1>
</div>
<form class="time__form" role="form" action="">
<div class="page-header">
<h2 class="bold h4">Date and time set to Network Time Protocol (NTP) or manually</h2>
</div>
<fieldset>
<div class="column large-8">
<div class="row column">
<label class="control-radio" for="ntp-time">Obtain Automatically from a Network Time Protocol (NTP) Server
<input type="radio" id="ntp-time" ng-model="time_mode" value="NTP">
<span class="control__indicator control__indicator-on"></span>
</label>
</div>
<div class="row column date-time__ntp-servers-wrap">
<fieldset class="date-time__ntp-servers" ng-repeat="server in ntp.servers track by $index">
<label for="ntp-server{{$index+1}}">NTP Server Address {{$index+1}}</label>
<input id="ntp-server{{$index+1}}" type="text" ng-readonly="time_mode != 'NTP'" ng-model="server" ng-blur="ntp.servers[$index] = server" set-focus-on-new-input/>
</fieldset>
<button type="button" class="btn-primary inline" ng-click="addNTPField()">Add new NTP server</button>
</div>
<div class="row column">
<label class="control-radio" for="manual-time">Manually set date and time
<input type="radio" id="manual-time" ng-model="time_mode" value="Manual"/>
<span class="control__indicator control__indicator-on"></span>
</label>
</div>
<ul class="date-time__metadata-wrapper">
<li class="date-time__metadata-block">
<p class="content-label">BMC <span ng-if="time_owner != 'Split'">and Host</span> Time</p>
<div class="inline">
<input type="date" ng-model="bmc.date" ng-readonly="time_mode == 'NTP'" min="2018-01-01" max="2099-12-31"/>
<input type="time" ng-model="bmc.date" ng-readonly="time_mode == 'NTP'" />
<p class="courier-bold">{{bmc.timezone}}</p>
</div>
</li>
<li class="date-time__metadata-block" ng-if="time_owner == 'Split'">
<p class="content-label">Host Time</p>
<div class="inline">
<!--- Ideally, would just use one input, datetime-local, but datetime-local is not supported on Firefox.--->
<input type="date" ng-model="host.date" min="2018-01-01" max="2099-12-31"/>
<input type="time" ng-model="host.date"/>
<p class="courier-bold">{{host.timezone}}</p>
</div>
</li>
<li class="date-time__metadata-block">
<label class="content-label">Time Owner</label>
<select ng-model="time_owner" class="date-time__owner-dropdown">
<option class="courier-bold" ng-repeat="owner in time_owners">{{owner}}</option>
</select>
</li>
</ul>
</div>
</fieldset>
<div class="time__submit-wrapper">
<button type="button" class="btn-primary inline" ng-click="setTime()">Save settings</button>
<button type="button" class="btn-secondary inline" ng-click="refresh()">Cancel</button>
</div>
<p class="success-msg" ng-show="set_time_success" role="alert">Success! Time changed!</p>
<p class="set_time_error error-msg" ng-show="set_time_error" role="alert">Error setting time!</p>
</form>
</div>