From 74e9699e1e0d90ab758b0b8bbe7893861f949b93 Mon Sep 17 00:00:00 2001 From: sauls8t Date: Mon, 23 Apr 2018 12:46:34 +0100 Subject: [PATCH] Replace showNotificaiton() calls --- gui/app/components/customize/auth-settings.js | 4 ++-- gui/app/components/section/github/type-editor.js | 3 +-- gui/app/components/section/papertrail/type-editor.js | 8 ++------ gui/app/components/section/trello/type-editor.js | 9 ++++----- 4 files changed, 9 insertions(+), 15 deletions(-) diff --git a/gui/app/components/customize/auth-settings.js b/gui/app/components/customize/auth-settings.js index ff75762e..808df946 100644 --- a/gui/app/components/customize/auth-settings.js +++ b/gui/app/components/customize/auth-settings.js @@ -145,13 +145,13 @@ export default Component.extend({ if (data.authProvider === constants.AuthProvider.Keycloak) { this.get('onSync')().then((response) => { if (response.isError) { - this.showNotification(response.message); + console.log(response.message); // eslint-disable-line no-console data.authProvider = constants.AuthProvider.Documize; this.get('onSave')(data).then(() => { }); } else { if (data.authProvider === this.get('appMeta.authProvider')) { - this.showNotification(response.message); + console.log(response.message); // eslint-disable-line no-console } else { this.get('onChange')(data); } diff --git a/gui/app/components/section/github/type-editor.js b/gui/app/components/section/github/type-editor.js index 0d3c665f..1f7525ee 100644 --- a/gui/app/components/section/github/type-editor.js +++ b/gui/app/components/section/github/type-editor.js @@ -177,7 +177,6 @@ export default Component.extend(SectionMixin, NotifierMixin, { }, function (error) { self.set('busy', false); self.set('authenticated', false); - self.showNotification("Unable to fetch repositories"); console.log(error); // eslint-disable-line no-console }); }, @@ -202,7 +201,7 @@ export default Component.extend(SectionMixin, NotifierMixin, { }, function (error) { self.set('busy', false); self.set('authenticated', false); - self.showNotification("Unable to fetch owners"); + console.log("Unable to fetch owners"); // eslint-disable-line no-console console.log(error); // eslint-disable-line no-console }); diff --git a/gui/app/components/section/papertrail/type-editor.js b/gui/app/components/section/papertrail/type-editor.js index 9a62f2c2..e82aedd3 100644 --- a/gui/app/components/section/papertrail/type-editor.js +++ b/gui/app/components/section/papertrail/type-editor.js @@ -51,11 +51,7 @@ export default Component.extend(SectionMixin, NotifierMixin, { }, displayError(reason) { - if (netUtil.isAjaxAccessError(reason)) { - // this.showNotification(`Unable to authenticate`); - } else { - // this.showNotification(`Something went wrong, try again!`); - } + console.log(reason); // eslint-disable-line no-console }, actions: { @@ -181,7 +177,7 @@ export default Component.extend(SectionMixin, NotifierMixin, { }, function (reason) { // eslint-disable-line no-unused-vars self.set('authenticated', false); self.set('waiting', false); - // self.showNotification(`Something went wrong, try again!`); + console.log(reason); // eslint-disable-line no-console }); } } diff --git a/gui/app/components/section/trello/type-editor.js b/gui/app/components/section/trello/type-editor.js index 06de3844..4187d397 100644 --- a/gui/app/components/section/trello/type-editor.js +++ b/gui/app/components/section/trello/type-editor.js @@ -84,7 +84,7 @@ export default Component.extend(SectionMixin, NotifierMixin, TooltipMixin, { Trello.deauthorize(); }); } - }, function (error) { + }, function (error) { console.log(error); // eslint-disable-line no-console }); }, @@ -138,7 +138,7 @@ export default Component.extend(SectionMixin, NotifierMixin, TooltipMixin, { }, function (error) { //jshint ignore: line self.set('busy', false); self.set('authenticated', false); - self.showNotification("Unable to fetch board lists"); + console.log("Unable to fetch board lists"); // eslint-disable-line no-console console.log(error); // eslint-disable-line no-console }); }, @@ -199,14 +199,13 @@ export default Component.extend(SectionMixin, NotifierMixin, TooltipMixin, { }, function (error) { //jshint ignore: line self.set('busy', false); self.set('authenticated', false); - self.showNotification("Unable to fetch boards"); + console.log("Unable to fetch boards"); // eslint-disable-line no-console console.log(error); // eslint-disable-line no-console }); }, error: function (error) { self.set('busy', false); self.set('authenticated', false); - self.showNotification("Unable to authenticate"); console.log(error); // eslint-disable-line no-console } }); @@ -247,4 +246,4 @@ export default Component.extend(SectionMixin, NotifierMixin, TooltipMixin, { }); } } -}); \ No newline at end of file +});