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

Kumactl get commands with age column #702

Merged
merged 24 commits into from
May 8, 2020

Conversation

tharun208
Copy link
Contributor

@tharun208 tharun208 commented Apr 27, 2020

Summary

Age column for kumactl table view

Full changelog

  • Added Age Column for the following

    • Fault Injection
    • Dataplane
    • Mesh
    • Health Check
    • proxyTemplate
    • trafficLog
    • trafficPermission
    • trafficRoute
    • trafficTrace
    • Secrets
  • Updated inspect DataPlanes lastConnected and lastUpdated to the new format

  • Updated tests

@tharun208 tharun208 requested a review from a team April 27, 2020 20:16
@jakubdyszkiewicz
Copy link
Contributor

Hey, I tested the PR and there is a problem

❯❯❯ kumactl get meshes
NAME      mTLS   METRICS   LOGGING   TRACING   AGE
default   off    off       off       off       0s

It always shows zero. I think that due to rounding it will only show hours.

I think it should look like this:
if the object is not older than minute, we should show "15s"
if the object is not older than hour, we should show "15m" (instead of 15m15s)
if the object is older than hour, we should show "15h" (instead of 15h15m15s)

@subnetmarco thoughts?

@subnetmarco
Copy link
Contributor

Yes I agree @jakubdyszkiewicz. @tharun208 can you implement this behavior?

@tharun208
Copy link
Contributor Author

sure will update it, @subnetmarco

@tharun208
Copy link
Contributor Author

tharun208 commented May 1, 2020

Hi @subnetmarco, @jakubdyszkiewicz can we show the age in 1d after 24 hours, since it will be good in readability ?.

Copy link
Contributor

@jakubdyszkiewicz jakubdyszkiewicz left a comment

Choose a reason for hiding this comment

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

Now it works great 👍

Still needs some small changes about code.

app/kumactl/pkg/util/util.go Outdated Show resolved Hide resolved
app/kumactl/pkg/util/util_test.go Outdated Show resolved Hide resolved
updated inspect dataplanes Ago method to use duration helper
@jakubdyszkiewicz jakubdyszkiewicz merged commit 08e608d into kumahq:master May 8, 2020
@jakubdyszkiewicz
Copy link
Contributor

Thanks for iterating on this!

@tharun208 tharun208 deleted the kumactl-age-column branch May 8, 2020 08:24
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.

None yet

3 participants