]> git.gag.com Git - fw/quantimotor/commitdiff
add a table containing current test metadata pulled from server as json
authorBdale Garbee <bdale@gag.com>
Tue, 27 May 2025 18:31:37 +0000 (12:31 -0600)
committerBdale Garbee <bdale@gag.com>
Tue, 27 May 2025 18:31:37 +0000 (12:31 -0600)
ui/index.html

index 922c695286236efa6ce36b36d79b391ee4bec6ec..a7b6db6787d5bb656dfe0ecf21ebca209256c6a3 100644 (file)
 
     <!-- TEST -->
     <section class="test">
+      <table id="testmetadata" class="w3-table w3-border w3-pale-yellow"> </table>
       <div class="w3-container w3-center">
         <button onclick="document.getElementById('start-metadata').style.display='block'" 
-          class="w3-button w3-round-large w3-black w3-hover-orange w3-large w3-opacity">
+          class="w3-button w3-round-large w3-black w3-hover-orange w3-large w3-opacity w3-margin-bottom">
           Configure Test</button>
       </div>
       <div class="w3-container w3-center">
     </div>
 
 
+    <script>
+      // populate test metadata table with json data from server
+      $.getJSON("/metadata", function(data) {
+        var tbl_body = document.createElement("tbody");
+        $.each(data, function(key, value) {
+          var tbl_row = tbl_body.insertRow();
+          var cell = tbl_row.insertCell();
+          cell.appendChild(document.createTextNode(key.toString()));
+          var cell = tbl_row.insertCell();
+          cell.appendChild(document.createTextNode(value.toString()));
+        });
+        $("#testmetadata").append(tbl_body);
+      });
+    </script>
+
     <script>
 
       /**