Skip to content

Stop creating HTML content programatically #236

@jan-cerny

Description

@jan-cerny

Is your feature request related to a problem? Please describe.
Some parts of the HTML content are created by the JavaScript code. Namely, the tables and other HTML content in the "Show test details" section are created by instating elements and attributes by calling JavaScript functions.

Please see openscap_report/report_generators/html_templates/js/oval_graph_generation_script.js, for example

function generate_OVAL_state(test_info, oval_state, div, off_heading=false) {


This approach is tedious, laborious, hard to orient in and difficult to maintain. Moreover, it mixes a definition of the presentation layout with data processing.

Describe the solution you'd like
It would be great to employ Jinja 2 templates here or some other "templating" technology.

Describe alternatives you've considered
I haven't considered any alternatives yet. But I'm open to any proposals or suggestions.

Additional context
None

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions