Commit 6bfd582e authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'performance_improve_jira_connect_client' into 'master'

Avoid N+1 queries in JiraConnect::client

See merge request gitlab-org/gitlab!46783
parents 0c2b766c 35a91936
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* Used in environments table. * Used in environments table.
*/ */
import { GlTooltipDirective, GlButton } from '@gitlab/ui'; import { GlTooltipDirective, GlButton, GlModalDirective } from '@gitlab/ui';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import eventHub from '../event_hub'; import eventHub from '../event_hub';
...@@ -14,6 +14,7 @@ export default { ...@@ -14,6 +14,7 @@ export default {
}, },
directives: { directives: {
GlTooltip: GlTooltipDirective, GlTooltip: GlTooltipDirective,
GlModalDirective,
}, },
props: { props: {
environment: { environment: {
...@@ -54,14 +55,13 @@ export default { ...@@ -54,14 +55,13 @@ export default {
<template> <template>
<gl-button <gl-button
v-gl-tooltip="{ id: $options.stopEnvironmentTooltipId }" v-gl-tooltip="{ id: $options.stopEnvironmentTooltipId }"
v-gl-modal-directive="'stop-environment-modal'"
:loading="isLoading" :loading="isLoading"
:title="title" :title="title"
:aria-label="title" :aria-label="title"
icon="stop" icon="stop"
category="primary" category="primary"
variant="danger" variant="danger"
data-toggle="modal"
data-target="#stop-environment-modal"
@click="onClick" @click="onClick"
/> />
</template> </template>
<script> <script>
/* eslint-disable @gitlab/vue-require-i18n-strings */ import { GlSprintf, GlTooltipDirective, GlModal } from '@gitlab/ui';
import { GlSprintf, GlTooltipDirective } from '@gitlab/ui';
import DeprecatedModal2 from '~/vue_shared/components/deprecated_modal_2.vue';
import eventHub from '../event_hub'; import eventHub from '../event_hub';
import { __, s__ } from '~/locale';
export default { export default {
id: 'stop-environment-modal', id: 'stop-environment-modal',
name: 'StopEnvironmentModal', name: 'StopEnvironmentModal',
components: { components: {
GlModal: DeprecatedModal2, GlModal,
GlSprintf, GlSprintf,
}, },
...@@ -24,6 +23,20 @@ export default { ...@@ -24,6 +23,20 @@ export default {
}, },
}, },
computed: {
primaryProps() {
return {
text: s__('Environments|Stop environment'),
attributes: [{ variant: 'danger' }],
};
},
cancelProps() {
return {
text: __('Cancel'),
};
},
},
methods: { methods: {
onSubmit() { onSubmit() {
eventHub.$emit('stopEnvironment', this.environment); eventHub.$emit('stopEnvironment', this.environment);
...@@ -34,18 +47,23 @@ export default { ...@@ -34,18 +47,23 @@ export default {
<template> <template>
<gl-modal <gl-modal
:id="$options.id" :modal-id="$options.id"
:footer-primary-button-text="s__('Environments|Stop environment')" :action-primary="primaryProps"
footer-primary-button-variant="danger" :action-cancel="cancelProps"
@submit="onSubmit" @primary="onSubmit"
> >
<template #header> <template #modal-title>
<h4 class="modal-title d-flex mw-100"> <gl-sprintf :message="s__('Environments|Stopping %{environmentName}')">
Stopping <template #environmentName>
<span v-gl-tooltip :title="environment.name" class="text-truncate ml-1 mr-1 flex-fill"> <span
{{ environment.name }}? v-gl-tooltip
</span> :title="environment.name"
</h4> class="gl-text-truncate gl-ml-2 gl-mr-2 gl-flex-fill"
>
{{ environment.name }}?
</span>
</template>
</gl-sprintf>
</template> </template>
<p>{{ s__('Environments|Are you sure you want to stop this environment?') }}</p> <p>{{ s__('Environments|Are you sure you want to stop this environment?') }}</p>
......
...@@ -411,6 +411,8 @@ job B: ...@@ -411,6 +411,8 @@ job B:
- cat vendor/hello.txt - cat vendor/hello.txt
cache: cache:
key: build-cache key: build-cache
paths:
- vendor/
``` ```
Here's what happens behind the scenes: Here's what happens behind the scenes:
......
...@@ -59,13 +59,13 @@ export default { ...@@ -59,13 +59,13 @@ export default {
<span class="gl-font-weight-bold gl-mr-3">{{ $options.i18n.lastUpdated }}</span> <span class="gl-font-weight-bold gl-mr-3">{{ $options.i18n.lastUpdated }}</span>
<span class="gl-white-space-nowrap"> <span class="gl-white-space-nowrap">
<time-ago-tooltip class="gl-pr-3" :time="pipeline.createdAt" /> <time-ago-tooltip class="gl-pr-3" :time="pipeline.createdAt" />
<gl-link :href="pipeline.path" target="_blank">#{{ pipeline.id }}</gl-link> <gl-link :href="pipeline.path">#{{ pipeline.id }}</gl-link>
<pipeline-status-badge :pipeline="pipeline" class="gl-ml-3" /> <pipeline-status-badge :pipeline="pipeline" class="gl-ml-3" />
</span> </span>
</div> </div>
<div v-if="autoFixMrsCount" data-testid="auto-fix-mrs-link"> <div v-if="autoFixMrsCount" data-testid="auto-fix-mrs-link">
<span class="gl-font-weight-bold gl-mr-3">{{ $options.i18n.autoFixSolutions }}</span> <span class="gl-font-weight-bold gl-mr-3">{{ $options.i18n.autoFixSolutions }}</span>
<gl-link :href="autoFixMrsPath" target="_blank" class="gl-white-space-nowrap">{{ <gl-link :href="autoFixMrsPath" class="gl-white-space-nowrap">{{
sprintf($options.i18n.autoFixMrsLink, { mrsCount: autoFixMrsCount }) sprintf($options.i18n.autoFixMrsLink, { mrsCount: autoFixMrsCount })
}}</gl-link> }}</gl-link>
</div> </div>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
- if message.present? && subscribable.present? - if message.present? && subscribable.present?
.container-fluid.container-limited.pt-3 .container-fluid.container-limited.pt-3
.gl-alert.alert-dismissible.gitlab-ee-license-banner.hidden.js-gitlab-ee-license-banner.pb-5.border-width-1px.border-style-solid.border-color-default.border-radius-default{ role: 'alert', data: { license_expiry: subscribable.expires_at } } .gl-alert.alert-dismissible.gitlab-ee-license-banner.hidden.js-gitlab-ee-license-banner.gl-pb-7.gl-border-1.gl-border-solid.gl-border-gray-100.gl-rounded-base{ role: 'alert', data: { license_expiry: subscribable.expires_at } }
%button.close.p-2{ type: 'button', 'aria-label' => 'Dismiss banner', data: { dismiss: 'alert', track_event: 'click_button', track_label: 'dismiss_subscribable_banner' } } %button.close.p-2{ type: 'button', 'aria-label' => 'Dismiss banner', data: { dismiss: 'alert', track_event: 'click_button', track_label: 'dismiss_subscribable_banner' } }
%span{ 'aria-hidden' => 'true' } %span{ 'aria-hidden' => 'true' }
= sprite_icon('merge-request-close-m', size: 24) = sprite_icon('merge-request-close-m', size: 24)
......
---
title: Ooen pipeline status widget links in the same tab
merge_request: 46893
author:
type: changed
...@@ -10451,6 +10451,9 @@ msgstr "" ...@@ -10451,6 +10451,9 @@ msgstr ""
msgid "Environments|Stopping" msgid "Environments|Stopping"
msgstr "" msgstr ""
msgid "Environments|Stopping %{environmentName}"
msgstr ""
msgid "Environments|There was an error fetching the logs. Please try again." msgid "Environments|There was an error fetching the logs. Please try again."
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment