atlas-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mad...@apache.org
Subject incubator-atlas git commit: ATLAS-1640: fix - entity update UI does not shows empty value for array-entity attributes
Date Mon, 06 Mar 2017 07:28:10 GMT
Repository: incubator-atlas
Updated Branches:
  refs/heads/master 543a85d7c -> 42a441aa6


ATLAS-1640: fix - entity update UI does not shows empty value for array-entity attributes

Signed-off-by: Madhan Neethiraj <madhan@apache.org>


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

Branch: refs/heads/master
Commit: 42a441aa63d2015e75ddc783167aa1b817c5e829
Parents: 543a85d
Author: kevalbhatt <kbhatt@apache.org>
Authored: Mon Mar 6 11:53:46 2017 +0530
Committer: Madhan Neethiraj <madhan@apache.org>
Committed: Sun Mar 5 23:27:35 2017 -0800

----------------------------------------------------------------------
 dashboardv2/public/js/views/entity/CreateEntityLayoutView.js | 7 +++++--
 dashboardv2/public/js/views/search/SearchResultLayoutView.js | 2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/42a441aa/dashboardv2/public/js/views/entity/CreateEntityLayoutView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/entity/CreateEntityLayoutView.js b/dashboardv2/public/js/views/entity/CreateEntityLayoutView.js
index 8e50856..cbd343b 100644
--- a/dashboardv2/public/js/views/entity/CreateEntityLayoutView.js
+++ b/dashboardv2/public/js/views/entity/CreateEntityLayoutView.js
@@ -438,6 +438,9 @@ define(['require',
                     } else {
                         splitTypeName = value.typeName;
                     }
+                    if (!this.guid) {
+                        disabled = value.isOptional;
+                    }
                     return '<select class="form-control row-margin-bottom entityInputBox
' + (value.isOptional === true ? "false" : "true") + '" data-type="' + value.typeName +
                         '" data-key="' + value.name + '" ' + (disabled ? 'disabled data-skip="true"'
: "") + ' data-id="entitySelectData" data-queryData="' + splitTypeName + '">' + (this.guid
? entityValue : "") + '</select>';
                 }
@@ -504,7 +507,7 @@ define(['require',
                                 ++this.asyncFetchLOVCounter;
                                 this.searchCollection.fetch({ reset: true });
                             }
-                            return this.getSelect(value, entityValue, value.isOptional);
+                            return this.getSelect(value, entityValue, true);
                         }
                     }
                     return this.getSelect(value, entityValue, false); // Don't disable select
for non entity attributes.
@@ -766,7 +769,7 @@ define(['require',
                                     var storeEntity = that.selectStoreCollection.findWhere({
guid: dataValue.guid });
                                     var refEntiyFound = referredEntities[dataValue.guid]
                                     if (storeEntity) {
-                                        var name = Utils.getName(storeEntity, 'displayText');
+                                        var name = Utils.getName(storeEntity.toJSON(), 'displayText');
                                     } else if (!storeEntity && refEntiyFound &&
refEntiyFound.typeName) {
                                         that.selectStoreCollection.push(refEntiyFound);
                                         var name = Utils.getName(refEntiyFound, 'displayText');

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/42a441aa/dashboardv2/public/js/views/search/SearchResultLayoutView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/search/SearchResultLayoutView.js b/dashboardv2/public/js/views/search/SearchResultLayoutView.js
index 27f692b..d2a3b51 100644
--- a/dashboardv2/public/js/views/search/SearchResultLayoutView.js
+++ b/dashboardv2/public/js/views/search/SearchResultLayoutView.js
@@ -291,7 +291,7 @@ define(['require',
                         if (Globals.taxonomy) {
                             multiAssignDataTerm = '<a href="javascript:void(0)" class="inputAssignTag
multiSelect" style="display:none" data-id="addTerm"><i class="fa fa-folder-o"></i>'
+ " " + 'Assign Term</a>';
                         }
-                        if (Globals.entityCreate && Globals.entityTypeConfList) {
+                        if (Globals.entityCreate && Globals.entityTypeConfList &&
Utils.getUrlState.isSearchTab()) {
                             createEntityTag = "<p>If you do not find the entity in
search result below then you can" + '<a href="javascript:void(0)" data-id="createEntity">
create new entity</a></p>';
                         }
                         that.$('.searchResult').html(resultData + multiAssignDataTag + multiAssignDataTerm
+ createEntityTag);


Mime
View raw message