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
270be602
Commit
270be602
authored
Jul 25, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handle new file size when receive package info event
parent
5738ae54
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
11 deletions
+36
-11
debomatic-webui/public/javascripts/page_distribution.js
debomatic-webui/public/javascripts/page_distribution.js
+20
-11
debomatic-webui/public/stylesheets/style.css
debomatic-webui/public/stylesheets/style.css
+16
-0
No files found.
debomatic-webui/public/javascripts/page_distribution.js
View file @
270be602
...
...
@@ -270,8 +270,8 @@ function Page_Distrubion(socket) {
var
html_file
=
$
(
'
<li id="file-
'
+
f
.
orig_name
+
'
">
'
+
'
<a title="
'
+
f
.
orig_name
+
'
" href="
'
+
Utils
.
from_view_to_hash
(
tmp
)
+
'
">
'
+
'
<span class="
statu
s pull-right"></span>
'
+
f
.
name
+
'
</a></li>
'
);
'
<span class="
tag
s pull-right"></span>
'
+
'
<span class="name">
'
+
f
.
name
+
'
</span>
</a></li>
'
);
html_file
.
on
(
'
click
'
,
function
()
{
files
.
select
(
this
);
});
...
...
@@ -286,7 +286,7 @@ function Page_Distrubion(socket) {
view
.
package
.
debs
=
Utils
.
clone
(
socket_data
.
package
.
debs
);
// update.html
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>
'
);
});
$
(
'
#debs
'
).
show
();
...
...
@@ -297,7 +297,7 @@ function Page_Distrubion(socket) {
view
.
package
.
sources
=
Utils
.
clone
(
socket_data
.
package
.
sources
);
// update html
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
();
}
...
...
@@ -338,8 +338,13 @@ function Page_Distrubion(socket) {
show
:
function
()
{
$
(
'
#files
'
).
show
();
},
set_status
:
function
(
file
,
status
)
{
$
(
'
#logs li[id="file-
'
+
file
+
'
"] .status
'
).
html
(
status
);
set_tags
:
function
(
file
,
tags
)
{
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 +372,15 @@ function Page_Distrubion(socket) {
return
result
;
}
if
(
socket_data
.
hasOwnProperty
(
'
tags
'
))
{
var
tags
=
socket_data
.
tags
;
for
(
var
file
in
tags
)
{
if
(
tags
.
hasOwnProperty
(
file
))
files
.
set_status
(
file
,
tags
[
file
]);
if
(
socket_data
.
hasOwnProperty
(
'
files
'
))
{
var
s_files
=
socket_data
.
files
;
for
(
var
file
in
s_files
)
{
if
(
s_files
.
hasOwnProperty
(
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
);
}
}
}
...
...
debomatic-webui/public/stylesheets/style.css
View file @
270be602
...
...
@@ -141,6 +141,22 @@ footer .info {
margin-top
:
-3px
;
}
#files
.size
{
margin
:
0
8px
;
font-size
:
70%
;
color
:
rgba
(
0
,
0
,
0
,
0.3
);
float
:
right
;
}
#logs
.size
{
float
:
none
;
}
#logs
.name
{
min-width
:
75px
;
display
:
inline-block
;
}
#status
span
{
font-weight
:
bold
;
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