From 87e03965e58f8a0bff78d9a69b195360da9fcc5a Mon Sep 17 00:00:00 2001 From: WeiFeng Date: Thu, 28 May 2020 16:03:09 +0800 Subject: [PATCH] profiler --- mindinsight/ui/src/locales/zh-cn.json | 2 +- .../ui/src/views/train-manage/profiler.vue | 28 ++++++++----------- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/mindinsight/ui/src/locales/zh-cn.json b/mindinsight/ui/src/locales/zh-cn.json index 05f39c6..0f2af04 100644 --- a/mindinsight/ui/src/locales/zh-cn.json +++ b/mindinsight/ui/src/locales/zh-cn.json @@ -78,7 +78,7 @@ "userDefinedLabel": "User Defined", "hyperLabel": "Hyper", "otherLabel": "其他", - "remarkTips": "提示:终止服务后备注及tag信息将被清除" + "remarkTips": "提示:终止服务后备注及tag将被清除" }, "dataTraceback": { "details": "详情", diff --git a/mindinsight/ui/src/views/train-manage/profiler.vue b/mindinsight/ui/src/views/train-manage/profiler.vue index c427fc9..d2f5660 100644 --- a/mindinsight/ui/src/views/train-manage/profiler.vue +++ b/mindinsight/ui/src/views/train-manage/profiler.vue @@ -61,12 +61,10 @@ @@ -90,6 +88,8 @@ :property="ele" :key="key" :sortable="ele === 'op_info' ? false : 'custom'" + :width="(ele==='execution_time'|| ele==='subgraph' || + ele==='op_name'|| ele==='op_type')?'220':''" show-overflow-tooltip :label="ele"> @@ -124,6 +124,8 @@ :key="$index" :label="item" :sortable="item === 'op_info' ? false : 'custom'" + :width="(item==='execution_time'|| item==='subgraph' || + item==='op_name'|| item==='op_type')?'220':''" show-overflow-tooltip> @@ -168,7 +170,6 @@ @@ -814,7 +815,8 @@ export default { option.xAxis = { type: 'category', axisLabel: { - interval: 1, + interval: 0, + rotate: -30, }, data: [], }; @@ -822,7 +824,7 @@ export default { left: 50, top: 20, right: 0, - bottom: 30, + bottom: 50, }; option.yAxis = { type: 'value', @@ -925,7 +927,7 @@ export default { const item = {}; item.key = k; item.value = dataObj[key][k]; - item.id = (index + 1) * 10 + 1 + j; + item.id = item.key + Math.random(); tempData.children.push(item); }); } @@ -955,20 +957,12 @@ export default { }, }, mounted() { - 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.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 { - document.title = this.$t('profiler.titleText') + '-MindInsight'; + document.title = `${this.$t('profiler.titleText')}-MindInsight`; } this.init(); window.addEventListener('resize', this.resizeCallback, false); -- GitLab