ATLAS-927 aboutAtlas_tmpl.html has hard-coded project version (Kalyanikashikar via yhemanth)
Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/70e45862 Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/70e45862 Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/70e45862 Branch: refs/heads/0.7-incubating Commit: 70e458620ff0337217441e1befcd877e48187697 Parents: 5fecdc4 Author: Shwetha GS <[email protected]> Authored: Wed Jun 29 12:13:51 2016 +0530 Committer: Shwetha GS <[email protected]> Committed: Wed Jun 29 12:13:51 2016 +0530 ---------------------------------------------------------------------- .../simple/AtlasAuthorizationUtils.java | 2 +- dashboardv2/public/img/ApacheAtlasLogo.png | Bin 3115 -> 0 bytes dashboardv2/public/js/models/VCommon.js | 11 ++++ dashboardv2/public/js/router/Router.js | 12 ++-- .../js/templates/common/aboutAtlas_tmpl.html | 3 +- .../public/js/views/common/aboutAtlas.js | 65 +++++++++++++++++++ release-log.txt | 1 + 7 files changed, 83 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/70e45862/authorization/src/main/java/org/apache/atlas/authorize/simple/AtlasAuthorizationUtils.java ---------------------------------------------------------------------- diff --git a/authorization/src/main/java/org/apache/atlas/authorize/simple/AtlasAuthorizationUtils.java b/authorization/src/main/java/org/apache/atlas/authorize/simple/AtlasAuthorizationUtils.java index 291f11b..9327f63 100644 --- a/authorization/src/main/java/org/apache/atlas/authorize/simple/AtlasAuthorizationUtils.java +++ b/authorization/src/main/java/org/apache/atlas/authorize/simple/AtlasAuthorizationUtils.java @@ -103,7 +103,7 @@ public class AtlasAuthorizationUtils { String api = getApi(contextPath); if (api.startsWith("types")) { resourceTypes.add(AtlasResourceTypes.TYPE); - } else if (api.startsWith("admin") && contextPath.contains("/session")) { + } else if (api.startsWith("admin") && (contextPath.contains("/session") || contextPath.contains("/version"))) { resourceTypes.add(AtlasResourceTypes.UNKNOWN); } else if ((api.startsWith("discovery") && contextPath.contains("/gremlin")) || api.startsWith("admin") || api.startsWith("graph")) { http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/70e45862/dashboardv2/public/img/ApacheAtlasLogo.png ---------------------------------------------------------------------- diff --git a/dashboardv2/public/img/ApacheAtlasLogo.png b/dashboardv2/public/img/ApacheAtlasLogo.png deleted file mode 100644 index 50c0ffd..0000000 Binary files a/dashboardv2/public/img/ApacheAtlasLogo.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/70e45862/dashboardv2/public/js/models/VCommon.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/models/VCommon.js b/dashboardv2/public/js/models/VCommon.js index 63015ec..f744f6c 100644 --- a/dashboardv2/public/js/models/VCommon.js +++ b/dashboardv2/public/js/models/VCommon.js @@ -37,6 +37,17 @@ define(['require', toString: function() { return this.get('name'); }, + /************************* + * Non - CRUD operations + *************************/ + aboutUs: function(url, options) { + var url = Globals.baseURL + url; + options = _.extend({ + contentType: 'application/json', + dataType: 'json' + }, options); + return this.constructor.nonCrudOperation.call(this, url, 'GET', options); + } }, {}); return VCommon; }); http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/70e45862/dashboardv2/public/js/router/Router.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/router/Router.js b/dashboardv2/public/js/router/Router.js index 3d2e785..83e1d24 100644 --- a/dashboardv2/public/js/router/Router.js +++ b/dashboardv2/public/js/router/Router.js @@ -57,14 +57,10 @@ define([ var that = this; require([ 'hbs!tmpl/common/aboutAtlas_tmpl', - 'modules/Modal' - ], function(aboutAtlasTmpl, Modal) { - - var aboutAtlas = Marionette.LayoutView.extend({ - template: aboutAtlasTmpl, - events: {}, - }); - var view = new aboutAtlas(); + 'modules/Modal', + 'views/common/aboutAtlas', + ], function(aboutAtlasTmpl, Modal, aboutAtlasView) { + var view = new aboutAtlasView(); var modal = new Modal({ title: 'Apache Atlas', content: view, http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/70e45862/dashboardv2/public/js/templates/common/aboutAtlas_tmpl.html ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/templates/common/aboutAtlas_tmpl.html b/dashboardv2/public/js/templates/common/aboutAtlas_tmpl.html index 08089b1..a3cf90a 100644 --- a/dashboardv2/public/js/templates/common/aboutAtlas_tmpl.html +++ b/dashboardv2/public/js/templates/common/aboutAtlas_tmpl.html @@ -16,9 +16,8 @@ --> <div class="row"> <div class="col-md-4"> - <img src="img/ApacheAtlasLogo.png" class="img-responsive"> <div class="col-md-8 subContent"> - <p class="ng-binding"><b>Version : </b> 0.7-incubating-SNAPSHOT-ra2cc01c4342ace7f7a3e3e254d7ede781f990318</p> + <p data-id="atlasVersion"></p> <br> <p class="text-info">Get involved!</p> <p class="text-info"><a href="http://apache.org/licenses/LICENSE-2.0" target="_blank">Licensed under the Apache License Version 2.0</a></p> http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/70e45862/dashboardv2/public/js/views/common/aboutAtlas.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/views/common/aboutAtlas.js b/dashboardv2/public/js/views/common/aboutAtlas.js new file mode 100644 index 0000000..558841d --- /dev/null +++ b/dashboardv2/public/js/views/common/aboutAtlas.js @@ -0,0 +1,65 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +define(['require', + 'backbone', + 'hbs!tmpl/common/aboutAtlas_tmpl', + 'models/VCommon' +], function(require, Backbone, aboutAtlasTmpl, VCommon) { + 'use strict'; + + var aboutAtlasView = Backbone.Marionette.LayoutView.extend( + /** @lends aboutAtlasView */ + { + template: aboutAtlasTmpl, + /** Layout sub regions */ + regions: {}, + /** ui selector cache */ + ui: { + atlasVersion: "[data-id='atlasVersion']" + }, + /** ui events hash */ + events: function() {}, + /** + * intialize a new aboutAtlasView Layout + * @constructs + */ + initialize: function(options) { + _.extend(this, _.pick(options, 'globalVent')); + }, + bindEvents: function() { + + + }, + onRender: function() { + var that = this; + var url = "/api/atlas/admin/version"; + var VCommonModel = new VCommon(); + VCommonModel.aboutUs(url, { + success: function(data) { + var str = "<b>Version : </b>" + data.Version; + that.ui.atlasVersion.html(str); + }, + error: function(error, data, status) {}, + complete: function() {} + }); + }, + + }); + return aboutAtlasView; +}); http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/70e45862/release-log.txt ---------------------------------------------------------------------- diff --git a/release-log.txt b/release-log.txt index ad7cd33..921cafd 100644 --- a/release-log.txt +++ b/release-log.txt @@ -31,6 +31,7 @@ ATLAS-409 Atlas will not import avro tables with schema read from a file (dosset ATLAS-379 Create sqoop and falcon metadata addons (venkatnrangan,bvellanki,sowmyaramesh via shwethags) ALL CHANGES: +ATLAS-927 aboutAtlas_tmpl.html has hard-coded project version (Kalyanikashikar via yhemanth) ATLAS-624 UI: Clicking a tag hyperlink should always result in DSL search. In some cases, results in full-text search. (Kalyanikashikar via yhemanth) ATLAS-950 Atlas should support Solr that requires Kerberos authentication (madhan.neethiraj via yhemanth) ATLAS-947 Return state information in inputs and outputs lineage API (shwethags)
