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

Hide "Delete dashboard" button for default dashboard #3234

Open
wants to merge 1 commit into
base: bugfix/delete-default-dashboard
Choose a base branch
from

Conversation

johannaengland
Copy link
Contributor

@johannaengland johannaengland commented Nov 21, 2024

Dependent on #3233. Another potential part of the fix for #3150.

This hides the "Delete dashboard" button for the default dashboard. Up for discussion if this is how we want to prevent the user from trying to delete the default dashboard.

But this is how it is done for the case where the current dashboard is the last dashboard.

Before:
image

After:
image

@johannaengland johannaengland added bug discussion Requires developer feedback/discussion before implementation labels Nov 21, 2024
@johannaengland johannaengland self-assigned this Nov 21, 2024
Copy link

sonarcloud bot commented Nov 21, 2024

Copy link

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ PYTHON black 991 0 12.61s
✅ PYTHON ruff 987 0 0.1s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

Copy link

Test results

    9 files      9 suites   8m 57s ⏱️
2 141 tests 2 141 ✅ 0 💤 0 ❌
4 021 runs  4 021 ✅ 0 💤 0 ❌

Results for commit 9dd0596.

Copy link

codecov bot commented Nov 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.40%. Comparing base (1162b47) to head (9dd0596).

Additional details and impacted files
@@                       Coverage Diff                        @@
##           bugfix/delete-default-dashboard    #3234   +/-   ##
================================================================
  Coverage                            60.40%   60.40%           
================================================================
  Files                                  605      605           
  Lines                                43689    43689           
  Branches                                48       48           
================================================================
  Hits                                 26389    26389           
  Misses                               17288    17288           
  Partials                                12       12           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

Copy link
Contributor

@stveit stveit left a comment

Choose a reason for hiding this comment

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

Discovered one problem: If you are in the settings for a dashboard that can be deleted (so the button is shown), then you change it to become the default dashboard, then the delete button is still there and can be clicked

image

@johannaengland
Copy link
Contributor Author

Discovered one problem: If you are in the settings for a dashboard that can be deleted (so the button is shown), then you change it to become the default dashboard, then the delete button is still there and can be clicked

Ooof, that means I have to look at the javascript code again 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug discussion Requires developer feedback/discussion before implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants