Commit cc503701 by kevalbhatt Committed by Madhan Neethiraj

ATLAS-1432: Responsive loader and css changes

parent e92502dd
......@@ -30,7 +30,6 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8; Cache-Control: no-cache" />
<meta http-equiv="X-Frame-Options" content="deny">
<title>Atlas</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
......
......@@ -14,63 +14,29 @@
* See the License for the specific language governing permissions and
* limitations under the License.
-->
<div class="fontLoader">
<i class="fa fa-refresh fa-spin-custom"></i>
</div>
<div class="hide">
<div class="page-title clearfix">
<div class="page-title clearfix">
<div class="fontLoader">
<i class="fa fa-refresh fa-spin-custom"></i>
</div>
<div class="catlogDetail">
<h1><span data-id="title"></span></h1>
<button type="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>
<!-- <div data-id="editBox" style="margin-bottom:10px;">
<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>
<div class="container-fluid gray-bg">
<div class="row">
<div class="col-sm-custom">
<div class="atlast-tabbable">
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="tab active"><a href="#tab-details" aria-controls="tab-details" role="tab" data-toggle="tab">Properties</a></li>
<!-- <li role="presentation"><a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">Acceptable Use</a></li> -->
</ul>
<div class="tab-content">
<div id="tab-details" role="tabpanel" class="tab-pane active">
<p data-id="createDate"></p>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-custom">
<div class="atlast-tabbable">
<div class="panel panel-default lineageLayout" style="display:none">
<div id="r_lineageLayoutView"></div>
</div>
<div class="container-fluid gray-bg">
<div class="row">
<div class="col-sm-custom">
<div class="atlast-tabbable">
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="tab active"><a href="#tab-details" aria-controls="tab-details" role="tab" data-toggle="tab">Properties</a></li>
</ul>
<div class="tab-content">
<div id="tab-details" role="tabpanel" class="tab-pane active">
<p data-id="createDate"></p>
</div>
</div>
</div>
</div>
</div>
<!-- <div class="row">
<div class="col-sm-custom">
<h2>Comments</h2>
<textarea class="form-control comment-input" rows="5" placeholder="Add a Comment"></textarea>
<button class="btn-atlas">Comment</button>
<div class="comment-box">
<p class="comment">There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable.</p>
<p class="author">Micheal Surmac</p>
<p class="date">December 16, 2016 11:03:23 AM</p>
</div>
<div class="comment-box">
<p class="comment">Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old.</p>
<p class="author">Paula Schmidt</p>
<p class="date">May 3, 2015 9:16:12 AM</p>
</div>
</div>
</div> -->
</div>
......@@ -15,33 +15,31 @@
* limitations under the License.
-->
<div class="page-title clearfix">
<div class="row">
<a href="javascript:void(0);" class="backButton" data-id="backButton"><i class="fa fa-chevron-left"></i> Back To Results</a>
<div class="fontLoader">
<i class="fa fa-refresh fa-spin-custom"></i>
</div>
<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>
<div data-id="editBox" style="margin-bottom:10px;">
<textarea class="well well-sm col-sm-12" data-id="descriptionTextArea"></textarea>
<div class="clearfix" align="right">
<button type="button" class="btn-atlas" data-id="cancelButton">Cancel</button>
<button type="button" class="btn-atlas" data-id="publishButton">Publish</button>
<div class="entityDetail">
<div class="row">
<a href="javascript:void(0);" class="backButton" data-id="backButton"><i class="fa fa-chevron-left"></i> Back To Results</a>
</div>
</div>
<div class="tagTerm">
<span class="tagSpan">Tags:</span>
<div class="" data-id="tagList">
<div class="addTag-dropdown" data-id="addTag">
<div class="addTagBase tagBox" data-id="addTagPlus"><i class="fa fa-plus"></i></div>
<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>
<div class="tagTerm">
<span class="tagSpan">Tags:</span>
<div class="" data-id="tagList">
<div class="addTag-dropdown" data-id="addTag">
<div class="addTagBase tagBox" data-id="addTagPlus"><i class="fa fa-plus"></i></div>
</div>
</div>
</div>
<hr class="termTagLine"> {{#if taxonomy}}
<span class="termSpan">Terms:</span>
<div class="" data-id="termList">
<div class="addTag-dropdown" data-id="addTerm">
<div class="addTagBase termBox" data-id="addTermPlus"><i class="fa fa-plus"></i></div>
<hr class="termTagLine"> {{#if taxonomy}}
<span class="termSpan">Terms:</span>
<div class="" data-id="termList">
<div class="addTag-dropdown" data-id="addTerm">
<div class="addTagBase termBox" data-id="addTermPlus"><i class="fa fa-plus"></i></div>
</div>
</div>
{{/if}}
</div>
{{/if}}
</div>
</div>
<div class="container-fluid gray-bg">
......@@ -61,7 +59,6 @@
<h4 class="detailLabel">DETAILS</h4>
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="tab active"><a href="#tab-details" aria-controls="tab-details" role="tab" data-toggle="tab">Properties</a></li>
<!-- <li role="presentation"><a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">Acceptable Use</a></li> -->
<li role="presentation"><a href="#tab-tagTable" aria-controls="tab-tagTable" role="tab" data-toggle="tab">Tags</a></li>
{{#if taxonomy}}
<li role="presentation"><a href="#tab-termTable" aria-controls="tab-termTable" role="tab" data-toggle="tab">Terms</a></li>
......@@ -71,39 +68,42 @@
</ul>
<div class="tab-content">
<div id="tab-details" role="tabpanel" class="tab-pane active">
<div id="r_entityDetailTableLayoutView"></div>
<div id="r_entityDetailTableLayoutView" style="position: relative;">
<div class="fontLoader">
<i class="fa fa-refresh fa-spin-custom"></i>
</div>
</div>
</div>
<div id="tab-tagTable" role="tabpanel" class="tab-pane">
<div id="r_tagTableLayoutView"></div>
<div id="r_tagTableLayoutView" style="position: relative;">
<div class="fontLoader">
<i class="fa fa-refresh fa-spin-custom"></i>
</div>
</div>
</div>
<div id="tab-termTable" role="tabpanel" class="tab-pane">
<div id="r_termTableLayoutView"></div>
<div id="r_termTableLayoutView" style="position: relative;">
<div class="fontLoader">
<i class="fa fa-refresh fa-spin-custom"></i>
</div>
</div>
</div>
<div id="tab-audit" role="tabpanel" class="tab-pane">
<div id="r_auditTableLayoutView"></div>
<div id="r_auditTableLayoutView" style="position: relative;">
<div class="fontLoader">
<i class="fa fa-refresh fa-spin-custom"></i>
</div>
</div>
</div>
<div id="tab-schema" role="tabpanel" class="tab-pane">
<div id="r_schemaTableLayoutView"></div>
<div id="r_schemaTableLayoutView" style="position: relative;">
<div class="fontLoader">
<i class="fa fa-refresh fa-spin-custom"></i>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<!-- div class="col-sm-custom">
<h2>Comments</h2>
<textarea class="form-control comment-input" rows="5" placeholder="Add a Comment"></textarea>
<button class="btn-atlas">Comment</button>
<div class="comment-box">
<p class="comment">There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable.</p>
<p class="author">Micheal Surmac</p>
<p class="date">December 16, 2016 11:03:23 AM</p>
</div>
<div class="comment-box">
<p class="comment">Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old.</p>
<p class="author">Paula Schmidt</p>
<p class="date">May 3, 2015 9:16:12 AM</p>
</div>
</div> -->
</div>
......@@ -15,16 +15,23 @@
* limitations under the License.
-->
<div class="page-title clearfix">
<h1><span data-id="title"></span></h1>
<button type="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"></p>
<span class="attrLabel">Attributes:</span>
<div data-id="showAttribute">
<div class="fontLoader">
<i class="fa fa-refresh fa-spin-custom"></i>
</div>
<div class="dropdown addTag-dropdown" data-id="addTagListBtn">
<div class=" addTagBase dropdown-toggle" data-id="addTagBtn" data-toggle="dropdown">
<div class="addTagText" data-id="addTagtext" style="display: block">ADD Attribute &nbsp; <i class="fa fa-plus"></i></div>
<div class="addTagPlus" data-id="addTagPlus" style="display: none"><i class="fa fa-plus"></i></div>
<div class="tagDetail">
<h1><span data-id="title"></span></h1>
<button type="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"></p>
<div class="attributes">
<span class="attrLabel">Attributes:</span>
<div data-id="showAttribute">
</div>
<div class="dropdown addTag-dropdown" data-id="addTagListBtn">
<div class=" addTagBase dropdown-toggle" data-id="addTagBtn" data-toggle="dropdown">
<div class="addTagText" data-id="addTagtext" style="display: block">ADD Attribute &nbsp; <i class="fa fa-plus"></i></div>
<div class="addTagPlus" data-id="addTagPlus" style="display: none"><i class="fa fa-plus"></i></div>
</div>
</div>
</div>
</div>
</div>
......@@ -55,7 +55,7 @@ define(['require', 'marionette', 'backgrid', 'asBreadcrumbs', 'jquery-placeholde
var that = this;
Backgrid.HeaderRow.__super__.render.apply(this, arguments);
_.each(this.columns.models, function(modelValue) {
if (modelValue.get('width')) that.$el.find('.' + modelValue.get('name')).css('width', modelValue.get('width') + '%')
if (modelValue.get('width')) that.$el.find('.' + modelValue.get('name')).css('min-width', modelValue.get('width') + 'px')
if (modelValue.get('toolTip')) that.$el.find('.' + modelValue.get('name')).attr('title', modelValue.get('toolTip'))
});
return this;
......
......@@ -286,5 +286,21 @@ define(['require', 'utils/Globals', 'pnotify'], function(require, Globals, pnoti
}
}
}
Utils.showTitleLoader = function(loaderEl, titleBoxEl) {
loaderEl.css({
'display': 'block',
'position': 'relative',
'height': '85px',
'marginTop': '85px',
'marginLeft': '50%',
'left': '0%'
});
titleBoxEl.hide();
}
Utils.hideTitleLoader = function(loaderEl, titleBoxEl) {
loaderEl.hide();
titleBoxEl.fadeIn();
}
return Utils;
});
......@@ -62,13 +62,17 @@ define(['require',
}).open();
this.on('ok', function() {
that.asyncFetchCounter = 0;
var termName = this.modal.$el.find('.taxonomyTree li.active a').data('name').split("`").join("");
if (termName.trim) {
termName = termName.trim();
}
if (that.multiple) {
for (var i = 0; i < that.multiple.length; i++) {
if (i == 0) {
that.showLoader();
}
var obj = {
termName: this.modal.$el.find('.taxonomyTree li.active a').data('name').split("`").join(""),
termName: termName,
guid: that.multiple[i].id.id
};
CommonViewFunction.saveTermToAsset(obj, that);
......@@ -76,7 +80,7 @@ define(['require',
} else {
that.asyncFetchCounter = 0;
CommonViewFunction.saveTermToAsset({
termName: this.modal.$el.find('.taxonomyTree li.active a').data('name').split("`").join(""),
termName: termName,
guid: this.guid
}, that);
}
......
......@@ -20,11 +20,10 @@ define(['require',
'backbone',
'hbs!tmpl/business_catalog/BusinessCatalogDetailLayoutView_tmpl',
'utils/Utils',
'collection/VCatalogList',
'models/VEntity',
'models/VCatalog',
'utils/Messages'
], function(require, Backbone, BusinessCatalogDetailLayoutViewTmpl, Utils, VCatalogList, VEntity, VCatalog, Messages) {
], function(require, Backbone, BusinessCatalogDetailLayoutViewTmpl, Utils, VEntity, VCatalog, Messages) {
'use strict';
var BusinessCatalogDetailLayoutView = Backbone.Marionette.LayoutView.extend(
......@@ -35,32 +34,14 @@ define(['require',
template: BusinessCatalogDetailLayoutViewTmpl,
/** Layout sub regions */
regions: {
REntityDetailTableLayoutView: "#r_entityDetailTableLayoutView",
RSchemaTableLayoutView: "#r_schemaTableLayoutView",
RTagTableLayoutView: "#r_tagTableLayoutView",
RLineageLayoutView: "#r_lineageLayoutView",
},
regions: {},
/** ui selector cache */
ui: {
title: '[data-id="title"]',
editButton: '[data-id="editButton"]',
cancelButton: '[data-id="cancelButton"]',
publishButton: '[data-id="publishButton"]',
description: '[data-id="description"]',
descriptionTextArea: '[data-id="descriptionTextArea"]',
editBox: '[data-id="editBox"]',
createDate: '[data-id="createDate"]',
updateDate: '[data-id="updateDate"]',
createdUser: '[data-id="createdUser"]',
addTagBtn: '[data-id="addTagBtn"]',
appendList: '[data-id="appendList"]',
inputTagging: '[data-id="inputTagging"]',
deleteTag: '[data-id="deleteTag"]',
addTagtext: '[data-id="addTagtext"]',
addTagPlus: '[data-id="addTagPlus"]',
searchTag: '[data-id="searchTag"] input',
addTagListBtn: '[data-id="addTagListBtn"]'
createDate: '[data-id="createDate"]'
},
/** ui events hash */
events: function() {
......@@ -112,23 +93,16 @@ define(['require',
var splitDate = createdDate.split(":");
this.ui.createDate.html('<strong> Date Created: </strong> ' + splitDate[0] + " " + splitDate[1] + ":" + splitDate[2] + ":" + splitDate[3] + " (GMT)");
}
Utils.hideTitleLoader(this.$('.fontLoader'), this.$('.catlogDetail'));
}, this);
},
onRender: function() {
var that = this;
this.$('.fontLoader').show();
this.ui.editBox.hide();
Utils.showTitleLoader(this.$('.page-title .fontLoader'), this.$('.catlogDetail'));
},
fetchCollection: function() {
this.$('.fontLoader').show();
this.collection.fetch({ reset: true });
},
onCancelButtonClick: function() {
this.ui.description.show();
this.ui.editButton.show();
this.ui.editBox.hide();
},
onEditButton: function(e) {
var that = this;
$(e.currentTarget).blur();
......@@ -174,6 +148,7 @@ define(['require',
termModel.url = function() {
return that.collection.url;
};
Utils.showTitleLoader(this.$('.page-title .fontLoader'), this.$('.catlogDetail'));
termModel.set({
"description": view.ui.description.val()
}).save(null, {
......
......@@ -20,14 +20,12 @@ define(['require',
'backbone',
'hbs!tmpl/detail_page/DetailPageLayoutView_tmpl',
'utils/Utils',
'collection/VTagList',
'models/VEntity',
'utils/CommonViewFunction',
'utils/Globals',
'utils/Enums',
'utils/Messages',
'utils/UrlLinks'
], function(require, Backbone, DetailPageLayoutViewTmpl, Utils, VTagList, VEntity, CommonViewFunction, Globals, Enums, Messages, UrlLinks) {
], function(require, Backbone, DetailPageLayoutViewTmpl, Utils, CommonViewFunction, Globals, Enums, Messages, UrlLinks) {
'use strict';
var DetailPageLayoutView = Backbone.Marionette.LayoutView.extend(
......@@ -52,14 +50,8 @@ define(['require',
tagClick: '[data-id="tagClick"]',
title: '[data-id="title"]',
editButton: '[data-id="editButton"]',
cancelButton: '[data-id="cancelButton"]',
publishButton: '[data-id="publishButton"]',
description: '[data-id="description"]',
descriptionTextArea: '[data-id="descriptionTextArea"]',
editBox: '[data-id="editBox"]',
createDate: '[data-id="createDate"]',
updateDate: '[data-id="updateDate"]',
createdUser: '[data-id="createdUser"]',
deleteTag: '[data-id="deleteTag"]',
backButton: "[data-id='backButton']",
addTag: '[data-id="addTag"]',
......@@ -96,8 +88,6 @@ define(['require',
}
}
};
// events["click " + this.ui.publishButton] = 'onPublishButtonClick';
events["click " + this.ui.cancelButton] = 'onCancelButtonClick';
events["click " + this.ui.deleteTag] = 'onClickTagCross';
events["click " + this.ui.addTag] = 'onClickAddTagBtn';
events["click " + this.ui.addTerm] = 'onClickAddTermBtn';
......@@ -118,19 +108,12 @@ define(['require',
bindEvents: function() {
var that = this;
this.listenTo(this.collection, 'reset', function() {
var collectionJSON = this.collection.first().toJSON();
if (collectionJSON && collectionJSON.guid) {
var tagGuid = collectionJSON.guid;
//this.readOnly = Enums.entityStateReadOnly[collectionJSON[0].id.state];
} else {
var tagGuid = this.id;
}
// if (this.readOnly) {
// this.$el.addClass('readOnly');
// } else {
// this.$el.removeClass('readOnly');
// }
if (collectionJSON) {
if (collectionJSON.attributes) {
if (collectionJSON.attributes.name) {
......@@ -145,7 +128,6 @@ define(['require',
if (!this.name && collectionJSON.typeName) {
this.name = collectionJSON.typeName;
}
if (!this.name && this.id) {
this.name = this.id;
}
......@@ -173,16 +155,26 @@ define(['require',
this.addTagToTerms([]);
}
}
Utils.hideTitleLoader(this.$('.page-title .fontLoader'), this.$('.entityDetail'));
this.auditVent.trigger("reset:collection");
this.renderEntityDetailTableLayoutView();
this.renderTagTableLayoutView(tagGuid);
this.renderTermTableLayoutView(tagGuid);
this.renderAuditTableLayoutView(this.id, collectionJSON.attributes);
}, this);
this.listenTo(this.collection, 'error', function(model, response) {
this.$('.fontLoader').hide();
if (response.responseJSON) {
Utils.notifyError({
content: response.responseJSON.errorMessage || response.responseJSON.error
});
}
}, this);
},
onRender: function() {
var that = this;
this.ui.editBox.hide();
Utils.showTitleLoader(this.$('.page-title .fontLoader'), this.$('.entityDetail'));
this.$('.fontLoader').show(); // to show tab loader
this.renderLineageLayoutView(this.id);
this.renderSchemaLayoutView(this.id);
......@@ -190,11 +182,6 @@ define(['require',
fetchCollection: function() {
this.collection.fetch({ reset: true });
},
onCancelButtonClick: function() {
this.ui.description.show();
this.ui.editButton.show();
this.ui.editBox.hide();
},
onClickTagCross: function(e) {
var tagName = $(e.currentTarget).parent().text(),
tagOrTerm = $(e.target).data("type"),
......@@ -224,6 +211,7 @@ define(['require',
deleteTagData: function(e, tagOrTerm) {
var that = this,
tagName = $(e.currentTarget).text();
Utils.showTitleLoader(this.$('.page-title .fontLoader'), this.$('.entityDetail'));
CommonViewFunction.deleteTag({
'tagName': tagName,
'guid': that.id,
......@@ -252,28 +240,6 @@ define(['require',
this.ui.tagList.prepend(tagData);
this.ui.termList.prepend(termData);
},
saveTagFromList: function(ref) {
var that = this;
this.entityModel = new VEntity();
var tagName = ref.text();
var json = {
"jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Struct",
"typeName": tagName,
"values": {}
};
this.entityModel.saveEntity(this.id, {
data: JSON.stringify(json),
success: function(data) {
that.fetchCollection();
},
error: function(error, data, status) {
if (error && error.responseText) {
var data = JSON.parse(error.responseText);
}
},
complete: function() {}
});
},
onClickAddTagBtn: function(e) {
var that = this;
require(['views/tag/addTagModalView'], function(AddTagModalView) {
......@@ -284,9 +250,9 @@ define(['require',
that.fetchCollection();
}
});
/*view.saveTagData = function() {
override saveTagData function
}*/
view.modal.on('ok', function() {
Utils.showTitleLoader(that.$('.page-title .fontLoader'), that.$('.entityDetail'));
});
});
},
onClickAddTermBtn: function(e) {
......@@ -300,6 +266,9 @@ define(['require',
that.fetchCollection();
}
});
view.modal.on('ok', function() {
Utils.showTitleLoader(that.$('.page-title .fontLoader'), that.$('.entityDetail'));
});
});
},
......
......@@ -415,7 +415,7 @@ define(['require',
++nameCheck;
}
if (model && model.get('$id$') === undefined) {
i = i - 1;
i = i > 0 ? (i - 1) : i;
that.searchCollection.remove(model);
}
}
......
......@@ -39,23 +39,17 @@ define(['require',
title: '[data-id="title"]',
editButton: '[data-id="editButton"]',
editBox: '[data-id="editBox"]',
addAttrBtn: '[data-id="addAttrBtn"]',
saveButton: "[data-id='saveButton']",
showAttribute: "[data-id='showAttribute']",
cancelButton: "[data-id='cancelButton']",
addTagListBtn: '[data-id="addTagListBtn"]',
addTagtext: '[data-id="addTagtext"]',
addTagPlus: '[data-id="addTagPlus"]',
addTagBtn: '[data-id="addTagBtn"]',
description: '[data-id="description"]',
descriptionTextArea: '[data-id="descriptionTextArea"]',
publishButton: '[data-id="publishButton"]'
},
/** ui events hash */
events: function() {
var events = {};
events["click " + this.ui.cancelButton] = 'onCancelButtonClick';
events["click " + this.ui.addAttrBtn] = 'onClickAddAttribute';
events["click " + this.ui.addTagListBtn] = 'onClickAddTagBtn';
events["click " + this.ui.editButton] = 'onEditButton';
return events;
......@@ -74,17 +68,13 @@ define(['require',
if (this.model) {
this.renderTagDetail();
} else {
this.ui.addTagBtn.hide();
this.ui.editButton.hide();
this.$('.fontLoader').hide();
Utils.notifyError({
content: 'Something went wrong'
});
}
}, this);
this.listenTo(this.tagCollection, 'error', function(error, response) {
this.ui.addTagBtn.hide();
this.ui.editButton.hide();
if (response.responseJSON && response.responseJSON.error) {
Utils.notifyError({
content: response.responseJSON.error
......@@ -94,10 +84,11 @@ define(['require',
content: 'Something went wrong'
});
}
this.$('.fontLoader').hide();
}, this);
},
onRender: function() {
Utils.showTitleLoader(this.$('.page-title .fontLoader'), this.$('.tagDetail'));
if (this.collection.models.length && !this.model) {
this.model = this.collection.fullCollection.findWhere({ name: this.tag });
this.renderTagDetail();
......@@ -124,9 +115,10 @@ define(['require',
});
this.ui.showAttribute.html(attributeData);
}
Utils.hideTitleLoader(this.$('.fontLoader'), this.$('.tagDetail'));
},
onSaveButton: function(saveObject, message) {
Utils.showTitleLoader(this.$('.page-title .fontLoader'), this.$('.tagDetail'));
var that = this;
var validate = true;
if (this.modal.$el.find(".attributeInput").length > 1) {
......@@ -177,7 +169,6 @@ define(['require',
content: view,
cancelText: "Cancel",
okText: 'Add',
okCloses: false,
allowCancel: true,
}).open();
that.modal.$el.find('button.ok').attr("disabled", "true");
......@@ -202,11 +193,6 @@ define(['require',
});
});
},
onCancelButtonClick: function() {
this.ui.description.show();
this.ui.editButton.show();
this.ui.editBox.hide();
},
textAreaChangeEvent: function(view) {
if (this.model.get('description') === view.ui.description.val()) {
this.modal.$el.find('button.ok').prop('disabled', true);
......
......@@ -9,9 +9,15 @@ 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-1432 Responsive loader and css changes (kevalbhatt via mneethiraj)
ATLAS-1434 Updated typename validation to allow "." for classifications (ashutoshm via mneethiraj)
ATLAS-1435 include common attributes in v2 entity API response (svimal2106 via mneethiraj)
ATLAS-1427 update tests for the changes in default SSL protocols support (mneethiraj)
ATLAS-1308 Discovery/Search REST API - v2 (sarath.kum4r@gmail.com via mneethiraj)
ATLAS-1429 fix hive model to make composite attributes as mandatory
ATLAS-1408 added validation to prevent creating types with . (dot) in name (ashutoshm via mneethiraj)
ATLAS-1277 Add feather use 'order by ' in the DSL search (zhangqiang2 via sumasai)
ATLAS-1427 Support an option to exclude protocols in SSL mode (nixonrodrigues via mneethiraj)
ATLAS-1379 Avoid object query overhead when report query selects class type alias (guptaneeru via dkantor)
ATLAS-1419 update entity-update API impl to preserve value of entity attribute when no value is provided
ATLAS-1346 Search API to return empty list/container object instead of exception (apoorvnaik via mneethiraj)
......
......@@ -307,6 +307,11 @@ public class AtlasAuthenticationFilter extends AuthenticationFilter {
try {
Authentication existingAuth = SecurityContextHolder.getContext().getAuthentication();
HttpServletResponse httpResponse = (HttpServletResponse) response;
AtlasResponseRequestWrapper responseWrapper = new AtlasResponseRequestWrapper(httpResponse);
responseWrapper.setHeader("X-Frame-Options", "DENY");
if (existingAuth == null) {
String authHeader = httpRequest.getHeader("Authorization");
if (authHeader != null && authHeader.startsWith("Basic")) {
......
......@@ -90,6 +90,10 @@ public class AtlasAuthorizationFilter extends GenericFilterBean {
}
HttpServletRequest request = (HttpServletRequest) req;
HttpServletResponse response = (HttpServletResponse) res;
AtlasResponseRequestWrapper responseWrapper = new AtlasResponseRequestWrapper(response);
responseWrapper.setHeader("X-Frame-Options", "DENY");
String pathInfo = request.getServletPath();
if (!Strings.isNullOrEmpty(pathInfo) && pathInfo.startsWith(BASE_URL)) {
if (isDebugEnabled) {
......@@ -142,6 +146,7 @@ public class AtlasAuthorizationFilter extends GenericFilterBean {
LOG.debug("Authorizer result :: {}", accessAllowed);
}
}
if (accessAllowed) {
if (isDebugEnabled) {
LOG.debug("Access is allowed so forwarding the request!!!");
......@@ -151,7 +156,7 @@ public class AtlasAuthorizationFilter extends GenericFilterBean {
JSONObject json = new JSONObject();
json.put("AuthorizationError", "You are not authorized for " + atlasRequest.getAction().name() + " on "
+ atlasResourceTypes + " : " + atlasRequest.getResource());
HttpServletResponse response = (HttpServletResponse) res;
response.setContentType("application/json");
response.setStatus(HttpServletResponse.SC_FORBIDDEN);
......
......@@ -180,14 +180,17 @@ public class AtlasCSRFPreventionFilter implements Filter {
}
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
if (isCSRF_ENABLED){
final HttpServletRequest httpRequest = (HttpServletRequest)request;
final HttpServletResponse httpResponse = (HttpServletResponse)response;
handleHttpInteraction(new ServletFilterHttpInteraction(httpRequest, httpResponse, chain));
}else{
chain.doFilter(request, response);
}
}
final HttpServletRequest httpRequest = (HttpServletRequest) request;
final HttpServletResponse httpResponse = (HttpServletResponse) response;
AtlasResponseRequestWrapper responseWrapper = new AtlasResponseRequestWrapper(httpResponse);
responseWrapper.setHeader("X-Frame-Options", "DENY");
if (isCSRF_ENABLED){
handleHttpInteraction(new ServletFilterHttpInteraction(httpRequest, httpResponse, chain));
}else{
chain.doFilter(request, response);
}
}
public void destroy() {
}
......
......@@ -109,6 +109,11 @@ public class AtlasKnoxSSOAuthenticationFilter implements Filter {
@Override
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
HttpServletResponse httpResponse = (HttpServletResponse) servletResponse;
AtlasResponseRequestWrapper responseWrapper = new AtlasResponseRequestWrapper(httpResponse);
responseWrapper.setHeader("X-Frame-Options", "DENY");
if (!ssoEnabled) {
filterChain.doFilter(servletRequest, servletResponse);
return;
......
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.atlas.web.filters;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponseWrapper;
public class AtlasResponseRequestWrapper extends HttpServletResponseWrapper {
public AtlasResponseRequestWrapper(HttpServletResponse response) {
super(response);
}
}
......@@ -15,6 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
-->
<% response.setHeader("X-Frame-Options", "DENY"); %>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
......
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