Improve UI views for assets/components/failures and timeline details
This commit is contained in:
@@ -21,29 +21,42 @@
|
||||
|
||||
<section class="card">
|
||||
<h2>Current Components</h2>
|
||||
{{if .Components}}
|
||||
{{if .HasFirmwareMismatch}}
|
||||
<div class="meta"><span class="badge status-yellow">Firmware mismatch</span> Identical devices on this server have different firmware versions.</div>
|
||||
{{end}}
|
||||
{{if .ComponentGroups}}
|
||||
{{range .ComponentGroups}}
|
||||
<h3>{{.TypeTitle}}</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Status</th>
|
||||
<th>Location</th>
|
||||
<th>Vendor Serial</th>
|
||||
<th>Vendor</th>
|
||||
<th>Model</th>
|
||||
<th>First Seen</th>
|
||||
<th>Firmware</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Components}}
|
||||
<tr class="clickable" onclick="navigateToRow('/ui/components/{{.ID}}')">
|
||||
<td><span class="badge {{componentStatusClass (index $.ComponentStatusByID .ID)}}">{{componentStatusText (index $.ComponentStatusByID .ID)}}</span></td>
|
||||
<td>{{.VendorSerial}}</td>
|
||||
<td>{{if .Vendor}}{{.Vendor}}{{else}}—{{end}}</td>
|
||||
<td>{{if .Model}}{{.Model}}{{else}}—{{end}}</td>
|
||||
<td title="{{formatTimePtrFull .FirstSeenAt}}">{{formatTimePtr .FirstSeenAt}}</td>
|
||||
{{range .Rows}}
|
||||
<tr class="clickable" onclick="navigateToRow('/ui/components/{{.Component.ID}}')">
|
||||
<td><span class="badge {{componentStatusClass (index $.ComponentStatusByID .Component.ID)}}">{{componentStatusText (index $.ComponentStatusByID .Component.ID)}}</span></td>
|
||||
<td>{{if .Location}}{{.Location}}{{else}}—{{end}}</td>
|
||||
<td>{{.Component.VendorSerial}}</td>
|
||||
<td>{{if .Component.Vendor}}{{.Component.Vendor}}{{else}}—{{end}}</td>
|
||||
<td>{{if .Component.Model}}{{.Component.Model}}{{else}}—{{end}}</td>
|
||||
<td>
|
||||
{{if index $.ComponentFirmwareByID .Component.ID}}{{index $.ComponentFirmwareByID .Component.ID}}{{else}}—{{end}}
|
||||
{{if index $.ComponentFirmwareMismatchByID .Component.ID}}
|
||||
<span class="badge status-yellow">Mismatch</span>
|
||||
{{end}}
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{end}}
|
||||
{{else}}
|
||||
<div class="meta">No active components.</div>
|
||||
{{end}}
|
||||
@@ -61,7 +74,12 @@
|
||||
</div>
|
||||
<div>
|
||||
<div class="detail">Asset {{assetLabel .MachineID $.AssetLabelByID}} · Component {{componentLabel .PartID $.ComponentLabelByID}}</div>
|
||||
<div class="meta">Firmware {{if .FirmwareVersion}}{{.FirmwareVersion}}{{else}}—{{end}}</div>
|
||||
<div class="meta">
|
||||
Type {{eventComponentType .PartID $.EventComponentByID}} ·
|
||||
Location {{eventComponentLocation .PartID $.EventComponentByID}} ·
|
||||
Model {{eventComponentModel .PartID $.EventComponentByID}} ·
|
||||
Firmware {{if .FirmwareVersion}}{{.FirmwareVersion}}{{else}}{{eventComponentFirmware .PartID $.EventComponentByID}}{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
Reference in New Issue
Block a user