Repository: incubator-atlas
Updated Branches:
  refs/heads/branch-0.6-incubating 9b46f726b -> dbc007cf1


ATLAS-345 UI: Should allow tag addition on any search result that returns a 
reference-able entity (darshankumar89 via shwethags)


Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/dbc007cf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/dbc007cf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/dbc007cf

Branch: refs/heads/branch-0.6-incubating
Commit: dbc007cf14153d2d803b83334ec29cbfea18b0ef
Parents: 0a50b25
Author: Shwetha GS <[email protected]>
Authored: Tue Dec 8 10:39:33 2015 +0530
Committer: Shwetha GS <[email protected]>
Committed: Tue Dec 8 10:42:53 2015 +0530

----------------------------------------------------------------------
 dashboard/public/modules/search/searchController.js | 13 ++++++++-----
 dashboard/public/modules/search/views/search.html   |  2 +-
 release-log.txt                                     |  1 +
 3 files changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/dbc007cf/dashboard/public/modules/search/searchController.js
----------------------------------------------------------------------
diff --git a/dashboard/public/modules/search/searchController.js 
b/dashboard/public/modules/search/searchController.js
index 4e4dde7..103c274 100644
--- a/dashboard/public/modules/search/searchController.js
+++ b/dashboard/public/modules/search/searchController.js
@@ -133,7 +133,8 @@ angular.module('dgc.search').controller('SearchController', 
['$scope', '$locatio
                 angular.forEach($scope.resultRows, function(value) {
                     var objVal = {},
                         curVal = value,
-                        onlyId = false;
+                        onlyId = false,
+                        traits = false;
 
                     if (curVal.name) {
                         objVal.name = curVal.name;
@@ -144,10 +145,7 @@ 
angular.module('dgc.search').controller('SearchController', ['$scope', '$locatio
                             if (ky === '$id$') {
                                 objVal.id = curVal[ky].id;
                                 onlyId = true;
-                            } else if (ky === '$traits$') {
-                                objVal[ky] = vl;
-                                objVal.Tools = objVal.id;
-                                onlyId = false;
+                                traits = true;
                             } else if (ky.indexOf('$') === -1) {
                                 objVal[ky] = vl;
                                 onlyId = false;
@@ -155,6 +153,11 @@ 
angular.module('dgc.search').controller('SearchController', ['$scope', '$locatio
                         }
                     });
 
+                    if (traits) {
+                        objVal.$traits$ = curVal.$traits$ || {};
+                        objVal.Tools = objVal.id;
+                    }
+
                     if (onlyId) {
                         objVal.guid = objVal.id;
                     }

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/dbc007cf/dashboard/public/modules/search/views/search.html
----------------------------------------------------------------------
diff --git a/dashboard/public/modules/search/views/search.html 
b/dashboard/public/modules/search/views/search.html
index b905cb9..594d790 100644
--- a/dashboard/public/modules/search/views/search.html
+++ b/dashboard/public/modules/search/views/search.html
@@ -68,7 +68,7 @@
                         </span>
                      </td>
                      <td>
-                        <div id="{{result['$id$'].id}}" 
ng-show="!dataTransitioned" class="wordBreak"><a class="tabsearchanchor" 
ng-repeat="(key, value) in result['$traits$']" data-ui-sref="search({query: 
key})" title="{{key}}">{{key}}<span> </span></a></div>
+                        <div id="{{result['$id$'].id || result.guid}}" 
ng-show="!dataTransitioned" class="wordBreak"><a class="tabsearchanchor" 
ng-repeat="(key, value) in result['$traits$']" data-ui-sref="search({query: 
key})" title="{{key}}">{{key}}<span> </span></a></div>
                      </td>
                      <td class="addTag"><img ng-src="img/addTag.png" 
tooltip="Add Tag" ng-click="openAddTagHome(result['$id$'].id || 
result.guid)"></td>
                   </tr>

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/dbc007cf/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index 33eb320..1b8cf57 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -9,6 +9,7 @@ ATLAS-54 Rename configs in hive hook (shwethags)
 ATLAS-3 Mixed Index creation fails with Date types (sumasai via shwethags)
 
 ALL CHANGES:
+ATLAS-345 UI: Should allow tag addition on any search result that returns a 
reference-able entity (darshankumar89 via shwethags)
 ATLAS-279 UI not displaying results for certain successful "select" search 
queries (anilsg via shwethags)
 ATLAS-361 Add validation when index backends are switched in ATLAS 
configuration(sumasai via shwethags)
 ATLAS-242 The qualified name for hive entities should be backward compatible 
(shwethags)

Reply via email to