web/config/routes.rb
author Jan Vrany <jan.vrany@fit.cvut.cz>
Thu, 19 Nov 2015 09:40:33 +0000
changeset 310 c01892c16c71
parent 234 b04a0f3c3aaf
permissions -rw-r--r--
Merge

CalipelWeb::Application.routes.draw do

  root 'index#index'
  get "index/index", as: 'index', path: 'index'
  get "pages/about", as: 'about', path: 'about'
  get "settings/index", as: 'settings'
  get "settings" => 'settings#index'

  resources :archive, only: :show

  resources :imports, only: [] do
    root action: :show_text_import
    collection do
      get "text-import", action: :show_text_import, as: 'new_text'
      post "text-import", action: :text_import, as: 'text'
      get "file-import", action: :show_file_import, as: 'new_file'
      post "file-import", action: :file_import, as: 'file'
      get "post-import", action: :show_post_import, as: 'new_post'
      post "push-import", action: :push_import, as: 'push'
    end
  end

  resources :results, only: :index do
    collection do
      get "configuration/:id", action: :configuration_results, as: 'configuration'
    end
  end

  resources :compare, only: :index do
    get "filter", on: :collection
  end

  resources :tags, only: [:index, :show]

  namespace "settings" do
    resources :languages, except: [:new]
    resources :runtimes, except: [:new]
    resources :operating_systems, except: [:new]
    resources :benchmark_infos, except: [:new]
    resources :benchmark_configurations, except: [:new]
  end

end