Skip to content

Commit e787672

Browse files
committed
adjust usage msg
1 parent f248f7f commit e787672

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/superset/dashboard/export.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Will export the zip file to /tmp/superset_dashboards with zip filename adjusted to include the dashboard_id
22
# Example zipfile: dashboard_#{dashboard_id}_export_#{datestamp}.zip
3+
# Will then unzip and copy the files into the destination_path with the dashboard_id as a subfolder
34
#
45
# Usage
56
# Superset::Dashboard::Export.new(dashboard_id: 15, destination_path: '/tmp/superset_dashboard_backups/').perform
@@ -28,7 +29,6 @@ def perform
2829
copy_export_files_to_destination_path if destination_path
2930
end
3031

31-
# overriding the current happi get request as the returned packet is as string, ie not the usual hash
3232
def response
3333
@response ||= client.call(
3434
:get,
@@ -37,10 +37,6 @@ def response
3737
)
3838
end
3939

40-
def download_folder
41-
File.dirname(extracted_files[0])
42-
end
43-
4440
private
4541

4642
def params
@@ -55,6 +51,10 @@ def unzip_files
5551
@extracted_files = unzip_file(zip_file_name, tmp_uniq_dashboard_path)
5652
end
5753

54+
def download_folder
55+
File.dirname(extracted_files[0])
56+
end
57+
5858
def copy_export_files_to_destination_path
5959
path_with_dash_id = File.join(destination_path, dashboard_id.to_s)
6060
FileUtils.mkdir_p(path_with_dash_id) unless File.directory?(path_with_dash_id)

0 commit comments

Comments
 (0)