diff --git a/webapp/.env.development b/webapp/.env.development index bcbbe28..91ec4c6 100644 --- a/webapp/.env.development +++ b/webapp/.env.development @@ -3,8 +3,14 @@ ENV = 'development' # 默认BASE URL VUE_APP_BASE_API = '' -# minio -VUE_APP_MINIO_API = 'http://{HOST}/minio' +# 数据管理 +VUE_APP_DATA_API = '' + +# 训练可视化 +VUE_APP_VISUAL_API = '' + +# 用户 minio 访问地址 +VUE_APP_MINIO_API = '' # atlas 服务,需要单独部署 VUE_APP_ATLAS_HOST = '' @@ -14,6 +20,7 @@ VUE_APP_ATLAS_HOST = '' VUE_APP_DCM_API = 'http://{HOST}/dcm4chee/dcm4chee-arc/aets/DCM4CHEE_ADMIN' # minIO 服务 IP +# 部署文档参考:http://docs.dubhe.ai/docs/setup/deploy-minio VUE_APP_MINIO_ENDPOINT = '' # minIO 服务 端口 @@ -23,4 +30,7 @@ VUE_APP_MINIO_PORT = '9000' VUE_APP_MINIO_USESSL = 'false' # bucketName -VUE_APP_MINIO_BUCKETNAME = 'dubhe-dev' +VUE_APP_MINIO_BUCKETNAME = 'dubhe-cloud-dev' + +# 文档链接 +VUE_APP_DOCS_URL = http://docs.dubhe.ai/docs/ \ No newline at end of file diff --git a/webapp/.env.mock b/webapp/.env.mock index dadee4d..147443d 100644 --- a/webapp/.env.mock +++ b/webapp/.env.mock @@ -5,9 +5,16 @@ VUE_APP_MOCK=true # 默认BASE URL,需要自行配置 VUE_APP_BASE_API = '/mock' +VUE_APP_DATA_API = '/mock' + +# 训练可视化 +VUE_APP_VISUAL_API = '' # 用户 minio 访问地址 -VUE_APP_MINIO_API = 'http://{HOST}/minio' +VUE_APP_MINIO_API = '' + +# atlas +VUE_APP_ATLAS_HOST = '' # minIO 服务 IP VUE_APP_MINIO_ENDPOINT = '' @@ -19,4 +26,7 @@ VUE_APP_MINIO_PORT = '9000' VUE_APP_MINIO_USESSL = 'false' # bucketName -VUE_APP_MINIO_BUCKETNAME = 'dubhe-dev' +VUE_APP_MINIO_BUCKETNAME = 'dubhe-cloud-dev' + +# 文档链接 +VUE_APP_DOCS_URL = http://docs.dubhe.ai/docs/ diff --git a/webapp/.env.production b/webapp/.env.production index 8df70ee..a23c957 100644 --- a/webapp/.env.production +++ b/webapp/.env.production @@ -1,13 +1,19 @@ ENV = 'production' # 默认BASE URL, 后端服务地址 -VUE_APP_BASE_API = 'http://127.0.0.1:8000' +VUE_APP_BASE_API = '' + +# 数据管理 +VUE_APP_DATA_API = '' + +# 训练可视化 +VUE_APP_VISUAL_API = '' # 用户 minio 访问地址 -VUE_APP_MINIO_API = 'http://{HOST}/minio' +VUE_APP_MINIO_API = '' # atlas 服务,需要单独部署 -VUE_APP_ATLAS_HOST = 'http://127.0.0.1:8000' +VUE_APP_ATLAS_HOST = '' # 医疗影像 DCM4CHEE 服务访问地址 # 部署文档参考:http://docs.dubhe.ai/docs/setup/deploy-algorithm @@ -15,7 +21,7 @@ VUE_APP_DCM_API = 'http://{HOST}/dcm4chee/dcm4chee-arc/aets/DCM4CHEE_ADMIN' # minIO 服务 IP # 部署文档参考:http://docs.dubhe.ai/docs/setup/deploy-minio -VUE_APP_MINIO_ENDPOINT = '{IP}' +VUE_APP_MINIO_ENDPOINT = '' # minIO 服务 端口 VUE_APP_MINIO_PORT = '9000' @@ -25,3 +31,6 @@ VUE_APP_MINIO_USESSL = 'false' # bucketName VUE_APP_MINIO_BUCKETNAME = 'dubhe-prod' + +# 文档链接 +VUE_APP_DOCS_URL = http://docs.dubhe.ai/docs/ diff --git a/webapp/.env.test b/webapp/.env.test index f4d80b0..668ac96 100644 --- a/webapp/.env.test +++ b/webapp/.env.test @@ -3,6 +3,12 @@ ENV = 'test' # 默认BASE URL VUE_APP_BASE_API = '' +# 数据管理 +VUE_APP_DATA_API = '' + +# 训练可视化 +VUE_APP_VISUAL_API = '' + # 用户 minio 访问地址 VUE_APP_MINIO_API = '' @@ -14,6 +20,7 @@ VUE_APP_ATLAS_HOST = '' VUE_APP_DCM_API = 'http://{HOST}/dcm4chee/dcm4chee-arc/aets/DCM4CHEE_ADMIN' # minIO 服务 IP +# 部署文档参考:http://docs.dubhe.ai/docs/setup/deploy-minio VUE_APP_MINIO_ENDPOINT = '' # minIO 服务 端口 @@ -23,5 +30,7 @@ VUE_APP_MINIO_PORT = '9000' VUE_APP_MINIO_USESSL = 'false' # BucketName -VUE_APP_MINIO_BUCKETNAME = 'dubhe-test' +VUE_APP_MINIO_BUCKETNAME = 'dubhe-cloud-test' +# 文档链接 +VUE_APP_DOCS_URL = http://docs.dubhe.ai/docs/ diff --git a/webapp/.eslintignore b/webapp/.eslintignore index 5f8e217..8b78211 100644 --- a/webapp/.eslintignore +++ b/webapp/.eslintignore @@ -3,4 +3,6 @@ src/assets public dist src/components/Crud -mock \ No newline at end of file +mock +src/views/visual +src/store/modules/Visual \ No newline at end of file diff --git a/webapp/.eslintrc.js b/webapp/.eslintrc.js index cc4ae86..5045eef 100644 --- a/webapp/.eslintrc.js +++ b/webapp/.eslintrc.js @@ -19,53 +19,29 @@ module.exports = { } }, rules: { - "comma-dangle": [2, "always-multiline"], - "no-var": "error", - "no-console": [2, { allow: ["warn", "error"] }], - "no-restricted-syntax": "off", + 'prettier/prettier': [ + 'error', + { + printWidth: 100, + semi: true, + singleQuote: true, + trailingComma: 'es5', + endOfLine: 'auto', + arrowParens: 'always', + }, + ], + 'vue/require-default-prop': 'off', + 'vue/attribute-hyphenation': 'off', + 'no-console': ['error', { allow: ['warn', 'error', 'info'] }], + 'no-param-reassign': 'off', + 'import/extensions': 'off', + 'import/prefer-default-export': 'off', + "no-shadow": "off", "no-underscore-dangle": "off", + "no-unused-expressions": "off", + "no-restricted-syntax": "off", "guard-for-in": "off", - "object-shorthand": 2, - "consistent-return": "off", + "camelcase": "off", "no-multi-assign": "off", - "no-shadow": "off", - "no-restricted-globals": "off", - "no-restricted-properties": "off", - "no-prototype-builtins": "off", - "no-unused-vars": [ - 2, - { ignoreRestSiblings: true, argsIgnorePattern: "^h$" } - ], - "import/prefer-default-export": "off", - 'import/extensions': ['error', 'always', { - 'js': 'never', - 'vue': 'never' - }], - "no-unused-expressions": "off", - "no-undef": 2, - camelcase: "off", - "no-extra-boolean-cast": "off", - "no-param-reassign":"off", - semi: ["error", "always"], - "vue/require-prop-types": "off", - "vue/require-default-prop": "off", - "vue/no-reserved-keys": "off", - "vue/attribute-hyphenation": "off", - "vue/comment-directive": "off", - "vue/prop-name-casing": "off", - "vue/max-attributes-per-line": [2, { - singleline: 20, - multiline: { - max: 1, - allowFirstLine: false - }} - ], - "vue/html-indent": ["error", 2, { - "attribute": 1, - "baseIndent": 1, - "closeBracket": 0, - "alignAttributesVertically": true, - "ignores": [] - }] } }; diff --git a/webapp/mock/api/data/datasets/count.js b/webapp/mock/api/v1/data/datasets/count.js similarity index 56% rename from webapp/mock/api/data/datasets/count.js rename to webapp/mock/api/v1/data/datasets/count.js index 8483a4d..b3a3d55 100644 --- a/webapp/mock/api/data/datasets/count.js +++ b/webapp/mock/api/v1/data/datasets/count.js @@ -2,7 +2,7 @@ module.exports = { code: 200, msg: null, data: { - "finished": 10, - "unfinished": 0 + "publicCount": 10, + "privateCount": 0 } } \ No newline at end of file diff --git a/webapp/mock/api/v1/train/trainJobDelete.js b/webapp/mock/api/v1/train/trainJobDelete.js new file mode 100644 index 0000000..d0d833d --- /dev/null +++ b/webapp/mock/api/v1/train/trainJobDelete.js @@ -0,0 +1,8 @@ +module.exports = { + code: 200, + msg: null, + data: { + "trainId": 607, + "id": 1204 + }, +} diff --git a/webapp/mock/mock-map.js b/webapp/mock/mock-map.js index 383afe6..4fbd11e 100644 --- a/webapp/mock/mock-map.js +++ b/webapp/mock/mock-map.js @@ -1,4 +1,5 @@ // 定义 RESTful 接口和实际代码的映射 module.exports = { - 'GET::/api/data/datasets/(\\d+)/count': 'api/data/datasets/count', + 'GET::/api/v1/data/datasets/(\\d+)/count': 'api/v1/data/datasets/count', + 'DELETE::/api/v1/train/trainJob': 'api/v1/train/trainJobDelete', }; diff --git a/webapp/package.json b/webapp/package.json index 5ff6c1e..6ef83f6 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -13,6 +13,8 @@ "scripts": { "mock": "vue-cli-service serve --mode mock --open", "dev": "vue-cli-service serve --open", + "serve": "vue-cli-service serve --host 0.0.0.0", + "serve:test": "vue-cli-service serve --mode test --open", "build:prod": "vue-cli-service build", "build:test": "vue-cli-service build --mode test", "build:dev": "vue-cli-service build --mode development", @@ -40,9 +42,10 @@ "dependencies": { "@riophae/vue-treeselect": "0.1.0", "@vue/babel-plugin-transform-vue-jsx": "^1.1.2", - "@vue/composition-api": "^0.5.0", + "@vue/composition-api": "^1.0.0-rc.1", "@wulucxy/dwv": "0.28.1-beta.9", "add-dom-event-listener": "^1.1.0", + "assert": "^2.0.0", "axios": "0.18.1", "chroma-js": "^2.1.0", "classnames": "^2.2.6", @@ -59,11 +62,11 @@ "element-ui": "2.13.2", "file-saver": "^2.0.2", "filereader-stream": "^2.0.0", + "immutability-helper": "^3.1.1", "jquery": "^3.5.1", "jquery-contextmenu": "^2.9.1", "js-beautify": "^1.13.0", "js-cookie": "2.2.0", - "jschardet": "^2.2.1", "jsencrypt": "^3.0.0-rc.1", "json2csv": "^5.0.1", "lodash": "^4.17.15", @@ -72,8 +75,10 @@ "normalize.css": "7.0.0", "nprogress": "0.2.0", "p-map": "^4.0.0", + "papaparse": "^5.3.0", "path-to-regexp": "^6.2.0", "portal-vue": "^2.1.7", + "prism-themes": "^1.5.0", "prismjs": "^1.20.0", "promise.allsettled": "^1.0.2", "qs": "^6.9.1", @@ -88,7 +93,10 @@ "vue-prism-component": "^1.2.0", "vue-prism-editor": "^1.2.2", "vue-router": "^3.0.2", - "vuex": "3.1.0" + "vuex": "3.1.0", + "wavesurfer.js": "^4.6.0", + "web-highlighter": "^0.7.1", + "xlsx": "^0.16.9" }, "devDependencies": { "@babel/core": "7.0.0", diff --git a/webapp/src/App.vue b/webapp/src/App.vue index b67cdaa..1d5fd8c 100644 --- a/webapp/src/App.vue +++ b/webapp/src/App.vue @@ -1,18 +1,18 @@ /** Copyright 2020 Tianshu AI Platform. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* ============================================================= -*/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================= + */