You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "sureshanaparti (via GitHub)" <gi...@apache.org> on 2025/07/30 16:52:44 UTC
[PR] [UI] Use GET request method for list API calls [cloudstack]
sureshanaparti opened a new pull request, #11354:
URL: https://github.com/apache/cloudstack/pull/11354
### Description
This PR updates UI to use GET request method for list API calls.
<!--- Describe your changes in DETAIL - And how has behaviour functionally changed. -->
<!-- For new features, provide link to FS, dev ML discussion etc. -->
<!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. -->
<!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be closed when this PR gets merged -->
<!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
<!-- Fixes: # -->
<!--- ******************************************************************************* -->
<!--- NOTE: AUTOMATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE DOCUMENTATION. -->
<!--- PLEASE PUT AN 'X' in only **ONE** box -->
<!--- ******************************************************************************* -->
### Types of changes
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] Enhancement (improves an existing feature and functionality)
- [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
- [ ] build/CI
- [ ] test (unit or integration test code)
### Feature/Enhancement Scale or Bug Severity
#### Feature/Enhancement Scale
- [ ] Major
- [ ] Minor
#### Bug Severity
- [ ] BLOCKER
- [ ] Critical
- [ ] Major
- [x] Minor
- [ ] Trivial
### Screenshots (if appropriate):
### How Has This Been Tested?
Verified the request method (in browser's inspect window) of some list API calls from the CloudStack UI.
<!-- Please describe in detail how you tested your changes. -->
<!-- Include details of your testing environment, and the tests you ran to -->
#### How did you try to break this feature and the system with this change?
<!-- see how your change affects other areas of the code, etc. -->
<!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) document -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [UI] Use GET request method for list API calls [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #11354:
URL: https://github.com/apache/cloudstack/pull/11354#issuecomment-3137479001
@sureshanaparti a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [UI] Use GET request method for list API calls [cloudstack]
Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on code in PR #11354:
URL: https://github.com/apache/cloudstack/pull/11354#discussion_r2243427321
##########
ui/src/api/index.js:
##########
@@ -23,6 +23,19 @@ import {
ACCESS_TOKEN
} from '@/store/mutation-types'
+const getAPICommandsRegex = /^(get|list|query|find)\w+$/i
+const addlGetAPICommandsList = [
Review Comment:
sry, it's for additional get api list, will update to _otherGetAPICommandsList_, fine @nvazquez ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [UI] Use GET request method for list API calls [cloudstack]
Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on code in PR #11354:
URL: https://github.com/apache/cloudstack/pull/11354#discussion_r2243574507
##########
ui/src/api/index.js:
##########
@@ -23,6 +23,19 @@ import {
ACCESS_TOKEN
} from '@/store/mutation-types'
+const getAPICommandsRegex = /^(get|list|query|find)\w+$/i
+const addlGetAPICommandsList = [
Review Comment:
@Pearl1594 all these additional APIs are the read calls from DB or the configuration (added regex for regular list/get cmds, these doesn't match with regular list, so, added them as additional). I've checked the execute() calls of these API cmds while working on this - https://github.com/apache/cloudstack/pull/10899.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [UI] Use GET request method for list API calls [cloudstack]
Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti merged PR #11354:
URL: https://github.com/apache/cloudstack/pull/11354
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [UI] Use GET request method for list API calls [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #11354:
URL: https://github.com/apache/cloudstack/pull/11354#issuecomment-3138528625
@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [UI] Use GET request method for list API calls [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #11354:
URL: https://github.com/apache/cloudstack/pull/11354#issuecomment-3137522294
UI build: :heavy_check_mark:
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/11354 (QA-JID-709)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [UI] Use GET request method for list API calls [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #11354:
URL: https://github.com/apache/cloudstack/pull/11354#issuecomment-3137189423
UI build: :heavy_check_mark:
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/11354 (QA-JID-707)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [UI] Use GET request method for list API calls [cloudstack]
Posted by "nvazquez (via GitHub)" <gi...@apache.org>.
nvazquez commented on code in PR #11354:
URL: https://github.com/apache/cloudstack/pull/11354#discussion_r2243440496
##########
ui/src/api/index.js:
##########
@@ -23,6 +23,19 @@ import {
ACCESS_TOKEN
} from '@/store/mutation-types'
+const getAPICommandsRegex = /^(get|list|query|find)\w+$/i
+const addlGetAPICommandsList = [
Review Comment:
Or maybe also: `additionalGetAPICommandsList`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [UI] Use GET request method for list API calls [cloudstack]
Posted by "Pearl1594 (via GitHub)" <gi...@apache.org>.
Pearl1594 commented on PR #11354:
URL: https://github.com/apache/cloudstack/pull/11354#issuecomment-3137372408
code lgtm - just have a query regarding the list of additional APIs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [UI] Use GET request method for list API calls [cloudstack]
Posted by "nvazquez (via GitHub)" <gi...@apache.org>.
nvazquez commented on code in PR #11354:
URL: https://github.com/apache/cloudstack/pull/11354#discussion_r2243439173
##########
ui/src/api/index.js:
##########
@@ -23,6 +23,19 @@ import {
ACCESS_TOKEN
} from '@/store/mutation-types'
+const getAPICommandsRegex = /^(get|list|query|find)\w+$/i
+const addlGetAPICommandsList = [
Review Comment:
Ahh sure @sureshanaparti, I thought it was a typo 👍🏼
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [UI] Use GET request method for list API calls [cloudstack]
Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on PR #11354:
URL: https://github.com/apache/cloudstack/pull/11354#issuecomment-3137477688
@blueorangutan ui
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [UI] Use GET request method for list API calls [cloudstack]
Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on PR #11354:
URL: https://github.com/apache/cloudstack/pull/11354#issuecomment-3137132552
@blueorangutan ui
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [UI] Use GET request method for list API calls [cloudstack]
Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on code in PR #11354:
URL: https://github.com/apache/cloudstack/pull/11354#discussion_r2243461289
##########
ui/src/api/index.js:
##########
@@ -23,6 +23,19 @@ import {
ACCESS_TOKEN
} from '@/store/mutation-types'
+const getAPICommandsRegex = /^(get|list|query|find)\w+$/i
+const addlGetAPICommandsList = [
Review Comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [UI] Use GET request method for list API calls [cloudstack]
Posted by "nvazquez (via GitHub)" <gi...@apache.org>.
nvazquez commented on code in PR #11354:
URL: https://github.com/apache/cloudstack/pull/11354#discussion_r2243413310
##########
ui/src/api/index.js:
##########
@@ -23,6 +23,19 @@ import {
ACCESS_TOKEN
} from '@/store/mutation-types'
+const getAPICommandsRegex = /^(get|list|query|find)\w+$/i
+const addlGetAPICommandsList = [
Review Comment:
```suggestion
const addGetAPICommandsList = [
```
##########
ui/src/api/index.js:
##########
@@ -64,6 +77,12 @@ export function postAPI (command, data = {}) {
})
}
+export function callAPI (command, args = {}) {
+ const isGetAPICommand = getAPICommandsRegex.test(command) || addlGetAPICommandsList.includes(command.toLowerCase())
Review Comment:
```suggestion
const isGetAPICommand = getAPICommandsRegex.test(command) || addGetAPICommandsList.includes(command.toLowerCase())
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [UI] Use GET request method for list API calls [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #11354:
URL: https://github.com/apache/cloudstack/pull/11354#issuecomment-3137135363
@sureshanaparti a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [UI] Use GET request method for list API calls [cloudstack]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #11354:
URL: https://github.com/apache/cloudstack/pull/11354#issuecomment-3137304740
## [Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/11354?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 18.15%. Comparing base ([`86827f8`](https://app.codecov.io/gh/apache/cloudstack/commit/86827f871d24def41c5c8cf6d8b7bad910979a55?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`dd2881e`](https://app.codecov.io/gh/apache/cloudstack/commit/dd2881e4cdca2b228ae8cdf211769026efee75c1?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 47 commits behind head on main.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## main #11354 +/- ##
============================================
+ Coverage 17.17% 18.15% +0.98%
- Complexity 14985 15007 +22
============================================
Files 5869 5433 -436
Lines 521590 486135 -35455
Branches 63485 57054 -6431
============================================
- Hits 89562 88264 -1298
+ Misses 421962 387973 -33989
+ Partials 10066 9898 -168
```
| [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/11354/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [uitests](https://app.codecov.io/gh/apache/cloudstack/pull/11354/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [unittests](https://app.codecov.io/gh/apache/cloudstack/pull/11354/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `18.15% <ø> (+<0.01%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/cloudstack/pull/11354?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [UI] Use GET request method for list API calls [cloudstack]
Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on PR #11354:
URL: https://github.com/apache/cloudstack/pull/11354#issuecomment-3137308655
@blueorangutan ui
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [UI] Use GET request method for list API calls [cloudstack]
Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on code in PR #11354:
URL: https://github.com/apache/cloudstack/pull/11354#discussion_r2243574507
##########
ui/src/api/index.js:
##########
@@ -23,6 +23,19 @@ import {
ACCESS_TOKEN
} from '@/store/mutation-types'
+const getAPICommandsRegex = /^(get|list|query|find)\w+$/i
+const addlGetAPICommandsList = [
Review Comment:
@Pearl1594 all these additional APIs are the read calls from DB or the configuration (added them as additional - added regex for regular list/get cmds, these doesn't match with regular list). I've checked the execute() calls of these API cmds while working on this - https://github.com/apache/cloudstack/pull/10899.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [UI] Use GET request method for list API calls [cloudstack]
Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on code in PR #11354:
URL: https://github.com/apache/cloudstack/pull/11354#discussion_r2243427321
##########
ui/src/api/index.js:
##########
@@ -23,6 +23,19 @@ import {
ACCESS_TOKEN
} from '@/store/mutation-types'
+const getAPICommandsRegex = /^(get|list|query|find)\w+$/i
+const addlGetAPICommandsList = [
Review Comment:
sry, it's for additional get api list, will update to _otherGetAPICommandsList_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [UI] Use GET request method for list API calls [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #11354:
URL: https://github.com/apache/cloudstack/pull/11354#issuecomment-3138639531
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 14482
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [UI] Use GET request method for list API calls [cloudstack]
Posted by "Pearl1594 (via GitHub)" <gi...@apache.org>.
Pearl1594 commented on code in PR #11354:
URL: https://github.com/apache/cloudstack/pull/11354#discussion_r2243518891
##########
ui/src/api/index.js:
##########
@@ -23,6 +23,19 @@ import {
ACCESS_TOKEN
} from '@/store/mutation-types'
+const getAPICommandsRegex = /^(get|list|query|find)\w+$/i
+const addlGetAPICommandsList = [
Review Comment:
@sureshanaparti could you please explain how did we get this list of additional APIs?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [UI] Use GET request method for list API calls [cloudstack]
Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on PR #11354:
URL: https://github.com/apache/cloudstack/pull/11354#issuecomment-3138527518
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org