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
bb1eba1d
Commit
bb1eba1d
authored
Sep 07, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set url to distribution and package in history page - add className to success column
parent
dc527ee3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
12 deletions
+24
-12
debomatic-webui/public/javascripts/page_generic.js
debomatic-webui/public/javascripts/page_generic.js
+1
-8
debomatic-webui/public/javascripts/page_history.js
debomatic-webui/public/javascripts/page_history.js
+10
-3
debomatic-webui/public/javascripts/utils.js
debomatic-webui/public/javascripts/utils.js
+13
-1
No files found.
debomatic-webui/public/javascripts/page_generic.js
View file @
bb1eba1d
...
@@ -13,13 +13,6 @@ function Page_Generic() {
...
@@ -13,13 +13,6 @@ function Page_Generic() {
return
result
;
return
result
;
}
}
function
__get_status_html_href
(
status_data
)
{
var
result
=
config
.
paths
.
distribution
+
'
#
'
+
status_data
.
distribution
;
if
(
status_data
.
hasOwnProperty
(
'
package
'
))
result
+=
'
/
'
+
status_data
.
package
.
replace
(
'
_
'
,
'
/
'
)
+
'
/buildlog
'
;
return
result
;
}
function
__get_status_html_title
(
status_data
)
{
function
__get_status_html_title
(
status_data
)
{
var
result
=
status_data
.
status
+
'
:
'
+
status_data
.
distribution
;
var
result
=
status_data
.
status
+
'
:
'
+
status_data
.
distribution
;
if
(
status_data
.
hasOwnProperty
(
'
package
'
))
if
(
status_data
.
hasOwnProperty
(
'
package
'
))
...
@@ -43,7 +36,7 @@ function Page_Generic() {
...
@@ -43,7 +36,7 @@ function Page_Generic() {
button
.
addClass
(
'
btn btn-xs
'
);
button
.
addClass
(
'
btn btn-xs
'
);
button
.
addClass
(
_s
.
status
);
button
.
addClass
(
_s
.
status
);
button
.
attr
(
'
title
'
,
__get_status_html_title
(
_s
));
button
.
attr
(
'
title
'
,
__get_status_html_title
(
_s
));
button
.
attr
(
'
href
'
,
__get_status_html_href
(
_s
));
button
.
attr
(
'
href
'
,
Utils
.
get_url_to_package
(
_s
));
button
.
html
(
__get_status_html_inner
(
_s
));
button
.
html
(
__get_status_html_inner
(
_s
));
var
info
=
Utils
.
get_status_icon_and_class
(
_s
);
var
info
=
Utils
.
get_status_icon_and_class
(
_s
);
button
.
addClass
(
'
btn-
'
+
info
.
className
);
button
.
addClass
(
'
btn-
'
+
info
.
className
);
...
...
debomatic-webui/public/javascripts/page_history.js
View file @
bb1eba1d
...
@@ -7,16 +7,23 @@
...
@@ -7,16 +7,23 @@
/* global dom_history: false */
/* global dom_history: false */
function
Page_History
()
{
function
Page_History
()
{
// init table
// init table
for
(
var
i
=
0
;
i
<
dom_history
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
dom_history
.
length
;
i
++
)
{
var
p
=
dom_history
[
i
];
var
p
=
dom_history
[
i
];
var
info
=
Utils
.
get_status_icon_and_class
(
p
);
var
label
=
info
.
label
||
'
building
'
;
var
row
=
'
<tr>
'
;
var
row
=
'
<tr>
'
;
row
+=
'
<td>
'
+
p
.
distribution
+
'
</td>
'
;
var
distribution_url
=
Utils
.
get_url_to_package
({
row
+=
'
<td>
'
+
p
.
package
+
'
</td>
'
;
'
distribution
'
:
p
.
distribution
});
var
package_url
=
Utils
.
get_url_to_package
(
p
);
row
+=
'
<td><a href="
'
+
distribution_url
+
'
">
'
+
p
.
distribution
+
'
</a></td>
'
;
row
+=
'
<td><a href="
'
+
package_url
+
'
">
'
+
p
.
package
+
'
</td>
'
;
row
+=
'
<td>
'
+
p
.
uploader
+
'
</td>
'
;
row
+=
'
<td>
'
+
p
.
uploader
+
'
</td>
'
;
row
+=
'
<td>
'
+
Utils
.
format_time
(
p
.
start
)
+
'
</td>
'
;
row
+=
'
<td>
'
+
Utils
.
format_time
(
p
.
start
)
+
'
</td>
'
;
row
+=
'
<td>
'
+
Utils
.
format_time
(
p
.
end
)
+
'
</td>
'
;
row
+=
'
<td>
'
+
Utils
.
format_time
(
p
.
end
)
+
'
</td>
'
;
row
+=
'
<td
>
'
+
p
.
status
+
'
</td>
'
;
row
+=
'
<td
class="
'
+
info
.
className
+
'
text-
'
+
info
.
className
+
'
">
'
+
label
+
'
</td>
'
;
row
+=
'
</tr>
'
;
row
+=
'
</tr>
'
;
$
(
'
.table tbody
'
).
append
(
row
);
$
(
'
.table tbody
'
).
append
(
row
);
}
}
...
...
debomatic-webui/public/javascripts/utils.js
View file @
bb1eba1d
...
@@ -58,13 +58,16 @@ var Utils = {
...
@@ -58,13 +58,16 @@ var Utils = {
var
_s
=
status_data
;
var
_s
=
status_data
;
var
className
=
null
;
var
className
=
null
;
var
icon
=
null
;
var
icon
=
null
;
var
label
=
null
;
if
(
_s
.
hasOwnProperty
(
'
success
'
))
{
if
(
_s
.
hasOwnProperty
(
'
success
'
))
{
if
(
_s
.
success
===
true
)
{
if
(
_s
.
success
===
true
)
{
className
=
_c
.
success
;
className
=
_c
.
success
;
icon
=
_i
.
success
;
icon
=
_i
.
success
;
label
=
'
success
'
;
}
else
{
}
else
{
className
=
_c
.
fail
;
className
=
_c
.
fail
;
icon
=
_i
.
fail
;
icon
=
_i
.
fail
;
label
=
'
fail
'
;
}
}
}
else
{
}
else
{
className
=
_c
[
_s
.
status
];
className
=
_c
[
_s
.
status
];
...
@@ -79,7 +82,8 @@ var Utils = {
...
@@ -79,7 +82,8 @@ var Utils = {
return
{
return
{
className
:
className
,
className
:
className
,
icon
:
icon
icon
:
icon
,
label
:
label
};
};
},
},
...
@@ -126,6 +130,14 @@ var Utils = {
...
@@ -126,6 +130,14 @@ var Utils = {
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
;
},
// get href url from status object
get_url_to_package
:
function
(
status_data
)
{
var
result
=
config
.
paths
.
distribution
+
'
#
'
+
status_data
.
distribution
;
if
(
status_data
.
hasOwnProperty
(
'
package
'
))
result
+=
'
/
'
+
status_data
.
package
.
replace
(
'
_
'
,
'
/
'
)
+
'
/buildlog
'
;
return
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