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
fae96602
Commit
fae96602
authored
Jun 13, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into portable
parents
86a14982
accf5a4f
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
63 additions
and
12 deletions
+63
-12
History.md
History.md
+5
-0
debomatic-webui/lib/config.js
debomatic-webui/lib/config.js
+1
-1
debomatic-webui/public/javascripts/page_distribution.js
debomatic-webui/public/javascripts/page_distribution.js
+44
-4
debomatic-webui/public/javascripts/page_generic.js
debomatic-webui/public/javascripts/page_generic.js
+9
-7
debomatic-webui/public/stylesheets/style.css
debomatic-webui/public/stylesheets/style.css
+4
-0
No files found.
History.md
View file @
fae96602
# 0.4.1 (2014-06-13)
*
[fix] preview file using a fixed max-height on new content
*
[fix] show and hide correctly debomatic status when build packages
*
[fix] reduce update delay when get new content (now 150 ms)
# 0.4.0 (2014-06-12)
*
[new] always show only max_lines in preview, also when new_content is recevied
*
[new] get debomatic real status by reading pidfile in /var/run directory
...
...
debomatic-webui/lib/config.js
View file @
fae96602
...
...
@@ -67,7 +67,7 @@ config.web.preferences.debug = 0; // debug level - 0 means disabled
// DO NOT TOUCH these ones
config
.
version
=
'
0.4.
0
'
;
config
.
version
=
'
0.4.
1
'
;
// A simple function to quickly have
// get and set strings for client events
...
...
debomatic-webui/public/javascripts/page_distribution.js
View file @
fae96602
...
...
@@ -68,6 +68,7 @@ function Page_Distrubion(socket) {
var
_e
=
config
.
events
.
client
;
var
view
=
Utils
.
from_hash_to_view
();
var
sidebarOffset
=
0
;
var
new_lines
=
[];
var
current_file_in_preview
=
false
;
function
__check_hash_makes_sense
()
{
...
...
@@ -102,8 +103,7 @@ function Page_Distrubion(socket) {
view
.
file
.
path
=
config
.
paths
.
debomatic
+
'
/
'
+
view
.
distribution
.
name
+
'
/pool/
'
+
view
.
package
.
orig_name
+
'
/
'
+
complete_name
;
label
+=
'
<a class="btn btn-link btn-lg" title="Download" href="
'
+
view
.
file
.
path
+
'
">
'
+
'
<span class="glyphicon glyphicon-download-alt"></span></a>
'
;
if
(
config
.
file
.
preview
.
indexOf
(
view
.
file
.
name
)
>=
0
)
{
current_file_in_preview
=
true
;
if
(
current_file_in_preview
)
{
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
;
...
...
@@ -120,8 +120,9 @@ function Page_Distrubion(socket) {
// set onclick get-whole-file
$
(
"
#get-whole-file
"
).
on
(
'
click
'
,
function
()
{
debug
(
1
,
"
get the whole file
"
);
file
.
get
(
true
);
current_file_in_preview
=
false
;
$
(
this
).
remove
()
;
});
},
clean
:
function
()
{
...
...
@@ -282,6 +283,8 @@ function Page_Distrubion(socket) {
view
.
file
=
Utils
.
clone
(
socket_data
.
file
);
$
(
'
#file pre
'
).
html
(
socket_data
.
file
.
content
);
$
(
'
#file
'
).
show
();
if
(
current_file_in_preview
)
$
(
'
#file pre
'
).
scrollTop
(
$
(
'
#file pre
'
)[
0
].
scrollHeight
);
},
clean
:
function
()
{
$
(
'
#file pre
'
).
html
(
''
);
...
...
@@ -297,6 +300,7 @@ function Page_Distrubion(socket) {
content
=
content
.
concat
(
new_content
.
replace
(
/
\n
$/
,
''
).
split
(
'
\n
'
));
content
=
content
.
slice
(
-
config
.
file
.
num_lines
).
join
(
'
\n
'
);
$
(
'
#file pre
'
).
html
(
content
);
$
(
'
#file pre
'
).
scrollTop
(
$
(
'
#file pre
'
)[
0
].
scrollHeight
);
}
if
(
config
.
preferences
.
autoscroll
)
{
...
...
@@ -313,6 +317,11 @@ function Page_Distrubion(socket) {
},
get
:
function
(
force
)
{
if
(
Utils
.
check_view_file
(
view
))
{
if
(
force
)
{
file
.
set_preview
(
false
);
}
else
{
file
.
set_preview
();
}
var
query_data
=
{};
query_data
.
distribution
=
view
.
distribution
;
query_data
.
package
=
view
.
package
;
...
...
@@ -325,7 +334,26 @@ function Page_Distrubion(socket) {
debug_socket
(
'
emit
'
,
_e
.
file
.
get
,
query_data
);
socket
.
emit
(
_e
.
file
.
get
,
query_data
);
}
},
set_preview
:
function
(
preview
)
{
if
(
preview
===
undefined
)
{
preview
=
config
.
file
.
preview
.
indexOf
(
view
.
file
.
name
)
>=
0
;
}
debug
(
2
,
"
file set preview
"
,
preview
);
current_file_in_preview
=
preview
;
if
(
preview
)
{
$
(
'
#file pre
'
).
addClass
(
'
preview
'
);
var
height
=
(
config
.
file
.
num_lines
)
*
parseInt
(
$
(
'
#file pre
'
).
css
(
'
line-height
'
).
replace
(
/
[^
-
\d\.]
/g
,
''
))
+
parseInt
(
$
(
'
#file pre
'
).
css
(
'
padding-top
'
).
replace
(
/
[^
-
\d\.]
/g
,
''
))
+
parseInt
(
$
(
'
#file pre
'
).
css
(
'
padding-bottom
'
).
replace
(
/
[^
-
\d\.]
/g
,
''
));
$
(
'
#file pre
'
).
css
(
'
max-height
'
,
height
);
}
else
{
$
(
'
#file pre
'
).
removeClass
(
'
preview
'
);
$
(
'
#file pre
'
).
css
(
'
max-height
'
,
'
auto
'
);
}
}
};
var
breadcrumb
=
{
...
...
@@ -584,7 +612,7 @@ function Page_Distrubion(socket) {
socket
.
on
(
_e
.
file_newcontent
,
function
(
socket_data
)
{
debug_socket
(
'
received
'
,
_e
.
file_newcontent
,
socket_data
);
file
.
append
(
socket_data
.
file
.
new_content
);
new_lines
.
push
(
socket_data
.
file
.
new_content
);
});
$
(
window
).
on
(
'
hashchange
'
,
function
()
{
...
...
@@ -622,6 +650,18 @@ function Page_Distrubion(socket) {
// events. Sleep a while and call stiky.reset()
setTimeout
(
sticky
.
reset
,
500
);
// WORKAROUND:
// On incoming hundred of lines browser goes crazy.
// Append lines every 200 mills.
function
watch_for_new_lines
()
{
if
(
new_lines
.
length
>
0
)
{
file
.
append
(
new_lines
.
join
(
''
));
new_lines
=
[];
}
setTimeout
(
watch_for_new_lines
,
150
);
}
watch_for_new_lines
();
// Update html according with preferences
preferences
();
...
...
debomatic-webui/public/javascripts/page_generic.js
View file @
fae96602
...
...
@@ -75,6 +75,7 @@ function Page_Generic() {
var
status
=
{
set
:
function
(
data_status
)
{
if
(
!
data_status
)
{
if
(
$
(
'
#status li
'
).
length
===
0
)
{
if
(
status_debomatic
.
running
)
{
$
(
'
#status .idle
'
).
show
();
$
(
'
#status .norunning
'
).
hide
();
...
...
@@ -82,6 +83,7 @@ function Page_Generic() {
$
(
'
#status .idle
'
).
hide
();
$
(
'
#status .norunning
'
).
show
();
}
}
}
else
{
$
(
'
#status ul
'
).
html
(
''
);
if
(
data_status
.
length
>
0
)
{
...
...
@@ -92,7 +94,7 @@ function Page_Generic() {
}
},
append
:
function
(
status_data
)
{
$
(
'
#status .
idle
'
).
hide
();
$
(
'
#status .
debomatic
'
).
hide
();
$
(
'
#status ul
'
).
append
(
__get_status_html
(
status_data
));
},
update
:
function
(
status_data
)
{
...
...
debomatic-webui/public/stylesheets/style.css
View file @
fae96602
...
...
@@ -156,6 +156,10 @@ footer {
color
:
#101010
;
}
#file
pre
.preview
{
overflow
:
hidden
;
}
#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