ConusAI vendor 81941888f
This commit is contained in:
@@ -0,0 +1 @@
|
||||
export { AuditPage } from './ui/AuditPage'
|
||||
@@ -0,0 +1,11 @@
|
||||
import { AuditTimeline } from '@/widgets/audit-timeline'
|
||||
|
||||
export function AuditPage() {
|
||||
return (
|
||||
<main>
|
||||
<h1>Audit</h1>
|
||||
<p>Every change this app made, as the platform recorded it.</p>
|
||||
<AuditTimeline />
|
||||
</main>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export { DashboardPage } from './ui/DashboardPage'
|
||||
@@ -0,0 +1,25 @@
|
||||
import { CreateNoteForm } from '@/features/create-note'
|
||||
import { SimulateTrafficButton } from '@/features/simulate-traffic'
|
||||
import { UsageMeter } from '@/widgets/usage-meter'
|
||||
import { Attachments } from '@/widgets/attachments'
|
||||
import { EnableCard } from '@/widgets/enable-card'
|
||||
import { ModulePanel } from '@/widgets/module-panel'
|
||||
import { NoteList } from '@/widgets/note-list'
|
||||
|
||||
export async function DashboardPage({ searchParams }: { searchParams: Promise<{ q?: string }> }) {
|
||||
const { q } = await searchParams
|
||||
return (
|
||||
<main>
|
||||
<h1>ConusAI Showcase</h1>
|
||||
<p>Notes with attachments, audited, observed and metered.</p>
|
||||
<CreateNoteForm />
|
||||
<SimulateTrafficButton />
|
||||
<UsageMeter />
|
||||
<NoteList extra={(noteId) => <Attachments noteId={noteId} />} />
|
||||
<ModulePanel query={q} enable={(service) => <EnableCard service={service} />} />
|
||||
<p>
|
||||
<a href="/audit">Audit timeline</a> · <a href="/platform">Platform</a>
|
||||
</p>
|
||||
</main>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export { PlatformPage } from './ui/PlatformPage'
|
||||
@@ -0,0 +1,28 @@
|
||||
import { platformInfo } from '@/shared/api'
|
||||
import { getEnv, modules } from '@/shared/config'
|
||||
|
||||
/**
|
||||
* The platform's own description, read through the typed API (plan §4.4), and the
|
||||
* optional services this deployment is linked to. The platform has no token-accessible
|
||||
* listing of a project's services (D8), so the linked list is read from the variables
|
||||
* the platform injected at deploy time.
|
||||
*/
|
||||
export async function PlatformPage() {
|
||||
const info = await platformInfo()
|
||||
const linked = modules(getEnv())
|
||||
return (
|
||||
<main>
|
||||
<h1>Platform</h1>
|
||||
<h2>Linked services</h2>
|
||||
<ul>
|
||||
{(Object.keys(linked) as Array<keyof typeof linked>).map((name) => (
|
||||
<li key={name}>
|
||||
{name}: {linked[name] ? 'linked' : 'not linked'}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
<h2>Description</h2>
|
||||
<pre>{JSON.stringify(info, null, 2)}</pre>
|
||||
</main>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user