Class: Superset::Dashboard::Import
- Defined in:
- lib/superset/dashboard/import.rb
Constant Summary
Constants inherited from Request
Instance Attribute Summary collapse
-
#overwrite ⇒ Object
readonly
Returns the value of attribute overwrite.
-
#source_zip_file ⇒ Object
readonly
Returns the value of attribute source_zip_file.
Attributes inherited from Request
Instance Method Summary collapse
-
#initialize(source_zip_file:, overwrite: true) ⇒ Import
constructor
A new instance of Import.
- #perform ⇒ Object
- #response ⇒ Object
Methods inherited from Request
call, #query_params, #result, #superset_host
Methods included from Superset::Display
#display_headers, #headings, #list, #list_attributes, #result, #rows, #table, #title
Constructor Details
#initialize(source_zip_file:, overwrite: true) ⇒ Import
Returns a new instance of Import.
25 26 27 28 |
# File 'lib/superset/dashboard/import.rb', line 25 def initialize(source_zip_file: , overwrite: true) @source_zip_file = source_zip_file @overwrite = overwrite end |
Instance Attribute Details
#overwrite ⇒ Object (readonly)
Returns the value of attribute overwrite.
23 24 25 |
# File 'lib/superset/dashboard/import.rb', line 23 def overwrite @overwrite end |
#source_zip_file ⇒ Object (readonly)
Returns the value of attribute source_zip_file.
23 24 25 |
# File 'lib/superset/dashboard/import.rb', line 23 def source_zip_file @source_zip_file end |
Instance Method Details
#perform ⇒ Object
30 31 32 33 |
# File 'lib/superset/dashboard/import.rb', line 30 def perform validate_params response end |
#response ⇒ Object
35 36 37 38 39 40 |
# File 'lib/superset/dashboard/import.rb', line 35 def response @response ||= client(use_json: false).post( route, payload ) end |