summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/blob_edit/blob_bundle.js8
-rw-r--r--app/assets/javascripts/clusters/components/applications.vue11
-rw-r--r--app/assets/javascripts/lazy_loader.js4
-rw-r--r--app/helpers/tree_helper.rb4
-rw-r--r--app/models/merge_request_diff.rb3
-rw-r--r--app/models/project.rb2
-rw-r--r--app/models/repository.rb2
-rw-r--r--app/views/projects/branches/new.html.haml2
-rw-r--r--app/workers/all_queues.yml2
9 files changed, 24 insertions, 14 deletions
diff --git a/app/assets/javascripts/blob_edit/blob_bundle.js b/app/assets/javascripts/blob_edit/blob_bundle.js
index ec27ae8c291..9f547471170 100644
--- a/app/assets/javascripts/blob_edit/blob_bundle.js
+++ b/app/assets/javascripts/blob_edit/blob_bundle.js
@@ -16,9 +16,17 @@ export default () => {
const filePath = editBlobForm.data('blobFilename');
const currentAction = $('.js-file-title').data('currentAction');
const projectId = editBlobForm.data('project-id');
+ const commitButton = $('.js-commit-button');
+
+ commitButton.on('click', () => {
+ window.onbeforeunload = null;
+ });
new EditBlob(`${urlRoot}${assetsPath}`, filePath, currentAction, projectId);
new NewCommitForm(editBlobForm);
+
+ // returning here blocks page navigation
+ window.onbeforeunload = () => '';
}
if (uploadBlobForm.length) {
diff --git a/app/assets/javascripts/clusters/components/applications.vue b/app/assets/javascripts/clusters/components/applications.vue
index 8354c28778c..16acb4c3153 100644
--- a/app/assets/javascripts/clusters/components/applications.vue
+++ b/app/assets/javascripts/clusters/components/applications.vue
@@ -408,12 +408,11 @@ export default {
<div slot="description">
<p>
{{
- s__(`ClusterIntegration|A Knative build extends Kubernetes
- and utilizes existing Kubernetes primitives to provide you with
- the ability to run on-cluster container builds from source.
- For example, you can write a build that uses Kubernetes-native
- resources to obtain your source code from a repository,
- build it into container a image, and then run that image.`)
+ s__(`ClusterIntegration|Knative (pronounced kay-nay-tiv) extends
+ Kubernetes to provide a set of middleware components that are
+ essential to build modern, source-centric, and container-based
+ applications that can run anywhere: on premises, in the cloud, or
+ even in a third-party data center.`)
}}
</p>
diff --git a/app/assets/javascripts/lazy_loader.js b/app/assets/javascripts/lazy_loader.js
index af50ea9d6c2..ee01a73a6e8 100644
--- a/app/assets/javascripts/lazy_loader.js
+++ b/app/assets/javascripts/lazy_loader.js
@@ -91,7 +91,9 @@ export default class LazyLoader {
onIntersection = entries => {
entries.forEach(entry => {
- if (entry.isIntersecting) {
+ // We are using `intersectionRatio > 0` over `isIntersecting`, as some browsers did not ship the latter
+ // See: https://gitlab.com/gitlab-org/gitlab-ce/issues/54407
+ if (entry.intersectionRatio > 0) {
this.intersectionObserver.unobserve(entry.target);
this.lazyImages.push(entry.target);
}
diff --git a/app/helpers/tree_helper.rb b/app/helpers/tree_helper.rb
index 78a11616d4c..e2879bfdcf1 100644
--- a/app/helpers/tree_helper.rb
+++ b/app/helpers/tree_helper.rb
@@ -37,13 +37,13 @@ module TreeHelper
# Using Rails `*_path` methods can be slow, especially when generating
# many paths, as with a repository tree that has thousands of items.
def fast_project_blob_path(project, blob_path)
- Addressable::URI.escape(
+ ActionDispatch::Journey::Router::Utils.escape_path(
File.join(relative_url_root, project.path_with_namespace, 'blob', blob_path)
)
end
def fast_project_tree_path(project, tree_path)
- Addressable::URI.escape(
+ ActionDispatch::Journey::Router::Utils.escape_path(
File.join(relative_url_root, project.path_with_namespace, 'tree', tree_path)
)
end
diff --git a/app/models/merge_request_diff.rb b/app/models/merge_request_diff.rb
index 6f1beede6f9..a3029a54604 100644
--- a/app/models/merge_request_diff.rb
+++ b/app/models/merge_request_diff.rb
@@ -313,7 +313,8 @@ class MergeRequestDiff < ActiveRecord::Base
# merge_request_diff_commits.reload is preferred way to reload associated
# objects but it returns cached result for some reason in this case
- commits = merge_request_diff_commits(true)
+ # we can circumvent that by specifying that we need an uncached reload
+ commits = self.class.uncached { merge_request_diff_commits.reload }
self.commits_count = commits.size
end
diff --git a/app/models/project.rb b/app/models/project.rb
index 4d1917b9ab2..b85ec90f3ca 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -1394,7 +1394,7 @@ class Project < ActiveRecord::Base
def change_head(branch)
if repository.branch_exists?(branch)
repository.before_change_head
- repository.raw_repository.write_ref('HEAD', "refs/heads/#{branch}", shell: false)
+ repository.raw_repository.write_ref('HEAD', "refs/heads/#{branch}")
repository.copy_gitattributes(branch)
repository.after_change_head
reload_default_branch
diff --git a/app/models/repository.rb b/app/models/repository.rb
index a77fa8f2ce7..427dac99b79 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -259,7 +259,7 @@ class Repository
next if kept_around?(sha)
# This will still fail if the file is corrupted (e.g. 0 bytes)
- raw_repository.write_ref(keep_around_ref_name(sha), sha, shell: false)
+ raw_repository.write_ref(keep_around_ref_name(sha), sha)
rescue Gitlab::Git::CommandError => ex
Rails.logger.error "Unable to create keep-around reference for repository #{disk_path}: #{ex}"
end
diff --git a/app/views/projects/branches/new.html.haml b/app/views/projects/branches/new.html.haml
index 8181ee9eea1..af8887b0c39 100644
--- a/app/views/projects/branches/new.html.haml
+++ b/app/views/projects/branches/new.html.haml
@@ -13,7 +13,7 @@
.form-group.row
= label_tag :branch_name, nil, class: 'col-form-label col-sm-2'
.col-sm-10
- = text_field_tag :branch_name, params[:branch_name], required: true, autofocus: true, class: 'form-control js-branch-name'
+ = text_field_tag :branch_name, params[:branch_name], required: true, autofocus: true, class: 'form-control js-branch-name monospace'
.form-text.text-muted.text-danger.js-branch-name-error
.form-group.row
= label_tag :ref, 'Create from', class: 'col-form-label col-sm-2'
diff --git a/app/workers/all_queues.yml b/app/workers/all_queues.yml
index 953ab95735b..c0b410472eb 100644
--- a/app/workers/all_queues.yml
+++ b/app/workers/all_queues.yml
@@ -81,9 +81,9 @@
- todos_destroyer:todos_destroyer_confidential_issue
- todos_destroyer:todos_destroyer_entity_leave
+- todos_destroyer:todos_destroyer_group_private
- todos_destroyer:todos_destroyer_project_private
- todos_destroyer:todos_destroyer_private_features
-- todos_destroyer:todos_destroyer_group_private
- default
- mailers # ActionMailer::DeliveryJob.queue_name