Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<feat>(views): adapt systemStatus interfaces. #180

Merged
merged 1 commit into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading