1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
= content_for :title do
%h3.project-title
Runner ##{@runner.id}
.pull-right
- if @runner.shared?
%span.runner-state.runner-state-shared
共享的
- else
%span.runner-state.runner-state-specific
特定的
- if @runner.shared?
.bs-callout.bs-callout-success
%h4 此 runner 将会处理所有<b>未指派</b>项目的构建
%p
如果你想让此 runner 只会处理指派项目的构建,请在下面的表格中启用相关项目的指派。
需要注意的是,此操作只能一次。一旦指定,此 runner 将不能再转为共享的。
- else
.bs-callout.bs-callout-info
%h4 此 runner 将只会处理<b>指派</b>项目的构建
%p 你不能再将此 runner 转为共享的。
%hr
= form_for @runner, url: admin_runner_path(@runner), html: { class: 'form-horizontal' } do |f|
.form-group
= label_tag :token, class: 'control-label' do
授权码
.col-sm-10
= f.text_field :token, class: 'form-control', readonly: true
.form-group
= label_tag :description, class: 'control-label' do
描述
.col-sm-10
= f.text_field :description, class: 'form-control'
.form-group
= label_tag :tag_list, class: 'control-label' do
标签列表
.col-sm-10
= f.text_field :tag_list, value: @runner.tag_list.to_s, class: 'form-control'
.help-block 你可以设置构建只使用指定标签的 runner
.form-actions
= f.submit '保存', class: 'btn btn-save'
.row
.col-md-6
%h4 此 runner 指派的项目
- if @runner.projects.any?
%table.table
%thead
%tr
%th 指派的项目
%th
- @runner.runner_projects.each do |runner_project|
- project = runner_project.project
- if project
%tr.alert-info
%td
%strong
= project.name_with_namespace
%td
.pull-right
= link_to '禁用', [:admin, project.namespace.becomes(Namespace), project, runner_project], method: :delete, class: 'btn btn-danger btn-xs'
%table.table
%thead
%tr
%th 项目
%th
%tr
%td
= form_tag admin_runner_path(@runner), id: 'runner-projects-search', class: 'form-inline', method: :get do
.form-group
= search_field_tag :search, params[:search], class: 'form-control', spellcheck: false
= submit_tag '搜索', class: 'btn'
%td
- @projects.each do |project|
%tr
%td
= project.name_with_namespace
%td
.pull-right
= form_for [:admin, project.namespace.becomes(Namespace), project, project.runner_projects.new] do |f|
= f.hidden_field :runner_id, value: @runner.id
= f.submit '启用', class: 'btn btn-xs'
= paginate @projects
.col-md-6
%h4 此 runner 最近完成的构建
%table.table.builds.runner-builds
%thead
%tr
%th 构建
%th 状态
%th 项目
%th 提交
%th 结束时间
- @builds.each do |build|
- project = build.project
%tr.build
%td.id
- if project
= link_to namespace_project_build_path(project.namespace, project, build) do
%strong ##{build.id}
- else
%strong ##{build.id}
%td.status
= ci_status_with_icon(build.status)
%td.status
- if project
= project.name_with_namespace
%td.build-link
- if project
= link_to ci_status_path(build.commit) do
%strong #{build.commit.short_sha}
%td.timestamp
- if build.finished_at
%span #{time_ago_in_words build.finished_at}之前
|