-
Notifications
You must be signed in to change notification settings - Fork 168
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
WIP: Add flags #257
WIP: Add flags #257
Conversation
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
The UI menu could have this structure:
EDIT: Or just have a single page per component and put storage differences in different sections/tabs. |
Are these pages manually created? Not sure what the plan is here. I don't think pre-formatted text output is a good format - it's actually harder to read on the web page than by running the help command in a terminal. We'd need tabular format, either markdown or html. Top level menu item could be Man Pages. Since the left sidebar only supports two levels, the rest of the sub-sections should be in a single md file, and they will show on the right sidebar menu. |
The pages are auto-created by Manually has to be added menu item at the top of each page, we could do that with sed.
We want to publish this on the website for people running on k8s or even docker. There is a benefit having it here folks don't have to download and run to find out jaeger supports something. Any suggestions on the format are welcome. My first objective is to make it work and auto-publish during the release. Once we have that we can reiterate and change the formatting. Sounds good? |
I don't know, I find documentation that I can't actually read way more annoying than having to run a command. With pre-formatted text the flag descriptions are all on one line that you have to scroll horizontally. cobra has man-page output format, I changed the PR to: header := &doc.GenManHeader{
Title: "jaeger-all-in-one",
Section: "3",
}
return doc.GenManTree(cmd, header, "./") and then converted to plain text groff -t -e -mandoc -Tascii jaeger-all-in-one-env.3 | col -bx These are much more readable than the markdown output from cobra. cobra internally can actually produce normal help output with line wrapping, but the setting is private last time I checked. If we could fix that then both help output would be more readable and it would work as pre-formatted text in .md without scrolling |
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
Hi @lucperkins, could you please have a look at how we could improve styling for generated options https://deploy-preview-257--jaegertracing.netlify.com/docs/next-release/jaeger-query/#options? I have found that |
@pavolloffay I think I'd prefer to have all of the CLI stuff on one page. We could create a YAML file that describes all the commands and flags and then generate pretty HTML out of that. I've done this on other sites, for example in the Apache Pulsar documentation. I know that you can generate JSON or YAML from Cobra, but I think that the Jaeger CLI has a small enough surface area that we could keep it updated by hand. |
I think it's a good idea to drive from yaml and just define our own rendering template. This is how YAML from cobra looks:
|
@yurishkuro If you can add separate YAML files for each CLI tool into the |
it's actually multiple YAML files for each binary - one file per "command", e.g. "collector help" vs "collector docs", etc. Example attached. |
@lucperkins the doc files can be generated with docker command. The files will be generated in your current working directory: docker run --rm -it -v "${PWD}:/data" jaegertracing/jaeger-query:latest docs --format=yaml --dir=/data
docker run --rm -it -v "${PWD}:/data" jaegertracing/jaeger-collector:latest docs --format=yaml --dir=/data There are multiple files, each per command e.g.
There is one more complication. This will show flags only for the default storage (cassandra), but we also need to show flags for other storages - elasticsearch, badger. This can be generated via EDIT: alternatively we could filter our storage flags and show only them in separate tabs. |
Signed-off-by: Pavol Loffay <[email protected]>
@lucperkins have a look here https://deploy-preview-257--jaegertracing.netlify.com/docs/next-release/commands/ how I have done the storage "sections". Note also that this is pretty much the default view we get from |
Signed-off-by: Pavol Loffay <[email protected]>
@lucperkins do you want me to create a separate PR with |
Done in #266 |
Updates #250
Signed-off-by: Pavol Loffay [email protected]
TODOs:
See also https://deploy-preview-257--jaegertracing.netlify.com/docs/next-release/jaeger-all-in-one_version/#see-also