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

Merged

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

github-actions bot commented Nov 21, 2024

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ PYTHON black 992 0 12.77s
✅ PYTHON ruff 988 0 0.1s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

Copy link

github-actions bot commented Nov 21, 2024

Test results

    9 files      9 suites   8m 20s ⏱️
2 143 tests 2 143 ✅ 0 💤 0 ❌
4 025 runs  4 025 ✅ 0 💤 0 ❌

Results for commit 2a3fe46.

♻️ This comment has been updated with latest results.

Copy link

codecov bot commented Nov 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.30%. Comparing base (855819a) to head (2a3fe46).
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3234   +/-   ##
=======================================
  Coverage   60.30%   60.30%           
=======================================
  Files         605      605           
  Lines       43685    43685           
  Branches       48       48           
=======================================
  Hits        26343    26343           
  Misses      17330    17330           
  Partials       12       12           

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

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 😅

@johannaengland johannaengland force-pushed the bugfix/delete-default-dashboard branch from 1162b47 to 6c55c5a Compare November 25, 2024 10:16
Base automatically changed from bugfix/delete-default-dashboard to master November 25, 2024 11:53
Copy link
Member

@lunkwill42 lunkwill42 left a comment

Choose a reason for hiding this comment

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

Yup 👍

@johannaengland johannaengland force-pushed the bugfix/hide-delete-dashboard-button-for-default branch from 9dd0596 to 7a071c4 Compare November 25, 2024 14:50
@johannaengland johannaengland force-pushed the bugfix/hide-delete-dashboard-button-for-default branch from 7a071c4 to 2a3fe46 Compare November 25, 2024 15:31
Copy link

sonarcloud bot commented Nov 25, 2024

@johannaengland johannaengland merged commit 49480a1 into master Nov 26, 2024
13 of 14 checks passed
@johannaengland johannaengland deleted the bugfix/hide-delete-dashboard-button-for-default branch November 26, 2024 07:55
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.

3 participants