Browse Source

!117 Modify user guild of graph on ui

Merge pull request !117 from WeiFeng/master_ph
tags/v0.3.0-alpha
mindspore-ci-bot Gitee 5 years ago
parent
commit
1460158a0f
8 changed files with 1360 additions and 10 deletions
  1. BIN
      mindinsight/ui/src/assets/images/graph-step1.png
  2. +443
    -0
      mindinsight/ui/src/assets/images/graph-step1.svg
  3. BIN
      mindinsight/ui/src/assets/images/graph-step2.png
  4. +490
    -0
      mindinsight/ui/src/assets/images/graph-step2.svg
  5. BIN
      mindinsight/ui/src/assets/images/graph-step3.png
  6. +407
    -0
      mindinsight/ui/src/assets/images/graph-step3.svg
  7. +3
    -3
      mindinsight/ui/src/locales/zh-cn.json
  8. +17
    -7
      mindinsight/ui/src/views/train-manage/graph.vue

BIN
mindinsight/ui/src/assets/images/graph-step1.png View File

Before After
Width: 1920  |  Height: 1016  |  Size: 323 kB

+ 443
- 0
mindinsight/ui/src/assets/images/graph-step1.svg
File diff suppressed because it is too large
View File


BIN
mindinsight/ui/src/assets/images/graph-step2.png View File

Before After
Width: 1920  |  Height: 1016  |  Size: 342 kB

+ 490
- 0
mindinsight/ui/src/assets/images/graph-step2.svg
File diff suppressed because it is too large
View File


BIN
mindinsight/ui/src/assets/images/graph-step3.png View File

Before After
Width: 1920  |  Height: 1016  |  Size: 314 kB

+ 407
- 0
mindinsight/ui/src/assets/images/graph-step3.svg
File diff suppressed because it is too large
View File


+ 3
- 3
mindinsight/ui/src/locales/zh-cn.json View File

@@ -150,10 +150,10 @@
"guideTitle2": "2/3 节点类型介绍", "guideTitle2": "2/3 节点类型介绍",
"guideTitle3": "3/3 边介绍", "guideTitle3": "3/3 边介绍",
"guideContent11": "1. 在计算图展示区域可以查看计算图,可以通过滚轮对计算图放大和缩小,可以鼠标点击后拖拽。", "guideContent11": "1. 在计算图展示区域可以查看计算图,可以通过滚轮对计算图放大和缩小,可以鼠标点击后拖拽。",
"guideContent12": "2. 支持全屏展示计算图,或者将当前页面保存成SVG文件。",
"guideContent12": "2. 支持全屏展示计算图,或者将当前页面保存成SVG图片文件。",
"guideContent13": "3. 在右边的功能区中,可以切换查看不同文件的计算图,或者在计算图中进行节点搜索。", "guideContent13": "3. 在右边的功能区中,可以切换查看不同文件的计算图,或者在计算图中进行节点搜索。",
"guideContent14": "4. 在节点信息的输入和输出中,可以选择并点击跳转到该节点。",
"guideContent2": "计算图主要由命名空间节点,算子节点,虚拟节点,聚合节点,常量节点等几种类型节点构成。其中 \"Default\" 表示正向传播,\"Gradients\" 表示反向传播。",
"guideContent14": "4. 在节点信息的输入和输出中,选择并点击一个节点后,可以跳转到选择的节点。",
"guideContent2": "计算图中有命名空间节点,算子节点,虚拟节点,聚合节点,常量节点等几种类型节点。其中 \"Default\" 表示正向传播,\"Gradients\" 表示反向传播。",
"guideContent3": "计算图中存在数据边和控制边。其中数据边表示数据的输入,控制边表示节点之间执行依赖关系。", "guideContent3": "计算图中存在数据边和控制边。其中数据边表示数据的输入,控制边表示节点之间执行依赖关系。",
"next": "下一步", "next": "下一步",
"finish": "完成" "finish": "完成"


+ 17
- 7
mindinsight/ui/src/views/train-manage/graph.vue View File

@@ -31,7 +31,10 @@ limitations under the License.
<div v-for="item in guide.content" <div v-for="item in guide.content"
:key="item" :key="item"
class="guide-span">{{ item }}</div> class="guide-span">{{ item }}</div>
<img :src="require(`@/assets/images/graph-stepimg${guide.step}.svg`)" />
<div class="step-pic">
<img :src="require(`@/assets/images/graph-stepimg${guide.step}.svg`)" />
</div>

<el-button type="primary" <el-button type="primary"
@click="guideNext">{{ @click="guideNext">{{
guide.step === 3 ? $t('graph.finish') : $t('graph.next') guide.step === 3 ? $t('graph.finish') : $t('graph.next')
@@ -39,17 +42,17 @@ limitations under the License.
</el-popover> </el-popover>
<div class="step" <div class="step"
v-show="guide.step == 1"> v-show="guide.step == 1">
<img src="@/assets/images/graph-step1.png"
<img src="@/assets/images/graph-step1.svg"
alt="" /> alt="" />
</div> </div>
<div class="step" <div class="step"
v-show="guide.step == 2"> v-show="guide.step == 2">
<img src="@/assets/images/graph-step2.png"
<img src="@/assets/images/graph-step2.svg"
alt="" /> alt="" />
</div> </div>
<div class="step" <div class="step"
v-show="guide.step == 3"> v-show="guide.step == 3">
<img src="@/assets/images/graph-step3.png"
<img src="@/assets/images/graph-step3.svg"
alt="" /> alt="" />
</div> </div>
</div> </div>
@@ -1030,6 +1033,7 @@ export default {
? this.allGraphData[name].independent_layout ? this.allGraphData[name].independent_layout
: false; : false;
if (independentLayout && nodes && nodes.length > aggregationNodeLimit) { if (independentLayout && nodes && nodes.length > aggregationNodeLimit) {
const nodesLength = nodes.length;
// The selected node must be included. // The selected node must be included.
let startIndex = 0; let startIndex = 0;
if (this.selectedNode.more) { if (this.selectedNode.more) {
@@ -1068,7 +1072,7 @@ export default {
}; };
nodes.splice(0, 0, ellipsisNodeL); nodes.splice(0, 0, ellipsisNodeL);
} }
if (startIndex + aggregationNodeLimit < nodes.length) {
if (startIndex + aggregationNodeLimit < nodesLength) {
const ellipsisNode = { const ellipsisNode = {
name: `${name}/right/${ellipsisNum} more...`, name: `${name}/right/${ellipsisNum} more...`,
attr: {}, attr: {},
@@ -2808,9 +2812,11 @@ export default {
line-height: 56px; line-height: 56px;
.guide { .guide {
cursor: pointer; cursor: pointer;
margin-left: 16px;
margin-left: 10px;
line-height: 20px; line-height: 20px;
display: inline-block; display: inline-block;
line-height: 18px;
font-size: 12px;
.guide-icon { .guide-icon {
display: inline-block; display: inline-block;
width: 16px; width: 16px;
@@ -2836,11 +2842,14 @@ export default {
position: absolute; position: absolute;
background-color: #c6c8cc; background-color: #c6c8cc;
z-index: 9999; z-index: 9999;
.step-pic {
text-align: center;
margin-top: 8px;
}
.step { .step {
height: 100%; height: 100%;
background-repeat: round; background-repeat: round;
img { img {
height: 100%;
width: 100%; width: 100%;
} }
} }
@@ -2867,6 +2876,7 @@ export default {
font-size: 16px; font-size: 16px;
color: #252b3a; color: #252b3a;
line-height: 24px; line-height: 24px;
font-weight: bold;
} }
.el-button { .el-button {
display: block; display: block;


Loading…
Cancel
Save