Skip to content

Change error dialogs#450

Merged
stefanoborini merged 13 commits into
switch_to_vuefrom
remove_old_dialogs
May 12, 2017
Merged

Change error dialogs#450
stefanoborini merged 13 commits into
switch_to_vuefrom
remove_old_dialogs

Conversation

@martinRenou

@martinRenou martinRenou commented May 12, 2017

Copy link
Copy Markdown
Member
  • Remove old dialogs and use modal dialogs generated by Vue in ApplicationListView and ApplicationView (when start or stop fails).
  • ConfirmDialog component now uses the adminlte classes instead of custom CSS classes.
  • ConfirmDialog component now display a Cancel button only if an associated callback is defined.

@codecov-io

codecov-io commented May 12, 2017

Copy link
Copy Markdown

Codecov Report

Merging #450 into switch_to_vue will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@              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       52

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2f60908...c90095d. Read the comment docs.

@martinRenou martinRenou requested a review from stefanoborini May 12, 2017 12:41

resources.Container.delete(url_id)
return resources.Container.delete(url_id)
.done(function() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't have to do a done. Let the calling client handle the failure.

@@ -154,18 +153,18 @@ define([
configurablesData[tag] = configurable.asConfigDict();
});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you have to add a done here to resolve the promise

'<section class="sidebar">' +
'<section class="sidebar">' +
' <!-- Error dialog -->' +
' <confirm-dialog v-if="showErrorDialog"' +

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{
errorDialog: {
visible: true
}
}

'<section class="sidebar">' +
' <!-- Error dialog -->' +
' <confirm-dialog v-if="showErrorDialog"' +
' :title="getErrorTitle()"' +

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you just need {"whatever string "+errorMessage}

return { 'searchInput': '' };
return {
'searchInput': '',
showErrorDialog: false,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes here...

this.showErrorDialog = true;
}.bind(this));
},
getErrorTitle: function() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

goes away

' v-if="currentApp !== null"' +
' :class="{ content: true, \'no-padding\': currentApp.isRunning() }">' +
' <!-- Error dialog -->' +
' <confirm-dialog v-if="showErrorDialog"' +

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

And send the startApplication event to GA only if the start was a success
@stefanoborini stefanoborini merged commit fe6ebe6 into switch_to_vue May 12, 2017
@stefanoborini stefanoborini deleted the remove_old_dialogs branch May 12, 2017 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants