parent
ff9d8df3e5
commit
bbaee61961
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -166,3 +166,14 @@ export function systemEdit(data) {
|
|||
data
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 服务器信息
|
||||
* @param {array} params 请求参数
|
||||
*/
|
||||
export function serverInfo(params) {
|
||||
return request({
|
||||
url: url + 'serverInfo',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
|
|
@ -0,0 +1,172 @@
|
|||
<template>
|
||||
<el-card class="dialog-body" :style="{height:height+'px'}">
|
||||
<el-row :gutter="8">
|
||||
<el-col :span="12">
|
||||
<el-form :model="model" label-width="150px">
|
||||
<el-form-item label="OS">
|
||||
<el-input v-model="model.system_info" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Web">
|
||||
<el-input v-model="model.server_software" />
|
||||
</el-form-item>
|
||||
<el-form-item label="MySQL">
|
||||
<el-input v-model="model.mysql" />
|
||||
</el-form-item>
|
||||
<el-form-item label="PHP">
|
||||
<el-input v-model="model.php_version" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Protocol">
|
||||
<el-input v-model="model.server_protocol" />
|
||||
</el-form-item>
|
||||
<el-form-item label="IP">
|
||||
<el-input v-model="model.ip" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Domain">
|
||||
<el-input v-model="model.domain" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Port">
|
||||
<el-input v-model="model.port" />
|
||||
</el-form-item>
|
||||
<el-form-item label="php_sapi_name">
|
||||
<el-input v-model="model.php_sapi_name" />
|
||||
</el-form-item>
|
||||
<el-form-item label="max_execution_time">
|
||||
<el-input v-model="model.max_execution_time" />
|
||||
</el-form-item>
|
||||
<el-form-item label="upload_max_filesize">
|
||||
<el-input v-model="model.upload_max_filesize" />
|
||||
</el-form-item>
|
||||
<el-form-item label="post_max_size" class="ya-margin-bottom">
|
||||
<el-input v-model="model.post_max_size" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form :model="model" label-width="150px">
|
||||
<el-form-item label="缓存类型" prop="type">
|
||||
<el-input v-model="model.type" />
|
||||
</el-form-item>
|
||||
<div v-if="model.type === 'redis'">
|
||||
<el-form-item label="Redis" prop="">
|
||||
<el-input v-model="model.redis_version" />
|
||||
</el-form-item>
|
||||
<el-form-item label="运行时长" prop="">
|
||||
<el-input v-model="model.uptime_in_days" />
|
||||
</el-form-item>
|
||||
<el-form-item label="已用内存" prop="">
|
||||
<el-input v-model="model.used_memory_human" />
|
||||
</el-form-item>
|
||||
<el-form-item label="峰值内存" prop="">
|
||||
<el-input v-model="model.used_memory_peak_human" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Lua内存" prop="">
|
||||
<el-input v-model="model.used_memory_lua_human" />
|
||||
</el-form-item>
|
||||
<el-form-item label="客户端数" prop="">
|
||||
<el-input v-model="model.connected_clients" />
|
||||
</el-form-item>
|
||||
<el-form-item label="总连接数" prop="">
|
||||
<el-input v-model="model.total_connections_received" />
|
||||
</el-form-item>
|
||||
<el-form-item label="总命令数" prop="">
|
||||
<el-input v-model="model.total_commands_processed" />
|
||||
</el-form-item>
|
||||
<el-form-item label="内存碎片比率" prop="">
|
||||
<el-input v-model="model.mem_fragmentation_ratio" />
|
||||
</el-form-item>
|
||||
<el-form-item label="DB0" prop="" class="ya-margin-bottom">
|
||||
<el-input v-model="model.db0" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div v-else-if="model.type === 'memcache'">
|
||||
<el-form-item label="memcache" prop="">
|
||||
<el-input v-model="model.version" />
|
||||
</el-form-item>
|
||||
<el-form-item label="运行秒数" prop="">
|
||||
<el-input v-model="model.uptime" />
|
||||
</el-form-item>
|
||||
<el-form-item label="读取字节总数" prop="">
|
||||
<el-input v-model="model.bytes_read" />
|
||||
</el-form-item>
|
||||
<el-form-item label="写入字节总数" prop="">
|
||||
<el-input v-model="model.bytes_written" />
|
||||
</el-form-item>
|
||||
<el-form-item label="分配的内存数" prop="">
|
||||
<el-input v-model="model.limit_maxbytes" />
|
||||
</el-form-item>
|
||||
<el-form-item label="当前打开链接数" prop="">
|
||||
<el-input v-model="model.curr_connections" />
|
||||
</el-form-item>
|
||||
<el-form-item label="曾打开连接总数" prop="">
|
||||
<el-input v-model="model.total_connections" />
|
||||
</el-form-item>
|
||||
<el-form-item label="执行get命令总数" prop="">
|
||||
<el-input v-model="model.cmd_get" />
|
||||
</el-form-item>
|
||||
<el-form-item label="执行set命令总数" prop="">
|
||||
<el-input v-model="model.cmd_set" />
|
||||
</el-form-item>
|
||||
<el-form-item label="flush_all命令总数" prop="">
|
||||
<el-input v-model="model.cmd_flush" />
|
||||
</el-form-item>
|
||||
<el-form-item label="当前服务器时间" prop="" class="ya-margin-bottom">
|
||||
<el-input v-model="model.time" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div v-else-if="model.type === 'wincache'">
|
||||
<el-form-item label="缓存信息" prop="wincache_info">
|
||||
<pre>{{ model.wincache_info }}</pre>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<el-form-item label="">
|
||||
<el-button :loading="loading" icon="el-icon-refresh" title="刷新" @click="refresh()" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import screenHeight from '@/utils/screen-height'
|
||||
import { serverInfo } from '@/api/system/setting'
|
||||
|
||||
export default {
|
||||
name: 'SystemSettingServer',
|
||||
components: { },
|
||||
data() {
|
||||
return {
|
||||
name: '服务器信息',
|
||||
height: 680,
|
||||
loading: false,
|
||||
model: {}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.height = screenHeight(180)
|
||||
this.info()
|
||||
},
|
||||
methods: {
|
||||
// 信息
|
||||
info() {
|
||||
serverInfo().then(res => {
|
||||
this.model = res.data
|
||||
})
|
||||
},
|
||||
// 刷新
|
||||
refresh() {
|
||||
this.loading = true
|
||||
serverInfo().then((res) => {
|
||||
this.model = res.data
|
||||
this.loading = false
|
||||
this.$message.success(res.msg)
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
|
@ -22,6 +22,9 @@
|
|||
<el-tab-pane v-if="checkPermission(['admin/system.Setting/systemInfo'])" label="系统设置" lazy>
|
||||
<setting-system />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane v-if="checkPermission(['admin/system.Setting/serverInfo'])" label="服务器信息" lazy>
|
||||
<setting-server />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -33,13 +36,14 @@ import SettingCache from './components/SettingCache'
|
|||
import SettingCaptcha from './components/SettingCaptcha'
|
||||
import SettingEmail from './components/SettingEmail'
|
||||
import SettingLog from './components/SettingLog'
|
||||
import SettingServer from './components/SettingServer'
|
||||
import SettingSystem from './components/SettingSystem'
|
||||
import SettingToken from './components/SettingToken'
|
||||
|
||||
export default {
|
||||
name: 'SystemSetting',
|
||||
directives: {},
|
||||
components: { SettingApi, SettingCache, SettingCaptcha, SettingEmail, SettingLog, SettingSystem, SettingToken },
|
||||
components: { SettingApi, SettingCache, SettingCaptcha, SettingEmail, SettingLog, SettingServer, SettingSystem, SettingToken },
|
||||
data() {
|
||||
return {
|
||||
name: '系统设置'
|
||||
|
|
Loading…
Reference in New Issue