catalog-react: update API reports for entity predicates + fixes
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -9,6 +9,7 @@ import { AnyRouteRefParams } from '@backstage/frontend-plugin-api';
|
||||
import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { EntityCardType } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { EntityPredicate } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { ExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionInput } from '@backstage/frontend-plugin-api';
|
||||
import { ExternalRouteRef } from '@backstage/frontend-plugin-api';
|
||||
@@ -45,11 +46,11 @@ const _default: FrontendPlugin<
|
||||
kind: 'entity-card';
|
||||
name: 'consumed-apis';
|
||||
config: {
|
||||
filter: string | undefined;
|
||||
filter: EntityPredicate | undefined;
|
||||
type: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
configInput: {
|
||||
filter?: string | undefined;
|
||||
filter?: EntityPredicate | undefined;
|
||||
type?: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
output:
|
||||
@@ -82,7 +83,7 @@ const _default: FrontendPlugin<
|
||||
inputs: {};
|
||||
params: {
|
||||
loader: () => Promise<JSX.Element>;
|
||||
filter?: string | ((entity: Entity) => boolean) | undefined;
|
||||
filter?: EntityPredicate | ((entity: Entity) => boolean) | undefined;
|
||||
type?: EntityCardType | undefined;
|
||||
};
|
||||
}>;
|
||||
@@ -90,11 +91,11 @@ const _default: FrontendPlugin<
|
||||
kind: 'entity-card';
|
||||
name: 'consuming-components';
|
||||
config: {
|
||||
filter: string | undefined;
|
||||
filter: EntityPredicate | undefined;
|
||||
type: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
configInput: {
|
||||
filter?: string | undefined;
|
||||
filter?: EntityPredicate | undefined;
|
||||
type?: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
output:
|
||||
@@ -127,7 +128,7 @@ const _default: FrontendPlugin<
|
||||
inputs: {};
|
||||
params: {
|
||||
loader: () => Promise<JSX.Element>;
|
||||
filter?: string | ((entity: Entity) => boolean) | undefined;
|
||||
filter?: EntityPredicate | ((entity: Entity) => boolean) | undefined;
|
||||
type?: EntityCardType | undefined;
|
||||
};
|
||||
}>;
|
||||
@@ -135,11 +136,11 @@ const _default: FrontendPlugin<
|
||||
kind: 'entity-card';
|
||||
name: 'definition';
|
||||
config: {
|
||||
filter: string | undefined;
|
||||
filter: EntityPredicate | undefined;
|
||||
type: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
configInput: {
|
||||
filter?: string | undefined;
|
||||
filter?: EntityPredicate | undefined;
|
||||
type?: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
output:
|
||||
@@ -172,7 +173,7 @@ const _default: FrontendPlugin<
|
||||
inputs: {};
|
||||
params: {
|
||||
loader: () => Promise<JSX.Element>;
|
||||
filter?: string | ((entity: Entity) => boolean) | undefined;
|
||||
filter?: EntityPredicate | ((entity: Entity) => boolean) | undefined;
|
||||
type?: EntityCardType | undefined;
|
||||
};
|
||||
}>;
|
||||
@@ -180,11 +181,11 @@ const _default: FrontendPlugin<
|
||||
kind: 'entity-card';
|
||||
name: 'has-apis';
|
||||
config: {
|
||||
filter: string | undefined;
|
||||
filter: EntityPredicate | undefined;
|
||||
type: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
configInput: {
|
||||
filter?: string | undefined;
|
||||
filter?: EntityPredicate | undefined;
|
||||
type?: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
output:
|
||||
@@ -217,7 +218,7 @@ const _default: FrontendPlugin<
|
||||
inputs: {};
|
||||
params: {
|
||||
loader: () => Promise<JSX.Element>;
|
||||
filter?: string | ((entity: Entity) => boolean) | undefined;
|
||||
filter?: EntityPredicate | ((entity: Entity) => boolean) | undefined;
|
||||
type?: EntityCardType | undefined;
|
||||
};
|
||||
}>;
|
||||
@@ -225,11 +226,11 @@ const _default: FrontendPlugin<
|
||||
kind: 'entity-card';
|
||||
name: 'provided-apis';
|
||||
config: {
|
||||
filter: string | undefined;
|
||||
filter: EntityPredicate | undefined;
|
||||
type: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
configInput: {
|
||||
filter?: string | undefined;
|
||||
filter?: EntityPredicate | undefined;
|
||||
type?: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
output:
|
||||
@@ -262,7 +263,7 @@ const _default: FrontendPlugin<
|
||||
inputs: {};
|
||||
params: {
|
||||
loader: () => Promise<JSX.Element>;
|
||||
filter?: string | ((entity: Entity) => boolean) | undefined;
|
||||
filter?: EntityPredicate | ((entity: Entity) => boolean) | undefined;
|
||||
type?: EntityCardType | undefined;
|
||||
};
|
||||
}>;
|
||||
@@ -270,11 +271,11 @@ const _default: FrontendPlugin<
|
||||
kind: 'entity-card';
|
||||
name: 'providing-components';
|
||||
config: {
|
||||
filter: string | undefined;
|
||||
filter: EntityPredicate | undefined;
|
||||
type: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
configInput: {
|
||||
filter?: string | undefined;
|
||||
filter?: EntityPredicate | undefined;
|
||||
type?: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
output:
|
||||
@@ -307,7 +308,7 @@ const _default: FrontendPlugin<
|
||||
inputs: {};
|
||||
params: {
|
||||
loader: () => Promise<JSX.Element>;
|
||||
filter?: string | ((entity: Entity) => boolean) | undefined;
|
||||
filter?: EntityPredicate | ((entity: Entity) => boolean) | undefined;
|
||||
type?: EntityCardType | undefined;
|
||||
};
|
||||
}>;
|
||||
@@ -317,11 +318,11 @@ const _default: FrontendPlugin<
|
||||
config: {
|
||||
path: string | undefined;
|
||||
title: string | undefined;
|
||||
filter: string | undefined;
|
||||
filter: EntityPredicate | undefined;
|
||||
group: string | false | undefined;
|
||||
};
|
||||
configInput: {
|
||||
filter?: string | undefined;
|
||||
filter?: EntityPredicate | undefined;
|
||||
title?: string | undefined;
|
||||
path?: string | undefined;
|
||||
group?: string | false | undefined;
|
||||
@@ -379,7 +380,7 @@ const _default: FrontendPlugin<
|
||||
| 'observability'
|
||||
| undefined;
|
||||
routeRef?: RouteRef<AnyRouteRefParams> | undefined;
|
||||
filter?: string | ((entity: Entity) => boolean) | undefined;
|
||||
filter?: EntityPredicate | ((entity: Entity) => boolean) | undefined;
|
||||
};
|
||||
}>;
|
||||
'entity-content:api-docs/definition': ExtensionDefinition<{
|
||||
@@ -388,11 +389,11 @@ const _default: FrontendPlugin<
|
||||
config: {
|
||||
path: string | undefined;
|
||||
title: string | undefined;
|
||||
filter: string | undefined;
|
||||
filter: EntityPredicate | undefined;
|
||||
group: string | false | undefined;
|
||||
};
|
||||
configInput: {
|
||||
filter?: string | undefined;
|
||||
filter?: EntityPredicate | undefined;
|
||||
title?: string | undefined;
|
||||
path?: string | undefined;
|
||||
group?: string | false | undefined;
|
||||
@@ -450,7 +451,7 @@ const _default: FrontendPlugin<
|
||||
| 'observability'
|
||||
| undefined;
|
||||
routeRef?: RouteRef<AnyRouteRefParams> | undefined;
|
||||
filter?: string | ((entity: Entity) => boolean) | undefined;
|
||||
filter?: EntityPredicate | ((entity: Entity) => boolean) | undefined;
|
||||
};
|
||||
}>;
|
||||
'nav-item:api-docs': ExtensionDefinition<{
|
||||
|
||||
@@ -9,6 +9,7 @@ import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { Direction } from '@backstage/plugin-catalog-graph';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { EntityCardType } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { EntityPredicate } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { ExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionInput } from '@backstage/frontend-plugin-api';
|
||||
import { ExternalRouteRef } from '@backstage/frontend-plugin-api';
|
||||
@@ -43,7 +44,7 @@ const _default: FrontendPlugin<
|
||||
title: string | undefined;
|
||||
height: number | undefined;
|
||||
} & {
|
||||
filter: string | undefined;
|
||||
filter: EntityPredicate | undefined;
|
||||
type: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
configInput: {
|
||||
@@ -59,7 +60,7 @@ const _default: FrontendPlugin<
|
||||
mergeRelations?: boolean | undefined;
|
||||
relationPairs?: [string, string][] | undefined;
|
||||
} & {
|
||||
filter?: string | undefined;
|
||||
filter?: EntityPredicate | undefined;
|
||||
type?: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
output:
|
||||
@@ -102,7 +103,7 @@ const _default: FrontendPlugin<
|
||||
name: 'relations';
|
||||
params: {
|
||||
loader: () => Promise<JSX.Element>;
|
||||
filter?: string | ((entity: Entity) => boolean) | undefined;
|
||||
filter?: EntityPredicate | ((entity: Entity) => boolean) | undefined;
|
||||
type?: EntityCardType | undefined;
|
||||
};
|
||||
}>;
|
||||
|
||||
@@ -11,6 +11,7 @@ import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { ExtensionBlueprint } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { JsonValue } from '@backstage/types';
|
||||
import { JSX as JSX_2 } from 'react';
|
||||
import { default as React_2 } from 'react';
|
||||
import { ResourcePermission } from '@backstage/plugin-permission-common';
|
||||
@@ -80,9 +81,7 @@ export function convertLegacyEntityCardExtension(
|
||||
LegacyExtension: ComponentType<{}>,
|
||||
overrides?: {
|
||||
name?: string;
|
||||
filter?:
|
||||
| typeof EntityCardBlueprint.dataRefs.filterFunction.T
|
||||
| typeof EntityCardBlueprint.dataRefs.filterExpression.T;
|
||||
filter?: string | EntityPredicate | ((entity: Entity) => boolean);
|
||||
},
|
||||
): ExtensionDefinition;
|
||||
|
||||
@@ -91,9 +90,7 @@ export function convertLegacyEntityContentExtension(
|
||||
LegacyExtension: ComponentType<{}>,
|
||||
overrides?: {
|
||||
name?: string;
|
||||
filter?:
|
||||
| typeof EntityContentBlueprint.dataRefs.filterFunction.T
|
||||
| typeof EntityContentBlueprint.dataRefs.filterExpression.T;
|
||||
filter?: string | EntityPredicate | ((entity: Entity) => boolean);
|
||||
defaultPath?: string;
|
||||
defaultTitle?: string;
|
||||
},
|
||||
@@ -113,7 +110,7 @@ export const EntityCardBlueprint: ExtensionBlueprint<{
|
||||
name: undefined;
|
||||
params: {
|
||||
loader: () => Promise<JSX.Element>;
|
||||
filter?: string | ((entity: Entity) => boolean) | undefined;
|
||||
filter?: EntityPredicate | ((entity: Entity) => boolean) | undefined;
|
||||
type?: EntityCardType | undefined;
|
||||
};
|
||||
output:
|
||||
@@ -141,11 +138,11 @@ export const EntityCardBlueprint: ExtensionBlueprint<{
|
||||
>;
|
||||
inputs: {};
|
||||
config: {
|
||||
filter: string | undefined;
|
||||
filter: EntityPredicate | undefined;
|
||||
type: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
configInput: {
|
||||
filter?: string | undefined;
|
||||
filter?: EntityPredicate | undefined;
|
||||
type?: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
dataRefs: {
|
||||
@@ -186,7 +183,7 @@ export const EntityContentBlueprint: ExtensionBlueprint<{
|
||||
| 'observability'
|
||||
| undefined;
|
||||
routeRef?: RouteRef<AnyRouteRefParams> | undefined;
|
||||
filter?: string | ((entity: Entity) => boolean) | undefined;
|
||||
filter?: EntityPredicate | ((entity: Entity) => boolean) | undefined;
|
||||
};
|
||||
output:
|
||||
| ConfigurableExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
@@ -224,11 +221,11 @@ export const EntityContentBlueprint: ExtensionBlueprint<{
|
||||
config: {
|
||||
path: string | undefined;
|
||||
title: string | undefined;
|
||||
filter: string | undefined;
|
||||
filter: EntityPredicate | undefined;
|
||||
group: string | false | undefined;
|
||||
};
|
||||
configInput: {
|
||||
filter?: string | undefined;
|
||||
filter?: EntityPredicate | undefined;
|
||||
title?: string | undefined;
|
||||
path?: string | undefined;
|
||||
group?: string | false | undefined;
|
||||
@@ -262,7 +259,7 @@ export const EntityContentLayoutBlueprint: ExtensionBlueprint<{
|
||||
kind: 'entity-content-layout';
|
||||
name: undefined;
|
||||
params: {
|
||||
filter?: string | ((entity: Entity) => boolean) | undefined;
|
||||
filter?: EntityPredicate | ((entity: Entity) => boolean) | undefined;
|
||||
loader: () => Promise<
|
||||
(props: EntityContentLayoutProps) => React_2.JSX.Element
|
||||
>;
|
||||
@@ -290,10 +287,10 @@ export const EntityContentLayoutBlueprint: ExtensionBlueprint<{
|
||||
inputs: {};
|
||||
config: {
|
||||
type: string | undefined;
|
||||
filter: string | undefined;
|
||||
filter: EntityPredicate | undefined;
|
||||
};
|
||||
configInput: {
|
||||
filter?: string | undefined;
|
||||
filter?: EntityPredicate | undefined;
|
||||
type?: string | undefined;
|
||||
};
|
||||
dataRefs: {
|
||||
@@ -324,6 +321,54 @@ export interface EntityContentLayoutProps {
|
||||
}>;
|
||||
}
|
||||
|
||||
// @alpha (undocumented)
|
||||
export type EntityPredicate =
|
||||
| EntityPredicateExpression
|
||||
| EntityPredicatePrimitive
|
||||
| {
|
||||
$all: EntityPredicate[];
|
||||
}
|
||||
| {
|
||||
$any: EntityPredicate[];
|
||||
}
|
||||
| {
|
||||
$not: EntityPredicate;
|
||||
};
|
||||
|
||||
// @alpha (undocumented)
|
||||
export type EntityPredicateExpression = {
|
||||
[KPath in string]: EntityPredicateValue;
|
||||
} & {
|
||||
[KPath in `$${string}`]: never;
|
||||
};
|
||||
|
||||
// @alpha (undocumented)
|
||||
export type EntityPredicatePrimitive = string | number | boolean;
|
||||
|
||||
// @alpha
|
||||
export function entityPredicateToFilterFunction<T extends JsonValue>(
|
||||
entityPredicate: EntityPredicate,
|
||||
): (value: T) => boolean;
|
||||
|
||||
// @alpha (undocumented)
|
||||
export type EntityPredicateValue =
|
||||
| EntityPredicatePrimitive
|
||||
| {
|
||||
$exists: boolean;
|
||||
}
|
||||
| {
|
||||
$in: EntityPredicatePrimitive[];
|
||||
}
|
||||
| {
|
||||
$contains: EntityPredicateExpression;
|
||||
};
|
||||
|
||||
// @alpha
|
||||
export function evaluateEntityPredicate(
|
||||
filter: EntityPredicate,
|
||||
value: JsonValue,
|
||||
): boolean;
|
||||
|
||||
// @alpha
|
||||
export function isOwnerOf(owner: Entity, entity: Entity): boolean;
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ import {
|
||||
import { createEntityPredicateSchema } from '../predicates/createEntityPredicateSchema';
|
||||
import { EntityPredicate } from '../predicates';
|
||||
import { resolveEntityFilterData } from './resolveEntityFilterData';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
|
||||
/**
|
||||
* @alpha
|
||||
@@ -62,7 +63,7 @@ export const EntityCardBlueprint = createExtensionBlueprint({
|
||||
type,
|
||||
}: {
|
||||
loader: () => Promise<JSX.Element>;
|
||||
filter?: EntityPredicate | typeof entityFilterFunctionDataRef.T;
|
||||
filter?: string | EntityPredicate | ((entity: Entity) => boolean);
|
||||
type?: EntityCardType;
|
||||
},
|
||||
{ node, config },
|
||||
|
||||
@@ -30,6 +30,7 @@ import {
|
||||
import { EntityPredicate } from '../predicates';
|
||||
import { resolveEntityFilterData } from './resolveEntityFilterData';
|
||||
import { createEntityPredicateSchema } from '../predicates/createEntityPredicateSchema';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
|
||||
/**
|
||||
* @alpha
|
||||
@@ -76,7 +77,7 @@ export const EntityContentBlueprint = createExtensionBlueprint({
|
||||
defaultTitle: string;
|
||||
defaultGroup?: keyof typeof defaultEntityContentGroups | (string & {});
|
||||
routeRef?: RouteRef;
|
||||
filter?: string | EntityPredicate | typeof entityFilterFunctionDataRef.T;
|
||||
filter?: string | EntityPredicate | ((entity: Entity) => boolean);
|
||||
},
|
||||
{ node, config },
|
||||
) {
|
||||
|
||||
@@ -28,6 +28,7 @@ import React from 'react';
|
||||
import { EntityPredicate } from '../predicates';
|
||||
import { resolveEntityFilterData } from './resolveEntityFilterData';
|
||||
import { createEntityPredicateSchema } from '../predicates/createEntityPredicateSchema';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
|
||||
/** @alpha */
|
||||
export interface EntityContentLayoutProps {
|
||||
@@ -69,7 +70,7 @@ export const EntityContentLayoutBlueprint = createExtensionBlueprint({
|
||||
loader,
|
||||
filter,
|
||||
}: {
|
||||
filter?: string | EntityPredicate | typeof entityFilterFunctionDataRef.T;
|
||||
filter?: string | EntityPredicate | ((entity: Entity) => boolean);
|
||||
loader: () => Promise<
|
||||
(props: EntityContentLayoutProps) => React.JSX.Element
|
||||
>;
|
||||
|
||||
@@ -20,15 +20,15 @@ import { ExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import React, { ComponentType } from 'react';
|
||||
import { EntityCardBlueprint } from '../blueprints';
|
||||
import kebabCase from 'lodash/kebabCase';
|
||||
import { EntityPredicate } from '../predicates';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
|
||||
/** @alpha */
|
||||
export function convertLegacyEntityCardExtension(
|
||||
LegacyExtension: ComponentType<{}>,
|
||||
overrides?: {
|
||||
name?: string;
|
||||
filter?:
|
||||
| typeof EntityCardBlueprint.dataRefs.filterFunction.T
|
||||
| typeof EntityCardBlueprint.dataRefs.filterExpression.T;
|
||||
filter?: string | EntityPredicate | ((entity: Entity) => boolean);
|
||||
},
|
||||
): ExtensionDefinition {
|
||||
const element = <LegacyExtension />;
|
||||
|
||||
@@ -28,15 +28,15 @@ import kebabCase from 'lodash/kebabCase';
|
||||
import startCase from 'lodash/startCase';
|
||||
import React, { ComponentType } from 'react';
|
||||
import { EntityContentBlueprint } from '../blueprints';
|
||||
import { EntityPredicate } from '../predicates';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
|
||||
/** @alpha */
|
||||
export function convertLegacyEntityContentExtension(
|
||||
LegacyExtension: ComponentType<{}>,
|
||||
overrides?: {
|
||||
name?: string;
|
||||
filter?:
|
||||
| typeof EntityContentBlueprint.dataRefs.filterFunction.T
|
||||
| typeof EntityContentBlueprint.dataRefs.filterExpression.T;
|
||||
filter?: string | EntityPredicate | ((entity: Entity) => boolean);
|
||||
defaultPath?: string;
|
||||
defaultTitle?: string;
|
||||
},
|
||||
|
||||
@@ -24,6 +24,7 @@ import { valueAtPath } from './valueAtPath';
|
||||
|
||||
/**
|
||||
* Convert an entity predicate to a filter function that can be used to filter entities.
|
||||
* @alpha
|
||||
*/
|
||||
export function entityPredicateToFilterFunction<T extends JsonValue>(
|
||||
entityPredicate: EntityPredicate,
|
||||
|
||||
@@ -12,6 +12,7 @@ import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { EntityCardType } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { EntityContentLayoutProps } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { EntityPredicate } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { ExtensionBlueprint } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionInput } from '@backstage/frontend-plugin-api';
|
||||
@@ -353,11 +354,11 @@ const _default: FrontendPlugin<
|
||||
kind: 'entity-card';
|
||||
name: 'about';
|
||||
config: {
|
||||
filter: string | undefined;
|
||||
filter: EntityPredicate | undefined;
|
||||
type: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
configInput: {
|
||||
filter?: string | undefined;
|
||||
filter?: EntityPredicate | undefined;
|
||||
type?: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
output:
|
||||
@@ -386,7 +387,7 @@ const _default: FrontendPlugin<
|
||||
inputs: {};
|
||||
params: {
|
||||
loader: () => Promise<JSX.Element>;
|
||||
filter?: string | ((entity: Entity) => boolean) | undefined;
|
||||
filter?: EntityPredicate | ((entity: Entity) => boolean) | undefined;
|
||||
type?: EntityCardType | undefined;
|
||||
};
|
||||
}>;
|
||||
@@ -394,11 +395,11 @@ const _default: FrontendPlugin<
|
||||
kind: 'entity-card';
|
||||
name: 'depends-on-components';
|
||||
config: {
|
||||
filter: string | undefined;
|
||||
filter: EntityPredicate | undefined;
|
||||
type: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
configInput: {
|
||||
filter?: string | undefined;
|
||||
filter?: EntityPredicate | undefined;
|
||||
type?: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
output:
|
||||
@@ -427,7 +428,7 @@ const _default: FrontendPlugin<
|
||||
inputs: {};
|
||||
params: {
|
||||
loader: () => Promise<JSX.Element>;
|
||||
filter?: string | ((entity: Entity) => boolean) | undefined;
|
||||
filter?: EntityPredicate | ((entity: Entity) => boolean) | undefined;
|
||||
type?: EntityCardType | undefined;
|
||||
};
|
||||
}>;
|
||||
@@ -435,11 +436,11 @@ const _default: FrontendPlugin<
|
||||
kind: 'entity-card';
|
||||
name: 'depends-on-resources';
|
||||
config: {
|
||||
filter: string | undefined;
|
||||
filter: EntityPredicate | undefined;
|
||||
type: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
configInput: {
|
||||
filter?: string | undefined;
|
||||
filter?: EntityPredicate | undefined;
|
||||
type?: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
output:
|
||||
@@ -468,7 +469,7 @@ const _default: FrontendPlugin<
|
||||
inputs: {};
|
||||
params: {
|
||||
loader: () => Promise<JSX.Element>;
|
||||
filter?: string | ((entity: Entity) => boolean) | undefined;
|
||||
filter?: EntityPredicate | ((entity: Entity) => boolean) | undefined;
|
||||
type?: EntityCardType | undefined;
|
||||
};
|
||||
}>;
|
||||
@@ -476,11 +477,11 @@ const _default: FrontendPlugin<
|
||||
kind: 'entity-card';
|
||||
name: 'has-components';
|
||||
config: {
|
||||
filter: string | undefined;
|
||||
filter: EntityPredicate | undefined;
|
||||
type: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
configInput: {
|
||||
filter?: string | undefined;
|
||||
filter?: EntityPredicate | undefined;
|
||||
type?: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
output:
|
||||
@@ -509,7 +510,7 @@ const _default: FrontendPlugin<
|
||||
inputs: {};
|
||||
params: {
|
||||
loader: () => Promise<JSX.Element>;
|
||||
filter?: string | ((entity: Entity) => boolean) | undefined;
|
||||
filter?: EntityPredicate | ((entity: Entity) => boolean) | undefined;
|
||||
type?: EntityCardType | undefined;
|
||||
};
|
||||
}>;
|
||||
@@ -517,11 +518,11 @@ const _default: FrontendPlugin<
|
||||
kind: 'entity-card';
|
||||
name: 'has-resources';
|
||||
config: {
|
||||
filter: string | undefined;
|
||||
filter: EntityPredicate | undefined;
|
||||
type: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
configInput: {
|
||||
filter?: string | undefined;
|
||||
filter?: EntityPredicate | undefined;
|
||||
type?: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
output:
|
||||
@@ -550,7 +551,7 @@ const _default: FrontendPlugin<
|
||||
inputs: {};
|
||||
params: {
|
||||
loader: () => Promise<JSX.Element>;
|
||||
filter?: string | ((entity: Entity) => boolean) | undefined;
|
||||
filter?: EntityPredicate | ((entity: Entity) => boolean) | undefined;
|
||||
type?: EntityCardType | undefined;
|
||||
};
|
||||
}>;
|
||||
@@ -558,11 +559,11 @@ const _default: FrontendPlugin<
|
||||
kind: 'entity-card';
|
||||
name: 'has-subcomponents';
|
||||
config: {
|
||||
filter: string | undefined;
|
||||
filter: EntityPredicate | undefined;
|
||||
type: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
configInput: {
|
||||
filter?: string | undefined;
|
||||
filter?: EntityPredicate | undefined;
|
||||
type?: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
output:
|
||||
@@ -591,7 +592,7 @@ const _default: FrontendPlugin<
|
||||
inputs: {};
|
||||
params: {
|
||||
loader: () => Promise<JSX.Element>;
|
||||
filter?: string | ((entity: Entity) => boolean) | undefined;
|
||||
filter?: EntityPredicate | ((entity: Entity) => boolean) | undefined;
|
||||
type?: EntityCardType | undefined;
|
||||
};
|
||||
}>;
|
||||
@@ -599,11 +600,11 @@ const _default: FrontendPlugin<
|
||||
kind: 'entity-card';
|
||||
name: 'has-subdomains';
|
||||
config: {
|
||||
filter: string | undefined;
|
||||
filter: EntityPredicate | undefined;
|
||||
type: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
configInput: {
|
||||
filter?: string | undefined;
|
||||
filter?: EntityPredicate | undefined;
|
||||
type?: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
output:
|
||||
@@ -632,7 +633,7 @@ const _default: FrontendPlugin<
|
||||
inputs: {};
|
||||
params: {
|
||||
loader: () => Promise<JSX.Element>;
|
||||
filter?: string | ((entity: Entity) => boolean) | undefined;
|
||||
filter?: EntityPredicate | ((entity: Entity) => boolean) | undefined;
|
||||
type?: EntityCardType | undefined;
|
||||
};
|
||||
}>;
|
||||
@@ -640,11 +641,11 @@ const _default: FrontendPlugin<
|
||||
kind: 'entity-card';
|
||||
name: 'has-systems';
|
||||
config: {
|
||||
filter: string | undefined;
|
||||
filter: EntityPredicate | undefined;
|
||||
type: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
configInput: {
|
||||
filter?: string | undefined;
|
||||
filter?: EntityPredicate | undefined;
|
||||
type?: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
output:
|
||||
@@ -673,7 +674,7 @@ const _default: FrontendPlugin<
|
||||
inputs: {};
|
||||
params: {
|
||||
loader: () => Promise<JSX.Element>;
|
||||
filter?: string | ((entity: Entity) => boolean) | undefined;
|
||||
filter?: EntityPredicate | ((entity: Entity) => boolean) | undefined;
|
||||
type?: EntityCardType | undefined;
|
||||
};
|
||||
}>;
|
||||
@@ -681,11 +682,11 @@ const _default: FrontendPlugin<
|
||||
kind: 'entity-card';
|
||||
name: 'labels';
|
||||
config: {
|
||||
filter: string | undefined;
|
||||
filter: EntityPredicate | undefined;
|
||||
type: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
configInput: {
|
||||
filter?: string | undefined;
|
||||
filter?: EntityPredicate | undefined;
|
||||
type?: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
output:
|
||||
@@ -714,7 +715,7 @@ const _default: FrontendPlugin<
|
||||
inputs: {};
|
||||
params: {
|
||||
loader: () => Promise<JSX.Element>;
|
||||
filter?: string | ((entity: Entity) => boolean) | undefined;
|
||||
filter?: EntityPredicate | ((entity: Entity) => boolean) | undefined;
|
||||
type?: EntityCardType | undefined;
|
||||
};
|
||||
}>;
|
||||
@@ -722,11 +723,11 @@ const _default: FrontendPlugin<
|
||||
kind: 'entity-card';
|
||||
name: 'links';
|
||||
config: {
|
||||
filter: string | undefined;
|
||||
filter: EntityPredicate | undefined;
|
||||
type: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
configInput: {
|
||||
filter?: string | undefined;
|
||||
filter?: EntityPredicate | undefined;
|
||||
type?: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
output:
|
||||
@@ -755,7 +756,7 @@ const _default: FrontendPlugin<
|
||||
inputs: {};
|
||||
params: {
|
||||
loader: () => Promise<JSX.Element>;
|
||||
filter?: string | ((entity: Entity) => boolean) | undefined;
|
||||
filter?: EntityPredicate | ((entity: Entity) => boolean) | undefined;
|
||||
type?: EntityCardType | undefined;
|
||||
};
|
||||
}>;
|
||||
@@ -763,11 +764,11 @@ const _default: FrontendPlugin<
|
||||
config: {
|
||||
path: string | undefined;
|
||||
title: string | undefined;
|
||||
filter: string | undefined;
|
||||
filter: EntityPredicate | undefined;
|
||||
group: string | false | undefined;
|
||||
};
|
||||
configInput: {
|
||||
filter?: string | undefined;
|
||||
filter?: EntityPredicate | undefined;
|
||||
title?: string | undefined;
|
||||
path?: string | undefined;
|
||||
group?: string | false | undefined;
|
||||
@@ -877,7 +878,7 @@ const _default: FrontendPlugin<
|
||||
| 'observability'
|
||||
| undefined;
|
||||
routeRef?: RouteRef<AnyRouteRefParams> | undefined;
|
||||
filter?: string | ((entity: Entity) => boolean) | undefined;
|
||||
filter?: EntityPredicate | ((entity: Entity) => boolean) | undefined;
|
||||
};
|
||||
}>;
|
||||
'nav-item:catalog': ExtensionDefinition<{
|
||||
|
||||
@@ -9,6 +9,7 @@ import { AnyApiFactory } from '@backstage/frontend-plugin-api';
|
||||
import { AnyRouteRefParams } from '@backstage/frontend-plugin-api';
|
||||
import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { EntityPredicate } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { ExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { FrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
import { JSX as JSX_2 } from 'react';
|
||||
@@ -88,11 +89,11 @@ const _default: FrontendPlugin<
|
||||
config: {
|
||||
path: string | undefined;
|
||||
title: string | undefined;
|
||||
filter: string | undefined;
|
||||
filter: EntityPredicate | undefined;
|
||||
group: string | false | undefined;
|
||||
};
|
||||
configInput: {
|
||||
filter?: string | undefined;
|
||||
filter?: EntityPredicate | undefined;
|
||||
title?: string | undefined;
|
||||
path?: string | undefined;
|
||||
group?: string | false | undefined;
|
||||
@@ -146,7 +147,7 @@ const _default: FrontendPlugin<
|
||||
| 'observability'
|
||||
| undefined;
|
||||
routeRef?: RouteRef<AnyRouteRefParams> | undefined;
|
||||
filter?: string | ((entity: Entity) => boolean) | undefined;
|
||||
filter?: EntityPredicate | ((entity: Entity) => boolean) | undefined;
|
||||
};
|
||||
}>;
|
||||
'page:kubernetes': ExtensionDefinition<{
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { EntityCardType } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { EntityPredicate } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { ExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { ExternalRouteRef } from '@backstage/frontend-plugin-api';
|
||||
import { FrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
@@ -22,11 +23,11 @@ const _default: FrontendPlugin<
|
||||
kind: 'entity-card';
|
||||
name: 'group-profile';
|
||||
config: {
|
||||
filter: string | undefined;
|
||||
filter: EntityPredicate | undefined;
|
||||
type: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
configInput: {
|
||||
filter?: string | undefined;
|
||||
filter?: EntityPredicate | undefined;
|
||||
type?: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
output:
|
||||
@@ -59,7 +60,7 @@ const _default: FrontendPlugin<
|
||||
inputs: {};
|
||||
params: {
|
||||
loader: () => Promise<JSX.Element>;
|
||||
filter?: string | ((entity: Entity) => boolean) | undefined;
|
||||
filter?: EntityPredicate | ((entity: Entity) => boolean) | undefined;
|
||||
type?: EntityCardType | undefined;
|
||||
};
|
||||
}>;
|
||||
@@ -67,11 +68,11 @@ const _default: FrontendPlugin<
|
||||
kind: 'entity-card';
|
||||
name: 'members-list';
|
||||
config: {
|
||||
filter: string | undefined;
|
||||
filter: EntityPredicate | undefined;
|
||||
type: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
configInput: {
|
||||
filter?: string | undefined;
|
||||
filter?: EntityPredicate | undefined;
|
||||
type?: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
output:
|
||||
@@ -104,7 +105,7 @@ const _default: FrontendPlugin<
|
||||
inputs: {};
|
||||
params: {
|
||||
loader: () => Promise<JSX.Element>;
|
||||
filter?: string | ((entity: Entity) => boolean) | undefined;
|
||||
filter?: EntityPredicate | ((entity: Entity) => boolean) | undefined;
|
||||
type?: EntityCardType | undefined;
|
||||
};
|
||||
}>;
|
||||
@@ -112,11 +113,11 @@ const _default: FrontendPlugin<
|
||||
kind: 'entity-card';
|
||||
name: 'ownership';
|
||||
config: {
|
||||
filter: string | undefined;
|
||||
filter: EntityPredicate | undefined;
|
||||
type: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
configInput: {
|
||||
filter?: string | undefined;
|
||||
filter?: EntityPredicate | undefined;
|
||||
type?: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
output:
|
||||
@@ -149,7 +150,7 @@ const _default: FrontendPlugin<
|
||||
inputs: {};
|
||||
params: {
|
||||
loader: () => Promise<JSX.Element>;
|
||||
filter?: string | ((entity: Entity) => boolean) | undefined;
|
||||
filter?: EntityPredicate | ((entity: Entity) => boolean) | undefined;
|
||||
type?: EntityCardType | undefined;
|
||||
};
|
||||
}>;
|
||||
@@ -157,11 +158,11 @@ const _default: FrontendPlugin<
|
||||
kind: 'entity-card';
|
||||
name: 'user-profile';
|
||||
config: {
|
||||
filter: string | undefined;
|
||||
filter: EntityPredicate | undefined;
|
||||
type: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
configInput: {
|
||||
filter?: string | undefined;
|
||||
filter?: EntityPredicate | undefined;
|
||||
type?: 'full' | 'info' | 'peek' | undefined;
|
||||
};
|
||||
output:
|
||||
@@ -194,7 +195,7 @@ const _default: FrontendPlugin<
|
||||
inputs: {};
|
||||
params: {
|
||||
loader: () => Promise<JSX.Element>;
|
||||
filter?: string | ((entity: Entity) => boolean) | undefined;
|
||||
filter?: EntityPredicate | ((entity: Entity) => boolean) | undefined;
|
||||
type?: EntityCardType | undefined;
|
||||
};
|
||||
}>;
|
||||
|
||||
@@ -8,6 +8,7 @@ import { AnyExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { AnyRouteRefParams } from '@backstage/frontend-plugin-api';
|
||||
import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { EntityPredicate } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { ExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionInput } from '@backstage/frontend-plugin-api';
|
||||
import { FrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
@@ -89,11 +90,11 @@ const _default: FrontendPlugin<
|
||||
config: {
|
||||
path: string | undefined;
|
||||
title: string | undefined;
|
||||
filter: string | undefined;
|
||||
filter: EntityPredicate | undefined;
|
||||
group: string | false | undefined;
|
||||
};
|
||||
configInput: {
|
||||
filter?: string | undefined;
|
||||
filter?: EntityPredicate | undefined;
|
||||
title?: string | undefined;
|
||||
path?: string | undefined;
|
||||
group?: string | false | undefined;
|
||||
@@ -178,7 +179,7 @@ const _default: FrontendPlugin<
|
||||
| 'observability'
|
||||
| undefined;
|
||||
routeRef?: RouteRef<AnyRouteRefParams> | undefined;
|
||||
filter?: string | ((entity: Entity) => boolean) | undefined;
|
||||
filter?: EntityPredicate | ((entity: Entity) => boolean) | undefined;
|
||||
};
|
||||
}>;
|
||||
'nav-item:techdocs': ExtensionDefinition<{
|
||||
|
||||
Reference in New Issue
Block a user