Class: WavefrontDisplay::Dashboard
- Defined in:
- lib/wavefront-cli/display/dashboard.rb
Overview
Format human-readable output for dashboards.
Constant Summary
Constants included from WavefrontCli::Constants
WavefrontCli::Constants::ALL_PAGE_SIZE, WavefrontCli::Constants::DEFAULT_OPTS, WavefrontCli::Constants::HUMAN_TIME_FORMAT, WavefrontCli::Constants::HUMAN_TIME_FORMAT_MS
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#do_delete, #do_import, #do_list_brief, #do_search, #do_search_brief, #do_tag_add, #do_tag_clear, #do_tag_delete, #do_tag_set, #do_tags, #do_undelete, #drop_fields, #friendly_name, #human_time, #initialize, #key_width, #long_output, #multicolumn, #pagination_line, #put_id_first, #readable_time, #readable_time_arr, #run, #run_error, #run_list, #run_search, #time_formats
Constructor Details
This class inherits a constructor from WavefrontDisplay::Base
Instance Method Details
#do_describe ⇒ Object
14 15 16 17 18 19 |
# File 'lib/wavefront-cli/display/dashboard.rb', line 14 def do_describe drop_fields(:parameterDetails) readable_time(:updatedEpochMillis) data[:sections] = data[:sections].map { |s| s[:name] } long_output end |
#do_list ⇒ Object
8 9 10 11 12 |
# File 'lib/wavefront-cli/display/dashboard.rb', line 8 def do_list long_output i[id minutes target status hostsUsed condition displayExpression severity additionalInformation] end |
#do_queries ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/wavefront-cli/display/dashboard.rb', line 21 def do_queries if [:brief] @data = data.to_h.values.flatten.map { |q| { query: q } } multicolumn(:query) else long_output end end |