diff --git a/public/templates/display_subnets.html b/public/templates/display_subnets.html
index 064b3ff..6a34822 100644
--- a/public/templates/display_subnets.html
+++ b/public/templates/display_subnets.html
@@ -15,7 +15,6 @@
Used |
Size |
Free |
- % |
Utilization |
diff --git a/public/templates/shared_networks.html b/public/templates/shared_networks.html
index ec48bdb..4f362dd 100644
--- a/public/templates/shared_networks.html
+++ b/public/templates/shared_networks.html
@@ -14,7 +14,6 @@
Used |
Size |
Free |
- % |
Utilization |
diff --git a/routes/get_stats.js b/routes/get_stats.js
index 7bb3b39..bf75d86 100644
--- a/routes/get_stats.js
+++ b/routes/get_stats.js
@@ -28,14 +28,14 @@ router.get('/', function(req, res, next) {
shared_networks = '';
for ( var i = 0; i < dhcp_data['shared-networks'].length; i++) {
- table_row = '';
- table_row = table_row + '' + dhcp_data['shared-networks'][i].location + ' | ';
- table_row = table_row + '' + dhcp_data['shared-networks'][i].used.toLocaleString('en') + ' | ';
- table_row = table_row + '' + dhcp_data['shared-networks'][i].defined.toLocaleString('en') + ' | ';
- table_row = table_row + '' + dhcp_data['shared-networks'][i].free.toLocaleString('en') + ' | ';
+
utilization = dhcp_data['shared-networks'][i].utilization;
- table_row = table_row + '' + utilization + ' | ';
+ table_row = '';
+ table_row = table_row + '' + dhcp_data['shared-networks'][i].location + ' | ';
+ table_row = table_row + '' + dhcp_data['shared-networks'][i].used.toLocaleString('en') + ' (' + utilization + '%) | ';
+ table_row = table_row + '' + dhcp_data['shared-networks'][i].defined.toLocaleString('en') + ' | ';
+ table_row = table_row + '' + dhcp_data['shared-networks'][i].free.toLocaleString('en') + ' | ';
utilization_color = 'green';
@@ -67,16 +67,15 @@ router.get('/', function(req, res, next) {
display_subnets = '';
for ( var i = 0; i < dhcp_data.subnets.length; i++) {
+ utilization = dhcp_data.subnets[i].utilization;
+
table_row = '';
table_row = table_row + '' + dhcp_data.subnets[i].location + ' | ';
table_row = table_row + '' + dhcp_data.subnets[i].range + ' | ';
- table_row = table_row + '' + dhcp_data.subnets[i].used.toLocaleString('en') + ' | ';
+ table_row = table_row + '' + dhcp_data.subnets[i].used.toLocaleString('en') + ' (' + utilization + '%) | ';
table_row = table_row + '' + dhcp_data.subnets[i].defined.toLocaleString('en') + ' | ';
table_row = table_row + '' + dhcp_data.subnets[i].free.toLocaleString('en') + ' | ';
- utilization = dhcp_data.subnets[i].utilization;
- table_row = table_row + '' + utilization + ' | ';
-
utilization_color = 'green';
if(utilization >= 80)