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
4fbb3858
Commit
4fbb3858
authored
Mar 12, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
a little refactor for client - more deep refactor needed
parent
6ee9a051
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
31 deletions
+36
-31
debomatic-webui/index.js
debomatic-webui/index.js
+1
-0
debomatic-webui/lib/client.js
debomatic-webui/lib/client.js
+29
-29
debomatic-webui/public/javascripts/main.js
debomatic-webui/public/javascripts/main.js
+5
-1
debomatic-webui/public/javascripts/page_distribution.js
debomatic-webui/public/javascripts/page_distribution.js
+1
-1
No files found.
debomatic-webui/index.js
View file @
4fbb3858
...
@@ -45,6 +45,7 @@ var broadcast = new Broadcaster(io.sockets, status)
...
@@ -45,6 +45,7 @@ var broadcast = new Broadcaster(io.sockets, status)
io
.
sockets
.
on
(
'
connection
'
,
function
(
socket
)
{
io
.
sockets
.
on
(
'
connection
'
,
function
(
socket
)
{
client
=
new
Client
(
socket
)
client
=
new
Client
(
socket
)
client
.
start
()
if
(
status
.
packages
.
length
>
0
)
if
(
status
.
packages
.
length
>
0
)
client
.
send_status
(
status
)
client
.
send_status
(
status
)
});
});
...
...
debomatic-webui/lib/client.js
View file @
4fbb3858
...
@@ -142,6 +142,7 @@ function Client (socket) {
...
@@ -142,6 +142,7 @@ function Client (socket) {
var
_e
=
config
.
events
.
client
var
_e
=
config
.
events
.
client
this
.
start
=
function
()
{
// init send distributions and status
// init send distributions and status
utils
.
get_files_list
(
config
.
debomatic
.
path
,
true
,
function
(
distros
)
{
utils
.
get_files_list
(
config
.
debomatic
.
path
,
true
,
function
(
distros
)
{
socket
.
emit
(
config
.
events
.
broadcast
.
distributions
,
distros
);
socket
.
emit
(
config
.
events
.
broadcast
.
distributions
,
distros
);
...
@@ -167,12 +168,11 @@ function Client (socket) {
...
@@ -167,12 +168,11 @@ function Client (socket) {
return
return
__handler_get_file
(
socket
,
data
)
__handler_get_file
(
socket
,
data
)
})
})
}
return
{
this
.
send_status
=
function
(
status
)
{
send_status
:
function
(
status
)
{
socket
.
emit
(
_e
.
status
,
status
)
socket
.
emit
(
_e
.
status
,
status
)
}
}
}
}
}
module
.
exports
=
Client
module
.
exports
=
Client
debomatic-webui/public/javascripts/main.js
View file @
4fbb3858
...
@@ -5,3 +5,7 @@ new Page_Generic().init(socket)
...
@@ -5,3 +5,7 @@ new Page_Generic().init(socket)
if
(
window
.
location
.
pathname
==
config
.
paths
.
distribution
)
{
if
(
window
.
location
.
pathname
==
config
.
paths
.
distribution
)
{
new
Page_Distrubion
(
socket
).
start
()
new
Page_Distrubion
(
socket
).
start
()
}
}
socket
.
on
(
config
.
events
.
client
.
distribution_packages
.
status
,
function
(
data
){
console
.
log
(
data
)
})
\ No newline at end of file
debomatic-webui/public/javascripts/page_distribution.js
View file @
4fbb3858
...
@@ -266,7 +266,7 @@ function Page_Distrubion(socket)
...
@@ -266,7 +266,7 @@ function Page_Distrubion(socket)
update
.
view
()
update
.
view
()
}
}
this
.
start
=
function
(
mysocket
)
{
this
.
start
=
function
()
{
socket
.
on
(
events
.
distribution_packages
.
set
,
function
(
socket_data
){
socket
.
on
(
events
.
distribution_packages
.
set
,
function
(
socket_data
){
packages
.
set
(
socket_data
)
packages
.
set
(
socket_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