Commit ecd0f610 by Shwetha GS

ATLAS-364 UI Code standardization (darshankumar89 via shwethags)

parent 99921930
{ {
"name": "atlas-metadata", "name": "atlas-metadata",
"description": "Apache Atlas", "description": "Apache Atlas",
"version": "1.0.0-SNAPSHOT", "version": "1.0.0-SNAPSHOT",
"devDependencies": { "devDependencies": {
"angular": "~1.2.15", "angular": "~1.2.15",
"angular-resource": "~1.2.15", "angular-resource": "~1.2.15",
"angular-cookies": "~1.2.15", "angular-cookies": "~1.2.15",
"angular-route": "~1.2.15", "angular-route": "~1.2.15",
"angular-sanitize": "~1.2.15", "angular-sanitize": "~1.2.15",
"bootstrap": "~3.1.1", "bootstrap": "~3.1.1",
"angular-bootstrap": "~0.12.0", "angular-bootstrap": "~0.12.0",
"angular-ui-router": "~0.2.13", "angular-ui-router": "~0.2.13",
"d3": "~3.5.3", "d3": "~3.5.3",
"d3-tip": "~0.6.6", "d3-tip": "~0.6.6",
"lodash": "~3.0.0", "lodash": "~3.0.0",
"angular-ui-utils": "~0.1.1", "angular-ui-utils": "~0.1.1",
"font-awesome": "~4.2.0", "font-awesome": "~4.2.0",
"closure-compiler": "https://dl.google.com/closure-compiler/compiler-20140814.zip", "closure-compiler": "https://dl.google.com/closure-compiler/compiler-20140814.zip",
"ng-closure-runner": "https://raw.github.com/angular/ng-closure-runner/v0.2.3/assets/ng-closure-runner.zip", "ng-closure-runner": "https://raw.github.com/angular/ng-closure-runner/v0.2.3/assets/ng-closure-runner.zip",
"jquery-ui": "1.10.4" "jquery-ui": "1.10.4"
}, },
"resolutions": { "resolutions": {
"d3": "~3.5.3" "d3": "~3.5.3"
} }
} }
...@@ -96,33 +96,33 @@ header.navbar-top { ...@@ -96,33 +96,33 @@ header.navbar-top {
} }
header a.mainLogo{ header a.main-logo{
color: #ffffff; color: #ffffff;
font-size: 16px; font-size: 16px;
line-height: 40px; line-height: 40px;
padding: 2px 5px 0 15px; padding: 2px 5px 0 15px;
text-shadow: 0 1px 0 #555555; text-shadow: 0 1px 0 #555555;
} }
header a.mainLogo:hover,header a.mainLogo:focus{ header a.main-logo:hover,header a.main-logo:focus{
text-decoration: none; text-decoration: none;
} }
header ul.menuBar li a{ header ul.menu-bar li a{
line-height: 10px; line-height: 10px;
color: #c3c3c3; color: #c3c3c3;
} }
header ul.menuBar li a>i { header ul.menu-bar li a>i {
margin-right: 3px; margin-right: 3px;
font-size: 12px; font-size: 12px;
} }
header ul.menuBar li a:hover{ header ul.menu-bar li a:hover{
color: #fff; color: #fff;
background: transparent; background: transparent;
} }
header ul.menuBar li a:focus{ header ul.menu-bar li a:focus{
background: transparent; background: transparent;
} }
header ul.menuBar li.active a{ header ul.menu-bar li.active a{
color: #333333; color: #333333;
background-color: #ffffff; background-color: #ffffff;
-webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); -webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
...@@ -148,7 +148,7 @@ footer.navbar-bottom img { ...@@ -148,7 +148,7 @@ footer.navbar-bottom img {
/*======================================================================================= /*=======================================================================================
Search Bar design Search Bar design
=======================================================================================*/ =======================================================================================*/
.mainSearch input{ .main-search input{
height: 50px; height: 50px;
border-radius: 0px; border-radius: 0px;
border: 1px solid #e3e3e3; border: 1px solid #e3e3e3;
...@@ -157,7 +157,7 @@ Search Bar design ...@@ -157,7 +157,7 @@ Search Bar design
border-bottom-right-radius: 0px; border-bottom-right-radius: 0px;
box-shadow: none; box-shadow: none;
} }
.mainSearch .input-group-btn button{ .main-search .input-group-btn button{
border-radius: 0; border-radius: 0;
border-radius: 0; border-radius: 0;
padding: 14px 20px; padding: 14px 20px;
...@@ -166,7 +166,7 @@ Search Bar design ...@@ -166,7 +166,7 @@ Search Bar design
/*======================================================================================= /*=======================================================================================
Tags on Home Page design Tags on Home Page design
=======================================================================================*/ =======================================================================================*/
.mainTags{ .main-tags{
min-height: 20px; min-height: 20px;
margin-bottom: 20px; margin-bottom: 20px;
background-color: #f5f5f5; background-color: #f5f5f5;
...@@ -175,7 +175,7 @@ Tags on Home Page design ...@@ -175,7 +175,7 @@ Tags on Home Page design
-moz-border-radius: 0px; -moz-border-radius: 0px;
border-radius: 0px; border-radius: 0px;
} }
.mainTags a{ .main-tags a{
background: transparent; background: transparent;
border: none; border: none;
padding:5px 10px; padding:5px 10px;
...@@ -183,18 +183,18 @@ Tags on Home Page design ...@@ -183,18 +183,18 @@ Tags on Home Page design
color: #0088cc !important; color: #0088cc !important;
border-radius: 0 !important; border-radius: 0 !important;
} }
.mainTags a:hover{ .main-tags a:hover{
color: #005580 !important; color: #005580 !important;
background: #eeeeee !important; background: #eeeeee !important;
} }
.mainTags h4{ .main-tags h4{
padding:0 10px; padding:0 10px;
} }
.mainTags i{ .main-tags i{
font-size: 12px; font-size: 12px;
margin-right: 3px; margin-right: 3px;
} }
.mainTags .list-group-item.limitSize{ .main-tags .list-group-item.limit-size{
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
-o-text-overflow: ellipsis; -o-text-overflow: ellipsis;
...@@ -205,7 +205,7 @@ Tags on Home Page design ...@@ -205,7 +205,7 @@ Tags on Home Page design
/*======================================================================================= /*=======================================================================================
Search Bar design Search Bar design
=======================================================================================*/ =======================================================================================*/
.mainSearch input{ .main-search input{
height: 50px; height: 50px;
border-radius: 2px; border-radius: 2px;
border: 1px solid #e3e3e3; border: 1px solid #e3e3e3;
...@@ -214,18 +214,15 @@ Search Bar design ...@@ -214,18 +214,15 @@ Search Bar design
border-bottom-right-radius: 0px; border-bottom-right-radius: 0px;
box-shadow: none; box-shadow: none;
} }
.mainSearch .input-group-btn button{ .main-search .input-group-btn button{
border-top-left-radius: 0; border-top-left-radius: 0;
border-bottom-left-radius: 0; border-bottom-left-radius: 0;
padding: 14px 20px; padding: 14px 20px;
} }
.breakword{
word-wrap: break-word;
}
/*======================================================================================= /*=======================================================================================
Tags on Home Page design Tags on Home Page design
=======================================================================================*/ =======================================================================================*/
.mainTags{ .main-tags{
min-height: 20px; min-height: 20px;
margin-bottom: 20px; margin-bottom: 20px;
background-color: #f5f5f5; background-color: #f5f5f5;
...@@ -234,7 +231,7 @@ Tags on Home Page design ...@@ -234,7 +231,7 @@ Tags on Home Page design
-moz-border-radius: 0px; -moz-border-radius: 0px;
border-radius: 0px; border-radius: 0px;
} }
.mainTags a{ .main-tags a{
background: transparent; background: transparent;
border: none; border: none;
padding:5px 10px; padding:5px 10px;
...@@ -242,14 +239,14 @@ Tags on Home Page design ...@@ -242,14 +239,14 @@ Tags on Home Page design
color: #0088cc !important; color: #0088cc !important;
border-radius: 0 !important; border-radius: 0 !important;
} }
.mainTags a:hover{ .main-tags a:hover{
color: #005580 !important; color: #005580 !important;
background: #eeeeee !important; background: #eeeeee !important;
} }
.mainTags h4{ .main-tags h4{
padding:0 10px; padding:0 10px;
} }
.mainTags i{ .main-tags i{
font-size: 12px; font-size: 12px;
margin-right: 3px; margin-right: 3px;
} }
...@@ -266,52 +263,25 @@ Tags on Home Page design ...@@ -266,52 +263,25 @@ Tags on Home Page design
.mt20px { .mt20px {
margin-top: 20px; margin-top: 20px;
} }
/*.searchresults {
border: 1px solid #ddd;
padding: 10px;
}
.searchresults:first-child {
border-top-right-radius: 4px;
border-top-left-radius: 4px;
}
.searchresults:last-child {
margin-bottom: 0;
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
}
.searchresults hr {
margin: 0;
border: 0;
}
.searchresults .well {
background-color: #fff;
border: 0;
box-shadow: none;
height: auto;
min-height: 0;
padding: 5px 5px 5px 0;
}*/
.search-spinner { .search-spinner {
text-align: center; text-align: center;
} }
.menulink{ .menu-link{
padding-left: 10px; padding-left: 10px;
padding-right: 10px; padding-right: 10px;
} }
.btnToggle .btn-toggle
{ {
border: 1px solid #CCCCCC; border: 1px solid #CCCCCC;
padding: 5px; padding: 5px;
} }
.wordBreak { .word-break {
word-break: break-word; word-break: break-word;
} }
.tabsearchanchor { .tab-search-tags {
max-width: 100px; max-width: 100px;
display: list-item; display: list-item;
overflow: hidden; overflow: hidden;
...@@ -328,7 +298,7 @@ Tags on Home Page design ...@@ -328,7 +298,7 @@ Tags on Home Page design
padding-right: 7px !important; padding-right: 7px !important;
} }
.tabsearchResult { .tabsearch-result {
max-width: 500px; max-width: 500px;
display: list-item; display: list-item;
overflow: hidden; overflow: hidden;
...@@ -337,7 +307,7 @@ Tags on Home Page design ...@@ -337,7 +307,7 @@ Tags on Home Page design
white-space: nowrap; white-space: nowrap;
text-transform: capitalize; text-transform: capitalize;
} }
.searchResultCount { .search-resultcount {
max-width: 500px; max-width: 500px;
display: list-item; display: list-item;
overflow: hidden; overflow: hidden;
...@@ -350,16 +320,16 @@ Tags on Home Page design ...@@ -350,16 +320,16 @@ Tags on Home Page design
max-width: 125px !important; max-width: 125px !important;
} }
.anchorAbsolute { .anchor-absolute {
position: absolute; position: absolute;
right: 4px; right: 4px;
} }
.addTag{ .add-tag{
margin-top: -35px; margin-top: -35px;
} }
.tagAlign{ .tag-align{
text-align: center; text-align: center;
} }
......
...@@ -20,47 +20,47 @@ ...@@ -20,47 +20,47 @@
border-top: none; border-top: none;
} }
.detailsPage .nav-tabs>li.active>a, .details-page .nav-tabs>li.active>a,
.detailsPage .nav-tabs>li.active>a:focus, .details-page .nav-tabs>li.active>a:focus,
.detailsPage .nav-tabs>li.active>a:hover, .details-page .nav-tabs>li.active>a:hover,
.detailsPage .nav-tabs>li>a:hover { .details-page .nav-tabs>li>a:hover {
border-radius: 0; border-radius: 0;
} }
.detailsPage .nav-tabs>li.active>a, .details-page .nav-tabs>li.active>a,
.detailsPage .nav-tabs>li.active>a:focus{ .details-page .nav-tabs>li.active>a:focus{
border-radius: 0; border-radius: 0;
background: #F8F8F8; background: #F8F8F8;
} }
.detailsPage .nav-tabs>li>a { .details-page .nav-tabs>li>a {
margin-right: 0px; margin-right: 0px;
} }
.detailsPage .table>thead:first-child>tr:first-child>th { .details-page .table>thead:first-child>tr:first-child>th {
border-bottom-width: 1px; border-bottom-width: 1px;
} }
.detailsPage .table td{ .details-page .table td{
padding-left: 15px; padding-left: 15px;
} }
.detailsPage .table tr:nth-child(even) td{ .details-page .table tr:nth-child(even) td{
padding-left: 15px; padding-left: 15px;
background: #f9f9f9; background: #f9f9f9;
} }
.detailsPage .table tr td:first-child{ .details-page .table tr td:first-child{
font-weight: bold; font-weight: bold;
} }
.detailsPage .table th{ .details-page .table th{
padding-left: 15px; padding-left: 15px;
background: #f8f8f8; background: #f8f8f8;
} }
.detailsPage .lineage{ .details-page .lineage{
position: absolute; position: absolute;
width: 100%; width: 100%;
margin-top: 10px; margin-top: 10px;
text-align: center; text-align: center;
z-index: -1; z-index: -1;
} }
.detailsPage .black{ .details-page .black{
color: #555; color: #555;
} }
\ No newline at end of file
...@@ -16,17 +16,6 @@ ...@@ -16,17 +16,6 @@
* limitations under the License. * limitations under the License.
*/ */
/*g circle {*/
/*cursor: pointer;*/
/*stroke: green;*/
/*stroke-width: 2px;*/
/*fill: url(#process-image);*/
/*}*/
/*g circle.empty {*/
/*fill: #90ef96;*/
/*}*/
.link { .link {
fill: none; fill: none;
stroke: green; stroke: green;
...@@ -48,31 +37,14 @@ div.lineage { ...@@ -48,31 +37,14 @@ div.lineage {
border-bottom: 2px solid #006600; border-bottom: 2px solid #006600;
} }
.edge-path path {
/*.node rect {*/
/*stroke: #333;*/
/*fill: #fff;*/
/*}*/
.edgePath path {
stroke: #333; stroke: #333;
fill: #333; fill: #333;
stroke-width: 1.5px; stroke-width: 1.5px;
} }
/*.node rect,*/
/*.node circle {*/
/*stroke: #333;*/
/*fill: #fff;*/
/*stroke-width: 1.5px;*/
/*}*/
.lineage-viz { .lineage-viz {
margin: 0 auto; margin: 0 auto;
overflow: hidden; overflow: hidden;
/*border: 1px solid #ddd;
border-top: none;*/
} }
.lineage-viz button{ .lineage-viz button{
margin: 5px; margin: 5px;
...@@ -82,12 +54,7 @@ div.lineage { ...@@ -82,12 +54,7 @@ div.lineage {
.title-font{ .title-font{
font-size:12px!important; font-size:12px!important;
} }
/*.images {*/ .align-lineage{
/*background-image: url("../img/process.png");*/
/*}​*/
.alignLineage{
text-align: center; text-align: center;
margin-top: 100px; margin-top: 100px;
font-size: 24px; font-size: 24px;
......
...@@ -16,14 +16,11 @@ ...@@ -16,14 +16,11 @@
* limitations under the License. * limitations under the License.
*/ */
/* Sticky footer styles
-------------------------------------------------- */
html { html {
position: relative; position: relative;
min-height: 100%; min-height: 100%;
} }
body { body {
/* Margin bottom by footer height */
margin-bottom: 60px; margin-bottom: 60px;
} }
...@@ -35,7 +32,6 @@ body { ...@@ -35,7 +32,6 @@ body {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
width: 100%; width: 100%;
/* Set the fixed height of the footer here */
height: 60px; height: 60px;
background-color: #f5f5f5; background-color: #f5f5f5;
} }
\ No newline at end of file
...@@ -59,13 +59,13 @@ ...@@ -59,13 +59,13 @@
border-radius: 4px; border-radius: 4px;
background-color: #a94442; background-color: #a94442;
} }
.appForm .panel { .app-form .panel {
border-radius: 0 !important; border-radius: 0 !important;
} }
.appForm .panel-footer { .app-form .panel-footer {
margin-bottom: 0; margin-bottom: 0;
} }
.appForm .panel-body { .app-form .panel-body {
padding-bottom: 0; padding-bottom: 0;
} }
.input-spacing { .input-spacing {
...@@ -93,22 +93,22 @@ ...@@ -93,22 +93,22 @@
background-color: inherit; background-color: inherit;
padding-right: 20px !important; padding-right: 20px !important;
} }
.addTag { .add-tag {
text-align: center; text-align: center;
} }
.addTag img { .add-tag img {
cursor: pointer; cursor: pointer;
} }
.searchResults td { .search-results td {
border: 0; border: 0;
} }
.tagalign { .tag-align {
margin-top: 14px; margin-top: 14px;
} }
.tagsAdded { .tags-added {
display: inline; display: inline;
} }
.noTags { .no-tags {
font-size: 24px; font-size: 24px;
font-weight: bold; font-weight: bold;
text-align: center; text-align: center;
......
...@@ -41,7 +41,7 @@ angular.module('dgc').factory('lodash', ['$window', ...@@ -41,7 +41,7 @@ angular.module('dgc').factory('lodash', ['$window',
function($window) { function($window) {
return $window.d3; return $window.d3;
} }
]).factory('Global', ['$window', '$location', ]).factory('global', ['$window', '$location',
function($window, $location) { function($window, $location) {
return { return {
user: $location.search()['user.name'], user: $location.search()['user.name'],
...@@ -49,32 +49,32 @@ angular.module('dgc').factory('lodash', ['$window', ...@@ -49,32 +49,32 @@ angular.module('dgc').factory('lodash', ['$window',
renderErrors: $window.renderErrors renderErrors: $window.renderErrors
}; };
} }
]).factory('HttpInterceptor', ['Global', function(Global) { ]).factory('httpInterceptor', ['global', function(global) {
return { return {
'request': function(config) { 'request': function(config) {
if (config.url && (config.url.indexOf(baseUrl) === 0 || config.url.indexOf(baseUrl) === 0)) { if (config.url && (config.url.indexOf(baseUrl) === 0 || config.url.indexOf(baseUrl) === 0)) {
config.params = config.params || {}; config.params = config.params || {};
config.params['user.name'] = Global.user; config.params['user.name'] = global.user;
} }
return config; return config;
} }
}; };
}]).config(['$httpProvider', function($httpProvider) { }]).config(['$httpProvider', function($httpProvider) {
$httpProvider.interceptors.push('HttpInterceptor'); $httpProvider.interceptors.push('httpInterceptor');
}]).run(['$rootScope', 'Global', 'NotificationService', 'lodash', 'd3', function($rootScope, Global, NotificationService, lodash, d3) { }]).run(['$rootScope', 'global', 'notificationService', 'lodash', 'd3', function($rootScope, global, notificationService, lodash, d3) {
var errors = Global.renderErrors; var errors = global.renderErrors;
if (angular.isArray(errors) || angular.isObject(errors)) { if (angular.isArray(errors) || angular.isObject(errors)) {
lodash.forEach(errors, function(err) { lodash.forEach(errors, function(err) {
err = angular.isObject(err) ? err : { err = angular.isObject(err) ? err : {
message: err message: err
}; };
err.timeout = false; err.timeout = false;
NotificationService.error(err); notificationService.error(err);
}); });
} else { } else {
if (errors) { if (errors) {
errors.timeout = false; errors.timeout = false;
NotificationService.error(errors); notificationService.error(errors);
} }
} }
$rootScope.$on('$stateChangeStart', function() { $rootScope.$on('$stateChangeStart', function() {
...@@ -99,12 +99,12 @@ angular.module('dgc').factory('lodash', ['$window', ...@@ -99,12 +99,12 @@ angular.module('dgc').factory('lodash', ['$window',
} }
if (typeof to.parent === 'undefined') { if (typeof to.parent === 'undefined') {
if (to.name !== 'search') { if (to.name !== 'search') {
$rootScope.leftNav = true; $rootScope.leftNav = true;
} else { } else {
$rootScope.leftNav = false; $rootScope.leftNav = false;
} }
} }
}); });
}]); }]);
\ No newline at end of file
...@@ -19,18 +19,18 @@ ...@@ -19,18 +19,18 @@
var host = '', var host = '',
port = '', port = '',
baseUrl = '/api/atlas/', baseUrl = '/api/atlas/',
apiHost = (host!=='') ? host + ':' + port + baseUrl : baseUrl ; apiHost = (host !== '') ? host + ':' + port + baseUrl : baseUrl;
angular.module('dgc').constant('AtlasConfig', { angular.module('dgc').constant('atlasConfig', {
API_ENDPOINTS: { API_ENDPOINTS: {
ABOUT: apiHost + 'admin/version', ABOUT: apiHost + 'admin/version',
GET_ENTITY: apiHost + 'entities', GET_ENTITY: apiHost + 'entities',
ATTACH_DETACH_TRAITS: 'traits', ATTACH_DETACH_TRAITS: 'traits',
SCHEMA_LINEAGE_PREPEND: apiHost + 'lineage/hive/table', SCHEMA_LINEAGE_PREPEND: apiHost + 'lineage/hive/table',
SCHEMA_APPEND: 'schema', SCHEMA_APPEND: 'schema',
GRAPH: 'graph', GRAPH: 'graph',
TRAITS_LIST: apiHost + 'types?type=TRAIT', TRAITS_LIST: apiHost + 'types?type=TRAIT',
SEARCH: apiHost + 'discovery/search/', SEARCH: apiHost + 'discovery/search/',
CREATE_TRAIT: apiHost + 'types' CREATE_TRAIT: apiHost + 'types'
} }
}); });
\ No newline at end of file
...@@ -18,9 +18,9 @@ ...@@ -18,9 +18,9 @@
'use strict'; 'use strict';
angular.module('dgc.about').controller('AboutController', ['$scope', 'AboutResource', function($scope, AboutResource) { angular.module('dgc.about').controller('aboutController', ['$scope', 'aboutResource', function($scope, aboutResource) {
AboutResource.get(function(data) { aboutResource.get(function(data) {
$scope.versionInfo = data; $scope.versionInfo = data;
}); });
......
...@@ -18,6 +18,6 @@ ...@@ -18,6 +18,6 @@
'use strict'; 'use strict';
angular.module('dgc.about').factory('AboutResource', ['$resource', 'AtlasConfig', function($resource, AtlasConfig) { angular.module('dgc.about').factory('aboutResource', ['$resource', 'atlasConfig', function($resource, atlasConfig) {
return $resource(AtlasConfig.API_ENDPOINTS.ABOUT, {}); return $resource(atlasConfig.API_ENDPOINTS.ABOUT, {});
}]); }]);
...@@ -17,14 +17,14 @@ ...@@ -17,14 +17,14 @@
*/ */
'use strict'; 'use strict';
angular.module('dgc.details').controller('DetailsController', ['$window', '$scope', '$state', '$stateParams', 'DetailsResource', 'SchemaResource', angular.module('dgc.details').controller('detailsController', ['$window', '$scope', '$state', '$stateParams', 'detailsResource', 'schemaResource',
function($window, $scope, $state, $stateParams, DetailsResource, SchemaResource) { function($window, $scope, $state, $stateParams, detailsResource, schemaResource) {
$scope.tableName = false; $scope.tableName = false;
$scope.isTable = false; $scope.isTable = false;
$scope.isLineage = false; $scope.isLineage = false;
DetailsResource.get({ detailsResource.get({
id: $stateParams.id id: $stateParams.id
}, function(data) { }, function(data) {
...@@ -35,7 +35,7 @@ angular.module('dgc.details').controller('DetailsController', ['$window', '$scop ...@@ -35,7 +35,7 @@ angular.module('dgc.details').controller('DetailsController', ['$window', '$scop
if (data && data.values) { if (data && data.values) {
var getName = function(aaa, attr) { var getName = function(aaa, attr) {
DetailsResource.get({ detailsResource.get({
id: attr.id id: attr.id
}, function(data1) { }, function(data1) {
if (data1.values && data1.values.name) { if (data1.values && data1.values.name) {
...@@ -55,19 +55,19 @@ angular.module('dgc.details').controller('DetailsController', ['$window', '$scop ...@@ -55,19 +55,19 @@ angular.module('dgc.details').controller('DetailsController', ['$window', '$scop
} }
if (typeof data.values[aaa] === 'object' && angular.isArray(data.values[aaa]) === true) { if (typeof data.values[aaa] === 'object' && angular.isArray(data.values[aaa]) === true) {
var arrObj = data.values[aaa]; var arrObj = data.values[aaa];
for(var a=0; a < arrObj.length; a++){ for (var a = 0; a < arrObj.length; a++) {
if(typeof arrObj[a].id === 'string'){ if (typeof arrObj[a].id === 'string') {
arrObj[a].name = arrObj[a].id; arrObj[a].name = arrObj[a].id;
getName(arrObj[a], arrObj[a]); getName(arrObj[a], arrObj[a]);
} }
} }
} }
} }
} }
$scope.details = data; $scope.details = data;
if (data && data.values && data.values.name && data.values.name !== "") { if (data && data.values && data.values.name && data.values.name !== "") {
SchemaResource.get({ schemaResource.get({
tableName: data.values.name tableName: data.values.name
}, function(data1) { }, function(data1) {
if (data1.results) { if (data1.results) {
...@@ -121,4 +121,4 @@ angular.module('dgc.details').controller('DetailsController', ['$window', '$scop ...@@ -121,4 +121,4 @@ angular.module('dgc.details').controller('DetailsController', ['$window', '$scop
$window.history.back(); $window.history.back();
}; };
} }
]); ]);
\ No newline at end of file
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
'use strict'; 'use strict';
angular.module('dgc.details').factory('DetailsResource', ['$resource', 'AtlasConfig', function($resource, AtlasConfig) { angular.module('dgc.details').factory('detailsResource', ['$resource', 'atlasConfig', function($resource, atlasConfig) {
return $resource(AtlasConfig.API_ENDPOINTS.GET_ENTITY +'/:id', {}, { return $resource(atlasConfig.API_ENDPOINTS.GET_ENTITY + '/:id', {}, {
get: { get: {
method: 'GET', method: 'GET',
transformResponse: function(data) { transformResponse: function(data) {
...@@ -31,16 +31,16 @@ angular.module('dgc.details').factory('DetailsResource', ['$resource', 'AtlasCon ...@@ -31,16 +31,16 @@ angular.module('dgc.details').factory('DetailsResource', ['$resource', 'AtlasCon
}, },
saveTag: { saveTag: {
method: 'POST', method: 'POST',
url : AtlasConfig.API_ENDPOINTS.GET_ENTITY + '/:id/' + AtlasConfig.API_ENDPOINTS.ATTACH_DETACH_TRAITS url: atlasConfig.API_ENDPOINTS.GET_ENTITY + '/:id/' + atlasConfig.API_ENDPOINTS.ATTACH_DETACH_TRAITS
}, },
detachTag : { detachTag: {
method: 'DELETE', method: 'DELETE',
url : AtlasConfig.API_ENDPOINTS.GET_ENTITY + '/:id/' + AtlasConfig.API_ENDPOINTS.ATTACH_DETACH_TRAITS + '/:tagName' url: atlasConfig.API_ENDPOINTS.GET_ENTITY + '/:id/' + atlasConfig.API_ENDPOINTS.ATTACH_DETACH_TRAITS + '/:tagName'
} }
}); });
}]).factory('SchemaResource', ['$resource','AtlasConfig', function($resource, AtlasConfig) { }]).factory('schemaResource', ['$resource', 'atlasConfig', function($resource, atlasConfig) {
return $resource(AtlasConfig.API_ENDPOINTS.SCHEMA_LINEAGE_PREPEND + '/:tableName/' + AtlasConfig.API_ENDPOINTS.SCHEMA_APPEND, {}, { return $resource(atlasConfig.API_ENDPOINTS.SCHEMA_LINEAGE_PREPEND + '/:tableName/' + atlasConfig.API_ENDPOINTS.SCHEMA_APPEND, {}, {
get: { get: {
method: 'GET', method: 'GET',
transformResponse: function(data) { transformResponse: function(data) {
...@@ -50,5 +50,5 @@ angular.module('dgc.details').factory('DetailsResource', ['$resource', 'AtlasCon ...@@ -50,5 +50,5 @@ angular.module('dgc.details').factory('DetailsResource', ['$resource', 'AtlasCon
}, },
responseType: 'json' responseType: 'json'
} }
}); });
}]); }]);
...@@ -30,16 +30,16 @@ angular.module('dgc.details').config(['$stateProvider', ...@@ -30,16 +30,16 @@ angular.module('dgc.details').config(['$stateProvider',
parent: 'details', parent: 'details',
params: { params: {
tId: null, tId: null,
frm : 'details' frm: 'details'
}, },
onEnter: ['$stateParams', '$state', '$modal', 'NavigationResource', function($stateParams, $state, $modal, NavigationResource) { onEnter: ['$stateParams', '$state', '$modal', 'navigationResource', function($stateParams, $state, $modal, navigationResource) {
$modal.open({ $modal.open({
templateUrl: '/modules/tags/instance/views/createTag.html', templateUrl: '/modules/tags/instance/views/createTag.html',
controller: 'CreateTagController', controller: 'createTagController',
windowClass: 'create-tag-entity', windowClass: 'create-tag-entity',
resolve: { resolve: {
typesList: function() { typesList: function() {
return NavigationResource.get().$promise; return navigationResource.get().$promise;
} }
} }
}).result.finally(function() { }).result.finally(function() {
...@@ -48,4 +48,4 @@ angular.module('dgc.details').config(['$stateProvider', ...@@ -48,4 +48,4 @@ angular.module('dgc.details').config(['$stateProvider',
}] }]
}); });
} }
]); ]);
\ No newline at end of file
...@@ -16,12 +16,6 @@ ...@@ -16,12 +16,6 @@
~ limitations under the License. ~ limitations under the License.
--> -->
<!--<div>-->
<!--{{key}}:-->
<!--{{value}}-->
<!--</div>-->
<div class="row" data-ng-repeat="(key1, value1) in value" ng-if="value1"> <div class="row" data-ng-repeat="(key1, value1) in value" ng-if="value1">
<div class="col-md-6" data-ng-if="!isString(value1)" data-ng-repeat="(key2, value2) in value1 track by $index"></div> <div class="col-md-6" data-ng-if="!isString(value1)" data-ng-repeat="(key2, value2) in value1 track by $index"></div>
<div data-ng-if="isString(value2)" data-ng-repeat="(key3, value3) in value2"> {{key3}}: {{value3}}</div> <div data-ng-if="isString(value2)" data-ng-repeat="(key3, value3) in value2"> {{key3}}: {{value3}}</div>
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ limitations under the License.
--> -->
<div class="row detailsPage" data-ng-controller="DetailsController"> <div class="row details-page" data-ng-controller="detailsController">
<div class="col-lg-12 padding0"> <div class="col-lg-12 padding0">
<ul class="breadcrumb"> <ul class="breadcrumb">
<li><button class="btn btn-link" data-ng-click="goBack()"><i class="fa fa-arrow-left"></i> Back To Result</button> </li> <li><button class="btn btn-link" data-ng-click="goBack()"><i class="fa fa-arrow-left"></i> Back To Result</button> </li>
......
...@@ -38,9 +38,9 @@ ...@@ -38,9 +38,9 @@
<td ng-if="!isHiveSchema"> {{colm.dataType}}</td> <td ng-if="!isHiveSchema"> {{colm.dataType}}</td>
<td ng-if="isHiveSchema"> {{colm.type}}</td> <td ng-if="isHiveSchema"> {{colm.type}}</td>
<td ng-if="colm['$id$']"> <td ng-if="colm['$id$']">
<div id="{{colm['$id$'].id}}_schema" class="wordBreak"><a class="tabsearchanchor" ng-repeat="(key, value) in colm['$traits$']" data-ui-sref="search({query: key})" title="{{key}}">{{key}}<span> </span></a></div> <div id="{{colm['$id$'].id}}_schema" class="word-break"><a class="tab-search-tags" ng-repeat="(key, value) in colm['$traits$']" data-ui-sref="search({query: key})" title="{{key}}">{{key}}<span> </span></a></div>
</td> </td>
<td ng-if="colm['$id$']" class="addTag"> <td ng-if="colm['$id$']" class="add-tag">
<img ng-src="img/addTag.png" tooltip="Add Tag" ng-click="openAddTagHome(colm['$id$'].id )"> <img ng-src="img/addTag.png" tooltip="Add Tag" ng-click="openAddTagHome(colm['$id$'].id )">
</td> </td>
</tr> </tr>
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
'use strict'; 'use strict';
angular.module('dgc.home').controller('HeaderController', ['$scope', '$modal', function($scope, $modal) { angular.module('dgc.home').controller('headerController', ['$scope', '$modal', function($scope, $modal) {
$scope.menu = [{ $scope.menu = [{
title: "Tags", title: "Tags",
...@@ -30,11 +30,11 @@ angular.module('dgc.home').controller('HeaderController', ['$scope', '$modal', f ...@@ -30,11 +30,11 @@ angular.module('dgc.home').controller('HeaderController', ['$scope', '$modal', f
return true; return true;
}; };
$scope.ShowAbout = function() { $scope.showAbout = function() {
$modal.open({ $modal.open({
animation: true, animation: true,
templateUrl: '/modules/about/views/about.html', templateUrl: '/modules/about/views/about.html',
controller: 'AboutController', controller: 'aboutController',
size: 'lg' size: 'lg'
}); });
}; };
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
~ limitations under the License. ~ limitations under the License.
--> -->
<div data-ng-controller="HeaderController" class="row"> <div data-ng-controller="headerController" class="row">
<div class="navbar-header"> <div class="navbar-header">
<button class="navbar-toggle" type="button" data-ng-click="isCollapsed = !isCollapsed"> <button class="navbar-toggle" type="button" data-ng-click="isCollapsed = !isCollapsed">
<span class="sr-only">Toggle navigation</span> <span class="sr-only">Toggle navigation</span>
...@@ -24,24 +24,23 @@ ...@@ -24,24 +24,23 @@
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> </button>
<a data-ui-sref="search()" data-ui-sref-active="active" class="mainLogo"> <a data-ui-sref="search()" data-ui-sref-active="active" class="main-logo">
<!-- <img src="../img/ApacheAtlasLogo.png" /> -->
Apache <b>Atlas</b> Apache <b>Atlas</b>
</a> </a>
</div> </div>
<nav class="collapse navbar-collapse" data-collapse="isCollapsed" data-role="navigation"> <nav class="collapse navbar-collapse" data-collapse="isCollapsed" data-role="navigation">
<ul class="navbar-nav nav pull-right menuBar" data-ng-if="isLoggedIn()"> <ul class="navbar-nav nav pull-right menu-bar" data-ng-if="isLoggedIn()">
<li data-ui-sref-active="active"> <li data-ui-sref-active="active">
<a data-ui-sref="search()" class="menulink">Search</a> <a data-ui-sref="search()" class="menu-link">Search</a>
</li> </li>
<li data-ng-repeat="item in menu" data-ui-sref-active="active"> <li data-ng-repeat="item in menu" data-ui-sref-active="active">
<a data-ui-sref="{{item.state}}">{{item.title}}</a> <a data-ui-sref="{{item.state}}">{{item.title}}</a>
</li> </li>
<li data-ui-sref-active="active"> <li data-ui-sref-active="active">
<a ng-if="!username" class="menulink" href="https://cwiki.apache.org/confluence/display/ATLAS/Atlas+Home" target="_blank">Help</a> <a ng-if="!username" class="menu-link" href="https://cwiki.apache.org/confluence/display/ATLAS/Atlas+Home" target="_blank">Help</a>
</li> </li>
<li data-ui-sref-active="active"> <li data-ui-sref-active="active">
<a ng-if="!username" class="menulink" href="javascript:void(0)" ng-click="ShowAbout()">About</a> <a ng-if="!username" class="menu-link" href="javascript:void(0)" ng-click="showAbout()">About</a>
</li> </li>
</ul> </ul>
</nav> </nav>
......
...@@ -18,6 +18,6 @@ ...@@ -18,6 +18,6 @@
'use strict'; 'use strict';
angular.module('dgc.lineage').factory('LineageResource', ['$resource','AtlasConfig', function($resource, AtlasConfig) { angular.module('dgc.lineage').factory('lineageResource', ['$resource', 'atlasConfig', function($resource, atlasConfig) {
return $resource(AtlasConfig.API_ENDPOINTS.SCHEMA_LINEAGE_PREPEND+'/:tableName/:type/'+AtlasConfig.API_ENDPOINTS.GRAPH, {}); return $resource(atlasConfig.API_ENDPOINTS.SCHEMA_LINEAGE_PREPEND + '/:tableName/:type/' + atlasConfig.API_ENDPOINTS.GRAPH, {});
}]); }]);
...@@ -17,12 +17,11 @@ ...@@ -17,12 +17,11 @@
*/ */
'use strict'; 'use strict';
angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$scope', '$state', '$stateParams', 'lodash', 'LineageResource', 'd3', 'DetailsResource', '$q', angular.module('dgc.lineage').controller('lineage_ioController', ['$element', '$scope', '$state', '$stateParams', 'lodash', 'lineageResource', 'd3', 'detailsResource', '$q',
function($element, $scope, $state, $stateParams, _, LineageResource, d3, DetailsResource, $q) { function($element, $scope, $state, $stateParams, _, lineageResource, d3, detailsResource, $q) {
var guidsList = [], var guidsList = [],
$$ = angular.element; $$ = angular.element;
function inVertObj(edgs) { function inVertObj(edgs) {
var newEdgsObj = {}; var newEdgsObj = {};
...@@ -36,14 +35,13 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$ ...@@ -36,14 +35,13 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$
} }
function getCombinedLineageData(tableData, callRender) { function getCombinedLineageData(tableData, callRender) {
LineageResource.get({ lineageResource.get({
tableName: tableData.tableName, tableName: tableData.tableName,
type: 'outputs' type: 'outputs'
}).$promise.then( }).$promise.then(
function lineageSuccess(response1) { function lineageSuccess(response1) {
// $scope.$emit('show_lineage');
$('#lineageGraph').removeClass('hide'); $('#lineageGraph').removeClass('hide');
LineageResource.get({ lineageResource.get({
tableName: tableData.tableName, tableName: tableData.tableName,
type: 'inputs' type: 'inputs'
}).$promise.then( }).$promise.then(
...@@ -102,7 +100,7 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$ ...@@ -102,7 +100,7 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$
var deferred = $q.defer(); var deferred = $q.defer();
for (var guid in edges) { for (var guid in edges) {
if (!vertices.hasOwnProperty(guid)) { if (!vertices.hasOwnProperty(guid)) {
urlCalls.push(DetailsResource.get({ urlCalls.push(detailsResource.get({
id: guid id: guid
}).$promise); }).$promise);
} }
...@@ -257,13 +255,12 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$ ...@@ -257,13 +255,12 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$
root, root,
depthwidth = 10; depthwidth = 10;
var viewerWidth = widthg - 15, var viewerWidth = widthg - 15,
viewerHeight = heightg, viewerHeight = heightg,
center = [viewerWidth / 2, viewerHeight / 2]; center = [viewerWidth / 2, viewerHeight / 2];
var tree = d3.layout.tree().size([viewerHeight, viewerWidth]); var tree = d3.layout.tree().size([viewerHeight, viewerWidth]);
/*.size([viewerHeight, viewerWidth]); nodeSize([100, 200]);*/
container.eleObj.find(".graph").html(''); container.eleObj.find(".graph").html('');
container.eleObj.find("svg").remove(); container.eleObj.find("svg").remove();
...@@ -299,7 +296,6 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$ ...@@ -299,7 +296,6 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$
return d.children && d.children.length > 0 ? d.children : null; return d.children && d.children.length > 0 ? d.children : null;
}); });
// sort the tree according to the node names // sort the tree according to the node names
function sortTree() { function sortTree() {
...@@ -342,7 +338,6 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$ ...@@ -342,7 +338,6 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$
}) })
.call(tooltip); .call(tooltip);
// Define the drag listeners for drag/drop behaviour of nodes. // Define the drag listeners for drag/drop behaviour of nodes.
dragListener = d3.behavior.drag() dragListener = d3.behavior.drag()
.on("dragstart", function(d) { .on("dragstart", function(d) {
...@@ -398,7 +393,6 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$ ...@@ -398,7 +393,6 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$
} }
} }
function expand(d) { function expand(d) {
if (d._children) { if (d._children) {
d.children = d._children; d.children = d._children;
...@@ -438,7 +432,7 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$ ...@@ -438,7 +432,7 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$
// Function to center node when clicked/dropped so node doesn't get lost when collapsing/moving with large amount of children. // Function to center node when clicked/dropped so node doesn't get lost when collapsing/moving with large amount of children.
function centerNode(source) { function centerNode(source) {
var scale = zoomListener.scale(); var scale = zoomListener.scale();
var x = -source.y0; var x = -source.y0;
var y = -source.x0; var y = -source.x0;
x = x * scale - 130; x = x * scale - 130;
...@@ -494,9 +488,10 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$ ...@@ -494,9 +488,10 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$
} }
}; };
childCount(0, root); childCount(0, root);
//tree = tree.nodeSize([50, 100]); tree = tree.separation(function(a, b) {
tree = tree.separation(function(a, b) { return ((a.parent === root) && (b.parent === root)) ? 3 : 1; }) return ((a.parent === root) && (b.parent === root)) ? 3 : 1;
.size([viewerHeight, viewerWidth - 160]); })
.size([viewerHeight, viewerWidth - 160]);
// Compute the new tree layout. // Compute the new tree layout.
var nodes = tree.nodes(root).reverse(); var nodes = tree.nodes(root).reverse();
...@@ -515,7 +510,6 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$ ...@@ -515,7 +510,6 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$
var links = tree.links(nodes); var links = tree.links(nodes);
_.each(links, function(o, i) { _.each(links, function(o, i) {
//links[i].target = _.find(nodes, {guid: o.target.id});
links[i].target = _.find(nodes, { links[i].target = _.find(nodes, {
guid: o.target.guid guid: o.target.guid
}); });
...@@ -558,7 +552,7 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$ ...@@ -558,7 +552,7 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$
.attr("transform", function() { .attr("transform", function() {
return "translate(" + source.y0 + "," + source.x0 + ")"; return "translate(" + source.y0 + "," + source.x0 + ")";
}); });
//.on('click', click);
nodeEnter.append("image") nodeEnter.append("image")
.attr("class", "nodeImage") .attr("class", "nodeImage")
...@@ -648,9 +642,7 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$ ...@@ -648,9 +642,7 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$
// Update the links… // Update the links…
var link = svgGroup.selectAll("path.link") var link = svgGroup.selectAll("path.link")
.data(links); .data(links);
// .data(links, function(d) {
// return d.target.id;
// });
// Enter any new links at the parent's previous position. // Enter any new links at the parent's previous position.
link.enter().insert("path", "g") link.enter().insert("path", "g")
...@@ -714,28 +706,31 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$ ...@@ -714,28 +706,31 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$
// Simplest possible buttons // Simplest possible buttons
var intervalID; var intervalID;
d3.selectAll('.zoom-buttons').on('mousedown', function(){ d3.selectAll('.zoom-buttons').on('mousedown', function() {
d3.event.preventDefault(); d3.event.preventDefault();
$scope.factor = (this.id === 'zoom_in') ? 1.1 : 1/1.1; $scope.factor = (this.id === 'zoom_in') ? 1.1 : 1 / 1.1;
intervalID = setInterval(zoom_by, 40, $scope.factor); intervalID = setInterval(zoom_by, 40, $scope.factor);
}).on('mouseup', function(){ }).on('mouseup', function() {
d3.event.preventDefault(); d3.event.preventDefault();
clearInterval(intervalID); clearInterval(intervalID);
intervalID = undefined; intervalID = undefined;
}); });
function zoom_by(factor){ function zoom_by(factor) {
var scale = zoomListener.scale(), var scale = zoomListener.scale(),
extent = zoomListener.scaleExtent(), extent = zoomListener.scaleExtent(),
translate = zoomListener.translate(), translate = zoomListener.translate(),
x = translate[0], y = translate[1], x = translate[0],
y = translate[1],
target_scale = scale * factor; target_scale = scale * factor;
// If we're already at an extent, done // If we're already at an extent, done
if (target_scale === extent[0] || target_scale === extent[1]) { return false; } if (target_scale === extent[0] || target_scale === extent[1]) {
return false;
}
// If the factor is too much, scale it down to reach the extent exactly // If the factor is too much, scale it down to reach the extent exactly
var clamped_target_scale = Math.max(extent[0], Math.min(extent[1], target_scale)); var clamped_target_scale = Math.max(extent[0], Math.min(extent[1], target_scale));
if (clamped_target_scale !== target_scale){ if (clamped_target_scale !== target_scale) {
target_scale = clamped_target_scale; target_scale = clamped_target_scale;
factor = target_scale / scale; factor = target_scale / scale;
} }
...@@ -746,7 +741,7 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$ ...@@ -746,7 +741,7 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$
// Enact the zoom immediately // Enact the zoom immediately
zoomListener.scale(target_scale) zoomListener.scale(target_scale)
.translate([x,y]); .translate([x, y]);
zoom(); zoom();
} }
...@@ -758,10 +753,14 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$ ...@@ -758,10 +753,14 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$
// Layout the tree initially and center on the root node. // Layout the tree initially and center on the root node.
update(root); update(root);
centerNode(root); centerNode(root);
if(!$scope.initialHeight){ if (!$scope.initialHeight) {
$scope.initialHeight = angular.element('.lineage-viz').height(); $scope.initialHeight = angular.element('.lineage-viz').height();
} }
angular.element('.lineage-viz').resizable({minWidth:1150, maxWidth:1150, maxHeight: angular.element('.lineage-viz').height(), minHeight:50 angular.element('.lineage-viz').resizable({
minWidth: 1150,
maxWidth: 1150,
maxHeight: angular.element('.lineage-viz').height(),
minHeight: 50
}); });
$scope.requested = false; $scope.requested = false;
var couplingParent1 = tree.nodes(root).filter(function(d) { var couplingParent1 = tree.nodes(root).filter(function(d) {
...@@ -782,4 +781,4 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$ ...@@ -782,4 +781,4 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$
} }
} }
]); ]);
\ No newline at end of file
...@@ -16,14 +16,14 @@ ...@@ -16,14 +16,14 @@
~ limitations under the License. ~ limitations under the License.
--> -->
<div class="lineage-viz table-bordered" data-ng-controller="Lineage_ioController"> <div class="lineage-viz table-bordered" data-ng-controller="lineage_ioController">
<button type="button" class="btn btn-primary pull-right" ng-click="onReset()"> <button type="button" class="btn btn-primary pull-right" ng-click="onReset()">
Reset Reset
</button> </button>
<button type="button" class="btn btn-primary zoom-buttons pull-right" id="zoom_out"><i class="fa fa-minus"></i></button> <button type="button" class="btn btn-primary zoom-buttons pull-right" id="zoom_out"><i class="fa fa-minus"></i></button>
<button type="button" class="btn btn-primary zoom-buttons pull-right" id="zoom_in"><i class="fa fa-plus"></i> </button> <button type="button" class="btn btn-primary zoom-buttons pull-right" id="zoom_in"><i class="fa fa-plus"></i> </button>
<div class="graph"> <div class="graph">
<h4 data-ng-if="!requested && !lineageData" class="alignLineage">No lineage data found</h4> <h4 data-ng-if="!requested && !lineageData" class="align-lineage">No lineage data found</h4>
<i data-ng-if="requested" class="fa fa-spinner fa-spin fa-5x"></i> <i data-ng-if="requested" class="fa fa-spinner fa-spin fa-5x"></i>
<svg > <svg >
<g/> <g/>
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
*/ */
'use strict'; 'use strict';
angular.module('dgc.navigation').controller('NavigationController', ['$scope', 'NavigationResource', '$cacheFactory','AtlasConfig', angular.module('dgc.navigation').controller('navigationController', ['$scope', 'navigationResource', '$cacheFactory', 'atlasConfig',
function($scope, NavigationResource, $cacheFactory,AtlasConfig) { function($scope, navigationResource, $cacheFactory, atlasConfig) {
$scope.updateVar = function(event) { $scope.updateVar = function(event) {
$scope.$$prevSibling.query = angular.element(event.target).text(); $scope.$$prevSibling.query = angular.element(event.target).text();
...@@ -26,19 +26,19 @@ angular.module('dgc.navigation').controller('NavigationController', ['$scope', ' ...@@ -26,19 +26,19 @@ angular.module('dgc.navigation').controller('NavigationController', ['$scope', '
}; };
$scope.$on('load_Traits', function() { $scope.$on('load_Traits', function() {
$scope.leftnav = NavigationResource.get(); $scope.leftnav = navigationResource.get();
}); });
setTimeout(function() { setTimeout(function() {
var httpDefaultCache = $cacheFactory.get('$http'); var httpDefaultCache = $cacheFactory.get('$http');
httpDefaultCache.remove(AtlasConfig.API_ENDPOINTS.TRAITS_LIST); httpDefaultCache.remove(atlasConfig.API_ENDPOINTS.TRAITS_LIST);
}, 3600000); }, 3600000);
$scope.refreshTags = function(){ $scope.refreshTags = function() {
var httpDefaultCache = $cacheFactory.get('$http'); var httpDefaultCache = $cacheFactory.get('$http');
httpDefaultCache.remove(AtlasConfig.API_ENDPOINTS.TRAITS_LIST); httpDefaultCache.remove(atlasConfig.API_ENDPOINTS.TRAITS_LIST);
$scope.leftnav = NavigationResource.get(); $scope.leftnav = navigationResource.get();
}; };
} }
]); ]);
\ No newline at end of file
...@@ -18,13 +18,13 @@ ...@@ -18,13 +18,13 @@
'use strict'; 'use strict';
angular.module('dgc.navigation').factory('NavigationResource', ['$resource','AtlasConfig', function($resource, AtlasConfig) { angular.module('dgc.navigation').factory('navigationResource', ['$resource', 'atlasConfig', function($resource, atlasConfig) {
return $resource(AtlasConfig.API_ENDPOINTS.TRAITS_LIST, {}, { return $resource(atlasConfig.API_ENDPOINTS.TRAITS_LIST, {}, {
get: { get: {
'method': 'GET', 'method': 'GET',
'responseType': 'json', 'responseType': 'json',
'isArray': true, 'isArray': true,
'cache' : true, 'cache': true,
'transformResponse': function(data) { 'transformResponse': function(data) {
var results = []; var results = [];
angular.forEach(data && data.results, function(val) { angular.forEach(data && data.results, function(val) {
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
~ limitations under the License. ~ limitations under the License.
--> -->
<div data-ng-controller="NavigationController" class="mainTags leftNavigation"> <div data-ng-controller="navigationController" class="main-tags leftNavigation">
<div> <div>
<h4 class="pull-left">Tags</h4> <h4 class="pull-left">Tags</h4>
<a href ng-click="refreshTags()" class="pull-right"> <img src="../img/refresh.png" style="margin: 5px;" title="Refresh Tags" ></a> <a href ng-click="refreshTags()" class="pull-right"> <img src="../img/refresh.png" style="margin: 5px;" title="Refresh Tags" ></a>
...@@ -24,6 +24,6 @@ ...@@ -24,6 +24,6 @@
</br> </br>
</br> </br>
<div class="list-group"> <div class="list-group">
<a ng-repeat="nav in leftnav" ui-sref="search({ query: nav })" class="list-group-item limitSize" title="{{nav}}"><i class="fa fa-tag"></i> {{nav}} </a> <a ng-repeat="nav in leftnav" ui-sref="search({ query: nav })" class="list-group-item limit-size" title="{{nav}}"><i class="fa fa-tag"></i> {{nav}} </a>
</div> </div>
</div> </div>
\ No newline at end of file
...@@ -18,13 +18,13 @@ ...@@ -18,13 +18,13 @@
'use strict'; 'use strict';
angular.module('dgc.system.notification').controller('NotificationController', ['$scope', 'NotificationService', angular.module('dgc.system.notification').controller('notificationController', ['$scope', 'notificationService',
function($scope, NotificationService) { function($scope, notificationService) {
$scope.getNotifications = NotificationService.getAll; $scope.getNotifications = notificationService.getAll;
$scope.close = function(notification) { $scope.close = function(notification) {
NotificationService.close(notification); notificationService.close(notification);
}; };
} }
]); ]);
...@@ -18,13 +18,13 @@ ...@@ -18,13 +18,13 @@
'use strict'; 'use strict';
angular.module('dgc.system.notification', ['ui.router']).constant('ColorCoding', { angular.module('dgc.system.notification', ['ui.router']).constant('colorCoding', {
info: 'success', info: 'success',
error: 'danger' error: 'danger'
}).run(['$rootScope', 'NotificationService', function($rootScope, NotificationService) { }).run(['$rootScope', 'notificationService', function($rootScope, notificationService) {
$rootScope.$on('$locationChangeSuccess', function(evt, from, to) { $rootScope.$on('$locationChangeSuccess', function(evt, from, to) {
if (from !== to) { if (from !== to) {
NotificationService.reset(); notificationService.reset();
} }
}); });
}]); }]);
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
'use strict'; 'use strict';
angular.module('dgc.system.notification').service('NotificationService', ['$timeout', 'lodash', 'ColorCoding', function($timeout, _, colorCoding) { angular.module('dgc.system.notification').service('notificationService', ['$timeout', 'lodash', 'colorCoding', function($timeout, _, colorCoding) {
var notifications = [], var notifications = [],
service = { service = {
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
~ limitations under the License. ~ limitations under the License.
--> -->
<div class="container" data-ng-controller="NotificationController"> <div class="container" data-ng-controller="notificationController">
<alert data-ng-repeat="notification in getNotifications()" data-type="{{notification.type}}" data-close="close(notification)" class="notifier"> <alert data-ng-repeat="notification in getNotifications()" data-type="{{notification.type}}" data-close="close(notification)" class="notifier">
{{notification.message}} {{notification.message}}
</alert> </alert>
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
*/ */
'use strict'; 'use strict';
angular.module('dgc.search').controller('SearchController', ['$scope', '$location', '$http', '$state', '$stateParams', 'lodash', 'SearchResource', 'DetailsResource', 'NotificationService', angular.module('dgc.search').controller('searchController', ['$scope', '$location', '$http', '$state', '$stateParams', 'lodash', 'searchResource', 'detailsResource', 'notificationService',
function($scope, $location, $http, $state, $stateParams, _, SearchResource, DetailsResource, NotificationService) { function($scope, $location, $http, $state, $stateParams, _, searchResource, detailsResource, notificationService) {
$scope.results = []; $scope.results = [];
$scope.resultCount = 0; $scope.resultCount = 0;
...@@ -51,7 +51,7 @@ angular.module('dgc.search').controller('SearchController', ['$scope', '$locatio ...@@ -51,7 +51,7 @@ angular.module('dgc.search').controller('SearchController', ['$scope', '$locatio
} }
var getName = function(gid, obj) { var getName = function(gid, obj) {
DetailsResource.get({ detailsResource.get({
id: gid id: gid
}, function(data) { }, function(data) {
if (data.values && data.values.name) { if (data.values && data.values.name) {
...@@ -91,11 +91,11 @@ angular.module('dgc.search').controller('SearchController', ['$scope', '$locatio ...@@ -91,11 +91,11 @@ angular.module('dgc.search').controller('SearchController', ['$scope', '$locatio
$scope.search = function(query) { $scope.search = function(query) {
$scope.results = []; $scope.results = [];
NotificationService.reset(); notificationService.reset();
$scope.limit = 4; $scope.limit = 4;
$scope.searchMessage = 'load-gif'; $scope.searchMessage = 'load-gif';
$scope.$parent.query = query; $scope.$parent.query = query;
SearchResource.search({ searchResource.search({
query: query query: query
}, function searchSuccess(response) { }, function searchSuccess(response) {
$scope.resultCount = response.count; $scope.resultCount = response.count;
...@@ -153,12 +153,12 @@ angular.module('dgc.search').controller('SearchController', ['$scope', '$locatio ...@@ -153,12 +153,12 @@ angular.module('dgc.search').controller('SearchController', ['$scope', '$locatio
return Math.ceil($scope.resultCount / $scope.itemsPerPage); return Math.ceil($scope.resultCount / $scope.itemsPerPage);
}; };
if ($scope.results.length < 1) { if ($scope.results.length < 1) {
NotificationService.error('No Result found', false); notificationService.error('No Result found', false);
} }
}); });
}, function searchError(err) { }, function searchError(err) {
$scope.searchMessage = '0 results matching your search query ' + $scope.query + ' were found'; $scope.searchMessage = '0 results matching your search query ' + $scope.query + ' were found';
NotificationService.error('Error occurred during executing search query, error status code = ' + err.status + ', status text = ' + err.statusText, false); notificationService.error('Error occurred during executing search query, error status code = ' + err.status + ', status text = ' + err.statusText, false);
}); });
$state.go('search', { $state.go('search', {
query: query query: query
...@@ -251,7 +251,7 @@ angular.module('dgc.search').controller('SearchController', ['$scope', '$locatio ...@@ -251,7 +251,7 @@ angular.module('dgc.search').controller('SearchController', ['$scope', '$locatio
}; };
$scope.getResourceDataHome = function(event, id) { $scope.getResourceDataHome = function(event, id) {
DetailsResource.get({ detailsResource.get({
id: id id: id
}, function(data) { }, function(data) {
if ($scope.filteredResults !== null && Object.keys($scope.filteredResults).length > 0) { if ($scope.filteredResults !== null && Object.keys($scope.filteredResults).length > 0) {
...@@ -288,4 +288,4 @@ angular.module('dgc.search').controller('SearchController', ['$scope', '$locatio ...@@ -288,4 +288,4 @@ angular.module('dgc.search').controller('SearchController', ['$scope', '$locatio
$scope.search($scope.query); $scope.search($scope.query);
} }
} }
]); ]);
\ No newline at end of file
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
'use strict'; 'use strict';
angular.module('dgc.search').factory('SearchResource', ['$resource', 'AtlasConfig', function($resource, AtlasConfig) { angular.module('dgc.search').factory('searchResource', ['$resource', 'atlasConfig', function($resource, atlasConfig) {
return $resource(AtlasConfig.API_ENDPOINTS.SEARCH, {}, { return $resource(atlasConfig.API_ENDPOINTS.SEARCH, {}, {
search: { search: {
'method': 'GET', 'method': 'GET',
'responseType': 'json', 'responseType': 'json',
......
...@@ -23,22 +23,22 @@ angular.module('dgc.search').config(['$stateProvider', ...@@ -23,22 +23,22 @@ angular.module('dgc.search').config(['$stateProvider',
$stateProvider.state('search', { $stateProvider.state('search', {
url: '/search?query', url: '/search?query',
templateUrl: '/modules/search/views/search.html', templateUrl: '/modules/search/views/search.html',
controller: 'SearchController' controller: 'searchController'
}); });
$stateProvider.state('addTagHome', { $stateProvider.state('addTagHome', {
parent: 'search', parent: 'search',
params: { params: {
tId: null, tId: null,
frm : 'search' frm: 'search'
}, },
onEnter: ['$stateParams', '$state', '$modal', 'NavigationResource', function($stateParams, $state, $modal, NavigationResource) { onEnter: ['$stateParams', '$state', '$modal', 'navigationResource', function($stateParams, $state, $modal, navigationResource) {
$modal.open({ $modal.open({
templateUrl: '/modules/tags/instance/views/createTag.html', templateUrl: '/modules/tags/instance/views/createTag.html',
controller: 'CreateTagController', controller: 'createTagController',
windowClass: 'create-tag-entity', windowClass: 'create-tag-entity',
resolve: { resolve: {
typesList: function() { typesList: function() {
return NavigationResource.get().$promise; return navigationResource.get().$promise;
} }
} }
}).result.finally(function() { }).result.finally(function() {
...@@ -47,4 +47,4 @@ angular.module('dgc.search').config(['$stateProvider', ...@@ -47,4 +47,4 @@ angular.module('dgc.search').config(['$stateProvider',
}] }]
}); });
} }
]); ]);
\ No newline at end of file
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
--> -->
<div class="col-lg-10 paddingR0"> <div class="col-lg-10 paddingR0">
<div class=""> <div class="">
<div class="row mainSearch"> <div class="row main-search">
<form class="col-lg-12" name="form" novalidate> <form class="col-lg-12" name="form" novalidate>
<div class="input-group"> <div class="input-group">
<input type="text" class="form-control" placeholder="Search: Table, DB, Column" data-ng-model="query" required/> <input type="text" class="form-control" placeholder="Search: Table, DB, Column" data-ng-model="query" required/>
...@@ -31,11 +31,11 @@ ...@@ -31,11 +31,11 @@
</div> </div>
</form> </form>
</div> </div>
<div class="col-lg-12 padding0 searchresults"> <div class="col-lg-12 padding0 search-results">
<div ng-switch on="searchMessage"> <div ng-switch on="searchMessage">
<div ng-switch-when="load-gif" class="search-spinner"><img src="../img/spinner.gif" align="middle" /></div> <div ng-switch-when="load-gif" class="search-spinner"><img src="../img/spinner.gif" align="middle" /></div>
<div ng-switch-default> <div ng-switch-default>
<h4 ng-show="searchMessage" title="{{searchMessage}}" class="tabsearchResult">{{searchMessage}}</h4> <h4 ng-show="searchMessage" title="{{searchMessage}}" class="tabsearch-result">{{searchMessage}}</h4>
</div> </div>
</div> </div>
<div class="panel panel-default" ng-show='resultCount > 0'> <div class="panel panel-default" ng-show='resultCount > 0'>
...@@ -68,9 +68,9 @@ ...@@ -68,9 +68,9 @@
</span> </span>
</td> </td>
<td> <td>
<div id="{{result['$id$'].id || result.guid}}" ng-show="!dataTransitioned" class="wordBreak"><a class="tabsearchanchor" ng-repeat="(key, value) in result['$traits$']" data-ui-sref="search({query: key})" title="{{key}}">{{key}}<span> </span></a></div> <div id="{{result['$id$'].id || result.guid}}" ng-show="!dataTransitioned" class="word-break"><a class="tab-search-tags" ng-repeat="(key, value) in result['$traits$']" data-ui-sref="search({query: key})" title="{{key}}">{{key}}<span> </span></a></div>
</td> </td>
<td class="addTag"><img ng-src="img/addTag.png" tooltip="Add Tag" ng-click="openAddTagHome(result['$id$'].id || result.guid)"></td> <td class="add-tag"><img ng-src="img/addTag.png" tooltip="Add Tag" ng-click="openAddTagHome(result['$id$'].id || result.guid)"></td>
</tr> </tr>
<tr ng-if="isTag(resultType)" ng-repeat="result in filteredResults track by $index"> <tr ng-if="isTag(resultType)" ng-repeat="result in filteredResults track by $index">
<td data-ng-if="isObject(result) && !isString(result) && res != 'id' && res != 'guid'" data-ng-repeat="res in transformedProperties track by $index"> <td data-ng-if="isObject(result) && !isString(result) && res != 'id' && res != 'guid'" data-ng-repeat="res in transformedProperties track by $index">
...@@ -85,11 +85,11 @@ ...@@ -85,11 +85,11 @@
<span data-ng-if="res.toLowerCase().indexOf('name') != -1 && !result['id'] && !result['guid']">{{result[res]}}</span> <span data-ng-if="res.toLowerCase().indexOf('name') != -1 && !result['id'] && !result['guid']">{{result[res]}}</span>
<div data-ng-if="res == '$traits$'" class="wordBreak tags" id="{{result['id']|| result['guid']}}"> <div data-ng-if="res == '$traits$'" class="word-break tags" id="{{result['id']|| result['guid']}}">
<a class="tabsearchanchor" ng-repeat="(key, value) in result[res]" data-ui-sref="search({query: key})" title="{{key}}">{{key}}<span> </span></a> <a class="tab-search-tags" ng-repeat="(key, value) in result[res]" data-ui-sref="search({query: key})" title="{{key}}">{{key}}<span> </span></a>
</div> </div>
<span data-ng-if="res == 'Tools'" class="addTag"> <img ng-src="img/addTag.png" tooltip="Add Tag" ng-click="openAddTagHome(result['id']|| result['guid'])"> </span> <span data-ng-if="res == 'Tools'" class="add-tag"> <img ng-src="img/addTag.png" tooltip="Add Tag" ng-click="openAddTagHome(result['id']|| result['guid'])"> </span>
</td> </td>
<td data-ng-if="isString(result) || result == false || result == true"> <td data-ng-if="isString(result) || result == false || result == true">
<a data-ng-if="result.toLowerCase() == 'guid'" data-ui-sref="details({id:result})">{{result}}</a> <a data-ng-if="result.toLowerCase() == 'guid'" data-ui-sref="details({id:result})">{{result}}</a>
......
...@@ -15,15 +15,11 @@ ...@@ -15,15 +15,11 @@
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ limitations under the License.
--> -->
<!--
<h4 ng-show='results.rows.length > 0'>{{results.rows.length}} results matching your search query "{{query}}" were found</h4>
<h4 ng-show='results.rows.length == "0"'>searching .....</h4>
<h4 ng-show='!(results.rows)'>0 results matching your search query "{{query}}" were found</h4>-->
<h4 ng-show="searchMessage">{{searchMessage}}</h4> <h4 ng-show="searchMessage">{{searchMessage}}</h4>
<ul class="list-unstyled"> <ul class="list-unstyled">
<li ng-repeat="result in filteredResults" class="searchresults"> <li ng-repeat="result in filteredResults" class="search-results">
<h4><a data-ui-sref="details({id:result['$id$'].id})">{{result.name}}</a></h4> <h4><a data-ui-sref="details({id:result['$id$'].id})">{{result.name}}</a></h4>
<p>{{result.description}}</p> <p>{{result.description}}</p>
<span ng-repeat="(key, value) in filterSearchResults(result)" > <span ng-repeat="(key, value) in filterSearchResults(result)" >
......
...@@ -17,63 +17,63 @@ ...@@ -17,63 +17,63 @@
*/ */
'use strict'; 'use strict';
angular.module('dgc.tags.definition').controller('DefinitionTagsController', ['$scope', '$resource', '$state', '$stateParams', 'lodash', 'AttributeDefinition', 'TagClasses', 'TagsResource', 'NotificationService', 'NavigationResource', '$cacheFactory','AtlasConfig', angular.module('dgc.tags.definition').controller('definitionTagsController', ['$scope', '$resource', '$state', '$stateParams', 'lodash', 'attributeDefinition', 'tagClasses', 'tagsResource', 'notificationService', 'navigationResource', '$cacheFactory', 'atlasConfig',
function($scope, $resource, $state, $stateParams, _, AttributeDefinition, Categories, TagsResource, NotificationService, NavigationResource, $cacheFactory,AtlasConfig) { function($scope, $resource, $state, $stateParams, _, attributeDefinition, categories, tagsResource, notificationService, navigationResource, $cacheFactory, atlasConfig) {
$scope.categoryList = Categories; $scope.categoryList = categories;
$scope.category = 'TRAIT'; $scope.category = 'TRAIT';
$scope.tagModel = { $scope.tagModel = {
typeName: null, typeName: null,
superTypes: [], superTypes: [],
attributeDefinitions: [] attributeDefinitions: []
}; };
$scope.typesList = NavigationResource.get(); $scope.typesList = navigationResource.get();
$scope.newtagModel = angular.copy($scope.tagModel); $scope.newtagModel = angular.copy($scope.tagModel);
$scope.addAttribute = function AddAttribute() { $scope.addAttribute = function addAttribute() {
$scope.tagModel.attributeDefinitions.push(AttributeDefinition.getModel()); $scope.tagModel.attributeDefinitions.push(attributeDefinition.getModel());
}; };
$scope.removeAttribute = function(index) { $scope.removeAttribute = function(index) {
$scope.tagModel.attributeDefinitions.splice(index, 1); $scope.tagModel.attributeDefinitions.splice(index, 1);
}; };
$scope.categoryChange = function CategorySwitched() { $scope.categoryChange = function categorySwitched() {
$scope.categoryInst = Categories[$scope.category].clearTags(); $scope.categoryInst = categories[$scope.category].clearTags();
}; };
$scope.reset = function(){ $scope.reset = function() {
$scope.tagModel = angular.copy($scope.newtagModel); $scope.tagModel = angular.copy($scope.newtagModel);
$scope.selectedParent = undefined; $scope.selectedParent = undefined;
}; };
$scope.refreshTags = function(){ $scope.refreshTags = function() {
var httpDefaultCache = $cacheFactory.get('$http'); var httpDefaultCache = $cacheFactory.get('$http');
httpDefaultCache.remove(AtlasConfig.API_ENDPOINTS.TRAITS_LIST); httpDefaultCache.remove(atlasConfig.API_ENDPOINTS.TRAITS_LIST);
$scope.typesList = NavigationResource.get(); $scope.typesList = navigationResource.get();
}; };
$scope.save = function saveTag(form) { $scope.save = function saveTag(form) {
$scope.savedTag = null; $scope.savedTag = null;
if (form.$valid) { if (form.$valid) {
$scope.tagModel.superTypes = $scope.selectedParent; $scope.tagModel.superTypes = $scope.selectedParent;
$scope.categoryInst = Categories[$scope.category]; $scope.categoryInst = categories[$scope.category];
$scope.categoryInst.clearTags().addTag($scope.tagModel); $scope.categoryInst.clearTags().addTag($scope.tagModel);
NotificationService.reset(); notificationService.reset();
$scope.saving = true; $scope.saving = true;
TagsResource.save($scope.categoryInst.toJson()).$promise tagsResource.save($scope.categoryInst.toJson()).$promise
.then(function TagCreateSuccess() { .then(function tagCreateSuccess() {
NotificationService.info('"' + $scope.tagModel.typeName + '" has been created', false); notificationService.info('"' + $scope.tagModel.typeName + '" has been created', false);
var httpDefaultCache = $cacheFactory.get('$http'); var httpDefaultCache = $cacheFactory.get('$http');
httpDefaultCache.remove(AtlasConfig.API_ENDPOINTS.TRAITS_LIST); httpDefaultCache.remove(atlasConfig.API_ENDPOINTS.TRAITS_LIST);
$scope.typesList = NavigationResource.get(); $scope.typesList = navigationResource.get();
$scope.reset(); $scope.reset();
}).catch(function TagCreateFailed(error) { }).catch(function tagCreateFailed(error) {
NotificationService.error(error.data.error, false); notificationService.error(error.data.error, false);
}).finally(function() { }).finally(function() {
$scope.saving = false; $scope.saving = false;
}); });
} }
}; };
} }
]); ]);
\ No newline at end of file
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
'use strict'; 'use strict';
angular.module('dgc.tags.definition').service('AttributeDefinition', function Attribute() { angular.module('dgc.tags.definition').service('attributeDefinition', function attribute() {
this.getModel = function getJson() { this.getModel = function getJson() {
return { return {
name: null, name: null,
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
~ limitations under the License. ~ limitations under the License.
--> -->
<div class="row"> <div class="row">
<div class="appForm col-lg-12" data-ng-controller="DefinitionTagsController"> <div class="app-form col-lg-12" data-ng-controller="definitionTagsController">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"><h4>Tag Definition</h4></div> <div class="panel-heading"><h4>Tag Definition</h4></div>
<div class="panel-body inputs"> <div class="panel-body inputs">
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
<label for="attributeIscomposite_{{$index}}" class="col-sm-2 control-label">isComposite</label> <label for="attributeIscomposite_{{$index}}" class="col-sm-2 control-label">isComposite</label>
<div class="col-sm-10"> <div class="col-sm-10">
<span class ="btnToggle"> <span class ="btn-toggle">
<a class="btn-sm " ng-class="{true: 'btn-primary'}[attribute.isComposite]" ng-click="attribute.isComposite = true">true </a> <a class="btn-sm " ng-class="{true: 'btn-primary'}[attribute.isComposite]" ng-click="attribute.isComposite = true">true </a>
<a class="btn-sm " ng-class="{false: 'btn-danger'}[attribute.isComposite]" ng-click="attribute.isComposite = false"> false </a> <a class="btn-sm " ng-class="{false: 'btn-danger'}[attribute.isComposite]" ng-click="attribute.isComposite = false"> false </a>
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
<label for="attributeIsunique_{{$index}}" class="col-sm-2 control-label">isUnique</label> <label for="attributeIsunique_{{$index}}" class="col-sm-2 control-label">isUnique</label>
<div class="col-sm-10"> <div class="col-sm-10">
<span class ="btnToggle"> <span class ="btn-toggle">
<a class="btn-sm " ng-class="{true: 'btn-primary'}[attribute.isUnique]" ng-click="attribute.isUnique = true">true </a> <a class="btn-sm " ng-class="{true: 'btn-primary'}[attribute.isUnique]" ng-click="attribute.isUnique = true">true </a>
<a class="btn-sm " ng-class="{false: 'btn-danger'}[attribute.isUnique]" ng-click="attribute.isUnique = false"> false </a> <a class="btn-sm " ng-class="{false: 'btn-danger'}[attribute.isUnique]" ng-click="attribute.isUnique = false"> false </a>
...@@ -110,15 +110,13 @@ ...@@ -110,15 +110,13 @@
<label for="attributeIndexable_{{$index}}" class="col-sm-2 control-label">isIndexable</label> <label for="attributeIndexable_{{$index}}" class="col-sm-2 control-label">isIndexable</label>
<div class="col-sm-10"> <div class="col-sm-10">
<span class ="btnToggle"> <span class ="btn-toggle">
<a class="btn-sm " ng-class="{true: 'btn-primary'}[attribute.isIndexable]" ng-click="attribute.isIndexable = true">true </a> <a class="btn-sm " ng-class="{true: 'btn-primary'}[attribute.isIndexable]" ng-click="attribute.isIndexable = true">true </a>
<a class="btn-sm " ng-class="{false: 'btn-danger'}[attribute.isIndexable]" ng-click="attribute.isIndexable = false"> false </a> <a class="btn-sm " ng-class="{false: 'btn-danger'}[attribute.isIndexable]" ng-click="attribute.isIndexable = false"> false </a>
</span> </span>
</div> </div>
</div> </div>
<div class="form-group" data-ng-class="{'has-error': attributeForm.name.$invalid && attributeForm.name.$dirty}" data-ng-show="attribute.$$show" <div class="form-group" data-ng-class="{'has-error': attributeForm.name.$invalid && attributeForm.name.$dirty}" data-ng-show="attribute.$$show"
data-ng-repeat-end> data-ng-repeat-end>
<label for="attributeReverseName_{{$index}}" class="col-sm-2 control-label">reverseAttributeName</label> <label for="attributeReverseName_{{$index}}" class="col-sm-2 control-label">reverseAttributeName</label>
...@@ -142,10 +140,6 @@ ...@@ -142,10 +140,6 @@
</div> </div>
</fieldset> </fieldset>
</form> </form>
<!-- <div class="row" data-ng-show="savedTag">
<pre>{{savedTag | json}}</pre>
</div> -->
</div> </div>
</div> </div>
</div> </div>
......
...@@ -17,13 +17,13 @@ ...@@ -17,13 +17,13 @@
*/ */
'use strict'; 'use strict';
angular.module('dgc.tags.instance').controller('CreateTagController', ['$scope', 'DetailsResource', '$modalInstance', 'typesList', 'lodash', 'TagsResource', '$stateParams', '$rootScope', 'TagClasses', 'NotificationService', angular.module('dgc.tags.instance').controller('createTagController', ['$scope', 'detailsResource', '$modalInstance', 'typesList', 'lodash', 'tagsResource', '$stateParams', '$rootScope', 'tagClasses', 'notificationService',
function($scope, DetailsResource, $modalInstance, typesList, _, TagsResource, $stateParams, $rootScope, Categories) { function($scope, detailsResource, $modalInstance, typesList, _, tagsResource, $stateParams, $rootScope, categories) {
if (typesList) { if (typesList) {
$scope.typesList = typesList; $scope.typesList = typesList;
} }
var $$ = angular.element; var $$ = angular.element;
$scope.categoryList = Categories; $scope.categoryList = categories;
$scope.category = 'TRAIT'; $scope.category = 'TRAIT';
$scope.isSuccess = false; $scope.isSuccess = false;
$scope.getAttributeDefinations = function() { $scope.getAttributeDefinations = function() {
...@@ -33,10 +33,10 @@ angular.module('dgc.tags.instance').controller('CreateTagController', ['$scope', ...@@ -33,10 +33,10 @@ angular.module('dgc.tags.instance').controller('CreateTagController', ['$scope',
}; };
$scope.getAttributeApi = function(tagName) { $scope.getAttributeApi = function(tagName) {
TagsResource.get({ tagsResource.get({
id: tagName id: tagName
}, function(data) { }, function(data) {
var instanceType = Categories[$scope.category].instanceInfo(); var instanceType = categories[$scope.category].instanceInfo();
if (instanceType) { if (instanceType) {
var traitTypes = angular.fromJson(data.definition)[instanceType]; var traitTypes = angular.fromJson(data.definition)[instanceType];
...@@ -59,26 +59,26 @@ angular.module('dgc.tags.instance').controller('CreateTagController', ['$scope', ...@@ -59,26 +59,26 @@ angular.module('dgc.tags.instance').controller('CreateTagController', ['$scope',
}); });
}; };
$scope.ok = function($event, tagDefinitionform) { $scope.ok = function($event, tagDefinitionform) {
$scope.isSuccess = false; $scope.isSuccess = false;
if (tagDefinitionform.$valid) { if (tagDefinitionform.$valid) {
var requestObject = { var requestObject = {
"jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Struct", "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Struct",
"typeName": $scope.selectedType, "typeName": $scope.selectedType,
"values": $scope.propertiesList "values": $scope.propertiesList
}; };
DetailsResource.saveTag({ detailsResource.saveTag({
id: $stateParams.tId id: $stateParams.tId
}, requestObject).$promise.then(function(data) { }, requestObject).$promise.then(function(data) {
if (data.requestId !== undefined && data.GUID === $stateParams.tId) { if (data.requestId !== undefined && data.GUID === $stateParams.tId) {
var tagName = $$("#tagDefinition").val(); var tagName = $$("#tagDefinition").val();
if($stateParams.frm && $stateParams.frm !== 'details'){ if ($stateParams.frm && $stateParams.frm !== 'details') {
$rootScope.updateTags(true, { $rootScope.updateTags(true, {
added: $scope.selectedType added: $scope.selectedType
}); });
$$("#" + $stateParams.tId).append("<a class='tabsearchanchor ng-binding ng-scope' data-ui-sref='search({query: " + tagName + "})' title='" + tagName + "' href='#!/search?query=" + tagName + "'>" + tagName + "<span> </span></a>"); $$("#" + $stateParams.tId).append("<a class='tab-search-tags ng-binding ng-scope' data-ui-sref='search({query: " + tagName + "})' title='" + tagName + "' href='#!/search?query=" + tagName + "'>" + tagName + "<span> </span></a>");
}else if($stateParams.frm === 'details'){ } else if ($stateParams.frm === 'details') {
$$("#" + $stateParams.tId+"_schema").append("<a class='tabsearchanchor ng-binding ng-scope' data-ui-sref='search({query: " + tagName + "})' title='" + tagName + "' href='#!/search?query=" + tagName + "'>" + tagName + "<span> </span></a>"); $$("#" + $stateParams.tId + "_schema").append("<a class='tab-search-tags ng-binding ng-scope' data-ui-sref='search({query: " + tagName + "})' title='" + tagName + "' href='#!/search?query=" + tagName + "'>" + tagName + "<span> </span></a>");
} }
} }
$scope.successmessage = 'Tag "' + $scope.selectedType + '" has been added to entity'; $scope.successmessage = 'Tag "' + $scope.selectedType + '" has been added to entity';
$scope.isSuccess = true; $scope.isSuccess = true;
...@@ -93,4 +93,4 @@ angular.module('dgc.tags.instance').controller('CreateTagController', ['$scope', ...@@ -93,4 +93,4 @@ angular.module('dgc.tags.instance').controller('CreateTagController', ['$scope',
$modalInstance.dismiss('cancel'); $modalInstance.dismiss('cancel');
}; };
} }
]); ]);
\ No newline at end of file
...@@ -17,13 +17,13 @@ ...@@ -17,13 +17,13 @@
*/ */
'use strict'; 'use strict';
angular.module('dgc.tags.instance').controller('InstanceTagController', ['$scope', 'DetailsResource', '$stateParams', '$state', angular.module('dgc.tags.instance').controller('instanceTagController', ['$scope', 'detailsResource', '$stateParams', '$state',
function($scope, DetailsResource, $stateParams, $state) { function($scope, detailsResource, $stateParams, $state) {
$scope.id = $stateParams.id; $scope.id = $stateParams.id;
var $$ = angular.element; var $$ = angular.element;
function getResourceData() { function getResourceData() {
DetailsResource.get({ detailsResource.get({
id: $stateParams.id id: $stateParams.id
}, function(data) { }, function(data) {
...@@ -58,7 +58,6 @@ angular.module('dgc.tags.instance').controller('InstanceTagController', ['$scope ...@@ -58,7 +58,6 @@ angular.module('dgc.tags.instance').controller('InstanceTagController', ['$scope
} }
}); });
$scope.openAddTag = function() { $scope.openAddTag = function() {
$state.go('addTag', { $state.go('addTag', {
tId: $scope.id tId: $scope.id
...@@ -72,7 +71,7 @@ angular.module('dgc.tags.instance').controller('InstanceTagController', ['$scope ...@@ -72,7 +71,7 @@ angular.module('dgc.tags.instance').controller('InstanceTagController', ['$scope
$scope.removeTag = function() { $scope.removeTag = function() {
$$("#myModal").modal(); $$("#myModal").modal();
var name = $scope.displayName; var name = $scope.displayName;
DetailsResource.detachTag({ detailsResource.detachTag({
id: $stateParams.id, id: $stateParams.id,
tagName: name tagName: name
}, function(data) { }, function(data) {
...@@ -96,4 +95,4 @@ angular.module('dgc.tags.instance').controller('InstanceTagController', ['$scope ...@@ -96,4 +95,4 @@ angular.module('dgc.tags.instance').controller('InstanceTagController', ['$scope
getResourceData(); getResourceData();
$scope.$on('refreshResourceData', getResourceData); $scope.$on('refreshResourceData', getResourceData);
} }
]); ]);
\ No newline at end of file
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div class="form-group"> <div class="form-group">
<div align="center" class="error col-sm-12 tabsearchResult pointer" title="{{error}}" ng-show="isError"> <div align="center" class="error col-sm-12 tabsearch-result pointer" title="{{error}}" ng-show="isError">
{{error}} {{error}}
</div> </div>
<div class="alert alert-success" ng-if="isSuccess" > <div class="alert alert-success" ng-if="isSuccess" >
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ limitations under the License.
--> -->
<div data-ng-controller="InstanceTagController" > <div data-ng-controller="instanceTagController" >
<div> <div>
<a ng-click="openAddTag()" class="add-tag btn btn-primary pull-right">Add Tag</a> <a ng-click="openAddTag()" class="add-tag btn btn-primary pull-right">Add Tag</a>
</div> </div>
...@@ -37,13 +37,12 @@ ...@@ -37,13 +37,12 @@
<td class="col-lg-5 tag-attr" > <td class="col-lg-5 tag-attr" >
{{trait.values}} {{trait.values}}
</td> </td>
<td class="col-lg-1 tagAlign"> <td class="col-lg-1 tag-align">
<a href="" class="deleteTag confirm-delete" data-toggle="modal" data-target="#myModal" ><i class="fa fa-trash-o " ng-click="detachTag($event, trait.typeName)"></i></a> <a href="" class="deleteTag confirm-delete" data-toggle="modal" data-target="#myModal" ><i class="fa fa-trash-o " ng-click="detachTag($event, trait.typeName)"></i></a>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document"> <div class="modal-dialog" role="document">
<div class="modal-content"> <div class="modal-content">
...@@ -61,7 +60,7 @@ ...@@ -61,7 +60,7 @@
</div> </div>
</div> </div>
</div> </div>
<div ng-if="noTags" class="noTags"> <div ng-if="noTags" class="no-tags">
No tags to display No tags to display
</div> </div>
</div> </div>
\ No newline at end of file
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
'use strict'; 'use strict';
angular.module('dgc.tags').factory('TagClasses', ['lodash', function ClassFactory(_) { angular.module('dgc.tags').factory('tagClasses', ['lodash', function classFactory(_) {
function Tag(props) { function Tag(props) {
return _.merge({ return _.merge({
...@@ -47,7 +47,7 @@ angular.module('dgc.tags').factory('TagClasses', ['lodash', function ClassFactor ...@@ -47,7 +47,7 @@ angular.module('dgc.tags').factory('TagClasses', ['lodash', function ClassFactor
this.id = classId; this.id = classId;
this.name = className; this.name = className;
this.addTag = function AddTag(props) { this.addTag = function addTag(props) {
var tag = new Tag(_.merge({ var tag = new Tag(_.merge({
hierarchicalMetaTypeName: className hierarchicalMetaTypeName: className
}, props)); }, props));
...@@ -56,12 +56,12 @@ angular.module('dgc.tags').factory('TagClasses', ['lodash', function ClassFactor ...@@ -56,12 +56,12 @@ angular.module('dgc.tags').factory('TagClasses', ['lodash', function ClassFactor
return this; return this;
}; };
this.clearTags = function RemoveTags() { this.clearTags = function removeTags() {
this.tags = []; this.tags = [];
return this; return this;
}; };
this.toJson = function CreateJson() { this.toJson = function createJson() {
var classTypeKey = (this.id.toLowerCase() + 'Types'), var classTypeKey = (this.id.toLowerCase() + 'Types'),
output = {}; output = {};
...@@ -79,7 +79,7 @@ angular.module('dgc.tags').factory('TagClasses', ['lodash', function ClassFactor ...@@ -79,7 +79,7 @@ angular.module('dgc.tags').factory('TagClasses', ['lodash', function ClassFactor
} }
return _.chain(classes) return _.chain(classes)
.map(function CreateClass(className, classId) { .map(function createClass(className, classId) {
return new Class(classId, className); return new Class(classId, className);
}) })
.indexBy('id') .indexBy('id')
......
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
'use strict'; 'use strict';
angular.module('dgc.tags').factory('TagsResource', ['$resource', 'AtlasConfig', function($resource, AtlasConfig) { angular.module('dgc.tags').factory('tagsResource', ['$resource', 'atlasConfig', function($resource, atlasConfig) {
return $resource(AtlasConfig.API_ENDPOINTS.CREATE_TRAIT + '/:id', {}, { return $resource(atlasConfig.API_ENDPOINTS.CREATE_TRAIT + '/:id', {}, {
query: { query: {
method: 'GET', method: 'GET',
transformResponse: function(data) { transformResponse: function(data) {
......
...@@ -28,16 +28,16 @@ angular.module('dgc.tags').config(['$stateProvider', ...@@ -28,16 +28,16 @@ angular.module('dgc.tags').config(['$stateProvider',
parent: 'details', parent: 'details',
params: { params: {
tId: null, tId: null,
frm : 'addTag' frm: 'addTag'
}, },
onEnter: ['$stateParams', '$state', '$modal', 'NavigationResource', function($stateParams, $state, $modal, NavigationResource) { onEnter: ['$stateParams', '$state', '$modal', 'navigationResource', function($stateParams, $state, $modal, navigationResource) {
$modal.open({ $modal.open({
templateUrl: '/modules/tags/instance/views/createTag.html', templateUrl: '/modules/tags/instance/views/createTag.html',
controller: 'CreateTagController', controller: 'createTagController',
windowClass: 'create-tag-entity', windowClass: 'create-tag-entity',
resolve: { resolve: {
typesList: function() { typesList: function() {
return NavigationResource.get().$promise; return navigationResource.get().$promise;
} }
} }
}).result.finally(function() { }).result.finally(function() {
......
...@@ -9,6 +9,7 @@ ATLAS-409 Atlas will not import avro tables with schema read from a file (dosset ...@@ -9,6 +9,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) ATLAS-379 Create sqoop and falcon metadata addons (venkatnrangan,bvellanki,sowmyaramesh via shwethags)
ALL CHANGES: ALL CHANGES:
ATLAS-364 UI Code standardization (darshankumar89 via shwethags)
ATLAS_396 Creating an entity with non-existing type results in "Unable to deserialize json" error (guptaneeru via sumasai) ATLAS_396 Creating an entity with non-existing type results in "Unable to deserialize json" error (guptaneeru via sumasai)
ATLAS-318 Config file conatining API endpoint + all api calls to be centralized (sanjayp via sumasai) ATLAS-318 Config file conatining API endpoint + all api calls to be centralized (sanjayp via sumasai)
ATLAS-471 Atlas Server could run out of memory due to Scala memory leak (yhemanth via sumasai) ATLAS-471 Atlas Server could run out of memory due to Scala memory leak (yhemanth via sumasai)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment