From 3082ca7bcc19ccbb28582d4ff85dbafe2cbd94ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Rossigneux?= Date: Mon, 17 Feb 2014 14:35:36 +0100 Subject: [PATCH] Fix a bug in RRD plugin related to probe names with dots. Change-Id: Ib269771fce0fab34cf452baf81ca03914fbf4104 --- etc/kwapi/drivers.conf | 4 ++-- kwapi/plugins/rrd/templates/index.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/etc/kwapi/drivers.conf b/etc/kwapi/drivers.conf index a52e6ad..76fae04 100644 --- a/etc/kwapi/drivers.conf +++ b/etc/kwapi/drivers.conf @@ -16,13 +16,13 @@ check_drivers_interval = 60 log_file = /var/log/kwapi/kwapi-drivers.log verbose = true +# Wattmeter config examples + #[Wattmeter 1] #probes = ['A'] #driver = Wattsup #parameters = {'device': '/dev/ttyUSB0'} -# Wattmeter config examples - #[Wattmeter 2] #probes = ['B'] #driver = Dummy diff --git a/kwapi/plugins/rrd/templates/index.html b/kwapi/plugins/rrd/templates/index.html index aec9dfc..ee0182c 100644 --- a/kwapi/plugins/rrd/templates/index.html +++ b/kwapi/plugins/rrd/templates/index.html @@ -76,7 +76,7 @@ // Event handler for deleting a probe $(document.body).on('select2-removing', 'select', function(e) { - $('#' + e.val).parent().remove(); + $('#' + e.val.replace(/\./g, '\\.')).parent().remove(); }); // Bind buttons to event handlers