Change error dialogs#450
Conversation
Codecov Report
@@ Coverage Diff @@
## switch_to_vue #450 +/- ##
==============================================
Coverage 95.33% 95.33%
==============================================
Files 88 88
Lines 4077 4077
Branches 259 259
==============================================
Hits 3887 3887
Misses 138 138
Partials 52 52Continue to review full report at Codecov.
|
|
|
||
| resources.Container.delete(url_id) | ||
| return resources.Container.delete(url_id) | ||
| .done(function() { |
There was a problem hiding this comment.
you don't have to do a done. Let the calling client handle the failure.
| @@ -154,18 +153,18 @@ define([ | |||
| configurablesData[tag] = configurable.asConfigDict(); | |||
| }); | |||
|
|
|||
There was a problem hiding this comment.
create a promise. if you hit any of the fail, you resolve the promise by reject. otherwise, you say success.
| .fail(function(error) { | ||
| currentApp.status = Status.STOPPED; | ||
| dialogs.webapi_error_dialog(error); | ||
| return error; |
There was a problem hiding this comment.
you have to add a done here to resolve the promise
| '<section class="sidebar">' + | ||
| '<section class="sidebar">' + | ||
| ' <!-- Error dialog -->' + | ||
| ' <confirm-dialog v-if="showErrorDialog"' + |
There was a problem hiding this comment.
{
errorDialog: {
visible: true
}
}
| '<section class="sidebar">' + | ||
| ' <!-- Error dialog -->' + | ||
| ' <confirm-dialog v-if="showErrorDialog"' + | ||
| ' :title="getErrorTitle()"' + |
There was a problem hiding this comment.
you just need {"whatever string "+errorMessage}
| return { 'searchInput': '' }; | ||
| return { | ||
| 'searchInput': '', | ||
| showErrorDialog: false, |
There was a problem hiding this comment.
errorDialog: {
show: true,
message: ""
}
| var stoppingAppName = this.$options.filters.appName( | ||
| this.model.appList[index].appData.image); | ||
| this.model.stopApplication(index).fail(function(error) { | ||
| this.stoppingError = error; |
| this.showErrorDialog = true; | ||
| }.bind(this)); | ||
| }, | ||
| getErrorTitle: function() { |
| ' v-if="currentApp !== null"' + | ||
| ' :class="{ content: true, \'no-padding\': currentApp.isRunning() }">' + | ||
| ' <!-- Error dialog -->' + | ||
| ' <confirm-dialog v-if="showErrorDialog"' + |
And send the startApplication event to GA only if the start was a success
Uh oh!
There was an error while loading. Please reload this page.