Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7C002200B58 for ; Wed, 13 Jul 2016 07:29:11 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 7A7DB160A75; Wed, 13 Jul 2016 05:29:11 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 02A74160A56 for ; Wed, 13 Jul 2016 07:29:09 +0200 (CEST) Received: (qmail 51936 invoked by uid 500); 13 Jul 2016 05:29:09 -0000 Mailing-List: contact commits-help@atlas.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@atlas.incubator.apache.org Delivered-To: mailing list commits@atlas.incubator.apache.org Received: (qmail 51927 invoked by uid 99); 13 Jul 2016 05:29:09 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Jul 2016 05:29:09 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 319BC1A5D11 for ; Wed, 13 Jul 2016 05:29:08 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.646 X-Spam-Level: X-Spam-Status: No, score=-4.646 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.426] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id RolKHGmDpkeB for ; Wed, 13 Jul 2016 05:29:04 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id A31255F253 for ; Wed, 13 Jul 2016 05:29:02 +0000 (UTC) Received: (qmail 51834 invoked by uid 99); 13 Jul 2016 05:29:01 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Jul 2016 05:29:01 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id AD066E2EF4; Wed, 13 Jul 2016 05:29:01 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: shwethags@apache.org To: commits@atlas.incubator.apache.org Date: Wed, 13 Jul 2016 05:29:02 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [2/2] incubator-atlas git commit: ATLAS-1004 Option to enable taxonomy feature (kevalbhatt18 via shwethags) archived-at: Wed, 13 Jul 2016 05:29:11 -0000 ATLAS-1004 Option to enable taxonomy feature (kevalbhatt18 via shwethags) Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/079ce35e Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/079ce35e Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/079ce35e Branch: refs/heads/master Commit: 079ce35ef2604a8f6eff35c698a38052009792df Parents: 80051c9 Author: Shwetha GS Authored: Wed Jul 13 10:21:46 2016 +0530 Committer: Shwetha GS Committed: Wed Jul 13 10:21:46 2016 +0530 ---------------------------------------------------------------------- dashboardv2/public/css/scss/loader.scss | 11 ---- dashboardv2/public/css/scss/theme.scss | 3 + dashboardv2/public/js/main.js | 4 +- dashboardv2/public/js/router/Router.js | 60 ++++++++++++------- .../SideNavLayoutView_tmpl.html | 10 ++-- .../js/templates/common/TableLayout_tmpl.html | 4 +- .../detail_page/DetailPageLayoutView_tmpl.html | 5 +- .../templates/graph/LineageLayoutView_tmpl.html | 6 +- .../schema/SchemaTableLayoutView_tmpl.html | 3 - dashboardv2/public/js/utils/TableLayout.js | 6 +- dashboardv2/public/js/utils/Utils.js | 3 + .../views/business_catalog/SideNavLayoutView.js | 21 +++++-- .../views/detail_page/DetailPageLayoutView.js | 5 ++ .../public/js/views/schema/SchemaLayoutView.js | 55 +++++++++-------- .../js/views/search/SearchResultLayoutView.js | 62 +++++++++++--------- .../public/js/views/tag/TagLayoutView.js | 25 ++++---- distro/src/conf/atlas-application.properties | 3 + release-log.txt | 1 + .../atlas/web/resources/AdminResource.java | 8 ++- 19 files changed, 177 insertions(+), 118 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/079ce35e/dashboardv2/public/css/scss/loader.scss ---------------------------------------------------------------------- diff --git a/dashboardv2/public/css/scss/loader.scss b/dashboardv2/public/css/scss/loader.scss index d668c38..ad9bb6f 100644 --- a/dashboardv2/public/css/scss/loader.scss +++ b/dashboardv2/public/css/scss/loader.scss @@ -45,17 +45,6 @@ } } -.loader { - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; - text-align: center; - z-index: 9; - background: $white_80 $url_0 no-repeat center center; -} - .fontLoader { top: 50%; left: 50%; http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/079ce35e/dashboardv2/public/css/scss/theme.scss ---------------------------------------------------------------------- diff --git a/dashboardv2/public/css/scss/theme.scss b/dashboardv2/public/css/scss/theme.scss index 2577cfc..80ed9f2 100644 --- a/dashboardv2/public/css/scss/theme.scss +++ b/dashboardv2/public/css/scss/theme.scss @@ -132,3 +132,6 @@ color: $color_jungle_green_approx; } } +.position-relative{ + position:relative; +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/079ce35e/dashboardv2/public/js/main.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/main.js b/dashboardv2/public/js/main.js index 552d906..a1a9ae1 100644 --- a/dashboardv2/public/js/main.js +++ b/dashboardv2/public/js/main.js @@ -155,8 +155,10 @@ require(['App', Globals.userLogedIn.status = true; Globals.userLogedIn.response = response; } + if (response && response['atlas.feature.taxonomy.enable'] !== undefined) { + Globals.taxonomy = response['atlas.feature.taxonomy.enable'] + } App.start(); } }); - }); http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/079ce35e/dashboardv2/public/js/router/Router.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/router/Router.js b/dashboardv2/public/js/router/Router.js index 83e1d24..0841a4c 100644 --- a/dashboardv2/public/js/router/Router.js +++ b/dashboardv2/public/js/router/Router.js @@ -104,22 +104,26 @@ define([ 'views/business_catalog/SideNavLayoutView', 'collection/VCatalogList' ], function(BusinessCatalogHeader, BusinessCatalogDetailLayoutView, SideNavLayoutView, VCatalogList) { - var paramObj = Utils.getUrlState.getQueryParams(); - this.collection = new VCatalogList(); - this.collection.url = url; - App.rNHeader.show(new BusinessCatalogHeader({ 'globalVent': that.globalVent, 'url': url, 'collection': this.collection })); - if (!App.rSideNav.currentView) { - App.rSideNav.show(new SideNavLayoutView({ 'globalVent': that.globalVent, 'url': url })); + if (Globals.taxonomy) { + var paramObj = Utils.getUrlState.getQueryParams(); + this.collection = new VCatalogList(); + this.collection.url = url; + App.rNHeader.show(new BusinessCatalogHeader({ 'globalVent': that.globalVent, 'url': url, 'collection': this.collection })); + if (!App.rSideNav.currentView) { + App.rSideNav.show(new SideNavLayoutView({ 'globalVent': that.globalVent, 'url': url })); + } else { + App.rSideNav.currentView.RBusinessCatalogLayoutView.currentView.manualRender("/" + url); + App.rSideNav.currentView.selectTab(); + } + App.rNContent.show(new BusinessCatalogDetailLayoutView({ + 'globalVent': that.globalVent, + 'url': url, + 'collection': this.collection + })); + this.collection.fetch({ reset: true }); } else { - App.rSideNav.currentView.RBusinessCatalogLayoutView.currentView.manualRender("/" + url); - App.rSideNav.currentView.selectTab(); + that.defaultAction() } - App.rNContent.show(new BusinessCatalogDetailLayoutView({ - 'globalVent': that.globalVent, - 'url': url, - 'collection': this.collection - })); - this.collection.fetch({ reset: true }); }); }, detailPage: function(id) { @@ -228,14 +232,26 @@ define([ }, defaultAction: function(actions) { // We have no matching route, lets just log what the URL was - Utils.setUrl({ - url: '#!/taxonomy', - mergeBrowserUrl: false, - updateTabState: function() { - return { taxonomyUrl: this.url, stateChanged: false }; - }, - trigger: true - }); + if (Globals.taxonomy) { + Utils.setUrl({ + url: '#!/taxonomy', + mergeBrowserUrl: false, + updateTabState: function() { + return { taxonomyUrl: this.url, stateChanged: false }; + }, + trigger: true + }); + } else { + Utils.setUrl({ + url: '#!/tag', + mergeBrowserUrl: false, + updateTabState: function() { + return { tagUrl: this.url, stateChanged: false }; + }, + trigger: true + }); + } + console.log('No route:', actions); } }); http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/079ce35e/dashboardv2/public/js/templates/business_catalog/SideNavLayoutView_tmpl.html ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/templates/business_catalog/SideNavLayoutView_tmpl.html b/dashboardv2/public/js/templates/business_catalog/SideNavLayoutView_tmpl.html index 6d504ba..38f76ff 100644 --- a/dashboardv2/public/js/templates/business_catalog/SideNavLayoutView_tmpl.html +++ b/dashboardv2/public/js/templates/business_catalog/SideNavLayoutView_tmpl.html @@ -19,16 +19,18 @@ Apache Atlas
-
+
-
+
+ +
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/079ce35e/dashboardv2/public/js/templates/detail_page/DetailPageLayoutView_tmpl.html ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/templates/detail_page/DetailPageLayoutView_tmpl.html b/dashboardv2/public/js/templates/detail_page/DetailPageLayoutView_tmpl.html index 1083b34..d8199b2 100644 --- a/dashboardv2/public/js/templates/detail_page/DetailPageLayoutView_tmpl.html +++ b/dashboardv2/public/js/templates/detail_page/DetailPageLayoutView_tmpl.html @@ -33,13 +33,14 @@
-
+
{{#if taxonomy}} Terms:
+ {{/if}}
@@ -61,7 +62,9 @@
  • Tags
  • + {{#if taxonomy}}
  • Terms
  • + {{/if}} http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/079ce35e/dashboardv2/public/js/templates/graph/LineageLayoutView_tmpl.html ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/templates/graph/LineageLayoutView_tmpl.html b/dashboardv2/public/js/templates/graph/LineageLayoutView_tmpl.html index 8ab545e..26d27b3 100644 --- a/dashboardv2/public/js/templates/graph/LineageLayoutView_tmpl.html +++ b/dashboardv2/public/js/templates/graph/LineageLayoutView_tmpl.html @@ -17,13 +17,13 @@ -
    - -
    +
    + +
    http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/079ce35e/dashboardv2/public/js/templates/schema/SchemaTableLayoutView_tmpl.html ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/templates/schema/SchemaTableLayoutView_tmpl.html b/dashboardv2/public/js/templates/schema/SchemaTableLayoutView_tmpl.html index 5caa3ea..d648009 100644 --- a/dashboardv2/public/js/templates/schema/SchemaTableLayoutView_tmpl.html +++ b/dashboardv2/public/js/templates/schema/SchemaTableLayoutView_tmpl.html @@ -14,8 +14,5 @@ * See the License for the specific language governing permissions and * limitations under the License. --> -
    - -
    http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/079ce35e/dashboardv2/public/js/utils/TableLayout.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/utils/TableLayout.js b/dashboardv2/public/js/utils/TableLayout.js index 6528193..4f5e142 100644 --- a/dashboardv2/public/js/utils/TableLayout.js +++ b/dashboardv2/public/js/utils/TableLayout.js @@ -16,7 +16,7 @@ * limitations under the License. */ - /** +/** * @file This is the common View file for displaying Table/Grid to be used overall in the application. */ define(['require', @@ -154,10 +154,10 @@ define(['require', /** all events binding here */ bindEvents: function() { this.listenTo(this.collection, 'request', function() { - this.$('div[data-id="r_tableSpinner"]').addClass('loading'); + this.$('div[data-id="r_tableSpinner"]').addClass('show'); }, this); this.listenTo(this.collection, 'sync error', function() { - this.$('div[data-id="r_tableSpinner"]').removeClass('loading'); + this.$('div[data-id="r_tableSpinner"]').removeClass('show'); }, this); this.listenTo(this.collection, 'reset', function(collection, response) { http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/079ce35e/dashboardv2/public/js/utils/Utils.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/utils/Utils.js b/dashboardv2/public/js/utils/Utils.js index 8e33ef9..01e5c30 100644 --- a/dashboardv2/public/js/utils/Utils.js +++ b/dashboardv2/public/js/utils/Utils.js @@ -196,6 +196,9 @@ define(['require', 'utils/Globals'], function(require, Globals) { isSearchTab: function() { return this.getQueryUrl().firstValue == "search" ? true : false; }, + isDetailPage: function() { + return this.getQueryUrl().firstValue == "detailPage" ? true : false; + }, getLastValue: function() { return this.getQueryUrl().lastValue; }, http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/079ce35e/dashboardv2/public/js/views/business_catalog/SideNavLayoutView.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/views/business_catalog/SideNavLayoutView.js b/dashboardv2/public/js/views/business_catalog/SideNavLayoutView.js index 5837006..c4cfb33 100644 --- a/dashboardv2/public/js/views/business_catalog/SideNavLayoutView.js +++ b/dashboardv2/public/js/views/business_catalog/SideNavLayoutView.js @@ -34,6 +34,12 @@ define(['require', ui: { tabs: '.tabs li a', }, + templateHelpers: function() { + return { + taxonomy: Globals.taxonomy, + tabClass: this.tabClass + }; + }, events: function() { var events = {}, that = this; @@ -61,12 +67,19 @@ define(['require', }, initialize: function(options) { _.extend(this, _.pick(options, 'globalVent', 'url', 'value', 'tag', 'selectFirst')); + if (Globals.taxonomy) { + this.tabClass = "tab col-sm-4"; + } else { + this.tabClass = "tab col-sm-6"; + } }, onRender: function() { this.bindEvent(); this.renderTagLayoutView(); this.renderSearchLayoutView(); - this.rendeBusinessCatalogLayoutView(); + if (Globals.taxonomy) { + this.rendeBusinessCatalogLayoutView(); + } this.selectTab(); }, @@ -101,13 +114,13 @@ define(['require', }); }, selectTab: function() { - if (Utils.getUrlState.isTagTab()) { + if (Utils.getUrlState.isTagTab() || (Utils.getUrlState.isInitial() && !Globals.taxonomy)) { this.$('.tabs').find('li a[aria-controls="tab-tag"]').parents('li').addClass('active').siblings().removeClass('active'); this.$('.tab-content').find('div#tab-tag').addClass('active').siblings().removeClass('active'); - } else if (Utils.getUrlState.isTaxonomyTab()) { + } else if (Utils.getUrlState.isTaxonomyTab() || (Utils.getUrlState.isInitial() && Globals.taxonomy)) { this.$('.tabs').find('li a[aria-controls="tab-taxonomy"]').parents('li').addClass('active').siblings().removeClass('active'); this.$('.tab-content').find('div#tab-taxonomy').addClass('active').siblings().removeClass('active'); - } else if (Utils.getUrlState.isSearchTab()) { + } else if (Utils.getUrlState.isSearchTab() || (Utils.getUrlState.isDetailPage())) { this.$('.tabs').find('li a[aria-controls="tab-search"]').parents('li').addClass('active').siblings().removeClass('active'); this.$('.tab-content').find('div#tab-search').addClass('active').siblings().removeClass('active'); } http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/079ce35e/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js b/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js index 2aaeaa4..4546bb4 100644 --- a/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js +++ b/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js @@ -65,6 +65,11 @@ define(['require', tagList: '[data-id="tagList"]', termList: '[data-id="termList"]' }, + templateHelpers: function() { + return { + taxonomy: Globals.taxonomy + }; + }, /** ui events hash */ events: function() { var events = {}; http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/079ce35e/dashboardv2/public/js/views/schema/SchemaLayoutView.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/views/schema/SchemaLayoutView.js b/dashboardv2/public/js/views/schema/SchemaLayoutView.js index b021127..c22c5fb 100644 --- a/dashboardv2/public/js/views/schema/SchemaLayoutView.js +++ b/dashboardv2/public/js/views/schema/SchemaLayoutView.js @@ -22,8 +22,9 @@ define(['require', 'collection/VSchemaList', 'utils/Utils', 'utils/CommonViewFunction', - 'utils/Messages' -], function(require, Backbone, SchemaTableLayoutViewTmpl, VSchemaList, Utils, CommonViewFunction, Messages) { + 'utils/Messages', + 'utils/Globals' +], function(require, Backbone, SchemaTableLayoutViewTmpl, VSchemaList, Utils, CommonViewFunction, Messages, Globals) { 'use strict'; var SchemaTableLayoutView = Backbone.Marionette.LayoutView.extend( @@ -225,13 +226,15 @@ define(['require', }) }; }); - col['Check'] = { - name: "selected", - label: "", - cell: "select-row", - headerCell: "select-all", - position: 1 - }; + if (Globals.taxonomy) { + col['Check'] = { + name: "selected", + label: "", + cell: "select-row", + headerCell: "select-all", + position: 1 + }; + } col['tag'] = { label: "Tags", cell: "Html", @@ -244,23 +247,25 @@ define(['require', } }) }; - col['terms'] = { - label: "Terms", - cell: "Html", - editable: false, - sortable: false, - orderable: true, - className: 'searchTerm', - formatter: _.extend({}, Backgrid.CellFormatter.prototype, { - fromRaw: function(rawValue, model) { - var returnObject = CommonViewFunction.termTableBreadcrumbMaker(model, "schema"); - if (returnObject.object) { - that.bradCrumbList.push(returnObject.object); + if (Globals.taxonomy) { + col['terms'] = { + label: "Terms", + cell: "Html", + editable: false, + sortable: false, + orderable: true, + className: 'searchTerm', + formatter: _.extend({}, Backgrid.CellFormatter.prototype, { + fromRaw: function(rawValue, model) { + var returnObject = CommonViewFunction.termTableBreadcrumbMaker(model, "schema"); + if (returnObject.object) { + that.bradCrumbList.push(returnObject.object); + } + return returnObject.html; } - return returnObject.html; - } - }) - }; + }) + }; + } } return this.schemaCollection.constructor.getTableCols(col, this.schemaCollection); }, http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/079ce35e/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 5ec1b22..7bc37c0 100644 --- a/dashboardv2/public/js/views/search/SearchResultLayoutView.js +++ b/dashboardv2/public/js/views/search/SearchResultLayoutView.js @@ -189,7 +189,7 @@ define(['require', var that = this; this.$('.fontLoader').show(); this.$('.searchTable').hide(); - this.$('.searchResult').html(''); + that.$('.searchResult').hide(); if (Globals.searchApiCallRef) { Globals.searchApiCallRef.abort(); } @@ -260,8 +260,10 @@ define(['require', }, checkTableFetch: function() { if (this.fetchList <= 0) { + this.$('div[data-id="r_tableSpinner"]').removeClass('show') this.$('.fontLoader').hide(); this.$('.searchTable').show(); + this.$('.searchResult').show(); } }, getEntityTableColumns: function() { @@ -273,13 +275,15 @@ define(['require', if (responseData.dataType.attributeDefinitions.length == 2 && responseData.dataType.attributeDefinitions[1].name == "instanceInfo") { return this.getFixedColumn(); } else { - col['Check'] = { - name: "selected", - label: "", - cell: "select-row", - headerCell: "select-all", - position: 1 - }; + if (Globals.taxonomy) { + col['Check'] = { + name: "selected", + label: "", + cell: "select-row", + headerCell: "select-all", + position: 1 + }; + } var modelJSON = this.searchCollection.toJSON()[0]; _.keys(modelJSON).map(function(key) { if (key.indexOf("$") == -1 && typeof modelJSON[key] != "object") { @@ -342,27 +346,29 @@ define(['require', } }) }; - col['terms'] = { - label: "Terms", - cell: "Html", - editable: false, - sortable: false, - orderable: true, - className: 'searchTerm', - formatter: _.extend({}, Backgrid.CellFormatter.prototype, { - fromRaw: function(rawValue, model) { - var returnObject = CommonViewFunction.termTableBreadcrumbMaker(model); - if (returnObject.object) { - that.bradCrumbList.push(returnObject.object); - } - if (Globals.entityStateReadOnly[model.get('$id$').state]) { - return '
    ' + returnObject.html + '
    '; - } else { - return returnObject.html; + if (Globals.taxonomy) { + col['terms'] = { + label: "Terms", + cell: "Html", + editable: false, + sortable: false, + orderable: true, + className: 'searchTerm', + formatter: _.extend({}, Backgrid.CellFormatter.prototype, { + fromRaw: function(rawValue, model) { + var returnObject = CommonViewFunction.termTableBreadcrumbMaker(model); + if (returnObject.object) { + that.bradCrumbList.push(returnObject.object); + } + if (Globals.entityStateReadOnly[model.get('$id$').state]) { + return '
    ' + returnObject.html + '
    '; + } else { + return returnObject.html; + } } - } - }) - }; + }) + }; + } that.checkTableFetch(); return this.searchCollection.constructor.getTableCols(col, this.searchCollection); } http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/079ce35e/dashboardv2/public/js/views/tag/TagLayoutView.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/views/tag/TagLayoutView.js b/dashboardv2/public/js/views/tag/TagLayoutView.js index 49811ac..3a05167 100644 --- a/dashboardv2/public/js/views/tag/TagLayoutView.js +++ b/dashboardv2/public/js/views/tag/TagLayoutView.js @@ -22,8 +22,9 @@ define(['require', 'collection/VTagList', 'collection/VEntityList', 'utils/Utils', - 'utils/Messages' -], function(require, Backbone, TagLayoutViewTmpl, VTagList, VEntityList, Utils, Messages) { + 'utils/Messages', + 'utils/Globals' +], function(require, Backbone, TagLayoutViewTmpl, VTagList, VEntityList, Utils, Messages, Globals) { 'use strict'; var TagLayoutView = Backbone.Marionette.LayoutView.extend( @@ -113,18 +114,20 @@ define(['require', } }, setValues: function(manual) { - if (Utils.getUrlState.isTagTab()) { + if (Utils.getUrlState.isTagTab() || (Utils.getUrlState.isInitial() && !Globals.taxonomy)) { if (!this.tag) { this.selectFirst = false; this.ui.tagsParent.find('li').first().addClass('active'); - Utils.setUrl({ - url: this.ui.tagsParent.find('li a').first().attr("href"), - mergeBrowserUrl: false, - trigger: true, - updateTabState: function() { - return { tagUrl: this.url, stateChanged: true }; - } - }); + if (this.ui.tagsParent.find('li a').first().length) { + Utils.setUrl({ + url: this.ui.tagsParent.find('li a').first().attr("href"), + mergeBrowserUrl: false, + trigger: true, + updateTabState: function() { + return { tagUrl: this.url, stateChanged: true }; + } + }); + } } else { Utils.setUrl({ url: Utils.getUrlState.getQueryUrl().hash, http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/079ce35e/distro/src/conf/atlas-application.properties ---------------------------------------------------------------------- diff --git a/distro/src/conf/atlas-application.properties b/distro/src/conf/atlas-application.properties index 79723f4..1b2cc81 100755 --- a/distro/src/conf/atlas-application.properties +++ b/distro/src/conf/atlas-application.properties @@ -186,3 +186,6 @@ atlas.rest-csrf.enabled=true atlas.rest-csrf.browser-useragents-regex=^Mozilla.*,^Opera.*,^Chrome.* atlas.rest-csrf.methods-to-ignore=GET,OPTIONS,HEAD,TRACE atlas.rest-csrf.custom-header=X-XSRF-HEADER + +######### Enable Taxonomy ######### +atlas.feature.taxonomy.enable=true http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/079ce35e/release-log.txt ---------------------------------------------------------------------- diff --git a/release-log.txt b/release-log.txt index ae4a3c1..b1b62fd 100644 --- a/release-log.txt +++ b/release-log.txt @@ -6,6 +6,7 @@ INCOMPATIBLE CHANGES: ALL CHANGES: +ATLAS-1004 Option to enable taxonomy feature (kevalbhatt18 via shwethags) ATLAS-1003 DataSetLineageServiceTest, GraphBackedDiscoveryServiceTest, and GraphRepoMapperScaleTest failing in some environments (dkantor via shwethags) ATLAS-1002 Create default user rangertagsync in atlas file authentication for Ranger tag sync module (nixonrodrigues via shwethags) ATLAS-949 UI improvement for modal and tag styling in table (Kalyanikashikar via shwethags) http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/079ce35e/webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java ---------------------------------------------------------------------- diff --git a/webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java b/webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java index b7f6cf2..5dcf21c 100755 --- a/webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java +++ b/webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java @@ -56,6 +56,7 @@ public class AdminResource { private static final String BROWSER_USER_AGENT_PARAM = "atlas.rest-csrf.browser-useragents-regex"; private static final String CUSTOM_METHODS_TO_IGNORE_PARAM = "atlas.rest-csrf.methods-to-ignore"; private static final String CUSTOM_HEADER_PARAM = "atlas.rest-csrf.custom-header"; + private static final String isTaxonomyEnabled = "atlas.feature.taxonomy.enable"; private Response version; private ServiceState serviceState; @@ -141,7 +142,10 @@ public class AdminResource { @Produces(Servlets.JSON_MEDIA_TYPE) public Response getUserProfile() { JSONObject responseData = new JSONObject(); + Boolean enableTaxonomy = null; try { + PropertiesConfiguration configProperties = new PropertiesConfiguration("atlas-application.properties"); + enableTaxonomy = new Boolean(configProperties.getString(isTaxonomyEnabled, "false")); Authentication auth = SecurityContextHolder.getContext().getAuthentication(); String userName = null; Set groups = new HashSet(); @@ -158,11 +162,13 @@ public class AdminResource { responseData.put(CUSTOM_METHODS_TO_IGNORE_PARAM, AtlasCSRFPreventionFilter.METHODS_TO_IGNORE_DEFAULT); responseData.put(CUSTOM_HEADER_PARAM, AtlasCSRFPreventionFilter.HEADER_DEFAULT); + responseData.put(isTaxonomyEnabled, enableTaxonomy); + responseData.put("userName", userName); responseData.put("groups", groups); Response response = Response.ok(responseData).build(); return response; - } catch (JSONException e) { + } catch (JSONException | ConfigurationException e) { throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.INTERNAL_SERVER_ERROR)); } }