You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by kb...@apache.org on 2020/02/17 05:43:10 UTC

[atlas] branch master updated (ac808af -> 8f6cb0e)

This is an automated email from the ASF dual-hosted git repository.

kbhatt pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git.


    from ac808af  ATLAS-3613: updated search to support namespace attributes
     new 695480e  ATLAS-3617 : Labels , UI : Attempting to add duplicate label removes both the duplicate and already existing label with same name.
     new 8f6cb0e  ATLAS-3620 : Beta UI : No option to create child tag by clicking the classificationPopover of parent tag.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../js/views/entity/EntityLabelDefineView.js       | 11 +++++++--
 .../js/views/entity/EntityLabelDefineView.js       | 11 +++++++--
 .../search/tree/ClassificationTreeLayoutView.js    | 27 ++++++++++++++--------
 3 files changed, 36 insertions(+), 13 deletions(-)


[atlas] 02/02: ATLAS-3620 : Beta UI : No option to create child tag by clicking the classificationPopover of parent tag.

Posted by kb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kbhatt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git

commit 8f6cb0e9afa07feb0fe615663650c4ee580fd657
Author: kevalbhatt <kb...@apache.org>
AuthorDate: Fri Feb 14 17:40:46 2020 +0530

    ATLAS-3620 : Beta UI : No option to create child tag by clicking the classificationPopover of parent tag.
---
 .../search/tree/ClassificationTreeLayoutView.js    | 27 ++++++++++++++--------
 1 file changed, 18 insertions(+), 9 deletions(-)

diff --git a/dashboardv3/public/js/views/search/tree/ClassificationTreeLayoutView.js b/dashboardv3/public/js/views/search/tree/ClassificationTreeLayoutView.js
index df49523..5c2026b 100644
--- a/dashboardv3/public/js/views/search/tree/ClassificationTreeLayoutView.js
+++ b/dashboardv3/public/js/views/search/tree/ClassificationTreeLayoutView.js
@@ -227,7 +227,7 @@ define([
                     selector: '.classificationPopover',
                     content: function() {
                         var type = $(this).data('detail'),
-                            liString = "<li><i class='fa fa-list-alt'></i><a href='javascript:void(0)' data-fn='onViewEdit'>View/Edit</a></li><li><i class='fa fa-trash-o'></i><a href='javascript:void(0)' data-fn='onDelete'>Delete</a></li><li><i class='fa fa-search'></i><a href='javascript:void(0)' data-fn='onSelectedSearch'>Search</a></li>"
+                            liString = " <li><i class='fa fa-plus'></i><a href='javascript:void(0)' data-fn='onClickCreateTag'>Create Sub-classification</a></li><li><i class='fa fa-list-alt'></i><a href='javascript:void(0)' data-fn='onViewEdit'>View/Edit</a></li><li><i class='fa fa-trash-o'></i><a href='javascript:void(0)' data-fn='onDelete'>Delete</a></li><li><i class='fa fa-search'></i><a href='javascript:void(0)' data-fn='onSelectedSearch'>Search</a></li>"
                         return "<ul>" + liString + "</ul>";
                     }
                 }
@@ -585,20 +585,23 @@ define([
                 var aTag = that.$("#" + str.node.a_attr.id),
                     tagOffset = aTag.find(">.jstree-icon").offset();
                 that.$(".tree-tooltip").removeClass("show");
-                if (tagOffset.top && tagOffset.left) {
-                    aTag.find(">span.tree-tooltip").css({
-                        top: "calc(" + tagOffset.top + "px - 45px)",
-                        left: "24px"
-                    }).addClass("show");
-                }
+                setTimeout(function() {
+                    if (aTag.hasClass("jstree-hovered") && tagOffset.top && tagOffset.left) {
+                        aTag.find(">span.tree-tooltip").css({
+                            top: "calc(" + tagOffset.top + "px - 45px)",
+                            left: "24px"
+                        }).addClass("show");
+                    }
+                }, 1200);
             }).on("dehover_node.jstree", function(nodes, str, res) {
                 that.$(".tree-tooltip").removeClass("show");
             });
         },
