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
8fe66560
Commit
8fe66560
authored
Mar 18, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check if distribution directory has pool subdir, which means is real a distribution directory
parent
4179b71c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
8 deletions
+23
-8
debomatic-webui/lib/broadcaster.js
debomatic-webui/lib/broadcaster.js
+1
-3
debomatic-webui/lib/client.js
debomatic-webui/lib/client.js
+2
-4
debomatic-webui/lib/utils.js
debomatic-webui/lib/utils.js
+20
-1
No files found.
debomatic-webui/lib/broadcaster.js
View file @
8fe66560
...
...
@@ -50,9 +50,7 @@ function __watch_build_status (socket, status) {
// watcher on new distributions
function
__watch_distributions
(
socket
)
{
fs
.
watch
(
config
.
debomatic
.
path
,
{
persistent
:
true
},
function
(
event
,
fileName
)
{
utils
.
get_files_list
(
config
.
debomatic
.
path
,
true
,
function
(
distros
)
{
socket
.
emit
(
config
.
events
.
broadcast
.
distributions
,
distros
);
})
utils
.
send_distributions
(
socket
)
})
}
...
...
debomatic-webui/lib/client.js
View file @
8fe66560
...
...
@@ -137,10 +137,8 @@ function Client (socket) {
var
socket
=
socket
this
.
start
=
function
()
{
// init send distributions and status
utils
.
get_files_list
(
config
.
debomatic
.
path
,
true
,
function
(
distros
)
{
socket
.
emit
(
config
.
events
.
broadcast
.
distributions
,
distros
);
})
// init send distributions
utils
.
send_distributions
(
socket
)
// init events
socket
.
on
(
_e
.
distribution_packages
.
get
,
function
(
data
)
{
...
...
debomatic-webui/lib/utils.js
View file @
8fe66560
...
...
@@ -84,7 +84,7 @@ function __watch_path_onsocket(event_name, socket, data, watch_path, updater) {
fs
.
stat
(
watch_path
,
function
(
err
,
stats
)
{
if
(
err
)
{
utils
.
errors_handler
(
"
__watch_path_onsocket:fs.stat
"
,
err
,
socket
)
__
errors_handler
(
"
__watch_path_onsocket:fs.stat
"
,
err
,
socket
)
return
}
if
(
stats
.
isDirectory
())
{
...
...
@@ -114,6 +114,22 @@ function __generic_handler_watcher(event_name, socket, data, watch_path, callbac
callback
(
event_name
,
socket
,
data
)
}
function
__send_distributions
(
socket
)
{
__get_files_list
(
config
.
debomatic
.
path
,
true
,
function
(
directories
)
{
var
distributions
=
[]
directories
.
forEach
(
function
(
dir
)
{
var
data
=
{}
data
.
distribution
=
{}
data
.
distribution
.
name
=
dir
var
pool_path
=
__get_distribution_pool_path
(
data
)
if
(
fs
.
existsSync
(
pool_path
))
{
distributions
.
push
(
dir
)
}
})
socket
.
emit
(
config
.
events
.
broadcast
.
distributions
,
distributions
);
})
}
utils
=
{
check_data_distribution
:
function
(
data
)
{
return
__check_data_distribution
(
data
)
...
...
@@ -142,6 +158,9 @@ utils = {
generic_handler_watcher
:
function
(
event_name
,
socket
,
data
,
watch_path
,
callback
)
{
return
__generic_handler_watcher
(
event_name
,
socket
,
data
,
watch_path
,
callback
);
},
send_distributions
:
function
(
socket
)
{
return
__send_distributions
(
socket
)
},
errors_handler
:
function
(
from
,
error
,
socket
)
{
return
__errors_handler
(
from
,
error
,
socket
)
}
...
...
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