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

disable delete application button when application does contain i… #2309

Merged
merged 7 commits into from
Jun 29, 2023
Merged

disable delete application button when application does contain i… #2309

merged 7 commits into from
Jun 29, 2023

Conversation

sumitshinde-84
Copy link
Contributor

@sumitshinde-84 sumitshinde-84 commented Jun 16, 2023

Description

i have disabled delete application button when application contain instances
and also show message when application contain instances Once you delete all your instances of this application, you can delete this application

when_not_contain_instance

and if application does not contain instances button will be enabled and this message will be show Once deleted, your application and all its instances are permanently deleted. This cannot be undone.

normal

Related Issue(s)

closes #2300

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on flowforge/helm to update ConfigMap Template
    • Issue/PR raised on flowforge/CloudProject to update values for Staging/Production

Labels

  • Backport needed? -> add the backport label
  • Includes a DB migration? -> add the area:migration label

@sumitshinde-84 sumitshinde-84 changed the title disable delete application button when application does not contain i… disable delete application button when application does contain i… Jun 17, 2023
@sumitshinde-84
Copy link
Contributor Author

sumitshinde-84 commented Jun 20, 2023

Hii @knolleary @joepavitt can you please review my PRs #2310 , #2309

@knolleary knolleary self-requested a review June 20, 2023 09:33
@joepavitt
Copy link
Contributor

joepavitt commented Jun 22, 2023

@knolleary just noticed that our automated E2E tests don't seem to be running on this PR? I'm guessing it's because the source is outside of our repo, although I thought it had been configured to run on any PR targeting main

@sumitshinde-84 as part of our criteria for accepting PRs, we do also request test coverage, for this, we do already have a very similar test in place line 188 in /test/e2e/frontend/cypess/tests/application.spec.js. Having a similar test to that, which assured the button was in fact disabled when the instance count is > 0 would round this PR off quite nicely.

Thanks again for your work on this.

If you're new to Cypress, you can also check out our little guide here on getting the E2E tests running locally: https://flowforge.com/handbook/development/frontend/testing/#e2e-integration-tests

@knolleary
Copy link
Member

@joepavitt the frontend tests have run:

https://github.com/flowforge/flowforge/actions/runs/5343489008/jobs/9686645016?pr=2309

image

@sumitshinde-84
Copy link
Contributor Author

hii @joepavitt can you please review this pull request , i have added test in same branch now as you suggested.

Copy link
Contributor

@joepavitt joepavitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @sumitshinde-84 - approved and merged

@joepavitt joepavitt merged commit 8e9e7b4 into FlowFuse:main Jun 29, 2023
@sumitshinde-84
Copy link
Contributor Author

Thank you so much, @joepavitt, for merging the PR! I'm incredibly grateful for the opportunity to contribute to Flow Forge alongside their amazing team. The work environment here is simply inspiring, and I genuinely wish to be a part of it. Thank you again for this wonderful experience!

@sumitshinde-84 sumitshinde-84 deleted the DEVELOPE branch June 29, 2023 13:23
@sumitshinde-84
Copy link
Contributor Author

sumitshinde-84 commented Jun 29, 2023

@joepavitt We have another PR, #2348 , that is in need of a review. If you could spare a moment to take a look at it, I would greatly appreciate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UI: Disable delete button if it won't work
3 participants