Post Process Status Page Images
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
- [-] Changelog entry
- [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
- [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
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