Commit e9a5acdf authored by Jake Burden's avatar Jake Burden Committed by Kushal Pandya

GitLab Pages - Storage size Limitations by Project or Group - Frontend

parent b154d5e0
......@@ -53,4 +53,6 @@
.settings-content
= render 'groups/settings/advanced'
= render_if_exists 'shared/groups/max_pages_size_setting'
= render 'shared/confirm_modal', phrase: @group.path
= form_for @group, html: { multipart: true, class: 'gl-show-field-errors' }, authenticity_token: true do |f|
= render_if_exists 'shared/pages/max_pages_size_input', form: f
.prepend-top-10
= f.submit s_('GitLabPages|Save'), class: 'btn btn-success'
= form_for @project, url: namespace_project_pages_path(@project.namespace.becomes(Namespace), @project), html: { class: 'inline', title: pages_https_only_title } do |f|
.form-group
.form-check
= f.check_box :pages_https_only, class: 'form-check-input', disabled: pages_https_only_disabled?
= f.label :pages_https_only, class: pages_https_only_label_class do
%strong
= s_('GitLabPages|Force HTTPS (requires valid certificates)')
- unless pages_https_only_disabled?
.prepend-top-10
= f.submit s_('GitLabPages|Save'), class: 'btn btn-success'
= form_for @project, url: namespace_project_pages_path(@project.namespace.becomes(Namespace), @project), html: { class: 'inline', title: pages_https_only_title } do |f|
- if Gitlab.config.pages.external_http || Gitlab.config.pages.external_https
= render_if_exists 'shared/pages/max_pages_size_input', form: f
.form-group
.form-check
= f.check_box :pages_https_only, class: 'form-check-input', disabled: pages_https_only_disabled?
= f.label :pages_https_only, class: pages_https_only_label_class do
%strong
= s_('GitLabPages|Force HTTPS (requires valid certificates)')
.prepend-top-10
= f.submit s_('GitLabPages|Save'), class: 'btn btn-success'
......@@ -10,8 +10,8 @@
%p.light
= s_('GitLabPages|With GitLab Pages you can host your static websites on GitLab. Combined with the power of GitLab CI and the help of GitLab Runner you can deploy static pages for your individual projects, your user or your group.')
- if Gitlab.config.pages.external_https
= render 'https_only'
= render 'pages_settings'
%hr.clearfix
......
- return unless can?(current_user, :update_max_pages_size)
- expanded = expanded_by_default?
%section.settings.gs-pages.no-animate#js-pages-settings{ class: ('expanded' if expanded) }
.settings-header
%h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only{ role: 'button' }
= _('Pages')
%button.btn.js-settings-toggle{ type: 'button' }
= expanded ? _('Collapse') : _('Expand')
%p
= _('Size settings for static websites')
.settings-content
= render 'groups/settings/pages_settings'
- return unless can?(current_user, :update_max_pages_size)
- form = local_assigns.fetch(:form)
.form-group
= form.label :max_pages_size, class: 'label-bold' do
= s_('GitLabPages|Maximum size of pages (MB)')
= form.number_field :max_pages_size, value: form.object.max_pages_size, class: 'form-control', min: 0
%span.form-text.text-muted#repository_size_limit_help_block
= s_('GitLabPages|The total size of deployed static content will be limited to this size. 0 for unlimited. Leave empty to inherit the global value.')
---
title: GitLab Pages - Storage size Limitations by Project or Group
merge_request: 17725
author:
type: added
......@@ -8669,6 +8669,9 @@ msgstr ""
msgid "GitLabPages|Learn how to upload your static site and have it served by GitLab by following the %{link_start}documentation on GitLab Pages%{link_end}."
msgstr ""
msgid "GitLabPages|Maximum size of pages (MB)"
msgstr ""
msgid "GitLabPages|New Domain"
msgstr ""
......@@ -8693,6 +8696,9 @@ msgstr ""
msgid "GitLabPages|Support for domains and certificates is disabled. Ask your system's administrator to enable it."
msgstr ""
msgid "GitLabPages|The total size of deployed static content will be limited to this size. 0 for unlimited. Leave empty to inherit the global value."
msgstr ""
msgid "GitLabPages|Unverified"
msgstr ""
......@@ -16639,6 +16645,9 @@ msgstr ""
msgid "Size limit per repository (MB)"
msgstr ""
msgid "Size settings for static websites"
msgstr ""
msgid "Skip Trial (Continue with Free Account)"
msgstr ""
......
......@@ -347,7 +347,7 @@ shared_examples 'pages settings editing' do
visit project_pages_path(project)
expect(page).to have_field(:project_pages_https_only, disabled: true)
expect(page).not_to have_button('Save')
expect(page).to have_button('Save')
end
end
......
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