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
6815b48f
Commit
6815b48f
authored
Mar 08, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moved javascript to file
parent
171c4c74
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
65 deletions
+64
-65
debomatic-webui/public/javascripts/debomatic-webui.js
debomatic-webui/public/javascripts/debomatic-webui.js
+63
-0
debomatic-webui/views/layout.ejs
debomatic-webui/views/layout.ejs
+1
-65
No files found.
debomatic-webui/public/javascripts/debomatic-webui.js
0 → 100644
View file @
6815b48f
function
get_path
(
path
)
{
info
=
path
.
split
(
'
/
'
);
data
=
{}
if
(
info
.
length
>=
1
)
{
data
.
distribution
=
{}
data
.
distribution
.
name
=
info
[
0
];
socket
.
emit
(
"
get_distribution_packages
"
,
data
)
}
if
(
info
.
length
>=
3
){
data
.
package
=
{}
data
.
package
.
name
=
info
[
1
];
data
.
package
.
version
=
info
[
2
];
socket
.
emit
(
"
get_package_file_list
"
,
data
)
}
if
(
info
.
length
>=
4
)
{
data
.
file
=
{}
data
.
file
.
name
=
info
[
3
]
socket
.
emit
(
"
get_file
"
,
data
)
}
}
var
socket
=
io
.
connect
(
'
//localhost:3000
'
);
socket
.
on
(
'
distributions
'
,
function
(
distributions
)
{
$
(
'
#distributions ul
'
).
html
(
''
);
distributions
.
forEach
(
function
(
name
){
$
(
'
#distributions ul
'
).
append
(
'
<li><a href="#
'
+
name
+
'
">
'
+
name
+
'
</li>
'
);
});
});
socket
.
on
(
'
distribution_packages
'
,
function
(
data
){
$
(
'
#packages ul
'
).
html
(
''
)
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>
'
)
})
})
socket
.
on
(
'
package_file_list
'
,
function
(
data
){
$
(
'
#files ul
'
).
html
(
''
);
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>
'
)
})
})
socket
.
on
(
'
file
'
,
function
(
data
)
{
$
(
"
#file
"
).
html
(
data
.
file
.
content
)
})
socket
.
on
(
'
file_newcontent
'
,
function
(
data
)
{
new_html
=
$
(
"
#file
"
).
html
()
+
data
.
file
.
new_content
$
(
"
#file
"
).
html
(
new_html
)
})
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
(
'
#
'
,
''
));
});
debomatic-webui/views/layout.ejs
View file @
6815b48f
...
@@ -5,71 +5,7 @@
...
@@ -5,71 +5,7 @@
<link
rel=
'stylesheet'
href=
'/stylesheets/style.css'
/>
<link
rel=
'stylesheet'
href=
'/stylesheets/style.css'
/>
<script
src=
'//code.jquery.com/jquery-1.7.2.min.js'
></script>
<script
src=
'//code.jquery.com/jquery-1.7.2.min.js'
></script>
<script
src=
'//localhost:3000/socket.io/socket.io.js'
></script>
<script
src=
'//localhost:3000/socket.io/socket.io.js'
></script>
<script>
<script
src=
'/javascripts/debomatic-webui.js'
></script>
function
get_path
(
path
)
{
info
=
path
.
split
(
'
/
'
);
data
=
{}
if
(
info
.
length
>=
1
)
{
data
.
distribution
=
{}
data
.
distribution
.
name
=
info
[
0
];
socket
.
emit
(
"
get_distribution_packages
"
,
data
)
}
if
(
info
.
length
>=
3
){
data
.
package
=
{}
data
.
package
.
name
=
info
[
1
];
data
.
package
.
version
=
info
[
2
];
socket
.
emit
(
"
get_package_file_list
"
,
data
)
}
if
(
info
.
length
>=
4
)
{
data
.
file
=
{}
data
.
file
.
name
=
info
[
3
]
socket
.
emit
(
"
get_file
"
,
data
)
}
}
var
socket
=
io
.
connect
(
'
//localhost:3000
'
);
socket
.
on
(
'
distributions
'
,
function
(
distributions
)
{
$
(
'
#distributions ul
'
).
html
(
''
);
distributions
.
forEach
(
function
(
name
){
$
(
'
#distributions ul
'
).
append
(
'
<li><a href="#
'
+
name
+
'
">
'
+
name
+
'
</li>
'
);
});
});
socket
.
on
(
'
distribution_packages
'
,
function
(
data
){
$
(
'
#packages ul
'
).
html
(
''
)
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>
'
)
})
})
socket
.
on
(
'
package_file_list
'
,
function
(
data
){
$
(
'
#files ul
'
).
html
(
''
);
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>
'
)
})
})
socket
.
on
(
'
file
'
,
function
(
data
)
{
$
(
"
#file
"
).
html
(
data
.
file
.
content
)
})
socket
.
on
(
'
file_newcontent
'
,
function
(
data
)
{
new_html
=
$
(
"
#file
"
).
html
()
+
data
.
file
.
new_content
$
(
"
#file
"
).
html
(
new_html
)
})
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>
</head>
<body>
<body>
<
%
-
body
%
>
<
%
-
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