You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by kb...@apache.org on 2020/02/20 14:41:43 UTC
[atlas] 04/04: ATLAS-3629 : UI: skipDefaultError handler improvement
This is an automated email from the ASF dual-hosted git repository.
kbhatt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git
commit b0c85dd99aaabe296875847fdab0e0d5fe6cd846
Author: kevalbhatt <kb...@apache.org>
AuthorDate: Thu Feb 20 16:25:04 2020 +0530
ATLAS-3629 : UI: skipDefaultError handler improvement
---
dashboardv2/public/js/main.js | 5 --
dashboardv2/public/js/utils/CommonViewFunction.js | 9 +--
dashboardv2/public/js/utils/Overrides.js | 4 +-
dashboardv2/public/js/utils/Utils.js | 43 ++++++-------
.../public/js/views/graph/LineageLayoutView.js | 1 -
.../js/views/profile/ProfileColumnLayoutView.js | 1 -
.../js/views/profile/ProfileTableLayoutView.js | 1 -
.../public/js/views/search/SearchLayoutView.js | 2 -
dashboardv2/public/js/views/site/Statistics.js | 1 -
dashboardv2/public/js/views/tag/AddTagModalView.js | 9 +--
dashboardv3/public/js/main.js | 6 --
dashboardv3/public/js/utils/CommonViewFunction.js | 9 +--
dashboardv3/public/js/utils/Overrides.js | 4 +-
dashboardv3/public/js/utils/Utils.js | 43 ++++++-------
.../administrator/PurgeAuditTableLayoutView.js | 1 -
.../public/js/views/graph/LineageLayoutView.js | 1 -
.../name_space/NameSpaceAttrTableLayoutView.js | 75 +++++++++++-----------
.../name_space/NameSpaceContainerLayoutView.js | 1 -
.../js/views/profile/ProfileColumnLayoutView.js | 1 -
.../js/views/profile/ProfileTableLayoutView.js | 1 -
.../search/tree/ClassificationTreeLayoutView.js | 3 -
.../js/views/search/tree/EntityTreeLayoutView.js | 4 --
.../views/search/tree/NameSpaceTreeLayoutView.js | 1 -
dashboardv3/public/js/views/site/Statistics.js | 1 -
dashboardv3/public/js/views/tag/AddTagModalView.js | 9 +--
25 files changed, 85 insertions(+), 151 deletions(-)
diff --git a/dashboardv2/public/js/main.js b/dashboardv2/public/js/main.js
index 01dd0ae..75e16c3 100644
--- a/dashboardv2/public/js/main.js
+++ b/dashboardv2/public/js/main.js
@@ -258,7 +258,6 @@ require(['App',
}
});
this.entityDefCollection.fetch({
- skipDefaultError: true,
complete: function() {
that.entityDefCollection.fullCollection.comparator = function(model) {
return model.get('name').toLowerCase();
@@ -269,7 +268,6 @@ require(['App',
}
});
this.typeHeaders.fetch({
- skipDefaultError: true,
complete: function() {
that.typeHeaders.fullCollection.comparator = function(model) {
return model.get('name').toLowerCase();
@@ -280,7 +278,6 @@ require(['App',
}
});
this.enumDefCollection.fetch({
- skipDefaultError: true,
complete: function() {
that.enumDefCollection.fullCollection.comparator = function(model) {
return model.get('name').toLowerCase();
@@ -291,7 +288,6 @@ require(['App',
}
});
this.classificationDefCollection.fetch({
- skipDefaultError: true,
complete: function() {
that.classificationDefCollection.fullCollection.comparator = function(model) {
return model.get('name').toLowerCase();
@@ -303,7 +299,6 @@ require(['App',
});
this.metricCollection.fetch({
- skipDefaultError: true,
complete: function() {
--that.asyncFetchCounter;
startApp();
diff --git a/dashboardv2/public/js/utils/CommonViewFunction.js b/dashboardv2/public/js/utils/CommonViewFunction.js
index b9896a9..1d03732 100644
--- a/dashboardv2/public/js/utils/CommonViewFunction.js
+++ b/dashboardv2/public/js/utils/CommonViewFunction.js
@@ -34,7 +34,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
options.showLoader();
}
tagModel.deleteAssociation(options.guid, options.tagName, options.associatedGuid, {
- skipDefaultError: true,
+ defaultErrorMessage: options.tagName + Messages.deleteErrorMessage,
success: function(data) {
Utils.notifySuccess({
content: "Classification " + options.tagName + Messages.getAbbreviationMsg(false, 'removeSuccessMessage')
@@ -48,16 +48,9 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
},
cust_error: function(model, response) {
- var message = options.tagName + Messages.deleteErrorMessage;
- if (response && response.responseJSON) {
- message = response.responseJSON.errorMessage;
- }
if (options.hideLoader) {
options.hideLoader();
}
- Utils.notifyError({
- content: message
- });
}
});
},
diff --git a/dashboardv2/public/js/utils/Overrides.js b/dashboardv2/public/js/utils/Overrides.js
index 7e493d6..1b0947b 100644
--- a/dashboardv2/public/js/utils/Overrides.js
+++ b/dashboardv2/public/js/utils/Overrides.js
@@ -37,9 +37,7 @@ define(['require', 'utils/Utils', 'marionette', 'backgrid', 'asBreadcrumbs', 'jq
return oldBackboneSync.apply(this, [method, model,
_.extend(options, {
error: function(response) {
- if (!options.skipDefaultError) {
- Utils.defaultErrorHandler(that, response);
- }
+ Utils.defaultErrorHandler(that, response, options);
that.trigger("error", that, response);
if (options.cust_error) {
options.cust_error(that, response);
diff --git a/dashboardv2/public/js/utils/Utils.js b/dashboardv2/public/js/utils/Utils.js
index 5274ef3..53b8714 100644
--- a/dashboardv2/public/js/utils/Utils.js
+++ b/dashboardv2/public/js/utils/Utils.js
@@ -218,22 +218,20 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums',
}
});
}
- Utils.defaultErrorHandler = function(model, error) {
+ Utils.defaultErrorHandler = function(model, error, options) {
+ var skipDefaultError = null,
+ defaultErrorMessage = null;
+ if (options) {
+ skipDefaultError = options.skipDefaultError;
+ defaultErrorMessage = options.defaultErrorMessage;
+ }
if (error && error.status) {
if (error.status == 401) {
window.location = 'login.jsp'
} else if (error.status == 419) {
window.location = 'login.jsp'
} else if (error.status == 403) {
- var message = "You are not authorized";
- if (error.statusText) {
- try {
- message = JSON.parse(error.statusText).AuthorizationError;
- } catch (err) {}
- Utils.notifyError({
- content: message
- });
- }
+ Utils.serverErrorHandler(error, "You are not authorized");
} else if (error.status == "0" && error.statusText != "abort") {
var diffTime = (new Date().getTime() - prevNetworkErrorTime);
if (diffTime > 3000) {
@@ -243,22 +241,23 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums',
"It seems you are not connected to the internet. Please check your internet connection and try again"
});
}
- } else {
- Utils.serverErrorHandler(model, error)
+ } else if (skipDefaultError !== true) {
+ Utils.serverErrorHandler(error, defaultErrorMessage);
}
- } else {
- Utils.serverErrorHandler(model, error)
+ } else if (skipDefaultError !== true) {
+ Utils.serverErrorHandler(error, defaultErrorMessage);
}
};
- Utils.serverErrorHandler = function(model, response) {
- var responseJSON = response ? response.responseJSON : response;
- if (response && responseJSON && (responseJSON.errorMessage || responseJSON.message || responseJSON.error)) {
- Utils.notifyError({
- content: responseJSON.errorMessage || responseJSON.message || responseJSON.error
- });
- } else {
+ Utils.serverErrorHandler = function(response, defaultErrorMessage) {
+ var responseJSON = response ? response.responseJSON : response,
+ message = defaultErrorMessage ? defaultErrorMessage : Messages.defaultErrorMessage
+ if (response && responseJSON) {
+ message = responseJSON.errorMessage || responseJSON.message || responseJSON.error || message
+ }
+ var existingError = $(".ui-pnotify-container.alert-danger .ui-pnotify-text").text();
+ if (existingError !== message) {
Utils.notifyError({
- content: Messages.defaultErrorMessage
+ content: message
});
}
};
diff --git a/dashboardv2/public/js/views/graph/LineageLayoutView.js b/dashboardv2/public/js/views/graph/LineageLayoutView.js
index af406b9..0f99ca5 100644
--- a/dashboardv2/public/js/views/graph/LineageLayoutView.js
+++ b/dashboardv2/public/js/views/graph/LineageLayoutView.js
@@ -225,7 +225,6 @@ define(['require',
"el": that.$(".graph-button-group button,select[data-id='selectDepth']")
});
this.collection.getLineage(this.guid, {
- skipDefaultError: true,
queryParam: queryParam,
success: function(data) {
if (that.isDestroyed) {
diff --git a/dashboardv2/public/js/views/profile/ProfileColumnLayoutView.js b/dashboardv2/public/js/views/profile/ProfileColumnLayoutView.js
index 874474f..74e19c0 100644
--- a/dashboardv2/public/js/views/profile/ProfileColumnLayoutView.js
+++ b/dashboardv2/public/js/views/profile/ProfileColumnLayoutView.js
@@ -69,7 +69,6 @@ define(['require',
fetchEntity: function(argument) {
var that = this;
this.entityModel.getEntity(this.entityDetail.table.guid, {
- skipDefaultError: true,
success: function(data) {
var entity = data.entity,
profileData = entity && entity.attributes && entity.attributes.profileData ? entity.attributes.profileData.attributes : null;
diff --git a/dashboardv2/public/js/views/profile/ProfileTableLayoutView.js b/dashboardv2/public/js/views/profile/ProfileTableLayoutView.js
index 2414210..ada7e62 100644
--- a/dashboardv2/public/js/views/profile/ProfileTableLayoutView.js
+++ b/dashboardv2/public/js/views/profile/ProfileTableLayoutView.js
@@ -110,7 +110,6 @@ define(['require',
fetchEntity: function(argument) {
var that = this;
this.entityModel.getEntity(this.entityDetail.db.guid, {
- skipDefaultError: true,
success: function(data) {
var entity = data.entity;
if (entity.attributes) {
diff --git a/dashboardv2/public/js/views/search/SearchLayoutView.js b/dashboardv2/public/js/views/search/SearchLayoutView.js
index 06455a9..3cd0ab4 100644
--- a/dashboardv2/public/js/views/search/SearchLayoutView.js
+++ b/dashboardv2/public/js/views/search/SearchLayoutView.js
@@ -381,7 +381,6 @@ define(['require',
}
};
this.metricCollection.fetch({
- skipDefaultError: true,
complete: function() {
--apiCount;
that.entityCountObj = _.first(that.metricCollection.toJSON());
@@ -390,7 +389,6 @@ define(['require',
});
this.typeHeaders.fetch({
- skipDefaultError: true,
silent: true,
complete: function() {
--apiCount;
diff --git a/dashboardv2/public/js/views/site/Statistics.js b/dashboardv2/public/js/views/site/Statistics.js
index 93cc87e..4bef471 100644
--- a/dashboardv2/public/js/views/site/Statistics.js
+++ b/dashboardv2/public/js/views/site/Statistics.js
@@ -104,7 +104,6 @@ define(['require',
fetchMetricData: function(options) {
var that = this;
this.metricCollection.fetch({
- skipDefaultError: true,
success: function(data) {
var data = _.first(data.toJSON());
that.renderStats({ valueObject: data.general.stats, dataObject: data.general });
diff --git a/dashboardv2/public/js/views/tag/AddTagModalView.js b/dashboardv2/public/js/views/tag/AddTagModalView.js
index f5a5eb8..214de07 100644
--- a/dashboardv2/public/js/views/tag/AddTagModalView.js
+++ b/dashboardv2/public/js/views/tag/AddTagModalView.js
@@ -439,9 +439,9 @@ define(['require',
this.showLoader();
}
this.entityModel.saveTraitsEntity(this.tagModel ? options.guid : null, {
- skipDefaultError: true,
data: JSON.stringify(json),
type: this.tagModel ? 'PUT' : 'POST',
+ defaultErrorMessage: "Tag " + tagName + " could not be added",
success: function(data) {
var addupdatetext = that.tagModel ? 'updated successfully to ' : 'added to ';
Utils.notifySuccess({
@@ -455,13 +455,6 @@ define(['require',
}
},
cust_error: function(model, response) {
- var message = "Tag " + tagName + " could not be added";
- if (response && response.responseJSON) {
- message = response.responseJSON.errorMessage;
- }
- Utils.notifyError({
- content: message
- });
if (that.hideLoader) {
that.hideLoader();
}
diff --git a/dashboardv3/public/js/main.js b/dashboardv3/public/js/main.js
index 9bf190f..26fd709 100644
--- a/dashboardv3/public/js/main.js
+++ b/dashboardv3/public/js/main.js
@@ -268,7 +268,6 @@ require(['App',
}
});
this.entityDefCollection.fetch({
- skipDefaultError: true,
complete: function() {
that.entityDefCollection.fullCollection.comparator = function(model) {
return model.get('name').toLowerCase();
@@ -279,7 +278,6 @@ require(['App',
}
});
this.typeHeaders.fetch({
- skipDefaultError: true,
complete: function() {
that.typeHeaders.fullCollection.comparator = function(model) {
return model.get('name').toLowerCase();
@@ -290,7 +288,6 @@ require(['App',
}
});
this.enumDefCollection.fetch({
- skipDefaultError: true,
complete: function() {
that.enumDefCollection.fullCollection.comparator = function(model) {
return model.get('name').toLowerCase();
@@ -301,7 +298,6 @@ require(['App',
}
});
this.classificationDefCollection.fetch({
- skipDefaultError: true,
complete: function() {
that.classificationDefCollection.fullCollection.comparator = function(model) {
return model.get('name').toLowerCase();
@@ -313,7 +309,6 @@ require(['App',
});
this.metricCollection.fetch({
- skipDefaultError: true,
complete: function() {
--that.asyncFetchCounter;
startApp();
@@ -321,7 +316,6 @@ require(['App',
});
this.nameSpaceCollection.fetch({
- skipDefaultError: true,
complete: function() {
that.nameSpaceCollection.fullCollection.comparator = function(model) {
return model.get('name').toLowerCase();
diff --git a/dashboardv3/public/js/utils/CommonViewFunction.js b/dashboardv3/public/js/utils/CommonViewFunction.js
index f83aa0a..e429321 100644
--- a/dashboardv3/public/js/utils/CommonViewFunction.js
+++ b/dashboardv3/public/js/utils/CommonViewFunction.js
@@ -34,7 +34,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
options.showLoader();
}
tagModel.deleteAssociation(options.guid, options.tagName, options.associatedGuid, {
- skipDefaultError: true,
+ defaultErrorMessage: options.tagName + Messages.deleteErrorMessage,
success: function(data) {
Utils.notifySuccess({
content: "Classification " + options.tagName + Messages.getAbbreviationMsg(false, 'removeSuccessMessage')
@@ -48,16 +48,9 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
},
cust_error: function(model, response) {
- var message = options.tagName + Messages.deleteErrorMessage;
- if (response && response.responseJSON) {
- message = response.responseJSON.errorMessage;
- }
if (options.hideLoader) {
options.hideLoader();
}
- Utils.notifyError({
- content: message
- });
}
});
},
diff --git a/dashboardv3/public/js/utils/Overrides.js b/dashboardv3/public/js/utils/Overrides.js
index 42d047e..26808e4 100644
--- a/dashboardv3/public/js/utils/Overrides.js
+++ b/dashboardv3/public/js/utils/Overrides.js
@@ -37,9 +37,7 @@ define(['require', 'utils/Utils', 'marionette', 'backgrid', 'asBreadcrumbs', 'jq
return oldBackboneSync.apply(this, [method, model,
_.extend(options, {
error: function(response) {
- if (!options.skipDefaultError) {
- Utils.defaultErrorHandler(that, response);
- }
+ Utils.defaultErrorHandler(that, response, options);
that.trigger("error", that, response);
if (options.cust_error) {
options.cust_error(that, response);
diff --git a/dashboardv3/public/js/utils/Utils.js b/dashboardv3/public/js/utils/Utils.js
index 7aab725..1a5b3bc 100644
--- a/dashboardv3/public/js/utils/Utils.js
+++ b/dashboardv3/public/js/utils/Utils.js
@@ -224,22 +224,20 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums',
}
});
}
- Utils.defaultErrorHandler = function(model, error) {
+ Utils.defaultErrorHandler = function(model, error, options) {
+ var skipDefaultError = null,
+ defaultErrorMessage = null;
+ if (options) {
+ skipDefaultError = options.skipDefaultError;
+ defaultErrorMessage = options.defaultErrorMessage;
+ }
if (error && error.status) {
if (error.status == 401) {
window.location = 'login.jsp'
} else if (error.status == 419) {
window.location = 'login.jsp'
} else if (error.status == 403) {
- var message = "You are not authorized";
- if (error.statusText) {
- try {
- message = JSON.parse(error.statusText).AuthorizationError;
- } catch (err) {}
- Utils.notifyError({
- content: message
- });
- }
+ Utils.serverErrorHandler(error, "You are not authorized");
} else if (error.status == "0" && error.statusText != "abort") {
var diffTime = (new Date().getTime() - prevNetworkErrorTime);
if (diffTime > 3000) {
@@ -249,22 +247,23 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums',
"It seems you are not connected to the internet. Please check your internet connection and try again"
});
}
- } else {
- Utils.serverErrorHandler(model, error)
+ } else if (skipDefaultError !== true) {
+ Utils.serverErrorHandler(error, defaultErrorMessage);
}
- } else {
- Utils.serverErrorHandler(model, error)
+ } else if (skipDefaultError !== true) {
+ Utils.serverErrorHandler(error, defaultErrorMessage);
}
};
- Utils.serverErrorHandler = function(model, response) {
- var responseJSON = response ? response.responseJSON : response;
- if (response && responseJSON && (responseJSON.errorMessage || responseJSON.message || responseJSON.error)) {
- Utils.notifyError({
- content: responseJSON.errorMessage || responseJSON.message || responseJSON.error
- });
- } else {
+ Utils.serverErrorHandler = function(response, defaultErrorMessage) {
+ var responseJSON = response ? response.responseJSON : response,
+ message = defaultErrorMessage ? defaultErrorMessage : Messages.defaultErrorMessage
+ if (response && responseJSON) {
+ message = responseJSON.errorMessage || responseJSON.message || responseJSON.error || message
+ }
+ var existingError = $(".ui-pnotify-container.alert-danger .ui-pnotify-text").text();
+ if (existingError !== message) {
Utils.notifyError({
- content: Messages.defaultErrorMessage
+ content: message
});
}
};
diff --git a/dashboardv3/public/js/views/administrator/PurgeAuditTableLayoutView.js b/dashboardv3/public/js/views/administrator/PurgeAuditTableLayoutView.js
index 6b5b4d3..ada59d2 100644
--- a/dashboardv3/public/js/views/administrator/PurgeAuditTableLayoutView.js
+++ b/dashboardv3/public/js/views/administrator/PurgeAuditTableLayoutView.js
@@ -310,7 +310,6 @@ define(['require',
}
}
var apiObj = {
- skipDefaultError: true,
sort: false,
success: function(dataOrCollection, response) {
if (!(that.ui.pageRecordText instanceof jQuery)) {
diff --git a/dashboardv3/public/js/views/graph/LineageLayoutView.js b/dashboardv3/public/js/views/graph/LineageLayoutView.js
index 4fc3fce..4e7a45b 100644
--- a/dashboardv3/public/js/views/graph/LineageLayoutView.js
+++ b/dashboardv3/public/js/views/graph/LineageLayoutView.js
@@ -240,7 +240,6 @@ define(['require',
"el": that.$(".graph-button-group button,select[data-id='selectDepth']")
});
this.collection.getLineage(this.guid, {
- skipDefaultError: true,
queryParam: queryParam,
success: function(data) {
if (that.isDestroyed) {
diff --git a/dashboardv3/public/js/views/name_space/NameSpaceAttrTableLayoutView.js b/dashboardv3/public/js/views/name_space/NameSpaceAttrTableLayoutView.js
index 218f9c5..b5bdeb2 100644
--- a/dashboardv3/public/js/views/name_space/NameSpaceAttrTableLayoutView.js
+++ b/dashboardv3/public/js/views/name_space/NameSpaceAttrTableLayoutView.js
@@ -132,7 +132,6 @@ define(['require',
enumDefCollection.fetch({ reset: true });
that.nameSpaceAttr.fullCollection.reset();
that.options.selectedNameSpace.fetch({
- skipDefaultError: true,
complete: function(model, status) {
that.nameSpaceAttr.fullCollection.add(model.responseJSON.attributeDefs);
}
@@ -179,40 +178,40 @@ define(['require',
getNamespaceTableColumns: function() {
var that = this;
return this.nameSpaceAttr.constructor.getTableCols({
- name: {
- label: "Attribute Name",
- cell: "html",
- editable: false,
- formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
- fromRaw: function(rawValue, model) {
- return model.get('name');
- }
- })
- },
- typeName: {
- label: "typeName",
- cell: "html",
- editable: false,
- formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
- fromRaw: function(rawValue, model) {
- return model.get('typeName');
- }
- })
- },
- options: {
- label: "Entity Type(s)",
- cell: "html",
- editable: false,
- formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
- fromRaw: function(rawValue, model) {
- var applicableEntityTypes = '',
- attrEntityTypes = JSON.parse(model.get('options').applicableEntityTypes);
- _.each(attrEntityTypes, function(values) {
- applicableEntityTypes += '<label class="btn btn-action btn-xs btn-blue no-pointer">' + values + '</label>';
- });
- return applicableEntityTypes;
- }
- })
+ name: {
+ label: "Attribute Name",
+ cell: "html",
+ editable: false,
+ formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
+ fromRaw: function(rawValue, model) {
+ return model.get('name');
+ }
+ })
+ },
+ typeName: {
+ label: "typeName",
+ cell: "html",
+ editable: false,
+ formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
+ fromRaw: function(rawValue, model) {
+ return _.escape(model.get('typeName'));
+ }
+ })
+ },
+ options: {
+ label: "Entity Type(s)",
+ cell: "html",
+ editable: false,
+ formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
+ fromRaw: function(rawValue, model) {
+ var applicableEntityTypes = '',
+ attrEntityTypes = JSON.parse(model.get('options').applicableEntityTypes);
+ _.each(attrEntityTypes, function(values) {
+ applicableEntityTypes += '<label class="btn btn-action btn-xs btn-blue no-pointer">' + values + '</label>';
+ });
+ return applicableEntityTypes;
+ }
+ })
},
tool: {
label: "Action",
@@ -226,7 +225,7 @@ define(['require',
})
}
}, this.nameSpaceAttr);
- }
- });
-return NameSpaceAttrTableLayoutView;
+ }
+ });
+ return NameSpaceAttrTableLayoutView;
});
\ No newline at end of file
diff --git a/dashboardv3/public/js/views/name_space/NameSpaceContainerLayoutView.js b/dashboardv3/public/js/views/name_space/NameSpaceContainerLayoutView.js
index 3874a8d..481125d 100644
--- a/dashboardv3/public/js/views/name_space/NameSpaceContainerLayoutView.js
+++ b/dashboardv3/public/js/views/name_space/NameSpaceContainerLayoutView.js
@@ -69,7 +69,6 @@ define([
fetchNameSpaceGuid: function() {
var that = this;
this.selectedNameSpace.fetch({
- skipDefaultError: true,
complete: function(model, status) {
that.nameSpaceAttr.fullCollection.add(model.responseJSON.attributeDefs);
}
diff --git a/dashboardv3/public/js/views/profile/ProfileColumnLayoutView.js b/dashboardv3/public/js/views/profile/ProfileColumnLayoutView.js
index 874474f..74e19c0 100644
--- a/dashboardv3/public/js/views/profile/ProfileColumnLayoutView.js
+++ b/dashboardv3/public/js/views/profile/ProfileColumnLayoutView.js
@@ -69,7 +69,6 @@ define(['require',
fetchEntity: function(argument) {
var that = this;
this.entityModel.getEntity(this.entityDetail.table.guid, {
- skipDefaultError: true,
success: function(data) {
var entity = data.entity,
profileData = entity && entity.attributes && entity.attributes.profileData ? entity.attributes.profileData.attributes : null;
diff --git a/dashboardv3/public/js/views/profile/ProfileTableLayoutView.js b/dashboardv3/public/js/views/profile/ProfileTableLayoutView.js
index 2414210..ada7e62 100644
--- a/dashboardv3/public/js/views/profile/ProfileTableLayoutView.js
+++ b/dashboardv3/public/js/views/profile/ProfileTableLayoutView.js
@@ -110,7 +110,6 @@ define(['require',
fetchEntity: function(argument) {
var that = this;
this.entityModel.getEntity(this.entityDetail.db.guid, {
- skipDefaultError: true,
success: function(data) {
var entity = data.entity;
if (entity.attributes) {
diff --git a/dashboardv3/public/js/views/search/tree/ClassificationTreeLayoutView.js b/dashboardv3/public/js/views/search/tree/ClassificationTreeLayoutView.js
index 78a8b24..d0c41c6 100644
--- a/dashboardv3/public/js/views/search/tree/ClassificationTreeLayoutView.js
+++ b/dashboardv3/public/js/views/search/tree/ClassificationTreeLayoutView.js
@@ -174,7 +174,6 @@ define([
var opt = options || {};
if (opt && !opt.metricData) {
that.metricCollection.fetch({
- skipDefaultError: true,
complete: function() {
that.entityCountObj = _.first(that.metricCollection.toJSON());
that.classificationTreeUpdate = true;
@@ -351,7 +350,6 @@ define([
}
};
this.classificationDefCollection.fetch({
- skipDefaultError: true,
silent: true,
complete: function() {
--apiCount;
@@ -359,7 +357,6 @@ define([
}
});
this.metricCollection.fetch({
- skipDefaultError: true,
complete: function() {
--apiCount;
that.entityCountObj = _.first(that.metricCollection.toJSON());
diff --git a/dashboardv3/public/js/views/search/tree/EntityTreeLayoutView.js b/dashboardv3/public/js/views/search/tree/EntityTreeLayoutView.js
index 421fb2d..6df64ad 100644
--- a/dashboardv3/public/js/views/search/tree/EntityTreeLayoutView.js
+++ b/dashboardv3/public/js/views/search/tree/EntityTreeLayoutView.js
@@ -91,7 +91,6 @@ define([
var opt = options || {};
if (opt && !opt.metricData) {
that.metricCollection.fetch({
- skipDefaultError: true,
complete: function() {
that.entityCountObj = _.first(that.metricCollection.toJSON());
that.ui.entitySearchTree.jstree(true).refresh();
@@ -510,7 +509,6 @@ define([
}
};
this.entityDefCollection.fetch({
- skipDefaultError: true,
complete: function() {
that.entityDefCollection.fullCollection.comparator = function(model) {
return model.get('name').toLowerCase();
@@ -522,7 +520,6 @@ define([
});
this.metricCollection.fetch({
- skipDefaultError: true,
complete: function() {
--apiCount;
that.entityCountObj = _.first(that.metricCollection.toJSON());
@@ -531,7 +528,6 @@ define([
});
this.typeHeaders.fetch({
- skipDefaultError: true,
complete: function() {
that.typeHeaders.fullCollection.comparator = function(model) {
return model.get('name').toLowerCase();
diff --git a/dashboardv3/public/js/views/search/tree/NameSpaceTreeLayoutView.js b/dashboardv3/public/js/views/search/tree/NameSpaceTreeLayoutView.js
index 2ece151..f6477cf 100644
--- a/dashboardv3/public/js/views/search/tree/NameSpaceTreeLayoutView.js
+++ b/dashboardv3/public/js/views/search/tree/NameSpaceTreeLayoutView.js
@@ -215,7 +215,6 @@ define([
refresh: function(options) {
var that = this;
this.nameSpaceCollection.fetch({
- skipDefaultError: true,
silent: true,
complete: function() {
that.nameSpaceCollection.fullCollection.comparator = function(model) {
diff --git a/dashboardv3/public/js/views/site/Statistics.js b/dashboardv3/public/js/views/site/Statistics.js
index 0329e04..9673bb0 100644
--- a/dashboardv3/public/js/views/site/Statistics.js
+++ b/dashboardv3/public/js/views/site/Statistics.js
@@ -99,7 +99,6 @@ define(['require',
fetchMetricData: function(options) {
var that = this;
this.metricCollection.fetch({
- skipDefaultError: true,
success: function(data) {
var data = _.first(data.toJSON());
that.renderStats({ valueObject: data.general.stats, dataObject: data.general });
diff --git a/dashboardv3/public/js/views/tag/AddTagModalView.js b/dashboardv3/public/js/views/tag/AddTagModalView.js
index f5a5eb8..214de07 100644
--- a/dashboardv3/public/js/views/tag/AddTagModalView.js
+++ b/dashboardv3/public/js/views/tag/AddTagModalView.js
@@ -439,9 +439,9 @@ define(['require',
this.showLoader();
}
this.entityModel.saveTraitsEntity(this.tagModel ? options.guid : null, {
- skipDefaultError: true,
data: JSON.stringify(json),
type: this.tagModel ? 'PUT' : 'POST',
+ defaultErrorMessage: "Tag " + tagName + " could not be added",
success: function(data) {
var addupdatetext = that.tagModel ? 'updated successfully to ' : 'added to ';
Utils.notifySuccess({
@@ -455,13 +455,6 @@ define(['require',
}
},
cust_error: function(model, response) {
- var message = "Tag " + tagName + " could not be added";
- if (response && response.responseJSON) {
- message = response.responseJSON.errorMessage;
- }
- Utils.notifyError({
- content: message
- });
if (that.hideLoader) {
that.hideLoader();
}