You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by ma...@apache.org on 2017/01/20 16:57:08 UTC

[1/2] incubator-atlas git commit: ATLAS-1352: fix for error in redirecting to Knox gateway URL

Repository: incubator-atlas
Updated Branches:
  refs/heads/master 2f1cb57a7 -> 49453f280


ATLAS-1352: fix for error in redirecting to Knox gateway URL

Signed-off-by: Madhan Neethiraj <ma...@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/cc08c517
Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/cc08c517
Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/cc08c517

Branch: refs/heads/master
Commit: cc08c517e2e3d5e45e8ea6d8ed7a0ff07dc4d412
Parents: 2f1cb57
Author: nixonrodrigues <ni...@freestoneinfotech.com>
Authored: Mon Nov 28 17:59:40 2016 +0530
Committer: Madhan Neethiraj <ma...@apache.org>
Committed: Fri Jan 20 08:24:22 2017 -0800

----------------------------------------------------------------------
 dashboardv2/public/js/utils/Utils.js            | 15 +++++-
 release-log.txt                                 |  1 +
 .../AtlasKnoxSSOAuthenticationFilter.java       | 56 ++++++++++++++------
 3 files changed, 56 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/cc08c517/dashboardv2/public/js/utils/Utils.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/utils/Utils.js b/dashboardv2/public/js/utils/Utils.js
index 098a14b..4e003d9 100644
--- a/dashboardv2/public/js/utils/Utils.js
+++ b/dashboardv2/public/js/utils/Utils.js
@@ -80,7 +80,20 @@ define(['require', 'utils/Globals', 'pnotify'], function(require, Globals, pnoti
     };
     Utils.defaultErrorHandler = function(model, error) {
         if (error.status == 401) {
-            window.location = 'login.jsp'
+             if (error.statusText) {
+                var redirectURL;
+                    try {
+                        redirectURL = JSON.parse(error.statusText).knoxssoredirectURL;
+                    } catch(err){
+                    }
+                    if(redirectURL!=undefined && redirectURL!='' ){
+                         window.location.replace(decodeURIComponent(redirectURL));
+                    }else{
+                        window.location = 'login.jsp';
+                    }
+            } else {
+                    window.location = 'login.jsp';
+            }
         } else if (error.status == 419) {
             window.location = 'login.jsp'
         } else if (error.status == 403) {

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/cc08c517/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index e9587c3..4cd0a18 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -9,6 +9,7 @@ ATLAS-1060 Add composite indexes for exact match performance improvements for al
 ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai)
 
 ALL CHANGES:
+ATLAS-1352 fix for error in redirecting to Knox gateway URL (nixonrodrigues via mneethiraj)
 ATLAS-1467 instance create/full-Update implementation (sumasai via mneethiraj)
 ATLAS-1463 option to exclude specific entity attributes in audit records (sarath.kum4r@gmail.com via mneethiraj)
 ATLAS-1386 Avoid uunnecessary type cache lookups (jnhagelb)

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/cc08c517/webapp/src/main/java/org/apache/atlas/web/filters/AtlasKnoxSSOAuthenticationFilter.java
----------------------------------------------------------------------
diff --git a/webapp/src/main/java/org/apache/atlas/web/filters/AtlasKnoxSSOAuthenticationFilter.java b/webapp/src/main/java/org/apache/atlas/web/filters/AtlasKnoxSSOAuthenticationFilter.java
index 9a0ac31..c3219b9 100644
--- a/webapp/src/main/java/org/apache/atlas/web/filters/AtlasKnoxSSOAuthenticationFilter.java
+++ b/webapp/src/main/java/org/apache/atlas/web/filters/AtlasKnoxSSOAuthenticationFilter.java
@@ -30,6 +30,7 @@ import org.apache.atlas.ApplicationProperties;
 import org.apache.atlas.web.security.AtlasAuthenticationProvider;
 import org.apache.commons.configuration.Configuration;
 import org.apache.commons.lang.StringUtils;
+import org.json.simple.JSONObject;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.security.authentication.AbstractAuthenticationToken;
@@ -47,6 +48,7 @@ import javax.servlet.http.HttpServletResponse;
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
 import java.security.PublicKey;
 import java.security.cert.CertificateException;
 import java.security.cert.CertificateFactory;
@@ -85,8 +87,10 @@ public class AtlasKnoxSSOAuthenticationFilter implements Filter {
         } catch (Exception e) {
             LOG.error("Error while getting application properties", e);
         }
-        ssoEnabled = configuration.getBoolean("atlas.sso.knox.enabled", false);
-        jwtProperties = loadJwtProperties();
+        if (configuration != null) {
+            ssoEnabled = configuration.getBoolean("atlas.sso.knox.enabled", false);
+            jwtProperties = loadJwtProperties();
+        }
         setJwtProperties();
     }
 
@@ -120,7 +124,6 @@ public class AtlasKnoxSSOAuthenticationFilter implements Filter {
         }
 
         HttpServletRequest httpRequest = (HttpServletRequest) servletRequest;
-
         if (LOG.isDebugEnabled()) {
             LOG.debug("Knox doFilter {}", httpRequest.getRequestURI());
         }
@@ -168,25 +171,35 @@ public class AtlasKnoxSSOAuthenticationFilter implements Filter {
 
                     filterChain.doFilter(servletRequest, httpServletResponse);
                 } else {  // if the token is not valid then redirect to knox sso
-                    String ssourl = constructLoginURL(httpRequest);
-                    if (LOG.isDebugEnabled()) {
-                        LOG.debug("SSO URL ={} invalid", ssourl);
-                    }
-                    httpServletResponse.sendRedirect(ssourl);
+                    redirectToKnox(httpRequest,httpServletResponse);
                 }
             } catch (ParseException e) {
                 LOG.warn("Unable to parse the JWT token", e);
             }
         } else {
-            String ssourl = constructLoginURL(httpRequest);
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("SSO URL = {}  serializedJWT null", ssourl);
-            }
-            httpServletResponse.sendRedirect(ssourl);
+            redirectToKnox(httpRequest,httpServletResponse);
         }
 
     }
 
