|
@@ -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>
|
|
|
|
|
|
|