From 7315f7d28308949ab83c6b7dd3053549e58fbc24 Mon Sep 17 00:00:00 2001 From: Sam Detweiler Date: Mon, 1 Jul 2019 12:35:47 -0500 Subject: [PATCH] fix conflict with master repo develop branch --- .../default/updatenotification/node_helper.js | 18 ++++++++---------- .../updatenotification/updatenotification.js | 12 +++++++----- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/modules/default/updatenotification/node_helper.js b/modules/default/updatenotification/node_helper.js index de23d730..1f9d2f4d 100644 --- a/modules/default/updatenotification/node_helper.js +++ b/modules/default/updatenotification/node_helper.js @@ -65,19 +65,17 @@ module.exports = NodeHelper.create({ }, preformFetch() { - var self=this; + var self = this; simpleGits.forEach(function(sg) { sg.git.fetch().status(function(err, data) { data.module = sg.module; if (!err) { - sg.git.log({"-1": null}, - function(err, data2) { - if (!err && data2.latest && "hash" in data2.latest) { - this.bound_data.hash = data2.latest.hash; - self.sendSocketNotification("STATUS", this.bound_data); - } - }.bind({bound_data:data}) - ); + sg.git.log({"-1": null}, function(err, data2) { + if (!err && data2.latest && "hash" in data2.latest) { + data.hash = data2.latest.hash; + self.sendSocketNotification("STATUS", data); + } + }); } }); }); @@ -87,7 +85,7 @@ module.exports = NodeHelper.create({ scheduleNextFetch: function(delay) { if (delay < 60 * 1000) { - delay = 60 * 1000 + delay = 60 * 1000; } var self = this; diff --git a/modules/default/updatenotification/updatenotification.js b/modules/default/updatenotification/updatenotification.js index 07925ead..54952054 100644 --- a/modules/default/updatenotification/updatenotification.js +++ b/modules/default/updatenotification/updatenotification.js @@ -2,16 +2,17 @@ Module.register("updatenotification", { defaults: { updateInterval: 10 * 60 * 1000, // every 10 minutes - refreshInterval: 24 * 60 * 60 * 1000, // one day + refreshInterval: 24 * 60 * 60 * 1000, // one day }, + status: false, suspended: false, - moduleList: {}, + moduleList: {}, start: function () { - var self = this + var self = this; Log.log("Start updatenotification"); - setInterval( () => { self.moduleList = {};self.updateDom(2) } , self.config.refreshInterval) + setInterval( () => { self.moduleList = {};self.updateDom(2) } , self.config.refreshInterval) }, notificationReceived: function (notification, payload, sender) { @@ -24,6 +25,7 @@ Module.register("updatenotification", { socketNotificationReceived: function (notification, payload) { if (notification === "STATUS") { + //this.status = payload; this.updateUI(payload); } }, @@ -62,7 +64,7 @@ Module.register("updatenotification", { // Override dom generator. getDom: function () { - wrapper = document.createElement("div"); + var wrapper = document.createElement("div"); if(this.suspended==false){ // process the hash of module info found for(key of Object.keys(this.moduleList)){