diff --git a/src/utils/jms.js b/src/utils/jms.js index 8b281314c..d09a51322 100644 --- a/src/utils/jms.js +++ b/src/utils/jms.js @@ -152,6 +152,6 @@ export function toM2MJsonParams(attrFilter) { } export function IsSupportPauseSessionType(terminalType) { - const supportedType = ['koko', 'lion', 'magnus', 'chen', 'kael'] + const supportedType = ['koko', 'lion', 'chen', 'kael'] return supportedType.includes(terminalType) } diff --git a/src/views/sessions/SessionList/OnlineList.vue b/src/views/sessions/SessionList/OnlineList.vue index 1aa336808..752bd664a 100644 --- a/src/views/sessions/SessionList/OnlineList.vue +++ b/src/views/sessions/SessionList/OnlineList.vue @@ -40,7 +40,8 @@ export default { type: 'warning', can: ({ row }) => { const terminalType = row['terminal']['type'] - const supportedType = IsSupportPauseSessionType(terminalType) + const isNormalSession = row['type']['value'] === 'normal' + const supportedType = IsSupportPauseSessionType(terminalType) && isNormalSession return supportedType && vm.$hasPerm('terminal.terminate_session') }, has: ({ row }) => !row['is_locked'], @@ -63,7 +64,8 @@ export default { type: 'warning', can: ({ row }) => { const terminalType = row['terminal']['type'] - const supportedType = IsSupportPauseSessionType(terminalType) + const isNormalSession = row['type']['value'] === 'normal' + const supportedType = IsSupportPauseSessionType(terminalType) && isNormalSession return supportedType && vm.$hasPerm('terminal.terminate_session') }, has: ({ row }) => row['is_locked'], @@ -94,7 +96,7 @@ export default { }, callback: function({ row, tableData }) { const monitorUrl = '/luna/monitor/' + row.id - window.open(monitorUrl, '_blank', 'height=600, width=800, top=400, left=400, toolbar=no, menubar=no, scrollbars=no, location=no, status=no') + window.open(monitorUrl, '_blank', 'height=600, width=850, top=400, left=400, toolbar=no, menubar=no, scrollbars=no, location=no, status=no') } } ] diff --git a/src/views/tickets/components/Session.vue b/src/views/tickets/components/Session.vue index c1d1e6cf5..71604bba2 100644 --- a/src/views/tickets/components/Session.vue +++ b/src/views/tickets/components/Session.vue @@ -109,7 +109,8 @@ export default { }).then(res => { this.session = res || {} const terminalType = res['terminal']['type'] - this.supportedLock = IsSupportPauseSessionType(terminalType) + const isNormalSession = res['type']['value'] === 'normal' + this.supportedLock = IsSupportPauseSessionType(terminalType) && isNormalSession }).catch(err => { this.curTimer = setTimeout(() => { this.init() @@ -133,7 +134,7 @@ export default { }, onMonitor() { const joinUrl = `/luna/monitor/${this.session.id}?ticket_id=${this.object.id}` - window.open(joinUrl, 'height=600, width=800, top=400, left=400, toolbar=no, menubar=no, scrollbars=no, location=no, status=no') + window.open(joinUrl, 'height=600, width=850, top=400, left=400, toolbar=no, menubar=no, scrollbars=no, location=no, status=no') }, onToggleLock() { const url = '/api/v1/terminal/tasks/toggle-lock-session-for-ticket/'