Add title to runner delete error alert

What does this MR do and why?

This change improves the information provided when a runner deletion fails.

Screenshots or screen recordings

Before After
127.0.0.1_3000_admin_runners image

How to set up and validate locally

Create a condition for an error

  1. Change code to ensure the backend produces an error, here I change how the backend handles deletion:
diff --git a/app/graphql/mutations/ci/runner/delete.rb b/app/graphql/mutations/ci/runner/delete.rb
index db68914a4eb0..7261ea8f1f0f 100644
--- a/app/graphql/mutations/ci/runner/delete.rb
+++ b/app/graphql/mutations/ci/runner/delete.rb
@@ -23,7 +23,8 @@ def resolve(id:, **runner_attrs)
         end
 
         def find_object(id)
-          GitlabSchema.find_by_gid(id)
+          nil
+          # GitlabSchema.find_by_gid(id)
         end
       end
     end

Trigger the error

  1. With at least one runner registered, logged in as admin
  2. Visit the Admin -> Runners page
  3. Select the delete button in a runner
  4. Check the error alert at the top of the screen

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #346793 (closed)

Edited by Dan MH

Merge request reports

Loading