You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by ni...@apache.org on 2019/04/25 15:38:27 UTC

[atlas] branch master updated: ATLAS-3155 : UI - IE-11 - Name entry not clickable

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 2cb36b9  ATLAS-3155 : UI - IE-11 - Name entry not clickable
2cb36b9 is described below

commit 2cb36b90d0c1fa550e5459e1f87294ecd5a505be
Author: kevalbhatt <kb...@apache.org>
AuthorDate: Thu Apr 25 18:50:30 2019 +0530

    ATLAS-3155 : UI - IE-11 - Name entry not clickable
    
    Signed-off-by: nixonrodrigues <ni...@apache.org>
---
 dashboardv2/public/css/scss/form.scss              |  2 +-
 .../glossary/GlossaryDetailLayoutView_tmpl.html    |  2 +-
 .../search/SearchResultLayoutView_tmpl.html        |  2 +-
 dashboardv2/public/js/utils/CommonViewFunction.js  | 63 +++++++++++-----------
 dashboardv2/public/js/utils/Helper.js              |  2 +-
 .../js/views/detail_page/DetailPageLayoutView.js   |  1 -
 .../public/js/views/graph/LineageLayoutView.js     |  6 ++-
 .../public/js/views/search/SearchLayoutView.js     | 40 +++++++-------
 .../js/views/search/SearchResultLayoutView.js      |  1 +
 .../js/views/tag/TagDetailTableLayoutView.js       |  3 +-
 .../atlas/web/security/AtlasSecurityConfig.java    |  6 ++-
 11 files changed, 69 insertions(+), 59 deletions(-)

