Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dCache
cta
Commits
1f0706ce
Commit
1f0706ce
authored
5 years ago
by
Michael Davis
Browse files
Options
Downloads
Patches
Plain Diff
[cta-admin] Fixes wrong column offset for MB/s column
parent
bafb57a1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cmdline/CtaAdminTextFormatter.cpp
+7
-2
7 additions, 2 deletions
cmdline/CtaAdminTextFormatter.cpp
with
7 additions
and
2 deletions
cmdline/CtaAdminTextFormatter.cpp
+
7
−
2
View file @
1f0706ce
...
...
@@ -33,7 +33,8 @@ namespace admin {
std
::
string
TextFormatter
::
doubleToStr
(
double
value
,
char
unit
)
{
std
::
stringstream
ss
;
ss
<<
std
::
fixed
<<
std
::
setprecision
(
1
)
<<
value
<<
unit
;
ss
<<
std
::
fixed
<<
std
::
setprecision
(
1
)
<<
value
;
if
(
unit
!=
'\0'
)
ss
<<
unit
;
return
ss
.
str
();
}
...
...
@@ -92,9 +93,13 @@ void TextFormatter::flush() {
for
(
auto
&
l
:
m_outputBuffer
)
{
if
(
is_header
)
{
std
::
cout
<<
TEXT_RED
;
}
for
(
size_t
c
=
0
;
c
<
l
.
size
();
++
c
)
{
// flush right, except for paths, which are flush left
auto
flush
=
((
is_header
&&
l
.
at
(
c
)
==
"path"
)
||
l
.
at
(
c
).
substr
(
0
,
1
)
==
"/"
)
?
std
::
left
:
std
::
right
;
std
::
cout
<<
std
::
setfill
(
' '
)
<<
std
::
setw
(
m_colSize
.
at
(
c
))
<<
(
c
<
l
.
size
()
-
1
?
std
::
right
:
std
::
left
)
<<
flush
<<
(
l
.
at
(
c
).
empty
()
?
"-"
:
l
.
at
(
c
))
<<
' '
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment