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
e3912e86
Commit
e3912e86
authored
Mar 10, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
made broadcasting events configurable and exported to web
parent
9abed306
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
5 deletions
+14
-5
debomatic-webui/index.js
debomatic-webui/index.js
+1
-1
debomatic-webui/lib/config.js
debomatic-webui/lib/config.js
+9
-0
debomatic-webui/lib/utils.js
debomatic-webui/lib/utils.js
+1
-1
debomatic-webui/public/javascripts/main.js
debomatic-webui/public/javascripts/main.js
+3
-3
No files found.
debomatic-webui/index.js
View file @
e3912e86
...
...
@@ -83,7 +83,7 @@ status_watcher.on('line', function(new_content) {
}
}
}
io
.
sockets
.
emit
(
'
status-update
'
,
data
)
io
.
sockets
.
emit
(
config
.
events
.
broadcast
.
status_update
,
data
)
})
var
server
=
app
.
listen
(
config
.
port
,
function
(){
...
...
debomatic-webui/lib/config.js
View file @
e3912e86
...
...
@@ -16,7 +16,16 @@ config.web.title = "deb-o-matic web.ui"
config
.
web
.
description
=
"
This is a web interface for debomatic
"
config
.
web
.
footer
=
"
Fork me on github.com
"
config
.
web
.
autoscroll
=
true
// do not edit these ones
config
.
events
=
{}
config
.
events
.
broadcast
=
{}
config
.
events
.
broadcast
.
distributions
=
'
distributions
'
config
.
events
.
broadcast
.
status_update
=
'
status_update
'
config
.
web
.
paths
=
config
.
routes
config
.
web
.
events
=
config
.
events
config
.
web
.
hostname
=
config
.
host
+
((
config
.
port
==
80
)
?
null
:
'
:
'
+
config
.
port
)
module
.
exports
=
config
debomatic-webui/lib/utils.js
View file @
e3912e86
...
...
@@ -134,7 +134,7 @@ utils = {
},
send_distributions
:
function
(
socket
,
event_name
)
{
if
(
!
event_name
)
event_name
=
'
distributions
'
event_name
=
config
.
events
.
broadcast
.
distributions
return
__send_distributions
(
event_name
,
socket
);
},
}
...
...
debomatic-webui/public/javascripts/main.js
View file @
e3912e86
// update distributions
socket
.
on
(
'
distributions
'
,
function
(
distributions
)
{
socket
.
on
(
config
.
events
.
broadcast
.
distributions
,
function
(
distributions
)
{
$
(
'
#distributions ul
'
).
html
(
''
);
distributions
.
forEach
(
function
(
name
){
$
(
'
#distributions ul
'
).
append
(
'
<li id="distribution-
'
+
name
+
'
"><a href="
'
+
config
.
paths
.
distribution
+
'
#
'
+
name
+
'
">
'
+
name
+
'
</li>
'
);
...
...
@@ -13,8 +13,8 @@ socket.on('status', function(data) {
console
.
log
(
data
)
})
socket
.
on
(
'
status-update
'
,
function
(
data
)
{
console
.
log
(
'
status
'
)
socket
.
on
(
config
.
events
.
broadcast
.
status_update
,
function
(
data
)
{
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