1<loader loading="loading"></loader>
2<div class="page overview">
3  <h1 class="page-title inline">{{ dataService.hostname }}</h1>
4  <button class="btn  btn-tertiary" ng-click="edit_hostname = !edit_hostname" aria-label="edit host name">
5    <icon class="nav-icon" aria-hidden="true" file="icon-edit.svg"></icon>
6  </button>
7  <div class="row">
8    <div class="small-12 large-8">
9      <section class="section">
10        <div class="section-header">
11          <h2 class="section-title h3">Server information</h2>
12        </div>
13        <div class="section-content row">
14          <div class="column large-6">
15            <dl class="list-pair">
16              <dt>Model</dt>
17              <dd>{{ server_info.Model  || "N/A"  }}</dd>
18            </dl>
19            <dl class="list-pair">
20              <dt>Serial number</dt>
21              <dd>{{ server_info.SerialNumber || "N/A"  }}</dd>
22            </dl>
23          </div>
24          <div class="column large-6">
25            <dl class="list-pair">
26              <dt>Manufacturer</dt>
27              <dd>{{ server_info.Manufacturer || "N/A" }}</dd>
28            </dl>
29            <dl class="list-pair">
30              <dt>Firmware version</dt>
31              <dd>{{ server_firmware }}</dd>
32            </dl>
33          </div>
34        </div>
35      </section>
36
37      <section class="section">
38        <div class="section-header">
39          <h2 class="section-title h3">BMC information</h2>
40        </div>
41        <div class="section-content row">
42          <div class="column large-6">
43            <dl class="list-pair">
44              <dt>Hostname</dt>
45              <dd class="overview__hostname">
46                {{ dataService.hostname }}
47              </dd>
48            </dl>
49            <dl class="list-pair">
50              <dt>IP addresses</dt>
51              <dd class="courier-bold" ng-repeat="ip_address in bmc_ip_addresses">
52                {{ ip_address }}
53              </dd>
54            </dl>
55          </div>
56          <div class="column large-6">
57            <dl class="list-pair">
58              <dt>Mac address</dt>
59              <dd class="courier-bold">{{ dataService.mac_address }}</dd>
60            </dl>
61            <dl class="list-pair">
62              <dt>Firmware Version</dt>
63              <dd class="courier-bold">{{ bmc_firmware }}</dd>
64            </dl>
65          </div>
66        </div>
67      </section>
68
69      <section class="section">
70        <div class="section-header">
71          <h2 class="section-title h3">Power Consumption</h2>
72        </div>
73        <div class="section-content row">
74          <div class="column large-6">
75            <dl class="list-pair">
76              <dt>Power Consumption</dt>
77              <dd class="courier-bold">{{ power_consumption }}</dd>
78            </dl>
79          </div>
80          <div class="column large-6">
81            <dl class="list-pair">
82              <dt>Power Cap</dt>
83              <dd class="courier-bold">{{ power_cap }}</dd>
84            </dl>
85          </div>
86        </div>
87      </section>
88    </div>
89    <div class="small-12 large-4">
90      <div class="quick-links">
91        <a href="#/server-health/event-log/high" class="quick-links__item quick-links__events event-log__events"
92          ng-show="logs.length">
93          <!-- link to event log filtered to the high priority events -->
94          <span class="inline quick-links__event-copy">
95            View {{ logs.length }} high priority events
96          </span>
97        </a>
98        <dl class="quick-links__item no-icon">
99          <dt class="inline quick-links__label">BMC time</dt>
100          <dd class="bmc-time">{{ bmc_time | localeDate }}</dd>
101        </dl>
102        <div class="quick-links__item no-icon">
103          <p class="inline quick-links__label">
104            Turn <span ng-if="dataService.LED_state == 'off'">on</span>
105            <span ng-if="dataService.LED_state == 'on'">off</span> server LED
106          </p>
107          <div class="toggle-container">
108            <div class="toggle">
109              <input id="toggle__switch-round" class="toggle-switch toggle-switch__round-flat" type="checkbox"
110                tabindex="0" ng-click="toggleLED()" ng-checked="dataService.LED_state == 'on'"
111                ng-disabled="dataService.server_unreachable" />
112              <label for="toggle__switch-round" tabindex="0">Server LED is
113                <span class="uid-switch__status">{{
114                  dataService.LED_state
115                }}</span></label>
116            </div>
117            <span>
118              {{ dataService.LED_state == "on" ? "On" : "Off" }}
119            </span>
120          </div>
121        </div>
122        <a href="#/server-control/remote-console" class="no-icon quick-links__item">
123          <span class="inline quick-links__label">Serial over LAN console</span>
124          <icon aria-hidden="true" file="icon-chevron-right.svg"></icon>
125        </a>
126        <a href="#/configuration/network" class="quick-links__item">
127          <span class="inline quick-links__label">Edit network settings</span>
128          <icon aria-hidden="true" file="icon-chevron-right.svg"></icon>
129        </a>
130      </div>
131    </div>
132  </div>
133
134  <div class="section overview__event-log event-log__events" ng-show="logs.length">
135    <div class="section-header">
136      <h2 class="section-title h3">High priority events ({{ logs.length }})</h2>
137      <a href="#/server-health/event-log/">
138        View all event logs
139      </a>
140    </div>
141
142    <!-- single event -->
143    <a href="#/server-health/event-log/high" ng-repeat="event in logs|orderBy:'-Id'|limitTo : 5">
144      <div class="row column event-log__single-event">
145        <div class="row">
146          <!-- click will go to specific event in event log page-->
147          <div class="column small-10 large-11 event-log__event-info" ng-click="">
148            <div class="row">
149              <div class="column large-1 small-1">
150                <p class="inline event__id">#{{ event.Id }}</p>
151              </div>
152              <div class="column large-4 small-11">
153                <p class="inline event__priority high-priority">High</p>
154                <p class="inline event__severity high-priority">
155                  {{ event.severity_code }}
156                </p>
157              </div>
158              <div class="column large-7 large-offset-0 small-11 small-offset-1">
159                <p class="inline event__timestamp">
160                  {{ event.Timestamp | localeDate }}
161                </p>
162              </div>
163            </div>
164
165            <div class="row">
166              <div class="column large-12 small-11 small-offset-1">
167                <p class="inline event__description">
168                  {{ getEventLogTitle(event) }}
169                </p>
170              </div>
171            </div>
172          </div>
173          <div class="column small-2 large-1">
174            <span class="accord-trigger" aria-hidden="true"></span>
175          </div>
176        </div>
177      </div>
178    </a>
179  </div>
180
181  <div class="section overview__event-log event-log__events" ng-show="!logs.length">
182    <div class="section-header">
183      <h2 class="section-title h3">High priority events</h2>
184    </div>
185    <p class="section-content">
186      There are no high priority events to display at this time.
187    </p>
188  </div>
189</div>
190<!-- edit server name modal -->
191<section class="modal" aria-hidden="true" aria-labelledby="modalTitle" aria-describedby="modalDescription" role="dialog"
192  ng-class="{'active': edit_hostname}">
193  <div class="modal__upload" role="document">
194    <!-- accessibility only; used for screen readers -->
195    <div class="screen-reader-offscreen modal-description">Edit hostname</div>
196    <div class="page-header ">
197      <h2 class="modal-title">
198        <icon class="icon__info" file="icon-information.svg"></icon>Edit
199        hostname
200      </h2>
201    </div>
202    <div class="modal__content">
203      <form name="edit_hostname_text">
204        <label for="editServerName">Hostname</label>
205        <p class="label__helper-text">
206          Hostname must be less than 64 characters and must not contain spaces.
207        </p>
208        <input id="editServerName" class="modal__edit-server-name" type="text" ng-model="newHostname" ng-trim="false"
209          name="hostname" ng-pattern="/^\S{0,64}$/" required autofocus />
210        <span class="modal__error" ng-show="edit_hostname_text.hostname.$error.pattern">Invalid format. Remove
211          spaces.</span>
212        <span class="modal__char-count"
213          ng-hide="edit_hostname_text.hostname.$error.pattern">{{ 0 + newHostname.length }}/64</span>
214      </form>
215    </div>
216    <div class="modal__button-wrapper">
217      <button class="btn  btn-secondary" ng-click="edit_hostname= false; newHostname = dataService.hostname">
218        Cancel
219      </button>
220      <button class="btn  btn-primary" ng-click="saveHostname(newHostname);" ng-disabled="edit_hostname_text.$invalid"
221        ng-class="{'disabled' : edit_hostname_text.$invalid}">
222        Save
223      </button>
224    </div>
225  </div>
226</section>
227<div class="modal-overlay" tabindex="-1" ng-class="{'active': edit_hostname}"></div>