Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
slapos.toolbox
Commits
ca6a670a
Commit
ca6a670a
authored
Oct 01, 2013
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Proof-of-concept to show shellinabox in a frame with auto-log,
using javascript
parent
e7521673
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
6 deletions
+12
-6
slapos/runner/static/js/scripts/common.js
slapos/runner/static/js/scripts/common.js
+10
-0
slapos/runner/templates/layout.html
slapos/runner/templates/layout.html
+1
-1
slapos/runner/templates/shell.html
slapos/runner/templates/shell.html
+0
-4
slapos/runner/views.py
slapos/runner/views.py
+1
-1
No files found.
slapos/runner/static/js/scripts/common.js
View file @
ca6a670a
...
@@ -90,3 +90,13 @@ function bindRemove() {
...
@@ -90,3 +90,13 @@ function bindRemove() {
}
}
});
});
}(
jQuery
,
document
,
this
));
}(
jQuery
,
document
,
this
));
/********************************/
$
(
document
).
ready
(
function
()
{
$
(
"
#linkshell
"
).
click
(
function
()
{
"
use strict
"
;
$
(
"
#main
"
).
empty
();
//XXX It is not finished
$
(
"
#main
"
).
append
(
"
<iframe id=
\"
shellinabox
\"
src=
\"
https://login:password@[2001:67c:1254:3b:fc93:4aff:feca:66ac]:50005/shellinabox
\"
></iframe>
"
);
});
});
slapos/runner/templates/layout.html
View file @
ca6a670a
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
<div
class=
"line"
></div>
<div
class=
"line"
></div>
<a
href=
"{{ url_for('manageProject') }}"
style=
"float:left"
title=
"Manage Your repositories"
><img
alt=
""
src=
"{{ url_for('static', filename='images/manage_repo-little.png') }}"
/></a>
<a
href=
"{{ url_for('manageProject') }}"
style=
"float:left"
title=
"Manage Your repositories"
><img
alt=
""
src=
"{{ url_for('static', filename='images/manage_repo-little.png') }}"
/></a>
<div
class=
"line"
></div>
<div
class=
"line"
></div>
<
a
href=
"{{ url_for('shell') }}"
style=
"float:left"
title=
"Use the shell"
><img
alt=
""
src=
"{{ url_for('static', filename='images/terminal.png') }}"
/></a
>
<
span
id=
"linkshell"
style=
"float:left"
title=
"Use the shell"
><img
alt=
""
src=
"{{ url_for('static', filename='images/terminal.png') }}"
/></span
>
<div
class=
"line"
></div>
<div
class=
"line"
></div>
<a
href=
"{{ url_for('dologout') }}"
style=
"float:left"
title=
"Close your session"
><img
alt=
""
src=
"{{ url_for('static', filename='images/logout.png') }}"
/></a>
<a
href=
"{{ url_for('dologout') }}"
style=
"float:left"
title=
"Close your session"
><img
alt=
""
src=
"{{ url_for('static', filename='images/logout.png') }}"
/></a>
<h2
class=
"info"
>
{% block title %}{% endblock %} - {{session.title}}
</h2>
<h2
class=
"info"
>
{% block title %}{% endblock %} - {{session.title}}
</h2>
...
...
slapos/runner/templates/shell.html
View file @
ca6a670a
{% extends "layout.html" %}
{% block title %} Shell {% endblock %}
{% block body %}
<iframe
id=
"shellinabox"
src=
"/shellinabox"
></iframe>
<iframe
id=
"shellinabox"
src=
"/shellinabox"
></iframe>
{% endblock %}
slapos/runner/views.py
View file @
ca6a670a
...
@@ -703,7 +703,7 @@ def editFile():
...
@@ -703,7 +703,7 @@ def editFile():
@
login_required
()
@
login_required
()
def
shell
():
def
shell
():
return
render_template
(
'shell.html'
)
return
"<iframe id=
\
"
shellinabox
\
"
src=
\
"
/shellinabox
\
"
></iframe>"
#Setup List of URLs
#Setup List of URLs
app
.
add_url_rule
(
'/'
,
'home'
,
home
)
app
.
add_url_rule
(
'/'
,
'home'
,
home
)
...
...
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