提交 5a16e71a 编写于 作者: B BingBlog 提交者: abigale Li

modify graph url (#121)

上级 5f1d9984
......@@ -17,7 +17,7 @@ module.exports = function (path, queryParam, postParam) {
status: 0,
msg: 'SUCCESS',
data: {
url: 'someurl'
url: ''
}
}
};
......
......@@ -21,150 +21,6 @@ module.exports = function (path, queryParam, postParam) {
"layer2/biases/summaries/mean": {
"displayName": "layer2/biases/summaries/mean",
"description": ""
},
"layer1/weights/summaries/min": {
"displayName": "layer1/weights/summaries/min",
"description": ""
},
"layer2/biases/summaries/stddev_1": {
"displayName": "layer2/biases/summaries/stddev_1",
"description": ""
},
"layer1/biases/summaries/mean": {
"displayName": "layer1/biases/summaries/mean",
"description": ""
},
"layer1/weights/summaries/mean": {
"displayName": "layer1/weights/summaries/mean",
"description": ""
},
"dropout/dropout_keep_probability": {
"displayName": "dropout/dropout_keep_probability",
"description": ""
},
"layer1/weights/summaries/max": {
"displayName": "layer1/weights/summaries/max",
"description": ""
}, "layer2/weights/summaries/mean": {
"displayName": "layer2/weights/summaries/mean",
"description": ""
}, "layer2/weights/summaries/stddev_1": {
"displayName": "layer2/weights/summaries/stddev_1",
"description": ""
},
"layer2/weights/summaries/min": {
"displayName": "layer2/weights/summaries/min",
"description": ""
},
"layer1/biases/summaries/max": {
"displayName": "layer1/biases/summaries/max",
"description": ""
},
"layer2/weights/summaries/max": {
"displayName": "layer2/weights/summaries/max",
"description": ""
},
"accuracy_1": {
"displayName": "accuracy_1",
"description": ""
},
"layer2/biases/summaries/min": {
"displayName": "layer2/biases/summaries/min",
"description": ""
},
"cross_entropy_1": {
"displayName": "cross_entropy_1",
"description": ""
},
"layer2/biases/summaries/max": {
"displayName": "layer2/biases/summaries/max",
"description": ""
},
"layer1/weights/summaries/stddev_1": {
"displayName": "layer1/weights/summaries/stddev_1",
"description": ""
},
"layer1/biases/summaries/stddev_1": {
"displayName": "layer1/biases/summaries/stddev_1",
"description": ""
},
"layer1/biases/summaries/min": {
"displayName": "layer1/biases/summaries/min",
"description": ""
}
},
"train": {
"layer2/biases/summaries/mean": {
"displayName": "layer2/biases/summaries/mean",
"description": ""
},
"layer1/weights/summaries/min": {
"displayName": "layer1/weights/summaries/min",
"description": ""
},
"layer2/biases/summaries/stddev_1": {
"displayName": "layer2/biases/summaries/stddev_1",
"description": ""
},
"layer1/biases/summaries/mean": {
"displayName": "layer1/biases/summaries/mean",
"description": ""
},
"layer1/weights/summaries/mean": {
"displayName": "layer1/weights/summaries/mean",
"description": ""
},
"dropout/dropout_keep_probability": {
"displayName": "dropout/dropout_keep_probability",
"description": ""
},
"layer1/weights/summaries/max": {
"displayName": "layer1/weights/summaries/max",
"description": ""
},
"layer2/weights/summaries/mean": {
"displayName": "layer2/weights/summaries/mean",
"description": ""
},
"layer2/weights/summaries/stddev_1": {
"displayName": "layer2/weights/summaries/stddev_1",
"description": ""
},
"layer2/weights/summaries/min": {
"displayName": "layer2/weights/summaries/min",
"description": ""
},
"layer1/biases/summaries/max": {
"displayName": "layer1/biases/summaries/max",
"description": ""
},
"layer2/weights/summaries/max": {
"displayName": "layer2/weights/summaries/max",
"description": ""
},
"accuracy_1": {
"displayName": "accuracy_1",
"description": ""
},
"layer2/biases/summaries/min": {
"displayName": "layer2/biases/summaries/min",
"description": ""
},
"cross_entropy_1": {
"displayName": "cross_entropy_1",
"description": ""
},
"layer2/biases/summaries/max": {
"displayName": "layer2/biases/summaries/max",
"description": ""
},
"layer1/weights/summaries/stddev_1": {
"displayName": "layer1/weights/summaries/stddev_1",
"description": ""
},
"layer1/biases/summaries/stddev_1": {
"displayName": "layer1/biases/summaries/stddev_1",
"description": ""
}
}
}
......
......@@ -21,7 +21,7 @@
</template>
<script>
import {getPluginHistogramsTags, getRuns} from '../service';
import {getPluginGraphsGraph} from '../service';
import autoAdjustHeight from '../common/util/autoAdjustHeight';
import config from './ui/config';
import chart from './ui/chart';
......@@ -44,41 +44,9 @@ export default {
}
};
},
inited() {
getPluginHistogramsTags().then(({errno, data}) => {
this.data.set('tags', data);
// filter when inited
let groupNameReg = this.data.get('config.groupNameReg');
this.filterTagsList(groupNameReg);
});
getRuns().then(({errno, data}) => {
this.data.set('runsArray', data);
this.data.set('config.runs', data);
});
},
attached() {
autoAdjustHeight();
},
filterTagsList(groupNameReg) {
let tagsList = this.data.get('tagsList') || [];
let regExp = new RegExp(groupNameReg);
let filtedTagsList = tagsList.filter(item => regExp.test(item.tag));
this.data.set('filteredTagsList', filtedTagsList);
},
handleFitScreen() {
this.data.set('filtScreen', {
filtScreen: true
});
this.data.set('config.scale', 0.5);
},
handleDownload() {
this.data.set('download', {
filtScreen: true
});
}
};
......
......@@ -4,7 +4,7 @@
<div class="visual-dl-chart-box">
</div>
-->
<div class="visual-dl-img-box">
<div san-if="graphUrl" class="visual-dl-img-box">
<div class="small-img-box">
<img class="small-img" width="30" src="{{graphUrl}}" />
<div class="screen-handler"></div>
......@@ -85,8 +85,8 @@ export default {
},
getOriginChartsData() {
getPluginGraphsGraph().then(({data}) => {
if (data.url) {
getPluginGraphsGraph().then(({status, data}) => {
if (+status === 0 && data.url) {
this.data.set('graphUrl', data.url);
this.addDragEventForImg();
}
......
......@@ -140,6 +140,10 @@ export default {
},
filterTagsList(groupNameReg) {
if (!groupNameReg) {
this.data.set('filteredTagsList', []);
return;
}
let tagsList = this.data.get('tagsList') || [];
let regExp = new RegExp(groupNameReg);
let filtedTagsList = tagsList.filter(item => regExp.test(item.tag));
......
......@@ -204,7 +204,7 @@ export default {
});
rawData.push(lineData);
});
// Max point in every polygon.
// let maxValuePoints = [];
let option = {
......@@ -312,7 +312,7 @@ export default {
zr.on('mouseout', e => {
removeTooltip();
});
});
zr.on('mousemove', e => {
removeTooltip();
......@@ -408,7 +408,7 @@ export default {
zrDrawElement.tooltipY = new echarts.graphic.Text({
position: [
gridRect.x + gridRect.width,
gridRect.x + gridRect.width,
linePoints[linePoints.length - 1][1]
],
style: {
......@@ -515,7 +515,7 @@ export default {
expandArea() {
let isExpand = this.data.get('isExpand');
let pageBoxWidth = document.getElementsByClassName('visual-dl-chart-page-box')[0].offsetWidth;
let pageBoxWidth = document.getElementsByClassName('visual-dl-chart-page')[0].offsetWidth;
if (!isExpand) {
let el = this.el.getElementsByClassName('visual-dl-chart-box')[0];
el.style.width = pageBoxWidth + 'px';
......
<template>
<!-- className visual-dl-chart-page used in chart.san, change they all if you need!-->
<div class="visual-dl-chart-page">
<ui-expand-panel isShow="{{expand}}" info="{{total}}" title="{{title}}">
<ui-chart
......
......@@ -142,6 +142,10 @@ export default {
autoAdjustHeight();
},
filterTagsList(groupNameReg) {
if (!groupNameReg) {
this.data.set('filteredTagsList', []);
return;
}
let tagsList = this.data.get('tagsList') || [];
let regExp = new RegExp(groupNameReg);
let filtedTagsList = tagsList.filter(item => regExp.test(item.tag));
......
......@@ -147,6 +147,10 @@ export default {
},
filterTagsList(groupNameReg) {
if (!groupNameReg) {
this.data.set('filteredTagsList', []);
return;
}
let tagsList = this.data.get('tagsList') || [];
let regExp = new RegExp(groupNameReg);
let filtedTagsList = tagsList.filter(item => regExp.test(item.tag));
......
......@@ -61,6 +61,7 @@ export default {
return tagList.length;
}
},
initData() {
return {
// current page
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册