Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
debomatic-webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
debomatic-webui-admins
debomatic-webui
Commits
8acef892
Commit
8acef892
authored
Sep 23, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
count other files size as "others" fieldn in result
parent
af7caacd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
debomatic-webui/lib/stats.coffee
debomatic-webui/lib/stats.coffee
+7
-2
No files found.
debomatic-webui/lib/stats.coffee
View file @
8acef892
...
@@ -37,12 +37,13 @@ get_disk_usage = (cb) ->
...
@@ -37,12 +37,13 @@ get_disk_usage = (cb) ->
utils
.
errors_handler
"stats:get_disk_usage"
,
err
utils
.
errors_handler
"stats:get_disk_usage"
,
err
return
return
if
stderr
?
if
stderr
?
utils
.
errors_handler
"disk usage error:
"
,
stderr
utils
.
errors_handler
"disk usage error:"
,
stderr
result
=
{}
result
=
{}
others
=
0
for
line
in
stdout
.
split
(
'
\n
'
)
for
line
in
stdout
.
split
(
'
\n
'
)
continue
if
line
==
''
continue
if
line
==
''
info
=
line
.
replace
(
/\t+/g
,
' '
).
split
(
' '
)
info
=
line
.
replace
(
/\t+/g
,
' '
).
split
(
' '
)
size
=
info
[
0
]
size
=
parseInt
(
info
[
0
])
dirs
=
info
[
1
].
replace
(
"
#{
config
.
debomatic
.
path
}
"
,
''
).
split
(
'/'
)
dirs
=
info
[
1
].
replace
(
"
#{
config
.
debomatic
.
path
}
"
,
''
).
split
(
'/'
)
# case total size for debomatic incoming
# case total size for debomatic incoming
...
@@ -57,6 +58,8 @@ get_disk_usage = (cb) ->
...
@@ -57,6 +58,8 @@ get_disk_usage = (cb) ->
# case total size for distribution
# case total size for distribution
if
dirs
.
length
==
2
if
dirs
.
length
==
2
result
[
distribution
][
'size'
]
=
size
result
[
distribution
][
'size'
]
=
size
result
[
distribution
][
'others'
]
=
others
others
=
0
continue
continue
# case size for distribution/subdir
# case size for distribution/subdir
...
@@ -64,6 +67,8 @@ get_disk_usage = (cb) ->
...
@@ -64,6 +67,8 @@ get_disk_usage = (cb) ->
subdir
=
"chroot"
if
distribution
==
subdir
subdir
=
"chroot"
if
distribution
==
subdir
if
subdir
in
config
.
debomatic
.
disk_usage_subdirs
if
subdir
in
config
.
debomatic
.
disk_usage_subdirs
result
[
distribution
][
subdir
]
=
size
result
[
distribution
][
subdir
]
=
size
else
others
+=
size
cb
(
result
)
cb
(
result
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment