lib/jenkins_pipeline_builder/view.rb
def post_payload(params)
      statuses = { 'enabled_jobs_only' => '1', 'disabled_jobs_only' => '2' }

      json = {
        'name' => params[:name],
        'description' => params[:description],
        'mode' => get_mode(params[:type]),
        'statusFilter' => '',
        'columns' => get_columns(params[:type])
      }
      json['groupingRules'] = params[:groupingRules] if params[:groupingRules]

      {
        'name' => params[:name],
        'mode' => get_mode(params[:type]),
        'description' => params[:description],
        'statusFilter' => statuses.fetch(params[:status_filter], ''),
        'json' => json.to_json
      }
    end
# Initializes a new View object.
#
# @param generator [Generator] the client object
#
# @return [View] the view object
#
Initializes a new View object.
Initializes a new View object .
def post_payload(params)
      statuses = { 'enabled_jobs_only' => '1', 'disabled_jobs_only' => '2' }
      json = {
        'name' => params[:name],
        'description' => params[:description],
        'mode' => get_mode(params[:type]),
        'statusFilter' => '',
        'columns' => get_columns(params[:type])
      }
      json['groupingRules'] = params[:groupingRules] if params[:groupingRules]
      {
        'name' => params[:name],
        'mode' => get_mode(params[:type]),
        'description' => params[:description],
        'statusFilter' => statuses.fetch(params[:status_filter], ''),
        'json' => json.to_json
      }
    end
def post_payload ( params ) statuses = { 'enabled_jobs_only' => '1' , 'disabled_jobs_only' => '2' } json = { 'name' => params [ :name ] , 'description' => params [ :description ] , 'mode' => get_mode ( params [ :type ] ) , 'statusFilter' => '' , 'columns' => get_columns ( params [ :type ] ) } json [ 'groupingRules' ] = params [ :groupingRules ] if params [ :groupingRules ] { 'name' => params [ :name ] , 'mode' => get_mode ( params [ :type ] ) , 'description' => params [ :description ] , 'statusFilter' => statuses . fetch ( params [ :status_filter ] , '' ) , 'json' => json . to_json } end
Initializes a new View object.
Initializes a new View object .
the view object
the view object
View
params
generator
the client object
the client object