Skip to content

Commit

Permalink
indicate when no smart capabilities found rockstor#997
Browse files Browse the repository at this point in the history
Some drives report no capabilities as this is an ATA/SATA
only feature so state non found rather than empty table.
Also reformat to spaces not tabs
  • Loading branch information
phillxnet committed Jan 2, 2016
1 parent f8a921a commit 2152752
Showing 1 changed file with 31 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,39 +167,43 @@
</div>
</div>

<div id="smartcapabilities">
<div class="row">
<table id="smartcapabilites-table"
class="table table-condensed table-bordered table-hover table-striped tablesorter"
summary="Table of S.M.A.R.T capabilities">
<thead>
<tr>
<th>Id</th>
<th>Name</th>
<th>Flag</th>
<th>Capabilities</th>
</tr>
</thead>
<tbody>
<% capabilities.forEach(function(capability) { %>
<tr>
<td><%= capability.id %></td>
<td><%= capability.name %></td>
<td><%= capability.flag %></td>
<td><%= capability.capabilities %></td>
</tr>
<% }); %>
</tbody>
</table>
</div>
</div>
<div id="smartcapabilities">
<div class="row">
<% if (capabilities.length == 0) { %>
<h3>No S.M.A.R.T Capabilities found (ATA/SATA only)</h3>
<% } else { %>
<table id="smartcapabilites-table"
class="table table-condensed table-bordered table-hover table-striped tablesorter"
summary="Table of S.M.A.R.T capabilities">
<thead>
<tr>
<th>Id</th>
<th>Name</th>
<th>Flag</th>
<th>Capabilities</th>
</tr>
</thead>
<tbody>
<% capabilities.forEach(function(capability) { %>
<tr>
<td><%= capability.id %></td>
<td><%= capability.name %></td>
<td><%= capability.flag %></td>
<td><%= capability.capabilities %></td>
</tr>
<% }); %> <!-- capabilities.forEach -->
</tbody>
</table>
<% } %> <!-- capabilities.length -->
</div>
</div>

<div id="smarterrorlogs">
<div class="row">
<% if (errorlogsummary.length == 0) { %>
<% if (errorlog.length < 5) { %> <!-- No errors and empty raw log -->
<h3>There are no errors.</h3>
<% } else {%> <!-- no summary but something in raw log -->
<% } else { %> <!-- no summary but something in raw log -->
<h3>No error summary available, please see the raw log below</h3>
<% } %>
<% } else { %> <!-- we do have a summary so create and populate it -->
Expand Down

0 comments on commit 2152752

Please sign in to comment.