提交 ec82133c 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!229 UI add histogram clear data logic & modify graph default color &...

!229 UI add histogram clear data logic & modify graph default color & highlight profiler default sort icon 
Merge pull request !229 from 夏易凡/yf-master
...@@ -2989,7 +2989,7 @@ export default { ...@@ -2989,7 +2989,7 @@ export default {
padding: 0; padding: 0;
} }
#inside-box { #inside-box {
background-color: #c0d3ff; background-color: #5b88f1;
position: absolute; position: absolute;
/* Transparency */ /* Transparency */
opacity: 0.3; opacity: 0.3;
......
...@@ -121,6 +121,7 @@ ...@@ -121,6 +121,7 @@
<el-table v-show="statisticType === 1 && opAllTypeList.opDetailCol && opAllTypeList.opDetailCol.length" <el-table v-show="statisticType === 1 && opAllTypeList.opDetailCol && opAllTypeList.opDetailCol.length"
:data="opAllTypeList.opDetailList" :data="opAllTypeList.opDetailList"
stripe stripe
ref="opAllTable"
width="100%" width="100%"
height="calc(100% - 114px)" height="calc(100% - 114px)"
@cell-click="showInfoDetail" @cell-click="showInfoDetail"
...@@ -529,13 +530,18 @@ export default { ...@@ -529,13 +530,18 @@ export default {
if (res && res.data) { if (res && res.data) {
this.formatterDetailData(row, res.data); this.formatterDetailData(row, res.data);
this.$nextTick(() => { this.$nextTick(() => {
const item = this.$refs['expandChild']; let item = null;
if (item) { if (this.statisticType) {
item = this.$refs['opAllTable'];
} else {
item = this.$refs['expandChild'];
this.curActiveRow = { this.curActiveRow = {
rowItem: row, rowItem: row,
childProp: row.op_sort_condition.name, childProp: row.op_sort_condition.name,
childOrder: row.op_sort_condition.type, childOrder: row.op_sort_condition.type,
}; };
}
if (item) {
item.sort( item.sort(
row.op_sort_condition.name, row.op_sort_condition.name,
row.op_sort_condition.type, row.op_sort_condition.type,
...@@ -1030,7 +1036,7 @@ export default { ...@@ -1030,7 +1036,7 @@ export default {
if (this.$route.query && this.$route.query.dir && this.$route.query.id) { if (this.$route.query && this.$route.query.dir && this.$route.query.id) {
this.profile_dir = this.$route.query.dir; this.profile_dir = this.$route.query.dir;
this.train_id = this.$route.query.id; this.train_id = this.$route.query.id;
document.title = `${ decodeURIComponent(this.train_id)}-${this.$t('profiler.titleText')}-MindInsight`; document.title = `${decodeURIComponent(this.train_id)}-${this.$t('profiler.titleText')}-MindInsight`;
} else { } else {
document.title = `${this.$t('profiler.titleText')}-MindInsight`; document.title = `${this.$t('profiler.titleText')}-MindInsight`;
} }
......
...@@ -292,9 +292,14 @@ export default { ...@@ -292,9 +292,14 @@ export default {
if (this.$route.query && this.$route.query.id) { if (this.$route.query && this.$route.query.id) {
this.trainingJobId = this.$route.query.id; this.trainingJobId = this.$route.query.id;
this.summaryPath = decodeURIComponent(this.trainingJobId); this.summaryPath = decodeURIComponent(this.trainingJobId);
document.title = this.summaryPath + '-' + this.$t('trainingDashboard.trainingDashboardTitle') + '-MindInsight'; document.title =
this.summaryPath +
'-' +
this.$t('trainingDashboard.trainingDashboardTitle') +
'-MindInsight';
} else { } else {
document.title = this.$t('trainingDashboard.trainingDashboardTitle') + '-MindInsight'; document.title =
this.$t('trainingDashboard.trainingDashboardTitle') + '-MindInsight';
this.trainingJobId = ''; this.trainingJobId = '';
this.$message.error(this.$t('trainingDashboard.invalidId')); this.$message.error(this.$t('trainingDashboard.invalidId'));
} }
...@@ -790,6 +795,7 @@ export default { ...@@ -790,6 +795,7 @@ export default {
histogramTag = this.histogramTag; histogramTag = this.histogramTag;
} }
if (!histogramTag) { if (!histogramTag) {
this.histogramTag = histogramTag;
return; return;
} }
const params = { const params = {
...@@ -797,21 +803,26 @@ export default { ...@@ -797,21 +803,26 @@ export default {
tag: histogramTag, tag: histogramTag,
}; };
// tag // tag
RequestService.getHistogramData(params).then((res) => { RequestService.getHistogramData(params).then(
if ( (res) => {
!res || if (
!res.data || !res ||
!res.data.histograms || !res.data ||
!res.data.histograms.length !res.data.histograms ||
) { !res.data.histograms.length
return; ) {
} return;
const data = JSON.parse(JSON.stringify(res.data)); }
this.histogramTag = histogramTag; const data = JSON.parse(JSON.stringify(res.data));
this.histogramData = this.formOriData(data); this.histogramTag = histogramTag;
this.formatDataToChar(); this.histogramData = this.formOriData(data);
this.updateHistogramSampleData(); this.formatDataToChar();
}); this.updateHistogramSampleData();
},
(e) => {
this.histogramTag = '';
},
);
}, },
formOriData(dataItem) { formOriData(dataItem) {
const chartData = []; const chartData = [];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册