Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MindSpore
mindinsight
提交
f78d7f6d
M
mindinsight
项目概览
MindSpore
/
mindinsight
通知
7
Star
3
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
mindinsight
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
f78d7f6d
编写于
4月 28, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
4月 28, 2020
浏览文件
操作
浏览文件
下载
差异文件
!89 UI fix histogram and data-map issue
Merge pull request !89 from 潘慧/r0.2
上级
64516265
5b116181
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
59 addition
and
5 deletion
+59
-5
mindinsight/ui/public/index.html
mindinsight/ui/public/index.html
+1
-1
mindinsight/ui/public/static/img/favicon.ico
mindinsight/ui/public/static/img/favicon.ico
+0
-0
mindinsight/ui/public/static/img/favicon.png
mindinsight/ui/public/static/img/favicon.png
+0
-0
mindinsight/ui/src/common/common-property.js
mindinsight/ui/src/common/common-property.js
+10
-0
mindinsight/ui/src/components/multiselectGroup.vue
mindinsight/ui/src/components/multiselectGroup.vue
+6
-0
mindinsight/ui/src/views/train-manage/data-map.vue
mindinsight/ui/src/views/train-manage/data-map.vue
+40
-2
mindinsight/ui/src/views/train-manage/histogram.vue
mindinsight/ui/src/views/train-manage/histogram.vue
+2
-2
未找到文件。
mindinsight/ui/public/index.html
浏览文件 @
f78d7f6d
...
...
@@ -21,7 +21,7 @@ limitations under the License.
<meta
charset=
"utf-8"
/>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
/>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1.0"
/>
<link
rel=
"icon"
href=
"<%= BASE_URL %>/static/img/favicon.
ico
"
/>
<link
rel=
"icon"
href=
"<%= BASE_URL %>/static/img/favicon.
png
"
/>
<title>
MindInsight
</title>
<style>
.errorInfo
{
...
...
mindinsight/ui/public/static/img/favicon.ico
已删除
100644 → 0
浏览文件 @
64516265
13.0 KB
mindinsight/ui/public/static/img/favicon.png
0 → 100644
浏览文件 @
f78d7f6d
6.8 KB
mindinsight/ui/src/common/common-property.js
浏览文件 @
f78d7f6d
...
...
@@ -96,4 +96,14 @@ export default {
'
.edge.highlighted path {stroke: red;}.edge.highlighted polygon {
'
+
'
stroke: red;fill: red;}
'
+
'
.edge.highlighted marker path {fill: red;}</style>
'
,
dataMapDownloadStyle
:
'
<style> #graph0 > polygon { fill: transparent; }
'
+
'
.node, .cluster { cursor: pointer; }
'
+
'
.selected { polygon, ellipse { stroke: red !important; stroke-width: 2px; } }
'
+
'
.CreatDataset > polygon, .Operator > ellipse { stroke: #58a4e0; fill: #d1ebff; }
'
+
'
.cluster > polygon { fill: #c1f5d5; stroke: #56b077; }
'
+
'
.RepeatDataset > polygon { stroke: #fdca5a; fill: #fff2d4; }
'
+
'
.ShuffleDataset > polygon { stroke: #f79666; fill: #fed78e; }
'
+
'
.BatchDataset > polygon { stroke: #fa8e5a; fill: #ffcfb8; }
'
+
'
.edge { path { stroke: rgb(167, 167, 167); }
'
+
'
polygon { fill: rgb(167, 167, 167); stroke: rgb(167, 167, 167); } }</style>
'
,
};
mindinsight/ui/src/components/multiselectGroup.vue
浏览文件 @
f78d7f6d
...
...
@@ -99,6 +99,7 @@ export default {
multiSelectedItemNames
:
{},
// Dictionary for storing the name of the selected tags.
operateSelectAll
:
true
,
// Indicates whether to select all tags.
perSelectItemMarginBottom
:
1
,
// Outer margin of the bottom of each selection box.
searching
:
false
,
};
},
computed
:
{},
...
...
@@ -156,11 +157,13 @@ export default {
* Tag Filter
*/
listFilter
()
{
this
.
searching
=
true
;
if
(
this
.
searchInputTimer
)
{
clearTimeout
(
this
.
searchInputTimer
);
this
.
searchInputTimer
=
null
;
}
this
.
searchInputTimer
=
setTimeout
(()
=>
{
this
.
searching
=
false
;
let
reg
;
try
{
reg
=
new
RegExp
(
this
.
searchInput
);
...
...
@@ -234,6 +237,9 @@ export default {
* @return {Object} Dictionary containing selected tags
*/
updateSelectedDic
()
{
if
(
this
.
searching
)
{
return
this
.
multiSelectedItemNames
;
}
let
reg
;
try
{
reg
=
new
RegExp
(
this
.
searchInput
);
...
...
mindinsight/ui/src/views/train-manage/data-map.vue
浏览文件 @
f78d7f6d
...
...
@@ -49,6 +49,9 @@ limitations under the License.
<div
:title=
"$t('graph.fitScreen')"
class=
"fit-screen"
@
click=
"fit()"
></div>
<div
:title=
"$t('graph.downloadPic')"
class=
"download-button"
@
click=
"downLoadSVG"
></div>
</div>
<!-- Right column -->
<div
id=
"sidebar"
...
...
@@ -141,6 +144,7 @@ limitations under the License.
<
script
>
import
RequestService
from
'
../../services/request-service
'
;
import
CommonProperty
from
'
@/common/common-property.js
'
;
import
{
select
,
selectAll
,
zoom
}
from
'
d3
'
;
import
'
d3-graphviz
'
;
const
d3
=
{
select
,
selectAll
,
zoom
};
...
...
@@ -510,6 +514,27 @@ export default {
const
str
=
`translate(
${
-
box
.
x
}
,
${
-
box
.
y
}
) scale(1)`
;
graphDom
.
setAttribute
(
'
transform
'
,
str
);
},
/**
* Download svg
*/
downLoadSVG
()
{
const
svgXml
=
document
.
querySelector
(
'
#graph #graph0
'
).
innerHTML
;
const
bbox
=
document
.
getElementById
(
'
graph0
'
).
getBBox
();
const
viewBoxSize
=
`
${
bbox
.
x
}
${
bbox
.
y
}
${
bbox
.
width
}
${
bbox
.
height
}
`
;
const
encodeStr
=
`<svg xmlns="http://www.w3.org/2000/svg" `
+
`xmlns:xlink="http://www.w3.org/1999/xlink" `
+
`width="
${
bbox
.
width
}
" height="
${
bbox
.
height
}
" `
+
`viewBox="
${
viewBoxSize
}
">
${
CommonProperty
.
graphDownloadStyle
}
<g>
${
svgXml
}
</g></svg>`
;
// Write the svg stream encoded by base64 to the image object.
const
src
=
`data:image/svg+xml;base64,
${
window
.
btoa
(
unescape
(
encodeURIComponent
(
encodeStr
)))}
`
;
const
a
=
document
.
createElement
(
'
a
'
);
a
.
href
=
src
;
// Export the information in the canvas as image data.
a
.
download
=
'
dataMap
'
;
// Set the download name.
a
.
click
();
// Click to trigger download.
},
/**
* Collapse on the right
*/
...
...
@@ -624,7 +649,7 @@ export default {
cursor
:
pointer
;
width
:
12px
;
height
:
12px
;
z-index
:
999
;
z-index
:
999
;
display
:
inline-block
;
background-image
:
url('../../assets/images/full-screen.png')
;
}
...
...
@@ -634,11 +659,24 @@ export default {
height
:
14px
;
right
:
32px
;
top
:
10px
;
z-index
:
999
;
z-index
:
999
;
cursor
:
pointer
;
display
:
inline-block
;
background-image
:
url('../../assets/images/fit.png')
;
}
.download-button
{
position
:
absolute
;
width
:
16px
;
height
:
14px
;
right
:
54px
;
top
:
10px
;
z-index
:
999
;
cursor
:
pointer
;
display
:
inline-block
;
background-image
:
url('../../assets/images/download.png')
;
background-size
:
14px
14px
;
background-repeat
:
no-repeat
;
}
}
}
.cl-data-map.full-screen
{
...
...
mindinsight/ui/src/views/train-manage/histogram.vue
浏览文件 @
f78d7f6d
...
...
@@ -755,7 +755,7 @@ export default {
}
</td><td style="text-align:center;">
${
hoveredItem
.
step
}
</td><td>
${(
hoveredItem
.
relative_time
/
1000
).
toFixed
(
3
)}${
unit
}
</td><td>
${
this
.
dealrelativeTime
(
new
Date
(
hoveredItem
.
wall_time
).
toString
(),
new
Date
(
hoveredItem
.
wall_time
*
1000
).
toString
(),
)}
</td>`
;
const
dom
=
document
.
querySelector
(
'
#tipTr
'
);
dom
.
innerHTML
=
htmlStr
;
...
...
@@ -1230,7 +1230,7 @@ export default {
if
(
filter
.
length
)
{
if
(
this
.
curAxisName
===
2
)
{
data
=
sampleObject
.
fullScreen
?
this
.
dealrelativeTime
(
new
Date
(
filter
[
0
].
wall_time
).
toString
())
?
this
.
dealrelativeTime
(
new
Date
(
filter
[
0
].
wall_time
*
1000
).
toString
())
:
[];
}
else
if
(
this
.
curAxisName
===
1
)
{
data
=
`
${(
filter
[
0
].
relative_time
/
3600
).
toFixed
(
3
)}
h`
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录