added angularJS Framework
This commit is contained in:
parent
2743b5f970
commit
494b509e15
|
@ -11,12 +11,11 @@ var IpPoll = function(switchaddr, hostsaddr) {
|
|||
var redisClient = redis.createClient();
|
||||
|
||||
var regexp = /\(([0-9]+) hosts* up\)/;
|
||||
var nmap = "nmap -n -sP -T5 --host-timeout 10ms ";
|
||||
// var nmap = "nmap -n -sP -T5 --host-timeout 10ms ";
|
||||
var nmap = "nmap -n -sP -T5 ";
|
||||
|
||||
|
||||
redisClient.on("connect", function () {
|
||||
//redisClient.set(redisprefix + "24:77:03:a9:f3:f4","lucas");
|
||||
|
||||
console.log("connected to redis");
|
||||
self.emit('ready');
|
||||
});
|
||||
|
|
|
@ -42,13 +42,13 @@ var snmpMac = new SnmpMac("juni.ctdo.de", "ctdo23");
|
|||
var ippoll = new IpPoll("switch2.raum.ctdo.de", "195.160.169.20-62 195.160.169.70-126");
|
||||
|
||||
snmpMac.on('done', function (res) {
|
||||
console.log(res);
|
||||
// console.log(res);
|
||||
simpleanswer.names = res;
|
||||
simpleanswer.lastchange = parseInt((new Date().getTime()) / 1000);
|
||||
});
|
||||
|
||||
ippoll.on('doneCount', function (num) {
|
||||
console.log("there are " + num + " hosts up");
|
||||
// console.log("there are " + num + " hosts up");
|
||||
simpleanswer.count = num;
|
||||
simpleanswer.lastchange = parseInt((new Date().getTime()) / 1000);
|
||||
|
||||
|
@ -56,7 +56,7 @@ ippoll.on('doneCount', function (num) {
|
|||
});
|
||||
|
||||
ippoll.on('doneState', function (state) {
|
||||
console.log("room state is: " + state);
|
||||
// console.log("room state is: " + state);
|
||||
simpleanswer.state = state;
|
||||
spaceanswer.state.open = state;
|
||||
|
||||
|
@ -81,7 +81,7 @@ function work() {
|
|||
ippoll.pollState();
|
||||
}
|
||||
|
||||
setInterval(work, 10000);
|
||||
setInterval(work, 60000);
|
||||
|
||||
app.set('snmpMac', snmpMac); //TODO: wie kann man das schoener machen? (Modul in die Routes reintun)
|
||||
app.set('views', __dirname + '/views');
|
||||
|
|
Loading…
Reference in New Issue