|
@@ -58,7 +58,18 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
<script>
|
|
- var smart_template = '<div class="item"><div class="image" style="width: auto !important"><img src="/SystemAO/disk/smart/img/hard-drive.svg" style="height:60px;width:auto"></div><div class="content"><p class="header">{model}</p><button class="ui right floated icon button" id="{id}" onclick="showDetails(this)"><i class="info icon"></i></button><div class="meta"><span>{status}</span></div><div class="description"><p></p></div><div class="extra">{capacity}</div></div></div>';
|
|
|
|
|
|
+ var smart_template = `<div class="item">
|
|
|
|
+ <div class="tiny image" style="width: auto !important; margin-top: -10px;">
|
|
|
|
+ <img src="/SystemAO/disk/smart/img/hard-drive.svg" style="height:60px;width:auto; padding: 8px;">
|
|
|
|
+ </div>
|
|
|
|
+ <div class="content">
|
|
|
|
+ <p class="header">{model}</p>
|
|
|
|
+ <button class="ui right floated icon button" id="{id}" onclick="showDetails(this)"><i class="info icon"></i></button>
|
|
|
|
+ <div class="meta"><span>{status}</span></div>
|
|
|
|
+ <div class="description"><p></p></div>
|
|
|
|
+ <div class="extra">{capacity}</div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>`;
|
|
var smartDATA;
|
|
var smartDATA;
|
|
$.getJSON("/system/disk/smart/getSMART", function(data) {
|
|
$.getJSON("/system/disk/smart/getSMART", function(data) {
|
|
smartDATA = data;
|
|
smartDATA = data;
|
|
@@ -76,6 +87,17 @@
|
|
}
|
|
}
|
|
$("#loadWarning").remove();
|
|
$("#loadWarning").remove();
|
|
});
|
|
});
|
|
|
|
+
|
|
|
|
+ //Execute once when the page load, to destroy the old model
|
|
|
|
+ /*
|
|
|
|
+ This section was added because once the page changed, multiple modal
|
|
|
|
+ is appended to the page which lead to duplication of modal when calling
|
|
|
|
+ modal("show"). Do not remove the 3 lines below.
|
|
|
|
+ */
|
|
|
|
+ $(".loadedModal").modal('destroy');
|
|
|
|
+ $(".loadedModal").remove();
|
|
|
|
+ $(".ui.modal").addClass("loadedModal");
|
|
|
|
+
|
|
|
|
|
|
function append(id, name, status, capacity){
|
|
function append(id, name, status, capacity){
|
|
var tmp = smart_template;
|
|
var tmp = smart_template;
|