xref: /openbmc/phosphor-webui/app/overview/controllers/system-overview-controller.html (revision 4129f4025b0ee1245a4ba0353780bf490034b704)
1428375e8SMichael Davis<loader loading="loading"></loader>
20a1c6b0aSMichael Davis<div class="overview">
399d199f3SIftekharul Islam	<div class="row column">
4d265da25SMichael Davis		<h1 class="inline">{{dataService.hostname}}</h1>
5e56bb445SGunnar Mills		<button class="link" ng-click="edit_hostname = !edit_hostname">edit</button><!-- this is default name. Will show custom server name if set -->
60a1c6b0aSMichael Davis	</div>
70a1c6b0aSMichael Davis	<section class="row">
80a1c6b0aSMichael Davis		<div class="column large-8">
90a1c6b0aSMichael Davis			<!-- Server Metadata -->
100a1c6b0aSMichael Davis			<div class="row overview__server-metadata">
110a1c6b0aSMichael Davis				<div class="column large-4">
120a1c6b0aSMichael Davis					<h3 class="bold h4">Server information</h3>
130a1c6b0aSMichael Davis				</div>
140a1c6b0aSMichael Davis				<div class="column large-8">
150a1c6b0aSMichael Davis					<ul class="overview__metadata-wrapper">
160a1c6b0aSMichael Davis						<li class="overview__metadata-block">
170a1c6b0aSMichael Davis							<p class="content-label">Model</p>
1817708f2aSGunnar Mills							<p class="courier-bold">{{server_info.Model}}</p>
190a1c6b0aSMichael Davis						</li>
200a1c6b0aSMichael Davis						<li class="overview__metadata-block">
210a1c6b0aSMichael Davis							<p class="content-label">Manufacturer</p>
2217708f2aSGunnar Mills							<p class="courier-bold">{{server_info.Manufacturer}}</p>
230a1c6b0aSMichael Davis						</li>
240a1c6b0aSMichael Davis						<li class="overview__metadata-block">
250a1c6b0aSMichael Davis							<p class="content-label">Firmware version</p>
2654c22e4fSIftekharul Islam							<p class="courier-bold">{{server_firmware}}</p>
270a1c6b0aSMichael Davis						</li>
280a1c6b0aSMichael Davis						<li class="overview__metadata-block">
290a1c6b0aSMichael Davis							<p class="content-label">Serial number</p>
3017708f2aSGunnar Mills							<p class="courier-bold">{{server_info.SerialNumber}}</p>
310a1c6b0aSMichael Davis						</li>
320a1c6b0aSMichael Davis					</ul>
330a1c6b0aSMichael Davis				</div>
340a1c6b0aSMichael Davis			</div>
350a1c6b0aSMichael Davis			<!-- BMC Metadata -->
360a1c6b0aSMichael Davis			<div class="row overview__server-metadata">
370a1c6b0aSMichael Davis				<div class="column large-4">
380a1c6b0aSMichael Davis					<h3 class="bold h4">BMC information</h3>
390a1c6b0aSMichael Davis				</div>
400a1c6b0aSMichael Davis				<div class="column large-8">
410a1c6b0aSMichael Davis					<ul class="overview__metadata-wrapper">
420a1c6b0aSMichael Davis						<li class="overview__metadata-block">
43ec61b2a8SMichael Davis							<p class="content-label">Hostname</p>
44ba556c31SIftekharul Islam							<p class="courier-bold overview__hostname">{{dataService.hostname}}</p>
45ec61b2a8SMichael Davis						</li>
46ec61b2a8SMichael Davis						<li class="overview__metadata-block">
47fbb63db4SCamVan Nguyen							<p class="content-label">IP addresses</p>
48fbb63db4SCamVan Nguyen							<p class="courier-bold" ng-repeat="ip_address in bmc_ip_addresses">{{ip_address}}</p>
490a1c6b0aSMichael Davis						</li>
500a1c6b0aSMichael Davis						<li class="overview__metadata-block">
51ec61b2a8SMichael Davis							<p class="content-label">Firmware Version</p>
52ec61b2a8SMichael Davis							<p class="courier-bold">{{bmc_firmware}}</p>
530a1c6b0aSMichael Davis						</li>
540a1c6b0aSMichael Davis						<li class="overview__metadata-block">
550a1c6b0aSMichael Davis							<p class="content-label">Mac address</p>
56ba556c31SIftekharul Islam							<p class="courier-bold">{{dataService.mac_address}}</p>
570a1c6b0aSMichael Davis						</li>
580a1c6b0aSMichael Davis					</ul>
590a1c6b0aSMichael Davis				</div>
600a1c6b0aSMichael Davis			</div>
610a1c6b0aSMichael Davis			<!-- Power metadata -->
620a1c6b0aSMichael Davis			<div class="row overview__server-metadata">
630a1c6b0aSMichael Davis				<div class="column large-4">
640a1c6b0aSMichael Davis					<h3 class="bold h4">Power information</h3>
650a1c6b0aSMichael Davis				</div>
660a1c6b0aSMichael Davis				<div class="column large-8">
670a1c6b0aSMichael Davis					<ul class="overview__metadata-wrapper">
680a1c6b0aSMichael Davis						<li class="overview__metadata-block">
690a1c6b0aSMichael Davis							<p class="content-label">Power Consumption</p>
7033275839SCamVan Nguyen							<p class="courier-bold">{{power_consumption}}</p>
710a1c6b0aSMichael Davis						</li>
720a1c6b0aSMichael Davis						<li class="overview__metadata-block">
730a1c6b0aSMichael Davis							<p class="content-label">Power Cap</p>
7433275839SCamVan Nguyen							<p class="courier-bold">{{power_cap}}</p>
750a1c6b0aSMichael Davis						</li>
760a1c6b0aSMichael Davis					</ul>
770a1c6b0aSMichael Davis				</div>
780a1c6b0aSMichael Davis			</div>
790a1c6b0aSMichael Davis			<!-- Power metadata -->
800a1c6b0aSMichael Davis		</div>
81ec61b2a8SMichael Davis		<div class="column large-4 no-padding">
820a1c6b0aSMichael Davis			<div class="quick-links">
83428375e8SMichael Davis				<a href="#/server-health/event-log/high" class="quick-links__item quick-links__events event-log__events" ng-show="logs.length">
84f61ce091SGunnar Mills					<p class="inline quick-links__event-copy">View {{logs.length}} high priority events</p><!-- link to event log filtered to the high priority events -->
850a1c6b0aSMichael Davis				</a>
860a1c6b0aSMichael Davis				<div class="quick-links__item no-icon">
870a1c6b0aSMichael Davis					<p class="inline quick-links__label">BMC time</p>
88ed96f8bbSGunnar Mills					<p class="inline courier-bold float-right">{{bmc_time | date:'medium'}}</p>
890a1c6b0aSMichael Davis				</div>
900a1c6b0aSMichael Davis				<div class="quick-links__item no-icon">
9177f29e1dSGunnar Mills					<p class="inline quick-links__label">Turn <span ng-if="dataService.LED_state == 'off'">on</span><span ng-if="dataService.LED_state == 'on'">off</span> server LED</p>
920a1c6b0aSMichael Davis					<div class="toggle inline float-right">
930a1c6b0aSMichael Davis						<input id="toggle__switch-round"
940a1c6b0aSMichael Davis								class="toggle-switch toggle-switch__round-flat"
950a1c6b0aSMichael Davis								type="checkbox"
960a1c6b0aSMichael Davis								tabindex="0"
970a1c6b0aSMichael Davis								ng-click="toggleLED()"
980a1c6b0aSMichael Davis								ng-checked="dataService.LED_state == 'on'"
990a1c6b0aSMichael Davis								ng-disabled="dataService.server_unreachable">
100*4129f402SGunnar Mills						<label for="toggle__switch-round" tabindex="0">Server LED is <span class="led-switch__status">{{dataService.LED_state}}</span></label>
1010a1c6b0aSMichael Davis					</div>
1020a1c6b0aSMichael Davis				</div>
10354c22e4fSIftekharul Islam				<a href="#/server-control/remote-console" class="no-icon quick-links__item">
104959705cfSGunnar Mills					<p class="inline quick-links__label">Serial over LAN console</p>
1050a1c6b0aSMichael Davis					<span class="btn-pop-out inline float-right"></span>
1060a1c6b0aSMichael Davis				</a>
10754c22e4fSIftekharul Islam				<a href="#/configuration/network" class="quick-links__item">
1080a1c6b0aSMichael Davis					<p class="inline quick-links__label">Edit network settings</p>
1090a1c6b0aSMichael Davis				</a>
1100a1c6b0aSMichael Davis			</div>
1110a1c6b0aSMichael Davis		</div>
1120a1c6b0aSMichael Davis	</section>
113706b75b3SMichael Davis	<section class="row">
114706b75b3SMichael Davis		<div class="column large-12 overview__event-log event-log__events" ng-show="logs.length">
115706b75b3SMichael Davis			<div class="page-header">
116706b75b3SMichael Davis				<h3 class="bold h4 inline">High priority events ({{logs.length}})</h3>
1173471409aSIftekharul Islam				<a href="#/server-health/event-log/" class="inline float-right">View all event logs</a>
118706b75b3SMichael Davis			</div>
119706b75b3SMichael Davis
120706b75b3SMichael Davis			<!-- single event -->
12110ed3760SGunnar Mills			<a href="#/server-health/event-log/high" ng-repeat="event in logs|orderBy:'-Id'|limitTo : 5">
122706b75b3SMichael Davis				<div class="row column event-log__single-event">
123706b75b3SMichael Davis					<div class="row">
124706b75b3SMichael Davis						<div class="column small-1 large-1 event-log__col-check">
125706b75b3SMichael Davis							<label class="control-check">
126706b75b3SMichael Davis								<input type="checkbox" name="events__check" ng-click="event.selected= ! event.selected"
127706b75b3SMichael Davis										ng-checked="event.selected"/>
128706b75b3SMichael Davis								<span class="control__indicator"></span>
129706b75b3SMichael Davis							</label>
130706b75b3SMichael Davis						</div>
131706b75b3SMichael Davis						<div class="column small-9 large-10 event-log__event-info" ng-click=""><!-- click will go to specific event in event log page-->
132706b75b3SMichael Davis							<p class="inline event__id">#{{event.Id}}</p>
133706b75b3SMichael Davis							<p class="inline event__priority high-priority">High</p>
134706b75b3SMichael Davis							<p class="inline event__severity high-priority">{{event.severity_code}}</p>
135706b75b3SMichael Davis							<p class="inline event__timestamp">{{event.Timestamp| date:'MM/dd/yyyy  HH:mm:ss '+tmz: tmz}}</p>
136706b75b3SMichael Davis							<div>
137845acdc5SMatt Spinler								<p class="inline event__description">{{getEventLogTitle(event)}}</p>
138706b75b3SMichael Davis							</div>
139706b75b3SMichael Davis						</div>
140706b75b3SMichael Davis						<div class="column small-1 large-1">
141706b75b3SMichael Davis							<button class="accord-trigger" aria-hidden="true"></button>
142706b75b3SMichael Davis						</div>
143706b75b3SMichael Davis					</div>
144706b75b3SMichael Davis				</div>
145706b75b3SMichael Davis			</a>
146706b75b3SMichael Davis		</div>
147706b75b3SMichael Davis
148706b75b3SMichael Davis		<div class="row column overview__event-log event-log__events" ng-show="!logs.length">
149706b75b3SMichael Davis			<div class="page-header">
150706b75b3SMichael Davis				<h3 class="bold h4">High priority events (0)</h3>
151706b75b3SMichael Davis			</div>
152706b75b3SMichael Davis			<p>There are no high priority events to display at this time.</p>
153706b75b3SMichael Davis		</div>
154706b75b3SMichael Davis	</section>
15599d199f3SIftekharul Islam</div>
156db28a387SIftekharul Islam<!-- edit server name modal -->
157e56bb445SGunnar Mills<section class="modal" aria-hidden="true" aria-labelledby="modalTitle" aria-describedby="modalDescription" role="dialog" ng-class="{'active': edit_hostname}">
158db28a387SIftekharul Islam	<div class="modal__upload" role="document">
159e56bb445SGunnar Mills		<div class="screen-reader-offscreen modal-description">Edit hostname</div><!-- accessibility only; used for screen readers -->
160db28a387SIftekharul Islam		<div class="page-header ">
161db28a387SIftekharul Islam			<h1 class="modal-title h4"><span class="icon icon__info"><svg xmlns="http://www.w3.org/2000/svg"
162db28a387SIftekharul Islam					viewBox="0 0 32 32"><path
163db28a387SIftekharul Islam					d="M18 14h-6v2h1v6h-2v2h8v-2h-2z"/><circle cx="16" cy="10" r="2"/><path
164db28a387SIftekharul Islam					d="M16 2C8.269 2 2 8.269 2 16s6.269 14 14 14 14-6.269 14-14S23.731 2 16 2zm0 26C9.383 28 4 22.617 4 16S9.383 4 16 4s12 5.383 12 12-5.383 12-12 12z"/></svg></span>
165e56bb445SGunnar Mills				Edit hostname
166db28a387SIftekharul Islam			</h1>
167db28a387SIftekharul Islam		</div>
168db28a387SIftekharul Islam		<div class="modal__content">
169e56bb445SGunnar Mills			<p>The hostname is displayed in the header and can contain any characters up to a total of 64</p>
170db28a387SIftekharul Islam			<form>
171db28a387SIftekharul Islam				<label for="editServerName" class="hide"></label>
172db28a387SIftekharul Islam				<input id="editServerName" class="modal__edit-server-name" maxlength="64" type="text" ng-model="char_count" ng-trim="false">
173db28a387SIftekharul Islam				<p class="modal__char-count">{{64 - char_count.length}}/64</p>
174db28a387SIftekharul Islam			</form>
175db28a387SIftekharul Islam		</div>
176db28a387SIftekharul Islam		<div class="modal__button-wrapper">
177e56bb445SGunnar Mills			<button class="inline btn-secondary" ng-click="edit_hostname= false;">Cancel</button>
178ff2313dbSAndrew Geissler			<button class="inline btn-primary" ng-click="saveHostname(char_count);">Save</button>
179db28a387SIftekharul Islam		</div>
180db28a387SIftekharul Islam	</div>
181db28a387SIftekharul Islam</section>
182e56bb445SGunnar Mills<div class="modal-overlay" tabindex="-1" ng-class="{'active': edit_hostname}"></div>
183