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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-05-23 12:10:10 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-23 12:10:10 +0300
commit611b009e924c25fcc8706b52af90542c4b78f0c0 (patch)
tree01f1731b71224d4b2e3b427ef7a89f2df0de9f86 /app/assets/javascripts/environments
parentadb8dbff4284689e6902ff455ef74cf84fb79404 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/environments')
-rw-r--r--app/assets/javascripts/environments/components/environment_item.vue28
-rw-r--r--app/assets/javascripts/environments/components/environment_monitoring.vue24
-rw-r--r--app/assets/javascripts/environments/components/environments_detail_header.vue24
-rw-r--r--app/assets/javascripts/environments/components/new_environment_item.vue17
-rw-r--r--app/assets/javascripts/environments/environment_details/components/deployment_actions.vue1
-rw-r--r--app/assets/javascripts/environments/mount_show.js1
6 files changed, 4 insertions, 91 deletions
diff --git a/app/assets/javascripts/environments/components/environment_item.vue b/app/assets/javascripts/environments/components/environment_item.vue
index 1486a66fe13..b02142c24cf 100644
--- a/app/assets/javascripts/environments/components/environment_item.vue
+++ b/app/assets/javascripts/environments/components/environment_item.vue
@@ -16,12 +16,10 @@ import CiIcon from '~/vue_shared/components/ci_icon.vue';
import CommitComponent from '~/vue_shared/components/commit.vue';
import TooltipOnTruncate from '~/vue_shared/components/tooltip_on_truncate/tooltip_on_truncate.vue';
import timeagoMixin from '~/vue_shared/mixins/timeago';
-import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import eventHub from '../event_hub';
import ActionsComponent from './environment_actions.vue';
import DeleteComponent from './environment_delete.vue';
import ExternalUrlComponent from './environment_external_url.vue';
-import MonitoringButtonComponent from './environment_monitoring.vue';
import PinComponent from './environment_pin.vue';
import RollbackComponent from './environment_rollback.vue';
import StopComponent from './environment_stop.vue';
@@ -43,7 +41,6 @@ export default {
GlIcon,
GlLink,
GlSprintf,
- MonitoringButtonComponent,
PinComponent,
DeleteComponent,
RollbackComponent,
@@ -57,7 +54,7 @@ export default {
directives: {
GlTooltip: GlTooltipDirective,
},
- mixins: [timeagoMixin, glFeatureFlagsMixin()],
+ mixins: [timeagoMixin],
props: {
model: {
@@ -529,14 +526,6 @@ export default {
return this.model.environment_path || '';
},
- monitoringUrl() {
- return this.model.metrics_path || '';
- },
-
- canShowMetricsLink() {
- return Boolean(!this.glFeatures.removeMonitorMetrics && this.monitoringUrl);
- },
-
terminalPath() {
return this.model?.terminal_path ?? '';
},
@@ -549,7 +538,6 @@ export default {
return (
this.actions.length > 0 ||
this.externalURL ||
- this.canShowMetricsLink ||
this.canStopEnvironment ||
this.canDeleteEnvironment ||
this.canRetry
@@ -571,11 +559,7 @@ export default {
},
hasExtraActions() {
return Boolean(
- this.canRetry ||
- this.canShowAutoStopDate ||
- this.canShowMetricsLink ||
- this.terminalPath ||
- this.canDeleteEnvironment,
+ this.canRetry || this.canShowAutoStopDate || this.terminalPath || this.canDeleteEnvironment,
);
},
},
@@ -860,14 +844,6 @@ export default {
data-track-label="environment_pin"
/>
- <monitoring-button-component
- v-if="canShowMetricsLink"
- :monitoring-url="monitoringUrl"
- data-track-action="click_button"
- data-track-label="environment_monitoring"
- data-testid="environment-monitoring"
- />
-
<terminal-button-component
v-if="terminalPath"
:terminal-path="terminalPath"
diff --git a/app/assets/javascripts/environments/components/environment_monitoring.vue b/app/assets/javascripts/environments/components/environment_monitoring.vue
deleted file mode 100644
index 06c7f10223a..00000000000
--- a/app/assets/javascripts/environments/components/environment_monitoring.vue
+++ /dev/null
@@ -1,24 +0,0 @@
-<script>
-import { GlDropdownItem } from '@gitlab/ui';
-import { __ } from '~/locale';
-/**
- * Renders the Monitoring (Metrics) link in environments table.
- */
-export default {
- components: {
- GlDropdownItem,
- },
- props: {
- monitoringUrl: {
- type: String,
- required: true,
- },
- },
- title: __('Monitoring'),
-};
-</script>
-<template>
- <gl-dropdown-item :href="monitoringUrl" rel="noopener noreferrer nofollow" target="_blank">
- {{ $options.title }}
- </gl-dropdown-item>
-</template>
diff --git a/app/assets/javascripts/environments/components/environments_detail_header.vue b/app/assets/javascripts/environments/components/environments_detail_header.vue
index 0507abf3eaf..92960e2835e 100644
--- a/app/assets/javascripts/environments/components/environments_detail_header.vue
+++ b/app/assets/javascripts/environments/components/environments_detail_header.vue
@@ -4,7 +4,6 @@ import csrf from '~/lib/utils/csrf';
import { __, s__ } from '~/locale';
import TimeAgo from '~/vue_shared/components/time_ago_tooltip.vue';
import timeagoMixin from '~/vue_shared/mixins/timeago';
-import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import DeleteEnvironmentModal from './delete_environment_modal.vue';
import StopEnvironmentModal from './stop_environment_modal.vue';
import DeployFreezeAlert from './deploy_freeze_alert.vue';
@@ -24,7 +23,7 @@ export default {
GlModalDirective,
GlTooltip,
},
- mixins: [timeagoMixin, glFeatureFlagsMixin()],
+ mixins: [timeagoMixin],
props: {
environment: {
type: Object,
@@ -51,11 +50,6 @@ export default {
required: false,
default: '',
},
- metricsPath: {
- type: String,
- required: false,
- default: '',
- },
updatePath: {
type: String,
required: false,
@@ -69,8 +63,6 @@ export default {
},
i18n: {
autoStopAtText: s__('Environments|Auto stops %{autoStopAt}'),
- metricsButtonTitle: __('See metrics'),
- metricsButtonText: __('Monitoring'),
editButtonText: __('Edit'),
stopButtonText: s__('Environments|Stop'),
deleteButtonText: s__('Environments|Delete'),
@@ -91,9 +83,6 @@ export default {
shouldShowTerminalButton() {
return this.canAdminEnvironment && this.environment.hasTerminals;
},
- shouldShowMetricsButton() {
- return Boolean(!this.glFeatures.removeMonitorMetrics && this.shouldShowExternalUrlButton);
- },
},
};
</script>
@@ -146,17 +135,6 @@ export default {
target="_blank"
>{{ $options.i18n.externalButtonText }}</gl-button
>
- <gl-button
- v-if="shouldShowMetricsButton"
- v-gl-tooltip.hover
- data-testid="metrics-button"
- :href="metricsPath"
- :title="$options.i18n.metricsButtonTitle"
- icon="chart"
- class="gl-mr-2"
- >
- {{ $options.i18n.metricsButtonText }}
- </gl-button>
<gl-button v-if="canUpdateEnvironment" data-testid="edit-button" :href="updatePath">
{{ $options.i18n.editButtonText }}
</gl-button>
diff --git a/app/assets/javascripts/environments/components/new_environment_item.vue b/app/assets/javascripts/environments/components/new_environment_item.vue
index 912c558c3ce..9ad31688329 100644
--- a/app/assets/javascripts/environments/components/new_environment_item.vue
+++ b/app/assets/javascripts/environments/components/new_environment_item.vue
@@ -18,7 +18,6 @@ import Actions from './environment_actions.vue';
import StopComponent from './environment_stop.vue';
import Rollback from './environment_rollback.vue';
import Pin from './environment_pin.vue';
-import Monitoring from './environment_monitoring.vue';
import Terminal from './environment_terminal_button.vue';
import Delete from './environment_delete.vue';
import Deployment from './deployment.vue';
@@ -39,7 +38,6 @@ export default {
ExternalUrl,
StopComponent,
Rollback,
- Monitoring,
Pin,
Terminal,
TimeAgoTooltip,
@@ -133,7 +131,6 @@ export default {
return Boolean(
this.retryPath ||
this.canShowAutoStopDate ||
- this.canShowMetricsLink ||
this.terminalPath ||
this.canDeleteEnvironment,
);
@@ -154,12 +151,6 @@ export default {
autoStopPath() {
return this.environment?.cancelAutoStopPath ?? '';
},
- metricsPath() {
- return this.environment?.metricsPath ?? '';
- },
- canShowMetricsLink() {
- return Boolean(!this.glFeatures.removeMonitorMetrics && this.metricsPath);
- },
terminalPath() {
return this.environment?.terminalPath ?? '';
},
@@ -309,14 +300,6 @@ export default {
data-track-label="environment_pin"
/>
- <monitoring
- v-if="canShowMetricsLink"
- :monitoring-url="metricsPath"
- data-track-action="click_button"
- data-track-label="environment_monitoring"
- data-testid="environment-monitoring"
- />
-
<terminal
v-if="terminalPath"
:terminal-path="terminalPath"
diff --git a/app/assets/javascripts/environments/environment_details/components/deployment_actions.vue b/app/assets/javascripts/environments/environment_details/components/deployment_actions.vue
index 92a0b0e550e..787302df60f 100644
--- a/app/assets/javascripts/environments/environment_details/components/deployment_actions.vue
+++ b/app/assets/javascripts/environments/environment_details/components/deployment_actions.vue
@@ -110,6 +110,7 @@ export default {
data-testid="rollback-button"
:title="rollbackButtonTitle"
:icon="rollbackIcon"
+ :aria-label="rollbackButtonTitle"
@click="onRollbackClick"
/>
<environment-approval
diff --git a/app/assets/javascripts/environments/mount_show.js b/app/assets/javascripts/environments/mount_show.js
index f73cb7fe1bc..fb9a7a02d07 100644
--- a/app/assets/javascripts/environments/mount_show.js
+++ b/app/assets/javascripts/environments/mount_show.js
@@ -51,7 +51,6 @@ export const initHeader = () => {
canAdminEnvironment: dataset.canAdminEnvironment,
cancelAutoStopPath: dataset.environmentCancelAutoStopPath,
terminalPath: dataset.environmentTerminalPath,
- metricsPath: dataset.environmentMetricsPath,
updatePath: dataset.environmentEditPath,
},
});