-
-
- {host.host.name}
- {host.host.url && (
-
- 🔗
-
- )}
-
-
-
- {(host.host.tags || []).map((x) => (
-
- {x}
-
- ))}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Authorized SSH Keys
-
-
- No authorized SSH keys are found. Sounds weird?}
- >
- {({ length, type, fingerprint, data, comment }) => (
- {
- navigator.clipboard.writeText(data);
- toast('SSH Key is copied to clipboard.');
- }}
- >
- {`${type} (${length}) - ${fingerprint} - ${comment || ''}`}
-
- )}
-
-
-
-
-
-
-
- Docker Containers
-
-
- {host.dockerContainers ? (
- (a.running ? 0 : 1) - (b.running ? 0 : 1) || a.name.localeCompare(b.name)
- ),
- ]}
- emptyContent={Docker service has no containers.}
- >
- {({ id, image, name, running, created }) => (
- 🟢> : <>🔴>}
- endContent={
-
- {created}
-
- }
- >
- {name}
-
- )}
-
- ) : (
- Docker service is not found.
- )}
-
-
-
-
-
- ({ key: x, value: '✅' }))} />
-
- ({ key: x, value: '✅' }))} />
-
-
- );
-}
diff --git a/website/src/components/report/helpers.tsx b/website/src/components/report/helpers.tsx
new file mode 100644
index 0000000..25d0ba9
--- /dev/null
+++ b/website/src/components/report/helpers.tsx
@@ -0,0 +1,12 @@
+export function getCloudIconName(x: string) {
+ switch (x.toLowerCase()) {
+ case 'aws':
+ return 'amazonec2';
+ case 'do':
+ return 'digitalocean';
+ case 'hetzner':
+ return 'hetzner';
+ default:
+ return 'educative';
+ }
+}
diff --git a/website/src/components/app/index.tsx b/website/src/components/report/index.tsx
similarity index 81%
rename from website/src/components/app/index.tsx
rename to website/src/components/report/index.tsx
index 9f02e39..0e27e1f 100644
--- a/website/src/components/app/index.tsx
+++ b/website/src/components/report/index.tsx
@@ -1,12 +1,13 @@
'use client';
+import { LhpPatrolReport, deleteData, loadData } from '@/lib/data';
import { Just, Maybe, Nothing } from 'purify-ts/Maybe';
import { useEffect, useState } from 'react';
-import { App } from './-app';
-import { DataLoader, LhpPatrolReport, deleteData, loadData } from './-data';
-import { BigSpinner } from './-ui';
+import { BigSpinner } from '../helpers';
+import { App } from './App';
+import { DataLoader } from './DataLoader';
-export function AppMain() {
+export function Report() {
const [data, setAppData] = useState