Collectd: multiple changes as requested in #217 (#218)

This commit is contained in:
Michael
2017-08-04 09:40:48 +02:00
committed by Franco Fichtner
parent ce7e4e0613
commit 7f59fb5610
4 changed files with 8 additions and 6 deletions
+1 -2
View File
@@ -1,6 +1,5 @@
PLUGIN_NAME= collectd
PLUGIN_VERSION= 0.2
PLUGIN_REVISION= 2
PLUGIN_VERSION= 0.3
PLUGIN_COMMENT= Collect system and application performance metrics periodically
PLUGIN_DEPENDS= collectd5
PLUGIN_MAINTAINER= m.muenz@gmail.com
@@ -15,7 +15,7 @@
<id>general.fqdnlookup</id>
<label>FQDN lookup</label>
<type>checkbox</type>
<help>This will enable the FQDNLookup option.</help>
<help>If the hostname is determined automatically this setting controls whether or not the daemon should try to figure out the fully qualified domain name (FQDN). This is done by looking up the name by using gethostname.</help>
</field>
<field>
<id>general.interval</id>
@@ -33,7 +33,7 @@
<id>general.p_network_host</id>
<label>Network collector host</label>
<type>text</type>
<help>Set the IP address of the network collector.</help>
<help>Set the IP address or FQDN of the network collector.</help>
</field>
<field>
<id>general.p_network_port</id>
@@ -12,7 +12,7 @@
<mask>/^.{1,64}$/u</mask>
</hostname>
<fqdnlookup type="BooleanField">
<default>0</default>
<default>1</default>
<Required>N</Required>
</fqdnlookup>
<interval type="IntegerField">
@@ -27,6 +27,7 @@
<default></default>
<Required>N</Required>
<mask>/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/</mask>
<mask>/^([0-9a-zA-Z\-\.]){1,1024}$/u</mask>
</p_network_host>
<p_network_port type="IntegerField">
<default></default>
@@ -30,7 +30,7 @@ POSSIBILITY OF SUCH DAMAGE.
{{ partial("layout_partials/base_form",['fields':generalForm,'id':'frm_general_settings'])}}
<hr />
<div class="col-md-12">
<button class="btn btn-primary" id="saveAct" type="button"><b>{{ lang._('Save') }}</b></button>
<button class="btn btn-primary" id="saveAct" type="button"><b>{{ lang._('Save') }}</b><i id="saveAct_progress" class=""></i></button>
</div>
</div>
@@ -48,8 +48,10 @@ POSSIBILITY OF SUCH DAMAGE.
// link save button to API set action
$("#saveAct").click(function(){
saveFormToEndpoint(url="/api/collectd/general/set", formid='frm_general_settings',callback_ok=function(){
$("#saveAct_progress").addClass("fa fa-spinner fa-pulse");
ajaxCall(url="/api/collectd/service/reconfigure", sendData={}, callback=function(data,status) {
ajaxCall(url="/api/collectd/service/status", sendData={}, callback=function(data,status) {
$("#saveAct_progress").removeClass("fa fa-spinner fa-pulse");
updateServiceStatusUI(data['status']);
});
});