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
9bbe4a18
Commit
9bbe4a18
authored
Mar 08, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build hash with a function
parent
9f456fc5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
3 deletions
+20
-3
debomatic-webui/public/javascripts/debomatic-webui.js
debomatic-webui/public/javascripts/debomatic-webui.js
+20
-3
No files found.
debomatic-webui/public/javascripts/debomatic-webui.js
View file @
9bbe4a18
...
...
@@ -19,6 +19,19 @@ function get_path(path) {
}
}
function
build_hash
(
data
)
{
hash
=
"
#
"
if
(
data
.
distribution
&&
data
.
distribution
.
name
)
{
hash
=
hash
+
data
.
distribution
.
name
if
(
data
.
package
&&
data
.
package
.
name
&&
data
.
package
.
version
)
{
hash
=
hash
+
'
/
'
+
data
.
package
.
name
+
"
/
"
+
data
.
package
.
version
if
(
data
.
file
&&
data
.
file
.
name
)
hash
=
hash
+
'
/
'
+
data
.
file
.
name
}
}
return
hash
}
var
socket
=
io
.
connect
(
'
//localhost:3000
'
);
socket
.
on
(
'
distributions
'
,
function
(
distributions
)
{
...
...
@@ -30,16 +43,20 @@ socket.on('distributions', function(distributions) {
socket
.
on
(
'
distribution_packages
'
,
function
(
data
){
$
(
'
#packages ul
'
).
html
(
''
)
tmp
=
data
tmp
.
file
=
null
data
.
distribution
.
packages
.
forEach
(
function
(
p
){
div
=
$
(
'
#packages ul
'
).
append
(
'
<li><a href="#
'
+
data
.
distribution
.
name
+
'
/
'
+
p
.
name
+
'
/
'
+
p
.
version
+
'
">
'
+
p
.
name
+
'
<span>
'
+
p
.
version
+
'
</span></a></li>
'
)
tmp
.
package
=
p
div
=
$
(
'
#packages ul
'
).
append
(
'
<li><a href="
'
+
build_hash
(
tmp
)
+
'
">
'
+
p
.
name
+
'
<span>
'
+
p
.
version
+
'
</span></a></li>
'
)
})
})
socket
.
on
(
'
package_file_list
'
,
function
(
data
){
$
(
'
#files ul
'
).
html
(
''
);
tmp
=
data
data
.
package
.
files
.
forEach
(
function
(
f
){
p
=
data
.
package
$
(
'
#files ul
'
).
append
(
'
<li><a href="
#
'
+
data
.
distribution
.
name
+
'
/
'
+
p
.
name
+
'
/
'
+
p
.
version
+
'
/
'
+
f
.
name
+
'
">
'
+
f
.
name
+
'
</a></li>
'
)
tmp
.
file
=
f
$
(
'
#files ul
'
).
append
(
'
<li><a href="
'
+
build_hash
(
tmp
)
+
'
">
'
+
f
.
name
+
'
</a></li>
'
)
})
})
...
...
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