HewlettPackard / HewlettPackard/morpheus-plugin-core
Using a select option type for plugin settings causes problems
- Dominant language
- Java
- Stars
- 11
- Forks
- 18
- Avg merge
- 20h 24m
- Merged PRs (30d)
- 10
Description
It appears that option sources are only available when a plugin is enabled. This causes an error to be thrown when a plugin using a select option type for its plugin settings is disabled. Once the plugin has been disabled it can no longer be re-enabled from the UI as the plugin configuration modal just hangs. The error below is thrown when the plugin is disabled and the modal says "looks like the server threw a gasket".
```
2022-12-02_15:22:49.28102 ''[2022-12-02 15:22:49,336] [http-nio-127.0.0.1-8080-exec-1] ERROR StackTrace - Full Stack Trace:
2022-12-02_15:22:49.33744 'org.grails.taglib.GrailsTagException: [views/admin/integrations/plugins/_edit.gsp:83] Error executing tag : [views/admin/integrations/plugins/_edit.gsp:51] Error executing tag : [views/templates/_optionTypes.gsp:7] Error executing tag : [views/templates/_optionType.gsp:195] Error executing tag : No signature of method: com.morpheus.OptionSourceService.datadogApiEndpoints() is applicable for argument types: (org.grails.taglib.GroovyPageAttributes) values: [[required:true, selectMessage:null, data-select-message:null, ...]]
2022-12-02_15:22:49.33745 at org.grails.gsp.GroovyPage.throwRootCause(GroovyPage.java:473)
2022-12-02_15:22:49.33746 at org.grails.gsp.GroovyPage.invokeTag(GroovyPage.java:415)
2022-12-02_15:22:49.33747 at org.grails.gsp.GroovyPage$invokeTag$4.callCurrent(Unknown Source)
2022-12-02_15:22:49.33747 at gsp_morpheus_ui_admin_integrations_plugins_edit_gsp.run(gsp_morpheus_ui_admin_integrations_plugins_edit_gsp.groovy:79)
2022-12-02_15:22:49.33750 at org.grails.gsp.GroovyPageWritable.doWriteTo(GroovyPageWritable.java:145)
2022-12-02_15:22:49.33751 at org.grails.gsp.GroovyPageWritable.writeTo(GroovyPageWritable.java:82)
2022-12-02_15:22:49.33751 at org.grails.web.servlet.view.GroovyPageView.renderTemplate(GroovyPageView.java:76)
2022-12-02_15:22:49.33752 at org.grails.web.servlet.view.AbstractGrailsView.renderWithinGrailsWebRequest(AbstractGrailsView.java:71)
2022-12-02_15:22:49.33753 at org.grails.web.servlet.view.AbstractGrailsView.renderMergedOutputModel(AbstractGrailsView.java:55)
2022-12-02_15:22:49.33754 at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:316)
2022-12-02_15:22:49.33754 at grails.artefact.controller.support.ResponseRenderer$Trait$Helper.renderViewForTemplate(ResponseRenderer.groovy:616)
2022-12-02_15:22:49.33755 at grails.artefact.controller.support.ResponseRenderer$Trait$Helper.render(ResponseRenderer.groovy:355)
2022-12-02_15:22:49.33756 at grails.artefact.controller.support.ResponseRenderer$Trait$Helper$render$2.call(Unknown Source)
2022-12-02_15:22:49.33756 at com.morpheus.admin.PluginsController.render(PluginsController.groovy)
2022-12-02_15:22:49.33757 at grails.artefact.controller.support.ResponseRenderer$render.callCurrent(Unknown Source)
2022-12-02_15:22:49.33759 at com.morpheus.admin.PluginsController.update(PluginsController.groovy:108)
2022-12-02_15:22:49.33760 at org.grails.core.DefaultGrailsControllerClass$MethodHandleInvoker.invoke(DefaultGrailsControllerClass.java:223)
2022-12-02_15:22:49.33761 at org.grails.core.DefaultGrailsControllerClass.invoke(DefaultGrailsControllerClass.java:188)
2022-12-02_15:22:49.33762 at org.grails.web.mapping.mvc.UrlMappingsInfoHandlerAdapter.handle(UrlMappingsInfoHandlerAdapter.groovy:90)
...
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with views/admin/integrations/plugins/_edit.gsp and views/templates/_optionTypes.gsp and _optionType.gsp, then trace OptionSourceService.datadogApiEndpoints() and PluginsController.update. Reproduce the disabled-plugin configuration modal failure; done means the modal no longer hangs and the plugin can be re-enabled from the UI.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy, java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100