You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by ma...@apache.org on 2018/01/11 00:52:24 UTC
atlas git commit: ATLAS-2350: UI - after error notification during
search, there is an icon buffering forever
Repository: atlas
Updated Branches:
refs/heads/master c6cc3314f -> 9f0866c8a
ATLAS-2350: UI - after error notification during search, there is an icon buffering forever
Signed-off-by: Madhan Neethiraj <ma...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/9f0866c8
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/9f0866c8
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/9f0866c8
Branch: refs/heads/master
Commit: 9f0866c8a758319bff96b7b281ee05eb31a88d41
Parents: c6cc331
Author: pratik24mac <pr...@gmail.com>
Authored: Wed Jan 10 17:45:04 2018 +0530
Committer: Madhan Neethiraj <ma...@apache.org>
Committed: Wed Jan 10 16:52:11 2018 -0800
----------------------------------------------------------------------
.../js/views/search/SearchResultLayoutView.js | 21 ++++++++------------
1 file changed, 8 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/atlas/blob/9f0866c8/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 ed8e0c4..b3f339b 100644
--- a/dashboardv2/public/js/views/search/SearchResultLayoutView.js
+++ b/dashboardv2/public/js/views/search/SearchResultLayoutView.js
@@ -184,19 +184,14 @@ define(['require',
}
});
this.listenTo(this.searchCollection, "error", function(model, response) {
- this.$('.fontLoader').hide();
- this.$('.tableOverlay').hide();
- var responseJSON = response && response.responseJSON ? response.responseJSON : null;
- if (responseJSON && (responseJSON.errorMessage || responseJSON.message || responseJSON.error)) {
+ this.hideLoader({ type: 'error' });
+ var responseJSON = response && response.responseJSON ? response.responseJSON : null,
+ errorText = (responseJSON && (responseJSON.errorMessage || responseJSON.message || responseJSON.error ))|| 'Invalid Expression';
+ if (errorText) {
Utils.notifyError({
- content: responseJSON.errorMessage || responseJSON.message || responseJSON.error
+ content: errorText
});
- } else {
- if (response.statusText !== "abort") {
- Utils.notifyError({
- content: "Invalid Expression"
- });
- }
+ this.$('.searchTable > .well').html('<center>' + errorText + '</center>')
}
}, this);
this.listenTo(this.searchCollection, "state-changed", function(state) {
@@ -847,9 +842,9 @@ define(['require',
this.$('.fontLoader:not(.for-ignore)').addClass('show');
this.$('.tableOverlay').addClass('show');
},
- hideLoader: function() {
+ hideLoader: function(options) {
this.$('.fontLoader:not(.for-ignore)').removeClass('show');
- this.$('.ellipsis,.pagination-box').show(); // only for first time
+ options && options.type === 'error' ? this.$('.ellipsis,.pagination-box').hide() : this.$('.ellipsis,.pagination-box').show(); // only show for first time and hide when type is error
this.$('.tableOverlay').removeClass('show');
},
checkedValue: function(e) {