Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-30 09:08:13 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-30 09:08:13 +0300
commite36d26c6e48724229ddff62fc2d218d06bff8bef (patch)
treed1164d7ec058eef005f50b1ada28695548dd5c84
parent340ff214b382575ec5075ca10fdd4e4ade76b8dd (diff)
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--app/views/groups/edit.html.haml2
-rw-r--r--app/views/groups/settings/_pages_settings.html.haml5
-rw-r--r--app/views/projects/pages/_https_only.html.haml11
-rw-r--r--app/views/projects/pages/_pages_settings.html.haml13
-rw-r--r--app/views/projects/pages/show.html.haml4
-rw-r--r--locale/gitlab.pot16
-rw-r--r--spec/features/projects/pages_spec.rb2
-rw-r--r--spec/frontend/registry/settings/components/settings_form_spec.js9
-rw-r--r--spec/frontend/repository/components/table/row_spec.js4
9 files changed, 47 insertions, 19 deletions
diff --git a/app/views/groups/edit.html.haml b/app/views/groups/edit.html.haml
index 0e78ce9f656..fe5a00e3be9 100644
--- a/app/views/groups/edit.html.haml
+++ b/app/views/groups/edit.html.haml
@@ -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
diff --git a/app/views/groups/settings/_pages_settings.html.haml b/app/views/groups/settings/_pages_settings.html.haml
new file mode 100644
index 00000000000..9e1932185da
--- /dev/null
+++ b/app/views/groups/settings/_pages_settings.html.haml
@@ -0,0 +1,5 @@
+= 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'
diff --git a/app/views/projects/pages/_https_only.html.haml b/app/views/projects/pages/_https_only.html.haml
deleted file mode 100644
index d8c4a5f0a5d..00000000000
--- a/app/views/projects/pages/_https_only.html.haml
+++ /dev/null
@@ -1,11 +0,0 @@
-= 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'
diff --git a/app/views/projects/pages/_pages_settings.html.haml b/app/views/projects/pages/_pages_settings.html.haml
new file mode 100644
index 00000000000..58eddf630f4
--- /dev/null
+++ b/app/views/projects/pages/_pages_settings.html.haml
@@ -0,0 +1,13 @@
+= 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'
diff --git a/app/views/projects/pages/show.html.haml b/app/views/projects/pages/show.html.haml
index 3ec87597849..8dbe67e153a 100644
--- a/app/views/projects/pages/show.html.haml
+++ b/app/views/projects/pages/show.html.haml
@@ -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
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 26ae64d67ff..1c8740853f2 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -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 ""
@@ -18239,15 +18248,18 @@ msgstr ""
msgid "There was an error fetching cycle analytics stages."
msgstr ""
-msgid "There was an error fetching data for the chart"
+msgid "There was an error fetching data for the selected stage"
msgstr ""
-msgid "There was an error fetching data for the selected stage"
+msgid "There was an error fetching data for the tasks by type chart"
msgstr ""
msgid "There was an error fetching label data for the selected group"
msgstr ""
+msgid "There was an error fetching median data for stages"
+msgstr ""
+
msgid "There was an error fetching the Designs"
msgstr ""
diff --git a/spec/features/projects/pages_spec.rb b/spec/features/projects/pages_spec.rb
index afd1178f7f2..c8da87041f9 100644
--- a/spec/features/projects/pages_spec.rb
+++ b/spec/features/projects/pages_spec.rb
@@ -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
diff --git a/spec/frontend/registry/settings/components/settings_form_spec.js b/spec/frontend/registry/settings/components/settings_form_spec.js
index 6d69b987c7f..f93a5b9fb6d 100644
--- a/spec/frontend/registry/settings/components/settings_form_spec.js
+++ b/spec/frontend/registry/settings/components/settings_form_spec.js
@@ -82,8 +82,13 @@ describe('Settings Form', () => {
it(`${elementName} form element change updated ${modelName} with ${value}`, () => {
const element = findFormElements(elementName, formGroup);
- element.vm.$emit('input', value);
- expect(wrapper.vm[modelName]).toBe(value);
+ const modelUpdateEvent = element.vm.$options.model
+ ? element.vm.$options.model.event
+ : 'input';
+ element.vm.$emit(modelUpdateEvent, value);
+ return wrapper.vm.$nextTick().then(() => {
+ expect(wrapper.vm[modelName]).toBe(value);
+ });
});
});
diff --git a/spec/frontend/repository/components/table/row_spec.js b/spec/frontend/repository/components/table/row_spec.js
index 94fa8b1e363..92d1fe5c4b0 100644
--- a/spec/frontend/repository/components/table/row_spec.js
+++ b/spec/frontend/repository/components/table/row_spec.js
@@ -108,7 +108,9 @@ describe('Repository table row component', () => {
if (pushes) {
expect(visitUrl).not.toHaveBeenCalled();
} else {
- expect(visitUrl).toHaveBeenCalledWith('https://test.com', undefined);
+ const [url, external] = visitUrl.mock.calls[0];
+ expect(url).toBe('https://test.com');
+ expect(external).toBeFalsy();
}
});