Skip to content

Commit

Permalink
<feat>(views): adapt systemStatus interfaces. (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyonRay authored Sep 6, 2023
1 parent e449b6f commit f8c8ebe
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
22 changes: 22 additions & 0 deletions src/views/homepage/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@
<el-card style="min-height: 45vh;overflow-y:auto">
<div slot="header">
<span>本地系统信息</span>
<el-button icon="el-icon-refresh-left" type="text" style="padding: 0px;float:right" @click="refreshSystemInfo">刷新</el-button>
</div>
<table>
<tr>
Expand All @@ -194,6 +195,14 @@
<td>操作系统版本:</td>
<td>{{ systemInfo.osVersion }}</td>
</tr>
<tr>
<td>磁盘剩余情况:</td>
<td>{{ systemInfo.totalDiskFreeSpace }} / {{ systemInfo.totalDiskSpace }}</td>
</tr>
<tr>
<td>内存剩余情况:</td>
<td>{{ systemInfo.freeMemorySize }} / {{ systemInfo.totalMemorySize }}</td>
</tr>
<tr>
<td>JVM名称:</td>
<td>{{ systemInfo.javaVMName }}</td>
Expand Down Expand Up @@ -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 = []
Expand Down
1 change: 1 addition & 0 deletions src/views/login/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
v-model="loginForm.username"
placeholder="用户名"
class="input-with-select"
tabindex="1"
/>
</el-form-item>
</el-col>
Expand Down
4 changes: 2 additions & 2 deletions vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f8c8ebe

Please sign in to comment.