1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-01 04:38:12 +00:00

Merge pull request #106 from aka001/homepage_added

Added homepage
This commit is contained in:
Julien Duponchelle 2015-03-27 09:46:42 +01:00
commit bff164afcb
2 changed files with 33 additions and 0 deletions

View File

@ -28,6 +28,21 @@ from gns3server.handlers.api.vpcs_handler import VPCSHandler
from gns3server.handlers.api.config_handler import ConfigHandler from gns3server.handlers.api.config_handler import ConfigHandler
from gns3server.handlers.api.server_handler import ServerHandler from gns3server.handlers.api.server_handler import ServerHandler
from gns3server.handlers.upload_handler import UploadHandler from gns3server.handlers.upload_handler import UploadHandler
from ..web.route import Route
if sys.platform.startswith("linux") or hasattr(sys, "_called_from_test"):
from gns3server.handlers.api.iou_handler import IOUHandler
class HomePage:
@classmethod
@Route.get(
r"/",
description="Home page for GNS3Server",
api_version=None
)
def index(request, response):
response.template("homepage.html")
if sys.platform.startswith("linux") or hasattr(sys, "_called_from_test"): if sys.platform.startswith("linux") or hasattr(sys, "_called_from_test"):
from gns3server.handlers.api.iou_handler import IOUHandler from gns3server.handlers.api.iou_handler import IOUHandler

View File

@ -0,0 +1,18 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>GNS3 Server</title>
</head>
<body>
{% block body %}{% endblock %}
</body>
<h3>
Welcome to Home page of GNS3.
</h3>
<h4>
Visit the upload page to try GNS3 features: <a href = "/upload">Upload</a>
</h4>
<small>
Powered by GNS3 {{gns3_version}}
</small>
</html>