Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MindSpore
mindinsight
提交
623155e7
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看板
提交
623155e7
编写于
4月 15, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
4月 15, 2020
浏览文件
操作
浏览文件
下载
差异文件
!25 display user-defined info on model trace ui
Merge pull request !25 from 潘慧/master_ph
上级
1cb99444
461df37b
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
789 addition
and
857 deletion
+789
-857
mindinsight/ui/src/assets/images/logo.png
mindinsight/ui/src/assets/images/logo.png
+0
-0
mindinsight/ui/src/components/checkList.vue
mindinsight/ui/src/components/checkList.vue
+381
-0
mindinsight/ui/src/locales/zh-cn.json
mindinsight/ui/src/locales/zh-cn.json
+7
-1
mindinsight/ui/src/main.js
mindinsight/ui/src/main.js
+11
-30
mindinsight/ui/src/services/fetcher.js
mindinsight/ui/src/services/fetcher.js
+1
-1
mindinsight/ui/src/views/train-manage/graph.vue
mindinsight/ui/src/views/train-manage/graph.vue
+1
-0
mindinsight/ui/src/views/train-manage/image.vue
mindinsight/ui/src/views/train-manage/image.vue
+129
-542
mindinsight/ui/src/views/train-manage/model-traceback.vue
mindinsight/ui/src/views/train-manage/model-traceback.vue
+109
-54
mindinsight/ui/src/views/train-manage/scalar-compare.vue
mindinsight/ui/src/views/train-manage/scalar-compare.vue
+6
-30
mindinsight/ui/src/views/train-manage/scalar.vue
mindinsight/ui/src/views/train-manage/scalar.vue
+137
-192
mindinsight/ui/src/views/train-manage/training-dashboard.vue
mindinsight/ui/src/views/train-manage/training-dashboard.vue
+7
-7
未找到文件。
mindinsight/ui/src/assets/images/logo.png
查看替换文件 @
1cb99444
浏览文件 @
623155e7
4.1 KB
|
W:
|
H:
4.0 KB
|
W:
|
H:
2-up
Swipe
Onion skin
mindinsight/ui/src/components/checkList.vue
0 → 100644
浏览文件 @
623155e7
<!--
Copyright 2020 Huawei Technologies Co., Ltd.All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<
template
>
<div
class=
"cl-checklist-container"
>
<!-- Select tag -->
<div
class=
"select-content"
>
<div
class=
"title mr24"
>
{{
$t
(
"
components.tagSelectTitle
"
)
}}
</div>
<!-- Select all -->
<div
class=
"select-all mr24"
@
click=
"listSelectAll"
>
<span
class=
"multiCheckBox-border multi-check-border"
:class=
"operateSelectAll ? 'checkbox-checked':'checkbox-unchecked'"
></span>
<span
class=
"label-item select-disable"
>
{{
$t
(
"
components.selectAll
"
)
}}
</span>
</div>
<!-- Tag search box -->
<el-input
class=
"search-input-item"
v-model=
"searchInput"
@
input=
"listFilter"
v-if=
"listFullScreen"
:placeholder=
"$t('components.tagFilterPlaceHolder')"
></el-input>
<!-- Tag list -->
<div
class=
"select-item-content"
v-if=
"!listFullScreen"
ref=
"selectItemContent"
>
<div
class=
"select-item"
v-for=
"(item, itemIndex) in checkListArr"
:key=
"itemIndex"
@
click=
"listItemClick(item)"
v-show=
"item.show"
>
<span
class=
"multiCheckBox-border multi-check-border"
:class=
"item.checked ? 'checkbox-checked':'checkbox-unchecked'"
></span>
<span
class=
"label-item"
>
<el-tooltip
effect=
"dark"
popper-class=
"tooltip-show-content"
:content=
"item.label"
placement=
"top"
>
<span
class=
"select-disable"
>
{{
item
.
label
}}
</span>
</el-tooltip>
</span>
</div>
</div>
<!-- Tag expansion/collapse button -->
<div
class=
"select-content-open select-disable"
@
click=
"toggleListFullScreen"
v-if=
"overRowFlag || searchInput"
v-show=
"!listFullScreen"
>
{{
$t
(
"
components.open
"
)
}}
</div>
<div
class=
"select-content-open select-disable"
@
click=
"toggleListFullScreen"
v-if=
"overRowFlag || listFullScreen"
v-show=
"listFullScreen"
>
{{
$t
(
"
components.close
"
)
}}
</div>
</div>
<div
class=
"select-content-all"
v-if=
"listFullScreen"
>
<div
class=
"select-item"
v-for=
"(item, itemIndex) in checkListArr"
:key=
"itemIndex"
@
click=
"listItemClick(item)"
v-show=
"item.show"
>
<span
class=
"multiCheckBox-border multi-check-border"
:class=
"item.checked ? 'checkbox-checked' : 'checkbox-unchecked'"
></span>
<span
class=
"label-item"
>
<el-tooltip
effect=
"dark"
popper-class=
"tooltip-show-content"
:content=
"item.label"
placement=
"top"
>
<span
class=
"select-disable"
>
{{
item
.
label
}}
</span>
</el-tooltip>
</span>
</div>
</div>
</div>
</
template
>
<
script
>
export
default
{
props
:
{
checkListArr
:
Array
,
},
data
()
{
return
{
listFullScreen
:
false
,
// Indicates whether to expand the selection list.
overRowFlag
:
false
,
// Check whether the list contains more than one line.
searchInputTimer
:
null
,
// Timer for filtering.
searchInput
:
''
,
// Regular input value of the search.
valiableSearchInput
:
''
,
// Last valid input for tag retrieval.
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.
};
},
computed
:
{},
watch
:
{},
mounted
()
{
this
.
init
();
},
methods
:
{
/**
* Initialize
*/
init
()
{
this
.
$nextTick
(()
=>
{
this
.
resizeCallback
();
});
window
.
addEventListener
(
'
resize
'
,
this
.
resizeCallback
,
false
);
},
/**
* The callback of window size changes listener
*/
resizeCallback
()
{
// Calculating the display of the Expand Folding Button
const
selectItemContent
=
this
.
$refs
.
selectItemContent
;
if
(
selectItemContent
)
{
this
.
overRowFlag
=
selectItemContent
.
clientHeight
<
selectItemContent
.
scrollHeight
-
this
.
perSelectItemMarginBottom
;
}
},
/**
* Click select all
*/
listSelectAll
()
{
this
.
operateSelectAll
=
!
this
.
operateSelectAll
;
this
.
multiSelectedItemNames
=
{};
// Setting the status of list items
if
(
this
.
operateSelectAll
)
{
this
.
checkListArr
.
forEach
((
listItem
)
=>
{
if
(
listItem
.
show
)
{
listItem
.
checked
=
true
;
this
.
multiSelectedItemNames
[
listItem
.
label
]
=
true
;
}
});
}
else
{
this
.
checkListArr
.
forEach
((
listItem
)
=>
{
if
(
listItem
.
show
)
{
listItem
.
checked
=
false
;
}
});
}
// Returns a dictionary containing selected items.
this
.
$emit
(
'
selectedChange
'
,
this
.
multiSelectedItemNames
);
},
/**
* Tag Filter
*/
listFilter
()
{
if
(
this
.
searchInputTimer
)
{
clearTimeout
(
this
.
searchInputTimer
);
this
.
searchInputTimer
=
null
;
}
this
.
searchInputTimer
=
setTimeout
(()
=>
{
let
reg
;
try
{
reg
=
new
RegExp
(
this
.
searchInput
);
}
catch
(
e
)
{
this
.
$message
.
warning
(
this
.
$t
(
'
public.regIllegal
'
));
return
;
}
this
.
valiableSearchInput
=
this
.
searchInput
;
this
.
multiSelectedItemNames
=
{};
let
itemSelectAll
=
true
;
// Filter the tags that do not meet the conditions in the operation bar and hide them
this
.
checkListArr
.
forEach
((
listItem
)
=>
{
if
(
reg
.
test
(
listItem
.
label
))
{
listItem
.
show
=
true
;
if
(
listItem
.
checked
)
{
this
.
multiSelectedItemNames
[
listItem
.
label
]
=
true
;
}
else
{
itemSelectAll
=
false
;
}
}
else
{
listItem
.
show
=
false
;
}
});
// Update the selected status of the Select All button
this
.
operateSelectAll
=
itemSelectAll
;
this
.
$emit
(
'
selectedChange
'
,
this
.
multiSelectedItemNames
);
},
200
);
},
/**
* Item click event
* @param {Object} listItem Current item object
*/
listItemClick
(
listItem
)
{
if
(
!
listItem
)
{
return
;
}
listItem
.
checked
=
!
listItem
.
checked
;
// Refreshes the selected status of the current label option
if
(
listItem
.
checked
)
{
this
.
multiSelectedItemNames
[
listItem
.
label
]
=
true
;
}
else
{
if
(
this
.
multiSelectedItemNames
[
listItem
.
label
])
{
delete
this
.
multiSelectedItemNames
[
listItem
.
label
];
}
}
// Update the selected status of the Select All button
let
itemSelectAll
=
true
;
this
.
checkListArr
.
some
((
curListItem
)
=>
{
if
(
curListItem
.
show
&&
!
curListItem
.
checked
)
{
itemSelectAll
=
false
;
return
true
;
}
});
this
.
operateSelectAll
=
itemSelectAll
;
// Return a dictionary containing selected items.
this
.
$emit
(
'
selectedChange
'
,
this
.
multiSelectedItemNames
);
},
/**
* Expand or collapse the list of items.
*/
toggleListFullScreen
()
{
this
.
listFullScreen
=
!
this
.
listFullScreen
;
if
(
!
this
.
listFullScreen
)
{
this
.
$nextTick
(()
=>
{
this
.
resizeCallback
();
});
}
},
/**
* Updates the dictionary of selected tags.
* @return {Object} Dictionary containing selected tags
*/
updateSelectedDic
()
{
let
reg
;
try
{
reg
=
new
RegExp
(
this
.
searchInput
);
}
catch
(
e
)
{
reg
=
new
RegExp
(
this
.
valiableSearchInput
);
}
this
.
multiSelectedItemNames
=
{};
let
itemSelectAll
=
true
;
this
.
checkListArr
.
forEach
((
listItem
)
=>
{
if
(
reg
.
test
(
listItem
.
label
))
{
listItem
.
show
=
true
;
if
(
listItem
.
checked
)
{
this
.
multiSelectedItemNames
[
listItem
.
label
]
=
true
;
}
else
{
itemSelectAll
=
false
;
}
}
else
{
listItem
.
show
=
false
;
}
});
this
.
operateSelectAll
=
itemSelectAll
;
this
.
resizeCallback
();
return
this
.
multiSelectedItemNames
;
},
},
destroyed
()
{
// Remove the listener of window size change
window
.
removeEventListener
(
'
resize
'
,
this
.
resizeCallback
);
// Remove filter timer
if
(
this
.
searchInputTimer
)
{
clearTimeout
(
this
.
searchInputTimer
);
this
.
searchInputTimer
=
null
;
}
},
};
</
script
>
<
style
lang=
"scss"
>
.cl-checklist-container
{
width
:
100%
;
height
:
100%
;
.select-content
{
display
:
flex
;
align-items
:
center
;
.title
{
font-size
:
14px
;
vertical-align
:
middle
;
flex-shrink
:
0
;
}
.select-all
{
cursor
:
pointer
;
flex-shrink
:
0
;
}
.select-item-content
{
display
:
flex
;
height
:
16px
;
flex-wrap
:
wrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
.select-content-open
{
flex
:
1
;
text-align
:
right
;
font-size
:
14px
;
color
:
#00a5a7
;
cursor
:
pointer
;
min-width
:
60px
;
}
}
.select-content-all
{
max-height
:
150px
;
padding-left
:
72px
;
overflow-x
:
hidden
;
display
:
flex
;
flex-wrap
:
wrap
;
.label-item
{
line-height
:
14px
;
}
.select-item
{
height
:
25px
;
margin-top
:
25px
;
}
}
.select-item
{
margin-right
:
20px
;
flex-shrink
:
0
;
margin-bottom
:
1px
;
cursor
:
pointer
;
.label-item
{
width
:
100px
;
display
:
block
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-align
:
left
;
}
}
.multiCheckBox-border
{
width
:
16px
;
height
:
16px
;
display
:
block
;
margin-right
:
20px
;
cursor
:
pointer
;
float
:
left
;
}
.checkbox-checked
{
background-image
:
url('../assets/images/mult-select.png')
;
}
.checkbox-unchecked
{
background-image
:
url('../assets/images/mult-unselect.png')
;
}
.label-item
{
font-size
:
14px
;
line-height
:
14px
;
vertical-align
:
middle
;
.el-tooltip
{
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-align
:
left
;
height
:
16px
;
}
span
{
font-size
:
14px
;
line-height
:
14px
;
display
:
block
;
}
}
.mr24
{
margin-right
:
24px
;
}
.select-disable
{
-moz-user-select
:
none
;
/*Firefox*/
-webkit-user-select
:
none
;
/*webkitbrowser*/
-ms-user-select
:
none
;
/*IE10*/
-khtml-user-select
:
none
;
/*Early browser*/
user-select
:
none
;
}
.search-input-item
{
width
:
261px
;
}
}
.tooltip-show-content
{
max-width
:
50%
;
}
</
style
>
mindinsight/ui/src/locales/zh-cn.json
浏览文件 @
623155e7
...
@@ -124,6 +124,13 @@
...
@@ -124,6 +124,13 @@
"tooManyNodes"
:
"节点太多,打开失败"
,
"tooManyNodes"
:
"节点太多,打开失败"
,
"inputNodeName"
:
"请输入节点名称"
"inputNodeName"
:
"请输入节点名称"
},
},
"components"
:
{
"tagSelectTitle"
:
"标签选择"
,
"selectAll"
:
"全选"
,
"tagFilterPlaceHolder"
:
"请输入需要的标签(支持正则表达式)"
,
"open"
:
"展开"
,
"close"
:
"折叠"
},
"error"
:
{
"error"
:
{
"50540000"
:
"系统错误"
,
"50540000"
:
"系统错误"
,
"50540001"
:
"参数类型错误,请检查请求参数类型是否都符合要求"
,
"50540001"
:
"参数类型错误,请检查请求参数类型是否都符合要求"
,
...
@@ -133,7 +140,6 @@
...
@@ -133,7 +140,6 @@
"50545001"
:
"API 路由资源不存在"
,
"50545001"
:
"API 路由资源不存在"
,
"50545002"
:
"请求API的HTTP方法错误"
,
"50545002"
:
"请求API的HTTP方法错误"
,
"50545005"
:
"训练作业不存在"
,
"50545005"
:
"训练作业不存在"
,
"50545006"
:
"Summary日志路径无效"
,
"50545007"
:
"Summary数据正在被加载,请等待Summary数据加载结束"
,
"50545007"
:
"Summary数据正在被加载,请等待Summary数据加载结束"
,
"50545009"
:
"查询的节点不在图中"
,
"50545009"
:
"查询的节点不在图中"
,
"5054500A"
:
"训练作业ID进行URL解码失败"
,
"5054500A"
:
"训练作业ID进行URL解码失败"
,
...
...
mindinsight/ui/src/main.js
浏览文件 @
623155e7
...
@@ -42,21 +42,6 @@ router.beforeEach((to, from, next) => {
...
@@ -42,21 +42,6 @@ router.beforeEach((to, from, next) => {
// forbidden showing production tip
// forbidden showing production tip
Vue
.
config
.
productionTip
=
false
;
Vue
.
config
.
productionTip
=
false
;
/**
* Check whether the input string contains special characters
* @param {String} strurl
* @return {Boolen}
*/
function
justSql
(
strurl
)
{
const
reA
=
/select|create|alert|update|delete|truncate/i
;
const
reB
=
/join|union|exec|insert|drop|count|'|"|;|>|</i
;
const
reAll
=
new
RegExp
(
reA
.
source
+
reB
.
source
,
'
i
'
);
if
(
reAll
.
test
(
strurl
))
{
return
true
;
}
else
{
return
false
;
}
}
/**
/**
* Check the browser version
* Check the browser version
...
@@ -83,20 +68,16 @@ function isBrowserSupport() {
...
@@ -83,20 +68,16 @@ function isBrowserSupport() {
}
}
window
.
onload
=
function
(
e
)
{
window
.
onload
=
function
(
e
)
{
if
(
justSql
(
location
.
hash
.
toLowerCase
()))
{
if
(
isBrowserSupport
())
{
location
.
href
=
location
.
origin
;
Vue
.
prototype
.
$warmBrowser
=
true
;
}
else
{
if
(
isBrowserSupport
())
{
Vue
.
prototype
.
$warmBrowser
=
true
;
}
// Instantiation
setTimeout
(()
=>
{
new
Vue
({
router
,
store
,
i18n
,
render
:
(
h
)
=>
h
(
App
),
}).
$mount
(
'
#app
'
);
},
100
);
}
}
// Instantiation
setTimeout
(()
=>
{
new
Vue
({
router
,
store
,
i18n
,
render
:
(
h
)
=>
h
(
App
),
}).
$mount
(
'
#app
'
);
},
100
);
};
};
mindinsight/ui/src/services/fetcher.js
浏览文件 @
623155e7
...
@@ -50,7 +50,7 @@ axios.interceptors.response.use(
...
@@ -50,7 +50,7 @@ axios.interceptors.response.use(
// error returned by backend
// error returned by backend
if
(
error
.
response
&&
error
.
response
.
data
&&
error
.
response
.
data
.
error_code
)
{
if
(
error
.
response
&&
error
.
response
.
data
&&
error
.
response
.
data
.
error_code
)
{
if
(
error
.
response
.
data
.
error_code
.
toString
()
===
'
5054
0
005
'
||
if
(
error
.
response
.
data
.
error_code
.
toString
()
===
'
5054
5
005
'
||
error
.
response
.
data
.
error_code
.
toString
()
===
'
50545006
'
)
{
error
.
response
.
data
.
error_code
.
toString
()
===
'
50545006
'
)
{
if
(
error
.
config
.
headers
.
ignoreError
||
if
(
error
.
config
.
headers
.
ignoreError
||
router
.
currentRoute
.
path
===
'
/train-manage/training-dashboard
'
)
{
router
.
currentRoute
.
path
===
'
/train-manage/training-dashboard
'
)
{
...
...
mindinsight/ui/src/views/train-manage/graph.vue
浏览文件 @
623155e7
...
@@ -850,6 +850,7 @@ export default {
...
@@ -850,6 +850,7 @@ export default {
}
}
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
fileSearchBox
.
suggestions
=
[];
this
.
initOver
=
true
;
this
.
initOver
=
true
;
this
.
loading
.
show
=
false
;
this
.
loading
.
show
=
false
;
});
});
...
...
mindinsight/ui/src/views/train-manage/image.vue
浏览文件 @
623155e7
...
@@ -28,72 +28,9 @@ limitations under the License.
...
@@ -28,72 +28,9 @@ limitations under the License.
</div>
</div>
<!-- Selecting an operation area -->
<!-- Selecting an operation area -->
<div
class=
"cl-img-operate-content"
>
<div
class=
"cl-img-operate-content"
>
<!-- Select tag -->
<checkListComponents
ref=
"checkListComponents"
<div
class=
"tag-select-content"
>
:checkListArr=
"tagOperateList"
<div
class=
"title mr24"
>
{{
$t
(
"
images.tagSelectTitle
"
)
}}
</div>
@
selectedChange=
"tagSelectedChanged"
></checkListComponents>
<!-- Select All -->
<div
class=
"select-all mr24"
@
click=
"tagSelectAll"
>
<span
class=
"multiCheckBox-border multi-check-border"
:class=
"tagOperateSelectAll ? 'checkbox-checked' : 'checkbox-unchecked'"
></span>
<span
class=
"label-item select-disable"
>
{{
$t
(
'
images.selectAll
'
)
}}
</span>
</div>
<!-- Tag search box -->
<el-input
class=
"search-input-item"
v-model=
"tagInput"
@
input=
"filterByTagName"
v-if=
"headTagFullScreen"
:placeholder=
"$t('public.tagFilterPlaceHolder')"
></el-input>
<!-- Tag List -->
<div
class=
"select-item-content"
v-if=
"!headTagFullScreen"
ref=
"tagSelectItemContent"
>
<div
class=
"select-item"
v-for=
"(tagItem, tagIndex) in tagOperateList"
:key=
"tagIndex"
@
click=
"tagItemClick(tagItem)"
v-show=
"tagItem.show"
>
<span
class=
"multiCheckBox-border multi-check-border"
:class=
"tagItem.checked ? 'checkbox-checked' : 'checkbox-unchecked'"
></span>
<span
class=
"label-item"
>
<el-tooltip
effect=
"dark"
popper-class=
"tooltip-show-content"
:content=
"tagItem.label"
placement=
"top"
>
<span
class=
"select-disable"
>
{{
tagItem
.
label
}}
</span>
</el-tooltip>
</span>
</div>
</div>
<!-- Tag expansion/collapse button -->
<div
class=
"run-select-content-open select-disable"
@
click=
"toggleHeadTagFullScreen"
v-if=
"tagOverRowFlag || tagInput"
v-show=
"!headTagFullScreen"
>
{{
$t
(
"
images.open
"
)
}}
</div>
<div
class=
"run-select-content-open select-disable"
@
click=
"toggleHeadTagFullScreen"
v-if=
"tagOverRowFlag || headTagFullScreen"
v-show=
"headTagFullScreen"
>
{{
$t
(
"
images.close
"
)
}}
</div>
</div>
<div
class=
"run-select-content-all"
v-if=
"headTagFullScreen"
>
<div
class=
"select-item"
v-for=
"(tagItem, tagIndex) in tagOperateList"
:key=
"tagIndex"
@
click=
"tagItemClick(tagItem)"
v-show=
"tagItem.show"
>
<span
class=
"multiCheckBox-border multi-check-border"
:class=
"tagItem.checked ? 'checkbox-checked' : 'checkbox-unchecked'"
></span>
<span
class=
"label-item"
>
<el-tooltip
effect=
"dark"
popper-class=
"tooltip-show-content"
:content=
"tagItem.label"
placement=
"top"
>
<span
class=
"select-disable"
>
{{
tagItem
.
label
}}
</span>
</el-tooltip>
</span>
</div>
</div>
</div>
</div>
<!-- Sliding block area -->
<!-- Sliding block area -->
<div
class=
"cl-img-slider-operate-content"
>
<div
class=
"cl-img-slider-operate-content"
>
...
@@ -117,8 +54,7 @@ limitations under the License.
...
@@ -117,8 +54,7 @@ limitations under the License.
:class=
"contrast===50?'button-disable':'' "
>
{{
$t
(
'
public.reset
'
)
}}
</el-button>
:class=
"contrast===50?'button-disable':'' "
>
{{
$t
(
'
public.reset
'
)
}}
</el-button>
</div>
</div>
<!-- Content display area -->
<!-- Content display area -->
<div
class=
"cl-img-show-data-content"
<div
class=
"cl-img-show-data-content"
>
ref=
"miDataShoeContent"
>
<!-- No data is displayed. -->
<!-- No data is displayed. -->
<div
class=
"image-noData"
<div
class=
"image-noData"
v-if=
"initOver && originDataArr.length === 0"
>
v-if=
"initOver && originDataArr.length === 0"
>
...
@@ -151,8 +87,8 @@ limitations under the License.
...
@@ -151,8 +87,8 @@ limitations under the License.
<div
class=
"sample-data-show"
>
<div
class=
"sample-data-show"
>
<div
class=
"tag-title"
<div
class=
"tag-title"
:title=
"sampleItem.tagName"
>
{{
sampleItem
.
tagName
}}
</div>
:title=
"sampleItem.tagName"
>
{{
sampleItem
.
tagName
}}
</div>
<div
class=
"
run
-title"
<div
class=
"
summary
-title"
:title=
"sampleItem.
runName"
>
{{
sampleItem
.
run
Name
}}
</div>
:title=
"sampleItem.
summaryName"
>
{{
sampleItem
.
summary
Name
}}
</div>
<!-- Current step information -->
<!-- Current step information -->
<div
class=
"sample-operate-info select-disable"
>
<div
class=
"sample-operate-info select-disable"
>
<span
class=
"step-info"
<span
class=
"step-info"
...
@@ -175,8 +111,7 @@ limitations under the License.
...
@@ -175,8 +111,7 @@ limitations under the License.
<!-- Page number area -->
<!-- Page number area -->
<div
class=
"pagination-content"
<div
class=
"pagination-content"
v-if=
"originDataArr.length"
>
v-if=
"originDataArr.length"
>
<el-pagination
@
size-change=
"pageSizeChange"
<el-pagination
@
current-change=
"currentPageChange"
@
current-change=
"currentPageChange"
:current-page=
"pageIndex + 1"
:current-page=
"pageIndex + 1"
:page-sizes=
"pageSizes"
:page-sizes=
"pageSizes"
:page-size=
"pageNum"
:page-size=
"pageNum"
...
@@ -189,6 +124,7 @@ limitations under the License.
...
@@ -189,6 +124,7 @@ limitations under the License.
</
template
>
</
template
>
<
script
>
<
script
>
import
checkListComponents
from
'
../../components/checkList.vue
'
;
import
RequestService
from
'
../../services/request-service
'
;
import
RequestService
from
'
../../services/request-service
'
;
import
{
basePath
}
from
'
@/services/fetcher
'
;
import
{
basePath
}
from
'
@/services/fetcher
'
;
export
default
{
export
default
{
...
@@ -196,27 +132,18 @@ export default {
...
@@ -196,27 +132,18 @@ export default {
return
{
return
{
initOver
:
false
,
// Indicates whether the initialization is complete.
initOver
:
false
,
// Indicates whether the initialization is complete.
autoUpdateTimer
:
null
,
// Automatic refresh timer
autoUpdateTimer
:
null
,
// Automatic refresh timer
tagInput
:
''
,
// Regular input value of the training tag
valiableTagInput
:
''
,
// Last valid input for tag retrieval.
brightness
:
50
,
// Brightness
brightness
:
50
,
// Brightness
contrast
:
50
,
// Contrast
contrast
:
50
,
// Contrast
trainingJobId
:
this
.
$route
.
query
.
id
,
// ID of the current training job
trainingJobId
:
this
.
$route
.
query
.
id
,
// ID of the current training job
tagInputTimer
:
''
,
// Timer for filtering training tags
multiSelectedRunNames
:
{},
// Dictionary for storing the name of the selected training logs
multiSelectedTagNames
:
{},
// Dictionary for storing the name of the selected tags
multiSelectedTagNames
:
{},
// Dictionary for storing the name of the selected tags
curFilterSamples
:
[],
// List of images that meet the current filter criteria
curFilterSamples
:
[],
// List of images that meet the current filter criteria
headTagFullScreen
:
false
,
// Indicates whether to expand the tag selection list.
tagOperateSelectAll
:
true
,
// Indicates whether to select all tags
runOperateList
:
[],
// Training log list
tagOperateList
:
[],
// Tag list
tagOperateList
:
[],
// Tag list
originDataArr
:
[],
// List of all image data.
originDataArr
:
[],
// List of all image data.
oriDataDictionaries
:
{},
// Dictionary
for storing training logs and tag relationships
oriDataDictionaries
:
{},
// Dictionary
that contains all the current tags.
curPageArr
:
[],
// Image data list on the current page
curPageArr
:
[],
// Image data list on the current page
pageIndex
:
0
,
// Current page number
pageIndex
:
0
,
// Current page number
pageSizes
:
[
8
,
16
,
24
],
// The number of records on each page is optional
pageSizes
:
[
8
,
16
,
24
],
// The number of records on each page is optional
pageNum
:
8
,
// Number of records on each page
pageNum
:
8
,
// Number of records on each page
tagOverRowFlag
:
false
,
// Check whether the tag list contains more than one line
perSelectItemMarginBottom
:
1
,
// Outer margin of the bottom of each selection box
isReloading
:
false
,
// Manually refresh
isReloading
:
false
,
// Manually refresh
imageBasePath
:
'
/v1/mindinsight/datavisual/image/single-image?
'
,
// Relative path header of the picture
imageBasePath
:
'
/v1/mindinsight/datavisual/image/single-image?
'
,
// Relative path header of the picture
};
};
...
@@ -275,29 +202,26 @@ export default {
...
@@ -275,29 +202,26 @@ export default {
}
}
},
},
/**
/**
*
The refresh time is changed
*
The refresh time is changed.
*/
*/
timeReloadValue
()
{
timeReloadValue
()
{
this
.
autoUpdateSamples
();
this
.
autoUpdateSamples
();
},
},
},
},
destroyed
()
{
destroyed
()
{
// Remove the listener of the label input box
if
(
this
.
tagInputTimer
)
{
clearTimeout
(
this
.
tagInputTimer
);
this
.
tagInputTimer
=
null
;
}
// Disable the automatic refresh function
// Disable the automatic refresh function
if
(
this
.
autoUpdateTimer
)
{
if
(
this
.
autoUpdateTimer
)
{
clearInterval
(
this
.
autoUpdateTimer
);
clearInterval
(
this
.
autoUpdateTimer
);
this
.
autoUpdateTimer
=
null
;
this
.
autoUpdateTimer
=
null
;
}
}
// Remove the listener of window size change
// Stop Refreshing
window
.
removeEventListener
(
'
resize
'
,
this
.
resizeCallback
);
if
(
this
.
isReloading
)
{
this
.
$store
.
commit
(
'
setIsReload
'
,
false
);
this
.
isReloading
=
false
;
}
},
},
mounted
()
{
mounted
()
{
this
.
getCharMainContentwidth
();
this
.
getTagList
();
this
.
getTagAndRunList
();
// Automatic refresh
// Automatic refresh
if
(
this
.
isTimeReload
)
{
if
(
this
.
isTimeReload
)
{
this
.
autoUpdateSamples
();
this
.
autoUpdateSamples
();
...
@@ -308,7 +232,7 @@ export default {
...
@@ -308,7 +232,7 @@ export default {
/**
/**
* Initialize the training log and tag list
* Initialize the training log and tag list
*/
*/
getTag
AndRun
List
()
{
getTagList
()
{
const
params
=
{
const
params
=
{
plugin_name
:
'
image
'
,
plugin_name
:
'
image
'
,
train_id
:
this
.
trainingJobId
,
train_id
:
this
.
trainingJobId
,
...
@@ -319,40 +243,25 @@ export default {
...
@@ -319,40 +243,25 @@ export default {
this
.
initOver
=
true
;
this
.
initOver
=
true
;
return
;
return
;
}
}
const
data
=
res
.
data
.
train_jobs
;
const
data
=
res
.
data
.
train_jobs
[
0
];
const
tempRunList
=
[];
if
(
!
data
.
tags
)
{
return
;
}
const
tempTagList
=
[];
const
tempTagList
=
[];
const
dataList
=
[];
const
dataList
=
[];
data
.
forEach
((
runObj
,
runObjIndex
)
=>
{
data
.
tags
.
forEach
((
tagName
)
=>
{
// Add to Training Log List
if
(
!
this
.
oriDataDictionaries
[
tagName
])
{
tempRunList
.
push
({
this
.
oriDataDictionaries
[
tagName
]
=
true
;
label
:
runObj
.
name
,
tempTagList
.
push
({
checked
:
true
,
label
:
tagName
,
show
:
true
,
checked
:
true
,
});
show
:
true
,
this
.
multiSelectedRunNames
[
runObj
.
name
]
=
true
;
});
runObj
.
tags
.
forEach
((
tagName
)
=>
{
dataList
.
push
({
// Check whether a label with the same name exists
summaryId
:
data
.
id
,
if
(
!
this
.
oriDataDictionaries
[
tagName
])
{
summaryName
:
data
.
name
,
// The new tag information is added to the dictionary
this
.
oriDataDictionaries
[
tagName
]
=
{};
// Add to Tag List
tempTagList
.
push
({
label
:
tagName
,
checked
:
true
,
show
:
true
,
});
this
.
multiSelectedTagNames
[
tagName
]
=
true
;
}
this
.
oriDataDictionaries
[
tagName
][
runObj
.
name
]
=
true
;
// Add to the original data list
const
sampleItem
=
{
runId
:
runObj
.
id
,
runName
:
runObj
.
name
,
tagName
:
tagName
,
tagName
:
tagName
,
sampleData
:
[],
sampleData
:
[],
tagShow
:
true
,
runShow
:
true
,
curPageShow
:
false
,
curPageShow
:
false
,
sliderValue
:
0
,
sliderValue
:
0
,
fullScreen
:
false
,
fullScreen
:
false
,
...
@@ -361,23 +270,19 @@ export default {
...
@@ -361,23 +270,19 @@ export default {
curImgUrl
:
''
,
curImgUrl
:
''
,
curTime
:
''
,
curTime
:
''
,
curImageSize
:
[
0
,
0
],
curImageSize
:
[
0
,
0
],
};
});
dataList
.
push
(
sampleItem
);
}
this
.
curFilterSamples
.
push
(
sampleItem
);
});
});
});
// Initialize the assignment training log list, tag list, and image list
// Initialize the assignment tag list, and image list
this
.
runOperateList
=
tempRunList
;
this
.
tagOperateList
=
tempTagList
;
this
.
tagOperateList
=
tempTagList
;
this
.
originDataArr
=
dataList
;
this
.
originDataArr
=
dataList
;
this
.
initOver
=
true
;
this
.
initOver
=
true
;
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
resizeCallback
();
this
.
multiSelectedTagNames
=
this
.
$refs
.
checkListComponents
.
updateSelectedDic
();
// Obtains data on the current page
this
.
updateTagInPage
();
});
});
// Obtains data on the current page
this
.
getCurPageDataArr
();
},
this
.
requestErrorCallback
)
},
this
.
requestErrorCallback
)
.
catch
((
e
)
=>
{
.
catch
((
e
)
=>
{
this
.
$message
.
error
(
this
.
$t
(
'
public.dataError
'
));
this
.
$message
.
error
(
this
.
$t
(
'
public.dataError
'
));
...
@@ -385,7 +290,7 @@ export default {
...
@@ -385,7 +290,7 @@ export default {
},
},
/**
/**
* Obtains data on the current page
* Obtains data on the current page
* @param {Bool
w
n} noPageDataNumChange No new data is added or deleted
* @param {Bool
ea
n} noPageDataNumChange No new data is added or deleted
*/
*/
getCurPageDataArr
(
noPageDataNumChange
)
{
getCurPageDataArr
(
noPageDataNumChange
)
{
// Clear the previous page
// Clear the previous page
...
@@ -415,54 +320,52 @@ export default {
...
@@ -415,54 +320,52 @@ export default {
updateCurPageSamples
()
{
updateCurPageSamples
()
{
this
.
curPageArr
.
forEach
((
sampleItem
)
=>
{
this
.
curPageArr
.
forEach
((
sampleItem
)
=>
{
const
params
=
{
const
params
=
{
train_id
:
sampleItem
.
run
Id
,
train_id
:
sampleItem
.
summary
Id
,
tag
:
sampleItem
.
tagName
,
tag
:
sampleItem
.
tagName
,
};
};
RequestService
.
getImageMetadatas
(
params
)
RequestService
.
getImageMetadatas
(
params
)
.
then
((
res
)
=>
{
.
then
(
if
(
!
res
||
!
res
.
data
||
!
res
.
data
.
metadatas
)
{
(
res
)
=>
{
return
;
if
(
!
res
||
!
res
.
data
||
!
res
.
data
.
metadatas
)
{
}
return
;
// Processes image data
}
const
tempData
=
res
.
data
.
metadatas
;
// Processes image data
sampleItem
.
sampleData
=
tempData
;
const
tempData
=
res
.
data
.
metadatas
;
const
oldTotalStepNum
=
sampleItem
.
totalStepNum
;
sampleItem
.
sampleData
=
tempData
;
sampleItem
.
totalStepNum
=
tempData
.
length
-
1
;
const
oldTotalStepNum
=
sampleItem
.
totalStepNum
;
if
(
sampleItem
.
sliderValue
===
oldTotalStepNum
)
{
sampleItem
.
totalStepNum
=
tempData
.
length
-
1
;
sampleItem
.
sliderValue
=
sampleItem
.
totalStepNum
;
if
(
sampleItem
.
sliderValue
===
oldTotalStepNum
)
{
}
sampleItem
.
sliderValue
=
sampleItem
.
totalStepNum
;
const
curSampleData
=
sampleItem
.
sampleData
[
sampleItem
.
sliderValue
];
}
// Initialize the current step information
const
curSampleData
=
if
(
curSampleData
)
{
sampleItem
.
sampleData
[
sampleItem
.
sliderValue
];
sampleItem
.
curStep
=
curSampleData
.
step
;
// Initialize the current step information
sampleItem
.
curImgUrl
=
if
(
curSampleData
)
{
`
${
basePath
}${
this
.
imageBasePath
}
train_id=
${
sampleItem
.
runId
}
`
+
sampleItem
.
curStep
=
curSampleData
.
step
;
`&tag=
${
sampleItem
.
tagName
}
&step=
${
curSampleData
.
step
}
&wt=
${
curSampleData
.
wall_time
}
`
;
sampleItem
.
curImgUrl
=
sampleItem
.
curTime
=
new
Date
(
`
${
basePath
}${
this
.
imageBasePath
}
train_id=
${
sampleItem
.
summaryId
}
`
+
curSampleData
.
wall_time
*
1000
,
`&tag=
${
sampleItem
.
tagName
}
&step=
${
curSampleData
.
step
}
&wt=
${
curSampleData
.
wall_time
}
`
;
).
toLocaleString
();
sampleItem
.
curTime
=
new
Date
(
sampleItem
.
curImageSize
=
[
curSampleData
.
wall_time
*
1000
,
curSampleData
.
width
,
).
toLocaleString
();
curSampleData
.
height
,
sampleItem
.
curImageSize
=
[
];
curSampleData
.
width
,
}
curSampleData
.
height
,
this
.
$forceUpdate
();
];
},
(
e
)
=>
{
}
sampleItem
.
totalStepNum
=
0
;
this
.
$forceUpdate
();
sampleItem
.
sliderValue
=
0
;
},
sampleItem
.
curStep
=
''
;
(
e
)
=>
{
sampleItem
.
curImgUrl
=
''
;
sampleItem
.
totalStepNum
=
0
;
sampleItem
.
curTime
=
''
;
sampleItem
.
sliderValue
=
0
;
}).
catch
((
e
)
=>
{});
sampleItem
.
curStep
=
''
;
sampleItem
.
curImgUrl
=
''
;
sampleItem
.
curTime
=
''
;
},
)
.
catch
((
e
)
=>
{});
});
});
},
},
/**
* Listens to and obtains the width of the table container in the content area
*/
getCharMainContentwidth
()
{
// Add the resize listener.
window
.
addEventListener
(
'
resize
'
,
this
.
resizeCallback
,
false
);
},
/**
/**
* Image step value change event
* Image step value change event
* @param {Number} sliderValue Current slider value
* @param {Number} sliderValue Current slider value
...
@@ -480,36 +383,13 @@ export default {
...
@@ -480,36 +383,13 @@ export default {
const
curStepData
=
sampleItem
.
sampleData
[
sliderValue
];
const
curStepData
=
sampleItem
.
sampleData
[
sliderValue
];
sampleItem
.
curStep
=
curStepData
.
step
;
sampleItem
.
curStep
=
curStepData
.
step
;
sampleItem
.
curImgUrl
=
sampleItem
.
curImgUrl
=
`
${
basePath
}${
this
.
imageBasePath
}
train_id=
${
sampleItem
.
run
Id
}
`
+
`
${
basePath
}${
this
.
imageBasePath
}
train_id=
${
sampleItem
.
summary
Id
}
`
+
`&tag=
${
sampleItem
.
tagName
}
&step=
${
curStepData
.
step
}
&wt=
${
curStepData
.
wall_time
}
`
;
`&tag=
${
sampleItem
.
tagName
}
&step=
${
curStepData
.
step
}
&wt=
${
curStepData
.
wall_time
}
`
;
sampleItem
.
curTime
=
new
Date
(
sampleItem
.
curTime
=
new
Date
(
curStepData
.
wall_time
*
1000
,
curStepData
.
wall_time
*
1000
,
).
toLocaleString
();
).
toLocaleString
();
sampleItem
.
curImageSize
=
[
curStepData
.
width
,
curStepData
.
height
];
sampleItem
.
curImageSize
=
[
curStepData
.
width
,
curStepData
.
height
];
},
},
/**
* The callback of window size changes listener
*/
resizeCallback
()
{
// Calculating the Display of the Expand Folding Button
const
tagSelectItemContent
=
this
.
$refs
.
tagSelectItemContent
;
if
(
tagSelectItemContent
)
{
this
.
tagOverRowFlag
=
tagSelectItemContent
.
clientHeight
<
tagSelectItemContent
.
scrollHeight
-
this
.
perSelectItemMarginBottom
;
}
},
/**
* Expand or collapse the list of tag items
*/
toggleHeadTagFullScreen
()
{
this
.
headTagFullScreen
=
!
this
.
headTagFullScreen
;
if
(
!
this
.
headTagFullScreen
)
{
this
.
$nextTick
(()
=>
{
this
.
resizeCallback
();
});
}
},
/**
/**
* Image click event
* Image click event
* @param {Object} event Native event event
* @param {Object} event Native event event
...
@@ -534,143 +414,45 @@ export default {
...
@@ -534,143 +414,45 @@ export default {
this
.
getCurPageDataArr
();
this
.
getCurPageDataArr
();
},
},
/**
/**
* The number of pages displayed on each page is changed
* The selected label is changed
* @param {Number} value Number of pages after modification
* @param {Object} selectedItemDict Dictionary containing the selected tags
*/
pageSizeChange
(
value
)
{
this
.
pageNum
=
value
;
this
.
pageIndex
=
0
;
this
.
getCurPageDataArr
();
},
/**
* Click event of the tag selection button
*/
*/
tagSelectAll
()
{
tagSelectedChanged
(
selectedItemDict
)
{
this
.
tagOperateSelectAll
=
!
this
.
tagOperateSelectAll
;
if
(
!
selectedItemDict
)
{
this
.
multiSelectedTagNames
=
{};
// Setting the status of tag items
if
(
this
.
tagOperateSelectAll
)
{
this
.
tagOperateList
.
forEach
((
tagItem
)
=>
{
if
(
tagItem
.
show
)
{
tagItem
.
checked
=
true
;
this
.
multiSelectedTagNames
[
tagItem
.
label
]
=
true
;
}
});
}
else
{
this
.
tagOperateList
.
forEach
((
tagItem
)
=>
{
if
(
tagItem
.
show
)
{
tagItem
.
checked
=
false
;
}
});
}
// Update the image list based on the selected status of the tag.
this
.
updateTagInPage
();
},
/**
* Tag Filter
*/
filterByTagName
()
{
if
(
this
.
tagInputTimer
)
{
clearTimeout
(
this
.
tagInputTimer
);
this
.
tagInputTimer
=
null
;
}
this
.
tagInputTimer
=
setTimeout
(()
=>
{
let
reg
;
try
{
reg
=
new
RegExp
(
this
.
tagInput
);
}
catch
(
e
)
{
this
.
$message
.
warning
(
this
.
$t
(
'
public.regIllegal
'
));
return
;
}
this
.
valiableTagInput
=
this
.
tagInput
;
this
.
multiSelectedTagNames
=
{};
let
tagSelectAll
=
true
;
// Filter the tags that do not meet the conditions in the operation bar and hide them
this
.
tagOperateList
.
forEach
((
tagItem
)
=>
{
if
(
reg
.
test
(
tagItem
.
label
))
{
tagItem
.
show
=
true
;
if
(
tagItem
.
checked
)
{
this
.
multiSelectedTagNames
[
tagItem
.
label
]
=
true
;
}
else
{
tagSelectAll
=
false
;
}
}
else
{
tagItem
.
show
=
false
;
}
});
// Update the selected status of the Select All button
this
.
tagOperateSelectAll
=
tagSelectAll
;
// Update the image list based on the selected status of the tag.
this
.
updateTagInPage
();
},
200
);
},
/**
* Tag item click event
* @param {Object} tagItem Current tag item object
*/
tagItemClick
(
tagItem
)
{
if
(
!
tagItem
)
{
return
;
return
;
}
}
tagItem
.
checked
=
!
tagItem
.
checked
;
this
.
multiSelectedTagNames
=
selectedItemDict
;
// Refreshes the selected status of the current label option
// Reset to the first page
if
(
tagItem
.
checked
)
{
this
.
pageIndex
=
0
;
this
.
multiSelectedTagNames
[
tagItem
.
label
]
=
true
;
}
else
{
if
(
this
.
multiSelectedTagNames
[
tagItem
.
label
])
{
delete
this
.
multiSelectedTagNames
[
tagItem
.
label
];
}
}
// Update the selected status of the Select All button
let
tagSellectAll
=
true
;
this
.
tagOperateList
.
some
((
curTagItem
)
=>
{
if
(
curTagItem
.
show
&&
!
curTagItem
.
checked
)
{
tagSellectAll
=
false
;
return
true
;
}
});
this
.
tagOperateSelectAll
=
tagSellectAll
;
// Update the image list based on the selected status of the tag.
this
.
updateTagInPage
();
this
.
updateTagInPage
();
},
},
/**
/**
* Update the image list based on the filtered tags
* Update the image list based on the filtered tags
* @param {Boolean} noPageDataNumChange No new data is added or deleted
*/
*/
updateTagInPage
()
{
updateTagInPage
(
noPageDataNumChange
)
{
// Reset to the first page
this
.
pageIndex
=
0
;
const
curFilterSamples
=
[];
const
curFilterSamples
=
[];
// Obtains the image data subscript that meets the tag filtering conditions
// Obtains the image data subscript that meets the tag filtering conditions
this
.
originDataArr
.
forEach
((
sampleItem
)
=>
{
this
.
originDataArr
.
forEach
((
sampleItem
)
=>
{
if
(
this
.
multiSelectedTagNames
[
sampleItem
.
tagName
])
{
if
(
this
.
multiSelectedTagNames
[
sampleItem
.
tagName
])
{
sampleItem
.
tagShow
=
true
;
curFilterSamples
.
push
(
sampleItem
);
if
(
sampleItem
.
runShow
)
{
curFilterSamples
.
push
(
sampleItem
);
}
}
else
{
sampleItem
.
tagShow
=
false
;
}
}
});
});
this
.
curFilterSamples
=
curFilterSamples
;
this
.
curFilterSamples
=
curFilterSamples
;
// Obtains data on the current page
// Obtains data on the current page
this
.
getCurPageDataArr
();
this
.
getCurPageDataArr
(
noPageDataNumChange
);
},
},
/**
/**
* Clear data.
* Clear data.
*/
*/
clearAllData
()
{
clearAllData
()
{
this
.
multiSelectedRunNames
=
{};
this
.
multiSelectedTagNames
=
{};
this
.
multiSelectedTagNames
=
{};
this
.
curFilterSamples
=
[];
this
.
curFilterSamples
=
[];
this
.
tagOperateSelectAll
=
true
;
this
.
runOperateList
=
[];
this
.
tagOperateList
=
[];
this
.
tagOperateList
=
[];
this
.
originDataArr
=
[];
this
.
originDataArr
=
[];
this
.
oriDataDictionaries
=
{};
this
.
oriDataDictionaries
=
{};
this
.
curPageArr
=
[];
this
.
curPageArr
=
[];
this
.
pageIndex
=
0
;
this
.
pageIndex
=
0
;
this
.
tagOverRowFlag
=
false
;
this
.
headTagFullScreen
=
false
;
},
},
/**
/**
* Request error handling
* Request error handling
...
@@ -705,50 +487,28 @@ export default {
...
@@ -705,50 +487,28 @@ export default {
if
(
!
oriData
)
{
if
(
!
oriData
)
{
return
false
;
return
false
;
}
}
const
newRunDictionaries
=
{};
// Index of the training log in the new data.
const
newTagDictionaries
=
{};
// Index of the tag in the new data
const
newTagDictionaries
=
{};
// Index of the tag in the new data
let
dataRemoveFlag
=
false
;
let
dataRemoveFlag
=
false
;
// Obtains the current training log and tag list
// Obtains the current tag list
oriData
.
forEach
((
runObj
,
runIndex
)
=>
{
oriData
.
tags
.
forEach
((
tagName
)
=>
{
newRunDictionaries
[
runObj
.
name
]
=
true
;
newTagDictionaries
[
tagName
]
=
true
;
runObj
.
tags
.
forEach
((
tagName
)
=>
{
if
(
newTagDictionaries
[
tagName
])
{
newTagDictionaries
[
tagName
][
runObj
.
name
]
=
true
;
}
else
{
newTagDictionaries
[
tagName
]
=
{};
newTagDictionaries
[
tagName
][
runObj
.
name
]
=
true
;
}
});
});
});
// Delete training logs that do not exist in the operation bar
const
oldRunListLength
=
this
.
runOperateList
.
length
;
for
(
let
i
=
oldRunListLength
-
1
;
i
>=
0
;
i
--
)
{
if
(
!
newRunDictionaries
[
this
.
runOperateList
[
i
].
label
])
{
dataRemoveFlag
=
true
;
this
.
runOperateList
.
splice
(
i
,
1
);
}
}
// Delete the tags that do not exist in the operation bar
// Delete the tags that do not exist in the operation bar
const
oldTagListLength
=
this
.
tagOperateList
.
length
;
const
oldTagListLength
=
this
.
tagOperateList
.
length
;
for
(
let
i
=
oldTagListLength
-
1
;
i
>=
0
;
i
--
)
{
for
(
let
i
=
oldTagListLength
-
1
;
i
>=
0
;
i
--
)
{
if
(
!
newTagDictionaries
[
this
.
tagOperateList
[
i
].
label
])
{
if
(
!
newTagDictionaries
[
this
.
tagOperateList
[
i
].
label
])
{
dataRemoveFlag
=
true
;
dataRemoveFlag
=
true
;
this
.
tagOperateList
.
splice
(
i
,
1
);
this
.
tagOperateList
.
splice
(
i
,
1
);
delete
this
.
oriDataDictionaries
[
this
.
tagOperateList
[
i
].
label
];
}
}
}
}
// Delete the old data from the image list and update the dictionary
// Delete the old data from the image list and update the dictionary
const
oldSampleLength
=
this
.
originDataArr
.
length
;
const
oldSampleLength
=
this
.
originDataArr
.
length
;
for
(
let
i
=
oldSampleLength
-
1
;
i
>=
0
;
i
--
)
{
for
(
let
i
=
oldSampleLength
-
1
;
i
>=
0
;
i
--
)
{
const
oldSample
=
this
.
originDataArr
[
i
];
const
oldSample
=
this
.
originDataArr
[
i
];
if
(
!
newTagDictionaries
[
oldSample
.
tagName
])
{
if
(
!
newTagDictionaries
[
oldSample
.
tagName
])
{
delete
this
.
oriDataDictionaries
[
oldSample
.
tagName
];
this
.
originDataArr
.
splice
(
i
,
1
);
dataRemoveFlag
=
true
;
dataRemoveFlag
=
true
;
}
else
if
(
!
newTagDictionaries
[
oldSample
.
tagName
][
oldSample
.
runName
])
{
delete
this
.
oriDataDictionaries
[
oldSample
.
tagName
][
oldSample
.
runName
];
this
.
originDataArr
.
splice
(
i
,
1
);
this
.
originDataArr
.
splice
(
i
,
1
);
dataRemoveFlag
=
true
;
}
}
}
}
return
dataRemoveFlag
;
return
dataRemoveFlag
;
...
@@ -762,129 +522,35 @@ export default {
...
@@ -762,129 +522,35 @@ export default {
if
(
!
oriData
)
{
if
(
!
oriData
)
{
return
false
;
return
false
;
}
}
const
runDictionaries
=
{};
const
tagDictionaries
=
{};
// Generate the current training log dictionary
this
.
runOperateList
.
forEach
((
runItem
)
=>
{
runDictionaries
[
runItem
.
label
]
=
true
;
});
// Generate the current tag dictionary
this
.
tagOperateList
.
forEach
((
tagItem
)
=>
{
tagDictionaries
[
tagItem
.
label
]
=
true
;
});
// Add New Data
// Add New Data
let
dataAddFlag
=
false
;
let
dataAddFlag
=
false
;
oriData
.
forEach
((
runObj
)
=>
{
oriData
.
tags
.
forEach
((
tagName
)
=>
{
// Add training logs in the operation bar
if
(
!
this
.
oriDataDictionaries
[
tagName
])
{
if
(
!
runDictionaries
[
runObj
.
name
])
{
this
.
oriDataDictionaries
[
tagName
]
=
true
;
this
.
run
OperateList
.
push
({
this
.
tag
OperateList
.
push
({
label
:
runObj
.
n
ame
,
label
:
tagN
ame
,
checked
:
true
,
checked
:
true
,
show
:
false
,
show
:
false
,
});
});
runDictionaries
[
runObj
.
name
]
=
true
;
this
.
originDataArr
.
push
({
summaryId
:
oriData
.
id
,
summaryName
:
oriData
.
name
,
tagName
:
tagName
,
sampleData
:
[],
curPageShow
:
false
,
sliderValue
:
0
,
fullScreen
:
false
,
totalStepNum
:
0
,
curStep
:
''
,
curImgUrl
:
''
,
curTime
:
''
,
curImageSize
:
[
0
,
0
],
});
dataAddFlag
=
true
;
dataAddFlag
=
true
;
}
}
runObj
.
tags
.
forEach
((
tagName
)
=>
{
// Adding a tag to the operation bar
if
(
!
tagDictionaries
[
tagName
])
{
this
.
tagOperateList
.
push
({
label
:
tagName
,
checked
:
true
,
show
:
false
,
});
tagDictionaries
[
tagName
]
=
true
;
dataAddFlag
=
true
;
}
// Add Image Information
let
newSampleFlag
=
false
;
if
(
this
.
oriDataDictionaries
[
tagName
])
{
if
(
!
this
.
oriDataDictionaries
[
tagName
][
runObj
.
name
])
{
newSampleFlag
=
true
;
this
.
oriDataDictionaries
[
tagName
][
runObj
.
name
]
=
true
;
}
}
else
{
newSampleFlag
=
true
;
this
.
oriDataDictionaries
[
tagName
]
=
{};
this
.
oriDataDictionaries
[
tagName
][
runObj
.
name
]
=
true
;
}
// Add image information to all data array
if
(
newSampleFlag
)
{
dataAddFlag
=
true
;
this
.
originDataArr
.
push
({
runId
:
runObj
.
id
,
runName
:
runObj
.
name
,
tagName
:
tagName
,
sampleData
:
[],
tagShow
:
false
,
runShow
:
true
,
curPageShow
:
false
,
sliderValue
:
0
,
fullScreen
:
false
,
totalStepNum
:
0
,
curStep
:
''
,
curImgUrl
:
''
,
curTime
:
''
,
curImageSize
:
[
0
,
0
],
});
}
});
});
});
return
dataAddFlag
;
return
dataAddFlag
;
},
},
/**
* Update the training log and tag selection status and select all status,
* and obtain the list of images that meet the search criteria
*/
updateRunAndTagSelectStateAndFilterResult
()
{
this
.
multiSelectedRunNames
=
{};
this
.
multiSelectedTagNames
=
{};
// Update the selection status and selection status of training logs
this
.
runOperateList
.
forEach
((
runItem
)
=>
{
runItem
.
show
=
true
;
this
.
multiSelectedRunNames
[
runItem
.
label
]
=
true
;
});
// Update the tag selection status and select all status
let
tagReg
;
try
{
tagReg
=
new
RegExp
(
this
.
tagInput
);
}
catch
(
e
)
{
tagReg
=
new
RegExp
(
this
.
valiableTagInput
);
}
let
tagSelectAll
=
true
;
this
.
tagOperateList
.
forEach
((
tagItem
)
=>
{
if
(
tagReg
.
test
(
tagItem
.
label
))
{
tagItem
.
show
=
true
;
if
(
tagItem
.
checked
)
{
this
.
multiSelectedTagNames
[
tagItem
.
label
]
=
true
;
}
else
{
tagSelectAll
=
false
;
}
}
else
{
tagItem
.
show
=
false
;
}
});
this
.
tagOperateSelectAll
=
tagSelectAll
;
// Update the list of images that meet the filter criteria
const
curFilterSamples
=
[];
this
.
originDataArr
.
forEach
((
sampleItem
)
=>
{
sampleItem
.
runShow
=
true
;
// Filter tag
if
(
this
.
multiSelectedTagNames
[
sampleItem
.
tagName
])
{
sampleItem
.
tagShow
=
true
;
}
else
{
sampleItem
.
tagShow
=
false
;
}
// whether all filter criteria are met.
if
(
sampleItem
.
tagShow
&&
sampleItem
.
runShow
)
{
curFilterSamples
.
push
(
sampleItem
);
}
});
this
.
curFilterSamples
=
curFilterSamples
;
},
/**
/**
* Update all data.
* Update all data.
* @param {Boolean} ignoreError whether ignore error tip
* @param {Boolean} ignoreError whether ignore error tip
...
@@ -901,25 +567,25 @@ export default {
...
@@ -901,25 +567,25 @@ export default {
this
.
isReloading
=
false
;
this
.
isReloading
=
false
;
}
}
// Fault tolerance processing
// Fault tolerance processing
if
(
!
res
||
!
res
.
data
)
{
if
(
return
;
!
res
||
}
else
if
(
!
res
.
data
.
train_jobs
)
{
!
res
.
data
||
!
res
.
data
.
train_jobs
||
!
res
.
data
.
train_jobs
.
length
||
!
res
.
data
.
train_jobs
[
0
].
tags
)
{
this
.
clearAllData
();
this
.
clearAllData
();
return
;
return
;
}
}
const
oriData
=
res
.
data
.
train_jobs
;
const
oriData
=
res
.
data
.
train_jobs
[
0
]
;
// Delete the data that does not exist.
// Delete the data that does not exist.
const
dataRemoveFlag
=
this
.
removeNonexistentData
(
oriData
);
const
dataRemoveFlag
=
this
.
removeNonexistentData
(
oriData
);
// Check whether new data exists and add it
// Check whether new data exists and add it
const
dataAddFlag
=
this
.
checkNewDataAndComplete
(
oriData
);
const
dataAddFlag
=
this
.
checkNewDataAndComplete
(
oriData
);
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
resizeCallback
();
this
.
multiSelectedTagNames
=
this
.
$refs
.
checkListComponents
.
updateSelectedDic
();
this
.
updateTagInPage
(
!
dataRemoveFlag
&&
!
dataAddFlag
);
});
});
// Update the training log and tag selection status and select all status,
// and obtain the list of images that meet the search criteria
this
.
updateRunAndTagSelectStateAndFilterResult
();
// Obtains data on the current page
this
.
getCurPageDataArr
(
!
dataRemoveFlag
&&
!
dataAddFlag
);
},
this
.
requestErrorCallback
)
},
this
.
requestErrorCallback
)
.
catch
((
e
)
=>
{
.
catch
((
e
)
=>
{
this
.
$message
.
error
(
this
.
$t
(
'
public.dataError
'
));
this
.
$message
.
error
(
this
.
$t
(
'
public.dataError
'
));
...
@@ -957,8 +623,9 @@ export default {
...
@@ -957,8 +623,9 @@ export default {
});
});
},
},
},
},
// Component titlebar
components
:
{
components
:
{},
checkListComponents
,
},
};
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
@@ -979,7 +646,6 @@ export default {
...
@@ -979,7 +646,6 @@ export default {
font-size
:
14px
;
font-size
:
14px
;
vertical-align
:
middle
;
vertical-align
:
middle
;
flex-shrink
:
0
;
flex-shrink
:
0
;
width
:
84px
;
}
}
.select-all
{
.select-all
{
cursor
:
pointer
;
cursor
:
pointer
;
...
@@ -989,85 +655,6 @@ export default {
...
@@ -989,85 +655,6 @@ export default {
width
:
100%
;
width
:
100%
;
padding
:
8px
32px
22px
32px
;
padding
:
8px
32px
22px
32px
;
background
:
#ffffff
;
background
:
#ffffff
;
.tag-select-content
{
display
:
flex
;
align-items
:
center
;
.select-item-content
{
display
:
flex
;
height
:
16px
;
flex-wrap
:
wrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
.run-select-content-open
{
flex
:
1
;
text-align
:
right
;
font-size
:
14px
;
color
:
#00a5a7
;
cursor
:
pointer
;
min-width
:
60px
;
}
}
.run-select-content-all
{
max-height
:
150px
;
padding-left
:
72px
;
overflow-x
:
hidden
;
display
:
flex
;
flex-wrap
:
wrap
;
.label-item
{
line-height
:
14px
;
}
.select-item
{
height
:
25px
;
margin-top
:
25px
;
}
}
.select-item
{
margin-right
:
20px
;
flex-shrink
:
0
;
margin-bottom
:
1px
;
cursor
:
pointer
;
.label-item
{
width
:
100px
;
display
:
block
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-align
:
left
;
}
}
.multiCheckBox-border
{
width
:
16px
;
height
:
16px
;
display
:
block
;
margin-right
:
20px
;
cursor
:
pointer
;
float
:
left
;
}
.checkbox-checked
{
background-image
:
url('../../assets/images/mult-select.png')
;
}
.checkbox-unchecked
{
background-image
:
url('../../assets/images/mult-unselect.png')
;
}
.label-item
{
font-size
:
14px
;
line-height
:
14px
;
vertical-align
:
middle
;
.el-tooltip
{
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-align
:
left
;
height
:
16px
;
}
span
{
font-size
:
14px
;
line-height
:
14px
;
display
:
block
;
}
}
}
}
.cl-img-slider-operate-content
{
.cl-img-slider-operate-content
{
background
:
#ffffff
;
background
:
#ffffff
;
...
@@ -1148,7 +735,7 @@ export default {
...
@@ -1148,7 +735,7 @@ export default {
overflow
:
hidden
;
overflow
:
hidden
;
background-color
:
#f0f3fa
;
background-color
:
#f0f3fa
;
.tag-title
,
.tag-title
,
.
run
-title
{
.
summary
-title
{
font-size
:
14px
;
font-size
:
14px
;
line-height
:
20px
;
line-height
:
20px
;
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
...
...
mindinsight/ui/src/views/train-manage/model-traceback.vue
浏览文件 @
623155e7
...
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
...
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
-->
-->
<
template
>
<
template
>
<div
id=
'cl-model-traceback'
>
<div
id=
"cl-model-traceback"
>
<div
class=
"cl-model-right"
>
<div
class=
"cl-model-right"
>
<div
class=
"checkbox-area"
<div
class=
"checkbox-area"
v-if=
"!noData && echart.allData.length"
>
v-if=
"!noData && echart.allData.length"
>
...
@@ -22,33 +22,28 @@ limitations under the License.
...
@@ -22,33 +22,28 @@ limitations under the License.
@
click=
"resetChart"
@
click=
"resetChart"
type=
"primary"
type=
"primary"
size=
"mini"
size=
"mini"
plain
>
plain
>
{{
$t
(
'
modelTraceback.showAllData
'
)
}}
</el-button>
{{
$t
(
'
modelTraceback.showAllData
'
)
}}
</el-button>
<div
class=
"checkbox"
>
<div
class=
"checkbox"
>
<el-checkbox
v-for=
"item in table.mandatoryColumn"
<el-checkbox
v-for=
"item in table.mandatoryColumn"
:key=
"item"
:key=
"item"
:label=
"item"
:label=
"item"
:checked=
"true"
:checked=
"true"
:disabled=
"true"
:disabled=
"true"
:class=
"table.optionsNotInCheckbox.includes(item)?'notShow': ''"
>
:class=
"table.optionsNotInCheckbox.includes(item) ? 'notShow' : ''"
>
{{
table
.
columnOptions
[
item
].
label
}}
{{
table
.
columnOptions
[
item
].
label
}}
</el-checkbox>
</el-checkbox>
<br
/>
<br>
<el-checkbox
class=
"select-all"
<el-checkbox
class=
"select-all"
v-model=
"table.selectAll"
v-model=
"table.selectAll"
:indeterminate=
"table.isIndeterminate"
:indeterminate=
"table.isIndeterminate"
@
change=
"checkboxSelectAll"
>
@
change=
"checkboxSelectAll"
>
{{
$t
(
'
scalar.selectAll
'
)
}}
</el-checkbox>
{{
$t
(
'
scalar.selectAll
'
)
}}
</el-checkbox>
<el-checkbox-group
v-model=
"table.selectedColumn"
<el-checkbox-group
v-model=
"table.selectedColumn"
@
change=
"columnSelectionChange"
>
@
change=
"columnSelectionChange"
>
<el-checkbox
v-for=
"item in table.optionalColumn"
<el-checkbox
v-for=
"item in table.optionalColumn"
:key=
"item"
:key=
"item"
:label=
"item"
:label=
"item"
:class=
"
table.optionsNotInCheckbox.includes(item)?'notShow': 'option'"
>
:class=
"
{{
table
.
columnOptions
[
item
].
label
}}
table.optionsNotInCheckbox.includes(item) ? 'notShow' : 'option'
</el-checkbox>
"
>
{{
table
.
columnOptions
[
item
].
label
}}
</el-checkbox>
</el-checkbox-group>
</el-checkbox-group>
</div>
</div>
</div>
</div>
...
@@ -62,24 +57,30 @@ limitations under the License.
...
@@ -62,24 +57,30 @@ limitations under the License.
tooltip-effect=
"light"
tooltip-effect=
"light"
height=
"calc(100% - 40px)"
height=
"calc(100% - 40px)"
@
selection-change=
"selectionChange"
@
selection-change=
"selectionChange"
@
sort-change=
'sortChange'
@
sort-change=
"sortChange"
row-key=
"summary_dir"
>
row-key=
"summary_dir"
>
<el-table-column
type=
"selection"
<el-table-column
type=
"selection"
width=
"55"
width=
"55"
v-if=
"table.data.length"
v-if=
"table.data.length"
:reserve-selection=
"true"
>
:reserve-selection=
"true"
></el-table-column>
</el-table-column>
<el-table-column
v-for=
"key in table.column"
<el-table-column
v-for=
"key in table.column"
:key=
"key"
:key=
"key"
:prop=
"key"
:prop=
"key"
:label=
"table.columnOptions[key].label"
:label=
"table.columnOptions[key].label"
show-overflow-tooltip
show-overflow-tooltip
min-width=
'150'
min-width=
"180"
sortable=
'custom'
>
sortable=
"custom"
>
<template
slot=
"header"
slot-scope=
"scope"
>
<div
class=
"custom-label"
:title=
"scope.column.label"
>
{{
scope
.
column
.
label
}}
</div>
</
template
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<a
v-if=
"key === 'summary_dir'"
<a
v-if=
"key === 'summary_dir'"
@
click=
"jumpToTrainDashboard(scope.row[key])"
>
{{
scope
.
row
[
key
]
}}
</a>
@
click=
"jumpToTrainDashboard(scope.row[key])"
>
{{
scope
.
row
[
key
]
}}
</a>
<span
v-else
>
{{
formatNumber
(
key
,
scope
.
row
[
key
])
}}
</span>
<span
v-else
>
{{
formatNumber
(
key
,
scope
.
row
[
key
])
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -87,17 +88,14 @@ limitations under the License.
...
@@ -87,17 +88,14 @@ limitations under the License.
:current-page=
"pagination.currentPage"
:current-page=
"pagination.currentPage"
:page-size=
"pagination.pageSize"
:page-size=
"pagination.pageSize"
:layout=
"pagination.layout"
:layout=
"pagination.layout"
:total=
"pagination.total"
>
:total=
"pagination.total"
></el-pagination>
</el-pagination>
</div>
</div>
<div
v-if=
"noData"
<div
v-if=
"noData"
class=
"no-data-page"
>
class=
"no-data-page"
>
<div
class=
"no-data-img"
>
<div
class=
"no-data-img"
>
<img
:src=
"require('@/assets/images/nodata.png')"
<img
:src=
"require('@/assets/images/nodata.png')"
alt=
""
/>
alt
/>
<p
class=
'no-data-text'
>
<p
class=
"no-data-text"
>
{{ $t('public.noData') }}
</p>
{{$t("public.noData")}}
</p>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -283,7 +281,6 @@ export default {
...
@@ -283,7 +281,6 @@ export default {
(
res
)
=>
{
(
res
)
=>
{
if
(
res
&&
res
.
data
&&
res
.
data
.
object
)
{
if
(
res
&&
res
.
data
&&
res
.
data
.
object
)
{
const
list
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
.
object
));
const
list
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
.
object
));
const
metricKeys
=
{};
list
.
forEach
((
i
)
=>
{
list
.
forEach
((
i
)
=>
{
i
.
model_size
=
parseFloat
(
i
.
model_size
=
parseFloat
(
((
i
.
model_size
||
0
)
/
1024
/
1024
).
toFixed
(
2
),
((
i
.
model_size
||
0
)
/
1024
/
1024
).
toFixed
(
2
),
...
@@ -292,37 +289,64 @@ export default {
...
@@ -292,37 +289,64 @@ export default {
if
(
keys
.
length
)
{
if
(
keys
.
length
)
{
keys
.
forEach
((
key
)
=>
{
keys
.
forEach
((
key
)
=>
{
if
(
i
.
metric
[
key
]
||
i
.
metric
[
key
]
===
0
)
{
if
(
i
.
metric
[
key
]
||
i
.
metric
[
key
]
===
0
)
{
const
temp
=
'
metric_
'
+
key
;
const
temp
=
'
metric/
'
+
key
;
metricKeys
[
temp
]
=
key
;
i
[
temp
]
=
i
.
metric
[
key
];
i
[
temp
]
=
i
.
metric
[
key
];
}
}
});
});
delete
i
.
metric
;
delete
i
.
metric
;
}
}
const
udkeys
=
Object
.
keys
(
i
.
user_defined
||
{});
if
(
udkeys
.
length
)
{
udkeys
.
forEach
((
key
)
=>
{
if
(
i
.
user_defined
[
key
]
||
i
.
user_defined
[
key
]
===
0
)
{
const
temp
=
'
user_defined/
'
+
key
;
i
[
temp
]
=
i
.
user_defined
[
key
];
}
});
delete
i
.
user_defined
;
}
});
});
if
(
allData
)
{
if
(
allData
)
{
const
obj
=
{};
if
(
res
.
data
.
customized
)
{
Object
.
keys
(
metricKeys
).
forEach
((
key
)
=>
{
const
customized
=
JSON
.
parse
(
obj
[
key
]
=
{
JSON
.
stringify
(
res
.
data
.
customized
),
label
:
metricKeys
[
key
],
);
required
:
true
,
const
customizedKeys
=
Object
.
keys
(
customized
);
};
if
(
customizedKeys
.
length
>
0
)
{
});
const
metricColumnOptions
=
{};
const
userDefinedColumnOptions
=
{};
this
.
table
.
columnOptions
=
Object
.
assign
(
customizedKeys
.
forEach
((
key
)
=>
{
{
const
str
=
key
.
substring
(
0
,
key
.
indexOf
(
'
/
'
));
summary_dir
:
{
if
(
'
metric
'
===
str
)
{
label
:
this
.
$t
(
'
modelTraceback.summaryPath
'
),
metricColumnOptions
[
key
]
=
customized
[
key
];
required
:
true
,
}
else
if
(
'
user_defined
'
===
str
)
{
},
userDefinedColumnOptions
[
key
]
=
customized
[
key
];
dataset_mark
:
{
}
label
:
this
.
$t
(
'
modelTraceback.dataProcess
'
),
});
required
:
true
,
this
.
table
.
columnOptions
=
Object
.
assign
(
},
{
},
summary_dir
:
{
obj
,
label
:
this
.
$t
(
'
modelTraceback.summaryPath
'
),
this
.
table
.
columnOptions
,
required
:
true
,
);
},
dataset_mark
:
{
label
:
this
.
$t
(
'
modelTraceback.dataProcess
'
),
required
:
true
,
},
},
metricColumnOptions
,
userDefinedColumnOptions
,
this
.
table
.
columnOptions
,
);
customizedKeys
.
forEach
((
i
)
=>
{
if
(
customized
[
i
].
type
===
'
int
'
)
{
this
.
keysOfIntValue
.
push
(
i
);
}
else
if
(
customized
[
i
].
type
===
'
str
'
)
{
this
.
keysOfStringValue
.
push
(
i
);
}
});
}
}
this
.
noData
=
!!!
res
.
data
.
object
.
length
;
this
.
noData
=
!!!
res
.
data
.
object
.
length
;
this
.
echart
.
allData
=
list
;
this
.
echart
.
allData
=
list
;
...
@@ -438,12 +462,22 @@ export default {
...
@@ -438,12 +462,22 @@ export default {
if
(
keys
.
length
)
{
if
(
keys
.
length
)
{
keys
.
forEach
((
key
)
=>
{
keys
.
forEach
((
key
)
=>
{
if
(
i
.
metric
[
key
]
||
i
.
metric
[
key
]
===
0
)
{
if
(
i
.
metric
[
key
]
||
i
.
metric
[
key
]
===
0
)
{
const
temp
=
'
metric
_
'
+
key
;
const
temp
=
'
metric
/
'
+
key
;
i
[
temp
]
=
i
.
metric
[
key
];
i
[
temp
]
=
i
.
metric
[
key
];
}
}
});
});
delete
i
.
metric
;
delete
i
.
metric
;
}
}
const
udkeys
=
Object
.
keys
(
i
.
user_defined
||
{});
if
(
udkeys
.
length
)
{
udkeys
.
forEach
((
key
)
=>
{
if
(
i
.
user_defined
[
key
]
||
i
.
user_defined
[
key
]
===
0
)
{
const
temp
=
'
user_defined/
'
+
key
;
i
[
temp
]
=
i
.
user_defined
[
key
];
}
});
delete
i
.
user_defined
;
}
});
});
this
.
table
.
data
=
list
;
this
.
table
.
data
=
list
;
this
.
pagination
.
total
=
res
.
data
.
count
||
0
;
this
.
pagination
.
total
=
res
.
data
.
count
||
0
;
...
@@ -508,6 +542,9 @@ export default {
...
@@ -508,6 +542,9 @@ export default {
const
echartOption
=
{
const
echartOption
=
{
backgroundColor
:
'
white
'
,
backgroundColor
:
'
white
'
,
parallelAxis
:
parallelAxis
,
parallelAxis
:
parallelAxis
,
tooltip
:
{
trigger
:
'
axis
'
,
},
parallel
:
{
parallel
:
{
top
:
25
,
top
:
25
,
left
:
50
,
left
:
50
,
...
@@ -540,6 +577,9 @@ export default {
...
@@ -540,6 +577,9 @@ export default {
areaSelectStyle
:
{
areaSelectStyle
:
{
width
:
40
,
width
:
40
,
},
},
tooltip
:
{
show
:
true
,
},
realtime
:
false
,
realtime
:
false
,
},
},
},
},
...
@@ -618,12 +658,22 @@ export default {
...
@@ -618,12 +658,22 @@ export default {
if
(
keys
.
length
)
{
if
(
keys
.
length
)
{
keys
.
forEach
((
key
)
=>
{
keys
.
forEach
((
key
)
=>
{
if
(
i
.
metric
[
key
]
||
i
.
metric
[
key
]
===
0
)
{
if
(
i
.
metric
[
key
]
||
i
.
metric
[
key
]
===
0
)
{
const
temp
=
'
metric
_
'
+
key
;
const
temp
=
'
metric
/
'
+
key
;
i
[
temp
]
=
i
.
metric
[
key
];
i
[
temp
]
=
i
.
metric
[
key
];
}
}
});
});
delete
i
.
metric
;
delete
i
.
metric
;
}
}
const
udkeys
=
Object
.
keys
(
i
.
user_defined
||
{});
if
(
udkeys
.
length
)
{
udkeys
.
forEach
((
key
)
=>
{
if
(
i
.
user_defined
[
key
]
||
i
.
user_defined
[
key
]
===
0
)
{
const
temp
=
'
user_defined/
'
+
key
;
i
[
temp
]
=
i
.
user_defined
[
key
];
}
});
delete
i
.
user_defined
;
}
});
});
this
.
echart
.
showData
=
this
.
echart
.
brushData
=
list
;
this
.
echart
.
showData
=
this
.
echart
.
brushData
=
list
;
...
@@ -805,6 +855,11 @@ export default {
...
@@ -805,6 +855,11 @@ export default {
height
:
calc
(
60%
-
74px
);
height
:
calc
(
60%
-
74px
);
padding
:
12px
32px
;
padding
:
12px
32px
;
position
:
relative
;
position
:
relative
;
.custom-label
{
max-width
:
calc
(
100%
-
25px
);
padding
:
0
;
vertical-align
:
middle
;
}
a
{
a
{
cursor
:
pointer
;
cursor
:
pointer
;
}
}
...
...
mindinsight/ui/src/views/train-manage/scalar-compare.vue
浏览文件 @
623155e7
...
@@ -553,12 +553,8 @@ export default {
...
@@ -553,12 +553,8 @@ export default {
if
(
this
.
curPageArr
.
length
>
0
)
{
if
(
this
.
curPageArr
.
length
>
0
)
{
this
.
curPageArr
.
forEach
((
sampleObject
,
yIndex
)
=>
{
this
.
curPageArr
.
forEach
((
sampleObject
,
yIndex
)
=>
{
const
runCount
=
sampleObject
.
runId
.
length
;
if
(
runCount
===
0
)
{
return
;
}
const
params
=
{
const
params
=
{
train_id
:
sampleObject
.
runId
[
0
]
,
train_id
:
this
.
trainingJobId
,
tag
:
sampleObject
.
tagName
,
tag
:
sampleObject
.
tagName
,
};
};
ajaxArr
.
push
(
this
.
addAjax
(
params
,
yIndex
));
ajaxArr
.
push
(
this
.
addAjax
(
params
,
yIndex
));
...
@@ -574,14 +570,11 @@ export default {
...
@@ -574,14 +570,11 @@ export default {
return
;
return
;
}
}
this
.
curPageArr
.
forEach
((
sampleObject
,
yIndex
)
=>
{
this
.
curPageArr
.
forEach
((
sampleObject
,
yIndex
)
=>
{
sampleObject
.
runNames
.
forEach
((
runName
,
runNameIndex
)
=>
{
sampleObject
.
colors
=
sampleObject
.
colors
.
push
(
CommonProperty
.
commonColorArr
[
this
.
colorNum
]
CommonProperty
.
commonColorArr
[
this
.
colorNum
]
?
CommonProperty
.
commonColorArr
[
this
.
colorNum
]
?
CommonProperty
.
commonColorArr
[
this
.
colorNum
]
:
CommonProperty
.
commonColorArr
[
this
.
defColorCount
-
1
],
:
CommonProperty
.
commonColorArr
[
this
.
defColorCount
-
1
];
);
this
.
colorNum
++
;
this
.
colorNum
++
;
});
});
});
this
.
colorNum
=
0
;
this
.
colorNum
=
0
;
for
(
let
i
=
0
;
i
<
res
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
res
.
length
;
i
++
)
{
...
@@ -600,9 +593,8 @@ export default {
...
@@ -600,9 +593,8 @@ export default {
color
:
CommonProperty
.
commonColorArr
[
this
.
colorNum
]
color
:
CommonProperty
.
commonColorArr
[
this
.
colorNum
]
?
CommonProperty
.
commonColorArr
[
this
.
colorNum
]
?
CommonProperty
.
commonColorArr
[
this
.
colorNum
]
:
CommonProperty
.
commonColorArr
[
this
.
defColorCount
-
1
],
:
CommonProperty
.
commonColorArr
[
this
.
defColorCount
-
1
],
runName
:
this
.
returnRunName
(
this
.
trainingJobId
),
runName
:
this
.
trainingJobId
,
curBackName
:
curBackName
:
this
.
trainingJobId
+
this
.
backendString
,
this
.
returnRunName
(
this
.
trainingJobId
)
+
this
.
backendString
,
tagName
:
res
[
i
].
params
.
tag
,
tagName
:
res
[
i
].
params
.
tag
,
};
};
let
relativeTimeBench
=
0
;
let
relativeTimeBench
=
0
;
...
@@ -639,22 +631,6 @@ export default {
...
@@ -639,22 +631,6 @@ export default {
}
}
},
},
/**
* return run name
* @param {String} id
* @return {String}
*/
returnRunName
(
id
)
{
if
(
!
id
)
{
return
;
}
let
runName
=
''
;
if
(
this
.
curPageArr
[
0
].
runNames
[
0
])
{
runName
=
this
.
curPageArr
[
0
].
runNames
[
0
];
}
return
runName
;
},
/**
/**
* add request
* add request
...
...
mindinsight/ui/src/views/train-manage/scalar.vue
浏览文件 @
623155e7
...
@@ -212,9 +212,6 @@ export default {
...
@@ -212,9 +212,6 @@ export default {
propsList
:
[],
// dataList props
propsList
:
[],
// dataList props
smoothValue
:
0
,
// Initial smoothness of the slider
smoothValue
:
0
,
// Initial smoothness of the slider
smoothSliderValueTimer
:
null
,
// Smoothness slider timer
smoothSliderValueTimer
:
null
,
// Smoothness slider timer
// Number of predefined colors
defColorCount
:
CommonProperty
.
commonColorArr
.
length
,
curAvlColorIndexArr
:
[],
// color subscript
DomIdIndex
:
0
,
// DomId num
DomIdIndex
:
0
,
// DomId num
originDataArr
:
[],
// Original data
originDataArr
:
[],
// Original data
curPageArr
:
[],
// data of the current page
curPageArr
:
[],
// data of the current page
...
@@ -329,9 +326,6 @@ export default {
...
@@ -329,9 +326,6 @@ export default {
// Adding a Listener
// Adding a Listener
this
.
getCharMainContentwidth
();
this
.
getCharMainContentwidth
();
// Initialize available colors
this
.
initAvlColorArr
();
// Initializing Data
// Initializing Data
this
.
getScalarsList
();
this
.
getScalarsList
();
...
@@ -367,52 +361,45 @@ export default {
...
@@ -367,52 +361,45 @@ export default {
const
tempTagList
=
[];
const
tempTagList
=
[];
const
dataList
=
[];
const
dataList
=
[];
const
propsList
=
[];
const
propsList
=
[];
const
data
=
res
.
data
.
train_jobs
;
const
data
=
res
.
data
.
train_jobs
[
0
];
data
.
forEach
((
runObj
,
runObjectIndex
)
=>
{
const
runNmeColor
=
CommonProperty
.
commonColorArr
[
0
];
const
colorIndex
=
this
.
curAvlColorIndexArr
.
length
data
.
tags
.
forEach
((
tagObj
)
=>
{
?
this
.
curAvlColorIndexArr
.
shift
()
:
this
.
defColorCount
-
1
;
const
runNmeColor
=
CommonProperty
.
commonColorArr
[
colorIndex
];
runObj
.
tags
.
forEach
((
tagObj
)
=>
{
// Add the tag list
// Add the tag list
this
.
multiSelectedTagNames
[
tagObj
]
=
true
;
this
.
multiSelectedTagNames
[
tagObj
]
=
true
;
tempTagList
.
push
({
tempTagList
.
push
({
label
:
tagObj
,
label
:
tagObj
,
checked
:
true
,
checked
:
true
,
show
:
true
,
show
:
true
,
});
});
const
sampleIndex
=
dataList
.
length
;
const
sampleIndex
=
dataList
.
length
;
this
.
curFilterTagIndexArr
.
push
(
sampleIndex
);
this
.
curFilterTagIndexArr
.
push
(
sampleIndex
);
// Adding Chart Data
// Adding Chart Data
dataList
.
push
({
dataList
.
push
({
tagName
:
tagObj
,
tagName
:
tagObj
,
runNames
:
[
runObj
.
name
],
runNames
:
data
.
name
,
colors
:
[
runNmeColor
],
colors
:
runNmeColor
,
runId
:
[
runObj
.
id
],
show
:
false
,
show
:
false
,
updateFlag
:
false
,
updateFlag
:
false
,
dataRemove
:
false
,
dataRemove
:
false
,
fullScreen
:
false
,
fullScreen
:
false
,
sampleIndex
:
sampleIndex
,
sampleIndex
:
sampleIndex
,
domId
:
'
prDom
'
+
this
.
DomIdIndex
,
domId
:
'
prDom
'
+
this
.
DomIdIndex
,
charData
:
{
charData
:
{
oriData
:
[],
oriData
:
[],
charOption
:
{},
charOption
:
{},
},
},
zoomData
:
[
null
,
null
],
zoomData
:
[
null
,
null
],
zoomDataTimer
:
null
,
zoomDataTimer
:
null
,
charObj
:
null
,
charObj
:
null
,
});
});
propsList
.
push
({
propsList
.
push
({
tagName
:
tagObj
,
tagName
:
tagObj
,
runNames
:
data
.
name
,
runNames
:
[
runObj
.
name
],
colors
:
''
,
runId
:
[
runObj
.
id
],
colors
:
[],
});
this
.
DomIdIndex
++
;
});
});
this
.
DomIdIndex
++
;
});
});
this
.
tagOperateList
=
tempTagList
;
this
.
tagOperateList
=
tempTagList
;
this
.
tagPropsList
=
JSON
.
parse
(
JSON
.
stringify
(
tempTagList
));
this
.
tagPropsList
=
JSON
.
parse
(
JSON
.
stringify
(
tempTagList
));
...
@@ -485,15 +472,11 @@ export default {
...
@@ -485,15 +472,11 @@ export default {
return
;
return
;
}
}
sampleObject
.
updateFlag
=
true
;
sampleObject
.
updateFlag
=
true
;
const
runCount
=
sampleObject
.
runId
.
length
;
if
(
runCount
===
0
)
{
return
;
}
const
promiseArr
=
[];
const
promiseArr
=
[];
const
params
=
{
const
params
=
{
train_id
:
sampleObject
.
runId
[
0
]
,
train_id
:
this
.
trainingJobId
,
tag
:
sampleObject
.
tagName
,
tag
:
sampleObject
.
tagName
,
};
};
...
@@ -629,48 +612,47 @@ export default {
...
@@ -629,48 +612,47 @@ export default {
let
returnFlag
=
false
;
let
returnFlag
=
false
;
const
seriesData
=
[];
const
seriesData
=
[];
const
oriData
=
sampleObject
.
charData
.
oriData
;
const
oriData
=
sampleObject
.
charData
.
oriData
;
sampleObject
.
runNames
.
forEach
((
runName
,
runNameIndex
)
=>
{
const
runName
=
sampleObject
.
runNames
;
const
curBackName
=
runName
+
this
.
backendString
;
const
curBackName
=
runName
+
this
.
backendString
;
const
dataObj
=
{
const
dataObj
=
{
name
:
runName
,
name
:
runName
,
data
:
[],
data
:
[],
type
:
'
line
'
,
type
:
'
line
'
,
showSymbol
:
false
,
showSymbol
:
false
,
lineStyle
:
{
lineStyle
:
{
color
:
sampleObject
.
colors
[
runNameIndex
]
,
color
:
sampleObject
.
colors
,
},
},
};
};
const
dataObjBackend
=
{
const
dataObjBackend
=
{
name
:
curBackName
,
name
:
curBackName
,
data
:
[],
data
:
[],
type
:
'
line
'
,
type
:
'
line
'
,
smooth
:
0
,
smooth
:
0
,
symbol
:
'
none
'
,
symbol
:
'
none
'
,
lineStyle
:
{
lineStyle
:
{
color
:
sampleObject
.
colors
[
runNameIndex
]
,
color
:
sampleObject
.
colors
,
opacity
:
0.2
,
opacity
:
0.2
,
},
},
};
};
const
curOriData
=
oriData
[
runNameIndex
];
const
curOriData
=
oriData
[
0
];
if
(
curOriData
)
{
if
(
curOriData
)
{
if
(
sampleObject
.
log
)
{
if
(
sampleObject
.
log
)
{
dataObj
.
data
=
this
.
formateSmoothData
(
dataObj
.
data
=
this
.
formateSmoothData
(
curOriData
.
logData
[
this
.
curBenchX
],
curOriData
.
logData
[
this
.
curBenchX
],
);
);
dataObjBackend
.
data
=
curOriData
.
logData
[
this
.
curBenchX
];
dataObjBackend
.
data
=
curOriData
.
logData
[
this
.
curBenchX
];
}
else
{
dataObj
.
data
=
this
.
formateSmoothData
(
curOriData
.
valueData
[
this
.
curBenchX
],
);
dataObjBackend
.
data
=
curOriData
.
valueData
[
this
.
curBenchX
];
}
}
else
{
}
else
{
returnFlag
=
true
;
dataObj
.
data
=
this
.
formateSmoothData
(
curOriData
.
valueData
[
this
.
curBenchX
],
);
dataObjBackend
.
data
=
curOriData
.
valueData
[
this
.
curBenchX
];
}
}
}
else
{
returnFlag
=
true
;
}
seriesData
.
push
(
dataObj
,
dataObjBackend
);
seriesData
.
push
(
dataObj
,
dataObjBackend
);
});
if
(
returnFlag
)
{
if
(
returnFlag
)
{
return
;
return
;
}
}
...
@@ -884,7 +866,7 @@ export default {
...
@@ -884,7 +866,7 @@ export default {
});
});
strBody
+=
strBody
+=
`<tr><td style="border-radius:50%;width:15px;height:15px;vertical-align: middle;`
+
`<tr><td style="border-radius:50%;width:15px;height:15px;vertical-align: middle;`
+
`margin-right: 5px;background-color:
${
sampleObject
.
colors
[
curIndex
]
}
;`
+
`margin-right: 5px;background-color:
${
sampleObject
.
colors
}
;`
+
`display:inline-block;"></td><td>
${
parma
.
seriesName
}
</td>`
+
`display:inline-block;"></td><td>
${
parma
.
seriesName
}
</td>`
+
`<td>
${
that
.
formateYaxisValue
(
parma
.
value
[
1
])}
</td>`
+
`<td>
${
that
.
formateYaxisValue
(
parma
.
value
[
1
])}
</td>`
+
`<td>
${
that
.
formateYaxisValue
(
`<td>
${
that
.
formateYaxisValue
(
...
@@ -1292,16 +1274,6 @@ export default {
...
@@ -1292,16 +1274,6 @@ export default {
window
.
addEventListener
(
'
resize
'
,
this
.
resizeCallback
,
false
);
window
.
addEventListener
(
'
resize
'
,
this
.
resizeCallback
,
false
);
},
},
/**
* Initialize the color array
*/
initAvlColorArr
()
{
const
length
=
this
.
defColorCount
;
for
(
let
i
=
0
;
i
<
length
;
i
++
)
{
this
.
curAvlColorIndexArr
.
push
(
i
);
}
},
/**
/**
* Clear data
* Clear data
...
@@ -1368,16 +1340,13 @@ export default {
...
@@ -1368,16 +1340,13 @@ export default {
const
tagList
=
[];
// tag list
const
tagList
=
[];
// tag list
let
dataRemoveFlag
=
false
;
let
dataRemoveFlag
=
false
;
// Obtains the current tag and run list
// Obtains the current tag and run list
oriData
.
forEach
((
runObj
,
runIndex
)
=>
{
oriData
.
tags
.
forEach
((
tagObj
)
=>
{
runObj
.
tags
.
forEach
((
tagObj
)
=>
{
let
sameTagIndex
=
tagList
.
indexOf
(
tagObj
);
let
sameTagIndex
=
tagList
.
indexOf
(
tagObj
);
if
(
sameTagIndex
===
-
1
)
{
if
(
sameTagIndex
===
-
1
)
{
sameTagIndex
=
tagList
.
length
;
sameTagIndex
=
tagList
.
length
;
tagList
.
push
(
tagObj
);
tagList
.
push
(
tagObj
);
}
}
});
});
});
// Delete the tag that does not exist
// Delete the tag that does not exist
const
oldTagListLength
=
this
.
tagOperateList
.
length
;
const
oldTagListLength
=
this
.
tagOperateList
.
length
;
for
(
let
i
=
oldTagListLength
-
1
;
i
>=
0
;
i
--
)
{
for
(
let
i
=
oldTagListLength
-
1
;
i
>=
0
;
i
--
)
{
...
@@ -1419,59 +1388,44 @@ export default {
...
@@ -1419,59 +1388,44 @@ export default {
return
false
;
return
false
;
}
}
let
dataAddFlag
=
false
;
let
dataAddFlag
=
false
;
oriData
.
forEach
((
runObj
)
=>
{
// oriData.forEach((runObj) => {
const
colorIndex
=
this
.
curAvlColorIndexArr
.
length
const
runColor
=
CommonProperty
.
commonColorArr
[
0
];
?
this
.
curAvlColorIndexArr
.
shift
()
oriData
.
tags
.
forEach
((
tagObj
)
=>
{
:
this
.
defColorCount
-
1
;
let
sameTagIndex
=
-
1
;
const
runColor
=
CommonProperty
.
commonColorArr
[
colorIndex
];
this
.
tagOperateList
.
some
((
tagItem
,
tagIndex
)
=>
{
runObj
.
tags
.
forEach
((
tagObj
)
=>
{
if
(
tagItem
.
label
===
tagObj
)
{
let
sameTagIndex
=
-
1
;
sameTagIndex
=
tagIndex
;
this
.
tagOperateList
.
some
((
tagItem
,
tagIndex
)
=>
{
return
true
;
if
(
tagItem
.
label
===
tagObj
)
{
sameTagIndex
=
tagIndex
;
return
true
;
}
});
if
(
sameTagIndex
===
-
1
)
{
this
.
tagOperateList
.
push
({
label
:
tagObj
,
checked
:
true
,
show
:
false
,
});
const
sampleIndex
=
this
.
originDataArr
.
length
;
dataAddFlag
=
true
;
this
.
originDataArr
.
push
({
tagName
:
tagObj
,
runNames
:
[
runObj
.
name
],
runId
:
[
runObj
.
id
],
colors
:
[
runColor
],
show
:
false
,
updateFlag
:
false
,
dataRemove
:
false
,
fullScreen
:
false
,
sampleIndex
:
sampleIndex
,
domId
:
'
prDom
'
+
this
.
DomIdIndex
,
charData
:
{
oriData
:
[],
charOption
:
{},
},
zoomData
:
[
null
,
null
],
zoomDataTimer
:
null
,
charObj
:
null
,
});
this
.
DomIdIndex
++
;
}
else
{
const
sameSampleObj
=
this
.
originDataArr
[
sameTagIndex
];
if
(
sameSampleObj
&&
sameSampleObj
.
runNames
.
indexOf
(
runObj
.
name
)
===
-
1
)
{
sameSampleObj
.
runNames
.
push
(
runObj
.
name
);
sameSampleObj
.
runId
.
push
(
runObj
.
id
);
sameSampleObj
.
colors
.
push
(
runColor
);
}
}
}
});
});
if
(
sameTagIndex
===
-
1
)
{
this
.
tagOperateList
.
push
({
label
:
tagObj
,
checked
:
true
,
show
:
false
,
});
const
sampleIndex
=
this
.
originDataArr
.
length
;
dataAddFlag
=
true
;
this
.
originDataArr
.
push
({
tagName
:
tagObj
,
runNames
:
oriData
.
name
,
colors
:
runColor
,
show
:
false
,
updateFlag
:
false
,
dataRemove
:
false
,
fullScreen
:
false
,
sampleIndex
:
sampleIndex
,
domId
:
'
prDom
'
+
this
.
DomIdIndex
,
charData
:
{
oriData
:
[],
charOption
:
{},
},
zoomData
:
[
null
,
null
],
zoomDataTimer
:
null
,
charObj
:
null
,
});
this
.
DomIdIndex
++
;
}
});
});
return
dataAddFlag
;
return
dataAddFlag
;
...
@@ -1540,7 +1494,7 @@ export default {
...
@@ -1540,7 +1494,7 @@ export default {
this
.
clearAllData
();
this
.
clearAllData
();
return
;
return
;
}
}
const
data
=
res
.
data
.
train_jobs
;
const
data
=
res
.
data
.
train_jobs
[
0
]
;
// Delete the data that does not exist
// Delete the data that does not exist
const
tagRemoveFlag
=
this
.
removeNonexistentData
(
data
);
const
tagRemoveFlag
=
this
.
removeNonexistentData
(
data
);
...
@@ -1561,23 +1515,20 @@ export default {
...
@@ -1561,23 +1515,20 @@ export default {
const
tempTagList
=
[];
const
tempTagList
=
[];
const
propsList
=
[];
const
propsList
=
[];
data
.
forEach
((
runObj
,
runObjectIndex
)
=>
{
// Initial chart data
// Initial chart data
runObj
.
tags
.
forEach
((
tagObj
)
=>
{
data
.
tags
.
forEach
((
tagObj
)
=>
{
// Check whether the tag with the same name exists
// Check whether the tag with the same name exists
tempTagList
.
push
({
tempTagList
.
push
({
label
:
tagObj
,
label
:
tagObj
,
checked
:
true
,
checked
:
true
,
show
:
true
,
show
:
true
,
});
});
// Add the tag list.
// Add the tag list.
propsList
.
push
({
propsList
.
push
({
tagName
:
tagObj
,
tagName
:
tagObj
,
runNames
:
[
runObj
.
name
],
runNames
:
data
.
name
,
runId
:
[
runObj
.
id
],
colors
:
''
,
colors
:
[],
});
});
});
});
});
this
.
tagPropsList
=
tempTagList
;
this
.
tagPropsList
=
tempTagList
;
...
@@ -1796,18 +1747,12 @@ export default {
...
@@ -1796,18 +1747,12 @@ export default {
if
(
this
.
abort
)
{
if
(
this
.
abort
)
{
this
.
curPageArr
.
forEach
((
sampleObject
)
=>
{
this
.
curPageArr
.
forEach
((
sampleObject
)
=>
{
let
runCount
=
sampleObject
.
runNames
.
length
;
this
.
$nextTick
(()
=>
{
sampleObject
.
runNames
.
forEach
((
runName
,
runNameIndex
)
=>
{
// Draw chart
runCount
--
;
if
(
!
this
.
compare
)
{
if
(
runCount
===
0
)
{
this
.
updateOrCreateChar
(
sampleObject
.
sampleIndex
);
this
.
$nextTick
(()
=>
{
}
else
{
// Draw chart
this
.
abort
=
true
;
if
(
!
this
.
compare
)
{
this
.
updateOrCreateChar
(
sampleObject
.
sampleIndex
);
}
else
{
this
.
abort
=
true
;
}
});
}
}
});
});
});
});
...
...
mindinsight/ui/src/views/train-manage/training-dashboard.vue
浏览文件 @
623155e7
...
@@ -29,7 +29,7 @@ limitations under the License.
...
@@ -29,7 +29,7 @@ limitations under the License.
<div
class=
"cl-dashboard-title"
>
{{
$t
(
"
trainingDashboard.trainingScalar
"
)
}}
</div>
<div
class=
"cl-dashboard-title"
>
{{
$t
(
"
trainingDashboard.trainingScalar
"
)
}}
</div>
<div
class=
"cl-module"
>
<div
class=
"cl-module"
>
<div
class=
"cl-scalar-tagName"
<div
class=
"cl-scalar-tagName"
v-
if
=
"curPageArr.length && !wrongPlugin"
>
v-
show
=
"curPageArr.length && !wrongPlugin"
>
<div
v-for=
"(sampleItem,index) in curPageArr"
<div
v-for=
"(sampleItem,index) in curPageArr"
:key=
"index"
:key=
"index"
:class=
"['tagNameLeft',index==1? 'tagNameRight':'']"
>
:class=
"['tagNameLeft',index==1? 'tagNameRight':'']"
>
...
@@ -37,10 +37,10 @@ limitations under the License.
...
@@ -37,10 +37,10 @@ limitations under the License.
</div>
</div>
</div>
</div>
<div
id=
"module-chart"
<div
id=
"module-chart"
v-
if
=
"curPageArr.length && !wrongPlugin"
v-
show
=
"curPageArr.length && !wrongPlugin"
key=
"chart-data"
></div>
key=
"chart-data"
></div>
<div
class=
"no-data-img"
<div
class=
"no-data-img"
v-
if
=
"!curPageArr.length || wrongPlugin"
v-
show
=
"!curPageArr.length || wrongPlugin"
key=
"no-chart-data"
>
key=
"no-chart-data"
>
<img
:src=
"require('@/assets/images/nodata.png')"
<img
:src=
"require('@/assets/images/nodata.png')"
alt=
""
/>
alt=
""
/>
...
@@ -107,12 +107,12 @@ limitations under the License.
...
@@ -107,12 +107,12 @@ limitations under the License.
:class=
"originImageDataArr.length && !wrongPlugin ? '' : 'no-data-img'"
>
:class=
"originImageDataArr.length && !wrongPlugin ? '' : 'no-data-img'"
>
<img
class=
"sample-img select-disable"
<img
class=
"sample-img select-disable"
:src=
"curImageShowSample.curImgUrl"
:src=
"curImageShowSample.curImgUrl"
v-
if
=
"originImageDataArr.length && !wrongPlugin"
>
v-
show
=
"originImageDataArr.length && !wrongPlugin"
>
<img
:src=
"require('@/assets/images/nodata.png')"
<img
:src=
"require('@/assets/images/nodata.png')"
alt=
""
alt=
""
v-
if
=
"!originImageDataArr.length || wrongPlugin"
>
v-
show
=
"!originImageDataArr.length || wrongPlugin"
>
<p
class=
'no-data-text'
<p
class=
'no-data-text'
v-
if
=
" !originImageDataArr.length || wrongPlugin"
>
v-
show
=
" !originImageDataArr.length || wrongPlugin"
>
{{
$t
(
"
public.noData
"
)
}}
{{
$t
(
"
public.noData
"
)
}}
</p>
</p>
</div>
</div>
...
@@ -615,7 +615,7 @@ export default {
...
@@ -615,7 +615,7 @@ export default {
},
},
grid
:
{
grid
:
{
top
:
20
,
top
:
20
,
bottom
:
50
,
bottom
:
66
,
left
:
66
,
left
:
66
,
right
:
60
,
right
:
60
,
},
},
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录