Repository: atlas Updated Branches: refs/heads/master 79eed8c23 -> b7f623663
ATLAS-2538: UI - removed exclude-sub-type checkbox from classification search result page Signed-off-by: Madhan Neethiraj <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/b7f62366 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/b7f62366 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/b7f62366 Branch: refs/heads/master Commit: b7f623663b2d9299956d1a699b16ea38f965d0ff Parents: 79eed8c Author: pratik24mac <[email protected]> Authored: Fri Apr 6 18:07:52 2018 +0530 Committer: Madhan Neethiraj <[email protected]> Committed: Thu Apr 12 12:33:15 2018 -0700 ---------------------------------------------------------------------- dashboardv2/public/js/modules/Helpers.js | 7 +++++-- .../search/SearchResultLayoutView_tmpl.html | 18 ++++++++++-------- .../js/views/search/SearchResultLayoutView.js | 8 ++++++-- 3 files changed, 21 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/atlas/blob/b7f62366/dashboardv2/public/js/modules/Helpers.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/modules/Helpers.js b/dashboardv2/public/js/modules/Helpers.js index 3897d58..7393a79 100644 --- a/dashboardv2/public/js/modules/Helpers.js +++ b/dashboardv2/public/js/modules/Helpers.js @@ -55,7 +55,7 @@ define(['require', Handlebars.registerHelper('toHumanDate', function(val) { if (!val) return ""; - return val;//localization.formatDate(val, 'f'); + return val; //localization.formatDate(val, 'f'); }); Handlebars.registerHelper('tt', function(str) { //return localization.tt(str); @@ -67,6 +67,9 @@ define(['require', case '==': return (v1 == v2) ? options.fn(this) : options.inverse(this); break; + case '!==': + return (v1 !== v2) ? options.fn(this) : options.inverse(this); + break; case '===': return (v1 === v2) ? options.fn(this) : options.inverse(this); break; @@ -90,4 +93,4 @@ define(['require', }); return HHelpers; -}); +}); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/atlas/blob/b7f62366/dashboardv2/public/js/templates/search/SearchResultLayoutView_tmpl.html ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/templates/search/SearchResultLayoutView_tmpl.html b/dashboardv2/public/js/templates/search/SearchResultLayoutView_tmpl.html index fb9481a..b7302cd 100644 --- a/dashboardv2/public/js/templates/search/SearchResultLayoutView_tmpl.html +++ b/dashboardv2/public/js/templates/search/SearchResultLayoutView_tmpl.html @@ -31,28 +31,30 @@ <div class="col-sm-8 inline-content-fr no-padding-left"> <div class="inline" data-id="colManager"></div> <div class="inline" data-id="containerCheckBox" style="display: none;"> - <label class="checkbox-inline btn" for="inputLabel"> - <input type="checkbox" data-id="checkDeletedEntity" data-value="includeDE" /> + <label class="checkbox-inline btn" for="historicalentities"> + <input type="checkbox" data-id="checkDeletedEntity" data-value="includeDE" + id="historicalentities"/> <b>Show historical entities</b></label> </div> <div class="inline" data-id="containerCheckBox" style="display: none;"> - <label class="checkbox-inline btn" for="inputLabel"> - <input type="checkbox" data-id="checkSubClassification" data-value="excludeSC"/> + <label class="checkbox-inline btn" for="subclassifications"> + <input type="checkbox" data-id="checkSubClassification" data-value="excludeSC" id="subclassifications"/> <b>Exclude sub-classifications</b></label> </div> + {{#ifCond fromView '!==' "classification"}} <div class="inline" data-id="containerCheckBox" style="display: none;"> - <label class="checkbox-inline btn" for="inputLabel"> - <input type="checkbox" data-id="checkSubType" data-value="excludeST"/> + <label class="checkbox-inline btn" for="subtypes"> + <input type="checkbox" data-id="checkSubType" data-value="excludeST" id="subtypes"/> <b>Exclude sub-types</b></label> </div> + {{/ifCond}} <div class="inline"> <a href="javascript:void(0)" class=" multiSelectTag assignTag btn btn-action btn-sm" style="display:none" data-id="addAssignTag"><i class="fa fa-plus"></i> Assign Tag</a> </div> </div> </div> <div id="r_searchResultTableLayoutView"> - <h1><b>{{searchType}}</b></h1> - {{#if entityCreate}} + <h1><b>{{searchType}}</b></h1> {{#if entityCreate}} <div class="entityLink" style="display:none"> <p class="entityLink">Search Atlas for existing entities or <a href="javascript:void(0)" data-id='createEntity'> create new entity </a> http://git-wip-us.apache.org/repos/asf/atlas/blob/b7f62366/dashboardv2/public/js/views/search/SearchResultLayoutView.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/views/search/SearchResultLayoutView.js b/dashboardv2/public/js/views/search/SearchResultLayoutView.js index dc4f49a..6835f03 100644 --- a/dashboardv2/public/js/views/search/SearchResultLayoutView.js +++ b/dashboardv2/public/js/views/search/SearchResultLayoutView.js @@ -72,7 +72,8 @@ define(['require', templateHelpers: function() { return { entityCreate: Globals.entityCreate, - searchType: this.searchType + searchType: this.searchType, + fromView: this.fromView }; }, /** ui events hash */ @@ -451,7 +452,7 @@ define(['require', 'excludeDeletedEntities': (this.value.includeDE ? false : true), 'includeSubClassifications': (this.value.excludeSC ? false : true), 'includeSubTypes': (this.value.excludeST ? false : true), - 'includeClassificationAttributes' : true // server will return classication details with guid + 'includeClassificationAttributes': true // server will return classication details with guid } } if (value) { @@ -527,6 +528,9 @@ define(['require', var table = new TableLayout(_.extend({}, that.commonTableOptions, { columns: columns })); + if (!that.REntityTableLayoutView) { + return; + } that.REntityTableLayoutView.show(table); if (that.value.searchType !== "dsl") { that.ui.containerCheckBox.show();
