@samyx/preview-stacks-ui 0.17.0 → 0.19.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-CgvjRc04.js → ActionButton.vue_vue_type_script_setup_true_lang-C0iLjBml.js} +2 -2
- package/dist/assets/{ActionButton.vue_vue_type_script_setup_true_lang-CgvjRc04.js.map → ActionButton.vue_vue_type_script_setup_true_lang-C0iLjBml.js.map} +1 -1
- package/dist/assets/{AxesTab-WenhB_vu.js → AxesTab-COaSNzrG.js} +2 -2
- package/dist/assets/{AxesTab-WenhB_vu.js.map → AxesTab-COaSNzrG.js.map} +1 -1
- package/dist/assets/{ConfigTab-CglWduAQ.js → ConfigTab-XGvUbd66.js} +2 -2
- package/dist/assets/{ConfigTab-CglWduAQ.js.map → ConfigTab-XGvUbd66.js.map} +1 -1
- package/dist/assets/{ConflictNote.vue_vue_type_script_setup_true_lang-lQT53Lug.js → ConflictNote.vue_vue_type_script_setup_true_lang-DrzDcr4X.js} +2 -2
- package/dist/assets/{ConflictNote.vue_vue_type_script_setup_true_lang-lQT53Lug.js.map → ConflictNote.vue_vue_type_script_setup_true_lang-DrzDcr4X.js.map} +1 -1
- package/dist/assets/{DangerTab-BpHYOqUf.js → DangerTab-DsSJqxzj.js} +2 -2
- package/dist/assets/{DangerTab-BpHYOqUf.js.map → DangerTab-DsSJqxzj.js.map} +1 -1
- package/dist/assets/{DashboardView-BjWlGE5y.js → DashboardView-0BLBDth-.js} +2 -2
- package/dist/assets/{DashboardView-BjWlGE5y.js.map → DashboardView-0BLBDth-.js.map} +1 -1
- package/dist/assets/{DeploymentDetailView-DUNBCl-U.js → DeploymentDetailView-dJjqob1P.js} +2 -2
- package/dist/assets/{DeploymentDetailView-DUNBCl-U.js.map → DeploymentDetailView-dJjqob1P.js.map} +1 -1
- package/dist/assets/{DeploymentsView-BSxvMk7b.js → DeploymentsView-BM9LVpU-.js} +2 -2
- package/dist/assets/{DeploymentsView-BSxvMk7b.js.map → DeploymentsView-BM9LVpU-.js.map} +1 -1
- package/dist/assets/{EquivalentCommand-CutqDImz.js → EquivalentCommand-DyCAI1Cy.js} +2 -2
- package/dist/assets/{EquivalentCommand-CutqDImz.js.map → EquivalentCommand-DyCAI1Cy.js.map} +1 -1
- package/dist/assets/{ErrorNote.vue_vue_type_script_setup_true_lang-Dc9KYyvl.js → ErrorNote.vue_vue_type_script_setup_true_lang-DjEWoD0O.js} +2 -2
- package/dist/assets/{ErrorNote.vue_vue_type_script_setup_true_lang-Dc9KYyvl.js.map → ErrorNote.vue_vue_type_script_setup_true_lang-DjEWoD0O.js.map} +1 -1
- package/dist/assets/{HelpModal.vue_vue_type_script_setup_true_lang-k07tJ3j4.js → HelpModal.vue_vue_type_script_setup_true_lang-CACw-lfW.js} +2 -2
- package/dist/assets/{HelpModal.vue_vue_type_script_setup_true_lang-k07tJ3j4.js.map → HelpModal.vue_vue_type_script_setup_true_lang-CACw-lfW.js.map} +1 -1
- package/dist/assets/JobDetailView-DsYfLQUd.js +2 -0
- package/dist/assets/JobDetailView-DsYfLQUd.js.map +1 -0
- package/dist/assets/{JobsView-CsQt3bA6.js → JobsView-UUwzBG2c.js} +2 -2
- package/dist/assets/{JobsView-CsQt3bA6.js.map → JobsView-UUwzBG2c.js.map} +1 -1
- package/dist/assets/LogViewer.vue_vue_type_script_setup_true_lang-DYfYw8_a.js +3 -0
- package/dist/assets/LogViewer.vue_vue_type_script_setup_true_lang-DYfYw8_a.js.map +1 -0
- package/dist/assets/{LoginView-P5dPUZTJ.js → LoginView-cKuF7PhJ.js} +2 -2
- package/dist/assets/{LoginView-P5dPUZTJ.js.map → LoginView-cKuF7PhJ.js.map} +1 -1
- package/dist/assets/LogsTab-QEuDGrG2.js +5 -0
- package/dist/assets/LogsTab-QEuDGrG2.js.map +1 -0
- package/dist/assets/{NotFoundView-D24ZsYHH.js → NotFoundView-Bpcd3Ptj.js} +2 -2
- package/dist/assets/{NotFoundView-D24ZsYHH.js.map → NotFoundView-Bpcd3Ptj.js.map} +1 -1
- package/dist/assets/{NotifiersView-C7MuDZxA.js → NotifiersView-B1xAKTwU.js} +2 -2
- package/dist/assets/{NotifiersView-C7MuDZxA.js.map → NotifiersView-B1xAKTwU.js.map} +1 -1
- package/dist/assets/{OverviewTab-TSZ_zuK2.js → OverviewTab-B2aCu4e0.js} +2 -2
- package/dist/assets/{OverviewTab-TSZ_zuK2.js.map → OverviewTab-B2aCu4e0.js.map} +1 -1
- package/dist/assets/{RegistriesView-DnZS4ahO.js → RegistriesView-CfblUxVo.js} +2 -2
- package/dist/assets/{RegistriesView-DnZS4ahO.js.map → RegistriesView-CfblUxVo.js.map} +1 -1
- package/dist/assets/{RelativeTime.vue_vue_type_script_setup_true_lang-CggmQ7kH.js → RelativeTime.vue_vue_type_script_setup_true_lang-Dx90hw4F.js} +2 -2
- package/dist/assets/{RelativeTime.vue_vue_type_script_setup_true_lang-CggmQ7kH.js.map → RelativeTime.vue_vue_type_script_setup_true_lang-Dx90hw4F.js.map} +1 -1
- package/dist/assets/{RequiresTab-wrhDeq3R.js → RequiresTab-DKFeob92.js} +2 -2
- package/dist/assets/{RequiresTab-wrhDeq3R.js.map → RequiresTab-DKFeob92.js.map} +1 -1
- package/dist/assets/{RoutingView-k7P_0Fiy.js → RoutingView-7SWVlOx8.js} +2 -2
- package/dist/assets/{RoutingView-k7P_0Fiy.js.map → RoutingView-7SWVlOx8.js.map} +1 -1
- package/dist/assets/{RuntimeTab-DyqlQuW3.js → RuntimeTab-CiSAV3D0.js} +2 -2
- package/dist/assets/{RuntimeTab-DyqlQuW3.js.map → RuntimeTab-CiSAV3D0.js.map} +1 -1
- package/dist/assets/{SelectMenu.vue_vue_type_script_setup_true_lang-iF5ZAUNJ.js → SelectMenu.vue_vue_type_script_setup_true_lang-B-DTK242.js} +2 -2
- package/dist/assets/{SelectMenu.vue_vue_type_script_setup_true_lang-iF5ZAUNJ.js.map → SelectMenu.vue_vue_type_script_setup_true_lang-B-DTK242.js.map} +1 -1
- package/dist/assets/{SettingsView-DGOOHUmS.js → SettingsView-BEha1Bt3.js} +2 -2
- package/dist/assets/{SettingsView-DGOOHUmS.js.map → SettingsView-BEha1Bt3.js.map} +1 -1
- package/dist/assets/{SkeletonList.vue_vue_type_script_setup_true_lang-4-wv5VUT.js → SkeletonList.vue_vue_type_script_setup_true_lang-DiCGtn2a.js} +2 -2
- package/dist/assets/{SkeletonList.vue_vue_type_script_setup_true_lang-4-wv5VUT.js.map → SkeletonList.vue_vue_type_script_setup_true_lang-DiCGtn2a.js.map} +1 -1
- package/dist/assets/{SpecDetailView-UlkXrNPX.js → SpecDetailView-l86eWf2v.js} +2 -2
- package/dist/assets/{SpecDetailView-UlkXrNPX.js.map → SpecDetailView-l86eWf2v.js.map} +1 -1
- package/dist/assets/{SpecsView-ClJTm56i.js → SpecsView-BfWq69K5.js} +2 -2
- package/dist/assets/{SpecsView-ClJTm56i.js.map → SpecsView-BfWq69K5.js.map} +1 -1
- package/dist/assets/{StateBadge.vue_vue_type_script_setup_true_lang-41WL5KQB.js → StateBadge.vue_vue_type_script_setup_true_lang-DMzCGltO.js} +2 -2
- package/dist/assets/{StateBadge.vue_vue_type_script_setup_true_lang-41WL5KQB.js.map → StateBadge.vue_vue_type_script_setup_true_lang-DMzCGltO.js.map} +1 -1
- package/dist/assets/SubmitView-6cqvVYlz.js +50 -0
- package/dist/assets/SubmitView-6cqvVYlz.js.map +1 -0
- package/dist/assets/{Teleport-BrqLogTs.js → Teleport-SesEhfqH.js} +3 -3
- package/dist/assets/{Teleport-BrqLogTs.js.map → Teleport-SesEhfqH.js.map} +1 -1
- package/dist/assets/{TerminalTab-Danh15pL.js → TerminalTab-gDAKYgTX.js} +2 -2
- package/dist/assets/{TerminalTab-Danh15pL.js.map → TerminalTab-gDAKYgTX.js.map} +1 -1
- package/dist/assets/{UsersView-CAmIqdDQ.js → UsersView-Bvs30U8o.js} +2 -2
- package/dist/assets/{UsersView-CAmIqdDQ.js.map → UsersView-Bvs30U8o.js.map} +1 -1
- package/dist/assets/{VarEditor.vue_vue_type_script_setup_true_lang-Cv1cEZ4H.js → VarEditor.vue_vue_type_script_setup_true_lang-UEG5poOe.js} +2 -2
- package/dist/assets/{VarEditor.vue_vue_type_script_setup_true_lang-Cv1cEZ4H.js.map → VarEditor.vue_vue_type_script_setup_true_lang-UEG5poOe.js.map} +1 -1
- package/dist/assets/VariablesView-Xn79UX3b.js +2 -0
- package/dist/assets/VariablesView-Xn79UX3b.js.map +1 -0
- package/dist/assets/VariablesView-m1RjJR-x.css +1 -0
- package/dist/assets/{index-CixluYeb.css → index-WMJXAtiA.css} +1 -1
- package/dist/assets/index-jLPJ82ve.js +139 -0
- package/dist/assets/index-jLPJ82ve.js.map +1 -0
- package/dist/assets/{useDeployment-B9V5NDTm.js → useDeployment-Bgo0U4-I.js} +2 -2
- package/dist/assets/{useDeployment-B9V5NDTm.js.map → useDeployment-Bgo0U4-I.js.map} +1 -1
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/dist/assets/JobDetailView-IZyvsmEF.js +0 -2
- package/dist/assets/JobDetailView-IZyvsmEF.js.map +0 -1
- package/dist/assets/LogsTab-BLUVS00E.js +0 -4
- package/dist/assets/LogsTab-BLUVS00E.js.map +0 -1
- package/dist/assets/SubmitView-DEuu72dN.js +0 -45
- package/dist/assets/SubmitView-DEuu72dN.js.map +0 -1
- package/dist/assets/index-Cuxev-ia.js +0 -134
- package/dist/assets/index-Cuxev-ia.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OverviewTab-TSZ_zuK2.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?from=${encodeURIComponent(dep.id)}`\">\n Duplicate\n </RouterLink>\n <span v-if=\"dep.detail\" class=\"mute\">·</span>\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 : 'none' }}\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","_hoisted_3","SkeletonList","_hoisted_5","_hoisted_6","_createVNode","InfoHint","_hoisted_7","_toDisplayString","_hoisted_8","_hoisted_9","row","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_Fragment","_renderList","p","_hoisted_15","_hoisted_16","_hoisted_17","s","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","o","_hoisted_23","_hoisted_24","_createTextVNode","_hoisted_25","_hoisted_26","stamp","_hoisted_27","_hoisted_4"],"mappings":"46BAQA,MAAMA,EAAYC,EAAS,IACzBC,EAAS,MACL,kEACA,gFAAA,mDAKJ,OAAAC,EAAA,EAAAC,EA2GU,UA3GVC,EA2GU,CA1GRC,EAUM,MAVNC,EAUM,CATJC,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,gBAAkB,mBAAmBH,EAAAC,CAAA,EAAI,EAAE,CAAA,EAAA,aAAK,IAEjF,CAAA,GAAAF,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,GAFiF,cAEjF,EAAA,CAAA,8BACYC,EAAAC,CAAA,EAAI,YAAhBN,EAA6C,OAA7CS,EAAqC,GAAC,YACpBJ,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,EAA2DG,EAAA,OAA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CAGJF,EAGK,KAAA,KAAA,CAFHE,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAF,EAA+B,OAAA,CAAzB,MAAM,GAAA,EAAI,WAAQ,EAAA,GACxBA,EAAuD,OAAvDuC,EAAuDzB,EAApCX,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,OAAxDwC,GAAwD1B,EAArCX,EAAAsC,CAAA,EAAMtC,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,OAAxD0C,GAAwD5B,EAArCX,EAAAsC,CAAA,EAAMtC,EAAAC,CAAA,EAAI,OAAO,SAAS,CAAA,EAAA,CAAA,CAAA,WA1FnFN,EAAgF,IAAhF6C,EAAwC,sCAAoC"}
|
|
1
|
+
{"version":3,"file":"OverviewTab-B2aCu4e0.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?from=${encodeURIComponent(dep.id)}`\">\n Duplicate\n </RouterLink>\n <span v-if=\"dep.detail\" class=\"mute\">·</span>\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 : 'none' }}\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","_hoisted_3","SkeletonList","_hoisted_5","_hoisted_6","_createVNode","InfoHint","_hoisted_7","_toDisplayString","_hoisted_8","_hoisted_9","row","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_Fragment","_renderList","p","_hoisted_15","_hoisted_16","_hoisted_17","s","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","o","_hoisted_23","_hoisted_24","_createTextVNode","_hoisted_25","_hoisted_26","stamp","_hoisted_27","_hoisted_4"],"mappings":"46BAQA,MAAMA,EAAYC,EAAS,IACzBC,EAAS,MACL,kEACA,gFAAA,mDAKJ,OAAAC,EAAA,EAAAC,EA2GU,UA3GVC,EA2GU,CA1GRC,EAUM,MAVNC,EAUM,CATJC,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,gBAAkB,mBAAmBH,EAAAC,CAAA,EAAI,EAAE,CAAA,EAAA,aAAK,IAEjF,CAAA,GAAAF,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,GAFiF,cAEjF,EAAA,CAAA,8BACYC,EAAAC,CAAA,EAAI,YAAhBN,EAA6C,OAA7CS,EAAqC,GAAC,YACpBJ,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,EAA2DG,EAAA,OAAX,KAAM,CAAA,IACvCL,EAAAC,CAAA,EAAI,QAGjBP,IAAAC,EAwFK,KAxFLW,EAwFK,CAvFHT,EAUK,KAAA,KAAA,CATHA,EAOO,OAPPU,EAOO,eAPS,UAEd,EAAA,GAAAC,EAIWC,EAAA,CAJD,MAAM,uCAAqC,WAAC,IAChD,CAAA,GAAAV,EAAA,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E/CJ,EAA+F,KAAA,KAAA,CAA3FE,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAF,EAA8B,OAAA,CAAxB,MAAM,GAAA,EAAI,UAAO,EAAA,GAAOA,EAAwD,OAAxDwC,GAAwD1B,EAArCX,EAAAsC,CAAA,EAAMtC,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,OAAxD0C,GAAwD5B,EAArCX,EAAAsC,CAAA,EAAMtC,EAAAC,CAAA,EAAI,OAAO,SAAS,CAAA,EAAA,CAAA,CAAA,WA1FnFN,EAAgF,IAAhF6C,EAAwC,sCAAoC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as E,c as i,a as t,f as s,e as h,w as m,_ as D,x,g as d,t as u,F as H,s as P,i as _,v as C,u as U,R as S,r as a,C as O,A as $,B as A,o as n,N as R}from"./index-
|
|
2
|
-
//# sourceMappingURL=RegistriesView-
|
|
1
|
+
import{d as E,c as i,a as t,f as s,e as h,w as m,_ as D,x,g as d,t as u,F as H,s as P,i as _,v as C,u as U,R as S,r as a,C as O,A as $,B as A,o as n,N as R}from"./index-jLPJ82ve.js";import{_ as B}from"./ActionButton.vue_vue_type_script_setup_true_lang-C0iLjBml.js";import{_ as F}from"./ErrorNote.vue_vue_type_script_setup_true_lang-DjEWoD0O.js";import{_ as z}from"./SkeletonList.vue_vue_type_script_setup_true_lang-DiCGtn2a.js";import{_ as L}from"./HelpModal.vue_vue_type_script_setup_true_lang-CACw-lfW.js";import"./Teleport-SesEhfqH.js";const M={class:"page-head"},W={class:"sub"},q={key:1,class:"banner failed"},G={key:2,class:"banner warn"},J={class:"mono"},K={class:"panel"},Q={class:"phead"},X={key:0,class:"mute break",style:{"font-size":"var(--t-sm)"}},Y={class:"mute"},Z={key:1,class:"kvlist"},ee={class:"k break",style:{width:"220px"}},te={class:"v row"},se={key:0,class:"badge warn"},oe={key:2,class:"mute"},ne={class:"panel"},le={class:"dim"},ae={class:"field",style:{"max-width":"380px"}},ie={class:"field",style:{"max-width":"380px"}},re={class:"field",style:{"max-width":"380px"}},de={class:"row",style:{"margin-top":"var(--s4)"}},ue={key:0,class:"mute"},pe={class:"hint"},ve={class:"mono"},we=E({__name:"RegistriesView",setup(ce){const k=a([]),b=a([]),g=a(""),V=a(null),N=a(!1),p=a(""),r=a(""),v=a(""),c=a(""),f=a(!1),y=a(""),T=O(()=>!!S.token&&!f.value&&!!r.value&&!!v.value&&!!c.value);async function w(){const o=await $.get("/api/registries");if(N.value=!0,!o.ok){p.value=A(o,"load the registry credentials");return}p.value="",k.value=o.body.entries??[],b.value=o.body.helpers??[],g.value=o.body.dir??"",V.value=o.body.writable??!1}w();async function I(){f.value=!0,y.value="";const o=await $.put(`/api/registries/${encodeURIComponent(r.value)}`,{username:v.value,password:c.value});if(f.value=!1,!o.ok){y.value=A(o,"store this credential");return}c.value="";const e=o.body.registry;e&&e!==r.value?R("ok",`Stored for ${e} — Docker Hub's canonical key.`):R("ok",`Stored for ${e||r.value}. It applies to the next pull.`),r.value="",v.value="",w()}async function j(o){const e=await $.del(`/api/registries/${encodeURIComponent(o)}`);if(!e.ok){p.value=A(e,"forget this credential");return}R("ok",`Forgot ${o}.`),w()}return(o,e)=>(n(),i("div",null,[t("div",M,[t("div",null,[e[5]||(e[5]=t("h1",null,"Registries",-1)),t("div",W,[e[4]||(e[4]=s(" Credentials for pulling private images ",-1)),h(D,{label:"why a host login is not enough"},{default:m(()=>[...e[3]||(e[3]=[s(" A pull is authenticated by the docker ",-1),t("em",null,"client",-1),s(", not the daemon: it reads its own ",-1),t("code",null,"config.json",-1),s(" and hands the credential over. pstack's client runs inside the control container, so a ",-1),t("code",null,"docker login",-1),s(" on the host writes a file it cannot see — and the pull fails on a host that is logged in. ",-1)])]),_:1})])])]),p.value?(n(),x(F,{key:0,text:p.value,title:"Could not load the registry credentials."},null,8,["text"])):d("",!0),V.value===!1?(n(),i("div",q,[e[8]||(e[8]=t("b",null,"Credentials cannot be saved here yet.",-1)),t("p",null,[e[7]||(e[7]=s(" Re-run setup on the host — it is safe to repeat. ",-1)),h(L,{title:"Why this happens"},{default:m(()=>[...e[6]||(e[6]=[t("p",null," Saving a credential needs a writable directory that the control stack only started providing in version 0.7.0. A host set up before then does not have it, so this page can list credentials but not add one. ",-1),t("p",null," Re-running setup is safe to repeat and recreates the control containers with the directory in place. Nothing already stored is lost. ",-1)])]),_:1})])])):d("",!0),b.value.length?(n(),i("div",G,[e[11]||(e[11]=t("b",null,"This file uses a credential helper, which will not work here.",-1)),t("p",null,[e[9]||(e[9]=s(" Found: ",-1)),t("span",J,u(b.value.join(", ")),1),e[10]||(e[10]=s(". A helper keeps the secret outside the file — in an OS keychain, usually — and the helper binary does not exist in this container, so pulls from private registries will fail. Add the credential below instead, which stores it in the file. ",-1))])])):d("",!0),t("section",K,[t("div",Q,[e[12]||(e[12]=t("h2",{class:"section"},"Stored",-1)),e[13]||(e[13]=t("span",{class:"grow"},null,-1)),g.value?(n(),i("span",X,[t("span",Y,u(g.value),1)])):d("",!0)]),N.value?k.value.length?(n(),i("ul",Z,[(n(!0),i(H,null,P(k.value,l=>(n(),i("li",{key:l.registry},[t("span",ee,[t("b",null,u(l.registry),1)]),t("span",te,[t("span",null,u(l.username??"unknown user"),1),l.viaHelper?(n(),i("span",se,"via helper")):d("",!0),e[15]||(e[15]=t("span",{class:"grow"},null,-1)),h(B,{disabled:!U(S).token,variant:"danger",onClick:fe=>j(l.registry)},{default:m(()=>[...e[14]||(e[14]=[s(" Forget ",-1)])]),_:1},8,["disabled","onClick"])])]))),128))])):(n(),i("p",oe," Nothing stored. Public images need no credential — this is only for a private registry. ")):(n(),x(z,{key:0,rows:2}))]),t("section",ne,[e[26]||(e[26]=t("h2",{class:"section",style:{"margin-bottom":"var(--s3)"}},"Add a credential",-1)),t("p",le,[e[17]||(e[17]=s(" Applies to the ",-1)),e[18]||(e[18]=t("b",null,"next pull",-1)),e[19]||(e[19]=s(" — nothing needs restarting. ",-1)),h(D,{label:"why no restart is needed"},{default:m(()=>[...e[16]||(e[16]=[s(" The docker client re-reads ",-1),t("code",null,"config.json",-1),s(" on every invocation, so there is no cache to bust. Storing one now is enough for a deploy started a second later. ",-1)])]),_:1})]),t("div",ae,[e[20]||(e[20]=t("label",{for:"host"},"Registry",-1)),_(t("input",{id:"host","onUpdate:modelValue":e[0]||(e[0]=l=>r.value=l),type:"text",placeholder:"ghcr.io",spellcheck:"false",autocomplete:"off"},null,512),[[C,r.value,void 0,{trim:!0}]]),e[21]||(e[21]=t("div",{class:"mute hint"}," Docker Hub is stored under its canonical key. ",-1))]),t("div",ie,[e[22]||(e[22]=t("label",{for:"user"},"Username",-1)),_(t("input",{id:"user","onUpdate:modelValue":e[1]||(e[1]=l=>v.value=l),type:"text",spellcheck:"false",autocomplete:"off"},null,512),[[C,v.value,void 0,{trim:!0}]])]),t("div",re,[e[23]||(e[23]=t("label",{for:"pass"},"Password or token",-1)),_(t("input",{id:"pass","onUpdate:modelValue":e[2]||(e[2]=l=>c.value=l),type:"password",autocomplete:"off",spellcheck:"false"},null,512),[[C,c.value]]),e[24]||(e[24]=t("div",{class:"mute hint"}," Prefer a token scoped to reading packages. Stored on the host as reversible base64, exactly as Stored the same way a terminal login stores it — never sent back to this page. ",-1))]),y.value?(n(),x(F,{key:0,text:y.value,title:"Could not store this credential."},null,8,["text"])):d("",!0),t("div",de,[h(B,{variant:"primary",pending:f.value,disabled:!T.value,onClick:I},{default:m(()=>[s(u(f.value?"Storing…":"Store"),1)]),_:1},8,["pending","disabled"]),U(S).token?d("",!0):(n(),i("span",ue,"Storing needs an access token."))]),t("p",pe,[e[25]||(e[25]=s(" Or from the host, which writes the same file: ",-1)),t("span",ve,"docker login --config "+u(g.value||"<DATA_DIR>/control/docker")+" <registry>",1)])])]))}});export{we as default};
|
|
2
|
+
//# sourceMappingURL=RegistriesView-CfblUxVo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RegistriesView-DnZS4ahO.js","sources":["../../src/views/RegistriesView.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Private registry credentials.\n *\n * WHY THIS PAGE EXISTS. An image pull is authenticated by the **client**, not the daemon: `docker pull`\n * reads its own `config.json` and hands the credential to the daemon. pstack shells out to compose from\n * inside the control container, so a `docker login` on the host writes a file that client cannot see —\n * and a private image fails with `pull access denied` on a host that is demonstrably logged in.\n *\n * WRITE-ONLY, DELIBERATELY. A `config.json` entry is `base64(\"user:password\")` — reversible, not\n * encrypted. So there is no read path for it anywhere in the API, and this page shows hostnames and\n * usernames only. No reveal control, because the plaintext was never sent here; the same reasoning as\n * the masked variables. Re-entering a credential replaces it.\n *\n * The credential applies to the **next pull** — the CLI re-reads the file on every invocation, so\n * nothing needs restarting and there is no cache to bust. That is the property that makes \"add creds on\n * demand\" work at all, and it is stated on the page because otherwise the natural assumption is that a\n * redeploy is needed.\n */\nimport { computed, ref } from 'vue';\nimport { api, problem } from '../api/client';\nimport type { RegistriesResponse, RegistryEntry } from '../api/types';\nimport { settings } from '../composables/useSettings';\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';\nimport HelpModal from '../components/HelpModal.vue';\n\nconst entries = ref<RegistryEntry[]>([]);\nconst helpers = ref<string[]>([]);\nconst dir = ref('');\nconst writable = ref<boolean | null>(null);\nconst loaded = ref(false);\nconst listError = ref('');\n\nconst host = ref('');\nconst username = ref('');\nconst password = ref('');\nconst saving = ref(false);\nconst formError = ref('');\n\nconst canSave = computed(\n () => !!settings.token && !saving.value && !!host.value && !!username.value && !!password.value,\n);\n\nasync function load(): Promise<void> {\n const r = await api.get<RegistriesResponse>('/api/registries');\n loaded.value = true;\n if (!r.ok) {\n listError.value = problem(r, 'load the registry credentials');\n return;\n }\n listError.value = '';\n entries.value = r.body.entries ?? [];\n helpers.value = r.body.helpers ?? [];\n dir.value = r.body.dir ?? '';\n writable.value = r.body.writable ?? false;\n}\n\nvoid load();\n\nasync function save(): Promise<void> {\n saving.value = true;\n formError.value = '';\n const r = await api.put<{ registry: string }>(\n `/api/registries/${encodeURIComponent(host.value)}`,\n { username: username.value, password: password.value },\n );\n saving.value = false;\n if (!r.ok) {\n formError.value = problem(r, 'store this credential');\n return;\n }\n // Cleared immediately: there is no reason for a password to stay in a form field after it is stored,\n // and the page cannot read it back to re-populate one.\n password.value = '';\n const stored = r.body.registry;\n if (stored && stored !== host.value) {\n // Docker Hub's canonical key differs from what anyone types; saying so avoids \"I stored it and it\n // still is not used\".\n toast('ok', `Stored for ${stored} — Docker Hub's canonical key.`);\n } else {\n toast('ok', `Stored for ${stored || host.value}. It applies to the next pull.`);\n }\n host.value = '';\n username.value = '';\n void load();\n}\n\nasync function forget(registry: string): Promise<void> {\n const r = await api.del(`/api/registries/${encodeURIComponent(registry)}`);\n if (!r.ok) {\n listError.value = problem(r, 'forget this credential');\n return;\n }\n toast('ok', `Forgot ${registry}.`);\n void load();\n}\n</script>\n\n<template>\n <div>\n <div class=\"page-head\">\n <div>\n <h1>Registries</h1>\n <div class=\"sub\">\n Credentials for pulling private images\n <InfoHint label=\"why a host login is not enough\">\n A pull is authenticated by the docker <em>client</em>, not the daemon: it reads its own\n <code>config.json</code> and hands the credential over. pstack's client runs inside the\n control container, so a <code>docker login</code> on the host writes a file it cannot see —\n and the pull fails on a host that is logged in.\n </InfoHint>\n </div>\n </div>\n </div>\n\n <ErrorNote v-if=\"listError\" :text=\"listError\" title=\"Could not load the registry credentials.\" />\n\n <div v-if=\"writable === false\" class=\"banner failed\">\n <b>Credentials cannot be saved here yet.</b>\n <p>\n Re-run setup on the host — it is safe to repeat.\n <HelpModal title=\"Why this happens\">\n <p>\n Saving a credential needs a writable directory that the control stack only started\n providing in version 0.7.0. A host set up before then does not have it, so this page can\n list credentials but not add one.\n </p>\n <p>\n Re-running setup is safe to repeat and recreates the control containers with the\n directory in place. Nothing already stored is lost.\n </p>\n </HelpModal>\n </p>\n </div>\n\n <!--\n The trap worth naming: a config.json copied from a laptop usually has credsStore and NO auths,\n because the secrets are in the OS keychain. Inside the container that helper does not exist, so\n every pull fails and an empty list looks like the reason.\n -->\n <div v-if=\"helpers.length\" class=\"banner warn\">\n <b>This file uses a credential helper, which will not work here.</b>\n <p>\n Found: <span class=\"mono\">{{ helpers.join(', ') }}</span>. A helper keeps the secret outside the\n file — in an OS keychain, usually — and the helper binary does not exist in this container, so\n pulls from private registries will fail. Add the credential below instead, which\n stores it in the file.\n </p>\n </div>\n\n <section class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"section\">Stored</h2>\n <span class=\"grow\" />\n <span v-if=\"dir\" class=\"mute break\" style=\"font-size: var(--t-sm)\"><span class=\"mute\">{{ dir }}</span></span>\n </div>\n\n <SkeletonList v-if=\"!loaded\" :rows=\"2\" />\n <ul v-else-if=\"entries.length\" class=\"kvlist\">\n <li v-for=\"e in entries\" :key=\"e.registry\">\n <span class=\"k break\" style=\"width: 220px\"><b>{{ e.registry }}</b></span>\n <span class=\"v row\">\n <span>{{ e.username ?? 'unknown user' }}</span>\n <span v-if=\"e.viaHelper\" class=\"badge warn\">via helper</span>\n <span class=\"grow\" />\n <ActionButton :disabled=\"!settings.token\" variant=\"danger\" @click=\"forget(e.registry)\">\n Forget\n </ActionButton>\n </span>\n </li>\n </ul>\n <p v-else class=\"mute\">\n Nothing stored. Public images need no credential — this is only for a private registry.\n </p>\n </section>\n\n <section class=\"panel\">\n <h2 class=\"section\" style=\"margin-bottom: var(--s3)\">Add a credential</h2>\n\n <p class=\"dim\">\n Applies to the <b>next pull</b> — nothing needs restarting.\n <InfoHint label=\"why no restart is needed\">\n The docker client re-reads <code>config.json</code> on every invocation, so there is no cache\n to bust. Storing one now is enough for a deploy started a second later.\n </InfoHint>\n </p>\n\n <div class=\"field\" style=\"max-width: 380px\">\n <label for=\"host\">Registry</label>\n <input\n id=\"host\"\n v-model.trim=\"host\"\n type=\"text\"\n placeholder=\"ghcr.io\"\n spellcheck=\"false\"\n autocomplete=\"off\"\n />\n <div class=\"mute hint\">\n Docker Hub is stored under its canonical key.\n </div>\n </div>\n\n <div class=\"field\" style=\"max-width: 380px\">\n <label for=\"user\">Username</label>\n <input id=\"user\" v-model.trim=\"username\" type=\"text\" spellcheck=\"false\" autocomplete=\"off\" />\n </div>\n\n <div class=\"field\" style=\"max-width: 380px\">\n <label for=\"pass\">Password or token</label>\n <input id=\"pass\" v-model=\"password\" type=\"password\" autocomplete=\"off\" spellcheck=\"false\" />\n <div class=\"mute hint\">\n Prefer a token scoped to reading packages. Stored on the host as reversible base64, exactly as\n Stored the same way a terminal login stores it — never sent back to this page.\n </div>\n </div>\n\n <ErrorNote v-if=\"formError\" :text=\"formError\" title=\"Could not store this credential.\" />\n\n <div class=\"row\" style=\"margin-top: var(--s4)\">\n <ActionButton variant=\"primary\" :pending=\"saving\" :disabled=\"!canSave\" @click=\"save\">\n {{ saving ? 'Storing…' : 'Store' }}\n </ActionButton>\n <span v-if=\"!settings.token\" class=\"mute\">Storing needs an access token.</span>\n </div>\n\n <p class=\"hint\">\n Or from the host, which writes the same file:\n <span class=\"mono\">docker login --config {{ dir || '<DATA_DIR>/control/docker' }} <registry></span>\n </p>\n </section>\n </div>\n</template>\n"],"names":["entries","ref","helpers","dir","writable","loaded","listError","host","username","password","saving","formError","canSave","computed","settings","load","r","api","problem","save","stored","toast","forget","registry","_createElementBlock","_createElementVNode","_hoisted_1","_cache","_hoisted_2","_createVNode","InfoHint","_createBlock","ErrorNote","_openBlock","_hoisted_3","HelpModal","_hoisted_4","_hoisted_5","_toDisplayString","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_Fragment","_renderList","e","_hoisted_11","_hoisted_12","_hoisted_13","ActionButton","_unref","$event","_hoisted_14","SkeletonList","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23"],"mappings":"8tCA8BA,MAAMA,EAAUC,EAAqB,EAAE,EACjCC,EAAUD,EAAc,EAAE,EAC1BE,EAAMF,EAAI,EAAE,EACZG,EAAWH,EAAoB,IAAI,EACnCI,EAASJ,EAAI,EAAK,EAClBK,EAAYL,EAAI,EAAE,EAElBM,EAAON,EAAI,EAAE,EACbO,EAAWP,EAAI,EAAE,EACjBQ,EAAWR,EAAI,EAAE,EACjBS,EAAST,EAAI,EAAK,EAClBU,EAAYV,EAAI,EAAE,EAElBW,EAAUC,EACd,IAAM,CAAC,CAACC,EAAS,OAAS,CAACJ,EAAO,OAAS,CAAC,CAACH,EAAK,OAAS,CAAC,CAACC,EAAS,OAAS,CAAC,CAACC,EAAS,KAAA,EAG5F,eAAeM,GAAsB,CACnC,MAAMC,EAAI,MAAMC,EAAI,IAAwB,iBAAiB,EAE7D,GADAZ,EAAO,MAAQ,GACX,CAACW,EAAE,GAAI,CACTV,EAAU,MAAQY,EAAQF,EAAG,+BAA+B,EAC5D,MACF,CACAV,EAAU,MAAQ,GAClBN,EAAQ,MAAQgB,EAAE,KAAK,SAAW,CAAA,EAClCd,EAAQ,MAAQc,EAAE,KAAK,SAAW,CAAA,EAClCb,EAAI,MAAQa,EAAE,KAAK,KAAO,GAC1BZ,EAAS,MAAQY,EAAE,KAAK,UAAY,EACtC,CAEKD,EAAA,EAEL,eAAeI,GAAsB,CACnCT,EAAO,MAAQ,GACfC,EAAU,MAAQ,GAClB,MAAMK,EAAI,MAAMC,EAAI,IAClB,mBAAmB,mBAAmBV,EAAK,KAAK,CAAC,GACjD,CAAE,SAAUC,EAAS,MAAO,SAAUC,EAAS,KAAA,CAAM,EAGvD,GADAC,EAAO,MAAQ,GACX,CAACM,EAAE,GAAI,CACTL,EAAU,MA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GAGM,CAFJ/B,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAF,EAAkC,QAAA,CAA3B,IAAI,MAAA,EAAO,WAAQ,EAAA,KAC1BA,EAA6F,QAAA,CAAtF,GAAG,4CAAqBjB,EAAQ,MAAA4C,GAAE,KAAK,OAAO,WAAW,QAAQ,aAAa,KAAA,gBAAtD5C,EAAA,aAAN,CAAA,KAAR,EAAA,CAAuB,MAG1CiB,EAOM,MAPNkC,GAOM,CANJhC,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAF,EAA2C,QAAA,CAApC,IAAI,MAAA,EAAO,oBAAiB,EAAA,KACnCA,EAA4F,QAAA,CAArF,GAAG,4CAAgBhB,EAAQ,MAAA2C,GAAE,KAAK,WAAW,aAAa,MAAM,WAAW,OAAA,gBAAxD3C,EAAA,KAAQ,CAAA,GAClCkB,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAF,EAGM,MAAA,CAHD,MAAM,aAAY,kLAGvB,EAAA,EAAA,GAGed,EAAA,WAAjBoB,EAAyFC,EAAA,OAA5D,KAAMrB,EAAA,MAAW,MAAM,kCAAA,6BAEpDc,EAKM,MALNmC,GAKM,CAJJ/B,EAEeqB,EAAA,CAFD,QAAQ,UAAW,QAASxC,EAAA,MAAS,UAAWE,EAAA,MAAU,QAAOO,CAAA,aAC7E,IAAmC,KAAhCT,EAAA,MAAM,WAAA,OAAA,EAAA,CAAA,CAAA,kCAEEyC,EAAArC,CAAA,EAAS,oBAAtBU,EAA+E,OAA/EqC,GAA0C,gCAA8B,KAG1EpC,EAGI,IAHJqC,GAGI,iBAHY,kDAEd,EAAA,GAAArC,EAAyG,OAAzGsC,GAAmB,yBAAsBzB,EAAGnC,EAAA,oCAAqC,cAAiB,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"RegistriesView-CfblUxVo.js","sources":["../../src/views/RegistriesView.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Private registry credentials.\n *\n * WHY THIS PAGE EXISTS. An image pull is authenticated by the **client**, not the daemon: `docker pull`\n * reads its own `config.json` and hands the credential to the daemon. pstack shells out to compose from\n * inside the control container, so a `docker login` on the host writes a file that client cannot see —\n * and a private image fails with `pull access denied` on a host that is demonstrably logged in.\n *\n * WRITE-ONLY, DELIBERATELY. A `config.json` entry is `base64(\"user:password\")` — reversible, not\n * encrypted. So there is no read path for it anywhere in the API, and this page shows hostnames and\n * usernames only. No reveal control, because the plaintext was never sent here; the same reasoning as\n * the masked variables. Re-entering a credential replaces it.\n *\n * The credential applies to the **next pull** — the CLI re-reads the file on every invocation, so\n * nothing needs restarting and there is no cache to bust. That is the property that makes \"add creds on\n * demand\" work at all, and it is stated on the page because otherwise the natural assumption is that a\n * redeploy is needed.\n */\nimport { computed, ref } from 'vue';\nimport { api, problem } from '../api/client';\nimport type { RegistriesResponse, RegistryEntry } from '../api/types';\nimport { settings } from '../composables/useSettings';\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';\nimport HelpModal from '../components/HelpModal.vue';\n\nconst entries = ref<RegistryEntry[]>([]);\nconst helpers = ref<string[]>([]);\nconst dir = ref('');\nconst writable = ref<boolean | null>(null);\nconst loaded = ref(false);\nconst listError = ref('');\n\nconst host = ref('');\nconst username = ref('');\nconst password = ref('');\nconst saving = ref(false);\nconst formError = ref('');\n\nconst canSave = computed(\n () => !!settings.token && !saving.value && !!host.value && !!username.value && !!password.value,\n);\n\nasync function load(): Promise<void> {\n const r = await api.get<RegistriesResponse>('/api/registries');\n loaded.value = true;\n if (!r.ok) {\n listError.value = problem(r, 'load the registry credentials');\n return;\n }\n listError.value = '';\n entries.value = r.body.entries ?? [];\n helpers.value = r.body.helpers ?? [];\n dir.value = r.body.dir ?? '';\n writable.value = r.body.writable ?? false;\n}\n\nvoid load();\n\nasync function save(): Promise<void> {\n saving.value = true;\n formError.value = '';\n const r = await api.put<{ registry: string }>(\n `/api/registries/${encodeURIComponent(host.value)}`,\n { username: username.value, password: password.value },\n );\n saving.value = false;\n if (!r.ok) {\n formError.value = problem(r, 'store this credential');\n return;\n }\n // Cleared immediately: there is no reason for a password to stay in a form field after it is stored,\n // and the page cannot read it back to re-populate one.\n password.value = '';\n const stored = r.body.registry;\n if (stored && stored !== host.value) {\n // Docker Hub's canonical key differs from what anyone types; saying so avoids \"I stored it and it\n // still is not used\".\n toast('ok', `Stored for ${stored} — Docker Hub's canonical key.`);\n } else {\n toast('ok', `Stored for ${stored || host.value}. It applies to the next pull.`);\n }\n host.value = '';\n username.value = '';\n void load();\n}\n\nasync function forget(registry: string): Promise<void> {\n const r = await api.del(`/api/registries/${encodeURIComponent(registry)}`);\n if (!r.ok) {\n listError.value = problem(r, 'forget this credential');\n return;\n }\n toast('ok', `Forgot ${registry}.`);\n void load();\n}\n</script>\n\n<template>\n <div>\n <div class=\"page-head\">\n <div>\n <h1>Registries</h1>\n <div class=\"sub\">\n Credentials for pulling private images\n <InfoHint label=\"why a host login is not enough\">\n A pull is authenticated by the docker <em>client</em>, not the daemon: it reads its own\n <code>config.json</code> and hands the credential over. pstack's client runs inside the\n control container, so a <code>docker login</code> on the host writes a file it cannot see —\n and the pull fails on a host that is logged in.\n </InfoHint>\n </div>\n </div>\n </div>\n\n <ErrorNote v-if=\"listError\" :text=\"listError\" title=\"Could not load the registry credentials.\" />\n\n <div v-if=\"writable === false\" class=\"banner failed\">\n <b>Credentials cannot be saved here yet.</b>\n <p>\n Re-run setup on the host — it is safe to repeat.\n <HelpModal title=\"Why this happens\">\n <p>\n Saving a credential needs a writable directory that the control stack only started\n providing in version 0.7.0. A host set up before then does not have it, so this page can\n list credentials but not add one.\n </p>\n <p>\n Re-running setup is safe to repeat and recreates the control containers with the\n directory in place. Nothing already stored is lost.\n </p>\n </HelpModal>\n </p>\n </div>\n\n <!--\n The trap worth naming: a config.json copied from a laptop usually has credsStore and NO auths,\n because the secrets are in the OS keychain. Inside the container that helper does not exist, so\n every pull fails and an empty list looks like the reason.\n -->\n <div v-if=\"helpers.length\" class=\"banner warn\">\n <b>This file uses a credential helper, which will not work here.</b>\n <p>\n Found: <span class=\"mono\">{{ helpers.join(', ') }}</span>. A helper keeps the secret outside the\n file — in an OS keychain, usually — and the helper binary does not exist in this container, so\n pulls from private registries will fail. Add the credential below instead, which\n stores it in the file.\n </p>\n </div>\n\n <section class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"section\">Stored</h2>\n <span class=\"grow\" />\n <span v-if=\"dir\" class=\"mute break\" style=\"font-size: var(--t-sm)\"><span class=\"mute\">{{ dir }}</span></span>\n </div>\n\n <SkeletonList v-if=\"!loaded\" :rows=\"2\" />\n <ul v-else-if=\"entries.length\" class=\"kvlist\">\n <li v-for=\"e in entries\" :key=\"e.registry\">\n <span class=\"k break\" style=\"width: 220px\"><b>{{ e.registry }}</b></span>\n <span class=\"v row\">\n <span>{{ e.username ?? 'unknown user' }}</span>\n <span v-if=\"e.viaHelper\" class=\"badge warn\">via helper</span>\n <span class=\"grow\" />\n <ActionButton :disabled=\"!settings.token\" variant=\"danger\" @click=\"forget(e.registry)\">\n Forget\n </ActionButton>\n </span>\n </li>\n </ul>\n <p v-else class=\"mute\">\n Nothing stored. Public images need no credential — this is only for a private registry.\n </p>\n </section>\n\n <section class=\"panel\">\n <h2 class=\"section\" style=\"margin-bottom: var(--s3)\">Add a credential</h2>\n\n <p class=\"dim\">\n Applies to the <b>next pull</b> — nothing needs restarting.\n <InfoHint label=\"why no restart is needed\">\n The docker client re-reads <code>config.json</code> on every invocation, so there is no cache\n to bust. Storing one now is enough for a deploy started a second later.\n </InfoHint>\n </p>\n\n <div class=\"field\" style=\"max-width: 380px\">\n <label for=\"host\">Registry</label>\n <input\n id=\"host\"\n v-model.trim=\"host\"\n type=\"text\"\n placeholder=\"ghcr.io\"\n spellcheck=\"false\"\n autocomplete=\"off\"\n />\n <div class=\"mute hint\">\n Docker Hub is stored under its canonical key.\n </div>\n </div>\n\n <div class=\"field\" style=\"max-width: 380px\">\n <label for=\"user\">Username</label>\n <input id=\"user\" v-model.trim=\"username\" type=\"text\" spellcheck=\"false\" autocomplete=\"off\" />\n </div>\n\n <div class=\"field\" style=\"max-width: 380px\">\n <label for=\"pass\">Password or token</label>\n <input id=\"pass\" v-model=\"password\" type=\"password\" autocomplete=\"off\" spellcheck=\"false\" />\n <div class=\"mute hint\">\n Prefer a token scoped to reading packages. Stored on the host as reversible base64, exactly as\n Stored the same way a terminal login stores it — never sent back to this page.\n </div>\n </div>\n\n <ErrorNote v-if=\"formError\" :text=\"formError\" title=\"Could not store this credential.\" />\n\n <div class=\"row\" style=\"margin-top: var(--s4)\">\n <ActionButton variant=\"primary\" :pending=\"saving\" :disabled=\"!canSave\" @click=\"save\">\n {{ saving ? 'Storing…' : 'Store' }}\n </ActionButton>\n <span v-if=\"!settings.token\" class=\"mute\">Storing needs an access token.</span>\n </div>\n\n <p class=\"hint\">\n Or from the host, which writes the same file:\n <span class=\"mono\">docker login --config {{ dir || '<DATA_DIR>/control/docker' }} <registry></span>\n </p>\n </section>\n </div>\n</template>\n"],"names":["entries","ref","helpers","dir","writable","loaded","listError","host","username","password","saving","formError","canSave","computed","settings","load","r","api","problem","save","stored","toast","forget","registry","_createElementBlock","_createElementVNode","_hoisted_1","_cache","_hoisted_2","_createVNode","InfoHint","_createBlock","ErrorNote","_openBlock","_hoisted_3","HelpModal","_hoisted_4","_hoisted_5","_toDisplayString","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_Fragment","_renderList","e","_hoisted_11","_hoisted_12","_hoisted_13","ActionButton","_unref","$event","_hoisted_14","SkeletonList","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23"],"mappings":"8tCA8BA,MAAMA,EAAUC,EAAqB,EAAE,EACjCC,EAAUD,EAAc,EAAE,EAC1BE,EAAMF,EAA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AAA,KAAR,EAAA,CAAuB,MAG1CiB,EAOM,MAPNkC,GAOM,CANJhC,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAF,EAA2C,QAAA,CAApC,IAAI,MAAA,EAAO,oBAAiB,EAAA,KACnCA,EAA4F,QAAA,CAArF,GAAG,4CAAgBhB,EAAQ,MAAA2C,GAAE,KAAK,WAAW,aAAa,MAAM,WAAW,OAAA,gBAAxD3C,EAAA,KAAQ,CAAA,GAClCkB,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAF,EAGM,MAAA,CAHD,MAAM,aAAY,kLAGvB,EAAA,EAAA,GAGed,EAAA,WAAjBoB,EAAyFC,EAAA,OAA5D,KAAMrB,EAAA,MAAW,MAAM,kCAAA,6BAEpDc,EAKM,MALNmC,GAKM,CAJJ/B,EAEeqB,EAAA,CAFD,QAAQ,UAAW,QAASxC,EAAA,MAAS,UAAWE,EAAA,MAAU,QAAOO,CAAA,aAC7E,IAAmC,KAAhCT,EAAA,MAAM,WAAA,OAAA,EAAA,CAAA,CAAA,kCAEEyC,EAAArC,CAAA,EAAS,oBAAtBU,EAA+E,OAA/EqC,GAA0C,gCAA8B,KAG1EpC,EAGI,IAHJqC,GAGI,iBAHY,kDAEd,EAAA,GAAArC,EAAyG,OAAzGsC,GAAmB,yBAAsBzB,EAAGnC,EAAA,oCAAqC,cAAiB,CAAA,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as i,b as l}from"./useFormat-CKJxQp_i.js";import{d as r,Y as m,
|
|
2
|
-
//# sourceMappingURL=RelativeTime.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import{s as i,b as l}from"./useFormat-CKJxQp_i.js";import{d as r,Y as m,a4 as c,o as u,c as d,u as f,t as p,r as v,C as w}from"./index-jLPJ82ve.js";const D=["datetime","title"],I=15e3,C=r({__name:"RelativeTime",props:{at:{}},setup(e){const o=e,n=v(Date.now());let t=null,a=0;m(()=>{a++,t||(t=setInterval(()=>n.value=Date.now(),I))}),c(()=>{a--,a===0&&t&&(clearInterval(t),t=null)});const s=w(()=>(n.value,l(o.at)));return(S,_)=>(u(),d("time",{datetime:e.at?new Date(e.at).toISOString():void 0,title:f(i)(e.at)},p(s.value),9,D))}});export{C as _};
|
|
2
|
+
//# sourceMappingURL=RelativeTime.vue_vue_type_script_setup_true_lang-Dx90hw4F.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RelativeTime.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
{"version":3,"file":"RelativeTime.vue_vue_type_script_setup_true_lang-Dx90hw4F.js","sources":["../../src/components/RelativeTime.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A timestamp that stays true — `2m ago` becomes `3m ago` without a reload.\n *\n * WHY NOT JUST CALL `ago()`. It is already correct at first render and wrong a minute later, and a\n * control plane is a page people leave open while watching a deploy. A relative time that silently\n * stops advancing is worse than an absolute one: it looks live and is not.\n *\n * ONE TICKER FOR THE WHOLE PAGE. A per-instance `setInterval` on a hundred-row job list is a\n * hundred timers waking the tab independently. This is a single module-level interval that bumps\n * one shared ref; every instance recomputes from it, and the interval only exists while at least\n * one instance is mounted.\n *\n * THE EXACT TIME IS NEVER LOST — it moves into `title`. \"3m ago\" is what you scan; the ISO stamp is\n * what you need the moment you are correlating with a log somewhere else, and throwing it away to\n * gain readability would be a bad trade.\n */\nimport { computed, onMounted, onUnmounted, ref } from 'vue';\nimport { ago, stamp } from '../composables/useFormat';\n\nconst props = defineProps<{ at: number | undefined }>();\n\nconst now = ref(Date.now());\nlet timer: ReturnType<typeof setInterval> | null = null;\nlet mounted = 0;\n\n/**\n * 15s, not 1s. The coarsest unit this renders is a minute, so ticking every second would repaint\n * sixty times to change a label once; 15s bounds the staleness to a quarter of the smallest unit,\n * which nobody can perceive.\n */\nconst TICK_MS = 15_000;\n\nonMounted(() => {\n mounted++;\n if (!timer) timer = setInterval(() => (now.value = Date.now()), TICK_MS);\n});\nonUnmounted(() => {\n mounted--;\n if (mounted === 0 && timer) {\n clearInterval(timer);\n timer = null;\n }\n});\n\n// Reading `now` is what subscribes this instance to the ticker; `ago` itself calls Date.now().\nconst text = computed(() => (now.value, ago(props.at)));\n</script>\n\n<template>\n <time :datetime=\"at ? new Date(at).toISOString() : undefined\" :title=\"stamp(at)\">{{ text }}</time>\n</template>\n"],"names":["TICK_MS","props","__props","now","ref","timer","mounted","onMounted","onUnmounted","text","computed","ago","_createElementBlock","_unref","stamp","_hoisted_1"],"mappings":"iLA+BMA,EAAU,uDAXhB,MAAMC,EAAQC,EAERC,EAAMC,EAAI,KAAK,IAAA,CAAK,EAC1B,IAAIC,EAA+C,KAC/CC,EAAU,EASdC,EAAU,IAAM,CACdD,IACKD,IAAOA,EAAQ,YAAY,IAAOF,EAAI,MAAQ,KAAK,IAAA,EAAQH,CAAO,EACzE,CAAC,EACDQ,EAAY,IAAM,CAChBF,IACIA,IAAY,GAAKD,IACnB,cAAcA,CAAK,EACnBA,EAAQ,KAEZ,CAAC,EAGD,MAAMI,EAAOC,EAAS,KAAOP,EAAI,MAAOQ,EAAIV,EAAM,EAAE,EAAE,oBAIpDW,EAAkG,OAAA,CAA3F,SAAUV,KAAE,IAAO,KAAKA,EAAA,EAAE,EAAE,YAAA,EAAgB,OAAY,MAAOW,EAAAC,CAAA,EAAMZ,EAAA,EAAE,CAAA,IAAMO,EAAA,KAAI,EAAA,EAAAM,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as o}from"./useDeployment-
|
|
2
|
-
//# sourceMappingURL=RequiresTab-
|
|
1
|
+
import{d as o}from"./useDeployment-Bgo0U4-I.js";import{d as m,c as s,a as e,f as n,u as l,F as i,s as c,g as h,o as a,D as p,t as d}from"./index-jLPJ82ve.js";import"./useVars-VN9gYdR6.js";const y={class:"panel"},f={key:0,class:"mute"},_={class:"cards"},b={class:"stagger"},g={class:"name","data-label":"requirement"},k={class:"dim","data-label":"hint"},q={key:0},T=m({__name:"RequiresTab",setup(v){return(x,t)=>(a(),s("section",y,[t[3]||(t[3]=e("h2",{class:"section",style:{"margin-bottom":"var(--s3)"}},[n(" Requires "),e("span",{class:"mute"},"(checked before anything is created)")],-1)),l(o).detail?(a(),s(i,{key:1},[t[2]||(t[2]=e("p",{class:"hint",style:{margin:"0 0 var(--s3)"}},[n(" Preconditions run first, in order, and "),e("code",null,"up"),n(" stops at the first one that fails — by name, before a single resource exists. The "),e("code",null,"assert"),n(" command itself stays on the host; only the name and its authored hint are sent here. ")],-1)),e("table",_,[t[1]||(t[1]=e("thead",null,[e("tr",null,[e("th",null,"requirement"),e("th",null,"hint shown on failure")])],-1)),e("tbody",b,[(a(!0),s(i,null,c(l(o).detail.requires,(r,u)=>(a(),s("tr",{key:r.name,style:p({"--i":u})},[e("td",g,d(r.name),1),e("td",k,d(r.hint||"— (no hint authored)"),1)],4))),128)),l(o).detail.requires.length?h("",!0):(a(),s("tr",q,[...t[0]||(t[0]=[e("td",{colspan:"2",class:"mute"}," None declared — an isolated deployment that borrows shared infrastructure usually wants at least one. ",-1)])]))])])],64)):(a(),s("p",f,"Unavailable until the spec resolves."))]))}});export{T as default};
|
|
2
|
+
//# sourceMappingURL=RequiresTab-DKFeob92.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequiresTab-
|
|
1
|
+
{"version":3,"file":"RequiresTab-DKFeob92.js","sources":["../../src/views/tabs/RequiresTab.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/** Preconditions: checked before anything is created, so a failure names a thing, not a stack trace. */\nimport { dep } from '../../composables/useDeployment';\n</script>\n\n<template>\n <section class=\"panel\">\n <h2 class=\"section\" style=\"margin-bottom: var(--s3)\">\n Requires <span class=\"mute\">(checked before anything is created)</span>\n </h2>\n\n <p v-if=\"!dep.detail\" class=\"mute\">Unavailable until the spec resolves.</p>\n <template v-else>\n <p class=\"hint\" style=\"margin: 0 0 var(--s3)\">\n Preconditions run first, in order, and <code>up</code> stops at the first one that fails —\n by name, before a single resource exists. The <code>assert</code> command itself stays on\n the host; only the name and its authored hint are sent here.\n </p>\n\n <table class=\"cards\">\n <thead>\n <tr>\n <th>requirement</th>\n <th>hint shown on failure</th>\n </tr>\n </thead>\n <tbody class=\"stagger\">\n <tr v-for=\"(r, i) in dep.detail.requires\" :key=\"r.name\" :style=\"{ '--i': i }\">\n <td class=\"name\" data-label=\"requirement\">{{ r.name }}</td>\n <td class=\"dim\" data-label=\"hint\">{{ r.hint || '— (no hint authored)' }}</td>\n </tr>\n <tr v-if=\"!dep.detail.requires.length\">\n <td colspan=\"2\" class=\"mute\">\n None declared — an isolated deployment that borrows shared infrastructure usually\n wants at least one.\n </td>\n </tr>\n </tbody>\n </table>\n </template>\n </section>\n</template>\n"],"names":["_openBlock","_createElementBlock","_hoisted_1","_createElementVNode","_unref","dep","_Fragment","_hoisted_3","_hoisted_4","_renderList","i","_hoisted_5","_toDisplayString","_hoisted_6","_hoisted_7","_cache","_hoisted_2"],"mappings":"4ZAMEA,EAAA,EAAAC,EAkCU,UAlCVC,EAkCU,aAjCRC,EAEK,KAAA,CAFD,MAAM,UAAU,MAAA,CAAA,gBAAA,WAAA,CAAA,KAAiC,YAC1C,EAAAA,EAA8D,OAAA,CAAxD,MAAM,MAAA,EAAO,sCAAoC,CAAA,OAGxDC,EAAAC,CAAA,EAAI,YACdJ,EA2BWK,EAAA,CAAA,IAAA,GAAA,aA1BTH,EAII,IAAA,CAJD,MAAM,OAAO,MAAA,CAAA,OAAA,eAAA,CAAA,KAA8B,0CACL,EAAAA,EAAe,YAAT,IAAE,IAAO,qFACR,EAAAA,EAAmB,YAAb,QAAM,IAAO,wFAEnE,CAAA,OAEAA,EAmBQ,QAnBRI,EAmBQ,aAlBNJ,EAKQ,QAAA,KAAA,CAJNA,EAGK,KAAA,KAAA,CAFHA,EAAoB,UAAhB,aAAW,EACfA,EAA8B,UAA1B,uBAAqB,CAAA,SAG7BA,EAWQ,QAXRK,EAWQ,QAVNP,EAGKK,EAAA,KAAAG,EAHgBL,KAAI,OAAO,SAAQ,CAA5B,EAAGM,SAAfT,EAGK,KAAA,CAHsC,IAAK,EAAE,KAAO,eAAgBS,EAAC,CAAA,GACxEP,EAA2D,KAA3DQ,EAA2DC,EAAd,EAAE,IAAI,EAAA,CAAA,EACnDT,EAA6E,KAA7EU,EAA6ED,EAAxC,EAAE,MAAI,sBAAA,EAAA,CAAA,CAAA,aAElCR,EAAAC,CAAA,EAAI,OAAO,SAAS,qBAA/BJ,EAKK,KAAAa,EAAA,CAAA,GAAAC,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,CAJHZ,EAGK,KAAA,CAHD,QAAQ,IAAI,MAAM,MAAA,EAAO,0GAG7B,EAAA,CAAA,qBAxBRF,EAA2E,IAA3Ee,EAAmC,sCAAoC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as oe,c as o,a as t,f as n,e as c,w as f,_ as G,g as v,x as g,t as u,F as w,s as E,u as x,R as $,i as j,v as z,r,C as O,A as _,B as A,j as le,N as q,o as s,D as ne}from"./index-
|
|
1
|
+
import{d as oe,c as o,a as t,f as n,e as c,w as f,_ as G,g as v,x as g,t as u,F as w,s as E,u as x,R as $,i as j,v as z,r,C as O,A as _,B as A,j as le,N as q,o as s,D as ne}from"./index-jLPJ82ve.js";import{s as ae}from"./useFormat-CKJxQp_i.js";import{_ as J}from"./ActionButton.vue_vue_type_script_setup_true_lang-C0iLjBml.js";import{_ as K}from"./ErrorNote.vue_vue_type_script_setup_true_lang-DjEWoD0O.js";import{_ as Q}from"./SkeletonList.vue_vue_type_script_setup_true_lang-DiCGtn2a.js";import{_ as ie}from"./HelpModal.vue_vue_type_script_setup_true_lang-CACw-lfW.js";import"./Teleport-SesEhfqH.js";const re={class:"page-head"},ue={class:"sub"},de={key:1,class:"banner info"},ve={class:"panel"},pe={class:"phead"},fe={class:"mute",style:{"font-size":"var(--t-sm)"}},ce={key:0,class:"banner warn"},me={key:1,class:"cards"},he={class:"stagger"},ye={"data-label":"url"},ke=["href"],be={key:1,class:"mono mute"},ge={key:0,class:"mute"},we={"data-label":"forwards to"},_e={key:0,class:"mono"},Te={key:1,class:"s-failed"},Ce={"data-label":"deployment"},Re={key:1,class:"mute"},xe={class:"dim","data-label":"router"},$e={key:2,class:"mute"},Ae={class:"panel"},Ne={class:"phead"},Le={key:0,class:"mute",style:{"font-size":"var(--t-sm)"}},Se={class:"mute"},Ie={key:0,class:"banner failed"},De={key:1,class:"banner info"},Pe={key:3,class:"kvlist"},Ue={class:"k"},Ve=["onClick"],Ee={class:"v mute",style:{"font-size":"var(--t-sm)"}},je={key:4,class:"mute"},ze={key:2,class:"panel"},Be={class:"phead"},Fe={class:"section"},We={key:0,class:"badge warn"},Me={key:0,class:"field",style:{"max-width":"340px"}},He={key:2,class:"banner plain"},Ge={class:"field"},Oe={class:"row",style:{"margin-top":"var(--s4)"}},qe={key:0,class:"mute"},Je={class:"field",style:{"max-width":"340px"}},Ke=["for"],Qe=["id","placeholder"],Xe={class:"row"},Ye=`http:
|
|
2
2
|
middlewares:
|
|
3
3
|
# An example — replace it. Middlewares go UNDER http; at the top level Traefik ignores them.
|
|
4
4
|
ip-allow:
|
|
@@ -6,4 +6,4 @@ import{d as oe,c as o,a as t,f as n,e as c,w as f,_ as G,g as v,x as g,t as u,F
|
|
|
6
6
|
sourceRange:
|
|
7
7
|
- 203.0.113.0/24
|
|
8
8
|
`,it=oe({__name:"RoutingView",setup(Ze){const N=r([]),L=r(null),S=r([]),I=r(""),D=r(null),B=r(!1),T=r(""),i=r(null),d=r(""),m=r(""),C=r(!1),P=r(!1),k=r(!1),p=r(""),R=r(""),h=r(null),y=r(""),F=O(()=>i.value!==null&&d.value!==m.value),X=O(()=>!!$.token&&!k.value&&d.value.trim().length>0&&(F.value||i.value===""));async function U(){const l=await _.get("/api/routing");if(B.value=!0,!l.ok){T.value=A(l,"load the routing files");return}T.value="",S.value=l.body.files??[],I.value=l.body.dir??"",D.value=l.body.writable??!1}async function Y(){const l=await _.get("/api/routing/live");if(!l.ok){L.value=!1;return}L.value=l.body.reachable,N.value=l.body.routes??[]}U(),Y();async function Z(l){i.value=l,P.value=!0,p.value="",C.value=!1,y.value="";const e=await _.getAuthed(`/api/routing/${encodeURIComponent(l)}`);if(P.value=!1,!e.ok){p.value=A(e,"open this file");return}if(e.body.sourceWithheld){C.value=!0,d.value="",m.value="";return}d.value=e.body.content??"",m.value=d.value}function ee(){i.value="",R.value="",d.value=Ye,m.value="",C.value=!1,p.value=""}function W(){i.value=null,d.value="",m.value="",p.value=""}async function M(){const l=i.value===""?R.value.trim():i.value;if(!l){p.value="Give the file a name, ending in .yml";return}k.value=!0,p.value="";const e=await _.put(`/api/routing/${encodeURIComponent(l)}`,{content:d.value});if(k.value=!1,!e.ok){p.value=A(e,"save this file");return}e.body.previous&&(h.value={name:l,content:e.body.previous}),m.value=d.value,i.value=l,q("ok",`Saved ${l}. Traefik reloads within a second or two.`),U()}async function te(){const l=h.value;l&&(d.value=l.content,i.value=l.name,await M(),h.value=null)}async function se(){const l=i.value;if(!l||y.value!==l)return;const e=await _.del(`/api/routing/${encodeURIComponent(l)}`);if(!e.ok){p.value=A(e,"delete this file");return}e.body.previous&&(h.value={name:l,content:e.body.previous}),q("ok",`Deleted ${l}.`),W(),U()}return(l,e)=>{const V=le("RouterLink");return s(),o("div",null,[t("div",re,[t("div",null,[t("h1",null,[e[4]||(e[4]=n(" Routing ",-1)),c(ie,{title:"How routing files work, and what can go wrong"},{default:f(()=>[...e[3]||(e[3]=[t("p",null,[t("b",null,"Traefik reads this directory as a whole."),n(" One file it cannot parse and it reports a problem for the "),t("em",null,"directory"),n(" — so the symptom is other, unrelated routes disappearing rather than an error about the file you just saved. ")],-1),t("p",null," Saves here are checked before they are written and replace the old file in one step, so a file that would break the directory never reaches Traefik in the first place. ",-1),t("p",null,[t("b",null,"This page cannot lock you out."),n(" It and the API are routed by their containers' own settings, not by these files — no save here can take away the page you would use to undo it. ")],-1),t("p",null," What belongs here: shared middleware (sign-in prompts, rate limits, address allow-lists), TLS options, the catch-all fallback, and routes to things running outside this host's previews. A single preview's own routes are not here — those travel with the deployment. ",-1)])]),_:1})]),t("div",ue,[e[6]||(e[6]=n(" Every route on this host, and the config files behind them ",-1)),c(G,{label:"what belongs in these files"},{default:f(()=>[...e[5]||(e[5]=[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[7]||(e[7]=t("span",{class:"grow"},null,-1)),D.value?(s(),o("button",{key:0,class:"btn primary",onClick:ee},"New file")):v("",!0)]),T.value?(s(),g(K,{key:0,text:T.value,title:"Could not load the routing files."},null,8,["text"])):v("",!0),h.value?(s(),o("div",de,[t("b",null,"Replaced "+u(h.value.name)+".",1),t("p",null,[e[8]||(e[8]=n(" The previous contents are still here for this session. ",-1)),t("button",{class:"btn sm",onClick:te},"Put it back")])])):v("",!0),t("section",ve,[t("div",pe,[e[11]||(e[11]=t("h2",{class:"section"},"Live routes",-1)),e[12]||(e[12]=t("span",{class:"grow"},null,-1)),t("span",fe,[e[10]||(e[10]=n(" from container labels ",-1)),c(G,{label:"why routes are not in the files below",align:"end"},{default:f(()=>[...e[9]||(e[9]=[n(" Traefik reads two providers. Per-PR routers are ",-1),t("b",null,"labels on containers",-1),n(", written by each deployment's own compose file — so deploying a stack changes this list and never the files. The files are the other provider: middleware, TLS options, the fallback router. ",-1)])]),_:1})])]),L.value===!1?(s(),o("div",ce,[...e[13]||(e[13]=[t("b",null,"Docker did not answer.",-1),t("p",null,"Routes could not be listed — which is not the same as there being none.",-1)])])):N.value.length?(s(),o("table",me,[e[14]||(e[14]=t("thead",null,[t("tr",null,[t("th",null,"url"),t("th",null,"forwards to"),t("th",null,"deployment"),t("th",null,"router")])],-1)),t("tbody",he,[(s(!0),o(w,null,E(N.value,(a,H)=>(s(),o("tr",{key:`${a.container}-${a.router}`,style:ne({"--i":H})},[t("td",ye,[(s(!0),o(w,null,E(a.hosts,b=>(s(),o("div",{key:b},[b.startsWith("(pattern)")?(s(),o("span",be,u(b),1)):(s(),o("a",{key:0,href:`https://${b}`,target:"_blank",rel:"noreferrer"},u(b),9,ke))]))),128)),a.hosts.length?v("",!0):(s(),o("span",ge,"no host in the rule"))]),t("td",we,[a.target?(s(),o("span",_e,u(a.target),1)):(s(),o("span",Te,u(a.port===null?"no port declared":"not on the ingress network"),1))]),t("td",Ce,[a.project?(s(),g(V,{key:0,to:`/deployments/${encodeURIComponent(a.project)}/runtime`},{default:f(()=>[n(u(a.project),1)]),_:2},1032,["to"])):(s(),o("span",Re,"—"))]),t("td",xe,u(a.router),1)],4))),128))])])):(s(),o("p",$e,[...e[15]||(e[15]=[n(" No container on this host declares a Traefik router. A deployment's routes come from labels in its own compose file — open a deployment's ",-1),t("b",null,"Containers & routes",-1),n(" tab to see what is missing. ",-1)])]))]),t("section",Ae,[t("div",Ne,[e[16]||(e[16]=t("h2",{class:"section"},"Config files",-1)),e[17]||(e[17]=t("span",{class:"grow"},null,-1)),I.value?(s(),o("span",Le,[t("span",Se,u(I.value),1)])):v("",!0)]),D.value===!1?(s(),o("div",Ie,[...e[18]||(e[18]=[t("b",null,"Read-only: the API cannot write to this directory.",-1),t("p",null," The control stack mounts it into the API from 0.4.0 onward. Re-run setup again on the host to pick up the mount — it is safe to repeat, and it recreates the control containers. ",-1)])])):x($).token?v("",!0):(s(),o("div",De,[e[22]||(e[22]=t("b",null,"Viewing needs a token too.",-1)),t("p",null,[e[20]||(e[20]=n(" These files hold basic-auth hashes and forward-auth URLs, so their contents are not served unauthenticated. ",-1)),c(V,{to:"/settings"},{default:f(()=>[...e[19]||(e[19]=[n("Add your token",-1)])]),_:1}),e[21]||(e[21]=n(". ",-1))])])),B.value?S.value.length?(s(),o("ul",Pe,[(s(!0),o(w,null,E(S.value,a=>(s(),o("li",{key:a.name},[t("span",Ue,[t("button",{class:"ghost sm",onClick:H=>Z(a.name)},u(a.name),9,Ve)]),t("span",Ee,u(a.size)+" bytes · "+u(x(ae)(a.updatedAt)),1)]))),128))])):(s(),o("p",je," No files yet. Everything is routed by container labels, which is a perfectly good place to be. ")):(s(),g(Q,{key:2,rows:3}))]),i.value!==null?(s(),o("section",ze,[t("div",Be,[t("h2",Fe,u(i.value===""?"New file":i.value),1),F.value?(s(),o("span",We,"unsaved")):v("",!0),e[23]||(e[23]=t("span",{class:"grow"},null,-1)),t("button",{class:"ghost sm",onClick:W},"Close")]),i.value===""?(s(),o("div",Me,[e[24]||(e[24]=t("label",{for:"fname"},"File name",-1)),j(t("input",{id:"fname","onUpdate:modelValue":e[0]||(e[0]=a=>R.value=a),type:"text",placeholder:"middleware.yml",spellcheck:"false",autocomplete:"off"},null,512),[[z,R.value,void 0,{trim:!0}]]),e[25]||(e[25]=t("div",{class:"mute hint"},[n("Lower case, ending in "),t("code",null,".yml"),n(".")],-1))])):v("",!0),P.value?(s(),g(Q,{key:1,rows:4})):C.value?(s(),o("div",He,[e[28]||(e[28]=t("b",null,"Hidden without an access token.",-1)),t("p",null,[c(V,{to:"/settings"},{default:f(()=>[...e[26]||(e[26]=[n("Add your token",-1)])]),_:1}),e[27]||(e[27]=n(" to read and edit this file. ",-1))])])):(s(),o(w,{key:3},[t("div",Ge,[e[29]||(e[29]=t("label",{for:"content"},"Contents",-1)),j(t("textarea",{id:"content","onUpdate:modelValue":e[1]||(e[1]=a=>d.value=a),rows:"18",spellcheck:"false"},null,512),[[z,d.value]])]),p.value?(s(),g(K,{key:0,text:p.value,title:"Traefik would not accept this."},null,8,["text"])):v("",!0),t("div",Oe,[c(J,{variant:"primary",pending:k.value,disabled:!X.value,onClick:M},{default:f(()=>[n(u(k.value?"Saving…":"Save"),1)]),_:1},8,["pending","disabled"]),x($).token?v("",!0):(s(),o("span",qe,"Saving needs a token."))]),i.value?(s(),o(w,{key:1},[e[33]||(e[33]=t("h2",{class:"section",style:{margin:"var(--s5) 0 var(--s3)"}},"Delete this file",-1)),e[34]||(e[34]=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",Je,[t("label",{for:`confirm-${i.value}`},[e[30]||(e[30]=n(" Type ",-1)),t("b",null,u(i.value),1),e[31]||(e[31]=n(" to confirm ",-1))],8,Ke),j(t("input",{id:`confirm-${i.value}`,"onUpdate:modelValue":e[2]||(e[2]=a=>y.value=a),type:"text",placeholder:i.value,spellcheck:"false",autocomplete:"off"},null,8,Qe),[[z,y.value,void 0,{trim:!0}]])]),t("div",Xe,[c(J,{variant:"danger",disabled:y.value!==i.value||!x($).token,title:y.value!==i.value?"Type the file name to confirm.":void 0,onClick:se},{default:f(()=>[...e[32]||(e[32]=[n(" Delete ",-1)])]),_:1},8,["disabled","title"])])],64)):v("",!0)],64))])):v("",!0)])}}});export{it as default};
|
|
9
|
-
//# sourceMappingURL=RoutingView-
|
|
9
|
+
//# sourceMappingURL=RoutingView-7SWVlOx8.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RoutingView-k7P_0Fiy.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 {\n LiveRoutesResponse,\n RoutingFile,\n RoutingListResponse,\n RoutingReadResponse,\n RoutingWriteResponse,\n RuntimeRoute,\n} 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';\nimport HelpModal from '../components/HelpModal.vue';\n\n/**\n * The live routes, from container labels.\n *\n * This page used to show only the file provider, and the reported confusion was exactly right: a\n * deployment goes up, its hostname appears, and nothing here changes — because per-PR routers are\n * DOCKER labels and the files below are Traefik's *other* provider. Showing both is what makes the\n * page match what \"routing\" means to whoever opened it.\n */\nconst live = ref<RuntimeRoute[]>([]);\nconst liveReachable = ref<boolean | null>(null);\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\nasync function loadLive(): Promise<void> {\n const r = await api.get<LiveRoutesResponse>('/api/routing/live');\n if (!r.ok) {\n liveReachable.value = false;\n return;\n }\n liveReachable.value = r.body.reachable;\n live.value = r.body.routes ?? [];\n}\n\nvoid loadList();\nvoid loadLive();\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>\n Routing\n <HelpModal title=\"How routing files work, and what can go wrong\">\n <p>\n <b>Traefik reads this directory as a whole.</b> One file it cannot parse and it reports a\n problem for the <em>directory</em> — so the symptom is other, unrelated routes\n disappearing rather than an error about the file you just saved.\n </p>\n <p>\n Saves here are checked before they are written and replace the old file in one step, so a\n file that would break the directory never reaches Traefik in the first place.\n </p>\n <p>\n <b>This page cannot lock you out.</b> It and the API are routed by their containers'\n own settings, not by these files — no save here can take away the page you would use to\n undo it.\n </p>\n <p>\n What belongs here: shared middleware (sign-in prompts, rate limits, address\n allow-lists), TLS options, the catch-all fallback, and routes to things running outside\n this host's previews. A single preview's own routes are not here — those travel with the\n deployment.\n </p>\n </HelpModal>\n </h1>\n <div class=\"sub\">\n Every route on this host, and the config files behind them\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 <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 <!-- ============================ live routes ============================ -->\n <section class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"section\">Live routes</h2>\n <span class=\"grow\" />\n <span class=\"mute\" style=\"font-size: var(--t-sm)\">\n from container labels\n <InfoHint label=\"why routes are not in the files below\" align=\"end\">\n Traefik reads two providers. Per-PR routers are <b>labels on containers</b>, written by each\n deployment's own compose file — so deploying a stack changes this list and never the files.\n The files are the other provider: middleware, TLS options, the fallback router.\n </InfoHint>\n </span>\n </div>\n\n <div v-if=\"liveReachable === false\" class=\"banner warn\">\n <b>Docker did not answer.</b>\n <p>Routes could not be listed — which is not the same as there being none.</p>\n </div>\n\n <table v-else-if=\"live.length\" class=\"cards\">\n <thead>\n <tr>\n <th>url</th>\n <th>forwards to</th>\n <th>deployment</th>\n <th>router</th>\n </tr>\n </thead>\n <tbody class=\"stagger\">\n <tr v-for=\"(r, i) in live\" :key=\"`${r.container}-${r.router}`\" :style=\"{ '--i': i }\">\n <td data-label=\"url\">\n <div v-for=\"h in r.hosts\" :key=\"h\">\n <a v-if=\"!h.startsWith('(pattern)')\" :href=\"`https://${h}`\" target=\"_blank\" rel=\"noreferrer\">\n {{ h }}\n </a>\n <span v-else class=\"mono mute\">{{ h }}</span>\n </div>\n <span v-if=\"!r.hosts.length\" class=\"mute\">no host in the rule</span>\n </td>\n <td data-label=\"forwards to\">\n <span v-if=\"r.target\" class=\"mono\">{{ r.target }}</span>\n <span v-else class=\"s-failed\">\n {{ r.port === null ? 'no port declared' : 'not on the ingress network' }}\n </span>\n </td>\n <td data-label=\"deployment\">\n <RouterLink v-if=\"r.project\" :to=\"`/deployments/${encodeURIComponent(r.project)}/runtime`\">\n {{ r.project }}\n </RouterLink>\n <span v-else class=\"mute\">—</span>\n </td>\n <td class=\"dim\" data-label=\"router\">{{ r.router }}</td>\n </tr>\n </tbody>\n </table>\n\n <p v-else class=\"mute\">\n No container on this host declares a Traefik router. A deployment's routes come from labels in\n its own compose file — open a deployment's <b>Containers & routes</b> tab to see what is\n missing.\n </p>\n </section>\n\n <!-- ============================ config files ============================ -->\n <section class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"section\">Config files</h2>\n <span class=\"grow\" />\n <span v-if=\"dir\" class=\"mute\" style=\"font-size: var(--t-sm)\">\n <span class=\"mute\">{{ dir }}</span>\n </span>\n </div>\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\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 setup again on the host to pick up the mount — it is safe to repeat, 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 <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","live","ref","liveReachable","files","dir","writable","loaded","listError","openName","draft","original","withheld","loadingFile","saving","fileError","newName","undo","confirmDelete","dirty","computed","canSave","settings","loadList","r","api","problem","loadLive","open","name","startNew","close","save","toast","revert","u","remove","_createElementBlock","_createElementVNode","_hoisted_1","_createVNode","HelpModal","_cache","_hoisted_2","InfoHint","_createBlock","ErrorNote","_openBlock","_hoisted_3","_toDisplayString","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_Fragment","_renderList","i","_hoisted_10","h","_hoisted_12","_hoisted_11","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_component_RouterLink","_createTextVNode","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_unref","_hoisted_26","_hoisted_27","f","_hoisted_28","$event","_hoisted_29","_hoisted_30","stamp","_hoisted_31","SkeletonList","_hoisted_32","_hoisted_33","_hoisted_34","_hoisted_35","_hoisted_36","_hoisted_37","_hoisted_38","_hoisted_39","ActionButton","_hoisted_40","_hoisted_41","_hoisted_44"],"mappings":"6xDA4EMA,GAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wCA3BhB,MAAMC,EAAOC,EAAoB,EAAE,EAC7BC,EAAgBD,EAAoB,IAAI,EAExCE,EAAQF,EAAmB,EAAE,EAC7BG,EAAMH,EAAI,EAAE,EACZI,EAAWJ,EAAoB,IAAI,EACnCK,EAASL,EAAI,EAAK,EAClBM,EAAYN,EAAI,EAAE,EAGlBO,EAAWP,EAAmB,IAAI,EAClCQ,EAAQR,EAAI,EAAE,EACdS,EAAWT,EAAI,EAAE,EACjBU,EAAWV,EAAI,EAAK,EACpBW,EAAcX,EAAI,EAAK,EACvBY,EAASZ,EAAI,EAAK,EAClBa,EAAYb,EAAI,EAAE,EAClBc,EAAUd,EAAI,EAAE,EAEhBe,EAAOf,EAA8C,IAAI,EACzDgB,EAAgBhB,EAAI,EAAE,EAEtBiB,EAAQC,EAAS,IAAMX,EAAS,QAAU,MAAQC,EAA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AAU/E,EAAA,QAAkBT,SAAQ,CAAKqE,EAAAxD,CAAA,EAAS,MAClD,MAAOJ,EAAA,QAAkBT,EAAA,uCAA8C,OACvE,QAAO2B,EAAA,aACT,IAED,CAAA,GAAAM,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAA,GAFC,WAED,EAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"RoutingView-7SWVlOx8.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 {\n LiveRoutesResponse,\n RoutingFile,\n RoutingListResponse,\n RoutingReadResponse,\n RoutingWriteResponse,\n RuntimeRoute,\n} 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';\nimport HelpModal from '../components/HelpModal.vue';\n\n/**\n * The live routes, from container labels.\n *\n * This page used to show only the file provider, and the reported confusion was exactly right: a\n * deployment goes up, its hostname appears, and nothing here changes — because per-PR routers are\n * DOCKER labels and the files below are Traefik's *other* provider. Showing both is what makes the\n * page match what \"routing\" means to whoever opened it.\n */\nconst live = ref<RuntimeRoute[]>([]);\nconst liveReachable = ref<boolean | null>(null);\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\nasync function loadLive(): Promise<void> {\n const r = await api.get<LiveRoutesResponse>('/api/routing/live');\n if (!r.ok) {\n liveReachable.value = false;\n return;\n }\n liveReachable.value = r.body.reachable;\n live.value = r.body.routes ?? [];\n}\n\nvoid loadList();\nvoid loadLive();\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>\n Routing\n <HelpModal title=\"How routing files work, and what can go wrong\">\n <p>\n <b>Traefik reads this directory as a whole.</b> One file it cannot parse and it reports a\n problem for the <em>directory</em> — so the symptom is other, unrelated routes\n disappearing rather than an error about the file you just saved.\n </p>\n <p>\n Saves here are checked before they are written and replace the old file in one step, so a\n file that would break the directory never reaches Traefik in the first place.\n </p>\n <p>\n <b>This page cannot lock you out.</b> It and the API are routed by their containers'\n own settings, not by these files — no save here can take away the page you would use to\n undo it.\n </p>\n <p>\n What belongs here: shared middleware (sign-in prompts, rate limits, address\n allow-lists), TLS options, the catch-all fallback, and routes to things running outside\n this host's previews. A single preview's own routes are not here — those travel with the\n deployment.\n </p>\n </HelpModal>\n </h1>\n <div class=\"sub\">\n Every route on this host, and the config files behind them\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 <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 <!-- ============================ live routes ============================ -->\n <section class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"section\">Live routes</h2>\n <span class=\"grow\" />\n <span class=\"mute\" style=\"font-size: var(--t-sm)\">\n from container labels\n <InfoHint label=\"why routes are not in the files below\" align=\"end\">\n Traefik reads two providers. Per-PR routers are <b>labels on containers</b>, written by each\n deployment's own compose file — so deploying a stack changes this list and never the files.\n The files are the other provider: middleware, TLS options, the fallback router.\n </InfoHint>\n </span>\n </div>\n\n <div v-if=\"liveReachable === false\" class=\"banner warn\">\n <b>Docker did not answer.</b>\n <p>Routes could not be listed — which is not the same as there being none.</p>\n </div>\n\n <table v-else-if=\"live.length\" class=\"cards\">\n <thead>\n <tr>\n <th>url</th>\n <th>forwards to</th>\n <th>deployment</th>\n <th>router</th>\n </tr>\n </thead>\n <tbody class=\"stagger\">\n <tr v-for=\"(r, i) in live\" :key=\"`${r.container}-${r.router}`\" :style=\"{ '--i': i }\">\n <td data-label=\"url\">\n <div v-for=\"h in r.hosts\" :key=\"h\">\n <a v-if=\"!h.startsWith('(pattern)')\" :href=\"`https://${h}`\" target=\"_blank\" rel=\"noreferrer\">\n {{ h }}\n </a>\n <span v-else class=\"mono mute\">{{ h }}</span>\n </div>\n <span v-if=\"!r.hosts.length\" class=\"mute\">no host in the rule</span>\n </td>\n <td data-label=\"forwards to\">\n <span v-if=\"r.target\" class=\"mono\">{{ r.target }}</span>\n <span v-else class=\"s-failed\">\n {{ r.port === null ? 'no port declared' : 'not on the ingress network' }}\n </span>\n </td>\n <td data-label=\"deployment\">\n <RouterLink v-if=\"r.project\" :to=\"`/deployments/${encodeURIComponent(r.project)}/runtime`\">\n {{ r.project }}\n </RouterLink>\n <span v-else class=\"mute\">—</span>\n </td>\n <td class=\"dim\" data-label=\"router\">{{ r.router }}</td>\n </tr>\n </tbody>\n </table>\n\n <p v-else class=\"mute\">\n No container on this host declares a Traefik router. A deployment's routes come from labels in\n its own compose file — open a deployment's <b>Containers & routes</b> tab to see what is\n missing.\n </p>\n </section>\n\n <!-- ============================ config files ============================ -->\n <section class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"section\">Config files</h2>\n <span class=\"grow\" />\n <span v-if=\"dir\" class=\"mute\" style=\"font-size: var(--t-sm)\">\n <span class=\"mute\">{{ dir }}</span>\n </span>\n </div>\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\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 setup again on the host to pick up the mount — it is safe to repeat, 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 <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","live","ref","liveReachable","files","dir","writable","loaded","listError","openName","draft","original","withheld","loadingFile","saving","fileError","newName","undo","confirmDelete","dirty","computed","canSave","settings","loadList","r","api","problem","loadLive","open","name","startNew","close","save","toast","revert","u","remove","_createElementBlock","_createElementVNode","_hoisted_1","_createVNode","HelpModal","_cache","_hoisted_2","InfoHint","_createBlock","ErrorNote","_openBlock","_hoisted_3","_toDisplayString","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_Fragment","_renderList","i","_hoisted_10","h","_hoisted_12","_hoisted_11","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_component_RouterLink","_createTextVNode","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_unref","_hoisted_26","_hoisted_27","f","_hoisted_28","$event","_hoisted_29","_hoisted_30","stamp","_hoisted_31","SkeletonList","_hoisted_32","_hoisted_33","_hoisted_34","_hoisted_35","_hoisted_36","_hoisted_37","_hoisted_38","_hoisted_39","ActionButton","_hoisted_40","_hoisted_41","_hoisted_44"],"mappings":"6xDA4EMA,GAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wCA3BhB,MAAMC,EAAOC,EAAoB,EAAE,EAC7BC,EAAgBD,EAAoB,IAAI,EAExCE,EAAQF,EAAmB,EAAE,EAC7BG,EAAMH,EAAI,EAAE,EACZI,EAAWJ,EAAoB,IAAI,EACnCK,EAASL,EAAI,EAAK,EAClBM,EAAYN,EAAI,EAAE,EAGlBO,EAAWP,EAAmB,IAAI,EAClCQ,EAAQR,EAAI,EAAE,EACdS,EAAWT,EAAI,EAAE,EACjBU,EAAWV,EAAI,EAAK,EACpBW,EAAcX,EAAI,EAAK,EACvBY,EAASZ,EAAI,EAAK,EAClBa,EAAYb,EAAI,EAAE,EAClBc,EAAUd,EAAI,EAAE,EAEhBe,EAAOf,EAA8C,IAAI,EACzDgB,EAAgBhB,EAAI,EAAE,EAEtBiB,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,MAAQ,GACX,CAACiB,EAAE,GAAI,CACThB,EAAU,MAAQkB,EAAQF,EAAG,wBAAwB,EACrD,MACF,CACAhB,EAAU,MAAQ,GAClBJ,EAAM,MAAQoB,EAAE,KAAK,OAAS,CAAA,EAC9BnB,EAAI,MAAQmB,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CAAA,aAC7E,IAAiC,KAA9BlB,EAAA,MAAM,UAAA,MAAA,EAAA,CAAA,CAAA,kCAEEgE,EAAAxD,CAAA,EAAS,oBAAtBe,EAAsE,OAAtE6D,GAA0C,uBAAqB,KAGjDzF,EAAA,WAAhB4B,EA6BWmB,EAAA,CAAA,IAAA,GAAA,eA5BTlB,EAA+E,KAAA,CAA3E,MAAM,UAAU,MAAA,CAAA,OAAA,uBAAA,CAAA,EAAsC,mBAAgB,EAAA,GAC1EI,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAJ,EAGI,IAAA,CAHD,MAAM,KAAA,EAAM,wIAGf,EAAA,GACAA,EAYM,MAZN6D,GAYM,CAXJ7D,EAEQ,QAAA,CAFA,eAAgB7B,EAAA,KAAQ,EAAA,mBAAI,SAC7B,EAAA,GAAA6B,EAAqB,WAAf7B,EAAA,KAAQ,EAAA,CAAA,kBAAO,eAC5B,EAAA,EAAA,UACA6B,EAOE,QAAA,CANC,cAAe7B,EAAA,KAAQ,wCACVS,EAAa,MAAAiE,GAC3B,KAAK,OACJ,YAAa1E,EAAA,MACd,WAAW,QACX,aAAa,KAAA,iBAJCS,EAAA,aAAN,CAAA,KAAR,EAAA,CAA4B,MAOhCoB,EASM,MATN8D,GASM,CARJ5D,EAOeyD,EAAA,CANb,QAAQ,SACP,SAAU/E,EAAA,QAAkBT,SAAQ,CAAKqE,EAAAxD,CAAA,EAAS,MAClD,MAAOJ,EAAA,QAAkBT,EAAA,uCAA8C,OACvE,QAAO2B,EAAA,aACT,IAED,CAAA,GAAAM,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAA,GAFC,WAED,EAAA,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as z,H as I,p as A,c as n,x as w,g as p,F as u,a as e,s as m,f as a,t as r,e as k,w as g,_ as T,r as y,C as c,j as D,o as s,D as $,E as _,A as L,B}from"./index-
|
|
2
|
-
//# sourceMappingURL=RuntimeTab-
|
|
1
|
+
import{d as z,H as I,p as A,c as n,x as w,g as p,F as u,a as e,s as m,f as a,t as r,e as k,w as g,_ as T,r as y,C as c,j as D,o as s,D as $,E as _,A as L,B}from"./index-jLPJ82ve.js";import{v as E,d as C}from"./useDeployment-Bgo0U4-I.js";import{_ as V}from"./SkeletonList.vue_vue_type_script_setup_true_lang-DiCGtn2a.js";import{_ as K}from"./ErrorNote.vue_vue_type_script_setup_true_lang-DjEWoD0O.js";import"./useVars-VN9gYdR6.js";const U={key:0,class:"banner warn"},H={key:0,class:"banner ok"},W={class:"panel"},F={class:"phead"},j={class:"mute",style:{"font-size":"var(--t-sm)"}},M={key:0,class:"cards"},O={class:"stagger"},Q={"data-label":"url"},q=["href"],G={key:1,class:"mono mute"},J={key:0,class:"mute"},X={"data-label":"forwards to"},Y={key:0,class:"mono"},Z={key:1,class:"s-failed"},ee={class:"mute",style:{"font-size":"var(--t-sm)"}},te={"data-label":"router"},se={key:0,class:"mute",style:{"font-size":"var(--t-sm)"}},ne={"data-label":"tls"},oe={key:0,class:"badge ok"},re={key:1,class:"badge off"},le={key:1,class:"banner warn"},ae={class:"panel"},ie={class:"phead"},de={class:"mute",style:{"font-size":"var(--t-sm)"}},ue={key:0,class:"cards"},he={class:"stagger"},pe={class:"name","data-label":"service"},me={class:"mute",style:{"font-size":"var(--t-sm)"}},ve={"data-label":"state"},ce={"data-label":"ports"},fe={class:"mono"},ke={key:0,class:"mute"},ge={key:0,class:"mute"},ye={"data-label":"networks"},_e={key:0,class:"mute mono",style:{"font-size":"var(--t-sm)"}},be={class:"dim","data-label":"image"},we={key:1,class:"mute"},xe=z({__name:"RuntimeTab",setup(Te){const l=y(null),v=y(""),f=y(!0);async function b(){const i=await L.get(`/api/deployments/${encodeURIComponent(C.id)}/runtime${E.value}`);if(f.value=!1,!i.ok){v.value=B(i,"inspect what is running");return}v.value="",l.value=i.body}I(()=>C.id,()=>{f.value=!0,b()},{immediate:!0}),A(()=>void b(),8e3);const R=c(()=>{var i;return((i=l.value)==null?void 0:i.findings.filter(t=>t.level==="error"))??[]}),P=c(()=>{var i;return((i=l.value)==null?void 0:i.findings.filter(t=>t.level==="warn"))??[]}),S=c(()=>{var i;return((i=l.value)==null?void 0:i.findings.filter(t=>t.level==="info"))??[]}),x=c(()=>{var i;return((i=l.value)==null?void 0:i.containers.filter(t=>t.state==="running").length)??0});return(i,t)=>{const N=D("RouterLink");return s(),n("div",null,[v.value?(s(),w(K,{key:0,text:v.value,title:"Could not inspect this deployment."},null,8,["text"])):p("",!0),f.value&&!l.value?(s(),w(V,{key:1,rows:5})):l.value?(s(),n(u,{key:2},[l.value.reachable?(s(),n(u,{key:1},[(s(!0),n(u,null,m(R.value,(o,h)=>(s(),n("div",{key:`e${h}`,class:"banner failed"},[t[1]||(t[1]=e("b",null,"Blocking",-1)),e("p",null,r(o.message),1)]))),128)),(s(!0),n(u,null,m(P.value,(o,h)=>(s(),n("div",{key:`w${h}`,class:"banner warn"},[t[2]||(t[2]=e("b",null,"Worth checking",-1)),e("p",null,r(o.message),1)]))),128)),(s(!0),n(u,null,m(S.value,(o,h)=>(s(),n("div",{key:`i${h}`,class:"banner plain"},[e("p",null,r(o.message),1)]))),128)),!l.value.findings.length&&l.value.containers.length?(s(),n("div",H,[...t[3]||(t[3]=[e("b",null,"Nothing looks wrong.",-1),e("p",null," Every container is attached to the ingress network and every router has a rule and a port. If a hostname still fails, the next suspects are DNS and the certificate. ",-1)])])):p("",!0),e("section",W,[e("div",F,[t[5]||(t[5]=e("h2",{class:"section"},"Routing",-1)),t[6]||(t[6]=e("span",{class:"grow"},null,-1)),e("span",j,[a(" TLS: "+r(l.value.challenge==="unknown"?"unknown":l.value.challenge)+" ",1),k(T,{label:"why the TLS mode matters here",align:"end"},{default:g(()=>[...t[4]||(t[4]=[a(" Under HTTP-01 every per-PR router needs ",-1),e("code",null,"tls.certresolver=le",-1),a(", because each hostname resolves its own certificate. Under DNS-01 that inverts — one always-on router holds the wildcard, and a per-PR certresolver makes each PR order its own and burn the weekly limit. Read from the running Traefik's own flags, not configured here. ",-1)])]),_:1})])]),l.value.routes.length?(s(),n("table",M,[e("thead",null,[e("tr",null,[t[9]||(t[9]=e("th",null,"url",-1)),e("th",null,[t[8]||(t[8]=a(" forwards to ",-1)),k(T,{label:"how a URL reaches a port"},{default:g(()=>[...t[7]||(t[7]=[a(" Traefik's docker provider resolves the container's IP on ",-1),e("code",null,"preview-ingress",-1),a(" and dials it on the port from ",-1),e("code",null,"loadbalancer.server.port",-1),a(" — it does ",-1),e("em",null,"not",-1),a(" use ",-1),e("code",null,"service:port",-1),a(" DNS. So the port here is the one inside the container, and publishing a host port is unnecessary. ",-1)])]),_:1})]),t[10]||(t[10]=e("th",null,"router",-1)),t[11]||(t[11]=e("th",null,"tls",-1))])]),e("tbody",O,[(s(!0),n(u,null,m(l.value.routes,(o,h)=>(s(),n("tr",{key:o.router,style:$({"--i":h})},[e("td",Q,[(s(!0),n(u,null,m(o.hosts,d=>(s(),n("div",{key:d},[d.startsWith("(pattern)")?(s(),n("span",G,r(d),1)):(s(),n("a",{key:0,href:`https://${d}`,target:"_blank",rel:"noreferrer"},r(d),9,q))]))),128)),o.hosts.length?p("",!0):(s(),n("span",J,"no host in the rule"))]),e("td",X,[o.target?(s(),n("span",Y,r(o.target),1)):(s(),n("span",Z,r(o.port===null?"no port declared":"not on the ingress network"),1)),e("div",ee,r(o.container),1)]),e("td",te,[a(r(o.router)+" ",1),o.priority?(s(),n("div",se," priority "+r(o.priority),1)):p("",!0)]),e("td",ne,[o.tls?(s(),n("span",oe,r(o.certresolver||"inherited"),1)):(s(),n("span",re,"off"))])],4))),128))])])):(s(),n("div",le,[t[17]||(t[17]=e("b",null,"No routes. Traefik has not been told about this deployment.",-1)),e("p",null,[t[13]||(t[13]=a(" Routes come from labels in ",-1)),t[14]||(t[14]=e("em",null,"your",-1)),t[15]||(t[15]=a(" compose file, not from pstack and not from the ",-1)),k(N,{to:"/routing"},{default:g(()=>[...t[12]||(t[12]=[a("Routing",-1)])]),_:1}),t[16]||(t[16]=a(" page (that is Traefik's file provider — middleware and TLS options, not per-PR routers). A reachable service needs four things: ",-1))]),t[18]||(t[18]=e("pre",{class:"code"},"labels:\n - traefik.enable=true # the host runs exposedbydefault=false\n - traefik.docker.network=preview-ingress # which network Traefik should dial\n - traefik.http.routers.<name>-${STACK}.rule=Host(`<name>-${STACK}.${PREVIEW_DOMAIN}`)\n - traefik.http.services.<name>-${STACK}.loadbalancer.server.port=80\nnetworks: [default, preview-ingress] # and preview-ingress: { external: true }",-1)),t[19]||(t[19]=e("p",{class:"mute"},[a(" Put "),e("code",null,"${STACK}"),a(" in the router and service names: Traefik's namespace is global across the host, so two deployments sharing a router name serve each other's containers. ")],-1))]))]),e("section",ae,[e("div",ie,[t[20]||(t[20]=e("h2",{class:"section"},"Containers",-1)),t[21]||(t[21]=e("span",{class:"grow"},null,-1)),e("span",de,r(x.value)+" of "+r(l.value.containers.length)+" running ",1)]),l.value.containers.length?(s(),n("table",ue,[t[22]||(t[22]=e("thead",null,[e("tr",null,[e("th",null,"service"),e("th",null,"state"),e("th",null,"ports"),e("th",null,"networks"),e("th",null,"image")])],-1)),e("tbody",he,[(s(!0),n(u,null,m(l.value.containers,(o,h)=>(s(),n("tr",{key:o.id,style:$({"--i":h})},[e("td",pe,[a(r(o.service??o.name)+" ",1),e("div",me,r(o.name),1)]),e("td",ve,[e("span",{class:_(o.state==="running"?"s-ok":"s-failed")},r(o.state),3),o.health?(s(),n("div",{key:0,class:_(["mute",o.health==="healthy"?"s-ok":"s-failed"]),style:{"font-size":"var(--t-sm)"}},r(o.health),3)):p("",!0)]),e("td",ce,[(s(!0),n(u,null,m(o.ports,d=>(s(),n("div",{key:`${d.containerPort}/${d.protocol}`},[e("span",fe,r(d.containerPort),1),d.hostPort?(s(),n("span",ke," ← host "+r(d.hostPort),1)):p("",!0)]))),128)),o.ports.length?p("",!0):(s(),n("span",ge,"none exposed"))]),e("td",ye,[(s(!0),n(u,null,m(o.networks,d=>(s(),n("div",{key:d},[e("span",{class:_(d==="preview-ingress"?"s-ok":"")},r(d),3)]))),128)),o.ingressIp?(s(),n("div",_e,r(o.ingressIp),1)):p("",!0)]),e("td",be,r(o.image),1)],4))),128))])])):(s(),n("p",we," No containers for this stack. If you expected some, check that their profile is one the spec selects — a service behind a profile that is not enabled is never started. "))])],64)):(s(),n("div",U,[...t[0]||(t[0]=[e("b",null,"Docker did not answer.",-1),e("p",null," Nothing below could be determined — this is not the same as nothing running. Check the daemon and the socket mount, then refresh. ",-1)])]))],64)):p("",!0)])}}});export{xe as default};
|
|
2
|
+
//# sourceMappingURL=RuntimeTab-CiSAV3D0.js.map
|