Compare commits
2 Commits
43d4852129
...
e768162041
Author | SHA1 | Date |
---|---|---|
multiSnow | e768162041 | |
multiSnow | 982ca15d80 |
|
@ -29,6 +29,7 @@ function connect(){
|
||||||
|
|
||||||
let wss_scheme=document.getElementById('wss_scheme').checked===true?'wss://':'ws://';
|
let wss_scheme=document.getElementById('wss_scheme').checked===true?'wss://':'ws://';
|
||||||
let url=[wss_scheme,nwshost.value,':',nwsport.value,'/jsonrpc'].join('');
|
let url=[wss_scheme,nwshost.value,':',nwsport.value,'/jsonrpc'].join('');
|
||||||
|
let autorefresh=undefined;
|
||||||
|
|
||||||
ws=new WebSocket(url);
|
ws=new WebSocket(url);
|
||||||
ws.onerror=function(message){
|
ws.onerror=function(message){
|
||||||
|
|
|
@ -87,6 +87,10 @@ function opr_active(gid,dict){
|
||||||
pausecanvas(pause_icon);
|
pausecanvas(pause_icon);
|
||||||
removecanvas(remove_icon);
|
removecanvas(remove_icon);
|
||||||
optioncanvas(option_icon);
|
optioncanvas(option_icon);
|
||||||
|
}else{
|
||||||
|
let rect=node.getBoundingClientRect();
|
||||||
|
if(rect.top>window.innerHeight||rect.top+rect.height<0)
|
||||||
|
return 0;
|
||||||
};
|
};
|
||||||
for(let n of node.getElementsByTagName('div')){
|
for(let n of node.getElementsByTagName('div')){
|
||||||
if(n.id in dictmap){
|
if(n.id in dictmap){
|
||||||
|
@ -140,6 +144,10 @@ function opr_stopped(gid,dict){
|
||||||
|
|
||||||
removecanvas(remove_icon);
|
removecanvas(remove_icon);
|
||||||
optioncanvas(option_icon);
|
optioncanvas(option_icon);
|
||||||
|
}else{
|
||||||
|
let rect=node.getBoundingClientRect();
|
||||||
|
if(rect.top>window.innerHeight||rect.top+rect.height<0)
|
||||||
|
return 0;
|
||||||
};
|
};
|
||||||
for(let n of node.getElementsByTagName('div')){
|
for(let n of node.getElementsByTagName('div')){
|
||||||
if(n.id in dictmap){
|
if(n.id in dictmap){
|
||||||
|
@ -216,6 +224,10 @@ function opr_waiting(gid,dict){
|
||||||
unpausecanvas(unpause_icon);
|
unpausecanvas(unpause_icon);
|
||||||
removecanvas(remove_icon);
|
removecanvas(remove_icon);
|
||||||
optioncanvas(option_icon);
|
optioncanvas(option_icon);
|
||||||
|
}else{
|
||||||
|
let rect=node.getBoundingClientRect();
|
||||||
|
if(rect.top>window.innerHeight||rect.top+rect.height<0)
|
||||||
|
return 0;
|
||||||
};
|
};
|
||||||
for(let n of node.getElementsByTagName('div')){
|
for(let n of node.getElementsByTagName('div')){
|
||||||
if(n.id in dictmap){
|
if(n.id in dictmap){
|
||||||
|
|
|
@ -89,13 +89,13 @@ function start_autorefresh(){
|
||||||
'mainstopped':showstopped,
|
'mainstopped':showstopped,
|
||||||
'mainwaiting':showwaiting
|
'mainwaiting':showwaiting
|
||||||
};
|
};
|
||||||
|
let sidetags=document.getElementById('sidetags');
|
||||||
|
let autorefresh=document.getElementById('autorefresh');
|
||||||
return setInterval(function(){
|
return setInterval(function(){
|
||||||
let showtagname=getattr(document.getElementById('sidetags'),'data-crtshow');
|
|
||||||
getstat();
|
getstat();
|
||||||
if(document.getElementById('autorefresh').checked){
|
if(autorefresh.checked){
|
||||||
if(showtagname in idfunc_dict){
|
let func=idfunc_dict[getattr(sidetags,'data-crtshow')];
|
||||||
idfunc_dict[showtagname]();
|
if(!!func)func();
|
||||||
};
|
|
||||||
};
|
};
|
||||||
},500);
|
},500);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue