diff --git a/plugins/circleci/src/components/Layout/Layout.tsx b/plugins/circleci/src/components/Layout/Layout.tsx
new file mode 100644
index 0000000000..fe82bf90e8
--- /dev/null
+++ b/plugins/circleci/src/components/Layout/Layout.tsx
@@ -0,0 +1,12 @@
+import React from 'react';
+import { Header, Page, pageTheme, HeaderLabel } from '@backstage/core';
+
+export const Layout: React.FC = ({ children }) => (
+
+
+ {children}
+
+);
diff --git a/plugins/circleci/src/components/Layout/index.ts b/plugins/circleci/src/components/Layout/index.ts
new file mode 100644
index 0000000000..9877e7f4ae
--- /dev/null
+++ b/plugins/circleci/src/components/Layout/index.ts
@@ -0,0 +1 @@
+export * from './Layout';
diff --git a/plugins/circleci/src/pages/BuildsPage/BuildsPage.tsx b/plugins/circleci/src/pages/BuildsPage/BuildsPage.tsx
index cb8b3500ef..98e634d4c0 100644
--- a/plugins/circleci/src/pages/BuildsPage/BuildsPage.tsx
+++ b/plugins/circleci/src/pages/BuildsPage/BuildsPage.tsx
@@ -9,25 +9,28 @@ import {
import { Button, Grid } from '@material-ui/core';
import { CircleCIFetch } from 'components/CircleCIFetch';
import { Settings as SettingsIcon } from '@material-ui/icons';
+import { Layout } from 'components/Layout';
export const BuildsPage: FC<{}> = () => (
-
-
- }
- >
- Settings
-
- A description of your plugin goes here.
-
-
-
-
-
-
+
+
+
+ }
+ >
+ Settings
+
+ A description of your plugin goes here.
+
+
+
+
+
+
+
-
-
+
+
);
diff --git a/plugins/circleci/src/pages/CircleCIPage/CircleCIPage.tsx b/plugins/circleci/src/pages/CircleCIPage/CircleCIPage.tsx
deleted file mode 100644
index fe0ef0f1ce..0000000000
--- a/plugins/circleci/src/pages/CircleCIPage/CircleCIPage.tsx
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2020 Spotify AB
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import React, { FC } from 'react';
-import { Route } from 'react-router';
-import {
- Header,
- Page,
- pageTheme,
- HeaderLabel,
-} from '@backstage/core';
-import { SettingsPage } from '../SettingsPage';
-import { BuildsPage } from '../BuildsPage';
-import { DetailedViewPage } from '../DetailedViewPage';
-export const CircleCIPage: FC<{}> = () => {
- return (
- <>
-
-
-
-
-
-
- >
- );
-};
-
-export default CircleCIPage;
diff --git a/plugins/circleci/src/pages/CircleCIPage/index.ts b/plugins/circleci/src/pages/CircleCIPage/index.ts
deleted file mode 100644
index 188ed6d61f..0000000000
--- a/plugins/circleci/src/pages/CircleCIPage/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export { CircleCIPage } from './CircleCIPage';
diff --git a/plugins/circleci/src/pages/DetailedViewPage/DetailedViewPage.tsx b/plugins/circleci/src/pages/DetailedViewPage/DetailedViewPage.tsx
index 53fe2fea3e..3d5d7b575b 100644
--- a/plugins/circleci/src/pages/DetailedViewPage/DetailedViewPage.tsx
+++ b/plugins/circleci/src/pages/DetailedViewPage/DetailedViewPage.tsx
@@ -6,6 +6,7 @@ import { BuildWithSteps, BuildStepAction } from 'circleci-api';
import { circleCIApiRef } from 'api';
import { useParams } from 'react-router-dom';
import { ActionOutput } from '../../components/ActionOutput/ActionOutput';
+import { Layout } from 'components/Layout';
export const DetailedViewPage: FC<{}> = () => {
let { buildId = '' } = useParams();
@@ -30,20 +31,22 @@ export const DetailedViewPage: FC<{}> = () => {
getBuildAsync();
}, [authed, buildId]);
return (
-
-
- {!api.authed ? (
- Not authenticated
- ) : (
-
-
-
-
-
+
+
+
+ {!api.authed ? (
+ Not authenticated
+ ) : (
+
+
+
+
+
+
-
- )}
-
+ )}
+
+
);
};
@@ -53,16 +56,23 @@ const BuildsList: FC<{ build: BuildWithSteps | null }> = ({ build }) => (
build.steps &&
build.steps.map(
({ name, actions }: { name: string; actions: BuildStepAction[] }) => (
-
+
),
)}
);
-const ActionsList: FC<{ actions: BuildStepAction[], name: string }> = ({ actions, name }) => (
+const ActionsList: FC<{ actions: BuildStepAction[]; name: string }> = ({
+ actions,
+ name,
+}) => (
{actions.map((action: BuildStepAction) => (
-
+
))}
);
diff --git a/plugins/circleci/src/pages/SettingsPage/SettingsPage.tsx b/plugins/circleci/src/pages/SettingsPage/SettingsPage.tsx
index 95e2c86662..af380509d1 100644
--- a/plugins/circleci/src/pages/SettingsPage/SettingsPage.tsx
+++ b/plugins/circleci/src/pages/SettingsPage/SettingsPage.tsx
@@ -4,14 +4,13 @@ import { circleCIApiRef } from 'api';
import {
InfoCard,
useApi,
- Page,
- pageTheme,
Content,
ContentHeader,
SupportButton,
} from '@backstage/core';
import { ProjectInput } from 'components/ProjectInput/ProjectInput';
import { Link as RouterLink } from 'react-router-dom';
+import { Layout } from 'components/Layout';
export const SettingsPage = () => {
const api = useApi(circleCIApiRef);
@@ -27,7 +26,7 @@ export const SettingsPage = () => {
}, []);
return (
-
+
A description of your plugin goes here.
-
+
@@ -84,6 +83,6 @@ export const SettingsPage = () => {
-
+
);
};
diff --git a/plugins/circleci/src/plugin.ts b/plugins/circleci/src/plugin.ts
index 7e96bf5e0d..11d215f30f 100644
--- a/plugins/circleci/src/plugin.ts
+++ b/plugins/circleci/src/plugin.ts
@@ -14,13 +14,15 @@
* limitations under the License.
*/
import { createPlugin } from '@backstage/core';
-import { CircleCIPage } from './pages/CircleCIPage';
+import { BuildsPage } from './pages/BuildsPage';
import { SettingsPage } from './pages/SettingsPage';
+import { DetailedViewPage } from './pages/DetailedViewPage';
export const plugin = createPlugin({
id: 'circleci',
register({ router }) {
- router.registerRoute('/circleci', CircleCIPage);
+ router.registerRoute('/circleci', BuildsPage);
+ router.registerRoute('/circleci/build/:buildId', DetailedViewPage);
router.registerRoute('/circleci/settings', SettingsPage);
},
});