Commit ecd0f610 by Shwetha GS

ATLAS-364 UI Code standardization (darshankumar89 via shwethags)

parent 99921930
......@@ -96,33 +96,33 @@ header.navbar-top {
}
header a.mainLogo{
header a.main-logo{
color: #ffffff;
font-size: 16px;
line-height: 40px;
padding: 2px 5px 0 15px;
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;
}
header ul.menuBar li a{
header ul.menu-bar li a{
line-height: 10px;
color: #c3c3c3;
}
header ul.menuBar li a>i {
header ul.menu-bar li a>i {
margin-right: 3px;
font-size: 12px;
}
header ul.menuBar li a:hover{
header ul.menu-bar li a:hover{
color: #fff;
background: transparent;
}
header ul.menuBar li a:focus{
header ul.menu-bar li a:focus{
background: transparent;
}
header ul.menuBar li.active a{
header ul.menu-bar li.active a{
color: #333333;
background-color: #ffffff;
-webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
......@@ -148,7 +148,7 @@ footer.navbar-bottom img {
/*=======================================================================================
Search Bar design
=======================================================================================*/
.mainSearch input{
.main-search input{
height: 50px;
border-radius: 0px;
border: 1px solid #e3e3e3;
......@@ -157,7 +157,7 @@ Search Bar design
border-bottom-right-radius: 0px;
box-shadow: none;
}
.mainSearch .input-group-btn button{
.main-search .input-group-btn button{
border-radius: 0;
border-radius: 0;
padding: 14px 20px;
......@@ -166,7 +166,7 @@ Search Bar design
/*=======================================================================================
Tags on Home Page design
=======================================================================================*/
.mainTags{
.main-tags{
min-height: 20px;
margin-bottom: 20px;
background-color: #f5f5f5;
......@@ -175,7 +175,7 @@ Tags on Home Page design
-moz-border-radius: 0px;
border-radius: 0px;
}
.mainTags a{
.main-tags a{
background: transparent;
border: none;
padding:5px 10px;
......@@ -183,18 +183,18 @@ Tags on Home Page design
color: #0088cc !important;
border-radius: 0 !important;
}
.mainTags a:hover{
.main-tags a:hover{
color: #005580 !important;
background: #eeeeee !important;
}
.mainTags h4{
.main-tags h4{
padding:0 10px;
}
.mainTags i{
.main-tags i{
font-size: 12px;
margin-right: 3px;
}
.mainTags .list-group-item.limitSize{
.main-tags .list-group-item.limit-size{
overflow: hidden;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
......@@ -205,7 +205,7 @@ Tags on Home Page design
/*=======================================================================================
Search Bar design
=======================================================================================*/
.mainSearch input{
.main-search input{
height: 50px;
border-radius: 2px;
border: 1px solid #e3e3e3;
......@@ -214,18 +214,15 @@ Search Bar design
border-bottom-right-radius: 0px;
box-shadow: none;
}
.mainSearch .input-group-btn button{
.main-search .input-group-btn button{
border-top-left-radius: 0;
border-bottom-left-radius: 0;
padding: 14px 20px;
}
.breakword{
word-wrap: break-word;
}
/*=======================================================================================
Tags on Home Page design
=======================================================================================*/
.mainTags{
.main-tags{
min-height: 20px;
margin-bottom: 20px;
background-color: #f5f5f5;
......@@ -234,7 +231,7 @@ Tags on Home Page design
-moz-border-radius: 0px;
border-radius: 0px;
}
.mainTags a{
.main-tags a{
background: transparent;
border: none;
padding:5px 10px;
......@@ -242,14 +239,14 @@ Tags on Home Page design
color: #0088cc !important;
border-radius: 0 !important;
}
.mainTags a:hover{
.main-tags a:hover{
color: #005580 !important;
background: #eeeeee !important;
}
.mainTags h4{
.main-tags h4{
padding:0 10px;
}
.mainTags i{
.main-tags i{
font-size: 12px;
margin-right: 3px;
}
......@@ -266,52 +263,25 @@ Tags on Home Page design
.mt20px {
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 {
text-align: center;
}
.menulink{
.menu-link{
padding-left: 10px;
padding-right: 10px;
}
.btnToggle
.btn-toggle
{
border: 1px solid #CCCCCC;
padding: 5px;
}
.wordBreak {
.word-break {
word-break: break-word;
}
.tabsearchanchor {
.tab-search-tags {
max-width: 100px;
display: list-item;
overflow: hidden;
......@@ -328,7 +298,7 @@ Tags on Home Page design
padding-right: 7px !important;
}
.tabsearchResult {
.tabsearch-result {
max-width: 500px;
display: list-item;
overflow: hidden;
......@@ -337,7 +307,7 @@ Tags on Home Page design
white-space: nowrap;
text-transform: capitalize;
}
.searchResultCount {
.search-resultcount {
max-width: 500px;
display: list-item;
overflow: hidden;
......@@ -350,16 +320,16 @@ Tags on Home Page design
max-width: 125px !important;
}
.anchorAbsolute {
.anchor-absolute {
position: absolute;
right: 4px;
}
.addTag{
.add-tag{
margin-top: -35px;
}
.tagAlign{
.tag-align{
text-align: center;
}
......
......@@ -20,47 +20,47 @@
border-top: none;
}
.detailsPage .nav-tabs>li.active>a,
.detailsPage .nav-tabs>li.active>a:focus,
.detailsPage .nav-tabs>li.active>a:hover,
.detailsPage .nav-tabs>li>a:hover {
.details-page .nav-tabs>li.active>a,
.details-page .nav-tabs>li.active>a:focus,
.details-page .nav-tabs>li.active>a:hover,
.details-page .nav-tabs>li>a:hover {
border-radius: 0;
}
.detailsPage .nav-tabs>li.active>a,
.detailsPage .nav-tabs>li.active>a:focus{
.details-page .nav-tabs>li.active>a,
.details-page .nav-tabs>li.active>a:focus{
border-radius: 0;
background: #F8F8F8;
}
.detailsPage .nav-tabs>li>a {
.details-page .nav-tabs>li>a {
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;
}
.detailsPage .table td{
.details-page .table td{
padding-left: 15px;
}
.detailsPage .table tr:nth-child(even) td{
.details-page .table tr:nth-child(even) td{
padding-left: 15px;
background: #f9f9f9;
}
.detailsPage .table tr td:first-child{
.details-page .table tr td:first-child{
font-weight: bold;
}
.detailsPage .table th{
.details-page .table th{
padding-left: 15px;
background: #f8f8f8;
}
.detailsPage .lineage{
.details-page .lineage{
position: absolute;
width: 100%;
margin-top: 10px;
text-align: center;
z-index: -1;
}
.detailsPage .black{
.details-page .black{
color: #555;
}
\ No newline at end of file
......@@ -16,17 +16,6 @@
* limitations under the License.
*/
/*g circle {*/
/*cursor: pointer;*/
/*stroke: green;*/
/*stroke-width: 2px;*/
/*fill: url(#process-image);*/
/*}*/
/*g circle.empty {*/
/*fill: #90ef96;*/
/*}*/
.link {
fill: none;
stroke: green;
......@@ -48,31 +37,14 @@ div.lineage {
border-bottom: 2px solid #006600;
}
/*.node rect {*/
/*stroke: #333;*/
/*fill: #fff;*/
/*}*/
.edgePath path {
.edge-path path {
stroke: #333;
fill: #333;
stroke-width: 1.5px;
}
/*.node rect,*/
/*.node circle {*/
/*stroke: #333;*/
/*fill: #fff;*/
/*stroke-width: 1.5px;*/
/*}*/
.lineage-viz {
margin: 0 auto;
overflow: hidden;
/*border: 1px solid #ddd;
border-top: none;*/
}
.lineage-viz button{
margin: 5px;
......@@ -82,12 +54,7 @@ div.lineage {
.title-font{
font-size:12px!important;
}
/*.images {*/
/*background-image: url("../img/process.png");*/
/*}​*/
.alignLineage{
.align-lineage{
text-align: center;
margin-top: 100px;
font-size: 24px;
......
......@@ -16,14 +16,11 @@
* limitations under the License.
*/
/* Sticky footer styles
-------------------------------------------------- */
html {
position: relative;
min-height: 100%;
}
body {
/* Margin bottom by footer height */
margin-bottom: 60px;
}
......@@ -35,7 +32,6 @@ body {
position: absolute;
bottom: 0;
width: 100%;
/* Set the fixed height of the footer here */
height: 60px;
background-color: #f5f5f5;
}
\ No newline at end of file
......@@ -59,13 +59,13 @@
border-radius: 4px;
background-color: #a94442;
}
.appForm .panel {
.app-form .panel {
border-radius: 0 !important;
}
.appForm .panel-footer {
.app-form .panel-footer {
margin-bottom: 0;
}
.appForm .panel-body {
.app-form .panel-body {
padding-bottom: 0;
}
.input-spacing {
......@@ -93,22 +93,22 @@
background-color: inherit;
padding-right: 20px !important;
}
.addTag {
.add-tag {
text-align: center;
}
.addTag img {
.add-tag img {
cursor: pointer;
}
.searchResults td {
.search-results td {
border: 0;
}
.tagalign {
.tag-align {
margin-top: 14px;
}
.tagsAdded {
.tags-added {
display: inline;
}
.noTags {
.no-tags {
font-size: 24px;
font-weight: bold;
text-align: center;
......
......@@ -41,7 +41,7 @@ angular.module('dgc').factory('lodash', ['$window',
function($window) {
return $window.d3;
}
]).factory('Global', ['$window', '$location',
]).factory('global', ['$window', '$location',
function($window, $location) {
return {
user: $location.search()['user.name'],
......@@ -49,32 +49,32 @@ angular.module('dgc').factory('lodash', ['$window',
renderErrors: $window.renderErrors
};
}
]).factory('HttpInterceptor', ['Global', function(Global) {
]).factory('httpInterceptor', ['global', function(global) {
return {
'request': function(config) {
if (config.url && (config.url.indexOf(baseUrl) === 0 || config.url.indexOf(baseUrl) === 0)) {
config.params = config.params || {};
config.params['user.name'] = Global.user;
config.params['user.name'] = global.user;
}
return config;
}
};
}]).config(['$httpProvider', function($httpProvider) {
$httpProvider.interceptors.push('HttpInterceptor');
}]).run(['$rootScope', 'Global', 'NotificationService', 'lodash', 'd3', function($rootScope, Global, NotificationService, lodash, d3) {
var errors = Global.renderErrors;
$httpProvider.interceptors.push('httpInterceptor');
}]).run(['$rootScope', 'global', 'notificationService', 'lodash', 'd3', function($rootScope, global, notificationService, lodash, d3) {
var errors = global.renderErrors;
if (angular.isArray(errors) || angular.isObject(errors)) {
lodash.forEach(errors, function(err) {
err = angular.isObject(err) ? err : {
message: err
};
err.timeout = false;
NotificationService.error(err);
notificationService.error(err);
});
} else {
if (errors) {
errors.timeout = false;
NotificationService.error(errors);
notificationService.error(errors);
}
}
$rootScope.$on('$stateChangeStart', function() {
......
......@@ -19,9 +19,9 @@
var host = '',
port = '',
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: {
ABOUT: apiHost + 'admin/version',
GET_ENTITY: apiHost + 'entities',
......
......@@ -18,9 +18,9 @@
'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;
});
......
......@@ -18,6 +18,6 @@
'use strict';
angular.module('dgc.about').factory('AboutResource', ['$resource', 'AtlasConfig', function($resource, AtlasConfig) {
return $resource(AtlasConfig.API_ENDPOINTS.ABOUT, {});
angular.module('dgc.about').factory('aboutResource', ['$resource', 'atlasConfig', function($resource, atlasConfig) {
return $resource(atlasConfig.API_ENDPOINTS.ABOUT, {});
}]);
......@@ -17,14 +17,14 @@
*/
'use strict';
angular.module('dgc.details').controller('DetailsController', ['$window', '$scope', '$state', '$stateParams', 'DetailsResource', 'SchemaResource',
function($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) {
$scope.tableName = false;
$scope.isTable = false;
$scope.isLineage = false;
DetailsResource.get({
detailsResource.get({
id: $stateParams.id
}, function(data) {
......@@ -35,7 +35,7 @@ angular.module('dgc.details').controller('DetailsController', ['$window', '$scop
if (data && data.values) {
var getName = function(aaa, attr) {
DetailsResource.get({
detailsResource.get({
id: attr.id
}, function(data1) {
if (data1.values && data1.values.name) {
......@@ -55,8 +55,8 @@ angular.module('dgc.details').controller('DetailsController', ['$window', '$scop
}
if (typeof data.values[aaa] === 'object' && angular.isArray(data.values[aaa]) === true) {
var arrObj = data.values[aaa];
for(var a=0; a < arrObj.length; a++){
if(typeof arrObj[a].id === 'string'){
for (var a = 0; a < arrObj.length; a++) {
if (typeof arrObj[a].id === 'string') {
arrObj[a].name = arrObj[a].id;
getName(arrObj[a], arrObj[a]);
}
......@@ -67,7 +67,7 @@ angular.module('dgc.details').controller('DetailsController', ['$window', '$scop
$scope.details = data;
if (data && data.values && data.values.name && data.values.name !== "") {
SchemaResource.get({
schemaResource.get({
tableName: data.values.name
}, function(data1) {
if (data1.results) {
......
......@@ -18,8 +18,8 @@
'use strict';
angular.module('dgc.details').factory('DetailsResource', ['$resource', 'AtlasConfig', function($resource, AtlasConfig) {
return $resource(AtlasConfig.API_ENDPOINTS.GET_ENTITY +'/:id', {}, {
angular.module('dgc.details').factory('detailsResource', ['$resource', 'atlasConfig', function($resource, atlasConfig) {
return $resource(atlasConfig.API_ENDPOINTS.GET_ENTITY + '/:id', {}, {
get: {
method: 'GET',
transformResponse: function(data) {
......@@ -31,16 +31,16 @@ angular.module('dgc.details').factory('DetailsResource', ['$resource', 'AtlasCon
},
saveTag: {
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',
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) {
return $resource(AtlasConfig.API_ENDPOINTS.SCHEMA_LINEAGE_PREPEND + '/:tableName/' + AtlasConfig.API_ENDPOINTS.SCHEMA_APPEND, {}, {
}]).factory('schemaResource', ['$resource', 'atlasConfig', function($resource, atlasConfig) {
return $resource(atlasConfig.API_ENDPOINTS.SCHEMA_LINEAGE_PREPEND + '/:tableName/' + atlasConfig.API_ENDPOINTS.SCHEMA_APPEND, {}, {
get: {
method: 'GET',
transformResponse: function(data) {
......@@ -50,5 +50,5 @@ angular.module('dgc.details').factory('DetailsResource', ['$resource', 'AtlasCon
},
responseType: 'json'
}
});
});
}]);
......@@ -30,16 +30,16 @@ angular.module('dgc.details').config(['$stateProvider',
parent: 'details',
params: {
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({
templateUrl: '/modules/tags/instance/views/createTag.html',
controller: 'CreateTagController',
controller: 'createTagController',
windowClass: 'create-tag-entity',
resolve: {
typesList: function() {
return NavigationResource.get().$promise;
return navigationResource.get().$promise;
}
}
}).result.finally(function() {
......
......@@ -16,12 +16,6 @@
~ limitations under the License.
-->
<!--<div>-->
<!--{{key}}:-->
<!--{{value}}-->
<!--</div>-->
<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 data-ng-if="isString(value2)" data-ng-repeat="(key3, value3) in value2"> {{key3}}: {{value3}}</div>
......
......@@ -15,7 +15,7 @@
~ See the License for the specific language governing permissions and
~ 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">
<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>
......
......@@ -38,9 +38,9 @@
<td ng-if="!isHiveSchema"> {{colm.dataType}}</td>
<td ng-if="isHiveSchema"> {{colm.type}}</td>
<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 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 )">
</td>
</tr>
......
......@@ -18,7 +18,7 @@
'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 = [{
title: "Tags",
......@@ -30,11 +30,11 @@ angular.module('dgc.home').controller('HeaderController', ['$scope', '$modal', f
return true;
};
$scope.ShowAbout = function() {
$scope.showAbout = function() {
$modal.open({
animation: true,
templateUrl: '/modules/about/views/about.html',
controller: 'AboutController',
controller: 'aboutController',
size: 'lg'
});
};
......
......@@ -16,7 +16,7 @@
~ limitations under the License.
-->
<div data-ng-controller="HeaderController" class="row">
<div data-ng-controller="headerController" class="row">
<div class="navbar-header">
<button class="navbar-toggle" type="button" data-ng-click="isCollapsed = !isCollapsed">
<span class="sr-only">Toggle navigation</span>
......@@ -24,24 +24,23 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a data-ui-sref="search()" data-ui-sref-active="active" class="mainLogo">
<!-- <img src="../img/ApacheAtlasLogo.png" /> -->
<a data-ui-sref="search()" data-ui-sref-active="active" class="main-logo">
Apache <b>Atlas</b>
</a>
</div>
<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">
<a data-ui-sref="search()" class="menulink">Search</a>
<a data-ui-sref="search()" class="menu-link">Search</a>
</li>
<li data-ng-repeat="item in menu" data-ui-sref-active="active">
<a data-ui-sref="{{item.state}}">{{item.title}}</a>
</li>
<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 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>
</ul>
</nav>
......
......@@ -18,6 +18,6 @@
'use strict';
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, {});
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, {});
}]);
......@@ -17,12 +17,11 @@
*/
'use strict';
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) {
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) {
var guidsList = [],
$$ = angular.element;
function inVertObj(edgs) {
var newEdgsObj = {};
......@@ -36,14 +35,13 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$
}
function getCombinedLineageData(tableData, callRender) {
LineageResource.get({
lineageResource.get({
tableName: tableData.tableName,
type: 'outputs'
}).$promise.then(
function lineageSuccess(response1) {
// $scope.$emit('show_lineage');
$('#lineageGraph').removeClass('hide');
LineageResource.get({
lineageResource.get({
tableName: tableData.tableName,
type: 'inputs'
}).$promise.then(
......@@ -102,7 +100,7 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$
var deferred = $q.defer();
for (var guid in edges) {
if (!vertices.hasOwnProperty(guid)) {
urlCalls.push(DetailsResource.get({
urlCalls.push(detailsResource.get({
id: guid
}).$promise);
}
......@@ -257,13 +255,12 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$
root,
depthwidth = 10;
var viewerWidth = widthg - 15,
viewerHeight = heightg,
center = [viewerWidth / 2, viewerHeight / 2];
var tree = d3.layout.tree().size([viewerHeight, viewerWidth]);
/*.size([viewerHeight, viewerWidth]); nodeSize([100, 200]);*/
container.eleObj.find(".graph").html('');
container.eleObj.find("svg").remove();
......@@ -299,7 +296,6 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$
return d.children && d.children.length > 0 ? d.children : null;
});
// sort the tree according to the node names
function sortTree() {
......@@ -342,7 +338,6 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$
})
.call(tooltip);
// Define the drag listeners for drag/drop behaviour of nodes.
dragListener = d3.behavior.drag()
.on("dragstart", function(d) {
......@@ -398,7 +393,6 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$
}
}
function expand(d) {
if (d._children) {
d.children = d._children;
......@@ -494,8 +488,9 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$
}
};
childCount(0, root);
//tree = tree.nodeSize([50, 100]);
tree = tree.separation(function(a, b) { return ((a.parent === root) && (b.parent === root)) ? 3 : 1; })
tree = tree.separation(function(a, b) {
return ((a.parent === root) && (b.parent === root)) ? 3 : 1;
})
.size([viewerHeight, viewerWidth - 160]);
// Compute the new tree layout.
......@@ -515,7 +510,6 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$
var links = tree.links(nodes);
_.each(links, function(o, i) {
//links[i].target = _.find(nodes, {guid: o.target.id});
links[i].target = _.find(nodes, {
guid: o.target.guid
});
......@@ -558,7 +552,7 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$
.attr("transform", function() {
return "translate(" + source.y0 + "," + source.x0 + ")";
});
//.on('click', click);
nodeEnter.append("image")
.attr("class", "nodeImage")
......@@ -648,9 +642,7 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$
// Update the links…
var link = svgGroup.selectAll("path.link")
.data(links);
// .data(links, function(d) {
// return d.target.id;
// });
// Enter any new links at the parent's previous position.
link.enter().insert("path", "g")
......@@ -714,28 +706,31 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$
// Simplest possible buttons
var intervalID;
d3.selectAll('.zoom-buttons').on('mousedown', function(){
d3.selectAll('.zoom-buttons').on('mousedown', function() {
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);
}).on('mouseup', function(){
}).on('mouseup', function() {
d3.event.preventDefault();
clearInterval(intervalID);
intervalID = undefined;
});
function zoom_by(factor){
function zoom_by(factor) {
var scale = zoomListener.scale(),
extent = zoomListener.scaleExtent(),
translate = zoomListener.translate(),
x = translate[0], y = translate[1],
x = translate[0],
y = translate[1],
target_scale = scale * factor;
// 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
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;
factor = target_scale / scale;
}
......@@ -746,7 +741,7 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$
// Enact the zoom immediately
zoomListener.scale(target_scale)
.translate([x,y]);
.translate([x, y]);
zoom();
}
......@@ -758,10 +753,14 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$
// Layout the tree initially and center on the root node.
update(root);
centerNode(root);
if(!$scope.initialHeight){
if (!$scope.initialHeight) {
$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;
var couplingParent1 = tree.nodes(root).filter(function(d) {
......
......@@ -16,14 +16,14 @@
~ 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()">
Reset
</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>
<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>
<svg >
<g/>
......
......@@ -17,8 +17,8 @@
*/
'use strict';
angular.module('dgc.navigation').controller('NavigationController', ['$scope', 'NavigationResource', '$cacheFactory','AtlasConfig',
function($scope, NavigationResource, $cacheFactory,AtlasConfig) {
angular.module('dgc.navigation').controller('navigationController', ['$scope', 'navigationResource', '$cacheFactory', 'atlasConfig',
function($scope, navigationResource, $cacheFactory, atlasConfig) {
$scope.updateVar = function(event) {
$scope.$$prevSibling.query = angular.element(event.target).text();
......@@ -26,18 +26,18 @@ angular.module('dgc.navigation').controller('NavigationController', ['$scope', '
};
$scope.$on('load_Traits', function() {
$scope.leftnav = NavigationResource.get();
$scope.leftnav = navigationResource.get();
});
setTimeout(function() {
var httpDefaultCache = $cacheFactory.get('$http');
httpDefaultCache.remove(AtlasConfig.API_ENDPOINTS.TRAITS_LIST);
httpDefaultCache.remove(atlasConfig.API_ENDPOINTS.TRAITS_LIST);
}, 3600000);
$scope.refreshTags = function(){
$scope.refreshTags = function() {
var httpDefaultCache = $cacheFactory.get('$http');
httpDefaultCache.remove(AtlasConfig.API_ENDPOINTS.TRAITS_LIST);
$scope.leftnav = NavigationResource.get();
httpDefaultCache.remove(atlasConfig.API_ENDPOINTS.TRAITS_LIST);
$scope.leftnav = navigationResource.get();
};
}
......
......@@ -18,13 +18,13 @@
'use strict';
angular.module('dgc.navigation').factory('NavigationResource', ['$resource','AtlasConfig', function($resource, AtlasConfig) {
return $resource(AtlasConfig.API_ENDPOINTS.TRAITS_LIST, {}, {
angular.module('dgc.navigation').factory('navigationResource', ['$resource', 'atlasConfig', function($resource, atlasConfig) {
return $resource(atlasConfig.API_ENDPOINTS.TRAITS_LIST, {}, {
get: {
'method': 'GET',
'responseType': 'json',
'isArray': true,
'cache' : true,
'cache': true,
'transformResponse': function(data) {
var results = [];
angular.forEach(data && data.results, function(val) {
......
......@@ -16,7 +16,7 @@
~ limitations under the License.
-->
<div data-ng-controller="NavigationController" class="mainTags leftNavigation">
<div data-ng-controller="navigationController" class="main-tags leftNavigation">
<div>
<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>
......@@ -24,6 +24,6 @@
</br>
</br>
<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>
\ No newline at end of file
......@@ -18,13 +18,13 @@
'use strict';
angular.module('dgc.system.notification').controller('NotificationController', ['$scope', 'NotificationService',
function($scope, NotificationService) {
angular.module('dgc.system.notification').controller('notificationController', ['$scope', 'notificationService',
function($scope, notificationService) {
$scope.getNotifications = NotificationService.getAll;
$scope.getNotifications = notificationService.getAll;
$scope.close = function(notification) {
NotificationService.close(notification);
notificationService.close(notification);
};
}
]);
......@@ -18,13 +18,13 @@
'use strict';
angular.module('dgc.system.notification', ['ui.router']).constant('ColorCoding', {
angular.module('dgc.system.notification', ['ui.router']).constant('colorCoding', {
info: 'success',
error: 'danger'
}).run(['$rootScope', 'NotificationService', function($rootScope, NotificationService) {
}).run(['$rootScope', 'notificationService', function($rootScope, notificationService) {
$rootScope.$on('$locationChangeSuccess', function(evt, from, to) {
if (from !== to) {
NotificationService.reset();
notificationService.reset();
}
});
}]);
......@@ -18,7 +18,7 @@
'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 = [],
service = {
......
......@@ -16,7 +16,7 @@
~ 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">
{{notification.message}}
</alert>
......
......@@ -17,8 +17,8 @@
*/
'use strict';
angular.module('dgc.search').controller('SearchController', ['$scope', '$location', '$http', '$state', '$stateParams', 'lodash', 'SearchResource', 'DetailsResource', 'NotificationService',
function($scope, $location, $http, $state, $stateParams, _, 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) {
$scope.results = [];
$scope.resultCount = 0;
......@@ -51,7 +51,7 @@ angular.module('dgc.search').controller('SearchController', ['$scope', '$locatio
}
var getName = function(gid, obj) {
DetailsResource.get({
detailsResource.get({
id: gid
}, function(data) {
if (data.values && data.values.name) {
......@@ -91,11 +91,11 @@ angular.module('dgc.search').controller('SearchController', ['$scope', '$locatio
$scope.search = function(query) {
$scope.results = [];
NotificationService.reset();
notificationService.reset();
$scope.limit = 4;
$scope.searchMessage = 'load-gif';
$scope.$parent.query = query;
SearchResource.search({
searchResource.search({
query: query
}, function searchSuccess(response) {
$scope.resultCount = response.count;
......@@ -153,12 +153,12 @@ angular.module('dgc.search').controller('SearchController', ['$scope', '$locatio
return Math.ceil($scope.resultCount / $scope.itemsPerPage);
};
if ($scope.results.length < 1) {
NotificationService.error('No Result found', false);
notificationService.error('No Result found', false);
}
});
}, function searchError(err) {
$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', {
query: query
......@@ -251,7 +251,7 @@ angular.module('dgc.search').controller('SearchController', ['$scope', '$locatio
};
$scope.getResourceDataHome = function(event, id) {
DetailsResource.get({
detailsResource.get({
id: id
}, function(data) {
if ($scope.filteredResults !== null && Object.keys($scope.filteredResults).length > 0) {
......
......@@ -18,8 +18,8 @@
'use strict';
angular.module('dgc.search').factory('SearchResource', ['$resource', 'AtlasConfig', function($resource, AtlasConfig) {
return $resource(AtlasConfig.API_ENDPOINTS.SEARCH, {}, {
angular.module('dgc.search').factory('searchResource', ['$resource', 'atlasConfig', function($resource, atlasConfig) {
return $resource(atlasConfig.API_ENDPOINTS.SEARCH, {}, {
search: {
'method': 'GET',
'responseType': 'json',
......
......@@ -23,22 +23,22 @@ angular.module('dgc.search').config(['$stateProvider',
$stateProvider.state('search', {
url: '/search?query',
templateUrl: '/modules/search/views/search.html',
controller: 'SearchController'
controller: 'searchController'
});
$stateProvider.state('addTagHome', {
parent: 'search',
params: {
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({
templateUrl: '/modules/tags/instance/views/createTag.html',
controller: 'CreateTagController',
controller: 'createTagController',
windowClass: 'create-tag-entity',
resolve: {
typesList: function() {
return NavigationResource.get().$promise;
return navigationResource.get().$promise;
}
}
}).result.finally(function() {
......
......@@ -19,7 +19,7 @@
-->
<div class="col-lg-10 paddingR0">
<div class="">
<div class="row mainSearch">
<div class="row main-search">
<form class="col-lg-12" name="form" novalidate>
<div class="input-group">
<input type="text" class="form-control" placeholder="Search: Table, DB, Column" data-ng-model="query" required/>
......@@ -31,11 +31,11 @@
</div>
</form>
</div>
<div class="col-lg-12 padding0 searchresults">
<div class="col-lg-12 padding0 search-results">
<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-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 class="panel panel-default" ng-show='resultCount > 0'>
......@@ -68,9 +68,9 @@
</span>
</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 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 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">
......@@ -85,11 +85,11 @@
<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']}}">
<a class="tabsearchanchor" ng-repeat="(key, value) in result[res]" data-ui-sref="search({query: key})" title="{{key}}">{{key}}<span> </span></a>
<div data-ng-if="res == '$traits$'" class="word-break tags" id="{{result['id']|| result['guid']}}">
<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>
<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 data-ng-if="isString(result) || result == false || result == true">
<a data-ng-if="result.toLowerCase() == 'guid'" data-ui-sref="details({id:result})">{{result}}</a>
......
......@@ -15,15 +15,11 @@
~ See the License for the specific language governing permissions and
~ 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>
<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>
<p>{{result.description}}</p>
<span ng-repeat="(key, value) in filterSearchResults(result)" >
......
......@@ -17,59 +17,59 @@
*/
'use strict';
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) {
$scope.categoryList = Categories;
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) {
$scope.categoryList = categories;
$scope.category = 'TRAIT';
$scope.tagModel = {
typeName: null,
superTypes: [],
attributeDefinitions: []
};
$scope.typesList = NavigationResource.get();
$scope.typesList = navigationResource.get();
$scope.newtagModel = angular.copy($scope.tagModel);
$scope.addAttribute = function AddAttribute() {
$scope.tagModel.attributeDefinitions.push(AttributeDefinition.getModel());
$scope.addAttribute = function addAttribute() {
$scope.tagModel.attributeDefinitions.push(attributeDefinition.getModel());
};
$scope.removeAttribute = function(index) {
$scope.tagModel.attributeDefinitions.splice(index, 1);
};
$scope.categoryChange = function CategorySwitched() {
$scope.categoryInst = Categories[$scope.category].clearTags();
$scope.categoryChange = function categorySwitched() {
$scope.categoryInst = categories[$scope.category].clearTags();
};
$scope.reset = function(){
$scope.reset = function() {
$scope.tagModel = angular.copy($scope.newtagModel);
$scope.selectedParent = undefined;
};
$scope.refreshTags = function(){
$scope.refreshTags = function() {
var httpDefaultCache = $cacheFactory.get('$http');
httpDefaultCache.remove(AtlasConfig.API_ENDPOINTS.TRAITS_LIST);
$scope.typesList = NavigationResource.get();
httpDefaultCache.remove(atlasConfig.API_ENDPOINTS.TRAITS_LIST);
$scope.typesList = navigationResource.get();
};
$scope.save = function saveTag(form) {
$scope.savedTag = null;
if (form.$valid) {
$scope.tagModel.superTypes = $scope.selectedParent;
$scope.categoryInst = Categories[$scope.category];
$scope.categoryInst = categories[$scope.category];
$scope.categoryInst.clearTags().addTag($scope.tagModel);
NotificationService.reset();
notificationService.reset();
$scope.saving = true;
TagsResource.save($scope.categoryInst.toJson()).$promise
.then(function TagCreateSuccess() {
NotificationService.info('"' + $scope.tagModel.typeName + '" has been created', false);
tagsResource.save($scope.categoryInst.toJson()).$promise
.then(function tagCreateSuccess() {
notificationService.info('"' + $scope.tagModel.typeName + '" has been created', false);
var httpDefaultCache = $cacheFactory.get('$http');
httpDefaultCache.remove(AtlasConfig.API_ENDPOINTS.TRAITS_LIST);
$scope.typesList = NavigationResource.get();
httpDefaultCache.remove(atlasConfig.API_ENDPOINTS.TRAITS_LIST);
$scope.typesList = navigationResource.get();
$scope.reset();
}).catch(function TagCreateFailed(error) {
NotificationService.error(error.data.error, false);
}).catch(function tagCreateFailed(error) {
notificationService.error(error.data.error, false);
}).finally(function() {
$scope.saving = false;
});
......
......@@ -18,7 +18,7 @@
'use strict';
angular.module('dgc.tags.definition').service('AttributeDefinition', function Attribute() {
angular.module('dgc.tags.definition').service('attributeDefinition', function attribute() {
this.getModel = function getJson() {
return {
name: null,
......
......@@ -16,7 +16,7 @@
~ limitations under the License.
-->
<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-heading"><h4>Tag Definition</h4></div>
<div class="panel-body inputs">
......@@ -88,7 +88,7 @@
<label for="attributeIscomposite_{{$index}}" class="col-sm-2 control-label">isComposite</label>
<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="{false: 'btn-danger'}[attribute.isComposite]" ng-click="attribute.isComposite = false"> false </a>
......@@ -99,7 +99,7 @@
<label for="attributeIsunique_{{$index}}" class="col-sm-2 control-label">isUnique</label>
<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="{false: 'btn-danger'}[attribute.isUnique]" ng-click="attribute.isUnique = false"> false </a>
......@@ -110,15 +110,13 @@
<label for="attributeIndexable_{{$index}}" class="col-sm-2 control-label">isIndexable</label>
<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="{false: 'btn-danger'}[attribute.isIndexable]" ng-click="attribute.isIndexable = false"> false </a>
</span>
</div>
</div>
<div class="form-group" data-ng-class="{'has-error': attributeForm.name.$invalid && attributeForm.name.$dirty}" data-ng-show="attribute.$$show"
data-ng-repeat-end>
<label for="attributeReverseName_{{$index}}" class="col-sm-2 control-label">reverseAttributeName</label>
......@@ -142,10 +140,6 @@
</div>
</fieldset>
</form>
<!-- <div class="row" data-ng-show="savedTag">
<pre>{{savedTag | json}}</pre>
</div> -->
</div>
</div>
</div>
......
......@@ -17,13 +17,13 @@
*/
'use strict';
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) {
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) {
if (typesList) {
$scope.typesList = typesList;
}
var $$ = angular.element;
$scope.categoryList = Categories;
$scope.categoryList = categories;
$scope.category = 'TRAIT';
$scope.isSuccess = false;
$scope.getAttributeDefinations = function() {
......@@ -33,10 +33,10 @@ angular.module('dgc.tags.instance').controller('CreateTagController', ['$scope',
};
$scope.getAttributeApi = function(tagName) {
TagsResource.get({
tagsResource.get({
id: tagName
}, function(data) {
var instanceType = Categories[$scope.category].instanceInfo();
var instanceType = categories[$scope.category].instanceInfo();
if (instanceType) {
var traitTypes = angular.fromJson(data.definition)[instanceType];
......@@ -66,18 +66,18 @@ angular.module('dgc.tags.instance').controller('CreateTagController', ['$scope',
"typeName": $scope.selectedType,
"values": $scope.propertiesList
};
DetailsResource.saveTag({
detailsResource.saveTag({
id: $stateParams.tId
}, requestObject).$promise.then(function(data) {
if (data.requestId !== undefined && data.GUID === $stateParams.tId) {
var tagName = $$("#tagDefinition").val();
if($stateParams.frm && $stateParams.frm !== 'details'){
if ($stateParams.frm && $stateParams.frm !== 'details') {
$rootScope.updateTags(true, {
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>");
}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).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') {
$$("#" + $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';
......
......@@ -17,13 +17,13 @@
*/
'use strict';
angular.module('dgc.tags.instance').controller('InstanceTagController', ['$scope', 'DetailsResource', '$stateParams', '$state',
function($scope, DetailsResource, $stateParams, $state) {
angular.module('dgc.tags.instance').controller('instanceTagController', ['$scope', 'detailsResource', '$stateParams', '$state',
function($scope, detailsResource, $stateParams, $state) {
$scope.id = $stateParams.id;
var $$ = angular.element;
function getResourceData() {
DetailsResource.get({
detailsResource.get({
id: $stateParams.id
}, function(data) {
......@@ -58,7 +58,6 @@ angular.module('dgc.tags.instance').controller('InstanceTagController', ['$scope
}
});
$scope.openAddTag = function() {
$state.go('addTag', {
tId: $scope.id
......@@ -72,7 +71,7 @@ angular.module('dgc.tags.instance').controller('InstanceTagController', ['$scope
$scope.removeTag = function() {
$$("#myModal").modal();
var name = $scope.displayName;
DetailsResource.detachTag({
detailsResource.detachTag({
id: $stateParams.id,
tagName: name
}, function(data) {
......
......@@ -20,7 +20,7 @@
</div>
<div class="modal-body">
<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}}
</div>
<div class="alert alert-success" ng-if="isSuccess" >
......
......@@ -17,7 +17,7 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<div data-ng-controller="InstanceTagController" >
<div data-ng-controller="instanceTagController" >
<div>
<a ng-click="openAddTag()" class="add-tag btn btn-primary pull-right">Add Tag</a>
</div>
......@@ -37,13 +37,12 @@
<td class="col-lg-5 tag-attr" >
{{trait.values}}
</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>
</td>
</tr>
</tbody>
</table>
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
......@@ -61,7 +60,7 @@
</div>
</div>
</div>
<div ng-if="noTags" class="noTags">
<div ng-if="noTags" class="no-tags">
No tags to display
</div>
</div>
\ No newline at end of file
......@@ -18,7 +18,7 @@
'use strict';
angular.module('dgc.tags').factory('TagClasses', ['lodash', function ClassFactory(_) {
angular.module('dgc.tags').factory('tagClasses', ['lodash', function classFactory(_) {
function Tag(props) {
return _.merge({
......@@ -47,7 +47,7 @@ angular.module('dgc.tags').factory('TagClasses', ['lodash', function ClassFactor
this.id = classId;
this.name = className;
this.addTag = function AddTag(props) {
this.addTag = function addTag(props) {
var tag = new Tag(_.merge({
hierarchicalMetaTypeName: className
}, props));
......@@ -56,12 +56,12 @@ angular.module('dgc.tags').factory('TagClasses', ['lodash', function ClassFactor
return this;
};
this.clearTags = function RemoveTags() {
this.clearTags = function removeTags() {
this.tags = [];
return this;
};
this.toJson = function CreateJson() {
this.toJson = function createJson() {
var classTypeKey = (this.id.toLowerCase() + 'Types'),
output = {};
......@@ -79,7 +79,7 @@ angular.module('dgc.tags').factory('TagClasses', ['lodash', function ClassFactor
}
return _.chain(classes)
.map(function CreateClass(className, classId) {
.map(function createClass(className, classId) {
return new Class(classId, className);
})
.indexBy('id')
......
......@@ -18,8 +18,8 @@
'use strict';
angular.module('dgc.tags').factory('TagsResource', ['$resource', 'AtlasConfig', function($resource, AtlasConfig) {
return $resource(AtlasConfig.API_ENDPOINTS.CREATE_TRAIT + '/:id', {}, {
angular.module('dgc.tags').factory('tagsResource', ['$resource', 'atlasConfig', function($resource, atlasConfig) {
return $resource(atlasConfig.API_ENDPOINTS.CREATE_TRAIT + '/:id', {}, {
query: {
method: 'GET',
transformResponse: function(data) {
......
......@@ -28,16 +28,16 @@ angular.module('dgc.tags').config(['$stateProvider',
parent: 'details',
params: {
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({
templateUrl: '/modules/tags/instance/views/createTag.html',
controller: 'CreateTagController',
controller: 'createTagController',
windowClass: 'create-tag-entity',
resolve: {
typesList: function() {
return NavigationResource.get().$promise;
return navigationResource.get().$promise;
}
}
}).result.finally(function() {
......
......@@ -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)
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-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)
......
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