mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-01 03:36:04 +08:00
feat: add network policy page (#536)
* feat: add Network Policiies page Signed-off-by: Andy Lee <andy.lee@suse.com> * ci: add build Signed-off-by: Andy Lee <andy.lee@suse.com> * ci: ensure FROM and TO exist Signed-off-by: Andy Lee <andy.lee@suse.com> * ci: skip commitlint if FROM and TO emtpy Signed-off-by: Andy Lee <andy.lee@suse.com> * revert: unnecessary change * feat: add banner Signed-off-by: Andy Lee <andy.lee@suse.com> --------- Signed-off-by: Andy Lee <andy.lee@suse.com>
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
<script>
|
||||
import NetworkPolicy from '@shell/edit/networking.k8s.io.networkpolicy';
|
||||
import { Banner } from '@components/Banner';
|
||||
import { DOC } from '../config/doc-links';
|
||||
import { docLink } from '../utils/feature-flags';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
NetworkPolicy,
|
||||
Banner
|
||||
},
|
||||
|
||||
computed: {
|
||||
networkPolicyDocLink() {
|
||||
const version = this.$store.getters['harvester-common/getServerVersion']();
|
||||
|
||||
return docLink(DOC.NETWORK_POLICY, version);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="network-policy-edit">
|
||||
<Banner color="info">
|
||||
<t
|
||||
k="harvester.networkPolicy.banner"
|
||||
:url="networkPolicyDocLink"
|
||||
:raw="true"
|
||||
/>
|
||||
</Banner>
|
||||
<NetworkPolicy v-bind="$attrs" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.network-policy-edit {
|
||||
flex: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user