Merge pull request #788 from jumpserver/dev

v2.10.0 rc1
This commit is contained in:
Jiangjie.Bai
2021-05-13 19:47:27 +08:00
committed by GitHub
2 changed files with 13 additions and 1 deletions

View File

@@ -86,7 +86,10 @@ export default {
labels: {
el: {
ajax: {
url: '/api/v1/assets/labels/'
url: '/api/v1/assets/labels/',
transformOption: (item) => {
return { label: `${item.name}:${item.value}`, value: item.id }
}
}
}
},

View File

@@ -40,10 +40,19 @@ export default {
title: this.$t('sessions.Monitor'),
type: 'primary',
can: (row, cellValue) => {
if (row.protocol === 'rdp' ||
row.protocol === 'vnc') {
return true
}
return row.can_join
},
callback: function({ row, tableData }) {
// 跳转到luna页面
if (row.protocol === 'rdp' || row.protocol === 'vnc') {
const rdpUrl = '/lion/monitor/?session=' + row.id
window.open(rdpUrl, '_blank', 'location=no')
return true
}
const joinUrl = '/luna/join/?shareroom=' + row.id
window.open(joinUrl, 'height=600, width=800, top=400, left=400, toolbar=no, menubar=no, scrollbars=no, location=no, status=no')
}