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