Skip to content
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

Conditionally render delete modals #3291

Merged

Conversation

jeff-phillips-18
Copy link
Contributor

@jeff-phillips-18 jeff-phillips-18 commented Oct 2, 2024

Towards RHOAIENG-12117

Description

Update usage of delete modals to render them only when they would be shown rather than having them be rendered but hidden.

How Has This Been Tested?

Run thru the UI and check that delete modals are shown only when they should be shown.

  • From the Data science Projects page.
    • use a kebab menu for a project and select Delete project
    • verify the delete modal is shown
  • From a project details page
    • select the Workbenches tab
    • use a kebab menu for a project and select Delete workbench
    • verify the delete modal is shown
  • From a project details page
    • select the Pipelines tab
    • use the top level kebab menu for a pipeline version and select Delete pipeline server
    • verify the delete modal is shown
  • From a project details page
    • select the Pipelines tab
    • expand a pipeline that has pipeline versions
    • use a kebab menu for a pipeline version and select Delete pipeline version
    • verify the delete modal is shown
  • From a project details page
    • select the Pipelines tab
    • expand a pipeline that has pipeline versions
    • and select a pipeline version
    • from the pipeline version page, use the actions menu and select Delete pipeline version
    • verify the delete modal is shown
  • From a project details page
    • select the Pipelines tab
    • expand a pipeline that has pipeline versions
    • select a pipeline run
    • from the pipeline run page, use thee actions menu and select Delete pipeline version
    • verify the delete modal is shown
  • From a project details page
    • select the Pipelines tab
    • for a that has no pipeline versions, use a kebab menu for the pipeline and select Delete pipeline
    • verify the delete modal is shown
  • From a project details page
    • select the Models tab
    • from a models server in the list, use the kebab menu and select 'Delete model server'
    • verify the delete modal is shown.
  • From a project details page
    • select the Models tab
    • expand the deployed models of a model server
    • from the deployed models list, use the kebab menu and select 'Delete'
    • verify the delete modal is shown.
  • From a project details page
    • select the Cluster storage tab
    • from a connection in the list, use the kebab menu and select 'Delete storage'
    • verify the delete modal is shown.
  • From a project details page
    • select the Connections tab
    • from a connection in the list, use the kebab menu and select 'Delete'
    • verify the delete modal is shown.
  • From a project details page
    • select the Data connections tab
    • from a data connection in the list, use the kebab menu and select 'Delete data connection'
    • verify the delete modal is shown.

Test Impact

Current tests already test the delete modals.

Request review criteria:

Self checklist (all need to be checked):

  • The developer has manually tested the changes and verified that the changes work
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has added tests or explained why testing cannot be added (unit or cypress tests for related changes)

Copy link

codecov bot commented Oct 2, 2024

Codecov Report

Attention: Patch coverage is 69.12442% with 67 lines in your changes missing coverage. Please review.

Project coverage is 84.79%. Comparing base (33ea696) to head (a70692b).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...onfigurationModal/DeleteBiasConfigurationModal.tsx 0.00% 9 Missing ⚠️
...ects/KServeSection/KServeInferenceServiceTable.tsx 11.11% 8 Missing ⚠️
...elServing/screens/global/InferenceServiceTable.tsx 36.36% 7 Missing ⚠️
...ail/data-connections/DeleteDataConnectionModal.tsx 50.00% 7 Missing ⚠️
...ncepts/pipelines/content/PipelineServerActions.tsx 45.45% 6 Missing ⚠️
...s/BiasConfigurationPage/BiasConfigurationTable.tsx 16.66% 5 Missing ⚠️
...ervingRuntimes/DeleteCustomServingRuntimeModal.tsx 63.63% 4 Missing ⚠️
.../ServingRuntimeModal/DeleteServingRuntimeModal.tsx 69.23% 4 Missing ⚠️
frontend/src/pages/projects/pvc/DeletePVCModal.tsx 69.23% 4 Missing ⚠️
...s/projects/screens/projects/DeleteProjectModal.tsx 50.00% 4 Missing ⚠️
... and 4 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3291      +/-   ##
==========================================
- Coverage   84.84%   84.79%   -0.06%     
==========================================
  Files        1307     1307              
  Lines       29238    29245       +7     
  Branches     7902     7913      +11     
==========================================
- Hits        24808    24799       -9     
- Misses       4430     4446      +16     
Files with missing lines Coverage Δ
...cepts/pipelines/EnsureCompatiblePipelineServer.tsx 86.66% <100.00%> (ø)
...epts/pipelines/content/DeletePipelineRunsModal.tsx 90.56% <100.00%> (+0.36%) ⬆️
...ts/pipelines/content/DeletePipelineServerModal.tsx 81.25% <100.00%> (-2.97%) ⬇️
...oncepts/pipelines/content/DeletePipelinesModal.tsx 91.80% <ø> (-1.75%) ⬇️
...tent/pipelinesDetails/pipeline/PipelineDetails.tsx 85.24% <100.00%> (+0.24%) ⬆️
...pelines/content/tables/pipeline/PipelinesTable.tsx 97.50% <100.00%> (+0.13%) ⬆️
...nt/tables/pipelineVersion/PipelineVersionTable.tsx 97.29% <100.00%> (+0.15%) ⬆️
...rc/concepts/pipelines/context/PipelinesContext.tsx 95.65% <100.00%> (-0.14%) ⬇️
.../concepts/trustyai/content/DeleteTrustyAIModal.tsx 71.42% <100.00%> (ø)
...BYONImages/BYONImageModal/DeleteBYONImageModal.tsx 100.00% <100.00%> (ø)
... and 28 more

... and 4 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 33ea696...a70692b. Read the comment docs.

@christianvogt
Copy link
Contributor

/lgtm
/approve

Copy link
Contributor

openshift-ci bot commented Oct 4, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: christianvogt

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Oct 4, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 1ef1c29 into opendatahub-io:main Oct 4, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants