syndesisio / syndesis-ui

The front end application or UI for Syndesis - a flexible, customizable, cloud-hosted platform that provides core integration capabilities as a service. It leverages Red Hat's existing product architecture using OpenShift Online/Dedicated and Fuse Integration Services.
https://syndesis.io/
14 stars 28 forks source link

Error dialog appears to late #434

Closed rhuss closed 7 years ago

rhuss commented 7 years ago

When publishing an integration and when this fails (e.g. because of https://github.com/redhat-ipaas/ipaas-rest/issues/272), then I don't get any error dialog but the screen remains the same.

The error appears. in the Javascript console and Network tab, though.

When I know press "Publish" a second time, then error dialog (from the former try) appears immediately and a second publish is triggered (which of course also fails).

I would expect the error dialog to show up immediately when the http error response arrives.

kahboom commented 7 years ago

@gashcrumb - I was going to add toast notifications here, should probably hold off until this is fixed right?

rhuss commented 7 years ago

its not only when pushing the button that then the dialog appears, it happens on any event (e.g. when focussing on an input field, then the dialog appears.

gashcrumb commented 7 years ago

yeah, the issue here is a change detection issue, there's something screwy with angular's change detection on some of these views that I've been noticing but haven't been able to narrow down what's causing it.

I wouldn't use a toast notification for the error message though, we currently use the dialog as I'm still not convinced we'll always get back a consistent JSON response yet. Also, part of the reason we stay on the page currently is when you go out of the integration editor we don't store the current integration locally. So if we just jump back to the integration list before the request to save the integration completes, we risk losing the user's current work.

Again, the save HTTP operation still takes much longer than it's supposed to.