From b5189e31d0626817fb38f26869cab6628fd92448 Mon Sep 17 00:00:00 2001 From: kyonRay Date: Tue, 15 Aug 2023 09:48:39 +0800 Subject: [PATCH] (views): adapt systemStatus interfaces. --- src/views/homepage/index.vue | 22 ++++++++++++++++++++++ src/views/login/index.vue | 1 + vue.config.js | 4 ++-- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/views/homepage/index.vue b/src/views/homepage/index.vue index 9bbcb12..44ffeb2 100644 --- a/src/views/homepage/index.vue +++ b/src/views/homepage/index.vue @@ -180,6 +180,7 @@
本地系统信息 + 刷新
@@ -194,6 +195,14 @@ + + + + + + + + @@ -321,6 +330,19 @@ export default { }, methods: { + refreshSystemInfo() { + systemStatus().then(response => { + if (!response.data) { + this.$message.error('本地系统信息返回为空,请检查后台信息') + } + this.systemInfo = response.data + }).catch(_ => { + this.$message({ + type: 'error', + message: '获取系统信息失败,网络错误' + }) + }) + }, refreshChainsInfo() { this.chainsInfoLoading = true this.chainsInfo = [] diff --git a/src/views/login/index.vue b/src/views/login/index.vue index c719c7d..79d57f4 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -22,6 +22,7 @@ v-model="loginForm.username" placeholder="用户名" class="input-with-select" + tabindex="1" /> diff --git a/vue.config.js b/vue.config.js index a86d733..031f693 100644 --- a/vue.config.js +++ b/vue.config.js @@ -36,8 +36,8 @@ module.exports = { warnings: false, errors: true }, - // proxy: 'http://127.0.0.1:8250/' - before: require('./mock/mock-server.js') + proxy: 'http://121.37.203.43:8250/' + // before: require('./mock/mock-server.js') }, configureWebpack: { // provide the app's title in webpack's name field, so that
操作系统版本: {{ systemInfo.osVersion }}
磁盘剩余情况:{{ systemInfo.totalDiskFreeSpace }} / {{ systemInfo.totalDiskSpace }}
内存剩余情况:{{ systemInfo.freeMemorySize }} / {{ systemInfo.totalMemorySize }}
JVM名称: {{ systemInfo.javaVMName }}