Commit b9f4ae79 by kevalbhatt

ATLAS-3792:- New UI: makes it mandate to apply an attribute filter when…

ATLAS-3792:- New UI: makes it mandate to apply an attribute filter when "Filters" is selected even if the user just wants to select "Show Deleted Entities"
parent 62451d62
...@@ -338,10 +338,16 @@ define(["require", "backbone", "utils/Globals", "hbs!tmpl/search/SearchDefaultLa ...@@ -338,10 +338,16 @@ define(["require", "backbone", "utils/Globals", "hbs!tmpl/search/SearchDefaultLa
filterPopupStatus(); filterPopupStatus();
function searchAttribute() { function searchAttribute() {
if (queryBuilderRef.data("queryBuilder")) { var queryBuilderObj = queryBuilderRef.data("queryBuilder");
var rule = queryBuilderRef.queryBuilder("getRules"); if (queryBuilderObj) {
var ruleWithInvalid = queryBuilderObj.getRules({ allow_invalid: true }),
rule = queryBuilderObj.getRules();
rule ? that.updateFilterOptions(rule, filtertype, isTag) : isFilterValidate = false;
if (ruleWithInvalid && ruleWithInvalid.rules.length === 1 && ruleWithInvalid.rules[0].id === null) {
isFilterValidate = true;
queryBuilderObj.clearErrors();
}
} }
rule ? that.updateFilterOptions(rule, filtertype, isTag) : isFilterValidate = false;
} }
function filterPopupStatus() { function filterPopupStatus() {
......
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