Browse Source

auto update script executed

tobychui 1 year ago
parent
commit
bf31d449dd
3 changed files with 39 additions and 38 deletions
  1. 37 2
      web/components/networktools.html
  2. 1 1
      web/components/status.html
  3. 1 35
      web/components/utils.html

+ 37 - 2
web/components/networktools.html

@@ -8,7 +8,7 @@
     <div class="ui top attached tabular menu">
         <a class="nettools item active bluefont" data-tab="tab1">Discovery</a>
         <a class="nettools item bluefont" data-tab="tab2">Connections</a>
-        <a class="nettools item bluefont" data-tab="tab3">Debugging</a>
+        <a class="nettools item bluefont" data-tab="tab3">Network Interfaces</a>
     </div>
 
     <div class="ui bottom attached tab segment active" data-tab="tab1">
@@ -26,7 +26,18 @@
     </div>
 
     <div class="ui bottom attached tab segment" data-tab="tab3">
-    <p>Content of tab 3</p>
+        <h2>Network Interfaces</h2>
+        <p>Network Interface Card (NIC) currently installed on this host</p>
+        <table id="network-interfaces-table" class="ui selectable inverted striped celled table">
+            <thead>
+                <tr>
+                    <th>Interface Name</th>
+                    <th>ID</th>
+                    <th>IP Address</th>
+                </tr>
+            </thead>
+            <tbody></tbody>
+        </table>
     </div>
 </div>
 
@@ -58,6 +69,30 @@ function launchToolWithSize(url, width, height){
     width=${width},
     height=${height}`);
 }
+
+/*
+    NIC Info
+*/
+
+function renderNICInfo(){
+    $.get("/api/stats/listnic",function(data){
+        var tbody = document.querySelector("#network-interfaces-table tbody");
+        data.forEach(function(item) {
+            var tr = document.createElement("tr");
+            var name = document.createElement("td");
+            name.textContent = item.Name;
+            var id = document.createElement("td");
+            id.textContent = item.ID;
+            var ips = document.createElement("td");
+            ips.innerHTML = item.IPs.join("<br>");
+            tr.appendChild(name);
+            tr.appendChild(id);
+            tr.appendChild(ips);
+            tbody.appendChild(tr);
+        });
+    });
+}
+renderNICInfo();
 </script>
 
 

+ 1 - 1
web/components/status.html

@@ -570,7 +570,7 @@
     //Bind event to tab switch
     tabSwitchEventBind["status"] = function(){
         //On switch over to this page, resize the chart
-        updateChartSize();
+        //updateChartSize();
     }
 
     //Initialize chart data

+ 1 - 35
web/components/utils.html

@@ -31,18 +31,6 @@
         </div>
         <div class="ui divider"></div>
     </div>
-    <h3>Network Interfaces</h3>
-    <p>Network Interface Card (NIC) currently installed on this host</p>
-    <table id="network-interfaces-table" class="ui selectable inverted striped celled table">
-		<thead>
-			<tr>
-				<th>Interface Name</th>
-				<th>ID</th>
-				<th>IP Address</th>
-			</tr>
-		</thead>
-		<tbody></tbody>
-	</table>
 
     <h3> IP Address to CIDR</h3>
     <p>No experience with CIDR notations? Here are some tools you can use to make setting up easier.</p>
@@ -113,29 +101,7 @@
         });
     }
 
-    /*
-        NIC Info
-    */
-
-    function renderNICInfo(){
-        $.get("/api/stats/listnic",function(data){
-            var tbody = document.querySelector("#network-interfaces-table tbody");
-            data.forEach(function(item) {
-                var tr = document.createElement("tr");
-                var name = document.createElement("td");
-                name.textContent = item.Name;
-                var id = document.createElement("td");
-                id.textContent = item.ID;
-                var ips = document.createElement("td");
-                ips.innerHTML = item.IPs.join("<br>");
-                tr.appendChild(name);
-                tr.appendChild(id);
-                tr.appendChild(ips);
-                tbody.appendChild(tr);
-            });
-        });
-    }
-    renderNICInfo();
+    
 
     /*
         IP Address Utilities