Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
蜕变的菜鸟
glances
提交
2b8fe51f
G
glances
项目概览
蜕变的菜鸟
/
glances
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
glances
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2b8fe51f
编写于
8月 27, 2015
作者:
N
Nicolas Hennion
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #659 from nclsHart/webui-keyboard-shortcut
[Web UI] Update keyboard shortcuts
上级
8a795593
beedb1b8
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
120 addition
and
87 deletion
+120
-87
glances/outputs/static/html/help.html
glances/outputs/static/html/help.html
+19
-18
glances/outputs/static/html/stats.html
glances/outputs/static/html/stats.html
+8
-6
glances/outputs/static/js/stats_controller.js
glances/outputs/static/js/stats_controller.js
+93
-63
未找到文件。
glances/outputs/static/html/help.html
浏览文件 @
2b8fe51f
...
...
@@ -15,49 +15,50 @@
<div
class=
"col-sm-6 col-lg-3"
>
{{help.show_hide_alert}}
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-sm-6 col-lg-3"
>
{{help.show_mem}}
</div>
<div
class=
"col-sm-6 col-lg-3"
>
{{help.delete_warning_alerts}}
</div>
<div
class=
"col-sm-6 col-lg-3"
>
{{help.sort_mem}}
</div>
<div
class=
"col-sm-6 col-lg-3"
>
{{help.percpu}}
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-sm-6 col-lg-3"
>
{{help.sort_user}}
</div>
<div
class=
"col-sm-6 col-lg-3"
>
{{help.enable_disable_docker}}
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-sm-6 col-lg-3"
>
{{help.sort_proc}}
</div>
<div
class=
"col-sm-6 col-lg-3"
>
{{help.
delete_warning_critical_alerts
}}
</div>
<div
class=
"col-sm-6 col-lg-3"
>
{{help.
view_network_io_combination
}}
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-sm-6 col-lg-3"
>
{{help.sort_io}}
</div>
<div
class=
"col-sm-6 col-lg-3"
>
{{help.
percpu
}}
</div>
<div
class=
"col-sm-6 col-lg-3"
>
{{help.
view_cumulative_network
}}
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-sm-6 col-lg-3"
>
{{help.sort_cpu_times}}
</div>
<div
class=
"col-sm-6 col-lg-3"
>
{{help.show_hide_help}}
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-sm-6 col-lg-3"
>
{{help.show_hide_diskio}}
</div>
<div
class=
"col-sm-6 col-lg-3"
></div>
</div>
<div
class=
"row"
>
<div
class=
"col-sm-6 col-lg-3"
>
{{help.
view_network_io_combination
}}
</div>
<div
class=
"col-sm-6 col-lg-3"
>
{{help.view_cumulative_network}}
</div>
<div
class=
"col-sm-6 col-lg-3"
>
{{help.
show_hide_filesystem
}}
</div>
<div
class=
"col-sm-6 col-lg-3"
></div>
</div>
<div
class=
"row"
>
<div
class=
"col-sm-6 col-lg-3"
>
{{help.show_hide_network}}
</div>
<div
class=
"col-sm-6 col-lg-3"
>
{{help.show_hide_filesytem_freespace}}
</div>
<div
class=
"col-sm-6 col-lg-3"
></div>
</div>
<div
class=
"row"
>
<div
class=
"col-sm-6 col-lg-3"
>
{{help.show_hide_sensors}}
</div>
<div
class=
"col-sm-6 col-lg-3"
>
{{help.generate_graphs}}
</div>
<div
class=
"col-sm-6 col-lg-3"
></div>
</div>
<div
class=
"row"
>
<div
class=
"col-sm-6 col-lg-3"
>
{{help.show_hide_left_sidebar}}
</div>
<div
class=
"col-sm-6 col-lg-3"
>
{{help.reset_history}}
</div>
<div
class=
"col-sm-6 col-lg-3"
></div>
</div>
<div
class=
"row"
>
<div
class=
"col-sm-6 col-lg-3"
>
{{help.enable_disable_process_stats}}
</div>
<div
class=
"col-sm-6 col-lg-3"
>
{{help.quit}}
</div>
<div
class=
"col-sm-6 col-lg-3"
></div>
</div>
<div
class=
"row"
>
<div
class=
"col-sm-6 col-lg-3"
>
{{help.enable_disable_top_extends_stats}}
</div>
<div
class=
"col-sm-6 col-lg-3"
>
{{help.enable_disable_short_processname}}
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-sm-6 col-lg-3"
>
{{help.enable_disable_docker}}
</div>
</div>
<div
class=
"row"
>
</div>
<div
class=
"row"
>
<div
class=
"col-sm-6 col-lg-3"
>
{{help.edit_pattern_filter}}
</div>
<div
class=
"col-sm-6 col-lg-3"
></div>
</div>
glances/outputs/static/html/stats.html
浏览文件 @
2b8fe51f
...
...
@@ -52,9 +52,10 @@
</div>
</div>
<div
class=
"col-sm-9"
>
<section
id=
"containers"
class=
"plugin"
ng-
if=
"statsDocker.containers.length
"
ng-include
src=
"'plugins/docker.html'"
></section>
<section
id=
"containers"
class=
"plugin"
ng-
show=
"statsDocker.containers.length && show.docker_stats
"
ng-include
src=
"'plugins/docker.html'"
></section>
<section
id=
"alerts"
ng-show=
"show.alert"
ng-include
src=
"'plugins/alerts.html'"
></section>
<section
id=
"alert"
class=
"plugin"
ng-show=
"show.alert"
ng-include
src=
"'plugins/alert.html'"
></section>
<div
ng-show=
"show.process_stats"
>
<section
id=
"processcount"
class=
"plugin"
ng-include
src=
"'plugins/processcount.html'"
></section>
<div
class=
"row"
>
<div
class=
"col-lg-9"
>
...
...
@@ -64,4 +65,5 @@
<section
id=
"processlist"
class=
"plugin"
ng-include
src=
"'plugins/processlist.html'"
></section>
</div>
</div>
</div>
</div>
glances/outputs/static/js/stats_controller.js
浏览文件 @
2b8fe51f
...
...
@@ -117,69 +117,99 @@ glancesApp.controller('statsController', function ($scope, $interval, $routePara
});
$scope
.
onKeyDown
=
function
(
$event
)
{
if
(
$event
.
keyCode
==
keycodes
.
a
)
{
// a Sort processes automatically
switch
(
true
)
{
case
$event
.
keyCode
==
keycodes
.
a
:
// a => Sort processes automatically
$scope
.
sorter
.
column
=
"
cpu_percent
"
;
$scope
.
sorter
.
auto
=
true
;
}
else
if
(
$event
.
keyCode
==
keycodes
.
c
)
{
//c Sort processes by CPU%
break
;
case
$event
.
keyCode
==
keycodes
.
c
:
// c => Sort processes by CPU%
$scope
.
sorter
.
column
=
"
cpu_percent
"
;
$scope
.
sorter
.
auto
=
false
;
}
else
if
(
$event
.
keyCode
==
keycodes
.
m
)
{
//m Sort processes by MEM%
break
;
case
$event
.
keyCode
==
keycodes
.
m
:
// m => Sort processes by MEM%
$scope
.
sorter
.
column
=
"
memory_percent
"
;
$scope
.
sorter
.
auto
=
false
;
}
else
if
(
$event
.
keyCode
==
keycodes
.
p
)
{
//p Sort processes by name
break
;
case
!
$event
.
shiftKey
&&
$event
.
keyCode
==
keycodes
.
u
:
// u => Sort processes by user
$scope
.
sorter
.
column
=
"
username
"
;
$scope
.
sorter
.
auto
=
false
;
break
;
case
$event
.
keyCode
==
keycodes
.
p
:
// p => Sort processes by name
$scope
.
sorter
.
column
=
"
name
"
;
$scope
.
sorter
.
auto
=
false
;
}
else
if
(
$event
.
keyCode
==
keycodes
.
i
)
{
//i Sort processes by I/O rate
break
;
case
$event
.
keyCode
==
keycodes
.
i
:
// i => Sort processes by I/O rate
$scope
.
sorter
.
column
=
[
'
io_read
'
,
'
io_write
'
];
$scope
.
sorter
.
auto
=
false
;
}
else
if
(
$event
.
keyCode
==
keycodes
.
t
&&
!
$event
.
shiftKey
)
{
//t Sort processes by CPU times
break
;
case
!
$event
.
shiftKey
&&
$event
.
keyCode
==
keycodes
.
t
:
// t => Sort processes by time
$scope
.
sorter
.
column
=
"
timemillis
"
;
$scope
.
sorter
.
auto
=
false
;
}
else
if
(
$event
.
keyCode
==
keycodes
.
u
&&
!
$event
.
shiftKey
)
{
//t Sort processes by user
$scope
.
sorter
.
column
=
"
username
"
;
$scope
.
sorter
.
auto
=
false
;
}
else
if
(
$event
.
keyCode
==
keycodes
.
d
)
{
//d Show/hide disk I/O stats
$scope
.
show_hide
(
'
diskio
'
)
}
else
if
(
$event
.
keyCode
==
keycodes
.
f
)
{
//f Show/hide filesystem stats
$scope
.
show_hide
(
'
fs
'
)
}
else
if
(
$event
.
keyCode
==
keycodes
.
n
)
{
//n sort_by Show/hide network stats
$scope
.
show_hide
(
'
network
'
)
}
else
if
(
$event
.
keyCode
==
keycodes
.
s
)
{
//s Show/hide sensors stats
$scope
.
show_hide
(
'
sensors
'
)
}
else
if
(
$event
.
keyCode
==
keycodes
.
TWO
&&
$event
.
shiftKey
)
{
//2 Show/hide left sidebar
$scope
.
show_hide
(
'
sidebar
'
)
}
else
if
(
$event
.
keyCode
==
keycodes
.
z
)
{
//z Enable/disable processes stats
$scope
.
show_hide
(
'
process_stats
'
)
}
else
if
(
$event
.
keyCode
==
keycodes
.
e
)
{
//e Enable/disable top extended stats
$scope
.
show_hide
(
'
top_extended_stats
'
)
}
else
if
(
$event
.
keyCode
==
keycodes
.
SLASH
)
{
// SLASH Enable/disable short processes name
$scope
.
show_hide
(
'
short_process_name
'
)
}
else
if
(
$event
.
keyCode
==
keycodes
.
D
&&
$event
.
shiftKey
)
{
//D Enable/disable Docker stats
$scope
.
show_hide
(
'
docker_stats
'
)
}
else
if
(
$event
.
keyCode
==
keycodes
.
b
)
{
//b Bytes or bits for network I/O
$scope
.
show_hide
(
'
network_by_bytes
'
)
}
else
if
(
$event
.
keyCode
==
keycodes
.
l
)
{
//l Show/hide alert logs
$scope
.
show_hide
(
'
alert
'
)
}
else
if
(
$event
.
keyCode
==
keycodes
.
w
)
{
//w Delete warning alerts
$scope
.
show_hide
(
'
warning_alerts
'
)
}
else
if
(
$event
.
keyCode
==
keycodes
.
x
)
{
//x Delete warning and critical alerts
$scope
.
show_hide
(
'
warning_critical_alerts
'
)
}
else
if
(
$event
.
keyCode
==
keycodes
.
ONE
&&
$event
.
shiftKey
)
{
//1 Global CPU or per-CPU stats
$scope
.
show_hide
(
'
per_cpu
'
)
}
else
if
(
$event
.
keyCode
==
keycodes
.
h
)
{
//h Show/hide this help screen
$scope
.
show_hide
(
'
help
'
)
}
else
if
(
$event
.
keyCode
==
keycodes
.
T
&&
$event
.
shiftKey
)
{
//T View network I/O as combination
$scope
.
show_hide
(
'
network_io_combination
'
)
}
else
if
(
$event
.
keyCode
==
keycodes
.
u
&&
$event
.
shiftKey
)
{
//U View cumulative network I/O
$scope
.
show_hide
(
'
network_io_cumulative
'
)
}
else
if
(
$event
.
keyCode
==
keycodes
.
F
&&
$event
.
shiftKey
)
{
//F Show filesystem free space
$scope
.
show_hide
(
'
filesystem_freespace
'
)
}
else
if
(
$event
.
keyCode
==
keycodes
.
g
)
{
//g Generate graphs for current history
// not available
}
else
if
(
$event
.
keyCode
==
keycodes
.
r
)
{
//r Reset history
// not available
}
else
if
(
$event
.
keyCode
==
keycodes
.
q
)
{
//q Quit (Esc and Ctrl-C also work)
// not available
break
;
case
!
$event
.
shiftKey
&&
$event
.
keyCode
==
keycodes
.
d
:
// d => Show/hide disk I/O stats
$scope
.
show_hide
(
'
diskio
'
);
break
;
case
$event
.
keyCode
==
keycodes
.
f
:
// f => Show/hide filesystem stats
$scope
.
show_hide
(
'
fs
'
);
break
;
case
$event
.
keyCode
==
keycodes
.
n
:
// n => Show/hide network stats
$scope
.
show_hide
(
'
network
'
);
break
;
case
$event
.
keyCode
==
keycodes
.
s
:
// s => Show/hide sensors stats
$scope
.
show_hide
(
'
sensors
'
);
break
;
case
$event
.
shiftKey
&&
$event
.
keyCode
==
keycodes
.
TWO
:
// 2 => Show/hide left sidebar
$scope
.
show_hide
(
'
sidebar
'
);
break
;
case
$event
.
keyCode
==
keycodes
.
z
:
// z => Enable/disable processes stats
$scope
.
show_hide
(
'
process_stats
'
);
break
;
case
$event
.
keyCode
==
keycodes
.
SLASH
:
// SLASH => Enable/disable short processes name
$scope
.
show_hide
(
'
short_process_name
'
);
break
;
case
$event
.
shiftKey
&&
$event
.
keyCode
==
keycodes
.
D
:
// D => Enable/disable Docker stats
$scope
.
show_hide
(
'
docker_stats
'
);
break
;
case
$event
.
keyCode
==
keycodes
.
b
:
// b => Bytes or bits for network I/O
$scope
.
show_hide
(
'
network_by_bytes
'
);
break
;
case
$event
.
keyCode
==
keycodes
.
l
:
// l => Show/hide alert logs
$scope
.
show_hide
(
'
alert
'
);
break
;
case
$event
.
shiftKey
&&
$event
.
keyCode
==
keycodes
.
ONE
:
// 1 => Global CPU or per-CPU stats
$scope
.
show_hide
(
'
per_cpu
'
);
break
;
case
$event
.
keyCode
==
keycodes
.
h
:
// h => Show/hide this help screen
$scope
.
show_hide
(
'
help
'
);
break
;
case
$event
.
shiftKey
&&
$event
.
keyCode
==
keycodes
.
T
:
// T => View network I/O as combination
$scope
.
show_hide
(
'
network_io_combination
'
);
break
;
case
$event
.
shiftKey
&&
$event
.
keyCode
==
keycodes
.
u
:
// U => View cumulative network I/O
$scope
.
show_hide
(
'
network_io_cumulative
'
);
break
;
}
};
});
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录