feat: 修改工单会话展示字段

This commit is contained in:
“怀磊” 2022-01-14 16:01:58 +08:00 committed by Jiangjie.Bai
parent b1733835a4
commit c20453a1de
3 changed files with 32 additions and 8 deletions

View File

@ -847,6 +847,10 @@
"riskLevels": {
"common": "普通"
},
"SessionID": "会话ID",
"TargetResources": "目标资源",
"UseProtocol": "使用协议",
"SessionState": "会话状态",
"Monitor": "监控",
"XRDPNotSupport": "RDP 客户端会话, 暂不支持监控",
"sessionMonitor": "监控",

View File

@ -828,6 +828,10 @@
"riskLevels": {
"common": "common"
},
"SessionID": "Session ID",
"TargetResources": "Target resources",
"UseProtocol": "Use protocol",
"SessionState": "Session state",
"Monitor": "Monitor",
"XRDPNotSupport": "RDP Client session not support now",
"sessionMonitor": "Session Monitor",

View File

@ -7,22 +7,28 @@
<div class="content">
<el-row class="item">
<el-col>
<span class="item-label">{{ $t('tickets.status') }}</span>
<span class="item-value">
{{ session.is_finished ? $t('sessions.noAlive') : $t('sessions.alive') }}
</span>
<span class="item-label">{{ $t('sessions.SessionID') }}</span>
<span class="item-value">{{ session.id }}</span>
</el-col>
<el-col>
<span class="item-label">{{ $t('sessions.target') }}</span>
<span class="item-label">{{ $t('sessions.TargetResources') }}</span>
<span class="item-value">{{ session.asset }}</span>
</el-col>
<el-col>
<span class="item-label">{{ $t('tickets.SystemUser') }}</span>
<span class="item-value">{{ session.system_user }}</span>
</el-col>
<el-col>
<span class="item-label">{{ $t('sessions.UseProtocol') }}</span>
<span class="item-value">{{ session.protocol }}</span>
</el-col>
<el-col>
<span class="item-label">{{ $t('sessions.remoteAddr') }}</span>
<span class="item-value">{{ session.remote_addr }}</span>
</el-col>
<el-col>
<span class="item-label">{{ $t('sessions.protocol') }}</span>
<span class="item-value">{{ session.protocol }}</span>
<span class="item-label">{{ $t('sessions.SessionState') }}</span>
<span class="item-value cur-color" :style="{ 'background': session.is_finished ? '#ed5565' : '#1ab394' }" />
</el-col>
</el-row>
</div>
@ -72,7 +78,7 @@ export default {
this.init()
}
},
destroyed() {
beforeDestroy() {
clearTimeout(this.curTimer)
},
methods: {
@ -86,6 +92,9 @@ export default {
}).then(res => {
this.session = res || {}
}).catch(err => {
this.curTimer = setTimeout(() => {
this.init()
}, 1400)
this.$log.debug('error', err)
}).finally(() => {
this.loading = false
@ -137,4 +146,11 @@ export default {
.bottom-btn {
text-align: right;
}
.cur-color {
display: inline-block;
width: 12px;
height: 12px;
vertical-align: text-top;
border-radius: 50%;
}
</style>