@samyx/preview-stacks-ui 0.4.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{ActionButton.vue_vue_type_script_setup_true_lang-zTFy3C1L.js → ActionButton.vue_vue_type_script_setup_true_lang-B1iO-Hbs.js} +2 -2
- package/dist/assets/{ActionButton.vue_vue_type_script_setup_true_lang-zTFy3C1L.js.map → ActionButton.vue_vue_type_script_setup_true_lang-B1iO-Hbs.js.map} +1 -1
- package/dist/assets/{AxesTab-ulz5gFHt.js → AxesTab-Cxy76M1f.js} +2 -2
- package/dist/assets/{AxesTab-ulz5gFHt.js.map → AxesTab-Cxy76M1f.js.map} +1 -1
- package/dist/assets/{ConfigTab-BQBwybc7.js → ConfigTab-ezI-u-MN.js} +2 -2
- package/dist/assets/{ConfigTab-BQBwybc7.js.map → ConfigTab-ezI-u-MN.js.map} +1 -1
- package/dist/assets/{DangerTab-DJw6jFIi.js → DangerTab-Cnr_8-Ba.js} +2 -2
- package/dist/assets/{DangerTab-DJw6jFIi.js.map → DangerTab-Cnr_8-Ba.js.map} +1 -1
- package/dist/assets/{DashboardView-z0IrTMvv.js → DashboardView-Dgqzqr0u.js} +2 -2
- package/dist/assets/{DashboardView-z0IrTMvv.js.map → DashboardView-Dgqzqr0u.js.map} +1 -1
- package/dist/assets/DeploymentDetailView-CzNOnaAb.js +2 -0
- package/dist/assets/DeploymentDetailView-CzNOnaAb.js.map +1 -0
- package/dist/assets/{DeploymentsView-vzkuxfYA.js → DeploymentsView-CDNBJ7JQ.js} +2 -2
- package/dist/assets/{DeploymentsView-vzkuxfYA.js.map → DeploymentsView-CDNBJ7JQ.js.map} +1 -1
- package/dist/assets/{ErrorNote.vue_vue_type_script_setup_true_lang-pc4tgtPS.js → ErrorNote.vue_vue_type_script_setup_true_lang-BJpi4S3s.js} +2 -2
- package/dist/assets/{ErrorNote.vue_vue_type_script_setup_true_lang-pc4tgtPS.js.map → ErrorNote.vue_vue_type_script_setup_true_lang-BJpi4S3s.js.map} +1 -1
- package/dist/assets/{JobDetailView-CWmRMQCy.js → JobDetailView-DB6cP2ka.js} +2 -2
- package/dist/assets/{JobDetailView-CWmRMQCy.js.map → JobDetailView-DB6cP2ka.js.map} +1 -1
- package/dist/assets/{JobsView-B7w8_fns.js → JobsView-DeAdOUVq.js} +2 -2
- package/dist/assets/{JobsView-B7w8_fns.js.map → JobsView-DeAdOUVq.js.map} +1 -1
- package/dist/assets/LogsTab-BHYDWsWb.js +4 -0
- package/dist/assets/LogsTab-BHYDWsWb.js.map +1 -0
- package/dist/assets/{NotFoundView-CodRC_TG.js → NotFoundView-ROlvmBTU.js} +2 -2
- package/dist/assets/{NotFoundView-CodRC_TG.js.map → NotFoundView-ROlvmBTU.js.map} +1 -1
- package/dist/assets/OverviewTab-LKcYN5mk.js +2 -0
- package/dist/assets/OverviewTab-LKcYN5mk.js.map +1 -0
- package/dist/assets/RegistriesView-Bvnq_VSn.js +2 -0
- package/dist/assets/RegistriesView-Bvnq_VSn.js.map +1 -0
- package/dist/assets/{RequiresTab-BngG8IrC.js → RequiresTab-BeZeFQdv.js} +2 -2
- package/dist/assets/{RequiresTab-BngG8IrC.js.map → RequiresTab-BeZeFQdv.js.map} +1 -1
- package/dist/assets/RoutingView-BjBTNG-z.js +9 -0
- package/dist/assets/RoutingView-BjBTNG-z.js.map +1 -0
- package/dist/assets/RuntimeTab-CWjyUEnD.js +2 -0
- package/dist/assets/RuntimeTab-CWjyUEnD.js.map +1 -0
- package/dist/assets/{SettingsView-Xfi1eGZO.js → SettingsView-D_roVhhz.js} +2 -2
- package/dist/assets/{SettingsView-Xfi1eGZO.js.map → SettingsView-D_roVhhz.js.map} +1 -1
- package/dist/assets/{SkeletonList.vue_vue_type_script_setup_true_lang-nMOrcNBi.js → SkeletonList.vue_vue_type_script_setup_true_lang-B4p28Paq.js} +2 -2
- package/dist/assets/{SkeletonList.vue_vue_type_script_setup_true_lang-nMOrcNBi.js.map → SkeletonList.vue_vue_type_script_setup_true_lang-B4p28Paq.js.map} +1 -1
- package/dist/assets/{SpecDetailView-bw4Xzo2x.js → SpecDetailView-CDXuYT7k.js} +2 -2
- package/dist/assets/{SpecDetailView-bw4Xzo2x.js.map → SpecDetailView-CDXuYT7k.js.map} +1 -1
- package/dist/assets/{SpecsView-DZWFViN5.js → SpecsView-Bib418qu.js} +2 -2
- package/dist/assets/{SpecsView-DZWFViN5.js.map → SpecsView-Bib418qu.js.map} +1 -1
- package/dist/assets/{StateBadge.vue_vue_type_script_setup_true_lang-FqyOZ8sk.js → StateBadge.vue_vue_type_script_setup_true_lang-BBoSnS4z.js} +2 -2
- package/dist/assets/{StateBadge.vue_vue_type_script_setup_true_lang-FqyOZ8sk.js.map → StateBadge.vue_vue_type_script_setup_true_lang-BBoSnS4z.js.map} +1 -1
- package/dist/assets/SubmitView-DoVltkUx.js +45 -0
- package/dist/assets/SubmitView-DoVltkUx.js.map +1 -0
- package/dist/assets/{VarEditor.vue_vue_type_script_setup_true_lang-BNRC1yg9.js → VarEditor.vue_vue_type_script_setup_true_lang-CjFu7uoM.js} +2 -2
- package/dist/assets/{VarEditor.vue_vue_type_script_setup_true_lang-BNRC1yg9.js.map → VarEditor.vue_vue_type_script_setup_true_lang-CjFu7uoM.js.map} +1 -1
- package/dist/assets/{index-CrxqzmXu.js → index-B4C7uKN0.js} +27 -22
- package/dist/assets/index-B4C7uKN0.js.map +1 -0
- package/dist/assets/{useDeployment-BB9Fq2IS.js → useDeployment-DKKVYXcr.js} +2 -2
- package/dist/assets/{useDeployment-BB9Fq2IS.js.map → useDeployment-DKKVYXcr.js.map} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/DeploymentDetailView-B6dRosS8.js +0 -2
- package/dist/assets/DeploymentDetailView-B6dRosS8.js.map +0 -1
- package/dist/assets/LogsTab-BR9QaUgo.js +0 -4
- package/dist/assets/LogsTab-BR9QaUgo.js.map +0 -1
- package/dist/assets/OverviewTab-Bcc1S9BV.js +0 -2
- package/dist/assets/OverviewTab-Bcc1S9BV.js.map +0 -1
- package/dist/assets/RoutingView-CTPhqDby.js +0 -9
- package/dist/assets/RoutingView-CTPhqDby.js.map +0 -1
- package/dist/assets/SubmitView-Cod9su4V.js +0 -45
- package/dist/assets/SubmitView-Cod9su4V.js.map +0 -1
- package/dist/assets/index-CrxqzmXu.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{L as n,m as i,k as d,p as l,G as p,M as c}from"./index-
|
|
2
|
-
//# sourceMappingURL=useDeployment-
|
|
1
|
+
import{L as n,m as i,k as d,p as l,G as p,M as c}from"./index-B4C7uKN0.js";import{w as u,r as y}from"./useVars-VN9gYdR6.js";const e=n({id:"",detail:null,error:"",loading:!1,vars:[]}),f=i(()=>p(e.vars)),k=i(()=>c(e.id)),b=i(()=>{var a;return((a=e.detail)==null?void 0:a.kind)==="shared"}),h=i(()=>{var a;return(((a=e.detail)==null?void 0:a.axes)??[]).filter(s=>!s.verifiable).map(s=>s.name)});async function t(){const a=e.id;e.loading=!0;const s=await d.get(`/api/deployments/${encodeURIComponent(a)}${f.value}`);if(e.id!==a)return;if(e.loading=!1,!s.ok){e.detail=null,e.error=l(s,`GET /api/deployments/${a}`);return}e.error="";const r=s.body;e.detail={id:r.id??a,kind:r.kind==="shared"?"shared":"isolated",createdAt:r.createdAt,updatedAt:r.updatedAt,stack:typeof r.stack=="string"?r.stack:"",busy:r.busy??null,compose:r.compose?{file:r.compose.file??"?",profiles:r.compose.profiles??[],overlays:r.compose.overlays??[]}:null,requires:Array.isArray(r.requires)?r.requires:[],axes:(Array.isArray(r.axes)?r.axes:[]).map(o=>({name:o.name,hooks:Array.isArray(o.hooks)?o.hooks:[],verifiable:o.verifiable??(Array.isArray(o.hooks)&&o.hooks.includes("assert_gone"))})),env:Array.isArray(r.env)?r.env:[]}}function g(a){e.id===a&&(e.detail||e.error)||(e.id=a,e.detail=null,e.error="",e.vars=y(a),t())}function m(){u(e.id,e.vars)}function x(){m(),t()}export{x as a,e as d,b as i,g as o,m as p,k as r,h as u,f as v};
|
|
2
|
+
//# sourceMappingURL=useDeployment-DKKVYXcr.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDeployment-
|
|
1
|
+
{"version":3,"file":"useDeployment-DKKVYXcr.js","sources":["../../src/composables/useDeployment.ts"],"sourcesContent":["/**\n * The deployment currently open in the detail view.\n *\n * A module singleton rather than provide/inject, because the six tabs are CHILD ROUTES: they are\n * siblings of each other and are mounted and unmounted independently, so passing the loaded\n * deployment down as a prop would mean re-fetching it on every tab change. Switching tabs must not\n * re-fetch or blank the panel — only opening a DIFFERENT deployment does.\n *\n * `vars` here are REQUEST-TIME variables, sent as `?query` on every route that resolves this\n * deployment. See `useVars.ts` for why they matter and what they can get wrong.\n */\n\nimport { computed, reactive } from 'vue';\nimport { api, problem, query } from '../api/client';\nimport type { Deployment, VarPair } from '../api/types';\nimport { readVars, writeVars } from './useVars';\nimport { rowFor } from './useControlPlane';\n\nexport const dep = reactive({\n id: '',\n detail: null as Deployment | null,\n /** The resolve failure, verbatim. It is a 400 that NAMES the missing variable. */\n error: '',\n loading: false,\n vars: [] as VarPair[],\n});\n\nexport const varsQuery = computed(() => query(dep.vars));\n\n/** The list row, which is the only place the server exposes stored `vars` and `specName` today. */\nexport const row = computed(() => rowFor(dep.id));\n\nexport const isShared = computed(() => dep.detail?.kind === 'shared');\n\nexport const unverifiableAxes = computed(() =>\n (dep.detail?.axes ?? []).filter((a) => !a.verifiable).map((a) => a.name),\n);\n\nexport async function loadDetail(): Promise<void> {\n const id = dep.id;\n dep.loading = true;\n const r = await api.get<Deployment>(`/api/deployments/${encodeURIComponent(id)}${varsQuery.value}`);\n // Navigated to another deployment while this was in flight: drop the answer rather than render\n // one deployment's spec under another's id.\n if (dep.id !== id) return;\n dep.loading = false;\n\n if (!r.ok) {\n dep.detail = null;\n dep.error = problem(r, `GET /api/deployments/${id}`);\n return;\n }\n dep.error = '';\n const b = r.body;\n dep.detail = {\n id: b.id ?? id,\n kind: b.kind === 'shared' ? 'shared' : 'isolated',\n createdAt: b.createdAt,\n updatedAt: b.updatedAt,\n stack: typeof b.stack === 'string' ? b.stack : '',\n busy: b.busy ?? null,\n compose: b.compose\n ? {\n file: b.compose.file ?? '?',\n profiles: b.compose.profiles ?? [],\n overlays: b.compose.overlays ?? [],\n }\n : null,\n requires: Array.isArray(b.requires) ? b.requires : [],\n axes: (Array.isArray(b.axes) ? b.axes : []).map((a) => ({\n name: a.name,\n hooks: Array.isArray(a.hooks) ? a.hooks : [],\n // Derive it if an older build omits the field. Defaulting to `false` would claim an axis is\n // unverifiable when it may define a perfectly good `assert_gone`.\n verifiable: a.verifiable ?? (Array.isArray(a.hooks) && a.hooks.includes('assert_gone')),\n })),\n env: Array.isArray(b.env) ? b.env : [],\n };\n}\n\n/** Point the singleton at a deployment. Resets everything a stale id could leak into the new one. */\nexport function openDeployment(id: string): void {\n if (dep.id === id && (dep.detail || dep.error)) return; // a tab change, not a navigation\n dep.id = id;\n dep.detail = null;\n dep.error = '';\n dep.vars = readVars(id);\n void loadDetail();\n}\n\nexport function persistVars(): void {\n writeVars(dep.id, dep.vars);\n}\n\nexport function applyVars(): void {\n persistVars();\n void loadDetail();\n}\n"],"names":["dep","reactive","varsQuery","computed","query","row","rowFor","isShared","_a","unverifiableAxes","a","loadDetail","id","r","api","problem","b","openDeployment","readVars","persistVars","writeVars","applyVars"],"mappings":"4HAkBO,MAAMA,EAAMC,EAAS,CAC1B,GAAI,GACJ,OAAQ,KAER,MAAO,GACP,QAAS,GACT,KAAM,CAAA,CACR,CAAC,EAEYC,EAAYC,EAAS,IAAMC,EAAMJ,EAAI,IAAI,CAAC,EAG1CK,EAAMF,EAAS,IAAMG,EAAON,EAAI,EAAE,CAAC,EAEnCO,EAAWJ,EAAS,IAAA,OAAM,QAAAK,EAAAR,EAAI,SAAJ,YAAAQ,EAAY,QAAS,SAAQ,EAEvD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E,GAAG,EAAIA,EAAE,IAAM,CAAA,CAAC,CAEzC,CAGO,SAASC,EAAeL,EAAkB,CAC3CZ,EAAI,KAAOY,IAAOZ,EAAI,QAAUA,EAAI,SACxCA,EAAI,GAAKY,EACTZ,EAAI,OAAS,KACbA,EAAI,MAAQ,GACZA,EAAI,KAAOkB,EAASN,CAAE,EACjBD,EAAA,EACP,CAEO,SAASQ,GAAoB,CAClCC,EAAUpB,EAAI,GAAIA,EAAI,IAAI,CAC5B,CAEO,SAASqB,GAAkB,CAChCF,EAAA,EACKR,EAAA,CACP"}
|
package/dist/index.html
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
/* private mode: fall through to the OS preference */
|
|
25
25
|
}
|
|
26
26
|
</script>
|
|
27
|
-
<script type="module" crossorigin src="/assets/index-
|
|
27
|
+
<script type="module" crossorigin src="/assets/index-B4C7uKN0.js"></script>
|
|
28
28
|
<link rel="stylesheet" crossorigin href="/assets/index-Ca3L5StC.css">
|
|
29
29
|
</head>
|
|
30
30
|
<body>
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{d as x,B as k,c as l,a as t,f as r,w as i,t as p,b as s,e as a,v as R,g as u,F as D,r as V,h as w,_,n as c,o,T as B,C as $,D as A}from"./index-CrxqzmXu.js";import{d as n,i as I,o as L}from"./useDeployment-BB9Fq2IS.js";import{_ as N}from"./ErrorNote.vue_vue_type_script_setup_true_lang-pc4tgtPS.js";import"./useVars-VN9gYdR6.js";const S={class:"page-head"},T={class:"mute",style:{"font-size":"var(--t-sm)"}},q={style:{"font-size":"var(--t-xl)"}},z={class:"sub"},U={key:0},F={key:1},E={key:2},O={key:1,class:"badge busy"},j={class:"tabs","aria-label":"Deployment sections"},G={key:1,class:"hint"},H={key:2,class:"hint",style:{"margin-bottom":"var(--s4)"}},Q=x({__name:"DeploymentDetailView",props:{id:{}},setup(y){const v=y,b=$(),h=[{to:"overview",label:"Overview"},{to:"config",label:"Config & variables"},{to:"axes",label:"Axes"},{to:"requires",label:"Requires"},{to:"logs",label:"Logs"},{to:"danger",label:"Danger"}];return k(()=>v.id,m=>L(m),{immediate:!0}),k(()=>n.error,m=>{m&&b.currentRoute.value.name==="d.overview"&&b.replace(`/deployments/${encodeURIComponent(v.id)}/config`)}),(m,e)=>{var g;const f=c("RouterLink"),C=c("RouterView");return o(),l("div",null,[t("div",S,[t("div",null,[t("div",T,[r(f,{to:"/deployments"},{default:i(()=>[...e[0]||(e[0]=[a("← deployments",-1)])]),_:1})]),t("h1",q,p(y.id),1),t("div",z,[s(n).detail?(o(),l("span",U,[e[1]||(e[1]=a(" stack ",-1)),t("b",null,p(s(n).detail.stack),1)])):s(n).error?(o(),l("span",F,"unresolved")):(o(),l("span",E,"loading…"))])]),e[3]||(e[3]=t("span",{class:"grow"},null,-1)),s(n).detail?(o(),l("span",{key:0,class:R(["badge",s(n).detail.kind])},p(s(n).detail.kind),3)):u("",!0),((g=s(n).detail)==null?void 0:g.busy)===!0?(o(),l("span",O,[...e[2]||(e[2]=[t("span",{class:"dot pulse"},null,-1),a("busy",-1)])])):u("",!0)]),t("nav",j,[(o(),l(D,null,V(h,d=>r(f,{key:d.to,to:`/deployments/${encodeURIComponent(y.id)}/${d.to}`},{default:i(()=>[a(p(d.label),1)]),_:2},1032,["to"])),64))]),s(n).error?(o(),w(N,{key:0,text:s(n).error,title:"Could not resolve this deployment."},null,8,["text"])):u("",!0),s(n).error?(o(),l("p",G,[e[5]||(e[5]=a(" If that message names a variable, add it under ",-1)),e[6]||(e[6]=t("b",null,"Config & variables",-1)),e[7]||(e[7]=a(" and press ",-1)),e[8]||(e[8]=t("b",null,"Apply & reload",-1)),e[9]||(e[9]=a(". ",-1)),r(_,{label:"why the rest of the page is unavailable"},{default:i(()=>[...e[4]||(e[4]=[a(" Until the spec resolves there is no stack name, and every action on this deployment needs one. ",-1)])]),_:1})])):u("",!0),s(I)?(o(),l("p",H,[e[11]||(e[11]=a(" Shared with every preview on this host. ",-1)),r(_,{label:"what a shared deployment is"},{default:i(()=>[...e[10]||(e[10]=[a(" A host singleton that previews borrow — a database, a queue, a registry mirror. It declares no axes, and tearing it down needs an explicit confirmation, because doing so destroys state every other deployment depends on. ",-1)])]),_:1})])):u("",!0),r(C,null,{default:i(({Component:d})=>[r(B,{name:"view",mode:"out-in"},{default:i(()=>[(o(),w(A(d)))]),_:2},1024)]),_:1})])}}});export{Q as default};
|
|
2
|
-
//# sourceMappingURL=DeploymentDetailView-B6dRosS8.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DeploymentDetailView-B6dRosS8.js","sources":["../../src/views/DeploymentDetailView.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * The detail shell: breadcrumb, tabs, and the resolve-failure banner that gates the rest.\n *\n * A deployment whose spec will not resolve is not a dead end — the fix (its variables) lives on\n * the Config tab, so this sends the operator there rather than leaving them in front of an error\n * with no control in reach. Everything else stays unavailable until it resolves, because the\n * server cannot name the stack without the variables, and every action needs the stack name.\n */\nimport { watch } from 'vue';\nimport { useRouter } from 'vue-router';\nimport { dep, isShared, openDeployment } from '../composables/useDeployment';\nimport ErrorNote from '../components/ErrorNote.vue';\nimport InfoHint from '../components/InfoHint.vue';\n\nconst props = defineProps<{ id: string }>();\nconst router = useRouter();\n\nconst TABS = [\n { to: 'overview', label: 'Overview' },\n { to: 'config', label: 'Config & variables' },\n { to: 'axes', label: 'Axes' },\n { to: 'requires', label: 'Requires' },\n { to: 'logs', label: 'Logs' },\n { to: 'danger', label: 'Danger' },\n] as const;\n\nwatch(() => props.id, (id) => openDeployment(id), { immediate: true });\n\n// Land the operator on the editor when the spec will not resolve — but only from the tab that has\n// nothing to show. Sending them away from Logs or Danger mid-read would be its own annoyance.\nwatch(\n () => dep.error,\n (err) => {\n if (err && router.currentRoute.value.name === 'd.overview') {\n void router.replace(`/deployments/${encodeURIComponent(props.id)}/config`);\n }\n },\n);\n</script>\n\n<template>\n <div>\n <div class=\"page-head\">\n <div>\n <div class=\"mute\" style=\"font-size: var(--t-sm)\">\n <RouterLink to=\"/deployments\">← deployments</RouterLink>\n </div>\n <h1 style=\"font-size: var(--t-xl)\">{{ id }}</h1>\n <div class=\"sub\">\n <span v-if=\"dep.detail\">\n stack <b>{{ dep.detail.stack }}</b>\n </span>\n <span v-else-if=\"dep.error\">unresolved</span>\n <span v-else>loading…</span>\n </div>\n </div>\n <span class=\"grow\" />\n <span v-if=\"dep.detail\" class=\"badge\" :class=\"dep.detail.kind\">{{ dep.detail.kind }}</span>\n <span v-if=\"dep.detail?.busy === true\" class=\"badge busy\"><span class=\"dot pulse\" />busy</span>\n </div>\n\n <nav class=\"tabs\" aria-label=\"Deployment sections\">\n <RouterLink\n v-for=\"t in TABS\"\n :key=\"t.to\"\n :to=\"`/deployments/${encodeURIComponent(id)}/${t.to}`\"\n >{{ t.label }}</RouterLink\n >\n </nav>\n\n <ErrorNote v-if=\"dep.error\" :text=\"dep.error\" title=\"Could not resolve this deployment.\">\n </ErrorNote>\n <p v-if=\"dep.error\" class=\"hint\">\n If that message names a variable, add it under <b>Config & variables</b> and press\n <b>Apply & reload</b>.\n <InfoHint label=\"why the rest of the page is unavailable\">\n Until the spec resolves there is no stack name, and every action on this deployment needs one.\n </InfoHint>\n </p>\n\n <p v-if=\"isShared\" class=\"hint\" style=\"margin-bottom: var(--s4)\">\n Shared with every preview on this host.\n <InfoHint label=\"what a shared deployment is\">\n A host singleton that previews borrow — a database, a queue, a registry mirror. It declares no\n axes, and tearing it down needs an explicit confirmation, because doing so destroys state\n every other deployment depends on.\n </InfoHint>\n </p>\n\n <RouterView v-slot=\"{ Component }\">\n <Transition name=\"view\" mode=\"out-in\">\n <component :is=\"Component\" />\n </Transition>\n </RouterView>\n </div>\n</template>\n"],"names":["props","__props","router","useRouter","TABS","watch","id","openDeployment","dep","err","_createElementBlock","_createElementVNode","_hoisted_1","_hoisted_2","_createVNode","_component_RouterLink","_cache","_hoisted_3","_toDisplayString","_hoisted_4","_unref","_hoisted_5","_openBlock","_hoisted_8","_hoisted_9","_Fragment","_renderList","t","_createTextVNode","_createBlock","ErrorNote","_hoisted_10","InfoHint","isShared","_hoisted_11","_component_RouterView","_withCtx","Component","_Transition","_resolveDynamicComponent"],"mappings":"+sBAeA,MAAMA,EAAQC,EACRC,EAASC,EAAA,EAETC,EAAO,CACX,CAAE,GAAI,WAAY,MAAO,UAAA,EACzB,CAAE,GAAI,SAAU,MAAO,oBAAA,EACvB,CAAE,GAAI,OAAQ,MAAO,MAAA,EACrB,CAAE,GAAI,WAAY,MAAO,UAAA,EACzB,CAAE,GAAI,OAAQ,MAAO,MAAA,EACrB,CAAE,GAAI,SAAU,MAAO,QAAA,CAAS,EAGlC,OAAAC,EAAM,IAAML,EAAM,GAAKM,GAAOC,EAAeD,CAAE,EAAG,CAAE,UAAW,GAAM,EAIrED,EACE,IAAMG,EAAI,MACTC,GAAQ,CACHA,GAAOP,EAAO,aAAa,MAAM,OAAS,cACvCA,EAAO,QAAQ,gBAAgB,mBAAmBF,EAAM,EAAE,CAAC,SAAS,CAE7E,CAAA,qEAKAU,EAqDM,MAAA,KAAA,CApDJC,EAiBM,MAjBNC,EAiBM,CAhBJD,EAYM,MAAA,KAAA,CAXJA,EAEM,MAFNE,EAEM,CADJC,EAAwDC,EAAA,CAA5C,GAAG,gBAAc,WAAC,IAAa,CAAA,GAAAC,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,GAAb,gBAAa,EAAA,CAAA,aAE7CL,EAAgD,KAAhDM,EAAgDC,EAAVjB,EAAA,EAAE,EAAA,CAAA,EACxCU,EAMM,MANNQ,EAMM,CALQC,EAAAZ,CAAA,EAAI,YAAhBE,EAEO,OAAAW,EAAA,eAFiB,UAChB,EAAA,GAAAV,EAA6B,IAAA,KAAAO,EAAvBE,EAAAZ,CAAA,EAAI,OAAO,KAAK,EAAA,CAAA,CAAA,IAEbY,EAAAZ,CAAA,EAAI,OAArBc,IAAAZ,EAA6C,SAAjB,YAAU,IACtCY,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BAGOI,EAAAa,CAAA,GAATX,IAAAZ,EAOI,IAPJwB,EAOI,iBAP6D,4CAE/D,EAAA,GAAApB,EAIWkB,EAAA,CAJD,MAAM,+BAA6B,WAAC,IAI9C,CAAA,GAAAhB,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAA,GAJ8C,gOAI9C,EAAA,CAAA,uBAGFF,EAIaqB,EAAA,KAAA,CAHX,QAAAC,EAAA,CAEa,CAHO,UAAAC,KAAS,CAC7BvB,EAEawB,EAAA,CAFD,KAAK,OAAO,KAAK,QAAA,aAC3B,IAA6B,EAA7BhB,IAAAO,EAA6BU,EAAbF,CAAS,CAAA,EAAA"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{d as w,c as t,a as s,x as g,z as _,b as y,e as l,t as h,g as p,F as C,y as F,j as v,k as L,G as U,p as V,m as z,o}from"./index-CrxqzmXu.js";import{d as i}from"./useDeployment-BB9Fq2IS.js";import"./useVars-VN9gYdR6.js";const M={class:"panel"},N={class:"phead"},T={class:"field"},j=["disabled"],B={key:0,class:"progress","aria-hidden":"true"},R={key:0,class:"mute"},S={key:1,class:"mute"},$={key:0,class:"banner failed"},A={key:1,class:"banner warn"},D={key:2,class:"field",style:{"margin-top":"var(--s3)"}},E={key:3,class:"log"},I={key:4,class:"mute",style:{"margin-top":"var(--s3)"}},q={key:5,class:"hint"},K=w({__name:"LogsTab",setup(G){const c=v(200),m=v(""),a=v(null),f=v(""),r=v(!1);async function b(){var n;if(!((n=i.detail)!=null&&n.compose))return;const d=i.id;r.value=!0,f.value="";const e=await L.get(`/api/deployments/${encodeURIComponent(d)}/logs${U(i.vars,{tail:c.value})}`);if(r.value=!1,i.id===d){if(!e.ok){a.value=null,f.value=V(e,"load the logs");return}a.value={...e.body,ok:e.body.ok!==!1,text:e.body.text??""}}}const k=z(()=>{var u;const d=((u=a.value)==null?void 0:u.text)??"",e=m.value.trim().toLowerCase();if(!e)return d;const n=d.split(`
|
|
2
|
-
`).filter(x=>x.toLowerCase().includes(e));return n.length?n.join(`
|
|
3
|
-
`):`(no line matches "${m.value}")`});return(d,e)=>{var n;return o(),t("section",M,[s("div",N,[e[4]||(e[4]=s("h2",{class:"section"},"Compose logs",-1)),e[5]||(e[5]=s("span",{class:"grow"},null,-1)),s("div",T,[e[3]||(e[3]=s("label",{for:"tail",class:"mute",style:{"font-size":"var(--t-xs)"}},"tail",-1)),g(s("select",{id:"tail","onUpdate:modelValue":e[0]||(e[0]=u=>c.value=u)},[...e[2]||(e[2]=[s("option",{value:50},"50",-1),s("option",{value:200},"200",-1),s("option",{value:500},"500",-1),s("option",{value:1e3},"1000",-1),s("option",{value:2e3},"2000",-1)])],512),[[_,c.value,void 0,{number:!0}]])]),s("button",{class:"primary",style:{"align-self":"end"},disabled:r.value||!((n=y(i).detail)!=null&&n.compose),onClick:b},[l(h(r.value?"reading…":"Fetch")+" ",1),r.value?(o(),t("span",B)):p("",!0)],8,j)]),y(i).detail?y(i).detail.compose?(o(),t(C,{key:2},[e[12]||(e[12]=s("p",{class:"hint",style:{margin:"0 0 var(--s3)"}},[l(" Fetched on demand, never polled: an auto-refresh against a chatty stack would hammer the host. "),s("code",null,"tail"),l(" is clamped to 1–2000 by the server. ")],-1)),f.value?(o(),t("div",$,h(f.value),1)):a.value&&!a.value.ok?(o(),t("div",A,[...e[7]||(e[7]=[s("b",null,"compose exited non-zero.",-1),s("p",null," Most often the project does not exist yet (nothing has been brought up), or a profile is missing. Any output it did produce is below. ",-1)])])):p("",!0),a.value?(o(),t("div",D,[e[8]||(e[8]=s("label",{for:"lf",class:"mute",style:{"font-size":"var(--t-xs)"}},"Search in these lines",-1)),g(s("input",{id:"lf","onUpdate:modelValue":e[1]||(e[1]=u=>m.value=u),"data-search":"",type:"search",placeholder:"substring",spellcheck:"false"},null,512),[[F,m.value]])])):p("",!0),a.value?(o(),t("pre",E,h(k.value||"(no output)"),1)):r.value?p("",!0):(o(),t("p",I,[e[9]||(e[9]=l(" Press ",-1)),e[10]||(e[10]=s("b",null,"Fetch",-1)),l(" to read the last "+h(c.value)+" lines. ",1)])),a.value?(o(),t("p",q,[...e[11]||(e[11]=[l(" Redacted on the host before sending: credentials inside URLs, ",-1),s("code",null,"NAME=value",-1),l(" pairs whose name reads as a secret, and this server's own token. ",-1)])])):p("",!0)],64)):(o(),t("p",S,[...e[6]||(e[6]=[l(" This spec has no ",-1),s("code",null,"compose:",-1),l(" section, so there are no compose logs to read. Its axes may still have created resources — check those at their own source. ",-1)])])):(o(),t("p",R,"Unavailable until the spec resolves."))])}}});export{K as default};
|
|
4
|
-
//# sourceMappingURL=LogsTab-BR9QaUgo.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LogsTab-BR9QaUgo.js","sources":["../../src/views/tabs/LogsTab.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Compose logs, fetched ON DEMAND.\n *\n * Never polled: an auto-refresh against a chatty stack would hammer the host through\n * `docker compose logs` — the same host that is running everyone else's previews. The tail is\n * clamped to 1–2000 by the server for the same reason.\n */\nimport { computed, ref } from 'vue';\nimport { api, problem, query } from '../../api/client';\nimport type { LogsResponse } from '../../api/types';\nimport { dep } from '../../composables/useDeployment';\n\nconst tail = ref(200);\nconst filter = ref('');\nconst logs = ref<LogsResponse | null>(null);\nconst error = ref('');\nconst loading = ref(false);\n\nasync function fetchLogs(): Promise<void> {\n if (!dep.detail?.compose) return;\n const id = dep.id;\n loading.value = true;\n error.value = '';\n const r = await api.get<LogsResponse>(\n `/api/deployments/${encodeURIComponent(id)}/logs${query(dep.vars, { tail: tail.value })}`,\n );\n loading.value = false;\n if (dep.id !== id) return; // navigated away mid-flight\n if (!r.ok) {\n logs.value = null;\n error.value = problem(r, 'load the logs');\n return;\n }\n logs.value = { ...r.body, ok: r.body.ok !== false, text: r.body.text ?? '' };\n}\n\n/** Search-in-logs: filter to matching lines rather than highlighting inside a wall of text. */\nconst shown = computed(() => {\n const text = logs.value?.text ?? '';\n const needle = filter.value.trim().toLowerCase();\n if (!needle) return text;\n const lines = text.split('\\n').filter((l) => l.toLowerCase().includes(needle));\n return lines.length ? lines.join('\\n') : `(no line matches \"${filter.value}\")`;\n});\n</script>\n\n<template>\n <section class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"section\">Compose logs</h2>\n <span class=\"grow\" />\n <div class=\"field\">\n <label for=\"tail\" class=\"mute\" style=\"font-size: var(--t-xs)\">tail</label>\n <select id=\"tail\" v-model.number=\"tail\">\n <option :value=\"50\">50</option>\n <option :value=\"200\">200</option>\n <option :value=\"500\">500</option>\n <option :value=\"1000\">1000</option>\n <option :value=\"2000\">2000</option>\n </select>\n </div>\n <button\n class=\"primary\"\n style=\"align-self: end\"\n :disabled=\"loading || !dep.detail?.compose\"\n @click=\"fetchLogs\"\n >\n {{ loading ? 'reading…' : 'Fetch' }}\n <span v-if=\"loading\" class=\"progress\" aria-hidden=\"true\" />\n </button>\n </div>\n\n <p v-if=\"!dep.detail\" class=\"mute\">Unavailable until the spec resolves.</p>\n <!-- Guard on the field rather than calling and interpreting the failure after the fact. -->\n <p v-else-if=\"!dep.detail.compose\" class=\"mute\">\n This spec has no <code>compose:</code> section, so there are no compose logs to read. Its axes\n may still have created resources — check those at their own source.\n </p>\n\n <template v-else>\n <p class=\"hint\" style=\"margin: 0 0 var(--s3)\">\n Fetched on demand, never polled: an auto-refresh against a chatty stack would hammer the\n host. <code>tail</code> is clamped to 1–2000 by the server.\n </p>\n\n <div v-if=\"error\" class=\"banner failed\">{{ error }}</div>\n\n <!--\n `ok: false` means compose exited non-zero. Usually \"no such project\" because the stack was\n never brought up — not a server fault, so it is a note rather than an error.\n -->\n <div v-else-if=\"logs && !logs.ok\" class=\"banner warn\">\n <b>compose exited non-zero.</b>\n <p>\n Most often the project does not exist yet (nothing has been brought up), or a profile is\n missing. Any output it did produce is below.\n </p>\n </div>\n\n <div v-if=\"logs\" class=\"field\" style=\"margin-top: var(--s3)\">\n <label for=\"lf\" class=\"mute\" style=\"font-size: var(--t-xs)\">Search in these lines</label>\n <input id=\"lf\" v-model=\"filter\" data-search type=\"search\" placeholder=\"substring\" spellcheck=\"false\" />\n </div>\n\n <pre v-if=\"logs\" class=\"log\">{{ shown || '(no output)' }}</pre>\n <p v-else-if=\"!loading\" class=\"mute\" style=\"margin-top: var(--s3)\">\n Press <b>Fetch</b> to read the last {{ tail }} lines.\n </p>\n\n <p v-if=\"logs\" class=\"hint\">\n Redacted on the host before sending: credentials inside URLs, <code>NAME=value</code> pairs\n whose name reads as a secret, and this server's own token.\n </p>\n </template>\n </section>\n</template>\n"],"names":["tail","ref","filter","logs","error","loading","fetchLogs","_a","dep","id","r","api","query","problem","shown","computed","text","needle","lines","l","_openBlock","_createElementBlock","_hoisted_1","_createElementVNode","_hoisted_2","_cache","_hoisted_3","$event","_unref","_createTextVNode","_toDisplayString","_hoisted_5","_Fragment","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_7","_hoisted_6"],"mappings":"qoBAaA,MAAMA,EAAOC,EAAI,GAAG,EACdC,EAASD,EAAI,EAAE,EACfE,EAAOF,EAAyB,IAAI,EACpCG,EAAQH,EAAI,EAAE,EACdI,EAAUJ,EAAI,EAAK,EAEzB,eAAeK,GAA2B,OACxC,GAAI,GAACC,EAAAC,EAAI,SAAJ,MAAAD,EAAY,SAAS,OAC1B,MAAME,EAAKD,EAAI,GACfH,EAAQ,MAAQ,GAChBD,EAAM,MAAQ,GACd,MAAMM,EAAI,MAAMC,EAAI,IAClB,oBAAoB,mBAAmBF,CAAE,CAAC,QAAQG,EAAMJ,EAAI,KAAM,CAAE,KAAMR,EAAK,KAAA,CAAO,CAAC,EAAA,EAGzF,GADAK,EAAQ,MAAQ,GACZG,EAAI,KAAOC,EACf,IAAI,CAACC,EAAE,GAAI,CACTP,EAAK,MAAQ,KACbC,EAAM,MAAQS,EAAQH,EAAG,eAAe,EACxC,MACF,CACAP,EAAK,MAAQ,CAAE,GAAGO,EAAE,KAAM,GA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EAAAF,EAAY,SAAT,QAAK,EAAA,KAAI,qBAAkBO,EAAG9B,EAAA,KAAI,EAAG,WAChD,CAAA,CAAA,IAESG,EAAA,OAATiB,IAAAC,EAGI,IAHJiB,EAGI,CAAA,GAAAb,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAA,GAHwB,kEACoC,EAAA,EAAAF,EAAuB,YAAjB,aAAU,EAAA,IAAO,qEAEvF,EAAA,CAAA,sBAtCFH,IAAAC,EAGI,IAHJkB,EAGI,CAAA,GAAAd,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,GAH4C,qBAC7B,EAAA,EAAAF,EAAqB,YAAf,WAAQ,EAAA,IAAO,gIAExC,EAAA,CAAA,WALAF,EAA2E,IAA3EmB,EAAmC,sCAAoC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{d as o,r as f,i as x}from"./useDeployment-BB9Fq2IS.js";import{s as _}from"./useFormat-CKJxQp_i.js";import{_ as T}from"./SkeletonList.vue_vue_type_script_setup_true_lang-nMOrcNBi.js";import{d as C,c as a,a as e,b as t,h as u,w as m,g as r,e as l,f as b,_ as g,t as i,v as A,F as p,r as c,m as N,n as B,o as n}from"./index-CrxqzmXu.js";import"./useVars-VN9gYdR6.js";const R={class:"panel"},$={class:"phead"},z={key:1,class:"mute"},L={key:2,class:"kvlist"},S={class:"k"},V={class:"v mono"},U={class:"v"},q={class:"mute",style:{"margin-left":"8px","font-size":"var(--t-sm)"}},E={key:0},F={class:"v"},H={class:"v mono"},I={key:1},P={class:"v"},j={key:0,class:"mute"},D={key:2},K={class:"k"},O={class:"v"},G={class:"mono"},J={class:"mute",style:{"font-size":"var(--t-sm)"}},M={key:3},Q={class:"v"},W={key:0,class:"mute"},X={class:"v"},Y={class:"v"},Z={class:"v"},ss={class:"v"},ds=C({__name:"OverviewTab",setup(es){const w=N(()=>x.value?"a host singleton previews borrow — no axes, and down is guarded":"one tenant, created and destroyed constantly, expected to leave nothing behind");return(ts,s)=>{var y,v,h;const k=B("RouterLink");return n(),a("section",R,[e("div",$,[s[1]||(s[1]=e("h2",{class:"section"},"Resolved spec",-1)),s[2]||(s[2]=e("span",{class:"grow"},null,-1)),t(o).detail?(n(),u(k,{key:0,to:`/submit/${encodeURIComponent(t(o).id)}`},{default:m(()=>[...s[0]||(s[0]=[l(" Edit spec & compose → ",-1)])]),_:1},8,["to"])):r("",!0)]),!t(o).detail&&!t(o).error?(n(),u(T,{key:0,rows:5})):t(o).detail?(n(),a("ul",L,[e("li",null,[e("span",S,[s[4]||(s[4]=l(" stack ",-1)),b(g,{label:"the difference between id and stack"},{default:m(()=>[...s[3]||(s[3]=[l(" The ",-1),e("b",null,"id",-1),l(" is what you named this deployment. The ",-1),e("b",null,"stack",-1),l(" is what its spec resolved to once the variables were filled in — the compose project name, the hostname label, and ",-1),e("code",null,"$STACK",-1),l(" inside every hook. ",-1)])]),_:1})]),e("span",V,i(t(o).detail.stack||"—"),1)]),e("li",null,[s[5]||(s[5]=e("span",{class:"k"},"kind",-1)),e("span",U,[e("span",{class:A(["badge",t(o).detail.kind])},i(t(o).detail.kind),3),e("span",q,i(w.value),1)])]),(y=t(f))!=null&&y.specName?(n(),a("li",E,[s[7]||(s[7]=e("span",{class:"k"},"spec",-1)),e("span",F,[e("b",null,i(t(f).specName),1),s[6]||(s[6]=e("span",{class:"mute",style:{"font-size":"var(--t-sm)"}}," — stored, and shared with any other deployment using it ",-1))])])):r("",!0),e("li",null,[s[8]||(s[8]=e("span",{class:"k"},"compose file",-1)),e("span",H,i(t(o).detail.compose?t(o).detail.compose.file:"— (no compose section)"),1)]),t(o).detail.compose?(n(),a("li",I,[s[9]||(s[9]=e("span",{class:"k"},"profiles",-1)),e("span",P,[(n(!0),a(p,null,c(t(o).detail.compose.profiles,d=>(n(),a("span",{key:d,class:"badge",style:{"margin-right":"4px"}},i(d),1))),128)),t(o).detail.compose.profiles.length?r("",!0):(n(),a("span",j," none — a bare up starts every service "))])])):r("",!0),(h=(v=t(o).detail.compose)==null?void 0:v.subdomains)!=null&&h.length?(n(),a("li",D,[e("span",K,[s[14]||(s[14]=l(" subdomains ",-1)),b(g,{label:"how wildcard subdomains work"},{default:m(()=>[s[13]||(s[13]=l(" Anything one label under these hosts reaches the same service the bare host does. An exact hostname you route yourself always wins over the wildcard. ",-1)),t(o).detail.compose.subdomains.some(d=>d.depth==="any")?(n(),a(p,{key:0},[s[10]||(s[10]=l(" A route marked ",-1)),s[11]||(s[11]=e("b",null,"any depth",-1)),s[12]||(s[12]=l(" works over HTTP only — no TLS certificate can cover more than one label. ",-1))],64)):r("",!0)]),_:1})]),e("span",O,[(n(!0),a(p,null,c(t(o).detail.compose.subdomains,d=>(n(),a("div",{key:d.profile},[e("span",G,"*."+i(d.host),1),e("span",J,[l(" → "+i(d.profile),1),d.depth==="any"?(n(),a(p,{key:0},[l(" · any depth, HTTP only")],64)):r("",!0)])]))),128))])])):r("",!0),t(o).detail.compose?(n(),a("li",M,[s[15]||(s[15]=e("span",{class:"k"},"overlays",-1)),e("span",Q,[(n(!0),a(p,null,c(t(o).detail.compose.overlays,d=>(n(),a("span",{key:d,class:"mono",style:{"margin-right":"8px"}},i(d),1))),128)),t(o).detail.compose.overlays.length?r("",!0):(n(),a("span",W,"none"))])])):r("",!0),e("li",null,[s[17]||(s[17]=e("span",{class:"k"},"axes",-1)),e("span",X,[l(i(t(o).detail.axes.length)+" ",1),t(o).detail.axes.length?(n(),u(k,{key:0,to:`/deployments/${encodeURIComponent(t(o).id)}/axes`},{default:m(()=>[...s[16]||(s[16]=[l(" view → ",-1)])]),_:1},8,["to"])):r("",!0)])]),e("li",null,[s[18]||(s[18]=e("span",{class:"k"},"requires",-1)),e("span",Y,i(t(o).detail.requires.length),1)]),e("li",null,[s[19]||(s[19]=e("span",{class:"k"},"created",-1)),e("span",Z,i(t(_)(t(o).detail.createdAt)),1)]),e("li",null,[s[20]||(s[20]=e("span",{class:"k"},"updated",-1)),e("span",ss,i(t(_)(t(o).detail.updatedAt)),1)])])):(n(),a("p",z,"Unavailable until the spec resolves."))])}}});export{ds as default};
|
|
2
|
-
//# sourceMappingURL=OverviewTab-Bcc1S9BV.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OverviewTab-Bcc1S9BV.js","sources":["../../src/views/tabs/OverviewTab.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/** The resolved spec, summarised. Read-only — everything that acts lives on Danger. */\nimport { computed } from 'vue';\nimport { dep, isShared, row } from '../../composables/useDeployment';\nimport { stamp } from '../../composables/useFormat';\nimport SkeletonList from '../../components/SkeletonList.vue';\nimport InfoHint from '../../components/InfoHint.vue';\n\nconst kindBlurb = computed(() =>\n isShared.value\n ? 'a host singleton previews borrow — no axes, and down is guarded'\n : 'one tenant, created and destroyed constantly, expected to leave nothing behind',\n);\n</script>\n\n<template>\n <section class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"section\">Resolved spec</h2>\n <span class=\"grow\" />\n <RouterLink v-if=\"dep.detail\" :to=\"`/submit/${encodeURIComponent(dep.id)}`\">\n Edit spec & compose →\n </RouterLink>\n </div>\n\n <SkeletonList v-if=\"!dep.detail && !dep.error\" :rows=\"5\" />\n <p v-else-if=\"!dep.detail\" class=\"mute\">Unavailable until the spec resolves.</p>\n\n <template v-else>\n <ul class=\"kvlist\">\n <li>\n <span class=\"k\">\n stack\n <InfoHint label=\"the difference between id and stack\">\n The <b>id</b> is what you named this deployment. The <b>stack</b> is what its spec\n resolved to once the variables were filled in — the compose project name, the hostname\n label, and <code>$STACK</code> inside every hook.\n </InfoHint>\n </span>\n <span class=\"v mono\">{{ dep.detail.stack || '—' }}</span>\n </li>\n <li>\n <span class=\"k\">kind</span>\n <span class=\"v\">\n <span class=\"badge\" :class=\"dep.detail.kind\">{{ dep.detail.kind }}</span>\n <span class=\"mute\" style=\"margin-left: 8px; font-size: var(--t-sm)\">{{ kindBlurb }}</span>\n </span>\n </li>\n <li v-if=\"row?.specName\">\n <span class=\"k\">spec</span>\n <span class=\"v\">\n <b>{{ row.specName }}</b>\n <span class=\"mute\" style=\"font-size: var(--t-sm)\">\n — stored, and shared with any other deployment using it\n </span>\n </span>\n </li>\n <li>\n <span class=\"k\">compose file</span>\n <span class=\"v mono\">\n {{ dep.detail.compose ? dep.detail.compose.file : '— (no compose section)' }}\n </span>\n </li>\n <li v-if=\"dep.detail.compose\">\n <span class=\"k\">profiles</span>\n <span class=\"v\">\n <span v-for=\"p in dep.detail.compose.profiles\" :key=\"p\" class=\"badge\" style=\"margin-right: 4px\">\n {{ p }}\n </span>\n <span v-if=\"!dep.detail.compose.profiles.length\" class=\"mute\">\n none — a bare up starts every service\n </span>\n </span>\n </li>\n <li v-if=\"dep.detail.compose?.subdomains?.length\">\n <span class=\"k\">\n subdomains\n <InfoHint label=\"how wildcard subdomains work\">\n Anything one label under these hosts reaches the same service the bare host does.\n An exact hostname you route yourself always wins over the wildcard.\n <template v-if=\"dep.detail.compose.subdomains.some((s) => s.depth === 'any')\">\n A route marked <b>any depth</b> works over HTTP only — no TLS certificate can cover\n more than one label.\n </template>\n </InfoHint>\n </span>\n <span class=\"v\">\n <div v-for=\"s in dep.detail.compose.subdomains\" :key=\"s.profile\">\n <span class=\"mono\">*.{{ s.host }}</span>\n <span class=\"mute\" style=\"font-size: var(--t-sm)\">\n → {{ s.profile }}<template v-if=\"s.depth === 'any'\"> · any depth, HTTP only</template>\n </span>\n </div>\n </span>\n </li>\n <li v-if=\"dep.detail.compose\">\n <span class=\"k\">overlays</span>\n <span class=\"v\">\n <span v-for=\"o in dep.detail.compose.overlays\" :key=\"o\" class=\"mono\" style=\"margin-right: 8px\">{{ o }}</span>\n <span v-if=\"!dep.detail.compose.overlays.length\" class=\"mute\">none</span>\n </span>\n </li>\n <li>\n <span class=\"k\">axes</span>\n <span class=\"v\">\n {{ dep.detail.axes.length }}\n <RouterLink v-if=\"dep.detail.axes.length\" :to=\"`/deployments/${encodeURIComponent(dep.id)}/axes`\">\n view →\n </RouterLink>\n </span>\n </li>\n <li>\n <span class=\"k\">requires</span>\n <span class=\"v\">{{ dep.detail.requires.length }}</span>\n </li>\n <li><span class=\"k\">created</span><span class=\"v\">{{ stamp(dep.detail.createdAt) }}</span></li>\n <li><span class=\"k\">updated</span><span class=\"v\">{{ stamp(dep.detail.updatedAt) }}</span></li>\n </ul>\n </template>\n </section>\n</template>\n"],"names":["kindBlurb","computed","isShared","_openBlock","_createElementBlock","_hoisted_1","_createElementVNode","_hoisted_2","_cache","_unref","dep","_createBlock","_component_RouterLink","SkeletonList","_hoisted_4","_hoisted_5","_createVNode","InfoHint","_hoisted_6","_toDisplayString","_hoisted_7","_hoisted_8","row","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_Fragment","_renderList","p","_hoisted_14","_hoisted_15","_hoisted_16","s","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","o","_hoisted_22","_hoisted_23","_createTextVNode","_hoisted_24","_hoisted_25","stamp","_hoisted_26","_hoisted_3"],"mappings":"o5BAQA,MAAMA,EAAYC,EAAS,IACzBC,EAAS,MACL,kEACA,gFAAA,mDAKJ,OAAAC,EAAA,EAAAC,EAuGU,UAvGVC,EAuGU,CAtGRC,EAMM,MANNC,EAMM,CALJC,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAF,EAAsC,KAAA,CAAlC,MAAM,SAAA,EAAU,gBAAa,EAAA,eACjCA,EAAqB,OAAA,CAAf,MAAM,MAAA,EAAM,KAAA,EAAA,GACAG,EAAAC,CAAA,EAAI,YAAtBC,EAEaC,EAAA,OAFkB,GAAE,WAAa,mBAAmBH,EAAAC,CAAA,EAAI,EAAE,CAAA,EAAA,aAAK,IAE5E,CAAA,GAAAF,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,GAF4E,0BAE5E,EAAA,CAAA,gCAGmB,CAAAC,EAAAC,CAAA,EAAI,QAAM,CAAKD,EAAAC,CAAA,EAAI,WAAxCC,EAA2DE,EAAA,OAAX,KAAM,CAAA,IACv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,KAAA,CAFHE,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAF,EAA+B,OAAA,CAAzB,MAAM,GAAA,EAAI,WAAQ,EAAA,GACxBA,EAAuD,OAAvDsC,EAAuDzB,EAApCV,EAAAC,CAAA,EAAI,OAAO,SAAS,MAAM,EAAA,CAAA,CAAA,GAE/CJ,EAA+F,KAAA,KAAA,CAA3FE,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAF,EAA8B,OAAA,CAAxB,MAAM,GAAA,EAAI,UAAO,EAAA,GAAOA,EAAwD,OAAxDuC,EAAwD1B,EAArCV,EAAAqC,CAAA,EAAMrC,EAAAC,CAAA,EAAI,OAAO,SAAS,CAAA,EAAA,CAAA,CAAA,GAC/EJ,EAA+F,KAAA,KAAA,CAA3FE,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAF,EAA8B,OAAA,CAAxB,MAAM,GAAA,EAAI,UAAO,EAAA,GAAOA,EAAwD,OAAxDyC,GAAwD5B,EAArCV,EAAAqC,CAAA,EAAMrC,EAAAC,CAAA,EAAI,OAAO,SAAS,CAAA,EAAA,CAAA,CAAA,WA1FnFN,EAAgF,IAAhF4C,EAAwC,sCAAoC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{d as X,c as a,a as t,e as n,f as y,w as k,_ as z,g as d,h as x,b as T,K as _,t as f,F as I,r as Y,x as L,y as U,j as i,m as M,k as C,p as R,n as Z,H as j,o}from"./index-CrxqzmXu.js";import{s as ee}from"./useFormat-CKJxQp_i.js";import{_ as H}from"./ActionButton.vue_vue_type_script_setup_true_lang-zTFy3C1L.js";import{_ as W}from"./ErrorNote.vue_vue_type_script_setup_true_lang-pc4tgtPS.js";import{_ as G}from"./SkeletonList.vue_vue_type_script_setup_true_lang-nMOrcNBi.js";const te={class:"page-head"},le={class:"sub"},se={class:"banner warn"},oe={key:1,class:"banner failed"},ne={key:2,class:"banner info"},ae={key:3,class:"banner info"},ie={class:"panel"},ue={class:"phead"},re={key:0,class:"mute",style:{"font-size":"var(--t-sm)"}},de={key:1,class:"kvlist"},ve={class:"k"},fe=["onClick"],pe={class:"v mute",style:{"font-size":"var(--t-sm)"}},me={key:2,class:"mute"},ce={key:4,class:"panel"},ye={class:"phead"},ke={class:"section"},he={key:0,class:"badge warn"},be={key:0,class:"field",style:{"max-width":"340px"}},ge={key:2,class:"banner plain"},we={class:"field"},xe={class:"row",style:{"margin-top":"var(--s4)"}},Te={key:0,class:"mute"},_e={class:"field",style:{"max-width":"340px"}},Ce=["for"],Re=["id","placeholder"],$e={class:"row"},Ae=`http:
|
|
2
|
-
middlewares:
|
|
3
|
-
# An example — replace it. Middlewares go UNDER http; at the top level Traefik ignores them.
|
|
4
|
-
ip-allow:
|
|
5
|
-
ipAllowList:
|
|
6
|
-
sourceRange:
|
|
7
|
-
- 203.0.113.0/24
|
|
8
|
-
`,Pe=X({__name:"RoutingView",setup(Ne){const $=i([]),A=i(""),N=i(null),D=i(!1),b=i(""),s=i(null),u=i(""),p=i(""),g=i(!1),S=i(!1),h=i(!1),v=i(""),w=i(""),m=i(null),c=i(""),P=M(()=>s.value!==null&&u.value!==p.value),K=M(()=>!!_.token&&!h.value&&u.value.trim().length>0&&(P.value||s.value===""));async function V(){const l=await C.get("/api/routing");if(D.value=!0,!l.ok){b.value=R(l,"load the routing files");return}b.value="",$.value=l.body.files??[],A.value=l.body.dir??"",N.value=l.body.writable??!1}V();async function q(l){s.value=l,S.value=!0,v.value="",g.value=!1,c.value="";const e=await C.getAuthed(`/api/routing/${encodeURIComponent(l)}`);if(S.value=!1,!e.ok){v.value=R(e,"open this file");return}if(e.body.sourceWithheld){g.value=!0,u.value="",p.value="";return}u.value=e.body.content??"",p.value=u.value}function J(){s.value="",w.value="",u.value=Ae,p.value="",g.value=!1,v.value=""}function E(){s.value=null,u.value="",p.value="",v.value=""}async function F(){const l=s.value===""?w.value.trim():s.value;if(!l){v.value="Give the file a name, ending in .yml";return}h.value=!0,v.value="";const e=await C.put(`/api/routing/${encodeURIComponent(l)}`,{content:u.value});if(h.value=!1,!e.ok){v.value=R(e,"save this file");return}e.body.previous&&(m.value={name:l,content:e.body.previous}),p.value=u.value,s.value=l,j("ok",`Saved ${l}. Traefik reloads within a second or two.`),V()}async function O(){const l=m.value;l&&(u.value=l.content,s.value=l.name,await F(),m.value=null)}async function Q(){const l=s.value;if(!l||c.value!==l)return;const e=await C.del(`/api/routing/${encodeURIComponent(l)}`);if(!e.ok){v.value=R(e,"delete this file");return}e.body.previous&&(m.value={name:l,content:e.body.previous}),j("ok",`Deleted ${l}.`),E(),V()}return(l,e)=>{const B=Z("RouterLink");return o(),a("div",null,[t("div",te,[t("div",null,[e[5]||(e[5]=t("h1",null,"Routing",-1)),t("div",le,[e[4]||(e[4]=n(" Traefik configuration that is not a container label ",-1)),y(z,{label:"what belongs in these files"},{default:k(()=>[...e[3]||(e[3]=[n(" Middleware (basic auth, rate limits, IP allow-lists), TLS options, the catch-all fallback router, and routes to anything running outside compose. Per-PR routers are not here — those are labels in each deployment's own compose file. ",-1)])]),_:1})])]),e[6]||(e[6]=t("span",{class:"grow"},null,-1)),N.value?(o(),a("button",{key:0,class:"btn primary",onClick:J},"New file")):d("",!0)]),b.value?(o(),x(W,{key:0,text:b.value,title:"Could not load the routing files."},null,8,["text"])):d("",!0),t("div",se,[e[11]||(e[11]=t("b",null,"A bad file here affects every preview on this host.",-1)),t("p",null,[e[8]||(e[8]=n(" Traefik reads this directory as a whole: one unparseable file and it logs a parse error for the ",-1)),e[9]||(e[9]=t("em",null,"directory",-1)),e[10]||(e[10]=n(", so the symptom is other routes disappearing. Saves are checked before they are written and land atomically, so a rejected file never reaches Traefik. ",-1)),y(z,{label:"what this page cannot break"},{default:k(()=>[...e[7]||(e[7]=[n(" This page and the API are routed by container labels, not by these files — so no save here can lock you out of the page you would use to undo it. ",-1)])]),_:1})])]),N.value===!1?(o(),a("div",oe,[...e[12]||(e[12]=[t("b",null,"Read-only: the API cannot write to this directory.",-1),t("p",null,[n(" The control stack mounts it into the API from 0.4.0 onward. Re-run "),t("code",null,"pstack init"),n(" on the host to pick up the mount — it is idempotent, and it recreates the control containers. ")],-1)])])):T(_).token?d("",!0):(o(),a("div",ne,[e[16]||(e[16]=t("b",null,"Viewing needs a token too.",-1)),t("p",null,[e[14]||(e[14]=n(" These files hold basic-auth hashes and forward-auth URLs, so their contents are not served unauthenticated. ",-1)),y(B,{to:"/settings"},{default:k(()=>[...e[13]||(e[13]=[n("Add your token",-1)])]),_:1}),e[15]||(e[15]=n(". ",-1))])])),m.value?(o(),a("div",ae,[t("b",null,"Replaced "+f(m.value.name)+".",1),t("p",null,[e[17]||(e[17]=n(" The previous contents are still here for this session. ",-1)),t("button",{class:"btn sm",onClick:O},"Put it back")])])):d("",!0),t("section",ie,[t("div",ue,[e[18]||(e[18]=t("h2",{class:"section"},"Files",-1)),e[19]||(e[19]=t("span",{class:"grow"},null,-1)),A.value?(o(),a("span",re,[t("code",null,f(A.value),1)])):d("",!0)]),D.value?$.value.length?(o(),a("ul",de,[(o(!0),a(I,null,Y($.value,r=>(o(),a("li",{key:r.name},[t("span",ve,[t("button",{class:"ghost sm",onClick:Se=>q(r.name)},f(r.name),9,fe)]),t("span",pe,f(r.size)+" bytes · "+f(T(ee)(r.updatedAt)),1)]))),128))])):(o(),a("p",me," No files yet. Everything is routed by container labels, which is a perfectly good place to be. ")):(o(),x(G,{key:0,rows:3}))]),s.value!==null?(o(),a("section",ce,[t("div",ye,[t("h2",ke,f(s.value===""?"New file":s.value),1),P.value?(o(),a("span",he,"unsaved")):d("",!0),e[20]||(e[20]=t("span",{class:"grow"},null,-1)),t("button",{class:"ghost sm",onClick:E},"Close")]),s.value===""?(o(),a("div",be,[e[21]||(e[21]=t("label",{for:"fname"},"File name",-1)),L(t("input",{id:"fname","onUpdate:modelValue":e[0]||(e[0]=r=>w.value=r),type:"text",placeholder:"middleware.yml",spellcheck:"false",autocomplete:"off"},null,512),[[U,w.value,void 0,{trim:!0}]]),e[22]||(e[22]=t("div",{class:"mute hint"},[n("Lower case, ending in "),t("code",null,".yml"),n(".")],-1))])):d("",!0),S.value?(o(),x(G,{key:1,rows:4})):g.value?(o(),a("div",ge,[e[25]||(e[25]=t("b",null,"Hidden without an access token.",-1)),t("p",null,[y(B,{to:"/settings"},{default:k(()=>[...e[23]||(e[23]=[n("Add your token",-1)])]),_:1}),e[24]||(e[24]=n(" to read and edit this file. ",-1))])])):(o(),a(I,{key:3},[t("div",we,[e[26]||(e[26]=t("label",{for:"content"},"Contents",-1)),L(t("textarea",{id:"content","onUpdate:modelValue":e[1]||(e[1]=r=>u.value=r),rows:"18",spellcheck:"false"},null,512),[[U,u.value]])]),v.value?(o(),x(W,{key:0,text:v.value,title:"Traefik would not accept this."},null,8,["text"])):d("",!0),t("div",xe,[y(H,{variant:"primary",pending:h.value,disabled:!K.value,onClick:F},{default:k(()=>[n(f(h.value?"Saving…":"Save"),1)]),_:1},8,["pending","disabled"]),T(_).token?d("",!0):(o(),a("span",Te,"Saving needs a token."))]),s.value?(o(),a(I,{key:1},[e[30]||(e[30]=t("h2",{class:"section",style:{margin:"var(--s5) 0 var(--s3)"}},"Delete this file",-1)),e[31]||(e[31]=t("p",{class:"dim"}," Whatever it configures stops applying as soon as Traefik reloads. If it holds a router, those hostnames stop resolving to anything. ",-1)),t("div",_e,[t("label",{for:`confirm-${s.value}`},[e[27]||(e[27]=n(" Type ",-1)),t("b",null,f(s.value),1),e[28]||(e[28]=n(" to confirm ",-1))],8,Ce),L(t("input",{id:`confirm-${s.value}`,"onUpdate:modelValue":e[2]||(e[2]=r=>c.value=r),type:"text",placeholder:s.value,spellcheck:"false",autocomplete:"off"},null,8,Re),[[U,c.value,void 0,{trim:!0}]])]),t("div",$e,[y(H,{variant:"danger",disabled:c.value!==s.value||!T(_).token,title:c.value!==s.value?"Type the file name to confirm.":void 0,onClick:Q},{default:k(()=>[...e[29]||(e[29]=[n(" Delete ",-1)])]),_:1},8,["disabled","title"])])],64)):d("",!0)],64))])):d("",!0)])}}});export{Pe as default};
|
|
9
|
-
//# sourceMappingURL=RoutingView-CTPhqDby.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RoutingView-CTPhqDby.js","sources":["../../src/views/RoutingView.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Traefik's dynamic configuration — the file list, and an editor.\n *\n * WHAT LIVES HERE. Traefik reads config from two providers: labels on containers (every per-PR router)\n * and a watched *directory* of files. This page is the directory: middleware (basic auth, rate limits,\n * IP allow-lists), TLS options, the catch-all fallback router, routes to something running outside\n * compose. Several files rather than one is the point of a watched directory — one file per concern.\n *\n * THE WARNING IS NOT DECORATION. Traefik's documented behaviour is that an unparseable file produces\n * a parse error for the whole DIRECTORY, and the rest can be discarded with it — so a careless save\n * here breaks *other people's* routes, not the file being edited. The server validates before writing\n * and renames into place so the watcher never sees a partial file, and every rejection is rendered\n * verbatim because it names the actual problem.\n *\n * What it cannot break: `control.<domain>` and `api.<domain>` are docker labels on the pstack\n * container, not file config. This page cannot lock you out of the page you would use to undo a bad\n * save. That is stated in the UI, because an operator hesitating over a save deserves to know it.\n *\n * `previous` from a save is an in-session undo. There is deliberately no history on disk: the obvious\n * place to keep it is the one directory that must contain nothing but dynamic config.\n */\nimport { computed, ref } from 'vue';\nimport { api, problem } from '../api/client';\nimport type { RoutingFile, RoutingListResponse, RoutingReadResponse, RoutingWriteResponse } from '../api/types';\nimport { settings } from '../composables/useSettings';\nimport { stamp } from '../composables/useFormat';\nimport { toast } from '../composables/useToasts';\nimport ActionButton from '../components/ActionButton.vue';\nimport ErrorNote from '../components/ErrorNote.vue';\nimport InfoHint from '../components/InfoHint.vue';\nimport SkeletonList from '../components/SkeletonList.vue';\n\nconst files = ref<RoutingFile[]>([]);\nconst dir = ref('');\nconst writable = ref<boolean | null>(null);\nconst loaded = ref(false);\nconst listError = ref('');\n\n/** The open file. `null` name means a new one. */\nconst openName = ref<string | null>(null);\nconst draft = ref('');\nconst original = ref('');\nconst withheld = ref(false);\nconst loadingFile = ref(false);\nconst saving = ref(false);\nconst fileError = ref('');\nconst newName = ref('');\n/** Last replaced content, offered as an undo for the rest of the session. */\nconst undo = ref<{ name: string; content: string } | null>(null);\nconst confirmDelete = ref('');\n\nconst dirty = computed(() => openName.value !== null && draft.value !== original.value);\nconst canSave = computed(\n () => !!settings.token && !saving.value && draft.value.trim().length > 0 && (dirty.value || openName.value === ''),\n);\n\nconst STARTER = `http:\n middlewares:\n # An example — replace it. Middlewares go UNDER http; at the top level Traefik ignores them.\n ip-allow:\n ipAllowList:\n sourceRange:\n - 203.0.113.0/24\n`;\n\nasync function loadList(): Promise<void> {\n const r = await api.get<RoutingListResponse>('/api/routing');\n loaded.value = true;\n if (!r.ok) {\n listError.value = problem(r, 'load the routing files');\n return;\n }\n listError.value = '';\n files.value = r.body.files ?? [];\n dir.value = r.body.dir ?? '';\n writable.value = r.body.writable ?? false;\n}\n\nvoid loadList();\n\nasync function open(name: string): Promise<void> {\n openName.value = name;\n loadingFile.value = true;\n fileError.value = '';\n withheld.value = false;\n confirmDelete.value = '';\n // Authenticated: dynamic config holds basic-auth hashes and forward-auth URLs.\n const r = await api.getAuthed<RoutingReadResponse>(`/api/routing/${encodeURIComponent(name)}`);\n loadingFile.value = false;\n if (!r.ok) {\n fileError.value = problem(r, 'open this file');\n return;\n }\n if (r.body.sourceWithheld) {\n withheld.value = true;\n draft.value = '';\n original.value = '';\n return;\n }\n draft.value = r.body.content ?? '';\n original.value = draft.value;\n}\n\nfunction startNew(): void {\n openName.value = '';\n newName.value = '';\n draft.value = STARTER;\n original.value = '';\n withheld.value = false;\n fileError.value = '';\n}\n\nfunction close(): void {\n openName.value = null;\n draft.value = '';\n original.value = '';\n fileError.value = '';\n}\n\nasync function save(): Promise<void> {\n const name = openName.value === '' ? newName.value.trim() : openName.value;\n if (!name) {\n fileError.value = 'Give the file a name, ending in .yml';\n return;\n }\n saving.value = true;\n fileError.value = '';\n const r = await api.put<RoutingWriteResponse>(`/api/routing/${encodeURIComponent(name)}`, {\n content: draft.value,\n });\n saving.value = false;\n if (!r.ok) {\n // Rendered verbatim: the server's message names the unknown section or the YAML error, which is\n // the whole diagnosis.\n fileError.value = problem(r, 'save this file');\n return;\n }\n if (r.body.previous) undo.value = { name, content: r.body.previous };\n original.value = draft.value;\n openName.value = name;\n toast('ok', `Saved ${name}. Traefik reloads within a second or two.`);\n void loadList();\n}\n\nasync function revert(): Promise<void> {\n const u = undo.value;\n if (!u) return;\n draft.value = u.content;\n openName.value = u.name;\n await save();\n undo.value = null;\n}\n\nasync function remove(): Promise<void> {\n const name = openName.value;\n if (!name || confirmDelete.value !== name) return;\n const r = await api.del<RoutingWriteResponse>(`/api/routing/${encodeURIComponent(name)}`);\n if (!r.ok) {\n fileError.value = problem(r, 'delete this file');\n return;\n }\n if (r.body.previous) undo.value = { name, content: r.body.previous };\n toast('ok', `Deleted ${name}.`);\n close();\n void loadList();\n}\n</script>\n\n<template>\n <div>\n <div class=\"page-head\">\n <div>\n <h1>Routing</h1>\n <div class=\"sub\">\n Traefik configuration that is not a container label\n <InfoHint label=\"what belongs in these files\">\n Middleware (basic auth, rate limits, IP allow-lists), TLS options, the catch-all fallback\n router, and routes to anything running outside compose. Per-PR routers are not here —\n those are labels in each deployment's own compose file.\n </InfoHint>\n </div>\n </div>\n <span class=\"grow\" />\n <button v-if=\"writable\" class=\"btn primary\" @click=\"startNew\">New file</button>\n </div>\n\n <ErrorNote v-if=\"listError\" :text=\"listError\" title=\"Could not load the routing files.\" />\n\n <!--\n The blast radius, stated once and up front — and the reassurance alongside it, because \"this can\n break everything\" without \"you will still be able to fix it\" just makes people avoid the page.\n -->\n <div class=\"banner warn\">\n <b>A bad file here affects every preview on this host.</b>\n <p>\n Traefik reads this directory as a whole: one unparseable file and it logs a parse error for the\n <em>directory</em>, so the symptom is other routes disappearing. Saves are checked before they\n are written and land atomically, so a rejected file never reaches Traefik.\n <InfoHint label=\"what this page cannot break\">\n This page and the API are routed by container labels, not by these files — so no save here\n can lock you out of the page you would use to undo it.\n </InfoHint>\n </p>\n </div>\n\n <div v-if=\"writable === false\" class=\"banner failed\">\n <b>Read-only: the API cannot write to this directory.</b>\n <p>\n The control stack mounts it into the API from 0.4.0 onward. Re-run\n <code>pstack init</code> on the host to pick up the mount — it is idempotent, and it recreates\n the control containers.\n </p>\n </div>\n\n <div v-else-if=\"!settings.token\" class=\"banner info\">\n <b>Viewing needs a token too.</b>\n <p>\n These files hold basic-auth hashes and forward-auth URLs, so their contents are not served\n unauthenticated. <RouterLink to=\"/settings\">Add your token</RouterLink>.\n </p>\n </div>\n\n <div v-if=\"undo\" class=\"banner info\">\n <b>Replaced {{ undo.name }}.</b>\n <p>\n The previous contents are still here for this session.\n <button class=\"btn sm\" @click=\"revert\">Put it back</button>\n </p>\n </div>\n\n <section class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"section\">Files</h2>\n <span class=\"grow\" />\n <span v-if=\"dir\" class=\"mute\" style=\"font-size: var(--t-sm)\">\n <code>{{ dir }}</code>\n </span>\n </div>\n\n <SkeletonList v-if=\"!loaded\" :rows=\"3\" />\n <ul v-else-if=\"files.length\" class=\"kvlist\">\n <li v-for=\"f in files\" :key=\"f.name\">\n <span class=\"k\">\n <button class=\"ghost sm\" @click=\"open(f.name)\">{{ f.name }}</button>\n </span>\n <span class=\"v mute\" style=\"font-size: var(--t-sm)\">\n {{ f.size }} bytes · {{ stamp(f.updatedAt) }}\n </span>\n </li>\n </ul>\n <p v-else class=\"mute\">\n No files yet. Everything is routed by container labels, which is a perfectly good place to be.\n </p>\n </section>\n\n <section v-if=\"openName !== null\" class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"section\">{{ openName === '' ? 'New file' : openName }}</h2>\n <span v-if=\"dirty\" class=\"badge warn\">unsaved</span>\n <span class=\"grow\" />\n <button class=\"ghost sm\" @click=\"close\">Close</button>\n </div>\n\n <div v-if=\"openName === ''\" class=\"field\" style=\"max-width: 340px\">\n <label for=\"fname\">File name</label>\n <input\n id=\"fname\"\n v-model.trim=\"newName\"\n type=\"text\"\n placeholder=\"middleware.yml\"\n spellcheck=\"false\"\n autocomplete=\"off\"\n />\n <div class=\"mute hint\">Lower case, ending in <code>.yml</code>.</div>\n </div>\n\n <SkeletonList v-if=\"loadingFile\" :rows=\"4\" />\n\n <div v-else-if=\"withheld\" class=\"banner plain\">\n <b>Hidden without an access token.</b>\n <p>\n <RouterLink to=\"/settings\">Add your token</RouterLink> to read and edit this file.\n </p>\n </div>\n\n <template v-else>\n <div class=\"field\">\n <label for=\"content\">Contents</label>\n <textarea id=\"content\" v-model=\"draft\" rows=\"18\" spellcheck=\"false\" />\n </div>\n\n <ErrorNote v-if=\"fileError\" :text=\"fileError\" title=\"Traefik would not accept this.\" />\n\n <div class=\"row\" style=\"margin-top: var(--s4)\">\n <ActionButton variant=\"primary\" :pending=\"saving\" :disabled=\"!canSave\" @click=\"save\">\n {{ saving ? 'Saving…' : 'Save' }}\n </ActionButton>\n <span v-if=\"!settings.token\" class=\"mute\">Saving needs a token.</span>\n </div>\n\n <template v-if=\"openName\">\n <h2 class=\"section\" style=\"margin: var(--s5) 0 var(--s3)\">Delete this file</h2>\n <p class=\"dim\">\n Whatever it configures stops applying as soon as Traefik reloads. If it holds a router,\n those hostnames stop resolving to anything.\n </p>\n <div class=\"field\" style=\"max-width: 340px\">\n <label :for=\"`confirm-${openName}`\">\n Type <b>{{ openName }}</b> to confirm\n </label>\n <input\n :id=\"`confirm-${openName}`\"\n v-model.trim=\"confirmDelete\"\n type=\"text\"\n :placeholder=\"openName\"\n spellcheck=\"false\"\n autocomplete=\"off\"\n />\n </div>\n <div class=\"row\">\n <ActionButton\n variant=\"danger\"\n :disabled=\"confirmDelete !== openName || !settings.token\"\n :title=\"confirmDelete !== openName ? 'Type the file name to confirm.' : undefined\"\n @click=\"remove\"\n >\n Delete\n </ActionButton>\n </div>\n </template>\n </template>\n </section>\n </div>\n</template>\n"],"names":["STARTER","files","ref","dir","writable","loaded","listError","openName","draft","original","withheld","loadingFile","saving","fileError","newName","undo","confirmDelete","dirty","computed","canSave","settings","loadList","r","api","problem","open","name","startNew","close","save","toast","revert","u","remove","_createElementBlock","_createElementVNode","_hoisted_1","_cache","_hoisted_2","_createVNode","InfoHint","_createBlock","ErrorNote","_hoisted_3","_openBlock","_hoisted_4","_unref","_hoisted_5","_component_RouterLink","_hoisted_6","_toDisplayString","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_Fragment","_renderList","f","_hoisted_11","$event","_hoisted_12","_hoisted_13","stamp","_hoisted_14","SkeletonList","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","ActionButton","_hoisted_23","_hoisted_24","_hoisted_27"],"mappings":"guCAyDMA,GAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uCAxBhB,MAAMC,EAAQC,EAAmB,EAAE,EAC7BC,EAAMD,EAAI,EAAE,EACZE,EAAWF,EAAoB,IAAI,EACnCG,EAASH,EAAI,EAAK,EAClBI,EAAYJ,EAAI,EAAE,EAGlBK,EAAWL,EAAmB,IAAI,EAClCM,EAAQN,EAAI,EAAE,EACdO,EAAWP,EAAI,EAAE,EACjBQ,EAAWR,EAAI,EAAK,EACpBS,EAAcT,EAAI,EAAK,EACvBU,EAASV,EAAI,EAAK,EAClBW,EAAYX,EAAI,EAAE,EAClBY,EAAUZ,EAAI,EAAE,EAEhBa,EAAOb,EAA8C,IAAI,EACzDc,EAAgBd,EAAI,EAAE,EAEtBe,EAAQC,EAAS,IAAMX,EAAS,QAAU,MAAQC,EAAM,QAAUC,EAAS,KAAK,EAChFU,EAAUD,EACd,IAAM,CAAC,CAACE,EAAS,OAAS,CAACR,EAAO,OAASJ,EAAM,MAAM,OAAO,OAAS,IAAMS,EAAM,OAASV,EAAS,QAAU,GAAA,EAYjH,eAAec,GAA0B,CACvC,MAAMC,EAAI,MAAMC,EAAI,IAAyB,cAAc,EAE3D,GADAlB,EAAO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}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import{d as D,j as u,k as R,B as F,c as i,a as s,t as d,e as t,f as p,w as m,_ as V,v as O,g as b,x as k,y as L,N as U,F as T,z as q,r as B,h as K,m as E,n as W,o as n,I as z,H,p as X,M as G}from"./index-CrxqzmXu.js";import{a as J,w as Q,p as Y,r as Z}from"./useVars-VN9gYdR6.js";import{_ as ee}from"./ActionButton.vue_vue_type_script_setup_true_lang-zTFy3C1L.js";import{_ as se}from"./ErrorNote.vue_vue_type_script_setup_true_lang-pc4tgtPS.js";import{_ as te}from"./VarEditor.vue_vue_type_script_setup_true_lang-BNRC1yg9.js";const oe={class:"page-head"},ae={class:"sub"},le={class:"panel"},ne={class:"dim"},ie={key:0},re={key:1},de={key:2},ue={key:3},pe={key:1,class:"banner warn"},ve={class:"row",style:{"margin-bottom":"var(--s4)"}},me={class:"field",style:{"max-width":"280px"}},ce={class:"mute",style:{"align-self":"end","padding-bottom":"10px"}},ye={key:2,class:"row",style:{"margin-bottom":"var(--s4)"}},he={class:"check"},fe={class:"check"},be={class:"field",style:{"max-width":"340px"}},ke=["value"],ge={key:0,class:"hint"},we={key:0},xe={key:1},Ce={key:2},Se={class:"field"},Ve={class:"field",style:{"margin-top":"var(--s3)"}},$e={class:"hint"},Ae={class:"hint"},Re={class:"row",style:{"margin-top":"var(--s5)"}},Le={key:0,class:"s-ok"},Te=`version: 1
|
|
2
|
-
kind: isolated
|
|
3
|
-
|
|
4
|
-
# The stack identity: the compose project name, and $STACK inside every hook.
|
|
5
|
-
# \${PR} is interpolated ONCE, at resolve time, from the variables sent with the request.
|
|
6
|
-
stack: pr-\${PR}
|
|
7
|
-
|
|
8
|
-
env:
|
|
9
|
-
PREVIEW_DOMAIN: preview.example.com
|
|
10
|
-
|
|
11
|
-
compose:
|
|
12
|
-
file: compose.yml
|
|
13
|
-
# Every service sits behind a profile so a bare \`up\` starts nothing.
|
|
14
|
-
# \`down\` always enables ALL of them — otherwise the unselected profiles' network leaks.
|
|
15
|
-
profiles: [app]
|
|
16
|
-
|
|
17
|
-
requires:
|
|
18
|
-
- name: traefik-network
|
|
19
|
-
assert: docker network inspect traefik >/dev/null 2>&1
|
|
20
|
-
hint: run \`pstack init\` on the host first
|
|
21
|
-
|
|
22
|
-
axes:
|
|
23
|
-
# Hooks run from the deployment directory, which holds only spec.yml and compose.yml —
|
|
24
|
-
# so use inline shell or absolute paths, never ./hooks/foo.sh.
|
|
25
|
-
- name: scratch
|
|
26
|
-
up: mkdir -p /tmp/$STACK
|
|
27
|
-
assert_live: test -d /tmp/$STACK
|
|
28
|
-
down: rm -rf /tmp/$STACK
|
|
29
|
-
# assert_gone MUST FAIL CLOSED. A bare \`! <probe>\` reports "gone" whenever the probe fails
|
|
30
|
-
# for any reason — a missing CLI, an expired token — turning "I could not tell" into
|
|
31
|
-
# "it is gone", a false negative on the one thing this tool exists to catch.
|
|
32
|
-
assert_gone: |
|
|
33
|
-
test -d /tmp || exit 1
|
|
34
|
-
! test -d /tmp/$STACK
|
|
35
|
-
`,Ee=`services:
|
|
36
|
-
app:
|
|
37
|
-
image: nginx:alpine
|
|
38
|
-
profiles: [app]
|
|
39
|
-
labels:
|
|
40
|
-
- traefik.enable=true
|
|
41
|
-
`,Me=D({__name:"SubmitView",props:{id:{}},setup(N){const $=N,a=u({id:$.id??"",spec:"",compose:""}),h=u([{k:"",v:""}]),c=u("inline"),g=u(""),w=u(!1),x=u(""),y=u(null),C=u([]);R.get("/api/specs").then(l=>{l.ok&&Array.isArray(l.body.specs)&&(C.value=l.body.specs)});const S=E(()=>C.value.find(l=>l.name===g.value)),A=E(()=>!!$.id),v=u("idle"),f=u(null);async function _(l){v.value="loading",f.value=null;const e=await R.getAuthed(`/api/deployments/${encodeURIComponent(l)}/source`);if(e.status===404||!e.ok){v.value="failed";return}if(e.body.sourceWithheld){v.value="withheld",e.body.specName&&(f.value=e.body.specName);return}a.value.spec||(a.value.spec=e.body.spec??""),a.value.compose||(a.value.compose=e.body.compose??""),e.body.specName&&(f.value=e.body.specName),v.value="loaded"}F(()=>$.id,l=>{var o;if(x.value="",y.value=null,v.value="idle",f.value=null,!l)return;l!==a.value.id&&(a.value.spec="",a.value.compose=""),a.value.id=l;const e=(o=G(l))==null?void 0:o.vars,r=e?Y(e):Z(l);r.some(j=>j.k)&&(h.value=r),_(l)},{immediate:!0});const I=E(()=>!!a.value.id&&(c.value==="stored"?!!g.value:!!a.value.spec.trim())&&!w.value);async function P(){w.value=!0,x.value="",y.value=null;const l=a.value.id,e=J(h.value),r={vars:e,env:e};c.value==="stored"?r.specName=g.value:(r.spec=a.value.spec,a.value.compose.trim()&&(r.compose=a.value.compose));const o=await R.put(`/api/deployments/${encodeURIComponent(l)}`,r);if(w.value=!1,o.status===200||o.status===201){y.value={id:o.body.id??l,stack:o.body.stack??"?",created:o.status===201},Q(l,h.value),z(),H("ok",`${o.status===201?"Created":"Replaced"} ${l} → ${y.value.stack}`,{to:`/deployments/${encodeURIComponent(l)}`,toLabel:"Open"});return}x.value=X(o,"save this deployment")}function M(){c.value="inline",a.value.spec=Te,a.value.compose.trim()||(a.value.compose=Ee),a.value.id||(a.value.id="pr-123"),h.value.some(l=>l.k)||(h.value=[{k:"PR",v:"123"}])}return(l,e)=>{const r=W("RouterLink");return n(),i("div",null,[s("div",oe,[s("div",null,[s("h1",null,d(A.value?"Edit a deployment":"Submit a deployment"),1),s("div",ae,d(A.value?"Loaded from what is stored; saving replaces the record":"Stores a spec so it can be deployed"),1)]),e[7]||(e[7]=s("span",{class:"grow"},null,-1)),s("button",{class:"ghost",onClick:M},"Load example spec")]),s("section",le,[s("p",ne,[e[9]||(e[9]=t(" Nothing is saved until the spec is valid. ",-1)),p(V,{label:"what happens on a rejected submission"},{default:m(()=>[...e[8]||(e[8]=[t(" The spec is checked before anything is written, so a rejected submission leaves nothing behind — and a replace never destroys a good record over a typo. Whether the deployment is shared or isolated comes from the spec, not from this form. ",-1)])]),_:1})]),A.value?(n(),i("div",{key:0,class:O(["banner",v.value==="loaded"?"info":"warn"])},[s("b",null,"Replacing "+d(N.id)+".",1),v.value==="loading"?(n(),i("p",ie,"Loading what is stored…")):v.value==="loaded"?(n(),i("p",re," Loaded from the stored record — edit it and save. Saving replaces the record outright, so anything you delete here stops being tracked while whatever it created keeps running. ")):v.value==="withheld"?(n(),i("p",de,[e[11]||(e[11]=t(" The stored spec was not loaded: reading it needs an access token, because hooks routinely carry a credential inline. ",-1)),p(r,{to:"/settings"},{default:m(()=>[...e[10]||(e[10]=[t("Add your token",-1)])]),_:1}),e[12]||(e[12]=t(" to edit in place — otherwise paste the ",-1)),e[13]||(e[13]=s("b",null,"complete",-1)),e[14]||(e[14]=t(" spec, since anything you leave out stops being tracked. ",-1))])):(n(),i("p",ue,[...e[15]||(e[15]=[t(" The stored spec could not be loaded, so this form is empty. Paste the ",-1),s("b",null,"complete",-1),t(" spec you want stored — anything you leave out stops being tracked while whatever it created keeps running. ",-1)])]))],2)):b("",!0),f.value?(n(),i("div",pe,[s("b",null,"This deployment tracks the stored spec “"+d(f.value)+"”.",1),s("p",null,[e[17]||(e[17]=t(" Saving here writes a private copy and stops it following that spec. To change every deployment using it, edit ",-1)),p(r,{to:`/specs/${encodeURIComponent(f.value)}`},{default:m(()=>[...e[16]||(e[16]=[t("the spec",-1)])]),_:1},8,["to"]),e[18]||(e[18]=t(" instead. ",-1))])])):b("",!0),s("div",ve,[s("div",me,[e[19]||(e[19]=s("label",{for:"did"},"Deployment id",-1)),k(s("input",{id:"did","onUpdate:modelValue":e[0]||(e[0]=o=>a.value.id=o),type:"text",placeholder:"pr-123",spellcheck:"false",autocomplete:"off"},null,512),[[L,a.value.id,void 0,{trim:!0}]])]),s("span",ce,[e[21]||(e[21]=t(" Lower case ",-1)),p(V,{label:"allowed characters in a deployment id"},{default:m(()=>[...e[20]||(e[20]=[t(" Starts with a letter or digit, then letters, digits, dot, dash or underscore. Up to 64 characters — ",-1),s("code",null,"[a-z0-9][a-z0-9._-]{0,63}",-1),t(". ",-1)])]),_:1})])]),C.value.length?(n(),i("div",ye,[s("label",he,[k(s("input",{"onUpdate:modelValue":e[1]||(e[1]=o=>c.value=o),type:"radio",value:"inline"},null,512),[[U,c.value]]),e[22]||(e[22]=t(" inline spec ",-1))]),s("label",fe,[k(s("input",{"onUpdate:modelValue":e[2]||(e[2]=o=>c.value=o),type:"radio",value:"stored"},null,512),[[U,c.value]]),e[23]||(e[23]=t(" reference a stored spec ",-1))])])):b("",!0),c.value==="stored"&&C.value.length?(n(),i(T,{key:3},[s("div",be,[e[25]||(e[25]=s("label",{for:"sn"},"Stored spec",-1)),k(s("select",{id:"sn","onUpdate:modelValue":e[3]||(e[3]=o=>g.value=o)},[e[24]||(e[24]=s("option",{value:""},"— choose —",-1)),(n(!0),i(T,null,B(C.value,o=>(n(),i("option",{key:o.name,value:o.name},d(o.name)+" ("+d(o.kind)+") ",9,ke))),128))],512),[[q,g.value]])]),S.value?(n(),i("p",ge,[S.value.description?(n(),i("span",we,d(S.value.description)+" — ",1)):b("",!0),e[27]||(e[27]=t(" needs ",-1)),S.value.requiredVars.length?(n(),i("b",xe,d(S.value.requiredVars.join(", ")),1)):(n(),i("span",Ce,"no variables")),e[28]||(e[28]=t(". ",-1)),p(V,{label:"why variables are required"},{default:m(()=>[...e[26]||(e[26]=[t(" A missing variable is refused by name. It is never filled in with a blank, which would silently give every deployment the same stack name. ",-1)])]),_:1})])):b("",!0)],64)):(n(),i(T,{key:4},[s("div",Se,[e[29]||(e[29]=s("label",{for:"spec"},"spec.yml",-1)),k(s("textarea",{id:"spec","onUpdate:modelValue":e[4]||(e[4]=o=>a.value.spec=o),rows:"18",spellcheck:"false",placeholder:`version: 1
|
|
42
|
-
kind: isolated
|
|
43
|
-
stack: pr-\${PR}
|
|
44
|
-
axes: []`},null,512),[[L,a.value.spec]])]),s("div",Ve,[e[30]||(e[30]=s("label",{for:"compose"},[t("compose.yml "),s("span",{class:"mute"},"(optional)")],-1)),k(s("textarea",{id:"compose","onUpdate:modelValue":e[5]||(e[5]=o=>a.value.compose=o),rows:"8",spellcheck:"false",placeholder:"Written next to spec.yml, so a compose file named compose.yml resolves"},null,512),[[L,a.value.compose]])]),s("p",$e,[e[32]||(e[32]=t(" Hooks must be inline shell or an absolute path. ",-1)),p(V,{label:"why a relative script path does not work"},{default:m(()=>[...e[31]||(e[31]=[t(" A deployment directory only ever holds ",-1),s("code",null,"spec.yml",-1),t(" and ",-1),s("code",null,"compose.yml",-1),t(", and hooks run from there — so ",-1),s("code",null,"up: ./hooks/db.sh",-1),t(" has nothing to find. ",-1)])]),_:1})])],64)),e[36]||(e[36]=s("h2",{class:"section",style:{margin:"var(--s5) 0 var(--s3)"}},"Variables",-1)),p(te,{modelValue:h.value,"onUpdate:modelValue":e[6]||(e[6]=o=>h.value=o)},null,8,["modelValue"]),s("p",Ae,[e[34]||(e[34]=t(" Saved with the deployment, so tearing it down later targets the same stack. ",-1)),p(V,{label:"how variables are remembered"},{default:m(()=>[...e[33]||(e[33]=[t(" They are stored on the server where it supports that, and in this browser either way — so the actions on the deployment page send exactly these values. ",-1)])]),_:1})]),s("div",Re,[p(ee,{variant:"primary",pending:w.value,disabled:!I.value,onClick:P},{default:m(()=>[t(d(w.value?"submitting…":"Submit"),1)]),_:1},8,["pending","disabled"]),y.value?(n(),i("span",Le,[t(d(y.value.created?"Created":"Replaced")+" — stack ",1),s("b",null,d(y.value.stack),1),p(r,{to:`/deployments/${encodeURIComponent(y.value.id)}`,style:{"margin-left":"8px"}},{default:m(()=>[...e[35]||(e[35]=[t(" open → ",-1)])]),_:1},8,["to"])])):b("",!0)]),x.value?(n(),K(se,{key:5,text:x.value,title:"The server rejected this submission."},null,8,["text"])):b("",!0)])])}}});export{Me as default};
|
|
45
|
-
//# sourceMappingURL=SubmitView-Cod9su4V.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SubmitView-Cod9su4V.js","sources":["../../src/views/SubmitView.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Submit or replace a deployment.\n *\n * The server's 400 is the whole point of this screen. It carries the SpecError verbatim — the key\n * or variable that is wrong, often the corrected form, and the assert-lint warnings about an\n * `assert_gone` that fails open. That text is the tool's main teaching surface, so it is rendered\n * whole, with newlines intact, and never summarised.\n *\n * The spec is parsed BEFORE anything touches disk, so a rejected submission leaves nothing behind\n * and, on a replace, a good record is never destroyed over a typo.\n */\nimport { computed, ref, watch } from 'vue';\nimport { api, problem } from '../api/client';\nimport InfoHint from '../components/InfoHint.vue';\nimport type {\n DeploymentSourceResponse,\n SpecMeta,\n SpecsResponse,\n SubmitResponse,\n VarPair,\n} from '../api/types';\nimport { loadDeployments, rowFor } from '../composables/useControlPlane';\nimport { pairsFromRecord, readVars, recordFromPairs, writeVars } from '../composables/useVars';\nimport { toast } from '../composables/useToasts';\nimport ActionButton from '../components/ActionButton.vue';\nimport ErrorNote from '../components/ErrorNote.vue';\nimport VarEditor from '../components/VarEditor.vue';\n\nconst props = defineProps<{ id?: string }>();\n\nconst form = ref({ id: props.id ?? '', spec: '', compose: '' });\nconst vars = ref<VarPair[]>([{ k: '', v: '' }]);\nconst source = ref<'inline' | 'stored'>('inline');\nconst specName = ref('');\n\nconst submitting = ref(false);\nconst error = ref('');\nconst result = ref<{ id: string; stack: string; created: boolean } | null>(null);\n\n/**\n * Stored specs, when this server has them. A build without `/api/specs` answers 404, which is not\n * an error here — the picker simply is not offered and inline stays the only shape.\n */\nconst specs = ref<SpecMeta[]>([]);\nvoid api.get<SpecsResponse>('/api/specs').then((r) => {\n if (r.ok && Array.isArray(r.body.specs)) specs.value = r.body.specs;\n});\n\nconst chosenSpec = computed(() => specs.value.find((s) => s.name === specName.value));\n\nconst replacing = computed(() => !!props.id);\n\n/**\n * Replacing now PRE-FILLS from what is stored.\n *\n * It used to start empty, because nothing could hand the source back. Replacing is whole-record, so\n * an operator retyping a spec from memory silently dropped whatever they forgot — and a dropped axis\n * stops being tracked while the resources it created keep running. Being unable to read your own\n * submission is what made that a likely mistake rather than a careless one.\n *\n * The body is still cleared FIRST, on every id change. A leftover body from another deployment is the\n * dangerous case: it is perfectly valid YAML, so the PUT would succeed and overwrite the wrong\n * deployment with nothing able to catch it. Clearing first means a failed or withheld fetch leaves the\n * form empty rather than holding someone else's spec.\n */\nconst sourceState = ref<'idle' | 'loading' | 'loaded' | 'withheld' | 'failed'>('idle');\n/** Set when this deployment tracks a stored spec — editing this copy forks it from the original. */\nconst forkWarning = ref<string | null>(null);\n\nasync function loadSource(id: string): Promise<void> {\n sourceState.value = 'loading';\n forkWarning.value = null;\n const r = await api.getAuthed<DeploymentSourceResponse>(\n `/api/deployments/${encodeURIComponent(id)}/source`,\n );\n // A build of the API without the route answers 404; that is a capability difference, not an error,\n // and it must land on the old empty-form behaviour rather than an alarming banner.\n if (r.status === 404 || !r.ok) {\n sourceState.value = 'failed';\n return;\n }\n if (r.body.sourceWithheld) {\n sourceState.value = 'withheld';\n if (r.body.specName) forkWarning.value = r.body.specName;\n return;\n }\n // Only fill if the user has not started typing — a slow fetch must never overwrite their edit.\n if (!form.value.spec) form.value.spec = r.body.spec ?? '';\n if (!form.value.compose) form.value.compose = r.body.compose ?? '';\n if (r.body.specName) forkWarning.value = r.body.specName;\n sourceState.value = 'loaded';\n}\n\nwatch(\n () => props.id,\n (id) => {\n error.value = '';\n result.value = null;\n sourceState.value = 'idle';\n forkWarning.value = null;\n if (!id) return;\n if (id !== form.value.id) {\n form.value.spec = '';\n form.value.compose = '';\n }\n form.value.id = id;\n // Seed the variables from what this deployment already uses: replacing a spec usually needs\n // the same ones that resolved it.\n const stored = rowFor(id)?.vars;\n const saved = stored ? pairsFromRecord(stored) : readVars(id);\n if (saved.some((e) => e.k)) vars.value = saved;\n void loadSource(id);\n },\n { immediate: true },\n);\n\nconst canSubmit = computed(\n () =>\n !!form.value.id &&\n (source.value === 'stored' ? !!specName.value : !!form.value.spec.trim()) &&\n !submitting.value,\n);\n\nasync function submit(): Promise<void> {\n submitting.value = true;\n error.value = '';\n result.value = null;\n\n const id = form.value.id;\n const record = recordFromPairs(vars.value);\n /**\n * `vars` are STORED with the deployment on servers that support it, which makes a later `down`\n * resolve the same stack `up` created with no query parameters at all. `env` validates this\n * submission on every server, new or old. Sending both is what keeps this form working against\n * either build — an older server ignores the key it does not know.\n */\n const body: Record<string, unknown> = { vars: record, env: record };\n if (source.value === 'stored') body.specName = specName.value;\n else {\n body.spec = form.value.spec;\n if (form.value.compose.trim()) body.compose = form.value.compose;\n }\n\n const r = await api.put<SubmitResponse>(`/api/deployments/${encodeURIComponent(id)}`, body);\n submitting.value = false;\n\n if (r.status === 200 || r.status === 201) {\n result.value = { id: r.body.id ?? id, stack: r.body.stack ?? '?', created: r.status === 201 };\n // Persist the variables that just validated this spec. On an older server this is the single\n // thing keeping a later `down` pointed at the stack the `up` created.\n writeVars(id, vars.value);\n void loadDeployments();\n toast('ok', `${r.status === 201 ? 'Created' : 'Replaced'} ${id} → ${result.value.stack}`, {\n to: `/deployments/${encodeURIComponent(id)}`,\n toLabel: 'Open',\n });\n return;\n }\n // 400 (SpecError), 409 (a job in flight over this stack), 401, 404 — all rendered verbatim.\n error.value = problem(r, 'save this deployment');\n}\n\nconst EXAMPLE_SPEC = `version: 1\nkind: isolated\n\n# The stack identity: the compose project name, and $STACK inside every hook.\n# \\${PR} is interpolated ONCE, at resolve time, from the variables sent with the request.\nstack: pr-\\${PR}\n\nenv:\n PREVIEW_DOMAIN: preview.example.com\n\ncompose:\n file: compose.yml\n # Every service sits behind a profile so a bare \\`up\\` starts nothing.\n # \\`down\\` always enables ALL of them — otherwise the unselected profiles' network leaks.\n profiles: [app]\n\nrequires:\n - name: traefik-network\n assert: docker network inspect traefik >/dev/null 2>&1\n hint: run \\`pstack init\\` on the host first\n\naxes:\n # Hooks run from the deployment directory, which holds only spec.yml and compose.yml —\n # so use inline shell or absolute paths, never ./hooks/foo.sh.\n - name: scratch\n up: mkdir -p /tmp/$STACK\n assert_live: test -d /tmp/$STACK\n down: rm -rf /tmp/$STACK\n # assert_gone MUST FAIL CLOSED. A bare \\`! <probe>\\` reports \"gone\" whenever the probe fails\n # for any reason — a missing CLI, an expired token — turning \"I could not tell\" into\n # \"it is gone\", a false negative on the one thing this tool exists to catch.\n assert_gone: |\n test -d /tmp || exit 1\n ! test -d /tmp/$STACK\n`;\n\nconst EXAMPLE_COMPOSE = `services:\n app:\n image: nginx:alpine\n profiles: [app]\n labels:\n - traefik.enable=true\n`;\n\nfunction loadExample(): void {\n source.value = 'inline';\n form.value.spec = EXAMPLE_SPEC;\n if (!form.value.compose.trim()) form.value.compose = EXAMPLE_COMPOSE;\n if (!form.value.id) form.value.id = 'pr-123';\n if (!vars.value.some((e) => e.k)) vars.value = [{ k: 'PR', v: '123' }];\n}\n</script>\n\n<template>\n <div>\n <div class=\"page-head\">\n <div>\n <h1>{{ replacing ? 'Edit a deployment' : 'Submit a deployment' }}</h1>\n <div class=\"sub\">\n {{ replacing ? 'Loaded from what is stored; saving replaces the record' : 'Stores a spec so it can be deployed' }}\n </div>\n </div>\n <span class=\"grow\" />\n <button class=\"ghost\" @click=\"loadExample\">Load example spec</button>\n </div>\n\n <section class=\"panel\">\n <p class=\"dim\">\n Nothing is saved until the spec is valid.\n <InfoHint label=\"what happens on a rejected submission\">\n The spec is checked before anything is written, so a rejected submission leaves nothing\n behind — and a replace never destroys a good record over a typo. Whether the deployment is\n shared or isolated comes from the spec, not from this form.\n </InfoHint>\n </p>\n\n <!--\n A `PUT` REPLACES the whole record, and this form cannot pre-fill it: the API has no route\n that returns a stored spec. Say that out loud, because a half-remembered spec pasted here\n is still valid YAML — the server will accept it, and the axes the original declared simply\n stop existing as far as the control plane knows, while whatever they created keeps running.\n -->\n <div v-if=\"replacing\" class=\"banner\" :class=\"sourceState === 'loaded' ? 'info' : 'warn'\">\n <b>Replacing {{ id }}.</b>\n <p v-if=\"sourceState === 'loading'\">Loading what is stored…</p>\n <p v-else-if=\"sourceState === 'loaded'\">\n Loaded from the stored record — edit it and save. Saving replaces the record outright, so\n anything you delete here stops being tracked while whatever it created keeps running.\n </p>\n <p v-else-if=\"sourceState === 'withheld'\">\n The stored spec was not loaded: reading it needs an access token, because hooks routinely\n carry a credential inline. <RouterLink to=\"/settings\">Add your token</RouterLink> to edit\n in place — otherwise paste the <b>complete</b> spec, since anything you leave out stops\n being tracked.\n </p>\n <p v-else>\n The stored spec could not be loaded, so this form is empty. Paste the <b>complete</b> spec\n you want stored — anything you leave out stops being tracked while whatever it created keeps\n running.\n </p>\n </div>\n\n <!--\n A deployment that references a stored spec keeps its own copy of the source. Editing that copy\n forks it: the stored spec every other deployment shares is untouched, and this one stops\n following it. Silent forks are the kind of thing discovered months later.\n -->\n <div v-if=\"forkWarning\" class=\"banner warn\">\n <b>This deployment tracks the stored spec “{{ forkWarning }}”.</b>\n <p>\n Saving here writes a private copy and stops it following that spec. To change every\n deployment using it, edit\n <RouterLink :to=\"`/specs/${encodeURIComponent(forkWarning)}`\">the spec</RouterLink> instead.\n </p>\n </div>\n\n <div class=\"row\" style=\"margin-bottom: var(--s4)\">\n <div class=\"field\" style=\"max-width: 280px\">\n <label for=\"did\">Deployment id</label>\n <input\n id=\"did\"\n v-model.trim=\"form.id\"\n type=\"text\"\n placeholder=\"pr-123\"\n spellcheck=\"false\"\n autocomplete=\"off\"\n />\n </div>\n <span class=\"mute\" style=\"align-self: end; padding-bottom: 10px\">\n Lower case\n <InfoHint label=\"allowed characters in a deployment id\">\n Starts with a letter or digit, then letters, digits, dot, dash or underscore. Up to 64\n characters — <code>[a-z0-9][a-z0-9._-]{0,63}</code>.\n </InfoHint>\n </span>\n </div>\n\n <!-- Offered only when this server actually has stored specs. -->\n <div v-if=\"specs.length\" class=\"row\" style=\"margin-bottom: var(--s4)\">\n <label class=\"check\">\n <input v-model=\"source\" type=\"radio\" value=\"inline\" /> inline spec\n </label>\n <label class=\"check\">\n <input v-model=\"source\" type=\"radio\" value=\"stored\" /> reference a stored spec\n </label>\n </div>\n\n <template v-if=\"source === 'stored' && specs.length\">\n <div class=\"field\" style=\"max-width: 340px\">\n <label for=\"sn\">Stored spec</label>\n <select id=\"sn\" v-model=\"specName\">\n <option value=\"\">— choose —</option>\n <option v-for=\"s in specs\" :key=\"s.name\" :value=\"s.name\">\n {{ s.name }} ({{ s.kind }})\n </option>\n </select>\n </div>\n <p v-if=\"chosenSpec\" class=\"hint\">\n <span v-if=\"chosenSpec.description\">{{ chosenSpec.description }} — </span>\n needs\n <b v-if=\"chosenSpec.requiredVars.length\">{{ chosenSpec.requiredVars.join(', ') }}</b>\n <span v-else>no variables</span>.\n <InfoHint label=\"why variables are required\">\n A missing variable is refused by name. It is never filled in with a blank, which would\n silently give every deployment the same stack name.\n </InfoHint>\n </p>\n </template>\n\n <template v-else>\n <div class=\"field\">\n <label for=\"spec\">spec.yml</label>\n <textarea\n id=\"spec\"\n v-model=\"form.spec\"\n rows=\"18\"\n spellcheck=\"false\"\n placeholder=\"version: 1 kind: isolated stack: pr-${PR} axes: []\"\n />\n </div>\n\n <div class=\"field\" style=\"margin-top: var(--s3)\">\n <label for=\"compose\">compose.yml <span class=\"mute\">(optional)</span></label>\n <textarea\n id=\"compose\"\n v-model=\"form.compose\"\n rows=\"8\"\n spellcheck=\"false\"\n placeholder=\"Written next to spec.yml, so a compose file named compose.yml resolves\"\n />\n </div>\n <p class=\"hint\">\n Hooks must be inline shell or an absolute path.\n <InfoHint label=\"why a relative script path does not work\">\n A deployment directory only ever holds <code>spec.yml</code> and\n <code>compose.yml</code>, and hooks run from there — so\n <code>up: ./hooks/db.sh</code> has nothing to find.\n </InfoHint>\n </p>\n </template>\n\n <h2 class=\"section\" style=\"margin: var(--s5) 0 var(--s3)\">Variables</h2>\n <VarEditor v-model=\"vars\" />\n <p class=\"hint\">\n Saved with the deployment, so tearing it down later targets the same stack.\n <InfoHint label=\"how variables are remembered\">\n They are stored on the server where it supports that, and in this browser either way — so\n the actions on the deployment page send exactly these values.\n </InfoHint>\n </p>\n\n <div class=\"row\" style=\"margin-top: var(--s5)\">\n <ActionButton variant=\"primary\" :pending=\"submitting\" :disabled=\"!canSubmit\" @click=\"submit\">\n {{ submitting ? 'submitting…' : 'Submit' }}\n </ActionButton>\n <span v-if=\"result\" class=\"s-ok\">\n {{ result.created ? 'Created' : 'Replaced' }} — stack\n <b>{{ result.stack }}</b>\n <RouterLink :to=\"`/deployments/${encodeURIComponent(result.id)}`\" style=\"margin-left: 8px\">\n open →\n </RouterLink>\n </span>\n </div>\n\n <!--\n The server's rejection text IS the documentation: it names the key, the variable or the\n assert that is wrong, and often prints the corrected form. Rendered whole, newlines and\n indentation intact. Never truncate it, never collapse it, never say \"invalid spec\".\n -->\n <ErrorNote v-if=\"error\" :text=\"error\" title=\"The server rejected this submission.\" />\n </section>\n </div>\n</template>\n"],"names":["EXAMPLE_SPEC","EXAMPLE_COMPOSE","props","__props","form","ref","vars","source","specName","submitting","error","result","specs","api","r","chosenSpec","computed","s","replacing","sourceState","forkWarning","loadSource","id","watch","stored","_a","rowFor","saved","pairsFromRecord","readVars","e","canSubmit","submit","record","recordFromPairs","body","writeVars","loadDeployments","toast","problem","loadExample","_createElementBlock","_createElementVNode","_hoisted_1","_hoisted_2","_toDisplayString","_hoisted_3","_hoisted_4","_createVNode","InfoHint","_cache","_normalizeClass","_openBlock","_hoisted_7","_component_RouterLink","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","$event","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_Fragment","_hoisted_16","_renderList","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_22","_vModelText","_hoisted_23","_hoisted_24","VarEditor","_hoisted_25","_hoisted_26","ActionButton","_hoisted_27","_createBlock","ErrorNote"],"mappings":"+tCAmKMA,GAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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