diff --git a/console/src/main/resources/static/console-fe/src/locales/en-US.js b/console/src/main/resources/static/console-fe/src/locales/en-US.js index 27bbfc252..744ec4c2c 100644 --- a/console/src/main/resources/static/console-fe/src/locales/en-US.js +++ b/console/src/main/resources/static/console-fe/src/locales/en-US.js @@ -225,6 +225,8 @@ const I18N_CONF = { operation: 'Operation', export: 'Export query results', import: 'Import', + importSucc: 'Import success', + uploadBtn: 'Upload File', }, NewConfig: { newListingMain: 'Create Configuration', diff --git a/console/src/main/resources/static/console-fe/src/locales/zh-CN.js b/console/src/main/resources/static/console-fe/src/locales/zh-CN.js index 54ef1dde8..05e306ea1 100644 --- a/console/src/main/resources/static/console-fe/src/locales/zh-CN.js +++ b/console/src/main/resources/static/console-fe/src/locales/zh-CN.js @@ -224,6 +224,8 @@ const I18N_CONF = { operation: '操作', export: '导出查询结果', import: '导入配置', + importSucc: '导入成功', + uploadBtn: '上传文件', }, NewConfig: { newListingMain: '新建配置', diff --git a/console/src/main/resources/static/console-fe/src/pages/ConfigurationManagement/ConfigurationManagement/ConfigurationManagement.js b/console/src/main/resources/static/console-fe/src/pages/ConfigurationManagement/ConfigurationManagement/ConfigurationManagement.js index 1c7bd9215..f0a4f84b4 100644 --- a/console/src/main/resources/static/console-fe/src/pages/ConfigurationManagement/ConfigurationManagement/ConfigurationManagement.js +++ b/console/src/main/resources/static/console-fe/src/pages/ConfigurationManagement/ConfigurationManagement/ConfigurationManagement.js @@ -669,24 +669,60 @@ class ConfigurationManagement extends React.Component { } exportData() { - let url = 'v1/cs/configs?export=true&group=' + this.group + '&appName=' + this.appName; + let url = + 'v1/cs/configs?export=true&group=' + + this.group + + '&tenant=' + + getParams('namespace') + + '&appName=' + + this.appName + + '&ids='; window.location.href = url; } - render() { + importData() { const { locale = {} } = this.props; + const self = this; const uploadProps = { accept: 'application/zip', - onStart(file) { - console.log('onStart', file, file.name); - }, + action: 'v1/cs/configs?import=true&namespace=' + getParams('namespace'), onSuccess(ret) { - console.log('onSuccess', ret); + Dialog.show({ + title: locale.importSucc, + content: