Commit 50e6ca32 authored by Thong Kuah's avatar Thong Kuah

Removes fallback warning for legacy deploy board labels

This removes all FE usages off has_legacy_app_label
parent 3934a31b
......@@ -184,7 +184,6 @@ export default {
:deploy-boards-help-path="deployBoardsHelpPath"
:is-loading="model.isLoadingDeployBoard"
:is-empty="model.isEmptyDeployBoard"
:has-legacy-app-label="model.hasLegacyAppLabel"
:logs-path="model.logs_path"
/>
</div>
......
......@@ -17,7 +17,7 @@ import {
GlSafeHtmlDirective as SafeHtml,
} from '@gitlab/ui';
import deployBoardSvg from 'ee_empty_states/icons/_deploy_board.svg';
import { n__, s__, sprintf } from '~/locale';
import { n__ } from '~/locale';
import { STATUS_MAP, CANARY_STATUS } from '../constants';
export default {
......@@ -53,27 +53,11 @@ export default {
required: false,
default: '',
},
hasLegacyAppLabel: {
type: Boolean,
required: false,
default: false,
},
},
computed: {
canRenderDeployBoard() {
return !this.isEmpty && !isEmpty(this.deployBoardData);
},
legacyLabelWarningMessage() {
return sprintf(
s__(
'DeployBoard|Matching on the %{appLabel} label has been removed for deploy boards. To see all instances on your board, you must update your chart and redeploy.',
),
{
appLabel: '<code>app</code>',
},
false,
);
},
canRenderEmptyState() {
return this.isEmpty;
},
......@@ -117,13 +101,6 @@ export default {
<div class="js-deploy-board deploy-board">
<gl-loading-icon v-if="isLoading" class="loading-icon" />
<template v-else>
<div v-if="hasLegacyAppLabel" class="bs-callout bs-callout-warning mb-0 mt-0">
<span v-safe-html="legacyLabelWarningMessage"></span>
<gl-link target="_blank" :href="deployBoardsHelpPath">
<strong>{{ __('More Information') }}</strong>
</gl-link>
</div>
<div v-if="canRenderDeployBoard" class="deploy-board-information p-3">
<div class="deploy-board-information">
<section class="deploy-board-status">
......
......@@ -18,7 +18,6 @@ export const setDeployBoard = (oldEnvironmentState, environment) => {
environment.rollout_status.status === 'found' ? environment.rollout_status : {},
isLoadingDeployBoard: environment.rollout_status.status === 'loading',
isEmptyDeployBoard: environment.rollout_status.status === 'not_found',
hasLegacyAppLabel: environment.rollout_status.has_legacy_app_label,
};
}
return parsedEnvironment;
......
---
title: Removes fallback warning for legacy deploy board labels
merge_request: 43376
author:
type: changed
......@@ -89,28 +89,6 @@ describe('Deploy Board', () => {
});
});
describe('with hasLegacyAppLabel equal true', () => {
beforeEach(done => {
wrapper = createComponent({
isLoading: false,
isEmpty: false,
logsPath,
hasLegacyAppLabel: true,
deployBoardData: {},
});
wrapper.vm.$nextTick(done);
});
it('should render legacy label warning message', () => {
const warningMessage = wrapper.find('.bs-callout-warning');
expect(warningMessage).toBeTruthy();
expect(warningMessage.text()).toContain(
'Matching on the app label has been removed for deploy boards.',
);
});
});
describe('has legend component', () => {
let statuses = [];
beforeEach(done => {
......@@ -118,7 +96,6 @@ describe('Deploy Board', () => {
isLoading: false,
isEmpty: false,
logsPath: environment.log_path,
hasLegacyAppLabel: true,
deployBoardData: deployBoardMockData,
});
({ statuses } = wrapper.vm);
......
......@@ -60,26 +60,6 @@ describe('Store', () => {
expect(store.state.environments[0].deployBoardData).toEqual(deployBoardMockData);
});
it('should set hasLegacyAppLabel property', () => {
expect(store.state.environments[0].deployBoardData).toEqual(deployBoardMockData);
const environment = {
name: 'foo',
size: 1,
latest: {
id: 1,
},
rollout_status: {
...deployBoardMockData,
status: 'not_found',
has_legacy_app_label: true,
},
};
store.storeEnvironments([environment]);
expect(store.state.environments[0].hasLegacyAppLabel).toBe(true);
});
});
describe('canaryCallout', () => {
......
......@@ -8595,9 +8595,6 @@ msgstr ""
msgid "Deploy to..."
msgstr ""
msgid "DeployBoard|Matching on the %{appLabel} label has been removed for deploy boards. To see all instances on your board, you must update your chart and redeploy."
msgstr ""
msgid "DeployFreeze|Freeze end"
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