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

Add scrolling to table, use table widget for support bundle #244

Merged
merged 3 commits into from Aug 13, 2020

Conversation

GraysonNull
Copy link
Contributor

No description provided.

@GraysonNull GraysonNull changed the title Grayson termui scrolling Add scrolling to table, use table widget for support bundle Aug 13, 2020
Copy link

@codelingo codelingo bot left a comment

Choose a reason for hiding this comment

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

LGTM.

Copy link
Member

@marccampbell marccampbell left a comment

Choose a reason for hiding this comment

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

@GraysonNull Can you attach a couple of screenshots showing the previous and the new terminal UI here for review?

return lines
}

// func drawGrid(analyzeResults []*analyzerunner.AnalyzeResult) {
Copy link
Member

Choose a reason for hiding this comment

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

What's this unused block for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh shoot, nothing. Just need to remove it

func showSaved(filename string) {
termWidth, termHeight := ui.TerminalDimensions()

savedMessage := widgets.NewParagraph()
savedMessage.Text = fmt.Sprintf("Preflight results saved to\n\n%s", filename)
savedMessage.Text = fmt.Sprintf("Support Bundle analysis results saved to\n\n%s", filename)
Copy link
Member

Choose a reason for hiding this comment

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

nice catch

@@ -198,3 +316,19 @@ func save(analyzeResults []*analyzerunner.AnalyzeResult) (string, error) {

return filename, nil
}

func appName(supportBundleName string) string {
Copy link
Member

Choose a reason for hiding this comment

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

This function looks to be copied from elsewhere? Should we move it to a shared package and use the same implementation?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is yes. Yep I can move it.

Copy link

@codelingo codelingo bot left a comment

Choose a reason for hiding this comment

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

LGTM.

@GraysonNull
Copy link
Contributor Author

@GraysonNull GraysonNull merged commit 20e82be into replicatedhq:master Aug 13, 2020
@GraysonNull GraysonNull deleted the grayson-termui-scrolling branch August 13, 2020 17:49
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.

Bug: scrolling collectors/analyzers in CLI with arrows does not work
2 participants