summaryrefslogtreecommitdiff
path: root/app/views/ci
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-28 16:47:18 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-28 16:47:18 +0200
commitb65641959165e8d7daf47f921b058a647189a060 (patch)
treef6d14d73b63006ca4b917adda6694d4285743fe3 /app/views/ci
parentd8e631c1e5de535864f36e985e9bfbc4a8482916 (diff)
parentc876bfa0f28ddae7fbca314505f5b150b9cec194 (diff)
downloadgitlab-ce-b65641959165e8d7daf47f921b058a647189a060.tar.gz
Merge branch 'move-runners-page'
Diffstat (limited to 'app/views/ci')
-rw-r--r--app/views/ci/projects/show.html.haml2
-rw-r--r--app/views/ci/runners/_runner.html.haml35
-rw-r--r--app/views/ci/runners/_shared_runners.html.haml23
-rw-r--r--app/views/ci/runners/_specific_runners.html.haml29
-rw-r--r--app/views/ci/runners/edit.html.haml27
-rw-r--r--app/views/ci/runners/index.html.haml25
-rw-r--r--app/views/ci/runners/show.html.haml64
-rw-r--r--app/views/ci/shared/_guide.html.haml2
8 files changed, 2 insertions, 205 deletions
diff --git a/app/views/ci/projects/show.html.haml b/app/views/ci/projects/show.html.haml
index 6443378af99..73e60795ba6 100644
--- a/app/views/ci/projects/show.html.haml
+++ b/app/views/ci/projects/show.html.haml
@@ -3,7 +3,7 @@
- if current_user && can?(current_user, :manage_project, gl_project) && !@project.any_runners?
.alert.alert-danger
Builds for this project wont be served unless you configure runners on
- = link_to "Runners page", ci_project_runners_path(@project)
+ = link_to "Runners page", runners_path(@project.gl_project)
%ul.nav.nav-tabs.append-bottom-20
%li{class: ref_tab_class}
diff --git a/app/views/ci/runners/_runner.html.haml b/app/views/ci/runners/_runner.html.haml
deleted file mode 100644
index ef8622e2807..00000000000
--- a/app/views/ci/runners/_runner.html.haml
+++ /dev/null
@@ -1,35 +0,0 @@
-%li.runner{id: dom_id(runner)}
- %h4
- = runner_status_icon(runner)
- %span.monospace
- - if @runners.include?(runner)
- = link_to runner.short_sha, ci_project_runner_path(@project, runner)
- %small
- =link_to edit_ci_project_runner_path(@project, runner) do
- %i.fa.fa-edit.btn
- - else
- = runner.short_sha
-
- .pull-right
- - if @runners.include?(runner)
- - if runner.belongs_to_one_project?
- = link_to 'Remove runner', [:ci, @project, runner], data: { confirm: "Are you sure?" }, method: :delete, class: 'btn btn-danger btn-sm'
- - else
- - runner_project = @project.runner_projects.find_by(runner_id: runner)
- = link_to 'Disable for this project', [:ci, @project, runner_project], data: { confirm: "Are you sure?" }, method: :delete, class: 'btn btn-danger btn-sm'
- - elsif runner.specific?
- = form_for [:ci, @project, @project.runner_projects.new] do |f|
- = f.hidden_field :runner_id, value: runner.id
- = f.submit 'Enable for this project', class: 'btn btn-sm'
- .pull-right
- %small.light
- \##{runner.id}
- - if runner.description.present?
- %p.runner-description
- = runner.description
- - if runner.tag_list.present?
- %p
- - runner.tag_list.each do |tag|
- %span.label.label-primary
- = tag
-
diff --git a/app/views/ci/runners/_shared_runners.html.haml b/app/views/ci/runners/_shared_runners.html.haml
deleted file mode 100644
index 944b3fd930d..00000000000
--- a/app/views/ci/runners/_shared_runners.html.haml
+++ /dev/null
@@ -1,23 +0,0 @@
-%h3 Shared runners
-
-.bs-callout.bs-callout-warning
- GitLab Runners do not offer secure isolation between projects that they do builds for. You are TRUSTING all GitLab users who can push code to project A, B or C to run shell scripts on the machine hosting runner X.
- %hr
- - if @project.shared_runners_enabled
- = link_to toggle_shared_runners_ci_project_path(@project), class: 'btn btn-warning', method: :post do
- Disable shared runners
- - else
- = link_to toggle_shared_runners_ci_project_path(@project), class: 'btn btn-success', method: :post do
- Enable shared runners
- &nbsp; for this project
-
-- if @shared_runners_count.zero?
- This application has no shared runners yet.
- Please use specific runners or ask administrator to create one
-- else
- %h4.underlined-title Available shared runners - #{@shared_runners_count}
- %ul.bordered-list.available-shared-runners
- = render @shared_runners.first(10)
- - if @shared_runners_count > 10
- .light
- and #{@shared_runners_count - 10} more...
diff --git a/app/views/ci/runners/_specific_runners.html.haml b/app/views/ci/runners/_specific_runners.html.haml
deleted file mode 100644
index 0604e7a46c5..00000000000
--- a/app/views/ci/runners/_specific_runners.html.haml
+++ /dev/null
@@ -1,29 +0,0 @@
-%h3 Specific runners
-
-.bs-callout.help-callout
- %h4 How to setup a new project specific runner
-
- %ol
- %li
- Install GitLab Runner software.
- Checkout the #{link_to 'GitLab Runner section', 'https://about.gitlab.com/gitlab-ci/#gitlab-runner', target: '_blank'} to install it
- %li
- Specify following URL during runner setup:
- %code #{ci_root_url(only_path: false)}
- %li
- Use the following registration token during setup:
- %code #{@project.token}
- %li
- Start runner!
-
-
-- if @runners.any?
- %h4.underlined-title Runners activated for this project
- %ul.bordered-list.activated-specific-runners
- = render @runners
-
-- if @specific_runners.any?
- %h4.underlined-title Available specific runners
- %ul.bordered-list.available-specific-runners
- = render @specific_runners
- = paginate @specific_runners
diff --git a/app/views/ci/runners/edit.html.haml b/app/views/ci/runners/edit.html.haml
deleted file mode 100644
index 81c8e58ae2b..00000000000
--- a/app/views/ci/runners/edit.html.haml
+++ /dev/null
@@ -1,27 +0,0 @@
-%h4 Runner ##{@runner.id}
-%hr
-= form_for [:ci, @project, @runner], html: { class: 'form-horizontal' } do |f|
- .form-group
- = label :active, "Active", class: 'control-label'
- .col-sm-10
- .checkbox
- = f.check_box :active
- %span.light Paused runners don't accept new builds
- .form-group
- = label_tag :token, class: 'control-label' do
- Token
- .col-sm-10
- = f.text_field :token, class: 'form-control', readonly: true
- .form-group
- = label_tag :description, class: 'control-label' do
- Description
- .col-sm-10
- = f.text_field :description, class: 'form-control'
- .form-group
- = label_tag :tag_list, class: 'control-label' do
- Tags
- .col-sm-10
- = f.text_field :tag_list, class: 'form-control'
- .help-block You can setup jobs to only use runners with specific tags
- .form-actions
- = f.submit 'Save', class: 'btn btn-save'
diff --git a/app/views/ci/runners/index.html.haml b/app/views/ci/runners/index.html.haml
deleted file mode 100644
index 529fb9c296d..00000000000
--- a/app/views/ci/runners/index.html.haml
+++ /dev/null
@@ -1,25 +0,0 @@
-.light
- %p
- A 'runner' is a process which runs a build.
- You can setup as many runners as you need.
- %br
- Runners can be placed on separate users, servers, and even on your local machine.
-
- %p Each runner can be in one of the following states:
- %div
- %ul
- %li
- %span.label.label-success active
- \- runner is active and can process any new build
- %li
- %span.label.label-danger paused
- \- runner is paused and will not receive any new build
-
-%hr
-
-%p.lead To start serving your builds you can either add specific runners to your project or use shared runners
-.row
- .col-sm-6
- = render 'specific_runners'
- .col-sm-6
- = render 'shared_runners'
diff --git a/app/views/ci/runners/show.html.haml b/app/views/ci/runners/show.html.haml
deleted file mode 100644
index ffec495f85a..00000000000
--- a/app/views/ci/runners/show.html.haml
+++ /dev/null
@@ -1,64 +0,0 @@
-= content_for :title do
- %h3.project-title
- Runner ##{@runner.id}
- .pull-right
- - if @runner.shared?
- %span.runner-state.runner-state-shared
- Shared
- - else
- %span.runner-state.runner-state-specific
- Specific
-
-%table.table
- %thead
- %tr
- %th Property Name
- %th Value
- %tr
- %td
- Tags
- %td
- - @runner.tag_list.each do |tag|
- %span.label.label-primary
- = tag
- %tr
- %td
- Name
- %td
- = @runner.name
- %tr
- %td
- Version
- %td
- = @runner.version
- %tr
- %td
- Revision
- %td
- = @runner.revision
- %tr
- %td
- Platform
- %td
- = @runner.platform
- %tr
- %td
- Architecture
- %td
- = @runner.architecture
- %tr
- %td
- Description
- %td
- = @runner.description
- %tr
- %td
- Last contact
- %td
- - if @runner.contacted_at
- #{time_ago_in_words(@runner.contacted_at)} ago
- - else
- Never
-
-
-
diff --git a/app/views/ci/shared/_guide.html.haml b/app/views/ci/shared/_guide.html.haml
index 8a42f29b77c..db2d7f2f4b6 100644
--- a/app/views/ci/shared/_guide.html.haml
+++ b/app/views/ci/shared/_guide.html.haml
@@ -4,7 +4,7 @@
%ol
%li
Add at least one runner to the project.
- Go to #{link_to 'Runners page', ci_project_runners_path(@project), target: :blank} for instructions.
+ Go to #{link_to 'Runners page', runners_path(@project.gl_project), target: :blank} for instructions.
%li
Put the .gitlab-ci.yml in the root of your repository. Examples can be found in #{link_to "Configuring project (.gitlab-ci.yml)", "http://doc.gitlab.com/ci/yaml/README.html", target: :blank}.
You can also test your .gitlab-ci.yml in the #{link_to "Lint", ci_lint_path}