Skip to content

Display a star next to `starred` dashboards

Miguel Rincon requested to merge 214582-show-starred-dashboards into master

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

2020-05-11_12.23.11

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

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 🤖

Merge request reports