Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
re6stnet
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
Nicolas Wavrant
re6stnet
Commits
c9e33166
Commit
c9e33166
authored
Sep 06, 2012
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demo: add links between route and tunnels pages
parent
09a8ff1a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
demo/demo
demo/demo
+10
-3
No files found.
demo/demo
View file @
c9e33166
...
@@ -217,8 +217,10 @@ if len(sys.argv) > 1:
...
@@ -217,8 +217,10 @@ if len(sys.argv) > 1:
def do_GET(self):
def do_GET(self):
svg = None
svg = None
if self.path == '/route.html':
if self.path == '/route.html':
other = 'tunnel'
svg = route_svg()
svg = route_svg()
elif self.path == '/tunnel.html':
elif self.path == '/tunnel.html':
other = 'route'
gv = registry.Popen(('python', '-c', r"""if 1:
gv = registry.Popen(('python', '-c', r"""if 1:
import math, xmlrpclib
import math, xmlrpclib
g = xmlrpclib.ServerProxy('http://localhost/').topology()
g = xmlrpclib.ServerProxy('http://localhost/').topology()
...
@@ -242,15 +244,20 @@ if len(sys.argv) > 1:
...
@@ -242,15 +244,20 @@ if len(sys.argv) > 1:
self.send_error(500)
self.send_error(500)
return
return
else:
else:
self.send_error(404)
if self.path == '/':
self.send_response(302)
self.send_header('Location', 'route.html')
self.end_headers()
else:
self.send_error(404)
return
return
mt = 'text/html'
mt = 'text/html'
body = """
<html>
body = """
<html>
<head><meta
http-equiv=
"refresh"
content=
"10"
/></head>
<head><meta
http-equiv=
"refresh"
content=
"10"
/></head>
<body>
<body>
<a
style=
"position: absolute"
href=
"%s.html"
>
%ss
</a>
%s
%s
</body>
</body>
</html>
""" %
svg[svg.find('
<svg
')
:
]
</html>
""" %
(other, other, svg[svg.find('
<svg
')
:
])
self
.
send_response
(
200
)
self
.
send_response
(
200
)
self
.
send_header
('
Content-Length
',
len
(
body
))
self
.
send_header
('
Content-Length
',
len
(
body
))
self
.
send_header
('
Content-type
',
mt
+
';
charset=
utf-8')
self
.
send_header
('
Content-type
',
mt
+
';
charset=
utf-8')
...
...
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