Commit 2cb36b90 by kevalbhatt Committed by nixonrodrigues

ATLAS-3155 : UI - IE-11 - Name entry not clickable

parent 04bd64be
......@@ -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 {
......
......@@ -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">
......
......@@ -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>
......
......@@ -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) {
......
......@@ -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) {
......
......@@ -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();
}
......
......@@ -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) {
......
......@@ -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) {
......
......@@ -76,6 +76,7 @@ define(['require',
entityCreate: Globals.entityCreate,
searchType: this.searchType,
fromView: this.fromView,
isGlossaryView: this.fromView == "glossary",
isSearchTab: Utils.getUrlState.isSearchTab()
};
},
......
......@@ -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,
......
......@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment