17de38662SGunnar Mills<loader loading="loading"></loader>
2cd789508SIftekharul Islam<div id="configuration-date-time">
3cd789508SIftekharul Islam  <div class="row column">
4b7ea2790SGunnar Mills    <h1>Date and time settings</h1>
5cd789508SIftekharul Islam  </div>
6b7ea2790SGunnar Mills  <form class="time__form" role="form" action="">
77de38662SGunnar Mills    <div class="page-header">
8*77039a5eSGunnar Mills      <h2 class="bold h4">Set date and time manually or configure a Network Time Protocol (NTP) Server</h2>
97de38662SGunnar Mills    </div>
107de38662SGunnar Mills    <fieldset>
117de38662SGunnar Mills      <div class="column large-8">
12b7ea2790SGunnar Mills        <div class="row column">
13b7ea2790SGunnar Mills          <label class="control-radio" for="ntp-time">Obtain Automatically from a Network Time Protocol (NTP) Server
14b7ea2790SGunnar Mills            <input type="radio" id="ntp-time" ng-model="time_mode" value="NTP">
15b7ea2790SGunnar Mills            <span class="control__indicator control__indicator-on"></span>
16b7ea2790SGunnar Mills          </label>
17b7ea2790SGunnar Mills        </div>
18b7ea2790SGunnar Mills        <div class="row column date-time__ntp-servers-wrap">
19b7ea2790SGunnar Mills          <fieldset class="date-time__ntp-servers" ng-repeat="server in ntp.servers track by $index">
20b7ea2790SGunnar Mills            <label for="ntp-server{{$index+1}}">NTP Server Address {{$index+1}}</label>
2190121f3fSGunnar Mills            <div class="inline">
22b7ea2790SGunnar Mills              <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/>
2390121f3fSGunnar Mills            </div>
2490121f3fSGunnar Mills            <button class="date-time__dns-remove inline" ng-click="removeNTPField($index)">Remove</button>
25b7ea2790SGunnar Mills          </fieldset>
2690121f3fSGunnar Mills        </div>
2790121f3fSGunnar Mills        <div class="row column date-time__ntp-servers-wrap">
2890121f3fSGunnar Mills          <button type="button" class="btn-primary block" ng-click="addNTPField()">Add new NTP server</button>
29b7ea2790SGunnar Mills        </div>
30b7ea2790SGunnar Mills        <div class="row column">
31b7ea2790SGunnar Mills          <label class="control-radio" for="manual-time">Manually set date and time
32b7ea2790SGunnar Mills            <input type="radio" id="manual-time" ng-model="time_mode" value="Manual"/>
33b7ea2790SGunnar Mills            <span class="control__indicator control__indicator-on"></span>
34b7ea2790SGunnar Mills          </label>
35b7ea2790SGunnar Mills        </div>
367de38662SGunnar Mills        <ul class="date-time__metadata-wrapper">
377de38662SGunnar Mills          <li class="date-time__metadata-block">
3883dcedf1SGunnar Mills            <p class="content-label">BMC <span ng-if="time_owner != 'Split'">and Host</span> Time</p>
39b7ea2790SGunnar Mills            <div class="inline">
40b7ea2790SGunnar Mills              <input type="date" ng-model="bmc.date" ng-readonly="time_mode == 'NTP'" min="2018-01-01" max="2099-12-31"/>
41b7ea2790SGunnar Mills              <input type="time" ng-model="bmc.date" ng-readonly="time_mode == 'NTP'" />
42b7ea2790SGunnar Mills              <p class="courier-bold">{{bmc.timezone}}</p>
43b7ea2790SGunnar Mills            </div>
447de38662SGunnar Mills          </li>
4583dcedf1SGunnar Mills          <li class="date-time__metadata-block" ng-if="time_owner == 'Split'">
4683dcedf1SGunnar Mills            <p class="content-label">Host Time</p>
47b7ea2790SGunnar Mills            <div class="inline">
48b7ea2790SGunnar Mills              <!--- Ideally, would just use one input, datetime-local, but datetime-local is not supported on Firefox.--->
49b7ea2790SGunnar Mills              <input type="date" ng-model="host.date" min="2018-01-01" max="2099-12-31"/>
50b7ea2790SGunnar Mills              <input type="time" ng-model="host.date"/>
51b7ea2790SGunnar Mills              <p class="courier-bold">{{host.timezone}}</p>
52b7ea2790SGunnar Mills            </div>
5383dcedf1SGunnar Mills          </li>
54c74d434cSGunnar Mills          <li class="date-time__metadata-block">
55b7ea2790SGunnar Mills          <label class="content-label">Time Owner</label>
56b7ea2790SGunnar Mills          <select ng-model="time_owner" class="date-time__owner-dropdown">
57b7ea2790SGunnar Mills            <option class="courier-bold" ng-repeat="owner in time_owners">{{owner}}</option>
58b7ea2790SGunnar Mills          </select>
59c74d434cSGunnar Mills          </li>
607de38662SGunnar Mills        </ul>
617de38662SGunnar Mills      </div>
627de38662SGunnar Mills    </fieldset>
63b7ea2790SGunnar Mills    <div class="time__submit-wrapper">
64b7ea2790SGunnar Mills      <button type="button" class="btn-primary inline" ng-click="setTime()">Save settings</button>
65b7ea2790SGunnar Mills      <button type="button" class="btn-secondary inline" ng-click="refresh()">Cancel</button>
66b7ea2790SGunnar Mills    </div>
67b7ea2790SGunnar Mills    <p class="success-msg" ng-show="set_time_success" role="alert">Success! Time changed!</p>
68b7ea2790SGunnar Mills    <p class="set_time_error error-msg" ng-show="set_time_error" role="alert">Error setting time!</p>
69b7ea2790SGunnar Mills  </form>
70cd789508SIftekharul Islam</div>
71