Add tab for resources
Signed-off-by: Tomas Dabasinskas <tomas@dabasinskas.net>
This commit is contained in:
@@ -116,6 +116,7 @@ import {
|
||||
EntityRollbarContent,
|
||||
isRollbarAvailable,
|
||||
} from '@backstage/plugin-rollbar';
|
||||
import { PuppetDbTab, isPuppetDbAvailable } from '@backstage/plugin-puppetdb';
|
||||
import { EntitySentryContent } from '@backstage/plugin-sentry';
|
||||
import { EntityTechdocsContent } from '@backstage/plugin-techdocs';
|
||||
import { EntityTechInsightsScorecardCard } from '@backstage/plugin-tech-insights';
|
||||
@@ -836,6 +837,35 @@ const domainPage = (
|
||||
</EntityLayoutWrapper>
|
||||
);
|
||||
|
||||
const resourcePage = (
|
||||
<EntityLayoutWrapper>
|
||||
<EntityLayout.Route path="/" title="Overview">
|
||||
<Grid container spacing={3} alignItems="stretch">
|
||||
{entityWarningContent}
|
||||
<Grid item md={6}>
|
||||
<EntityAboutCard variant="gridItem" />
|
||||
</Grid>
|
||||
<Grid item md={6} xs={12}>
|
||||
<EntityCatalogGraphCard variant="gridItem" height={400} />
|
||||
</Grid>
|
||||
<Grid item md={6}>
|
||||
<EntityHasSystemsCard variant="gridItem" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</EntityLayout.Route>
|
||||
<EntityLayout.Route
|
||||
path="/puppetdb"
|
||||
title="Puppet"
|
||||
if={isPuppetDbAvailable}
|
||||
>
|
||||
<PuppetDbTab />
|
||||
</EntityLayout.Route>
|
||||
<EntityLayout.Route path="/todos" title="TODOs">
|
||||
<EntityTodoContent />
|
||||
</EntityLayout.Route>
|
||||
</EntityLayoutWrapper>
|
||||
);
|
||||
|
||||
export const entityPage = (
|
||||
<EntitySwitch>
|
||||
<EntitySwitch.Case if={isKind('component')} children={componentPage} />
|
||||
@@ -844,6 +874,7 @@ export const entityPage = (
|
||||
<EntitySwitch.Case if={isKind('user')} children={userPage} />
|
||||
<EntitySwitch.Case if={isKind('system')} children={systemPage} />
|
||||
<EntitySwitch.Case if={isKind('domain')} children={domainPage} />
|
||||
<EntitySwitch.Case if={isKind('resource')} children={resourcePage} />
|
||||
|
||||
<EntitySwitch.Case>{defaultEntityPage}</EntitySwitch.Case>
|
||||
</EntitySwitch>
|
||||
|
||||
Reference in New Issue
Block a user