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 ftl status output readability #456

Merged
merged 3 commits into from
Oct 5, 2023

Conversation

KendallWeihe
Copy link
Contributor

Added JSON formatting w/ indents & line breaks for the ftl status output -- previously was a giant JSON all on one line

@KendallWeihe
Copy link
Contributor Author

Accidentally closed prior PR b/c renamed branch

This is the active PR now

@KendallWeihe
Copy link
Contributor Author

Also formatted the ftl ps --json per @wesbillman's comment

@@ -27,7 +27,7 @@ func (s *psCmd) Run(ctx context.Context, client ftlv1connect.ControllerServiceCl
return errors.WithStack(err)
}
if s.JSON {
marshaller := jsonpb.Marshaler{}
marshaller := jsonpb.Marshaler{Indent: " "}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one makes sense, but the other two shouldn't be indented, as they're part of a columnar output and indenting them will just corrupt the columns.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah cool, fixed

Copy link
Collaborator

@alecthomas alecthomas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks Kendall!

@alecthomas alecthomas merged commit d8576da into main Oct 5, 2023
@alecthomas alecthomas deleted the kendallw/ftl-status-json-indent branch October 5, 2023 21:27
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