Dashboard visual adjustments

This commit is contained in:
Akkadius 2017-09-13 23:17:52 -05:00
parent 0a0e6ca7f5
commit 5fd98d6ad0
3 changed files with 9 additions and 12 deletions

View File

@ -15,7 +15,6 @@
<th>Used</th> <th>Used</th>
<th>Size</th> <th>Size</th>
<th>Free</th> <th>Free</th>
<th>%</th>
<th>Utilization</th> <th>Utilization</th>
</tr> </tr>
</thead> </thead>

View File

@ -14,7 +14,6 @@
<th>Used</th> <th>Used</th>
<th>Size</th> <th>Size</th>
<th>Free</th> <th>Free</th>
<th>%</th>
<th>Utilization</th> <th>Utilization</th>
</tr> </tr>
</thead> </thead>

View File

@ -28,14 +28,14 @@ router.get('/', function(req, res, next) {
shared_networks = ''; shared_networks = '';
for ( var i = 0; i < dhcp_data['shared-networks'].length; i++) { for ( var i = 0; i < dhcp_data['shared-networks'].length; i++) {
table_row = '';
table_row = table_row + '<td><b>' + dhcp_data['shared-networks'][i].location + '</b></td>';
table_row = table_row + '<td>' + dhcp_data['shared-networks'][i].used.toLocaleString('en') + '</td>';
table_row = table_row + '<td>' + dhcp_data['shared-networks'][i].defined.toLocaleString('en') + '</td>';
table_row = table_row + '<td>' + dhcp_data['shared-networks'][i].free.toLocaleString('en') + '</td>';
utilization = dhcp_data['shared-networks'][i].utilization; utilization = dhcp_data['shared-networks'][i].utilization;
table_row = table_row + '<td>' + utilization + '</td>'; table_row = '';
table_row = table_row + '<td><b>' + dhcp_data['shared-networks'][i].location + '</b></td>';
table_row = table_row + '<td>' + dhcp_data['shared-networks'][i].used.toLocaleString('en') + ' (' + utilization + '%)</td>';
table_row = table_row + '<td>' + dhcp_data['shared-networks'][i].defined.toLocaleString('en') + '</td>';
table_row = table_row + '<td>' + dhcp_data['shared-networks'][i].free.toLocaleString('en') + '</td>';
utilization_color = 'green'; utilization_color = 'green';
@ -67,16 +67,15 @@ router.get('/', function(req, res, next) {
display_subnets = ''; display_subnets = '';
for ( var i = 0; i < dhcp_data.subnets.length; i++) { for ( var i = 0; i < dhcp_data.subnets.length; i++) {
utilization = dhcp_data.subnets[i].utilization;
table_row = ''; table_row = '';
table_row = table_row + '<td><b>' + dhcp_data.subnets[i].location + '</b></td>'; table_row = table_row + '<td><b>' + dhcp_data.subnets[i].location + '</b></td>';
table_row = table_row + '<td>' + dhcp_data.subnets[i].range + '</td>'; table_row = table_row + '<td>' + dhcp_data.subnets[i].range + '</td>';
table_row = table_row + '<td>' + dhcp_data.subnets[i].used.toLocaleString('en') + '</td>'; table_row = table_row + '<td>' + dhcp_data.subnets[i].used.toLocaleString('en') + ' (' + utilization + '%)</td>';
table_row = table_row + '<td>' + dhcp_data.subnets[i].defined.toLocaleString('en') + '</td>'; table_row = table_row + '<td>' + dhcp_data.subnets[i].defined.toLocaleString('en') + '</td>';
table_row = table_row + '<td>' + dhcp_data.subnets[i].free.toLocaleString('en') + '</td>'; table_row = table_row + '<td>' + dhcp_data.subnets[i].free.toLocaleString('en') + '</td>';
utilization = dhcp_data.subnets[i].utilization;
table_row = table_row + '<td>' + utilization + '</td>';
utilization_color = 'green'; utilization_color = 'green';
if(utilization >= 80) if(utilization >= 80)