From f683e5a4fe10318bcd6cad997759db9422c7e4a1 Mon Sep 17 00:00:00 2001 From: "nathan.chan" Date: Mon, 8 Jul 2019 18:42:05 +0800 Subject: [PATCH] #95 fix bug: show mapping fields in query insertion helper when index version exist [vip:platform/pallas#927] --- .../template_edit/template_edit.vue | 6 ++-- .../template_edit/template_insert_dialog.vue | 34 +++++++++---------- .../template_manage/template_manage.vue | 4 ++- .../version/IndexFindMetaDataController.java | 25 ++++++++++---- .../pallas/console/vo/TemplateFieldVO.java | 17 ++++++++++ .../repository/IndexVersionRepository.java | 2 ++ .../pallas/service/IndexVersionService.java | 4 +++ .../resources/mapper/IndexVersionMapper.xml | 8 +++++ .../mapper/h2/IndexVersionMapper.xml | 8 +++++ 9 files changed, 80 insertions(+), 28 deletions(-) create mode 100644 pallas-console/src/main/java/com/vip/pallas/console/vo/TemplateFieldVO.java diff --git a/pallas-console-web/src/pages/index_detail/template_manage/template_edit/template_edit.vue b/pallas-console-web/src/pages/index_detail/template_manage/template_edit/template_edit.vue index f38c35a9..ad05b0f2 100644 --- a/pallas-console-web/src/pages/index_detail/template_manage/template_edit/template_edit.vue +++ b/pallas-console-web/src/pages/index_detail/template_manage/template_edit/template_edit.vue @@ -156,7 +156,7 @@
@@ -174,7 +174,7 @@ import TemplateConfigDialog from './template_config_dialog'; import TemplateInsertDialog from './template_insert_dialog'; export default { - props: ['indexId', 'indexName', 'metadataList', 'clusters', 'isAllPrivilege', 'templateInfo', 'macroList', 'temPanelHeight'], + props: ['indexId', 'indexName', 'metadataList', 'fieldList', 'clusters', 'isAllPrivilege', 'templateInfo', 'macroList', 'temPanelHeight'], data() { return { loading: false, @@ -478,7 +478,7 @@ export default { return this.$http.post('/index/loadDbList.json', { indexId: this.indexId }).then((data) => { if (data) { this.datasourceList = data; - if (this.datasourceList.length !== 0) { + if (!this.datasourceList && this.datasourceList.length !== 0) { this.datasourceId = Object.entries(data)[0][0]; } } diff --git a/pallas-console-web/src/pages/index_detail/template_manage/template_edit/template_insert_dialog.vue b/pallas-console-web/src/pages/index_detail/template_manage/template_edit/template_insert_dialog.vue index 7d7208e5..eed3e8b6 100644 --- a/pallas-console-web/src/pages/index_detail/template_manage/template_edit/template_insert_dialog.vue +++ b/pallas-console-web/src/pages/index_detail/template_manage/template_edit/template_insert_dialog.vue @@ -38,7 +38,7 @@ - +