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
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-01-23 01:05:43 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-01-23 01:05:43 +0300
commit5af129c0a86493c414fef03d3543e40216541a4f (patch)
tree25cb30a6abd1c9d136ebf515907f17f811a0ac4d /app
parent79ee819cc8486ff0db9cbb401d1b4c51870e9755 (diff)
Add latest changes from gitlab-org/gitlab@13-7-stable-ee
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/pages/projects/new/index.js1
-rw-r--r--app/assets/javascripts/projects/experiment_new_project_creation/components/app.vue16
-rw-r--r--app/controllers/repositories/lfs_storage_controller.rb12
-rw-r--r--app/views/projects/new.html.haml2
4 files changed, 27 insertions, 4 deletions
diff --git a/app/assets/javascripts/pages/projects/new/index.js b/app/assets/javascripts/pages/projects/new/index.js
index 19aeb1d1ecf..52d1e32ebc9 100644
--- a/app/assets/javascripts/pages/projects/new/index.js
+++ b/app/assets/javascripts/pages/projects/new/index.js
@@ -20,6 +20,7 @@ document.addEventListener('DOMContentLoaded', () => {
const config = {
hasErrors: 'hasErrors' in el.dataset,
isCiCdAvailable: 'isCiCdAvailable' in el.dataset,
+ newProjectGuidelines: el.dataset.newProjectGuidelines,
};
m.default(el, config);
})
diff --git a/app/assets/javascripts/projects/experiment_new_project_creation/components/app.vue b/app/assets/javascripts/projects/experiment_new_project_creation/components/app.vue
index 2e16071e563..0ab2fc7784d 100644
--- a/app/assets/javascripts/projects/experiment_new_project_creation/components/app.vue
+++ b/app/assets/javascripts/projects/experiment_new_project_creation/components/app.vue
@@ -1,6 +1,6 @@
<script>
/* eslint-disable vue/no-v-html */
-import { GlBreadcrumb, GlIcon } from '@gitlab/ui';
+import { GlBreadcrumb, GlIcon, GlSafeHtmlDirective as SafeHtml } from '@gitlab/ui';
import WelcomePage from './welcome.vue';
import LegacyContainer from './legacy_container.vue';
import { __, s__ } from '~/locale';
@@ -57,7 +57,9 @@ export default {
WelcomePage,
LegacyContainer,
},
-
+ directives: {
+ SafeHtml,
+ },
props: {
hasErrors: {
type: Boolean,
@@ -69,6 +71,11 @@ export default {
required: false,
default: false,
},
+ newProjectGuidelines: {
+ type: String,
+ required: false,
+ default: '',
+ },
},
data() {
@@ -145,6 +152,11 @@ export default {
<div class="text-center" v-html="activePanel.illustration"></div>
<h4>{{ activePanel.title }}</h4>
<p>{{ activePanel.description }}</p>
+ <div
+ v-if="newProjectGuidelines"
+ id="new-project-guideline"
+ v-safe-html="newProjectGuidelines"
+ ></div>
</div>
<div class="col-lg-9">
<gl-breadcrumb v-if="breadcrumbs" :items="breadcrumbs">
diff --git a/app/controllers/repositories/lfs_storage_controller.rb b/app/controllers/repositories/lfs_storage_controller.rb
index 48784842d48..36912948b77 100644
--- a/app/controllers/repositories/lfs_storage_controller.rb
+++ b/app/controllers/repositories/lfs_storage_controller.rb
@@ -21,7 +21,17 @@ module Repositories
def upload_authorize
set_workhorse_internal_api_content_type
- authorized = LfsObjectUploader.workhorse_authorize(has_length: true)
+ # We don't actually know whether Workhorse received an LFS upload
+ # request with a Content-Length header or `Transfer-Encoding:
+ # chunked`. Since we don't know, we need to be pessimistic and
+ # set `has_length` to `false` so that multipart uploads will be
+ # used for AWS. Otherwise, AWS will respond with `501 NOT IMPLEMENTED`
+ # error because a PutObject request with `Transfer-Encoding: chunked`
+ # is not supported.
+ #
+ # This is only an issue with object storage-specific settings, not
+ # with consolidated object storage settings.
+ authorized = LfsObjectUploader.workhorse_authorize(has_length: false, maximum_size: size)
authorized.merge!(LfsOid: oid, LfsSize: size)
render json: authorized
diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml
index a407aa9ac13..6af185696b0 100644
--- a/app/views/projects/new.html.haml
+++ b/app/views/projects/new.html.haml
@@ -8,7 +8,7 @@
.project-edit-errors
= render 'projects/errors'
- .js-experiment-new-project-creation{ data: { is_ci_cd_available: (ci_cd_projects_available? if Gitlab.ee?), has_errors: @project.errors.any? } }
+ .js-experiment-new-project-creation{ data: { is_ci_cd_available: (ci_cd_projects_available? if Gitlab.ee?), has_errors: @project.errors.any?, new_project_guidelines: brand_new_project_guidelines } }
.row{ 'v-cloak': true }
.col-lg-3.profile-settings-sidebar