diff options
-rw-r--r-- | ansible/roles/influx/tasks/main.yml (renamed from ansible/roles/influx/main.yml) | 2 | ||||
-rw-r--r-- | ansible/roles/web/tasks/main.yml | 21 | ||||
-rwxr-xr-x | include/config.pm | 1 | ||||
-rw-r--r-- | web/js/nms-info-box.js | 3 |
4 files changed, 25 insertions, 2 deletions
diff --git a/ansible/roles/influx/main.yml b/ansible/roles/influx/tasks/main.yml index 74a6666..196924f 100644 --- a/ansible/roles/influx/main.yml +++ b/ansible/roles/influx/tasks/main.yml @@ -11,4 +11,4 @@ service: name=influxdb state=started - name: Create database -command: /usr/bin/influx -execute 'CREATE DATABASE gondul' + command: /usr/bin/influx -execute 'CREATE DATABASE gondul' diff --git a/ansible/roles/web/tasks/main.yml b/ansible/roles/web/tasks/main.yml index b716f87..3eb4279 100644 --- a/ansible/roles/web/tasks/main.yml +++ b/ansible/roles/web/tasks/main.yml @@ -30,15 +30,36 @@ - perl-modules - libfreezethaw-perl - apache2 + - libapache2-mod-proxy-html + - libxml2-dev + - build-essential + - cpanminus + - apt-transport-https - apache2_module: state: present name: cgid notify: restart apache +- apache2_module: + state: present + name: proxy + notify: restart apache +- apache2_module: + state: present + name: proxy_http + notify: restart apache +- name: Enable gondul-config + copy: + dest: /etc/apache2/sites-enabled/ + src: gondul.conf + notify: restart apache - command: a2dissite 000-default ignore_errors: true + notify: restart apache - name: Enable gondul-config copy: dest: /etc/apache2/sites-enabled/ src: gondul.conf notify: restart apache +- cpanm: + name: AnyEvent::InfluxDB diff --git a/include/config.pm b/include/config.pm index 624770a..e36136d 100755 --- a/include/config.pm +++ b/include/config.pm @@ -15,6 +15,7 @@ our $graphite_port = "2003"; our $influx_host = "http://localhost:8086"; our $influx_username = "admin"; our $influx_password = "admin"; +our $influx_database = "gondul"; # Max SNMP polls to fire off at the same time. our $snmp_max = 20; diff --git a/web/js/nms-info-box.js b/web/js/nms-info-box.js index 841eb67..9a5edae 100644 --- a/web/js/nms-info-box.js +++ b/web/js/nms-info-box.js @@ -952,7 +952,7 @@ var switchEditPanel = function () { var tmpsw = '\'' + this.sw + '\''; var tmpv = '\'' + v + '\''; var tmphandler = '"nmsInfoBox._editChange(' + tmpsw + ',' + tmpv + ');"'; - var html = '<input type="text" class="form-control" value="' + template[v] + '" id="edit-' + this.sw + '-' + v + '" onchange=' + tmphandler + ' oninput=' + tmphandler + ' ' + (v == 'sysname' || v == 'subnet4' || v == 'subnet6' || v == 'mgmt_v4_gw' || v == 'mgmt_v6_gw' ? "readonly" : "") + '>'; + var html = '<input type="text" class="form-control" value="' + template[v] + '" id="edit-' + this.sw + '-' + v + '" onchange=' + tmphandler + ' oninput=' + tmphandler + ' ' + (v == 'sysname' ? "readonly" : "") + '>'; if (v == "placement") { v = "placement <a onclick='var _x = document.getElementById(\"edit-" + this.sw + "-placement\"); _x.value = \"\\\"reset\\\"\"; _x.oninput();' class='pull-right'>Reset</a>"; } @@ -1081,6 +1081,7 @@ nmsInfoBox.addPanelType("switchComments",switchCommentsPanel); var switchSummaryPanel = function() { nmsInfoPanel.call(this,"switchSummary"); this.init = function() { + //TODO Fix this so the chart is automatic updated //this.addHandler("ticker"); this.refresh(); }; |