From 6a049073daa558ae2864da61a68724741b78902f Mon Sep 17 00:00:00 2001 From: Nicolargo Date: Tue, 31 May 2016 14:09:23 +0200 Subject: [PATCH] Change Curses message for history --- docs/api.rst | 2 ++ docs/conf.py | 2 +- glances/outputs/glances_bottle.py | 3 +++ glances/outputs/glances_curses.py | 4 ++-- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/api.rst b/docs/api.rst index 29dd5ade..c41b7bf9 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -13,3 +13,5 @@ API documentation is available at: .. _XML-RPC server: http://docs.python.org/2/library/simplexmlrpcserver.html .. _RESTful-JSON: http://jsonapi.org/ + +.. autobottle:: glances.outputs.glances_bottle:GlancesBottle.app diff --git a/docs/conf.py b/docs/conf.py index 0a20fda6..6d00a839 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -34,7 +34,7 @@ from glances import __version__ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = [] +extensions = ['sphinxcontrib.autohttp.bottle'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] diff --git a/glances/outputs/glances_bottle.py b/glances/outputs/glances_bottle.py index c625e37c..051c32f5 100644 --- a/glances/outputs/glances_bottle.py +++ b/glances/outputs/glances_bottle.py @@ -59,6 +59,9 @@ class GlancesBottle(object): # Path where the statics files are stored self.STATIC_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'static') + def app(self): + return self._app() + def check_auth(self, username, password): """Check if a username/password combination is valid.""" if username == self.args.username: diff --git a/glances/outputs/glances_curses.py b/glances/outputs/glances_curses.py index 68862f82..90a8823c 100644 --- a/glances/outputs/glances_curses.py +++ b/glances/outputs/glances_curses.py @@ -770,9 +770,9 @@ class _GlancesCurses(object): try: self.glances_graph.graph_enabled() except Exception: - self.display_popup('History disabled\nEnable it using --enable-history') + self.display_popup('History disabled\nEnable it using --export-graph') else: - self.display_popup('History disabled\nPlease install matplotlib') + self.display_popup('History disabled') self.graph_tag = False self.reset_history_tag = False