Skip to content
Commit 57fce80e authored by Ed Tanous's avatar Ed Tanous Committed by Ed Tanous
Browse files

Improve JSON->HTML conversion



The existing JSON to html conversion is quite unfortunate, as it runs
several very expensive regular expressions on an output to properly
invoke the correct behavior, and to escape things like links.  This
patchset adjusts the behavior to directly dump the tree to HTML,
skipping the json step entirely.

Most of the code was pulled from the nlohmann::serializer class.

Small side node:
This also resolves the CSP issue with the inline CSS classes that are
currently embedded in the json UI.

Note, in terms of user facing behavior, this finally fixes the CSS
issue, so the div is now centered as designed.  Previously it was left
justified.

Tested:
Ran several redfish schemas and compared to old ones.  Output appears
the same in the window, and content security policy warnings are gone.
Verified several links works as expected, and verified the behavior of
all base types, as well as empty arrays and empty objects.  All appear
to work correctly.

Signed-off-by: Ed Tanous's avatarEd Tanous <ed@tanous.net>
Change-Id: Id9bf6dc33acb1603f009de4cd322e81d83f334be
parent bbf1a93e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment