diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 11:18:50 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 11:18:50 +0000 |
commit | 8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch) | |
tree | a77e7fe7a93de11213032ed4ab1f33a3db51b738 /app/views/shared/_namespace_storage_limit_alert.html.haml | |
parent | 00b35af3db1abfe813a778f643dad221aad51fca (diff) | |
download | gitlab-ce-8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781.tar.gz |
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'app/views/shared/_namespace_storage_limit_alert.html.haml')
-rw-r--r-- | app/views/shared/_namespace_storage_limit_alert.html.haml | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/app/views/shared/_namespace_storage_limit_alert.html.haml b/app/views/shared/_namespace_storage_limit_alert.html.haml new file mode 100644 index 00000000000..95f27cde15b --- /dev/null +++ b/app/views/shared/_namespace_storage_limit_alert.html.haml @@ -0,0 +1,26 @@ +- return unless current_user + +- payload = namespace_storage_alert(namespace) +- return if payload.empty? + +- alert_level = payload[:alert_level] +- root_namespace = payload[:root_namespace] + +- style = namespace_storage_alert_style(alert_level) +- icon = namespace_storage_alert_icon(alert_level) +- link = namespace_storage_usage_link(root_namespace) + +%div{ class: [classes, 'js-namespace-storage-alert'] } + .gl-pt-5.gl-pb-3 + .gl-alert{ class: "gl-alert-#{style}", role: 'alert' } + = sprite_icon(icon, css_class: "gl-icon gl-alert-icon") + .gl-alert-title + %h4.gl-alert-title= payload[:usage_message] + - if alert_level != :error + %button.js-namespace-storage-alert-dismiss.gl-alert-dismiss.gl-cursor-pointer{ type: 'button', 'aria-label' => _('Dismiss'), data: { id: root_namespace.id, level: alert_level } } + = sprite_icon('close', size: 16, css_class: 'gl-icon') + .gl-alert-body + = payload[:explanation_message] + - if link + .gl-alert-actions + = link_to(_('Manage storage usage'), link, class: "btn gl-alert-action btn-md gl-button btn-#{style}") |