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
e880c23c
Commit
e880c23c
authored
Mar 11, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added event status on config
parent
8a01690a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
11 deletions
+17
-11
debomatic-webui/lib/config.js
debomatic-webui/lib/config.js
+1
-0
debomatic-webui/public/javascripts/page_generic.js
debomatic-webui/public/javascripts/page_generic.js
+16
-11
No files found.
debomatic-webui/lib/config.js
View file @
e880c23c
...
...
@@ -37,6 +37,7 @@ config.events.client.distribution_packages = __build_get_set('distribution_packa
config
.
events
.
client
.
package_files_list
=
__build_get_set
(
'
package_files_list
'
)
config
.
events
.
client
.
file
=
__build_get_set
(
'
file
'
)
config
.
events
.
client
.
file_newcontent
=
'
file_newcontent
'
config
.
events
.
client
.
status
=
'
status
'
config
.
web
.
paths
=
config
.
routes
config
.
web
.
events
=
config
.
events
...
...
debomatic-webui/public/javascripts/page_generic.js
View file @
e880c23c
function
Page_Generic
()
{
var
socket
;
var
c
=
config
.
status
.
classes
var
i
=
config
.
status
.
icons
var
e
=
config
.
events
function
__get_status_html
(
status_package
)
{
c
=
config
.
status
.
classes
i
=
config
.
status
.
icons
s
=
status_package
li
=
$
(
'
<li></li>
'
)
var
s
=
status_package
var
li
=
$
(
'
<li></li>
'
)
li
.
attr
(
'
id
'
,
'
status-
'
+
s
.
distribution
+
"
-
"
+
s
.
package
)
button
=
$
(
'
<a></a>
'
)
var
button
=
$
(
'
<a></a>
'
)
button
.
addClass
(
'
btn btn-xs
'
)
button
.
addClass
(
s
.
status
)
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)
button
.
html
(
s
.
package
.
split
(
'
_
'
)[
0
])
var
button_class
=
null
var
icon
=
null
if
(
s
.
status
==
'
building
'
)
{
button_class
=
c
.
building
icon
=
i
.
building
...
...
@@ -31,7 +33,7 @@ function Page_Generic()
button
.
addClass
(
'
btn-
'
+
button_class
)
button
.
html
(
button
.
html
()
+
'
<span class="icon glyphicon glyphicon-
'
+
icon
+
'
"></span>
'
)
li
.
html
(
button
)
result
=
$
(
'
<div></div>
'
)
var
result
=
$
(
'
<div></div>
'
)
result
.
html
(
li
)
return
result
.
html
()
}
...
...
@@ -72,17 +74,20 @@ function Page_Generic()
socket
=
mysocket
// update distributions
socket
.
on
(
config
.
events
.
broadcast
.
distributions
,
function
(
distributions
)
{
socket
.
on
(
e
.
broadcast
.
distributions
,
function
(
distributions
)
{
update
.
distributions
(
distributions
)
});
socket
.
on
(
'
error
'
,
function
(
data
)
{
console
.
error
(
data
)
});
socket
.
on
(
'
status
'
,
function
(
data_status
)
{
socket
.
on
(
e
.
client
.
status
,
function
(
data_status
)
{
status
.
set
(
data_status
)
})
socket
.
on
(
config
.
events
.
broadcast
.
status_update
,
function
(
data
)
{
socket
.
on
(
e
.
broadcast
.
status_update
,
function
(
data
)
{
// this is how to fadeout and remove
// setTimeout(function() {$('#id-status').remove();}, 3500);
// $($("li[id='id-status']")[0]).delay(3200).fadeOut(300)
console
.
log
(
'
status_update
'
)
console
.
log
(
data
)
})
...
...
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