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

!360 Modify the problem of the operator name in the pie chart not completely displayed

Merge pull request !360 from 黄伟锋/r0.5
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
"desc" "desc"
], ],
"url": [ "url": [
"https://www.mindspore.cn/tutorial/zh-CN/master/advanced_use/visualization_tutorials.html" "https://www.mindspore.cn/tutorial/zh-CN/master/advanced_use/performance_profiling.html"
] ]
}, },
"step_trace-proposer_type_label": { "step_trace-proposer_type_label": {
......
...@@ -70,14 +70,15 @@ limitations under the License. ...@@ -70,14 +70,15 @@ limitations under the License.
<div class="cell-container device_queue_op" <div class="cell-container device_queue_op"
@click="highlight('device_queue_op')" @click="highlight('device_queue_op')"
clickKey="device_queue_op" clickKey="device_queue_op"
:style="{cursor: processSummary.count !== processSummary.maxCount ? 'default' : 'pointer'}"
v-show="!processSummary.noData"> v-show="!processSummary.noData">
<div class="title"> <div class="title">
{{$t('profiling.deviceQueueOpTip')}} {{$t('profiling.deviceQueueOp')}}
</div> </div>
</div> </div>
<div class="queue-container" <div class="queue-container"
v-show="processSummary.count === 6 && !processSummary.noData"> v-show="processSummary.count === processSummary.maxCount && !processSummary.noData">
<div class="img"> <div class="img">
<div class="edge"> <div class="edge">
<img src="@/assets/images/data-flow.png" <img src="@/assets/images/data-flow.png"
...@@ -116,7 +117,7 @@ limitations under the License. ...@@ -116,7 +117,7 @@ limitations under the License.
<div class="cell-container get-next" <div class="cell-container get-next"
@click="highlight('get_next')" @click="highlight('get_next')"
clickKey="get_next" clickKey="get_next"
v-if="processSummary.count === 6 && !processSummary.noData"> v-if="processSummary.count === processSummary.maxCount && !processSummary.noData">
<div class="title"> <div class="title">
{{$t('profiling.getData')}} {{$t('profiling.getData')}}
</div> </div>
...@@ -126,7 +127,7 @@ limitations under the License. ...@@ -126,7 +127,7 @@ limitations under the License.
v-if="!(connectQueueChart.noData && dataQueueChart.noData && deviceQueueOpChart v-if="!(connectQueueChart.noData && dataQueueChart.noData && deviceQueueOpChart
&& getNextChart.getNextChart)"> && getNextChart.getNextChart)">
<div class="queue-step-wrap" <div class="queue-step-wrap"
v-if="processSummary.count === 6"> v-if="processSummary.count === processSummary.maxCount">
<div class="title">{{$t('profiling.queueStep')}}</div> <div class="title">{{$t('profiling.queueStep')}}</div>
<div class="chart-content"> <div class="chart-content">
<div class="chart-wrap" <div class="chart-wrap"
...@@ -164,7 +165,7 @@ limitations under the License. ...@@ -164,7 +165,7 @@ limitations under the License.
</div> </div>
</div> </div>
<div class="queue-step-wrap" <div class="queue-step-wrap"
v-if="processSummary.count === 6"> v-if="processSummary.count === processSummary.maxCount">
<div class="title">{{$t('profiling.operatorTimeConAnalysis')}}</div> <div class="title">{{$t('profiling.operatorTimeConAnalysis')}}</div>
<div class="chart-content second"> <div class="chart-content second">
<div class="chart-wrap analysis" <div class="chart-wrap analysis"
...@@ -202,7 +203,7 @@ limitations under the License. ...@@ -202,7 +203,7 @@ limitations under the License.
</div> </div>
</div> </div>
<div class="queue-step-wrap single" <div class="queue-step-wrap single"
v-if="processSummary.count !== 6"> v-if="processSummary.count !== processSummary.maxCount">
<div class="title">{{$t('profiling.queueStep')}}</div> <div class="title">{{$t('profiling.queueStep')}}</div>
<div class="chart-content"> <div class="chart-content">
<div class="chart-wrap" <div class="chart-wrap"
...@@ -344,6 +345,7 @@ export default { ...@@ -344,6 +345,7 @@ export default {
processSummary: { processSummary: {
noData: true, noData: true,
count: 6, count: 6,
maxCount: 6,
device: { device: {
empty: 0, empty: 0,
full: 0, full: 0,
...@@ -530,7 +532,6 @@ export default { ...@@ -530,7 +532,6 @@ export default {
xAxis: { xAxis: {
name: 'step', name: 'step',
data: [], data: [],
max: size,
}, },
yAxis: {}, yAxis: {},
series: [], series: [],
...@@ -605,7 +606,7 @@ export default { ...@@ -605,7 +606,7 @@ export default {
this.dealProcess(data); this.dealProcess(data);
this.$nextTick(() => { this.$nextTick(() => {
if (this.processSummary.count < 6) { if (this.processSummary.count < this.processSummary.maxCount) {
this.queryQueueInfo(this.connectQueueChart); this.queryQueueInfo(this.connectQueueChart);
} else { } else {
this.queryQueueInfo(this.connectQueueChart); this.queryQueueInfo(this.connectQueueChart);
...@@ -820,7 +821,6 @@ export default { ...@@ -820,7 +821,6 @@ export default {
data.sample_interval data.sample_interval
}ms`, }ms`,
data: dataY.map((val, index) => index + 1), data: dataY.map((val, index) => index + 1),
max: dataY.length,
}, },
yAxis: { yAxis: {
name: '', name: '',
...@@ -855,6 +855,12 @@ export default { ...@@ -855,6 +855,12 @@ export default {
}); });
}, },
highlight(key) { highlight(key) {
if (
key === 'device_queue_op' &&
this.processSummary.count !== this.processSummary.maxCount
) {
return;
}
const domList = document.querySelectorAll('.md-top *[clickKey]'); const domList = document.querySelectorAll('.md-top *[clickKey]');
Array.prototype.forEach.call(domList, (dom) => { Array.prototype.forEach.call(domList, (dom) => {
if (dom.getAttribute('clickKey') === key) { if (dom.getAttribute('clickKey') === key) {
......
...@@ -818,7 +818,7 @@ export default { ...@@ -818,7 +818,7 @@ export default {
itemHeight: 18, itemHeight: 18,
padding: [0, 50, 0, 0], padding: [0, 50, 0, 0],
top: '5%', top: '5%',
left: '37%', left: '45%',
textStyle: { textStyle: {
padding: [15, 0, 0, 0], padding: [15, 0, 0, 0],
rich: { rich: {
...@@ -850,9 +850,9 @@ export default { ...@@ -850,9 +850,9 @@ export default {
option.series = [ option.series = [
{ {
type: 'pie', type: 'pie',
center: ['20%', '60%'], center: ['25%', '65%'],
data: chart.data, data: chart.data,
radius: '60%', radius: '50%',
lable: { lable: {
position: 'outer', position: 'outer',
alignTo: 'none', alignTo: 'none',
...@@ -1095,10 +1095,10 @@ export default { ...@@ -1095,10 +1095,10 @@ export default {
margin-bottom: 10px; margin-bottom: 10px;
} }
.cl-profiler-top { .cl-profiler-top {
height: 36%; height: 45%;
} }
.cl-profiler-bottom { .cl-profiler-bottom {
height: 64%; height: 55%;
padding-top: 10px; padding-top: 10px;
} }
.cpu-tab { .cpu-tab {
...@@ -1127,6 +1127,7 @@ export default { ...@@ -1127,6 +1127,7 @@ export default {
height: 100%; height: 100%;
min-width: 1300px; min-width: 1300px;
min-height: 232px; min-height: 232px;
overflow: hidden;
} }
} }
.chart-radio-group { .chart-radio-group {
......
...@@ -191,7 +191,7 @@ limitations under the License. ...@@ -191,7 +191,7 @@ limitations under the License.
</div> </div>
<div class="queue-container" <div class="queue-container"
v-if="processSummary.count === 6"> v-if="processSummary.count === processSummary.maxCount">
<div class="img"> <div class="img">
<div class="edge"> <div class="edge">
<img src="@/assets/images/data-flow.png" <img src="@/assets/images/data-flow.png"
...@@ -229,7 +229,7 @@ limitations under the License. ...@@ -229,7 +229,7 @@ limitations under the License.
<div class="cell-container get-next" <div class="cell-container get-next"
clickKey="get_next" clickKey="get_next"
v-if="processSummary.count === 6"> v-if="processSummary.count === processSummary.maxCount">
<div class="title"> <div class="title">
{{$t('profiling.getData')}} {{$t('profiling.getData')}}
</div> </div>
...@@ -390,6 +390,7 @@ export default { ...@@ -390,6 +390,7 @@ export default {
processSummary: { processSummary: {
noData: true, noData: true,
count: 6, count: 6,
maxCount: 6,
device: { device: {
empty: 0, empty: 0,
full: 0, full: 0,
......
...@@ -1674,7 +1674,7 @@ export default { ...@@ -1674,7 +1674,7 @@ export default {
tempOption.visualMap['pieces'] && tempOption.visualMap['pieces'] &&
tempOption.visualMap['pieces'].length > 0 tempOption.visualMap['pieces'].length > 0
) { ) {
tempOption.visualMap = false; tempOption.visualMap = null;
tempOption.series[0].markLine = null; tempOption.series[0].markLine = null;
sampleObject.charObj.setOption(tempOption, true); sampleObject.charObj.setOption(tempOption, true);
...@@ -1810,7 +1810,7 @@ export default { ...@@ -1810,7 +1810,7 @@ export default {
tempCharOption.visualMap['pieces'] && tempCharOption.visualMap['pieces'] &&
tempCharOption.visualMap['pieces'].length > 0 tempCharOption.visualMap['pieces'].length > 0
) { ) {
tempCharOption.visualMap = false; tempCharOption.visualMap = null;
tempCharOption.series[0].markLine = null; tempCharOption.series[0].markLine = null;
tempCharOption.series[0].lineStyle.color = sampleItem.colors; tempCharOption.series[0].lineStyle.color = sampleItem.colors;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册