-        onClickCreateTag: function(e) {
+
+        onClickCreateTag: function(tagName) {
             var that = this;
             require(["views/tag/CreateTagLayoutView", "modules/Modal"], function(CreateTagLayoutView, Modal) {
-                var view = new CreateTagLayoutView({ tagCollection: that.options.classificationDefCollection, enumDefCollection: enumDefCollection }),
+                var view = new CreateTagLayoutView({ tagCollection: that.options.classificationDefCollection, enumDefCollection: enumDefCollection, selectedTag: tagName }),
                     modal = new Modal({
                         title: "Create a new classification",
                         content: view,
@@ -749,6 +752,12 @@ define([
                 }
             });
         },
+        onClickCreateTagClassification: function(e) {
+            var selectedNode = this.ui.classificationSearchTree.jstree("get_selected", true);
+            if (selectedNode && selectedNode[0]) {
+                this.onClickCreateTag(selectedNode[0].original.name);
+            }
+        },
         onViewEditClassification: function() {
             var selectedNode = this.ui.classificationSearchTree.jstree("get_selected", true);
             if (selectedNode && selectedNode[0]) {


[atlas] 01/02: ATLAS-3617 : Labels , UI : Attempting to add duplicate label removes both the duplicate and already existing label with same name.

Posted by kb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kbhatt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git

commit 695480e9367ef6cb86fb18cb552e94b82f106b45
Author: kevalbhatt <kb...@apache.org>
AuthorDate: Fri Feb 14 17:37:33 2020 +0530

    ATLAS-3617 : Labels , UI : Attempting to add duplicate label removes both the duplicate and already existing label with same name.
---
 dashboardv2/public/js/views/entity/EntityLabelDefineView.js | 11 +++++++++--
 dashboardv3/public/js/views/entity/EntityLabelDefineView.js | 11 +++++++++--
 2 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/dashboardv2/public/js/views/entity/EntityLabelDefineView.js b/dashboardv2/public/js/views/entity/EntityLabelDefineView.js
index 62c3ef9..b4f4a51 100644
--- a/dashboardv2/public/js/views/entity/EntityLabelDefineView.js
+++ b/dashboardv2/public/js/views/entity/EntityLabelDefineView.js
@@ -74,7 +74,7 @@ define(['require',
                 });
             this.ui.addLabelOptions.html(str);
             var getLabelData = function(data, selectedData) {
-                if (data.suggestions) {
+                if (data.suggestions.length) {
                     return _.map(data.suggestions, function(name, index) {
                         var findValue = _.find(selectedData, { id: name })
                         if (findValue) {
@@ -87,7 +87,8 @@ define(['require',
                         }
                     });
                 } else {
-                    return [];
+                    var findValue = _.find(selectedData, { id: data.prefixString })
+                    return findValue ? [findValue] : [];
                 }
             };
             this.ui.addLabelOptions.select2({
@@ -110,6 +111,12 @@ define(['require',
                     },
                     cache: true
                 },
+                createTag: function(data) {
+                    var found = _.find(this.$element.select2("data"), { id: data.term });
+                    if (!found) {
+                        return { id: data.term, text: data.term };
+                    }
+                },
                 templateResult: this.formatResultSearch
             });
         },
diff --git a/dashboardv3/public/js/views/entity/EntityLabelDefineView.js b/dashboardv3/public/js/views/entity/EntityLabelDefineView.js
index be12f57..19c3e7e 100644
--- a/dashboardv3/public/js/views/entity/EntityLabelDefineView.js
+++ b/dashboardv3/public/js/views/entity/EntityLabelDefineView.js
@@ -74,7 +74,7 @@ define(['require',
                 });
             this.ui.addLabelOptions.html(str);
             var getLabelData = function(data, selectedData) {
-                if (data.suggestions) {
+                if (data.suggestions.length) {
                     return _.map(data.suggestions, function(name, index) {
                         var findValue = _.find(selectedData, { id: name })
                         if (findValue) {
@@ -87,7 +87,8 @@ define(['require',
                         }
                     });
                 } else {
-                    return [];
+                    var findValue = _.find(selectedData, { id: data.prefixString })
+                    return findValue ? [findValue] : [];
                 }
             };
             this.ui.addLabelOptions.select2({
@@ -110,6 +111,12 @@ define(['require',
                     },
                     cache: true
                 },
+                createTag: function(data) {
+                    var found = _.find(this.$element.select2("data"), { id: data.term });
+                    if (!found) {
+                        return { id: data.term, text: data.term };
+                    }
+                },
                 templateResult: this.formatResultSearch
             });
         },