fixing issues with spaceapi compliance
This commit is contained in:
parent
f4630b30b0
commit
5e8249d0e4
|
@ -11,7 +11,11 @@ var routes = require("./routes");
|
||||||
var spaceanswer = {
|
var spaceanswer = {
|
||||||
api: "0.13",
|
api: "0.13",
|
||||||
space: "Chaostreff Dortmund",
|
space: "Chaostreff Dortmund",
|
||||||
logo: "http://www.chaostreff-dortmund.de/logo.jpg",
|
logo: "http://www.chaostreff-dortmund.de/logo/logo_ctdo.svg",
|
||||||
|
"icon":{
|
||||||
|
"open":"http://status.ctdo.de/img/green.png",
|
||||||
|
"closed":"http://status.ctdo.de/img/red.png"
|
||||||
|
},
|
||||||
url: "http://www.chaostreff-dortmund.de/",
|
url: "http://www.chaostreff-dortmund.de/",
|
||||||
location: {
|
location: {
|
||||||
address: "Braunschweiger Str 22, 44145 Dortmund, Germany",
|
address: "Braunschweiger Str 22, 44145 Dortmund, Germany",
|
||||||
|
@ -25,7 +29,7 @@ var spaceanswer = {
|
||||||
twitter: "@ctdo",
|
twitter: "@ctdo",
|
||||||
issue_mail: "server-admin@chaostreff-dortmund.de"
|
issue_mail: "server-admin@chaostreff-dortmund.de"
|
||||||
},
|
},
|
||||||
issue_report_channels: [ "issue_email" ],
|
issue_report_channels: [ "issue_mail" ],
|
||||||
state: {
|
state: {
|
||||||
open: null,
|
open: null,
|
||||||
lastchange: 0
|
lastchange: 0
|
||||||
|
@ -39,18 +43,18 @@ var ippoll = new IpPoll("switch2.raum.ctdo.de", "195.160.169.20-62 195.160.169.7
|
||||||
|
|
||||||
snmpMac.on('done', function (res) {
|
snmpMac.on('done', function (res) {
|
||||||
simpleanswer.names = res;
|
simpleanswer.names = res;
|
||||||
simpleanswer.lastchange = new Date();
|
simpleanswer.lastchange = moment().format("X");
|
||||||
});
|
});
|
||||||
|
|
||||||
ippoll.on('doneCount', function (num) {
|
ippoll.on('doneCount', function (num) {
|
||||||
simpleanswer.count = num;
|
simpleanswer.count = num;
|
||||||
simpleanswer.lastchange = new Date();
|
simpleanswer.lastchange = moment().format("X");
|
||||||
ippoll.pollState();
|
ippoll.pollState();
|
||||||
});
|
});
|
||||||
|
|
||||||
ippoll.on('doneState', function (state) {
|
ippoll.on('doneState', function (state) {
|
||||||
spaceanswer.state.open = state;
|
spaceanswer.state.open = state;
|
||||||
spaceanswer.state.lastchange = new Date();
|
spaceanswer.state.lastchange = moment().format("X");
|
||||||
simpleanswer.state = state;
|
simpleanswer.state = state;
|
||||||
simpleanswer.lastchange = spaceanswer.state.lastchange;
|
simpleanswer.lastchange = spaceanswer.state.lastchange;
|
||||||
io.sockets.emit('sdata', { data: simpleanswer });
|
io.sockets.emit('sdata', { data: simpleanswer });
|
||||||
|
|
Loading…
Reference in New Issue