docs: plugin integration into catalog

This commit is contained in:
Ivan Shmidt
2020-08-31 23:18:06 +02:00
parent e57798cd88
commit 713060d1f3
8 changed files with 154 additions and 27 deletions
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { GitHubActionsPage } from '@backstage/plugin-github-actions';
import { Router as GitHubActionsRouter } from '@backstage/plugin-github-actions';
import React from 'react';
import {
EntityPageLayout,
@@ -22,7 +22,7 @@ import {
} from '@backstage/plugin-catalog';
import { Entity } from '@backstage/catalog-model';
export const OverviewPage = ({ entity }: { entity: Entity }) => (
const OverviewPage = ({ entity }: { entity: Entity }) => (
<EntityMetadataCard entity={entity} />
);
@@ -36,12 +36,7 @@ const ServiceEntityPage = ({ entity }: { entity: Entity }) => (
<EntityPageLayout.Content
path="/ci-cd/*"
title="CI/CD"
element={<GitHubActionsPage entity={entity} />}
/>
<EntityPageLayout.Content
path="/docs/*"
title="Documentation"
element={<div>Much docs, such wow ({entity.metadata.name})🐶</div>}
element={<GitHubActionsRouter entity={entity} />}
/>
</EntityPageLayout>
);
@@ -56,12 +51,7 @@ const WebsiteEntityPage = ({ entity }: { entity: Entity }) => (
<EntityPageLayout.Content
path="/ci-cd/*"
title="CI/CD"
element={<GitHubActionsPage entity={entity} />}
/>
<EntityPageLayout.Content
path="/docs/*"
title="Documentation"
element={<div>Much docs, such wow ({entity.metadata.name})🐶</div>}
element={<GitHubActionsRouter entity={entity} />}
/>
</EntityPageLayout>
);
@@ -69,7 +59,7 @@ const WebsiteEntityPage = ({ entity }: { entity: Entity }) => (
const DefaultEntityPage = ({ entity }: { entity: Entity }) => (
<EntityPageLayout>
<EntityPageLayout.Content
path="*"
path="/*"
title="Overview"
element={<OverviewPage entity={entity} />}
/>