diff options
author | BrainDoctor <github.account@chrigel.net> | 2017-07-05 21:11:40 +0200 |
---|---|---|
committer | BrainDoctor <github.account@chrigel.net> | 2017-07-05 21:11:40 +0200 |
commit | db38e93f34442cee2797632c5289f4270ae6fc6a (patch) | |
tree | 532cb00e88f48b83cbaf10b05fb74473fb9a4b9d /node.d | |
parent | 45a8c0707bb7d43c9f7c257216ba9fce34993931 (diff) |
Removing the shorthand method definitions.
Diffstat (limited to 'node.d')
-rw-r--r-- | node.d/fronius.node.js | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/node.d/fronius.node.js b/node.d/fronius.node.js index 5a8d95b7cf..8fcad1219e 100644 --- a/node.d/fronius.node.js +++ b/node.d/fronius.node.js @@ -25,7 +25,7 @@ var fronius = { autonomyId: 'rel_autonomy', consumptionSelfId: 'rel_selfconsumption', - createBasicDimension(id, name) { + createBasicDimension: function (id, name) { return { id: id, // the unique id of the dimension name: name, // the name of the dimension @@ -37,7 +37,7 @@ var fronius = { }, // Gets the site power chart. Will be created if not existing. - getSitePowerChart(service, id) { + getSitePowerChart: function (service, id) { var chart = fronius.charts[id]; if (fronius.isDefined(chart)) return chart; @@ -66,7 +66,7 @@ var fronius = { }, // Gets the site consumption chart. Will be created if not existing. - getSiteConsumptionChart(service, id) { + getSiteConsumptionChart: function (service, id) { var chart = fronius.charts[id]; if (fronius.isDefined(chart)) return chart; @@ -93,7 +93,7 @@ var fronius = { // Gets the site consumption chart. Will be created if not existing. - getSiteAutonomyChart(service, id) { + getSiteAutonomyChart: function (service, id) { var chart = fronius.charts[id]; if (fronius.isDefined(chart)) return chart; var dim = {}; @@ -120,7 +120,7 @@ var fronius = { // Gets the inverter power chart. Will be created if not existing. // Needs the array of inverters in order to create a chart with all inverters as dimensions - getInverterPowerChart(service, chartId, inverters) { + getInverterPowerChart: function (service, chartId, inverters) { var chart = fronius.charts[chartId]; if (fronius.isDefined(chart)) return chart; @@ -159,7 +159,7 @@ var fronius = { // Gets the inverter energy production chart for today. Will be created if not existing. // Needs the array of inverters in order to create a chart with all inverters as dimensions - getInverterEnergyTodayChart(service, chartId, inverters) { + getInverterEnergyTodayChart: function (service, chartId, inverters) { var chart = fronius.charts[chartId]; if (fronius.isDefined(chart)) return chart; @@ -204,7 +204,7 @@ var fronius = { }, - processResponse(service, content) { + processResponse: function (service, content) { if (content === null) return; var json = JSON.parse(content); // validating response @@ -262,7 +262,7 @@ var fronius = { // this function is called only from this module // its purpose is to prepare the request and call // netdata.serviceExecute() - serviceExecute(name, uri, update_every) { + serviceExecute: function (name, uri, update_every) { netdata.debug(this.name + ': ' + name + ': url: ' + uri + ', update_every: ' + update_every); var service = netdata.service({ @@ -276,7 +276,7 @@ var fronius = { }, - configure(config) { + configure: function (config) { if (fronius.isUndefined(config.servers)) return 0; var added = 0; var len = config.servers.length; @@ -294,18 +294,18 @@ var fronius = { // module.update() // this is called repeatedly to collect data, by calling // netdata.serviceExecute() - update(service, callback) { + update: function (service, callback) { service.execute(function (serv, data) { service.module.processResponse(serv, data); callback(); }); }, - isUndefined(value) { + isUndefined: function (value) { return typeof value === 'undefined'; }, - isDefined(value) { + isDefined: function (value) { return typeof value !== 'undefined'; } |