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
04ecce95
Commit
04ecce95
authored
Jan 04, 2017
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove redundant integer typecasting
parent
ddb3a56b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
app/helpers/ee/groups_helper.rb
app/helpers/ee/groups_helper.rb
+2
-2
app/models/namespace.rb
app/models/namespace.rb
+1
-1
app/views/groups/pipeline_quota/index.html.haml
app/views/groups/pipeline_quota/index.html.haml
+1
-1
app/views/projects/builds/show.html.haml
app/views/projects/builds/show.html.haml
+1
-1
No files found.
app/helpers/ee/groups_helper.rb
View file @
04ecce95
module
EE
module
EE
module
GroupsHelper
module
GroupsHelper
def
group_shared_runner_limits_quota
(
group
)
def
group_shared_runner_limits_quota
(
group
)
used
=
group
.
shared_runners_minutes
.
to_i
used
=
group
.
shared_runners_minutes
if
group
.
shared_runners_minutes_limit_enabled?
if
group
.
shared_runners_minutes_limit_enabled?
limit
=
group
.
actual_shared_runners_minutes_limit
limit
=
group
.
actual_shared_runners_minutes_limit
...
@@ -19,7 +19,7 @@ module EE
...
@@ -19,7 +19,7 @@ module EE
def
group_shared_runner_limits_percent_used
(
group
)
def
group_shared_runner_limits_percent_used
(
group
)
return
0
unless
group
.
shared_runners_minutes_limit_enabled?
return
0
unless
group
.
shared_runners_minutes_limit_enabled?
100
*
group
.
shared_runners_minutes
.
to_i
/
group
.
actual_shared_runners_minutes_limit
100
*
group
.
shared_runners_minutes
/
group
.
actual_shared_runners_minutes_limit
end
end
def
group_shared_runner_limits_progress_bar
(
group
)
def
group_shared_runner_limits_progress_bar
(
group
)
...
...
app/models/namespace.rb
View file @
04ecce95
...
@@ -188,7 +188,7 @@ class Namespace < ActiveRecord::Base
...
@@ -188,7 +188,7 @@ class Namespace < ActiveRecord::Base
def
shared_runners_minutes_used?
def
shared_runners_minutes_used?
shared_runners_minutes_limit_enabled?
&&
shared_runners_minutes_limit_enabled?
&&
shared_runners_minutes
.
to_i
>=
actual_shared_runners_minutes_limit
shared_runners_minutes
>=
actual_shared_runners_minutes_limit
end
end
def
full_name
def
full_name
...
...
app/views/groups/pipeline_quota/index.html.haml
View file @
04ecce95
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
=
project_icon
(
project
,
alt:
''
,
class:
'avatar project-avatar s20'
)
=
project_icon
(
project
,
alt:
''
,
class:
'avatar project-avatar s20'
)
%strong
=
link_to
project
.
name
,
project
%strong
=
link_to
project
.
name
,
project
%td
%td
=
project
.
shared_runners_minutes
.
to_i
=
project
.
shared_runners_minutes
-
if
@projects
.
blank?
-
if
@projects
.
blank?
%tr
%tr
%td
{
colspan:
2
}
%td
{
colspan:
2
}
...
...
app/views/projects/builds/show.html.haml
View file @
04ecce95
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
Runners page
Runners page
-
if
@build
.
project
.
namespace
.
shared_runners_minutes_used?
-
if
@build
.
project
.
namespace
.
shared_runners_minutes_used?
-
quota_used
=
@build
.
project
.
namespace
.
shared_runners_minutes
.
to_i
-
quota_used
=
@build
.
project
.
namespace
.
shared_runners_minutes
-
quota_limit
=
@build
.
project
.
namespace
.
actual_shared_runners_minutes_limit
-
quota_limit
=
@build
.
project
.
namespace
.
actual_shared_runners_minutes_limit
.bs-callout.bs-callout-warning
.bs-callout.bs-callout-warning
%p
%p
...
...
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