Commit 8092d6b5 by kevalbhatt

ATLAS-3769:- UI: Changing page limit in Admin audits resets any filters applied on that page

parent f4e1e6b0
...@@ -56,7 +56,7 @@ define(['require', ...@@ -56,7 +56,7 @@ define(['require',
events["click " + this.ui.adminEntityClick] = "onClickAdminEntity"; events["click " + this.ui.adminEntityClick] = "onClickAdminEntity";
events["change " + this.ui.adminType] = "onClickAdminType"; events["change " + this.ui.adminType] = "onClickAdminType";
events["click " + this.ui.attrFilter] = function(e) { events["click " + this.ui.attrFilter] = function(e) {
this.$('.fa-angle-right').toggleClass('fa-angle-down'); this.ui.attrFilter.find('.fa-angle-right').toggleClass('fa-angle-down');
this.$('.attributeResultContainer').addClass("overlay"); this.$('.attributeResultContainer').addClass("overlay");
this.$('.attribute-filter-container, .attr-filter-overlay').toggleClass('hide'); this.$('.attribute-filter-container, .attr-filter-overlay').toggleClass('hide');
this.onClickAttrFilter(); this.onClickAttrFilter();
...@@ -120,7 +120,7 @@ define(['require', ...@@ -120,7 +120,7 @@ define(['require',
closeAttributeModel: function() { closeAttributeModel: function() {
var that = this; var that = this;
that.$('.attributeResultContainer').removeClass("overlay"); that.$('.attributeResultContainer').removeClass("overlay");
that.$('.fa-angle-right').toggleClass('fa-angle-down'); that.ui.attrFilter.find('.fa-angle-right').toggleClass('fa-angle-down');
that.$('.attribute-filter-container, .attr-filter-overlay').toggleClass('hide'); that.$('.attribute-filter-container, .attr-filter-overlay').toggleClass('hide');
}, },
getAttributes: function(options) { getAttributes: function(options) {
...@@ -133,7 +133,6 @@ define(['require', ...@@ -133,7 +133,6 @@ define(['require',
"attributeValue": (adminFilter.type == "date" && options.isDateParsed) ? Date.parse(adminFilter.value).toString() : adminFilter.value "attributeValue": (adminFilter.type == "date" && options.isDateParsed) ? Date.parse(adminFilter.value).toString() : adminFilter.value
}) })
}) })
this.isFilters = null;
} else { } else {
adminAttributes = [{ adminAttributes = [{
"attributeName": "userName", "attributeName": "userName",
...@@ -301,6 +300,7 @@ define(['require', ...@@ -301,6 +300,7 @@ define(['require',
}, },
onClickAdminType: function(e, value) { onClickAdminType: function(e, value) {
this.onlyPurged = e.currentTarget.value === "Purged"; this.onlyPurged = e.currentTarget.value === "Purged";
this.isFilters = null;
this.defaultPagination(); this.defaultPagination();
this.getAdminCollection(); this.getAdminCollection();
}, },
......
...@@ -56,7 +56,7 @@ define(['require', ...@@ -56,7 +56,7 @@ define(['require',
events["click " + this.ui.adminEntityClick] = "onClickAdminEntity"; events["click " + this.ui.adminEntityClick] = "onClickAdminEntity";
events["change " + this.ui.adminType] = "onClickAdminType"; events["change " + this.ui.adminType] = "onClickAdminType";
events["click " + this.ui.attrFilter] = function(e) { events["click " + this.ui.attrFilter] = function(e) {
this.$('.fa-angle-right').toggleClass('fa-angle-down'); this.ui.attrFilter.find('.fa-angle-right').toggleClass('fa-angle-down');
this.$('.attributeResultContainer').addClass("overlay"); this.$('.attributeResultContainer').addClass("overlay");
this.$('.attribute-filter-container, .attr-filter-overlay').toggleClass('hide'); this.$('.attribute-filter-container, .attr-filter-overlay').toggleClass('hide');
this.onClickAttrFilter(); this.onClickAttrFilter();
...@@ -120,7 +120,7 @@ define(['require', ...@@ -120,7 +120,7 @@ define(['require',
closeAttributeModel: function() { closeAttributeModel: function() {
var that = this; var that = this;
that.$('.attributeResultContainer').removeClass("overlay"); that.$('.attributeResultContainer').removeClass("overlay");
that.$('.fa-angle-right').toggleClass('fa-angle-down'); that.ui.attrFilter.find('.fa-angle-right').toggleClass('fa-angle-down');
that.$('.attribute-filter-container, .attr-filter-overlay').toggleClass('hide'); that.$('.attribute-filter-container, .attr-filter-overlay').toggleClass('hide');
}, },
getAttributes: function(options) { getAttributes: function(options) {
...@@ -133,7 +133,6 @@ define(['require', ...@@ -133,7 +133,6 @@ define(['require',
"attributeValue": (adminFilter.type == "date" && options.isDateParsed) ? Date.parse(adminFilter.value).toString() : adminFilter.value "attributeValue": (adminFilter.type == "date" && options.isDateParsed) ? Date.parse(adminFilter.value).toString() : adminFilter.value
}) })
}) })
this.isFilters = null;
} else { } else {
adminAttributes = [{ adminAttributes = [{
"attributeName": "userName", "attributeName": "userName",
...@@ -301,6 +300,7 @@ define(['require', ...@@ -301,6 +300,7 @@ define(['require',
}, },
onClickAdminType: function(e, value) { onClickAdminType: function(e, value) {
this.onlyPurged = e.currentTarget.value === "Purged"; this.onlyPurged = e.currentTarget.value === "Purged";
this.isFilters = null;
this.defaultPagination(); this.defaultPagination();
this.getAdminCollection(); this.getAdminCollection();
}, },
......
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