@cryptotaxi247 / netdata-1 / commits / db38e93f3

Removing the shorthand method definitions.

BrainDoctor committed Jul 5, 2017 at 21:11 UTC db38e93f34442cee2797632c5289f4270ae6fc6a
1 file changed +12 -12
node.d/fronius.node.js
+12 -12
@@ -25,7 +25,7 @@ var fronius = {
25 autonomyId: 'rel_autonomy',
26 consumptionSelfId: 'rel_selfconsumption',
27
28 - createBasicDimension(id, name) {
28 + createBasicDimension: function (id, name) {
29 return {
30 id: id, // the unique id of the dimension
31 name: name, // the name of the dimension
@@ -37,7 +37,7 @@ var fronius = {
37 },
38
39 // Gets the site power chart. Will be created if not existing.
40 - getSitePowerChart(service, id) {
40 + getSitePowerChart: function (service, id) {
41
42 var chart = fronius.charts[id];
43 if (fronius.isDefined(chart)) return chart;
@@ -66,7 +66,7 @@ var fronius = {
66 },
67
68 // Gets the site consumption chart. Will be created if not existing.
69 - getSiteConsumptionChart(service, id) {
69 + getSiteConsumptionChart: function (service, id) {
70
71 var chart = fronius.charts[id];
72 if (fronius.isDefined(chart)) return chart;
@@ -93,7 +93,7 @@ var fronius = {
93
94
95 // Gets the site consumption chart. Will be created if not existing.
96 - getSiteAutonomyChart(service, id) {
96 + getSiteAutonomyChart: function (service, id) {
97 var chart = fronius.charts[id];
98 if (fronius.isDefined(chart)) return chart;
99 var dim = {};
@@ -120,7 +120,7 @@ var fronius = {
120
121 // Gets the inverter power chart. Will be created if not existing.
122 // Needs the array of inverters in order to create a chart with all inverters as dimensions
123 - getInverterPowerChart(service, chartId, inverters) {
123 + getInverterPowerChart: function (service, chartId, inverters) {
124
125 var chart = fronius.charts[chartId];
126 if (fronius.isDefined(chart)) return chart;
@@ -159,7 +159,7 @@ var fronius = {
159
160 // Gets the inverter energy production chart for today. Will be created if not existing.
161 // Needs the array of inverters in order to create a chart with all inverters as dimensions
162 - getInverterEnergyTodayChart(service, chartId, inverters) {
162 + getInverterEnergyTodayChart: function (service, chartId, inverters) {
163
164 var chart = fronius.charts[chartId];
165 if (fronius.isDefined(chart)) return chart;
@@ -204,7 +204,7 @@ var fronius = {
204 },
205
206
207 - processResponse(service, content) {
207 + processResponse: function (service, content) {
208 if (content === null) return;
209 var json = JSON.parse(content);
210 // validating response
@@ -262,7 +262,7 @@ var fronius = {
262 // this function is called only from this module
263 // its purpose is to prepare the request and call
264 // netdata.serviceExecute()
265 - serviceExecute(name, uri, update_every) {
265 + serviceExecute: function (name, uri, update_every) {
266 netdata.debug(this.name + ': ' + name + ': url: ' + uri + ', update_every: ' + update_every);
267
268 var service = netdata.service({
@@ -276,7 +276,7 @@ var fronius = {
276 },
277
278
279 - configure(config) {
279 + configure: function (config) {
280 if (fronius.isUndefined(config.servers)) return 0;
281 var added = 0;
282 var len = config.servers.length;
@@ -294,18 +294,18 @@ var fronius = {
294 // module.update()
295 // this is called repeatedly to collect data, by calling
296 // netdata.serviceExecute()
297 - update(service, callback) {
297 + update: function (service, callback) {
298 service.execute(function (serv, data) {
299 service.module.processResponse(serv, data);
300 callback();
301 });
302 },
303
304 - isUndefined(value) {
304 + isUndefined: function (value) {
305 return typeof value === 'undefined';
306 },
307
308 - isDefined(value) {
308 + isDefined: function (value) {
309 return typeof value !== 'undefined';
310 }
311