lib/jenkins_pipeline_builder/view.rb
def create_base_view(view_name, type = 'listview', parent_view_name = nil)
      @logger.info "Creating a view '#{view_name}' of type '#{type}'"
      mode = get_mode(type)
      initial_post_params = {
        'name' => view_name,
        'mode' => mode,
        'json' => {
          'name' => view_name,
          'mode' => mode
        }.to_json
      }

      if JenkinsPipelineBuilder.debug
        # pp initial_post_params
        return
      end

      view_path = parent_view_name.nil? ? '' : "/view/#{parent_view_name}"
      view_path += '/createView'

      @client.api_post_request(view_path, initial_post_params)
    end
# Creates a new empty view of the given type
#
# @param [String] view_name Name of the view to be created
# @param [String] type Type of view to be created. Valid options:
# listview, myview. Default: listview
#
Creates a new empty view of the given type
Creates a new empty view of the given type
def create_base_view(view_name, type = 'listview', parent_view_name = nil)
      @logger.info "Creating a view '#{view_name}' of type '#{type}'"
      mode = get_mode(type)
      initial_post_params = {
        'name' => view_name,
        'mode' => mode,
        'json' => {
          'name' => view_name,
          'mode' => mode
        }.to_json
      }
      if JenkinsPipelineBuilder.debug
        return
      end
      view_path = parent_view_name.nil? ? '' : "/view/#{parent_view_name}"
      view_path += '/createView'
      @client.api_post_request(view_path, initial_post_params)
    end
def create_base_view ( view_name , type = 'listview' , parent_view_name = nil ) @logger . info "Creating a view '#{view_name}' of type '#{type}'" mode = get_mode ( type ) initial_post_params = { 'name' => view_name , 'mode' => mode , 'json' => { 'name' => view_name , 'mode' => mode } . to_json } if JenkinsPipelineBuilder . debug return end view_path = parent_view_name . nil? ? '' : "/view/#{parent_view_name}" view_path += '/createView' @client . api_post_request ( view_path , initial_post_params ) end
Creates a new empty view of the given type
Creates a new empty view of the given type
# pp initial_post_params
view_name
type
parent_view_name
type Type of view to be created. Valid options: listview, myview. Default: listview
type Type of view to be created . Valid options : listview myview . Default : listview