diff --git a/src/views/pages/deploy/application-config/config/env/env-autoconfig-audit.vue b/src/views/pages/deploy/application-config/config/env/env-autoconfig-audit.vue index 562f544b97cc1b2e0378125e2122b8c8464a18e3..312242a04eb152871bcf32359b020ea3477d41ae 100644 --- a/src/views/pages/deploy/application-config/config/env/env-autoconfig-audit.vue +++ b/src/views/pages/deploy/application-config/config/env/env-autoconfig-audit.vue @@ -37,6 +37,9 @@ export default { TsTable: () => import('@/resources/components/TsTable/TsTable.vue') }, props: { + instanceId: { + type: [String, Number] + }, params: { type: Object, default: function() { @@ -114,6 +117,7 @@ export default { appSystemId: this.params.appSystemId, appModuleId: this.params.appModuleId, envId: this.params.envId, + instanceId: this.instanceId, currentPage: this.currentPage, pageSize: this.pageSize }; @@ -145,6 +149,7 @@ export default { appSystemId: this.params.appSystemId, appModuleId: this.params.appModuleId, envId: this.params.envId, + instanceId: this.instanceId, uuidList: selectdRowUuidList }; this.$api.deploy.applicationConfig.fallbackEnvAutoConfig(data).then((res) => { diff --git a/src/views/pages/deploy/application-config/config/env/env-autoconfig-edit-textarea.vue b/src/views/pages/deploy/application-config/config/env/env-autoconfig-edit-textarea.vue index 1cfef2c376c52f062710377996a3560dd965b9d7..7a8d62c23d94d59391fbadb94f93fcd280b23eeb 100644 --- a/src/views/pages/deploy/application-config/config/env/env-autoconfig-edit-textarea.vue +++ b/src/views/pages/deploy/application-config/config/env/env-autoconfig-edit-textarea.vue @@ -9,6 +9,7 @@ v-model="allTypeKeyVlaue" type="textarea" height="400px" + :monospace="true" > @@ -26,6 +27,9 @@ export default { type: Boolean, default: false }, + instanceId: { + type: [String, Number] + }, params: { type: Object, default: function() { @@ -72,11 +76,28 @@ export default { let value = ''; if (this.tableData && this.tableData.tbodyList.length > 0) { let tbodyList = this.$utils.deepClone(this.tableData.tbodyList); + let maxLengthOfType = 0; + let maxLengthOfKey = 0; + tbodyList.forEach((item) => { + let typeLen = item.type.length; + maxLengthOfType = Math.max(maxLengthOfType, typeLen); + let keyLen = item.key.length; + maxLengthOfKey = Math.max(maxLengthOfKey, keyLen); + }); tbodyList.forEach((item) => { if (value) { value += '\n'; } - value = value + item.type + ':' + item.key + '=' + item.value; + let itemValue = ''; + if (item.value.includes('\n')) { + itemValue = item.value.replaceAll('\n', '\\n'); + } else { + itemValue = item.value; + } + let rowValue = item.type + ':'; + rowValue = rowValue.padEnd(maxLengthOfType + 2); + rowValue += item.key.padEnd(maxLengthOfKey) + ' = ' + itemValue; + value = value + rowValue; }); this.allTypeKeyVlaue = value; } @@ -95,6 +116,9 @@ export default { let key = keyAndValueList[0].trim(); keyAndValueList.shift(); let value = keyAndValueList.join('=').trim(); + if (value.includes('\\n')) { + value = value.replaceAll('\\n', '\n'); + } // let isEmpty = 1; // if (value && value.trim() != '') { // isEmpty = 0; @@ -110,6 +134,7 @@ export default { } let params = { ...this.params, + instanceId: this.instanceId, keyValueList: keyValueList }; this.$emit('save', params); diff --git a/src/views/pages/deploy/application-config/config/env/env-autoconfig-list.vue b/src/views/pages/deploy/application-config/config/env/env-autoconfig-list.vue index a150787afa1698103654188d6a8b099b23078616..392d134178ccab27de060cc5f5b6e76a45ca9060 100644 --- a/src/views/pages/deploy/application-config/config/env/env-autoconfig-list.vue +++ b/src/views/pages/deploy/application-config/config/env/env-autoconfig-list.vue @@ -58,6 +58,8 @@ {{ getIPPortName(item) }}
+ +
@@ -84,6 +86,7 @@ + +