|
@@ -206,7 +206,7 @@ $.get( "opr.php?opr=scan", function( data ) {
|
|
|
$(arr["devices"]).each(function(index, element) {
|
|
|
$.get( "opr.php?opr=info&drive=" + element["info_name"], function( data ) {
|
|
|
if(data.length > 0){
|
|
|
- smartstat[element["info_name"]] = "Good";
|
|
|
+ smartstat[element["info_name"]] = "Unknown";
|
|
|
var table = JSON.parse(data);
|
|
|
if(table["ata_smart_attributes"]["table"].length > 0){
|
|
|
$(table["ata_smart_attributes"]["table"]).each(function(tindex, telement) {
|
|
@@ -216,6 +216,9 @@ $.get( "opr.php?opr=scan", function( data ) {
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
+ if(smartstat[active] == "Unknown"){
|
|
|
+ smartstat[active] = "Good";
|
|
|
+ }
|
|
|
}else{
|
|
|
smartstat[element["info_name"]] = "Unknown";
|
|
|
}
|
|
@@ -307,9 +310,10 @@ $.get( "opr.php?opr=info&drive=" + active, function( data ) {
|
|
|
$("#health_prec").html(element["value"] + "%");
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
- if(smartstat[active] == "Unknown"){
|
|
|
- smartstat[active] = "Good";
|
|
|
+ if(arr["ata_smart_attributes"]["table"].length > 0){
|
|
|
+ if(smartstat[active] == "Unknown"){
|
|
|
+ smartstat[active] = "Good";
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if(smartstat[active] == "Warning"){
|