Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doujutun3207
flink
提交
b71f858e
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,体验更适合开发者的 AI 搜索 >>
提交
b71f858e
编写于
12月 29, 2020
作者:
P
Piotr Nowojski
提交者:
Piotr Nowojski
1月 06, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[FLINK-14814][webui] Color nodes based on back pressure
上级
6da735c2
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
64 addition
and
3 deletion
+64
-3
flink-runtime-web/web-dashboard/src/app/share/common/dagre/node.component.html
...-dashboard/src/app/share/common/dagre/node.component.html
+2
-1
flink-runtime-web/web-dashboard/src/app/share/common/dagre/node.component.less
...-dashboard/src/app/share/common/dagre/node.component.less
+2
-2
flink-runtime-web/web-dashboard/src/app/share/common/dagre/node.component.ts
...eb-dashboard/src/app/share/common/dagre/node.component.ts
+60
-0
未找到文件。
flink-runtime-web/web-dashboard/src/app/share/common/dagre/node.component.html
浏览文件 @
b71f858e
...
...
@@ -19,7 +19,8 @@
<svg:g
class=
"node node-rect"
>
<svg:foreignObject
class=
"node-labels-container"
[attr.y]=
"height ? -height / 2 : 0"
[attr.width]=
"205"
[attr.height]=
"height"
>
<xhtml:div
class=
"node-label-wrapper"
>
<xhtml:div
class=
"node-label-wrapper"
[style.border-color]=
"borderColor"
[style.background-color]=
"backgroundColor"
>
<h4
class=
"content-wrap"
>
<xhtml:div
class=
"detail"
>
{{operator}}
</xhtml:div>
<xhtml:div
class=
"detail description"
>
{{description}}
</xhtml:div>
...
...
flink-runtime-web/web-dashboard/src/app/share/common/dagre/node.component.less
浏览文件 @
b71f858e
...
...
@@ -32,10 +32,10 @@
border-radius: 0;
padding: 15px;
color: @text-color;
background: lighten(@primary-color, 30%);
text-align: left;
word-break: break-all;
border: 1px solid @primary-color;
border-width: 1px;
border-style: solid;
.content-wrap {
font-size: 12px;
...
...
flink-runtime-web/web-dashboard/src/app/share/common/dagre/node.component.ts
浏览文件 @
b71f858e
...
...
@@ -33,8 +33,16 @@ export class NodeComponent {
lowWatermark
:
number
|
null
|
undefined
;
backPressuredPercentage
:
number
|
undefined
=
NaN
;
busyPercentage
:
number
|
undefined
=
NaN
;
backgroundColor
:
string
|
undefined
;
borderColor
:
string
|
undefined
;
height
=
0
;
id
:
string
;
backgroundBusyColor
=
'
#ee6464
'
;
backgroundDefaultColor
=
'
#5db1ff
'
;
backgroundBackPressuredColor
=
'
#888888
'
;
borderBusyColor
=
'
#ee2222
'
;
borderDefaultColor
=
'
#1890ff
'
;
borderBackPressuredColor
=
'
#000000
'
;
decodeHTML
(
value
:
string
):
string
|
null
{
const
parser
=
new
DOMParser
();
...
...
@@ -69,6 +77,48 @@ export class NodeComponent {
return
value
||
value
===
0
||
value
===
NaN
;
}
toRGBA
=
(
d
:
string
)
=>
{
const
l
=
d
.
length
;
const
rgba
=
[];
const
hex
=
parseInt
(
d
.
slice
(
1
),
16
);
rgba
[
0
]
=
(
hex
>>
16
)
&
255
;
rgba
[
1
]
=
(
hex
>>
8
)
&
255
;
rgba
[
2
]
=
hex
&
255
;
rgba
[
3
]
=
l
===
9
||
l
===
5
?
Math
.
round
((((
hex
>>
24
)
&
255
)
/
255
)
*
10000
)
/
10000
:
-
1
;
return
rgba
;
};
blend
=
(
from
:
string
,
to
:
string
,
p
=
0.5
)
=>
{
from
=
from
.
trim
();
to
=
to
.
trim
();
const
b
=
p
<
0
;
p
=
b
?
p
*
-
1
:
p
;
const
f
=
this
.
toRGBA
(
from
);
const
t
=
this
.
toRGBA
(
to
);
if
(
to
[
0
]
===
'
r
'
)
{
return
'
rgb
'
+
(
to
[
3
]
===
'
a
'
?
'
a(
'
:
'
(
'
)
+
Math
.
round
(((
t
[
0
]
-
f
[
0
])
*
p
)
+
f
[
0
])
+
'
,
'
+
Math
.
round
(((
t
[
1
]
-
f
[
1
])
*
p
)
+
f
[
1
])
+
'
,
'
+
Math
.
round
(((
t
[
2
]
-
f
[
2
])
*
p
)
+
f
[
2
])
+
(
f
[
3
]
<
0
&&
t
[
3
]
<
0
?
''
:
'
,
'
+
(
f
[
3
]
>
-
1
&&
t
[
3
]
>
-
1
?
Math
.
round
((((
t
[
3
]
-
f
[
3
])
*
p
)
+
f
[
3
])
*
10000
)
/
10000
:
t
[
3
]
<
0
?
f
[
3
]
:
t
[
3
]
)
)
+
'
)
'
;
}
return
'
#
'
+
(
0x100000000
+
((
f
[
3
]
>
-
1
&&
t
[
3
]
>
-
1
?
Math
.
round
((((
t
[
3
]
-
f
[
3
])
*
p
)
+
f
[
3
])
*
255
)
:
t
[
3
]
>
-
1
?
Math
.
round
(
t
[
3
]
*
255
)
:
f
[
3
]
>
-
1
?
Math
.
round
(
f
[
3
]
*
255
)
:
255
)
*
0x1000000
)
+
(
Math
.
round
(((
t
[
0
]
-
f
[
0
])
*
p
)
+
f
[
0
])
*
0x10000
)
+
(
Math
.
round
(((
t
[
1
]
-
f
[
1
])
*
p
)
+
f
[
1
])
*
0x100
)
+
Math
.
round
(((
t
[
2
]
-
f
[
2
])
*
p
)
+
f
[
2
])
).
toString
(
16
).
slice
(
f
[
3
]
>
-
1
||
t
[
3
]
>
-
1
?
1
:
3
);
};
constructor
(
protected
cd
:
ChangeDetectorRef
)
{}
/**
...
...
@@ -77,6 +127,16 @@ export class NodeComponent {
*/
update
(
node
:
NodesItemCorrectInterface
):
void
{
this
.
node
=
node
;
this
.
backgroundColor
=
this
.
backgroundDefaultColor
;
this
.
borderColor
=
this
.
borderDefaultColor
;
if
(
node
.
busyPercentage
)
{
this
.
backgroundColor
=
this
.
blend
(
this
.
backgroundColor
,
this
.
backgroundBusyColor
,
node
.
busyPercentage
/
100.0
);
this
.
borderColor
=
this
.
blend
(
this
.
borderColor
,
this
.
borderBusyColor
,
node
.
busyPercentage
/
100.0
);
}
if
(
node
.
backPressuredPercentage
)
{
this
.
backgroundColor
=
this
.
blend
(
this
.
backgroundColor
,
this
.
backgroundBackPressuredColor
,
node
.
backPressuredPercentage
/
100.0
);
this
.
borderColor
=
this
.
blend
(
this
.
borderColor
,
this
.
borderBackPressuredColor
,
node
.
backPressuredPercentage
/
100.0
);
}
this
.
cd
.
markForCheck
();
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录