+    private void redirectToKnox(HttpServletRequest httpRequest, HttpServletResponse httpServletResponse) throws IOException {
+
+        String ajaxRequestHeader = httpRequest.getHeader("X-Requested-With");
+
+        if ("XMLHttpRequest".equals(ajaxRequestHeader)) {
+            String ssourl = constructLoginURL(httpRequest, true);
+            JSONObject json = new JSONObject();
+            json.put("knoxssoredirectURL", URLEncoder.encode(ssourl, "UTF-8"));
+            httpServletResponse.setContentType("application/json");
+            httpServletResponse.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
+            httpServletResponse.sendError(HttpServletResponse.SC_UNAUTHORIZED, json.toString());
+
+        } else {
+            String ssourl = constructLoginURL(httpRequest, false);
+            httpServletResponse.sendRedirect(ssourl);
+        }
+
+    }
 
     private boolean isWebUserAgent(String userAgent) {
         boolean isWeb = false;
@@ -259,13 +272,26 @@ public class AtlasKnoxSSOAuthenticationFilter implements Filter {
      * @param request for getting the original request URL
      * @return url to use as login url for redirect
      */
-    protected String constructLoginURL(HttpServletRequest request) {
+    protected String constructLoginURL(HttpServletRequest request, boolean isXMLRequest) {
         String delimiter = "?";
         if (authenticationProviderUrl.contains("?")) {
             delimiter = "&";
         }
         StringBuilder loginURL = new StringBuilder();
-        loginURL.append(authenticationProviderUrl).append(delimiter).append(originalUrlQueryParam).append("=").append(request.getRequestURL().append(getOriginalQueryString(request)));
+        if (isXMLRequest) {
+            String atlasApplicationURL = "";
+            String referalURL = request.getHeader("referer");
+
+            if (referalURL == null) {
+                atlasApplicationURL = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath();
+            } else {
+                atlasApplicationURL = referalURL;
+            }
+
+            loginURL.append(authenticationProviderUrl).append(delimiter).append(originalUrlQueryParam).append("=").append(atlasApplicationURL);
+        } else {
+            loginURL.append(authenticationProviderUrl).append(delimiter).append(originalUrlQueryParam).append("=").append(request.getRequestURL().append(getOriginalQueryString(request)));
+        }
         return loginURL.toString();
     }
 


[2/2] incubator-atlas git commit: ATLAS-1437: UI update to disallow tag association changes to deleted entities

Posted by ma...@apache.org.
ATLAS-1437: UI update to disallow tag association changes to deleted entities

Signed-off-by: Madhan Neethiraj <ma...@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/49453f28
Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/49453f28
Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/49453f28

Branch: refs/heads/master
Commit: 49453f280bcf221cbe35ee018c26b6be61ad6443
Parents: cc08c51
Author: kalyanikk <ka...@freestoneinfotech.com>
Authored: Fri Jan 20 11:16:47 2017 +0530
Committer: Madhan Neethiraj <ma...@apache.org>
Committed: Fri Jan 20 08:56:56 2017 -0800

----------------------------------------------------------------------
 dashboardv2/public/css/scss/main.scss           |  5 +++
 .../business_catalog/AddTermView_tmpl.html      |  9 +++---
 .../business_catalog/BusinessCatalogHeader.html |  2 --
 .../entity/CreateEntityLayoutView_tmpl.html     |  1 -
 .../templates/graph/LineageLayoutView_tmpl.html |  3 --
 .../public/js/templates/site/header.html        |  2 --
 .../tag/TagDetailTableLayoutView_tmpl.html      |  3 +-
 .../templates/tag/createTagLayoutView_tmpl.html |  1 -
 .../public/js/utils/CommonViewFunction.js       | 10 +++---
 dashboardv2/public/js/utils/Globals.js          |  3 --
 dashboardv2/public/js/utils/Messages.js         |  3 +-
 dashboardv2/public/js/utils/TableLayout.js      | 24 --------------
 .../js/views/audit/AuditTableLayoutView.js      |  3 --
 .../AddTermToEntityLayoutView.js                | 23 ++++++++++---
 .../business_catalog/BusinessCatalogHeader.js   |  1 -
 .../views/detail_page/DetailPageLayoutView.js   | 10 +++++-
 .../js/views/search/SearchResultLayoutView.js   | 34 +++++++++++---------
 .../public/js/views/tag/TagDetailLayoutView.js  |  4 +--
 .../public/js/views/tag/TagLayoutView.js        | 11 +------
 .../public/js/views/tag/addTagModalView.js      | 23 ++++++++++---
 release-log.txt                                 |  1 +
 21 files changed, 84 insertions(+), 92 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/49453f28/dashboardv2/public/css/scss/main.scss
----------------------------------------------------------------------
diff --git a/dashboardv2/public/css/scss/main.scss b/dashboardv2/public/css/scss/main.scss
index f60e547..1d10bab 100644
--- a/dashboardv2/public/css/scss/main.scss
+++ b/dashboardv2/public/css/scss/main.scss
@@ -310,6 +310,11 @@ ul {
             display: none;
         }
     }
+    button {
+        &.editbutton[data-id="editButton"] {
+            display: none;
+        }
+    }
 }
 
 @media (min-width: 768px) {

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/49453f28/dashboardv2/public/js/templates/business_catalog/AddTermView_tmpl.html
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/templates/business_catalog/AddTermView_tmpl.html b/dashboardv2/public/js/templates/business_catalog/AddTermView_tmpl.html
index e784e6a..b8d28eb 100644
--- a/dashboardv2/public/js/templates/business_catalog/AddTermView_tmpl.html
+++ b/dashboardv2/public/js/templates/business_catalog/AddTermView_tmpl.html
@@ -15,14 +15,13 @@
  * limitations under the License.
 -->
 <form name="tagDefinitionform" class="css-form" onsubmit="return false;">
-    <!-- <h4 style="margin-bottom:30px">Add Term</h4> -->
     <div class="form-group">
-    	{{#if defaultTerm}}
-    	<input class="form-control" data-id="termName" placeholder="Enter Taxonomy Name" autofocus>
+        {{#if defaultTerm}}
+        <input class="form-control" data-id="termName" placeholder="Enter Taxonomy Name" autofocus>
         <p class='alertTerm' style='display:none'>Taxonomy name should not have spaces</p>
-    	{{else}}
+        {{else}}
         <input class="form-control" data-id="termName" placeholder="Name(Required)" autofocus>
-         <p class='alertTerm' style='display:none'>Term name should not have spaces</p>
+        <p class='alertTerm' style='display:none'>Term name should not have spaces</p>
         {{/if}}
     </div>
     <div class="form-group">

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/49453f28/dashboardv2/public/js/templates/business_catalog/BusinessCatalogHeader.html
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/templates/business_catalog/BusinessCatalogHeader.html b/dashboardv2/public/js/templates/business_catalog/BusinessCatalogHeader.html
index 7ff7106..ae172cc 100644
--- a/dashboardv2/public/js/templates/business_catalog/BusinessCatalogHeader.html
+++ b/dashboardv2/public/js/templates/business_catalog/BusinessCatalogHeader.html
@@ -21,8 +21,6 @@
         <a target="_blank" href="http://atlas.incubator.apache.org/"><i class="fa  fa-question-circle"></i></a>
         <a href="javascript:void(0);" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fa fa-user user-circle"></i><span class="userName"></span></a>
         <ul class="dropdown-menu">
-            <!--    <li><a href="#">Edit Profile</a></li>
-            <li><a href="#">Change Password</a></li> -->
             <li class="aboutAtlas"><a href="javascript:void(0)">About</a></li>
             <li role="separator" class="divider"></li>
             <li><a href="logout.html"><i class="fa fa-sign-out"></i>Logout</a></li>

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/49453f28/dashboardv2/public/js/templates/entity/CreateEntityLayoutView_tmpl.html
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/templates/entity/CreateEntityLayoutView_tmpl.html b/dashboardv2/public/js/templates/entity/CreateEntityLayoutView_tmpl.html
index 01f2aa0..d3220b3 100644
--- a/dashboardv2/public/js/templates/entity/CreateEntityLayoutView_tmpl.html
+++ b/dashboardv2/public/js/templates/entity/CreateEntityLayoutView_tmpl.html
@@ -15,7 +15,6 @@
  * limitations under the License.
 -->
 <form name="entityDefinitionform" class="css-form">
-    <!-- <h4 style="margin-bottom:30px"></h4> -->
     <div class="form-group">
         <div class="col-sm-12">
             <div class="row">

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/49453f28/dashboardv2/public/js/templates/graph/LineageLayoutView_tmpl.html
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/templates/graph/LineageLayoutView_tmpl.html b/dashboardv2/public/js/templates/graph/LineageLayoutView_tmpl.html
index 6a2e81c..f67e811 100644
--- a/dashboardv2/public/js/templates/graph/LineageLayoutView_tmpl.html
+++ b/dashboardv2/public/js/templates/graph/LineageLayoutView_tmpl.html
@@ -14,9 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
 -->
-<!-- <div class="panel-heading">
-    <h3 class="panel-title">Lineage</h3>
-</div> -->
 <div class="panel-body graph-bg resize-graph" align="center">
     <div class="graph" id="tree-container">
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/49453f28/dashboardv2/public/js/templates/site/header.html
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/templates/site/header.html b/dashboardv2/public/js/templates/site/header.html
index 623d802..558dd67 100644
--- a/dashboardv2/public/js/templates/site/header.html
+++ b/dashboardv2/public/js/templates/site/header.html
@@ -19,8 +19,6 @@
         <a target="_blank" href="http://atlas.incubator.apache.org/"><i class="fa  fa-question-circle"></i></a>
         <a href="javascript:void(0);" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="user-dropdown"><i class="fa fa-user user-circle "></i><span class="userName"></span></a>
         <ul class="dropdown-menu">
-            <!--    <li><a href="#">Edit Profile</a></li>
-            <li><a href="#">Change Password</a></li> -->
             <li class="aboutAtlas"><a href="javascript:void(0)">About</a></li>
             <li role="separator" class="divider"></li>
             <li>

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/49453f28/dashboardv2/public/js/templates/tag/TagDetailTableLayoutView_tmpl.html
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/templates/tag/TagDetailTableLayoutView_tmpl.html b/dashboardv2/public/js/templates/tag/TagDetailTableLayoutView_tmpl.html
index 4be7cc2..c215128 100644
--- a/dashboardv2/public/js/templates/tag/TagDetailTableLayoutView_tmpl.html
+++ b/dashboardv2/public/js/templates/tag/TagDetailTableLayoutView_tmpl.html
@@ -15,9 +15,8 @@
  * limitations under the License.
 -->
 <div>
-    <!--     <button class="add-tag btn btn-success pull-right" data-id="addTag" style="margin-bottom:10px">Add Tag</button> -->
 </div>
 <div class="fontLoader">
     <i class="fa fa-refresh fa-spin-custom"></i>
 </div>
-<div id="r_tagTermTableLayoutView"></div>
\ No newline at end of file
+<div id="r_tagTermTableLayoutView"></div>

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/49453f28/dashboardv2/public/js/templates/tag/createTagLayoutView_tmpl.html
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/templates/tag/createTagLayoutView_tmpl.html b/dashboardv2/public/js/templates/tag/createTagLayoutView_tmpl.html
index 668b09d..256209b 100644
--- a/dashboardv2/public/js/templates/tag/createTagLayoutView_tmpl.html
+++ b/dashboardv2/public/js/templates/tag/createTagLayoutView_tmpl.html
@@ -15,7 +15,6 @@
  * limitations under the License.
 -->
 <form name="tagDefinitionform" class="css-form" data-id="createTagForm">
-    <!-- <h4 style="margin-bottom:30px"></h4> -->
     <div class="form-group">
         {{#if create}}
         <input class="form-control row-margin-bottom" data-id="tagName" placeholder="Name(required)" autofocus>

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/49453f28/dashboardv2/public/js/utils/CommonViewFunction.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/utils/CommonViewFunction.js b/dashboardv2/public/js/utils/CommonViewFunction.js
index ac14dfe..7d41c1c 100644
--- a/dashboardv2/public/js/utils/CommonViewFunction.js
+++ b/dashboardv2/public/js/utils/CommonViewFunction.js
@@ -80,7 +80,6 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
                     success: function(data) {
                         var value = "",
                             deleteButton = "";
-
                         if (data && data.attributes) {
                             if (data.attributes.name) {
                                 value = data.attributes.name;
@@ -92,11 +91,10 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
                         }
                         var id = "";
                         if (data.guid) {
-                            if (Enums.entityStateReadOnly[data.attributes.state]) {
+                            if (Enums.entityStateReadOnly[data.status]) {
                                 deleteButton += '<button title="Deleted" class="btn btn-atlasAction btn-atlas deleteBtn"><i class="fa fa-trash"></i></button>';
                             }
                             id = data.guid;
-
                         }
                         if (value.length > 1) {
                             scope.$('td div[data-id="' + id + '"]').html('<a href="#!/detailPage/' + id + '">' + _.escape(value) + '</a>');
@@ -131,6 +129,9 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
                         id = inputOutputField.guid || inputOutputField.id,
                         tempLink = "",
                         readOnly = false;
+                    if (Enums.entityStateReadOnly[inputOutputField.status]) {
+                        readOnly = inputOutputField.status
+                    }
                     if (_.isString(inputOutputField) || _.isBoolean(inputOutputField) || _.isNumber(inputOutputField)) {
                         if (inputOutputField.indexOf("$") == -1) {
                             valueOfArray.push('<span>' + _.escape(inputOutputField) + '</span>');
@@ -169,7 +170,6 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
                             tempLink += '<div data-id="' + fetchId + '"></div>';
                         }
                     }
-
                     if (readOnly) {
                         if (!fetch) {
                             tempLink += '<button title="Deleted" class="btn btn-atlasAction btn-atlas deleteBtn"><i class="fa fa-trash"></i></button>';
@@ -364,10 +364,10 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
         require(['models/VCatalog'], function(Vcatalog) {
             var VCatalog = new Vcatalog();
             var name = options.termName;
+            ++that.asyncFetchCounter;
             VCatalog.url = function() {
                 return "api/atlas/v1/entities/" + options.guid + "/tags/" + name;
             };
-            ++that.asyncFetchCounter;
             VCatalog.save(null, {
                 success: function(data) {
                     Utils.notifySuccess({

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/49453f28/dashboardv2/public/js/utils/Globals.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/utils/Globals.js b/dashboardv2/public/js/utils/Globals.js
index fb95bc6..a5be29d 100644
--- a/dashboardv2/public/js/utils/Globals.js
+++ b/dashboardv2/public/js/utils/Globals.js
@@ -20,8 +20,6 @@ define(['require'], function(require) {
     'use strict';
 
     var Globals = {};
-
-    //Globals.baseURL = '/api/atlas';
     Globals.settings = {};
     Globals.settings.PAGE_SIZE = 25;
     Globals.saveApplicationState = {
@@ -38,6 +36,5 @@ define(['require'], function(require) {
         status: false,
         response: {}
     }
-
     return Globals;
 });

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/49453f28/dashboardv2/public/js/utils/Messages.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/utils/Messages.js b/dashboardv2/public/js/utils/Messages.js
index 6776903..d6acc32 100644
--- a/dashboardv2/public/js/utils/Messages.js
+++ b/dashboardv2/public/js/utils/Messages.js
@@ -33,7 +33,8 @@ define(['require'], function(require) {
         addAttributeSuccessMessage: "Tag attribute is added successfully",
         updateTagDescriptionMessage: "Tag description is updated successfully",
         updateTermDescriptionMessage: "Term description is updated successfully",
-        editSuccessMessage: " has been updated successfully"
+        editSuccessMessage: " has been updated successfully",
+        assignDeletedEntity: " entity is deleted, Tag cannot be assign"
     };
     return Messages;
 });

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/49453f28/dashboardv2/public/js/utils/TableLayout.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/utils/TableLayout.js b/dashboardv2/public/js/utils/TableLayout.js
index fb1ad9f..7a2a155 100644
--- a/dashboardv2/public/js/utils/TableLayout.js
+++ b/dashboardv2/public/js/utils/TableLayout.js
@@ -181,30 +181,6 @@ define(['require',
                     this.collection.trigger("sort");
                 });
 
-                /*this.listenTo(this.collection, 'remove', function(model, collection, response){
-                    if (model.isNew() || !this.includePagination) {
-                        return;
-                    }
-                    if (this.collection.state && this.collection.state.totalRecords>0) {
-                        this.collection.state.totalRecords-=1;
-                    }
-                    if (this.collection.length===0 && this.collection.state && this.collection.state.totalRecords>0) {
-
-                        if (this.collection.state.totalRecords>this.collection.state.currentPage*this.collection.state.pageSize) {
-                            this.collection.fetch({reset:true});
-                        } else {
-                            if (this.collection.state.currentPage>0) {
-                                this.collection.state.currentPage-=1;
-                                this.collection.fetch({reset:true});
-                            }
-                        }
-
-                    } else if (this.collection.length===0 && this.collection.state && this.collection.state.totalRecords===0) {
-                        this.collection.state.currentPage=0;
-                        this.collection.fetch({reset:true});
-                    }
-                }, this);*/
-
                 // It will show tool tip when td has ellipsis  Property
                 this.listenTo(this.collection, "backgrid:refresh", function() {
                     /*this.$('.table td').bind('mouseenter', function() {

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/49453f28/dashboardv2/public/js/views/audit/AuditTableLayoutView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/audit/AuditTableLayoutView.js b/dashboardv2/public/js/views/audit/AuditTableLayoutView.js
index b8b65e2..dd4adda 100644
--- a/dashboardv2/public/js/views/audit/AuditTableLayoutView.js
+++ b/dashboardv2/public/js/views/audit/AuditTableLayoutView.js
@@ -39,7 +39,6 @@ define(['require',
 
             /** ui selector cache */
             ui: {
-                auditValue: "[data-id='auditValue']",
                 auditCreate: "[data-id='auditCreate']",
                 previousAuditData: "[data-id='previousAuditData']",
                 nextAuditData: "[data-id='nextAuditData']",
@@ -80,8 +79,6 @@ define(['require',
                 };
                 this.currPage = 1;
                 this.bindEvents();
-                // this.pageFrom = 1;
-                // this.pageTo = this.count;
             },
             onRender: function() {
                 $.extend(this.entityCollection.queryParams, { count: this.count });

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/49453f28/dashboardv2/public/js/views/business_catalog/AddTermToEntityLayoutView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/business_catalog/AddTermToEntityLayoutView.js b/dashboardv2/public/js/views/business_catalog/AddTermToEntityLayoutView.js
index fddaf09..dd45e48 100644
--- a/dashboardv2/public/js/views/business_catalog/AddTermToEntityLayoutView.js
+++ b/dashboardv2/public/js/views/business_catalog/AddTermToEntityLayoutView.js
@@ -23,8 +23,9 @@ define(['require',
     'modules/Modal',
     'collection/VCatalogList',
     'utils/CommonViewFunction',
-    'utils/Messages'
-], function(require, Backbone, AddTermToEntityLayoutViewTmpl, Utils, Modal, VCatalogList, CommonViewFunction, Messages) {
+    'utils/Messages',
+    'utils/Enums'
+], function(require, Backbone, AddTermToEntityLayoutViewTmpl, Utils, Modal, VCatalogList, CommonViewFunction, Messages, Enums) {
     'use strict';
 
     var AddTermToEntityLayoutView = Backbone.Marionette.LayoutView.extend(
@@ -50,7 +51,7 @@ define(['require',
              * @constructs
              */
             initialize: function(options) {
-                _.extend(this, _.pick(options, 'guid', 'modalCollection', 'callback', 'multiple', 'showLoader'));
+                _.extend(this, _.pick(options, 'guid', 'modalCollection', 'callback', 'multiple', 'showLoader', 'hideLoader'));
                 this.vCatalogList = new VCatalogList();
                 var that = this;
                 this.modal = new Modal({
@@ -73,9 +74,21 @@ define(['require',
                             }
                             var obj = {
                                 termName: termName,
-                                guid: that.multiple[i].id.id
+                                guid: that.multiple[i].id.id,
+                                deletedEntity: Enums.entityStateReadOnly[that.multiple[i].id.state],
+                                entityName: that.multiple[i].model.get('name')
                             };
-                            CommonViewFunction.saveTermToAsset(obj, that);
+                            if (obj.deletedEntity) {
+                                Utils.notifyError({
+                                    content: obj.entityName + Messages.assignDeletedEntity
+                                });
+                                if (that.multiple.length === 1 || (that.multiple.length == (i + 1) && that.asyncFetchCounter == 0)) {
+                                    that.hideLoader();
+                                }
+                            } else {
+                                CommonViewFunction.saveTermToAsset(obj, that);
+                            }
+
                         }
                     } else {
                         that.asyncFetchCounter = 0;

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/49453f28/dashboardv2/public/js/views/business_catalog/BusinessCatalogHeader.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/business_catalog/BusinessCatalogHeader.js b/dashboardv2/public/js/views/business_catalog/BusinessCatalogHeader.js
index 75ed98c..7247ac0 100644
--- a/dashboardv2/public/js/views/business_catalog/BusinessCatalogHeader.js
+++ b/dashboardv2/public/js/views/business_catalog/BusinessCatalogHeader.js
@@ -31,7 +31,6 @@ define(['require',
         initialize: function(options) {
             _.extend(this, _.pick(options, 'globalVent', 'url', 'collection'));
             this.value = [];
-
         },
         /**
          * After Page Render createBrudCrum called.

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/49453f28/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js b/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
index 8da3b00..d63bb5a 100644
--- a/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
+++ b/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
@@ -67,7 +67,9 @@ define(['require',
             /** ui events hash */
             events: function() {
                 var events = {};
-                events["click " + this.ui.editButton] = 'onClickEditEntity';
+                if (Globals.entityCrud) {
+                    events["click " + this.ui.editButton] = 'onClickEditEntity';
+                }
                 events["click " + this.ui.tagClick] = function(e) {
                     if (e.target.nodeName.toLocaleLowerCase() != "i") {
                         var scope = $(e.currentTarget);
@@ -111,9 +113,15 @@ define(['require',
                     var collectionJSON = this.collection.first().toJSON();
                     if (collectionJSON && collectionJSON.guid) {
                         var tagGuid = collectionJSON.guid;
+                        this.readOnly = Enums.entityStateReadOnly[collectionJSON.status];
                     } else {
                         var tagGuid = this.id;
                     }
+                    if (this.readOnly) {
+                        this.$el.addClass('readOnly');
+                    } else {
+                        this.$el.removeClass('readOnly');
+                    }
                     if (collectionJSON) {
                         if (collectionJSON.attributes) {
                             if (collectionJSON.attributes.name) {

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/49453f28/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 35a1152..f389515 100644
--- a/dashboardv2/public/js/views/search/SearchResultLayoutView.js
+++ b/dashboardv2/public/js/views/search/SearchResultLayoutView.js
@@ -209,9 +209,7 @@ define(['require',
                 if (value && (value.query === undefined || value.query.trim() === "")) {
                     return;
                 }
-                this.$('.fontLoader').show();
-                this.$('.searchTable').hide();
-                this.$('.searchResult').hide();
+                this.showLoader();
                 if (Globals.searchApiCallRef) {
                     Globals.searchApiCallRef.abort();
                 }
@@ -312,9 +310,7 @@ define(['require',
             checkTableFetch: function() {
                 if (this.asyncFetchCounter <= 0) {
                     this.$('div[data-id="r_tableSpinner"]').removeClass('show');
-                    this.$('.fontLoader').hide();
-                    this.$('.searchTable').show();
-                    this.$('.searchResult').show();
+                    this.hideLoader();
                 }
             },
             getEntityTableColumns: function() {
@@ -453,7 +449,9 @@ define(['require',
                                     nameHtml += '<button type="button" title="Deleted" class="btn btn-atlasAction btn-atlas deleteBtn"><i class="fa fa-trash"></i></button>';
                                     return '<div class="readOnly readOnlyLink">' + nameHtml + '</div>';
                                 } else {
-                                    nameHtml += '<button title="Edit" data-id="editEntityButton"  data-giud= "' + (model.get('$id$').id || model.get('$id$')) + '" class="btn btn-atlasAction btn-atlas editBtn"><i class="fa fa-pencil"></i></button>'
+                                    if (Globals.entityCrud) {
+                                        nameHtml += '<button title="Edit" data-id="editEntityButton"  data-giud= "' + (model.get('$id$').id || model.get('$id$')) + '" class="btn btn-atlasAction btn-atlas editBtn"><i class="fa fa-pencil"></i></button>'
+                                    }
                                     return nameHtml;
                                 }
                             }
@@ -563,16 +561,24 @@ define(['require',
                             that.fetchCollection();
                             that.arr = [];
                         },
-                        showLoader: function() {
-                            that.$('.fontLoader').show();
-                            that.$('.searchTable').hide();
-                        }
+                        showLoader: that.showLoader.bind(that),
+                        hideLoader: that.hideLoader.bind(that)
                     });
                     // view.saveTagData = function() {
                     //override saveTagData function 
                     // }
                 });
             },
+            showLoader: function() {
+                this.$('.fontLoader').show();
+                this.$('.searchTable').hide();
+                this.$('.searchResult').hide();
+            },
+            hideLoader: function() {
+                this.$('.fontLoader').hide();
+                this.$('.searchTable').show();
+                this.$('.searchResult').show();
+            },
             checkedValue: function(e) {
                 var guid = "",
                     that = this;
@@ -605,10 +611,8 @@ define(['require',
                             that.fetchCollection();
                             that.arr = [];
                         },
-                        showLoader: function() {
-                            that.$('.fontLoader').show();
-                            that.$('.searchTable').hide();
-                        }
+                        showLoader: that.showLoader.bind(that),
+                        hideLoader: that.hideLoader.bind(that)
                     });
                 });
             },

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/49453f28/dashboardv2/public/js/views/tag/TagDetailLayoutView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/tag/TagDetailLayoutView.js b/dashboardv2/public/js/views/tag/TagDetailLayoutView.js
index e9e1ab4..3e98755 100644
--- a/dashboardv2/public/js/views/tag/TagDetailLayoutView.js
+++ b/dashboardv2/public/js/views/tag/TagDetailLayoutView.js
@@ -72,9 +72,7 @@ define(['require',
                         collection: that.collection
                     }));
                 });
-            },
-
-
+            }
         });
     return TagDetailLayoutView;
 });

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/49453f28/dashboardv2/public/js/views/tag/TagLayoutView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/tag/TagLayoutView.js b/dashboardv2/public/js/views/tag/TagLayoutView.js
index 0ac3745..9ed7ae9 100644
--- a/dashboardv2/public/js/views/tag/TagLayoutView.js
+++ b/dashboardv2/public/js/views/tag/TagLayoutView.js
@@ -19,13 +19,11 @@
 define(['require',
     'backbone',
     'hbs!tmpl/tag/TagLayoutView_tmpl',
-    'collection/VTagList',
-    'collection/VEntityList',
     'utils/Utils',
     'utils/Messages',
     'utils/Globals',
     'utils/UrlLinks'
-], function(require, Backbone, TagLayoutViewTmpl, VTagList, VEntityList, Utils, Messages, Globals, UrlLinks) {
+], function(require, Backbone, TagLayoutViewTmpl, Utils, Messages, Globals, UrlLinks) {
     'use strict';
 
     var TagLayoutView = Backbone.Marionette.LayoutView.extend(
@@ -44,7 +42,6 @@ define(['require',
                 createTag: "[data-id='createTag']",
                 tags: "[data-id='tags']",
                 offLineSearchTag: "[data-id='offlineSearchTag']",
-                deleteTerm: "[data-id='deleteTerm']",
                 refreshTag: '[data-id="refreshTag"]'
             },
             /** ui events hash */
@@ -53,7 +50,6 @@ define(['require',
                 events["click " + this.ui.createTag] = 'onClickCreateTag';
                 events["click " + this.ui.tags] = 'onTagList';
                 events["keyup " + this.ui.offLineSearchTag] = 'offlineSearchTag';
-                events["click " + this.ui.deleteTerm] = 'onDeleteTerm';
                 events['click ' + this.ui.refreshTag] = 'fetchCollections';
                 return events;
             },
@@ -265,7 +261,6 @@ define(['require',
                     }
                 });
             },
-
             setUrl: function(url, create) {
                 Utils.setUrl({
                     url: url,
@@ -277,10 +272,6 @@ define(['require',
                 });
             },
             onTagList: function(e, toggle) {
-                /*if (toggle) {
-                    var assetUl = $(e.currentTarget).siblings('.tagAsset')
-                    assetUl.slideToggle("slow");
-                }*/
                 this.ui.tagsParent.find('li').removeClass("active");
                 $(e.currentTarget).addClass("active");
             },

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/49453f28/dashboardv2/public/js/views/tag/addTagModalView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/tag/addTagModalView.js b/dashboardv2/public/js/views/tag/addTagModalView.js
index 649cad5..9c82d5c 100644
--- a/dashboardv2/public/js/views/tag/addTagModalView.js
+++ b/dashboardv2/public/js/views/tag/addTagModalView.js
@@ -23,8 +23,10 @@ define(['require',
     'modules/Modal',
     'models/VEntity',
     'utils/Utils',
-    'utils/UrlLinks'
-], function(require, AddTagModalViewTmpl, VTagList, VCommonList, Modal, VEntity, Utils, UrlLinks) {
+    'utils/UrlLinks',
+    'utils/Enums',
+    'utils/Messages',
+], function(require, AddTagModalViewTmpl, VTagList, VCommonList, Modal, VEntity, Utils, UrlLinks, Enums, Messages) {
     'use strict';
 
     var AddTagModel = Marionette.LayoutView.extend({
@@ -46,7 +48,7 @@ define(['require',
          */
         initialize: function(options) {
             var that = this;
-            _.extend(this, _.pick(options, 'vent', 'modalCollection', 'guid', 'callback', 'multiple', 'showLoader'));
+            _.extend(this, _.pick(options, 'vent', 'modalCollection', 'guid', 'callback', 'multiple', 'showLoader', 'hideLoader'));
             this.collection = new VTagList();
             this.commonCollection = new VTagList();
             this.asyncAttrFetchCounter = 0;
@@ -76,9 +78,20 @@ define(['require',
                         var obj = {
                             tagName: tagName,
                             tagAttributes: tagAttributes,
-                            guid: (_.isObject(that.multiple[i].id) ? that.multiple[i].id.id : that.multiple[i].id)
+                            guid: (_.isObject(that.multiple[i].id) ? that.multiple[i].id.id : that.multiple[i].id),
+                            deletedEntity: Enums.entityStateReadOnly[that.multiple[i].id.state],
+                            entityName: that.multiple[i].model.get('name')
+                        }
+                        if (obj.deletedEntity) {
+                            Utils.notifyError({
+                                content: obj.entityName + Messages.assignDeletedEntity
+                            });
+                            if (that.multiple.length === 1 || (that.multiple.length == (i + 1) && that.asyncFetchCounter == 0)) {
+                                that.hideLoader();
+                            }
+                        } else {
+                            that.saveTagData(obj);
                         }
-                        that.saveTagData(obj);
                     }
                 } else {
                     that.asyncFetchCounter = 0;

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/49453f28/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index 4cd0a18..87b3a9f 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -9,6 +9,7 @@ ATLAS-1060 Add composite indexes for exact match performance improvements for al
 ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai)
 
 ALL CHANGES:
+ATLAS-1437 UI update to disallow tag association changes to deleted entities (Kalyanikashikar via mneethiraj)
 ATLAS-1352 fix for error in redirecting to Knox gateway URL (nixonrodrigues via mneethiraj)
 ATLAS-1467 instance create/full-Update implementation (sumasai via mneethiraj)
 ATLAS-1463 option to exclude specific entity attributes in audit records (sarath.kum4r@gmail.com via mneethiraj)