ConusAI vendor 81941888f
This commit is contained in:
@@ -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