You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by su...@apache.org on 2015/12/20 03:28:49 UTC
incubator-atlas git commit: ATLAS-402 UI : Validation of Associating
a Tag (darshankumar89 via sumasai)
Repository: incubator-atlas
Updated Branches:
refs/heads/master 125cdf5af -> ab6e64202
ATLAS-402 UI : Validation of Associating a Tag (darshankumar89 via sumasai)
Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/ab6e6420
Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/ab6e6420
Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/ab6e6420
Branch: refs/heads/master
Commit: ab6e64202727034425ba6a4165990d06be94d1e4
Parents: 125cdf5
Author: Suma Shivaprasad <su...@gmail.com>
Authored: Sun Dec 20 07:58:35 2015 +0530
Committer: Suma Shivaprasad <su...@gmail.com>
Committed: Sun Dec 20 07:58:35 2015 +0530
----------------------------------------------------------------------
.../public/modules/search/views/search.html | 2 +-
.../tags/instance/createTagController.js | 9 +++---
.../tags/instance/instanceTagsController.js | 33 ++++++++++----------
.../modules/tags/instance/views/createTag.html | 7 +++--
.../modules/tags/instance/views/tags.html | 4 +--
release-log.txt | 1 +
6 files changed, 30 insertions(+), 26 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/ab6e6420/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 4bb59af..306fb27 100644
--- a/dashboard/public/modules/search/views/search.html
+++ b/dashboard/public/modules/search/views/search.html
@@ -73,7 +73,7 @@
<td class="addTag"><img ng-src="img/addTag.png" tooltip="Add Tag" ng-click="openAddTagHome(result['$id$'].id || result.guid)"></td>
</tr>
<tr ng-if="isTag(resultType)" ng-repeat="result in filteredResults track by $index">
- <td data-ng-if="isObject(result) && !isString(result) && res != 'id'" data-ng-repeat="res in transformedProperties track by $index">
+ <td data-ng-if="isObject(result) && !isString(result) && res != 'id'" data-ng-repeat="res in transformedProperties track by $index" class="wordBreak">
<a data-ng-if="res == 'guid'" data-ui-sref="details({id:result[res]})">{{result[res]}}</a>
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/ab6e6420/dashboard/public/modules/tags/instance/createTagController.js
----------------------------------------------------------------------
diff --git a/dashboard/public/modules/tags/instance/createTagController.js b/dashboard/public/modules/tags/instance/createTagController.js
index b8e8c9f..28c0539 100644
--- a/dashboard/public/modules/tags/instance/createTagController.js
+++ b/dashboard/public/modules/tags/instance/createTagController.js
@@ -18,14 +18,14 @@
'use strict';
angular.module('dgc.tags.instance').controller('CreateTagController', ['$scope', 'DetailsResource', '$modalInstance', 'typesList', 'lodash', 'TagsResource', '$stateParams', '$rootScope', 'TagClasses', 'NotificationService',
- function($scope, DetailsResource, $modalInstance, typesList, _, TagsResource, $stateParams, $rootScope, Categories, NotificationService) {
+ function($scope, DetailsResource, $modalInstance, typesList, _, TagsResource, $stateParams, $rootScope, Categories) {
if (typesList) {
$scope.typesList = typesList;
}
var $$ = angular.element;
$scope.categoryList = Categories;
$scope.category = 'TRAIT';
-
+ $scope.isSuccess = false;
$scope.getAttributeDefinations = function() {
$scope.propertiesList = {};
$scope.isRequired = {};
@@ -59,6 +59,7 @@ angular.module('dgc.tags.instance').controller('CreateTagController', ['$scope',
});
};
$scope.ok = function($event, tagDefinitionform) {
+ $scope.isSuccess = false;
if (tagDefinitionform.$valid) {
var requestObject = {
"jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Struct",
@@ -79,8 +80,8 @@ angular.module('dgc.tags.instance').controller('CreateTagController', ['$scope',
$$("#" + $stateParams.tId+"_schema").append("<a class='tabsearchanchor ng-binding ng-scope' data-ui-sref='search({query: " + tagName + "})' title='" + tagName + "' href='#!/search?query=" + tagName + "'>" + tagName + "<span> </span></a>");
}
}
- NotificationService.info('Tag "' + $scope.selectedType + '" has been added to entity', true);
- $modalInstance.close(true);
+ $scope.successmessage = 'Tag "' + $scope.selectedType + '" has been added to entity';
+ $scope.isSuccess = true;
}).catch(function(err) {
$scope.isError = true;
$scope.error = err.data.error;
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/ab6e6420/dashboard/public/modules/tags/instance/instanceTagsController.js
----------------------------------------------------------------------
diff --git a/dashboard/public/modules/tags/instance/instanceTagsController.js b/dashboard/public/modules/tags/instance/instanceTagsController.js
index 42e22dc..8341c10 100644
--- a/dashboard/public/modules/tags/instance/instanceTagsController.js
+++ b/dashboard/public/modules/tags/instance/instanceTagsController.js
@@ -67,26 +67,25 @@ angular.module('dgc.tags.instance').controller('InstanceTagController', ['$scope
$scope.detachTag = function($event, name) {
$scope.displayName = name;
- $$('#btnDelete').modal().on('click', function(e) {
- e.preventDefault();
- $$("#myModal").modal();
+ };
- DetailsResource.detachTag({
- id: $stateParams.id,
- tagName: name
- }, function(data) {
+ $scope.removeTag = function() {
+ $$("#myModal").modal();
+ var name = $scope.displayName;
+ DetailsResource.detachTag({
+ id: $stateParams.id,
+ tagName: name
+ }, function(data) {
- if (data.requestId !== undefined && data.GUID === $stateParams.id && data.traitName === name) {
- $$($event.currentTarget).closest('tr').remove();
- delete $scope.traitsList[name];
- if ($.isEmptyObject($scope.traitsList)) {
- $scope.noTags = true;
- } else {
- $scope.noTags = false;
- }
+ if (data.requestId !== undefined && data.GUID === $stateParams.id && data.traitName === name) {
+ $$("#" + name).remove();
+ delete $scope.traitsList[name];
+ if ($.isEmptyObject($scope.traitsList)) {
+ $scope.noTags = true;
+ } else {
+ $scope.noTags = false;
}
-
- });
+ }
});
};
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/ab6e6420/dashboard/public/modules/tags/instance/views/createTag.html
----------------------------------------------------------------------
diff --git a/dashboard/public/modules/tags/instance/views/createTag.html b/dashboard/public/modules/tags/instance/views/createTag.html
index 2184b56..d0e74a8 100644
--- a/dashboard/public/modules/tags/instance/views/createTag.html
+++ b/dashboard/public/modules/tags/instance/views/createTag.html
@@ -20,9 +20,12 @@
</div>
<div class="modal-body">
<div class="form-group">
- <div align="center" class="error col-sm-12 tabsearchResult pointer" title="{{error}}" ng-if="isError">
+ <div align="center" class="error col-sm-12 tabsearchResult pointer" title="{{error}}" ng-show="isError">
{{error}}
</div>
+ <div class="alert alert-success" ng-if="isSuccess" >
+ {{successmessage}}
+ </div>
</div>
<form name="tagDefinitionform" class="css-form" novalidate>
<div class="form-group hide">
@@ -40,7 +43,7 @@
<label class="control-label col-sm-4" for="tagDefinition">Tag definition</label>
<div class="col-sm-8 input-spacing">
<select ng-model="selectedType" class="form-control" id="tagDefinition" name="tagDefinition"
- ng-change="getAttributeDefinations(); isError =false" required>
+ ng-change="getAttributeDefinations(); isError =false; isSuccess=false;" required>
<option ng-repeat="data in typesList " title="{{data}}">{{data}}</option>
</select>
</div>
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/ab6e6420/dashboard/public/modules/tags/instance/views/tags.html
----------------------------------------------------------------------
diff --git a/dashboard/public/modules/tags/instance/views/tags.html b/dashboard/public/modules/tags/instance/views/tags.html
index 64e922e..29f6583 100644
--- a/dashboard/public/modules/tags/instance/views/tags.html
+++ b/dashboard/public/modules/tags/instance/views/tags.html
@@ -30,7 +30,7 @@
</tr>
</thead>
<tbody>
- <tr ng-repeat="trait in traitsList" class="pointer" ng-if="!noTags">
+ <tr ng-repeat="trait in traitsList" class="pointer" ng-if="!noTags" id="{{trait.typeName}}">
<td class="col-lg-5" >
{{trait.typeName}}
</td>
@@ -56,7 +56,7 @@
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal" ng-click="cancel()">Close</button>
- <button type="button" id="btnDelete" class="btn btn-primary" data-dismiss="modal">Delete</button>
+ <button type="button" id="btnDelete" class="btn btn-primary" data-dismiss="modal" ng-click="removeTag()">Delete</button>
</div>
</div>
</div>
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/ab6e6420/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index 7c7cff4..30a132d 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -15,6 +15,7 @@ ATLAS-3 Mixed Index creation fails with Date types (sumasai via shwethags)
ATLAS-47 Entity mutations for complex types (sumasai via shwethags)
ALL CHANGES:
+ATLAS-402 UI : Validation of Associating a Tag (darshankumar89 via sumasai)
ATLAS-395 UI : In details page maps not displayed for different data models (darshankumar89 via sumasai)
ATLAS-394 Fix BaseResourceIT.waitForNotification (shwethags via sumasai)
ATLAS-385 Support for Lineage for entities with SuperType as DataSet (anilsg via sumasai)