Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
VisualDL
提交
61839d6a
V
VisualDL
项目概览
PaddlePaddle
/
VisualDL
大约 1 年 前同步成功
通知
86
Star
4655
Fork
641
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
5
Wiki
分析
仓库
DevOps
项目成员
Pages
V
VisualDL
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
5
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
61839d6a
编写于
6月 06, 2020
作者:
P
Peter Pan
提交者:
GitHub
6月 06, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: graphs page details update (#655)
上级
58c997ec
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
50 addition
and
5 deletion
+50
-5
frontend/packages/core/components/GraphsPage/Graph.tsx
frontend/packages/core/components/GraphsPage/Graph.tsx
+24
-1
frontend/packages/core/public/images/netron.png
frontend/packages/core/public/images/netron.png
+0
-0
frontend/packages/core/public/netron/index.html
frontend/packages/core/public/netron/index.html
+0
-1
frontend/packages/core/public/netron/view-grapher.css
frontend/packages/core/public/netron/view-grapher.css
+26
-3
未找到文件。
frontend/packages/core/components/GraphsPage/Graph.tsx
浏览文件 @
61839d6a
import
{
Documentation
,
Properties
,
SearchItem
,
SearchResult
}
from
'
~/resource/graphs/types
'
;
import
{
Documentation
,
Properties
,
SearchItem
,
SearchResult
}
from
'
~/resource/graphs/types
'
;
import
React
,
{
useCallback
,
useEffect
,
useImperativeHandle
,
useMemo
,
useRef
,
useState
}
from
'
react
'
;
import
React
,
{
useCallback
,
useEffect
,
useImperativeHandle
,
useMemo
,
useRef
,
useState
}
from
'
react
'
;
import
{
backgroundColor
,
borderColor
,
contentHeight
,
primaryColor
,
rem
,
size
}
from
'
~/utils/style
'
;
import
{
backgroundColor
,
borderColor
,
contentHeight
,
p
osition
,
p
rimaryColor
,
rem
,
size
}
from
'
~/utils/style
'
;
import
ChartToolbox
from
'
~/components/ChartToolbox
'
;
import
ChartToolbox
from
'
~/components/ChartToolbox
'
;
import
HashLoader
from
'
react-spinners/HashLoader
'
;
import
HashLoader
from
'
react-spinners/HashLoader
'
;
...
@@ -36,12 +36,27 @@ const Toolbox = styled(ChartToolbox)`
...
@@ -36,12 +36,27 @@ const Toolbox = styled(ChartToolbox)`
`
;
`
;
const
Content
=
styled
.
div
`
const
Content
=
styled
.
div
`
position: relative;
height: calc(100% -
${
toolboxHeight
}
);
height: calc(100% -
${
toolboxHeight
}
);
> iframe {
> iframe {
${
size
(
'
100%
'
,
'
100%
'
)}
${
size
(
'
100%
'
,
'
100%
'
)}
border: none;
border: none;
}
}
> .powered-by {
display: block;
${
position
(
'
absolute
'
,
null
,
null
,
rem
(
20
),
rem
(
30
))}
color: #ddd;
font-size:
${
rem
(
14
)}
;
user-select: none;
img {
height: 1em;
opacity: 0.5;
vertical-align: middle;
}
}
`
;
`
;
const
Loading
=
styled
.
div
`
const
Loading
=
styled
.
div
`
...
@@ -221,6 +236,14 @@ const Graph = React.forwardRef<GraphRef, GraphProps>(
...
@@ -221,6 +236,14 @@ const Graph = React.forwardRef<GraphRef, GraphProps>(
marginWidth
=
{
0
}
marginWidth
=
{
0
}
marginHeight
=
{
0
}
marginHeight
=
{
0
}
></
iframe
>
></
iframe
>
<
a
className
=
"powered-by"
href
=
"https://github.com/lutzroeder/netron"
target
=
"_blank"
rel
=
"noreferrer"
>
Powered by
<
img
src
=
{
`
${
process
.
env
.
PUBLIC_PATH
??
''
}
/images/netron.png`
}
alt
=
"netron"
/>
</
a
>
</
Content
>
</
Content
>
</
RenderContent
>
</
RenderContent
>
</
Wrapper
>
</
Wrapper
>
...
...
frontend/packages/core/public/images/netron.png
0 → 100644
浏览文件 @
61839d6a
26.8 KB
frontend/packages/core/public/netron/index.html
浏览文件 @
61839d6a
...
@@ -6,7 +6,6 @@
...
@@ -6,7 +6,6 @@
name=
"viewport"
name=
"viewport"
content=
"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover"
content=
"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover"
/>
/>
<meta
http-equiv=
"Content-Security-Policy"
content=
"script-src 'self' 'unsafe-inline';"
/>
<title>
Netron
</title>
<title>
Netron
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"view-grapher.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"view-grapher.css"
/>
<style>
<style>
...
...
frontend/packages/core/public/netron/view-grapher.css
浏览文件 @
61839d6a
...
@@ -17,6 +17,15 @@ text {
...
@@ -17,6 +17,15 @@ text {
.node-item
path
{
.node-item
path
{
fill
:
#fff
;
fill
:
#fff
;
fill-opacity
:
1
;
stroke
:
none
;
}
.node
:hover
.node-item
path
{
fill
:
#2932E1
;
fill-opacity
:
1
;
}
.node
:hover
.node-item
text
{
fill
:
#fff
;
}
}
.node-item-function
path
{
.node-item-function
path
{
...
@@ -106,9 +115,6 @@ text {
...
@@ -106,9 +115,6 @@ text {
.node-attribute
:hover
{
.node-attribute
:hover
{
cursor
:
pointer
;
cursor
:
pointer
;
}
}
.node-attribute
:hover
line
{
cursor
:
pointer
;
}
.node-attribute
text
{
.node-attribute
text
{
font-size
:
9px
;
font-size
:
9px
;
font-weight
:
normal
;
font-weight
:
normal
;
...
@@ -159,7 +165,24 @@ text {
...
@@ -159,7 +165,24 @@ text {
.select
.node.border
{
.select
.node.border
{
stroke
:
#1527C2
;
stroke
:
#1527C2
;
stroke-width
:
2px
;
stroke-dasharray
:
6px
3px
;
stroke-dashoffset
:
0
;
animation
:
pulse
4s
infinite
linear
;
}
}
.select.edge-path
{
.select.edge-path
{
stroke
:
#1527C2
;
stroke
:
#1527C2
;
stroke-width
:
2px
;
stroke-dasharray
:
6px
3px
;
stroke-dashoffset
:
0
;
animation
:
pulse
4s
infinite
linear
;
}
@keyframes
pulse
{
from
{
stroke-dashoffset
:
100px
;
}
to
{
stroke-dashoffset
:
0
;
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录