Uninett / nav

Network Administration Visualized
GNU General Public License v3.0
194 stars 39 forks source link

Hide "Delete dashboard" button for default dashboard #3234

Closed johannaengland closed 1 day ago

johannaengland commented 6 days ago

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

github-actions[bot] commented 6 days ago

πŸ¦™ 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_

github-actions[bot] commented 6 days ago

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 2a3fe465.

:recycle: This comment has been updated with latest results.

codecov[bot] commented 6 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

johannaengland commented 5 days ago

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 :sweat_smile:

sonarcloud[bot] commented 2 days ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud