Commit 41313fb6 authored by Mike Greiling's avatar Mike Greiling Committed by Kamil Trzcinski

add flash notice when over CI runner limit

parent d15a44f3
...@@ -33,6 +33,16 @@ ...@@ -33,6 +33,16 @@
$(this).parents('.no-password-message').remove(); $(this).parents('.no-password-message').remove();
return e.preventDefault(); return e.preventDefault();
}); });
$('.hide-shared-runner-limit-message-one-month').on('click', function(e) {
Cookies.set('hide_shared_runner_quota_message', 'false', { expires: 31 });
$(this).parents('.shared-runner-quota-message').remove();
e.preventDefault();
});
$('.hide-shared-runner-limit-message').on('click', function(e) {
Cookies.set('hide_shared_runner_quota_message', 'false');
$(this).parents('.shared-runner-quota-message').remove();
e.preventDefault();
});
this.projectSelectDropdown(); this.projectSelectDropdown();
} }
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
- if current_user && can?(current_user, :download_code, @project) - if current_user && can?(current_user, :download_code, @project)
= render 'shared/no_ssh' = render 'shared/no_ssh'
= render 'shared/no_password' = render 'shared/no_password'
= render 'shared/shared_runner_minutes_limit', namespace: @project.namespace
= render "home_panel" = render "home_panel"
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
- if current_user && can?(current_user, :download_code, @project) - if current_user && can?(current_user, :download_code, @project)
= render 'shared/no_ssh' = render 'shared/no_ssh'
= render 'shared/no_password' = render 'shared/no_password'
= render 'shared/shared_runner_minutes_limit', namespace: @project.namespace
- if @project.above_size_limit? - if @project.above_size_limit?
= render 'above_size_limit_warning' = render 'above_size_limit_warning'
......
- if cookies[:hide_shared_runner_quota_message].blank? && namespace.shared_runners_minutes_used?
.shared-runner-quota-message.alert.alert-warning.hidden-xs
- if namespace.class.to_s === 'Group'
Your group has exceeded its build minutes quota.
- else
You have exceeded your build minutes quota.
Pipelines will not run anymore on shared runners.
.pull-right
= link_to "Don't show again this month", '#', class: 'hide-shared-runner-limit-message-one-month alert-link'
|
= link_to 'Remind later', '#', class: 'hide-shared-runner-limit-message alert-link'
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment