diff --git a/.gitignore b/.gitignore
index a55ceda5..385fd9fe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,5 @@ database.db
server/tmp/main
node_modules
dist
+nginx-ui-frontend/.env.development
+nginx-ui-frontend/.env.production
diff --git a/nginx-ui-frontend/package.json b/nginx-ui-frontend/package.json
index 80a93016..3b668c19 100644
--- a/nginx-ui-frontend/package.json
+++ b/nginx-ui-frontend/package.json
@@ -10,9 +10,10 @@
"dependencies": {
"ant-design-vue": "^1.7.3",
"axios": "^0.21.1",
+ "chart.js": "^2.9.4",
"core-js": "^3.9.0",
- "viser-vue": "^2.4.8",
"vue": "^2.6.11",
+ "vue-chartjs": "^3.5.1",
"vue-itextarea": "^1.0.9",
"vue-router": "^3.5.1",
"vuex": "^3.6.2",
diff --git a/nginx-ui-frontend/public/favicon.ico b/nginx-ui-frontend/public/favicon.ico
index df36fcfb..c509adfe 100644
Binary files a/nginx-ui-frontend/public/favicon.ico and b/nginx-ui-frontend/public/favicon.ico differ
diff --git a/nginx-ui-frontend/src/assets/img/logo.png b/nginx-ui-frontend/src/assets/img/logo.png
deleted file mode 100644
index f3d2503f..00000000
Binary files a/nginx-ui-frontend/src/assets/img/logo.png and /dev/null differ
diff --git a/nginx-ui-frontend/src/components/Chart/LineChart.vue b/nginx-ui-frontend/src/components/Chart/LineChart.vue
new file mode 100644
index 00000000..b43444de
--- /dev/null
+++ b/nginx-ui-frontend/src/components/Chart/LineChart.vue
@@ -0,0 +1,36 @@
+
+
+
diff --git a/nginx-ui-frontend/src/components/Charts/Bar.vue b/nginx-ui-frontend/src/components/Charts/Bar.vue
deleted file mode 100644
index 44828453..00000000
--- a/nginx-ui-frontend/src/components/Charts/Bar.vue
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
{{ title }}
-
-
-
-
-
-
-
-
-
diff --git a/nginx-ui-frontend/src/components/Charts/ChartCard.vue b/nginx-ui-frontend/src/components/Charts/ChartCard.vue
deleted file mode 100644
index 03c26abf..00000000
--- a/nginx-ui-frontend/src/components/Charts/ChartCard.vue
+++ /dev/null
@@ -1,110 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/nginx-ui-frontend/src/components/Charts/Liquid.vue b/nginx-ui-frontend/src/components/Charts/Liquid.vue
deleted file mode 100644
index 4019fb18..00000000
--- a/nginx-ui-frontend/src/components/Charts/Liquid.vue
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/nginx-ui-frontend/src/components/Charts/MiniArea.vue b/nginx-ui-frontend/src/components/Charts/MiniArea.vue
deleted file mode 100644
index b7fbb89d..00000000
--- a/nginx-ui-frontend/src/components/Charts/MiniArea.vue
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
-
-
-
diff --git a/nginx-ui-frontend/src/components/Charts/MiniBar.vue b/nginx-ui-frontend/src/components/Charts/MiniBar.vue
deleted file mode 100644
index 078a0bc0..00000000
--- a/nginx-ui-frontend/src/components/Charts/MiniBar.vue
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
-
-
-
diff --git a/nginx-ui-frontend/src/components/Charts/MiniProgress.vue b/nginx-ui-frontend/src/components/Charts/MiniProgress.vue
deleted file mode 100644
index e6913631..00000000
--- a/nginx-ui-frontend/src/components/Charts/MiniProgress.vue
+++ /dev/null
@@ -1,75 +0,0 @@
-
-
-
-
-
-
-
diff --git a/nginx-ui-frontend/src/components/Charts/MiniSmoothArea.vue b/nginx-ui-frontend/src/components/Charts/MiniSmoothArea.vue
deleted file mode 100644
index a00d9bf0..00000000
--- a/nginx-ui-frontend/src/components/Charts/MiniSmoothArea.vue
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
-
-
-
-
diff --git a/nginx-ui-frontend/src/components/Charts/Radar.vue b/nginx-ui-frontend/src/components/Charts/Radar.vue
deleted file mode 100644
index 5ee88ade..00000000
--- a/nginx-ui-frontend/src/components/Charts/Radar.vue
+++ /dev/null
@@ -1,68 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/nginx-ui-frontend/src/components/Charts/RankList.vue b/nginx-ui-frontend/src/components/Charts/RankList.vue
deleted file mode 100644
index afb56a1a..00000000
--- a/nginx-ui-frontend/src/components/Charts/RankList.vue
+++ /dev/null
@@ -1,77 +0,0 @@
-
-
-
{{ title }}
-
- -
- {{ index + 1 }}
- {{ item.name }}
- {{ item.total }}
-
-
-
-
-
-
-
-
diff --git a/nginx-ui-frontend/src/components/Charts/TagCloud.vue b/nginx-ui-frontend/src/components/Charts/TagCloud.vue
deleted file mode 100644
index 74d1b3f1..00000000
--- a/nginx-ui-frontend/src/components/Charts/TagCloud.vue
+++ /dev/null
@@ -1,113 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/nginx-ui-frontend/src/components/Charts/TransferBar.vue b/nginx-ui-frontend/src/components/Charts/TransferBar.vue
deleted file mode 100644
index 7f96f0be..00000000
--- a/nginx-ui-frontend/src/components/Charts/TransferBar.vue
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-
{{ title }}
-
-
-
-
-
-
-
-
-
diff --git a/nginx-ui-frontend/src/components/Charts/Trend.vue b/nginx-ui-frontend/src/components/Charts/Trend.vue
deleted file mode 100644
index 6ca41386..00000000
--- a/nginx-ui-frontend/src/components/Charts/Trend.vue
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
- {{ term }}
-
{{ rate }}%
-
-
-
-
-
-
-
diff --git a/nginx-ui-frontend/src/components/Charts/chart.less b/nginx-ui-frontend/src/components/Charts/chart.less
deleted file mode 100644
index e04fa095..00000000
--- a/nginx-ui-frontend/src/components/Charts/chart.less
+++ /dev/null
@@ -1,13 +0,0 @@
-.antv-chart-mini {
- position: relative;
- width: 100%;
-
- .chart-wrapper {
- position: absolute;
- bottom: -28px;
- width: 100%;
-
-/* margin: 0 -5px;
- overflow: hidden;*/
- }
-}
\ No newline at end of file
diff --git a/nginx-ui-frontend/src/components/Charts/index.js b/nginx-ui-frontend/src/components/Charts/index.js
deleted file mode 100644
index 74d6bf45..00000000
--- a/nginx-ui-frontend/src/components/Charts/index.js
+++ /dev/null
@@ -1,28 +0,0 @@
-import Bar from './Bar'
-import ChartCard from './ChartCard'
-import Liquid from './Liquid'
-import MiniArea from './MiniArea'
-import MiniBar from './MiniBar'
-import MiniProgress from './MiniProgress'
-import MiniSelect from 'ant-design-vue/lib/pagination/MiniSelect'
-import MiniSmoothArea from './MiniSmoothArea'
-import Radar from './Radar'
-import RankList from './RankList'
-import TransferBar from './TransferBar'
-import Trend from './Trend'
-
-
-export {
- Bar,
- ChartCard,
- Liquid,
- MiniSmoothArea,
- MiniSelect,
- MiniProgress,
- MiniArea,
- MiniBar,
- Radar,
- RankList,
- TransferBar,
- Trend
-}
diff --git a/nginx-ui-frontend/src/components/Charts/smooth.area.less b/nginx-ui-frontend/src/components/Charts/smooth.area.less
deleted file mode 100644
index 189d7931..00000000
--- a/nginx-ui-frontend/src/components/Charts/smooth.area.less
+++ /dev/null
@@ -1,4 +0,0 @@
-.ant-pro-smooth-area {
- position: relative;
- width: 100%;
-}
diff --git a/nginx-ui-frontend/src/components/Logo/Logo.vue b/nginx-ui-frontend/src/components/Logo/Logo.vue
index c6a4bd6c..4978f889 100644
--- a/nginx-ui-frontend/src/components/Logo/Logo.vue
+++ b/nginx-ui-frontend/src/components/Logo/Logo.vue
@@ -1,19 +1,13 @@
-
![]()
-
Nginx UI
+
Nginx UI
@@ -33,13 +27,11 @@ export default {
}
.text {
- float: left;
font-weight: 300;
- font-size: 22px;
+ font-size: 23px;
line-height: 48px;
height: 48px;
- display: inline-block;
- margin-left: 13px;
+ text-align: center;
}
}
diff --git a/nginx-ui-frontend/src/lib/http/index.js b/nginx-ui-frontend/src/lib/http/index.js
index 1b7ccf92..9d5ecb43 100644
--- a/nginx-ui-frontend/src/lib/http/index.js
+++ b/nginx-ui-frontend/src/lib/http/index.js
@@ -1,5 +1,4 @@
import axios from 'axios'
-import store from '../store'
/* 创建 axios 实例 */
let http = axios.create({
@@ -33,13 +32,6 @@ http.interceptors.response.use(
},
async error => {
console.log(error)
- switch (error.response.status) {
- case 401:
- case 403:
- // 无权访问时,直接登出
- await store.dispatch('logout')
- break
- }
return Promise.reject(error.response.data)
}
)
diff --git a/nginx-ui-frontend/src/router/index.js b/nginx-ui-frontend/src/router/index.js
index 99bcbb46..53dddb5c 100644
--- a/nginx-ui-frontend/src/router/index.js
+++ b/nginx-ui-frontend/src/router/index.js
@@ -9,7 +9,7 @@ export const routes = [
path: '/',
name: '首页',
component: () => import('@/layouts/BaseLayout'),
- redirect: '/domain',
+ redirect: '/dashboard',
children: [
{
path: 'dashboard',
diff --git a/nginx-ui-frontend/src/views/About.vue b/nginx-ui-frontend/src/views/About.vue
index d61f152d..c65862b0 100644
--- a/nginx-ui-frontend/src/views/About.vue
+++ b/nginx-ui-frontend/src/views/About.vue
@@ -4,13 +4,13 @@
Yet another WebUI for Nginx
Version: {{ version }}-{{ build_id }}
项目组
- 前端:0xJacky
- 后端:0xJacky
+ Designer:@0xJacky
技术栈
Go
Gin
Vue
-
+ 开源协议
+ GNU General Public License v2.0
Copyright © 2020 - {{ this_year }} 0xJacky
diff --git a/nginx-ui-frontend/src/views/DashBoard.vue b/nginx-ui-frontend/src/views/DashBoard.vue
index 518f763d..464dd928 100644
--- a/nginx-ui-frontend/src/views/DashBoard.vue
+++ b/nginx-ui-frontend/src/views/DashBoard.vue
@@ -2,7 +2,7 @@
-
+
@@ -10,23 +10,27 @@
%
-
+ 运行时间 {{ uptime }}
+ 系统负载 1min:{{ loadavg.Loadavg1 }} 5min:{{ loadavg.Loadavg5 }}
+ 15min:{{ loadavg.Loadavg15 }}
+
-
- 实际内存占用
+
-
+ :title="'已使用: '+ memory_used + ' 缓存: ' + memory_cached + ' 空闲:' + memory_free +
+ ' 物理内存: ' + memory_total">
+
+ 实际内存占用
-
- 存储空间
+
@@ -38,16 +42,12 @@