You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by kb...@apache.org on 2019/01/03 11:20:26 UTC
[1/3] atlas git commit: ATLAS-2998 : UI : create entity icon for
atlas-core type and aws
Repository: atlas
Updated Branches:
refs/heads/branch-1.0 96de07966 -> 5dcfc9a85
ATLAS-2998 : UI : create entity icon for atlas-core type and aws
(cherry picked from commit e04c857d4da79eade201ea07a287bb2fef19bea2)
Signed-off-by: kevalbhatt <kb...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/8a62f976
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/8a62f976
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/8a62f976
Branch: refs/heads/branch-1.0
Commit: 8a62f9767f679db4d643e45f9c94178a4705646c
Parents: 96de079
Author: kevalbhatt <kb...@apache.org>
Authored: Mon Dec 17 18:41:32 2018 +0530
Committer: kevalbhatt <kb...@apache.org>
Committed: Thu Jan 3 16:48:09 2019 +0530
----------------------------------------------------------------------
dashboardv2/public/img/entity-icon/AtlasServer.png | Bin 0 -> 5722 bytes
dashboardv2/public/img/entity-icon/DataSet.png | Bin 0 -> 3830 bytes
dashboardv2/public/img/entity-icon/aws.png | Bin 0 -> 9915 bytes
.../public/img/entity-icon/disabled/AtlasServer.png | Bin 0 -> 4921 bytes
.../public/img/entity-icon/disabled/DataSet.png | Bin 0 -> 3362 bytes
dashboardv2/public/img/entity-icon/disabled/aws.png | Bin 0 -> 7337 bytes
6 files changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/atlas/blob/8a62f976/dashboardv2/public/img/entity-icon/AtlasServer.png
----------------------------------------------------------------------
diff --git a/dashboardv2/public/img/entity-icon/AtlasServer.png b/dashboardv2/public/img/entity-icon/AtlasServer.png
new file mode 100644
index 0000000..f24c017
Binary files /dev/null and b/dashboardv2/public/img/entity-icon/AtlasServer.png differ
http://git-wip-us.apache.org/repos/asf/atlas/blob/8a62f976/dashboardv2/public/img/entity-icon/DataSet.png
----------------------------------------------------------------------
diff --git a/dashboardv2/public/img/entity-icon/DataSet.png b/dashboardv2/public/img/entity-icon/DataSet.png
new file mode 100644
index 0000000..5fb3767
Binary files /dev/null and b/dashboardv2/public/img/entity-icon/DataSet.png differ
http://git-wip-us.apache.org/repos/asf/atlas/blob/8a62f976/dashboardv2/public/img/entity-icon/aws.png
----------------------------------------------------------------------
diff --git a/dashboardv2/public/img/entity-icon/aws.png b/dashboardv2/public/img/entity-icon/aws.png
new file mode 100644
index 0000000..8c8f7c5
Binary files /dev/null and b/dashboardv2/public/img/entity-icon/aws.png differ
http://git-wip-us.apache.org/repos/asf/atlas/blob/8a62f976/dashboardv2/public/img/entity-icon/disabled/AtlasServer.png
----------------------------------------------------------------------
diff --git a/dashboardv2/public/img/entity-icon/disabled/AtlasServer.png b/dashboardv2/public/img/entity-icon/disabled/AtlasServer.png
new file mode 100644
index 0000000..ab3a124
Binary files /dev/null and b/dashboardv2/public/img/entity-icon/disabled/AtlasServer.png differ
http://git-wip-us.apache.org/repos/asf/atlas/blob/8a62f976/dashboardv2/public/img/entity-icon/disabled/DataSet.png
----------------------------------------------------------------------
diff --git a/dashboardv2/public/img/entity-icon/disabled/DataSet.png b/dashboardv2/public/img/entity-icon/disabled/DataSet.png
new file mode 100644
index 0000000..5ed51de
Binary files /dev/null and b/dashboardv2/public/img/entity-icon/disabled/DataSet.png differ
http://git-wip-us.apache.org/repos/asf/atlas/blob/8a62f976/dashboardv2/public/img/entity-icon/disabled/aws.png
----------------------------------------------------------------------
diff --git a/dashboardv2/public/img/entity-icon/disabled/aws.png b/dashboardv2/public/img/entity-icon/disabled/aws.png
new file mode 100644
index 0000000..d9be6f3
Binary files /dev/null and b/dashboardv2/public/img/entity-icon/disabled/aws.png differ
[2/3] atlas git commit: ATLAS-3009 UI - Please provide Full screen
support for Lineage
Posted by kb...@apache.org.
ATLAS-3009 UI - Please provide Full screen support for Lineage
Signed-off-by: kevalbhatt <kb...@apache.org>
(cherry picked from commit 2a3b8830241a6bec7093bacfd91de44655adc28f)
Signed-off-by: kevalbhatt <kb...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/c51ab2d8
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/c51ab2d8
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/c51ab2d8
Branch: refs/heads/branch-1.0
Commit: c51ab2d8aa5c38ac9ee376f04ba7dc9b343bb6bb
Parents: 8a62f97
Author: Abhishek Kadam <ab...@gmail.com>
Authored: Wed Jan 2 16:45:36 2019 +0530
Committer: kevalbhatt <kb...@apache.org>
Committed: Thu Jan 3 16:49:05 2019 +0530
----------------------------------------------------------------------
dashboardv2/public/css/scss/form.scss | 7 +++
dashboardv2/public/css/scss/graph.scss | 58 +++++++++++++-------
dashboardv2/public/css/scss/relationship.scss | 4 ++
.../detail_page/DetailPageLayoutView_tmpl.html | 19 +++----
.../templates/graph/LineageLayoutView_tmpl.html | 17 +++---
.../graph/RelationshipLayoutView_tmpl.html | 14 ++---
.../search/SearchResultLayoutView_tmpl.html | 2 +-
dashboardv2/public/js/utils/Utils.js | 37 -------------
.../views/detail_page/DetailPageLayoutView.js | 14 +----
.../public/js/views/graph/LineageLayoutView.js | 25 +++++++--
.../js/views/graph/RelationshipLayoutView.js | 3 +-
11 files changed, 98 insertions(+), 102 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/atlas/blob/c51ab2d8/dashboardv2/public/css/scss/form.scss
----------------------------------------------------------------------
diff --git a/dashboardv2/public/css/scss/form.scss b/dashboardv2/public/css/scss/form.scss
index 0789978..b7ade88 100644
--- a/dashboardv2/public/css/scss/form.scss
+++ b/dashboardv2/public/css/scss/form.scss
@@ -342,6 +342,13 @@ button:focus {
}
}
+.btn-group {
+ .btn-atlas,
+ .btn-action {
+ margin: 0px;
+ }
+}
+
.pagination>.active {
>a {
background-color: $color_curious_blue_approx;
http://git-wip-us.apache.org/repos/asf/atlas/blob/c51ab2d8/dashboardv2/public/css/scss/graph.scss
----------------------------------------------------------------------
diff --git a/dashboardv2/public/css/scss/graph.scss b/dashboardv2/public/css/scss/graph.scss
index 23a1904..b84d59e 100644
--- a/dashboardv2/public/css/scss/graph.scss
+++ b/dashboardv2/public/css/scss/graph.scss
@@ -185,6 +185,10 @@ g.type-TK>rect {
}
.lineage-box {
+ position: absolute;
+ height: 100%;
+ width: 100%;
+ overflow: hidden;
.lineage-edge-details {
position: absolute;
left: 0;
@@ -261,22 +265,10 @@ g.type-TK>rect {
}
.graph-button-group {
- position: absolute;
- top: 5px;
- right: 5px;
-
- .zoom-button-group {
- margin-top: 8px;
- border: 1px solid;
- border-radius: 5px;
- background-color: white;
-
- [type="button"] {
- display: block;
- padding: 2px 6px;
- cursor: pointer;
- }
+ &>div {
+ display: inline-block;
}
+ .zoom-button-group {}
}
.lineage-fltr-panel {
@@ -287,9 +279,8 @@ g.type-TK>rect {
overflow: auto;
transition: all 0.3s ease;
right: -273px;
- box-shadow: 9px -14px 26px 6px;
+ box-shadow: 7px 1px 28px -3px;
background-color: #f5f5f5;
- //color: $white;
z-index: 999;
.header {
@@ -336,7 +327,7 @@ g.type-TK>rect {
.btn-gray:hover {
border: 1px solid #686868;
color: $dark_gray !important;
- background-color: transparent !important;
+ background-color: white !important;
}
@@ -344,11 +335,40 @@ span#zoom_in {
border-bottom: 1px solid #625555;
}
-.depthContainer {
+.depth-container {
//display: inline-block;
//margin-top: 3px;
.inline {
display: inline-block;
}
+}
+
+.resizeGraph {
+ position: relative;
+ width: 100%;
+ height: 64vh;
+}
+
+.active.fullscreen-mode {
+ position: fixed;
+ height: 100% !important;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ width: 100%;
+ right: 0;
+ padding: 0 !important;
+ z-index: 999;
+ overflow: hidden !important;
+ .resizeGraph {
+ position: fixed;
+ height: 100% !important;
+ .ui-resizable-handle {
+ display: none;
+ }
+ }
+ .lineage-box {
+ padding: 10px !important;
+ }
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/atlas/blob/c51ab2d8/dashboardv2/public/css/scss/relationship.scss
----------------------------------------------------------------------
diff --git a/dashboardv2/public/css/scss/relationship.scss b/dashboardv2/public/css/scss/relationship.scss
index 57772d7..e41fe58 100644
--- a/dashboardv2/public/css/scss/relationship.scss
+++ b/dashboardv2/public/css/scss/relationship.scss
@@ -17,6 +17,10 @@
*/
.relationship-box {
+ position: absolute;
+ height: 100%;
+ width: 100%;
+ overflow: hidden;
.relatioship-link {
fill: none;
stroke-width: 1.5px;
http://git-wip-us.apache.org/repos/asf/atlas/blob/c51ab2d8/dashboardv2/public/js/templates/detail_page/DetailPageLayoutView_tmpl.html
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/templates/detail_page/DetailPageLayoutView_tmpl.html b/dashboardv2/public/js/templates/detail_page/DetailPageLayoutView_tmpl.html
index 6cdaff8..c395799 100644
--- a/dashboardv2/public/js/templates/detail_page/DetailPageLayoutView_tmpl.html
+++ b/dashboardv2/public/js/templates/detail_page/DetailPageLayoutView_tmpl.html
@@ -22,8 +22,7 @@
<h1 class="title row">
<div data-id="entityIcon" class="entity-icon-box"></div>
<span data-id="title"></span>
- </h1>
- {{#if entityUpdate}}
+ </h1> {{#if entityUpdate}}
<div data-id="editButtonContainer" class="pull-right"></div>
{{/if}}
<div class="form-group">
@@ -73,20 +72,16 @@
</div>
</div>
<div id="tab-lineage" role="lineage" class="tab-pane animated fadeIn">
- <div class="resizeGraph animated position-relative" align="center" style="height:64vh;">
- <div id="r_lineageLayoutView">
- <div class="fontLoader-relative">
- <i class="fa fa-refresh fa-spin-custom"></i>
- </div>
+ <div id="r_lineageLayoutView" class="animated position-relative" align="center">
+ <div class="fontLoader-relative">
+ <i class="fa fa-refresh fa-spin-custom"></i>
</div>
</div>
</div>
<div id="tab-relationship" role="relationship" class="tab-pane animated fadeIn">
- <div class="resizeGraph animated position-relative" align="center" style="height:64vh;">
- <div id="r_relationshipLayoutView">
- <div class="fontLoader-relative">
- <i class="fa fa-refresh fa-spin-custom"></i>
- </div>
+ <div id="r_relationshipLayoutView" class="animated position-relative">
+ <div class="fontLoader-relative">
+ <i class="fa fa-refresh fa-spin-custom"></i>
</div>
</div>
</div>
http://git-wip-us.apache.org/repos/asf/atlas/blob/c51ab2d8/dashboardv2/public/js/templates/graph/LineageLayoutView_tmpl.html
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/templates/graph/LineageLayoutView_tmpl.html b/dashboardv2/public/js/templates/graph/LineageLayoutView_tmpl.html
index be19895..b93a89c 100644
--- a/dashboardv2/public/js/templates/graph/LineageLayoutView_tmpl.html
+++ b/dashboardv2/public/js/templates/graph/LineageLayoutView_tmpl.html
@@ -15,7 +15,7 @@
* limitations under the License.
-->
<!-- <div class="graph-toolbar clearfix"></div> -->
-<div style="position: absolute;height:100%;width:100%;overflow: hidden;" class="white-bg no-padding lineage-box">
+<div class="white-bg no-padding lineage-box">
<div class="lineage-fltr-panel">
<div class="header clearfix">
<h4>Filters</h4>
@@ -38,7 +38,7 @@
</div>
</div>
</div>
- <div class="depthContainer form-group select2-mini">
+ <div class="depth-container form-group select2-mini">
<label class="control-label col-sm-4">Depth:</label>
<div class="col-sm-4 no-padding">
<select data-id="selectDepth" class="form-control"></select>
@@ -46,19 +46,22 @@
</div>
</div>
</div>
- <div class="graph-button-group">
+ <div class="graph-button-group pull-right">
<div>
<button type="button" data-id="fltr-togler" class="btn btn-action btn-gray btn-sm"><i class="fa fa-filter"></i></button>
</div>
- <div class="zoom-button-group pull-right">
- <span type="button" id="zoom_in" class="btn-md lineageZoomButton" title="Zoom In" data-id="refreshBtn"> <i class="fa fa-search-plus"></i></span>
- <span type="button" id="zoom_out" class="btn-md lineageZoomButton" title="Zoom Out" data-id="refreshBtn"> <i class="fa fa-search-minus"></i></span>
+ <div>
+ <button type="button" data-id="fullScreen-toggler" class="btn btn-action btn-gray btn-sm fullscreen_lineage"><i class="fa fa-expand"></i></button>
+ </div>
+ <div class="btn-group">
+ <button type="button" id="zoom_in" class="btn btn-action btn-gray btn-sm lineageZoomButton" title="Zoom In" data-id="refreshBtn"> <i class="fa fa-search-plus"></i></button>
+ <button type="button" id="zoom_out" class="btn btn-action btn-gray btn-sm lineageZoomButton" title="Zoom Out" data-id="refreshBtn"> <i class="fa fa-search-minus"></i></button>
</div>
</div>
<div class="fontLoader">
<i class="fa fa-refresh fa-spin-custom"></i>
</div>
- <div class="legends" style="height: 25px; padding: 2px;">
+ <div class="legends pull-left" style="height: 25px; padding: 2px;">
<span style="margin-right: 8px; color:#fb4200;"><i class="fa fa-circle-o fa-fw" aria-hidden="true"></i>Current Entity</span>
<span style="margin-right: 8px; color:#df9b00;"><i class="fa fa-long-arrow-right fa-fw" aria-hidden="true"></i>Lineage</span>
<span style="margin-right: 8px; color:#fb4200;"><i class="fa fa-long-arrow-right fa-fw" aria-hidden="true"></i>Impact</span>
http://git-wip-us.apache.org/repos/asf/atlas/blob/c51ab2d8/dashboardv2/public/js/templates/graph/RelationshipLayoutView_tmpl.html
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/templates/graph/RelationshipLayoutView_tmpl.html b/dashboardv2/public/js/templates/graph/RelationshipLayoutView_tmpl.html
index b9946af..3d130ec 100644
--- a/dashboardv2/public/js/templates/graph/RelationshipLayoutView_tmpl.html
+++ b/dashboardv2/public/js/templates/graph/RelationshipLayoutView_tmpl.html
@@ -15,19 +15,17 @@
* limitations under the License.
-->
<!-- <div class="graph-toolbar clearfix"></div> -->
-<div style="position: absolute;height:100%;width:100%;" class="white-bg no-padding relationship-box">
+<div class="white-bg no-padding relationship-box">
<div class="fontLoader">
<i class="fa fa-refresh fa-spin-custom"></i>
</div>
- <div style="position: absolute;height:100%;width:100%;">
- <div class="graph-button-group">
- <div class="zoom-button-group">
- <span type="button" id="zoom_in" class="btn-md lineageZoomButton" title="Zoom In"> <i class="fa fa-search-plus"></i></span>
- <span type="button" id="zoom_out" class="btn-md lineageZoomButton" title="Zoom Out"> <i class="fa fa-search-minus"></i></span>
- </div>
+ <div class="graph-button-group pull-right">
+ <div class="btn-group">
+ <button type="button" id="zoom_in" class="btn btn-action btn-gray btn-sm lineageZoomButton" title="Zoom In" data-id="refreshBtn"> <i class="fa fa-search-plus"></i></button>
+ <button type="button" id="zoom_out" class="btn btn-action btn-gray btn-sm lineageZoomButton" title="Zoom Out" data-id="refreshBtn"> <i class="fa fa-search-minus"></i></button>
</div>
- <svg width="100%" height="100%" viewBox="0 0 854 330" enable-background="new 0 0 854 330" xml:space="preserve"></svg>
</div>
+ <svg width="100%" height="100%" viewBox="0 0 854 330" enable-background="new 0 0 854 330" xml:space="preserve"></svg>
<div class="relationship-details">
<span data-id="close" style="margin: 7px;position: absolute;right: 0" class="btn btn-action btn-sm fltr-togler"><i class="fa fa-close"></i></span>
<!-- <div data-id="close" class="close-details"><i class="fa fa-times"></i></div> -->
http://git-wip-us.apache.org/repos/asf/atlas/blob/c51ab2d8/dashboardv2/public/js/templates/search/SearchResultLayoutView_tmpl.html
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/templates/search/SearchResultLayoutView_tmpl.html b/dashboardv2/public/js/templates/search/SearchResultLayoutView_tmpl.html
index 31cae24..6675664 100644
--- a/dashboardv2/public/js/templates/search/SearchResultLayoutView_tmpl.html
+++ b/dashboardv2/public/js/templates/search/SearchResultLayoutView_tmpl.html
@@ -85,7 +85,7 @@
<div class="input-group" data-id="goToPageDiv">
<input type="text" class="form-control number-input" data-id="gotoPage" placeholder="Goto Page" />
<span class="input-group-btn">
- <button class="btn btn-atlas btn-md no-margin" type="button" data-id="gotoPagebtn" title="Goto Page" disabled="disabled">Go!</button>
+ <button class="btn btn-default" type="button" data-id="gotoPagebtn" title="Goto Page" disabled="disabled">Go!</button>
</span>
</div>
</div>
http://git-wip-us.apache.org/repos/asf/atlas/blob/c51ab2d8/dashboardv2/public/js/utils/Utils.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/utils/Utils.js b/dashboardv2/public/js/utils/Utils.js
index 6ebfe94..e14ba67 100644
--- a/dashboardv2/public/js/utils/Utils.js
+++ b/dashboardv2/public/js/utils/Utils.js
@@ -756,43 +756,6 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums',
this.attr(attributeName, firstString);
}
}
- $('body').on('click', '.expand_collapse_panel', function() {
- var icon = $(this).find('i'),
- panel = $(this).parents('.panel').first(),
- panelBody = panel.find('.panel-body');
- icon.toggleClass('fa-chevron-up fa-chevron-down');
- $(this).toggleAttribute('title', 'Collapse', 'Expand');
- panelBody.toggle();
- $(this).trigger('expand_collapse_panel', [$(this).parents('.panel')]);
- });
- $('body').on('click', '.fullscreen_panel', function() {
- var icon = $(this).find('i'),
- panel = $(this).parents('.panel').first(),
- panelBody = panel.find('.panel-body');
- icon.toggleClass('fa-expand fa-compress');
- $(this).toggleAttribute('title', 'Fullscreen', 'Exit Fullscreen');
- panel.toggleClass('panel-fullscreen');
- panel.find('.expand_collapse_panel').toggle();
- // Condition if user clicks on fullscree button and body is in collapse mode.
- if (panel.hasClass('panel-fullscreen')) {
- $('body').css("position", "fixed");
- if (!panelBody.is(':visible')) {
- panelBody.show();
- panelBody.addClass('full-visible');
- }
- //first show body to get width and height for postion then trigger the event.
- $(this).trigger('fullscreen_done', [$(this).parents('.panel')]);
- } else if (panelBody.hasClass('full-visible')) {
- $('body').removeAttr("style");
- $(this).trigger('fullscreen_done', [$(this).parents('.panel')]);
- //first trigger the event to getwidth and height for postion then hide body.
- panelBody.hide();
- panelBody.removeClass('full-visible');
- } else {
- $('body').removeAttr("style");
- $(this).trigger('fullscreen_done', [$(this).parents('.panel')]);
- }
- });
$('body').on('click', 'pre.code-block .expand-collapse-button', function(e) {
var $el = $(this).parents('.code-block');
http://git-wip-us.apache.org/repos/asf/atlas/blob/c51ab2d8/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 46d427b..9f5dc30 100644
--- a/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
+++ b/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
@@ -25,8 +25,7 @@ define(['require',
'utils/Globals',
'utils/Enums',
'utils/Messages',
- 'utils/UrlLinks',
- 'jquery-ui'
+ 'utils/UrlLinks'
], function(require, Backbone, DetailPageLayoutViewTmpl, ButtonsTmpl, Utils, CommonViewFunction, Globals, Enums, Messages, UrlLinks) {
'use strict';
@@ -65,7 +64,6 @@ define(['require',
tagList: '[data-id="tagList"]',
termList: '[data-id="termList"]',
propagatedTagList: '[data-id="propagatedTagList"]',
- fullscreenPanel: "#fullscreen_panel",
tablist: '[data-id="tab-list"] li',
entityIcon: '[data-id="entityIcon"]'
},
@@ -280,16 +278,6 @@ define(['require',
guid: this.id,
entityDefCollection: this.entityDefCollection,
fetchCollection: this.fetchCollection.bind(this),
- actionCallBack: function() {
- that.$('#expand_collapse_panel').click();
- }
- });
- this.$(".resizeGraph").resizable({
- handles: ' s',
- minHeight: 375,
- stop: function(event, ui) {
- ui.element.height(($(this).height()));
- },
});
} else if (this.value && this.value.tabActive == "lineage") {
Utils.setUrl({
http://git-wip-us.apache.org/repos/asf/atlas/blob/c51ab2d8/dashboardv2/public/js/views/graph/LineageLayoutView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/graph/LineageLayoutView.js b/dashboardv2/public/js/views/graph/LineageLayoutView.js
index 1edffbc..2f64f1e 100644
--- a/dashboardv2/public/js/views/graph/LineageLayoutView.js
+++ b/dashboardv2/public/js/views/graph/LineageLayoutView.js
@@ -27,7 +27,8 @@ define(['require',
'utils/Enums',
'utils/UrlLinks',
'utils/Globals',
- 'platform'
+ 'platform',
+ 'jquery-ui'
], function(require, Backbone, LineageLayoutViewtmpl, VLineageList, VEntity, Utils, dagreD3, d3Tip, Enums, UrlLinks, Globals, platform) {
'use strict';
@@ -37,6 +38,7 @@ define(['require',
_viewName: 'LineageLayoutView',
template: LineageLayoutViewtmpl,
+ className: "resizeGraph",
/** Layout sub regions */
regions: {},
@@ -48,7 +50,8 @@ define(['require',
checkDeletedEntity: "[data-id='checkDeletedEntity']",
selectDepth: 'select[data-id="selectDepth"]',
fltrTogler: '[data-id="fltr-togler"]',
- lineageFilterPanel: '.lineage-fltr-panel'
+ lineageFilterPanel: '.lineage-fltr-panel',
+ LineageFullscreenToggler: '[data-id="fullScreen-toggler"]'
},
/** ui events hash */
@@ -58,6 +61,7 @@ define(['require',
events["click " + this.ui.checkDeletedEntity] = 'onCheckUnwantedEntity';
events['change ' + this.ui.selectDepth] = 'onSelectDepthChange';
events["click " + this.ui.fltrTogler] = 'onClickFiltrTogler';
+ events["click " + this.ui.LineageFullscreenToggler] = 'onClickLineageFullscreenToggler';
return events;
},
@@ -120,6 +124,19 @@ define(['require',
},
onShow: function() {
this.$('.fontLoader').show();
+ this.$el.resizable({
+ handles: ' s',
+ minHeight: 375,
+ stop: function(event, ui) {
+ ui.element.height(($(this).height()));
+ },
+ });
+ },
+ onClickLineageFullscreenToggler: function(e) {
+ var icon = $(e.target).find('i'),
+ panel = $(e.target).parents('.tab-pane').first();
+ icon.toggleClass('fa-expand fa-compress');
+ panel.toggleClass('fullscreen-mode');
},
onCheckUnwantedEntity: function(e) {
var data = $.extend(true, {}, this.lineageData);
@@ -173,7 +190,7 @@ define(['require',
},
noLineage: function() {
this.$('.fontLoader').hide();
- this.$('.depthContainer').hide();
+ this.$('.depth-container').hide();
//this.$('svg').height('100');
this.$('svg').html('<text x="50%" y="50%" alignment-baseline="middle" text-anchor="middle">No lineage data found</text>');
if (this.actionCallBack) {
@@ -484,7 +501,7 @@ define(['require',
interpolateZoom([view.x, view.y], view.k);
}
- d3.selectAll(this.$('span.lineageZoomButton')).on('click', zoomClick);
+ d3.selectAll(this.$('.lineageZoomButton')).on('click', zoomClick);
var tooltip = d3Tip()
.attr('class', 'd3-tip')
.offset([10, 0])
http://git-wip-us.apache.org/repos/asf/atlas/blob/c51ab2d8/dashboardv2/public/js/views/graph/RelationshipLayoutView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/graph/RelationshipLayoutView.js b/dashboardv2/public/js/views/graph/RelationshipLayoutView.js
index c3d46da..ba0ea62 100644
--- a/dashboardv2/public/js/views/graph/RelationshipLayoutView.js
+++ b/dashboardv2/public/js/views/graph/RelationshipLayoutView.js
@@ -35,6 +35,7 @@ define(['require',
_viewName: 'RelationshipLayoutView',
template: RelationshipLayoutViewtmpl,
+ className: "resizeGraph",
/** Layout sub regions */
regions: {},
@@ -225,7 +226,7 @@ define(['require',
- d3.selectAll(this.$('span.lineageZoomButton')).on('click', zoomClick);
+ d3.selectAll(this.$('.lineageZoomButton')).on('click', zoomClick);
var svg = d3.select(this.$("svg")[0])
.attr("viewBox", "0 0 " + width + " " + height)
[3/3] atlas git commit: ATLAS-3007 UI : Add go to page and page limit
option for local pagination
Posted by kb...@apache.org.
ATLAS-3007 UI : Add go to page and page limit option for local pagination
(cherry picked from commit 83fbe467bf5d80032ee3b5f1279589a3710f45e3)
Signed-off-by: kevalbhatt <kb...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/5dcfc9a8
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/5dcfc9a8
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/5dcfc9a8
Branch: refs/heads/branch-1.0
Commit: 5dcfc9a85f836666f7cabcac053f53f33a6db22d
Parents: c51ab2d
Author: kevalbhatt <kb...@apache.org>
Authored: Wed Jan 2 16:52:09 2019 +0530
Committer: kevalbhatt <kb...@apache.org>
Committed: Thu Jan 3 16:49:21 2019 +0530
----------------------------------------------------------------------
.../js/templates/common/TableLayout_tmpl.html | 12 +-
dashboardv2/public/js/utils/TableLayout.js | 118 +++++++++++++------
.../public/js/views/schema/SchemaLayoutView.js | 3 +-
.../js/views/search/SearchResultLayoutView.js | 9 +-
.../js/views/tag/TagDetailTableLayoutView.js | 2 +
5 files changed, 98 insertions(+), 46 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/atlas/blob/5dcfc9a8/dashboardv2/public/js/templates/common/TableLayout_tmpl.html
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/templates/common/TableLayout_tmpl.html b/dashboardv2/public/js/templates/common/TableLayout_tmpl.html
index 82d6c39..60ccc2f 100644
--- a/dashboardv2/public/js/templates/common/TableLayout_tmpl.html
+++ b/dashboardv2/public/js/templates/common/TableLayout_tmpl.html
@@ -45,7 +45,17 @@
<div class="row clearfix banded pagination-box">
<div class="col-sm-offset-4 col-sm-8">
<div class="inline-content-fr">
- <div data-id="r_pagination" class="inline"></div>
+ <div data-id="r_pagination" data-id="paginationDiv" class="inline"></div>
+ {{#if includeGotoPage}}
+ <div class="inline col-sm-4" data-id="paginationDiv" style="display:none">
+ <div class="input-group" data-id="goToPageDiv">
+ <input type="text" class="form-control number-input" data-id="gotoPage" placeholder="Goto Page" />
+ <span class="input-group-btn">
+ <button class="btn btn-default" type="button" data-id="gotoPagebtn" title="Goto Page" disabled="disabled">Go!</button>
+ </span>
+ </div>
+ </div>
+ {{/if}}
{{#if includePageSize}}
<div class="inline">
<div class="inline-content">
http://git-wip-us.apache.org/repos/asf/atlas/blob/5dcfc9a8/dashboardv2/public/js/utils/TableLayout.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/utils/TableLayout.js b/dashboardv2/public/js/utils/TableLayout.js
index 2113832..9f5db6f 100644
--- a/dashboardv2/public/js/utils/TableLayout.js
+++ b/dashboardv2/public/js/utils/TableLayout.js
@@ -24,13 +24,15 @@ define(['require',
'hbs!tmpl/common/TableLayout_tmpl',
'utils/Messages',
'utils/Utils',
+ 'utils/Globals',
+ 'utils/CommonViewFunction',
'backgrid-filter',
'backgrid-paginator',
'backgrid-sizeable',
'backgrid-orderable',
'backgrid-select-all',
'backgrid-columnmanager'
-], function(require, Backbone, FSTablelayoutTmpl, Messages, Utils) {
+], function(require, Backbone, FSTablelayoutTmpl, Messages, Utils, Globals, CommonViewFunction) {
'use strict';
var FSTableLayout = Backbone.Marionette.LayoutView.extend(
@@ -125,12 +127,16 @@ define(['require',
includeAtlasPagination: false,
+ includeAtlasPageSize: false,
+
includeFilter: false,
includeHeaderSearch: false,
includePageSize: false,
+ includeGotoPage: false,
+
includeFooterRecords: true,
includeColumnManager: false,
@@ -147,6 +153,7 @@ define(['require',
var events = {},
that = this;
events['change ' + this.ui.selectPageSize] = 'onPageSizeChange';
+ events['change ' + this.ui.showPage] = 'changePageLimit';
events["click " + this.ui.nextData] = "onClicknextData";
events["click " + this.ui.previousData] = "onClickpreviousData";
events["click " + this.ui.gotoPagebtn] = 'gotoPagebtn';
@@ -174,15 +181,9 @@ define(['require',
initialize: function(options) {
this.limit = 25;
this.offset = 0;
- _.extend(this, _.pick(options, 'collection', 'columns', 'includePagination', 'includeHeaderSearch', 'includeFilter', 'includePageSize',
- 'includeFooterRecords', 'includeColumnManager', 'includeSizeAbleColumns', 'includeOrderAbleColumns', 'includeTableLoader', 'includeAtlasPagination', 'atlasPaginationOpts'));
- _.extend(this, this.atlasPaginationOpts);
+ _.extend(this, _.omit(options, 'gridOpts', 'atlasPaginationOpts'));
+ _.extend(this, options.atlasPaginationOpts);
_.extend(this.gridOpts, options.gridOpts, { collection: this.collection, columns: this.columns });
- _.extend(this.filterOpts, options.filterOpts);
- _.extend(this.paginatorOpts, options.paginatorOpts);
- _.extend(this.controlOpts, options.controlOpts);
- _.extend(this.columnOpts, options.columnOpts);
-
this.bindEvents();
},
@@ -197,6 +198,9 @@ define(['require',
this.listenTo(this.collection, 'reset', function(collection, options) {
this.$('div[data-id="r_tableSpinner"]').removeClass('show');
+ this.ui.gotoPage.val('');
+ this.ui.gotoPage.parent().removeClass('has-error');
+ this.ui.gotoPagebtn.prop("disabled", true);
if (this.includePagination) {
this.renderPagination();
}
@@ -204,7 +208,7 @@ define(['require',
this.renderFooterRecords(this.collection.state);
}
if (this.includeAtlasPagination) {
- this.renderAtlasPagination(options);
+ this.renderAtlasPagination(collection, options);
}
}, this);
@@ -261,14 +265,24 @@ define(['require',
if (this.includeColumnManager) {
this.renderColumnManager();
}
+ var pageSizeEl = null;
if (this.includePageSize) {
- this.ui.selectPageSize.select2({
+ pageSizeEl = this.ui.selectPageSize;
+ } else if (this.includeAtlasPageSize) {
+ pageSizeEl = this.ui.showPage;
+ }
+ if (pageSizeEl) {
+ pageSizeEl.select2({
data: _.sortBy(_.union([25, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500], [this.collection.state.pageSize])),
tags: true,
dropdownCssClass: "number-input",
multiple: false
});
- this.ui.selectPageSize.val(this.collection.state.pageSize).trigger('change', { "skipViewChange": true });
+ var val = this.collection.state.pageSize;
+ if (this.value && this.value.pageLimit) {
+ val = this.limit;
+ }
+ pageSizeEl.val(val).trigger('change', { "skipViewChange": true });
}
},
@@ -305,6 +319,7 @@ define(['require',
this.rPagination.show(new Backgrid.Extension.Paginator(options));
} else if (this.regions.rPagination) {
this.$('div[data-id="r_pagination"]').show(new Backgrid.Extension.Paginator(options));
+ this.showHideGoToPage();
}
},
@@ -392,6 +407,14 @@ define(['require',
}
},
+ showHideGoToPage: function() {
+ if (this.collection.state.pageSize > this.collection.fullCollection.length) {
+ this.ui.paginationDiv.hide();
+ } else {
+ this.ui.paginationDiv.show();
+ }
+ },
+
/**
* show/hide filter of the grid
*/
@@ -423,6 +446,9 @@ define(['require',
* ColumnManager for the table
*/
renderColumnManager: function() {
+ if (!this.columns) {
+ return;
+ }
var that = this,
$el = this.columnOpts.el || this.$("[data-id='control']"),
colManager = new Backgrid.Extension.ColumnManager(this.columns, this.columnOpts.opts),
@@ -446,7 +472,6 @@ define(['require',
that.collection.trigger("state-changed");
});
},
-
renderSizeAbleColumns: function() {
// Add sizeable columns
var that = this,
@@ -507,11 +532,17 @@ define(['require',
onPageSizeChange: function(e, options) {
if (!options || !options.skipViewChange) {
var pagesize = $(e.currentTarget).val();
+ if (pagesize == 0) {
+ this.ui.selectPageSize.data('select2').$container.addClass('has-error');
+ return;
+ } else {
+ this.ui.selectPageSize.data('select2').$container.removeClass('has-error');
+ }
this.collection.state.pageSize = parseInt(pagesize, 10);
-
this.collection.state.currentPage = this.collection.state.firstPage;
+ this.showHideGoToPage();
if (this.collection.mode == "client") {
- this.collection.reset(this.collection.toJSON());
+ this.collection.fullCollection.reset(this.collection.fullCollection.toJSON());
} else {
this.collection.fetch({
sort: false,
@@ -521,6 +552,9 @@ define(['require',
}
}
},
+ /**
+ atlasNextBtn
+ **/
onClicknextData: function() {
this.offset = this.offset + this.limit;
_.extend(this.collection.queryParams, {
@@ -532,14 +566,15 @@ define(['require',
this.triggerUrl();
}
}
- this.ui.gotoPage.val('');
- this.ui.gotoPage.parent().removeClass('has-error');
if (this.fetchCollection) {
this.fetchCollection({
next: true
});
}
},
+ /**
+ atlasPrevBtn
+ **/
onClickpreviousData: function() {
this.offset = this.offset - this.limit;
if (this.offset <= -1) {
@@ -554,15 +589,15 @@ define(['require',
this.triggerUrl();
}
}
- this.ui.gotoPage.val('');
- this.ui.gotoPage.parent().removeClass('has-error');
if (this.fetchCollection) {
this.fetchCollection({
previous: true
});
}
},
- // TODO : Need to add pageLimit for atlasPagination
+ /**
+ atlasPageLimit
+ **/
changePageLimit: function(e, obj) {
if (!obj || (obj && !obj.skipViewChange)) {
var limit = parseInt(this.ui.showPage.val());
@@ -581,35 +616,42 @@ define(['require',
this.triggerUrl();
}
}
- this.ui.gotoPage.val('');
- this.ui.gotoPage.parent().removeClass('has-error');
_.extend(this.collection.queryParams, { limit: this.limit, offset: this.offset });
this.fetchCollection();
}
},
+ /**
+ atlasGotoBtn & Local Goto Btn
+ **/
gotoPagebtn: function(e) {
var that = this;
var goToPage = parseInt(this.ui.gotoPage.val());
if (!(_.isNaN(goToPage) || goToPage <= -1)) {
- this.offset = (goToPage - 1) * this.limit;
- if (this.offset <= -1) {
- this.offset = 0;
- }
- _.extend(this.collection.queryParams, { limit: this.limit, offset: this.offset });
- if (this.offset == (this.pageFrom - 1)) {
- Utils.notifyInfo({
- content: Messages.search.onSamePage
+ if (this.collection.mode == "client") {
+ return this.collection.getPage((goToPage - 1), {
+ reset: true
});
} else {
- if (this.value) {
- this.value.pageOffset = this.offset;
- if (this.triggerUrl) {
- this.triggerUrl();
- }
+ this.offset = (goToPage - 1) * this.limit;
+ if (this.offset <= -1) {
+ this.offset = 0;
}
- // this.offset is updated in gotoPagebtn function so use next button calculation.
- if (this.fetchCollection) {
- this.fetchCollection({ 'next': true });
+ _.extend(this.collection.queryParams, { limit: this.limit, offset: this.offset });
+ if (this.offset == (this.pageFrom - 1)) {
+ Utils.notifyInfo({
+ content: Messages.search.onSamePage
+ });
+ } else {
+ if (this.value) {
+ this.value.pageOffset = this.offset;
+ if (this.triggerUrl) {
+ this.triggerUrl();
+ }
+ }
+ // this.offset is updated in gotoPagebtn function so use next button calculation.
+ if (this.fetchCollection) {
+ this.fetchCollection({ 'next': true });
+ }
}
}
}
http://git-wip-us.apache.org/repos/asf/atlas/blob/5dcfc9a8/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 231f118..54f7aed 100644
--- a/dashboardv2/public/js/views/schema/SchemaLayoutView.js
+++ b/dashboardv2/public/js/views/schema/SchemaLayoutView.js
@@ -79,7 +79,8 @@ define(['require',
collection: this.schemaCollection,
includeFilter: false,
includePagination: true,
- includePageSize: false,
+ includePageSize: true,
+ includeGotoPage: true,
includeFooterRecords: true,
includeOrderAbleColumns: false,
gridOpts: {
http://git-wip-us.apache.org/repos/asf/atlas/blob/5dcfc9a8/dashboardv2/public/js/views/search/SearchResultLayoutView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/search/SearchResultLayoutView.js b/dashboardv2/public/js/views/search/SearchResultLayoutView.js
index 8667f98..38a5de8 100644
--- a/dashboardv2/public/js/views/search/SearchResultLayoutView.js
+++ b/dashboardv2/public/js/views/search/SearchResultLayoutView.js
@@ -375,6 +375,9 @@ define(['require',
if (that.isDestroyed) {
return;
}
+ that.ui.gotoPage.val('');
+ that.ui.gotoPage.parent().removeClass('has-error');
+ that.ui.gotoPagebtn.prop("disabled", true);
Globals.searchApiCallRef = undefined;
var isFirstPage = that.offset === 0,
dataLength = 0,
@@ -1006,8 +1009,6 @@ define(['require',
this.value.pageOffset = this.offset;
this.triggerUrl();
}
- this.ui.gotoPage.val('');
- this.ui.gotoPage.parent().removeClass('has-error');
this.fetchCollection(null, {
next: true
});
@@ -1024,8 +1025,6 @@ define(['require',
this.value.pageOffset = this.offset;
this.triggerUrl();
}
- this.ui.gotoPage.val('');
- this.ui.gotoPage.parent().removeClass('has-error');
this.fetchCollection(null, {
previous: true
});
@@ -1074,8 +1073,6 @@ define(['require',
this.value.pageOffset = this.offset;
this.triggerUrl();
}
- this.ui.gotoPage.val('');
- this.ui.gotoPage.parent().removeClass('has-error');
_.extend(this.searchCollection.queryParams, { limit: this.limit, offset: this.offset });
this.fetchCollection();
}
http://git-wip-us.apache.org/repos/asf/atlas/blob/5dcfc9a8/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 6d8c416..73d8dfb 100644
--- a/dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js
+++ b/dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js
@@ -86,6 +86,8 @@ define(['require',
includePagination: true,
includePageSize: false,
includeFooterRecords: true,
+ includePageSize: true,
+ includeGotoPage: true,
gridOpts: {
className: "table table-hover backgrid table-quickMenu",
emptyText: 'No records found!'