diff --git a/.eslintrc.js b/.eslintrc.js
index c9775054..bd03f8ed 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -69,6 +69,7 @@ module.exports = {
'newIsCap': true,
'capIsNew': false
}],
+ 'vue/no-unused-components': 'off',
'new-parens': 2,
'no-array-constructor': 2,
'no-caller': 2,
diff --git a/package.json b/package.json
index 02f68e23..c559b2b5 100644
--- a/package.json
+++ b/package.json
@@ -35,6 +35,7 @@
"script-loader": "0.7.2",
"sortablejs": "1.8.4",
"tui-editor": "1.3.3",
+ "vis-network": "^9.1.9",
"vue": "2.6.10",
"vue-count-to": "1.0.13",
"vue-router": "3.0.2",
diff --git a/src/assets/custom-theme/topology.png b/src/assets/custom-theme/topology.png
new file mode 100644
index 00000000..2ed2468d
Binary files /dev/null and b/src/assets/custom-theme/topology.png differ
diff --git a/src/router/index.js b/src/router/index.js
index 50f3552b..a657eec1 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -84,13 +84,13 @@ export const constantRoutes = [
]
},
{
- path: '/documentation',
+ path: '/grafana',
component: Layout,
children: [
{
path: 'index',
- component: () => import('@/views/documentation/index'),
- name: 'Documentation',
+ component: () => import('@/views/grafana/index'),
+ name: 'Grafana',
meta: { title: '算力可视化', icon: 'chart', affix: true }
}
]
diff --git a/src/views/dashboard/admin/index.vue b/src/views/dashboard/admin/index.vue
index 8cb557be..8b1f1648 100644
--- a/src/views/dashboard/admin/index.vue
+++ b/src/views/dashboard/admin/index.vue
@@ -1,97 +1,86 @@
-
+
+
+
+
+
+
+
+
+ {{ scope.row.status }}
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/documentation/index.vue b/src/views/documentation/index.vue
deleted file mode 100644
index 09f5951b..00000000
--- a/src/views/documentation/index.vue
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
-
-
-
-
-
diff --git a/src/views/grafana/index.vue b/src/views/grafana/index.vue
new file mode 100644
index 00000000..8c4e07be
--- /dev/null
+++ b/src/views/grafana/index.vue
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
+
diff --git a/vue.config.js b/vue.config.js
index 33a63483..7a5f89a4 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -27,7 +27,7 @@ module.exports = {
publicPath: '/',
outputDir: 'dist',
assetsDir: 'static',
- lintOnSave: process.env.NODE_ENV === 'development',
+ lintOnSave: false,
productionSourceMap: false,
devServer: {
port: port,
@@ -36,6 +36,13 @@ module.exports = {
warnings: false,
errors: true
},
+ proxy: {
+ '/grafana': {
+ target: 'http://localhost:3030', // 替换为服务器 B 的域名或 IP 地址
+ changeOrigin: true,
+ pathRewrite: { '^/grafana': '' } // 如果服务器 B 的接口不以 /api 开头,去掉前缀
+ }
+ },
before: require('./mock/mock-server.js')
},
configureWebpack: {