This is an automated email from the ASF dual-hosted git repository.
ulyssesyou pushed a commit to branch branch-1.4
in repository https://gitbox.apache.org/repos/asf/incubator-kyuubi.git
The following commit(s) were added to refs/heads/branch-1.4 by this push:
new d4b0664 [KYUUBI #2006] Improve the readability of ServiceControl
list/get operations
d4b0664 is described below
commit d4b066456291f0852dd99defaee1ab14e867a7b6
Author: sychen <[email protected]>
AuthorDate: Fri Mar 4 09:38:55 2022 +0800
[KYUUBI #2006] Improve the readability of ServiceControl list/get operations
### _Why are the changes needed?_
When the get server and list server commands are displayed, when the
namespace exceeds the minimum width, it will be glued to the hostname.
Add a space beyond the minimum cell width in non-verbose mode.
### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including
negative and positive cases if possible
- [x] Add screenshots for manual tests if appropriate
- [ ] [Run
test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests)
locally before make a pull request
Closes #2007 from cxzl25/KYUUBI-2006.
Closes #2006
68bacef3 [sychen] Add a space beyond the minimum cell width in non-verbose
mode
Authored-by: sychen <[email protected]>
Signed-off-by: ulysses-you <[email protected]>
(cherry picked from commit d8ec3256adf79c62c0b82d945c34713bd09d9b22)
Signed-off-by: ulysses-you <[email protected]>
---
kyuubi-ctl/src/main/scala/org/apache/kyuubi/ctl/CommandLineUtils.scala | 3 +++
1 file changed, 3 insertions(+)
diff --git
a/kyuubi-ctl/src/main/scala/org/apache/kyuubi/ctl/CommandLineUtils.scala
b/kyuubi-ctl/src/main/scala/org/apache/kyuubi/ctl/CommandLineUtils.scala
index b8f0aad..98714f7 100644
--- a/kyuubi-ctl/src/main/scala/org/apache/kyuubi/ctl/CommandLineUtils.scala
+++ b/kyuubi-ctl/src/main/scala/org/apache/kyuubi/ctl/CommandLineUtils.scala
@@ -89,6 +89,9 @@ private[kyuubi] object Tabulator {
for (row <- data) {
for ((cell, i) <- row.zipWithIndex) {
colWidths(i) = math.max(colWidths(i), stringHalfWidth(cell))
+ if (!verbose) {
+ colWidths(i) += 1
+ }
}
}