mirror of
https://github.com/nicolargo/glances.git
synced 2025-01-05 17:22:02 +03:00
API GET uptime returns formatted string, not seconds as the doc says #2158
This commit is contained in:
parent
ea60836cc9
commit
c23451f2ba
872
docs/api.rst
872
docs/api.rst
File diff suppressed because it is too large
Load Diff
@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
||||
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
||||
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
|
||||
..
|
||||
.TH "GLANCES" "1" "Nov 03, 2022" "3.3.1_beta1" "Glances"
|
||||
.TH "GLANCES" "1" "Nov 20, 2022" "3.3.1_beta1" "Glances"
|
||||
.SH NAME
|
||||
glances \- An eye on your system
|
||||
.SH SYNOPSIS
|
||||
|
@ -70,7 +70,7 @@ def print_plugins_list(stat):
|
||||
print('')
|
||||
|
||||
|
||||
def print_plugin_export(plugin, stat_export):
|
||||
def print_plugin_stats(plugin, stat):
|
||||
sub_title = 'GET {}'.format(plugin)
|
||||
print(sub_title)
|
||||
print('-' * len(sub_title))
|
||||
@ -79,7 +79,7 @@ def print_plugin_export(plugin, stat_export):
|
||||
print('Get plugin stats::')
|
||||
print('')
|
||||
print(' # curl {}/{}'.format(API_URL, plugin))
|
||||
print(indent_stat(stat_export))
|
||||
print(indent_stat(json.loads(stat.get_stats())))
|
||||
print('')
|
||||
|
||||
|
||||
@ -223,7 +223,7 @@ class GlancesStdoutApiDoc(object):
|
||||
stat_export = stat.get_export()
|
||||
if stat_export is None or stat_export == [] or stat_export == {}:
|
||||
continue
|
||||
print_plugin_export(plugin, stat_export)
|
||||
print_plugin_stats(plugin, stat)
|
||||
print_plugin_description(plugin, stat)
|
||||
print_plugin_item_value(plugin, stat, stat_export)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user