feat: better deploys page and single deploy page
parent
68283207bb
commit
6ee977d8c6
@ -0,0 +1,31 @@
|
|||||||
|
---
|
||||||
|
import { Deploy } from '@client/Deploy'
|
||||||
|
import { Value } from '@client/Inspect'
|
||||||
|
|
||||||
|
import { loadConfig } from '@/config'
|
||||||
|
import Layout from '@layouts/Layout.astro'
|
||||||
|
import { createUrlQuery } from '@/lib/utils'
|
||||||
|
|
||||||
|
const { name } = Astro.params
|
||||||
|
|
||||||
|
const { deploys } = await loadConfig()
|
||||||
|
const deploy = deploys.find(d => d.name === name)
|
||||||
|
|
||||||
|
if (!deploy) {
|
||||||
|
return Astro.redirect(
|
||||||
|
createUrlQuery('/error', {
|
||||||
|
message: `No deploy with name "${name}"`,
|
||||||
|
previous: `/deploys`,
|
||||||
|
})
|
||||||
|
)
|
||||||
|
}
|
||||||
|
---
|
||||||
|
|
||||||
|
<Layout title={`${name} | Deploy | phCD`}>
|
||||||
|
<h1>
|
||||||
|
<div class="kind">Deploy</div>
|
||||||
|
<div class="title">{name}</div>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<Value value={deploy} borderless />
|
||||||
|
</Layout>
|
Loading…
Reference in New Issue