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
Show 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) {
...
@@ -50,9 +50,7 @@ function __watch_build_status (socket, status) {
// watcher on new distributions
// watcher on new distributions
function
__watch_distributions
(
socket
)
{
function
__watch_distributions
(
socket
)
{
fs
.
watch
(
config
.
debomatic
.
path
,
{
persistent
:
true
},
function
(
event
,
fileName
)
{
fs
.
watch
(
config
.
debomatic
.
path
,
{
persistent
:
true
},
function
(
event
,
fileName
)
{
utils
.
get_files_list
(
config
.
debomatic
.
path
,
true
,
function
(
distros
)
{
utils
.
send_distributions
(
socket
)
socket
.
emit
(
config
.
events
.
broadcast
.
distributions
,
distros
);
})
})
})
}
}
...
...
debomatic-webui/lib/client.js
View file @
8fe66560
...
@@ -137,10 +137,8 @@ function Client (socket) {
...
@@ -137,10 +137,8 @@ function Client (socket) {
var
socket
=
socket
var
socket
=
socket
this
.
start
=
function
()
{
this
.
start
=
function
()
{
// init send distributions and status
// init send distributions
utils
.
get_files_list
(
config
.
debomatic
.
path
,
true
,
function
(
distros
)
{
utils
.
send_distributions
(
socket
)
socket
.
emit
(
config
.
events
.
broadcast
.
distributions
,
distros
);
})
// init events
// init events
socket
.
on
(
_e
.
distribution_packages
.
get
,
function
(
data
)
{
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) {
...
@@ -84,7 +84,7 @@ function __watch_path_onsocket(event_name, socket, data, watch_path, updater) {
fs
.
stat
(
watch_path
,
function
(
err
,
stats
)
{
fs
.
stat
(
watch_path
,
function
(
err
,
stats
)
{
if
(
err
)
{
if
(
err
)
{
utils
.
errors_handler
(
"
__watch_path_onsocket:fs.stat
"
,
err
,
socket
)
__
errors_handler
(
"
__watch_path_onsocket:fs.stat
"
,
err
,
socket
)
return
return
}
}
if
(
stats
.
isDirectory
())
{
if
(
stats
.
isDirectory
())
{
...
@@ -114,6 +114,22 @@ function __generic_handler_watcher(event_name, socket, data, watch_path, callbac
...
@@ -114,6 +114,22 @@ function __generic_handler_watcher(event_name, socket, data, watch_path, callbac
callback
(
event_name
,
socket
,
data
)
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
=
{
utils
=
{
check_data_distribution
:
function
(
data
)
{
check_data_distribution
:
function
(
data
)
{
return
__check_data_distribution
(
data
)
return
__check_data_distribution
(
data
)
...
@@ -142,6 +158,9 @@ utils = {
...
@@ -142,6 +158,9 @@ utils = {
generic_handler_watcher
:
function
(
event_name
,
socket
,
data
,
watch_path
,
callback
)
{
generic_handler_watcher
:
function
(
event_name
,
socket
,
data
,
watch_path
,
callback
)
{
return
__generic_handler_watcher
(
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
)
{
errors_handler
:
function
(
from
,
error
,
socket
)
{
return
__errors_handler
(
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