mirror of
https://github.com/jumpserver/lina.git
synced 2025-11-18 05:49:14 +00:00
Compare commits
4 Commits
pr@dev@k8s
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
257a43a136 | ||
|
|
8e69206cfb | ||
|
|
338706247a | ||
|
|
2ae3e06484 |
@@ -144,11 +144,6 @@ export default {
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (!this.$store.getters.hasValidLicense) {
|
||||
delete this.fields[3]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleAfterGetRemoteMeta(meta) {
|
||||
const needSetOptionFields = [
|
||||
|
||||
@@ -57,6 +57,7 @@ export default {
|
||||
id: 'check',
|
||||
name: this.$t('Check'),
|
||||
icon: 'scan',
|
||||
has: (node) => node?.meta?.type === 'asset',
|
||||
callback: (node) => {
|
||||
vm.detectDialog.asset = node.id
|
||||
setTimeout(() => {
|
||||
|
||||
@@ -10,33 +10,7 @@ export default {
|
||||
components: { BaseAssetCreateUpdate },
|
||||
data() {
|
||||
return {
|
||||
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
|
||||
url: '/api/v1/assets/clouds/'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -515,6 +515,8 @@ export default {
|
||||
this.setBtn()
|
||||
this.selectAssets = assets
|
||||
this.selectNodes = nodes
|
||||
}).catch(() => {
|
||||
this.lastRequestPayload = null
|
||||
})
|
||||
},
|
||||
viewConfirmRunAssets() {
|
||||
@@ -525,8 +527,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,8 +441,7 @@ export default {
|
||||
this.xtermConfig = { taskId: this.currentTaskId, type: 'shortcut_cmd' }
|
||||
this.setCostTimeInterval()
|
||||
this.writeExecutionOutput()
|
||||
}).catch((error) => {
|
||||
this.$message.error(this.$tc('Error'), error)
|
||||
}).catch(() => {
|
||||
this.execute_stop()
|
||||
})
|
||||
})
|
||||
|
||||
@@ -224,11 +224,12 @@ export default {
|
||||
title: this.$t('ExecuteAfterSaving'),
|
||||
callback: (value, form, btn) => {
|
||||
form.value.run_after_save = true
|
||||
const parameters = form.value.variable.reduce((acc, item) => {
|
||||
acc[item.var_name] = item.default_value || ''
|
||||
return acc
|
||||
}, {})
|
||||
form.value['parameters'] = parameters
|
||||
if (form.value?.variable) {
|
||||
form.value['parameters'] = form.value.variable.reduce((acc, item) => {
|
||||
acc[item.var_name] = item.default_value || ''
|
||||
return acc
|
||||
}, {})
|
||||
}
|
||||
this.submitForm(form, btn)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8570,9 +8570,9 @@ js-tokens@^3.0.2:
|
||||
integrity sha512-RjTcuD4xjtthQkaWH7dFlH85L+QaVtSoOyGdZ3g6HFhS9dFNDfLyqgm2NFe2X6cQpeFmt0452FJjFG5UameExg==
|
||||
|
||||
js-yaml@^3.13.0, js-yaml@^3.13.1, js-yaml@^3.14.0, js-yaml@^3.7.0, js-yaml@^3.9.1:
|
||||
version "3.14.1"
|
||||
resolved "https://registry.npmmirror.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537"
|
||||
integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==
|
||||
version "3.14.2"
|
||||
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.2.tgz#77485ce1dd7f33c061fd1b16ecea23b55fcb04b0"
|
||||
integrity sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==
|
||||
dependencies:
|
||||
argparse "^1.0.7"
|
||||
esprima "^4.0.0"
|
||||
|
||||
Reference in New Issue
Block a user