Skip to content

Post Process Status Page Images

Allison Browne requested to merge ab-205166-post-process-status-page-images into master

What does this MR do?

The Status Page feature serialized issues as incidents that are sent to s3 where they are rendered as a static website

As part of supporting incident images we need to upload all images to s3 and ensure that the html that is sent over via json files points at the images according to the html spec.

In another MR I move all uploads in an incident to a given location on the status page.

In this MR I establish a custom pipeline for status page that inherits from the standard post process pipeline and adds the StatusPage::ImageFilter. Since the status page is not in need of Lazy Loading we remove the 'lazy' class from image tags and point the src to the path where we will be uploading the image. Lazy loaded images use data-src instead of src, we delete this attribute since it will not be used. We also change the source on the surrounding hyperlink tag.

Although it may be simpler to remove the existing Lazy load manipulations from a full pipeline we wanted to take advantage of the cached html for performance reasons, so we went with all manipulations to the html within the post process pipeline.

It may also be helpful to view this larger MR which I split this off of: !28052 (closed)

Screenshots

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 Allison Browne

Merge request reports