lib/gzr/commands/plan.rb in gazer-0.3.15 vs lib/gzr/commands/plan.rb in gazer-0.3.16
- old
+ new
@@ -126,11 +126,11 @@
end
desc 'ls', 'List the scheduled plans on a server'
method_option :help, aliases: '-h', type: :boolean,
desc: 'Display usage information'
- method_option :fields, type: :string, default: 'id,enabled,name,user(id,display_name),look_id,dashboard_id,lookml_dashboard_id',
+ method_option :fields, type: :string, default: 'id,enabled,name,user(id,display_name),look_id,dashboard_id,lookml_dashboard_id,crontab',
desc: 'Fields to display'
method_option :disabled, type: :boolean,
desc: 'Retrieve disable plans'
method_option :plain, type: :boolean, default: false,
desc: 'print without any extra formatting'
@@ -143,22 +143,22 @@
require_relative 'plan/ls'
Gzr::Commands::Plan::Ls.new(options).execute
end
end
- desc 'randomize', 'Randomize the scheduled plans on a server'
+ desc 'randomize [PLAN_ID]', 'Randomize the scheduled plans on a server'
method_option :help, aliases: '-h', type: :boolean,
desc: 'Display usage information'
method_option :window, type: :numeric, default: 60,
desc: 'Length of window'
method_option :all, type: :boolean,
desc: 'Randomize all plans regardless of owner'
- def randomize(*)
+ def randomize(plan_id = nil)
if options[:help]
invoke :help, ['randomize']
else
require_relative 'plan/randomize'
- Gzr::Commands::Plan::Randomize.new(options).execute
+ Gzr::Commands::Plan::Randomize.new(plan_id, options).execute
end
end
end
end
end