File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ def run():
39
39
grafana-wtf [options] log [<dashboard_uid>] [--number=<count>] [--head=<count>] [--tail=<count>] [--reverse] [--sql=<sql>]
40
40
grafana-wtf [options] plugins list [--id=]
41
41
grafana-wtf [options] plugins status [--id=]
42
+ grafana-wtf [options] channels [--id=]
42
43
grafana-wtf --version
43
44
grafana-wtf (-h | --help)
44
45
@@ -336,3 +337,10 @@ def run():
336
337
else :
337
338
raise DocoptExit ('Subcommand "plugins" only provides "list" and "status"' )
338
339
output_results (output_format , response )
340
+
341
+ if options .channels :
342
+ if options .id :
343
+ response = engine .channels_list_by_id (options .id )
344
+ else :
345
+ response = engine .channels_list ()
346
+ output_results (output_format , response )
Original file line number Diff line number Diff line change @@ -539,6 +539,13 @@ def plugins_status_by_id(self, plugin_id):
539
539
plugin = self .plugins_list_by_id (plugin_id )
540
540
return self .get_plugin_status (plugin )
541
541
542
+ def channels_list (self ):
543
+ return self .grafana .notifications .lookup_channels ()
544
+
545
+ def channels_list_by_id (self , channel_id ):
546
+ channel = self .grafana .notifications .get_channel_by_id (channel_id )
547
+ return channel
548
+
542
549
543
550
class Indexer :
544
551
def __init__ (self , engine : GrafanaWtf ):
You can’t perform that action at this time.
0 commit comments