Return-Path: X-Original-To: apmail-atlas-commits-archive@minotaur.apache.org Delivered-To: apmail-atlas-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F0C3818F99 for ; Fri, 11 Dec 2015 05:29:48 +0000 (UTC) Received: (qmail 58220 invoked by uid 500); 11 Dec 2015 05:29:48 -0000 Delivered-To: apmail-atlas-commits-archive@atlas.apache.org Received: (qmail 58187 invoked by uid 500); 11 Dec 2015 05:29:48 -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 58178 invoked by uid 99); 11 Dec 2015 05:29:48 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Dec 2015 05:29:48 +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 4D9C71A5CD7 for ; Fri, 11 Dec 2015 05:29:48 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.249 X-Spam-Level: *** X-Spam-Status: No, score=3.249 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_BADIPHTTP=2, KAM_LAZY_DOMAIN_SECURITY=1, NORMAL_HTTP_TO_IP=0.001, RP_MATCHES_RCVD=-0.554, URIBL_BLOCKED=0.001, WEIRD_PORT=0.001] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 7zoMLKMLbRgz for ; Fri, 11 Dec 2015 05:29:33 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with SMTP id 6E0942026F for ; Fri, 11 Dec 2015 05:29:31 +0000 (UTC) Received: (qmail 58093 invoked by uid 99); 11 Dec 2015 05:29:30 -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; Fri, 11 Dec 2015 05:29:30 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 8A1D8E17D2; Fri, 11 Dec 2015 05:29:30 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sumasai@apache.org To: commits@atlas.incubator.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: incubator-atlas git commit: ATLAS-376 UI: Use the Schema API of the backend to populate details for Schema tab (darshankumar89 via sumasai) Date: Fri, 11 Dec 2015 05:29:30 +0000 (UTC) Repository: incubator-atlas Updated Branches: refs/heads/master 323b90058 -> 532d6cec5 ATLAS-376 UI: Use the Schema API of the backend to populate details for Schema tab (darshankumar89 via sumasai) Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/532d6cec Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/532d6cec Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/532d6cec Branch: refs/heads/master Commit: 532d6cec5c0c947f706668355f81c116732a62a9 Parents: 323b900 Author: Suma Shivaprasad Authored: Fri Dec 11 10:59:13 2015 +0530 Committer: Suma Shivaprasad Committed: Fri Dec 11 10:59:13 2015 +0530 ---------------------------------------------------------------------- dashboard/gruntfile.js | 3 +- .../public/modules/details/detailsController.js | 36 +++++- .../public/modules/details/detailsResource.js | 14 +- .../public/modules/details/detailsRoutes.js | 25 +++- .../public/modules/details/views/details.html | 128 +++++++++---------- .../public/modules/details/views/schema.html | 69 ++++++---- .../public/modules/search/searchController.js | 2 +- dashboard/public/modules/search/searchRoutes.js | 8 +- .../public/modules/search/views/search.html | 4 +- .../tags/instance/createTagController.js | 19 +-- .../tags/instance/instanceTagsController.js | 2 +- dashboard/public/modules/tags/tagsRoutes.js | 4 + release-log.txt | 1 + 13 files changed, 200 insertions(+), 115 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/532d6cec/dashboard/gruntfile.js ---------------------------------------------------------------------- diff --git a/dashboard/gruntfile.js b/dashboard/gruntfile.js index e84893e..52ae412 100644 --- a/dashboard/gruntfile.js +++ b/dashboard/gruntfile.js @@ -155,7 +155,8 @@ module.exports = function(grunt) { 'hostnames': ['*'], 'routes': { '/': distPath, - '/api': 'http://162.212.133.190:21000/api' + //'/api': 'http://162.249.6.39:21000/api' + '/api': 'http://ec2-52-25-142-7.us-west-2.compute.amazonaws.com:21000/api' } }] } http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/532d6cec/dashboard/public/modules/details/detailsController.js ---------------------------------------------------------------------- diff --git a/dashboard/public/modules/details/detailsController.js b/dashboard/public/modules/details/detailsController.js index 65a4e40..c03824c 100644 --- a/dashboard/public/modules/details/detailsController.js +++ b/dashboard/public/modules/details/detailsController.js @@ -17,23 +17,46 @@ */ 'use strict'; -angular.module('dgc.details').controller('DetailsController', ['$window', '$scope', '$state', '$stateParams', 'DetailsResource', - function($window, $scope, $state, $stateParams, DetailsResource) { +angular.module('dgc.details').controller('DetailsController', ['$window', '$scope', '$state', '$stateParams', 'DetailsResource', 'SchemaResource', + function($window, $scope, $state, $stateParams, DetailsResource, SchemaResource) { $scope.tableName = false; $scope.isTable = false; DetailsResource.get({ id: $stateParams.id + }, function(data) { $scope.details = data; - $scope.schemas = data; $scope.tableName = data.values.name; $scope.isTable = (typeof data.typeName !== 'undefined' && data.typeName.toLowerCase().indexOf('table') !== -1) ? true : false; $scope.onActivate('io'); $scope.isTags = (typeof data.traits !== 'undefined' && typeof data.traits === 'object') ? true : false; + + if (data && data.values && data.values.name && data.values.name !== "") { + SchemaResource.get({ + tableName: data.values.name + }, function(data1) { + if (data1.results) { + $scope.schema = data1.results.rows; + $scope.isSchema = (data1.results.rows && data1.results.rows.length > 0) ? true : false; + for (var t = 0; t < data1.results.rows.length; t++) { + if (data1.results.rows[t].$id$) { + $scope.isTraitId = true; + } + if (data1.results.rows[t].type) { + $scope.isHiveSchema = true; + } + if($scope.isTraitId && $scope.isHiveSchema){ + break; + } + } + } + }); + } }); + $scope.isNumber = angular.isNumber; $scope.isObject = angular.isObject; $scope.isString = angular.isString; @@ -45,6 +68,13 @@ angular.module('dgc.details').controller('DetailsController', ['$window', '$scop }); }; + $scope.openAddTagHome = function(traitId) { + $state.go('addTagDetails', { + tId: traitId + }); + }; + + $scope.goDetails = function(id) { $state.go("details", { id: id http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/532d6cec/dashboard/public/modules/details/detailsResource.js ---------------------------------------------------------------------- diff --git a/dashboard/public/modules/details/detailsResource.js b/dashboard/public/modules/details/detailsResource.js index 3941e78..651ffd5 100644 --- a/dashboard/public/modules/details/detailsResource.js +++ b/dashboard/public/modules/details/detailsResource.js @@ -37,6 +37,18 @@ angular.module('dgc.details').factory('DetailsResource', ['$resource', function( method: 'DELETE', url: '/api/atlas/entities/:id/traits/:tagName' } - }); + }); +}]).factory('SchemaResource', ['$resource', function($resource) { + return $resource('/api/atlas/lineage/hive/table/:tableName/schema', {}, { + get: { + method: 'GET', + transformResponse: function(data) { + if (data) { + return angular.fromJson(data); + } + }, + responseType: 'json' + } +}); }]); http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/532d6cec/dashboard/public/modules/details/detailsRoutes.js ---------------------------------------------------------------------- diff --git a/dashboard/public/modules/details/detailsRoutes.js b/dashboard/public/modules/details/detailsRoutes.js index 17e32fa..b9e0661 100644 --- a/dashboard/public/modules/details/detailsRoutes.js +++ b/dashboard/public/modules/details/detailsRoutes.js @@ -15,7 +15,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - 'use strict'; angular.module('dgc.details').config(['$stateProvider', @@ -26,5 +25,27 @@ angular.module('dgc.details').config(['$stateProvider', url: '/details/:id', templateUrl: '/modules/details/views/details.html' }); + + $stateProvider.state('addTagDetails', { + parent: 'details', + params: { + tId: null, + frm : 'details' + }, + onEnter: ['$stateParams', '$state', '$modal', 'NavigationResource', function($stateParams, $state, $modal, NavigationResource) { + $modal.open({ + templateUrl: '/modules/tags/instance/views/createTag.html', + controller: 'CreateTagController', + windowClass: 'create-tag-entity', + resolve: { + typesList: function() { + return NavigationResource.get().$promise; + } + } + }).result.finally(function() { + $state.go('^'); + }); + }] + }); } -]); +]); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/532d6cec/dashboard/public/modules/details/views/details.html ---------------------------------------------------------------------- diff --git a/dashboard/public/modules/details/views/details.html b/dashboard/public/modules/details/views/details.html index 95cd098..0878308 100644 --- a/dashboard/public/modules/details/views/details.html +++ b/dashboard/public/modules/details/views/details.html @@ -1,85 +1,81 @@ - + +
- +
-

Name: {{details.values.name}}

-

Description: {{details.values.description}}

-

Lineage

+

+ Name: {{details.values.name}}

+

Description: {{details.values.description}}

+

+ Lineage + +

- - - - + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + -
KeyValue
KeyValue
{{key}} - {{ value.id }} - {{ value.id.id }} -
- -
-
- -
-
-
{{key3}}: {{value3}}
-
{{key1}} : {{value1 | date:'medium'}} UTC
-
- -
{{value * 1000 | date:'yyyy-MM-dd HH:mm:ss'}} UTC{{value}}
{{key}} + {{ value.id }} + {{ value.id.id }} + +
+ +
+
+
+
+
{{key3}}: {{value3}}
+
{{key1}} : {{value1 | date:'medium'}} UTC
+
+
{{value * 1000 | date:'yyyy-MM-dd HH:mm:ss'}} UTC{{value}}
+
- - + + - - + +
-
+ \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/532d6cec/dashboard/public/modules/details/views/schema.html ---------------------------------------------------------------------- diff --git a/dashboard/public/modules/details/views/schema.html b/dashboard/public/modules/details/views/schema.html index 8426473..1f09f5a 100644 --- a/dashboard/public/modules/details/views/schema.html +++ b/dashboard/public/modules/details/views/schema.html @@ -1,35 +1,48 @@ + + + ~ 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. + --> - - - - - + + + + + + + + - - - - - - - + + + + + + + +
NameCommentDataType
NameCommentDataTypeTypeTags Tools
{{colm.values.name}}{{colm.values.comment}} {{colm.values.dataType}}
+ {{colm.name}} + {{colm.name}} + {{colm.comment}} {{colm.dataType}} {{colm.type}} + + + +
\ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/532d6cec/dashboard/public/modules/search/searchController.js ---------------------------------------------------------------------- diff --git a/dashboard/public/modules/search/searchController.js b/dashboard/public/modules/search/searchController.js index 103c274..c7d5728 100644 --- a/dashboard/public/modules/search/searchController.js +++ b/dashboard/public/modules/search/searchController.js @@ -191,7 +191,7 @@ angular.module('dgc.search').controller('SearchController', ['$scope', '$locatio }; $scope.openAddTagHome = function(traitId) { $state.go('addTagHome', { - id: traitId + tId: traitId }); }; $scope.isTag = function(typename) { http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/532d6cec/dashboard/public/modules/search/searchRoutes.js ---------------------------------------------------------------------- diff --git a/dashboard/public/modules/search/searchRoutes.js b/dashboard/public/modules/search/searchRoutes.js index c9bf1c0..3c061bc 100644 --- a/dashboard/public/modules/search/searchRoutes.js +++ b/dashboard/public/modules/search/searchRoutes.js @@ -15,7 +15,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - 'use strict'; //Setting up route @@ -28,7 +27,10 @@ angular.module('dgc.search').config(['$stateProvider', }); $stateProvider.state('addTagHome', { parent: 'search', - params: { id:null}, + params: { + tId: null, + frm : 'search' + }, onEnter: ['$stateParams', '$state', '$modal', 'NavigationResource', function($stateParams, $state, $modal, NavigationResource) { $modal.open({ templateUrl: '/modules/tags/instance/views/createTag.html', @@ -45,4 +47,4 @@ angular.module('dgc.search').config(['$stateProvider', }] }); } -]); +]); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/532d6cec/dashboard/public/modules/search/views/search.html ---------------------------------------------------------------------- diff --git a/dashboard/public/modules/search/views/search.html b/dashboard/public/modules/search/views/search.html index 594d790..4bb59af 100644 --- a/dashboard/public/modules/search/views/search.html +++ b/dashboard/public/modules/search/views/search.html @@ -81,7 +81,9 @@ {{result[res] * 1000 | date:'yyyy-MM-dd HH:mm:ss'}} UTC - {{result[res]}} + {{result[res]}} + + {{result[res]}}
{{key}} http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/532d6cec/dashboard/public/modules/tags/instance/createTagController.js ---------------------------------------------------------------------- diff --git a/dashboard/public/modules/tags/instance/createTagController.js b/dashboard/public/modules/tags/instance/createTagController.js index ba564c9..b8e8c9f 100644 --- a/dashboard/public/modules/tags/instance/createTagController.js +++ b/dashboard/public/modules/tags/instance/createTagController.js @@ -42,8 +42,7 @@ angular.module('dgc.tags.instance').controller('CreateTagController', ['$scope', for (var t = 0; t < traitTypes.length; t++) { if (traitTypes[t]) { - for(var indx = 0; indx < traitTypes[t].attributeDefinitions.length; indx++) - { + for (var indx = 0; indx < traitTypes[t].attributeDefinitions.length; indx++) { var attrDefn = traitTypes[t].attributeDefinitions[indx]; $scope.propertiesList[attrDefn.name] = ''; $scope.isRequired[attrDefn.name] = attrDefn.isRequired; @@ -67,14 +66,18 @@ angular.module('dgc.tags.instance').controller('CreateTagController', ['$scope', "values": $scope.propertiesList }; DetailsResource.saveTag({ - id: $stateParams.id + id: $stateParams.tId }, requestObject).$promise.then(function(data) { - if (data.requestId !== undefined && data.GUID === $stateParams.id) { + if (data.requestId !== undefined && data.GUID === $stateParams.tId) { var tagName = $$("#tagDefinition").val(); - $rootScope.updateTags(true, { - added: $scope.selectedType - }); - $$("#" + $stateParams.id).append("" + tagName + " "); + if($stateParams.frm && $stateParams.frm !== 'details'){ + $rootScope.updateTags(true, { + added: $scope.selectedType + }); + $$("#" + $stateParams.tId).append("" + tagName + " "); + }else if($stateParams.frm === 'details'){ + $$("#" + $stateParams.tId+"_schema").append("" + tagName + " "); + } } NotificationService.info('Tag "' + $scope.selectedType + '" has been added to entity', true); $modalInstance.close(true); http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/532d6cec/dashboard/public/modules/tags/instance/instanceTagsController.js ---------------------------------------------------------------------- diff --git a/dashboard/public/modules/tags/instance/instanceTagsController.js b/dashboard/public/modules/tags/instance/instanceTagsController.js index 754f2cb..70156c1 100644 --- a/dashboard/public/modules/tags/instance/instanceTagsController.js +++ b/dashboard/public/modules/tags/instance/instanceTagsController.js @@ -61,7 +61,7 @@ angular.module('dgc.tags.instance').controller('InstanceTagController', ['$scope $scope.openAddTag = function() { $state.go('addTag', { - id: $scope.id + tId: $scope.id }); }; http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/532d6cec/dashboard/public/modules/tags/tagsRoutes.js ---------------------------------------------------------------------- diff --git a/dashboard/public/modules/tags/tagsRoutes.js b/dashboard/public/modules/tags/tagsRoutes.js index 5d768a5..1359931 100755 --- a/dashboard/public/modules/tags/tagsRoutes.js +++ b/dashboard/public/modules/tags/tagsRoutes.js @@ -26,6 +26,10 @@ angular.module('dgc.tags').config(['$stateProvider', }); $stateProvider.state('addTag', { parent: 'details', + params: { + tId: null, + frm : 'addTag' + }, onEnter: ['$stateParams', '$state', '$modal', 'NavigationResource', function($stateParams, $state, $modal, NavigationResource) { $modal.open({ templateUrl: '/modules/tags/instance/views/createTag.html', http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/532d6cec/release-log.txt ---------------------------------------------------------------------- diff --git a/release-log.txt b/release-log.txt index 178b8d0..ef856c8 100644 --- a/release-log.txt +++ b/release-log.txt @@ -14,6 +14,7 @@ ATLAS-54 Rename configs in hive hook (shwethags) ATLAS-3 Mixed Index creation fails with Date types (sumasai via shwethags) ALL CHANGES: +ATLAS-376 UI: Use the Schema API of the backend to populate details for Schema tab (darshankumar89 via sumasai) ATLAS-380 Fix ATLAS source artifact generation (sumasai) ATLAS-354 Kerberized cluster: quick_start.py fails to add sample data (shwethags) ATLAS-47 Entity mutations for complex types (sumasai via shwethags)