|
@@ -7,7 +7,7 @@ include_once '../auth.php';
|
|
<script src="../script/tocas/tocas.js"></script>
|
|
<script src="../script/tocas/tocas.js"></script>
|
|
<script src="../script/jquery.min.js"></script>
|
|
<script src="../script/jquery.min.js"></script>
|
|
<script src="../script/ao_module.js"></script>
|
|
<script src="../script/ao_module.js"></script>
|
|
- <script src="html2canvas.min.js"></script>
|
|
|
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=0.6, shrink-to-fit=no">
|
|
<style>
|
|
<style>
|
|
.item{
|
|
.item{
|
|
text-align: center;
|
|
text-align: center;
|
|
@@ -18,12 +18,10 @@ include_once '../auth.php';
|
|
</style>
|
|
</style>
|
|
</head>
|
|
</head>
|
|
<body>
|
|
<body>
|
|
- <div class="ts tabbed menu">
|
|
|
|
- <a class="item">Good<br>29C<br>C:</a>
|
|
|
|
- <a class="active item">Warning<br>29C<br>C:</a>
|
|
|
|
|
|
+<div class="ts tabbed menu" id="menu">
|
|
</div>
|
|
</div>
|
|
<div class="ts grid">
|
|
<div class="ts grid">
|
|
- <div class="sixteen wide column"><h3 class="ts center aligned header">INTEL SSDSC2BW240H6 240.0GB</h3></div>
|
|
|
|
|
|
+ <div class="sixteen wide column"><h3 class="ts center aligned header" id="drivename">INTEL SSDSC2BW240H6 240.0GB</h3></div>
|
|
<div class="sixteen wide column">
|
|
<div class="sixteen wide column">
|
|
<div class="ts narrow container">
|
|
<div class="ts narrow container">
|
|
<div class="ts grid">
|
|
<div class="ts grid">
|
|
@@ -31,8 +29,8 @@ include_once '../auth.php';
|
|
<h5 class="ts center aligned header">Health Status</h5>
|
|
<h5 class="ts center aligned header">Health Status</h5>
|
|
<div class="ts inverted primary card">
|
|
<div class="ts inverted primary card">
|
|
<div class="content">
|
|
<div class="content">
|
|
- <div class="header" style="text-align: center;">Good</div>
|
|
|
|
- <div class="description" style="text-align: center;">
|
|
|
|
|
|
+ <div class="header" style="text-align: center;" id="health_status">Good</div>
|
|
|
|
+ <div class="description" style="text-align: center;" id="health_prec">
|
|
95%
|
|
95%
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -40,7 +38,7 @@ include_once '../auth.php';
|
|
<h5 class="ts center aligned header">Temperture</h5>
|
|
<h5 class="ts center aligned header">Temperture</h5>
|
|
<div class="ts inverted primary card">
|
|
<div class="ts inverted primary card">
|
|
<div class="content">
|
|
<div class="content">
|
|
- <div class="description" style="text-align: center;">
|
|
|
|
|
|
+ <div class="description" style="text-align: center;" id="temperture">
|
|
25C
|
|
25C
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -54,35 +52,15 @@ include_once '../auth.php';
|
|
<div class="ts horizontal form" style="opacity: 1;">
|
|
<div class="ts horizontal form" style="opacity: 1;">
|
|
<div class="disabled field" style="opacity: 1;">
|
|
<div class="disabled field" style="opacity: 1;">
|
|
<label style="color:black">Firmware</label>
|
|
<label style="color:black">Firmware</label>
|
|
- <input class="ts mini input" style="color:black" type="text" value="RG21"></input>
|
|
|
|
|
|
+ <input id="firmware" class="ts mini input" style="color:black" type="text" value="RG21"></input>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="eight wide column">
|
|
<div class="eight wide column">
|
|
<div class="ts horizontal form" style="opacity: 1;">
|
|
<div class="ts horizontal form" style="opacity: 1;">
|
|
<div class="disabled field" style="opacity: 1;">
|
|
<div class="disabled field" style="opacity: 1;">
|
|
- <label style="color:black">Total Host Reads</label>
|
|
|
|
- <input class="ts mini input" style="color:black" type="text" value="22507GB"></input>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div class="sixteen wide column">
|
|
|
|
- <div class="ts grid">
|
|
|
|
- <div class="eight wide column">
|
|
|
|
- <div class="ts horizontal form" style="opacity: 1;">
|
|
|
|
- <div class="disabled field" style="opacity: 1;">
|
|
|
|
- <label style="color:black">Firmware</label>
|
|
|
|
- <input class="ts mini input" style="color:black" type="text" value="RG21"></input>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div class="eight wide column">
|
|
|
|
- <div class="ts horizontal form" style="opacity: 1;">
|
|
|
|
- <div class="disabled field" style="opacity: 1;">
|
|
|
|
- <label style="color:black">Total Host Reads</label>
|
|
|
|
- <input class="ts mini input" style="color:black" type="text" value="22507GB"></input>
|
|
|
|
|
|
+ <label id="col1" style="color:black">Total Host Reads</label>
|
|
|
|
+ <input id="col1_v" class="ts mini input" style="color:black" type="text" value="22507GB"></input>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -94,15 +72,15 @@ include_once '../auth.php';
|
|
<div class="ts horizontal form" style="opacity: 1;">
|
|
<div class="ts horizontal form" style="opacity: 1;">
|
|
<div class="disabled field" style="opacity: 1;">
|
|
<div class="disabled field" style="opacity: 1;">
|
|
<label style="color:black">Serial Number</label>
|
|
<label style="color:black">Serial Number</label>
|
|
- <input class="ts mini input" style="color:black" type="text" value="CVTR505030T240CGN"></input>
|
|
|
|
|
|
+ <input id="serial" class="ts mini input" style="color:black" type="text" value="CVTR505030T240CGN"></input>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="eight wide column">
|
|
<div class="eight wide column">
|
|
<div class="ts horizontal form" style="opacity: 1;">
|
|
<div class="ts horizontal form" style="opacity: 1;">
|
|
<div class="disabled field" style="opacity: 1;">
|
|
<div class="disabled field" style="opacity: 1;">
|
|
- <label style="color:black">Total Host Writes</label>
|
|
|
|
- <input class="ts mini input" style="color:black" type="text" value="18517GB"></input>
|
|
|
|
|
|
+ <label id="col2" style="color:black">Total Host Writes</label>
|
|
|
|
+ <input id="col2_v" class="ts mini input" style="color:black" type="text" value="18517GB"></input>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -114,15 +92,15 @@ include_once '../auth.php';
|
|
<div class="ts horizontal form" style="opacity: 1;">
|
|
<div class="ts horizontal form" style="opacity: 1;">
|
|
<div class="disabled field" style="opacity: 1;">
|
|
<div class="disabled field" style="opacity: 1;">
|
|
<label style="color:black">Interface</label>
|
|
<label style="color:black">Interface</label>
|
|
- <input class="ts mini input" style="color:black" type="text" value="Serial ATA"></input>
|
|
|
|
|
|
+ <input id="interface" class="ts mini input" style="color:black" type="text" value="Serial ATA"></input>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="eight wide column">
|
|
<div class="eight wide column">
|
|
<div class="ts horizontal form" style="opacity: 1;">
|
|
<div class="ts horizontal form" style="opacity: 1;">
|
|
<div class="disabled field" style="opacity: 1;">
|
|
<div class="disabled field" style="opacity: 1;">
|
|
- <label style="color:black">Total NAND Writes</label>
|
|
|
|
- <input class="ts mini input" style="color:black" type="text" value="77840GB"></input>
|
|
|
|
|
|
+ <label id="col3" style="color:black">Total NAND Writes</label>
|
|
|
|
+ <input id="col3_v" class="ts mini input" style="color:black" type="text" value="77840GB"></input>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -134,7 +112,7 @@ include_once '../auth.php';
|
|
<div class="ts horizontal form" style="opacity: 1;">
|
|
<div class="ts horizontal form" style="opacity: 1;">
|
|
<div class="disabled field" style="opacity: 1;">
|
|
<div class="disabled field" style="opacity: 1;">
|
|
<label style="color:black">Transfer Mode</label>
|
|
<label style="color:black">Transfer Mode</label>
|
|
- <input class="ts mini input" style="color:black" type="text" value="SATA/600 | SATA/600"></input>
|
|
|
|
|
|
+ <input id="transfer" class="ts mini input" style="color:black" type="text" value="SATA/600 | SATA/600"></input>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -142,7 +120,7 @@ include_once '../auth.php';
|
|
<div class="ts horizontal form" style="opacity: 1;">
|
|
<div class="ts horizontal form" style="opacity: 1;">
|
|
<div class="disabled field" style="opacity: 1;">
|
|
<div class="disabled field" style="opacity: 1;">
|
|
<label style="color:black">Power On Count</label>
|
|
<label style="color:black">Power On Count</label>
|
|
- <input class="ts mini input" style="color:black" type="text" value="3816 count"></input>
|
|
|
|
|
|
+ <input id="powercount" class="ts mini input" style="color:black" type="text" value="3816 count"></input>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -154,7 +132,7 @@ include_once '../auth.php';
|
|
<div class="ts horizontal form" style="opacity: 1;">
|
|
<div class="ts horizontal form" style="opacity: 1;">
|
|
<div class="disabled field" style="opacity: 1;">
|
|
<div class="disabled field" style="opacity: 1;">
|
|
<label style="color:black">Drive Letter</label>
|
|
<label style="color:black">Drive Letter</label>
|
|
- <input class="ts mini input" style="color:black" type="text" value="SATA/600 | SATA/600"></input>
|
|
|
|
|
|
+ <input id="driveleter" class="ts mini input" style="color:black" type="text" value="C:"></input>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -162,7 +140,7 @@ include_once '../auth.php';
|
|
<div class="ts horizontal form" style="opacity: 1;">
|
|
<div class="ts horizontal form" style="opacity: 1;">
|
|
<div class="disabled field" style="opacity: 1;">
|
|
<div class="disabled field" style="opacity: 1;">
|
|
<label style="color:black">Power On Hours</label>
|
|
<label style="color:black">Power On Hours</label>
|
|
- <input class="ts mini input" style="color:black" type="text" value="1834 hours"></input>
|
|
|
|
|
|
+ <input id="powerhour" class="ts mini input" style="color:black" type="text" value="1834 hours"></input>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -173,7 +151,7 @@ include_once '../auth.php';
|
|
<div class="ts horizontal form" style="opacity: 1;">
|
|
<div class="ts horizontal form" style="opacity: 1;">
|
|
<div class="disabled field" style="opacity: 1;">
|
|
<div class="disabled field" style="opacity: 1;">
|
|
<label style="color:black">Standard</label>
|
|
<label style="color:black">Standard</label>
|
|
- <input class="ts mini input" style="color:black" type="text" value="ACS-3 | ----"></input>
|
|
|
|
|
|
+ <input id="standard" class="ts mini input" style="color:black" type="text" value="ACS-3 | ----"></input>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -181,7 +159,7 @@ include_once '../auth.php';
|
|
<div class="ts horizontal form" style="opacity: 1;">
|
|
<div class="ts horizontal form" style="opacity: 1;">
|
|
<div class="disabled field" style="opacity: 1;">
|
|
<div class="disabled field" style="opacity: 1;">
|
|
<label style="color:black">Features</label>
|
|
<label style="color:black">Features</label>
|
|
- <input class="ts mini input" style="color:black" type="text" value="S.M.A.R.T., APM, NCQ, TRIM, DevSleep"></input>
|
|
|
|
|
|
+ <input id="features" class="ts mini input" style="color:black" type="text" value="S.M.A.R.T., APM, NCQ, TRIM, DevSleep"></input>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -206,20 +184,86 @@ include_once '../auth.php';
|
|
<th>Raw Values</th>
|
|
<th>Raw Values</th>
|
|
</tr>
|
|
</tr>
|
|
</thead>
|
|
</thead>
|
|
- <tbody>
|
|
|
|
- <tr>
|
|
|
|
- <td>OK</td>
|
|
|
|
- <td>05</td>
|
|
|
|
- <td>Re-Allocated Sector Count</td>
|
|
|
|
- <td>100</td>
|
|
|
|
- <td>100</td>
|
|
|
|
- <td>0</td>
|
|
|
|
- <td>00000000000</td>
|
|
|
|
- </tr>
|
|
|
|
|
|
+ <tbody id="tbody">
|
|
</tbody>
|
|
</tbody>
|
|
</table>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</body>
|
|
|
|
+<script>
|
|
|
|
+var active = "<?php echo isset($_GET["drive"])?$_GET["drive"]:"" ?>";
|
|
|
|
+$.get( "opr.php?opr=scan", function( data ) {
|
|
|
|
+ var arr = JSON.parse(data);
|
|
|
|
+ $(arr["devices"]).each(function(index, element) {
|
|
|
|
+ if(active == element["info_name"]){
|
|
|
|
+ $( "#menu" ).append('<a class="active item" href="?drive=' + element["info_name"] + '">' + smartok(element["info_name"]) + '<br>29C<br>' + element["info_name"] + '</a>');
|
|
|
|
+ }else{
|
|
|
|
+ $( "#menu" ).append('<a class="item" href="?drive=' + element["info_name"] + '">' + smartok(element["info_name"]) + '<br>29C<br>' + element["info_name"] + '</a>');
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+});
|
|
|
|
+$.get( "opr.php?opr=info&drive=" + active, function( data ) {
|
|
|
|
+ var arr = JSON.parse(data);
|
|
|
|
+ $("#drivename").html(arr["model_family"] + " " + arr["model_name"] + " " + formatSizeUnits(arr["user_capacity"]["bytes"]));
|
|
|
|
+ $("#firmware").attr("value",arr["firmware_version"]);
|
|
|
|
+ $("#serial").attr("value",arr["serial_number"]);
|
|
|
|
+ $("#interface").attr("value",arr["device"]["protocol"]);
|
|
|
|
+ $("#transfer").attr("value",arr["interface_speed"]["current"]["string"] + " | " + arr["interface_speed"]["max"]["string"]);
|
|
|
|
+ $("#driveleter").attr("value",arr["device"]["name"]);
|
|
|
|
+ $("#standard").attr("value",arr["ata_version"]["string"]);
|
|
|
|
+ $("#features").attr("value","S.M.A.R.T.");
|
|
|
|
+ if(arr["rotation_rate"] > 0){
|
|
|
|
+ $("#col1").html("----");
|
|
|
|
+ $("#col1_v").attr("value","----");
|
|
|
|
+
|
|
|
|
+ $("#col2").html("----");
|
|
|
|
+ $("#col2_v").attr("value","----");
|
|
|
|
+ $("#col3").html("Rotation Rate");
|
|
|
|
+ $("#col3_v").attr("value",arr["rotation_rate"] + " rpm");
|
|
|
|
+ }else{
|
|
|
|
+ $("#col1").html("Total Host Reads");
|
|
|
|
+ $("#col1_v").attr("value","----");
|
|
|
|
+
|
|
|
|
+ $("#col2").html("Total Host Writes");
|
|
|
|
+ $("#col2_v").attr("value","----");
|
|
|
|
+ $("#col3").html("Total NAND Writes");
|
|
|
|
+ $("#col3_v").attr("value","----");
|
|
|
|
+ }
|
|
|
|
+ $("#powercount").attr("value",arr["power_cycle_count"] + " count");
|
|
|
|
+ $("#powerhour").attr("value",arr["power_on_time"]["hours"] + " hours");
|
|
|
|
+ $(arr["ata_smart_attributes"]["table"]).each(function(index, element) {
|
|
|
|
+ if(element["when_failed"] == ""){
|
|
|
|
+ var stat = "OK";
|
|
|
|
+ }else{
|
|
|
|
+ var stat = "Failed";
|
|
|
|
+ }
|
|
|
|
+ $("#tbody").append('<tr><td>' + stat + '</td><td>' + element["id"] + '</td><td>' + element["name"] + '</td><td>' + element["value"] + '</td><td>' + element["worst"] + '</td><td>' + element["thresh"] + '</td><td>' + element["raw"]["value"] + '</td></tr>');
|
|
|
|
+ });
|
|
|
|
+});
|
|
|
|
+
|
|
|
|
+function smartok(drive){
|
|
|
|
+ return "Good";
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+//from https://stackoverflow.com/questions/5501427/php-filesize-mb-kb-conversion/5501447
|
|
|
|
+ function formatSizeUnits(bytes)
|
|
|
|
+ {
|
|
|
|
+ if(bytes >= 1000000000){
|
|
|
|
+ bytes = Math.round(bytes / 1000000000,2) + 'GB';
|
|
|
|
+ }else if (bytes >= 1000000){
|
|
|
|
+ bytes = Math.round(bytes / 1000000,2) + 'MB';
|
|
|
|
+ }else if (bytes >= 1000){
|
|
|
|
+ bytes = Math.round(bytes / 1000,2) + 'KB';
|
|
|
|
+ }else if (bytes > 1){
|
|
|
|
+ bytes = bytes + 'bytes';
|
|
|
|
+ }else if (bytes == 1){
|
|
|
|
+ bytes = bytes + 'byte';
|
|
|
|
+ }else{
|
|
|
|
+ bytes = '0bytes';
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return bytes;
|
|
|
|
+}
|
|
|
|
+</script>
|
|
</html>
|
|
</html>
|