Gunnar Mills | 7de3866 | 2018-07-18 13:01:48 -0500 | [diff] [blame] | 1 | <loader loading="loading"></loader> |
Iftekharul Islam | cd78950 | 2017-04-19 14:37:55 -0500 | [diff] [blame] | 2 | <div id="configuration-date-time"> |
Gunnar Mills | 5f0b776 | 2018-09-25 14:10:45 -0500 | [diff] [blame] | 3 | <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 Mills | 77039a5 | 2018-09-21 09:32:21 -0500 | [diff] [blame] | 8 | <h2 class="bold h4">Set date and time manually or configure a Network Time Protocol (NTP) Server</h2> |
Gunnar Mills | 5f0b776 | 2018-09-25 14:10:45 -0500 | [diff] [blame] | 9 | </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 Mills | 2f955bd | 2018-10-13 16:56:10 -0500 | [diff] [blame^] | 14 | <input type="radio" id="ntp-time" ng-model="time.mode" value="NTP"> |
Gunnar Mills | 5f0b776 | 2018-09-25 14:10:45 -0500 | [diff] [blame] | 15 | <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 Mills | 9e39772 | 2018-09-21 10:59:50 -0500 | [diff] [blame] | 20 | <label for="ntp-server{{$index+1}}">NTP Server Address {{$index+1}} <span ng-if="$first">(Primary)</span></label> |
Gunnar Mills | 5f0b776 | 2018-09-25 14:10:45 -0500 | [diff] [blame] | 21 | <div class="inline"> |
Gunnar Mills | 2f955bd | 2018-10-13 16:56:10 -0500 | [diff] [blame^] | 22 | <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 Mills | 5f0b776 | 2018-09-25 14:10:45 -0500 | [diff] [blame] | 23 | </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 Mills | 2f955bd | 2018-10-13 16:56:10 -0500 | [diff] [blame^] | 32 | <input type="radio" id="manual-time" ng-model="time.mode" value="Manual"/> |
Gunnar Mills | 5f0b776 | 2018-09-25 14:10:45 -0500 | [diff] [blame] | 33 | <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 Mills | 2f955bd | 2018-10-13 16:56:10 -0500 | [diff] [blame^] | 38 | <p class="content-label">BMC <span ng-if="time.owner != 'Split'">and Host</span> Time</p> |
Gunnar Mills | 5f0b776 | 2018-09-25 14:10:45 -0500 | [diff] [blame] | 39 | <div class="inline"> |
Gunnar Mills | 2f955bd | 2018-10-13 16:56:10 -0500 | [diff] [blame^] | 40 | <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 Mills | 5f0b776 | 2018-09-25 14:10:45 -0500 | [diff] [blame] | 42 | <p class="courier-bold">{{bmc.timezone}}</p> |
| 43 | </div> |
| 44 | </li> |
Gunnar Mills | 2f955bd | 2018-10-13 16:56:10 -0500 | [diff] [blame^] | 45 | <li class="date-time__metadata-block" ng-if="time.owner == 'Split'"> |
Gunnar Mills | 5f0b776 | 2018-09-25 14:10:45 -0500 | [diff] [blame] | 46 | <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 Mills | 2f955bd | 2018-10-13 16:56:10 -0500 | [diff] [blame^] | 56 | <select ng-model="time.owner" class="date-time__owner-dropdown"> |
| 57 | <option class="courier-bold" ng-repeat="owner in timeOwners">{{owner}}</option> |
Gunnar Mills | 5f0b776 | 2018-09-25 14:10:45 -0500 | [diff] [blame] | 58 | </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 Mills | 2f955bd | 2018-10-13 16:56:10 -0500 | [diff] [blame^] | 67 | <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 Mills | 5f0b776 | 2018-09-25 14:10:45 -0500 | [diff] [blame] | 69 | </form> |
Gunnar Mills | 7de3866 | 2018-07-18 13:01:48 -0500 | [diff] [blame] | 70 | </div> |