Timeline stuff
This commit is contained in:
parent
0ddef76357
commit
bb5f518041
3 changed files with 8 additions and 3 deletions
|
@ -74,6 +74,7 @@ copy autossh-hugvey.service to `/etc/systemd/system/`:
|
|||
|
||||
```bash
|
||||
cp autossh-hugvey.service /etc/systemd/system/autossh-hugvey.service
|
||||
sudo systemctl enable autossh-hugvey.service
|
||||
```
|
||||
|
||||
### clients
|
||||
|
|
|
@ -263,7 +263,7 @@ class Panopticon(object):
|
|||
assert isinstance(record, logging.LogRecord)
|
||||
hugvey_id = record.name.split('.')[1]
|
||||
items = record.msg.split(':', 2)
|
||||
msg = {'action': 'log', 'id':hugvey_id, 'type': items[0]}
|
||||
msg = {'action': 'log', 'id':hugvey_id, 'type': items[0], 'lvl':record.levelno, 'lvlname':record.levelname}
|
||||
if len(items) > 1:
|
||||
msg['info'] = items[1]
|
||||
if len(items) > 2:
|
||||
|
|
|
@ -129,7 +129,9 @@ class Timeline{
|
|||
break;
|
||||
case 'story':
|
||||
// 'info': 'start'/'finished'
|
||||
this.eventDataSet.add({content: msg['type'] +': ' + msg['info'] + ': ' + msg['args'], start: new Date(), type: 'point', group: hv_id, 'className': 'story'});
|
||||
this.eventDataSet.add({
|
||||
content: msg['type'] +': ' + msg['info'] + (msg.hasOwnProperty('args')? ': '+msg['args'] : ""),
|
||||
start: new Date(), type: 'point', group: hv_id, 'className': 'story'});
|
||||
break;
|
||||
|
||||
case 'condition':
|
||||
|
@ -137,7 +139,9 @@ class Timeline{
|
|||
// don't draw these :-0
|
||||
break;
|
||||
default:
|
||||
this.eventDataSet.add({content: msg['type'] +': ' + msg['info'] + ': ' + msg['args'], start: new Date(), type: 'point', group: hv_id});
|
||||
this.eventDataSet.add({
|
||||
content: msg['type'] +': ' + msg['info'] + (msg.hasOwnProperty('args')? ': '+msg['args'] : ""),
|
||||
start: new Date(), type: 'point', group: hv_id, 'className': msg['lvlname']});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue