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
79f518c6
Commit
79f518c6
authored
Jul 11, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed time to being showed with 2 digits
parent
aef06a26
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
debomatic-webui/public/javascripts/page_distribution.js
debomatic-webui/public/javascripts/page_distribution.js
+8
-4
No files found.
debomatic-webui/public/javascripts/page_distribution.js
View file @
79f518c6
...
...
@@ -343,6 +343,10 @@ function Page_Distrubion(socket) {
return
;
}
function
_get_two_digits
(
num
)
{
return
(
"
0
"
+
num
).
slice
(
-
2
);
}
function
_get_time
(
timestamp
)
{
var
date
=
new
Date
(
timestamp
*
1000
);
var
locale
=
navigator
.
language
||
'
en-US
'
;
...
...
@@ -353,7 +357,7 @@ function Page_Distrubion(socket) {
day
:
"
numeric
"
,
};
var
result
=
date
.
toLocaleDateString
(
locale
,
options
);
result
+=
'
<b>
'
+
date
.
getHours
()
+
'
:
'
+
date
.
getMinutes
(
)
+
'
</b>
'
;
result
+=
'
<b>
'
+
_get_two_digits
(
date
.
getHours
())
+
'
:
'
+
_get_two_digits
(
date
.
getMinutes
()
)
+
'
</b>
'
;
return
result
;
}
...
...
@@ -368,9 +372,9 @@ function Page_Distrubion(socket) {
info
+=
'
- finished
'
+
_get_time
(
socket_data
.
end
);
info
+=
'
- elapsed time: <b>
'
;
var
elapsed
=
new
Date
((
socket_data
.
end
-
socket_data
.
start
)
*
1000
);
info
+=
(
"
0
"
+
elapsed
.
getUTCHours
()).
slice
(
-
2
)
+
'
:
'
;
info
+=
(
"
0
"
+
elapsed
.
getUTCMinutes
()).
slice
(
-
2
)
+
'
:
'
;
info
+=
(
"
0
"
+
elapsed
.
getUTCSeconds
()).
slice
(
-
2
);
info
+=
_get_two_digits
(
elapsed
.
getUTCHours
()
)
+
'
:
'
;
info
+=
_get_two_digits
(
elapsed
.
getUTCMinutes
()
)
+
'
:
'
;
info
+=
_get_two_digits
(
elapsed
.
getUTCSeconds
()
);
}
$
(
"
#package_info
"
).
html
(
info
);
...
...
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