Merge branch 'develop' of github.com:nicolargo/glances into develop

This commit is contained in:
Nicolargo 2015-01-03 17:43:14 +01:00
commit 0a99364c9f
3 changed files with 7 additions and 0 deletions

View File

@ -5,6 +5,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Glances</title>
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<link rel="stylesheet" type="text/css" href="normalize.css" />
<link rel="stylesheet" type="text/css" href="bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="style.css" />

View File

@ -62,6 +62,7 @@ class GlancesBottle(object):
self._app.route('/<refresh_time:int>', method=["GET", "POST"], callback=self._index)
self._app.route('/<filename:re:.*\.css>', method="GET", callback=self._css)
self._app.route('/<filename:re:.*\.js>', method="GET", callback=self._js)
self._app.route('/favicon.ico', method="GET", callback=self._favicon)
# REST API
self._app.route('/api/2/pluginslist', method="GET", callback=self._api_plugins)
self._app.route('/api/2/all', method="GET", callback=self._api_all)
@ -110,6 +111,11 @@ class GlancesBottle(object):
# Return the static file
return static_file(filename, root=os.path.join(self.STATIC_PATH, 'js'))
def _favicon(self):
"""Bottle callback for favicon."""
# Return the static file
return static_file('favicon.ico', root=self.STATIC_PATH)
def _api_plugins(self):
"""
Glances API RESTFul implementation

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB