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
e2464a82
Commit
e2464a82
authored
Jun 09, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into portable
parents
8423a427
5d814471
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
10 deletions
+42
-10
debomatic-webui/lib/client.js
debomatic-webui/lib/client.js
+10
-4
debomatic-webui/lib/config.js
debomatic-webui/lib/config.js
+6
-1
debomatic-webui/package.json
debomatic-webui/package.json
+3
-0
debomatic-webui/public/javascripts/page_distribution.js
debomatic-webui/public/javascripts/page_distribution.js
+17
-4
debomatic-webui/public/stylesheets/style.css
debomatic-webui/public/stylesheets/style.css
+6
-1
No files found.
debomatic-webui/lib/client.js
View file @
e2464a82
...
@@ -106,7 +106,7 @@ function __send_distribution_packages(event_name, socket, data) {
...
@@ -106,7 +106,7 @@ function __send_distribution_packages(event_name, socket, data) {
});
});
}
}
function
__send_file
(
event_name
,
socket
,
data
)
{
function
__send_file
(
event_name
,
socket
,
data
,
last_lines
)
{
var
file_path
=
utils
.
get_file_path
(
data
);
var
file_path
=
utils
.
get_file_path
(
data
);
fs
.
readFile
(
file_path
,
'
utf8
'
,
function
(
err
,
content
)
{
fs
.
readFile
(
file_path
,
'
utf8
'
,
function
(
err
,
content
)
{
if
(
err
)
{
if
(
err
)
{
...
@@ -114,6 +114,9 @@ function __send_file(event_name, socket, data) {
...
@@ -114,6 +114,9 @@ function __send_file(event_name, socket, data) {
return
;
return
;
}
}
data
.
file
.
orig_name
=
file_path
.
split
(
'
/
'
).
pop
();
data
.
file
.
orig_name
=
file_path
.
split
(
'
/
'
).
pop
();
if
(
last_lines
>
0
)
data
.
file
.
content
=
content
.
split
(
'
\n
'
).
slice
(
-
25
).
join
(
'
\n
'
);
else
data
.
file
.
content
=
content
;
data
.
file
.
content
=
content
;
data
.
file
.
path
=
file_path
.
replace
(
config
.
debomatic
.
path
,
config
.
routes
.
debomatic
);
data
.
file
.
path
=
file_path
.
replace
(
config
.
debomatic
.
path
,
config
.
routes
.
debomatic
);
socket
.
emit
(
event_name
,
data
);
socket
.
emit
(
event_name
,
data
);
...
@@ -126,6 +129,9 @@ function __handler_get_file(socket, data) {
...
@@ -126,6 +129,9 @@ function __handler_get_file(socket, data) {
data
.
file
.
content
=
null
;
data
.
file
.
content
=
null
;
socket
.
emit
(
event_name
,
data
);
socket
.
emit
(
event_name
,
data
);
});
});
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
);
else
__send_file
(
_e
.
file
.
set
,
socket
,
data
);
__send_file
(
_e
.
file
.
set
,
socket
,
data
);
}
}
...
@@ -165,7 +171,7 @@ function Client(socket) {
...
@@ -165,7 +171,7 @@ function Client(socket) {
for
(
var
key
in
socket_watchers
)
{
for
(
var
key
in
socket_watchers
)
{
try
{
try
{
socket_watchers
[
key
].
close
();
socket_watchers
[
key
].
close
();
}
catch
(
err
)
{}
}
catch
(
err
or_watch
)
{}
}
}
});
});
});
});
...
...
debomatic-webui/lib/config.js
View file @
e2464a82
...
@@ -47,6 +47,11 @@ config.web.debomatic.dput.login = 'debomatic';
...
@@ -47,6 +47,11 @@ config.web.debomatic.dput.login = 'debomatic';
config
.
web
.
debomatic
.
dput
.
method
=
'
scp
'
;
config
.
web
.
debomatic
.
dput
.
method
=
'
scp
'
;
config
.
web
.
debomatic
.
dput
.
unsigned_uploads
=
false
;
config
.
web
.
debomatic
.
dput
.
unsigned_uploads
=
false
;
// list of files get preview
config
.
web
.
file
=
{};
config
.
web
.
file
.
preview
=
[
'
buildlog
'
];
config
.
web
.
file
.
num_lines
=
25
;
// default ui settings
// default ui settings
config
.
web
.
preferences
=
{};
config
.
web
.
preferences
=
{};
config
.
web
.
preferences
.
autoscroll
=
true
;
config
.
web
.
preferences
.
autoscroll
=
true
;
...
@@ -62,7 +67,7 @@ config.web.preferences.debug = 0; // debug level - 0 means disabled
...
@@ -62,7 +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.
2.4
'
;
config
.
version
=
'
0.
3.0
'
;
// A simple function to quickly have
// A simple function to quickly have
// get and set strings for client events
// get and set strings for client events
...
...
debomatic-webui/package.json
View file @
e2464a82
...
@@ -13,5 +13,8 @@
...
@@ -13,5 +13,8 @@
},
},
"scripts"
:
{
"scripts"
:
{
"install"
:
"bash scripts/install.sh"
"install"
:
"bash scripts/install.sh"
},
"bin"
:
{
"debomatic-webui"
:
"./debomatic-webui"
}
}
}
}
debomatic-webui/public/javascripts/page_distribution.js
View file @
e2464a82
...
@@ -94,10 +94,17 @@ function Page_Distrubion(socket) {
...
@@ -94,10 +94,17 @@ function Page_Distrubion(socket) {
if
(
Utils
.
check_view_file
(
view
))
{
if
(
Utils
.
check_view_file
(
view
))
{
var
complete_name
=
view
.
package
.
orig_name
+
'
.
'
+
view
.
file
.
name
;
var
complete_name
=
view
.
package
.
orig_name
+
'
.
'
+
view
.
file
.
name
;
window_title
=
complete_name
;
window_title
=
complete_name
;
if
(
!
view
.
file
.
path
);
label
=
complete_name
;
if
(
!
view
.
file
.
path
)
view
.
file
.
path
=
config
.
paths
.
debomatic
+
'
/
'
+
view
.
distribution
.
name
+
'
/pool/
'
+
view
.
package
.
orig_name
+
'
/
'
+
complete_name
;
view
.
file
.
path
=
config
.
paths
.
debomatic
+
'
/
'
+
view
.
distribution
.
name
+
'
/pool/
'
+
view
.
package
.
orig_name
+
'
/
'
+
complete_name
;
label
=
complete_name
+
'
<a class="btn btn-link btn-lg" title="Download" href="
'
+
view
.
file
.
path
+
'
">
'
+
label
+=
'
<a class="btn btn-link btn-lg" title="Download" href="
'
+
view
.
file
.
path
+
'
">
'
+
'
<span class="glyphicon glyphicon-download-alt"></span></a>
'
;
'
<span class="glyphicon glyphicon-download-alt"></span></a>
'
;
if
(
config
.
file
.
preview
.
indexOf
(
view
.
file
.
name
)
>=
0
)
{
var
view_all
=
$
(
'
<a id="get-whole-file" class="btn btn-link btn-lg" title="View the whole file"></a>
'
);
view_all
.
html
(
'
<span class="glyphicon glyphicon-eye-open"></span>
'
);
label
+=
view_all
.
get
(
0
).
outerHTML
;
}
}
else
if
(
Utils
.
check_view_package
(
view
))
}
else
if
(
Utils
.
check_view_package
(
view
))
label
=
view
.
package
.
orig_name
;
label
=
view
.
package
.
orig_name
;
else
if
(
Utils
.
check_view_distribution
(
view
))
else
if
(
Utils
.
check_view_distribution
(
view
))
...
@@ -106,6 +113,11 @@ function Page_Distrubion(socket) {
...
@@ -106,6 +113,11 @@ function Page_Distrubion(socket) {
if
(
window_title
)
if
(
window_title
)
label
=
window_title
;
label
=
window_title
;
page_generic
.
set_window_title
(
label
);
page_generic
.
set_window_title
(
label
);
// set onclick get-whole-file
$
(
"
#get-whole-file
"
).
on
(
'
click
'
,
function
()
{
file
.
get
(
true
);
});
},
},
clean
:
function
()
{
clean
:
function
()
{
$
(
'
#title
'
).
html
(
''
);
$
(
'
#title
'
).
html
(
''
);
...
@@ -286,13 +298,14 @@ function Page_Distrubion(socket) {
...
@@ -286,13 +298,14 @@ function Page_Distrubion(socket) {
}
}
}
}
},
},
get
:
function
()
{
get
:
function
(
force
)
{
if
(
Utils
.
check_view_file
(
view
))
{
if
(
Utils
.
check_view_file
(
view
))
{
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
;
query_data
.
file
=
view
.
file
;
query_data
.
file
=
view
.
file
;
query_data
.
file
.
content
=
null
;
query_data
.
file
.
content
=
null
;
query_data
.
file
.
force
=
force
;
// 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
();
...
...
debomatic-webui/public/stylesheets/style.css
View file @
e2464a82
...
@@ -151,3 +151,8 @@ footer {
...
@@ -151,3 +151,8 @@ footer {
border
:
none
;
border
:
none
;
color
:
#101010
;
color
:
#101010
;
}
}
#title
a
.btn
{
padding-right
:
0
;
float
:
right
;
}
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