ui: implement event auto-suggestion in webhook filter tab#13227
ui: implement event auto-suggestion in webhook filter tab#13227saurabhkushwaha438 wants to merge 2 commits into
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache CloudStack community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md)
|
bernardodemarco
left a comment
There was a problem hiding this comment.
@saurabhkushwaha438, thanks for the PR!
I believe that only the changes in the WebhookFiltersTab.vue are required, right?
|
Hi, yes, you are correct. Only the changes in The changes in I have just reverted these files and pushed the updates to keep the PR clean. The PR now contains only the changes in |
UI: Implement Event Auto-Suggestion in Webhook Filter Tab
Problem & Requirement
When adding filters to a webhook, users are required to specify system event types (e.g.,
USER.LOGIN,VM.CREATE). Manually typing these names is prone to typos, resulting in invalid filters.To improve the user experience and prevent configuration errors, the UI should provide an auto-suggestion / autocomplete dropdown list populated with actual system event types fetched from the running CloudStack management server.
Proposed Solution
a-input) in the Webhook Filters tab with an autocomplete component (a-auto-complete).listEventTypesAPI call insideWebhookFiltersTab.vueto fetch the complete list of system-wide event types on component initialization.onSearch) that processes user input and sorts suggestions by relevance:parallel: falseinsideui/vue.config.jsto ensure the compilation executes reliably in resource-constrained containerized or virtual environments (e.g., WSL, CI/CD runners).NODE_OPTIONS=--openssl-legacy-providerand--max-old-space-size=4096to the UI package build scripts to support compiling under modern Node.js environments.Detailed Changes
UI & Component Level
ui/src/components/view/WebhookFiltersTab.vue:<a-input v-model:value="addFilterForm.value" />with<a-auto-complete>.eventTypes(cache for raw API records) andfilteredEventTypes(records currently displayed in the autocomplete dropdown).fetchEventTypes()to query thelistEventTypesAPI, sort them alphabetically, and store them in the local component cache.onSearch()to prioritize prefix matches over contains matches during user input.Environment & Build Level
ui/package.json&ui/package-lock.json:NODE_OPTIONSvariables in thestart,serve, andbuildscripts to allow modern Node.js runtimes to build successfully.ui/vue.config.js:parallel: falsein compilation settings and UglifyJS options to improve compilation stability and prevent thread/heap crashes in resource-bound systems.Verification & Testing Plan
Automated Build Check