Skip to content

Resolve "Add GitLab metadata to the Package Registry UI"

What does this MR do?

As per #33596 (comment 268569389), this adds some pipeline information to the package details page if the package was created via a pipeline.

The initial package detail information is passed via haml into the Vue component but the pipeline information is an additional API call that is triggered by a Vuex action.

As part of this MR, I've added Vuex to the package details app but I have not refactored all the components to support this. The MR was already pretty big, so I've only added Vuex where it made sense for fetching and displaying the pipeline info. My plan is a follow up MR that will extend the use of Vuex to all components where it will be beneficial.

Please feel free to disagree with this approach if you don't think it's a suitable plan.

Also note: some of the links are generated on the frontend because the API response doesn't seem to include them. I'm not sure if they will pass review but I've left them in for now.

For it how it works:

  • The pipelines info will only be fetched if a build_info property exists and this contains a pipeline_id.
  • If this doesn't exist, then nothing will display and no api requests are made.
  • If the pipeline api call is successful, we display the returned info as per the below screenshots.
  • If the pipeline api call is not successful, we display an error message.

Screenshots

Static:

Screenshot_2020-01-08_at_10.53.40

Gif:

pipeline

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 Nick Kipling

Merge request reports