mirror of
https://github.com/jumpserver/lina.git
synced 2025-07-31 06:42:26 +00:00
Merge pull request #549 from jumpserver/dev
chore: Merge master from dev
This commit is contained in:
commit
bc258a7ff8
@ -423,6 +423,7 @@
|
||||
"UserGroups": "用户组",
|
||||
"DatabaseAppPermission": "数据库授权",
|
||||
"RemoteAppPermission": "远程应用授权",
|
||||
"addApplicationToThisPermission": "添加应用",
|
||||
"KubernetesAppPermission": "Kubernetes授权",
|
||||
"addAssetToThisPermission": "添加资产",
|
||||
"addDatabaseAppToThisPermission": "添加数据库应用",
|
||||
@ -614,6 +615,10 @@
|
||||
"name": "名称",
|
||||
"protocol": "协议",
|
||||
"region": "地域",
|
||||
"sessionActiveCount": "在线会话数量",
|
||||
"systemCpuLoad": "CPU负载",
|
||||
"systemDiskUsedPercent": "硬盘使用率",
|
||||
"systemMemoryUsedPercent": "内存使用率",
|
||||
"remoteAddr": "远端地址",
|
||||
"replay": "回放",
|
||||
"replaySession": "回放会话",
|
||||
@ -1036,10 +1041,11 @@
|
||||
"License": "许可证",
|
||||
"SystemMonitor": "系统监控",
|
||||
"ServiceRatio": "组件负载统计",
|
||||
"LoadStatus":"组件负载状态",
|
||||
"NormalLoad":"负载正常",
|
||||
"HighLoad":"负载较高",
|
||||
"CriticalLoad":"负载严重",
|
||||
"LoadStatus":"组件状态",
|
||||
"NormalLoad":"正常",
|
||||
"HighLoad":"较高",
|
||||
"CriticalLoad":"严重",
|
||||
"Offline": "离线",
|
||||
"LicenseDetail": "许可证详情",
|
||||
"LicenseFile": "许可证文件",
|
||||
"NoLicense": "暂无许可证",
|
||||
|
@ -425,6 +425,7 @@
|
||||
"addAssetToThisPermission": "Add asset to this permission",
|
||||
"addDatabaseAppToThisPermission": "Add DatabaseApp to this permission",
|
||||
"addK8sAppToThisPermission": "Add KubernetesApp to this permission",
|
||||
"addApplicationToThisPermission": "Add Application to this permission",
|
||||
"addNodeToThisPermission": "Add node to this permission",
|
||||
"addRemoteAppToThisPermission": "Add RemoteApp to this permission",
|
||||
"addSystemUserToThisPermission": "System user",
|
||||
@ -595,6 +596,10 @@
|
||||
"duration": "Duration",
|
||||
"endPoint": "Endpoint",
|
||||
"endpointSuffix": "Endpoint suffix",
|
||||
"sessionActiveCount": "session active count",
|
||||
"systemCpuLoad": "cpu load",
|
||||
"systemDiskUsedPercent": "disk used percent",
|
||||
"systemMemoryUsedPercent": "memory used percent",
|
||||
"go": "Go",
|
||||
"goto": "Goto",
|
||||
"hosts": "Hosts",
|
||||
@ -1025,10 +1030,11 @@
|
||||
"LicenseDetail": "License detail",
|
||||
"SystemMonitor": "System Monitor",
|
||||
"ServiceRatio": "Service ratio",
|
||||
"LoadStatus":"Load status",
|
||||
"NormalLoad":"Normal load",
|
||||
"HighLoad":"High load",
|
||||
"CriticalLoad":"Critical load",
|
||||
"LoadStatus":"Status",
|
||||
"NormalLoad":"Normal",
|
||||
"HighLoad":"High",
|
||||
"Offline": "Offline",
|
||||
"CriticalLoad":"Critical",
|
||||
"LicenseFile": "License file",
|
||||
"NoLicense": "No License",
|
||||
"Node": "Node",
|
||||
|
@ -1,12 +1,14 @@
|
||||
<template>
|
||||
<IBox>
|
||||
<GenericCreateUpdateForm
|
||||
ref="GenericCreateUpdateForm"
|
||||
:fields="fields"
|
||||
:fields-meta="fieldsMeta"
|
||||
:initial="object"
|
||||
:url="url"
|
||||
:get-method="getMethod"
|
||||
:more-buttons="moreButtons"
|
||||
:on-perform-success="onPerformSuccess"
|
||||
/>
|
||||
</IBox>
|
||||
</template>
|
||||
@ -65,6 +67,10 @@ export default {
|
||||
methods: {
|
||||
getMethod() {
|
||||
return 'put'
|
||||
},
|
||||
onPerformSuccess() {
|
||||
this.$refs.GenericCreateUpdateForm.$refs.form.$refs.dataForm.resetForm('form')
|
||||
this.$message.success(this.$t('common.updateSuccessMsg'))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -68,14 +68,14 @@ export default {
|
||||
},
|
||||
remoteAppRelationConfig: {
|
||||
icon: 'fa-edit',
|
||||
title: this.$t('perms.addRemoteAppToThisPermission'),
|
||||
title: this.$t('perms.addApplicationToThisPermission'),
|
||||
objectsAjax: {
|
||||
url: `/api/v1/applications/applications/?category=${this.object.category}&type=${this.object.type}`,
|
||||
transformOption: (item) => {
|
||||
return { label: item.name + ' (' + item.type_display + ')', value: item.id }
|
||||
}
|
||||
},
|
||||
hasObjectsId: this.object.application,
|
||||
hasObjectsId: this.object.applications,
|
||||
showHasObjects: false,
|
||||
performAdd: (items) => {
|
||||
const objectId = this.object.id
|
||||
|
@ -92,11 +92,39 @@ export default {
|
||||
},
|
||||
tableConfig: {
|
||||
url: '/api/v1/terminal/terminals/',
|
||||
columns: ['name', 'remote_addr', 'session_online', 'is_active', 'is_alive', 'actions'],
|
||||
columns: ['name', 'remote_addr', 'session_online',
|
||||
'state.session_active_count',
|
||||
'state.system_cpu_load_1',
|
||||
'state.system_disk_used_percent',
|
||||
'state.system_memory_used_percent',
|
||||
'status_display',
|
||||
'is_active',
|
||||
'is_alive',
|
||||
'actions'],
|
||||
columnsMeta: {
|
||||
name: {
|
||||
sortable: 'custom'
|
||||
},
|
||||
'state.session_active_count': {
|
||||
label: this.$t('sessions.sessionActiveCount'),
|
||||
width: '160px'
|
||||
},
|
||||
'state.system_cpu_load_1': {
|
||||
label: this.$t('sessions.systemCpuLoad'),
|
||||
width: '160px'
|
||||
},
|
||||
'state.system_disk_used_percent': {
|
||||
label: this.$t('sessions.systemDiskUsedPercent'),
|
||||
width: '160px'
|
||||
},
|
||||
'state.system_memory_used_percent': {
|
||||
label: this.$t('sessions.systemMemoryUsedPercent'),
|
||||
width: '160px'
|
||||
},
|
||||
'status_display': {
|
||||
label: this.$t('xpack.LoadStatus'),
|
||||
width: '120px'
|
||||
},
|
||||
remote_addr: {
|
||||
sortable: 'custom'
|
||||
},
|
||||
|
@ -1,7 +1,9 @@
|
||||
<template>
|
||||
<div>
|
||||
<div style="font-size: 24px;font-weight: 300">
|
||||
<span>{{ `${(type).replace(/^\S/, s => s.toUpperCase())} ( ${serviceData.total} )` }}</span>
|
||||
<span v-if="type === 'omnidb'">{{ `OmniDB ( ${serviceData.total} )` }}</span>
|
||||
<span v-else-if="type === 'guacamole'">{{ `Guacamole ( ${serviceData.total} )` }}</span>
|
||||
<span v-else>{{ `KoKo ( ${serviceData.total} )` }}</span>
|
||||
</div>
|
||||
<el-card class="box-card" shadow="never">
|
||||
<el-row :gutter="10">
|
||||
@ -24,6 +26,11 @@
|
||||
role="progressbar"
|
||||
:style="{'width':toPercent(serviceData.critical) }"
|
||||
/>
|
||||
<div
|
||||
class="progress-bar progress-bar-offline"
|
||||
role="progressbar"
|
||||
:style="{'width':toPercent(serviceData.offline) }"
|
||||
/>
|
||||
</div>
|
||||
<div style="display: flex;justify-content: space-around;font-size: 14px;">
|
||||
<span>
|
||||
@ -31,13 +38,17 @@
|
||||
{{ $t('xpack.NormalLoad') }}: {{ serviceData.normal }}
|
||||
</span>
|
||||
<span>
|
||||
<i class="el-icon-warning" style="color: #E6A23C;" />
|
||||
<i class="el-icon-bell" style="color: #E6A23C;" />
|
||||
{{ $t('xpack.HighLoad') }}: {{ serviceData.high }}
|
||||
</span>
|
||||
<span>
|
||||
<i class="el-icon-circle-close" style="color: #FF4949;" />
|
||||
<i class="el-icon-message-solid" style="color: #FF4949;" />
|
||||
{{ $t('xpack.CriticalLoad') }}: {{ serviceData.critical }}
|
||||
</span>
|
||||
<span>
|
||||
<i class="el-icon-circle-close" style="color: #bfbaba;" />
|
||||
{{ $t('xpack.Offline') }}: {{ serviceData.offline }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
@ -121,6 +132,9 @@ export default {
|
||||
.progress-bar-danger{
|
||||
background-color: #FF4949 !important;
|
||||
}
|
||||
.progress-bar-offline{
|
||||
background-color: #bfbaba !important;
|
||||
}
|
||||
.progress-bar {
|
||||
float: left;
|
||||
width: 0;
|
||||
|
@ -1,18 +1,18 @@
|
||||
<template>
|
||||
<Page>
|
||||
<el-row :gutter="40">
|
||||
<el-col :lg="8" :offset="4" class="monitorCard">
|
||||
<el-col :lg="{span:10,offset:2 }" :md="24" class="monitorCard">
|
||||
<MonitorCard type="koko" />
|
||||
</el-col>
|
||||
<el-col :lg="8" class="monitorCard">
|
||||
<el-col :lg="10" :md="24" class="monitorCard">
|
||||
<MonitorCard type="guacamole" />
|
||||
</el-col>
|
||||
<el-col :offset="4" :lg="8" class="monitorCard">
|
||||
<MonitorCard type="omniDB" />
|
||||
<el-col :lg="{span:10,offset:2 }" :md="24" class="monitorCard">
|
||||
<MonitorCard type="omnidb" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</Page>
|
||||
</template>
|
||||
</template>lg
|
||||
|
||||
<script>
|
||||
import Page from '@/layout/components/Page/index'
|
||||
|
Loading…
Reference in New Issue
Block a user