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
tools: use TextTable for "rados df" plain output #9362
Conversation
14a1065
to
6947e7b
Compare
6947e7b
to
a36fd41
Compare
cout << "total_space " << si_t(tstats.kb << 10) | ||
<< std::endl; | ||
cout << "==============================================================" | ||
<< std::endl; |
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.
For this last section, can we drop tne ==== lines (a blank line is sufficient), and the _'s?
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.
Done. Thanks for the review.
a36fd41
to
9e4772c
Compare
👍 thanks! |
9e4772c
to
7abe0ef
Compare
<< prettybyte_t(p->second.kb_used) | ||
<< prettybyte_t(p->second.kb_avail) | ||
<< prettybyte_t(p->second.kb) | ||
<< prettybyte_t(p->second.kb_used << 10) |
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.
i'd recommend s/prettybyte_t/kb_t/
here.
7abe0ef
to
68437da
Compare
tab.define_column("MISSING_ON_PRIMARY", TextTable::LEFT, TextTable::LEFT); | ||
tab.define_column("DEGRADED", TextTable::LEFT, TextTable::LEFT); | ||
tab.define_column("MISPLACED", TextTable::LEFT, TextTable::LEFT); | ||
tab.define_column("UNFOUND", TextTable::LEFT, TextTable::LEFT); |
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.
the numeric values should all be right justified
68437da
to
3f339e5
Compare
Dropped that change. |
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
The prettybyte_t considers the input as bytes, so the pre-cast is needed here. Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
which is simpler and better for alignment. Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
3f339e5
to
46f75ba
Compare
So the whole output looks gorgeous. Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
46f75ba
to
bf9f5c1
Compare
E.g.: