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
90da97a5
Commit
90da97a5
authored
Mar 12, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moved get_status_icon_and_className to utils
parent
6d89a2b3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
26 deletions
+26
-26
debomatic-webui/public/javascripts/page_generic.js
debomatic-webui/public/javascripts/page_generic.js
+2
-26
debomatic-webui/public/javascripts/utils.js
debomatic-webui/public/javascripts/utils.js
+24
-0
No files found.
debomatic-webui/public/javascripts/page_generic.js
View file @
90da97a5
...
...
@@ -2,30 +2,6 @@ function Page_Generic()
{
var
socket
;
function
__get_status_icon_and_class
(
status_package
)
{
var
_c
=
config
.
status
.
className
var
_i
=
config
.
status
.
icons
var
button_class
=
null
var
icon
=
null
var
s
=
status_package
if
(
s
.
status
==
config
.
status
.
package
.
building
)
{
button_class
=
_c
.
building
icon
=
_i
.
building
}
else
if
(
s
.
status
==
config
.
status
.
package
.
failed
)
{
button_class
=
_c
.
failed
icon
=
_i
.
failed
}
else
{
button_class
=
_c
.
successed
icon
=
_i
.
successed
}
return
{
button_class
:
button_class
,
icon
:
icon
}
}
function
__get_status_html
(
status_package
)
{
var
s
=
status_package
var
li
=
$
(
'
<li></li>
'
)
...
...
@@ -36,8 +12,8 @@ function Page_Generic()
button
.
attr
(
'
title
'
,
s
.
status
+
'
:
'
+
s
.
distribution
+
'
>
'
+
s
.
package
)
button
.
attr
(
'
href
'
,
config
.
paths
.
distribution
+
'
#
'
+
s
.
distribution
+
'
/
'
+
s
.
package
.
replace
(
'
_
'
,
'
/
'
)
+
'
/datestamp
'
)
button
.
html
(
s
.
package
.
split
(
'
_
'
)[
0
])
var
info
=
__
get_status_icon_and_class
(
s
)
button
.
addClass
(
'
btn-
'
+
info
.
button_class
)
var
info
=
utils
.
get_status_icon_and_class
(
s
)
button
.
addClass
(
'
btn-
'
+
info
.
className
)
button
.
html
(
button
.
html
()
+
'
<span class="icon glyphicon glyphicon-
'
+
info
.
icon
+
'
"></span>
'
)
li
.
html
(
button
)
var
result
=
$
(
'
<div></div>
'
)
...
...
debomatic-webui/public/javascripts/utils.js
View file @
90da97a5
...
...
@@ -47,4 +47,28 @@ var Utils = {
check_data_file
:
function
(
data
)
{
return
Utils
.
check_data_package
(
data
)
&&
data
.
file
&&
data
.
file
.
name
},
get_status_icon_and_class
:
function
(
status_data
)
{
var
_c
=
config
.
status
.
className
var
_i
=
config
.
status
.
icons
var
className
=
null
var
icon
=
null
var
s
=
status_package
if
(
s
.
status
==
config
.
status
.
package
.
building
)
{
className
=
_c
.
building
icon
=
_i
.
building
}
else
if
(
s
.
status
==
config
.
status
.
package
.
failed
)
{
className
=
_c
.
failed
icon
=
_i
.
failed
}
else
{
className
=
_c
.
successed
icon
=
_i
.
successed
}
return
{
className
:
className
,
icon
:
icon
}
},
}
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