Browse Source

Changes....

master
Rune Olsen 1 year ago
parent
commit
d2818fe11c
2 changed files with 1517 additions and 2 deletions
  1. +2
    -2
      MMM-ping2.js
  2. +1515
    -0
      package-lock.json

+ 2
- 2
MMM-ping2.js View File

@@ -40,14 +40,14 @@ Module.register('MMM-ping2', {
(!isOnline && (this.config.display === 'both' || this.config.display === 'offline'))) {
const div = document.createElement('div');
const span = document.createElement('span');
span.innerHTML = isOnline ? '<span style=\"color:green;font-size:'+this.config.size+';\">ONLINE : </span>' : '<span style=\"color:red;font-size:'+this.config.size+';\">OFFLINE : </span>';
span.innerHTML = isOnline ? '<span style=\"margin-left:10px;color:green;font-size:'+this.config.size+';\">ONLINE : </span>' : '<span style=\"color:red;font-size:'+this.config.size+';\">OFFLINE : </span>';
const host = document.createElement('span');
if(hosts[i].color != undefined) {
var fontColor = hosts[i].color;
} else {
var fontColor = '#ffffff';
}
host.innerHTML = '<span style=\"font-size:'+this.config.size+';color:'+fontColor+';\">'+hosts[i].name+'</span>';
host.innerHTML = '<span style=\"margin-left:15px;font-size:'+this.config.size+';color:'+fontColor+';\">'+hosts[i].name+'</span>';
div.appendChild(span);
div.appendChild(host);
wrapper.appendChild(div);


+ 1515
- 0
package-lock.json
File diff suppressed because it is too large
View File


Loading…
Cancel
Save