1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <!DOCTYPE html>
- <meta name="apple-mobile-web-app-capable" content="yes" />
- <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=0.6, maximum-scale=0.6" />
- <html>
- <head>
- <meta charset="UTF-8">
- <script type='text/javascript' charset='utf-8'>
- // Hides mobile browser's address bar when page is done loading.
- window.addEventListener('load', function(e) {
- setTimeout(function() {
- window.scrollTo(0, 1);
- }, 1);
- }, false);
- </script>
- <title>ArOZ Onlineβ</title>
- <link rel="stylesheet" href="../../../script/tocas/tocas.css">
- <script src="../../../script/tocas/tocas.js"></script>
- <script src="../../../script/jquery.min.js"></script>
- <!--<script src="../../../script/ao_module.js"></script>-->
- </head>
- <body style="background-color: rgba(255, 255, 255,0.9)">
- <br>
- <div class="ts container">
- <p id="Tstatus">Quick diagnostic in progress... Approximate time was 3 minutes.</p>
- <div class="ts progress">
- <div class="bar" id="prbar" style="width: 0%"></div>
- </div>
- <p id="status"></p>
- </div>
- <script>
- var timer = setInterval(function() {
- $.getJSON("../../../system/disk/smart/getLogInfo?disk=" + get("disk"), function(data) {
- if (data["value"] == 246) {
- var width = data["remaining_percent"];
- $("#prbar").attr("style", "width: " + (100 - width) + "%");
- $("#status").text("Status:" + data["string"]);
- } else if (data["value"] == 16) {
- $("#Tstatus").text("Harddisk test aborted.");
- $("#status").text("Status:" + data["string"]);
- } else if (data["value"] == 0) {
- $("#Tstatus").text("Harddisk test finished.");
- $("#prbar").attr("style", "width: 100%");
- $("#status").text("Status:" + data["string"]);
- }
- });
- }, 3000);
- //https://stackoverflow.com/questions/831030/how-to-get-get-request-parameters-in-javascript
- function get(name) {
- if (name = (new RegExp('[?&]' + encodeURIComponent(name) + '=([^&]*)')).exec(location.search)) {
- return decodeURIComponent(name[1]);
- }
- }
- </script>
- </body>
- </html>
- <?php
- exec('sudo smartctl -t short -C '.$_GET["disk"]);
- ?>
|