A debug status page embed in the server

This commit is contained in:
Julien Duponchelle committed 2015-12-18 14:38:26 +01:00
1 parent 480ca037cd
commit 286cd7a3ac
4 files changed
+50

No files matched your search

+14
View File
@@ -15,6 +15,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from ..web.route import Route
from ..modules.port_manager import PortManager
from ..modules.project_manager import ProjectManager
class IndexHandler:
@@ -27,3 +29,15 @@ class IndexHandler:
)
def index(request, response):
response.template("index.html")
@classmethod
@Route.get(
r"/status",
description="Ressources used by GNS3Server",
api_version=None
)
def ports(request, response):
response.template("status.html",
port_manager=PortManager.instance(),
project_manager=ProjectManager.instance()
)