@samyx/preview-stacks-ui 0.32.0 → 0.33.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-D8Xlp6c9.js → ActionButton.vue_vue_type_script_setup_true_lang-AGS1FKpY.js} +2 -2
- package/dist/assets/{ActionButton.vue_vue_type_script_setup_true_lang-D8Xlp6c9.js.map → ActionButton.vue_vue_type_script_setup_true_lang-AGS1FKpY.js.map} +1 -1
- package/dist/assets/{AxesTab-BWzsbFAx.js → AxesTab-DlGjhnwi.js} +2 -2
- package/dist/assets/{AxesTab-BWzsbFAx.js.map → AxesTab-DlGjhnwi.js.map} +1 -1
- package/dist/assets/{ConfigTab-ucr87rD6.js → ConfigTab-BiqFZrvm.js} +2 -2
- package/dist/assets/{ConfigTab-ucr87rD6.js.map → ConfigTab-BiqFZrvm.js.map} +1 -1
- package/dist/assets/{ConfigView-BbRYGyvZ.js → ConfigView-CsQJIt52.js} +2 -2
- package/dist/assets/{ConfigView-BbRYGyvZ.js.map → ConfigView-CsQJIt52.js.map} +1 -1
- package/dist/assets/{ConflictNote.vue_vue_type_script_setup_true_lang-DDt6qe65.js → ConflictNote.vue_vue_type_script_setup_true_lang-BxG7GEFo.js} +2 -2
- package/dist/assets/{ConflictNote.vue_vue_type_script_setup_true_lang-DDt6qe65.js.map → ConflictNote.vue_vue_type_script_setup_true_lang-BxG7GEFo.js.map} +1 -1
- package/dist/assets/{DangerTab-BimKNJab.js → DangerTab-COq-R4Dz.js} +2 -2
- package/dist/assets/{DangerTab-BimKNJab.js.map → DangerTab-COq-R4Dz.js.map} +1 -1
- package/dist/assets/{DashboardView-DK0qDo-f.js → DashboardView-DTI9n2-Z.js} +2 -2
- package/dist/assets/{DashboardView-DK0qDo-f.js.map → DashboardView-DTI9n2-Z.js.map} +1 -1
- package/dist/assets/{DeploymentDetailView-BcImKApM.js → DeploymentDetailView-BBMtQ9vE.js} +2 -2
- package/dist/assets/{DeploymentDetailView-BcImKApM.js.map → DeploymentDetailView-BBMtQ9vE.js.map} +1 -1
- package/dist/assets/{DeploymentsView-Cx9BqQ8Q.js → DeploymentsView-BCXfIFud.js} +2 -2
- package/dist/assets/{DeploymentsView-Cx9BqQ8Q.js.map → DeploymentsView-BCXfIFud.js.map} +1 -1
- package/dist/assets/{DialogTrigger-nWkfUj3N.js → DialogTrigger-D4yBGqUf.js} +2 -2
- package/dist/assets/{DialogTrigger-nWkfUj3N.js.map → DialogTrigger-D4yBGqUf.js.map} +1 -1
- package/dist/assets/{EquivalentCommand-D92xDU0_.js → EquivalentCommand-D0dyw0Wd.js} +2 -2
- package/dist/assets/{EquivalentCommand-D92xDU0_.js.map → EquivalentCommand-D0dyw0Wd.js.map} +1 -1
- package/dist/assets/{ErrorNote.vue_vue_type_script_setup_true_lang-DVbGiVTB.js → ErrorNote.vue_vue_type_script_setup_true_lang-BrBUwK6j.js} +2 -2
- package/dist/assets/{ErrorNote.vue_vue_type_script_setup_true_lang-DVbGiVTB.js.map → ErrorNote.vue_vue_type_script_setup_true_lang-BrBUwK6j.js.map} +1 -1
- package/dist/assets/{HelpModal.vue_vue_type_script_setup_true_lang-CSOdBT2E.js → HelpModal.vue_vue_type_script_setup_true_lang-CTbPBhLs.js} +2 -2
- package/dist/assets/{HelpModal.vue_vue_type_script_setup_true_lang-CSOdBT2E.js.map → HelpModal.vue_vue_type_script_setup_true_lang-CTbPBhLs.js.map} +1 -1
- package/dist/assets/{JobDetailView-B1sXXVJ5.js → JobDetailView-DIEijrhl.js} +2 -2
- package/dist/assets/{JobDetailView-B1sXXVJ5.js.map → JobDetailView-DIEijrhl.js.map} +1 -1
- package/dist/assets/{JobsView-DjP5lXHk.js → JobsView-Dw4-yNCj.js} +2 -2
- package/dist/assets/{JobsView-DjP5lXHk.js.map → JobsView-Dw4-yNCj.js.map} +1 -1
- package/dist/assets/{LogViewer.vue_vue_type_script_setup_true_lang-Bhy_5cyC.js → LogViewer.vue_vue_type_script_setup_true_lang-B3YVBpn-.js} +2 -2
- package/dist/assets/{LogViewer.vue_vue_type_script_setup_true_lang-Bhy_5cyC.js.map → LogViewer.vue_vue_type_script_setup_true_lang-B3YVBpn-.js.map} +1 -1
- package/dist/assets/{LoginView-CIkI9Qm_.js → LoginView-NgcWC4N0.js} +2 -2
- package/dist/assets/{LoginView-CIkI9Qm_.js.map → LoginView-NgcWC4N0.js.map} +1 -1
- package/dist/assets/{LogsTab-D8zhR7Eb.js → LogsTab-oWjSPx9O.js} +2 -2
- package/dist/assets/{LogsTab-D8zhR7Eb.js.map → LogsTab-oWjSPx9O.js.map} +1 -1
- package/dist/assets/{NotFoundView-aUtqh2Qi.js → NotFoundView-DnQQJSu_.js} +2 -2
- package/dist/assets/{NotFoundView-aUtqh2Qi.js.map → NotFoundView-DnQQJSu_.js.map} +1 -1
- package/dist/assets/{NotifiersView-aRHInxVx.js → NotifiersView-CvP3L81J.js} +2 -2
- package/dist/assets/{NotifiersView-aRHInxVx.js.map → NotifiersView-CvP3L81J.js.map} +1 -1
- package/dist/assets/{OverviewTab-ChCj5LAj.js → OverviewTab-C10J0ywh.js} +2 -2
- package/dist/assets/{OverviewTab-ChCj5LAj.js.map → OverviewTab-C10J0ywh.js.map} +1 -1
- package/dist/assets/{PublicLogsView-DIWJH7qL.js → PublicLogsView-DqMmMbtf.js} +2 -2
- package/dist/assets/{PublicLogsView-DIWJH7qL.js.map → PublicLogsView-DqMmMbtf.js.map} +1 -1
- package/dist/assets/{RefreshButton.vue_vue_type_script_setup_true_lang-P7VwWcRa.js → RefreshButton.vue_vue_type_script_setup_true_lang-8Tme6z_i.js} +2 -2
- package/dist/assets/{RefreshButton.vue_vue_type_script_setup_true_lang-P7VwWcRa.js.map → RefreshButton.vue_vue_type_script_setup_true_lang-8Tme6z_i.js.map} +1 -1
- package/dist/assets/{RegistriesView-D2aCsYIu.js → RegistriesView-DIa3mCyc.js} +2 -2
- package/dist/assets/{RegistriesView-D2aCsYIu.js.map → RegistriesView-DIa3mCyc.js.map} +1 -1
- package/dist/assets/{RelativeTime.vue_vue_type_script_setup_true_lang-NGvUfuKC.js → RelativeTime.vue_vue_type_script_setup_true_lang-eoX10cnp.js} +2 -2
- package/dist/assets/{RelativeTime.vue_vue_type_script_setup_true_lang-NGvUfuKC.js.map → RelativeTime.vue_vue_type_script_setup_true_lang-eoX10cnp.js.map} +1 -1
- package/dist/assets/{RequiresTab-3BhU5BHd.js → RequiresTab-Dde68lOF.js} +2 -2
- package/dist/assets/{RequiresTab-3BhU5BHd.js.map → RequiresTab-Dde68lOF.js.map} +1 -1
- package/dist/assets/{RouteTarget.vue_vue_type_script_setup_true_lang-Caee0wEB.js → RouteTarget.vue_vue_type_script_setup_true_lang-DgcXRES0.js} +2 -2
- package/dist/assets/{RouteTarget.vue_vue_type_script_setup_true_lang-Caee0wEB.js.map → RouteTarget.vue_vue_type_script_setup_true_lang-DgcXRES0.js.map} +1 -1
- package/dist/assets/{RoutingView-T9afX8_M.js → RoutingView-oXXCIL07.js} +2 -2
- package/dist/assets/{RoutingView-T9afX8_M.js.map → RoutingView-oXXCIL07.js.map} +1 -1
- package/dist/assets/{RuntimeTab-Bh2gGuhj.js → RuntimeTab-DFxU8OLh.js} +2 -2
- package/dist/assets/{RuntimeTab-Bh2gGuhj.js.map → RuntimeTab-DFxU8OLh.js.map} +1 -1
- package/dist/assets/{SelectMenu.vue_vue_type_script_setup_true_lang-BtHqT6G1.js → SelectMenu.vue_vue_type_script_setup_true_lang-Bjd8KlYw.js} +2 -2
- package/dist/assets/{SelectMenu.vue_vue_type_script_setup_true_lang-BtHqT6G1.js.map → SelectMenu.vue_vue_type_script_setup_true_lang-Bjd8KlYw.js.map} +1 -1
- package/dist/assets/SettingsView-DwSmnNbU.js +2 -0
- package/dist/assets/SettingsView-DwSmnNbU.js.map +1 -0
- package/dist/assets/{SkeletonList.vue_vue_type_script_setup_true_lang-BmeRGmxf.js → SkeletonList.vue_vue_type_script_setup_true_lang-CvoOnzDO.js} +2 -2
- package/dist/assets/{SkeletonList.vue_vue_type_script_setup_true_lang-BmeRGmxf.js.map → SkeletonList.vue_vue_type_script_setup_true_lang-CvoOnzDO.js.map} +1 -1
- package/dist/assets/{SpecDetailView-Bd4Hx-bI.js → SpecDetailView-D10gsC8W.js} +2 -2
- package/dist/assets/{SpecDetailView-Bd4Hx-bI.js.map → SpecDetailView-D10gsC8W.js.map} +1 -1
- package/dist/assets/{SpecsView-B9qQPzkG.js → SpecsView-BU962Blv.js} +2 -2
- package/dist/assets/{SpecsView-B9qQPzkG.js.map → SpecsView-BU962Blv.js.map} +1 -1
- package/dist/assets/{SsoMark.vue_vue_type_script_setup_true_lang-BBiCq_4w.js → SsoMark.vue_vue_type_script_setup_true_lang-BzRkYwRn.js} +2 -2
- package/dist/assets/{SsoMark.vue_vue_type_script_setup_true_lang-BBiCq_4w.js.map → SsoMark.vue_vue_type_script_setup_true_lang-BzRkYwRn.js.map} +1 -1
- package/dist/assets/SsoView-AzBjKwF_.css +1 -0
- package/dist/assets/SsoView-BJO4vMED.js +2 -0
- package/dist/assets/SsoView-BJO4vMED.js.map +1 -0
- package/dist/assets/{StateBadge.vue_vue_type_script_setup_true_lang-nD6Zdx0q.js → StateBadge.vue_vue_type_script_setup_true_lang-CzLuB-ZI.js} +2 -2
- package/dist/assets/{StateBadge.vue_vue_type_script_setup_true_lang-nD6Zdx0q.js.map → StateBadge.vue_vue_type_script_setup_true_lang-CzLuB-ZI.js.map} +1 -1
- package/dist/assets/{SubmitView-D-jg5Wxy.js → SubmitView-CChPoIvR.js} +2 -2
- package/dist/assets/{SubmitView-D-jg5Wxy.js.map → SubmitView-CChPoIvR.js.map} +1 -1
- package/dist/assets/{SwarmView-CqFndUrV.js → SwarmView-xPA-5INc.js} +2 -2
- package/dist/assets/{SwarmView-CqFndUrV.js.map → SwarmView-xPA-5INc.js.map} +1 -1
- package/dist/assets/{Teleport-I0XiM19H.js → Teleport-Bg1yDCl9.js} +2 -2
- package/dist/assets/{Teleport-I0XiM19H.js.map → Teleport-Bg1yDCl9.js.map} +1 -1
- package/dist/assets/{TerminalTab-Dleba0ru.js → TerminalTab-jUQlwJpM.js} +2 -2
- package/dist/assets/{TerminalTab-Dleba0ru.js.map → TerminalTab-jUQlwJpM.js.map} +1 -1
- package/dist/assets/{UsersView-BrZbuuOg.js → UsersView-DcjfdY6Q.js} +2 -2
- package/dist/assets/{UsersView-BrZbuuOg.js.map → UsersView-DcjfdY6Q.js.map} +1 -1
- package/dist/assets/{VarEditor.vue_vue_type_script_setup_true_lang-uPHU_Ugp.js → VarEditor.vue_vue_type_script_setup_true_lang-gohbG3IW.js} +2 -2
- package/dist/assets/{VarEditor.vue_vue_type_script_setup_true_lang-uPHU_Ugp.js.map → VarEditor.vue_vue_type_script_setup_true_lang-gohbG3IW.js.map} +1 -1
- package/dist/assets/{VarIO-BldCQ6Xx.js → VarIO-gtGLr9Br.js} +2 -2
- package/dist/assets/{VarIO-BldCQ6Xx.js.map → VarIO-gtGLr9Br.js.map} +1 -1
- package/dist/assets/{VariablesView-CQp0T7Q6.js → VariablesView-DSXnmTTH.js} +2 -2
- package/dist/assets/{VariablesView-CQp0T7Q6.js.map → VariablesView-DSXnmTTH.js.map} +1 -1
- package/dist/assets/{index-Cqe_7QZw.js → index-DB2WhG8N.js} +3 -3
- package/dist/assets/{index-Cqe_7QZw.js.map → index-DB2WhG8N.js.map} +1 -1
- package/dist/assets/{useDeployment-BDbkdxpo.js → useDeployment-B7wpJY-X.js} +2 -2
- package/dist/assets/{useDeployment-BDbkdxpo.js.map → useDeployment-B7wpJY-X.js.map} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/SettingsView-DIKjdBdy.js +0 -2
- package/dist/assets/SettingsView-DIKjdBdy.js.map +0 -1
- package/dist/assets/SsoView-CltdTdwt.js +0 -2
- package/dist/assets/SsoView-CltdTdwt.js.map +0 -1
- package/dist/assets/SsoView-JmlPQGWM.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RegistriesView-D2aCsYIu.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';\nimport RefreshButton from '../components/RefreshButton.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 <span class=\"grow\" />\n <RefreshButton :run=\"load\" />\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","RefreshButton","_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":"41CA+BA,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,MAAQ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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';\nimport RefreshButton from '../components/RefreshButton.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 <span class=\"grow\" />\n <RefreshButton :run=\"load\" />\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","RefreshButton","_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","_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|
|
2
|
-
//# sourceMappingURL=RelativeTime.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import{d as l,O as i,ad as c,o as m,c as r,u,R as d,t as f,j as v,k as p,H as w}from"./index-DB2WhG8N.js";const D=["datetime","title"],I=15e3,k=l({__name:"RelativeTime",props:{at:{}},setup(e){const o=e,n=v(Date.now());let t=null,a=0;i(()=>{a++,t||(t=setInterval(()=>n.value=Date.now(),I))}),c(()=>{a--,a===0&&t&&(clearInterval(t),t=null)});const s=p(()=>(n.value,w(o.at)));return(S,_)=>(m(),r("time",{datetime:e.at?new Date(e.at).toISOString():void 0,title:u(d)(e.at)},f(s.value),9,D))}});export{k as _};
|
|
2
|
+
//# sourceMappingURL=RelativeTime.vue_vue_type_script_setup_true_lang-eoX10cnp.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-eoX10cnp.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\n// `null` as well as `undefined`: a queued job's `startedAt` is null, and it renders as an em dash.\nconst props = defineProps<{ at: number | null | 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":"uIAgCMA,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-B7wpJY-X.js";import{d as m,c as s,a as e,f as n,u as l,F as i,r as c,g as h,o as a,D as p,t as d}from"./index-DB2WhG8N.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},R=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{R as default};
|
|
2
|
+
//# sourceMappingURL=RequiresTab-Dde68lOF.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequiresTab-
|
|
1
|
+
{"version":3,"file":"RequiresTab-Dde68lOF.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,2 +1,2 @@
|
|
|
1
|
-
import{d as s,o as t,c as n,t as o}from"./index-
|
|
2
|
-
//# sourceMappingURL=RouteTarget.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import{d as s,o as t,c as n,t as o}from"./index-DB2WhG8N.js";const a=["title"],r={key:1,class:"s-leaked"},i={key:2,class:"s-failed"},c={key:3,class:"s-unverifiable",title:"A swarm task on another node. The manager lists it but cannot see its address — this is normal, and nothing needs fixing."},l={key:4,class:"s-unverifiable",title:"This server did not say why."},g=s({__name:"RouteTarget",props:{route:{}},setup(e){return(d,u)=>e.route.target?(t(),n("span",{key:0,class:"mono cell-clip",title:e.route.target},o(e.route.target),9,a)):e.route.targetReason==="no-port"?(t(),n("span",r," no port declared ")):e.route.targetReason==="not-on-ingress"?(t(),n("span",i," not on the ingress network ")):e.route.targetReason==="unknown-node"?(t(),n("span",c," address not known from this node ")):(t(),n("span",l,"not known"))}});export{g as _};
|
|
2
|
+
//# sourceMappingURL=RouteTarget.vue_vue_type_script_setup_true_lang-DgcXRES0.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RouteTarget.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
{"version":3,"file":"RouteTarget.vue_vue_type_script_setup_true_lang-DgcXRES0.js","sources":["../../src/components/RouteTarget.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * The \"Forwards to\" cell: the address Traefik assembled, or WHY it could not.\n *\n * ONE COMPONENT, TWO PAGES. The deployment's Runtime tab and the host-wide Routing page render the\n * same fact from the same shape, and they used to render it from two copies of the same ternary —\n * which is how the two would drift the moment one of them learned something the other did not.\n *\n * WHY NOT A TERNARY. `target === null` had two branches, `port === null ? 'no port declared' :\n * 'not on the ingress network'`, and under swarm the second one was wrong for EVERY route: the\n * routers live on the SERVICE, whose address this node cannot see, so a perfectly healthy stack read\n * as a misconfiguration. The server now says which of the three it is (`targetReason`), and the three\n * are coloured by whether anyone should act:\n *\n * no-port amber — the router works, Traefik is guessing the port; probably fix it\n * not-on-ingress red — a real misconfiguration; the hostname 404s until it is fixed\n * unknown-node neutral — normal under swarm; nothing to do\n *\n * THE FINAL `v-else` IS THE OLD-SERVER BRANCH. `targetReason` is typed non-optional because the UI\n * and the server ship together, but a UI pointed at an older binary receives no field at all. That\n * must not fall into \"not on the ingress network\" — accusing a healthy stack of the exact bug this\n * replaced. It falls here instead, and says only what is true: nothing is known.\n */\nimport type { RuntimeRoute } from '../api/types';\n\ndefineProps<{ route: RuntimeRoute }>();\n</script>\n\n<template>\n <!-- `cell-clip`: an IPv6 address is long, the column is fixed-width, and the whole value stays\n reachable in `title`. The reasons below are short by construction and wrap on their own. -->\n <span v-if=\"route.target\" class=\"mono cell-clip\" :title=\"route.target\">{{ route.target }}</span>\n <span v-else-if=\"route.targetReason === 'no-port'\" class=\"s-leaked\">\n no port declared\n </span>\n <span v-else-if=\"route.targetReason === 'not-on-ingress'\" class=\"s-failed\">\n not on the ingress network\n </span>\n <span\n v-else-if=\"route.targetReason === 'unknown-node'\"\n class=\"s-unverifiable\"\n title=\"A swarm task on another node. The manager lists it but cannot see its address — this is normal, and nothing needs fixing.\"\n >\n address not known from this node\n </span>\n <span v-else class=\"s-unverifiable\" title=\"This server did not say why.\">not known</span>\n</template>\n"],"names":["__props","_createElementBlock","_toDisplayString","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5"],"mappings":"+aA+BcA,EAAA,MAAM,YAAlBC,EAAgG,OAAA,OAAtE,MAAM,iBAAkB,MAAOD,EAAA,MAAM,MAAA,EAAWE,EAAAF,EAAA,MAAM,MAAM,EAAA,EAAAG,CAAA,GACrEH,EAAA,MAAM,eAAY,eAAnCC,EAEO,OAFPG,EAAoE,oBAEpE,GACiBJ,EAAA,MAAM,eAAY,sBAAnCC,EAEO,OAFPI,EAA2E,8BAE3E,GAEaL,EAAA,MAAM,eAAY,oBAD/BC,EAMO,OANPK,EAIC,oCAED,QACAL,EAAyF,OAAzFM,EAAyE,WAAS"}
|
|
@@ -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 O,g as d,z as w,t as v,F as g,r as E,u as x,$ as A,i as j,v as z,j as r,k as q,p as _,C as L,l as ne,U as J,o as s,D as ae,R as ie}from"./index-
|
|
1
|
+
import{d as oe,c as o,a as t,f as n,e as c,w as f,_ as O,g as d,z as w,t as v,F as g,r as E,u as x,$ as A,i as j,v as z,j as r,k as q,p as _,C as L,l as ne,U as J,o as s,D as ae,R as ie}from"./index-DB2WhG8N.js";import{_ as K}from"./ActionButton.vue_vue_type_script_setup_true_lang-AGS1FKpY.js";import{_ as Q}from"./ErrorNote.vue_vue_type_script_setup_true_lang-BrBUwK6j.js";import{_ as X}from"./SkeletonList.vue_vue_type_script_setup_true_lang-CvoOnzDO.js";import{_ as re}from"./HelpModal.vue_vue_type_script_setup_true_lang-CTbPBhLs.js";import{_ as ue}from"./RefreshButton.vue_vue_type_script_setup_true_lang-8Tme6z_i.js";import{_ as de}from"./RouteTarget.vue_vue_type_script_setup_true_lang-DgcXRES0.js";import{_ as ve}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./DialogTrigger-D4yBGqUf.js";import"./Teleport-Bg1yDCl9.js";const pe={class:"page-head"},ce={class:"sub"},fe={key:1,class:"banner info"},me={class:"panel"},he={class:"phead"},ye={class:"mute",style:{"font-size":"var(--t-sm)"}},be={key:0,class:"banner warn"},ke={key:1,class:"table-scroll"},we={class:"cards tbl-fixed t-live"},ge={class:"stagger"},_e={class:"cell-wrap","data-label":"url"},Re=["href"],Te={key:1,class:"mono mute"},Ce={key:0,class:"mute"},$e={"data-label":"forwards to"},xe={"data-label":"deployment"},Ae={key:1,class:"mute"},Le={class:"dim","data-label":"router"},Ne=["title"],Se={key:2,class:"mute"},Ie={class:"panel"},Ue={class:"phead"},De={key:0,class:"mute",style:{"font-size":"var(--t-sm)"}},Pe={class:"mute"},Ve={key:0,class:"banner failed"},Ee={key:1,class:"banner info"},je={key:3,class:"kvlist"},ze={class:"k"},Fe=["onClick"],Be={class:"v mute",style:{"font-size":"var(--t-sm)"}},We={key:4,class:"mute"},Me={key:2,class:"panel"},He={class:"phead"},Ge={class:"section"},Oe={key:0,class:"badge warn"},qe={key:0,class:"field",style:{"max-width":"340px"}},Je={key:2,class:"banner plain"},Ke={class:"field"},Qe={class:"row",style:{"margin-top":"var(--s4)"}},Xe={key:0,class:"mute"},Ye={class:"field",style:{"max-width":"340px"}},Ze=["for"],et=["id","placeholder"],tt={class:"row"},st=`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 O,g as d,z as w,t as v,F
|
|
|
6
6
|
sourceRange:
|
|
7
7
|
- 203.0.113.0/24
|
|
8
8
|
`,lt=oe({__name:"RoutingView",setup(ot){const N=r([]),S=r(null),I=r([]),U=r(""),D=r(null),F=r(!1),R=r(""),i=r(null),u=r(""),m=r(""),T=r(!1),P=r(!1),b=r(!1),p=r(""),C=r(""),h=r(null),y=r(""),B=q(()=>i.value!==null&&u.value!==m.value),Y=q(()=>!!A.token&&!b.value&&u.value.trim().length>0&&(B.value||i.value===""));async function Z(){await Promise.all([$(),W()])}async function $(){const l=await _.get("/api/routing");if(F.value=!0,!l.ok){R.value=L(l,"load the routing files");return}R.value="",I.value=l.body.files??[],U.value=l.body.dir??"",D.value=l.body.writable??!1}async function W(){const l=await _.get("/api/routing/live");if(!l.ok){S.value=!1;return}S.value=l.body.reachable,N.value=l.body.routes??[]}$(),W();async function ee(l){i.value=l,P.value=!0,p.value="",T.value=!1,y.value="";const e=await _.getAuthed(`/api/routing/${encodeURIComponent(l)}`);if(P.value=!1,!e.ok){p.value=L(e,"open this file");return}if(e.body.sourceWithheld){T.value=!0,u.value="",m.value="";return}u.value=e.body.content??"",m.value=u.value}function te(){i.value="",C.value="",u.value=st,m.value="",T.value=!1,p.value=""}function M(){i.value=null,u.value="",m.value="",p.value=""}async function H(){const l=i.value===""?C.value.trim():i.value;if(!l){p.value="Give the file a name, ending in .yml";return}b.value=!0,p.value="";const e=await _.put(`/api/routing/${encodeURIComponent(l)}`,{content:u.value});if(b.value=!1,!e.ok){p.value=L(e,"save this file");return}e.body.previous&&(h.value={name:l,content:e.body.previous}),m.value=u.value,i.value=l,J("ok",`Saved ${l}. Traefik reloads within a second or two.`),$()}async function se(){const l=h.value;l&&(u.value=l.content,i.value=l.name,await H(),h.value=null)}async function le(){const l=i.value;if(!l||y.value!==l)return;const e=await _.del(`/api/routing/${encodeURIComponent(l)}`);if(!e.ok){p.value=L(e,"delete this file");return}e.body.previous&&(h.value={name:l,content:e.body.previous}),J("ok",`Deleted ${l}.`),M(),$()}return(l,e)=>{const V=ne("RouterLink");return s(),o("div",null,[t("div",pe,[t("div",null,[t("h1",null,[e[4]||(e[4]=n(" Routing ",-1)),c(re,{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",ce,[e[6]||(e[6]=n(" Every route on this host, and the config files behind them ",-1)),c(O,{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:te},"New file")):d("",!0),e[8]||(e[8]=t("span",{class:"grow"},null,-1)),c(ue,{run:Z})]),R.value?(s(),w(Q,{key:0,text:R.value,title:"Could not load the routing files."},null,8,["text"])):d("",!0),h.value?(s(),o("div",fe,[t("b",null,"Replaced "+v(h.value.name)+".",1),t("p",null,[e[9]||(e[9]=n(" The previous contents are still here for this session. ",-1)),t("button",{class:"btn sm",onClick:se},"Put it back")])])):d("",!0),t("section",me,[t("div",he,[e[12]||(e[12]=t("h2",{class:"section"},"Live routes",-1)),e[13]||(e[13]=t("span",{class:"grow"},null,-1)),t("span",ye,[e[11]||(e[11]=n(" from container labels ",-1)),c(O,{label:"why routes are not in the files below",align:"end"},{default:f(()=>[...e[10]||(e[10]=[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})])]),S.value===!1?(s(),o("div",be,[...e[14]||(e[14]=[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("div",ke,[t("table",we,[e[15]||(e[15]=t("colgroup",null,[t("col",{style:{width:"34%"}}),t("col",{style:{width:"24%"}}),t("col",{style:{width:"20%"}}),t("col",{style:{width:"22%"}})],-1)),e[16]||(e[16]=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",ge,[(s(!0),o(g,null,E(N.value,(a,G)=>(s(),o("tr",{key:`${a.container}-${a.router}`,style:ae({"--i":G})},[t("td",_e,[(s(!0),o(g,null,E(a.hosts,k=>(s(),o("div",{key:k},[k.startsWith("(pattern)")?(s(),o("span",Te,v(k),1)):(s(),o("a",{key:0,href:`https://${k}`,target:"_blank",rel:"noreferrer"},v(k),9,Re))]))),128)),a.hosts.length?d("",!0):(s(),o("span",Ce,"no host in the rule"))]),t("td",$e,[c(de,{route:a},null,8,["route"])]),t("td",xe,[a.project?(s(),w(V,{key:0,class:"cell-clip",title:a.project,to:`/deployments/${encodeURIComponent(a.project)}/runtime`},{default:f(()=>[n(v(a.project),1)]),_:2},1032,["title","to"])):(s(),o("span",Ae,"—"))]),t("td",Le,[t("span",{class:"cell-clip",title:a.router},v(a.router),9,Ne)])],4))),128))])])])):(s(),o("p",Se,[...e[17]||(e[17]=[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",Ie,[t("div",Ue,[e[18]||(e[18]=t("h2",{class:"section"},"Config files",-1)),e[19]||(e[19]=t("span",{class:"grow"},null,-1)),U.value?(s(),o("span",De,[t("span",Pe,v(U.value),1)])):d("",!0)]),D.value===!1?(s(),o("div",Ve,[...e[20]||(e[20]=[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(A).token?d("",!0):(s(),o("div",Ee,[e[24]||(e[24]=t("b",null,"Viewing needs a token too.",-1)),t("p",null,[e[22]||(e[22]=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[21]||(e[21]=[n("Add your token",-1)])]),_:1}),e[23]||(e[23]=n(". ",-1))])])),F.value?I.value.length?(s(),o("ul",je,[(s(!0),o(g,null,E(I.value,a=>(s(),o("li",{key:a.name},[t("span",ze,[t("button",{class:"ghost sm",onClick:G=>ee(a.name)},v(a.name),9,Fe)]),t("span",Be,v(a.size)+" bytes · "+v(x(ie)(a.updatedAt)),1)]))),128))])):(s(),o("p",We," No files yet. Everything is routed by container labels, which is a perfectly good place to be. ")):(s(),w(X,{key:2,rows:3}))]),i.value!==null?(s(),o("section",Me,[t("div",He,[t("h2",Ge,v(i.value===""?"New file":i.value),1),B.value?(s(),o("span",Oe,"unsaved")):d("",!0),e[25]||(e[25]=t("span",{class:"grow"},null,-1)),t("button",{class:"ghost sm",onClick:M},"Close")]),i.value===""?(s(),o("div",qe,[e[26]||(e[26]=t("label",{for:"fname"},"File name",-1)),j(t("input",{id:"fname","onUpdate:modelValue":e[0]||(e[0]=a=>C.value=a),type:"text",placeholder:"middleware.yml",spellcheck:"false",autocomplete:"off"},null,512),[[z,C.value,void 0,{trim:!0}]]),e[27]||(e[27]=t("div",{class:"mute hint"},[n("Lower case, ending in "),t("code",null,".yml"),n(".")],-1))])):d("",!0),P.value?(s(),w(X,{key:1,rows:4})):T.value?(s(),o("div",Je,[e[30]||(e[30]=t("b",null,"Hidden without an access token.",-1)),t("p",null,[c(V,{to:"/settings"},{default:f(()=>[...e[28]||(e[28]=[n("Add your token",-1)])]),_:1}),e[29]||(e[29]=n(" to read and edit this file. ",-1))])])):(s(),o(g,{key:3},[t("div",Ke,[e[31]||(e[31]=t("label",{for:"content"},"Contents",-1)),j(t("textarea",{id:"content","onUpdate:modelValue":e[1]||(e[1]=a=>u.value=a),rows:"18",spellcheck:"false"},null,512),[[z,u.value]])]),p.value?(s(),w(Q,{key:0,text:p.value,title:"Traefik would not accept this."},null,8,["text"])):d("",!0),t("div",Qe,[c(K,{variant:"primary",pending:b.value,disabled:!Y.value,onClick:H},{default:f(()=>[n(v(b.value?"Saving…":"Save"),1)]),_:1},8,["pending","disabled"]),x(A).token?d("",!0):(s(),o("span",Xe,"Saving needs a token."))]),i.value?(s(),o(g,{key:1},[e[35]||(e[35]=t("h2",{class:"section",style:{margin:"var(--s5) 0 var(--s3)"}},"Delete this file",-1)),e[36]||(e[36]=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",Ye,[t("label",{for:`confirm-${i.value}`},[e[32]||(e[32]=n(" Type ",-1)),t("b",null,v(i.value),1),e[33]||(e[33]=n(" to confirm ",-1))],8,Ze),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,et),[[z,y.value,void 0,{trim:!0}]])]),t("div",tt,[c(K,{variant:"danger",disabled:y.value!==i.value||!x(A).token,title:y.value!==i.value?"Type the file name to confirm.":void 0,onClick:le},{default:f(()=>[...e[34]||(e[34]=[n(" Delete ",-1)])]),_:1},8,["disabled","title"])])],64)):d("",!0)],64))])):d("",!0)])}}}),mt=ve(lt,[["__scopeId","data-v-a18004fb"]]);export{mt as default};
|
|
9
|
-
//# sourceMappingURL=RoutingView-
|
|
9
|
+
//# sourceMappingURL=RoutingView-oXXCIL07.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RoutingView-T9afX8_M.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';\nimport RefreshButton from '../components/RefreshButton.vue';\nimport RouteTarget from '../components/RouteTarget.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 *\n * The table is fixed-layout inside `.table-scroll`, like the deployment's own: host-wide, every\n * router and project name carries a stack name, and under auto layout the longest one on the host\n * set the width for all of them. `RouteTarget` is shared with that table so the two cannot come to\n * describe the same missing address differently.\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\n/** Both halves: the file provider's directory AND the routes Traefik actually has. */\nasync function refreshAll(): Promise<void> {\n await Promise.all([loadList(), loadLive()]);\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 <span class=\"grow\" />\n <RefreshButton :run=\"refreshAll\" />\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 <div v-else-if=\"live.length\" class=\"table-scroll\">\n <table class=\"cards tbl-fixed t-live\">\n <!--\n Host-wide, so every identifier here is longer than its per-deployment equivalent: routers\n and projects both carry the stack name. URL still wraps rather than clips — it is the one\n value on the row anyone reads to the end.\n -->\n <colgroup>\n <col style=\"width: 34%\" />\n <col style=\"width: 24%\" />\n <col style=\"width: 20%\" />\n <col style=\"width: 22%\" />\n </colgroup>\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 class=\"cell-wrap\" 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 <RouteTarget :route=\"r\" />\n </td>\n <td data-label=\"deployment\">\n <RouterLink\n v-if=\"r.project\"\n class=\"cell-clip\"\n :title=\"r.project\"\n :to=\"`/deployments/${encodeURIComponent(r.project)}/runtime`\"\n >\n {{ r.project }}\n </RouterLink>\n <span v-else class=\"mute\">—</span>\n </td>\n <td class=\"dim\" data-label=\"router\">\n <span class=\"cell-clip\" :title=\"r.router\">{{ r.router }}</span>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\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\n<style scoped>\n/*\n * `.t-live`'s floor is in `app.css` with the other two, beside the `.tbl-fixed` comment that\n * promises it. It is derived from the `<colgroup>` above.\n */\n</style>\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","refreshAll","loadList","loadLive","r","api","problem","open","name","startNew","close","save","toast","revert","u","remove","_createElementBlock","_createElementVNode","_hoisted_1","_createVNode","HelpModal","_cache","_hoisted_2","InfoHint","RefreshButton","_createBlock","ErrorNote","_openBlock","_hoisted_3","_toDisplayString","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_Fragment","_renderList","i","_hoisted_11","h","_hoisted_13","_hoisted_12","_hoisted_14","_hoisted_15","RouteTarget","_hoisted_16","_component_RouterLink","_createTextVNode","_hoisted_17","_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":"4hEAmFMA,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,EAC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tE+D,GAA0C,uBAAqB,KAGjD5F,EAAA,WAAhB6B,EA6BWqB,EAAA,CAAA,IAAA,GAAA,eA5BTpB,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,MAZN+D,GAYM,CAXJ/D,EAEQ,QAAA,CAFA,eAAgB9B,EAAA,KAAQ,EAAA,mBAAI,SAC7B,EAAA,GAAA8B,EAAqB,WAAf9B,EAAA,KAAQ,EAAA,CAAA,kBAAO,eAC5B,EAAA,EAAA,UACA8B,EAOE,QAAA,CANC,cAAe9B,EAAA,KAAQ,wCACVS,EAAa,MAAAoE,GAC3B,KAAK,OACJ,YAAa7E,EAAA,MACd,WAAW,QACX,aAAa,KAAA,iBAJCS,EAAA,aAAN,CAAA,KAAR,EAAA,CAA4B,MAOhCqB,EASM,MATNgE,GASM,CARJ9D,EAOe2D,EAAA,CANb,QAAQ,SACP,SAAUlF,EAAA,QAAkBT,SAAQ,CAAKwE,EAAA3D,CAAA,EAAS,MAClD,MAAOJ,EAAA,QAAkBT,EAAA,uCAA8C,OACvE,QAAO4B,EAAA,aACT,IAED,CAAA,GAAAM,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAA,GAFC,WAED,EAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"RoutingView-oXXCIL07.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';\nimport RefreshButton from '../components/RefreshButton.vue';\nimport RouteTarget from '../components/RouteTarget.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 *\n * The table is fixed-layout inside `.table-scroll`, like the deployment's own: host-wide, every\n * router and project name carries a stack name, and under auto layout the longest one on the host\n * set the width for all of them. `RouteTarget` is shared with that table so the two cannot come to\n * describe the same missing address differently.\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\n/** Both halves: the file provider's directory AND the routes Traefik actually has. */\nasync function refreshAll(): Promise<void> {\n await Promise.all([loadList(), loadLive()]);\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 <span class=\"grow\" />\n <RefreshButton :run=\"refreshAll\" />\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 <div v-else-if=\"live.length\" class=\"table-scroll\">\n <table class=\"cards tbl-fixed t-live\">\n <!--\n Host-wide, so every identifier here is longer than its per-deployment equivalent: routers\n and projects both carry the stack name. URL still wraps rather than clips — it is the one\n value on the row anyone reads to the end.\n -->\n <colgroup>\n <col style=\"width: 34%\" />\n <col style=\"width: 24%\" />\n <col style=\"width: 20%\" />\n <col style=\"width: 22%\" />\n </colgroup>\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 class=\"cell-wrap\" 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 <RouteTarget :route=\"r\" />\n </td>\n <td data-label=\"deployment\">\n <RouterLink\n v-if=\"r.project\"\n class=\"cell-clip\"\n :title=\"r.project\"\n :to=\"`/deployments/${encodeURIComponent(r.project)}/runtime`\"\n >\n {{ r.project }}\n </RouterLink>\n <span v-else class=\"mute\">—</span>\n </td>\n <td class=\"dim\" data-label=\"router\">\n <span class=\"cell-clip\" :title=\"r.router\">{{ r.router }}</span>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\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\n<style scoped>\n/*\n * `.t-live`'s floor is in `app.css` with the other two, beside the `.tbl-fixed` comment that\n * promises it. It is derived from the `<colgroup>` above.\n */\n</style>\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","refreshAll","loadList","loadLive","r","api","problem","open","name","startNew","close","save","toast","revert","u","remove","_createElementBlock","_createElementVNode","_hoisted_1","_createVNode","HelpModal","_cache","_hoisted_2","InfoHint","RefreshButton","_createBlock","ErrorNote","_openBlock","_hoisted_3","_toDisplayString","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_Fragment","_renderList","i","_hoisted_11","h","_hoisted_13","_hoisted_12","_hoisted_14","_hoisted_15","RouteTarget","_hoisted_16","_component_RouterLink","_createTextVNode","_hoisted_17","_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":"4hEAmFMA,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,EAajH,eAAec,GAA4B,CACzC,MAAM,QAAQ,IAAI,CAACC,IAAYC,EAAA,CAAU,CAAC,CAC5C,CAEA,eAAeD,GAA0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AAA,CANC,cAAe9B,EAAA,KAAQ,wCACVS,EAAa,MAAAoE,GAC3B,KAAK,OACJ,YAAa7E,EAAA,MACd,WAAW,QACX,aAAa,KAAA,iBAJCS,EAAA,aAAN,CAAA,KAAR,EAAA,CAA4B,MAOhCqB,EASM,MATNgE,GASM,CARJ9D,EAOe2D,EAAA,CANb,QAAQ,SACP,SAAUlF,EAAA,QAAkBT,SAAQ,CAAKwE,EAAA3D,CAAA,EAAS,MAClD,MAAOJ,EAAA,QAAkBT,EAAA,uCAA8C,OACvE,QAAO4B,EAAA,aACT,IAED,CAAA,GAAAM,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAA,GAFC,WAED,EAAA,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as M,z as b,w as m,u as f,g as u,o as n,e as h,a as t,t as l,E as w,f as r,c as o,r as C,F as y,k as x,N as V,x as W,_ as U,j as N,l as K,D as z,M as A,p as E,C as B,U as F}from"./index-Cqe_7QZw.js";import{d as S,v as j}from"./useDeployment-BDbkdxpo.js";import{_ as H}from"./SkeletonList.vue_vue_type_script_setup_true_lang-BmeRGmxf.js";import{_ as L}from"./ActionButton.vue_vue_type_script_setup_true_lang-D8Xlp6c9.js";import{_ as G}from"./ErrorNote.vue_vue_type_script_setup_true_lang-DVbGiVTB.js";import{D as Q,a as q,b as J,c as X,d as Y,e as Z,f as ee}from"./DialogTrigger-nWkfUj3N.js";import{_ as O}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{_ as te}from"./RouteTarget.vue_vue_type_script_setup_true_lang-Caee0wEB.js";import{_ as se}from"./RefreshButton.vue_vue_type_script_setup_true_lang-P7VwWcRa.js";import"./useVars-VN9gYdR6.js";import"./Teleport-I0XiM19H.js";const ne={class:"help-head"},oe={class:"help-body"},le=M({__name:"FindingsModal",props:{findings:{}},setup(T){const i=T,k={error:0,warn:1,info:2},_=x(()=>[...i.findings].sort((p,v)=>k[p.level]-k[v.level])),g=x(()=>{var p;return((p=_.value[0])==null?void 0:p.level)??"info"}),I={error:"Blocking",warn:"Worth checking",info:"Notes"},$={error:"failed",warn:"warn",info:"info"},D={error:"failed",warn:"warn",info:"plain"};return(p,v)=>T.findings.length?(n(),b(f(Q),{key:0},{default:m(()=>[h(f(q),{class:w(["btn sm findings-btn",g.value])},{default:m(()=>[t("span",{class:w(["badge",$[g.value]])},l(T.findings.length),3),r(" "+l(I[g.value]),1)]),_:1},8,["class"]),h(f(ee),null,{default:m(()=>[h(f(J),{class:"scrim help-scrim"}),h(f(X),{class:"help-modal"},{default:m(()=>[t("div",ne,[h(f(Y),{class:"help-title"},{default:m(()=>[...v[0]||(v[0]=[r("What pstack noticed",-1)])]),_:1}),h(f(Z),{class:"ghost sm","aria-label":"Close"},{default:m(()=>[...v[1]||(v[1]=[r("Close",-1)])]),_:1})]),t("div",oe,[(n(!0),o(y,null,C(_.value,(R,a)=>(n(),o("div",{key:a,class:w(["banner",D[R.level]])},[t("b",null,l(I[R.level]),1),t("p",null,l(R.message),1)],2))),128))])]),_:1})]),_:1})]),_:1})):u("",!0)}}),ae=O(le,[["__scopeId","data-v-c92eabc7"]]),re={key:0,class:"banner warn"},ie={key:0,class:"row",style:{margin:"var(--s3) 0"}},de={key:1,class:"banner ok"},ue={class:"panel"},pe={class:"phead"},me={class:"mute",style:{"font-size":"var(--t-sm)"}},he={key:0,class:"table-scroll"},fe={class:"cards tbl-fixed t-routes"},ve={class:"stagger"},ce={class:"cell-wrap","data-label":"url"},ge=["href"],ye={key:1,class:"mono mute"},ke={key:0,class:"mute"},_e={"data-label":"forwards to"},be=["title"],we={"data-label":"router"},$e=["title"],Re={key:0,class:"mute",style:{"font-size":"var(--t-sm)"}},Ce={"data-label":"tls"},Se={key:0,class:"badge ok"},Te={key:1,class:"badge off"},Ie={key:1,class:"banner warn"},Ne={class:"panel"},xe={class:"phead"},De={class:"mute",style:{"font-size":"var(--t-sm)"}},Pe={key:0,class:"table-scroll"},Le={key:0,style:{width:"14ch"}},Ue={key:0},ze={class:"stagger"},Ae={class:"name","data-label":"service"},Ee=["title"],Be=["title"],Fe={key:0,"data-label":"node"},je=["title"],Me={key:0,class:"badge",title:"runs on another swarm node — logs reach it through the manager; a shell and stop/start do not"},Oe={"data-label":"state"},Ve={"data-label":"ports"},We={class:"mono"},Ke={key:0,class:"mute"},He={key:0,class:"mute"},Ge={"data-label":"networks"},Qe=["title"],qe=["title"],Je={class:"dim","data-label":"image"},Xe=["title"],Ye={class:"row-actions","data-label":""},Ze={key:0,class:"badge",title:"a one-shot job — it runs to completion; there is no long-lived container to start, stop, or open a shell in"},et={key:1,class:"mute",style:{"font-size":"var(--t-sm)"},title:"runs on another swarm node — redeploy the stack, or act on the worker itself"},tt=["href"],st={key:1,class:"mute"},nt=M({__name:"RuntimeTab",setup(T){const i=N(null),k=N(""),_=N(!0);async function g(){const a=await E.get(`/api/deployments/${encodeURIComponent(S.id)}/runtime${j.value}`);if(_.value=!1,!a.ok){k.value=B(a,"inspect what is running");return}k.value="",i.value=a.body}V(()=>S.id,()=>{_.value=!0,g()},{immediate:!0}),W(()=>void g(),8e3);const I=x(()=>{var a;return((a=i.value)==null?void 0:a.containers.filter(e=>e.state==="running").length)??0}),$=x(()=>{var a;return((a=i.value)==null?void 0:a.containers.some(e=>e.node))??!1});function D(a){const e=a.split(".");return e.length===3?`${e[1]}.${e[2]}`:a}const p=N("");async function v(a,e){p.value=`${e}:${a.name}`;const c=await E.post(`/api/deployments/${encodeURIComponent(S.id)}/containers/${encodeURIComponent(a.name)}/${e}${j.value}`);if(p.value="",!c.ok){F("error",B(c,`${e} ${a.name}`));return}F("ok",c.body.note??`${a.name}: ${e} done.`),g()}function R(a){var c;const e=(c=i.value)==null?void 0:c.routes.filter(s=>s.container===a.name||s.container===a.service).flatMap(s=>s.hosts).find(s=>!s.startsWith("(pattern)"));return e?`https://${e}`:null}return(a,e)=>{const c=K("RouterLink");return n(),o("div",null,[k.value?(n(),b(G,{key:0,text:k.value,title:"Could not inspect this deployment."},null,8,["text"])):u("",!0),_.value&&!i.value?(n(),b(H,{key:1,rows:5})):i.value?(n(),o(y,{key:2},[i.value.reachable?(n(),o(y,{key:1},[i.value.findings.length?(n(),o("div",ie,[h(ae,{findings:i.value.findings},null,8,["findings"])])):u("",!0),!i.value.findings.length&&i.value.containers.length?(n(),o("div",de,[...e[1]||(e[1]=[t("b",null,"Nothing looks wrong.",-1),t("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)])])):u("",!0),t("section",ue,[t("div",pe,[e[3]||(e[3]=t("h2",{class:"section"},"Routing",-1)),e[4]||(e[4]=t("span",{class:"grow"},null,-1)),t("span",me,[r(" TLS: "+l(i.value.challenge==="unknown"?"unknown":i.value.challenge)+" ",1),h(U,{label:"why the TLS mode matters here",align:"end"},{default:m(()=>[...e[2]||(e[2]=[r(" Under HTTP-01 every per-PR router needs ",-1),t("code",null,"tls.certresolver=le",-1),r(", 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})])]),i.value.routes.length?(n(),o("div",he,[t("table",fe,[e[10]||(e[10]=t("colgroup",null,[t("col",{style:{width:"34%"}}),t("col",{style:{width:"26%"}}),t("col",{style:{width:"26%"}}),t("col",{style:{width:"14%"}})],-1)),t("thead",null,[t("tr",null,[e[7]||(e[7]=t("th",null,"URL",-1)),t("th",null,[e[6]||(e[6]=r(" Forwards to ",-1)),h(U,{label:"how a URL reaches a port"},{default:m(()=>[...e[5]||(e[5]=[r(" Traefik's docker provider resolves the container's IP on ",-1),t("code",null,"preview-ingress",-1),r(" and dials it on the port from ",-1),t("code",null,"loadbalancer.server.port",-1),r(" — it does ",-1),t("em",null,"not",-1),r(" use ",-1),t("code",null,"service:port",-1),r(" DNS. So the port here is the one inside the container, and publishing a host port is unnecessary. ",-1)])]),_:1})]),e[8]||(e[8]=t("th",null,"Router",-1)),e[9]||(e[9]=t("th",null,"TLS",-1))])]),t("tbody",ve,[(n(!0),o(y,null,C(i.value.routes,(s,P)=>(n(),o("tr",{key:s.router,style:z({"--i":P})},[t("td",ce,[(n(!0),o(y,null,C(s.hosts,d=>(n(),o("div",{key:d},[d.startsWith("(pattern)")?(n(),o("span",ye,l(d),1)):(n(),o("a",{key:0,href:`https://${d}`,target:"_blank",rel:"noreferrer"},l(d),9,ge))]))),128)),s.hosts.length?u("",!0):(n(),o("span",ke,"no host in the rule"))]),t("td",_e,[h(te,{route:s},null,8,["route"]),t("div",{class:"mute cell-clip",style:{"font-size":"var(--t-sm)"},title:s.container},l(s.container),9,be)]),t("td",we,[t("div",{class:"cell-clip",title:s.router},l(s.router),9,$e),s.priority?(n(),o("div",Re," priority "+l(s.priority),1)):u("",!0)]),t("td",Ce,[s.tls?(n(),o("span",Se,l(s.certresolver||"inherited"),1)):(n(),o("span",Te,"off"))])],4))),128))])])])):(n(),o("div",Ie,[e[16]||(e[16]=t("b",null,"No routes. Traefik has not been told about this deployment.",-1)),t("p",null,[e[12]||(e[12]=r(" Routes come from labels in ",-1)),e[13]||(e[13]=t("em",null,"your",-1)),e[14]||(e[14]=r(" compose file, not from pstack and not from the ",-1)),h(c,{to:"/routing"},{default:m(()=>[...e[11]||(e[11]=[r("Routing",-1)])]),_:1}),e[15]||(e[15]=r(" page (that is Traefik's file provider — middleware and TLS options, not per-PR routers). A reachable service needs four things: ",-1))]),e[17]||(e[17]=t("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)),e[18]||(e[18]=t("p",{class:"mute"},[r(" Put "),t("code",null,"${STACK}"),r(" 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))]))]),t("section",Ne,[t("div",xe,[e[19]||(e[19]=t("h2",{class:"section"},"Containers",-1)),e[20]||(e[20]=t("span",{class:"grow"},null,-1)),t("span",De,l(I.value)+" of "+l(i.value.containers.length)+" running ",1),h(se,{run:g,busy:_.value},null,8,["busy"])]),i.value.containers.length?(n(),o("div",Pe,[t("table",{class:w(["cards tbl-fixed t-containers",{swarm:$.value}])},[t("colgroup",null,[e[21]||(e[21]=t("col",{style:{width:"22ch"}},null,-1)),$.value?(n(),o("col",Le)):u("",!0),e[22]||(e[22]=t("col",{style:{width:"12ch"}},null,-1)),e[23]||(e[23]=t("col",{style:{width:"13ch"}},null,-1)),e[24]||(e[24]=t("col",{style:{width:"20ch"}},null,-1)),e[25]||(e[25]=t("col",null,null,-1)),e[26]||(e[26]=t("col",{style:{width:"288px"}},null,-1))]),t("thead",null,[t("tr",null,[e[27]||(e[27]=t("th",null,"Service",-1)),$.value?(n(),o("th",Ue,"Node")):u("",!0),e[28]||(e[28]=t("th",null,"State",-1)),e[29]||(e[29]=t("th",null,"Ports",-1)),e[30]||(e[30]=t("th",null,"Networks",-1)),e[31]||(e[31]=t("th",null,"Image",-1)),e[32]||(e[32]=t("th",{"aria-label":"Actions"},null,-1))])]),t("tbody",ze,[(n(!0),o(y,null,C(i.value.containers,(s,P)=>(n(),o("tr",{key:s.id,style:z({"--i":P})},[t("td",Ae,[t("div",{class:"cell-clip",title:s.service??s.name},l(s.service??s.name),9,Ee),t("div",{class:"mute task cell-clip",title:s.name},l(D(s.name)),9,Be)]),$.value?(n(),o("td",Fe,[t("div",{class:"cell-clip",title:s.node??void 0},l(s.node??"—"),9,je),s.remote?(n(),o("span",Me,"remote")):u("",!0)])):u("",!0),t("td",Oe,[t("span",{class:w(s.state==="running"?"s-ok":"s-failed")},l(f(A)(s.state)),3),s.health&&s.state==="running"?(n(),o("div",{key:0,class:w(["mute",s.health==="healthy"?"s-ok":"s-failed"]),style:{"font-size":"var(--t-sm)"}},l(f(A)(s.health)),3)):u("",!0)]),t("td",Ve,[(n(!0),o(y,null,C(s.ports,d=>(n(),o("div",{key:`${d.containerPort}/${d.protocol}`},[t("span",We,l(d.containerPort),1),d.hostPort?(n(),o("span",Ke," ← host "+l(d.hostPort),1)):u("",!0)]))),128)),s.ports.length?u("",!0):(n(),o("span",He,"none exposed"))]),t("td",Ge,[(n(!0),o(y,null,C(s.networks,d=>(n(),o("div",{key:d,class:"cell-clip",title:d},[t("span",{class:w(d==="preview-ingress"?"s-ok":"")},l(d),3)],8,Qe))),128)),s.ingressIp?(n(),o("div",{key:0,class:"mute mono cell-clip",style:{"font-size":"var(--t-sm)"},title:s.ingressIp},l(s.ingressIp),9,qe)):u("",!0)]),t("td",Je,[t("span",{class:"cell-clip",title:s.image},l(s.image),9,Xe)]),t("td",Ye,[s.job?(n(),o("span",Ze,"one-shot")):s.remote?(n(),o("span",et," on "+l(s.node),1)):s.state!=="running"?(n(),b(L,{key:2,class:"sm",variant:"ghost",pending:p.value===`start:${s.name}`,disabled:!!p.value,confirm:"Start it?",onRun:d=>v(s,"start")},{default:m(()=>[...e[33]||(e[33]=[r(" Start ",-1)])]),_:1},8,["pending","disabled","onRun"])):(n(),b(L,{key:3,class:"sm",variant:"ghost",pending:p.value===`stop:${s.name}`,disabled:!!p.value,confirm:"Stop it?",title:"Stops this container only. It stays stopped until something starts it.",onRun:d=>v(s,"stop")},{default:m(()=>[...e[34]||(e[34]=[r(" Stop ",-1)])]),_:1},8,["pending","disabled","onRun"])),!s.remote&&!s.job?(n(),b(L,{key:4,class:"sm",variant:"ghost",pending:p.value===`restart:${s.name}`,disabled:!!p.value,confirm:"Restart it?",onRun:d=>v(s,"restart")},{default:m(()=>[...e[35]||(e[35]=[r(" Restart ",-1)])]),_:1},8,["pending","disabled","onRun"])):u("",!0),h(c,{class:"btn sm ghost",to:`/deployments/${encodeURIComponent(f(S).id)}/logs?container=${encodeURIComponent(s.name)}`},{default:m(()=>[...e[36]||(e[36]=[r(" Logs ",-1)])]),_:1},8,["to"]),s.state==="running"&&!s.remote&&!s.job?(n(),b(c,{key:5,class:"btn sm ghost",to:`/deployments/${encodeURIComponent(f(S).id)}/terminal?container=${encodeURIComponent(s.name)}`},{default:m(()=>[...e[37]||(e[37]=[r(" Shell ",-1)])]),_:1},8,["to"])):u("",!0),s.state==="running"&&R(s)?(n(),o("a",{key:6,class:"btn sm ghost",href:R(s),target:"_blank",rel:"noreferrer"}," Open ",8,tt)):u("",!0)])],4))),128))])],2)])):(n(),o("p",st," 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)):(n(),o("div",re,[...e[0]||(e[0]=[t("b",null,"Docker did not answer.",-1),t("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)):u("",!0)])}}}),vt=O(nt,[["__scopeId","data-v-084c7ea0"]]);export{vt as default};
|
|
2
|
-
//# sourceMappingURL=RuntimeTab-
|
|
1
|
+
import{d as M,z as b,w as m,u as f,g as u,o as n,e as h,a as t,t as l,E as w,f as r,c as o,r as C,F as y,k as x,N as V,x as W,_ as U,j as N,l as K,D as z,M as A,p as E,C as B,U as F}from"./index-DB2WhG8N.js";import{d as S,v as j}from"./useDeployment-B7wpJY-X.js";import{_ as H}from"./SkeletonList.vue_vue_type_script_setup_true_lang-CvoOnzDO.js";import{_ as L}from"./ActionButton.vue_vue_type_script_setup_true_lang-AGS1FKpY.js";import{_ as G}from"./ErrorNote.vue_vue_type_script_setup_true_lang-BrBUwK6j.js";import{D as Q,a as q,b as J,c as X,d as Y,e as Z,f as ee}from"./DialogTrigger-D4yBGqUf.js";import{_ as O}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{_ as te}from"./RouteTarget.vue_vue_type_script_setup_true_lang-DgcXRES0.js";import{_ as se}from"./RefreshButton.vue_vue_type_script_setup_true_lang-8Tme6z_i.js";import"./useVars-VN9gYdR6.js";import"./Teleport-Bg1yDCl9.js";const ne={class:"help-head"},oe={class:"help-body"},le=M({__name:"FindingsModal",props:{findings:{}},setup(T){const i=T,k={error:0,warn:1,info:2},_=x(()=>[...i.findings].sort((p,v)=>k[p.level]-k[v.level])),g=x(()=>{var p;return((p=_.value[0])==null?void 0:p.level)??"info"}),I={error:"Blocking",warn:"Worth checking",info:"Notes"},$={error:"failed",warn:"warn",info:"info"},D={error:"failed",warn:"warn",info:"plain"};return(p,v)=>T.findings.length?(n(),b(f(Q),{key:0},{default:m(()=>[h(f(q),{class:w(["btn sm findings-btn",g.value])},{default:m(()=>[t("span",{class:w(["badge",$[g.value]])},l(T.findings.length),3),r(" "+l(I[g.value]),1)]),_:1},8,["class"]),h(f(ee),null,{default:m(()=>[h(f(J),{class:"scrim help-scrim"}),h(f(X),{class:"help-modal"},{default:m(()=>[t("div",ne,[h(f(Y),{class:"help-title"},{default:m(()=>[...v[0]||(v[0]=[r("What pstack noticed",-1)])]),_:1}),h(f(Z),{class:"ghost sm","aria-label":"Close"},{default:m(()=>[...v[1]||(v[1]=[r("Close",-1)])]),_:1})]),t("div",oe,[(n(!0),o(y,null,C(_.value,(R,a)=>(n(),o("div",{key:a,class:w(["banner",D[R.level]])},[t("b",null,l(I[R.level]),1),t("p",null,l(R.message),1)],2))),128))])]),_:1})]),_:1})]),_:1})):u("",!0)}}),ae=O(le,[["__scopeId","data-v-c92eabc7"]]),re={key:0,class:"banner warn"},ie={key:0,class:"row",style:{margin:"var(--s3) 0"}},de={key:1,class:"banner ok"},ue={class:"panel"},pe={class:"phead"},me={class:"mute",style:{"font-size":"var(--t-sm)"}},he={key:0,class:"table-scroll"},fe={class:"cards tbl-fixed t-routes"},ve={class:"stagger"},ce={class:"cell-wrap","data-label":"url"},ge=["href"],ye={key:1,class:"mono mute"},ke={key:0,class:"mute"},_e={"data-label":"forwards to"},be=["title"],we={"data-label":"router"},$e=["title"],Re={key:0,class:"mute",style:{"font-size":"var(--t-sm)"}},Ce={"data-label":"tls"},Se={key:0,class:"badge ok"},Te={key:1,class:"badge off"},Ie={key:1,class:"banner warn"},Ne={class:"panel"},xe={class:"phead"},De={class:"mute",style:{"font-size":"var(--t-sm)"}},Pe={key:0,class:"table-scroll"},Le={key:0,style:{width:"14ch"}},Ue={key:0},ze={class:"stagger"},Ae={class:"name","data-label":"service"},Ee=["title"],Be=["title"],Fe={key:0,"data-label":"node"},je=["title"],Me={key:0,class:"badge",title:"runs on another swarm node — logs reach it through the manager; a shell and stop/start do not"},Oe={"data-label":"state"},Ve={"data-label":"ports"},We={class:"mono"},Ke={key:0,class:"mute"},He={key:0,class:"mute"},Ge={"data-label":"networks"},Qe=["title"],qe=["title"],Je={class:"dim","data-label":"image"},Xe=["title"],Ye={class:"row-actions","data-label":""},Ze={key:0,class:"badge",title:"a one-shot job — it runs to completion; there is no long-lived container to start, stop, or open a shell in"},et={key:1,class:"mute",style:{"font-size":"var(--t-sm)"},title:"runs on another swarm node — redeploy the stack, or act on the worker itself"},tt=["href"],st={key:1,class:"mute"},nt=M({__name:"RuntimeTab",setup(T){const i=N(null),k=N(""),_=N(!0);async function g(){const a=await E.get(`/api/deployments/${encodeURIComponent(S.id)}/runtime${j.value}`);if(_.value=!1,!a.ok){k.value=B(a,"inspect what is running");return}k.value="",i.value=a.body}V(()=>S.id,()=>{_.value=!0,g()},{immediate:!0}),W(()=>void g(),8e3);const I=x(()=>{var a;return((a=i.value)==null?void 0:a.containers.filter(e=>e.state==="running").length)??0}),$=x(()=>{var a;return((a=i.value)==null?void 0:a.containers.some(e=>e.node))??!1});function D(a){const e=a.split(".");return e.length===3?`${e[1]}.${e[2]}`:a}const p=N("");async function v(a,e){p.value=`${e}:${a.name}`;const c=await E.post(`/api/deployments/${encodeURIComponent(S.id)}/containers/${encodeURIComponent(a.name)}/${e}${j.value}`);if(p.value="",!c.ok){F("error",B(c,`${e} ${a.name}`));return}F("ok",c.body.note??`${a.name}: ${e} done.`),g()}function R(a){var c;const e=(c=i.value)==null?void 0:c.routes.filter(s=>s.container===a.name||s.container===a.service).flatMap(s=>s.hosts).find(s=>!s.startsWith("(pattern)"));return e?`https://${e}`:null}return(a,e)=>{const c=K("RouterLink");return n(),o("div",null,[k.value?(n(),b(G,{key:0,text:k.value,title:"Could not inspect this deployment."},null,8,["text"])):u("",!0),_.value&&!i.value?(n(),b(H,{key:1,rows:5})):i.value?(n(),o(y,{key:2},[i.value.reachable?(n(),o(y,{key:1},[i.value.findings.length?(n(),o("div",ie,[h(ae,{findings:i.value.findings},null,8,["findings"])])):u("",!0),!i.value.findings.length&&i.value.containers.length?(n(),o("div",de,[...e[1]||(e[1]=[t("b",null,"Nothing looks wrong.",-1),t("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)])])):u("",!0),t("section",ue,[t("div",pe,[e[3]||(e[3]=t("h2",{class:"section"},"Routing",-1)),e[4]||(e[4]=t("span",{class:"grow"},null,-1)),t("span",me,[r(" TLS: "+l(i.value.challenge==="unknown"?"unknown":i.value.challenge)+" ",1),h(U,{label:"why the TLS mode matters here",align:"end"},{default:m(()=>[...e[2]||(e[2]=[r(" Under HTTP-01 every per-PR router needs ",-1),t("code",null,"tls.certresolver=le",-1),r(", 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})])]),i.value.routes.length?(n(),o("div",he,[t("table",fe,[e[10]||(e[10]=t("colgroup",null,[t("col",{style:{width:"34%"}}),t("col",{style:{width:"26%"}}),t("col",{style:{width:"26%"}}),t("col",{style:{width:"14%"}})],-1)),t("thead",null,[t("tr",null,[e[7]||(e[7]=t("th",null,"URL",-1)),t("th",null,[e[6]||(e[6]=r(" Forwards to ",-1)),h(U,{label:"how a URL reaches a port"},{default:m(()=>[...e[5]||(e[5]=[r(" Traefik's docker provider resolves the container's IP on ",-1),t("code",null,"preview-ingress",-1),r(" and dials it on the port from ",-1),t("code",null,"loadbalancer.server.port",-1),r(" — it does ",-1),t("em",null,"not",-1),r(" use ",-1),t("code",null,"service:port",-1),r(" DNS. So the port here is the one inside the container, and publishing a host port is unnecessary. ",-1)])]),_:1})]),e[8]||(e[8]=t("th",null,"Router",-1)),e[9]||(e[9]=t("th",null,"TLS",-1))])]),t("tbody",ve,[(n(!0),o(y,null,C(i.value.routes,(s,P)=>(n(),o("tr",{key:s.router,style:z({"--i":P})},[t("td",ce,[(n(!0),o(y,null,C(s.hosts,d=>(n(),o("div",{key:d},[d.startsWith("(pattern)")?(n(),o("span",ye,l(d),1)):(n(),o("a",{key:0,href:`https://${d}`,target:"_blank",rel:"noreferrer"},l(d),9,ge))]))),128)),s.hosts.length?u("",!0):(n(),o("span",ke,"no host in the rule"))]),t("td",_e,[h(te,{route:s},null,8,["route"]),t("div",{class:"mute cell-clip",style:{"font-size":"var(--t-sm)"},title:s.container},l(s.container),9,be)]),t("td",we,[t("div",{class:"cell-clip",title:s.router},l(s.router),9,$e),s.priority?(n(),o("div",Re," priority "+l(s.priority),1)):u("",!0)]),t("td",Ce,[s.tls?(n(),o("span",Se,l(s.certresolver||"inherited"),1)):(n(),o("span",Te,"off"))])],4))),128))])])])):(n(),o("div",Ie,[e[16]||(e[16]=t("b",null,"No routes. Traefik has not been told about this deployment.",-1)),t("p",null,[e[12]||(e[12]=r(" Routes come from labels in ",-1)),e[13]||(e[13]=t("em",null,"your",-1)),e[14]||(e[14]=r(" compose file, not from pstack and not from the ",-1)),h(c,{to:"/routing"},{default:m(()=>[...e[11]||(e[11]=[r("Routing",-1)])]),_:1}),e[15]||(e[15]=r(" page (that is Traefik's file provider — middleware and TLS options, not per-PR routers). A reachable service needs four things: ",-1))]),e[17]||(e[17]=t("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)),e[18]||(e[18]=t("p",{class:"mute"},[r(" Put "),t("code",null,"${STACK}"),r(" 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))]))]),t("section",Ne,[t("div",xe,[e[19]||(e[19]=t("h2",{class:"section"},"Containers",-1)),e[20]||(e[20]=t("span",{class:"grow"},null,-1)),t("span",De,l(I.value)+" of "+l(i.value.containers.length)+" running ",1),h(se,{run:g,busy:_.value},null,8,["busy"])]),i.value.containers.length?(n(),o("div",Pe,[t("table",{class:w(["cards tbl-fixed t-containers",{swarm:$.value}])},[t("colgroup",null,[e[21]||(e[21]=t("col",{style:{width:"22ch"}},null,-1)),$.value?(n(),o("col",Le)):u("",!0),e[22]||(e[22]=t("col",{style:{width:"12ch"}},null,-1)),e[23]||(e[23]=t("col",{style:{width:"13ch"}},null,-1)),e[24]||(e[24]=t("col",{style:{width:"20ch"}},null,-1)),e[25]||(e[25]=t("col",null,null,-1)),e[26]||(e[26]=t("col",{style:{width:"288px"}},null,-1))]),t("thead",null,[t("tr",null,[e[27]||(e[27]=t("th",null,"Service",-1)),$.value?(n(),o("th",Ue,"Node")):u("",!0),e[28]||(e[28]=t("th",null,"State",-1)),e[29]||(e[29]=t("th",null,"Ports",-1)),e[30]||(e[30]=t("th",null,"Networks",-1)),e[31]||(e[31]=t("th",null,"Image",-1)),e[32]||(e[32]=t("th",{"aria-label":"Actions"},null,-1))])]),t("tbody",ze,[(n(!0),o(y,null,C(i.value.containers,(s,P)=>(n(),o("tr",{key:s.id,style:z({"--i":P})},[t("td",Ae,[t("div",{class:"cell-clip",title:s.service??s.name},l(s.service??s.name),9,Ee),t("div",{class:"mute task cell-clip",title:s.name},l(D(s.name)),9,Be)]),$.value?(n(),o("td",Fe,[t("div",{class:"cell-clip",title:s.node??void 0},l(s.node??"—"),9,je),s.remote?(n(),o("span",Me,"remote")):u("",!0)])):u("",!0),t("td",Oe,[t("span",{class:w(s.state==="running"?"s-ok":"s-failed")},l(f(A)(s.state)),3),s.health&&s.state==="running"?(n(),o("div",{key:0,class:w(["mute",s.health==="healthy"?"s-ok":"s-failed"]),style:{"font-size":"var(--t-sm)"}},l(f(A)(s.health)),3)):u("",!0)]),t("td",Ve,[(n(!0),o(y,null,C(s.ports,d=>(n(),o("div",{key:`${d.containerPort}/${d.protocol}`},[t("span",We,l(d.containerPort),1),d.hostPort?(n(),o("span",Ke," ← host "+l(d.hostPort),1)):u("",!0)]))),128)),s.ports.length?u("",!0):(n(),o("span",He,"none exposed"))]),t("td",Ge,[(n(!0),o(y,null,C(s.networks,d=>(n(),o("div",{key:d,class:"cell-clip",title:d},[t("span",{class:w(d==="preview-ingress"?"s-ok":"")},l(d),3)],8,Qe))),128)),s.ingressIp?(n(),o("div",{key:0,class:"mute mono cell-clip",style:{"font-size":"var(--t-sm)"},title:s.ingressIp},l(s.ingressIp),9,qe)):u("",!0)]),t("td",Je,[t("span",{class:"cell-clip",title:s.image},l(s.image),9,Xe)]),t("td",Ye,[s.job?(n(),o("span",Ze,"one-shot")):s.remote?(n(),o("span",et," on "+l(s.node),1)):s.state!=="running"?(n(),b(L,{key:2,class:"sm",variant:"ghost",pending:p.value===`start:${s.name}`,disabled:!!p.value,confirm:"Start it?",onRun:d=>v(s,"start")},{default:m(()=>[...e[33]||(e[33]=[r(" Start ",-1)])]),_:1},8,["pending","disabled","onRun"])):(n(),b(L,{key:3,class:"sm",variant:"ghost",pending:p.value===`stop:${s.name}`,disabled:!!p.value,confirm:"Stop it?",title:"Stops this container only. It stays stopped until something starts it.",onRun:d=>v(s,"stop")},{default:m(()=>[...e[34]||(e[34]=[r(" Stop ",-1)])]),_:1},8,["pending","disabled","onRun"])),!s.remote&&!s.job?(n(),b(L,{key:4,class:"sm",variant:"ghost",pending:p.value===`restart:${s.name}`,disabled:!!p.value,confirm:"Restart it?",onRun:d=>v(s,"restart")},{default:m(()=>[...e[35]||(e[35]=[r(" Restart ",-1)])]),_:1},8,["pending","disabled","onRun"])):u("",!0),h(c,{class:"btn sm ghost",to:`/deployments/${encodeURIComponent(f(S).id)}/logs?container=${encodeURIComponent(s.name)}`},{default:m(()=>[...e[36]||(e[36]=[r(" Logs ",-1)])]),_:1},8,["to"]),s.state==="running"&&!s.remote&&!s.job?(n(),b(c,{key:5,class:"btn sm ghost",to:`/deployments/${encodeURIComponent(f(S).id)}/terminal?container=${encodeURIComponent(s.name)}`},{default:m(()=>[...e[37]||(e[37]=[r(" Shell ",-1)])]),_:1},8,["to"])):u("",!0),s.state==="running"&&R(s)?(n(),o("a",{key:6,class:"btn sm ghost",href:R(s),target:"_blank",rel:"noreferrer"}," Open ",8,tt)):u("",!0)])],4))),128))])],2)])):(n(),o("p",st," 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)):(n(),o("div",re,[...e[0]||(e[0]=[t("b",null,"Docker did not answer.",-1),t("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)):u("",!0)])}}}),vt=O(nt,[["__scopeId","data-v-084c7ea0"]]);export{vt as default};
|
|
2
|
+
//# sourceMappingURL=RuntimeTab-DFxU8OLh.js.map
|