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:
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/environments/components/environments_app.vue29
-rw-r--r--app/assets/javascripts/environments/components/environments_table.vue15
-rw-r--r--app/assets/javascripts/whats_new/components/feature.vue7
-rw-r--r--app/assets/stylesheets/pages/groups.scss6
-rw-r--r--app/controllers/groups_controller.rb6
-rw-r--r--app/models/release_highlight.rb16
-rw-r--r--app/views/groups/_create_chat_team.html.haml6
-rw-r--r--app/views/groups/_new_group_fields.html.haml11
-rw-r--r--app/views/profiles/two_factor_auths/_codes.html.haml2
-rw-r--r--app/views/profiles/two_factor_auths/create.html.haml2
-rw-r--r--app/views/shared/icons/_icon_mattermost.svg2
11 files changed, 59 insertions, 43 deletions
diff --git a/app/assets/javascripts/environments/components/environments_app.vue b/app/assets/javascripts/environments/components/environments_app.vue
index ce84caeb28f..b6a7cce36e9 100644
--- a/app/assets/javascripts/environments/components/environments_app.vue
+++ b/app/assets/javascripts/environments/components/environments_app.vue
@@ -143,13 +143,7 @@ export default {
<confirm-rollback-modal :environment="environmentInRollbackModal" />
<div class="gl-w-full">
- <div
- class="
- gl-display-flex
- gl-flex-direction-column
- gl-mt-3
- gl-display-md-none!"
- >
+ <div class="gl-display-flex gl-flex-direction-column gl-mt-3 gl-display-md-none!">
<gl-button
v-if="state.reviewAppDetails.can_setup_review_app"
v-gl-modal="$options.modal.id"
@@ -158,18 +152,16 @@ export default {
category="secondary"
type="button"
class="gl-mb-3 gl-flex-fill-1"
+ >{{ $options.i18n.reviewAppButtonLabel }}</gl-button
>
- {{ $options.i18n.reviewAppButtonLabel }}
- </gl-button>
<gl-button
v-if="canCreateEnvironment"
:href="newEnvironmentPath"
data-testid="new-environment"
category="primary"
variant="success"
+ >{{ $options.i18n.newEnvironmentButtonLabel }}</gl-button
>
- {{ $options.i18n.newEnvironmentButtonLabel }}
- </gl-button>
</div>
<gl-tabs content-class="gl-display-none">
<gl-tab
@@ -185,14 +177,7 @@ export default {
</gl-tab>
<template #tabs-end>
<div
- class="
- gl-display-none
- gl-display-md-flex
- gl-lg-align-items-center
- gl-lg-flex-direction-row
- gl-lg-flex-fill-1
- gl-lg-justify-content-end
- gl-lg-mt-0"
+ class="gl-display-none gl-display-md-flex gl-lg-align-items-center gl-lg-flex-direction-row gl-lg-flex-fill-1 gl-lg-justify-content-end gl-lg-mt-0"
>
<gl-button
v-if="state.reviewAppDetails.can_setup_review_app"
@@ -202,18 +187,16 @@ export default {
category="secondary"
type="button"
class="gl-mb-3 gl-lg-mr-3 gl-lg-mb-0"
+ >{{ $options.i18n.reviewAppButtonLabel }}</gl-button
>
- {{ $options.i18n.reviewAppButtonLabel }}
- </gl-button>
<gl-button
v-if="canCreateEnvironment"
:href="newEnvironmentPath"
data-testid="new-environment"
category="primary"
variant="success"
+ >{{ $options.i18n.newEnvironmentButtonLabel }}</gl-button
>
- {{ $options.i18n.newEnvironmentButtonLabel }}
- </gl-button>
</div>
</template>
</gl-tabs>
diff --git a/app/assets/javascripts/environments/components/environments_table.vue b/app/assets/javascripts/environments/components/environments_table.vue
index 3cfff686c01..d13c7204285 100644
--- a/app/assets/javascripts/environments/components/environments_table.vue
+++ b/app/assets/javascripts/environments/components/environments_table.vue
@@ -15,6 +15,7 @@ export default {
CanaryDeploymentCallout: () =>
import('ee_component/environments/components/canary_deployment_callout.vue'),
EnvironmentAlert: () => import('ee_component/environments/components/environment_alert.vue'),
+ CanaryUpdateModal: () => import('ee_component/environments/components/canary_update_modal.vue'),
},
props: {
environments: {
@@ -58,6 +59,12 @@ export default {
default: '',
},
},
+ data() {
+ return {
+ canaryWeight: 0,
+ environmentToChange: null,
+ };
+ },
computed: {
sortedEnvironments() {
return this.sortEnvironments(this.environments).map(env =>
@@ -144,11 +151,16 @@ export default {
sortBy(env => (env.isFolder ? -1 : 1)),
)(environments);
},
+ changeCanaryWeight(model, weight) {
+ this.environmentToChange = model;
+ this.canaryWeight = weight;
+ },
},
};
</script>
<template>
<div class="ci-table" role="grid">
+ <canary-update-modal :environment="environmentToChange" :weight="canaryWeight" />
<div class="gl-responsive-table-row table-row-header" role="row">
<div class="table-section" :class="tableData.name.spacing" role="columnheader">
{{ tableData.name.title }}
@@ -179,6 +191,7 @@ export default {
:model="model"
:can-read-environment="canReadEnvironment"
:table-data="tableData"
+ data-qa-selector="environment_item"
/>
<div
@@ -193,6 +206,7 @@ export default {
:is-loading="model.isLoadingDeployBoard"
:is-empty="model.isEmptyDeployBoard"
:logs-path="model.logs_path"
+ @changeCanaryWeight="changeCanaryWeight(model, $event)"
/>
</div>
</div>
@@ -215,6 +229,7 @@ export default {
:model="children"
:can-read-environment="canReadEnvironment"
:table-data="tableData"
+ data-qa-selector="environment_item"
/>
<div :key="`sub-div-${i}`">
diff --git a/app/assets/javascripts/whats_new/components/feature.vue b/app/assets/javascripts/whats_new/components/feature.vue
index 32fb2bd34a5..f6f7618b0d8 100644
--- a/app/assets/javascripts/whats_new/components/feature.vue
+++ b/app/assets/javascripts/whats_new/components/feature.vue
@@ -1,5 +1,5 @@
<script>
-import { GlBadge, GlIcon, GlLink } from '@gitlab/ui';
+import { GlBadge, GlIcon, GlLink, GlSafeHtmlDirective } from '@gitlab/ui';
export default {
components: {
@@ -7,6 +7,9 @@ export default {
GlIcon,
GlLink,
},
+ directives: {
+ SafeHtml: GlSafeHtmlDirective,
+ },
props: {
feature: {
type: Object,
@@ -51,7 +54,7 @@ export default {
class="img-thumbnail gl-px-8 gl-py-3 whats-new-item-image"
/>
</gl-link>
- <p class="gl-pt-3">{{ feature.body }}</p>
+ <div v-safe-html="feature.body" class="gl-pt-3"></div>
<gl-link
:href="feature.url"
target="_blank"
diff --git a/app/assets/stylesheets/pages/groups.scss b/app/assets/stylesheets/pages/groups.scss
index 7d870cf5a8b..aeda91c1714 100644
--- a/app/assets/stylesheets/pages/groups.scss
+++ b/app/assets/stylesheets/pages/groups.scss
@@ -293,12 +293,6 @@ table.pipeline-project-metrics tr td {
padding: $gl-padding;
}
-.mattermost-icon svg {
- width: 16px;
- height: 16px;
- vertical-align: text-bottom;
-}
-
.mattermost-team-name {
color: $gl-text-color-secondary;
}
diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb
index 40cb40c9905..068815f7f07 100644
--- a/app/controllers/groups_controller.rb
+++ b/app/controllers/groups_controller.rb
@@ -69,7 +69,7 @@ class GroupsController < Groups::ApplicationController
@group = Groups::CreateService.new(current_user, group_params).execute
if @group.persisted?
- track_experiment_event(:onboarding_issues, 'created_namespace')
+ successful_creation_hooks
notice = if @group.chat_team.present?
"Group '#{@group.name}' and its Mattermost team were successfully created."
@@ -319,6 +319,10 @@ class GroupsController < Groups::ApplicationController
private
+ def successful_creation_hooks
+ track_experiment_event(:onboarding_issues, 'created_namespace')
+ end
+
def groups
if @group.supports_events?
@group.self_and_descendants.public_or_visible_to_user(current_user)
diff --git a/app/models/release_highlight.rb b/app/models/release_highlight.rb
index 7f8ecae709f..1efba6380e9 100644
--- a/app/models/release_highlight.rb
+++ b/app/models/release_highlight.rb
@@ -34,11 +34,23 @@ class ReleaseHighlight
return if file_path.nil?
file = File.read(file_path)
-
items = YAML.safe_load(file, permitted_classes: [Date])
platform = Gitlab.com? ? 'gitlab-com' : 'self-managed'
- items&.select {|item| item[platform] }
+
+ items&.map! do |item|
+ next unless item[platform]
+
+ begin
+ item.tap {|i| i['body'] = Kramdown::Document.new(i['body']).to_html }
+ rescue => e
+ Gitlab::ErrorTracking.track_exception(e, file_path: file_path)
+
+ next
+ end
+ end
+
+ items&.compact
rescue Psych::Exception => e
Gitlab::ErrorTracking.track_exception(e, file_path: file_path)
diff --git a/app/views/groups/_create_chat_team.html.haml b/app/views/groups/_create_chat_team.html.haml
index 07394eec107..f141b646e69 100644
--- a/app/views/groups/_create_chat_team.html.haml
+++ b/app/views/groups/_create_chat_team.html.haml
@@ -1,10 +1,10 @@
.form-group
.col-sm-2.col-form-label
= f.label :create_chat_team do
- %span.mattermost-icon
+ %span.gl-display-flex
= custom_icon('icon_mattermost')
- Mattermost
- .col-sm-10
+ %span.gl-ml-2 Mattermost
+ .col-sm-12
.form-check.js-toggle-container
.js-toggle-button.form-check-input= f.check_box(:create_chat_team, { checked: false }, true, false)
= f.label :create_chat_team, class: 'form-check-label' do
diff --git a/app/views/groups/_new_group_fields.html.haml b/app/views/groups/_new_group_fields.html.haml
index e21a5101ea9..3872bbcd062 100644
--- a/app/views/groups/_new_group_fields.html.haml
+++ b/app/views/groups/_new_group_fields.html.haml
@@ -2,7 +2,7 @@
= render 'shared/group_form', f: f, autofocus: true
.row
- .form-group.col-sm-12
+ .form-group.col-sm-12.gl-mb-0
%label.label-bold
= _('Visibility level')
%p
@@ -10,8 +10,13 @@
= link_to _('View the documentation'), help_page_path("public_access/public_access"), target: '_blank'
= render 'shared/visibility_level', f: f, visibility_level: default_group_visibility, can_change_visibility_level: true, form_model: @group, with_label: false
- = render 'create_chat_team', f: f if Gitlab.config.mattermost.enabled
-
+- if Gitlab.config.mattermost.enabled
+ .row
+ = render 'create_chat_team', f: f
+.row
+ .col-sm-4
+ = render_if_exists 'shared/groups/invite_members'
+.row
.form-actions.col-sm-12
= f.submit _('Create group'), class: "btn btn-success"
= link_to _('Cancel'), dashboard_groups_path, class: 'btn btn-cancel'
diff --git a/app/views/profiles/two_factor_auths/_codes.html.haml b/app/views/profiles/two_factor_auths/_codes.html.haml
index 177e6d5453e..178a9d3f8b4 100644
--- a/app/views/profiles/two_factor_auths/_codes.html.haml
+++ b/app/views/profiles/two_factor_auths/_codes.html.haml
@@ -1,6 +1,6 @@
- show_success_alert = local_assigns.fetch(:show_success_alert, nil)
-- if Feature.enabled?(:vue_2fa_recovery_codes, current_user)
+- if Feature.enabled?(:vue_2fa_recovery_codes, current_user, default_enabled: true)
.js-2fa-recovery-codes{ data: { codes: @codes.to_json, profile_account_path: profile_account_path(two_factor_auth_enabled_successfully: show_success_alert) } }
- else
%p.slead
diff --git a/app/views/profiles/two_factor_auths/create.html.haml b/app/views/profiles/two_factor_auths/create.html.haml
index 5895b88df73..be4800024cf 100644
--- a/app/views/profiles/two_factor_auths/create.html.haml
+++ b/app/views/profiles/two_factor_auths/create.html.haml
@@ -1,7 +1,7 @@
- page_title _('Two-factor Authentication'), _('Account')
- add_page_specific_style 'page_bundles/profile_two_factor_auth'
-- unless Feature.enabled?(:vue_2fa_recovery_codes, current_user)
+- unless Feature.enabled?(:vue_2fa_recovery_codes, current_user, default_enabled: true)
.gl-alert.gl-alert-success.gl-mb-5
= _('Congratulations! You have enabled Two-factor Authentication!')
diff --git a/app/views/shared/icons/_icon_mattermost.svg b/app/views/shared/icons/_icon_mattermost.svg
index d1c541523ab..3cf10851003 100644
--- a/app/views/shared/icons/_icon_mattermost.svg
+++ b/app/views/shared/icons/_icon_mattermost.svg
@@ -1 +1 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500"><path d="M250.05 34c1.9.04 3.8.11 5.6.2l-29.79 35.51c-.07.01-.15.03-.23.04C149.26 84.1 98.22 146.5 98.22 222.97c0 41.56 23.07 90.5 59.75 119.1 28.61 22.32 64.29 36.9 101.21 36.9 93.4 0 160.15-68.61 160.15-156 0-34.91-15.99-72.77-41.76-100.76l-1.63-47.39c54.45 39.15 89.95 103.02 90.06 175.17v.01c0 119.29-96.7 216-216 216-119.29 0-216-96.71-216-216S130.71 34 250 34h.05zm64.1 20.29c.66-.04 1.32.03 1.96.25 3.01 1 3.85 3.57 3.93 6.45l3.84 146.88c.76 28.66-17.16 68.44-60.39 68.56-30.97.08-63.68-20.83-63.68-60.13.01-14.73 5.61-31.26 19.25-48.11l90.03-111.18c1.15-1.42 3.08-2.58 5.06-2.72z"/></svg>
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 500 500"><path d="M250.05 34c1.9.04 3.8.11 5.6.2l-29.79 35.51c-.07.01-.15.03-.23.04C149.26 84.1 98.22 146.5 98.22 222.97c0 41.56 23.07 90.5 59.75 119.1 28.61 22.32 64.29 36.9 101.21 36.9 93.4 0 160.15-68.61 160.15-156 0-34.91-15.99-72.77-41.76-100.76l-1.63-47.39c54.45 39.15 89.95 103.02 90.06 175.17v.01c0 119.29-96.7 216-216 216-119.29 0-216-96.71-216-216S130.71 34 250 34h.05zm64.1 20.29c.66-.04 1.32.03 1.96.25 3.01 1 3.85 3.57 3.93 6.45l3.84 146.88c.76 28.66-17.16 68.44-60.39 68.56-30.97.08-63.68-20.83-63.68-60.13.01-14.73 5.61-31.26 19.25-48.11l90.03-111.18c1.15-1.42 3.08-2.58 5.06-2.72z"/></svg>