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
b74ea8c0
Commit
b74ea8c0
authored
Mar 11, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init distributions and renamed events in _e
parent
965d6605
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
8 deletions
+20
-8
debomatic-webui/lib/client.js
debomatic-webui/lib/client.js
+20
-8
No files found.
debomatic-webui/lib/client.js
View file @
b74ea8c0
...
@@ -76,39 +76,51 @@ function __send_file (event_name, socket, data) {
...
@@ -76,39 +76,51 @@ function __send_file (event_name, socket, data) {
}
}
function
__handler_get_file
(
socket
,
data
)
{
function
__handler_get_file
(
socket
,
data
)
{
var
_e
=
config
.
events
.
client
file_path
=
utils
.
get_file_path
(
data
)
file_path
=
utils
.
get_file_path
(
data
)
utils
.
watch_path_onsocket
(
events
.
file_newcontent
,
socket
,
data
,
file_path
,
function
(
event_name
,
socket
,
data
)
{
utils
.
watch_path_onsocket
(
_e
.
file_newcontent
,
socket
,
data
,
file_path
,
function
(
event_name
,
socket
,
data
)
{
data
.
file
.
content
=
null
data
.
file
.
content
=
null
socket
.
emit
(
event_name
,
data
)
socket
.
emit
(
event_name
,
data
)
})
})
__send_file
(
events
.
file
.
set
,
socket
,
data
)
__send_file
(
_e
.
file
.
set
,
socket
,
data
)
}
}
function
Client
(
socket
)
{
function
Client
(
socket
)
{
events
=
config
.
events
.
clien
t
var
socket
=
socke
t
socket
.
on
(
events
.
distribution_packages
.
get
,
function
(
data
)
{
var
_e
=
config
.
events
.
client
// init send distributions and status
utils
.
get_files_list
(
config
.
debomatic
.
path
,
true
,
function
(
distros
)
{
socket
.
emit
(
config
.
events
.
broadcast
.
distributions
,
distros
);
})
// init events
socket
.
on
(
_e
.
distribution_packages
.
get
,
function
(
data
)
{
if
(
!
utils
.
check_data_distribution
(
data
))
if
(
!
utils
.
check_data_distribution
(
data
))
return
return
distribution_path
=
path
.
join
(
config
.
debomatic
.
path
,
data
.
distribution
.
name
,
'
pool
'
)
distribution_path
=
path
.
join
(
config
.
debomatic
.
path
,
data
.
distribution
.
name
,
'
pool
'
)
utils
.
generic_handler_watcher
(
events
.
distribution_packages
.
set
,
socket
,
data
,
distribution_path
,
__send_distribution_packages
)
utils
.
generic_handler_watcher
(
_e
.
distribution_packages
.
set
,
socket
,
data
,
distribution_path
,
__send_distribution_packages
)
})
})
socket
.
on
(
events
.
package_files_list
.
get
,
function
(
data
)
{
socket
.
on
(
_e
.
package_files_list
.
get
,
function
(
data
)
{
if
(
!
utils
.
check_data_package
(
data
))
if
(
!
utils
.
check_data_package
(
data
))
return
return
package_path
=
utils
.
get_package_path
(
data
)
package_path
=
utils
.
get_package_path
(
data
)
utils
.
generic_handler_watcher
(
events
.
package_files_list
.
set
,
socket
,
data
,
package_path
,
__send_package_files_list
)
utils
.
generic_handler_watcher
(
_e
.
package_files_list
.
set
,
socket
,
data
,
package_path
,
__send_package_files_list
)
})
})
socket
.
on
(
events
.
file
.
get
,
function
(
data
){
socket
.
on
(
_e
.
file
.
get
,
function
(
data
){
if
(
!
utils
.
check_data_file
(
data
))
if
(
!
utils
.
check_data_file
(
data
))
return
return
__handler_get_file
(
socket
,
data
)
__handler_get_file
(
socket
,
data
)
})
})
return
{
return
{
send_status
:
function
(
status
)
{
socket
.
emit
(
_e
.
status
,
status
)
}
}
}
}
}
...
...
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