Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

fix(ui): SVG icons in status views compatible with Firefox (#11527) #11714

Conversation

proxyconcept
Copy link

  • Replace in XML responses SVG data by SVG url
  • Replace in XSL transformations SVG code by IMG tag
  • Avoid the XSL attribute disable-output-escaping

Refs: #11527
Signed-off-by: Grégory Marigot gmarigot@teicee.com

Description

Some pages in "Monitoring / Status Details" are generated with XML/XSL and contains SVG icons (the SVG code is included as data in the page). But Firefox don't support the "disable-output-escaping" attribute in XSL transformations, so the SVG code is escaped instead of displaying the image.

For a better compatibility, this patch replace the SVG data by IMG tags with the SVG url.

Fixes #11527

Type of change

  • Patch fixing an issue (non-breaking change)
  • New functionality (non-breaking change)
  • Breaking change (patch or feature) that might cause side effects breaking part of the Software

Target serie

  • 21.04.x
  • 21.10.x
  • 22.04.x
  • 22.10.x (master)

How this pull request can be tested ?

  • Log in Centreon with Firefox
  • Go to the "Services by Hostgroup" page ("Monitoring > Status details > Services by HostGroup" )
  • On each line, the SVG icons (chart & view) are well displayed by an IMG tag

Checklist

Community contributors & Centreon team

  • I have followed the coding style guidelines provided by Centreon
  • I have commented my code, especially new classes, functions or any legacy code modified. (docblock)
  • I have commented my code, especially hard-to-understand areas of the PR.
  • I have rebased my development branch on the base branch (master, maintenance).

…11527)

- Replace in XML responses SVG data by SVG url
- Replace in XSL transformations SVG code by IMG tag
- Avoid the XSL attribute disable-output-escaping

Refs: centreon#11527
Signed-off-by: Grégory Marigot <gmarigot@teicee.com>
@proxyconcept proxyconcept requested review from a team, TamazC and wtermellil September 7, 2022 17:17
@sonarqube-decoration
Copy link

SonarQube Quality Gate

Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell B 47 Code Smells

No Coverage information No Coverage information
14.3% 14.3% Duplication

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant