gazer 0.2.59 → 0.2.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,14 +22,14 @@
22
22
  # frozen_string_literal: true
23
23
 
24
24
  require_relative '../../command'
25
- require_relative '../../modules/space'
25
+ require_relative '../../modules/folder'
26
26
  require 'tty-table'
27
27
 
28
28
  module Gzr
29
29
  module Commands
30
- class Space
30
+ class Folder
31
31
  class Ls < Gzr::Command
32
- include Gzr::Space
32
+ include Gzr::Folder
33
33
  def initialize(filter_spec, options)
34
34
  super()
35
35
  @filter_spec = filter_spec
@@ -61,27 +61,27 @@ module Gzr
61
61
  def execute(input: $stdin, output: $stdout)
62
62
  say_warning("options: #{@options.inspect}") if @options[:debug]
63
63
  with_session do
64
- space_ids = process_args([@filter_spec])
64
+ folder_ids = process_args([@filter_spec])
65
65
  begin
66
- puts "No spaces match #{@filter_spec}"
66
+ puts "No folders match #{@filter_spec}"
67
67
  return nil
68
- end unless space_ids && space_ids.length > 0
68
+ end unless folder_ids && folder_ids.length > 0
69
69
 
70
70
  @options[:fields] = 'dashboards(id,title)' if @filter_spec == 'lookml'
71
71
  f = @options[:fields]
72
72
 
73
- data = space_ids.map do |space_id|
74
- query_space(space_id, f).to_attrs
73
+ data = folder_ids.map do |folder_id|
74
+ query_folder(folder_id, f).to_attrs
75
75
  end.compact
76
- space_ids.each do |space_id|
77
- query_space_children(space_id, 'id,name,parent_id').map {|child| child.to_attrs}.each do |child|
76
+ folder_ids.each do |folder_id|
77
+ query_folder_children(folder_id, 'id,name,parent_id').map {|child| child.to_attrs}.each do |child|
78
78
  data.push child
79
79
  end
80
80
  end
81
81
 
82
82
 
83
83
  begin
84
- puts "No data returned for spaces #{space_ids.inspect}"
84
+ puts "No data returned for folders #{folder_ids.inspect}"
85
85
  return nil
86
86
  end unless data && data.length > 0
87
87
 
@@ -22,32 +22,32 @@
22
22
  # frozen_string_literal: true
23
23
 
24
24
  require_relative '../../command'
25
- require_relative '../../modules/space'
25
+ require_relative '../../modules/folder'
26
26
 
27
27
  module Gzr
28
28
  module Commands
29
- class Space
29
+ class Folder
30
30
  class Rm < Gzr::Command
31
- include Gzr::Space
32
- def initialize(space,options)
31
+ include Gzr::Folder
32
+ def initialize(folder,options)
33
33
  super()
34
- @space = space
34
+ @folder = folder
35
35
  @options = options
36
36
  end
37
37
 
38
38
  def execute(input: $stdin, output: $stdout)
39
39
  with_session do
40
- space = query_space(@space)
40
+ folder = query_folder(@folder)
41
41
 
42
42
  begin
43
- puts "Space #{@space} not found"
43
+ puts "Folder #{@folder} not found"
44
44
  return nil
45
- end unless space
46
- children = query_space_children(@space)
47
- unless (space.looks.length == 0 && space.dashboards.length == 0 && children.length == 0) || @options[:force] then
48
- raise Gzr::CLI::Error, "Space '#{space.name}' is not empty. Space cannot be deleted unless --force is specified"
45
+ end unless folder
46
+ children = query_folder_children(@folder)
47
+ unless (folder.looks.length == 0 && folder.dashboards.length == 0 && children.length == 0) || @options[:force] then
48
+ raise Gzr::CLI::Error, "Folder '#{folder.name}' is not empty. Folder cannot be deleted unless --force is specified"
49
49
  end
50
- delete_space(@space)
50
+ delete_folder(@folder)
51
51
  end
52
52
  end
53
53
  end
@@ -22,14 +22,14 @@
22
22
  # frozen_string_literal: true
23
23
 
24
24
  require_relative '../../command'
25
- require_relative '../../modules/space'
25
+ require_relative '../../modules/folder'
26
26
  require 'tty-table'
27
27
 
28
28
  module Gzr
29
29
  module Commands
30
- class Space
30
+ class Folder
31
31
  class Top < Gzr::Command
32
- include Gzr::Space
32
+ include Gzr::Folder
33
33
  def initialize(options)
34
34
  super()
35
35
  @options = options
@@ -40,19 +40,19 @@ module Gzr
40
40
  with_session do
41
41
  extra_fields = %w(is_shared_root is_users_root is_embed_shared_root is_embed_users_root)
42
42
  query_fields = (@options[:fields].split(',') + extra_fields).uniq
43
- spaces = all_spaces(query_fields.join(','))
43
+ folders = all_folders(query_fields.join(','))
44
44
 
45
45
  begin
46
- puts "No spaces found"
46
+ puts "No folders found"
47
47
  return nil
48
- end unless spaces && spaces.length > 0
48
+ end unless folders && folders.length > 0
49
49
 
50
50
  table_hash = Hash.new
51
51
  fields = field_names(@options[:fields])
52
52
  table_hash[:header] = fields unless @options[:plain]
53
53
  expressions = fields.collect { |fn| field_expression(fn) }
54
54
  rows = []
55
- spaces.each do |h|
55
+ folders.each do |h|
56
56
  if ( h.is_shared_root || h.is_users_root || h.is_embed_shared_root || h.is_embed_users_root) then
57
57
  rows << expressions.collect do |e|
58
58
  eval "h.#{e}"
@@ -22,7 +22,7 @@
22
22
  # frozen_string_literal: true
23
23
 
24
24
  require_relative '../../command'
25
- require_relative '../../modules/space'
25
+ require_relative '../../modules/folder'
26
26
  require 'tty-tree'
27
27
 
28
28
  # The tty-tree tool is built on the idea of handling directories, so it does
@@ -51,9 +51,9 @@ end
51
51
 
52
52
  module Gzr
53
53
  module Commands
54
- class Space
54
+ class Folder
55
55
  class Tree < Gzr::Command
56
- include Gzr::Space
56
+ include Gzr::Folder
57
57
  def initialize(filter_spec, options)
58
58
  super()
59
59
  @filter_spec = filter_spec
@@ -63,35 +63,35 @@ module Gzr
63
63
  def execute(input: $stdin, output: $stdout)
64
64
  say_warning("options: #{@options.inspect}") if @options[:debug]
65
65
  with_session do
66
- space_ids = process_args([@filter_spec])
66
+ folder_ids = process_args([@filter_spec])
67
67
 
68
68
  tree_data = Hash.new
69
-
70
- space_ids.each do |space_id|
71
- s = query_space(space_id, "id,name,parent_id,looks(id,title),dashboards(id,title)")
72
- space_name = s.name
73
- space_name = "nil (#{s.id})" unless space_name
74
- space_name = "\"#{space_name}\"" if ((space_name != space_name.strip) || (space_name.length == 0))
75
- space_name += " (#{space_id})" unless space_ids.length == 1
76
- tree_data[space_name] =
77
- [ recurse_spaces(s.id) ] +
69
+
70
+ folder_ids.each do |folder_id|
71
+ s = query_folder(folder_id, "id,name,parent_id,looks(id,title),dashboards(id,title)")
72
+ folder_name = s.name
73
+ folder_name = "nil (#{s.id})" unless folder_name
74
+ folder_name = "\"#{folder_name}\"" if ((folder_name != folder_name.strip) || (folder_name.length == 0))
75
+ folder_name += " (#{folder_id})" unless folder_ids.length == 1
76
+ tree_data[folder_name] =
77
+ [ recurse_folders(s.id) ] +
78
78
  s.looks.map { |l| "(l) #{l.title}" } +
79
- s.dashboards.map { |d| "(d) #{d.title}" }
79
+ s.dashboards.map { |d| "(d) #{d.title}" }
80
80
  end
81
81
  tree = TTY::Tree.new(tree_data)
82
82
  output.puts tree.render
83
83
  end
84
84
  end
85
85
 
86
- def recurse_spaces(space_id)
87
- data = query_space_children(space_id, "id,name,parent_id,looks(id,title),dashboards(id,title)")
86
+ def recurse_folders(folder_id)
87
+ data = query_folder_children(folder_id, "id,name,parent_id,looks(id,title),dashboards(id,title)")
88
88
  tree_branch = Hash.new
89
89
  data.each do |s|
90
- space_name = s.name
91
- space_name = "nil (#{s.id})" unless space_name
92
- space_name = "\"#{space_name}\"" if ((space_name != space_name.strip) || (space_name.length == 0))
93
- tree_branch[space_name] =
94
- [ recurse_spaces(s.id) ] +
90
+ folder_name = s.name
91
+ folder_name = "nil (#{s.id})" unless folder_name
92
+ folder_name = "\"#{folder_name}\"" if ((folder_name != folder_name.strip) || (folder_name.length == 0))
93
+ tree_branch[folder_name] =
94
+ [ recurse_folders(s.id) ] +
95
95
  s.looks.map { |l| "(l) #{l.title}" } +
96
96
  s.dashboards.map { |d| "(d) #{d.title}" }
97
97
  end
@@ -25,25 +25,25 @@ require_relative 'subcommandbase'
25
25
 
26
26
  module Gzr
27
27
  module Commands
28
- class Space < SubCommandBase
28
+ class Folder < SubCommandBase
29
29
 
30
- namespace :space
30
+ namespace :folder
31
31
 
32
- desc 'create NAME PARENT_SPACE', 'Command description...'
32
+ desc 'create NAME PARENT_FOLDER', 'Command description...'
33
33
  method_option :help, aliases: '-h', type: :boolean,
34
34
  desc: 'Display usage information'
35
35
  method_option :plain, type: :boolean,
36
36
  desc: 'Provide minimal response information'
37
- def create(name, parent_space)
37
+ def create(name, parent_folder)
38
38
  if options[:help]
39
39
  invoke :help, ['create']
40
40
  else
41
- require_relative 'space/create'
42
- Gzr::Commands::Space::Create.new(name, parent_space, options).execute
41
+ require_relative 'folder/create'
42
+ Gzr::Commands::Folder::Create.new(name, parent_folder, options).execute
43
43
  end
44
44
  end
45
45
 
46
- desc 'top', 'Retrieve the top level (or root) spaces'
46
+ desc 'top', 'Retrieve the top level (or root) folders'
47
47
  method_option :help, aliases: '-h', type: :boolean,
48
48
  desc: 'Display usage information'
49
49
  method_option :fields, type: :string, default: 'id,name,is_shared_root,is_users_root,is_embed_shared_root,is_embed_users_root',
@@ -56,12 +56,12 @@ module Gzr
56
56
  if options[:help]
57
57
  invoke :help, ['top']
58
58
  else
59
- require_relative 'space/top'
60
- Gzr::Commands::Space::Top.new(options).execute
59
+ require_relative 'folder/top'
60
+ Gzr::Commands::Folder::Top.new(options).execute
61
61
  end
62
62
  end
63
63
 
64
- desc 'export SPACE_ID', 'Export a space, including all child looks, dashboards, and spaces.'
64
+ desc 'export FOLDER_ID', 'Export a folder, including all child looks, dashboards, and folders.'
65
65
  method_option :help, aliases: '-h', type: :boolean,
66
66
  desc: 'Display usage information'
67
67
  method_option :plans, type: :boolean,
@@ -74,42 +74,42 @@ module Gzr
74
74
  desc: 'TarGZ file to store output'
75
75
  method_option :zip, type: :string,
76
76
  desc: 'Zip file to store output'
77
- def export(starting_space)
77
+ def export(starting_folder)
78
78
  if options[:help]
79
79
  invoke :help, ['export']
80
80
  else
81
- require_relative 'space/export'
82
- Gzr::Commands::Space::Export.new(starting_space,options).execute
81
+ require_relative 'folder/export'
82
+ Gzr::Commands::Folder::Export.new(starting_folder,options).execute
83
83
  end
84
84
  end
85
85
 
86
- desc 'tree STARTING_SPACE', 'Display the dashbaords, looks, and subspaces or a space in a tree format'
86
+ desc 'tree STARTING_FOLDER', 'Display the dashboards, looks, and subfolders of a folder in a tree format'
87
87
  method_option :help, aliases: '-h', type: :boolean,
88
88
  desc: 'Display usage information'
89
- def tree(starting_space)
89
+ def tree(starting_folder)
90
90
  if options[:help]
91
91
  invoke :help, ['tree']
92
92
  else
93
- require_relative 'space/tree'
94
- Gzr::Commands::Space::Tree.new(starting_space,options).execute
93
+ require_relative 'folder/tree'
94
+ Gzr::Commands::Folder::Tree.new(starting_folder,options).execute
95
95
  end
96
96
  end
97
97
 
98
- desc 'cat SPACE_ID', 'Output the JSON representation of a space to the screen or a file'
98
+ desc 'cat FOLDER_ID', 'Output the JSON representation of a folder to the screen or a file'
99
99
  method_option :help, aliases: '-h', type: :boolean,
100
100
  desc: 'Display usage information'
101
101
  method_option :dir, type: :string,
102
102
  desc: 'Directory to get output file'
103
- def cat(space_id)
103
+ def cat(folder_id)
104
104
  if options[:help]
105
105
  invoke :help, ['cat']
106
106
  else
107
- require_relative 'space/cat'
108
- Gzr::Commands::Space::Cat.new(space_id,options).execute
107
+ require_relative 'folder/cat'
108
+ Gzr::Commands::Folder::Cat.new(folder_id,options).execute
109
109
  end
110
110
  end
111
111
 
112
- desc 'ls FILTER_SPEC', 'list the contents of a space given by space name, space_id, ~ for the current user\'s default space, or ~name / ~number for the home space of a user'
112
+ desc 'ls FILTER_SPEC', 'list the contents of a folder given by folder name, folder_id, ~ for the current user\'s default folder, or ~name / ~number for the home folder of a user'
113
113
  method_option :help, aliases: '-h', type: :boolean,
114
114
  desc: 'Display usage information'
115
115
  method_option :fields, type: :string, default: 'parent_id,id,name,looks(id,title),dashboards(id,title)',
@@ -122,20 +122,20 @@ module Gzr
122
122
  if options[:help]
123
123
  invoke :help, ['ls']
124
124
  else
125
- require_relative 'space/ls'
126
- Gzr::Commands::Space::Ls.new(filter_spec,options).execute
125
+ require_relative 'folder/ls'
126
+ Gzr::Commands::Folder::Ls.new(filter_spec,options).execute
127
127
  end
128
128
  end
129
129
 
130
- desc 'rm SPACE_ID', 'Delete a space. The space must be empty or the --force flag specified to deleted subspaces, dashboards, and looks.'
130
+ desc 'rm FOLDER_ID', 'Delete a folder. The folder must be empty or the --force flag specified to deleted subfolders, dashboards, and looks.'
131
131
  method_option :help, aliases: '-h', type: :boolean,
132
132
  desc: 'Display usage information'
133
- def rm(space_id)
133
+ def rm(folder_id)
134
134
  if options[:help]
135
135
  invoke :help, ['rm']
136
136
  else
137
- require_relative 'space/rm'
138
- Gzr::Commands::Space::Rm.new(space_id,options).execute
137
+ require_relative 'folder/rm'
138
+ Gzr::Commands::Folder::Rm.new(folder_id,options).execute
139
139
  end
140
140
  end
141
141
  end
@@ -32,7 +32,7 @@ module Gzr
32
32
  desc 'member_users GROUP_ID', 'List the users that are members of the given group'
33
33
  method_option :help, aliases: '-h', type: :boolean,
34
34
  desc: 'Display usage information'
35
- method_option :fields, type: :string, default: 'id,email,last_name,first_name,personal_space_id,home_space_id',
35
+ method_option :fields, type: :string, default: 'id,email,last_name,first_name,personal_folder_id,home_folder_id',
36
36
  desc: 'Fields to display'
37
37
  method_option :plain, type: :boolean, default: false,
38
38
  desc: 'print without any extra formatting'
@@ -35,10 +35,10 @@ module Gzr
35
35
  include Gzr::User
36
36
  include Gzr::Plan
37
37
  include Gzr::FileHelper
38
- def initialize(file, dest_space_id, options)
38
+ def initialize(file, dest_folder_id, options)
39
39
  super()
40
40
  @file = file
41
- @dest_space_id = dest_space_id
41
+ @dest_folder_id = dest_folder_id
42
42
  @options = options
43
43
  end
44
44
 
@@ -60,7 +60,7 @@ module Gzr
60
60
  raise Gzr::CLI::Error, "import file is not a valid look"
61
61
  end
62
62
 
63
- look = upsert_look(@me.id,create_fetch_query(data[:query]).id,@dest_space_id,data,output: output)
63
+ look = upsert_look(@me.id,create_fetch_query(data[:query]).id,@dest_folder_id,data,output: output)
64
64
  upsert_plans_for_look(look.id,@me.id,data[:scheduled_plans]) if data[:scheduled_plans]
65
65
  output.puts "Imported look #{look.id}" unless @options[:plain]
66
66
  output.puts look.id if @options[:plain]
@@ -30,10 +30,10 @@ module Gzr
30
30
  class Look
31
31
  class Mv < Gzr::Command
32
32
  include Gzr::Look
33
- def initialize(look_id, target_space_id, options)
33
+ def initialize(look_id, target_folder_id, options)
34
34
  super()
35
35
  @look_id = look_id
36
- @target_space_id = target_space_id
36
+ @target_folder_id = target_folder_id
37
37
  @options = options
38
38
  end
39
39
 
@@ -44,18 +44,18 @@ module Gzr
44
44
  look = query_look(@look_id)
45
45
  raise Gzr::CLI::Error, "Look with id #{@look_id} does not exist" unless look
46
46
 
47
- matching_title = search_looks_by_title(look[:title],@target_space_id)
47
+ matching_title = search_looks_by_title(look[:title],@target_folder_id)
48
48
  if matching_title.empty? || matching_title.first[:deleted]
49
49
  matching_title = false
50
50
  end
51
-
51
+
52
52
  if matching_title
53
- raise Gzr::CLI::Error, "Look #{look[:title]} already exists in space #{@target_space_id}\nUse --force if you want to overwrite it" unless @options[:force]
54
- say_ok "Deleting existing look #{matching_title.first[:id]} #{matching_title.first[:title]} in space #{@target_space_id}", output: output
53
+ raise Gzr::CLI::Error, "Look #{look[:title]} already exists in folder #{@target_folder_id}\nUse --force if you want to overwrite it" unless @options[:force]
54
+ say_ok "Deleting existing look #{matching_title.first[:id]} #{matching_title.first[:title]} in folder #{@target_folder_id}", output: output
55
55
  update_look(matching_title.first[:id],{:deleted=>true})
56
56
  end
57
- update_look(look[:id],{:space_id=>@target_space_id})
58
- output.puts "Moved look #{look[:id]} to space #{@target_space_id}" unless @options[:plain]
57
+ update_look(look[:id],{:folder_id=>@target_folder_id})
58
+ output.puts "Moved look #{look[:id]} to folder #{@target_folder_id}" unless @options[:plain]
59
59
  end
60
60
  end
61
61
  end
@@ -29,17 +29,17 @@ module Gzr
29
29
 
30
30
  namespace :look
31
31
 
32
- desc 'mv LOOK_ID TARGET_SPACE_ID', 'Move a look to the given space'
32
+ desc 'mv LOOK_ID TARGET_FOLDER_ID', 'Move a look to the given folder'
33
33
  method_option :help, aliases: '-h', type: :boolean,
34
34
  desc: 'Display usage information'
35
35
  method_option :force, type: :boolean,
36
- desc: 'Overwrite a look with the same name in the target space'
37
- def mv(look_id, target_space_id)
36
+ desc: 'Overwrite a look with the same name in the target folder'
37
+ def mv(look_id, target_folder_id)
38
38
  if options[:help]
39
39
  invoke :help, ['mv']
40
40
  else
41
41
  require_relative 'look/mv'
42
- Gzr::Commands::Look::Mv.new(look_id, target_space_id, options).execute
42
+ Gzr::Commands::Look::Mv.new(look_id, target_folder_id, options).execute
43
43
  end
44
44
  end
45
45
 
@@ -59,19 +59,19 @@ module Gzr
59
59
  end
60
60
  end
61
61
 
62
- desc 'import FILE DEST_SPACE_ID', 'Import a look from a file'
62
+ desc 'import FILE DEST_FOLDER_ID', 'Import a look from a file'
63
63
  method_option :help, aliases: '-h', type: :boolean,
64
64
  desc: 'Display usage information'
65
65
  method_option :plain, type: :boolean,
