Commit 94a8db33 by Shwetha GS

ATLAS-878 UI: Not showing details of SD, DB and COLUMNS (saqeeb.s via shwethags)

parent 6eaeaaa3
...@@ -120,7 +120,7 @@ a { ...@@ -120,7 +120,7 @@ a {
} }
hr { hr {
border-top: 1px solid #1c1e2a border-top: 1px solid $color_mirage_approx
} }
th { th {
...@@ -172,3 +172,7 @@ ul { ...@@ -172,3 +172,7 @@ ul {
border: 1px solid $color_jungle_green_approx; border: 1px solid $color_jungle_green_approx;
cursor: pointer; cursor: pointer;
} }
.add-seperator {
margin-bottom: 10px;
border-bottom: 1px solid $color_mirage_approx
}
\ No newline at end of file
...@@ -87,17 +87,34 @@ ...@@ -87,17 +87,34 @@
border: 1px #DDDDDD solid; border: 1px #DDDDDD solid;
} }
.select2-container--default .select2-selection--multiple { .backgrid {
background-color: $color_white_lilac_approx !important; td {
border: 1px #e8e9ee solid !important; white-space: normal;
}
} }
.select2-container--default.select2-container--focus .select2-selection--multiple { .select2-container--default {
border-color: #8fa5b1 !important; .select2-selection--multiple {
background-color: $color_white_lilac_approx !important;
border: 1px $color_mystic_approx solid !important;
}
.select2-selection--single {
.select2-selection__arrow {
height: 34px;
}
.select2-selection__rendered {
line-height: 32px;
font-size: 14px;
}
}
&.select2-container--focus .select2-selection--multiple {
border-color: $color_bali_hai_approx !important;
}
} }
.backgrid { .select2-container .select2-selection--single {
td { height: 34px;
white-space: normal; .select2-selection__rendered {
padding-left: 12px;
} }
} }
...@@ -17,14 +17,7 @@ ...@@ -17,14 +17,7 @@
<div class="page-title clearfix"> <div class="page-title clearfix">
<h1><span data-id="title"></span></h1> <h1><span data-id="title"></span></h1>
<button data-id="editButton" class="btn btn-default pull-right editbutton" id="editText"><i class="fa fa-pencil"></i></button> <button data-id="editButton" class="btn btn-default pull-right editbutton" id="editText"><i class="fa fa-pencil"></i></button>
<p class="sub-title" data-id="description">Description</p> <p class="sub-title" data-id="description"></p>
<div data-id="editBox" style="margin-bottom:10px; display:none">
<textarea class="well well-sm col-sm-12" data-id="descriptionTextArea"></textarea>
<div class="clearfix" align="right">
<button class="btn btn-atlas cancel" data-id="cancelButton">Cancel</button>
<button class="btn btn-atlas ok" data-id="publishButton">Publish</button>
</div>
</div>
<div data-id="showAttribute"> <div data-id="showAttribute">
</div> </div>
<div class="dropdown addTag-dropdown" data-id="addTagListBtn"> <div class="dropdown addTag-dropdown" data-id="addTagListBtn">
......
...@@ -14,12 +14,10 @@ ...@@ -14,12 +14,10 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
--> -->
<div class="clearfix"> <div class="clearfix add-seperator">
<button class="btn btn-atlasAction btn-atlas pull-left" data-id="createTag"><i class="fa fa-plus"></i> Create Tag</button> <button class="btn btn-atlasAction btn-atlas pull-left" data-id="createTag"><i class="fa fa-plus"></i> Create Tag</button>
<button class="btn btn-atlasAction btn-atlas pull-right" data-id="refreshTag" onclick="this.blur();"><i class="fa fa-refresh"></i> Refresh</button> <button class="btn btn-atlasAction btn-atlas pull-right" title="Refresh" data-id="refreshTag" onclick="this.blur();"><i class="fa fa-refresh"></i></button>
</div> </div>
<!-- <a href="javascript:void(0)" data-id="createTag"><i class="fa fa-plus"></i> Create Tag</a></div> --> <input type="text" class="form-control" data-id="offlineSearchTag" placeholder="Search Tags">
<hr>
<input type="text" class="form-control" data-id="offlineSearchTag" placeholder="Search Tags...">
<ul class="tag-tree" data-id="tagsParent"> <ul class="tag-tree" data-id="tagsParent">
</ul> </ul>
...@@ -17,12 +17,19 @@ ...@@ -17,12 +17,19 @@
<form name="tagDefinitionform" class="css-form"> <form name="tagDefinitionform" class="css-form">
<!-- <h4 style="margin-bottom:30px"></h4> --> <!-- <h4 style="margin-bottom:30px"></h4> -->
<div class="form-group"> <div class="form-group">
{{#if create}}
<input class="form-control row-margin-bottom" data-id="tagName" placeholder="Name(required)" autofocus> <input class="form-control row-margin-bottom" data-id="tagName" placeholder="Name(required)" autofocus>
</input> </input>
<input class="form-control row-margin-bottom" data-id="description" placeholder="Description"> {{else}}
<h4><span data-id="title"></span></h4>
</input> </input>
{{/if}}
<input class="form-control row-margin-bottom" data-id="description" value="{{description}}" placeholder="Description">
</input>
{{#if create}}
<span class="row-margin-bottom">Select tags to inherit attributes(optional)</span> <span class="row-margin-bottom">Select tags to inherit attributes(optional)</span>
<p class="attributeText">Attributes define additional properties for the tag</p> <p class="attributeText">Attributes define additional properties for the tag</p>
<select class="form-control tagList" data-id="parentTag" multiple="multiple"></select> <select class="form-control tagList" data-id="parentTag" multiple="multiple"></select>
{{/if}}
</div> </div>
</form> </form>
...@@ -100,11 +100,21 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages'], function(r ...@@ -100,11 +100,21 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages'], function(r
var value = ""; var value = "";
if (data.definition.values.name) { if (data.definition.values.name) {
value = data.definition.values.name; value = data.definition.values.name;
}
var id = "";
if (data.definition.id) {
if (_.isObject(data.definition.id) && data.definition.id.id) {
id = data.definition.id.id;
} else {
id = data.definition.id;
}
}
if (value.length > 1) {
scope.$('td div[data-id="' + id + '"]').html('<a href="#!/detailPage/' + id + '">' + value + '</a>');
} else { } else {
value = data.GUID; scope.$('td div[data-id="' + id + '"]').html('<a href="#!/detailPage/' + id + '">' + id + '</a>');
} }
scope.$('td div[data-id="' + data.GUID + '"]').html('<a href="#!/detailPage/' + data.GUID + '">' + value + '</a>');
}, },
error: function(error, data, status) {}, error: function(error, data, status) {},
complete: function() {} complete: function() {}
...@@ -123,8 +133,17 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages'], function(r ...@@ -123,8 +133,17 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages'], function(r
id = inputOutputField.id; id = inputOutputField.id;
} }
if (id) { if (id) {
fetchInputOutputValue(id); if (inputOutputField.values) {
subLink += '<div data-id="' + id + '"></div>'; if (inputOutputField.values.name) {
subLink += '<div><a href="#!/detailPage/' + id + '">' + inputOutputField.values.name + '</a><div>'
} else {
subLink += '<a href="#!/detailPage/' + id + '">' + id + '</a>'
}
} else {
fetchInputOutputValue(id);
subLink += '<div data-id="' + id + '"></div>';
}
} else { } else {
subLink += '<div></div>'; subLink += '<div></div>';
} }
...@@ -138,8 +157,16 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages'], function(r ...@@ -138,8 +157,16 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages'], function(r
id = keyValue.id; id = keyValue.id;
} }
if (id) { if (id) {
fetchInputOutputValue(id); if (keyValue.values) {
table += '<tr><td>' + key + '</td><td><div data-id="' + id + '"></div></td></tr>'; if (keyValue.values.name) {
table += '<tr><td>' + key + '</td><td><div><a href="#!/detailPage/' + id + '">' + keyValue.values.name + '</a><div></td></tr>';
} else {
table += '<tr><td>' + key + '</td><td><div><a href="#!/detailPage/' + id + '">' + id + '</a><div></td></tr>';
}
} else {
fetchInputOutputValue(id);
table += '<tr><td>' + key + '</td><td><div data-id="' + id + '"></div></td></tr>';
}
} else { } else {
var stringArr = []; var stringArr = [];
_.each(keyValue, function(val, key) { _.each(keyValue, function(val, key) {
......
...@@ -121,9 +121,9 @@ define(['require', ...@@ -121,9 +121,9 @@ define(['require',
fromRaw: function(rawValue, model) { fromRaw: function(rawValue, model) {
that.detailBtnDisable = false; that.detailBtnDisable = false;
if (Globals.auditAction[rawValue]) { if (Globals.auditAction[rawValue]) {
return Globals.auditAction[rawValue] return Globals.auditAction[rawValue];
} else { } else {
return rawValue return rawValue;
} }
} }
}) })
......
...@@ -73,7 +73,7 @@ define(['require', ...@@ -73,7 +73,7 @@ define(['require',
t.push({ t.push({
value: x[v], value: x[v],
href: href href: href
}) });
}; };
} }
this.value = t; this.value = t;
......
...@@ -131,9 +131,9 @@ define(['require', ...@@ -131,9 +131,9 @@ define(['require',
});*/ });*/
} }
if (this.value.dslChecked == "true") { if (this.value.dslChecked == "true") {
this.ui.searchType.prop("checked", true).trigger("change") this.ui.searchType.prop("checked", true).trigger("change");
} else { } else {
this.ui.searchType.prop("checked", false).trigger("change") this.ui.searchType.prop("checked", false).trigger("change");
} }
} }
this.bindEvents(arr); this.bindEvents(arr);
......
...@@ -29,15 +29,22 @@ define(['require', ...@@ -29,15 +29,22 @@ define(['require',
template: CreateTagLayoutViewTmpl, template: CreateTagLayoutViewTmpl,
templateHelpers: function() {
return {
create: this.create,
description: this.description
};
},
/** Layout sub regions */ /** Layout sub regions */
regions: {}, regions: {},
/** ui selector cache */ /** ui selector cache */
ui: { ui: {
tagName: "[data-id='tagName']", tagName: "[data-id='tagName']",
parentTag: "[data-id='parentTag']", parentTag: "[data-id='parentTag']",
description: "[data-id='description']" description: "[data-id='description']",
title: "[data-id='title']"
}, },
/** ui events hash */ /** ui events hash */
events: function() { events: function() {
...@@ -49,19 +56,21 @@ define(['require', ...@@ -49,19 +56,21 @@ define(['require',
* @constructs * @constructs
*/ */
initialize: function(options) { initialize: function(options) {
_.extend(this, _.pick(options, 'tagCollection')); _.extend(this, _.pick(options, 'tagCollection', 'tag'));
this.bindEvents(); if (this.tagCollection.first().get('traitTypes')) {
}, this.description = this.tagCollection.first().get('traitTypes')[0].typeDescription;
bindEvents: function() { } else {
// this.listenTo(this.tagCollection, 'reset', function() { this.create = true;
// this.tagCollectionList(); }
// }, this);
}, },
bindEvents: function() {},
onRender: function() { onRender: function() {
//this.fetchCollection(); if (this.create) {
this.tagCollectionList(); this.tagCollectionList();
} else {
this.ui.title.html('<span>' + this.tag + '</span>');
}
}, },
tagCollectionList: function() { tagCollectionList: function() {
this.ui.parentTag.empty(); this.ui.parentTag.empty();
var str = ''; var str = '';
......
...@@ -52,21 +52,10 @@ define(['require', ...@@ -52,21 +52,10 @@ define(['require',
/** ui events hash */ /** ui events hash */
events: function() { events: function() {
var events = {}; var events = {};
events["click " + this.ui.editButton] = function() {
this.ui.editButton.hide();
this.ui.description.hide();
this.ui.editBox.show();
this.ui.descriptionTextArea.focus();
this.ui.publishButton.prop('disabled', true);
if (this.ui.description.text().length) {
this.ui.descriptionTextArea.val(this.ui.description.text());
}
};
events["keyup " + this.ui.descriptionTextArea] = 'textAreaChangeEvent';
events["click " + this.ui.cancelButton] = 'onCancelButtonClick'; events["click " + this.ui.cancelButton] = 'onCancelButtonClick';
events["click " + this.ui.addAttrBtn] = 'onClickAddAttribute'; events["click " + this.ui.addAttrBtn] = 'onClickAddAttribute';
events["click " + this.ui.addTagListBtn] = 'onClickAddTagBtn'; events["click " + this.ui.addTagListBtn] = 'onClickAddTagBtn';
events["click " + this.ui.publishButton] = 'onPublishClick'; events["click " + this.ui.editButton] = 'onEditButton';
return events; return events;
}, },
/** /**
...@@ -173,19 +162,44 @@ define(['require', ...@@ -173,19 +162,44 @@ define(['require',
this.ui.editButton.show(); this.ui.editButton.show();
this.ui.editBox.hide(); this.ui.editBox.hide();
}, },
textAreaChangeEvent: function() { textAreaChangeEvent: function(view, modal) {
if (this.tagCollection.first().get('traitTypes')[0].typeDescription == this.ui.descriptionTextArea.val()) { if (view.tagCollection.first().get('traitTypes')[0].typeDescription == view.ui.description.val()) {
this.ui.publishButton.prop('disabled', true); modal.$el.find('button.ok').prop('disabled', true);
} else { } else {
this.ui.publishButton.prop('disabled', false); modal.$el.find('button.ok').prop('disabled', false);
} }
}, },
onPublishClick: function() { onPublishClick: function(view) {
this.tagCollection.first().get('traitTypes')[0].typeDescription = this.ui.descriptionTextArea.val(); view.tagCollection.first().get('traitTypes')[0].typeDescription = view.ui.description.val();
this.onSaveButton(this.tagCollection.first().toJSON(), Messages.updateTagDescriptionMessage); this.onSaveButton(this.tagCollection.first().toJSON(), Messages.updateTagDescriptionMessage);
this.ui.description.show(); this.ui.description.show();
this.ui.editButton.show(); },
this.ui.editBox.hide(); onEditButton: function(e) {
var that = this;
$(e.currentTarget).blur();
require([
'views/tag/CreateTagLayoutView',
'modules/Modal'
], function(CreateTagLayoutView, Modal) {
var view = new CreateTagLayoutView({ 'tagCollection': that.tagCollection, 'tag': that.tag });
var modal = new Modal({
title: 'Edit Tag',
content: view,
cancelText: "Cancel",
okText: 'Save',
allowCancel: true,
}).open();
view.ui.description.on('keyup', function(e) {
that.textAreaChangeEvent(view, modal);
});
modal.$el.find('button.ok').prop('disabled', true);
modal.on('ok', function() {
that.onPublishClick(view);
});
modal.on('closeModal', function() {
modal.trigger('cancel');
});
});
} }
}); });
return TagAttributeDetailLayoutView; return TagAttributeDetailLayoutView;
......
...@@ -152,7 +152,7 @@ define(['require', ...@@ -152,7 +152,7 @@ define(['require',
sortable: false, sortable: false,
formatter: _.extend({}, Backgrid.CellFormatter.prototype, { formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
fromRaw: function(rawValue, model) { fromRaw: function(rawValue, model) {
return '<a href="javascript:void(0)"><i class="fa fa-trash" data-id="delete" data-name="' + model.get('typeName') + '"></i></a>' return '<a href="javascript:void(0)"><i class="fa fa-trash" data-id="delete" data-name="' + model.get('typeName') + '"></i></a>';
} }
}) })
}, },
......
...@@ -22,6 +22,7 @@ ATLAS-409 Atlas will not import avro tables with schema read from a file (dosset ...@@ -22,6 +22,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) ATLAS-379 Create sqoop and falcon metadata addons (venkatnrangan,bvellanki,sowmyaramesh via shwethags)
ALL CHANGES: ALL CHANGES:
ATLAS-878 UI: Not showing details of SD, DB and COLUMNS (saqeeb.s via shwethags)
ATLAS-853 User's name to be mentioned in the top user drop down (saqeeb.s via shwethags) ATLAS-853 User's name to be mentioned in the top user drop down (saqeeb.s via shwethags)
ATLAS-867 Excessive logs: default log level should be set to 'info'; currently it is 'debug' (svimal2106 via sumasai ) ATLAS-867 Excessive logs: default log level should be set to 'info'; currently it is 'debug' (svimal2106 via sumasai )
ATLAS-870 Add search feature while associating Tags / Terms with entity. (Kalyanikashikar via yhemanth) ATLAS-870 Add search feature while associating Tags / Terms with entity. (Kalyanikashikar via yhemanth)
......
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