ATLAS-1776: Include historical entities in UI : A query is made and cancelled every time the check box is checked/unchecked showing 'Invalid expression:null' notification / ATLAS-1777: UI : Include historical entities check box is not shown when searching a type with all DELETED entities hence no entities are retrieved by search
diff --git a/dashboardv2/public/css/scss/override.scss b/dashboardv2/public/css/scss/override.scss
index 38e120f..2852f80 100644
--- a/dashboardv2/public/css/scss/override.scss
+++ b/dashboardv2/public/css/scss/override.scss
@@ -224,11 +224,10 @@
.backgrid-paginator ul > .disabled > span,
.backgrid-paginator ul > .disabled > a {
- &:hover {
+ &:hover {
cursor: not-allowed;
background-color: #7ed3be !important;
}
-
}
.popover {
@@ -256,7 +255,13 @@
word-break: break-all;
}
-.advancedInfo{
+.checkbox-inline,
+.radio-inline {
+ padding-left: 0px;
+ font-weight: bold;
+}
+
+.advancedInfo {
margin-left: 5px;
cursor: pointer;
-}
\ No newline at end of file
+}
diff --git a/dashboardv2/public/js/templates/search/SearchResultLayoutView_tmpl.html b/dashboardv2/public/js/templates/search/SearchResultLayoutView_tmpl.html
index 4361ca1..91f1a67 100644
--- a/dashboardv2/public/js/templates/search/SearchResultLayoutView_tmpl.html
+++ b/dashboardv2/public/js/templates/search/SearchResultLayoutView_tmpl.html
@@ -25,9 +25,10 @@
<a href="javascript:void(0)" class="inputAssignTag multiSelectTag assignTag btnAssign" style="display:none" data-id="addAssignTag"><i class="fa fa-plus"></i> Assign Tag</a>
</div>
<div class="searchTable">
- <div style="display: none;margin-left: 20px" data-id="checkDeletedEntity">
- <label class="checkbox">
- <input type="checkbox" class="input" name="queryType" value="text" name="check" value="1" />Include historical entities</label>
+ <div data-id="containerCheckBox" style="display: none;">
+ <input type="checkbox" id="inputLabel" class="checkbox-inline" name="queryType" value="text" name="check" value="1" data-id="checkDeletedEntity" />
+ <label class="checkbox-inline" for="inputLabel">
+ <b>Include historical entities</b></label>
</div>
<span style="display: none;" class="labelShowRecord pull-left" data-id="pageRecordText"></span>
<div data-id="paginationDiv" style="display:none">
diff --git a/dashboardv2/public/js/views/search/SearchResultLayoutView.js b/dashboardv2/public/js/views/search/SearchResultLayoutView.js
index b2f24d4..314e137 100644
--- a/dashboardv2/public/js/views/search/SearchResultLayoutView.js
+++ b/dashboardv2/public/js/views/search/SearchResultLayoutView.js
@@ -60,7 +60,8 @@
addAssignTag: "[data-id='addAssignTag']",
editEntityButton: "[data-id='editEntityButton']",
createEntity: "[data-id='createEntity']",
- checkDeletedEntity: "[data-id='checkDeletedEntity']"
+ checkDeletedEntity: "[data-id='checkDeletedEntity']",
+ containerCheckBox: "[data-id='containerCheckBox']"
},
templateHelpers: function() {
return {
@@ -189,15 +190,17 @@
this.listenTo(this.searchCollection, "error", function(model, response) {
this.$('.fontLoader').hide();
this.$('.tableOverlay').hide();
- var responseJSON = response ? response.responseJSON : response;
- if (response && responseJSON && (responseJSON.errorMessage || responseJSON.message || responseJSON.error)) {
+ var responseJSON = response && response.responseJSON ? response.responseJSON : null;
+ if (responseJSON && (responseJSON.errorMessage || responseJSON.message || responseJSON.error)) {
Utils.notifyError({
content: responseJSON.errorMessage || responseJSON.message || responseJSON.error
});
} else {
- Utils.notifyError({
- content: "Invalid Expression : " + model.queryParams.query
- });
+ if (response.statusText !== "abort") {
+ Utils.notifyError({
+ content: "Invalid Expression : " + model.queryParams.query
+ });
+ }
}
}, this);
this.listenTo(this.searchVent, "search:refresh", function(model, response) {
@@ -317,10 +320,10 @@
that.REntityTableLayoutView.show(new TableLayout(_.extend({}, that.commonTableOptions, {
columns: columns
})));
- if (that.searchCollection.models.length && that.value.searchType !== "dsl") {
- that.ui.checkDeletedEntity.show();
+ if (that.value.searchType !== "dsl") {
+ that.ui.containerCheckBox.show();
} else {
- that.ui.checkDeletedEntity.hide();
+ that.ui.containerCheckBox.hide();
}
that.ui.paginationDiv.show();
that.$(".ellipsis .inputAssignTag").hide();