ATLAS-1193: UI to create/update entities Signed-off-by: Madhan Neethiraj <[email protected]>
Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/edc4786b Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/edc4786b Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/edc4786b Branch: refs/heads/master Commit: edc4786b957988f8029a652ce7cf1c97d0e40711 Parents: 1620284 Author: kalyanikk <[email protected]> Authored: Tue Dec 13 16:59:56 2016 +0530 Committer: Madhan Neethiraj <[email protected]> Committed: Fri Dec 16 06:32:45 2016 -0800 ---------------------------------------------------------------------- dashboardv2/gruntfile.js | 2 +- dashboardv2/public/css/scss/form.scss | 20 + dashboardv2/public/css/scss/override.scss | 9 + dashboardv2/public/css/scss/search.scss | 1 - dashboardv2/public/css/scss/tag.scss | 73 +- dashboardv2/public/index.html | 1 + dashboardv2/public/js/collection/VEntityList.js | 15 +- dashboardv2/public/js/collection/VSearchList.js | 10 +- .../datetimepicker/bootstrap-datetimepicker.js | 2444 ++++++++++++++++++ .../bootstrap-datetimepicker.min.css | 5 + dashboardv2/public/js/main.js | 9 +- dashboardv2/public/js/models/VEntity.js | 14 +- .../detail_page/DetailPageLayoutView_tmpl.html | 1 + .../entity/CreateEntityLayoutView_tmpl.html | 46 + .../templates/search/SearchLayoutView_tmpl.html | 3 + dashboardv2/public/js/utils/UrlLinks.js | 6 +- .../views/detail_page/DetailPageLayoutView.js | 16 + .../js/views/entity/CreateEntityLayoutView.js | 613 +++++ .../public/js/views/search/SearchLayoutView.js | 19 +- .../js/views/search/SearchResultLayoutView.js | 22 +- 20 files changed, 3303 insertions(+), 26 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/edc4786b/dashboardv2/gruntfile.js ---------------------------------------------------------------------- diff --git a/dashboardv2/gruntfile.js b/dashboardv2/gruntfile.js index a252f1d..c8da73b 100644 --- a/dashboardv2/gruntfile.js +++ b/dashboardv2/gruntfile.js @@ -126,7 +126,7 @@ module.exports = function(grunt) { 'd3': 'd3/d3.min.js', 'd3/': 'd3-tip/index.js', 'dagre-d3': 'dagre-d3/dist/dagre-d3.min.js', - 'select2': 'select2/dist/js/select2.min.js', + 'select2': 'select2/dist/js/select2.full.min.js', 'backgrid-select-all': 'backgrid-select-all/backgrid-select-all.min.js', 'moment/js': 'moment/min/moment.min.js', 'jquery-placeholder/js': 'jquery-placeholder/jquery.placeholder.js', http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/edc4786b/dashboardv2/public/css/scss/form.scss ---------------------------------------------------------------------- diff --git a/dashboardv2/public/css/scss/form.scss b/dashboardv2/public/css/scss/form.scss index e17b7bb..3ee94f5 100644 --- a/dashboardv2/public/css/scss/form.scss +++ b/dashboardv2/public/css/scss/form.scss @@ -227,3 +227,23 @@ button:focus { .block { display: block !important; } + +.editBtn { + border-color: $color_mountain_mist_approx; + color: $color_mountain_mist_approx; + cursor: default; + margin: 5px 10px; + font-size: 14px; + cursor: pointer; + padding: 0px 5px; + &:hover { + border-color: $color_mountain_mist_approx; + color: $color_mountain_mist_approx; + background-color: $transparent; + } + &:focus { + border-color: $color_mountain_mist_approx; + color: $color_mountain_mist_approx; + background-color: $transparent; + } +} http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/edc4786b/dashboardv2/public/css/scss/override.scss ---------------------------------------------------------------------- diff --git a/dashboardv2/public/css/scss/override.scss b/dashboardv2/public/css/scss/override.scss index 2db5568..fab8c25 100644 --- a/dashboardv2/public/css/scss/override.scss +++ b/dashboardv2/public/css/scss/override.scss @@ -152,6 +152,11 @@ .select2-container--default .select2-search--inline .select2-search__field { color: #555; + width: 300px !important; +} + +.select2-container--default .select2-selection--single .select2-selection__rendered { + width: 327px !important; } .typeLOV { @@ -240,3 +245,7 @@ } } } + +.tab-content > .tab-pane.active { + overflow-x: hidden; +} http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/edc4786b/dashboardv2/public/css/scss/search.scss ---------------------------------------------------------------------- diff --git a/dashboardv2/public/css/scss/search.scss b/dashboardv2/public/css/scss/search.scss index 24b2212..a754924 100644 --- a/dashboardv2/public/css/scss/search.scss +++ b/dashboardv2/public/css/scss/search.scss @@ -36,7 +36,6 @@ $switchTransition: .4s ease-out; .switch { position: relative; - display: inline-block; width: 50px; height: 22px; margin-left: 8px; http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/edc4786b/dashboardv2/public/css/scss/tag.scss ---------------------------------------------------------------------- diff --git a/dashboardv2/public/css/scss/tag.scss b/dashboardv2/public/css/scss/tag.scss index fa194fa..0b931d0 100644 --- a/dashboardv2/public/css/scss/tag.scss +++ b/dashboardv2/public/css/scss/tag.scss @@ -284,7 +284,8 @@ form-control .tagInpput { float: left; padding: 2px 10px 2px 0px; font-weight: 600; - width: 70px + width: 70px; + margin-right: 5px; } .inputAssignTag { @@ -300,11 +301,6 @@ form-control .tagInpput { cursor: pointer; background-color: $white; white-space: nowrap; - // i.fa { - // position: relative; - // right: -5px; - // cursor: pointer; - // } &:hover { color: $color_dark_grey_approx; background-color: $color_mercury_approx; @@ -346,3 +342,68 @@ form-control .tagInpput { .tagAttributeLabel { color: $color_star_dust_approx; } + +fieldset.scheduler-border { + border-top: 1px solid #999 !important; + padding: 0 1em 0em 1em !important; + margin: 0 0 .5em 0 !important; +} + +legend.scheduler-border { + width: auto; + padding: 0 5px; + border-bottom: none; + font-size: 16px; + margin-left: 50%; + margin-bottom: 10px; + color: #555; +} + +.requiredInput { + color: #d20606; +} + +.spanEntityType { + position: absolute; + right: 38px; + top: 10px; + cursor: help; + width: 45px; + overflow: hidden; + z-index: 9; + text-overflow: ellipsis; + font-size: 14px; + color: #a7a19f; +} + +.enitityInputBox { + padding-right: 69px; +} + +.entityLoader { + margin-left: 286px; +} + +.errorClass { + border: 1px solid red; +} + +.entityInputBox { + padding-right: 70px; +} + +.attributeTag { + padding: 5px 8px; + border: 1px solid #999999; + color: #999999; + border-radius: 1px; + cursor: pointer +} + +.attrTopMargin { + margin-top: 15px; +} + +.topMargin { + margin-top: 13px; +} http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/edc4786b/dashboardv2/public/index.html ---------------------------------------------------------------------- diff --git a/dashboardv2/public/index.html b/dashboardv2/public/index.html index 04edcee..36ddef5 100644 --- a/dashboardv2/public/index.html +++ b/dashboardv2/public/index.html @@ -45,6 +45,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.min.css"> + <link rel="stylesheet" href="js/external_lib/datetimepicker/bootstrap-datetimepicker.min.css"> <link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400italic,600,600italic,700,700italic' rel='stylesheet' type='text/css'> <link rel="stylesheet" type="text/css" href="js/external_lib/jquery-ui/jquery-ui.min.css"> <link href="css/bootstrap-sidebar.css" rel="stylesheet"> http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/edc4786b/dashboardv2/public/js/collection/VEntityList.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/collection/VEntityList.js b/dashboardv2/public/js/collection/VEntityList.js index bfcbe99..99b0f3b 100644 --- a/dashboardv2/public/js/collection/VEntityList.js +++ b/dashboardv2/public/js/collection/VEntityList.js @@ -40,14 +40,7 @@ define(['require', // if (!this.modelAttrName) { // throw new Error("this.modelAttrName not defined for " + this); // } - if (this.modelAttrName && this.modelAttrName.length) { - if (resp[this.modelAttrName]) { - return resp[this.modelAttrName]; - } else { - return resp - } - - } else { + if (this.modelAttrName && this.modelAttrName === "createEntity") { var arr = []; arr.push({ attributes: resp.attributes, @@ -56,6 +49,12 @@ define(['require', typeName: resp.typeName }); return arr; + } else { + if (resp[this.modelAttrName]) { + return resp[this.modelAttrName]; + } else { + return resp + } } } catch (e) { http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/edc4786b/dashboardv2/public/js/collection/VSearchList.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/collection/VSearchList.js b/dashboardv2/public/js/collection/VSearchList.js index 640be40..3b02f05 100644 --- a/dashboardv2/public/js/collection/VSearchList.js +++ b/dashboardv2/public/js/collection/VSearchList.js @@ -46,7 +46,15 @@ define(['require', if (!this.modelAttrName) { throw new Error("this.modelAttrName not defined for " + this); } - return _.reject(resp[this.modelAttrName], _.isNull); + var list = _.reject(resp[this.modelAttrName], _.isNull); + _.each(list, function(obj) { + if (!obj.id) { + if (obj['$id$'] && obj['$id$'].id) { + obj.id = obj['$id$'].id + } + } + }) + return list; } catch (e) { console.log(e); }
