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
40d4005b
Commit
40d4005b
authored
Mar 08, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some html tests
parent
5682fd79
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
30 deletions
+56
-30
debomatic-webui/views/layout.ejs
debomatic-webui/views/layout.ejs
+56
-30
No files found.
debomatic-webui/views/layout.ejs
View file @
40d4005b
...
...
@@ -6,42 +6,68 @@
<script
src=
'//code.jquery.com/jquery-1.7.2.min.js'
></script>
<script
src=
'//localhost:3000/socket.io/socket.io.js'
></script>
<script>
function
get_path
(
path
)
{
info
=
path
.
split
(
'
/
'
);
data
=
{}
if
(
info
.
length
>=
1
)
{
data
.
distribution
=
{}
data
.
distribution
.
name
=
info
[
0
];
}
if
(
info
.
length
>=
3
){
data
.
package
=
{}
data
.
package
.
name
=
info
[
1
];
data
.
package
.
version
=
info
[
2
];
}
function
get_path
(
path
)
{
info
=
path
.
split
(
'
/
'
);
data
=
{}
if
(
info
.
length
>=
1
)
{
data
.
distribution
=
{}
data
.
distribution
.
name
=
info
[
0
];
}
if
(
info
.
length
>=
3
){
data
.
package
=
{}
data
.
package
.
name
=
info
[
1
];
data
.
package
.
version
=
info
[
2
];
}
if
(
info
.
length
==
4
)
{
data
.
file
=
info
[
3
]
socket
.
emit
(
'
get-file
'
,
data
)
}
else
socket
.
emit
(
'
get-view
'
,
data
);
}
function
set_up_view
(
data
)
{
if
(
data
)
{
if
(
data
.
distribution
)
{
if
(
data
.
distribution
.
name
&&
data
.
distribution
.
packages
)
{
$
(
'
#packages
'
).
html
(
''
)
data
.
distribution
.
packages
.
forEach
(
function
(
p
){
div
=
$
(
'
#packages
'
).
append
(
'
<li><a href="#
'
+
data
.
distribution
.
name
+
'
/
'
+
p
.
name
+
'
/
'
+
p
.
version
+
'
">
'
+
p
.
name
+
'
<span>
'
+
p
.
version
+
'
</span></a></li>
'
)
})
}
if
(
data
.
package
)
{
$
(
'
#files
'
).
html
(
''
);
data
.
package
.
files
.
forEach
(
function
(
f
){
p
=
data
.
package
$
(
'
#files
'
).
append
(
'
<li><a href="#
'
+
data
.
distribution
.
name
+
'
/
'
+
p
.
name
+
'
/
'
+
p
.
version
+
'
/
'
+
f
.
name
+
'
">
'
+
f
.
label
+
'
</a></li>
'
)
})
}
}
}
var
socket
=
io
.
connect
(
'
//localhost:3000
'
);
}
var
socket
=
io
.
connect
(
'
//localhost:3000
'
);
socket
.
on
(
'
distributions
'
,
function
(
distributions
)
{
$
(
'
#distributions
'
).
html
(
''
);
distributions
.
forEach
(
function
(
name
){
$
(
'
#distributions
'
).
append
(
'
<li><a href="#
'
+
name
+
'
">
'
+
name
+
'
</li>
'
);
});
socket
.
on
(
'
distributions
'
,
function
(
distributions
)
{
$
(
'
#distributions
'
).
html
(
''
);
distributions
.
forEach
(
function
(
name
){
$
(
'
#distributions
'
).
append
(
'
<li><a href="#
'
+
name
+
'
">
'
+
name
+
'
</li>
'
);
});
});
socket
.
on
(
'
view
'
,
function
(
data
){
console
.
log
(
data
)
});
socket
.
on
(
'
error
'
,
function
()
{
console
.
error
(
arguments
)
});
socket
.
on
(
'
view
'
,
function
(
data
){
console
.
log
(
data
)
set_up_view
(
data
)
});
$
(
window
).
on
(
'
hashchange
'
,
function
()
{
get_path
(
window
.
location
.
hash
.
replace
(
'
#
'
,
''
));
});
$
(
window
).
on
(
'
load
'
,
function
(){
get_path
(
window
.
location
.
hash
.
replace
(
'
#
'
,
''
));
});
socket
.
on
(
'
error
'
,
function
()
{
console
.
error
(
arguments
)
});
$
(
window
).
on
(
'
hashchange
'
,
function
()
{
get_path
(
window
.
location
.
hash
.
replace
(
'
#
'
,
''
));
});
$
(
window
).
on
(
'
load
'
,
function
(){
get_path
(
window
.
location
.
hash
.
replace
(
'
#
'
,
''
));
});
</script>
</head>
<body>
...
...
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