mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 04:02:12 +00:00
fix conflict with master repo develop branch
This commit is contained in:
parent
4084c57789
commit
7315f7d283
@ -65,19 +65,17 @@ module.exports = NodeHelper.create({
|
|||||||
},
|
},
|
||||||
|
|
||||||
preformFetch() {
|
preformFetch() {
|
||||||
var self=this;
|
var self = this;
|
||||||
simpleGits.forEach(function(sg) {
|
simpleGits.forEach(function(sg) {
|
||||||
sg.git.fetch().status(function(err, data) {
|
sg.git.fetch().status(function(err, data) {
|
||||||
data.module = sg.module;
|
data.module = sg.module;
|
||||||
if (!err) {
|
if (!err) {
|
||||||
sg.git.log({"-1": null},
|
sg.git.log({"-1": null}, function(err, data2) {
|
||||||
function(err, data2) {
|
if (!err && data2.latest && "hash" in data2.latest) {
|
||||||
if (!err && data2.latest && "hash" in data2.latest) {
|
data.hash = data2.latest.hash;
|
||||||
this.bound_data.hash = data2.latest.hash;
|
self.sendSocketNotification("STATUS", data);
|
||||||
self.sendSocketNotification("STATUS", this.bound_data);
|
}
|
||||||
}
|
});
|
||||||
}.bind({bound_data:data})
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -87,7 +85,7 @@ module.exports = NodeHelper.create({
|
|||||||
|
|
||||||
scheduleNextFetch: function(delay) {
|
scheduleNextFetch: function(delay) {
|
||||||
if (delay < 60 * 1000) {
|
if (delay < 60 * 1000) {
|
||||||
delay = 60 * 1000
|
delay = 60 * 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
|
@ -2,16 +2,17 @@ Module.register("updatenotification", {
|
|||||||
|
|
||||||
defaults: {
|
defaults: {
|
||||||
updateInterval: 10 * 60 * 1000, // every 10 minutes
|
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,
|
suspended: false,
|
||||||
moduleList: {},
|
moduleList: {},
|
||||||
|
|
||||||
start: function () {
|
start: function () {
|
||||||
var self = this
|
var self = this;
|
||||||
Log.log("Start updatenotification");
|
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) {
|
notificationReceived: function (notification, payload, sender) {
|
||||||
@ -24,6 +25,7 @@ Module.register("updatenotification", {
|
|||||||
|
|
||||||
socketNotificationReceived: function (notification, payload) {
|
socketNotificationReceived: function (notification, payload) {
|
||||||
if (notification === "STATUS") {
|
if (notification === "STATUS") {
|
||||||
|
//this.status = payload;
|
||||||
this.updateUI(payload);
|
this.updateUI(payload);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -62,7 +64,7 @@ Module.register("updatenotification", {
|
|||||||
|
|
||||||
// Override dom generator.
|
// Override dom generator.
|
||||||
getDom: function () {
|
getDom: function () {
|
||||||
wrapper = document.createElement("div");
|
var wrapper = document.createElement("div");
|
||||||
if(this.suspended==false){
|
if(this.suspended==false){
|
||||||
// process the hash of module info found
|
// process the hash of module info found
|
||||||
for(key of Object.keys(this.moduleList)){
|
for(key of Object.keys(this.moduleList)){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user