Display a star next to `starred` dashboards
What does this MR do?
frontend implementation of #214582 (closed)
Display a star next to starred
dashboards: when dashboards are fetched with a new starred
property, they are displayed with an icon indicating they have been starred.
Note: This change does not involve a direct change for users, so no changelog is added yet.
Local Testing
backend for starring the dashboard has not been merged, but it is in progress at: !31059 (diffs)
But this change is backwards compatible! And we can test it ourselves:
1. Have multiple dashboards defined
2. Make a small change in the code
Change in mutations for testing:
diff --git a/app/assets/javascripts/monitoring/stores/mutations.js b/app/assets/javascripts/monitoring/stores/mutations.js index c4c15993aa0..f49f84aa528 100644 --- a/app/assets/javascripts/monitoring/stores/mutations.js +++ b/app/assets/javascripts/monitoring/stores/mutations.js @@ -165,6 +165,11 @@ export default { state.emptyState = 'noData'; }, [types.SET_ALL_DASHBOARDS](state, dashboards) { + // TODO Remove this + dashboards[1].starred = true; + dashboards[3].starred = true; + // END TODO Remove this + state.allDashboards = dashboards || []; }, [types.SET_SHOW_ERROR_BANNER](state, enabled) {
3. Visit Operations -> Metrics.
Screenshots
Considering filtered by search
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry
- [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
- [-] Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Edited by 🤖 GitLab Bot 🤖