This is an automated email from the ASF dual-hosted git repository. pinal pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/atlas.git
commit 23d5ef44807b21c78673d8f18dca53951688e6f7 Author: prasad pawar <prasad.pa...@freestoneinfotech.com> AuthorDate: Thu Sep 23 14:18:59 2021 +0530 ATLAS-4427:#1:UI: (New UI) Refresh button inside advanced DSL search popup box should refresh the types list,fixed Signed-off-by: Pinal Shah <pinal.s...@freestoneinfotech.com> --- dashboardv3/public/css/scss/override.scss | 29 +++++++++++------ .../js/templates/search/SearchLayoutView_tmpl.html | 12 ++++---- .../js/views/search/AdvanceSearchLayoutView.js | 36 ++++++---------------- 3 files changed, 35 insertions(+), 42 deletions(-) diff --git a/dashboardv3/public/css/scss/override.scss b/dashboardv3/public/css/scss/override.scss index 2c3ea78..0960f43 100644 --- a/dashboardv3/public/css/scss/override.scss +++ b/dashboardv3/public/css/scss/override.scss @@ -258,20 +258,11 @@ overflow: initial; } -.tab-content>.tab-pane.active.debug-metrics { - padding: 5px 20px 15px 20px; -} - .advancedInfo { margin-left: 5px; cursor: pointer; } -.metricsUIInfo { - font-size: 20px !important; - margin-right: 5px; -} - .query-builder { .rule-container { margin: 6px 0; @@ -583,4 +574,24 @@ div.columnmanager-dropdown-container { .modal-content { border-radius: 0px !important; } +} + +.typeFilter-container { + width: 100%; + + .typeFilter { + width: calc(100% - 45px); + display: inline-block; + } +} + +.refreshBtn-container { + display: inline-block; + position: absolute; + padding-left: 8px; + + .btn-action { + margin: 0px !important; + font-size: 15px; + } } \ No newline at end of file diff --git a/dashboardv3/public/js/templates/search/SearchLayoutView_tmpl.html b/dashboardv3/public/js/templates/search/SearchLayoutView_tmpl.html index 8e0dc99..385718c 100644 --- a/dashboardv3/public/js/templates/search/SearchLayoutView_tmpl.html +++ b/dashboardv3/public/js/templates/search/SearchLayoutView_tmpl.html @@ -17,7 +17,7 @@ <div class="row row-margin-bottom"> <div class="col-sm-12" style="margin:15px 0px;"> <div class="row"> - <div class="col-sm-9" style="margin-top: 5px;"> + <div class="col-sm-12" style="margin-top: 5px;"> <!-- <span class="pull-left">Basic</span> <label class="switch pull-left"> <input type="checkbox" class="switch-input" name="queryType" value="text" /> @@ -26,19 +26,19 @@ <span class="pull-left">Advanced</span> <span class="advancedInfo" data-id="advancedInfo"><i class="fa fa-question-circle-o"></i></span> </div> - <div class="col-sm-3"> - <button type="button" class="btn btn-action btn-md pull-right typeLOV" title="Refresh" data-id="refreshBtn"><i class="fa fa-refresh"></i></button> - </div> </div> </div> <div class="col-sm-12 form-group"> <div class="form-group"> <div class="srchType clearfix"> <span class="srchTitle">Search By Type</span> - <div class=""> - <div class="col-sm-12 no-padding typeFilter"> + <div class="typeFilter-container"> + <div class="no-padding typeFilter"> <select data-id="typeLOV"></select> </div> + <div class="refreshBtn-container"> + <button type="button" class="btn btn-action btn-md pull-right typeLOV" title="Refresh" data-id="refreshBtn"><i class="fa fa-refresh"></i></button> + </div> <!-- <div class="col-sm-2 no-padding typeFilterBtn"> <button type="button" class="btn btn-action btn-md pull-right typeLOV active" title="Entity Attribute Filter" data-id="typeAttrFilter"><i class="fa fa-filter"></i></button> </div> --> diff --git a/dashboardv3/public/js/views/search/AdvanceSearchLayoutView.js b/dashboardv3/public/js/views/search/AdvanceSearchLayoutView.js index 1cbbed9..390a98f 100644 --- a/dashboardv3/public/js/views/search/AdvanceSearchLayoutView.js +++ b/dashboardv3/public/js/views/search/AdvanceSearchLayoutView.js @@ -54,8 +54,7 @@ define(['require', that = this; 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; + this.query[this.type].query = Globals.advanceSearchData.searchByQuery = e.currentTarget.value; if (code == 13) { that.findSearchResult(); this.getAdvanceSearchValues(); @@ -70,7 +69,7 @@ define(['require', $('.global-search-container').find("span[data-id='detailSearch']").on("click", function(e) { if (that.$el.height() === 0) { that.renderTypeTagList({ "filterList": Globals.advanceSearchData.filterTypeSelected, isTypeOnly: true }); - that.setAdvanceSeachValues(); + that.setAdvanceSearchValues(); } }); return events; @@ -130,7 +129,7 @@ define(['require', } } }, - setAdvanceSeachValues: function() { + setAdvanceSearchValues: function() { this.ui.typeLov.val(Globals.advanceSearchData.searchByType).trigger('change'); this.ui.searchInput.val(Globals.advanceSearchData.searchByQuery); }, @@ -143,6 +142,7 @@ define(['require', if (e.type == "change" && select2Data) { var value = (_.isEmpty(select2Data) ? select2Data : _.first(select2Data).id), key = "type"; + Globals.advanceSearchData.searchByType = value; value = value && value.length ? value : null; if (this.value) { //On Change handle @@ -197,11 +197,7 @@ define(['require', }, onRefreshButton: function() { this.fetchCollection(); - //to check url query param contain type or not - var checkURLValue = Utils.getUrlState.getQueryParams(this.url); - if (this.searchVent && (_.has(checkURLValue, "type") || _.has(checkURLValue, "query"))) { - this.searchVent.trigger('search:refresh'); - } + this.getAdvanceSearchValues(); }, advancedInfo: function(e) { require([ @@ -245,24 +241,10 @@ define(['require', setValues: function(paramObj) { var arr = [], that = this; - if (paramObj) { - this.value = paramObj; - } - if (this.value) { - this.ui.searchInput.val(this.value.query ? this.value.query : Globals.advanceSearchData.searchByQuery || ""); - this.ui.typeLov.val(this.value.type); - if (this.ui.typeLov.data('select2')) { - if (this.ui.typeLov.val() !== this.value.type) { - this.value.type = null; - this.ui.typeLov.val("").trigger("change", { 'manual': true }); - } else { - this.ui.typeLov.trigger("change", { 'manual': true }); - } - } - setTimeout(function() { - !that.isDestroyed && that.ui.searchInput.focus(); - }, 0); - } + this.setAdvanceSearchValues(); + setTimeout(function() { + !that.isDestroyed && that.ui.searchInput.focus(); + }, 0); }, renderTypeTagList: function(options) { var that = this;