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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
fb08198b
Commit
fb08198b
authored
Jan 18, 2017
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename shared_runners_minutes_quota? to shared_runners_minutes_limit_enabled?
parent
a4ae95ad
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
12 deletions
+11
-12
app/models/ee/build.rb
app/models/ee/build.rb
+2
-2
app/models/ee/project.rb
app/models/ee/project.rb
+3
-3
app/services/update_build_minutes_service.rb
app/services/update_build_minutes_service.rb
+1
-1
app/views/admin/projects/_shared_runner_status.html.haml
app/views/admin/projects/_shared_runner_status.html.haml
+5
-6
No files found.
app/models/ee/build.rb
View file @
fb08198b
...
...
@@ -6,8 +6,8 @@ module EE
module
Build
extend
ActiveSupport
::
Concern
def
shared_runners_minutes_
quota
?
runner
&&
runner
.
shared?
&&
project
.
shared_runners_minutes_
quota
?
def
shared_runners_minutes_
limit_enabled
?
runner
&&
runner
.
shared?
&&
project
.
shared_runners_minutes_
limit_enabled
?
end
end
end
app/models/ee/project.rb
View file @
fb08198b
...
...
@@ -10,14 +10,14 @@ module EE
delegate
:shared_runners_minutes
,
:shared_runners_minutes_last_reset
,
to: :project_metrics
,
allow_nil:
true
delegate
:
shared_runners_minutes_limit_enabled?
,
:
actual_shared_runners_minutes_limit
,
delegate
:actual_shared_runners_minutes_limit
,
:shared_runners_minutes_used?
,
to: :namespace
has_one
:project_metrics
,
dependent: :destroy
end
def
shared_runners_minutes_
quota
?
!
public
?
&&
shared_runners_enabled?
def
shared_runners_minutes_
limit_enabled
?
!
public
?
&&
shared_runners_enabled?
&&
namespace
.
shared_runners_minutes_limit_enabled?
end
def
shared_runners
...
...
app/services/update_build_minutes_service.rb
View file @
fb08198b
class
UpdateBuildMinutesService
<
BaseService
def
execute
(
build
)
return
unless
build
.
shared_runners_minutes_
quota
?
return
unless
build
.
shared_runners_minutes_
limit_enabled
?
return
unless
build
.
complete?
return
unless
build
.
duration
...
...
app/views/admin/projects/_shared_runner_status.html.haml
View file @
fb08198b
...
...
@@ -4,7 +4,6 @@
%strong
-
if
project
.
shared_runners_enabled?
Enabled
-
if
project
.
shared_runners_minutes_quota?
-
if
project
.
shared_runners_minutes_limit_enabled?
-
limit
=
project
.
actual_shared_runners_minutes_limit
.
to_i
(Limited to
#{
limit
}
minutes per month)
...
...
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