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
13d18993
Commit
13d18993
authored
Jul 27, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'github/master' into portable
parents
268bc556
a7c2e911
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
80 additions
and
28 deletions
+80
-28
History.md
History.md
+8
-4
debomatic-modules/JSONLogger.py
debomatic-modules/JSONLogger.py
+18
-9
debomatic-webui/public/javascripts/page_distribution.js
debomatic-webui/public/javascripts/page_distribution.js
+25
-12
debomatic-webui/public/javascripts/page_generic.js
debomatic-webui/public/javascripts/page_generic.js
+3
-3
debomatic-webui/public/stylesheets/style.css
debomatic-webui/public/stylesheets/style.css
+26
-0
No files found.
History.md
View file @
13d18993
# unreleased
*
[new] show file size for package files
*
[new] disable autoscroll pressing on "back on top" panel
# 1.0.0 (2014-07-23)
# 1.0.0 (2014-07-23)
*
Migrate to coffee-script, code refactory
*
Migrate to coffee-script, code refactory
*
[new] style - more focus on files content
*
[new] style - more focus on files content
*
[new] removed useless header, save space
*
[new] removed useless header, save space
*
[new] move git repo to debomatic organization in github
*
[new] move git repo to debomatic organization in github
*
[fix] merge correctly user configuration - closes #
1
*
[fix] merge correctly user configuration - closes #
2
*
[fix] read correctly user configuration with absolute path - closes #
2
*
[fix] read correctly user configuration with absolute path - closes #
3
*
[fix] wait for the creation of the json log if does not exists -
#closes 3
*
[fix] wait for the creation of the json log if does not exists -
closes #4
# 0.6.0 (2014-07-10)
# 0.6.0 (2014-07-10)
*
[new] [module] write a JSON file about package status in its own directory
*
[new] [module] write a JSON file about package status in its own directory
...
@@ -16,7 +20,7 @@
...
@@ -16,7 +20,7 @@
*
[new] double click on a package in the list make an automatic search
*
[new] double click on a package in the list make an automatic search
*
[new] add slide up and down effect while searching packages
*
[new] add slide up and down effect while searching packages
*
[new] set files list to not send to client as configurable
*
[new] set files list to not send to client as configurable
*
[fix] prevent crashes filtering out request to chroots - send back 403 HTTP status
*
[fix] prevent crashes filtering out request to chroots - send back 403 HTTP status
- closes #1
*
[fix] escape correctly HTML in file content
*
[fix] escape correctly HTML in file content
*
[fix] auto-populate page on socket connect instead of on page loads
*
[fix] auto-populate page on socket connect instead of on page loads
*
[fix] preferences does not set correctly if value is false
*
[fix] preferences does not set correctly if value is false
...
...
debomatic-modules/JSONLogger.py
View file @
13d18993
...
@@ -119,6 +119,12 @@ class DebomaticModule_JSONLogger:
...
@@ -119,6 +119,12 @@ class DebomaticModule_JSONLogger:
json
=
toJSON
(
info
,
indent
=
4
,
sort_keys
=
True
)
json
=
toJSON
(
info
,
indent
=
4
,
sort_keys
=
True
)
infofd
.
write
(
json
+
'
\
n
'
)
infofd
.
write
(
json
+
'
\
n
'
)
def
_get_human_size
(
self
,
num
):
for
x
in
[
'b'
,
'KB'
,
'MB'
,
'GB'
,
'TB'
]:
if
num
<
1024.0
:
return
"%3.1f %s"
%
(
num
,
x
)
num
/=
1024.0
def
pre_chroot
(
self
,
args
):
def
pre_chroot
(
self
,
args
):
distribution
=
self
.
_get_distribution_status
(
args
)
distribution
=
self
.
_get_distribution_status
(
args
)
self
.
_append_json_logfile
(
args
,
distribution
)
self
.
_append_json_logfile
(
args
,
distribution
)
...
@@ -139,18 +145,21 @@ class DebomaticModule_JSONLogger:
...
@@ -139,18 +145,21 @@ class DebomaticModule_JSONLogger:
def
post_build
(
self
,
args
):
def
post_build
(
self
,
args
):
status
=
self
.
_get_package_status
(
args
)
status
=
self
.
_get_package_status
(
args
)
status
[
'status'
]
=
'build'
status
[
'status'
]
=
'build'
status
[
'success'
]
=
False
status
[
'success'
]
=
args
[
'success'
]
status
[
'
tag
s'
]
=
{}
status
[
'
file
s'
]
=
{}
resultdir
=
os
.
path
.
join
(
args
[
'directory'
],
'pool'
,
args
[
'package'
])
resultdir
=
os
.
path
.
join
(
args
[
'directory'
],
'pool'
,
args
[
'package'
])
for
filename
in
os
.
listdir
(
resultdir
):
for
filename
in
os
.
listdir
(
resultdir
):
if
filename
.
endswith
(
'.dsc'
):
if
filename
.
endswith
(
'.json'
):
status
[
'success'
]
=
True
continue
else
:
full_path
=
os
.
path
.
join
(
resultdir
,
filename
)
full_path
=
os
.
path
.
join
(
resultdir
,
filename
)
info
=
{}
tag
=
LogParser
(
full_path
).
parse
()
info
[
'size'
]
=
self
.
_get_human_size
(
os
.
path
.
getsize
(
full_path
))
if
tag
:
tag
=
LogParser
(
full_path
).
parse
()
status
[
'tags'
][
filename
]
=
tag
if
tag
:
info
[
'tags'
]
=
tag
status
[
'files'
][
filename
]
=
info
self
.
_write_package_json
(
args
,
status
)
self
.
_write_package_json
(
args
,
status
)
status
.
pop
(
'files'
,
None
)
self
.
_append_json_logfile
(
args
,
status
)
self
.
_append_json_logfile
(
args
,
status
)
...
...
debomatic-webui/public/javascripts/page_distribution.js
View file @
13d18993
...
@@ -73,6 +73,7 @@ function Page_Distrubion(socket) {
...
@@ -73,6 +73,7 @@ function Page_Distrubion(socket) {
var
sidebarOffset
=
0
;
var
sidebarOffset
=
0
;
var
new_lines
=
[];
var
new_lines
=
[];
var
current_file_in_preview
=
false
;
var
current_file_in_preview
=
false
;
var
back_on_top_pressed
=
false
;
function
__check_hash_makes_sense
()
{
function
__check_hash_makes_sense
()
{
if
(
window
.
location
.
hash
.
indexOf
(
'
..
'
)
>=
0
)
{
if
(
window
.
location
.
hash
.
indexOf
(
'
..
'
)
>=
0
)
{
...
@@ -270,8 +271,8 @@ function Page_Distrubion(socket) {
...
@@ -270,8 +271,8 @@ function Page_Distrubion(socket) {
var
html_file
=
$
(
'
<li id="file-
'
+
f
.
orig_name
+
'
">
'
+
var
html_file
=
$
(
'
<li id="file-
'
+
f
.
orig_name
+
'
">
'
+
'
<a title="
'
+
f
.
orig_name
+
'
" href="
'
+
'
<a title="
'
+
f
.
orig_name
+
'
" href="
'
+
Utils
.
from_view_to_hash
(
tmp
)
+
'
">
'
+
Utils
.
from_view_to_hash
(
tmp
)
+
'
">
'
+
'
<span class="
statu
s pull-right"></span>
'
+
'
<span class="
tag
s pull-right"></span>
'
+
f
.
name
+
'
</a></li>
'
);
'
<span class="name">
'
+
f
.
name
+
'
</span>
</a></li>
'
);
html_file
.
on
(
'
click
'
,
function
()
{
html_file
.
on
(
'
click
'
,
function
()
{
files
.
select
(
this
);
files
.
select
(
this
);
});
});
...
@@ -286,7 +287,7 @@ function Page_Distrubion(socket) {
...
@@ -286,7 +287,7 @@ function Page_Distrubion(socket) {
view
.
package
.
debs
=
Utils
.
clone
(
socket_data
.
package
.
debs
);
view
.
package
.
debs
=
Utils
.
clone
(
socket_data
.
package
.
debs
);
// update.html
// update.html
socket_data
.
package
.
debs
.
forEach
(
function
(
f
)
{
socket_data
.
package
.
debs
.
forEach
(
function
(
f
)
{
$
(
'
#debs ul
'
).
append
(
'
<li><a title="
'
+
f
.
orig_name
+
'
" href="
'
+
f
.
path
+
'
">
'
+
$
(
'
#debs ul
'
).
append
(
'
<li
id="file-
'
+
f
.
orig_name
+
'
"
><a title="
'
+
f
.
orig_name
+
'
" href="
'
+
f
.
path
+
'
">
'
+
f
.
name
+
'
</a> <span>.
'
+
f
.
extension
+
'
</span></li>
'
);
f
.
name
+
'
</a> <span>.
'
+
f
.
extension
+
'
</span></li>
'
);
});
});
$
(
'
#debs
'
).
show
();
$
(
'
#debs
'
).
show
();
...
@@ -297,7 +298,7 @@ function Page_Distrubion(socket) {
...
@@ -297,7 +298,7 @@ function Page_Distrubion(socket) {
view
.
package
.
sources
=
Utils
.
clone
(
socket_data
.
package
.
sources
);
view
.
package
.
sources
=
Utils
.
clone
(
socket_data
.
package
.
sources
);
// update html
// update html
socket_data
.
package
.
sources
.
forEach
(
function
(
f
)
{
socket_data
.
package
.
sources
.
forEach
(
function
(
f
)
{
$
(
'
#sources ul
'
).
append
(
'
<li><a title="
'
+
f
.
orig_name
+
'
" href="
'
+
f
.
path
+
'
">
'
+
f
.
name
+
'
</a></li>
'
);
$
(
'
#sources ul
'
).
append
(
'
<li
id="file-
'
+
f
.
orig_name
+
'
"
><a title="
'
+
f
.
orig_name
+
'
" href="
'
+
f
.
path
+
'
">
'
+
f
.
name
+
'
</a></li>
'
);
});
});
$
(
'
#sources
'
).
show
();
$
(
'
#sources
'
).
show
();
}
}
...
@@ -338,8 +339,13 @@ function Page_Distrubion(socket) {
...
@@ -338,8 +339,13 @@ function Page_Distrubion(socket) {
show
:
function
()
{
show
:
function
()
{
$
(
'
#files
'
).
show
();
$
(
'
#files
'
).
show
();
},
},
set_status
:
function
(
file
,
status
)
{
set_tags
:
function
(
file
,
tags
)
{
$
(
'
#logs li[id="file-
'
+
file
+
'
"] .status
'
).
html
(
status
);
console
.
log
(
file
,
tags
);
$
(
'
li[id="file-
'
+
file
+
'
"] .tags
'
).
html
(
tags
);
},
set_size
:
function
(
file
,
size
)
{
//console.log(file, size);
$
(
'
[id="file-
'
+
file
+
'
"] a
'
).
append
(
'
<span class="size">
'
+
size
+
'
</span>
'
);
}
}
};
};
...
@@ -367,11 +373,15 @@ function Page_Distrubion(socket) {
...
@@ -367,11 +373,15 @@ function Page_Distrubion(socket) {
return
result
;
return
result
;
}
}
if
(
socket_data
.
hasOwnProperty
(
'
tags
'
))
{
if
(
socket_data
.
hasOwnProperty
(
'
files
'
))
{
var
tags
=
socket_data
.
tags
;
var
s_files
=
socket_data
.
files
;
for
(
var
file
in
tags
)
{
for
(
var
file
in
s_files
)
{
if
(
tags
.
hasOwnProperty
(
file
))
if
(
s_files
.
hasOwnProperty
(
file
))
{
files
.
set_status
(
file
,
tags
[
file
]);
if
(
s_files
[
file
].
hasOwnProperty
(
'
tags
'
))
files
.
set_tags
(
file
,
s_files
[
file
].
tags
);
if
(
s_files
[
file
].
hasOwnProperty
(
'
size
'
))
files
.
set_size
(
file
,
s_files
[
file
].
size
);
}
}
}
}
}
...
@@ -407,6 +417,7 @@ function Page_Distrubion(socket) {
...
@@ -407,6 +417,7 @@ function Page_Distrubion(socket) {
var
file
=
{
var
file
=
{
set
:
function
(
socket_data
)
{
set
:
function
(
socket_data
)
{
back_on_top_pressed
=
false
;
var
new_content
=
Utils
.
escape_html
(
socket_data
.
file
.
content
);
var
new_content
=
Utils
.
escape_html
(
socket_data
.
file
.
content
);
var
file_content
=
$
(
'
#file .content
'
);
var
file_content
=
$
(
'
#file .content
'
);
view
.
file
=
Utils
.
clone
(
socket_data
.
file
);
view
.
file
=
Utils
.
clone
(
socket_data
.
file
);
...
@@ -424,7 +435,7 @@ function Page_Distrubion(socket) {
...
@@ -424,7 +435,7 @@ function Page_Distrubion(socket) {
new_content
=
Utils
.
escape_html
(
new_content
);
new_content
=
Utils
.
escape_html
(
new_content
);
if
(
!
current_file_in_preview
)
{
if
(
!
current_file_in_preview
)
{
file_content
.
append
(
new_content
);
file_content
.
append
(
new_content
);
if
(
config
.
preferences
.
autoscroll
)
{
if
(
config
.
preferences
.
autoscroll
&&
!
back_on_top_pressed
)
{
// scroll down if file is covering footer
// scroll down if file is covering footer
var
file_height
=
$
(
'
#fileOffset
'
).
offset
().
top
;
var
file_height
=
$
(
'
#fileOffset
'
).
offset
().
top
;
var
footerOffset
=
$
(
'
footer
'
).
offset
().
top
;
var
footerOffset
=
$
(
'
footer
'
).
offset
().
top
;
...
@@ -793,6 +804,8 @@ function Page_Distrubion(socket) {
...
@@ -793,6 +804,8 @@ function Page_Distrubion(socket) {
// Init sticky-package back_on_top on click
// Init sticky-package back_on_top on click
$
(
'
#sticky-package
'
).
on
(
'
click
'
,
function
()
{
$
(
'
#sticky-package
'
).
on
(
'
click
'
,
function
()
{
back_on_top_pressed
=
true
;
debug
(
1
,
'
back on top pressed, disabling autoscroll
'
)
page
.
go
.
up
(
100
);
page
.
go
.
up
(
100
);
});
});
...
...
debomatic-webui/public/javascripts/page_generic.js
View file @
13d18993
...
@@ -188,12 +188,12 @@ function Page_Generic() {
...
@@ -188,12 +188,12 @@ function Page_Generic() {
this
.
preferences
();
this
.
preferences
();
// show the smile face
// show the smile face
$
(
'
#footer .copyright
'
).
mouseenter
(
function
()
{
$
(
'
#footer .copyright
a
'
).
mouseenter
(
function
()
{
$
(
'
#smile
'
).
animate
({
$
(
'
#smile
'
).
delay
(
250
).
animate
({
'
background-position-y
'
:
'
-50px
'
'
background-position-y
'
:
'
-50px
'
},
200
);
},
200
);
}).
mouseleave
(
function
()
{
}).
mouseleave
(
function
()
{
$
(
'
#smile
'
).
animate
({
$
(
'
#smile
'
).
stop
().
stop
().
animate
({
'
background-position-y
'
:
'
20px
'
'
background-position-y
'
:
'
20px
'
},
150
);
},
150
);
});
});
...
...
debomatic-webui/public/stylesheets/style.css
View file @
13d18993
...
@@ -141,6 +141,32 @@ footer .info {
...
@@ -141,6 +141,32 @@ footer .info {
margin-top
:
-3px
;
margin-top
:
-3px
;
}
}
#files
.size
{
margin
:
0
8px
0
0
;
font-size
:
70%
;
color
:
rgba
(
0
,
0
,
0
,
0.25
);
float
:
right
;
min-width
:
60px
;
text-align
:
right
;
display
:
inline-block
;
line-height
:
20px
;
text-shadow
:
0
1px
1px
white
;
}
#logs
.size
{
float
:
none
;
line-height
:
inherit
;
}
#logs
.active
.size
{
text-shadow
:
none
;
}
#logs
.name
{
min-width
:
75px
;
display
:
inline-block
;
}
#status
span
{
#status
span
{
font-weight
:
bold
;
font-weight
:
bold
;
font-size
:
small
;
font-size
:
small
;
...
...
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