Commit d0beadf2 by kevalbhatt Committed by apoorvnaik

ATLAS-2020 : Result Table Column Filter : Filtering using Columns in Result…

ATLAS-2020 : Result Table Column Filter : Filtering using Columns in Result table always sets excludeDeletedEntities to True Signed-off-by: 's avatarapoorvnaik <apoorvnaik@apache.org>
parent e1a142b5
......@@ -4,7 +4,7 @@
"private": true,
"repository": {
"type": "git",
"url": "https://git-wip-us.apache.org/repos/asf/atlas.git"
"url": "https://git-wip-us.apache.org/repos/asf/incubator-atlas.git"
},
"engines": {
"node": "4.4.x",
......
......@@ -69,3 +69,44 @@
display: none;
opacity: 0.2;
}
.value-loader {
height: 4px;
width: 50%;
position: relative;
overflow: hidden;
background-color: #ddd;
}
.value-loader:before {
display: block;
position: absolute;
content: "";
left: -200px;
width: 200px;
height: 4px;
background-color: #2980b9;
animation: value-loader 2s linear infinite;
}
@keyframes value-loader {
from {
left: -200px;
width: 30%;
}
50% {
width: 30%;
}
70% {
width: 70%;
}
80% {
left: 50%;
}
95% {
left: 120%;
}
to {
left: 100%;
}
}
\ No newline at end of file
......@@ -69,9 +69,15 @@
box-shadow: 0px 0px 4px #d8d8d8;
overflow: scroll !important;
max-height: 500px;
}
.table-quickMenu>thead>tr>th {
.resizeHandler {
&.grid-draggable {
background-color: $color_jungle_green_approx !important;
}
&:hover {
border-left: 1px solid #d2d2d2;
}
}
>thead>tr>th {
border-width: thin;
border-color: $color_jungle_green_approx;
border-bottom-style: solid;
......@@ -80,25 +86,29 @@
background-color: transparent;
text-align: left;
font-weight: 800;
border-top: 0;
font-size: 14px;
letter-spacing: 0.25px;
color: rgba(52, 52, 52, 1);
}
.table-quickMenu > tbody > tr > td {
}
>tbody>tr>td {
border-color: $color_gallery_approx;
color: #333333;
font-weight: 100;
padding: 10px 15px;
}
}
.backgrid-paginator ul > li > a:hover,
.backgrid-paginator ul > .active > a,
.backgrid-paginator ul > .active > span {
background-color: #2EBC9A !important;
color: #fff !important;
&:hover {
background-color: none;
td {
div.scroll-y {
max-height: 200px;
overflow-y: auto;
}
}
.backgrid {
td {
white-space: normal;
}
}
......@@ -108,11 +118,25 @@
margin: 20px 0;
border-radius: 4px;
border: 1px #DDDDDD solid;
}
.backgrid {
td {
white-space: normal;
margin: 0px;
float: right;
border-radius: 10px;
overflow: hidden;
>.disabled>span,
>.disabled>a {
&:hover {
cursor: not-allowed;
background-color: #7ed3be !important;
}
}
>.active>span,
>.active>a,
>li>a:hover {
background-color: #2EBC9A !important;
color: #fff !important;
&:hover {
background-color: none;
}
}
}
......@@ -216,21 +240,6 @@
}
}
.backgrid-paginator ul {
margin: 0px;
float: right;
border-radius: 10px;
overflow: hidden;
}
.backgrid-paginator ul > .disabled > span,
.backgrid-paginator ul > .disabled > a {
&:hover {
cursor: not-allowed;
background-color: #7ed3be !important;
}
}
.popover {
z-index: 99;
}
......@@ -248,7 +257,7 @@
}
}
.tab-content > .tab-pane.active {
.tab-content>.tab-pane.active {
overflow-x: hidden;
}
......@@ -267,40 +276,40 @@
cursor: pointer;
}
.query-builder .rule-container .rule-value-container {
.query-builder {
.rule-container .rule-value-container {
display: inline-block !important;
}
.rules-group-header .btn-group.pull-right.group-actions {
float: left !important;
}
.query-builder .rules-list>:first-child::before {
}
.rules-list>:first-child::before {
top: -8px;
}
.query-builder .rules-group-header .btn-group.group-conditions label {
}
.rules-group-header .btn-group.group-conditions label {
display: none;
}
.rule-value-container input {
padding: 6px 12px !important;
}
}
.query-builder .rule-value-container input {
padding: 6px 12px !important;
.rules-group-header .btn-group.pull-right.group-actions {
float: left !important;
}
div.columnmanager-visibilitycontrol {
width: auto;
margin-bottom: 5px;
&.open .btn-atlasAction {
background-color: #37bb9b;
color: #fff;
}
}
.columnmanager-dropdown-container > li > span.column-label {
width: auto;
}
div.columnmanager-dropdown-container.open {
div.columnmanager-dropdown-container {
&.open {
overflow: auto;
}
.columnmanager-visibilitycontrol.open .btn-atlasAction {
background-color: #37bb9b;
color: #fff;
}
>li>span.column-label {
width: auto;
}
}
\ No newline at end of file
......@@ -20,7 +20,7 @@
/* panel.scss */
.panel-default {
> .panel-heading {
>.panel-heading {
color: $color_jungle_green_approx;
background: $white;
border-color: $color_jungle_green_approx;
......@@ -35,7 +35,7 @@
}
}
.nav-tabs {
> li {
>li {
&.active {
>a {
color: $color_jungle_green_approx;
......@@ -53,9 +53,9 @@
//overflow: hidden;
height: calc(100% - 46px)!important;
}
.ui-resizable-handle{
.ui-resizable-handle {
display: none !important;
}
}
}
.nav-tabs {
......@@ -68,8 +68,9 @@
.with-nav-tabs {
.tab-content {
> .tab-pane.active {
>.tab-pane.active {
padding: 20px 10px 0px 10px;
min-height: 50px;
}
}
}
\ No newline at end of file
......@@ -53,6 +53,9 @@ define([
'enumDefCollection': this.enumDefCollection,
'classificationDefCollection': this.classificationDefCollection
}
this.sharedObj = {
searchTableColumns: {}
}
},
bindCommonEvents: function() {
var that = this;
......@@ -237,7 +240,7 @@ define([
App.rSideNav.show(new SideNavLayoutView(
_.extend({
'searchVent': that.searchVent
}, that.preFetchedCollectionLists)
}, that.preFetchedCollectionLists, that.sharedObj)
));
} else {
App.rSideNav.currentView.selectTab();
......@@ -253,7 +256,7 @@ define([
'value': paramObj,
'initialView': true,
'searchVent': that.searchVent
}, that.preFetchedCollectionLists)
}, that.preFetchedCollectionLists, that.sharedObj)
));
} else {
App.rNContent.$el.html("");
......@@ -276,18 +279,22 @@ define([
_.extend({
'value': paramObj,
'searchVent': that.searchVent
}, that.preFetchedCollectionLists)
}, that.preFetchedCollectionLists, that.sharedObj)
));
} else {
App.rSideNav.currentView.RSearchLayoutView.currentView.manualRender(paramObj);
}
App.rSideNav.currentView.selectTab();
var isinitialView = true;
if (paramObj) {
isinitialView = (paramObj.type || (paramObj.dslChecked == "true" ? "" : paramObj.tag) || (paramObj.query ? paramObj.query.trim() : "")).length === 0;
}
App.rNContent.show(new SearchDetailLayoutView(
_.extend({
'value': paramObj,
'searchVent': that.searchVent,
'initialView': (paramObj.type || (paramObj.dslChecked == "true" ? "" : paramObj.tag) || (paramObj.query ? paramObj.query.trim() : "")).length === 0
}, that.preFetchedCollectionLists)
'initialView': isinitialView,
}, that.preFetchedCollectionLists, that.sharedObj)
));
});
},
......
......@@ -35,7 +35,7 @@
</div>
<div class="position-relative thick-border">
<div data-id="r_tableList" class="table-responsive tableBorder"> </div>
<div data-id="r_tableSpinner" class="fontLoader">
<div data-id="r_tableSpinner" class="fontLoader for-ignore">
<i class="fa fa-refresh fa-spin-custom"></i>
</div>
</div>
......
......@@ -82,46 +82,46 @@
<div class="row">
<div class="col-md-12">
<ul class="nav nav-tabs ">
<li role="presentation" class="tab active"><a href="#tab-details" aria-controls="tab-details" role="tab" data-toggle="tab">Properties</a></li>
<li role="presentation"><a href="#tab-tagTable" aria-controls="tab-tagTable" role="tab" data-toggle="tab">Tags</a></li>
<li role="properties" class="tab active"><a href="#tab-details" aria-controls="tab-details" role="tab" data-toggle="tab">Properties</a></li>
<li role="tags"><a href="#tab-tagTable" aria-controls="tab-tagTable" role="tab" data-toggle="tab">Tags</a></li>
{{#if taxonomy}}
<li role="presentation"><a href="#tab-termTable" aria-controls="tab-termTable" role="tab" data-toggle="tab">Terms</a></li>
<li role="terms"><a href="#tab-termTable" aria-controls="tab-termTable" role="tab" data-toggle="tab">Terms</a></li>
{{/if}}
<li role="presentation" class="tab"><a href="#tab-audit" aria-controls="tab-audit" role="tab" data-toggle="tab">Audits</a></li>
<li role="presentation" class="tab schemaTable" style="display:none"><a href="#tab-schema" aria-controls="tab-schema" role="tab" data-toggle="tab">Schema</a></li>
<li role="audits" class="tab"><a href="#tab-audit" aria-controls="tab-audit" role="tab" data-toggle="tab">Audits</a></li>
<li role="schema" class="tab schemaTable" style="display:none"><a href="#tab-schema" aria-controls="tab-schema" role="tab" data-toggle="tab">Schema</a></li>
</ul>
</div>
</div>
<div class="tab-content">
<div id="tab-details" role="tabpanel" class="tab-pane active">
<div id="tab-details" role="properties" class="tab-pane active">
<div id="r_entityDetailTableLayoutView" style="position: relative;">
<div class="fontLoader">
<i class="fa fa-refresh fa-spin-custom"></i>
</div>
</div>
</div>
<div id="tab-tagTable" role="tabpanel" class="tab-pane fade">
<div id="tab-tagTable" role="tags" class="tab-pane fade">
<div id="r_tagTableLayoutView" style="position: relative;">
<div class="fontLoader">
<i class="fa fa-refresh fa-spin-custom"></i>
</div>
</div>
</div>
<div id="tab-termTable" role="tabpanel" class="tab-pane">
<div id="tab-termTable" role="terms" class="tab-pane">
<div id="r_termTableLayoutView" style="position: relative;">
<div class="fontLoader">
<i class="fa fa-refresh fa-spin-custom"></i>
</div>
</div>
</div>
<div id="tab-audit" role="tabpanel" class="tab-pane">
<div id="tab-audit" role="audits" class="tab-pane">
<div id="r_auditTableLayoutView" style="position: relative;">
<div class="fontLoader">
<i class="fa fa-refresh fa-spin-custom"></i>
</div>
</div>
</div>
<div id="tab-schema" role="tabpanel" class="tab-pane">
<div id="tab-schema" role="schema" class="tab-pane">
<div id="r_schemaTableLayoutView" style="position: relative;">
<div class="fontLoader">
<i class="fa fa-refresh fa-spin-custom"></i>
......
......@@ -17,7 +17,7 @@
<div class="">
<div class="tableOverlay"></div>
<!-- Not for table Loader its only for initial loading -->
<div class="fontLoader">
<div class="fontLoader" style="z-index:999">
<i class="fa fa-refresh fa-spin-custom"></i>
</div>
<div class="ellipsis" style="display: none;"><span class="searchResult" style=" font-size: 16px;"></span>
......@@ -26,7 +26,7 @@
</div>
<div class="searchTable">
<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" />
<input type="checkbox" id="inputLabel" class="checkbox-inline" name="queryType" name="check" data-id="checkDeletedEntity" />
<label class="checkbox-inline" for="inputLabel">
<b>Include historical entities</b></label>
</div>
......@@ -53,3 +53,6 @@
</div>
</div>
</div>
<div class="text-center" data-id="columnEmptyInfo" style="display: none;">
<h4>Please select one/more column to see the data</h4>
</div>
\ No newline at end of file
......@@ -170,7 +170,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
var fetch = true;
var fetchId = (_.isObject(id) ? id.id : id);
fetchInputOutputValue(fetchId);
tempLink += '<div data-id="' + fetchId + '"></div>';
tempLink += '<div data-id="' + fetchId + '"><div class="value-loader"></div></div>';
} else {
tempLink += '<a href="#!/detailPage/' + id + '">' + name + '</a>'
}
......@@ -214,7 +214,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
}
}
if (isTable) {
table += '<tr><td>' + _.escape(key) + '</td><td>' + (_.isObject(valueObject[key]) ? keyValue : _.escape(keyValue)) + '</td></tr>';
table += '<tr><td>' + _.escape(key) + '</td><td><div ' + (_.isObject(valueObject[key]) ? 'class="scroll-y"' : '') + '>' + (_.isObject(valueObject[key]) ? keyValue : _.escape(keyValue)) + '</div></td></tr>';
} else {
table += '<div>' + (_.isObject(valueObject[key]) ? keyValue : _.escape(keyValue)) + '</div>';
}
......
......@@ -131,6 +131,8 @@ define(['require',
includeOverlayLoader: false,
includeTableLoader: true,
/** ui events hash */
events: function() {
......@@ -146,7 +148,7 @@ define(['require',
initialize: function(options) {
_.extend(this, _.pick(options, 'collection', 'columns', 'includePagination',
'includeHeaderSearch', 'includeFilter', 'includePageSize',
'includeFooterRecords', 'includeColumnManager', 'includeSizeAbleColumns', 'includeOrderAbleColumns', 'includeOverlayLoader'));
'includeFooterRecords', 'includeColumnManager', 'includeSizeAbleColumns', 'includeOrderAbleColumns', 'includeOverlayLoader', 'includeTableLoader'));
_.extend(this.gridOpts, options.gridOpts, { collection: this.collection, columns: this.columns });
_.extend(this.filterOpts, options.filterOpts);
......@@ -160,14 +162,20 @@ define(['require',
/** all events binding here */
bindEvents: function() {
this.listenTo(this.collection, 'request', function() {
if (this.includeTableLoader) {
this.$('div[data-id="r_tableSpinner"]').addClass('show');
}
if (this.includeOverlayLoader) {
this.$('.t_tableOverlay').addClass('fontLoader');
this.$('.t_tableOverlay').show();
}
}, this);
this.listenTo(this.collection, 'sync error', function() {
if (this.includeTableLoader) {
this.$('div[data-id="r_tableSpinner"]').removeClass('show');
}
if (this.includeOverlayLoader) {
this.$('.t_tableOverlay').removeClass('fontLoader');
this.$('.t_tableOverlay').hide();
}
}, this);
......
......@@ -45,8 +45,25 @@ define(['require',
that = this;
events["click " + this.ui.tabs] = function(e) {
var urlString = "",
elementName = $(e.currentTarget).data();
var tabStateUrls = Globals.saveApplicationState.tabState;
elementName = $(e.currentTarget).data(),
tabStateUrls = Globals.saveApplicationState.tabState,
urlStateObj = Utils.getUrlState,
hashUrl = Utils.getUrlState.getQueryUrl().hash;
if (urlStateObj.isTagTab()) {
if (hashUrl != tabStateUrls.tagUrl) {
Globals.saveApplicationState.tabState.tagUrl = hashUrl;
}
} else if (urlStateObj.isSearchTab()) {
if (hashUrl != tabStateUrls.searchUrl) {
Globals.saveApplicationState.tabState.searchUrl = hashUrl;
}
} else if (urlStateObj.isTaxonomyTab()) {
if (hashUrl != tabStateUrls.taxonomyUrl) {
Globals.saveApplicationState.tabState.isTaxonomyTab = hashUrl;
}
}
if (elementName.name == "tab-tag") {
urlString = tabStateUrls.tagUrl; //'#!/tag';
} else if (elementName.name == "tab-taxonomy") {
......@@ -66,7 +83,7 @@ define(['require',
return events;
},
initialize: function(options) {
_.extend(this, _.pick(options, 'url', 'value', 'tag', 'selectFirst', 'classificationDefCollection', 'typeHeaders', 'searchVent', 'entityDefCollection', 'enumDefCollection'));
_.extend(this, _.pick(options, 'url', 'value', 'tag', 'selectFirst', 'classificationDefCollection', 'typeHeaders', 'searchVent', 'entityDefCollection', 'enumDefCollection', 'searchTableColumns'));
if (Globals.taxonomy) {
this.tabClass = "tab col-sm-4";
} else {
......@@ -110,7 +127,8 @@ define(['require',
typeHeaders: that.typeHeaders,
entityDefCollection: that.entityDefCollection,
enumDefCollection: that.enumDefCollection,
classificationDefCollection: that.classificationDefCollection
classificationDefCollection: that.classificationDefCollection,
searchTableColumns: that.searchTableColumns
}));
});
},
......
......@@ -53,7 +53,7 @@ define(['require',
var VCommonModel = new VCommon();
VCommonModel.aboutUs(url, {
success: function(data) {
var str = "<b>Version : </b>" + data.Version;
var str = "<b>Version : </b>" + _.escape(data.Version);
that.ui.atlasVersion.html(str);
},
complete: function() {}
......
......@@ -112,6 +112,9 @@ define(['require',
this.listenTo(this.collection, 'reset', function() {
this.entityObject = this.collection.first().toJSON();
var collectionJSON = this.entityObject.entity;
// MergerRefEntity.
Utils.findAndMergeRefEntity(collectionJSON.attributes, this.entityObject.referredEntities);
if (collectionJSON && collectionJSON.guid) {
var tagGuid = collectionJSON.guid;
this.readOnly = Enums.entityStateReadOnly[collectionJSON.status];
......@@ -162,20 +165,29 @@ define(['require',
this.ui.editButton.show();
}
}
if (collectionJSON.attributes && collectionJSON.attributes.columns) {
var valueSorted = _.sortBy(collectionJSON.attributes.columns, function(val) {
return val.attributes.position
});
collectionJSON.attributes.columns = valueSorted;
}
}
this.hideLoader();
var obj = {
entity: collectionJSON,
referredEntities: this.entityObject.referredEntities,
guid: this.id,
entityName: this.name,
typeHeaders: this.typeHeaders,
entityDefCollection: this.entityDefCollection,
fetchCollection: this.fetchCollection.bind(that),
enumDefCollection: this.enumDefCollection,
classificationDefCollection: this.classificationDefCollection
classificationDefCollection: this.classificationDefCollection,
attributeDefs: (function() {
return that.getEntityDef(collectionJSON);
})()
}
this.getEntityDef(obj);
this.renderEntityDetailTableLayoutView(obj);
this.renderAuditTableLayoutView(obj);
this.renderTagTableLayoutView(obj);
this.renderTermTableLayoutView(_.extend({}, obj, { term: true }));
// To render Schema check attribute "schemaElementsAttribute"
......@@ -241,16 +253,14 @@ define(['require',
fetchCollection: function() {
this.collection.fetch({ reset: true });
},
getEntityDef: function(obj) {
var data = this.entityDefCollection.fullCollection.findWhere({ name: obj.entity.typeName }).toJSON();
getEntityDef: function(entityObj) {
var data = this.entityDefCollection.fullCollection.findWhere({ name: entityObj.typeName }).toJSON();
var attributeDefs = Utils.getNestedSuperTypeObj({
data: data,
attrMerge: true,
collection: this.entityDefCollection
});
obj['attributeDefs'] = attributeDefs;
this.renderEntityDetailTableLayoutView(obj);
this.renderAuditTableLayoutView(obj);
return attributeDefs;
},
onClickTagCross: function(e) {
var tagName = $(e.currentTarget).parent().text(),
......
......@@ -20,9 +20,8 @@ define(['require',
'backbone',
'hbs!tmpl/entity/EntityDetailTableLayoutView_tmpl',
'utils/CommonViewFunction',
'models/VEntity',
'utils/Utils'
], function(require, Backbone, EntityDetailTableLayoutView_tmpl, CommonViewFunction, VEntity, Utils) {
'models/VEntity'
], function(require, Backbone, EntityDetailTableLayoutView_tmpl, CommonViewFunction, VEntity) {
'use strict';
var EntityDetailTableLayoutView = Backbone.Marionette.LayoutView.extend(
......@@ -49,7 +48,7 @@ define(['require',
* @constructs
*/
initialize: function(options) {
_.extend(this, _.pick(options, 'entity', 'referredEntities', 'typeHeaders', 'attributeDefs'));
_.extend(this, _.pick(options, 'entity', 'typeHeaders', 'attributeDefs', 'attributes'));
this.entityModel = new VEntity({});
},
bindEvents: function() {},
......@@ -57,17 +56,8 @@ define(['require',
this.entityTableGenerate();
},
entityTableGenerate: function() {
var that = this,
attributeObject = this.entity.attributes;
Utils.findAndMergeRefEntity(attributeObject, that.referredEntities);
if (attributeObject && attributeObject.columns) {
var valueSorted = _.sortBy(attributeObject.columns, function(val) {
return val.attributes.position
});
attributeObject.columns = valueSorted;
}
var table = CommonViewFunction.propertyTable({ scope: this, valueObject: attributeObject, attributeDefs: this.attributeDefs });
that.ui.detailValue.append(table);
var table = CommonViewFunction.propertyTable({ scope: this, valueObject: this.entity.attributes, attributeDefs: this.attributeDefs });
this.ui.detailValue.append(table);
}
});
return EntityDetailTableLayoutView;
......
......@@ -94,7 +94,7 @@ define(['require',
* @constructs
*/
initialize: function(options) {
_.extend(this, _.pick(options, 'guid', 'entityDefCollection', 'attribute', 'referredEntities', 'fetchCollection', 'enumDefCollection'));
_.extend(this, _.pick(options, 'guid', 'entityDefCollection', 'attribute', 'fetchCollection', 'enumDefCollection'));
this.schemaCollection = new VSchemaList([], {});
this.commonTableOptions = {
collection: this.schemaCollection,
......@@ -166,15 +166,11 @@ define(['require',
}
}
_.each(this.attribute, function(obj) {
newModel = that.referredEntities[obj.guid];
if (newModel.attributes['position']) {
newModel['position'] = newModel.attributes['position'];
}
if (!Enums.entityStateReadOnly[newModel.status]) {
that.activeObj.push(newModel);
that.schemaCollection.push(newModel);
} else if (Enums.entityStateReadOnly[newModel.status]) {
that.deleteObj.push(newModel);
if (!Enums.entityStateReadOnly[obj.status]) {
that.activeObj.push(obj);
that.schemaCollection.push(obj);
} else if (Enums.entityStateReadOnly[obj.status]) {
that.deleteObj.push(obj);
}
});
$('body').click(function(e) {
......
......@@ -43,7 +43,7 @@ define(['require',
* @constructs
*/
initialize: function(options) {
_.extend(this, _.pick(options, 'value', 'initialView', 'entityDefCollection', 'typeHeaders', 'searchVent', 'enumDefCollection'));
_.extend(this, _.pick(options, 'value', 'initialView', 'entityDefCollection', 'typeHeaders', 'searchVent', 'enumDefCollection', 'searchTableColumns'));
},
bindEvents: function() {},
onRender: function() {
......@@ -51,19 +51,9 @@ define(['require',
},
renderSearchResultLayoutView: function() {
var that = this;
require(['views/search/SearchResultLayoutView'], function(SearchResultLayoutView) {
if (that.RSearchResultLayoutView) {
that.RSearchResultLayoutView.show(new SearchResultLayoutView({
value: that.value,
tag: that.tag,
initialView: that.initialView,
entityDefCollection: that.entityDefCollection,
typeHeaders: that.typeHeaders,
searchVent: that.searchVent,
enumDefCollection: that.enumDefCollection
}));
that.RSearchResultLayoutView.show(new SearchResultLayoutView(that.options));
}
});
}
......
......@@ -81,7 +81,7 @@ define(['require',
* @constructs
*/
initialize: function(options) {
_.extend(this, _.pick(options, 'value', 'typeHeaders', 'searchVent', 'entityDefCollection', 'enumDefCollection', 'classificationDefCollection'));
_.extend(this, _.pick(options, 'value', 'typeHeaders', 'searchVent', 'entityDefCollection', 'enumDefCollection', 'classificationDefCollection', 'searchTableColumns'));
this.type = "basic";
var param = Utils.getUrlState.getQueryParams();
this.query = {
......@@ -94,7 +94,8 @@ define(['require',
type: null,
typeFilter: null,
tagFilter: null,
tag: null
tag: null,
attributes: null
}
};
if (!this.value) {
......@@ -244,7 +245,8 @@ define(['require',
type: null,
tag: null,
entityFilters: null,
tagFilters: null
tagFilters: null,
attributes: null
}), param);
},
fetchCollection: function(value) {
......@@ -389,9 +391,9 @@ define(['require',
if (this.dsl) {
params['attributes'] = null;
} else {
var columnList = JSON.parse(Utils.localStorage.getValue('columnList'));
var columnList = this.value && this.value.type && this.searchTableColumns ? this.searchTableColumns[this.value.type] : null;
if (columnList) {
params['attributes'] = columnList[this.query[this.type].type];
params['attributes'] = columnList.join(',');
} else {
params['attributes'] = null;
}
......@@ -408,7 +410,7 @@ define(['require',
});
},
dslFulltextToggle: function(e) {
var paramQuery = "";
var paramObj = Utils.getUrlState.getQueryParams();
if (e.currentTarget.checked) {
this.type = "dsl";
this.dsl = true;
......@@ -422,8 +424,11 @@ define(['require',
this.dsl = false;
this.type = "basic";
}
if (Utils.getUrlState.getQueryParams() && this.type == Utils.getUrlState.getQueryParams().searchType) {
this.updateQueryObject(Utils.getUrlState.getQueryParams());
if (paramObj && this.type == paramObj.searchType) {
this.updateQueryObject(paramObj);
}
if (this.type == "basic") {
this.query[this.type].attribute = paramObj.attributes ? paramObj.attributes : null;
}
Utils.setUrl({
url: '#!/search/searchResult',
......
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