+
{children}
diff --git a/dashboard/src/app/(inside)/page.tsx b/dashboard/src/app/(inside)/page.tsx
index 604a7e2..cf379ab 100644
--- a/dashboard/src/app/(inside)/page.tsx
+++ b/dashboard/src/app/(inside)/page.tsx
@@ -1,40 +1,49 @@
import { getHydraMetadataApi, getKetoMetadataApi, getKratosMetadataApi } from '@/ory/sdk/server';
-import { MetadataApiReady, StatusCard } from '@/components/status-card';
+import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
+import { Badge } from '@/components/ui/badge';
export default async function RootPage() {
const kratosMetadataApi = await getKratosMetadataApi();
- const kratosVersion = await kratosMetadataApi.getVersion()
+
+ const kratosVersion = await kratosMetadataApi
+ .getVersion()
.then(res => res.data.version)
- .catch(() => undefined);
- const kratosStatus = await fetch(process.env.ORY_KRATOS_ADMIN_URL + '/health/ready')
- .then((response) => response.json() as MetadataApiReady)
- .catch(() => {
- return { errors: ['No instance running'] } as MetadataApiReady;
- });
+ .catch(() => '');
+
+ const kratosStatusData = await fetch(process.env.ORY_KRATOS_ADMIN_URL + '/health/alive');
+ const kratosStatus = await kratosStatusData.json() as { status: string };
+
+ const kratosDBStatusData = await fetch(process.env.ORY_KRATOS_ADMIN_URL + '/health/ready');
+ const kratosDBStatus = await kratosDBStatusData.json() as { status: string };
const hydraMetadataApi = await getHydraMetadataApi();
- const hydraVersion = await hydraMetadataApi.getVersion()
+
+ const hydraVersion = await hydraMetadataApi
+ .getVersion()
.then(res => res.data.version)
- .catch(() => undefined);
- const hydraStatus = await fetch(process.env.ORY_HYDRA_ADMIN_URL + '/health/ready')
- .then((response) => response.json() as MetadataApiReady)
- .catch(() => {
- return { errors: ['No instance running'] } as MetadataApiReady;
- });
+ .catch(() => '');
+
+ const hydraStatusData = await fetch(process.env.ORY_KRATOS_ADMIN_URL + '/health/alive');
+ const hydraStatus = await hydraStatusData.json() as { status: string };
+
+ const hydraDBStatusData = await fetch(process.env.ORY_KRATOS_ADMIN_URL + '/health/ready');
+ const hydraDBStatus = await hydraDBStatusData.json() as { status: string };
const ketoMetadataApi = await getKetoMetadataApi();
- const ketoVersion = await ketoMetadataApi.getVersion()
- .then(res => res.data.version)
- .catch(() => undefined);
- const ketoStatus = await fetch(process.env.ORY_KETO_ADMIN_URL + '/health/ready')
- .then((response) => response.json() as MetadataApiReady)
- .catch(() => {
- return { errors: ['No instance running'] } as MetadataApiReady;
- });
+ const ketoVersion = await ketoMetadataApi
+ .getVersion()
+ .then(res => res.data.version)
+ .catch(() => '');
+
+ const ketoStatusData = await fetch(process.env.ORY_KETO_ADMIN_URL + '/health/alive');
+ const ketoStatus = await ketoStatusData.json() as { status: string };
+
+ const ketoDBStatusData = await fetch(process.env.ORY_KETO_ADMIN_URL + '/health/ready');
+ const ketoDBStatus = await ketoDBStatusData.json() as { status: string };
return (
@@ -43,25 +52,61 @@ export default async function RootPage() {
See the list of all applications in your stack
-
-
-
-
+
+
+
+ Ory Kratos
+
+
+ Version {kratosVersion}
+
+
+
+
+ Kratos {kratosStatus.status.toUpperCase()}
+
+
+ Database {kratosDBStatus.status.toUpperCase()}
+
+
+
+
+
+
+ Ory Hydra
+
+
+ Version {hydraVersion}
+
+
+
+
+ Hydra {hydraStatus.status.toUpperCase()}
+
+
+ Database {hydraDBStatus.status.toUpperCase()}
+
+
+
+
+
+
+ Ory Keto
+
+
+ Version {ketoVersion}
+
+
+
+
+ Keto {ketoStatus.status.toUpperCase()}
+
+
+ Database {ketoDBStatus.status.toUpperCase()}
+
+
+
+
);
diff --git a/dashboard/src/app/(inside)/relation/page.tsx b/dashboard/src/app/(inside)/relation/page.tsx
deleted file mode 100644
index e6754a9..0000000
--- a/dashboard/src/app/(inside)/relation/page.tsx
+++ /dev/null
@@ -1,12 +0,0 @@
-export default async function ListRelationPage() {
- return (
-