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
eae8dc7a
Commit
eae8dc7a
authored
Mar 10, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed local data from set and get
parent
c1643db6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
34 deletions
+25
-34
debomatic-webui/public/javascripts/page_distribution.js
debomatic-webui/public/javascripts/page_distribution.js
+25
-34
No files found.
debomatic-webui/public/javascripts/page_distribution.js
View file @
eae8dc7a
...
@@ -12,9 +12,7 @@ function Page_Distrubion()
...
@@ -12,9 +12,7 @@ function Page_Distrubion()
}
}
var
title
=
{
var
title
=
{
set
:
function
(
data
)
{
set
:
function
()
{
if
(
!
data
)
data
=
Utils
.
from_hash_to_data
()
var
label
=
''
var
label
=
''
if
(
Utils
.
check_data_file
(
data
))
{
if
(
Utils
.
check_data_file
(
data
))
{
var
complete_name
=
data
.
package
.
orig_name
+
'
.
'
+
data
.
file
.
name
var
complete_name
=
data
.
package
.
orig_name
+
'
.
'
+
data
.
file
.
name
...
@@ -37,23 +35,21 @@ function Page_Distrubion()
...
@@ -37,23 +35,21 @@ function Page_Distrubion()
}
}
var
packages
=
{
var
packages
=
{
set
:
function
(
data
)
{
set
:
function
(
socket_
data
)
{
$
(
'
#packages ul
'
).
html
(
''
)
$
(
'
#packages ul
'
).
html
(
''
)
var
tmp
=
data
var
tmp
=
socket_
data
tmp
.
file
=
null
tmp
.
file
=
null
data
.
distribution
.
packages
.
forEach
(
function
(
p
){
socket_
data
.
distribution
.
packages
.
forEach
(
function
(
p
){
tmp
.
package
=
p
tmp
.
package
=
p
$
(
'
#packages ul
'
).
append
(
'
<li id="package-
'
+
p
.
orig_name
+
'
"><a href="
'
+
Utils
.
from_data_to_hash
(
tmp
)
+
'
">
'
+
p
.
name
+
'
<span>
'
+
p
.
version
+
'
</span></a></li>
'
)
$
(
'
#packages ul
'
).
append
(
'
<li id="package-
'
+
p
.
orig_name
+
'
"><a href="
'
+
Utils
.
from_data_to_hash
(
tmp
)
+
'
">
'
+
p
.
name
+
'
<span>
'
+
p
.
version
+
'
</span></a></li>
'
)
})
})
select
()
packages
.
select
()
},
},
clean
:
function
()
{
clean
:
function
()
{
$
(
'
#packages ul
'
).
html
(
''
)
$
(
'
#packages ul
'
).
html
(
''
)
},
},
get
:
function
(
data
)
{
get
:
function
()
{
if
(
!
data
)
data
=
Utils
.
from_hash_to_data
()
if
(
Utils
.
check_data_distribution
(
data
))
{
if
(
Utils
.
check_data_distribution
(
data
))
{
var
new_data
=
{}
var
new_data
=
{}
new_data
.
distribution
=
data
.
distribution
new_data
.
distribution
=
data
.
distribution
...
@@ -72,12 +68,12 @@ function Page_Distrubion()
...
@@ -72,12 +68,12 @@ function Page_Distrubion()
}
}
var
files
=
{
var
files
=
{
set
:
function
(
data
)
{
set
:
function
(
socket_
data
)
{
files
.
clean
()
files
.
clean
()
var
tmp
=
data
var
tmp
=
socket_
data
if
(
data
.
package
.
files
&&
data
.
package
.
files
.
length
>
0
)
{
if
(
socket_data
.
package
.
files
&&
socket_
data
.
package
.
files
.
length
>
0
)
{
selected_file
=
Utils
.
check_data_file
(
data
)
selected_file
=
Utils
.
check_data_file
(
socket_
data
)
data
.
package
.
files
.
forEach
(
function
(
f
){
socket_
data
.
package
.
files
.
forEach
(
function
(
f
){
tmp
.
file
=
f
tmp
.
file
=
f
var
html_file
=
$
(
'
<li id="file-
'
+
f
.
orig_name
+
'
"><a title="
'
+
f
.
orig_name
+
'
" href="
'
+
Utils
.
from_data_to_hash
(
tmp
)
+
'
">
'
+
f
.
name
+
'
</a></li>
'
)
var
html_file
=
$
(
'
<li id="file-
'
+
f
.
orig_name
+
'
"><a title="
'
+
f
.
orig_name
+
'
" href="
'
+
Utils
.
from_data_to_hash
(
tmp
)
+
'
">
'
+
f
.
name
+
'
</a></li>
'
)
html_file
.
on
(
"
click
"
,
function
(){
html_file
.
on
(
"
click
"
,
function
(){
...
@@ -86,18 +82,18 @@ function Page_Distrubion()
...
@@ -86,18 +82,18 @@ function Page_Distrubion()
$
(
'
#logs ul
'
).
append
(
html_file
)
$
(
'
#logs ul
'
).
append
(
html_file
)
})
})
$
(
'
#logs
'
).
show
()
$
(
'
#logs
'
).
show
()
select
()
files
.
select
()
}
}
if
(
data
.
package
.
debs
&&
data
.
package
.
debs
.
length
>
0
)
{
if
(
socket_data
.
package
.
debs
&&
socket_
data
.
package
.
debs
.
length
>
0
)
{
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
+
'
">
'
+
f
.
name
+
'
</a> <span>.
'
+
f
.
label
+
'
</span></li>
'
)
$
(
'
#debs ul
'
).
append
(
'
<li><a title="
'
+
f
.
orig_name
+
'
" href="
'
+
f
.
path
+
'
">
'
+
f
.
name
+
'
</a> <span>.
'
+
f
.
label
+
'
</span></li>
'
)
})
})
$
(
'
#debs
'
).
show
()
$
(
'
#debs
'
).
show
()
}
}
if
(
data
.
package
.
sources
&&
data
.
package
.
sources
.
length
>
0
)
{
if
(
socket_data
.
package
.
sources
&&
socket_
data
.
package
.
sources
.
length
>
0
)
{
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><a title="
'
+
f
.
orig_name
+
'
" href="
'
+
f
.
path
+
'
">
'
+
f
.
name
+
'
</a></li>
'
)
})
})
$
(
'
#sources
'
).
show
()
$
(
'
#sources
'
).
show
()
...
@@ -113,9 +109,7 @@ function Page_Distrubion()
...
@@ -113,9 +109,7 @@ function Page_Distrubion()
$
(
'
#sources
'
).
hide
()
$
(
'
#sources
'
).
hide
()
$
(
'
#files
'
).
hide
()
$
(
'
#files
'
).
hide
()
},
},
get
:
function
(
data
)
{
get
:
function
()
{
if
(
!
data
)
data
=
Utils
.
from_hash_to_data
()
if
(
Utils
.
check_data_package
(
data
))
{
if
(
Utils
.
check_data_package
(
data
))
{
var
new_data
=
{}
var
new_data
=
{}
new_data
.
distribution
=
data
.
distribution
new_data
.
distribution
=
data
.
distribution
...
@@ -135,8 +129,8 @@ function Page_Distrubion()
...
@@ -135,8 +129,8 @@ function Page_Distrubion()
}
}
var
file
=
{
var
file
=
{
set
:
function
(
data
)
{
set
:
function
(
socket_
data
)
{
$
(
"
#file pre
"
).
html
(
data
.
file
.
content
)
$
(
"
#file pre
"
).
html
(
socket_
data
.
file
.
content
)
$
(
"
#file
"
).
show
()
$
(
"
#file
"
).
show
()
select
()
select
()
},
},
...
@@ -151,9 +145,7 @@ function Page_Distrubion()
...
@@ -151,9 +145,7 @@ function Page_Distrubion()
if
(
AUTOSCROLL
)
// scroll down
if
(
AUTOSCROLL
)
// scroll down
$
(
'
body,html
'
).
animate
({
scrollTop
:
$
(
'
#file pre
'
).
height
()
},
500
);
$
(
'
body,html
'
).
animate
({
scrollTop
:
$
(
'
#file pre
'
).
height
()
},
500
);
},
},
get
:
function
(
data
)
{
get
:
function
()
{
if
(
!
data
)
data
=
Utils
.
from_hash_to_data
()
if
(
Utils
.
check_data_file
(
data
))
{
if
(
Utils
.
check_data_file
(
data
))
{
var
new_data
=
{}
var
new_data
=
{}
new_data
.
distribution
=
data
.
distribution
new_data
.
distribution
=
data
.
distribution
...
@@ -247,8 +239,7 @@ function Page_Distrubion()
...
@@ -247,8 +239,7 @@ function Page_Distrubion()
data
.
package
.
orig_name
!=
old_data
.
package
.
orig_name
)
data
.
package
.
orig_name
!=
old_data
.
package
.
orig_name
)
{
{
file
.
clean
()
file
.
clean
()
files
.
clean
()
files
.
get
()
files
.
get
(
data
)
if
(
Utils
.
check_data_package
(
data
))
{
if
(
Utils
.
check_data_package
(
data
))
{
// I will always get dataestamp from package
// I will always get dataestamp from package
window
.
location
.
hash
+=
'
/datestamp
'
window
.
location
.
hash
+=
'
/datestamp
'
...
@@ -268,7 +259,7 @@ function Page_Distrubion()
...
@@ -268,7 +259,7 @@ function Page_Distrubion()
view
:
function
(
data
)
{
view
:
function
(
data
)
{
if
(
!
data
)
if
(
!
data
)
data
=
Utils
.
from_hash_to_data
()
data
=
Utils
.
from_hash_to_data
()
title
.
set
(
data
)
title
.
set
()
breadcrumb
.
update
()
breadcrumb
.
update
()
select
()
select
()
sticky
()
sticky
()
...
@@ -279,9 +270,9 @@ function Page_Distrubion()
...
@@ -279,9 +270,9 @@ function Page_Distrubion()
clean
()
clean
()
if
(
!
data
)
if
(
!
data
)
data
=
Utils
.
from_hash_to_data
()
data
=
Utils
.
from_hash_to_data
()
packages
.
get
(
data
)
packages
.
get
()
files
.
get
(
data
)
files
.
get
()
file
.
get
(
data
)
file
.
get
()
update
.
view
(
data
)
update
.
view
(
data
)
}
}
...
...
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