atlas-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yhema...@apache.org
Subject incubator-atlas git commit: ATLAS-927 aboutAtlas_tmpl.html has hard-coded project version (Kalyanikashikar via yhemanth)
Date Mon, 27 Jun 2016 13:55:26 GMT
Repository: incubator-atlas
Updated Branches:
  refs/heads/master 607e7de26 -> 0bf878de6


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/0bf878de
Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/0bf878de
Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/0bf878de

Branch: refs/heads/master
Commit: 0bf878de6f9b6c6d9000343690e25c4569cc062c
Parents: 607e7de
Author: Hemanth Yamijala <hyamijala@hortonworks.com>
Authored: Mon Jun 27 19:25:15 2016 +0530
Committer: Hemanth Yamijala <hyamijala@hortonworks.com>
Committed: Mon Jun 27 19:25:15 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/0bf878de/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/0bf878de/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/0bf878de/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/0bf878de/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/0bf878de/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/0bf878de/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/0bf878de/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index 8ab11ee..9c64693 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -6,6 +6,7 @@ INCOMPATIBLE CHANGES:
 
 
 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)


Mime
View raw message