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
b7ae05dc
Commit
b7ae05dc
authored
Feb 27, 2015
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'github/sbuild' into sbuild
parents
2dd5453a
682ce76e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
5 deletions
+24
-5
debomatic-webui/lib/utils.coffee
debomatic-webui/lib/utils.coffee
+3
-1
debomatic-webui/public/javascripts/page_history.js
debomatic-webui/public/javascripts/page_history.js
+20
-2
debomatic-webui/public/javascripts/utils.js
debomatic-webui/public/javascripts/utils.js
+1
-2
No files found.
debomatic-webui/lib/utils.coffee
View file @
b7ae05dc
...
@@ -5,6 +5,8 @@ glob = require("glob")
...
@@ -5,6 +5,8 @@ glob = require("glob")
Tail
=
require
(
"tail"
).
Tail
Tail
=
require
(
"tail"
).
Tail
_check_no_backward
=
(
backward_path
)
->
_check_no_backward
=
(
backward_path
)
->
if
backward_path
is
undefined
return
false
if
typeof
backward_path
is
'string'
if
typeof
backward_path
is
'string'
return
backward_path
.
indexOf
(
".."
)
<
0
return
backward_path
.
indexOf
(
".."
)
<
0
return
true
return
true
...
@@ -33,7 +35,7 @@ get_distributions = (callback) ->
...
@@ -33,7 +35,7 @@ get_distributions = (callback) ->
if
err
if
err
errors_handler
"get_distributions"
,
err
errors_handler
"get_distributions"
,
err
return
return
distributions
=
(
dir
.
split
(
path
.
sep
)[
-
2
...
-
1
]
for
dir
in
directories
)
distributions
=
(
dir
.
split
(
path
.
sep
)[
-
2
...
-
1
]
.
pop
()
for
dir
in
directories
)
callback
(
distributions
)
callback
(
distributions
)
get_distribution_pool_path
=
(
data
)
->
get_distribution_pool_path
=
(
data
)
->
...
...
debomatic-webui/public/javascripts/page_history.js
View file @
b7ae05dc
...
@@ -15,12 +15,11 @@ function Page_History() {
...
@@ -15,12 +15,11 @@ function Page_History() {
function
_get_short_day
(
timestamp
)
{
function
_get_short_day
(
timestamp
)
{
var
date
=
new
Date
(
timestamp
*
1000
);
var
date
=
new
Date
(
timestamp
*
1000
);
var
locale
=
navigator
.
language
||
'
en-US
'
;
var
options
=
{
var
options
=
{
month
:
"
numeric
"
,
month
:
"
numeric
"
,
day
:
"
numeric
"
,
day
:
"
numeric
"
,
};
};
return
date
.
toLocaleDateString
(
locale
,
options
);
return
date
.
toLocaleDateString
(
config
.
locale
,
options
);
}
}
function
_get_id
(
package_status
)
{
function
_get_id
(
package_status
)
{
...
@@ -84,6 +83,17 @@ function Page_History() {
...
@@ -84,6 +83,17 @@ function Page_History() {
sortAsc
:
'
glyphicon glyphicon-chevron-up
'
,
sortAsc
:
'
glyphicon glyphicon-chevron-up
'
,
sortDesc
:
'
glyphicon glyphicon-chevron-down
'
,
sortDesc
:
'
glyphicon glyphicon-chevron-down
'
,
});
});
$
.
tablesorter
.
addParser
({
id
:
"
datetime
"
,
is
:
function
(
s
)
{
return
false
;
},
format
:
function
(
s
,
table
)
{
s
=
s
.
replace
(
/
(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})(
.*
)
/
,
"
$3/$2/$1$4
"
);
return
$
.
tablesorter
.
formatFloat
(
new
Date
(
s
).
getTime
());
},
type
:
"
numeric
"
});
// call the tablesorter plugin and apply the uitheme widget
// call the tablesorter plugin and apply the uitheme widget
$
(
"
table
"
).
tablesorter
({
$
(
"
table
"
).
tablesorter
({
...
@@ -96,6 +106,14 @@ function Page_History() {
...
@@ -96,6 +106,14 @@ function Page_History() {
widgets
:
[
"
uitheme
"
,
"
filter
"
,
"
zebra
"
],
widgets
:
[
"
uitheme
"
,
"
filter
"
,
"
zebra
"
],
widgetOptions
:
{
widgetOptions
:
{
zebra
:
[
"
normal-row
"
,
"
alt-row
"
],
zebra
:
[
"
normal-row
"
,
"
alt-row
"
],
},
headers
:
{
2
:
{
sorter
:
'
datetime
'
},
3
:
{
sorter
:
'
datetime
'
}
}
}
});
});
...
...
debomatic-webui/public/javascripts/utils.js
View file @
b7ae05dc
...
@@ -121,7 +121,6 @@ var Utils = {
...
@@ -121,7 +121,6 @@ var Utils = {
if
(
!
timestamp
)
if
(
!
timestamp
)
return
''
;
return
''
;
var
date
=
new
Date
(
timestamp
*
1000
);
var
date
=
new
Date
(
timestamp
*
1000
);
var
locale
=
navigator
.
language
||
'
en-US
'
;
var
options
=
null
;
var
options
=
null
;
if
(
short
)
if
(
short
)
options
=
{
options
=
{
...
@@ -136,7 +135,7 @@ var Utils = {
...
@@ -136,7 +135,7 @@ var Utils = {
month
:
"
long
"
,
month
:
"
long
"
,
day
:
"
numeric
"
,
day
:
"
numeric
"
,
};
};
var
result_date
=
date
.
toLocaleDateString
(
locale
,
options
);
var
result_date
=
date
.
toLocaleDateString
(
config
.
locale
,
options
);
var
result_time
=
Utils
.
num_two_digits
(
date
.
getHours
())
+
'
:
'
+
Utils
.
num_two_digits
(
date
.
getMinutes
());
var
result_time
=
Utils
.
num_two_digits
(
date
.
getHours
())
+
'
:
'
+
Utils
.
num_two_digits
(
date
.
getMinutes
());
if
(
time_in_bold
)
result_time
=
'
<b>
'
+
result_time
+
'
</b>
'
;
if
(
time_in_bold
)
result_time
=
'
<b>
'
+
result_time
+
'
</b>
'
;
return
result_date
+
'
'
+
result_time
;
return
result_date
+
'
'
+
result_time
;
...
...
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