Merge branch 'dev' of github.com:jumpserver/lina into dev

This commit is contained in:
ibuler
2020-06-16 19:52:34 +08:00
6 changed files with 19 additions and 67 deletions

View File

@@ -58,15 +58,7 @@ export default {
fa: 'fa-terminal', fa: 'fa-terminal',
type: 'primary', type: 'primary',
callback: function({ row, col, cellValue, reload }) { callback: function({ row, col, cellValue, reload }) {
window.open(`/luna/?type=remote_app&login_to=${cellValue}`, '_blank') window.open(`/luna/?type=database_app&login_to=${cellValue}`, '_blank')
}
},
{
name: 'favor',
type: 'info',
fa: 'fa-star-o',
callback: function({ row, col, cellValue, reload }) {
window.open(`/luna/?type=remote_app&login_to=${cellValue}`, '_blank')
} }
} }
] ]

View File

@@ -59,14 +59,6 @@ export default {
callback: function({ row, col, cellValue, reload }) { callback: function({ row, col, cellValue, reload }) {
window.open(`/luna/?type=remote_app&login_to=${cellValue}`, '_blank') window.open(`/luna/?type=remote_app&login_to=${cellValue}`, '_blank')
} }
},
{
name: 'favor',
type: 'info',
fa: 'fa-star-o',
callback: function({ row, col, cellValue, reload }) {
window.open(`/luna/?type=remote_app&login_to=${cellValue}`, '_blank')
}
} }
] ]
} }

View File

@@ -141,12 +141,12 @@ export default {
this.actions = val this.actions = val
}, },
onClick(event, treeId, treeNode, clickFlag) { onClick(event, treeId, treeNode, clickFlag) {
if (treeNode.meta.type === 'asset') { // if (treeNode.meta.type === 'asset') {
const protocolsStr = treeNode.meta.asset.protocols + '' // const protocolsStr = treeNode.meta.asset.protocols + ''
if (protocolsStr.indexOf('ssh/') === -1) { // if (protocolsStr.indexOf('ssh/') === -1) {
// Don't Support SSH // // Don't Support SSH
} // }
} // }
}, },
handleSystemUserChange(id) { handleSystemUserChange(id) {
this.treeSetting.treeUrl = `${this.basicUrl}&system_user=${id}` this.treeSetting.treeUrl = `${this.basicUrl}&system_user=${id}`

View File

@@ -99,11 +99,11 @@ export default {
children: [ children: [
{ {
value: '1', value: '1',
label: this.$t('common.Validity') label: this.$t('common.Yes')
}, },
{ {
value: '0', value: '0',
label: this.$t('common.Invalidity') label: this.$t('common.No')
} }
] ]
}, },

View File

@@ -147,18 +147,10 @@ export default {
value['AUTH_LDAP_BIND_PASSWORD'] = '' value['AUTH_LDAP_BIND_PASSWORD'] = ''
} }
testLdapSetting(value).then(resp => { testLdapSetting(value).then(resp => {
this.$notify({ this.$message.success(resp)
message: resp,
type: 'success',
duration: 4500
})
}).catch(err => { }).catch(err => {
const response = err.response const response = err.response
this.$notify({ this.$message.error(response.data)
message: response.data,
type: 'error',
duration: 4500
})
}) })
}.bind(this) }.bind(this)
}, },
@@ -172,7 +164,6 @@ export default {
title: this.$t('setting.ldapBulkImport'), title: this.$t('setting.ldapBulkImport'),
callback: function(value, form) { callback: function(value, form) {
this.dialogLdapUserImport = true this.dialogLdapUserImport = true
this.$refs.listTable.reloadTable()
}.bind(this) }.bind(this)
} }
], ],
@@ -201,12 +192,7 @@ export default {
can: true, can: true,
callback: function() { callback: function() {
refreshLdapUserCache().then(res => { refreshLdapUserCache().then(res => {
this.$notify({ this.$message.success(res.msg)
message: res.msg,
type: 'success',
duration: 4500
})
setTimeout(this.$refs.listTable.reloadTable, 500)
}) })
}.bind(this) }.bind(this)
} }
@@ -238,18 +224,10 @@ export default {
}, },
testUerLoginClick() { testUerLoginClick() {
testLdapUserLogin(this.userLoginForm).then(res => { testLdapUserLogin(this.userLoginForm).then(res => {
this.$notify({ this.$message.success(res)
message: res,
type: 'success',
duration: 4500
})
}).catch(err => { }).catch(err => {
const response = err.response const response = err.response
this.$notify({ this.$message.error(response.data)
message: response.data,
type: 'error',
duration: 4500
})
}) })
}, },
importUserClick() { importUserClick() {
@@ -259,22 +237,12 @@ export default {
username_list: selectIds username_list: selectIds
} }
importLdapUser(data).then(res => { importLdapUser(data).then(res => {
this.$notify({ this.$message.success(res.msg)
message: res.msg,
type: 'success',
duration: 4500
})
}) })
}, },
handlerListTableXHRError(errMsg) { handlerListTableXHRError(errMsg) {
const response = errMsg.response
if (this.dialogLdapUserImport) { if (this.dialogLdapUserImport) {
this.$notify({ setTimeout(this.$refs.listTable.reloadTable, 3000)
message: response.data.msg,
type: 'error',
duration: 4500
})
setTimeout(this.$refs.listTable.reloadTable, 1000)
} }
} }
} }

View File

@@ -24,7 +24,7 @@ export default {
hasTree: true, hasTree: true,
columns: [ columns: [
'name', 'users_amount', 'user_groups_amount', 'assets_amount', 'name', 'users_amount', 'user_groups_amount', 'assets_amount',
'nodes_amount', 'system_users_amount', 'is_active', 'actions' 'nodes_amount', 'system_users_amount', 'is_valid', 'actions'
], ],
columnsMeta: { columnsMeta: {
name: { name: {
@@ -82,11 +82,11 @@ export default {
children: [ children: [
{ {
value: '1', value: '1',
label: this.$t('common.Validity') label: this.$t('common.Yes')
}, },
{ {
value: '0', value: '0',
label: this.$t('common.Invalidity') label: this.$t('common.No')
} }
] ]
}, },