Repository: incubator-atlas Updated Branches: refs/heads/master 353ea964e -> 74eafd3e6
ATLAS-817 Asset details page -- generate schema dynamically based on attributeDefinitions (kevalbhatt18 via yhemanth) Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/74eafd3e Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/74eafd3e Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/74eafd3e Branch: refs/heads/master Commit: 74eafd3e6758d41fc9e67d2ef6d9c72274aa740b Parents: 353ea96 Author: Hemanth Yamijala <[email protected]> Authored: Mon May 23 21:15:41 2016 +0530 Committer: Hemanth Yamijala <[email protected]> Committed: Mon May 23 21:15:41 2016 +0530 ---------------------------------------------------------------------- dashboardv2/public/css/login.css | 2 +- dashboardv2/public/css/scss/main.scss | 12 ++- dashboardv2/public/css/scss/override.scss | 8 ++ dashboardv2/public/css/scss/tab.scss | 2 +- dashboardv2/public/css/scss/tag.scss | 23 +++-- dashboardv2/public/css/scss/theme.scss | 2 +- dashboardv2/public/index.html | 2 +- dashboardv2/public/js/collection/VSchemaList.js | 1 + dashboardv2/public/js/models/VCatalog.js | 2 +- dashboardv2/public/js/router/Router.js | 18 ++-- .../audit/CreateAuditTableLayoutView_tmpl.html | 2 +- .../business_catalog/BusinessCatalogHeader.html | 2 +- .../EntityDetailTableLayoutView_tmpl.html | 2 +- .../schema/SchemaTableLayoutView_tmpl.html | 3 + .../templates/tag/AddTagAttributeView_tmpl.html | 2 +- .../tag/TagAttributeDetailLayoutView_tmpl.html | 1 + .../tag/TagDetailTableLayoutView_tmpl.html | 7 +- .../templates/tag/createTagLayoutView_tmpl.html | 7 +- .../public/js/utils/CommonViewFunction.js | 8 +- dashboardv2/public/js/utils/Utils.js | 4 +- .../js/views/audit/AuditTableLayoutView.js | 2 +- .../BusinessCatalogLayoutView.js | 6 +- .../views/detail_page/DetailPageLayoutView.js | 11 ++- .../public/js/views/schema/SchemaLayoutView.js | 91 +++++++++++++------- .../js/views/search/SearchDetailLayoutView.js | 12 ++- .../public/js/views/tag/CreateTagLayoutView.js | 9 +- .../views/tag/TagAttributeDetailLayoutView.js | 12 +++ .../js/views/tag/TagDetailTableLayoutView.js | 5 +- .../public/js/views/tag/TagLayoutView.js | 61 ++++++++----- .../public/js/views/tag/addTagModalView.js | 19 ++-- release-log.txt | 1 + 31 files changed, 233 insertions(+), 106 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/74eafd3e/dashboardv2/public/css/login.css ---------------------------------------------------------------------- diff --git a/dashboardv2/public/css/login.css b/dashboardv2/public/css/login.css index 3a88aa9..425027d 100644 --- a/dashboardv2/public/css/login.css +++ b/dashboardv2/public/css/login.css @@ -17,7 +17,7 @@ */ body { - font-family: 'Raleway', sans-serif; + font-family: 'Source Sans Pro', sans-serif; background-color: #f6f7fb; color: #686868; } http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/74eafd3e/dashboardv2/public/css/scss/main.scss ---------------------------------------------------------------------- diff --git a/dashboardv2/public/css/scss/main.scss b/dashboardv2/public/css/scss/main.scss index 9ee1640..82d1a32 100644 --- a/dashboardv2/public/css/scss/main.scss +++ b/dashboardv2/public/css/scss/main.scss @@ -28,7 +28,7 @@ $color_star_dust_approx: #9a9a9a; $color_mirage_approx: #1c1e2a; $concrete: #f2f2f2; //fonts -$font_0: Raleway; +$font_0: Source Sans Pro; $font_1: sans-serif; $font_2: FontAwesome; //fonts @@ -123,10 +123,20 @@ hr { border-top: 1px solid #1c1e2a } +th { + text-transform: capitalize; +} + ul { list-style: none; } +.table { + .table { + width: auto; + } +} + .close { font-size: 2em; } http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/74eafd3e/dashboardv2/public/css/scss/override.scss ---------------------------------------------------------------------- diff --git a/dashboardv2/public/css/scss/override.scss b/dashboardv2/public/css/scss/override.scss index 49f0810..dabc13e 100644 --- a/dashboardv2/public/css/scss/override.scss +++ b/dashboardv2/public/css/scss/override.scss @@ -70,3 +70,11 @@ border: 1px #DDDDDD solid; } +.select2-container--default .select2-selection--multiple { + background-color: $color_white_lilac_approx !important; + border: 1px #e8e9ee solid !important; +} + +.select2-container--default.select2-container--focus .select2-selection--multiple { + border-color: #8fa5b1 !important; +} http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/74eafd3e/dashboardv2/public/css/scss/tab.scss ---------------------------------------------------------------------- diff --git a/dashboardv2/public/css/scss/tab.scss b/dashboardv2/public/css/scss/tab.scss index 648e38d..5117efe 100644 --- a/dashboardv2/public/css/scss/tab.scss +++ b/dashboardv2/public/css/scss/tab.scss @@ -74,7 +74,7 @@ ul.tabs li.tab { letter-spacing: 0.8px; border-bottom: 1px solid $color_mirage_approx; a { - font-size: 12px; + font-size: 14px; font-weight: 600; color: $white; display: block; http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/74eafd3e/dashboardv2/public/css/scss/tag.scss ---------------------------------------------------------------------- diff --git a/dashboardv2/public/css/scss/tag.scss b/dashboardv2/public/css/scss/tag.scss index 74f768a..5ba0fca 100644 --- a/dashboardv2/public/css/scss/tag.scss +++ b/dashboardv2/public/css/scss/tag.scss @@ -81,10 +81,6 @@ border-color: $color_bali_hai_approx; } -.tagList { - margin-top: 10px; -} - .select2-container { width: 100% !important; /*margin:15px 0px;*/ @@ -108,7 +104,7 @@ padding: 5px 10px; border: 1px $tag_color solid; color: $tag_color; - font-size: 12px; + font-size: 14px; text-transform: uppercase; border-radius: 4px; margin-right: 3px; @@ -151,12 +147,12 @@ } .addTagText { - font-size: 12px; + font-size: 14px; font-weight: 600; } .addTagPlus { - font-size: 12px; + font-size: 14px; font-weight: 600; } @@ -180,12 +176,13 @@ color: $action_gray; border-radius: 4px; } + .inputAttribute { display: inline-block; padding: 5px 10px; border: 1px $action_gray solid; color: $action_gray; - font-size: 12px; + font-size: 14px; text-transform: uppercase; border-radius: 4px; margin-right: 3px; @@ -203,3 +200,13 @@ background-color: $action_gray; } } + +form-control .tagInpput { + margin-bottom: 15px; + margin-top: 15px; +} + +// .select2-container--default .select2-selection--multiple { +// background-color: #f6f7fb; +// border: 1px #e8e9ee solid; +// } http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/74eafd3e/dashboardv2/public/css/scss/theme.scss ---------------------------------------------------------------------- diff --git a/dashboardv2/public/css/scss/theme.scss b/dashboardv2/public/css/scss/theme.scss index 4d5b2d6..1c59450 100644 --- a/dashboardv2/public/css/scss/theme.scss +++ b/dashboardv2/public/css/scss/theme.scss @@ -63,7 +63,7 @@ padding: 6px 12px; background-color: $color_havelock_blue_approx; color: $white; - font-size: 12px; + font-size: 14px; text-transform: uppercase; //Instead of the line below you could use @include border-radius($radius, $vertical-radius) border-radius: 4px; http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/74eafd3e/dashboardv2/public/index.html ---------------------------------------------------------------------- diff --git a/dashboardv2/public/index.html b/dashboardv2/public/index.html index 31e177f..59e2c7e 100644 --- a/dashboardv2/public/index.html +++ b/dashboardv2/public/index.html @@ -40,7 +40,7 @@ <link rel="stylesheet" href="js/libs/select2/css/select2.min.css"> <link rel="stylesheet" href="js/libs/bootstrap/css/bootstrap.min.css"> <link rel="stylesheet" href="js/libs/jquery-asBreadcrumbs/css/asBreadcrumbs.css"> - <link href='https://fonts.googleapis.com/css?family=Raleway:400,400italic,600,600italic,700,700italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400italic,600,600italic,700,700italic' rel='stylesheet' type='text/css'> <link href="css/bootstrap-sidebar.css" rel="stylesheet"> <link href="css/font-awesome.min.css" rel="stylesheet"> <link href="css/style.css" rel="stylesheet"> http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/74eafd3e/dashboardv2/public/js/collection/VSchemaList.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/collection/VSchemaList.js b/dashboardv2/public/js/collection/VSchemaList.js index cf22375..1f03856 100644 --- a/dashboardv2/public/js/collection/VSchemaList.js +++ b/dashboardv2/public/js/collection/VSchemaList.js @@ -37,6 +37,7 @@ define(['require', if (!this.modelAttrName) { throw new Error("this.modelAttrName not defined for " + this); } + this.keyList = resp[this.modelAttrName].dataType.attributeDefinitions; var arr = []; resp[this.modelAttrName].rows.forEach(function(d) { arr.push(d); http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/74eafd3e/dashboardv2/public/js/models/VCatalog.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/models/VCatalog.js b/dashboardv2/public/js/models/VCatalog.js index 10ed835..7cb7359 100644 --- a/dashboardv2/public/js/models/VCatalog.js +++ b/dashboardv2/public/js/models/VCatalog.js @@ -22,7 +22,7 @@ define(['require', ], function(require, Globals, VBaseModel) { 'use strict'; var VCatalog = VBaseModel.extend({ - urlRoot: Globals.baseURL + '/api/atlas/v1/taxonomies/taxonomy1', + urlRoot: Globals.baseURL + '/api/atlas/v1/taxonomies', defaults: {}, http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/74eafd3e/dashboardv2/public/js/router/Router.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/router/Router.js b/dashboardv2/public/js/router/Router.js index b6a2edf..f69c7bc 100644 --- a/dashboardv2/public/js/router/Router.js +++ b/dashboardv2/public/js/router/Router.js @@ -33,9 +33,6 @@ define([ '!/taxonomy/detailCatalog/(*url)': 'detailCatalog', '!/search/searchResult': 'searchResult', '!/detailPage/:id': 'detailPage', - '!/detailPage/:id': 'detailPage', - '!/detailPage/:id': 'detailPage', - '!/tag': 'commonAction', '!/taxonomy': 'commonAction', '!/search': 'commonAction', @@ -120,13 +117,15 @@ define([ } else { var view = App.rSideNav.currentView.RBusinessCatalogLayoutView.currentView; if (view.dblClick == false && view.singleClick == false && !Globals.saveApplicationState.tabState.stateChanged) { - App.rSideNav.currentView.RBusinessCatalogLayoutView.currentView.manualRender(url,true); + App.rSideNav.currentView.RBusinessCatalogLayoutView.currentView.manualRender(url, true); view.dblClick == false; - }/* else if (view.firstManualClick) { - view.firstManualClick = false; - App.rSideNav.currentView.RBusinessCatalogLayoutView.currentView.manualRender(url); - }*/ else if (view.singleClick) { + } + /* else if (view.firstManualClick) { + view.firstManualClick = false; + App.rSideNav.currentView.RBusinessCatalogLayoutView.currentView.manualRender(url); + }*/ + else if (view.singleClick) { view.singleClick = false; } App.rSideNav.currentView.selectTab(); @@ -184,6 +183,7 @@ define([ 'tag': tagName })); } else { + App.rSideNav.currentView.RTagLayoutView.currentView.manualRender(tagName); App.rSideNav.currentView.selectTab(); } @@ -213,7 +213,7 @@ define([ if (Utils.getUrlState.isTagTab()) { App.rSideNav.currentView.RTagLayoutView.currentView.manualRender(); } else if (Utils.getUrlState.isTaxonomyTab()) { - App.rSideNav.currentView.RBusinessCatalogLayoutView.currentView.manualRender(undefined,true); + App.rSideNav.currentView.RBusinessCatalogLayoutView.currentView.manualRender(undefined, true); } } App.rNContent.$el.html(''); http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/74eafd3e/dashboardv2/public/js/templates/audit/CreateAuditTableLayoutView_tmpl.html ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/templates/audit/CreateAuditTableLayoutView_tmpl.html b/dashboardv2/public/js/templates/audit/CreateAuditTableLayoutView_tmpl.html index e193435..97c3b5c 100644 --- a/dashboardv2/public/js/templates/audit/CreateAuditTableLayoutView_tmpl.html +++ b/dashboardv2/public/js/templates/audit/CreateAuditTableLayoutView_tmpl.html @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. --> -<table class="table table-bordered table-striped"> +<table class="table table-quickMenu"> <thead> <tr> <th>Key</th> http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/74eafd3e/dashboardv2/public/js/templates/business_catalog/BusinessCatalogHeader.html ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/templates/business_catalog/BusinessCatalogHeader.html b/dashboardv2/public/js/templates/business_catalog/BusinessCatalogHeader.html index 4184e8d..006fe0b 100644 --- a/dashboardv2/public/js/templates/business_catalog/BusinessCatalogHeader.html +++ b/dashboardv2/public/js/templates/business_catalog/BusinessCatalogHeader.html @@ -19,7 +19,7 @@ </ol> <header class="clearfix"> <div class="btn-group pull-right"> - <a href="javascript:void(0);" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="user-dropdown">Hello Micheal <i class="fa fa-user user-circle"></i></a> + <a href="javascript:void(0);" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="user-dropdown"><i class="fa fa-user user-circle"></i></a> <ul class="dropdown-menu"> <!-- <li><a href="#">Edit Profile</a></li> <li><a href="#">Change Password</a></li> --> http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/74eafd3e/dashboardv2/public/js/templates/entity/EntityDetailTableLayoutView_tmpl.html ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/templates/entity/EntityDetailTableLayoutView_tmpl.html b/dashboardv2/public/js/templates/entity/EntityDetailTableLayoutView_tmpl.html index 8ce71de..cf89287 100644 --- a/dashboardv2/public/js/templates/entity/EntityDetailTableLayoutView_tmpl.html +++ b/dashboardv2/public/js/templates/entity/EntityDetailTableLayoutView_tmpl.html @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. --> -<table class="table table-bordered table-striped"> +<table class="table table-quickMenu"> <thead> <tr> <th>Key</th> http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/74eafd3e/dashboardv2/public/js/templates/schema/SchemaTableLayoutView_tmpl.html ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/templates/schema/SchemaTableLayoutView_tmpl.html b/dashboardv2/public/js/templates/schema/SchemaTableLayoutView_tmpl.html index abbe593..3033efc 100644 --- a/dashboardv2/public/js/templates/schema/SchemaTableLayoutView_tmpl.html +++ b/dashboardv2/public/js/templates/schema/SchemaTableLayoutView_tmpl.html @@ -14,4 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. --> +<div class="fontLoader"> + <i class="fa fa-refresh fa-spin-custom"></i> +</div> <div id="r_tagLayoutView"></div> http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/74eafd3e/dashboardv2/public/js/templates/tag/AddTagAttributeView_tmpl.html ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/templates/tag/AddTagAttributeView_tmpl.html b/dashboardv2/public/js/templates/tag/AddTagAttributeView_tmpl.html index 9bb10b8..c13344c 100644 --- a/dashboardv2/public/js/templates/tag/AddTagAttributeView_tmpl.html +++ b/dashboardv2/public/js/templates/tag/AddTagAttributeView_tmpl.html @@ -17,7 +17,7 @@ <div class="row row-margin-bottom"> <div class="col-sm-12"> <div class="form-group"> - <input type="text" class="form-control" name="name" data-id="attributeId" placeholder="Attribute name" required="" value={{name}}> + <input type="text" class="form-control row-margin-top" name="name" data-id="attributeId" placeholder="Attribute name" required="" value={{name}}> </div> </div> </div> http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/74eafd3e/dashboardv2/public/js/templates/tag/TagAttributeDetailLayoutView_tmpl.html ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/templates/tag/TagAttributeDetailLayoutView_tmpl.html b/dashboardv2/public/js/templates/tag/TagAttributeDetailLayoutView_tmpl.html index b444bf6..0988ac3 100644 --- a/dashboardv2/public/js/templates/tag/TagAttributeDetailLayoutView_tmpl.html +++ b/dashboardv2/public/js/templates/tag/TagAttributeDetailLayoutView_tmpl.html @@ -17,6 +17,7 @@ <div class="page-title clearfix"> <h1><span data-id="title"></span> <!-- <small>8 Asset</small><button data-id="editButton" class="hide btn btn-default pull-right editbutton" data-id="editText"><i class="fa fa-pencil"></i></button>--></h1> + <p data-id="description"></p> <div data-id="showAttribute"> </div> <div class="dropdown addTag-dropdown" data-id="addTagListBtn"> http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/74eafd3e/dashboardv2/public/js/templates/tag/TagDetailTableLayoutView_tmpl.html ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/templates/tag/TagDetailTableLayoutView_tmpl.html b/dashboardv2/public/js/templates/tag/TagDetailTableLayoutView_tmpl.html index a4a0928..e4973de 100644 --- a/dashboardv2/public/js/templates/tag/TagDetailTableLayoutView_tmpl.html +++ b/dashboardv2/public/js/templates/tag/TagDetailTableLayoutView_tmpl.html @@ -15,9 +15,12 @@ * limitations under the License. --> <div> -<!-- <button class="add-tag btn btn-success pull-right" data-id="addTag" style="margin-bottom:10px">Add Tag</button> --> + <!-- <button class="add-tag btn btn-success pull-right" data-id="addTag" style="margin-bottom:10px">Add Tag</button> --> </div> -<table class="table table-bordered table-striped"> +<div class="fontLoader"> + <i class="fa fa-refresh fa-spin-custom"></i> +</div> +<table class="table table-quickMenu"> <thead> <tr> <th>Tag</th> http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/74eafd3e/dashboardv2/public/js/templates/tag/createTagLayoutView_tmpl.html ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/templates/tag/createTagLayoutView_tmpl.html b/dashboardv2/public/js/templates/tag/createTagLayoutView_tmpl.html index 39b6cec..5de9e00 100644 --- a/dashboardv2/public/js/templates/tag/createTagLayoutView_tmpl.html +++ b/dashboardv2/public/js/templates/tag/createTagLayoutView_tmpl.html @@ -17,8 +17,11 @@ <form name="tagDefinitionform" class="css-form"> <!-- <h4 style="margin-bottom:30px"></h4> --> <div class="form-group"> - <input class="form-control" data-id="tagName" placeholder="Create tag"> + <input class="form-control row-margin-bottom" data-id="tagName" placeholder="Create tag"> </input> - <select class="form-control tagList" data-id="parentTag" multiple></select> + <input class="form-control row-margin-bottom" data-id="description" placeholder="Description"> + </input> + <span class="row-margin-bottom">Parent Tag</span> + <select class="form-control tagList" data-id="parentTag" multiple="multiple"></select> </div> </form> http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/74eafd3e/dashboardv2/public/js/utils/CommonViewFunction.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/utils/CommonViewFunction.js b/dashboardv2/public/js/utils/CommonViewFunction.js index 76941a6..ff0f2d2 100644 --- a/dashboardv2/public/js/utils/CommonViewFunction.js +++ b/dashboardv2/public/js/utils/CommonViewFunction.js @@ -46,7 +46,13 @@ define(['require', 'utils/Utils', 'modules/Modal'], function(require, Utils, Mod Utils.notifySuccess({ content: "Tag " + options.tagName + " has been deleted successfully" }); - options.collection.fetch({ reset: true }); + if (options.callback) { + options.callback(); + } + if (options.collection) { + options.collection.fetch({ reset: true }); + } + }, error: function(error, data, status) { var message = "Tag " + options.tagName + " could not be deleted"; http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/74eafd3e/dashboardv2/public/js/utils/Utils.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/utils/Utils.js b/dashboardv2/public/js/utils/Utils.js index 74cfb03..4f57055 100644 --- a/dashboardv2/public/js/utils/Utils.js +++ b/dashboardv2/public/js/utils/Utils.js @@ -151,7 +151,7 @@ define(['require', 'utils/Globals'], function(require, Globals) { if (options.mergeBrowserUrl) { var param = Utils.getUrlState.getQueryParams(); if (param) { - options.urlParams = _.extend(param, options.urlParams); + options.urlParams = $.extend(param, options.urlParams); } } if (options.urlParams) { @@ -163,7 +163,7 @@ define(['require', 'utils/Globals'], function(require, Globals) { options.url += urlParams; } if (options.updateTabState) { - _.extend(Globals.saveApplicationState.tabState, options.updateTabState()); + $.extend(Globals.saveApplicationState.tabState, options.updateTabState()); } Backbone.history.navigate(options.url, { trigger: options.trigger != undefined ? options.trigger : true }); } http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/74eafd3e/dashboardv2/public/js/views/audit/AuditTableLayoutView.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/views/audit/AuditTableLayoutView.js b/dashboardv2/public/js/views/audit/AuditTableLayoutView.js index e7754af..1c1c0b1 100644 --- a/dashboardv2/public/js/views/audit/AuditTableLayoutView.js +++ b/dashboardv2/public/js/views/audit/AuditTableLayoutView.js @@ -90,7 +90,7 @@ define(['require', globalVent: that.globalVent, columns: cols, gridOpts: { - className: "table table-bordered table-hover table-condensed backgrid table-quickMenu", + className: "table table-quickMenu", }, }))); }); http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/74eafd3e/dashboardv2/public/js/views/business_catalog/BusinessCatalogLayoutView.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/views/business_catalog/BusinessCatalogLayoutView.js b/dashboardv2/public/js/views/business_catalog/BusinessCatalogLayoutView.js index 3136488..4eced25 100644 --- a/dashboardv2/public/js/views/business_catalog/BusinessCatalogLayoutView.js +++ b/dashboardv2/public/js/views/business_catalog/BusinessCatalogLayoutView.js @@ -187,7 +187,8 @@ define(['require', } } } - parentLi = '<div class="tools"><i class="fa fa-refresh fa-spin-custom taxanomyloader"></i><i class="fa fa-ellipsis-h termPopover"></i></div><a href="javascript:void(0)" data-href=' + hrefUrl + '>' + model.get('name') + '</a>'; + var name = model.get('name').split('.'); + parentLi = '<div class="tools"><i class="fa fa-refresh fa-spin-custom taxanomyloader"></i><i class="fa fa-ellipsis-h termPopover"></i></div><a href="javascript:void(0)" data-href="' + hrefUrl + '">' + name[name.length - 1] + '</a>'; }); if (href) { that.fetchCollection(href); @@ -199,7 +200,8 @@ define(['require', function createTerm() { _.each(that.chiledCollection.fullCollection.models, function(model, key) { - chiledLi += '<li class="children"><div class="tools"><i class="fa fa-refresh fa-spin-custom taxanomyloader"></i><i class="fa fa-ellipsis-h termPopover" ></i></div><a href="javascript:void(0)" data-href=/api' + model.get('href').split("/api")[1] + '>' + model.get('name') + '</a></li>'; + var name = model.get('name').split('.'); + chiledLi += '<li class="children"><div class="tools"><i class="fa fa-refresh fa-spin-custom taxanomyloader"></i><i class="fa fa-ellipsis-h termPopover" ></i></div><a href="javascript:void(0)" data-href="/api' + model.get('href').split("/api")[1] + '">' + name[name.length - 1] + '</a></li>'; }); that.ui.chiledList.html(chiledLi); } http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/74eafd3e/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js b/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js index c35cfcf..6b4d05b 100644 --- a/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js +++ b/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js @@ -76,7 +76,7 @@ define(['require', } }; events["click " + this.ui.tagClick] = function(e) { - if (!e.target.nodeName.toLocaleLowerCase() == "i") { + if (e.target.nodeName.toLocaleLowerCase() != "i") { Utils.setUrl({ url: '#!/tag/tagAttribute/' + e.currentTarget.textContent, mergeBrowserUrl: false, @@ -161,7 +161,6 @@ define(['require', onRender: function() { var that = this; this.ui.editBox.hide(); - this.fetchCollection(); this.ui.appendList.on('click', 'div', function(e) { if (e.target.nodeName == "INPUT") { return false; @@ -197,7 +196,9 @@ define(['require', CommonViewFunction.deleteTag({ 'tagName': tagName, 'guid': that.id, - 'collection': that.collection + callback: function() { + that.fetchCollection(); + } }); }, addTagToTerms: function(tagObject) { @@ -236,7 +237,9 @@ define(['require', var view = new AddTagModalView({ vent: that.vent, guid: that.id, - modalCollection: that.collection + callback: function() { + that.fetchCollection(); + } }); /*view.saveTagData = function() { override saveTagData function http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/74eafd3e/dashboardv2/public/js/views/schema/SchemaLayoutView.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/views/schema/SchemaLayoutView.js b/dashboardv2/public/js/views/schema/SchemaLayoutView.js index 7574367..2ed285f 100644 --- a/dashboardv2/public/js/views/schema/SchemaLayoutView.js +++ b/dashboardv2/public/js/views/schema/SchemaLayoutView.js @@ -89,15 +89,21 @@ define(['require', this.listenTo(this.schemaCollection, "reset", function(value) { this.renderTableLayoutView(); $('.schemaTable').show(); + this.$('.fontLoader').hide(); }, this); this.listenTo(this.schemaCollection, "error", function(value) { $('.schemaTable').hide(); + this.$('.fontLoader').hide(); }, this); }, onRender: function() { this.schemaCollection.fetch({ reset: true }); this.renderTableLayoutView(); }, + fetchCollection: function() { + this.$('.fontLoader').show(); + this.schemaCollection.fetch({ reset: true }); + }, renderTableLayoutView: function() { var that = this; require(['utils/TableLayout'], function(TableLayout) { @@ -106,38 +112,55 @@ define(['require', globalVent: that.globalVent, columns: cols, gridOpts: { - className: "table table-bordered table-hover table-condensed backgrid table-quickMenu", + className: "table table-quickMenu", }, }))); }); }, getSchemaTableColumns: function() { var that = this; - return this.schemaCollection.constructor.getTableCols({ - name: { - label: "Name", - cell: "Html", - editable: false, - sortable: false, - formatter: _.extend({}, Backgrid.CellFormatter.prototype, { - fromRaw: function(rawValue, model) { - return '<div><a href="#!/detailPage/' + model.get('$id$').id + '">' + rawValue + '</a></div>'; - } - }) - }, - comment: { - label: "Comment", - cell: "html", - editable: false, - sortable: false - }, - type: { - label: "DataType", - cell: "html", - editable: false, - sortable: false - }, - tag: { + var col = {}; + if (this.schemaCollection.keyList) { + _.each(this.schemaCollection.keyList, function(obj, key) { + col[obj.name] = { + cell: "Html", + editable: false, + sortable: false, + orderable: true, + formatter: _.extend({}, Backgrid.CellFormatter.prototype, { + fromRaw: function(rawValue, model) { + if (model) { + if (!_.isArray(rawValue) && _.isObject(rawValue)) { + if (rawValue.id) { + return '<div><a href="#!/detailPage/' + rawValue.id + '">' + rawValue.$typeName$ + '</a></div>'; + } else { + return rawValue.$typeName$; + } + } else if (_.isArray(rawValue)) { + var links = ""; + _.each(rawValue, function(val, key) { + if (val.id) { + links += '<div><a href="#!/detailPage/' + val.id + '">' + val.$typeName$ + '</a></div>'; + } else { + links += '<div>' + val.$typeName$ + '</div>'; + } + }); + return links; + + } else if (model.get('$id$') && model.get('$id$').id && model.get('name') == rawValue) { + return '<div><a href="#!/detailPage/' + model.get('$id$').id + '">' + rawValue + '</a></div>'; + } else { + return rawValue; + } + } else { + return rawValue; + } + + } + }) + }; + }); + col['tag'] = { label: "Tags", cell: "Html", editable: false, @@ -152,16 +175,20 @@ define(['require', return '<div class="tagList">' + atags + '<a href="javascript:void(0);" class="inputTag" data-id="addTag" data-guid="' + model.get('$id$').id + '"><i style="right:0" class="fa fa-plus"></i></a></div>'; } }) - } - }, this.schemaCollection); + }; + } + + + return this.schemaCollection.constructor.getTableCols(col, this.schemaCollection); }, onClickSchemaTag: function(e) { var that = this; require(['views/tag/addTagModalView'], function(AddTagModalView) { var view = new AddTagModalView({ - vent: that.vent, guid: that.$(e.currentTarget).data("guid"), - modalCollection: that.schemaCollection + callback: function() { + that.fetchCollection(); + } }); // view.saveTagData = function() { //override saveTagData function @@ -186,7 +213,9 @@ define(['require', CommonViewFunction.deleteTag({ 'tagName': tagName, 'guid': guid, - 'collection': that.tagCollection + callback: function() { + that.fetchCollection(); + } }); } }); http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/74eafd3e/dashboardv2/public/js/views/search/SearchDetailLayoutView.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/views/search/SearchDetailLayoutView.js b/dashboardv2/public/js/views/search/SearchDetailLayoutView.js index d32c01e..34ccb21 100644 --- a/dashboardv2/public/js/views/search/SearchDetailLayoutView.js +++ b/dashboardv2/public/js/views/search/SearchDetailLayoutView.js @@ -51,11 +51,15 @@ define(['require', }, renderSearchResultLayoutView: function() { var that = this; + require(['views/search/SearchResultLayoutView'], function(SearchResultLayoutView) { - var value = { - 'query': that.value.query, - 'searchType': that.value.searchType - }; + var value = {}; + if (that.value) { + value = { + 'query': that.value.query, + 'searchType': that.value.searchType + }; + } that.RSearchResultLayoutView.show(new SearchResultLayoutView({ value: value, tag: that.tag http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/74eafd3e/dashboardv2/public/js/views/tag/CreateTagLayoutView.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/views/tag/CreateTagLayoutView.js b/dashboardv2/public/js/views/tag/CreateTagLayoutView.js index 186f26e..8dcb9cf 100644 --- a/dashboardv2/public/js/views/tag/CreateTagLayoutView.js +++ b/dashboardv2/public/js/views/tag/CreateTagLayoutView.js @@ -36,7 +36,8 @@ define(['require', ui: { tagName: "[data-id='tagName']", - parentTag: "[data-id='parentTag']" + parentTag: "[data-id='parentTag']", + description: "[data-id='description']" }, /** ui events hash */ events: function() { @@ -63,12 +64,16 @@ define(['require', tagCollectionList: function() { this.ui.parentTag.empty(); - var str = '<option selected="true" style="display:none;"></option>'; + var str = ''; for (var i = 0; i < this.tagCollection.fullCollection.models.length; i++) { var tags = this.tagCollection.fullCollection.models[i].get("tags"); str += '<option>' + tags + '</option>'; this.ui.parentTag.html(str); } + this.ui.parentTag.select2({ + placeholder: "Select parent Tag", + allowClear: true + }); }, fetchCollection: function() { $.extend(this.tagCollection.queryParams, { type: 'TRAIT' }); http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/74eafd3e/dashboardv2/public/js/views/tag/TagAttributeDetailLayoutView.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/views/tag/TagAttributeDetailLayoutView.js b/dashboardv2/public/js/views/tag/TagAttributeDetailLayoutView.js index 421d5ad..a57102c 100644 --- a/dashboardv2/public/js/views/tag/TagAttributeDetailLayoutView.js +++ b/dashboardv2/public/js/views/tag/TagAttributeDetailLayoutView.js @@ -44,6 +44,7 @@ define(['require', addTagListBtn: '[data-id="addTagListBtn"]', addTagtext: '[data-id="addTagtext"]', addTagPlus: '[data-id="addTagPlus"]', + description: '[data-id="description"]', }, /** ui events hash */ events: function() { @@ -70,6 +71,10 @@ define(['require', attributeData = ""; _.each(this.tagCollection.models, function(attr) { var traitTypes = attr.get("traitTypes"); + if (traitTypes[0].typeDescription != null) { + var descriptionValue = traitTypes[0].typeDescription; + that.ui.description.html(descriptionValue); + } _.each(traitTypes[0].attributeDefinitions, function(value, key) { attributeData += '<span class="inputAttribute">' + value.name + '</span>'; }); @@ -79,6 +84,13 @@ define(['require', that.ui.addTagPlus.show(); } that.ui.showAttribute.html(attributeData); + }, this); + this.listenTo(this.tagCollection, 'error', function(error, response) { + if (response.responseJSON && response.responseJSON.error) { + Utils.notifyError({ + content: response.responseJSON.error + }); + } }, this); }, http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/74eafd3e/dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js b/dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js index 791d70b..901130a 100644 --- a/dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js +++ b/dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js @@ -122,7 +122,10 @@ define(['require', CommonViewFunction.deleteTag({ 'tagName': tagName, 'guid': that.guid, - 'collection': that.collection + callback: function() { + that.$('.fontLoader').show(); + that.collection.fetch({ reset: true }); + } }); } }); http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/74eafd3e/dashboardv2/public/js/views/tag/TagLayoutView.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/views/tag/TagLayoutView.js b/dashboardv2/public/js/views/tag/TagLayoutView.js index a89c692..9580ad1 100644 --- a/dashboardv2/public/js/views/tag/TagLayoutView.js +++ b/dashboardv2/public/js/views/tag/TagLayoutView.js @@ -41,7 +41,7 @@ define(['require', createTag: "[data-id='createTag']", tags: "[data-id='tags']", offLineSearchTag: "[data-id='offlineSearchTag']", - deleteTerm: "[data-id='deleteTerm']", + deleteTerm: "[data-id='deleteTerm']" }, /** ui events hash */ @@ -52,7 +52,7 @@ define(['require', this.onTagList(e, true); }*/ events["click " + this.ui.tags] = 'onTagList'; - // events["click " + this.ui.referesh] = 'refereshClick'; + // events["click " + this.ui.referesh] = 'refereshClick'; events["keyup " + this.ui.offLineSearchTag] = 'offlineSearchTag'; events["click " + this.ui.deleteTerm] = 'onDeleteTerm'; return events; @@ -77,7 +77,6 @@ define(['require', var that = this; this.listenTo(this.tagCollection, "reset", function() { this.tagsAndTypeGenerator('tagCollection'); - this.createTagAction(); }, this); this.ui.tagsParent.on('click', 'li.parent-node a', function() { that.setUrl(this.getAttribute("href")); @@ -104,29 +103,45 @@ define(['require', this.tagCollection.fetch({ reset: true }); }, manualRender: function(tagName) { - this.setValues(tagName); + this.tag = tagName; + if (!this.createTag) { + this.setValues(true); + } }, - setValues: function(tagName) { + setValues: function(manual) { if (Utils.getUrlState.isTagTab() || Utils.getUrlState.isInitial()) { - if (!this.tag && !tagName) { + if (!this.tag) { this.selectFirst = false; this.ui.tagsParent.find('li').first().addClass('active'); Utils.setUrl({ url: this.ui.tagsParent.find('li a').first().attr("href"), mergeBrowserUrl: false, - trigger: true + trigger: true, + updateTabState: function() { + return { tagUrl: this.url, stateChanged: true }; + } }); } else { + Utils.setUrl({ + url: Utils.getUrlState.getQueryUrl().hash, + updateTabState: function() { + return { tagUrl: this.url, stateChanged: true }; + } + }); var tag = Utils.getUrlState.getLastValue(); - if (tagName) { - tag = tagName; - } else if (this.tag) { + if (this.tag) { tag = this.tag; } this.ui.tagsParent.find('li').removeClass('active'); - this.ui.tagsParent.find('li').filter(function() { + var target = this.ui.tagsParent.find('li').filter(function() { return $(this).text() === tag; }).addClass('active'); + if (this.createTag || !manual) { + $('#sidebar-wrapper').animate({ + scrollTop: target.offset().top - 100 + }, 500); + } + } } }, @@ -137,7 +152,7 @@ define(['require', var tagName = model.get("tags"); if (searchString) { if (tagName.search(new RegExp(searchString, "i")) != -1) { - str = '<li class="parent-node" data-id="tags"><div class="tools"><i class="fa fa-trash-o" data-id="deleteTerm"></i></div><a href="#!/tag/tagAttribute/' + tagName + '">' + tagName + '</a></li>' + str; + str = '<li class="parent-node" data-id="tags"><div class="tools"><i class="fa fa-ellipsis-h tagPopover"></i></div><a href="#!/tag/tagAttribute/' + tagName + '">' + tagName + '</a></li>' + str; } else { return; } @@ -148,6 +163,10 @@ define(['require', }); this.ui.tagsParent.empty().html(str); this.setValues(); + this.createTagAction(); + if (this.createTag) { + this.createTag = false; + } }, @@ -186,23 +205,23 @@ define(['require', onCreateButton: function(ref) { var that = this; this.name = ref.ui.tagName.val(); - - if (ref.ui.parentTag.val().length <= 1 && ref.ui.parentTag.val()[0] == "") { - var superTypes = []; - } else { - var superTypes = ref.ui.parentTag.val(); + this.description = ref.ui.description.val(); + var superTypes = []; + if (ref.ui.parentTag.val() && ref.ui.parentTag.val()) { + superTypes = ref.ui.parentTag.val(); } this.json.traitTypes[0] = { attributeDefinitions: this.collection.toJSON(), typeName: this.name, - typeDescription: null, + typeDescription: this.description, superTypes: superTypes, hierarchicalMetaTypeName: "org.apache.atlas.typesystem.types.TraitType" }; new this.tagCollection.model().set(this.json).save(null, { success: function(model, response) { + that.createTag = true; that.fetchCollections(); - that.setUrl('#!/tag/tagAttribute/' + ref.ui.tagName.val()); + that.setUrl('#!/tag/tagAttribute/' + ref.ui.tagName.val(), true); Utils.notifySuccess({ content: that.name + " has been created" }); @@ -218,7 +237,7 @@ define(['require', }); }, - setUrl: function(url) { + setUrl: function(url, create) { Utils.setUrl({ url: url, mergeBrowserUrl: false, @@ -264,7 +283,7 @@ define(['require', Utils.setUrl({ url: '#!/search/searchResult', urlParams: { - query: this.ui.tagsParent.find('li.active').find("a").text(), + query: this.ui.tagsParent.find('li.active').find("a").text(), searchType: "fulltext", dslChecked: false }, http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/74eafd3e/dashboardv2/public/js/views/tag/addTagModalView.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/views/tag/addTagModalView.js b/dashboardv2/public/js/views/tag/addTagModalView.js index 2591a3f..0601cce 100644 --- a/dashboardv2/public/js/views/tag/addTagModalView.js +++ b/dashboardv2/public/js/views/tag/addTagModalView.js @@ -45,7 +45,7 @@ define(['require', */ initialize: function(options) { var that = this; - _.extend(this, _.pick(options, 'vent', 'modalCollection', 'guid')); + _.extend(this, _.pick(options, 'vent', 'modalCollection', 'guid', 'callback')); this.collection = new VTagList(); this.commonCollection = new VCommonList(); this.modal = new Modal({ @@ -79,7 +79,7 @@ define(['require', }, this); }, tagsCollection: function() { - var str = '<option selected="true" style="display:none;"></option>'; + var str = '<option selected="selected" disabled="disabled">-- Select Tag --</option>'; for (var i = 0; i < this.collection.fullCollection.models.length; i++) { var tags = this.collection.fullCollection.models[i].get("tags"); str += '<option>' + tags + '</option>'; @@ -135,18 +135,25 @@ define(['require', data: JSON.stringify(json), beforeSend: function() {}, success: function(data) { - that.modalCollection.fetch({ reset: true }); Utils.notifySuccess({ content: "Tag " + tagName + " has been added to entity" }); + if (that.callback) { + that.callback(); + } + if (that.modalCollection) { + that.modalCollection.fetch({ reset: true }); + } }, error: function(error, data, status) { + var message = "Tag " + tagName + " could not be added"; if (error && error.responseText) { var data = JSON.parse(error.responseText); - Utils.notifyError({ - content: data.error - }); + message = data.error; } + Utils.notifyError({ + content: message + }); }, complete: function() {} }); http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/74eafd3e/release-log.txt ---------------------------------------------------------------------- diff --git a/release-log.txt b/release-log.txt index 554b4ef..e443943 100644 --- a/release-log.txt +++ b/release-log.txt @@ -21,6 +21,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-817 Asset details page -- generate schema dynamically based on attributeDefinitions (kevalbhatt18 via yhemanth) ATLAS-495 Atlas Ranger Authorization Plugin (nixonrodrigues via shwethags) ATLAS-805 Quickstart is failing if run after queries to the business taxonomy API (jspeidel via shwethags) ATLAS-774 Better error handling from login.jsp (nixonrodrigues via shwethags)
