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
d15a44f3
Commit
d15a44f3
authored
Dec 15, 2016
by
Mike Greiling
Committed by
Kamil Trzcinski
Dec 18, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add helper to display current shared runner quota usage
parent
de41daae
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
0 deletions
+31
-0
app/assets/stylesheets/pages/projects.scss
app/assets/stylesheets/pages/projects.scss
+8
-0
app/helpers/groups_helper.rb
app/helpers/groups_helper.rb
+16
-0
app/views/admin/groups/show.html.haml
app/views/admin/groups/show.html.haml
+7
-0
No files found.
app/assets/stylesheets/pages/projects.scss
View file @
d15a44f3
...
@@ -368,6 +368,14 @@ a.deploy-project-label {
...
@@ -368,6 +368,14 @@ a.deploy-project-label {
color
:
$gl-warning
;
color
:
$gl-warning
;
}
}
.shared_runners_limit_under_quota
{
color
:
$gl-success
;
}
.shared_runners_limit_over_quota
{
color
:
$gl-danger
;
}
.breadcrumb.repo-breadcrumb
{
.breadcrumb.repo-breadcrumb
{
padding
:
0
;
padding
:
0
;
background
:
transparent
;
background
:
transparent
;
...
...
app/helpers/groups_helper.rb
View file @
d15a44f3
...
@@ -51,6 +51,22 @@ module GroupsHelper
...
@@ -51,6 +51,22 @@ module GroupsHelper
end
end
end
end
def
group_shared_runner_limits_quota
(
group
)
used
=
group
.
shared_runners_minutes
.
to_i
if
group
.
shared_runners_minutes_limit_enabled?
limit
=
group
.
shared_runners_minutes_limit
status
=
group
.
shared_runners_minutes_used?
?
'over_quota'
:
'under_quota'
else
limit
=
'Unlimited'
status
=
'disabled'
end
content_tag
(
:span
,
class:
"shared_runners_limit_
#{
status
}
"
)
do
"
#{
used
}
/
#{
limit
}
"
end
end
def
group_issues
(
group
)
def
group_issues
(
group
)
IssuesFinder
.
new
(
current_user
,
group_id:
group
.
id
).
execute
IssuesFinder
.
new
(
current_user
,
group_id:
group
.
id
).
execute
end
end
...
...
app/views/admin/groups/show.html.haml
View file @
d15a44f3
...
@@ -44,6 +44,13 @@
...
@@ -44,6 +44,13 @@
=
group_lfs_status
(
@group
)
=
group_lfs_status
(
@group
)
=
link_to
icon
(
'question-circle'
),
help_page_path
(
'workflow/lfs/manage_large_binaries_with_git_lfs'
)
=
link_to
icon
(
'question-circle'
),
help_page_path
(
'workflow/lfs/manage_large_binaries_with_git_lfs'
)
-
if
@group
.
shared_runners_enabled?
%li
%span
.light
Shared CI Runner Quota:
%strong
=
group_shared_runner_limits_quota
(
@group
)
=
link_to
icon
(
'question-circle'
),
help_page_path
(
"user/admin_area/settings/continuous_integration"
,
anchor:
"shared-runners-minutes"
)
.panel.panel-default
.panel.panel-default
.panel-heading
Linked LDAP groups
.panel-heading
Linked LDAP groups
%ul
.well-list
%ul
.well-list
...
...
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