Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
36753b78
Commit
36753b78
authored
Feb 26, 2018
by
Tomasz Maczukin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace user_readable with human_readable
parent
4ce376c0
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
11 additions
and
11 deletions
+11
-11
app/models/ci/build.rb
app/models/ci/build.rb
+1
-1
app/models/ci/runner.rb
app/models/ci/runner.rb
+2
-2
app/serializers/build_details_entity.rb
app/serializers/build_details_entity.rb
+1
-1
app/views/admin/runners/_runner.html.haml
app/views/admin/runners/_runner.html.haml
+1
-1
app/views/projects/runners/_form.html.haml
app/views/projects/runners/_form.html.haml
+2
-2
app/views/projects/runners/_runner.html.haml
app/views/projects/runners/_runner.html.haml
+1
-1
app/views/projects/runners/show.html.haml
app/views/projects/runners/show.html.haml
+1
-1
spec/models/concerns/chronic_duration_attribute_spec.rb
spec/models/concerns/chronic_duration_attribute_spec.rb
+2
-2
No files found.
app/models/ci/build.rb
View file @
36753b78
...
@@ -91,7 +91,7 @@ module Ci
...
@@ -91,7 +91,7 @@ module Ci
after_commit
:update_project_statistics_after_save
,
on:
[
:create
,
:update
]
after_commit
:update_project_statistics_after_save
,
on:
[
:create
,
:update
]
after_commit
:update_project_statistics
,
on: :destroy
after_commit
:update_project_statistics
,
on: :destroy
chronic_duration_attr_reader
:used_timeout_
user
_readable
,
:used_timeout
chronic_duration_attr_reader
:used_timeout_
human
_readable
,
:used_timeout
class
<<
self
class
<<
self
# This is needed for url_for to work,
# This is needed for url_for to work,
...
...
app/models/ci/runner.rb
View file @
36753b78
...
@@ -9,7 +9,7 @@ module Ci
...
@@ -9,7 +9,7 @@ module Ci
ONLINE_CONTACT_TIMEOUT
=
1
.
hour
ONLINE_CONTACT_TIMEOUT
=
1
.
hour
UPDATE_DB_RUNNER_INFO_EVERY
=
40
.
minutes
UPDATE_DB_RUNNER_INFO_EVERY
=
40
.
minutes
AVAILABLE_SCOPES
=
%w[specific shared active paused online]
.
freeze
AVAILABLE_SCOPES
=
%w[specific shared active paused online]
.
freeze
FORM_EDITABLE
=
%i[description tag_list active run_untagged locked access_level maximum_job_timeout_
user
_readable]
.
freeze
FORM_EDITABLE
=
%i[description tag_list active run_untagged locked access_level maximum_job_timeout_
human
_readable]
.
freeze
has_many
:builds
has_many
:builds
has_many
:runner_projects
,
dependent: :destroy
# rubocop:disable Cop/ActiveRecordDependent
has_many
:runner_projects
,
dependent: :destroy
# rubocop:disable Cop/ActiveRecordDependent
...
@@ -52,7 +52,7 @@ module Ci
...
@@ -52,7 +52,7 @@ module Ci
cached_attr_reader
:version
,
:revision
,
:platform
,
:architecture
,
:contacted_at
,
:ip_address
cached_attr_reader
:version
,
:revision
,
:platform
,
:architecture
,
:contacted_at
,
:ip_address
chronic_duration_attr
:maximum_job_timeout_
user
_readable
,
:maximum_job_timeout
chronic_duration_attr
:maximum_job_timeout_
human
_readable
,
:maximum_job_timeout
# Searches for runners matching the given query.
# Searches for runners matching the given query.
#
#
...
...
app/serializers/build_details_entity.rb
View file @
36753b78
...
@@ -6,7 +6,7 @@ class BuildDetailsEntity < JobEntity
...
@@ -6,7 +6,7 @@ class BuildDetailsEntity < JobEntity
expose
:pipeline
,
using:
PipelineEntity
expose
:pipeline
,
using:
PipelineEntity
expose
:timeout
,
if:
->
(
*
)
{
!
build
.
used_timeout
.
nil?
}
do
|
build
|
expose
:timeout
,
if:
->
(
*
)
{
!
build
.
used_timeout
.
nil?
}
do
|
build
|
{
value:
build
.
used_timeout_
user
_readable
,
{
value:
build
.
used_timeout_
human
_readable
,
source:
build
.
timeout_source
}
source:
build
.
timeout_source
}
end
end
...
...
app/views/admin/runners/_runner.html.haml
View file @
36753b78
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
=
runner
.
ip_address
=
runner
.
ip_address
%td
%td
-
if
runner
.
defines_maximum_job_timeout?
-
if
runner
.
defines_maximum_job_timeout?
=
runner
.
maximum_job_timeout_
user
_readable
=
runner
.
maximum_job_timeout_
human
_readable
-
else
-
else
n/a
n/a
%td
%td
...
...
app/views/projects/runners/_form.html.haml
View file @
36753b78
...
@@ -40,10 +40,10 @@
...
@@ -40,10 +40,10 @@
.col-sm-10
.col-sm-10
=
f
.
text_field
:description
,
class:
'form-control'
=
f
.
text_field
:description
,
class:
'form-control'
.form-group
.form-group
=
label_tag
:maximum_job_timeout_
user
_readable
,
class:
'control-label'
do
=
label_tag
:maximum_job_timeout_
human
_readable
,
class:
'control-label'
do
Maximum job timeout
Maximum job timeout
.col-sm-10
.col-sm-10
=
f
.
text_field
:maximum_job_timeout_
user
_readable
,
class:
'form-control'
=
f
.
text_field
:maximum_job_timeout_
human
_readable
,
class:
'form-control'
.help-block
This timeout will take precedence when lower than Project-defined timeout
.help-block
This timeout will take precedence when lower than Project-defined timeout
.form-group
.form-group
=
label_tag
:tag_list
,
class:
'control-label'
do
=
label_tag
:tag_list
,
class:
'control-label'
do
...
...
app/views/projects/runners/_runner.html.haml
View file @
36753b78
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
%p
.runner-description
%p
.runner-description
=
runner
.
description
=
runner
.
description
-
if
runner
.
defines_maximum_job_timeout?
-
if
runner
.
defines_maximum_job_timeout?
%p
Maximum job timeout:
#{
runner
.
maximum_job_timeout_
user
_readable
}
%p
Maximum job timeout:
#{
runner
.
maximum_job_timeout_
human
_readable
}
-
if
runner
.
tag_list
.
present?
-
if
runner
.
tag_list
.
present?
%p
%p
-
runner
.
tag_list
.
sort
.
each
do
|
tag
|
-
runner
.
tag_list
.
sort
.
each
do
|
tag
|
...
...
app/views/projects/runners/show.html.haml
View file @
36753b78
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
%td
=
@runner
.
description
%td
=
@runner
.
description
%tr
%tr
%td
Maximum job timeout
%td
Maximum job timeout
%td
=
@runner
.
maximum_job_timeout_
user
_readable
%td
=
@runner
.
maximum_job_timeout_
human
_readable
%tr
%tr
%td
Last contact
%td
Last contact
%td
%td
...
...
spec/models/concerns/chronic_duration_attribute_spec.rb
View file @
36753b78
...
@@ -26,7 +26,7 @@ end
...
@@ -26,7 +26,7 @@ end
describe
'ChronicDurationAttribute'
do
describe
'ChronicDurationAttribute'
do
let
(
:source_field
)
{
:maximum_job_timeout
}
let
(
:source_field
)
{
:maximum_job_timeout
}
let
(
:virtual_field
)
{
:maximum_job_timeout_
user
_readable
}
let
(
:virtual_field
)
{
:maximum_job_timeout_
human
_readable
}
subject
{
Ci
::
Runner
.
new
}
subject
{
Ci
::
Runner
.
new
}
it_behaves_like
'ChronicDurationAttribute reader'
it_behaves_like
'ChronicDurationAttribute reader'
...
@@ -35,7 +35,7 @@ end
...
@@ -35,7 +35,7 @@ end
describe
'ChronicDurationAttribute - reader'
do
describe
'ChronicDurationAttribute - reader'
do
let
(
:source_field
)
{
:used_timeout
}
let
(
:source_field
)
{
:used_timeout
}
let
(
:virtual_field
)
{
:used_timeout_
user
_readable
}
let
(
:virtual_field
)
{
:used_timeout_
human
_readable
}
subject
{
Ci
::
Build
.
new
}
subject
{
Ci
::
Build
.
new
}
it
"doesn't contain dynamically created writer method"
do
it
"doesn't contain dynamically created writer method"
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment