mirror of
https://github.com/antos-rde/antosdk-apps.git
synced 2024-11-20 04:08:20 +01:00
fix bug in activity monitor
This commit is contained in:
parent
3c974d8fcf
commit
4fd644d71e
@ -1,3 +1,8 @@
|
||||
# Activity monitor
|
||||
|
||||
This simple application show the current running AntOS processes
|
||||
|
||||
## Change logs
|
||||
|
||||
### v0.0.5-a
|
||||
* Fix process type identification bug
|
@ -1,3 +1,8 @@
|
||||
# Activity monitor
|
||||
|
||||
This simple application show the current running AntOS processes
|
||||
|
||||
## Change logs
|
||||
|
||||
### v0.0.5-a
|
||||
* Fix process type identification bug
|
@ -1 +1 @@
|
||||
(function(){var t,i,e;e=this.OS.PM,i=this.OS.application,(t=class extends this.OS.application.BaseApplication{constructor(t){super("ActivityMonitor",t)}main(){var t;return this.scheme.apptitle="Activity Monitor",this.grid=this.find("mygrid"),this.on("btclick",t=>{var i,s,a;if("btkill"===t.id&&(a=this.grid.selectedRow))return s=a.data[0],(i=e.appByPid(s.text))?i.quit(!0):void 0}),t=[{width:50,text:"__(Pid)"},{text:"__(Name)"},{text:"__(Type)",width:80},{width:80,text:"__(Alive (ms))"}],this.gdata={processes:{},alive:[]},this.grid.header=t,this.monitor()}monitor(){var t;return this.gdata.alive=[],t=(new Date).getTime(),$.each(e.processes,(e,s)=>$.each(s,(e,s)=>(this.gdata.processes[s.pid]?(this.gdata.processes[s.pid][3].text=t-s.birth,this.gdata.processes[s.pid][3].domel.update()):(this.gdata.processes[s.pid]=[{text:s.pid},{icon:1===i[s.name].type?i[s.name].meta.icon:s.icon,iconclass:1===i[s.name].type?i[s.name].meta.iconclass:s.iconclass,text:s.name},{text:1===i[s.name].type?"__(Application)":"__(Service)"},{text:t-s.birth}],this.grid.push(this.gdata.processes[s.pid])),this.gdata.alive.push(s.pid)))),$.each(this.gdata.processes,(t,i)=>{if($.inArray(Number(t),this.gdata.alive)<0)return this.grid.delete(this.gdata.processes[t].domel),this.gdata.processes[t]=void 0,delete this.gdata.processes[t]}),this.timer=setTimeout(()=>this.monitor(),500)}cleanup(t){if(this.timer)return clearTimeout(this.timer)}}).singleton=!0,this.OS.register("ActivityMonitor",t)}).call(this);
|
||||
(function(){var t,i,e;e=this.OS.PM,i=this.OS.application,(t=class extends this.OS.application.BaseApplication{constructor(t){super("ActivityMonitor",t)}main(){var t;return this.scheme.apptitle="Activity Monitor",this.grid=this.find("mygrid"),this.on("btclick",t=>{var i,s,a;if("btkill"===t.id&&(a=this.grid.selectedRow))return s=a.data[0],(i=e.appByPid(s.text))?i.quit(!0):void 0}),t=[{width:50,text:"__(Pid)"},{text:"__(Name)"},{text:"__(Type)",width:80},{width:80,text:"__(Alive (ms))"}],this.gdata={processes:{},alive:[]},this.grid.header=t,this.monitor()}monitor(){var t;return this.gdata.alive=[],t=(new Date).getTime(),$.each(e.processes,(e,s)=>$.each(s,(e,s)=>(this.gdata.processes[s.pid]?(this.gdata.processes[s.pid][3].text=t-s.birth,this.gdata.processes[s.pid][3].domel.update()):(this.gdata.processes[s.pid]=[{text:s.pid},{icon:1===i[s.name].type?i[s.name].meta.icon:s.icon,iconclass:1===i[s.name].type?i[s.name].meta.iconclass:s.iconclass,text:s.name},{text:0===i[s.name].type?"__(Application)":"__(Service)"},{text:t-s.birth}],this.grid.push(this.gdata.processes[s.pid])),this.gdata.alive.push(s.pid)))),$.each(this.gdata.processes,(t,i)=>{if($.inArray(Number(t),this.gdata.alive)<0)return this.grid.delete(this.gdata.processes[t].domel),this.gdata.processes[t]=void 0,delete this.gdata.processes[t]}),this.timer=setTimeout(()=>this.monitor(),500)}cleanup(t){if(this.timer)return clearTimeout(this.timer)}}).singleton=!0,this.OS.register("ActivityMonitor",t)}).call(this);
|
@ -6,7 +6,7 @@
|
||||
"author": "Xuan Sang LE",
|
||||
"email": "xsang.le@gmail.com"
|
||||
},
|
||||
"version":"0.0.4-a",
|
||||
"version":"0.0.5-a",
|
||||
"category":"System",
|
||||
"iconclass":"fa fa-heartbeat",
|
||||
"mimes":["none"]
|
||||
|
Binary file not shown.
@ -73,7 +73,7 @@ class ActivityMonitor extends this.OS.application.BaseApplication
|
||||
text: a.name
|
||||
},
|
||||
{
|
||||
text: if _APP[a.name].type == 1 then "__(Application)" else "__(Service)"
|
||||
text: if _APP[a.name].type == 0 then "__(Application)" else "__(Service)"
|
||||
},
|
||||
{
|
||||
text: now - a.birth
|
||||
|
@ -6,7 +6,7 @@
|
||||
"author": "Xuan Sang LE",
|
||||
"email": "xsang.le@gmail.com"
|
||||
},
|
||||
"version":"0.0.4-a",
|
||||
"version":"0.0.5-a",
|
||||
"category":"System",
|
||||
"iconclass":"fa fa-heartbeat",
|
||||
"mimes":["none"]
|
||||
|
@ -14,7 +14,7 @@
|
||||
"description": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/ActivityMonitor/README.md",
|
||||
"category": "System",
|
||||
"author": "Xuan Sang LE",
|
||||
"version": "0.0.4-a",
|
||||
"version": "0.0.5-a",
|
||||
"download": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/ActivityMonitor/build/release/ActivityMonitor.zip"
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user