[atlas] 01/02: Revert "ATLAS-3903: UI - Glossary category not reflected in the tree after creation."
This is an automated email from the ASF dual-hosted git repository. nixon pushed a commit to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/atlas.git commit ae0f66d015e9a0d79a6997e044e61e645890f14b Author: nixonrodrigues AuthorDate: Wed Apr 14 16:01:39 2021 +0530 Revert "ATLAS-3903: UI - Glossary category not reflected in the tree after creation." This reverts commit 6c259a61875e9110208b993824d45493a0e44468. --- .../js/views/glossary/GlossaryDetailLayoutView.js | 5 +- .../public/js/views/glossary/GlossaryLayoutView.js | 54 +--- .../js/views/glossary/GlossaryDetailLayoutView.js | 5 +- .../js/views/search/tree/GlossaryTreeLayoutView.js | 73 +++--- 4 files changed, 42 insertions(+), 95 deletions(-) diff --git a/dashboardv2/public/js/views/glossary/GlossaryDetailLayoutView.js b/dashboardv2/public/js/views/glossary/GlossaryDetailLayoutView.js index 24a8b06..bb8fe8f 100644 --- a/dashboardv2/public/js/views/glossary/GlossaryDetailLayoutView.js +++ b/dashboardv2/public/js/views/glossary/GlossaryDetailLayoutView.js @@ -346,8 +346,7 @@ define(['require', return terms; }, onClickAddTermBtn: function(e) { -var that = this, -glossary = this.glossaryCollection; +var glossary = this.glossaryCollection; if (this.value && this.value.gId) { var foundModel = this.glossaryCollection.find({ guid: this.value.gId }); if (foundModel) { @@ -360,7 +359,7 @@ define(['require', } var obj = { callback: function() { -that.getData(); +this.getData(); }, glossaryCollection: glossary, }, diff --git a/dashboardv2/public/js/views/glossary/GlossaryLayoutView.js b/dashboardv2/public/js/views/glossary/GlossaryLayoutView.js index ac7435c..5d9ba74 100644 --- a/dashboardv2/public/js/views/glossary/GlossaryLayoutView.js +++ b/dashboardv2/public/js/views/glossary/GlossaryLayoutView.js @@ -344,56 +344,34 @@ define(['require', node: parent, objGuid: obj.guid }); + if (type == "category" && obj.categories) { -var isSelected = false, -parentGuid = obj.guid, -parentCategoryGuid = null, -categoryList = [], -catrgoryRelation = []; _.each(obj.categories, function(category) { -if (that.options.value) { -isSelected = that.options.value.guid ? that.options.value.guid == category.categoryGuid : false; +if (category.parentCategoryGuid) { +return; } - var typeName = category.typeName || "GlossaryCategory", guid = category.categoryGuid, categoryObj = { -id: guid, -guid: guid, -text: _.escape(category.displayText), -type: typeName, -gType: "category", -glossaryId: obj.guid, -glossaryName: obj.name, -children: [], -model: category, -icon: "fa fa-files-o" +"text": _.escape(category.displayText), +"type": typeName, +"gType": "category", +"guid": guid, +"id": guid, +"parent": obj, +"glossaryId": obj.guid, +"glossaryName": obj.name, +"model": category, +"children": true, +"icon": "fa fa-files-o", }; categoryObj.state = getSelectedState({ index: i, node: categoryObj, objGuid: guid }) -if (category.parentCategoryGuid) { -catrgoryRelation.push({ parent: category.parentCategoryGuid, child: guid }) -} -categoryList.push(categoryOb
[atlas] 01/02: Revert "ATLAS-3903: UI - Glossary category not reflected in the tree after creation."
This is an automated email from the ASF dual-hosted git repository. nixon pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/atlas.git commit 7b0ecd1dcb92dad5b9a0659f7b5f2a7fa1d95f93 Author: nixonrodrigues AuthorDate: Wed Apr 14 16:03:00 2021 +0530 Revert "ATLAS-3903: UI - Glossary category not reflected in the tree after creation." This reverts commit af2cc7496ef4c856545a730b2e0859066b8dd4b5. --- .../js/views/glossary/GlossaryDetailLayoutView.js | 5 +- .../public/js/views/glossary/GlossaryLayoutView.js | 54 +--- .../js/views/glossary/GlossaryDetailLayoutView.js | 5 +- .../js/views/search/tree/GlossaryTreeLayoutView.js | 73 +++--- 4 files changed, 42 insertions(+), 95 deletions(-) diff --git a/dashboardv2/public/js/views/glossary/GlossaryDetailLayoutView.js b/dashboardv2/public/js/views/glossary/GlossaryDetailLayoutView.js index 24a8b06..bb8fe8f 100644 --- a/dashboardv2/public/js/views/glossary/GlossaryDetailLayoutView.js +++ b/dashboardv2/public/js/views/glossary/GlossaryDetailLayoutView.js @@ -346,8 +346,7 @@ define(['require', return terms; }, onClickAddTermBtn: function(e) { -var that = this, -glossary = this.glossaryCollection; +var glossary = this.glossaryCollection; if (this.value && this.value.gId) { var foundModel = this.glossaryCollection.find({ guid: this.value.gId }); if (foundModel) { @@ -360,7 +359,7 @@ define(['require', } var obj = { callback: function() { -that.getData(); +this.getData(); }, glossaryCollection: glossary, }, diff --git a/dashboardv2/public/js/views/glossary/GlossaryLayoutView.js b/dashboardv2/public/js/views/glossary/GlossaryLayoutView.js index ac7435c..5d9ba74 100644 --- a/dashboardv2/public/js/views/glossary/GlossaryLayoutView.js +++ b/dashboardv2/public/js/views/glossary/GlossaryLayoutView.js @@ -344,56 +344,34 @@ define(['require', node: parent, objGuid: obj.guid }); + if (type == "category" && obj.categories) { -var isSelected = false, -parentGuid = obj.guid, -parentCategoryGuid = null, -categoryList = [], -catrgoryRelation = []; _.each(obj.categories, function(category) { -if (that.options.value) { -isSelected = that.options.value.guid ? that.options.value.guid == category.categoryGuid : false; +if (category.parentCategoryGuid) { +return; } - var typeName = category.typeName || "GlossaryCategory", guid = category.categoryGuid, categoryObj = { -id: guid, -guid: guid, -text: _.escape(category.displayText), -type: typeName, -gType: "category", -glossaryId: obj.guid, -glossaryName: obj.name, -children: [], -model: category, -icon: "fa fa-files-o" +"text": _.escape(category.displayText), +"type": typeName, +"gType": "category", +"guid": guid, +"id": guid, +"parent": obj, +"glossaryId": obj.guid, +"glossaryName": obj.name, +"model": category, +"children": true, +"icon": "fa fa-files-o", }; categoryObj.state = getSelectedState({ index: i, node: categoryObj, objGuid: guid }) -if (category.parentCategoryGuid) { -catrgoryRelation.push({ parent: category.parentCategoryGuid, child: guid }) -} -categoryList.push(categoryObj);