Network report hotfix
Change-Id: I9434f42853b51e4f1d5ee01f09a16f0684b24732
Related-PROD: PROD-38972
diff --git a/cfg_checker/reports/reporter.py b/cfg_checker/reports/reporter.py
index 9cac4f5..5b5a37e 100644
--- a/cfg_checker/reports/reporter.py
+++ b/cfg_checker/reports/reporter.py
@@ -235,12 +235,10 @@
for node, dt in _dict.iteritems():
dt[_key] = {}
if dt['status'] == DOWN:
- dt.pop(_key_r)
continue
if not dt[_key_r]:
# no stats collected, put negatives
dt.pop(_key_r)
- dt[_key] = {}
continue
lines = dt[_key_r].splitlines()
for line in lines:
@@ -267,12 +265,10 @@
for node, dt in _dict.iteritems():
dt[_key] = {}
if dt['status'] == DOWN:
- dt.pop(_key_r)
continue
if not dt[_key_r]:
# no stats collected, put negatives
dt.pop(_key_r)
- dt[_key] = {}
continue
li = dt[_key_r].split()
dt[_key]['total'] = li[1]
@@ -301,12 +297,10 @@
for node, dt in _dict.iteritems():
dt[_key] = {}
if dt['status'] == DOWN:
- dt.pop(_key_r)
continue
if not dt[_key_r]:
# no stats collected, put negatives
dt.pop(_key_r)
- dt[_key] = {}
continue
lines = dt[_key_r].splitlines()
for line in lines:
@@ -335,12 +329,10 @@
dt = _dict[node]
dt[_key] = {}
if dt['status'] == DOWN:
- dt.pop(_key_r)
continue
if not dt[_key_r]:
# no stats collected, put negatives
dt.pop(_key_r)
- dt[_key] = {}
continue
lines = dt[_key_r].splitlines()
for line in lines:
@@ -372,7 +364,9 @@
_ts = [0, 0, 0, 0]
# skip if node is down
if dt['status'] == DOWN:
- dt.pop(_key_r)
+ dt[_key] = {
+ "total": [-1, -1, -1, -1]
+ }
continue
if not dt[_key_r]:
# no stats collected, put negatives
@@ -461,17 +455,18 @@
target_dict=data["nodes"]
)
for dt in data["nodes"].itervalues():
+ dt["disk"] = {}
+ dt["disk_max_dev"] = None
if dt['status'] == DOWN:
- dt.pop(_key_r)
+ dt["disk"]["unknown"] = {}
+ dt["disk_max_dev"] = "unknown"
continue
if not dt[_key_r]:
# no stats collected, put negatives
dt.pop(_key_r)
dt[_key] = {}
continue
- dt["disk"] = {}
# show first device row by default
- dt["disk_max_dev"] = None
_d = dt["disk"]
_r = dt["disk_raw"]
_r = _r.splitlines()
diff --git a/templates/network_check_tmpl.j2 b/templates/network_check_tmpl.j2
index a2b17a9..6cb3e89 100644
--- a/templates/network_check_tmpl.j2
+++ b/templates/network_check_tmpl.j2
@@ -7,9 +7,9 @@
{% include 'common_scripts.j2' %}
<style>
table.cluster_nodes {
- width: 90%;
- margin-left: 5%;
- margin-right: 5%;
+ width: 98%;
+ margin-left: 1%;
+ margin-right: 1%;
}
/* Node rows*/
@@ -91,8 +91,8 @@
.head { height: 18px; }
.col_name { width: 250px; }
- .col_role { width: 150px; }
- .col_vendor { width: 100px; }
+ .col_role { width: 130px; }
+ .col_vendor { width: 70px; }
.col_release { width: 100px; }
.col_kernel { min-width: 100px; }
.col_vcpu { min-width: 40px; }
@@ -100,8 +100,8 @@
.col_ram { min-width: 150px; }
.col_disk { min-width: 200px; }
- .col_node_notes { width: 400px; }
- .col_cpu_notes { width: 218px; }
+ .col_node_notes { width: 384px; }
+ .col_cpu_notes { width: 177px; }
.meters {
display: inline-block;