mirror of https://github.com/nicolargo/glances
Add an alias to get stats as json
parent
9dbd0597f2
commit
96c6faf473
|
@ -425,6 +425,10 @@ class GlancesPlugin(object):
|
||||||
"""Return the stats object in JSON format."""
|
"""Return the stats object in JSON format."""
|
||||||
return self._json_dumps(self.stats)
|
return self._json_dumps(self.stats)
|
||||||
|
|
||||||
|
def get_json(self):
|
||||||
|
"""Return the stats object in JSON format."""
|
||||||
|
return self.get_stats()
|
||||||
|
|
||||||
def get_stats_item(self, item):
|
def get_stats_item(self, item):
|
||||||
"""Return the stats object for a specific item in JSON format.
|
"""Return the stats object for a specific item in JSON format.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue