You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by ni...@apache.org on 2019/04/09 13:22:19 UTC
[atlas] branch branch-1.0 updated: ATLAS-3127: UI : On Load Graph
zoom buttons (+/-) is visible on top of relationship Table.
This is an automated email from the ASF dual-hosted git repository.
nixon pushed a commit to branch branch-1.0
in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/branch-1.0 by this push:
new 48386f3 ATLAS-3127: UI : On Load Graph zoom buttons (+/-) is visible on top of relationship Table.
48386f3 is described below
commit 48386f3c3570024e84c8fe6ee672cd7ddb873a96
Author: kevalbhatt <kb...@apache.org>
AuthorDate: Mon Apr 8 14:42:33 2019 +0530
ATLAS-3127: UI : On Load Graph zoom buttons (+/-) is visible on top of relationship Table.
Signed-off-by: nixonrodrigues <ni...@apache.org>
---
dashboardv2/public/css/scss/graph.scss | 6 ++++++
dashboardv2/public/css/scss/table.scss | 8 ++++++++
dashboardv2/public/js/router/Router.js | 4 ++--
.../public/js/templates/graph/RelationshipLayoutView_tmpl.html | 9 ---------
.../public/js/templates/{common => site}/AboutAtlas_tmpl.html | 0
.../public/js/templates/{common => site}/Statistics_tmpl.html | 0
dashboardv2/public/js/utils/CommonViewFunction.js | 4 ++--
.../public/js/views/detail_page/DetailPageLayoutView.js | 2 +-
dashboardv2/public/js/views/graph/RelationshipLayoutView.js | 3 ++-
dashboardv2/public/js/views/search/QueryBuilderView.js | 10 +++++-----
dashboardv2/public/js/views/search/save/SaveSearchView.js | 4 ++--
dashboardv2/public/js/views/{common => site}/AboutAtlas.js | 2 +-
dashboardv2/public/js/views/{common => site}/Statistics.js | 2 +-
13 files changed, 30 insertions(+), 24 deletions(-)
diff --git a/dashboardv2/public/css/scss/graph.scss b/dashboardv2/public/css/scss/graph.scss
index 3073aee..2a9a880 100644
--- a/dashboardv2/public/css/scss/graph.scss
+++ b/dashboardv2/public/css/scss/graph.scss
@@ -104,6 +104,12 @@
}
}
+.invisible {
+ .node circle {
+ transition: all 0s;
+ }
+}
+
.edgePath {
.path {
cursor: pointer;
diff --git a/dashboardv2/public/css/scss/table.scss b/dashboardv2/public/css/scss/table.scss
index 7aa4774..a2a674f 100644
--- a/dashboardv2/public/css/scss/table.scss
+++ b/dashboardv2/public/css/scss/table.scss
@@ -16,6 +16,14 @@
* limitations under the License.
*/
+tr.empty {
+ td {
+ display: table-cell;
+ text-align: center;
+ }
+}
+
+
.stat-table {
tbody,
diff --git a/dashboardv2/public/js/router/Router.js b/dashboardv2/public/js/router/Router.js
index 0b0d1a8..759ac0f 100644
--- a/dashboardv2/public/js/router/Router.js
+++ b/dashboardv2/public/js/router/Router.js
@@ -75,14 +75,14 @@ define([
var that = this;
$('body').on('click', 'a.show-stat', function() {
require([
- 'views/common/Statistics',
+ 'views/site/Statistics',
], function(Statistics) {
new Statistics();
});
});
$('body').on('click', 'li.aboutAtlas', function() {
require([
- 'views/common/AboutAtlas',
+ 'views/site/AboutAtlas',
], function(AboutAtlas) {
new AboutAtlas();
});
diff --git a/dashboardv2/public/js/templates/graph/RelationshipLayoutView_tmpl.html b/dashboardv2/public/js/templates/graph/RelationshipLayoutView_tmpl.html
index 9df75b5..344c1fc 100644
--- a/dashboardv2/public/js/templates/graph/RelationshipLayoutView_tmpl.html
+++ b/dashboardv2/public/js/templates/graph/RelationshipLayoutView_tmpl.html
@@ -14,7 +14,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
-->
-<!-- <div class="graph-toolbar clearfix"></div> -->
<div class="graph-button-group form-group clearfix">
<div class="btn-group pull-left">
<span class="pull-left">Graph</span>
@@ -46,14 +45,6 @@
</div>
</div>
</div>
- <!-- <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>
- <h4 class="title"><span data-id="typeName"></span></h4>
- <div class="col-md-12">
- <input data-id="searchNode" class="form-control form-group" placeholder="Search Entities" />
- <ul data-id="entityList" class="entity-list"></ul>
- </div>
- </div> -->
</div>
<div>
<table class="table table-quickMenu" data-id="relationshipDetailTable">
diff --git a/dashboardv2/public/js/templates/common/AboutAtlas_tmpl.html b/dashboardv2/public/js/templates/site/AboutAtlas_tmpl.html
similarity index 100%
rename from dashboardv2/public/js/templates/common/AboutAtlas_tmpl.html
rename to dashboardv2/public/js/templates/site/AboutAtlas_tmpl.html
diff --git a/dashboardv2/public/js/templates/common/Statistics_tmpl.html b/dashboardv2/public/js/templates/site/Statistics_tmpl.html
similarity index 100%
rename from dashboardv2/public/js/templates/common/Statistics_tmpl.html
rename to dashboardv2/public/js/templates/site/Statistics_tmpl.html
diff --git a/dashboardv2/public/js/utils/CommonViewFunction.js b/dashboardv2/public/js/utils/CommonViewFunction.js
index feb8dd3..5088b4a 100644
--- a/dashboardv2/public/js/utils/CommonViewFunction.js
+++ b/dashboardv2/public/js/utils/CommonViewFunction.js
@@ -272,7 +272,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
}
});
- return table;
+ return table && table.length > 0 ? table : '<tr class="empty"><td colspan="22"><span>No Record found!</span></td></tr>';
}
CommonViewFunction.tagForTable = function(obj) {
var traits = obj.classifications,
@@ -324,7 +324,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
terms.map(function(term) {
var className = "btn btn-action btn-sm btn-blue btn-icon",
deleteIcon = '<i class="fa fa-times" data-id="delete" data-assetname="' + entityName + '"data-name="' + term.displayText + '" data-type="term" data-guid="' + obj.guid + '" data-termGuid="' + term.termGuid + '" ></i>',
- termString = '<a class="' + className + '" data-id="termClick"><span title="' + term.displayText + '">' + term.displayText + '</span>' + deleteIcon + '</a>';
+ termString = '<a class="' + className + '" data-id="termClick"><span title="' + _.escape(term.displayText) + '">' + _.escape(term.displayText) + '</span>' + deleteIcon + '</a>';
if (count >= 1) {
popTerm += termString;
} else {
diff --git a/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js b/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
index 175c50e..98c984c 100644
--- a/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
+++ b/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
@@ -417,7 +417,7 @@ define(['require',
_.each(data, function(val) {
console.log(val.guid)
if (val.relationshipStatus == "ACTIVE") {
- termData += '<span class="btn btn-action btn-sm btn-icon btn-blue" title=' + val.displayText + ' data-id="termClick"><span>' + val.displayText + '</span><i class="fa fa-close" data-id="deleteTerm" data-guid="' + val.guid + '" data-type="term" title="Remove Term"></i></span>';
+ termData += '<span class="btn btn-action btn-sm btn-icon btn-blue" title=' + _.escape(val.displayText) + ' data-id="termClick"><span>' + _.escape(val.displayText) + '</span><i class="fa fa-close" data-id="deleteTerm" data-guid="' + val.guid + '" data-type="term" title="Remove Term"></i></span>';
}
});
this.ui.termList.find("span.btn").remove();
diff --git a/dashboardv2/public/js/views/graph/RelationshipLayoutView.js b/dashboardv2/public/js/views/graph/RelationshipLayoutView.js
index 3b49941..a98b61d 100644
--- a/dashboardv2/public/js/views/graph/RelationshipLayoutView.js
+++ b/dashboardv2/public/js/views/graph/RelationshipLayoutView.js
@@ -96,6 +96,7 @@ define(['require',
return { nodes: nodes, links: links };
},
onRender: function() {
+ this.ui.zoomControl.hide();
this.$el.addClass('auto-height');
},
onShow: function(argument) {
@@ -103,8 +104,8 @@ define(['require',
this.noRelationship();
} else {
this.createGraph(this.graphData);
- this.createTable();
}
+ this.createTable();
},
noRelationship: function() {
this.$('svg').html('<text x="50%" y="50%" alignment-baseline="middle" text-anchor="middle">No relationship data found</text>');
diff --git a/dashboardv2/public/js/views/search/QueryBuilderView.js b/dashboardv2/public/js/views/search/QueryBuilderView.js
index 9b58271..39de948 100644
--- a/dashboardv2/public/js/views/search/QueryBuilderView.js
+++ b/dashboardv2/public/js/views/search/QueryBuilderView.js
@@ -85,8 +85,8 @@ define(['require',
getObjDef: function(attrObj, rules) {
var obj = {
id: attrObj.name,
- label: attrObj.name.capitalize() + " (" + attrObj.typeName + ")",
- type: attrObj.typeName
+ label: _.escape(attrObj.name.capitalize() + " (" + attrObj.typeName + ")"),
+ type: _.escape(attrObj.typeName)
};
if (obj.type === "date") {
obj['plugin'] = 'daterangepicker';
@@ -122,9 +122,9 @@ define(['require',
obj.type = "double";
} else if (obj.type === "int" || obj.type === "byte" || obj.type === "short" || obj.type === "long") {
obj.type = "integer"
- }
}
- return obj;
+ }
+ return obj;
}
var enumObj = this.enumDefCollection.fullCollection.find({ name: obj.type });
if (enumObj) {
@@ -158,7 +158,7 @@ define(['require',
filters: filters,
select_placeholder: '--Select Attribute--',
allow_empty: true,
- conditions: ['AND','OR'],
+ conditions: ['AND', 'OR'],
allow_groups: true,
allow_empty: true,
operators: [
diff --git a/dashboardv2/public/js/views/search/save/SaveSearchView.js b/dashboardv2/public/js/views/search/save/SaveSearchView.js
index ae940e1..e57ec71 100644
--- a/dashboardv2/public/js/views/search/save/SaveSearchView.js
+++ b/dashboardv2/public/js/views/search/save/SaveSearchView.js
@@ -128,7 +128,7 @@ define(['require',
obj.name = selectedEl.find('a').text();
obj.guid = selectedEl.data('id');
if (selectedEl && selectedEl.length) {
- notifyObj['text'] = Messages.search.favoriteSearch.save + " <b>" + obj.name + "</b> ?";
+ notifyObj['text'] = Messages.search.favoriteSearch.save + " <b>" + _.escape(obj.name) + "</b> ?";
Utils.notifyConfirm(notifyObj);
} else {
Utils.notifyInfo({
@@ -176,7 +176,7 @@ define(['require',
var notifyObj = {
modal: true,
html: true,
- text: Messages.conformation.deleteMessage + "<b>" + options.model.get('name') + "</b>" + " ?",
+ text: Messages.conformation.deleteMessage + "<b>" + _.escape(options.model.get('name')) + "</b>" + " ?",
ok: function(argument) {
that.onDeleteNotifyOk(options);
},
diff --git a/dashboardv2/public/js/views/common/AboutAtlas.js b/dashboardv2/public/js/views/site/AboutAtlas.js
similarity index 98%
rename from dashboardv2/public/js/views/common/AboutAtlas.js
rename to dashboardv2/public/js/views/site/AboutAtlas.js
index 8900950..b6c2672 100644
--- a/dashboardv2/public/js/views/common/AboutAtlas.js
+++ b/dashboardv2/public/js/views/site/AboutAtlas.js
@@ -18,7 +18,7 @@
define(['require',
'backbone',
- 'hbs!tmpl/common/AboutAtlas_tmpl',
+ 'hbs!tmpl/site/AboutAtlas_tmpl',
'modules/Modal',
'models/VCommon',
'utils/UrlLinks',
diff --git a/dashboardv2/public/js/views/common/Statistics.js b/dashboardv2/public/js/views/site/Statistics.js
similarity index 99%
rename from dashboardv2/public/js/views/common/Statistics.js
rename to dashboardv2/public/js/views/site/Statistics.js
index fc1596a..67cfc9e 100644
--- a/dashboardv2/public/js/views/common/Statistics.js
+++ b/dashboardv2/public/js/views/site/Statistics.js
@@ -18,7 +18,7 @@
define(['require',
'backbone',
- 'hbs!tmpl/common/Statistics_tmpl',
+ 'hbs!tmpl/site/Statistics_tmpl',
'modules/Modal',
'models/VCommon',
'utils/UrlLinks',