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-08-03 21:10:02 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-08-03 21:10:02 +0300
commit49058851264455c22a5ba00c8671b7d4cdfd8ee9 (patch)
tree6626f6610b69b418cea728edb1d804c79e189d29 /app
parentf397d486bc77b286d42f83b89e0879428c05299d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/diffs/components/diff_row.vue15
-rw-r--r--app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue43
-rw-r--r--app/assets/javascripts/pages/projects/shared/permissions/constants.js2
-rw-r--r--app/assets/javascripts/runner/components/runner_type_alert.vue17
-rw-r--r--app/assets/javascripts/sidebar/components/assignees/assignee_avatar_link.vue9
-rw-r--r--app/assets/stylesheets/startup/startup-dark.scss2
-rw-r--r--app/assets/stylesheets/themes/_dark.scss3
-rw-r--r--app/services/git/process_ref_changes_service.rb6
8 files changed, 52 insertions, 45 deletions
diff --git a/app/assets/javascripts/diffs/components/diff_row.vue b/app/assets/javascripts/diffs/components/diff_row.vue
index c310bd9f31a..869a75f25f2 100644
--- a/app/assets/javascripts/diffs/components/diff_row.vue
+++ b/app/assets/javascripts/diffs/components/diff_row.vue
@@ -140,16 +140,13 @@ export default {
},
(line) => line.type,
),
- lineContent: memoize(
- (line) => {
- if (line.isConflictMarker) {
- return line.type === CONFLICT_MARKER_THEIR ? 'HEAD//our changes' : 'origin//their changes';
- }
+ lineContent: (line) => {
+ if (line.isConflictMarker) {
+ return line.type === CONFLICT_MARKER_THEIR ? 'HEAD//our changes' : 'origin//their changes';
+ }
- return line.rich_text;
- },
- (line) => line.line_code,
- ),
+ return line.rich_text;
+ },
CONFLICT_MARKER,
CONFLICT_MARKER_THEIR,
CONFLICT_OUR,
diff --git a/app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue b/app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue
index 86a2d127363..cc46484c05b 100644
--- a/app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue
+++ b/app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue
@@ -11,6 +11,7 @@ import {
featureAccessLevel,
featureAccessLevelNone,
CVE_ID_REQUEST_BUTTON_I18N,
+ featureAccessLevelDescriptions,
} from '../constants';
import { toggleHiddenClassBySelector } from '../external';
import projectFeatureSetting from './project_feature_setting.vue';
@@ -176,7 +177,7 @@ export default {
requirementsAccessLevel: featureAccessLevel.EVERYONE,
securityAndComplianceAccessLevel: featureAccessLevel.PROJECT_MEMBERS,
operationsAccessLevel: featureAccessLevel.EVERYONE,
- containerRegistryEnabled: true,
+ containerRegistryAccessLevel: featureAccessLevel.EVERYONE,
lfsEnabled: true,
requestAccessEnabled: true,
highlightChangesClass: false,
@@ -184,6 +185,8 @@ export default {
cveIdRequestEnabled: true,
featureAccessLevelEveryone,
featureAccessLevelMembers,
+ featureAccessLevel,
+ featureAccessLevelDescriptions,
};
return { ...defaults, ...this.currentSettings };
@@ -248,7 +251,10 @@ export default {
},
showContainerRegistryPublicNote() {
- return this.visibilityLevel === visibilityOptions.PUBLIC;
+ return (
+ this.visibilityLevel === visibilityOptions.PUBLIC &&
+ this.containerRegistryAccessLevel === featureAccessLevel.EVERYONE
+ );
},
repositoryHelpText() {
@@ -310,6 +316,10 @@ export default {
featureAccessLevel.PROJECT_MEMBERS,
this.operationsAccessLevel,
);
+ this.containerRegistryAccessLevel = Math.min(
+ featureAccessLevel.PROJECT_MEMBERS,
+ this.containerRegistryAccessLevel,
+ );
if (this.pagesAccessLevel === featureAccessLevel.EVERYONE) {
// When from Internal->Private narrow access for only members
this.pagesAccessLevel = featureAccessLevel.PROJECT_MEMBERS;
@@ -339,6 +349,8 @@ export default {
this.requirementsAccessLevel = featureAccessLevel.EVERYONE;
if (this.operationsAccessLevel === featureAccessLevel.PROJECT_MEMBERS)
this.operationsAccessLevel = featureAccessLevel.EVERYONE;
+ if (this.containerRegistryAccessLevel === featureAccessLevel.PROJECT_MEMBERS)
+ this.containerRegistryAccessLevel = featureAccessLevel.EVERYONE;
this.highlightChanges();
}
@@ -521,19 +533,24 @@ export default {
"
>
<div v-if="showContainerRegistryPublicNote" class="text-muted">
- {{
- s__(
- 'ProjectSettings|Note: the container registry is always visible when a project is public',
- )
- }}
+ <gl-sprintf
+ :message="
+ s__(
+ `ProjectSettings|Note: The container registry is always visible when a project is public and the container registry is set to '%{access_level_description}'`,
+ )
+ "
+ >
+ <template #access_level_description>{{
+ featureAccessLevelDescriptions[featureAccessLevel.EVERYONE]
+ }}</template>
+ </gl-sprintf>
</div>
- <gl-toggle
- v-model="containerRegistryEnabled"
- class="gl-my-2"
- :disabled="!repositoryEnabled"
+ <project-feature-setting
+ v-model="containerRegistryAccessLevel"
+ :options="repoFeatureAccessLevelOptions"
+ :disabled-input="!repositoryEnabled"
:label="$options.i18n.containerRegistryLabel"
- label-position="hidden"
- name="project[container_registry_enabled]"
+ name="project[project_feature_attributes][container_registry_access_level]"
/>
</project-setting-row>
<project-setting-row
diff --git a/app/assets/javascripts/pages/projects/shared/permissions/constants.js b/app/assets/javascripts/pages/projects/shared/permissions/constants.js
index e160fdacca6..fb1acd5311c 100644
--- a/app/assets/javascripts/pages/projects/shared/permissions/constants.js
+++ b/app/assets/javascripts/pages/projects/shared/permissions/constants.js
@@ -22,7 +22,7 @@ export const featureAccessLevel = {
EVERYONE: 20,
};
-const featureAccessLevelDescriptions = {
+export const featureAccessLevelDescriptions = {
[featureAccessLevel.NOT_ENABLED]: __('Enable feature to choose access level'),
[featureAccessLevel.PROJECT_MEMBERS]: __('Only Project Members'),
[featureAccessLevel.EVERYONE]: __('Everyone With Access'),
diff --git a/app/assets/javascripts/runner/components/runner_type_alert.vue b/app/assets/javascripts/runner/components/runner_type_alert.vue
index 72ce582e02c..aa435aaa823 100644
--- a/app/assets/javascripts/runner/components/runner_type_alert.vue
+++ b/app/assets/javascripts/runner/components/runner_type_alert.vue
@@ -6,28 +6,19 @@ import { INSTANCE_TYPE, GROUP_TYPE, PROJECT_TYPE } from '../constants';
const ALERT_DATA = {
[INSTANCE_TYPE]: {
- title: s__(
- 'Runners|This runner is available to all groups and projects in your GitLab instance.',
- ),
message: s__(
- 'Runners|Shared runners are available to every project in a GitLab instance. If you want a runner to build only specific projects, restrict the project in the table below. After you restrict a runner to a project, you cannot change it back to a shared runner.',
+ 'Runners|This runner is available to all groups and projects in your GitLab instance.',
),
variant: 'success',
anchor: 'shared-runners',
},
[GROUP_TYPE]: {
- title: s__('Runners|This runner is available to all projects and subgroups in a group.'),
- message: s__(
- 'Runners|Use Group runners when you want all projects in a group to have access to a set of runners.',
- ),
+ message: s__('Runners|This runner is available to all projects and subgroups in a group.'),
variant: 'success',
anchor: 'group-runners',
},
[PROJECT_TYPE]: {
- title: s__('Runners|This runner is associated with specific projects.'),
- message: s__(
- 'Runners|You can set up a specific runner to be used by multiple projects but you cannot make this a shared runner.',
- ),
+ message: s__('Runners|This runner is associated with one or more projects.'),
variant: 'info',
anchor: 'specific-runners',
},
@@ -59,7 +50,7 @@ export default {
};
</script>
<template>
- <gl-alert v-if="alert" :variant="alert.variant" :title="alert.title" :dismissible="false">
+ <gl-alert v-if="alert" :variant="alert.variant" :dismissible="false">
{{ alert.message }}
<gl-link :href="helpHref">{{ __('Learn more.') }}</gl-link>
</gl-alert>
diff --git a/app/assets/javascripts/sidebar/components/assignees/assignee_avatar_link.vue b/app/assets/javascripts/sidebar/components/assignees/assignee_avatar_link.vue
index 98fc0b0a783..2a237e7ace0 100644
--- a/app/assets/javascripts/sidebar/components/assignees/assignee_avatar_link.vue
+++ b/app/assets/javascripts/sidebar/components/assignees/assignee_avatar_link.vue
@@ -1,6 +1,6 @@
<script>
import { GlTooltipDirective, GlLink } from '@gitlab/ui';
-import { __, sprintf } from '~/locale';
+import { __ } from '~/locale';
import { isUserBusy } from '~/set_status_modal/utils';
import AssigneeAvatar from './assignee_avatar.vue';
@@ -32,10 +32,9 @@ const generateAssigneeTooltip = ({
}
if (tooltipHasName && statusInformation.length) {
- return sprintf(__('%{name} %{status}'), {
- name,
- status: statusInformation.map(paranthesize).join(' '),
- });
+ const status = statusInformation.map(paranthesize).join(' ');
+
+ return `${name} ${status}`;
}
return name;
diff --git a/app/assets/stylesheets/startup/startup-dark.scss b/app/assets/stylesheets/startup/startup-dark.scss
index 16b1e453f2e..a90751f772e 100644
--- a/app/assets/stylesheets/startup/startup-dark.scss
+++ b/app/assets/stylesheets/startup/startup-dark.scss
@@ -480,7 +480,7 @@ body {
.btn:active,
.btn.active {
background-color: #444;
- border-color: #fafafa;
+ border-color: #4f4f4f;
color: #fafafa;
}
.btn svg {
diff --git a/app/assets/stylesheets/themes/_dark.scss b/app/assets/stylesheets/themes/_dark.scss
index ea7aaaa8ec8..0808f364e87 100644
--- a/app/assets/stylesheets/themes/_dark.scss
+++ b/app/assets/stylesheets/themes/_dark.scss
@@ -186,8 +186,7 @@ body.gl-dark {
}
}
-$border-white-light: $gray-900;
-$border-white-normal: $gray-900;
+$border-white-normal: $border-color;
$body-bg: $gray-10;
$input-bg: $white;
diff --git a/app/services/git/process_ref_changes_service.rb b/app/services/git/process_ref_changes_service.rb
index 6f348ff9e0b..da05f18b5ac 100644
--- a/app/services/git/process_ref_changes_service.rb
+++ b/app/services/git/process_ref_changes_service.rb
@@ -51,7 +51,7 @@ module Git
change: change,
push_options: params[:push_options],
merge_request_branches: merge_request_branches,
- create_pipelines: change[:index] < PIPELINE_PROCESS_LIMIT || Feature.enabled?(:git_push_create_all_pipelines, project),
+ create_pipelines: under_process_limit?(change),
execute_project_hooks: execute_project_hooks,
create_push_event: !create_bulk_push_event
).execute
@@ -60,6 +60,10 @@ module Git
create_bulk_push_event(ref_type, action, changes) if create_bulk_push_event
end
+ def under_process_limit?(change)
+ change[:index] < PIPELINE_PROCESS_LIMIT || Feature.enabled?(:git_push_create_all_pipelines, project)
+ end
+
def create_bulk_push_event(ref_type, action, changes)
EventCreateService.new.bulk_push(
project,