Skip to content

Remove unused classes in Audit events and Alert details

What does this MR do and why?

Some CSS classes on tables were not actually doing anything / were causing inconsistent border colors. This MR cleans them up so we use default Pajamas styles.

Changelog: changed

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Before After Comment
Audit_events_before Audit_events_after No changes
Alert_details_before Alert_details_after Border colors are now consistent

How to set up and validate locally

Audit events

  1. Go to any Project / Group / Admin area.
  2. Navigate to Secure > Audit events. If it's empty, try another project / group or the admin area.

Alert details

  1. Go to Monitor > Incidents. For example, http://127.0.0.1:3000/gitlab-org/gitlab-test/-/incidents
  2. Create an incident and open it. For example, http://127.0.0.1:3000/gitlab-org/gitlab-test/-/issues/incident/50.
  3. Apply the following diff and select the Alert details tab to view the table:
diff --git a/app/assets/javascripts/issues/show/components/incidents/incident_tabs.vue b/app/assets/javascripts/issues/show/components/incidents/incident_tabs.vue
index 3f516db4995c..107136d27cef 100644
--- a/app/assets/javascripts/issues/show/components/incidents/incident_tabs.vue
+++ b/app/assets/javascripts/issues/show/components/incidents/incident_tabs.vue
@@ -160,7 +160,7 @@ export default {
         <incident-metric-tab />
       </gl-tab>
       <gl-tab
-        v-if="hasLinkedAlerts"
+        v-if="true"
         class="alert-management-details"
         :title="$options.i18n.alertsTitle"
         data-testid="alert-details-tab"
diff --git a/app/assets/javascripts/vue_shared/components/alert_details_table.vue b/app/assets/javascripts/vue_shared/components/alert_details_table.vue
index 3e6f272d9f28..7627e1040594 100644
--- a/app/assets/javascripts/vue_shared/components/alert_details_table.vue
+++ b/app/assets/javascripts/vue_shared/components/alert_details_table.vue
@@ -63,6 +63,8 @@ export default {
   ],
   computed: {
     items() {
+      return [{ fieldName: 'title', value: 'this.alert?.title' }];
+
       if (!this.alert) {
         return [];
       }

Related to #362362 (closed)

Edited by Justin Ho Tuan Duong

Merge request reports

Loading