Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MindSpore
mindinsight
提交
84647841
M
mindinsight
项目概览
MindSpore
/
mindinsight
通知
8
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看板
提交
84647841
编写于
7月 17, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
7月 17, 2020
浏览文件
操作
浏览文件
下载
差异文件
!435 UI display the error message in table area
Merge pull request !435 from 夏易凡/0710master
上级
34074440
c7a6d089
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
148 addition
and
33 deletion
+148
-33
mindinsight/ui/src/components/gridTableSimple.vue
mindinsight/ui/src/components/gridTableSimple.vue
+24
-3
mindinsight/ui/src/services/fetcher.js
mindinsight/ui/src/services/fetcher.js
+3
-0
mindinsight/ui/src/views/train-manage/tensor.vue
mindinsight/ui/src/views/train-manage/tensor.vue
+70
-21
mindinsight/ui/src/views/train-manage/training-dashboard.vue
mindinsight/ui/src/views/train-manage/training-dashboard.vue
+51
-9
未找到文件。
mindinsight/ui/src/components/gridTableSimple.vue
浏览文件 @
84647841
...
...
@@ -20,7 +20,11 @@ limitations under the License.
class=
"error-msg-container"
>
{{
$t
(
'
components.gridIncorrectDataError
'
)
}}
</div>
<div
v-show=
"!fullData.length && updated && !incorrectData"
<div
v-show=
"!incorrectData && requestError"
class=
"error-msg-container"
>
{{
errorMsg
}}
</div>
<div
v-show=
"!fullData.length && updated && !incorrectData && !requestError"
class=
"error-msg-container"
>
{{
$t
(
'
components.gridTableNoData
'
)
}}
</div>
...
...
@@ -29,7 +33,7 @@ limitations under the License.
class=
"grid-item"
></div>
</div>
<div
class=
"operate-container"
v-if=
"
showOperate && fullData.length
"
>
v-if=
"
(showOperate && fullData.length) || requestError
"
>
<div
class=
"filter-container"
@
keyup.enter=
"filterChange"
>
<div
v-for=
"(item, itemIndex) in filterArr"
...
...
@@ -114,6 +118,8 @@ export default {
updated
:
false
,
// Updated
scrollTop
:
false
,
// Wheather scroll to the top
filterCorrect
:
true
,
// Wheather the dimension input is correct
requestError
:
false
,
// Exceeded the specification
errorMsg
:
''
,
// Error message
viewResizeFlag
:
false
,
// Size reset flag
// Accuray options
accuracyArr
:
[
...
...
@@ -126,6 +132,7 @@ export default {
],
// Table configuration items
optionObj
:
{
enableColumnReorder
:
false
,
enableCellNavigation
:
true
,
frozenColumn
:
0
,
frozenRow
:
0
,
...
...
@@ -348,6 +355,7 @@ export default {
*/
updateGridData
(
newDataFlag
,
dimension
,
statistics
,
filterStr
)
{
this
.
updated
=
true
;
this
.
requestError
=
false
;
this
.
$nextTick
(()
=>
{
if
(
!
this
.
fullData
||
!
this
.
fullData
.
length
)
{
return
;
...
...
@@ -369,7 +377,7 @@ export default {
*/
resizeView
()
{
if
(
this
.
gridObj
)
{
if
(
this
.
incorrectData
)
{
if
(
this
.
incorrectData
||
this
.
requestError
)
{
this
.
viewResizeFlag
=
true
;
}
else
{
this
.
$nextTick
(()
=>
{
...
...
@@ -385,6 +393,19 @@ export default {
toggleFullScreen
()
{
this
.
$emit
(
'
toggleFullScreen
'
);
},
/**
* Show Error message
* @param {String} errorMsg Error message
* @param {Array} dimension Array of dimension
* @param {String} filterStr String of dimension selection
*/
showRequestErrorMessage
(
errorMsg
,
dimension
,
filterStr
)
{
this
.
errorMsg
=
errorMsg
;
if
(
!
this
.
filterArr
.
length
)
{
this
.
initializeFilterArr
(
dimension
,
filterStr
);
}
this
.
requestError
=
true
;
},
},
destroyed
()
{},
};
...
...
mindinsight/ui/src/services/fetcher.js
浏览文件 @
84647841
...
...
@@ -61,6 +61,9 @@ axios.interceptors.response.use(
}
else
if
(
router
.
currentRoute
.
path
===
'
/profiling/profiling-dashboard
'
&&
error
.
config
.
headers
.
ignoreError
)
{
return
Promise
.
reject
(
error
);
}
else
if
(
error
.
response
.
data
.
error_code
.
toString
()
===
'
50545013
'
&&
router
.
currentRoute
.
path
===
'
/train-manage/tensor
'
)
{
return
Promise
.
reject
(
error
);
}
if
(
errorData
[
error
.
response
.
data
.
error_code
])
{
Vue
.
prototype
.
$message
.
error
(
errorData
[
error
.
response
.
data
.
error_code
]);
...
...
mindinsight/ui/src/views/train-manage/tensor.vue
浏览文件 @
84647841
...
...
@@ -117,6 +117,9 @@ limitations under the License.
:viewName=
"curViewName"
:axisName=
"curAxisName"
:fullData=
"sampleItem.curData"
></histogramUntil>
<div
class=
"loading-cover"
v-if=
"sampleItem.showLoading"
>
<i
class=
"el-icon-loading"
></i></div>
</div>
<!-- Information display area -->
<div
class=
"sample-data-show"
...
...
@@ -378,6 +381,7 @@ export default {
tagName
:
tagName
,
summaryName
:
this
.
trainingJobId
,
show
:
false
,
showLoading
:
false
,
sliderValue
:
0
,
newDataFlag
:
true
,
totalStepNum
:
0
,
...
...
@@ -415,6 +419,7 @@ export default {
* @param {Object} sampleItem The object that is being operated
*/
filterChange
(
data
,
sampleItem
)
{
sampleItem
.
showLoading
=
true
;
sampleItem
.
filterStr
=
`[
${
data
.
toString
()}
]`
;
sampleItem
.
newDataFlag
=
true
;
this
.
freshtMartixData
(
sampleItem
);
...
...
@@ -517,24 +522,30 @@ export default {
tag
:
sampleItem
.
tagName
,
detail
:
'
histogram
'
,
};
RequestService
.
getTensorsSample
(
params
).
then
((
res
)
=>
{
if
(
!
res
||
!
res
.
data
||
!
this
.
curDataType
)
{
return
;
}
if
(
!
res
.
data
.
tensors
||
!
res
.
data
.
tensors
.
length
)
{
return
;
}
const
resData
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
.
tensors
[
0
]));
sampleItem
.
summaryName
=
resData
.
train_id
;
// sampleItem.fullData = resData;
sampleItem
.
curData
=
this
.
formHistogramOriData
(
resData
);
this
.
$nextTick
(()
=>
{
const
elementItem
=
this
.
$refs
[
sampleItem
.
ref
];
if
(
elementItem
)
{
elementItem
[
0
].
updateHistogramData
();
}
});
});
RequestService
.
getTensorsSample
(
params
).
then
(
(
res
)
=>
{
sampleItem
.
showLoading
=
false
;
if
(
!
res
||
!
res
.
data
||
!
this
.
curDataType
)
{
return
;
}
if
(
!
res
.
data
.
tensors
||
!
res
.
data
.
tensors
.
length
)
{
return
;
}
const
resData
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
.
tensors
[
0
]));
sampleItem
.
summaryName
=
resData
.
train_id
;
// sampleItem.fullData = resData;
sampleItem
.
curData
=
this
.
formHistogramOriData
(
resData
);
this
.
$nextTick
(()
=>
{
const
elementItem
=
this
.
$refs
[
sampleItem
.
ref
];
if
(
elementItem
)
{
elementItem
[
0
].
updateHistogramData
();
}
});
},
()
=>
{
sampleItem
.
showLoading
=
false
;
},
);
},
/**
* Obtain table data
...
...
@@ -549,9 +560,11 @@ export default {
RequestService
.
getTensorsSample
(
params
).
then
(
(
res
)
=>
{
if
(
!
res
||
!
res
.
data
||
this
.
curDataType
)
{
sampleItem
.
showLoading
=
false
;
return
;
}
if
(
!
res
.
data
.
tensors
.
length
)
{
sampleItem
.
showLoading
=
false
;
return
;
}
const
resData
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
.
tensors
[
0
]));
...
...
@@ -567,6 +580,7 @@ export default {
sampleItem
.
sliderValue
=
0
;
sampleItem
.
totalStepNum
=
0
;
this
.
clearMartixData
(
sampleItem
);
sampleItem
.
showLoading
=
false
;
return
;
}
const
oldTotalStepNum
=
sampleItem
.
totalStepNum
;
...
...
@@ -610,6 +624,7 @@ export default {
sampleItem
.
sliderValue
=
0
;
sampleItem
.
totalStepNum
=
0
;
this
.
clearMartixData
(
sampleItem
);
sampleItem
.
showLoading
=
false
;
},
);
},
...
...
@@ -628,6 +643,7 @@ export default {
sampleItem
.
curMartixShowSliderValue
=
sampleItem
.
sliderValue
;
RequestService
.
getTensorsSample
(
params
).
then
(
(
res
)
=>
{
sampleItem
.
showLoading
=
false
;
if
(
!
res
||
!
res
.
data
||
this
.
curDataType
)
{
return
;
}
...
...
@@ -660,16 +676,27 @@ export default {
sampleItem
.
newDataFlag
=
false
;
});
},
()
=>
{
this
.
clearMartixData
(
sampleItem
);
(
e
)
=>
{
let
showLimitError
=
false
;
if
(
e
.
response
&&
e
.
response
.
data
&&
e
.
response
.
data
.
error_code
&&
e
.
response
.
data
.
error_code
.
toString
()
===
'
50545013
'
)
{
showLimitError
=
true
;
}
this
.
clearMartixData
(
sampleItem
,
showLimitError
);
sampleItem
.
showLoading
=
false
;
},
);
},
/**
* Clear table display
* @param {Object} sampleItem The object that is being operated
* @param {Boolean} showLimitError Display request error message
*/
clearMartixData
(
sampleItem
)
{
clearMartixData
(
sampleItem
,
showLimitError
)
{
sampleItem
.
curData
=
[];
sampleItem
.
newDataFlag
=
true
;
let
elementItem
=
null
;
...
...
@@ -677,6 +704,13 @@ export default {
elementItem
=
this
.
$refs
[
sampleItem
.
ref
];
if
(
elementItem
)
{
elementItem
[
0
].
updateGridData
();
if
(
showLimitError
)
{
elementItem
[
0
].
showRequestErrorMessage
(
this
.
$t
(
'
error.50545013
'
),
sampleItem
.
formateData
.
value
.
dims
,
sampleItem
.
filterStr
,
);
}
}
});
},
...
...
@@ -917,6 +951,7 @@ export default {
tagName
:
tagName
,
summaryName
:
this
.
trainingJobId
,
show
:
false
,
showLoading
:
false
,
sliderValue
:
0
,
newDataFlag
:
true
,
totalStepNum
:
0
,
...
...
@@ -981,6 +1016,7 @@ export default {
return
;
}
sampleItem
.
sliderChangeTimer
=
setTimeout
(()
=>
{
sampleItem
.
showLoading
=
true
;
this
.
freshtMartixData
(
sampleItem
);
},
500
);
},
...
...
@@ -1112,6 +1148,19 @@ export default {
position
:
relative
;
background
:
#f0f3fa
;
overflow-x
:
hidden
;
.loading-cover
{
width
:
100%
;
height
:
100%
;
z-index
:
9
;
position
:
absolute
;
top
:
0
;
left
:
0
;
display
:
flex
;
background
:
white
;
opacity
:
0
.5
;
align-items
:
center
;
justify-content
:
center
;
}
}
.sample-data-show
{
padding
:
32px
16px
;
...
...
mindinsight/ui/src/views/train-manage/training-dashboard.vue
浏览文件 @
84647841
...
...
@@ -148,7 +148,9 @@ limitations under the License.
</div>
<div
class=
"cl-dashboard-con-up"
:class=
"!!tensorTag && !wrongPlugin ? '' : 'no-data-hover'"
@
click=
"viewMoreTensors"
>
@
mousedown=
"viewMoreTensors($event)"
@
mouseup=
"viewMoreTensors($event)"
@
click=
"viewMoreTensors($event)"
>
<div
class=
"cl-dashboard-title"
>
{{
$t
(
"
tensors.titleText
"
)
}}
</div>
<div
class=
"cl-module"
>
<div
class=
"tensor-char-container"
...
...
@@ -220,6 +222,18 @@ export default {
fileTag
:
''
,
tensorData
:
[],
tensorTag
:
''
,
tensorNewDataFlag
:
true
,
tensorMouseData
:
{
timeStamp
:
0
,
pageX
:
0
,
pageY
:
0
,
isClick
:
false
,
},
mouseEventKey
:
{
click
:
'
click
'
,
mousedown
:
'
mousedown
'
,
mouseup
:
'
mouseup
'
,
},
};
},
computed
:
{
...
...
@@ -413,17 +427,39 @@ export default {
},
/**
* Viewing more tensors information
* @param {Object} event Mouse event
*/
viewMoreTensors
()
{
viewMoreTensors
(
event
)
{
if
(
!
this
.
tensorTag
)
{
return
;
}
this
.
$router
.
push
({
path
:
'
/train-manage/tensor
'
,
query
:
{
train_id
:
this
.
trainingJobId
,
},
});
if
(
event
.
type
===
this
.
mouseEventKey
.
mousedown
)
{
this
.
tensorMouseData
.
isClick
=
false
;
this
.
tensorMouseData
.
pageX
=
event
.
pageX
;
this
.
tensorMouseData
.
pageY
=
event
.
pageY
;
}
else
if
(
event
.
type
===
this
.
mouseEventKey
.
mouseup
)
{
// offset buffer is 3
const
offsetBuffer
=
3
;
if
(
Math
.
abs
(
event
.
pageX
-
this
.
tensorMouseData
.
pageX
)
<=
offsetBuffer
&&
Math
.
abs
(
event
.
pageY
-
this
.
tensorMouseData
.
pageY
)
<=
offsetBuffer
)
{
this
.
tensorMouseData
.
isClick
=
true
;
this
.
tensorMouseData
.
timeStamp
=
event
.
timeStamp
;
}
}
else
if
(
event
.
type
===
this
.
mouseEventKey
.
click
)
{
if
(
this
.
tensorMouseData
.
isClick
&&
event
.
timeStamp
===
this
.
tensorMouseData
.
timeStamp
)
{
this
.
$router
.
push
({
path
:
'
/train-manage/tensor
'
,
query
:
{
train_id
:
this
.
trainingJobId
,
},
});
}
}
},
/**
* Go to data.
...
...
@@ -828,11 +864,17 @@ export default {
this
.
getSampleRandomly
();
},
dealTensorData
(
tags
)
{
const
oldTag
=
this
.
tensorTag
;
if
(
tags
.
length
)
{
this
.
tensorTag
=
tags
[
0
];
}
else
{
this
.
tensorTag
=
''
;
}
if
(
this
.
tensorTag
!==
oldTag
)
{
this
.
tensorNewDataFlag
=
true
;
}
else
{
this
.
tensorNewDataFlag
=
false
;
}
if
(
this
.
tensorTag
)
{
this
.
getTensorGridData
();
}
...
...
@@ -920,7 +962,7 @@ export default {
const
elementItem
=
this
.
$refs
.
tensorChart
;
if
(
elementItem
)
{
elementItem
.
updateGridData
(
t
rue
,
t
his
.
tensorNewDataFlag
,
curStepData
.
value
.
dims
,
statistics
,
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录