Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve layout of test details window #239

Merged
merged 7 commits into from
Jul 24, 2024

Conversation

jan-cerny
Copy link
Member

  • make the layout more compact to show all related data at a single
    place
  • For OVAL objects, create a table where each child element is
    represented as a table row
  • OVAL object child elements tag name is shown as first column in the row
  • OVAL object child elements text data shown as second column in the row
  • OVAL object child elements attributes are shown as labels
  • OVAL states and OVAL variables are presented in a similar way
    as OVAL objects as described above
  • make sure the test details window is standalone

Any suggestions are welcome. I would appreciate advice on the classes of the HTML elements. Feel free to come up with layout suggestions. I'm also interested in you experience in more complex OVAL tests. Please try it out and report back.

This function adds a new row to the given table body. The row contains
2 columns, the first column is a bold text and the second column
is a normal text. A HTML element can be put instead of a text into
the second column. The purpose of the function is to facilitate
displaying key-value data pairs in HTML tables.
- make the layout more compact to show all related data at a single
  place
- For OVAL objects, create a table where each child element is
  represented as a table row
- OVAL object child elements tag name is shown as first column in the row
- OVAL object child elements text data shown as second column in the row
- OVAL object child elements attributes are shown as labels
- OVAL states and OVAL variables are presented in a similar way
  as OVAL objects as described above
- make sure the test details window is standalone
@jan-cerny
Copy link
Member Author

One big problem with this PR that I found is that now it doesn't show the direct child elements of local_variable elements (eg. arithmetic, time_difference) and it jumps directly to grandchildren elements (eg. object_component, literal_component).

In the current main branch it is also not ideal but there is at least the tag name printed.

I think the name of the direct child element should be a special row in the "OVAL variable" table. It's also important to add their attributes because for example the arithmetic element has the arithmetic operation in the arithmetic_operation attribute.

The UUID is important to distinguish between two items of the same name
stored in an internal directory. But it shouldn't be disaplayed to
the user.
This change will cause that elements like `<set>` and OVAL variable
child elements (`<count>`, `<arithmetic>`, `<time_difference>`) will
be displayed in the HTML report.
It's important to add attributes of these elements because they are
significant for understanding the operation performed. For example, the
arithmetic element has the arithmetic operation in the
arithmetic_operation attribute.  This commit also simplifies the
generator code.
@matusmarhefka
Copy link
Member

LGTM, I reviewed the code changes and tested it on the latest Fedora.

@jan-cerny
Copy link
Member Author

One big problem with this PR that I found is that now it doesn't show the direct child elements of local_variable elements (eg. arithmetic, time_difference) and it jumps directly to grandchildren elements (eg. object_component, literal_component).

In the current main branch it is also not ideal but there is at least the tag name printed.

I think the name of the direct child element should be a special row in the "OVAL variable" table. It's also important to add their attributes because for example the arithmetic element has the arithmetic operation in the arithmetic_operation attribute.

this is solved in the 2 latest comments

@jan-cerny
Copy link
Member Author

I think that more visual improvements should be done in a separate PR to not increase the size of this PR.

@matusmarhefka matusmarhefka merged commit dffe2fe into OpenSCAP:main Jul 24, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants