-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AAP-30986: Support deletion of WCA API_KEY from Admin Portal (Frontend) #1333
Conversation
|
@@ -10,9 +10,11 @@ | |||
"APIKey": "IBM Cloud API Key", | |||
"APIKeyTooltip": "Used to authenticate with IBM watsonx Code Assistant.", | |||
"APIKeyDescription": "The API Key for IBM watsonx Code Assistant.", | |||
"APIKeyDeletionConfirmation": "Are you sure you want to delete your IBM Cloud API Key?", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am going to ask about this text to Marty once I start the backend part. For now since we dont see it, pls ignore the product owner approval. I will get the related approvals.
Hi @mabulgu I had a quick look. Was you planning on writing tests too? I also note that the JIRA states:
I don't see anything in your mocked backend to support this... it might be that you need to combine the two mock backends into a single file so that "Key deletion" can access "Model" for the origanisation:
Let me know your answers then I'll review this PR. |
@manstis I implemented the key -model id deletion relation |
Code coverage complains because there is no tests for the parts that I not fully comemnted. I changed the strategy by making the delete button hidden so that I can make it visible and run tests against it. Working on this right now. jfyi |
|
@manstis ready for another round of review |
93a1824
to
538ef2b
Compare
My Failure case aims a 404 error but I realized in the backend we do return 400 for those. Those changes will be included in my backend PR so please consider them as 404 for now. JFYI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good @mabulgu
A few comments that should probably be addressed.
ansible_ai_connect_admin_portal/config/webpack.mock.api.keys.modelids.ts
Outdated
Show resolved
Hide resolved
ansible_ai_connect_admin_portal/src/ModelSettingsKeyDeletionModal.tsx
Outdated
Show resolved
Hide resolved
For a "successful" operation with no content (i.e. DELETE) a 204 may be best. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Thanks @mabulgu
Thanks @manstis for your help and reviews! |
Jira Issue: https://issues.redhat.com/browse/AAP-30986
Description
Please see the Jira issue for details. Note that this issue splitted into two: frontend & backend. This PR includes the FE changes work.
Testing
Follow the following steps. Do not commit anything by mistake as you will need to de-comment some places in the code.
Steps to test
npm start
Open the link in browser tab. This is the mocked mode.npm run test
command to make sure all tests pass.Scenarios tested
Production deployment