Skip to content

Fetch Grafana Auth via GraphQL

What does this MR do?

Overview

Recently we added a form with a grafana authorization panel where one can store grafana auth details like a token and a url. That form is located under a Projects > Settings > Operations > Grafana Authentication. This data is used to unfurl grafana links into charts with an issue description.

As part of that work the grafana integration model was exposed to the front end

This MR adds the ability to query this data to the graphql api.

Part of #35195 (closed)

Technical overview

The user should be able to query a for a grafanaIntegration like so:

query {
  project(fullPath: "h5bp/html5-boilerplate") {
    id,
    grafanaIntegration {
      grafanaUrl,
      token,
      enabled,
      createdAt,
      updatedAt,
    }
  }
}

and they should only be able to return grafanaIntegration data if they have :admin_operations abilities for the project they nest grafanaIntegration under. This is accomplished through a policy that delegates to the project.

Screenshots

Screen_Shot_2019-12-19_at_11.27.44_AM

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Allison Browne

Merge request reports