66
66
  desc: 'Provide minimal response information'
67
67
  method_option :force, type: :boolean,
68
- desc: 'Overwrite a look with the same name/slug in the target space'
69
- def import(file,dest_space_id)
68
+ desc: 'Overwrite a look with the same name/slug in the target folder'
69
+ def import(file,dest_folder_id)
70
70
  if options[:help]
71
71
  invoke :help, ['import']
72
72
  else
73
73
  require_relative 'look/import'
74
- Gzr::Commands::Look::Import.new(file, dest_space_id, options).execute
74
+ Gzr::Commands::Look::Import.new(file, dest_folder_id, options).execute
75
75
  end
76
76
  end
77
77
 
@@ -84,7 +84,7 @@ module Gzr
84
84
  desc 'me', 'Show information for the current user'
85
85
  method_option :help, aliases: '-h', type: :boolean,
86
86
  desc: 'Display usage information'
87
- method_option :fields, type: :string, default: 'id,email,last_name,first_name,personal_space_id,home_space_id',
87
+ method_option :fields, type: :string, default: 'id,email,last_name,first_name,personal_folder_id,home_folder_id',
88
88
  desc: 'Fields to display'
89
89
  method_option :plain, type: :boolean, default: false,
90
90
  desc: 'print without any extra formatting'
@@ -102,7 +102,7 @@ module Gzr
102
102
  desc 'ls', 'list all users'
103
103
  method_option :help, aliases: '-h', type: :boolean,
104
104
  desc: 'Display usage information'
105
- method_option :fields, type: :string, default: 'id,email,last_name,first_name,personal_space_id,home_space_id',
105
+ method_option :fields, type: :string, default: 'id,email,last_name,first_name,personal_folder_id,home_folder_id',
106
106
  desc: 'Fields to display'
107
107
  method_option :"last-login", type: :boolean, default: false,
108
108
  desc: 'Include the time of the most recent login'
@@ -49,11 +49,11 @@ module Gzr
49
49
  data
50
50
  end
51
51
 
52
- def search_dashboards_by_slug(slug, space_id=nil)
52
+ def search_dashboards_by_slug(slug, folder_id=nil)
53
53
  data = []
54
54
  begin
55
55
  req = { :slug => slug }
56
- req[:space_id] = space_id if space_id
56
+ req[:folder_id] = folder_id if folder_id
57
57
  data = @sdk.search_dashboards(req)
58
58
  req[:deleted] = true
59
59
  data = @sdk.search_dashboards(req) if data.empty?
@@ -65,11 +65,11 @@ module Gzr
65
65
  data
66
66
  end
67
67
 
68
- def search_dashboards_by_title(title, space_id=nil)
68
+ def search_dashboards_by_title(title, folder_id=nil)
69
69
  data = []
70
70
  begin
71
71
  req = { :title => title }
72
- req[:space_id] = space_id if space_id
72
+ req[:folder_id] = folder_id if folder_id
73
73
  data = @sdk.search_dashboards(req)
74
74
  req[:deleted] = true
75
75
  data = @sdk.search_dashboards(req) if data.empty?
@@ -84,6 +84,7 @@ module Gzr
84
84
  def create_dashboard(dash)
85
85
  begin
86
86
  data = @sdk.create_dashboard(dash)
87
+ say_error data.inspect if data.respond_to?(:message)
87
88
  data&.dashboard_filters&.sort! { |a,b| a.row <=> b.row }
88
89
  data&.dashboard_layouts&.sort_by! { |v| (v.active ? 0 : 1) }
89
90
  rescue LookerSDK::Error => e
@@ -183,6 +184,18 @@ module Gzr
183
184
  data
184
185
  end
185
186
 
187
+ def get_all_dashboard_layout_components(id)
188
+ begin
189
+ data = @sdk.dashboard_layout_dashboard_layout_components(id)
190
+ return nil if data.respond_to?(:message) && data.message == 'Not found'
191
+ rescue LookerSDK::Error => e
192
+ say_error "Error getting dashboard_layout_dashboard_layout_components(#{id})"
193
+ say_error e.message
194
+ raise
195
+ end
196
+ data
197
+ end
198
+
186
199
  def update_dashboard_layout_component(id,component)
187
200
  begin
188
201
  data = @sdk.update_dashboard_layout_component(id,component)