Skip to content

Embed: Add link to embedded panels to go to logs page

Goal

Add the View Logs link in the embed.

Screen_Shot_2020-02-03_at_1.50.15_PM

It could simply link to the current time range if none is defined.

Technical Implementation

The embed component should have access to some dashboard information, including the logsPath, this would enable this feature.

backend

The endpoint to load dashboard information should return additional data such as the one in https://gitlab.com/gitlab-org/gitlab/blob/a23dea74967acf609c090f7786e760ed25782d5d/app/helpers/environments_helper.rb#L20

More details here: #201846 (comment 284468161)

frontend

The embed should display the logs link.

Original Discussion

The following discussion from !24240 (merged) should be addressed:

  • @mrincon started a discussion: (+2 comments)

    @nadia_sotnikova @dhershkovitch Do you think we should add the logs link in the embed functionality? There is not technical impediment to having it.

    It could simply link to the current time range if none is defined.

Edited by Miguel Rincon