Commit 7bb2709d by Shwetha GS

ATLAS-1142 Lineage UI Improvement (kevalbhatt via shwethags)

parent dd0b051e
Copyright jQuery Foundation and other contributors, https://jquery.org/
This software consists of voluntary contributions made by many
individuals. For exact contribution history, see the revision history
available at https://github.com/jquery/jquery-ui
The following license applies to all parts of this software except as
documented below:
====
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
====
Copyright and related rights for sample code are waived via CC0. Sample
code is defined as all source code contained within the demos directory.
CC0: http://creativecommons.org/publicdomain/zero/1.0/
====
All files located in the node_modules and external directories are
externally maintained libraries used by this software which have their
own licenses; we recommend you read them, as their terms may differ from
the terms above.
......@@ -232,4 +232,7 @@ WTFPL License. For details, see 3party-licenses/require-handlebars-plugin-LICEN
This product bundles json2.js (https://github.com/douglascrockford/JSON-js -
Public Domain license) by Douglas Crockford
This product bundles jQuery-ui.js, which is available under
MIT License. For details, see 3party-licenses/jQuery-ui-LICENSE
=======================================================================
\ No newline at end of file
......@@ -41,6 +41,7 @@
<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=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">
<link href="js/libs/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
......
......@@ -48,6 +48,9 @@ require.config({
deps: ['underscore', 'jquery'],
exports: 'Backbone'
},
'jquery-ui': {
deps: ['jquery'],
},
asBreadcrumbs: {
deps: ['jquery'],
exports: 'asBreadcrumbs'
......@@ -120,13 +123,14 @@ require.config({
'tmpl': 'templates',
'noty': 'libs/noty/js/jquery.noty.packaged.min',
'requirejs.text': 'libs/requirejs-text/text',
'handlebars': 'require-handlebars-plugin/js/handlebars',
'json2': 'require-handlebars-plugin/js/json2',
'hbs': 'require-handlebars-plugin/js/hbs',
'i18nprecompile': 'require-handlebars-plugin/js/i18nprecompile',
'handlebars': 'external_lib/require-handlebars-plugin/js/handlebars',
'json2': 'external_lib/require-handlebars-plugin/js/json2',
'hbs': 'external_lib/require-handlebars-plugin/js/hbs',
'i18nprecompile': 'external_lib/require-handlebars-plugin/js/i18nprecompile',
'dagreD3': 'libs/dagre-d3/dagre-d3.min',
'select2': 'libs/select2/select2.min',
'backgrid-select-all': 'libs/backgrid-select-all/backgrid-select-all.min'
'backgrid-select-all': 'libs/backgrid-select-all/backgrid-select-all.min',
'jquery-ui': 'external_lib/jquery-ui/jquery-ui.min',
},
/**
......
......@@ -17,7 +17,7 @@
<!-- <div class="panel-heading">
<h3 class="panel-title">Lineage</h3>
</div> -->
<div class="panel-body graph-bg" align="center">
<div class="panel-body graph-bg resize-graph" align="center">
<div class="graph" id="tree-container">
</div>
<div style="position:relative">
......
......@@ -142,9 +142,13 @@ define(['require',
if (!this.name && collectionJSON[0].values.qualifiedName) {
this.name = collectionJSON[0].values.qualifiedName;
}
if (this.name && collectionJSON[0].typeName) {
this.name = this.name + ' (' + collectionJSON[0].typeName + ')';
}
if (!this.name && collectionJSON[0].typeName) {
this.name = collectionJSON[0].typeName;
}
if (!this.name && this.id) {
this.name = this.id;
}
......@@ -153,7 +157,7 @@ define(['require',
this.ui.title.show();
var titleName = '<span>' + this.name + '</span>';
if (this.readOnly) {
titleName += '<button title="Deleted" class="btn btn-atlasAction btn-atlas deleteBtn"><i class="fa fa-trash"></i> Deleted</button>'
titleName += '<button title="Deleted" class="btn btn-atlasAction btn-atlas deleteBtn"><i class="fa fa-trash"></i> Deleted</button>';
}
this.ui.title.html(titleName);
} else {
......
......@@ -24,7 +24,8 @@ define(['require',
'utils/Utils',
'dagreD3',
'd3-tip',
'utils/Globals'
'utils/Globals',
'jquery-ui'
], function(require, Backbone, LineageLayoutViewtmpl, VLineageList, VEntity, Utils, dagreD3, d3Tip, Globals) {
'use strict';
......@@ -64,6 +65,7 @@ define(['require',
this.fetchGraphData();
this.data = {};
this.asyncFetchCounter = 0;
},
bindEvents: function() {
this.listenTo(this.inputCollection, 'reset', function() {
......@@ -82,7 +84,15 @@ define(['require',
}, this);
},
onRender: function() {
var that = this;
this.$('.fontLoader').show();
this.$(".resize-graph").resizable({
handles: ' s',
minHeight: 355,
stop: function(event, ui) {
that.$('svg').height(($(this).height() - 5))
},
});
this.g = new dagreD3.graphlib.Graph()
.setGraph({
nodesep: 50,
......@@ -114,8 +124,15 @@ define(['require',
if (data && data.definition) {
if (data.definition.values) {
var values = data.definition.values;
obj['label'] = values.name.trunc(20);
obj['label'] = values.name;
obj['toolTiplabel'] = values.name;
if (data.definition.typeName) {
var temp = obj['label'] + ' (' + data.definition.typeName + ')'
obj['label'] = temp;
obj['toolTiplabel'] = temp;
}
obj['label'] = obj['label'].trunc(18);
obj['id'] = data.GUID;
if (values.queryText) {
obj['queryText'] = values.queryText;
......@@ -176,8 +193,14 @@ define(['require',
_.each(uniquNode, function(val, key) {
var obj = {};
if (vertices[val] && vertices[val].values) {
obj['label'] = vertices[val].values.name.trunc(20);
obj['label'] = vertices[val].values.name;
obj['toolTiplabel'] = vertices[val].values.name;
if (vertices[val].values.vertexId && vertices[val].values.vertexId.values && vertices[val].values.vertexId.values.typeName) {
var temp = obj['label'] + ' (' + vertices[val].values.vertexId.values.typeName + ')';
obj['label'] = temp;
obj['toolTiplabel'] = temp;
}
obj['label'] = obj['label'].trunc(18);
obj['id'] = val;
obj['class'] = "type-TOP";
obj['shape'] = "img";
......
......@@ -9,6 +9,7 @@ ATLAS-1060 Add composite indexes for exact match performance improvements for al
ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai)
ALL CHANGES:
ATLAS-1142 Lineage UI Improvement (kevalbhatt via shwethags)
ATLAS-712 Support getTrait() API (svimal2106 via shwethags)
ATLAS-1173 Doc: Minor editorial bug in the example given for property atlas.server.ha.zookeeper.auth (yhemanth via shwethags)
ATLAS-1133 Jetty Server start doesn't throw exception when user-credential.properties file is not found (nixonrodrigues,svimal2106 via kevalbhatt)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment