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
d270fa6f
Commit
d270fa6f
authored
Mar 08, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update breadcrump
parent
9bbe4a18
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
1 deletion
+26
-1
debomatic-webui/public/javascripts/debomatic-webui.js
debomatic-webui/public/javascripts/debomatic-webui.js
+26
-1
No files found.
debomatic-webui/public/javascripts/debomatic-webui.js
View file @
d270fa6f
...
@@ -17,6 +17,7 @@ function get_path(path) {
...
@@ -17,6 +17,7 @@ function get_path(path) {
data
.
file
.
name
=
info
[
3
]
data
.
file
.
name
=
info
[
3
]
socket
.
emit
(
"
get_file
"
,
data
)
socket
.
emit
(
"
get_file
"
,
data
)
}
}
update_breadcrumb
(
path
)
}
}
function
build_hash
(
data
)
{
function
build_hash
(
data
)
{
...
@@ -32,6 +33,22 @@ function build_hash(data) {
...
@@ -32,6 +33,22 @@ function build_hash(data) {
return
hash
return
hash
}
}
function
update_breadcrumb
(
hash
)
{
new_html
=
''
new_hash
=
'
#
'
info
=
hash
.
split
(
'
/
'
)
for
(
var
i
=
0
;
i
<
info
.
length
;
i
++
)
{
new_hash
+=
info
[
i
]
if
(
i
==
(
info
.
length
-
1
))
new_html
+=
'
<li class="active">
'
+
info
[
i
]
+
'
</li>
'
else
new_html
+=
'
<li><a href="
'
+
new_hash
+
'
">
'
+
info
[
i
]
+
'
</a>
'
new_hash
+=
'
/
'
}
console
.
log
(
new_html
)
$
(
'
.breadcrumb
'
).
html
(
new_html
)
}
var
socket
=
io
.
connect
(
'
//localhost:3000
'
);
var
socket
=
io
.
connect
(
'
//localhost:3000
'
);
socket
.
on
(
'
distributions
'
,
function
(
distributions
)
{
socket
.
on
(
'
distributions
'
,
function
(
distributions
)
{
...
@@ -56,7 +73,15 @@ socket.on('package_file_list', function(data){
...
@@ -56,7 +73,15 @@ socket.on('package_file_list', function(data){
tmp
=
data
tmp
=
data
data
.
package
.
files
.
forEach
(
function
(
f
){
data
.
package
.
files
.
forEach
(
function
(
f
){
tmp
.
file
=
f
tmp
.
file
=
f
$
(
'
#files ul
'
).
append
(
'
<li><a href="
'
+
build_hash
(
tmp
)
+
'
">
'
+
f
.
name
+
'
</a></li>
'
)
$
(
'
#files ul
'
).
append
(
'
<li><a name="
'
+
f
.
orig_name
+
'
" href="
'
+
build_hash
(
tmp
)
+
'
">
'
+
f
.
name
+
'
</a></li>
'
)
})
data
.
package
.
debs
.
forEach
(
function
(
f
){
$
(
'
#debs ul
'
).
append
(
'
<li><a name="
'
+
f
.
orig_name
+
'
" href="
'
+
f
.
path
+
'
">
'
+
f
.
name
+
'
</a> <span>.
'
+
f
.
label
+
'
</span></li>
'
)
})
data
.
package
.
archives
.
forEach
(
function
(
f
){
$
(
'
#archives ul
'
).
append
(
'
<li><a name="
'
+
f
.
orig_name
+
'
" href="
'
+
f
.
path
+
'
">
'
+
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