galaxyproject / cloudlaunch-ui

A user interface for the cloudlaunch app
MIT License
8 stars 13 forks source link

Dropdowns often broken since Angular 4 upgrade #16

Closed afgane closed 7 years ago

afgane commented 7 years ago

I noticed in https://github.com/galaxyproject/cloudlaunch-ui/pull/12 but it keep happening outside that context. Switching clouds on an appliance page or choosing a different instance type will not always but often render the page useless without doing a refresh. I'm guessing this is in part due to the crapy dropdown component and possibly compounded by the Angular update.

As talked about earlier, we should migrate to using native angular components (e.g., https://material.angular.io/components/select/overview).

machristie commented 7 years ago

I'm getting this error locally when I try to launch Ubuntu:

ERROR TypeError: _co.cloud is undefined
Stack trace:
View_CloudCredentialsEditorComponent_3/<@ng:///MyProfileModule/CloudCredentialsEditorComponent.ngfactory.js:58:9
debugUpdateRenderer@http://localhost:4200/vendor.bundle.js:89836:12
checkAndUpdateView@http://localhost:4200/vendor.bundle.js:88983:5
callViewAction@http://localhost:4200/vendor.bundle.js:89343:21
execEmbeddedViewsAction@http://localhost:4200/vendor.bundle.js:89301:17
checkAndUpdateView@http://localhost:4200
...

This might be related to changes in the #12 pull request. I'll investigate further.

machristie commented 7 years ago

I'm not sure if it is the same error but in Chrome the error on the console looks like this:

ERROR TypeError: Cannot read property 'name' of undefined
    at Object.eval [as updateRenderer] (CloudCredentialsEditorComponent.html:18)
    at Object.debugUpdateRenderer [as updateRenderer] (core.es5.js:13096)
    at checkAndUpdateView (core.es5.js:12243)
    at callViewAction (core.es5.js:12603)
    at execEmbeddedViewsAction (core.es5.js:12561)
    at checkAndUpdateView (core.es5.js:12239)
    at callViewAction (core.es5.js:12603)
    at execComponentViewsAction (core.es5.js:12535)
    at checkAndUpdateView (
...
machristie commented 7 years ago

This is related to the changes in pull request #12. I added the cloudType attribute to the cloud-credentials-editor component but I failed to update cloud-credentials-selector to set the cloudType on the cloud-credentials-editor. I'm still running into an issue that when the cloudType changes the cloud-credentials-editor needs to recompute the availableClouds based on the new cloudType.

machristie commented 7 years ago

I pushed a fix for the cloudType problem to the gce branch, see #12 pull request

machristie commented 7 years ago

Now I'm looking into problem with UbuntuConfigComponent not implementing certain methods, for example getting this kind of error:

ERROR TypeError: get form must be implemented
Stack trace:
get@http://localhost:4200/common.chunk.js:18:19
../../../../../src/app/marketplace/plugins/base-plugin.component.ts/BasePluginComponent.prototype.ngOnInit@http://localhost:4200/common.chunk.js:57:13
checkAndUpdateDirectiveInline@http://localhost:4200/vendor.bundle.js:87576:9
checkAndUpdateNodeInline@http://localhost:4200/vendor.bundle.js:89072:17
checkAndUpdateNode@http://localhost:4200/vendor.bundle.js:89011:16