blob: 23a93d28fa94cdb84d1163a964459f2b81ba7dee [file] [log] [blame]
Gunnar Mills7de38662018-07-18 13:01:48 -05001<loader loading="loading"></loader>
Iftekharul Islamcd789502017-04-19 14:37:55 -05002<div id="configuration-date-time">
Gunnar Mills5f0b7762018-09-25 14:10:45 -05003 <div class="row column">
4 <h1>Date and time settings</h1>
5 </div>
6 <form class="time__form" role="form" action="">
7 <div class="page-header">
Gunnar Mills77039a52018-09-21 09:32:21 -05008 <h2 class="bold h4">Set date and time manually or configure a Network Time Protocol (NTP) Server</h2>
Gunnar Mills5f0b7762018-09-25 14:10:45 -05009 </div>
10 <fieldset>
11 <div class="column large-8">
12 <div class="row column">
13 <label class="control-radio" for="ntp-time">Obtain Automatically from a Network Time Protocol (NTP) Server
Gunnar Mills2f955bd2018-10-13 16:56:10 -050014 <input type="radio" id="ntp-time" ng-model="time.mode" value="NTP">
Gunnar Mills5f0b7762018-09-25 14:10:45 -050015 <span class="control__indicator control__indicator-on"></span>
16 </label>
17 </div>
18 <div class="row column date-time__ntp-servers-wrap">
19 <fieldset class="date-time__ntp-servers" ng-repeat="server in ntp.servers track by $index">
Gunnar Mills9e397722018-09-21 10:59:50 -050020 <label for="ntp-server{{$index+1}}">NTP Server Address {{$index+1}} <span ng-if="$first">(Primary)</span></label>
Gunnar Mills5f0b7762018-09-25 14:10:45 -050021 <div class="inline">
Gunnar Mills2f955bd2018-10-13 16:56:10 -050022 <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/>
Gunnar Mills5f0b7762018-09-25 14:10:45 -050023 </div>
24 <button class="date-time__dns-remove inline" ng-click="removeNTPField($index)">Remove</button>
25 </fieldset>
26 </div>
27 <div class="row column date-time__ntp-servers-wrap">
28 <button type="button" class="btn-primary block" ng-click="addNTPField()">Add new NTP server</button>
29 </div>
30 <div class="row column">
31 <label class="control-radio" for="manual-time">Manually set date and time
Gunnar Mills2f955bd2018-10-13 16:56:10 -050032 <input type="radio" id="manual-time" ng-model="time.mode" value="Manual"/>
Gunnar Mills5f0b7762018-09-25 14:10:45 -050033 <span class="control__indicator control__indicator-on"></span>
34 </label>
35 </div>
36 <ul class="date-time__metadata-wrapper">
37 <li class="date-time__metadata-block">
Gunnar Mills2f955bd2018-10-13 16:56:10 -050038 <p class="content-label">BMC <span ng-if="time.owner != 'Split'">and Host</span> Time</p>
Gunnar Mills5f0b7762018-09-25 14:10:45 -050039 <div class="inline">
Gunnar Mills2f955bd2018-10-13 16:56:10 -050040 <input type="date" ng-model="bmc.date" ng-readonly="time.mode == 'NTP'" min="2018-01-01" max="2099-12-31"/>
41 <input type="time" ng-model="bmc.date" ng-readonly="time.mode == 'NTP'" />
Gunnar Mills5f0b7762018-09-25 14:10:45 -050042 <p class="courier-bold">{{bmc.timezone}}</p>
43 </div>
44 </li>
Gunnar Mills2f955bd2018-10-13 16:56:10 -050045 <li class="date-time__metadata-block" ng-if="time.owner == 'Split'">
Gunnar Mills5f0b7762018-09-25 14:10:45 -050046 <p class="content-label">Host Time</p>
47 <div class="inline">
48 <!--- Ideally, would just use one input, datetime-local, but datetime-local is not supported on Firefox.--->
49 <input type="date" ng-model="host.date" min="2018-01-01" max="2099-12-31"/>
50 <input type="time" ng-model="host.date"/>
51 <p class="courier-bold">{{host.timezone}}</p>
52 </div>
53 </li>
54 <li class="date-time__metadata-block">
55 <label class="content-label">Time Owner</label>
Gunnar Mills2f955bd2018-10-13 16:56:10 -050056 <select ng-model="time.owner" class="date-time__owner-dropdown">
57 <option class="courier-bold" ng-repeat="owner in timeOwners">{{owner}}</option>
Gunnar Mills5f0b7762018-09-25 14:10:45 -050058 </select>
59 </li>
60 </ul>
61 </div>
62 </fieldset>
63 <div class="time__submit-wrapper">
64 <button type="button" class="btn-primary inline" ng-click="setTime()">Save settings</button>
65 <button type="button" class="btn-secondary inline" ng-click="refresh()">Cancel</button>
66 </div>
Gunnar Mills2f955bd2018-10-13 16:56:10 -050067 <p class="success-msg" ng-show="success" role="alert">Success! Time changed!</p>
68 <p class="set_time_error error-msg" ng-show="error" role="alert">Error setting time!</p>
Gunnar Mills5f0b7762018-09-25 14:10:45 -050069 </form>
Gunnar Mills7de38662018-07-18 13:01:48 -050070</div>