Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
蜕变的菜鸟
glances
提交
72aec2ec
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,体验更适合开发者的 AI 搜索 >>
提交
72aec2ec
编写于
6月 04, 2017
作者:
F
Floran Brutel
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Re-implement docker plugin in the webui
上级
3fa02041
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
125 addition
and
0 deletion
+125
-0
glances/outputs/static/js/components/plugin-docker/component.js
...s/outputs/static/js/components/plugin-docker/component.js
+7
-0
glances/outputs/static/js/components/plugin-docker/controller.js
.../outputs/static/js/components/plugin-docker/controller.js
+40
-0
glances/outputs/static/js/components/plugin-docker/view.html
glances/outputs/static/js/components/plugin-docker/view.html
+28
-0
glances/outputs/static/public/js/main.min.js
glances/outputs/static/public/js/main.min.js
+49
-0
glances/outputs/static/public/js/templates.min.js
glances/outputs/static/public/js/templates.min.js
+1
-0
未找到文件。
glances/outputs/static/js/components/plugin-docker/component.js
0 → 100644
浏览文件 @
72aec2ec
'
use strict
'
;
glancesApp
.
component
(
'
glancesPluginDocker
'
,
{
controller
:
GlancesPluginDockerController
,
controllerAs
:
'
vm
'
,
templateUrl
:
'
components/plugin-docker/view.html
'
});
glances/outputs/static/js/components/plugin-docker/controller.js
0 → 100644
浏览文件 @
72aec2ec
'
use strict
'
;
function
GlancesPluginDockerController
(
$scope
)
{
var
vm
=
this
;
vm
.
containers
=
[];
vm
.
version
=
null
;
$scope
.
$on
(
'
data_refreshed
'
,
function
(
event
,
data
)
{
var
stats
=
data
.
stats
[
'
docker
'
];
this
.
containers
=
[];
if
(
_
.
isEmpty
(
stats
))
{
return
;
}
for
(
var
i
=
0
;
i
<
stats
[
'
containers
'
].
length
;
i
++
)
{
var
containerData
=
stats
[
'
containers
'
][
i
];
var
container
=
{
'
id
'
:
containerData
.
Id
,
'
name
'
:
containerData
.
Names
[
0
].
split
(
'
/
'
).
splice
(
-
1
)[
0
],
'
status
'
:
containerData
.
Status
,
'
cpu
'
:
containerData
.
cpu
.
total
,
'
memory
'
:
containerData
.
memory
.
usage
!=
undefined
?
containerData
.
memory
.
usage
:
'
?
'
,
'
ior
'
:
containerData
.
io
.
ior
!=
undefined
?
containerData
.
io
.
ior
:
'
?
'
,
'
iow
'
:
containerData
.
io
.
iow
!=
undefined
?
containerData
.
io
.
iow
:
'
?
'
,
'
io_time_since_update
'
:
containerData
.
io
.
time_since_update
,
'
rx
'
:
containerData
.
network
.
rx
!=
undefined
?
containerData
.
network
.
rx
:
'
?
'
,
'
tx
'
:
containerData
.
network
.
tx
!=
undefined
?
containerData
.
network
.
tx
:
'
?
'
,
'
net_time_since_update
'
:
containerData
.
network
.
time_since_update
,
'
command
'
:
containerData
.
Command
,
'
image
'
:
containerData
.
Image
};
vm
.
containers
.
push
(
container
);
}
vm
.
version
=
stats
[
'
version
'
][
'
Version
'
];
});
}
glances/outputs/static/js/components/plugin-docker/view.html
0 → 100644
浏览文件 @
72aec2ec
<section
id=
"containers"
class=
"plugin"
ng-show=
"vm.containers.length"
>
<span
class=
"title"
>
CONTAINERS
</span>
{{ vm.containers.length }} (served by Docker {{ vm.version }})
<div
class=
"table"
>
<div
class=
"table-row"
>
<div
class=
"table-cell text-left"
>
Name
</div>
<div
class=
"table-cell"
>
Status
</div>
<div
class=
"table-cell"
>
CPU%
</div>
<div
class=
"table-cell"
>
MEM
</div>
<div
class=
"table-cell"
>
IOR/s
</div>
<div
class=
"table-cell"
>
IOW/s
</div>
<div
class=
"table-cell"
>
RX/s
</div>
<div
class=
"table-cell"
>
TX/s
</div>
<div
class=
"table-cell text-left"
>
Command
</div>
</div>
<div
class=
"table-row"
ng-repeat=
"container in vm.containers"
>
<div
class=
"table-cell text-left"
>
{{ container.name }}
</div>
<div
class=
"table-cell"
ng-class=
"container.status == 'Paused' ? 'careful' : 'ok'"
>
{{ container.status }}
</div>
<div
class=
"table-cell"
>
{{ container.cpu | number:1 }}
</div>
<div
class=
"table-cell"
>
{{ container.memory | bytes }}
</div>
<div
class=
"table-cell"
>
{{ container.ior / container.io_time_since_update | bits }}
</div>
<div
class=
"table-cell"
>
{{ container.iow / container.io_time_since_update | bits }}
</div>
<div
class=
"table-cell"
>
{{ container.rx / container.net_time_since_update | bits }}
</div>
<div
class=
"table-cell"
>
{{ container.tx / container.net_time_since_update | bits }}
</div>
<div
class=
"table-cell text-left"
>
{{ container.command }}
</div>
</div>
</div>
</section>
glances/outputs/static/public/js/main.min.js
浏览文件 @
72aec2ec
此差异由.gitattributes 抑制。
glances/outputs/static/public/js/templates.min.js
浏览文件 @
72aec2ec
此差异由.gitattributes 抑制。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录