diff --git a/dashboardv2/public/css/scss/form.scss b/dashboardv2/public/css/scss/form.scss
index 388713e..8381f3a 100644
--- a/dashboardv2/public/css/scss/form.scss
+++ b/dashboardv2/public/css/scss/form.scss
@@ -472,7 +472,7 @@ button:focus {
         border-radius: 12px;
         border-color: #cbcbcb;
         position: relative;
-        padding: 0px 10px;
+        padding: 18px 10px 0px 10px;
         margin-top: 25px;
 
         span.required:after {
diff --git a/dashboardv2/public/js/templates/glossary/GlossaryDetailLayoutView_tmpl.html b/dashboardv2/public/js/templates/glossary/GlossaryDetailLayoutView_tmpl.html
index 7720196..05f6af9 100644
--- a/dashboardv2/public/js/templates/glossary/GlossaryDetailLayoutView_tmpl.html
+++ b/dashboardv2/public/js/templates/glossary/GlossaryDetailLayoutView_tmpl.html
@@ -72,7 +72,7 @@
         {{/if}}
     </div>
 </div>
-<div class="container-fluid gray-bg">
+<div class="container-fluid">
     {{#if isTermView}}
     <div class="tab-content">
         <div id="tab-entities" role="entities" class="tab-pane active animated fadeIn">
diff --git a/dashboardv2/public/js/templates/search/SearchResultLayoutView_tmpl.html b/dashboardv2/public/js/templates/search/SearchResultLayoutView_tmpl.html
index b10a0b8..81cddf5 100644
--- a/dashboardv2/public/js/templates/search/SearchResultLayoutView_tmpl.html
+++ b/dashboardv2/public/js/templates/search/SearchResultLayoutView_tmpl.html
@@ -23,7 +23,7 @@
     <div class="ellipsis" style="display: none;"><span class="searchResult" style=" font-size: 16px;"></span>
     </div>
     <div class="searchTable">
-        <div class="row well" style="padding-top: 0px;">
+        <div class="{{#unless isGlossaryView}}row well{{/unless}}" style="padding-top: 0px;">
             <div class="row form-group pagination-box filter-box" style="display: none;">
                 <div class="col-sm-4">
                     <span class="labelShowRecord pull-left" data-id="pageRecordText"> </span>
diff --git a/dashboardv2/public/js/utils/CommonViewFunction.js b/dashboardv2/public/js/utils/CommonViewFunction.js
index 90bf114..2bc4142 100644
--- a/dashboardv2/public/js/utils/CommonViewFunction.js
+++ b/dashboardv2/public/js/utils/CommonViewFunction.js
@@ -547,11 +547,34 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
                 urlObj = options.value,
                 formatDate = options.formatDate,
                 spliter = 1,
-                apiObj = options.apiObj; //if apiObj then create object for API call else for QueryBuilder.
-            if (urlObj && urlObj.length) {
-                attrObj = createObject(urlObj);
-
-                function createObject(urlObj) {
+                apiObj = options.apiObj,
+                mapUiOperatorToAPI = function(oper) {
+                    if (oper == "=") {
+                        return "eq";
+                    } else if (oper == "!=") {
+                        return "neq";
+                    } else if (oper == "<") {
+                        return "lt";
+                    } else if (oper == "<=") {
+                        return "lte";
+                    } else if (oper == ">") {
+                        return "gt";
+                    } else if (oper == ">=") {
+                        return "gte";
+                    } else if (oper == "begins_with") {
+                        return "startsWith";
+                    } else if (oper == "ends_with") {
+                        return "endsWith";
+                    } else if (oper == "contains") {
+                        return "contains";
+                    } else if (oper == "not_null") {
+                        return "notNull";
+                    } else if (oper == "is_null") {
+                        return "isNull";
+                    }
+                    return oper;
+                },
+                createObject = function(urlObj) {
                     var finalObj = {};
                     finalObj['condition'] = /^AND\(/.test(urlObj) ? "AND" : "OR";
                     urlObj = finalObj.condition === "AND" ? urlObj.substr(4).slice(0, -1) : urlObj.substr(3).slice(0, -1);
@@ -581,37 +604,13 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
                     });
                     return finalObj;
                 }
+            //if apiObj then create object for API call else for QueryBuilder.
+            if (urlObj && urlObj.length) {
+                attrObj = createObject(urlObj);
             } else {
                 return null;
             }
             return attrObj;
-
-            function mapUiOperatorToAPI(oper) {
-                if (oper == "=") {
-                    return "eq";
-                } else if (oper == "!=") {
-                    return "neq";
-                } else if (oper == "<") {
-                    return "lt";
-                } else if (oper == "<=") {
-                    return "lte";
-                } else if (oper == ">") {
-                    return "gt";
-                } else if (oper == ">=") {
-                    return "gte";
-                } else if (oper == "begins_with") {
-                    return "startsWith";
-                } else if (oper == "ends_with") {
-                    return "endsWith";
-                } else if (oper == "contains") {
-                    return "contains";
-                } else if (oper == "not_null") {
-                    return "notNull";
-                } else if (oper == "is_null") {
-                    return "isNull";
-                }
-                return oper;
-            }
         },
         generateAPIObj: function(url) {
             if (url && url.length) {
diff --git a/dashboardv2/public/js/utils/Helper.js b/dashboardv2/public/js/utils/Helper.js
index 8a7a521..9886b9b 100644
--- a/dashboardv2/public/js/utils/Helper.js
+++ b/dashboardv2/public/js/utils/Helper.js
@@ -137,7 +137,7 @@ define(['require',
                     '<div class="col-md-10"><input class="select2-search__field" placeholder="' + placeholder + '" type="search"' +
                     ' tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off"' +
                     ' spellcheck="false" role="textbox" /></div>' +
-                    '<div class="col-md-2"><button type="button" style="margin-left: -20px" class="btn btn-action btn-sm filter " title="Entity Attribute Filter"><i class="fa fa-filter"></i></button></div>' +
+                    '<div class="col-md-2"><button type="button" style="margin-left: -20px" class="btn btn-action btn-sm filter " title="Type Filter"><i class="fa fa-filter"></i></button></div>' +
                     '</div></span>'
                 );
                 if (!this.options.options.getFilterBox) {
diff --git a/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js b/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
index ee22a9a..3c197b9 100644
--- a/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
+++ b/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
@@ -355,7 +355,6 @@ define(['require',
                     showLoader: that.showLoader.bind(that),
                     hideLoader: that.hideLoader.bind(that),
                     tagName: tagName,
-                    guid: that.id,
                     callback: function() {
                         that.fetchCollection();
                     }
diff --git a/dashboardv2/public/js/views/graph/LineageLayoutView.js b/dashboardv2/public/js/views/graph/LineageLayoutView.js
index 1135353..810ec30 100644
--- a/dashboardv2/public/js/views/graph/LineageLayoutView.js
+++ b/dashboardv2/public/js/views/graph/LineageLayoutView.js
@@ -535,8 +535,11 @@ define(['require',
                         .attr('fill', 'url(#img_' + node.id + ')')
                         .attr('r', '24px')
                         .attr('data-stroke', node.id)
+                        .attr('stroke-width', "2px")
                         .attr("class", "nodeImage " + (currentNode ? "currentNode" : (node.isProcess ? "process" : "node")));
-
+                    if (currentNode) {
+                        shapeSvg.attr("stroke", "#fb4200")
+                    }
                     parent.insert("defs")
                         .append("pattern")
                         .attr("x", "0%")
@@ -1004,6 +1007,7 @@ define(['require',
 
                     };
                     img.src = url;
+
                 }, 0)
             },
             toggleLoader: function(element) {
diff --git a/dashboardv2/public/js/views/search/SearchLayoutView.js b/dashboardv2/public/js/views/search/SearchLayoutView.js
index e050215..76edd58 100644
--- a/dashboardv2/public/js/views/search/SearchLayoutView.js
+++ b/dashboardv2/public/js/views/search/SearchLayoutView.js
@@ -62,6 +62,7 @@ define(['require',
                 events["keyup " + this.ui.searchInput] = function(e) {
                     var code = e.which;
                     this.value.query = e.currentTarget.value;
+                    this.query[this.type].query = this.value.query;
                     if (code == 13) {
                         that.findSearchResult();
                     }
@@ -253,8 +254,9 @@ define(['require',
                 });
             },
             checkForButtonVisiblity: function(e, options) {
-                var that = this;
-                if (this.type == "basic" && e && e.currentTarget) {
+                var that = this,
+                    isBasicSearch = (this.type == "basic");
+                if (e && e.currentTarget) {
                     var $el = $(e.currentTarget),
                         isTagEl = $el.data('id') == "tagLOV",
                         isTermEl = $el.data('id') == "termLOV",
@@ -263,11 +265,13 @@ define(['require',
                     if (e.type == "change" && select2Data) {
                         var value = (_.isEmpty(select2Data) ? select2Data : _.first(select2Data).id),
                             key = "tag",
-                            filterType = 'tagFilters',
+                            filterType = isBasicSearch ? 'tagFilters' : null,
                             value = value && value.length ? value : null;
                         if (!isTagEl) {
                             key = (isTermEl ? "term" : "type");
-                            filterType = (isTypeEl ? "entityFilters" : null);
+                            if (isBasicSearch) {
+                                filterType = (isTypeEl ? "entityFilters" : null);
+                            }
                         }
                         if (this.value) {
                             //On Change handle
@@ -280,7 +284,7 @@ define(['require',
                                     this.value.pageOffset = 0;
                                 }
                                 _.extend(this.query[this.type], temp);
-                            } else {
+                            } else if (isBasicSearch) {
                                 // Initial loading handle.
                                 if (filterType) {
                                     var filterObj = this.searchTableFilters[filterType];
@@ -303,10 +307,10 @@ define(['require',
                                     }
                                 }
                             }
-                            if (filterType) {
+                            if (isBasicSearch && filterType) {
                                 this.makeFilterButtonActive(filterType);
                             }
-                        } else {
+                        } else if (isBasicSearch) {
                             this.ui.tagAttrFilter.prop('disabled', true);
                             this.ui.typeAttrFilter.prop('disabled', true);
                         }
@@ -407,6 +411,17 @@ define(['require',
                     filtertype = isTag ? 'tagFilters' : 'entityFilters',
                     queryBuilderRef = this.attrModal.RQueryBuilder.currentView.ui.builder,
                     col = [];
+
+                function getIdFromRuleObject(rule) {
+                    _.map(rule.rules, function(obj, key) {
+                        if (_.has(obj, 'condition')) {
+                            return getIdFromRuleObject(obj);
+                        } else {
+                            return col.push(obj.id)
+                        }
+                    });
+                    return col;
+                }
                 if (queryBuilderRef.data('queryBuilder')) {
                     var rule = queryBuilderRef.queryBuilder('getRules');
                 }
@@ -424,17 +439,6 @@ define(['require',
                     if ($(e.currentTarget).hasClass('search')) {
                         this.findSearchResult();
                     }
-
-                    function getIdFromRuleObject(rule) {
-                        _.map(rule.rules, function(obj, key) {
-                            if (_.has(obj, 'condition')) {
-                                return getIdFromRuleObject(obj);
-                            } else {
-                                return col.push(obj.id)
-                            }
-                        });
-                        return col;
-                    }
                 }
             },
             manualRender: function(paramObj) {
diff --git a/dashboardv2/public/js/views/search/SearchResultLayoutView.js b/dashboardv2/public/js/views/search/SearchResultLayoutView.js
index 2c7f15e..4667925 100644
--- a/dashboardv2/public/js/views/search/SearchResultLayoutView.js
+++ b/dashboardv2/public/js/views/search/SearchResultLayoutView.js
@@ -76,6 +76,7 @@ define(['require',
                     entityCreate: Globals.entityCreate,
                     searchType: this.searchType,
                     fromView: this.fromView,
+                    isGlossaryView: this.fromView == "glossary",
                     isSearchTab: Utils.getUrlState.isSearchTab()
                 };
             },
diff --git a/dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js b/dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js
index 73d8dfb..7140a8d 100644
--- a/dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js
+++ b/dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js
@@ -61,7 +61,7 @@ define(['require',
                 };
                 events["click " + this.ui.propagatedFromClick] = function(e) {
                     Utils.setUrl({
-                        url: '#!/detailPage/' + e.currentTarget.dataset.guid,
+                        url: '#!/detailPage/' + $(e.currentTarget).data("guid"),
                         mergeBrowserUrl: false,
                         trigger: true
                     });
@@ -84,7 +84,6 @@ define(['require',
                     collection: this.tagCollection,
                     includeFilter: false,
                     includePagination: true,
-                    includePageSize: false,
                     includeFooterRecords: true,
                     includePageSize: true,
                     includeGotoPage: true,
diff --git a/webapp/src/main/java/org/apache/atlas/web/security/AtlasSecurityConfig.java b/webapp/src/main/java/org/apache/atlas/web/security/AtlasSecurityConfig.java
index 64c9520..286f85c 100644
--- a/webapp/src/main/java/org/apache/atlas/web/security/AtlasSecurityConfig.java
+++ b/webapp/src/main/java/org/apache/atlas/web/security/AtlasSecurityConfig.java
@@ -41,6 +41,7 @@ import org.springframework.security.web.authentication.www.BasicAuthenticationFi
 import org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter;
 import org.springframework.security.web.util.matcher.RequestHeaderRequestMatcher;
 import org.springframework.security.web.util.matcher.RequestMatcher;
+import org.springframework.security.web.header.writers.StaticHeadersWriter;
 
 import javax.inject.Inject;
 import java.util.LinkedHashMap;
@@ -126,7 +127,10 @@ public class AtlasSecurityConfig extends WebSecurityConfigurerAdapter {
         httpSecurity
                 .authorizeRequests().anyRequest().authenticated()
                 .and()
-                    .headers().disable()
+                    .headers()
+                        .addHeaderWriter(new StaticHeadersWriter("Content-Security-Policy","script-src 'self' 'unsafe-inline' 'unsafe-eval'"))
+                        .addHeaderWriter(new StaticHeadersWriter("Server","Apache Atlas"))
+                .and()
                     .servletApi()
                 .and()
                     .csrf().disable()