Commit d9123f95 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Project integration page

parent b967a5e8
......@@ -16,6 +16,10 @@ class ProjectsController < ApplicationController
@builds = @builds.latest_sha.order('id DESC').paginate(page: params[:page], per_page: 20)
end
def details
@project = Project.find(params[:id])
end
def new
@project = Project.new
end
......
%h3
Project: #{@project.name} &rarr; Integration details
- if @project.gitlab_url.present?
%small= link_to 'View on GitLab', @project.gitlab_url
.right
= link_to project_path(@project), class: 'btn btn-small' do
Builds
%a.btn.btn-small{href: edit_project_path(@project)}
%i.icon-edit.icon-white
Edit
%form.form-horizontal
%fieldset
%legend
As Service
%small (GitLab 3.1+)
.control-group
= label_tag :url, 'Project URL', class: 'control-label'
.controls
= text_field_tag :url, project_url(@project), class: 'input-xxlarge'
.control-group
= label_tag :token, 'Project Token', class: 'control-label'
.controls
= text_field_tag :token, @project.token, class: 'input-xxlarge'
%fieldset
%legend
As http hook
%small (GitLab 3.0 and earlier)
.control-group
= label_tag :hook_url, 'HTTP POST Hook url', class: 'control-label'
.controls
= text_field_tag :url, build_project_url(@project, token: @project.token), class: 'input-xxlarge'
%p.hint Copy this link and add to GitLab web hooks
%h3
Project: #{@project.name}
- if @project.gitlab_url
- if @project.gitlab_url.present?
%small= link_to 'View on GitLab', @project.gitlab_url
.right
= link_to details_project_path(@project), class: 'btn btn-small' do
Details
%a.btn.btn-small{href: edit_project_path(@project)}
%i.icon-edit.icon-white
Edit
.token_widget
%strong HTTP POST
= text_field_tag :url, build_project_url(@project, token: @project.token), class: 'input-xxlarge'
%span Copy this link and add to GitLab web hooks
.nav.nav-tabs
%li{class: ref_tab_class}
......
......@@ -7,6 +7,7 @@ GitlabCi::Application.routes.draw do
member do
get :run
get :status
get :details
post :build
end
resources :builds, only: [:show] do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment