git://git.onelab.eu
/
monitor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
check agg['plc_node_stats']. this was causing the monitor deployment on PLE fail...
[monitor.git]
/
web
/
MonitorWeb
/
monitorweb
/
controllers.py
diff --git
a/web/MonitorWeb/monitorweb/controllers.py
b/web/MonitorWeb/monitorweb/controllers.py
index
74b2770
..
6941327
100644
(file)
--- a/
web/MonitorWeb/monitorweb/controllers.py
+++ b/
web/MonitorWeb/monitorweb/controllers.py
@@
-53,8
+53,8
@@
class NodeQueryFields(widgets.WidgetsList):
external_dns_status = widgets.CheckBox(label="Hostname Resolves?")
kernel_version = widgets.CheckBox(label="Kernel")
bootcd_version = widgets.CheckBox(label="BootCD")
external_dns_status = widgets.CheckBox(label="Hostname Resolves?")
kernel_version = widgets.CheckBox(label="Kernel")
bootcd_version = widgets.CheckBox(label="BootCD")
-
boot_server = widgets.CheckBox(label="Boot Server")
-
install_date = widgets.CheckBox(label="Installation Date")
+ boot_server = widgets.CheckBox(label="Boot Server")
+ install_date = widgets.CheckBox(label="Installation Date")
observed_status = widgets.CheckBox(label="Observed Status")
uptime = widgets.CheckBox(label="Uptime")
traceroute = widgets.CheckBox(label="Traceroute")
observed_status = widgets.CheckBox(label="Observed Status")
uptime = widgets.CheckBox(label="Uptime")
traceroute = widgets.CheckBox(label="Traceroute")
@@
-340,7
+340,10
@@
class Root(controllers.RootController, MonitorXmlrpcServer):
agg = node.__dict__.copy()
else:
agg = node.to_dict()
agg = node.__dict__.copy()
else:
agg = node.to_dict()
- agg.update(agg['plc_node_stats'])
+ if agg['plc_node_stats']:
+ agg.update(agg['plc_node_stats'])
+ if agg['install_date']:
+ agg['install_date'] = time.mktime(time.strptime(agg['install_date'], "%a %b %d %H:%M:%S %Y"))
if agg['kernel_version']:
agg['kernel_version'] = agg['kernel_version'].split()[2]
if 'traceroute' in data and agg['traceroute']:
if agg['kernel_version']:
agg['kernel_version'] = agg['kernel_version'].split()[2]
if 'traceroute' in data and agg['traceroute']:
@@
-348,7
+351,8
@@
class Root(controllers.RootController, MonitorXmlrpcServer):
if 'rpmvalue' in data and 'rpms' in data:
if agg['rpms']:
rpm_list = agg['rpms'].split()
if 'rpmvalue' in data and 'rpms' in data:
if agg['rpms']:
rpm_list = agg['rpms'].split()
- rpm_list = filter(lambda x: data['rpmvalue'] in x, rpm_list)
+ rpm_list = filter(lambda x: re.match(data['rpmvalue'], x, re.I),
+ rpm_list)
agg['rpms'] = " ".join(rpm_list)
query.append(agg)
agg['rpms'] = " ".join(rpm_list)
query.append(agg)