mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2025-12-15 14:11:46 +00:00
feat: add info banner static route tab (#520)
This commit is contained in:
parent
3277ab4a2b
commit
74c12a0d1b
@ -1,10 +1,11 @@
|
|||||||
// suffix of doc link, see utils/feature-flags.js how to get complete doc link
|
// suffix of doc link, see utils/feature-flags.js how to get complete doc link
|
||||||
export const DOC = {
|
export const DOC = {
|
||||||
CONSOLE_URL: `/host/#remote-console`,
|
CONSOLE_URL: `/host/#remote-console`,
|
||||||
RANCHER_INTEGRATION_URL: `/rancher/rancher-integration`,
|
RANCHER_INTEGRATION_URL: `/rancher/rancher-integration`,
|
||||||
KSMTUNED_MODE: `/host/#ksmtuned-mode`,
|
KSMTUNED_MODE: `/host/#ksmtuned-mode`,
|
||||||
UPGRADE_URL: `/upgrade/index`,
|
UPGRADE_URL: `/upgrade/index`,
|
||||||
UPGRADE_CONFIG_URL: `/advanced/index#upgrade-config`,
|
UPGRADE_CONFIG_URL: `/advanced/index#upgrade-config`,
|
||||||
STORAGE_NETWORK_EXAMPLE: `/advanced/storagenetwork#configuration-example`,
|
STORAGE_NETWORK_EXAMPLE: `/advanced/storagenetwork#configuration-example`,
|
||||||
SUPPORT_BUNDLE_NAMESPACES: `/advanced/index/#support-bundle-namespaces`,
|
SUPPORT_BUNDLE_NAMESPACES: `/advanced/index/#support-bundle-namespaces`,
|
||||||
|
VPC_CONFIGURATION_EXAMPLES: `/networking/kubeovn-vpc#vpc-peering-configuration-examples`,
|
||||||
};
|
};
|
||||||
|
|||||||
@ -2,12 +2,17 @@
|
|||||||
import debounce from 'lodash/debounce';
|
import debounce from 'lodash/debounce';
|
||||||
import { _EDIT, _VIEW } from '@shell/config/query-params';
|
import { _EDIT, _VIEW } from '@shell/config/query-params';
|
||||||
import { removeAt } from '@shell/utils/array';
|
import { removeAt } from '@shell/utils/array';
|
||||||
|
import { Banner } from '@components/Banner';
|
||||||
|
import { DOC } from '../../config/doc-links';
|
||||||
|
import { docLink } from '../../utils/feature-flags';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StaticRoutes',
|
name: 'StaticRoutes',
|
||||||
|
|
||||||
emits: ['update:value'],
|
emits: ['update:value'],
|
||||||
|
|
||||||
|
components: { Banner },
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
value: {
|
value: {
|
||||||
type: Array,
|
type: Array,
|
||||||
@ -45,6 +50,12 @@ export default {
|
|||||||
nextHopIPTooltip() {
|
nextHopIPTooltip() {
|
||||||
return this.t('harvester.vpc.staticRoutes.nextHopIP.tooltip');
|
return this.t('harvester.vpc.staticRoutes.nextHopIP.tooltip');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
vpcPeeringExamplesLink() {
|
||||||
|
const version = this.$store.getters['harvester-common/getServerVersion']();
|
||||||
|
|
||||||
|
return docLink(DOC.VPC_CONFIGURATION_EXAMPLES, version);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
@ -78,6 +89,13 @@ export default {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
|
<Banner color="info">
|
||||||
|
<t
|
||||||
|
k="harvester.vpc.vpcPeerings.infoBanner"
|
||||||
|
:raw="true"
|
||||||
|
:url="vpcPeeringExamplesLink"
|
||||||
|
/>
|
||||||
|
</Banner>
|
||||||
<div
|
<div
|
||||||
v-if="rows.length"
|
v-if="rows.length"
|
||||||
class="static-route-row"
|
class="static-route-row"
|
||||||
|
|||||||
@ -1088,6 +1088,7 @@ harvester:
|
|||||||
placeholder: e.g. 169.254.0.1/16
|
placeholder: e.g. 169.254.0.1/16
|
||||||
remoteVpc:
|
remoteVpc:
|
||||||
label: Remote VPC
|
label: Remote VPC
|
||||||
|
infoBanner: The static route destination CIDR must cover all subnets CIDR from remote VPC Peer. Read <a href="{url}" target="_blank">VPC Peering Configuration Examples</a> for more information.
|
||||||
network:
|
network:
|
||||||
label: Virtual Machine Networks
|
label: Virtual Machine Networks
|
||||||
tabs:
|
tabs:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user