Class: Superset::Dashboard::Charts::List
- Defined in:
- lib/superset/dashboard/charts/list.rb
Constant Summary
Constants inherited from Request
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
dashboard id.
Attributes inherited from Request
Class Method Summary collapse
Instance Method Summary collapse
- #chart_ids ⇒ Object
-
#initialize(id) ⇒ List
constructor
A new instance of List.
- #rows ⇒ Object
Methods inherited from Request
#query_params, #response, #result, #superset_host
Methods included from Superset::Display
#display_headers, #headings, #list, #result, #table
Constructor Details
#initialize(id) ⇒ List
Returns a new instance of List.
11 12 13 |
# File 'lib/superset/dashboard/charts/list.rb', line 11 def initialize(id) @id = id end |
Instance Attribute Details
#id ⇒ Object (readonly)
dashboard id
5 6 7 |
# File 'lib/superset/dashboard/charts/list.rb', line 5 def id @id end |
Class Method Details
.call(id) ⇒ Object
7 8 9 |
# File 'lib/superset/dashboard/charts/list.rb', line 7 def self.call(id) self.new(id).list end |
Instance Method Details
#chart_ids ⇒ Object
15 16 17 |
# File 'lib/superset/dashboard/charts/list.rb', line 15 def chart_ids result.map { |c| c[:id] } end |
#rows ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/superset/dashboard/charts/list.rb', line 19 def rows result.map do |c| [ c[:id], c[:slice_name], c[:form_data][:datasource], # c[:form_data][:dashboards] # NOTE: form_data dashboards is not accurate .. looks to be bugs related to copying charts ] end end |