Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doujutun3207
flink
提交
3dd5c991
F
flink
项目概览
doujutun3207
/
flink
与 Fork 源项目一致
从无法访问的项目Fork
通知
24
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
flink
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3dd5c991
编写于
2月 20, 2017
作者:
P
paul
提交者:
Greg Hogan
5月 10, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[FLINK-5819] [webui] implements numeric option on metrics graphs
This closes #3367
上级
f74bb74f
变更
11
展开全部
显示空白变更内容
内联
并排
Showing
11 changed file
with
85 addition
and
21 deletion
+85
-21
flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node-list.metrics.jade
...shboard/app/partials/jobs/job.plan.node-list.metrics.jade
+1
-1
flink-runtime-web/web-dashboard/app/scripts/common/filters.coffee
...ntime-web/web-dashboard/app/scripts/common/filters.coffee
+34
-0
flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.ctrl.coffee
...b/web-dashboard/app/scripts/modules/jobs/jobs.ctrl.coffee
+4
-0
flink-runtime-web/web-dashboard/app/scripts/modules/jobs/metrics.dir.coffee
...web-dashboard/app/scripts/modules/jobs/metrics.dir.coffee
+18
-6
flink-runtime-web/web-dashboard/app/scripts/modules/jobs/metrics.svc.coffee
...web-dashboard/app/scripts/modules/jobs/metrics.svc.coffee
+12
-3
flink-runtime-web/web-dashboard/app/styles/metric.styl
flink-runtime-web/web-dashboard/app/styles/metric.styl
+5
-0
flink-runtime-web/web-dashboard/web/css/index.css
flink-runtime-web/web-dashboard/web/css/index.css
+1
-1
flink-runtime-web/web-dashboard/web/js/hs/index.js
flink-runtime-web/web-dashboard/web/js/hs/index.js
+2
-2
flink-runtime-web/web-dashboard/web/js/index.js
flink-runtime-web/web-dashboard/web/js/index.js
+2
-2
flink-runtime-web/web-dashboard/web/js/vendor.js
flink-runtime-web/web-dashboard/web/js/vendor.js
+5
-5
flink-runtime-web/web-dashboard/web/partials/jobs/job.plan.node-list.metrics.html
...shboard/web/partials/jobs/job.plan.node-list.metrics.html
+1
-1
未找到文件。
flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node-list.metrics.jade
浏览文件 @
3dd5c991
...
...
@@ -41,7 +41,7 @@ nav.navbar.navbar-default.navbar-secondary-additional.navbar-secondary-additiona
ul.metric-row(ng-if="nodeid && metrics.length > 0" dnd-list="metrics" dnd-drop="dropped(event, index, item, external, type, external)")
li.metric-col(ng-repeat="metric in metrics track by metric.id" dnd-draggable="metric" dnd-dragstart="dragStart()" dnd-dragend="dragEnd()" dnd-canceled="dragEnd()" ng-class="{big: metric.size != 'small'}")
metrics-graph(metric="metric" window="window" get-values="getValues(metric.id)" remove-metric="removeMetric(metric)" set-metric-size="setMetricSize")
metrics-graph(metric="metric" window="window" get-values="getValues(metric.id)" remove-metric="removeMetric(metric)" set-metric-size="setMetricSize"
set-metric-view="setMetricView"
)
.clearfix
flink-runtime-web/web-dashboard/app/scripts/common/filters.coffee
浏览文件 @
3dd5c991
...
...
@@ -98,3 +98,37 @@ angular.module('flinkApp')
.
filter
"increment"
,
->
(
number
)
->
parseInt
(
number
)
+
1
.
filter
"humanizeChartNumeric"
,
[
'humanizeBytesFilter'
,
'humanizeDurationFilter'
,
(
humanizeBytesFilter
,
humanizeDurationFilter
)
->
(
value
,
metric
)
->
return_val
=
''
if
value
!=
null
if
/bytes/i
.
test
(
metric
.
id
)
&&
/persecond/i
.
test
(
metric
.
id
)
return_val
=
humanizeBytesFilter
(
value
)
+
' / s'
else
if
/bytes/i
.
test
(
metric
.
id
)
return_val
=
humanizeBytesFilter
(
value
)
else
if
/persecond/i
.
test
(
metric
.
id
)
return_val
=
value
+
' / s'
else
if
/time/i
.
test
(
metric
.
id
)
||
/latency/i
.
test
(
metric
.
id
)
return_val
=
humanizeDurationFilter
(
value
,
true
)
else
return_val
=
value
return
return_val
]
.
filter
"humanizeChartNumericTitle"
,
[
'humanizeDurationFilter'
,
(
humanizeDurationFilter
)
->
(
value
,
metric
)
->
return_val
=
''
if
value
!=
null
if
/bytes/i
.
test
(
metric
.
id
)
&&
/persecond/i
.
test
(
metric
.
id
)
return_val
=
value
+
' Bytes / s'
else
if
/bytes/i
.
test
(
metric
.
id
)
return_val
=
value
+
' Bytes'
else
if
/persecond/i
.
test
(
metric
.
id
)
return_val
=
value
+
' / s'
else
if
/time/i
.
test
(
metric
.
id
)
||
/latency/i
.
test
(
metric
.
id
)
return_val
=
humanizeDurationFilter
(
value
,
false
)
else
return_val
=
value
return
return_val
]
flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.ctrl.coffee
浏览文件 @
3dd5c991
...
...
@@ -385,6 +385,10 @@ angular.module('flinkApp')
MetricsService
.
setMetricSize
(
$scope
.
jobid
,
$scope
.
nodeid
,
metric
,
size
)
loadMetrics
()
$scope
.
setMetricView
=
(
metric
,
view
)
->
MetricsService
.
setMetricView
(
$scope
.
jobid
,
$scope
.
nodeid
,
metric
,
view
)
loadMetrics
()
$scope
.
getValues
=
(
metric
)
->
MetricsService
.
getValues
(
$scope
.
jobid
,
$scope
.
nodeid
,
metric
)
...
...
flink-runtime-web/web-dashboard/app/scripts/modules/jobs/metrics.dir.coffee
浏览文件 @
3dd5c991
...
...
@@ -33,7 +33,15 @@ angular.module('flinkApp')
</div>
</div>
<div class="panel-body">
<svg />
<svg ng-if="metric.view ==
\'
chart
\'
"/>
<div ng-if="metric.view !=
\'
chart
\'
">
<div class="metric-numeric" title="{{value | humanizeChartNumericTitle:metric}}">{{value | humanizeChartNumeric:metric}}</div>
</div>
</div>
<div class="buttons">
<div class="btn-group">
<button type="button" ng-class="[btnClasses, {active: metric.view ==
\'
chart
\'
}]" ng-click="setView(
\'
chart
\'
)">Chart</button>
<button type="button" ng-class="[btnClasses, {active: metric.view !=
\'
chart
\'
}]" ng-click="setView(
\'
numeric
\'
)">Numeric</button>
</div>
</div>'
replace
:
true
...
...
@@ -42,6 +50,7 @@ angular.module('flinkApp')
window
:
"="
removeMetric
:
"&"
setMetricSize
:
"="
setMetricView
:
"="
getValues
:
"&"
link
:
(
scope
,
element
,
attrs
)
->
...
...
@@ -106,10 +115,13 @@ angular.module('flinkApp')
scope
.
setSize
=
(
size
)
->
scope
.
setMetricSize
(
scope
.
metric
,
size
)
scope
.
showChart
()
scope
.
setView
=
(
view
)
->
scope
.
setMetricView
(
scope
.
metric
,
view
)
scope
.
showChart
()
if
view
==
'chart'
scope
.
showChart
()
if
scope
.
metric
.
view
==
'chart'
scope
.
$on
'metrics:data:update'
,
(
event
,
timestamp
,
data
)
->
# scope.value = parseInt(data[scope.metric.id])
scope
.
value
=
parseFloat
(
data
[
scope
.
metric
.
id
])
scope
.
data
[
0
].
values
.
push
{
...
...
@@ -120,8 +132,8 @@ angular.module('flinkApp')
if
scope
.
data
[
0
].
values
.
length
>
scope
.
window
scope
.
data
[
0
].
values
.
shift
()
scope
.
showChart
()
scope
.
chart
.
clearHighlights
()
scope
.
showChart
()
if
scope
.
metric
.
view
==
'chart'
scope
.
chart
.
clearHighlights
()
if
scope
.
metric
.
view
==
'chart'
scope
.
chart
.
tooltip
.
hidden
(
true
)
element
.
find
(
".metric-title"
).
qtip
({
...
...
flink-runtime-web/web-dashboard/app/scripts/modules/jobs/metrics.svc.coffee
浏览文件 @
3dd5c991
...
...
@@ -110,7 +110,7 @@ angular.module('flinkApp')
@
addMetric
=
(
jobid
,
nodeid
,
metricid
)
->
@
setupLSFor
(
jobid
,
nodeid
)
@
metrics
[
jobid
][
nodeid
].
push
({
id
:
metricid
,
size
:
'small'
})
@
metrics
[
jobid
][
nodeid
].
push
({
id
:
metricid
,
size
:
'small'
,
view
:
'chart'
})
@
saveSetup
()
...
...
@@ -128,7 +128,16 @@ angular.module('flinkApp')
i
=
@
metrics
[
jobid
][
nodeid
].
indexOf
(
metric
.
id
)
i
=
_
.
findIndex
(
@
metrics
[
jobid
][
nodeid
],
{
id
:
metric
.
id
})
if
i
==
-
1
@
metrics
[
jobid
][
nodeid
][
i
]
=
{
id
:
metric
.
id
,
size
:
size
}
if
i
!=
-
1
@
metrics
[
jobid
][
nodeid
][
i
]
=
{
id
:
metric
.
id
,
size
:
size
,
view
:
metric
.
view
}
if
i
!=
-
1
@
saveSetup
()
@
setMetricView
=
(
jobid
,
nodeid
,
metric
,
view
)
=>
if
@
metrics
[
jobid
][
nodeid
]
?
i
=
@
metrics
[
jobid
][
nodeid
].
indexOf
(
metric
.
id
)
i
=
_
.
findIndex
(
@
metrics
[
jobid
][
nodeid
],
{
id
:
metric
.
id
})
if
i
==
-
1
@
metrics
[
jobid
][
nodeid
][
i
]
=
{
id
:
metric
.
id
,
size
:
metric
.
size
,
view
:
view
}
if
i
!=
-
1
@
saveSetup
()
...
...
@@ -148,7 +157,7 @@ angular.module('flinkApp')
@
getMetricsSetup
=
(
jobid
,
nodeid
)
=>
{
names
:
_
.
map
(
@
metrics
[
jobid
][
nodeid
],
(
value
)
=>
if
_
.
isString
(
value
)
then
{
id
:
value
,
size
:
"small"
}
else
value
if
_
.
isString
(
value
)
then
{
id
:
value
,
size
:
"small"
,
view
:
"chart"
}
else
value
)
}
...
...
flink-runtime-web/web-dashboard/app/styles/metric.styl
浏览文件 @
3dd5c991
...
...
@@ -67,6 +67,11 @@ $metric-row-height = 180px + 85px
background-color: transparent
height: $metric-row-height
position: relative
.metric-numeric
text-align: center;
margin-top: 75px;
font-size: 40px;
font-weight: bold;
.panel-heading
padding: 0px 10px
...
...
flink-runtime-web/web-dashboard/web/css/index.css
浏览文件 @
3dd5c991
此差异已折叠。
点击以展开。
flink-runtime-web/web-dashboard/web/js/hs/index.js
浏览文件 @
3dd5c991
此差异已折叠。
点击以展开。
flink-runtime-web/web-dashboard/web/js/index.js
浏览文件 @
3dd5c991
此差异已折叠。
点击以展开。
flink-runtime-web/web-dashboard/web/js/vendor.js
浏览文件 @
3dd5c991
此差异已折叠。
点击以展开。
flink-runtime-web/web-dashboard/web/partials/jobs/job.plan.node-list.metrics.html
浏览文件 @
3dd5c991
...
...
@@ -39,7 +39,7 @@ limitations under the License.
</div>
<ul
ng-if=
"nodeid && metrics.length > 0"
dnd-list=
"metrics"
dnd-drop=
"dropped(event, index, item, external, type, external)"
class=
"metric-row"
>
<li
ng-repeat=
"metric in metrics track by metric.id"
dnd-draggable=
"metric"
dnd-dragstart=
"dragStart()"
dnd-dragend=
"dragEnd()"
dnd-canceled=
"dragEnd()"
ng-class=
"{big: metric.size != 'small'}"
class=
"metric-col"
>
<metrics-graph
metric=
"metric"
window=
"window"
get-values=
"getValues(metric.id)"
remove-metric=
"removeMetric(metric)"
set-metric-size=
"setMetricSize"
></metrics-graph>
<metrics-graph
metric=
"metric"
window=
"window"
get-values=
"getValues(metric.id)"
remove-metric=
"removeMetric(metric)"
set-metric-size=
"setMetricSize"
set-metric-view=
"setMetricView"
></metrics-graph>
</li>
</ul>
<div
class=
"clearfix"
></div>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录