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
fa32fcfd
Commit
fa32fcfd
authored
Jun 15, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'github/master' into portable
parents
fae96602
e9bdc5f6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
40 deletions
+36
-40
History.md
History.md
+3
-0
debomatic-webui/lib/client.js
debomatic-webui/lib/client.js
+7
-7
debomatic-webui/lib/config.js
debomatic-webui/lib/config.js
+12
-19
debomatic-webui/public/javascripts/page_distribution.js
debomatic-webui/public/javascripts/page_distribution.js
+14
-14
No files found.
History.md
View file @
fa32fcfd
# 0.4.2 (2014-06-15)
*
[fix] calculate pidfile for debomatic status check after merging configurations
# 0.4.1 (2014-06-13)
# 0.4.1 (2014-06-13)
*
[fix] preview file using a fixed max-height on new content
*
[fix] preview file using a fixed max-height on new content
*
[fix] show and hide correctly debomatic status when build packages
*
[fix] show and hide correctly debomatic status when build packages
...
...
debomatic-webui/lib/client.js
View file @
fa32fcfd
...
@@ -130,9 +130,9 @@ function __handler_get_file(socket, data) {
...
@@ -130,9 +130,9 @@ function __handler_get_file(socket, data) {
socket
.
emit
(
event_name
,
data
);
socket
.
emit
(
event_name
,
data
);
});
});
if
(
config
.
web
.
file
.
preview
.
indexOf
(
data
.
file
.
name
)
>=
0
&&
!
data
.
file
.
force
)
if
(
config
.
web
.
file
.
preview
.
indexOf
(
data
.
file
.
name
)
>=
0
&&
!
data
.
file
.
force
)
__send_file
(
_e
.
file
.
set
,
socket
,
data
,
config
.
web
.
file
.
num_lines
);
__send_file
(
_e
.
file
,
socket
,
data
,
config
.
web
.
file
.
num_lines
);
else
else
__send_file
(
_e
.
file
.
set
,
socket
,
data
);
__send_file
(
_e
.
file
,
socket
,
data
);
}
}
function
Client
(
socket
)
{
function
Client
(
socket
)
{
...
@@ -142,21 +142,21 @@ function Client(socket) {
...
@@ -142,21 +142,21 @@ function Client(socket) {
utils
.
send_distributions
(
socket
);
utils
.
send_distributions
(
socket
);
// init events
// init events
socket
.
on
(
_e
.
distribution_packages
.
get
,
function
(
data
)
{
socket
.
on
(
_e
.
distribution_packages
,
function
(
data
)
{
if
(
!
utils
.
check_data_distribution
(
data
))
if
(
!
utils
.
check_data_distribution
(
data
))
return
;
return
;
var
distribution_path
=
path
.
join
(
config
.
debomatic
.
path
,
data
.
distribution
.
name
,
'
pool
'
);
var
distribution_path
=
path
.
join
(
config
.
debomatic
.
path
,
data
.
distribution
.
name
,
'
pool
'
);
utils
.
generic_handler_watcher
(
_e
.
distribution_packages
.
set
,
socket
,
data
,
distribution_path
,
__send_distribution_packages
);
utils
.
generic_handler_watcher
(
_e
.
distribution_packages
,
socket
,
data
,
distribution_path
,
__send_distribution_packages
);
});
});
socket
.
on
(
_e
.
package_files_list
.
get
,
function
(
data
)
{
socket
.
on
(
_e
.
package_files_list
,
function
(
data
)
{
if
(
!
utils
.
check_data_package
(
data
))
if
(
!
utils
.
check_data_package
(
data
))
return
;
return
;
var
package_path
=
utils
.
get_package_path
(
data
);
var
package_path
=
utils
.
get_package_path
(
data
);
utils
.
generic_handler_watcher
(
_e
.
package_files_list
.
set
,
socket
,
data
,
package_path
,
__send_package_files_list
);
utils
.
generic_handler_watcher
(
_e
.
package_files_list
,
socket
,
data
,
package_path
,
__send_package_files_list
);
});
});
socket
.
on
(
_e
.
file
.
get
,
function
(
data
)
{
socket
.
on
(
_e
.
file
,
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
);
...
...
debomatic-webui/lib/config.js
View file @
fa32fcfd
...
@@ -67,22 +67,7 @@ config.web.preferences.debug = 0; // debug level - 0 means disabled
...
@@ -67,22 +67,7 @@ config.web.preferences.debug = 0; // debug level - 0 means disabled
// DO NOT TOUCH these ones
// DO NOT TOUCH these ones
config
.
version
=
'
0.4.1
'
;
config
.
version
=
'
0.4.2
'
;
// A simple function to quickly have
// get and set strings for client events
function
_event_get_set
(
event_name
)
{
return
{
set
:
event_name
,
get
:
'
get_
'
+
event_name
};
}
config
.
debomatic
.
pidfile
=
"
/var/run/debomatic-
"
+
require
(
'
crypto
'
)
.
createHash
(
'
sha256
'
)
.
update
(
config
.
debomatic
.
path
)
.
digest
(
'
hex
'
);
config
.
events
=
{};
config
.
events
=
{};
config
.
events
.
error
=
'
error
'
;
config
.
events
.
error
=
'
error
'
;
...
@@ -92,10 +77,10 @@ config.events.broadcast.status_update = 'status_update';
...
@@ -92,10 +77,10 @@ config.events.broadcast.status_update = 'status_update';
config
.
events
.
broadcast
.
status_debomatic
=
'
status_debomatic
'
;
config
.
events
.
broadcast
.
status_debomatic
=
'
status_debomatic
'
;
config
.
events
.
client
=
{};
config
.
events
.
client
=
{};
config
.
events
.
client
.
distribution_packages
=
_event_get_set
(
'
distribution_packages
'
)
;
config
.
events
.
client
.
distribution_packages
=
'
distribution_packages
'
;
config
.
events
.
client
.
distribution_packages
.
status
=
'
package_status
'
;
config
.
events
.
client
.
distribution_packages
.
status
=
'
package_status
'
;
config
.
events
.
client
.
package_files_list
=
_event_get_set
(
'
package_files_list
'
)
;
config
.
events
.
client
.
package_files_list
=
'
package_files_list
'
;
config
.
events
.
client
.
file
=
_event_get_set
(
'
file
'
)
;
config
.
events
.
client
.
file
=
'
file
'
;
config
.
events
.
client
.
file_newcontent
=
'
file_newcontent
'
;
config
.
events
.
client
.
file_newcontent
=
'
file_newcontent
'
;
config
.
events
.
client
.
status
=
'
status
'
;
config
.
events
.
client
.
status
=
'
status
'
;
...
@@ -151,5 +136,13 @@ try {
...
@@ -151,5 +136,13 @@ try {
config
.
web
.
events
=
config
.
events
;
config
.
web
.
events
=
config
.
events
;
config
.
web
.
status
=
config
.
status
;
config
.
web
.
status
=
config
.
status
;
config
.
web
.
host
=
config
.
host
;
config
.
web
.
host
=
config
.
host
;
// calculate pidfile
config
.
debomatic
.
pidfile
=
"
/var/run/debomatic-
"
+
require
(
'
crypto
'
)
.
createHash
(
'
sha256
'
)
.
update
(
config
.
debomatic
.
path
)
.
digest
(
'
hex
'
);
module
.
exports
=
config
;
module
.
exports
=
config
;
}
}
debomatic-webui/public/javascripts/page_distribution.js
View file @
fa32fcfd
...
@@ -159,8 +159,8 @@ function Page_Distrubion(socket) {
...
@@ -159,8 +159,8 @@ function Page_Distrubion(socket) {
if
(
Utils
.
check_view_distribution
(
view
))
{
if
(
Utils
.
check_view_distribution
(
view
))
{
var
query_data
=
{};
var
query_data
=
{};
query_data
.
distribution
=
view
.
distribution
;
query_data
.
distribution
=
view
.
distribution
;
debug_socket
(
'
emit
'
,
_e
.
distribution_packages
.
get
,
query_data
);
debug_socket
(
'
emit
'
,
_e
.
distribution_packages
,
query_data
);
socket
.
emit
(
_e
.
distribution_packages
.
get
,
query_data
);
socket
.
emit
(
_e
.
distribution_packages
,
query_data
);
}
}
},
},
select
:
function
()
{
select
:
function
()
{
...
@@ -256,8 +256,8 @@ function Page_Distrubion(socket) {
...
@@ -256,8 +256,8 @@ function Page_Distrubion(socket) {
var
query_data
=
{};
var
query_data
=
{};
query_data
.
distribution
=
view
.
distribution
;
query_data
.
distribution
=
view
.
distribution
;
query_data
.
package
=
view
.
package
;
query_data
.
package
=
view
.
package
;
debug_socket
(
'
emit
'
,
_e
.
package_files_list
.
get
,
query_data
);
debug_socket
(
'
emit
'
,
_e
.
package_files_list
,
query_data
);
socket
.
emit
(
_e
.
package_files_list
.
get
,
query_data
);
socket
.
emit
(
_e
.
package_files_list
,
query_data
);
}
}
},
},
select
:
function
()
{
select
:
function
()
{
...
@@ -331,8 +331,8 @@ function Page_Distrubion(socket) {
...
@@ -331,8 +331,8 @@ function Page_Distrubion(socket) {
// get a feedback to user while downloading file
// get a feedback to user while downloading file
$
(
'
#file pre
'
).
html
(
'
Downloading file, please wait a while ...
'
);
$
(
'
#file pre
'
).
html
(
'
Downloading file, please wait a while ...
'
);
$
(
'
#file
'
).
show
();
$
(
'
#file
'
).
show
();
debug_socket
(
'
emit
'
,
_e
.
file
.
get
,
query_data
);
debug_socket
(
'
emit
'
,
_e
.
file
,
query_data
);
socket
.
emit
(
_e
.
file
.
get
,
query_data
);
socket
.
emit
(
_e
.
file
,
query_data
);
}
}
},
},
set_preview
:
function
(
preview
)
{
set_preview
:
function
(
preview
)
{
...
@@ -584,13 +584,13 @@ function Page_Distrubion(socket) {
...
@@ -584,13 +584,13 @@ function Page_Distrubion(socket) {
welcome
.
set
(
socket_data
);
welcome
.
set
(
socket_data
);
});
});
socket
.
on
(
_e
.
distribution_packages
.
set
,
function
(
socket_data
)
{
socket
.
on
(
_e
.
distribution_packages
,
function
(
socket_data
)
{
debug_socket
(
'
received
'
,
_e
.
distribution_packages
.
set
,
socket_data
);
debug_socket
(
'
received
'
,
_e
.
distribution_packages
,
socket_data
);
packages
.
set
(
socket_data
);
packages
.
set
(
socket_data
);
});
});
socket
.
on
(
_e
.
distribution_packages
.
status
,
function
(
socket_data
)
{
socket
.
on
(
_e
.
distribution_packages
.
status
,
function
(
socket_data
)
{
debug_socket
(
'
received
'
,
_e
.
distribution_packages
.
set
,
socket_data
);
debug_socket
(
'
received
'
,
_e
.
distribution_packages
,
socket_data
);
packages
.
set_status
(
socket_data
);
packages
.
set_status
(
socket_data
);
sticky
.
set_status
(
socket_data
);
sticky
.
set_status
(
socket_data
);
});
});
...
@@ -600,13 +600,13 @@ function Page_Distrubion(socket) {
...
@@ -600,13 +600,13 @@ function Page_Distrubion(socket) {
sticky
.
set_status
(
socket_data
);
sticky
.
set_status
(
socket_data
);
});
});
socket
.
on
(
_e
.
package_files_list
.
set
,
function
(
socket_data
)
{
socket
.
on
(
_e
.
package_files_list
,
function
(
socket_data
)
{
debug_socket
(
'
received
'
,
_e
.
package_files_list
.
set
,
socket_data
);
debug_socket
(
'
received
'
,
_e
.
package_files_list
,
socket_data
);
files
.
set
(
socket_data
);
files
.
set
(
socket_data
);
});
});
socket
.
on
(
_e
.
file
.
set
,
function
(
socket_data
)
{
socket
.
on
(
_e
.
file
,
function
(
socket_data
)
{
debug_socket
(
'
received
'
,
_e
.
file
.
set
,
socket_data
);
debug_socket
(
'
received
'
,
_e
.
file
,
socket_data
);
file
.
set
(
socket_data
);
file
.
set
(
socket_data
);
});
});
...
@@ -648,7 +648,7 @@ function Page_Distrubion(socket) {
...
@@ -648,7 +648,7 @@ function Page_Distrubion(socket) {
// when page is loaded sidebar has offset().top
// when page is loaded sidebar has offset().top
// equals 0. This is because html is loaded on socket
// equals 0. This is because html is loaded on socket
// events. Sleep a while and call stiky.reset()
// events. Sleep a while and call stiky.reset()
setTimeout
(
sticky
.
r
eset
,
500
);
setTimeout
(
sticky
.
r
,
500
);
// WORKAROUND:
// WORKAROUND:
// On incoming hundred of lines browser goes crazy.
// On incoming hundred of lines browser goes crazy.
...
...
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