diff --git a/frontend/mock/data/plugin/texts/tags.js b/frontend/mock/data/plugin/texts/tags.js new file mode 100644 index 0000000000000000000000000000000000000000..a89f897cc47b19d0598c5a1fbf9c31e81792a52a --- /dev/null +++ b/frontend/mock/data/plugin/texts/tags.js @@ -0,0 +1,39 @@ +/** + * get mock data + * + * @param {string} path request path + * @param {Object} queryParam query params + * @param {Object} postParam post params + * @return {Object} + */ +module.exports = function (path, queryParam, postParam) { + return { + // moock delay + _timeout: 0, + // mock http status + _status: 200, + // mock response data + _data: { + status: 0, + msg: 'SUCCESS', + data: { + "test": { + "layer3/generated/animal": { + "displayName": "layer3/generated/animal", + "description": "" + } + }, + "train": { + "layer3/generated/animal": { + "displayName": "layer3/generated/animal", + "description": "" + }, + "layer3/generated/flower": { + "displayName": "layer3/generated/flower", + "description": "" + }, + } + } + } + }; +}; diff --git a/frontend/mock/data/plugin/texts/texts.js b/frontend/mock/data/plugin/texts/texts.js new file mode 100644 index 0000000000000000000000000000000000000000..80c62985c25170420639df46884d6af2a2b1521c --- /dev/null +++ b/frontend/mock/data/plugin/texts/texts.js @@ -0,0 +1,38 @@ +/** + * get mock data + * + * @param {string} path request path + * @param {Object} queryParam query params + * @param {Object} postParam post params + * @return {Object} + */ +module.exports = function (path, queryParam, postParam) { + if (queryParam.run === 'train') { + return { + // moock delay + _timeout: 0, + // mock http status + _status: 200, + // mock response data + _data: { + status: 0, + msg: 'SUCCESS', + data: [[1511842145.705075, 1, "Hello 1"], [1511842145.7388, 2, "Hello 2"], [1511842145.774563, 3, "Hello 3"], [1511842145.806828, 4, "Hello 4"], [1511842145.838082, 5, "Hello 5"], [1511842145.868955, 6, "Hello 6"], [1511842145.899323, 7, "Hello 7"], [1511842145.930518, 8, "Hello 8"], [1511842145.96089, 9, "Hello 7"], [1511842146.460557, 11, "Hello 11"], [1511842146.4952, 12, "Hello 12"], [1511842146.525936, 13, "Hello 13"], [1511842146.556059, 14, "Hello 14"], [1511842146.648703, 15, "Hello 15"], [1511842146.683295, 16, "Hello 16"], [1511842146.719782, 17, "Hello 17"], [1511842146.752392, 18, "Hello 18"]] + } + } + } + else { + return { + // moock delay + _timeout: 0, + // mock http status + _status: 200, + // mock response data + _data: { + status: 0, + msg: 'SUCCESS', + data: [[1511842145.514333, 0, "Hello 0"], [1511842146.427384, 10, "Hello 10"], [1511842147.260405, 20, "Hello 20"], [1511842148.019018, 30, "Hello 30 "], [1511842148.793569, 40, "Hello 40 "], [1511842149.610228, 50, "Hello 50 "], [1511842150.437095, 60, "Hello 60"], [1511842151.254679, 70, "Hello 70"], [1511842152.039353, 80, "Hello 80"], [1511842152.800043, 90, "Hello 90"]] + } + } + } +}; diff --git a/frontend/src/common/component/AppMenu.vue b/frontend/src/common/component/AppMenu.vue index 0999df9bd494f89da35cd80fa834c1318a5f1953..8041865ca64101b5ebab6a07b7a382d3e2f23503 100644 --- a/frontend/src/common/component/AppMenu.vue +++ b/frontend/src/common/component/AppMenu.vue @@ -41,6 +41,11 @@ export default { url: '/graphs', title: 'GRAPHS', name: 'graphs' + }, + { + url: '/texts', + title: 'TEXTS', + name: 'texts' } ] } diff --git a/frontend/src/router/index.js b/frontend/src/router/index.js index 6832582f219b681c5281e57f31e299a42b613817..353f25cd40a0c64744703f5f8fd9ef2b41560743 100644 --- a/frontend/src/router/index.js +++ b/frontend/src/router/index.js @@ -5,6 +5,7 @@ import Scalars from '@/scalars/Scalars' import Histogram from '@/histogram/Histogram' import Images from '@/images/Images' import Graph from '@/graph/Graph' +import Texts from '@/texts/Texts' Vue.use(Router) @@ -30,5 +31,10 @@ export default new Router({ name: 'Graph', component: Graph }, + { + path: '/texts', + name: 'Texts', + component: Texts + } ] }) diff --git a/frontend/src/service.js b/frontend/src/service.js index 743936df6c55a3ad2bfe3e1ea57fafbfac2843f7..012074d8e74fd51b0c2de543afee204c5d334048 100644 --- a/frontend/src/service.js +++ b/frontend/src/service.js @@ -15,3 +15,7 @@ export const getPluginHistogramsTags = makeService('/data/plugin/histograms/tags export const getPluginHistogramsHistograms = makeService('/data/plugin/histograms/histograms'); export const getPluginGraphsGraph = makeService('/data/plugin/graphs/graph'); + +export const getPluginTextsTags = makeService('/data/plugin/texts/tags'); + +export const getPluginTextsTexts = makeService('/data/plugin/texts/texts'); diff --git a/frontend/src/texts/Texts.vue b/frontend/src/texts/Texts.vue new file mode 100644 index 0000000000000000000000000000000000000000..9afefc5dedb506b00e4d5c7e2b04f18ef9e7c4ca --- /dev/null +++ b/frontend/src/texts/Texts.vue @@ -0,0 +1,167 @@ + + + + + + + + + + + + + + + + + diff --git a/frontend/src/texts/index.js b/frontend/src/texts/index.js new file mode 100644 index 0000000000000000000000000000000000000000..dc142957db509bfd7fe36d01c879a15bac162cea --- /dev/null +++ b/frontend/src/texts/index.js @@ -0,0 +1,9 @@ +import {router} from 'san-router'; + +import Texts from './Texts'; + +router.add({ + target: '#content', + rule: '/texts', + Component: Texts +}); diff --git a/frontend/src/texts/ui/Chart.vue b/frontend/src/texts/ui/Chart.vue new file mode 100644 index 0000000000000000000000000000000000000000..c83e370478bb072a33de8be0872983a533844193 --- /dev/null +++ b/frontend/src/texts/ui/Chart.vue @@ -0,0 +1,146 @@ + + + {{tagInfo.tag.displayName}} + {{tagInfo.run}} + + + Step: + {{textData.step}}; + {{textData.wall_time | formatTime}} + + + + {{textData.message}} + + + + + + diff --git a/frontend/src/texts/ui/ChartPage.vue b/frontend/src/texts/ui/ChartPage.vue new file mode 100644 index 0000000000000000000000000000000000000000..ff82eca5f64f6e73ae7bb8c60780d43a0967ceba --- /dev/null +++ b/frontend/src/texts/ui/ChartPage.vue @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + diff --git a/frontend/src/texts/ui/Config.vue b/frontend/src/texts/ui/Config.vue new file mode 100644 index 0000000000000000000000000000000000000000..c09cbe04f8720f95f0a14b0661459aced1a8a9dd --- /dev/null +++ b/frontend/src/texts/ui/Config.vue @@ -0,0 +1,73 @@ + + + + + Runs + + + + + {{config.running ? 'Running' : 'Stopped'}} + + + + + + +
+ Step: + {{textData.step}}; + {{textData.wall_time | formatTime}} +
{{textData.message}}