mirror of
https://github.com/jumpserver/lina.git
synced 2025-11-19 06:29:54 +00:00
Compare commits
1 Commits
dev
...
pr@dev@k8s
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0c85e0c683 |
@@ -167,7 +167,8 @@ export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
<style lang='scss' scoped>
|
||||
|
||||
.page.no-title {
|
||||
::v-deep {
|
||||
.page-submenu .el-tabs__header {
|
||||
@@ -198,14 +199,6 @@ export default {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-disabled {
|
||||
cursor: not-allowed;
|
||||
|
||||
&:hover {
|
||||
color: #c0c4cc;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-tabs__nav-next {
|
||||
|
||||
@@ -149,11 +149,6 @@ export function getErrorResponseMsg(error) {
|
||||
.join('; ')
|
||||
} else if (typeof data === 'string') {
|
||||
return data
|
||||
} else if (_.isPlainObject(data)) {
|
||||
return Object.values(data)
|
||||
.map(item => getErrorResponseMsg(item))
|
||||
.filter(i => i)
|
||||
.join('; ')
|
||||
} else {
|
||||
msg = error.toString()
|
||||
}
|
||||
|
||||
@@ -144,6 +144,11 @@ export default {
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (!this.$store.getters.hasValidLicense) {
|
||||
delete this.fields[3]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleAfterGetRemoteMeta(meta) {
|
||||
const needSetOptionFields = [
|
||||
|
||||
@@ -57,7 +57,6 @@ export default {
|
||||
id: 'check',
|
||||
name: this.$t('Check'),
|
||||
icon: 'scan',
|
||||
has: (node) => node?.meta?.type === 'asset',
|
||||
callback: (node) => {
|
||||
vm.detectDialog.asset = node.id
|
||||
setTimeout(() => {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
class="risk-review-drawer"
|
||||
destroy-on-close
|
||||
direction="rtl"
|
||||
style="z-index: 999"
|
||||
>
|
||||
<div class="drawer-container">
|
||||
<div class="drawer-body">
|
||||
|
||||
@@ -10,7 +10,33 @@ export default {
|
||||
components: { BaseAssetCreateUpdate },
|
||||
data() {
|
||||
return {
|
||||
url: '/api/v1/assets/clouds/'
|
||||
url: '/api/v1/assets/clouds/',
|
||||
addFields: this.getAddFields(),
|
||||
addFieldsMeta: this.getAddFieldsMeta()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getAddFields() {
|
||||
const platform = this.$route.query.type
|
||||
const baseFields = []
|
||||
|
||||
if (platform === 'k8s') {
|
||||
baseFields.push([this.$t('Basic'), ['namespace'], 1])
|
||||
}
|
||||
|
||||
return baseFields
|
||||
},
|
||||
getAddFieldsMeta() {
|
||||
const platform = this.$route.query.type
|
||||
const fieldsMeta = {}
|
||||
|
||||
if (platform === 'k8s') {
|
||||
fieldsMeta['namespace'] = {
|
||||
label: this.$t('DefaultNamespace')
|
||||
}
|
||||
}
|
||||
|
||||
return fieldsMeta
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -515,8 +515,6 @@ export default {
|
||||
this.setBtn()
|
||||
this.selectAssets = assets
|
||||
this.selectNodes = nodes
|
||||
}).catch(() => {
|
||||
this.lastRequestPayload = null
|
||||
})
|
||||
},
|
||||
viewConfirmRunAssets() {
|
||||
@@ -527,8 +525,8 @@ export default {
|
||||
.then(() => {
|
||||
this.xterm.write(
|
||||
'\x1b[31m' +
|
||||
this.$tc('StopLogOutput').replace('currentTaskId', this.currentTaskId) +
|
||||
'\x1b[0m'
|
||||
this.$tc('StopLogOutput').replace('currentTaskId', this.currentTaskId) +
|
||||
'\x1b[0m'
|
||||
)
|
||||
this.xterm.write(this.wrapperError(''))
|
||||
this.getTaskStatus()
|
||||
|
||||
@@ -441,7 +441,8 @@ export default {
|
||||
this.xtermConfig = { taskId: this.currentTaskId, type: 'shortcut_cmd' }
|
||||
this.setCostTimeInterval()
|
||||
this.writeExecutionOutput()
|
||||
}).catch(() => {
|
||||
}).catch((error) => {
|
||||
this.$message.error(this.$tc('Error'), error)
|
||||
this.execute_stop()
|
||||
})
|
||||
})
|
||||
|
||||
@@ -224,12 +224,11 @@ export default {
|
||||
title: this.$t('ExecuteAfterSaving'),
|
||||
callback: (value, form, btn) => {
|
||||
form.value.run_after_save = true
|
||||
if (form.value?.variable) {
|
||||
form.value['parameters'] = form.value.variable.reduce((acc, item) => {
|
||||
acc[item.var_name] = item.default_value || ''
|
||||
return acc
|
||||
}, {})
|
||||
}
|
||||
const parameters = form.value.variable.reduce((acc, item) => {
|
||||
acc[item.var_name] = item.default_value || ''
|
||||
return acc
|
||||
}, {})
|
||||
form.value['parameters'] = parameters
|
||||
this.submitForm(form, btn)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,22 +32,6 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
passwordMenuDisabled() {
|
||||
return this.$store.state.users.profile.source.value !== 'local'
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
passwordMenuDisabled: {
|
||||
immediate: true,
|
||||
handler(disabled) {
|
||||
this.config.submenu = this.getSubmenu()
|
||||
if (disabled && this.config.activeMenu === 'Password') {
|
||||
this.config.activeMenu = 'SSHKeyList'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getSubmenu() {
|
||||
return [
|
||||
|
||||
@@ -161,7 +161,8 @@ module.exports = {
|
||||
target: process.env.VUE_APP_CORE_HOST || 'http://127.0.0.1:8080',
|
||||
changeOrigin: true
|
||||
}
|
||||
}
|
||||
},
|
||||
after: require('./mock/mock-server.js')
|
||||
},
|
||||
css: {},
|
||||
configureWebpack: {
|
||||
|
||||
Reference in New Issue
Block a user