Convenience changes to panopticon and timeline
This commit is contained in:
parent
83d586fe62
commit
d61f1db70e
5 changed files with 9 additions and 7 deletions
|
@ -150,6 +150,7 @@ class CentralCommand(object):
|
||||||
for hv_id in self.hugvey_ids:
|
for hv_id in self.hugvey_ids:
|
||||||
status['hugveys'].append(self.getHugveyStatus(hv_id, hv_id in selected_ids))
|
status['hugveys'].append(self.getHugveyStatus(hv_id, hv_id in selected_ids))
|
||||||
|
|
||||||
|
status['hugveys'].sort(key=lambda hv: hv['light_id'] if 'light_id' in hv else hv['id'])
|
||||||
# if selected_id and selected_id in self.hugveys:
|
# if selected_id and selected_id in self.hugveys:
|
||||||
# if self.hugveys[selected_id].recorder:
|
# if self.hugveys[selected_id].recorder:
|
||||||
# status['logbook'] = self.hugveys[selected_id].recorder.currentLog
|
# status['logbook'] = self.hugveys[selected_id].recorder.currentLog
|
||||||
|
|
|
@ -61,7 +61,7 @@ img.icon {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow-y: scroll; }
|
overflow-y: scroll; }
|
||||||
.panopticon #status {
|
.panopticon #status {
|
||||||
width: 90%; }
|
width: 80%; }
|
||||||
#status > div {
|
#status > div {
|
||||||
width: 33.3333333%;
|
width: 33.3333333%;
|
||||||
height: 200px;
|
height: 200px;
|
||||||
|
@ -344,7 +344,7 @@ body.showTimeline #toggleTimeline {
|
||||||
border-radius: 15px; }
|
border-radius: 15px; }
|
||||||
|
|
||||||
#logbook {
|
#logbook {
|
||||||
width: 50%;
|
width: 20%;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
color: #999;
|
color: #999;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
|
@ -124,7 +124,7 @@ checkbox.addEventListener('change', (event) => {
|
||||||
this.eventDataSet.update(d);
|
this.eventDataSet.update(d);
|
||||||
console.log('update', d);
|
console.log('update', d);
|
||||||
} else {
|
} else {
|
||||||
this.eventDataSet.add({id: mId, content: msgContent, title: `${msgContent} (${msgId})`, start: new Date(), group: hv_id, 'className': 'message'});
|
this.eventDataSet.add({id: mId, content: msgContent, title: `${msgContent} (${msgId})`, start: new Date(), end: new Date(Date.now()+5000), group: hv_id, 'className': 'message'});
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'speaking':
|
case 'speaking':
|
||||||
|
@ -136,7 +136,7 @@ checkbox.addEventListener('change', (event) => {
|
||||||
let scId = 'sc-'+id+'-'+hv_id;
|
let scId = 'sc-'+id+'-'+hv_id;
|
||||||
|
|
||||||
if(info.startsWith('start')){
|
if(info.startsWith('start')){
|
||||||
this.eventDataSet.add({content: info, start: new Date(), type: 'point', group: hv_id, 'className': 'speech'});
|
this.eventDataSet.add({content: info, start: new Date(), end: new Date(Date.now() + 1000), type: 'point', group: hv_id, 'className': 'speech'});
|
||||||
}
|
}
|
||||||
if(info.startsWith('content')){
|
if(info.startsWith('content')){
|
||||||
d = this.eventDataSet.get(scId);
|
d = this.eventDataSet.get(scId);
|
||||||
|
@ -148,7 +148,7 @@ checkbox.addEventListener('change', (event) => {
|
||||||
this.eventDataSet.update(d);
|
this.eventDataSet.update(d);
|
||||||
} else {
|
} else {
|
||||||
console.log('add');
|
console.log('add');
|
||||||
this.eventDataSet.add({id: scId, content: content, title: content, start: new Date(), group: hv_id, 'className': 'speech'});
|
this.eventDataSet.add({id: scId, content: content, title: content, start: new Date(), end: new Date(Date.now() + 1000), group: hv_id, 'className': 'speech'});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(info.startsWith('end')){
|
if(info.startsWith('end')){
|
||||||
|
|
|
@ -85,7 +85,7 @@ img.icon{
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
|
|
||||||
.panopticon &{
|
.panopticon &{
|
||||||
width: 90%
|
width: 80%
|
||||||
}
|
}
|
||||||
|
|
||||||
& > div{
|
& > div{
|
||||||
|
@ -553,7 +553,7 @@ img.icon{
|
||||||
}
|
}
|
||||||
|
|
||||||
#logbook{
|
#logbook{
|
||||||
width: 50%;
|
width: 20%;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
color: #999;
|
color: #999;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
<link rel="stylesheet" href="/css/vis.min.css"></link>
|
<link rel="stylesheet" href="/css/vis.min.css"></link>
|
||||||
<script src="/js/reconnecting-websocket.js"></script>
|
<script src="/js/reconnecting-websocket.js"></script>
|
||||||
|
<script src="/js/moment.min.js"></script>
|
||||||
<script src="/js/vis.min.js"></script>
|
<script src="/js/vis.min.js"></script>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
body{
|
body{
|
||||||
|
|
Loading…
Reference in a new issue