Merge pull request #598 from jumpserver/dev

Dev
This commit is contained in:
Jiangjie.Bai
2021-01-21 15:35:46 +08:00
committed by GitHub
7 changed files with 26 additions and 22 deletions

View File

@@ -4,6 +4,7 @@
:initial="initial"
:fields-meta="fieldsMeta"
:url="url"
:has-detail-in-msg="false"
:get-next-route="getNextRoute"
/>
</template>

View File

@@ -111,7 +111,7 @@ export default {
title: this.$t('assets.TestAssetsConnective'),
name: 'TestSelected',
can({ selectedRows }) {
return selectedRows.length > 0 && vm.object.auto_push
return selectedRows.length > 0
},
callback: this.bulkTestCallback.bind(this)
}

View File

@@ -101,7 +101,7 @@ export default {
value: this.object.latest_execution.id,
formatter: function(row, value) {
const onClick = function() {
window.open(`/#/ops/celery/task/${value}/log/`, '', 'width=900,height=600')
window.open(`/#/ops/task/task/${value}/log/?type=ansible`, '', 'width=900,height=600')
}
const title = this.$t('common.View')
return <a onClick={onClick} >{ title }</a>

View File

@@ -56,7 +56,8 @@ export default {
rules: [Required]
},
bucket: {
label: this.$t('sessions.bucket')
label: this.$t('sessions.bucket'),
rules: [Required]
},
access_key: {
label: 'Access key',
@@ -68,10 +69,12 @@ export default {
},
endpoint: {
label: this.$t('sessions.endPoint'),
helpText: storageTypeMeta.endpointHelpText
helpText: storageTypeMeta.endpointHelpText,
rules: [Required]
},
region: {
label: this.$t('sessions.region')
label: this.$t('sessions.region'),
rules: [Required]
},
protocol: {
label: this.$t('sessions.protocol'),
@@ -83,13 +86,16 @@ export default {
rules: [Required]
},
container_name: {
label: this.$t('sessions.containerName')
label: this.$t('sessions.containerName'),
rules: [Required]
},
account_name: {
label: this.$t('sessions.accountName')
label: this.$t('sessions.accountName'),
rules: [Required]
},
account_key: {
label: this.$t('sessions.accountKey')
label: this.$t('sessions.accountKey'),
rules: [Required]
},
endpoint_suffix: {
label: this.$t('sessions.endpointSuffix'),

View File

@@ -166,21 +166,19 @@ export default {
if (applications) {
meta.apply_application_group = applications.split(',')
}
if (applications === '') {
delete validValues['apply_application_group']
}
delete validValues['apply_application_group']
if (systemUser) {
meta.apply_system_user_group = systemUser.split(',')
}
if (systemUser === '') {
delete validValues['apply_system_user_group']
}
delete validValues['apply_system_user_group']
meta.apply_category = validValues.apply_category_type[0]
meta.apply_type = validValues.apply_category_type[1]
delete validValues['apply_category_type']
meta.apply_date_start = validValues.apply_date_start
delete validValues['apply_date_start']

View File

@@ -103,7 +103,6 @@ export default {
},
methods: {
performSubmit(validValues) {
console.log(validValues)
const meta = {}
const ips = validValues.apply_ip_group
if (ips) {
@@ -113,7 +112,7 @@ export default {
delete validValues['apply_ip_group']
}
if (validValues.apply_hostname_group) {
meta.apply_hostname_group = validValues.apply_ip_group
meta.apply_hostname_group = validValues.apply_hostname_group.split(',')
delete validValues['apply_hostname_group']
}

View File

@@ -265,11 +265,11 @@ export default {
}
this.$message.success(successMsg)
} catch (error) {
let errorMsg = this.$t('common.bulkDeleteErrorMsg')
if (!this.currentOrgIsDefault) {
errorMsg = this.$t('common.bulkRemoveErrorMsg')
}
this.$message.error(errorMsg + error)
// let errorMsg = this.$t('common.bulkDeleteErrorMsg')
// if (!this.currentOrgIsDefault) {
// errorMsg = this.$t('common.bulkRemoveErrorMsg')
// }
// this.$message.error(errorMsg + error)
} finally {
instance.confirmButtonLoading = false
}