kubernetes - Added New Frontend System filter for tab
Signed-off-by: Andre Wanlin <awanlin@spotify.com>
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
import React from 'react';
|
||||
import { compatWrapper } from '@backstage/core-compat-api';
|
||||
import { EntityContentBlueprint } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { isKubernetesAvailable } from '../Router';
|
||||
import { isKind } from '@backstage/plugin-catalog';
|
||||
|
||||
export const entityKubernetesContent = EntityContentBlueprint.make({
|
||||
name: 'kubernetes',
|
||||
@@ -24,7 +26,12 @@ export const entityKubernetesContent = EntityContentBlueprint.make({
|
||||
defaultPath: '/kubernetes',
|
||||
defaultTitle: 'Kubernetes',
|
||||
defaultGroup: 'deployment',
|
||||
filter: 'kind:component,resource',
|
||||
filter: entity => {
|
||||
if (!isKind('Component')) return false;
|
||||
if (!isKind('Resource')) return false;
|
||||
if (!isKubernetesAvailable(entity)) return false;
|
||||
return true;
|
||||
},
|
||||
loader: () =>
|
||||
import('./KubernetesContentPage').then(m =>
|
||||
compatWrapper(<m.KubernetesContentPage />),
|
||||
|
||||
Reference in New Issue
Block a user