mirror of
https://github.com/jumpserver/lina.git
synced 2025-11-19 23:29:07 +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
|
deep: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
|
||||||
if (!this.$store.getters.hasValidLicense) {
|
|
||||||
delete this.fields[3]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
handleAfterGetRemoteMeta(meta) {
|
handleAfterGetRemoteMeta(meta) {
|
||||||
const needSetOptionFields = [
|
const needSetOptionFields = [
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ export default {
|
|||||||
id: 'check',
|
id: 'check',
|
||||||
name: this.$t('Check'),
|
name: this.$t('Check'),
|
||||||
icon: 'scan',
|
icon: 'scan',
|
||||||
|
has: (node) => node?.meta?.type === 'asset',
|
||||||
callback: (node) => {
|
callback: (node) => {
|
||||||
vm.detectDialog.asset = node.id
|
vm.detectDialog.asset = node.id
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|||||||
@@ -10,33 +10,7 @@ export default {
|
|||||||
components: { BaseAssetCreateUpdate },
|
components: { BaseAssetCreateUpdate },
|
||||||
data() {
|
data() {
|
||||||
return {
|
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,6 +515,8 @@ export default {
|
|||||||
this.setBtn()
|
this.setBtn()
|
||||||
this.selectAssets = assets
|
this.selectAssets = assets
|
||||||
this.selectNodes = nodes
|
this.selectNodes = nodes
|
||||||
|
}).catch(() => {
|
||||||
|
this.lastRequestPayload = null
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
viewConfirmRunAssets() {
|
viewConfirmRunAssets() {
|
||||||
@@ -525,8 +527,8 @@ export default {
|
|||||||
.then(() => {
|
.then(() => {
|
||||||
this.xterm.write(
|
this.xterm.write(
|
||||||
'\x1b[31m' +
|
'\x1b[31m' +
|
||||||
this.$tc('StopLogOutput').replace('currentTaskId', this.currentTaskId) +
|
this.$tc('StopLogOutput').replace('currentTaskId', this.currentTaskId) +
|
||||||
'\x1b[0m'
|
'\x1b[0m'
|
||||||
)
|
)
|
||||||
this.xterm.write(this.wrapperError(''))
|
this.xterm.write(this.wrapperError(''))
|
||||||
this.getTaskStatus()
|
this.getTaskStatus()
|
||||||
|
|||||||
@@ -441,8 +441,7 @@ export default {
|
|||||||
this.xtermConfig = { taskId: this.currentTaskId, type: 'shortcut_cmd' }
|
this.xtermConfig = { taskId: this.currentTaskId, type: 'shortcut_cmd' }
|
||||||
this.setCostTimeInterval()
|
this.setCostTimeInterval()
|
||||||
this.writeExecutionOutput()
|
this.writeExecutionOutput()
|
||||||
}).catch((error) => {
|
}).catch(() => {
|
||||||
this.$message.error(this.$tc('Error'), error)
|
|
||||||
this.execute_stop()
|
this.execute_stop()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -224,11 +224,12 @@ export default {
|
|||||||
title: this.$t('ExecuteAfterSaving'),
|
title: this.$t('ExecuteAfterSaving'),
|
||||||
callback: (value, form, btn) => {
|
callback: (value, form, btn) => {
|
||||||
form.value.run_after_save = true
|
form.value.run_after_save = true
|
||||||
const parameters = form.value.variable.reduce((acc, item) => {
|
if (form.value?.variable) {
|
||||||
acc[item.var_name] = item.default_value || ''
|
form.value['parameters'] = form.value.variable.reduce((acc, item) => {
|
||||||
return acc
|
acc[item.var_name] = item.default_value || ''
|
||||||
}, {})
|
return acc
|
||||||
form.value['parameters'] = parameters
|
}, {})
|
||||||
|
}
|
||||||
this.submitForm(form, btn)
|
this.submitForm(form, btn)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8570,9 +8570,9 @@ js-tokens@^3.0.2:
|
|||||||
integrity sha512-RjTcuD4xjtthQkaWH7dFlH85L+QaVtSoOyGdZ3g6HFhS9dFNDfLyqgm2NFe2X6cQpeFmt0452FJjFG5UameExg==
|
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:
|
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"
|
version "3.14.2"
|
||||||
resolved "https://registry.npmmirror.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537"
|
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.2.tgz#77485ce1dd7f33c061fd1b16ecea23b55fcb04b0"
|
||||||
integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==
|
integrity sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==
|
||||||
dependencies:
|
dependencies:
|
||||||
argparse "^1.0.7"
|
argparse "^1.0.7"
|
||||||
esprima "^4.0.0"
|
esprima "^4.0.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user