-
Notifications
You must be signed in to change notification settings - Fork 504
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
[JUJU-1700] Added --watch flag to watch status changes via Viddy tool #14528
[JUJU-1700] Added --watch flag to watch status changes via Viddy tool #14528
Conversation
Feels like doing both is just bloat - can we just make viddy the default, or is it dependant on an external binary? |
No, there is no problem with doing viddy the default. |
Now Viddy is the default for |
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.
Some minor things.
cmd/juju/status/status.go
Outdated
@@ -75,6 +75,9 @@ type statusCommand struct { | |||
|
|||
// watch indicates the time to wait between consecutive status queries | |||
watch time.Duration | |||
|
|||
// viddy indicates the time to wait between consecutive status queries (with viddy tool) | |||
viddy time.Duration |
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.
This is not used and needs deleting.
cmd/juju/status/status.go
Outdated
|
||
// repeat the call using a ticker | ||
ticker := time.NewTicker(c.watch) | ||
// Prepare Viddy args |
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.
This comment is not required.
cmd/juju/status/status.go
Outdated
fmt.Printf("\u001Bc") | ||
// statusArgsWithoutWatchFlag returns all args cut off '--watch' flag of status commands | ||
// and the value of '--watch' flag | ||
func (c *statusCommand) statusArgsWithoutWatchFlag(args []string) ([]string, string) { |
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.
You already have the watch value in c.watch
no need to return it. You only need the stripped args.
After running this, I have a weird issue with uxterm. My cursor has disappeared... |
6d4dc90
to
c5edf70
Compare
/merge |
1 similar comment
/merge |
/merge |
This PR adds Viddy tool usage to
juju status --watch
command. This flag allows watchingjuju status
changes via the Viddy (https://github.com/juju/viddy) tool.Checklist
QA steps