-
Notifications
You must be signed in to change notification settings - Fork 418
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
Add column 'level' to display which field is core/extended #149
Conversation
Folks, here's the URL to browse this PR as if it was pushed to master, to look at the readme and use cases: https://github.com/webmat/ecs/blob/level-scripts |
About the caveat, I'd be inclined to open a GH issue and get this resolved when we get back to having a use case or an ECS field that's multi_fields. WDYT? |
Link to browse above is incorrect. Use this one to view the rendered readme: https://github.com/webmat/ecs/tree/level-scripts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like Examples are not shown anymore with this change?
scripts/helper.py
Outdated
@@ -137,7 +134,7 @@ def get_markdown_table(namespace, title_prefix="##", link=False): | |||
# Replaces one newlines with two as otherwise double newlines do not show up in markdown | |||
output += namespace["description"].replace("\n", "\n\n") + "\n" | |||
|
|||
titles = ["Field", "Description", "Type", "Multi Field", "Example"] | |||
titles = ["Field", "Level", "Description", "Type", "Multi Field", "Example"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would put the level after the Type.
As we don't have multi fields anymore, we can remove the multi field part? Or should we keep it just in case. Not related to this PR but stumbled over it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree level at column 2 is not ideal.
However putting level after type puts it between type and multi-field, which are closely related. I'll try with level just before type instead, and let's see how this looks.
scripts/schemas.py
Outdated
@@ -95,12 +95,14 @@ def check_fields(fields): | |||
|
|||
check_fields(sortedNamespaces) | |||
|
|||
# Generates html for README |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It creates Markdown not HTML :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha true :-)
@ruflin This is ready for a review. And I'd like your opinion on the caveat for the PR as it stands (see PR description) |
You're right about the examples, damn! Not sure how I missed that :-)
|
@ruflin Ready for another review. The two issues (and incorrect comment) are fixed: https://github.com/webmat/ecs/blob/level-scripts/README.md#-base-fields However here's an experiment I made at the same time:
I find this to be much more readable, check it out here: https://github.com/webmat/ecs/blob/level-tbl-display-experiment/README.md#-base-fields Unless you have reservations about this, I would really like to move to this representation. |
I agree variable column width is not optimal but as already the first column is variable I would rather focus on the importance of the information in ordering it. For me priority is:
Then somewhere much later comes
So I would definitively keep the order of the first 3. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm good with the change as is to get it in. We can still rearrange columns in a follow up PR.
Also in this PR
phase
, which was no longer usedwrite_stdout()
, to improve readabilitykeyword
host.hostname
renameCaveat:
if there's a
multi_fields
anywhere. This is true whether the mf is onlyin the use case (e.g. a customization) or in cases where the field is both in
ECS and in the use case.
time this isn't a blocker. We'll need to fix this bug before adding any multi-fields,
however.
Partially addresses #93