Rename container runtime to network policy

Update the wording to reflect the fact that container runtime is now
known as network policy.
parent d54c10d6
......@@ -41,7 +41,7 @@ export default {
<template>
<div>
<h5 class="gl-mt-3">{{ __('Type') }}</h5>
<p>{{ s__('NetworkPolicies|Container runtime') }}</p>
<p>{{ s__('NetworkPolicies|Network policy') }}</p>
<div v-if="policy">
<template v-if="policy.description">
......
......@@ -2,7 +2,7 @@
import { GlButton, GlDrawer } from '@gitlab/ui';
import { getContentWrapperHeight } from '../../utils';
import { CiliumNetworkPolicyKind } from '../policy_editor/constants';
import ContainerRuntimePolicy from './container_runtime_policy.vue';
import CiliumNetworkPolicy from './cilium_network_policy.vue';
export default {
components: {
......@@ -10,7 +10,7 @@ export default {
GlDrawer,
NetworkPolicyEditor: () =>
import(/* webpackChunkName: 'network_policy_editor' */ '../network_policy_editor.vue'),
ContainerRuntimePolicy,
CiliumNetworkPolicy,
},
props: {
policy: {
......@@ -25,7 +25,7 @@ export default {
},
},
computed: {
isContainerRuntimePolicy() {
isCiliumNetworkPolicy() {
return this.policy ? this.policy.manifest.includes(CiliumNetworkPolicyKind) : false;
},
},
......@@ -59,7 +59,7 @@ export default {
</div>
</template>
<div v-if="policy">
<container-runtime-policy v-if="isContainerRuntimePolicy" :value="policy.manifest" />
<cilium-network-policy v-if="isCiliumNetworkPolicy" :value="policy.manifest" />
<div v-else>
<h5>{{ s__('NetworkPolicies|Policy definition') }}</h5>
......
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ContainerRuntimePolicy component supported YAML renders policy preview tabs 1`] = `
exports[`CiliumNetworkPolicy component supported YAML renders policy preview tabs 1`] = `
<div>
<h5
class="gl-mt-3"
......@@ -9,7 +9,7 @@ exports[`ContainerRuntimePolicy component supported YAML renders policy preview
</h5>
<p>
Container runtime
Network policy
</p>
<div>
......@@ -54,7 +54,7 @@ spec:
</div>
`;
exports[`ContainerRuntimePolicy component unsupported YAML renders policy preview tabs 1`] = `
exports[`CiliumNetworkPolicy component unsupported YAML renders policy preview tabs 1`] = `
<div>
<h5
class="gl-mt-3"
......@@ -63,7 +63,7 @@ exports[`ContainerRuntimePolicy component unsupported YAML renders policy previe
</h5>
<p>
Container runtime
Network policy
</p>
<!---->
......
import ContainerRuntimePolicy from 'ee/threat_monitoring/components/policy_drawer/container_runtime_policy.vue';
import CiliumNetworkPolicy from 'ee/threat_monitoring/components/policy_drawer/cilium_network_policy.vue';
import toYaml from 'ee/threat_monitoring/components/policy_editor/lib/to_yaml';
import PolicyPreview from 'ee/threat_monitoring/components/policy_editor/policy_preview.vue';
import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
describe('ContainerRuntimePolicy component', () => {
describe('CiliumNetworkPolicy component', () => {
let wrapper;
const policy = {
name: 'test-policy',
......@@ -17,7 +17,7 @@ describe('ContainerRuntimePolicy component', () => {
const findDescription = () => wrapper.findByTestId('description');
const factory = ({ propsData } = {}) => {
wrapper = shallowMountExtended(ContainerRuntimePolicy, {
wrapper = shallowMountExtended(CiliumNetworkPolicy, {
propsData: {
...propsData,
},
......
import ContainerRuntimePolicy from 'ee/threat_monitoring/components/policy_drawer/container_runtime_policy.vue';
import CiliumNetworkPolicy from 'ee/threat_monitoring/components/policy_drawer/cilium_network_policy.vue';
import NetworkPolicyDrawer from 'ee/threat_monitoring/components/policy_drawer/network_policy_drawer.vue';
import { mountExtended } from 'helpers/vue_test_utils_helper';
import { mockPoliciesResponse, mockCiliumPolicy } from '../../mocks/mock_data';
......@@ -22,7 +22,7 @@ describe('NetworkPolicyDrawer component', () => {
// Finders
const findEditButton = () => wrapper.findByTestId('edit-button');
const findPolicyEditor = () => wrapper.findByTestId('policyEditor');
const findCiliumPolicy = () => wrapper.findComponent(ContainerRuntimePolicy);
const findCiliumNetworkPolicy = () => wrapper.findComponent(CiliumNetworkPolicy);
// Shared assertions
const itRendersEditButton = () => {
......@@ -75,8 +75,8 @@ describe('NetworkPolicyDrawer component', () => {
});
});
it('renders the container runtime component', () => {
expect(findCiliumPolicy().exists()).toBe(true);
it('renders the network policy component', () => {
expect(findCiliumNetworkPolicy().exists()).toBe(true);
});
itRendersEditButton();
......
......@@ -21818,9 +21818,6 @@ msgstr ""
msgid "NetworkPolicies|Are you sure you want to delete this policy? This action cannot be undone."
msgstr ""
msgid "NetworkPolicies|Container runtime"
msgstr ""
msgid "NetworkPolicies|Create policy"
msgstr ""
......@@ -21872,6 +21869,9 @@ msgstr ""
msgid "NetworkPolicies|Network Policy"
msgstr ""
msgid "NetworkPolicies|Network policy"
msgstr ""
msgid "NetworkPolicies|Network traffic"
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