@samyx/preview-stacks-ui 0.14.0 → 0.16.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-DxV7T6dV.js → ActionButton.vue_vue_type_script_setup_true_lang-DjO5RzbR.js} +2 -2
- package/dist/assets/{ActionButton.vue_vue_type_script_setup_true_lang-DxV7T6dV.js.map → ActionButton.vue_vue_type_script_setup_true_lang-DjO5RzbR.js.map} +1 -1
- package/dist/assets/AxesTab-BZZXKEC0.js +2 -0
- package/dist/assets/{AxesTab-DkF15gUV.js.map → AxesTab-BZZXKEC0.js.map} +1 -1
- package/dist/assets/ConfigTab-CFbS48D0.js +2 -0
- package/dist/assets/ConfigTab-CFbS48D0.js.map +1 -0
- package/dist/assets/{DangerTab-BOrQMzL3.js → DangerTab-Nyebdr6k.js} +2 -2
- package/dist/assets/{DangerTab-BOrQMzL3.js.map → DangerTab-Nyebdr6k.js.map} +1 -1
- package/dist/assets/DashboardView-CFwb63EX.js +2 -0
- package/dist/assets/DashboardView-CFwb63EX.js.map +1 -0
- package/dist/assets/DeploymentDetailView-DKCUbiGG.js +2 -0
- package/dist/assets/{DeploymentDetailView-D23-qn3Z.js.map → DeploymentDetailView-DKCUbiGG.js.map} +1 -1
- package/dist/assets/DeploymentsView-BX4GOb2A.js +2 -0
- package/dist/assets/DeploymentsView-BX4GOb2A.js.map +1 -0
- package/dist/assets/EquivalentCommand-BFnZRfDg.css +1 -0
- package/dist/assets/EquivalentCommand-w1nGowVi.js +3 -0
- package/dist/assets/EquivalentCommand-w1nGowVi.js.map +1 -0
- package/dist/assets/{ErrorNote.vue_vue_type_script_setup_true_lang-BlepSrj0.js → ErrorNote.vue_vue_type_script_setup_true_lang-D28UQmNR.js} +2 -2
- package/dist/assets/{ErrorNote.vue_vue_type_script_setup_true_lang-BlepSrj0.js.map → ErrorNote.vue_vue_type_script_setup_true_lang-D28UQmNR.js.map} +1 -1
- package/dist/assets/HelpModal.vue_vue_type_script_setup_true_lang-TcgJr2CB.js +2 -0
- package/dist/assets/HelpModal.vue_vue_type_script_setup_true_lang-TcgJr2CB.js.map +1 -0
- package/dist/assets/JobDetailView-ow1_d8lc.js +2 -0
- package/dist/assets/{JobDetailView-ByaH2ylY.js.map → JobDetailView-ow1_d8lc.js.map} +1 -1
- package/dist/assets/JobsView-Boi9Cmdc.js +2 -0
- package/dist/assets/JobsView-Boi9Cmdc.js.map +1 -0
- package/dist/assets/LoginView-1ZpxP8a9.js +2 -0
- package/dist/assets/LoginView-1ZpxP8a9.js.map +1 -0
- package/dist/assets/LoginView-BFIG7vGw.css +1 -0
- package/dist/assets/LogsTab-Bgev0F7g.js +4 -0
- package/dist/assets/LogsTab-Bgev0F7g.js.map +1 -0
- package/dist/assets/{NotFoundView-BN-7ZNip.js → NotFoundView-BhCKBrlY.js} +2 -2
- package/dist/assets/{NotFoundView-BN-7ZNip.js.map → NotFoundView-BhCKBrlY.js.map} +1 -1
- package/dist/assets/NotifiersView-DN9UiqDs.js +2 -0
- package/dist/assets/NotifiersView-DN9UiqDs.js.map +1 -0
- package/dist/assets/{OverviewTab-BI1DZZxS.js → OverviewTab-DzZG0moV.js} +2 -2
- package/dist/assets/{OverviewTab-BI1DZZxS.js.map → OverviewTab-DzZG0moV.js.map} +1 -1
- package/dist/assets/RegistriesView-CPyfKKWJ.js +2 -0
- package/dist/assets/RegistriesView-CPyfKKWJ.js.map +1 -0
- package/dist/assets/RelativeTime.vue_vue_type_script_setup_true_lang-mzHGsi43.js +2 -0
- package/dist/assets/{RelativeTime.vue_vue_type_script_setup_true_lang-lQaz4t05.js.map → RelativeTime.vue_vue_type_script_setup_true_lang-mzHGsi43.js.map} +1 -1
- package/dist/assets/{RequiresTab-B9YauFIz.js → RequiresTab-CjNRorI5.js} +2 -2
- package/dist/assets/{RequiresTab-B9YauFIz.js.map → RequiresTab-CjNRorI5.js.map} +1 -1
- package/dist/assets/RoutingView-Br16pPwF.js +9 -0
- package/dist/assets/RoutingView-Br16pPwF.js.map +1 -0
- package/dist/assets/RuntimeTab-BssqRUYz.js +2 -0
- package/dist/assets/{RuntimeTab-DvrQFekD.js.map → RuntimeTab-BssqRUYz.js.map} +1 -1
- package/dist/assets/SelectMenu.vue_vue_type_script_setup_true_lang-CLqZAezG.js +2 -0
- package/dist/assets/SelectMenu.vue_vue_type_script_setup_true_lang-CLqZAezG.js.map +1 -0
- package/dist/assets/SettingsView-Cqsv0chw.js +2 -0
- package/dist/assets/SettingsView-Cqsv0chw.js.map +1 -0
- package/dist/assets/{SkeletonList.vue_vue_type_script_setup_true_lang-SxitAmDb.js → SkeletonList.vue_vue_type_script_setup_true_lang-CIiWzcE5.js} +2 -2
- package/dist/assets/{SkeletonList.vue_vue_type_script_setup_true_lang-SxitAmDb.js.map → SkeletonList.vue_vue_type_script_setup_true_lang-CIiWzcE5.js.map} +1 -1
- package/dist/assets/SpecDetailView-P6Kk7cwx.js +2 -0
- package/dist/assets/{SpecDetailView-CViJ8WG_.js.map → SpecDetailView-P6Kk7cwx.js.map} +1 -1
- package/dist/assets/SpecsView-DogEWlyZ.js +2 -0
- package/dist/assets/SpecsView-DogEWlyZ.js.map +1 -0
- package/dist/assets/StateBadge.vue_vue_type_script_setup_true_lang-B5C48Wlo.js +2 -0
- package/dist/assets/{StateBadge.vue_vue_type_script_setup_true_lang-CgDXVhMF.js.map → StateBadge.vue_vue_type_script_setup_true_lang-B5C48Wlo.js.map} +1 -1
- package/dist/assets/SubmitView-CufYXtWD.js +45 -0
- package/dist/assets/SubmitView-CufYXtWD.js.map +1 -0
- package/dist/assets/Teleport-0BmaJsBF.js +4 -0
- package/dist/assets/Teleport-0BmaJsBF.js.map +1 -0
- package/dist/assets/{TerminalTab-Bqulz6Eb.css → TerminalTab-4vbfGB2S.css} +1 -1
- package/dist/assets/TerminalTab-DndloIiD.js +3 -0
- package/dist/assets/TerminalTab-DndloIiD.js.map +1 -0
- package/dist/assets/UsersView-DZhhpsnX.css +1 -0
- package/dist/assets/UsersView-KHRd16sV.js +2 -0
- package/dist/assets/UsersView-KHRd16sV.js.map +1 -0
- package/dist/assets/{VarEditor.vue_vue_type_script_setup_true_lang-CZcKBdbw.js → VarEditor.vue_vue_type_script_setup_true_lang-FaBOeld_.js} +2 -2
- package/dist/assets/{VarEditor.vue_vue_type_script_setup_true_lang-CZcKBdbw.js.map → VarEditor.vue_vue_type_script_setup_true_lang-FaBOeld_.js.map} +1 -1
- package/dist/assets/index-BnwKLRM7.css +1 -0
- package/dist/assets/index-D8OAewba.js +134 -0
- package/dist/assets/index-D8OAewba.js.map +1 -0
- package/dist/assets/{useDeployment-C4MdUG63.js → useDeployment-DplTFu7s.js} +2 -2
- package/dist/assets/{useDeployment-C4MdUG63.js.map → useDeployment-DplTFu7s.js.map} +1 -1
- package/dist/index.html +2 -2
- package/package.json +2 -1
- package/dist/assets/AxesTab-DkF15gUV.js +0 -2
- package/dist/assets/ConfigTab-DIfAtFKC.js +0 -2
- package/dist/assets/ConfigTab-DIfAtFKC.js.map +0 -1
- package/dist/assets/DashboardView-Cr6Nnj3O.js +0 -2
- package/dist/assets/DashboardView-Cr6Nnj3O.js.map +0 -1
- package/dist/assets/DeploymentDetailView-D23-qn3Z.js +0 -2
- package/dist/assets/DeploymentsView-BMD-3aeS.js +0 -2
- package/dist/assets/DeploymentsView-BMD-3aeS.js.map +0 -1
- package/dist/assets/JobDetailView-ByaH2ylY.js +0 -2
- package/dist/assets/JobsView-h_BUWgIG.js +0 -2
- package/dist/assets/JobsView-h_BUWgIG.js.map +0 -1
- package/dist/assets/LoginView-BstzTLQc.js +0 -5
- package/dist/assets/LoginView-BstzTLQc.js.map +0 -1
- package/dist/assets/LoginView-CAyD1E0h.css +0 -1
- package/dist/assets/LogsTab-B_NVnnVo.js +0 -4
- package/dist/assets/LogsTab-B_NVnnVo.js.map +0 -1
- package/dist/assets/NotifiersView-CsAmv8wB.js +0 -2
- package/dist/assets/NotifiersView-CsAmv8wB.js.map +0 -1
- package/dist/assets/RegistriesView-CEE730kV.js +0 -2
- package/dist/assets/RegistriesView-CEE730kV.js.map +0 -1
- package/dist/assets/RelativeTime.vue_vue_type_script_setup_true_lang-lQaz4t05.js +0 -2
- package/dist/assets/RoutingView-DXCaRJek.js +0 -9
- package/dist/assets/RoutingView-DXCaRJek.js.map +0 -1
- package/dist/assets/RuntimeTab-DvrQFekD.js +0 -2
- package/dist/assets/SettingsView-B7_zHjVP.js +0 -2
- package/dist/assets/SettingsView-B7_zHjVP.js.map +0 -1
- package/dist/assets/SpecDetailView-CViJ8WG_.js +0 -2
- package/dist/assets/SpecsView-BpG2OWMm.js +0 -2
- package/dist/assets/SpecsView-BpG2OWMm.js.map +0 -1
- package/dist/assets/StateBadge.vue_vue_type_script_setup_true_lang-CgDXVhMF.js +0 -2
- package/dist/assets/SubmitView-CwdWrsVS.js +0 -45
- package/dist/assets/SubmitView-CwdWrsVS.js.map +0 -1
- package/dist/assets/TerminalTab-C6gRXura.js +0 -3
- package/dist/assets/TerminalTab-C6gRXura.js.map +0 -1
- package/dist/assets/index-Bygbts8t.js +0 -129
- package/dist/assets/index-Bygbts8t.js.map +0 -1
- package/dist/assets/index-DOv3m8-x.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorNote.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
{"version":3,"file":"ErrorNote.vue_vue_type_script_setup_true_lang-D28UQmNR.js","sources":["../../src/components/ErrorNote.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * The server's own words, rendered whole.\n *\n * A pstack error message IS the documentation: a 400 from `PUT /api/deployments/:id` carries the\n * SpecError, which names the offending key or variable, prints the corrected form, and includes\n * the assert-lint warnings about an `assert_gone` that fails open. That text is the tool's main\n * teaching surface.\n *\n * So: never truncate it, never collapse it to one line, never replace it with \"invalid spec\".\n * Newlines and indentation are preserved, and it is the one element allowed to scroll sideways —\n * re-wrapping a shell snippet changes what it says.\n */\ndefineProps<{ text: string; title?: string }>();\n</script>\n\n<template>\n <div class=\"banner failed\" role=\"alert\">\n <b>{{ title ?? 'The server refused this.' }}</b>\n <pre class=\"raw\">{{ text }}</pre>\n </div>\n</template>\n"],"names":["_openBlock","_createElementBlock","_hoisted_1","_createElementVNode","__props","_hoisted_2","_toDisplayString"],"mappings":"oMAiBEA,EAAA,EAAAC,EAGM,MAHNC,EAGM,CAFJC,EAAgD,WAA1CC,EAAA,OAAK,0BAAA,EAAA,CAAA,EACXD,EAAiC,MAAjCE,EAAiCC,EAAbF,EAAA,IAAI,EAAA,CAAA,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{u as $,c as R,a as D,P as B,b as w,g as F,D as T,d as K,F as N,e as E,f as V,h as M,i as S,T as L}from"./Teleport-0BmaJsBF.js";import{d as g,U as H,V as v,u as e,r as b,o as c,x as _,w as u,W as m,X as A,e as O,h as U,g as j,Y as z,Z as W,a as q,f as I,t as X}from"./index-D8OAewba.js";const[C,Y]=R("DialogRoot");var Z=g({inheritAttrs:!1,__name:"DialogRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1,default:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(r,{emit:l}){const t=r,o=$(t,"open",l,{defaultValue:t.defaultOpen,passive:t.open===void 0}),d=b(),f=b(),{modal:i}=H(t);return Y({open:o,modal:i,openModal:()=>{o.value=!0},onOpenChange:n=>{o.value=n},onOpenToggle:()=>{o.value=!o.value},contentId:"",titleId:"",descriptionId:"",triggerElement:d,contentElement:f}),(n,s)=>v(n.$slots,"default",{open:e(o),close:()=>o.value=!1})}}),G=Z,J=g({__name:"DialogClose",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const l=r;D();const t=C();return(a,o)=>(c(),_(e(B),m(l,{type:a.as==="button"?"button":void 0,onClick:o[0]||(o[0]=d=>e(t).onOpenChange(!1))}),{default:u(()=>[v(a.$slots,"default")]),_:3},16,["type"]))}}),Q=J,x=g({__name:"DialogContentImpl",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(r,{emit:l}){const t=r,a=l,o=C(),{forwardRef:d,currentElement:f}=D();return o.titleId||(o.titleId=w(void 0,"reka-dialog-title")),o.descriptionId||(o.descriptionId=w(void 0,"reka-dialog-description")),A(()=>{o.contentElement=f,F()!==document.body&&(o.triggerElement.value=F())}),(i,n)=>(c(),_(e(N),{"as-child":"",loop:"",trapped:t.trapFocus,onMountAutoFocus:n[5]||(n[5]=s=>a("openAutoFocus",s)),onUnmountAutoFocus:n[6]||(n[6]=s=>a("closeAutoFocus",s))},{default:u(()=>[O(e(T),m({id:e(o).contentId,ref:e(d),as:i.as,"as-child":i.asChild,"disable-outside-pointer-events":i.disableOutsidePointerEvents,role:"dialog","aria-describedby":e(o).descriptionId,"aria-labelledby":e(o).titleId,"data-state":e(K)(e(o).open.value)},i.$attrs,{onDismiss:n[0]||(n[0]=s=>e(o).onOpenChange(!1)),onEscapeKeyDown:n[1]||(n[1]=s=>a("escapeKeyDown",s)),onFocusOutside:n[2]||(n[2]=s=>a("focusOutside",s)),onInteractOutside:n[3]||(n[3]=s=>a("interactOutside",s)),onPointerDownOutside:n[4]||(n[4]=s=>a("pointerDownOutside",s))}),{default:u(()=>[v(i.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),k=x,ee=g({__name:"DialogContentModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(r,{emit:l}){const t=r,a=l,o=C(),d=E(a),{forwardRef:f,currentElement:i}=D();return V(i),(n,s)=>(c(),_(k,m({...t,...e(d)},{ref:e(f),"trap-focus":e(o).open.value,"disable-outside-pointer-events":t.disableOutsidePointerEvents,onCloseAutoFocus:s[0]||(s[0]=p=>{var y;p.defaultPrevented||(p.preventDefault(),(y=e(o).triggerElement.value)==null||y.focus())}),onPointerDownOutside:s[1]||(s[1]=p=>{const y=p.detail.originalEvent,P=y.button===0&&y.ctrlKey===!0;(y.button===2||P)&&p.preventDefault()}),onFocusOutside:s[2]||(s[2]=p=>{p.preventDefault()})}),{default:u(()=>[v(n.$slots,"default")]),_:3},16,["trap-focus","disable-outside-pointer-events"]))}}),te=ee,oe=g({__name:"DialogContentNonModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(r,{emit:l}){const t=r,o=E(l);D();const d=C(),f=b(!1),i=b(!1);return(n,s)=>(c(),_(k,m({...t,...e(o)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:s[0]||(s[0]=p=>{var y;p.defaultPrevented||(f.value||(y=e(d).triggerElement.value)==null||y.focus(),p.preventDefault()),f.value=!1,i.value=!1}),onInteractOutside:s[1]||(s[1]=p=>{var h;p.defaultPrevented||(f.value=!0,p.detail.originalEvent.type==="pointerdown"&&(i.value=!0));const y=p.target;((h=e(d).triggerElement.value)==null?void 0:h.contains(y))&&p.preventDefault(),p.detail.originalEvent.type==="focusin"&&i.value&&p.preventDefault()})}),{default:u(()=>[v(n.$slots,"default")]),_:3},16))}}),ae=oe,se=g({__name:"DialogContent",props:{forceMount:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:void 0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(r,{emit:l}){const t=r,a=l,o=C(),d=E(a),{forwardRef:f}=D();return(i,n)=>(c(),_(e(M),{present:i.forceMount||e(o).open.value},{default:u(()=>[e(o).modal.value?(c(),_(te,m({key:0,ref:e(f)},{...t,...e(d),...i.$attrs}),{default:u(()=>[v(i.$slots,"default")]),_:3},16)):(c(),_(ae,m({key:1,ref:e(f)},{...t,...e(d),...i.$attrs}),{default:u(()=>[v(i.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),le=se,re=g({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const l=C();return S(!0),D(),(t,a)=>(c(),_(e(B),{as:t.as,"as-child":t.asChild,"data-state":e(l).open.value?"open":"closed",style:{"pointer-events":"auto"},onPointerdown:a[0]||(a[0]=U(()=>{},["left","self","prevent"]))},{default:u(()=>[v(t.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),ne=re,ue=g({__name:"DialogOverlay",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const l=C(),{forwardRef:t}=D();return(a,o)=>{var d;return(d=e(l))!=null&&d.modal.value?(c(),_(e(M),{key:0,present:a.forceMount||e(l).open.value},{default:u(()=>[O(ne,m(a.$attrs,{ref:e(t),as:a.as,"as-child":a.asChild}),{default:u(()=>[v(a.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):j("v-if",!0)}}}),ie=ue,de=g({__name:"DialogPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(r){const l=r;return(t,a)=>(c(),_(e(L),z(W(l)),{default:u(()=>[v(t.$slots,"default")]),_:3},16))}}),pe=de,fe=g({__name:"DialogTitle",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"h2"}},setup(r){const l=r,t=C();return D(),(a,o)=>(c(),_(e(B),m(l,{id:e(t).titleId}),{default:u(()=>[v(a.$slots,"default")]),_:3},16,["id"]))}}),ce=fe,_e=g({__name:"DialogTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const l=r,t=C(),{forwardRef:a,currentElement:o}=D();return t.contentId||(t.contentId=w(void 0,"reka-dialog-content")),A(()=>{t.triggerElement.value=o.value}),(d,f)=>(c(),_(e(B),m(l,{ref:e(a),type:d.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":e(t).open.value||!1,"aria-controls":e(t).open.value?e(t).contentId:void 0,"data-state":e(t).open.value?"open":"closed",onClick:e(t).onOpenToggle}),{default:u(()=>[v(d.$slots,"default")]),_:3},16,["type","aria-expanded","aria-controls","data-state","onClick"]))}}),ve=_e;const ge={class:"help-head"},ye={class:"help-body"},Ce=g({__name:"HelpModal",props:{title:{},label:{}},setup(r){return(l,t)=>(c(),_(e(G),null,{default:u(()=>[O(e(ve),{class:"helpq","aria-label":r.label??r.title},{default:u(()=>[...t[0]||(t[0]=[q("svg",{viewBox:"0 0 24 24",width:"13",height:"13","aria-hidden":"true",fill:"none",stroke:"currentColor","stroke-width":"2.2","stroke-linecap":"round"},[q("path",{d:"M9.2 9a2.9 2.9 0 1 1 3.8 2.8c-.7.3-1 .9-1 1.6v.4"}),q("circle",{cx:"12",cy:"17.6",r:"0.9",fill:"currentColor",stroke:"none"})],-1)])]),_:1},8,["aria-label"]),O(e(pe),null,{default:u(()=>[O(e(ie),{class:"scrim help-scrim"}),O(e(le),{class:"help-modal"},{default:u(()=>[q("div",ge,[O(e(ce),{class:"help-title"},{default:u(()=>[I(X(r.title),1)]),_:1}),O(e(Q),{class:"ghost sm","aria-label":"Close"},{default:u(()=>[...t[1]||(t[1]=[I("Close",-1)])]),_:1})]),q("div",ye,[v(l.$slots,"default")])]),_:3})]),_:3})]),_:3}))}});export{Ce as _};
|
|
2
|
+
//# sourceMappingURL=HelpModal.vue_vue_type_script_setup_true_lang-TcgJr2CB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HelpModal.vue_vue_type_script_setup_true_lang-TcgJr2CB.js","sources":["../../../../node_modules/.bun/reka-ui@2.9.10+6aac64ae34cef4e6/node_modules/reka-ui/dist/Dialog/DialogRoot.js","../../../../node_modules/.bun/reka-ui@2.9.10+6aac64ae34cef4e6/node_modules/reka-ui/dist/Dialog/DialogClose.js","../../../../node_modules/.bun/reka-ui@2.9.10+6aac64ae34cef4e6/node_modules/reka-ui/dist/Dialog/DialogContentImpl.js","../../../../node_modules/.bun/reka-ui@2.9.10+6aac64ae34cef4e6/node_modules/reka-ui/dist/Dialog/DialogContentModal.js","../../../../node_modules/.bun/reka-ui@2.9.10+6aac64ae34cef4e6/node_modules/reka-ui/dist/Dialog/DialogContentNonModal.js","../../../../node_modules/.bun/reka-ui@2.9.10+6aac64ae34cef4e6/node_modules/reka-ui/dist/Dialog/DialogContent.js","../../../../node_modules/.bun/reka-ui@2.9.10+6aac64ae34cef4e6/node_modules/reka-ui/dist/Dialog/DialogOverlayImpl.js","../../../../node_modules/.bun/reka-ui@2.9.10+6aac64ae34cef4e6/node_modules/reka-ui/dist/Dialog/DialogOverlay.js","../../../../node_modules/.bun/reka-ui@2.9.10+6aac64ae34cef4e6/node_modules/reka-ui/dist/Dialog/DialogPortal.js","../../../../node_modules/.bun/reka-ui@2.9.10+6aac64ae34cef4e6/node_modules/reka-ui/dist/Dialog/DialogTitle.js","../../../../node_modules/.bun/reka-ui@2.9.10+6aac64ae34cef4e6/node_modules/reka-ui/dist/Dialog/DialogTrigger.js","../../src/components/HelpModal.vue"],"sourcesContent":["import { createContext } from \"../shared/createContext.js\";\nimport { defineComponent, ref, renderSlot, toRefs, unref } from \"vue\";\nimport { useVModel } from \"@vueuse/core\";\n\n//#region src/Dialog/DialogRoot.vue?vue&type=script&setup=true&lang.ts\nconst [injectDialogRootContext, provideDialogRootContext] = /*#__PURE__*/ createContext(\"DialogRoot\");\nvar DialogRoot_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({\n\tinheritAttrs: false,\n\t__name: \"DialogRoot\",\n\tprops: {\n\t\topen: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false,\n\t\t\tdefault: void 0\n\t\t},\n\t\tdefaultOpen: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false,\n\t\t\tdefault: false\n\t\t},\n\t\tmodal: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false,\n\t\t\tdefault: true\n\t\t}\n\t},\n\temits: [\"update:open\"],\n\tsetup(__props, { emit: __emit }) {\n\t\tconst props = __props;\n\t\tconst emit = __emit;\n\t\tconst open = useVModel(props, \"open\", emit, {\n\t\t\tdefaultValue: props.defaultOpen,\n\t\t\tpassive: props.open === void 0\n\t\t});\n\t\tconst triggerElement = ref();\n\t\tconst contentElement = ref();\n\t\tconst { modal } = toRefs(props);\n\t\tprovideDialogRootContext({\n\t\t\topen,\n\t\t\tmodal,\n\t\t\topenModal: () => {\n\t\t\t\topen.value = true;\n\t\t\t},\n\t\t\tonOpenChange: (value) => {\n\t\t\t\topen.value = value;\n\t\t\t},\n\t\t\tonOpenToggle: () => {\n\t\t\t\topen.value = !open.value;\n\t\t\t},\n\t\t\tcontentId: \"\",\n\t\t\ttitleId: \"\",\n\t\t\tdescriptionId: \"\",\n\t\t\ttriggerElement,\n\t\t\tcontentElement\n\t\t});\n\t\treturn (_ctx, _cache) => {\n\t\t\treturn renderSlot(_ctx.$slots, \"default\", {\n\t\t\t\topen: unref(open),\n\t\t\t\tclose: () => open.value = false\n\t\t\t});\n\t\t};\n\t}\n});\n\n//#endregion\n//#region src/Dialog/DialogRoot.vue\nvar DialogRoot_default = DialogRoot_vue_vue_type_script_setup_true_lang_default;\n\n//#endregion\nexport { DialogRoot_default, injectDialogRootContext };\n//# sourceMappingURL=DialogRoot.js.map","import { useForwardExpose } from \"../shared/useForwardExpose.js\";\nimport { Primitive } from \"../Primitive/Primitive.js\";\nimport { injectDialogRootContext } from \"./DialogRoot.js\";\nimport { createBlock, defineComponent, mergeProps, openBlock, renderSlot, unref, withCtx } from \"vue\";\n\n//#region src/Dialog/DialogClose.vue?vue&type=script&setup=true&lang.ts\nvar DialogClose_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({\n\t__name: \"DialogClose\",\n\tprops: {\n\t\tasChild: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tas: {\n\t\t\ttype: null,\n\t\t\trequired: false,\n\t\t\tdefault: \"button\"\n\t\t}\n\t},\n\tsetup(__props) {\n\t\tconst props = __props;\n\t\tuseForwardExpose();\n\t\tconst rootContext = injectDialogRootContext();\n\t\treturn (_ctx, _cache) => {\n\t\t\treturn openBlock(), createBlock(unref(Primitive), mergeProps(props, {\n\t\t\t\ttype: _ctx.as === \"button\" ? \"button\" : void 0,\n\t\t\t\tonClick: _cache[0] || (_cache[0] = ($event) => unref(rootContext).onOpenChange(false))\n\t\t\t}), {\n\t\t\t\tdefault: withCtx(() => [renderSlot(_ctx.$slots, \"default\")]),\n\t\t\t\t_: 3\n\t\t\t}, 16, [\"type\"]);\n\t\t};\n\t}\n});\n\n//#endregion\n//#region src/Dialog/DialogClose.vue\nvar DialogClose_default = DialogClose_vue_vue_type_script_setup_true_lang_default;\n\n//#endregion\nexport { DialogClose_default };\n//# sourceMappingURL=DialogClose.js.map","import { getActiveElement } from \"../shared/getActiveElement.js\";\nimport { useForwardExpose } from \"../shared/useForwardExpose.js\";\nimport { useId } from \"../shared/useId.js\";\nimport { injectDialogRootContext } from \"./DialogRoot.js\";\nimport { DismissableLayer_default } from \"../DismissableLayer/DismissableLayer.js\";\nimport { FocusScope_default } from \"../FocusScope/FocusScope.js\";\nimport { getOpenState } from \"../Menu/utils.js\";\nimport { useWarning } from \"./utils.js\";\nimport { createBlock, createVNode, defineComponent, mergeProps, onMounted, openBlock, renderSlot, unref, withCtx } from \"vue\";\n\n//#region src/Dialog/DialogContentImpl.vue?vue&type=script&setup=true&lang.ts\nvar DialogContentImpl_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({\n\t__name: \"DialogContentImpl\",\n\tprops: {\n\t\tforceMount: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\ttrapFocus: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tdisableOutsidePointerEvents: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tasChild: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tas: {\n\t\t\ttype: null,\n\t\t\trequired: false\n\t\t}\n\t},\n\temits: [\n\t\t\"escapeKeyDown\",\n\t\t\"pointerDownOutside\",\n\t\t\"focusOutside\",\n\t\t\"interactOutside\",\n\t\t\"openAutoFocus\",\n\t\t\"closeAutoFocus\"\n\t],\n\tsetup(__props, { emit: __emit }) {\n\t\tconst props = __props;\n\t\tconst emits = __emit;\n\t\tconst rootContext = injectDialogRootContext();\n\t\tconst { forwardRef, currentElement: contentElement } = useForwardExpose();\n\t\trootContext.titleId ||= useId(void 0, \"reka-dialog-title\");\n\t\trootContext.descriptionId ||= useId(void 0, \"reka-dialog-description\");\n\t\tonMounted(() => {\n\t\t\trootContext.contentElement = contentElement;\n\t\t\tif (getActiveElement() !== document.body) rootContext.triggerElement.value = getActiveElement();\n\t\t});\n\t\tif (process.env.NODE_ENV !== \"production\") useWarning({\n\t\t\ttitleName: \"DialogTitle\",\n\t\t\tcontentName: \"DialogContent\",\n\t\t\tcomponentLink: \"dialog.html#title\",\n\t\t\ttitleId: rootContext.titleId,\n\t\t\tdescriptionId: rootContext.descriptionId,\n\t\t\tcontentElement\n\t\t});\n\t\treturn (_ctx, _cache) => {\n\t\t\treturn openBlock(), createBlock(unref(FocusScope_default), {\n\t\t\t\t\"as-child\": \"\",\n\t\t\t\tloop: \"\",\n\t\t\t\ttrapped: props.trapFocus,\n\t\t\t\tonMountAutoFocus: _cache[5] || (_cache[5] = ($event) => emits(\"openAutoFocus\", $event)),\n\t\t\t\tonUnmountAutoFocus: _cache[6] || (_cache[6] = ($event) => emits(\"closeAutoFocus\", $event))\n\t\t\t}, {\n\t\t\t\tdefault: withCtx(() => [createVNode(unref(DismissableLayer_default), mergeProps({\n\t\t\t\t\tid: unref(rootContext).contentId,\n\t\t\t\t\tref: unref(forwardRef),\n\t\t\t\t\tas: _ctx.as,\n\t\t\t\t\t\"as-child\": _ctx.asChild,\n\t\t\t\t\t\"disable-outside-pointer-events\": _ctx.disableOutsidePointerEvents,\n\t\t\t\t\trole: \"dialog\",\n\t\t\t\t\t\"aria-describedby\": unref(rootContext).descriptionId,\n\t\t\t\t\t\"aria-labelledby\": unref(rootContext).titleId,\n\t\t\t\t\t\"data-state\": unref(getOpenState)(unref(rootContext).open.value)\n\t\t\t\t}, _ctx.$attrs, {\n\t\t\t\t\tonDismiss: _cache[0] || (_cache[0] = ($event) => unref(rootContext).onOpenChange(false)),\n\t\t\t\t\tonEscapeKeyDown: _cache[1] || (_cache[1] = ($event) => emits(\"escapeKeyDown\", $event)),\n\t\t\t\t\tonFocusOutside: _cache[2] || (_cache[2] = ($event) => emits(\"focusOutside\", $event)),\n\t\t\t\t\tonInteractOutside: _cache[3] || (_cache[3] = ($event) => emits(\"interactOutside\", $event)),\n\t\t\t\t\tonPointerDownOutside: _cache[4] || (_cache[4] = ($event) => emits(\"pointerDownOutside\", $event))\n\t\t\t\t}), {\n\t\t\t\t\tdefault: withCtx(() => [renderSlot(_ctx.$slots, \"default\")]),\n\t\t\t\t\t_: 3\n\t\t\t\t}, 16, [\n\t\t\t\t\t\"id\",\n\t\t\t\t\t\"as\",\n\t\t\t\t\t\"as-child\",\n\t\t\t\t\t\"disable-outside-pointer-events\",\n\t\t\t\t\t\"aria-describedby\",\n\t\t\t\t\t\"aria-labelledby\",\n\t\t\t\t\t\"data-state\"\n\t\t\t\t])]),\n\t\t\t\t_: 3\n\t\t\t}, 8, [\"trapped\"]);\n\t\t};\n\t}\n});\n\n//#endregion\n//#region src/Dialog/DialogContentImpl.vue\nvar DialogContentImpl_default = DialogContentImpl_vue_vue_type_script_setup_true_lang_default;\n\n//#endregion\nexport { DialogContentImpl_default };\n//# sourceMappingURL=DialogContentImpl.js.map","import { useEmitAsProps } from \"../shared/useEmitAsProps.js\";\nimport { useForwardExpose } from \"../shared/useForwardExpose.js\";\nimport { useHideOthers } from \"../shared/useHideOthers.js\";\nimport { injectDialogRootContext } from \"./DialogRoot.js\";\nimport { DialogContentImpl_default } from \"./DialogContentImpl.js\";\nimport { createBlock, defineComponent, mergeProps, openBlock, renderSlot, unref, withCtx } from \"vue\";\n\n//#region src/Dialog/DialogContentModal.vue?vue&type=script&setup=true&lang.ts\nvar DialogContentModal_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({\n\t__name: \"DialogContentModal\",\n\tprops: {\n\t\tforceMount: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\ttrapFocus: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tdisableOutsidePointerEvents: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false,\n\t\t\tdefault: true\n\t\t},\n\t\tasChild: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tas: {\n\t\t\ttype: null,\n\t\t\trequired: false\n\t\t}\n\t},\n\temits: [\n\t\t\"escapeKeyDown\",\n\t\t\"pointerDownOutside\",\n\t\t\"focusOutside\",\n\t\t\"interactOutside\",\n\t\t\"openAutoFocus\",\n\t\t\"closeAutoFocus\"\n\t],\n\tsetup(__props, { emit: __emit }) {\n\t\tconst props = __props;\n\t\tconst emits = __emit;\n\t\tconst rootContext = injectDialogRootContext();\n\t\tconst emitsAsProps = useEmitAsProps(emits);\n\t\tconst { forwardRef, currentElement } = useForwardExpose();\n\t\tuseHideOthers(currentElement);\n\t\treturn (_ctx, _cache) => {\n\t\t\treturn openBlock(), createBlock(DialogContentImpl_default, mergeProps({\n\t\t\t\t...props,\n\t\t\t\t...unref(emitsAsProps)\n\t\t\t}, {\n\t\t\t\tref: unref(forwardRef),\n\t\t\t\t\"trap-focus\": unref(rootContext).open.value,\n\t\t\t\t\"disable-outside-pointer-events\": props.disableOutsidePointerEvents,\n\t\t\t\tonCloseAutoFocus: _cache[0] || (_cache[0] = (event) => {\n\t\t\t\t\tif (!event.defaultPrevented) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\tunref(rootContext).triggerElement.value?.focus();\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tonPointerDownOutside: _cache[1] || (_cache[1] = (event) => {\n\t\t\t\t\tconst originalEvent = event.detail.originalEvent;\n\t\t\t\t\tconst ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n\t\t\t\t\tconst isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n\t\t\t\t\tif (isRightClick) event.preventDefault();\n\t\t\t\t}),\n\t\t\t\tonFocusOutside: _cache[2] || (_cache[2] = (event) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t})\n\t\t\t}), {\n\t\t\t\tdefault: withCtx(() => [renderSlot(_ctx.$slots, \"default\")]),\n\t\t\t\t_: 3\n\t\t\t}, 16, [\"trap-focus\", \"disable-outside-pointer-events\"]);\n\t\t};\n\t}\n});\n\n//#endregion\n//#region src/Dialog/DialogContentModal.vue\nvar DialogContentModal_default = DialogContentModal_vue_vue_type_script_setup_true_lang_default;\n\n//#endregion\nexport { DialogContentModal_default };\n//# sourceMappingURL=DialogContentModal.js.map","import { useEmitAsProps } from \"../shared/useEmitAsProps.js\";\nimport { useForwardExpose } from \"../shared/useForwardExpose.js\";\nimport { injectDialogRootContext } from \"./DialogRoot.js\";\nimport { DialogContentImpl_default } from \"./DialogContentImpl.js\";\nimport { createBlock, defineComponent, mergeProps, openBlock, ref, renderSlot, unref, withCtx } from \"vue\";\n\n//#region src/Dialog/DialogContentNonModal.vue?vue&type=script&setup=true&lang.ts\nvar DialogContentNonModal_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({\n\t__name: \"DialogContentNonModal\",\n\tprops: {\n\t\tforceMount: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\ttrapFocus: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tdisableOutsidePointerEvents: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tasChild: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tas: {\n\t\t\ttype: null,\n\t\t\trequired: false\n\t\t}\n\t},\n\temits: [\n\t\t\"escapeKeyDown\",\n\t\t\"pointerDownOutside\",\n\t\t\"focusOutside\",\n\t\t\"interactOutside\",\n\t\t\"openAutoFocus\",\n\t\t\"closeAutoFocus\"\n\t],\n\tsetup(__props, { emit: __emit }) {\n\t\tconst props = __props;\n\t\tconst emits = __emit;\n\t\tconst emitsAsProps = useEmitAsProps(emits);\n\t\tuseForwardExpose();\n\t\tconst rootContext = injectDialogRootContext();\n\t\tconst hasInteractedOutsideRef = ref(false);\n\t\tconst hasPointerDownOutsideRef = ref(false);\n\t\treturn (_ctx, _cache) => {\n\t\t\treturn openBlock(), createBlock(DialogContentImpl_default, mergeProps({\n\t\t\t\t...props,\n\t\t\t\t...unref(emitsAsProps)\n\t\t\t}, {\n\t\t\t\t\"trap-focus\": false,\n\t\t\t\t\"disable-outside-pointer-events\": false,\n\t\t\t\tonCloseAutoFocus: _cache[0] || (_cache[0] = (event) => {\n\t\t\t\t\tif (!event.defaultPrevented) {\n\t\t\t\t\t\tif (!hasInteractedOutsideRef.value) unref(rootContext).triggerElement.value?.focus();\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t\thasInteractedOutsideRef.value = false;\n\t\t\t\t\thasPointerDownOutsideRef.value = false;\n\t\t\t\t}),\n\t\t\t\tonInteractOutside: _cache[1] || (_cache[1] = (event) => {\n\t\t\t\t\tif (!event.defaultPrevented) {\n\t\t\t\t\t\thasInteractedOutsideRef.value = true;\n\t\t\t\t\t\tif (event.detail.originalEvent.type === \"pointerdown\") hasPointerDownOutsideRef.value = true;\n\t\t\t\t\t}\n\t\t\t\t\tconst target = event.target;\n\t\t\t\t\tconst targetIsTrigger = unref(rootContext).triggerElement.value?.contains(target);\n\t\t\t\t\tif (targetIsTrigger) event.preventDefault();\n\t\t\t\t\tif (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.value) event.preventDefault();\n\t\t\t\t})\n\t\t\t}), {\n\t\t\t\tdefault: withCtx(() => [renderSlot(_ctx.$slots, \"default\")]),\n\t\t\t\t_: 3\n\t\t\t}, 16);\n\t\t};\n\t}\n});\n\n//#endregion\n//#region src/Dialog/DialogContentNonModal.vue\nvar DialogContentNonModal_default = DialogContentNonModal_vue_vue_type_script_setup_true_lang_default;\n\n//#endregion\nexport { DialogContentNonModal_default };\n//# sourceMappingURL=DialogContentNonModal.js.map","import { useEmitAsProps } from \"../shared/useEmitAsProps.js\";\nimport { useForwardExpose } from \"../shared/useForwardExpose.js\";\nimport { Presence_default } from \"../Presence/Presence.js\";\nimport { injectDialogRootContext } from \"./DialogRoot.js\";\nimport { DialogContentModal_default } from \"./DialogContentModal.js\";\nimport { DialogContentNonModal_default } from \"./DialogContentNonModal.js\";\nimport { createBlock, createCommentVNode, defineComponent, mergeProps, openBlock, renderSlot, unref, withCtx } from \"vue\";\n\n//#region src/Dialog/DialogContent.vue?vue&type=script&setup=true&lang.ts\nvar DialogContent_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({\n\t__name: \"DialogContent\",\n\tprops: {\n\t\tforceMount: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tdisableOutsidePointerEvents: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false,\n\t\t\tdefault: void 0\n\t\t},\n\t\tasChild: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tas: {\n\t\t\ttype: null,\n\t\t\trequired: false\n\t\t}\n\t},\n\temits: [\n\t\t\"escapeKeyDown\",\n\t\t\"pointerDownOutside\",\n\t\t\"focusOutside\",\n\t\t\"interactOutside\",\n\t\t\"openAutoFocus\",\n\t\t\"closeAutoFocus\"\n\t],\n\tsetup(__props, { emit: __emit }) {\n\t\tconst props = __props;\n\t\tconst emits = __emit;\n\t\tconst rootContext = injectDialogRootContext();\n\t\tconst emitsAsProps = useEmitAsProps(emits);\n\t\tconst { forwardRef } = useForwardExpose();\n\t\treturn (_ctx, _cache) => {\n\t\t\treturn openBlock(), createBlock(unref(Presence_default), { present: _ctx.forceMount || unref(rootContext).open.value }, {\n\t\t\t\tdefault: withCtx(() => [unref(rootContext).modal.value ? (openBlock(), createBlock(DialogContentModal_default, mergeProps({\n\t\t\t\t\tkey: 0,\n\t\t\t\t\tref: unref(forwardRef)\n\t\t\t\t}, {\n\t\t\t\t\t...props,\n\t\t\t\t\t...unref(emitsAsProps),\n\t\t\t\t\t..._ctx.$attrs\n\t\t\t\t}), {\n\t\t\t\t\tdefault: withCtx(() => [renderSlot(_ctx.$slots, \"default\")]),\n\t\t\t\t\t_: 3\n\t\t\t\t}, 16)) : (openBlock(), createBlock(DialogContentNonModal_default, mergeProps({\n\t\t\t\t\tkey: 1,\n\t\t\t\t\tref: unref(forwardRef)\n\t\t\t\t}, {\n\t\t\t\t\t...props,\n\t\t\t\t\t...unref(emitsAsProps),\n\t\t\t\t\t..._ctx.$attrs\n\t\t\t\t}), {\n\t\t\t\t\tdefault: withCtx(() => [renderSlot(_ctx.$slots, \"default\")]),\n\t\t\t\t\t_: 3\n\t\t\t\t}, 16))]),\n\t\t\t\t_: 3\n\t\t\t}, 8, [\"present\"]);\n\t\t};\n\t}\n});\n\n//#endregion\n//#region src/Dialog/DialogContent.vue\nvar DialogContent_default = DialogContent_vue_vue_type_script_setup_true_lang_default;\n\n//#endregion\nexport { DialogContent_default };\n//# sourceMappingURL=DialogContent.js.map","import { useBodyScrollLock } from \"../shared/useBodyScrollLock.js\";\nimport { useForwardExpose } from \"../shared/useForwardExpose.js\";\nimport { Primitive } from \"../Primitive/Primitive.js\";\nimport { injectDialogRootContext } from \"./DialogRoot.js\";\nimport { createBlock, defineComponent, openBlock, renderSlot, unref, withCtx, withModifiers } from \"vue\";\n\n//#region src/Dialog/DialogOverlayImpl.vue?vue&type=script&setup=true&lang.ts\nvar DialogOverlayImpl_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({\n\t__name: \"DialogOverlayImpl\",\n\tprops: {\n\t\tasChild: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tas: {\n\t\t\ttype: null,\n\t\t\trequired: false\n\t\t}\n\t},\n\tsetup(__props) {\n\t\tconst rootContext = injectDialogRootContext();\n\t\tuseBodyScrollLock(true);\n\t\tuseForwardExpose();\n\t\treturn (_ctx, _cache) => {\n\t\t\treturn openBlock(), createBlock(unref(Primitive), {\n\t\t\t\tas: _ctx.as,\n\t\t\t\t\"as-child\": _ctx.asChild,\n\t\t\t\t\"data-state\": unref(rootContext).open.value ? \"open\" : \"closed\",\n\t\t\t\tstyle: { \"pointer-events\": \"auto\" },\n\t\t\t\tonPointerdown: _cache[0] || (_cache[0] = withModifiers(() => {}, [\n\t\t\t\t\t\"left\",\n\t\t\t\t\t\"self\",\n\t\t\t\t\t\"prevent\"\n\t\t\t\t]))\n\t\t\t}, {\n\t\t\t\tdefault: withCtx(() => [renderSlot(_ctx.$slots, \"default\")]),\n\t\t\t\t_: 3\n\t\t\t}, 8, [\n\t\t\t\t\"as\",\n\t\t\t\t\"as-child\",\n\t\t\t\t\"data-state\"\n\t\t\t]);\n\t\t};\n\t}\n});\n\n//#endregion\n//#region src/Dialog/DialogOverlayImpl.vue\nvar DialogOverlayImpl_default = DialogOverlayImpl_vue_vue_type_script_setup_true_lang_default;\n\n//#endregion\nexport { DialogOverlayImpl_default };\n//# sourceMappingURL=DialogOverlayImpl.js.map","import { useForwardExpose } from \"../shared/useForwardExpose.js\";\nimport { Presence_default } from \"../Presence/Presence.js\";\nimport { injectDialogRootContext } from \"./DialogRoot.js\";\nimport { DialogOverlayImpl_default } from \"./DialogOverlayImpl.js\";\nimport { createBlock, createCommentVNode, createVNode, defineComponent, mergeProps, openBlock, renderSlot, unref, withCtx } from \"vue\";\n\n//#region src/Dialog/DialogOverlay.vue?vue&type=script&setup=true&lang.ts\nvar DialogOverlay_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({\n\t__name: \"DialogOverlay\",\n\tprops: {\n\t\tforceMount: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tasChild: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tas: {\n\t\t\ttype: null,\n\t\t\trequired: false\n\t\t}\n\t},\n\tsetup(__props) {\n\t\tconst rootContext = injectDialogRootContext();\n\t\tconst { forwardRef } = useForwardExpose();\n\t\treturn (_ctx, _cache) => {\n\t\t\treturn unref(rootContext)?.modal.value ? (openBlock(), createBlock(unref(Presence_default), {\n\t\t\t\tkey: 0,\n\t\t\t\tpresent: _ctx.forceMount || unref(rootContext).open.value\n\t\t\t}, {\n\t\t\t\tdefault: withCtx(() => [createVNode(DialogOverlayImpl_default, mergeProps(_ctx.$attrs, {\n\t\t\t\t\tref: unref(forwardRef),\n\t\t\t\t\tas: _ctx.as,\n\t\t\t\t\t\"as-child\": _ctx.asChild\n\t\t\t\t}), {\n\t\t\t\t\tdefault: withCtx(() => [renderSlot(_ctx.$slots, \"default\")]),\n\t\t\t\t\t_: 3\n\t\t\t\t}, 16, [\"as\", \"as-child\"])]),\n\t\t\t\t_: 3\n\t\t\t}, 8, [\"present\"])) : createCommentVNode(\"v-if\", true);\n\t\t};\n\t}\n});\n\n//#endregion\n//#region src/Dialog/DialogOverlay.vue\nvar DialogOverlay_default = DialogOverlay_vue_vue_type_script_setup_true_lang_default;\n\n//#endregion\nexport { DialogOverlay_default };\n//# sourceMappingURL=DialogOverlay.js.map","import { Teleport_default } from \"../Teleport/Teleport.js\";\nimport { createBlock, defineComponent, guardReactiveProps, normalizeProps, openBlock, renderSlot, unref, withCtx } from \"vue\";\n\n//#region src/Dialog/DialogPortal.vue?vue&type=script&setup=true&lang.ts\nvar DialogPortal_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({\n\t__name: \"DialogPortal\",\n\tprops: {\n\t\tto: {\n\t\t\ttype: null,\n\t\t\trequired: false\n\t\t},\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tdefer: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tforceMount: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t}\n\t},\n\tsetup(__props) {\n\t\tconst props = __props;\n\t\treturn (_ctx, _cache) => {\n\t\t\treturn openBlock(), createBlock(unref(Teleport_default), normalizeProps(guardReactiveProps(props)), {\n\t\t\t\tdefault: withCtx(() => [renderSlot(_ctx.$slots, \"default\")]),\n\t\t\t\t_: 3\n\t\t\t}, 16);\n\t\t};\n\t}\n});\n\n//#endregion\n//#region src/Dialog/DialogPortal.vue\nvar DialogPortal_default = DialogPortal_vue_vue_type_script_setup_true_lang_default;\n\n//#endregion\nexport { DialogPortal_default };\n//# sourceMappingURL=DialogPortal.js.map","import { useForwardExpose } from \"../shared/useForwardExpose.js\";\nimport { Primitive } from \"../Primitive/Primitive.js\";\nimport { injectDialogRootContext } from \"./DialogRoot.js\";\nimport { createBlock, defineComponent, mergeProps, openBlock, renderSlot, unref, withCtx } from \"vue\";\n\n//#region src/Dialog/DialogTitle.vue?vue&type=script&setup=true&lang.ts\nvar DialogTitle_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({\n\t__name: \"DialogTitle\",\n\tprops: {\n\t\tasChild: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tas: {\n\t\t\ttype: null,\n\t\t\trequired: false,\n\t\t\tdefault: \"h2\"\n\t\t}\n\t},\n\tsetup(__props) {\n\t\tconst props = __props;\n\t\tconst rootContext = injectDialogRootContext();\n\t\tuseForwardExpose();\n\t\treturn (_ctx, _cache) => {\n\t\t\treturn openBlock(), createBlock(unref(Primitive), mergeProps(props, { id: unref(rootContext).titleId }), {\n\t\t\t\tdefault: withCtx(() => [renderSlot(_ctx.$slots, \"default\")]),\n\t\t\t\t_: 3\n\t\t\t}, 16, [\"id\"]);\n\t\t};\n\t}\n});\n\n//#endregion\n//#region src/Dialog/DialogTitle.vue\nvar DialogTitle_default = DialogTitle_vue_vue_type_script_setup_true_lang_default;\n\n//#endregion\nexport { DialogTitle_default };\n//# sourceMappingURL=DialogTitle.js.map","import { useForwardExpose } from \"../shared/useForwardExpose.js\";\nimport { useId } from \"../shared/useId.js\";\nimport { Primitive } from \"../Primitive/Primitive.js\";\nimport { injectDialogRootContext } from \"./DialogRoot.js\";\nimport { createBlock, defineComponent, mergeProps, onMounted, openBlock, renderSlot, unref, withCtx } from \"vue\";\n\n//#region src/Dialog/DialogTrigger.vue?vue&type=script&setup=true&lang.ts\nvar DialogTrigger_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({\n\t__name: \"DialogTrigger\",\n\tprops: {\n\t\tasChild: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tas: {\n\t\t\ttype: null,\n\t\t\trequired: false,\n\t\t\tdefault: \"button\"\n\t\t}\n\t},\n\tsetup(__props) {\n\t\tconst props = __props;\n\t\tconst rootContext = injectDialogRootContext();\n\t\tconst { forwardRef, currentElement } = useForwardExpose();\n\t\trootContext.contentId ||= useId(void 0, \"reka-dialog-content\");\n\t\tonMounted(() => {\n\t\t\trootContext.triggerElement.value = currentElement.value;\n\t\t});\n\t\treturn (_ctx, _cache) => {\n\t\t\treturn openBlock(), createBlock(unref(Primitive), mergeProps(props, {\n\t\t\t\tref: unref(forwardRef),\n\t\t\t\ttype: _ctx.as === \"button\" ? \"button\" : void 0,\n\t\t\t\t\"aria-haspopup\": \"dialog\",\n\t\t\t\t\"aria-expanded\": unref(rootContext).open.value || false,\n\t\t\t\t\"aria-controls\": unref(rootContext).open.value ? unref(rootContext).contentId : void 0,\n\t\t\t\t\"data-state\": unref(rootContext).open.value ? \"open\" : \"closed\",\n\t\t\t\tonClick: unref(rootContext).onOpenToggle\n\t\t\t}), {\n\t\t\t\tdefault: withCtx(() => [renderSlot(_ctx.$slots, \"default\")]),\n\t\t\t\t_: 3\n\t\t\t}, 16, [\n\t\t\t\t\"type\",\n\t\t\t\t\"aria-expanded\",\n\t\t\t\t\"aria-controls\",\n\t\t\t\t\"data-state\",\n\t\t\t\t\"onClick\"\n\t\t\t]);\n\t\t};\n\t}\n});\n\n//#endregion\n//#region src/Dialog/DialogTrigger.vue\nvar DialogTrigger_default = DialogTrigger_vue_vue_type_script_setup_true_lang_default;\n\n//#endregion\nexport { DialogTrigger_default };\n//# sourceMappingURL=DialogTrigger.js.map","<script setup lang=\"ts\">\n/**\n * A `?` that opens a modal.\n *\n * WHY THIS AND NOT `InfoHint`. `InfoHint` is a small `[i]` popover for a sentence or two — the right\n * shape for \"what does this field mean\". It is the wrong shape for the several paragraphs some of\n * these surfaces genuinely need: a 300-character bubble anchored to an icon either overflows its\n * container or wraps into a column two words wide.\n *\n * Those paragraphs used to sit permanently on the page as banners. That is the actual problem: an\n * explanation everyone reads once and nobody reads again, charged to every visit forever. A `?`\n * costs one glyph in the header and gives the reader the whole thing when they want it.\n *\n * WHAT STAYS ON THE PAGE. State, not explanation. \"Docker did not answer\" is a banner because it is\n * true right now and changes what you can do; \"here is how Traefik resolves a container IP\" is help,\n * and belongs behind the `?`.\n *\n * Built on Reka's Dialog: focus trap, focus restore, scroll lock, Escape, and `aria-modal` wiring\n * are all behaviour with edge cases, and none of them are this product's problem.\n */\nimport { DialogClose, DialogContent, DialogOverlay, DialogPortal, DialogRoot, DialogTitle, DialogTrigger } from 'reka-ui';\n\ndefineProps<{\n /** The question the modal answers, e.g. \"How routing works\". Becomes the dialog's title. */\n title: string;\n /** Accessible name for the trigger — screen readers hear this instead of \"question mark\". */\n label?: string;\n}>();\n</script>\n\n<template>\n <DialogRoot>\n <DialogTrigger class=\"helpq\" :aria-label=\"label ?? title\">\n <svg viewBox=\"0 0 24 24\" width=\"13\" height=\"13\" aria-hidden=\"true\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.2\" stroke-linecap=\"round\">\n <path d=\"M9.2 9a2.9 2.9 0 1 1 3.8 2.8c-.7.3-1 .9-1 1.6v.4\" />\n <circle cx=\"12\" cy=\"17.6\" r=\"0.9\" fill=\"currentColor\" stroke=\"none\" />\n </svg>\n </DialogTrigger>\n\n <DialogPortal>\n <DialogOverlay class=\"scrim help-scrim\" />\n <DialogContent class=\"help-modal\">\n <div class=\"help-head\">\n <DialogTitle class=\"help-title\">{{ title }}</DialogTitle>\n <DialogClose class=\"ghost sm\" aria-label=\"Close\">Close</DialogClose>\n </div>\n <div class=\"help-body\">\n <slot />\n </div>\n </DialogContent>\n </DialogPortal>\n </DialogRoot>\n</template>\n"],"names":["injectDialogRootContext","provideDialogRootContext","createContext","DialogRoot_vue_vue_type_script_setup_true_lang_default","defineComponent","__props","__emit","props","open","useVModel","triggerElement","ref","contentElement","modal","toRefs","value","_ctx","_cache","renderSlot","unref","DialogRoot_default","DialogClose_vue_vue_type_script_setup_true_lang_default","useForwardExpose","rootContext","openBlock","createBlock","Primitive","mergeProps","$event","withCtx","DialogClose_default","DialogContentImpl_vue_vue_type_script_setup_true_lang_default","emits","forwardRef","useId","onMounted","getActiveElement","FocusScope_default","createVNode","DismissableLayer_default","getOpenState","DialogContentImpl_default","DialogContentModal_vue_vue_type_script_setup_true_lang_default","emitsAsProps","useEmitAsProps","currentElement","useHideOthers","event","_a","originalEvent","ctrlLeftClick","DialogContentModal_default","DialogContentNonModal_vue_vue_type_script_setup_true_lang_default","hasInteractedOutsideRef","hasPointerDownOutsideRef","target","DialogContentNonModal_default","DialogContent_vue_vue_type_script_setup_true_lang_default","Presence_default","DialogContent_default","DialogOverlayImpl_vue_vue_type_script_setup_true_lang_default","useBodyScrollLock","withModifiers","DialogOverlayImpl_default","DialogOverlay_vue_vue_type_script_setup_true_lang_default","createCommentVNode","DialogOverlay_default","DialogPortal_vue_vue_type_script_setup_true_lang_default","Teleport_default","normalizeProps","guardReactiveProps","DialogPortal_default","DialogTitle_vue_vue_type_script_setup_true_lang_default","DialogTitle_default","DialogTrigger_vue_vue_type_script_setup_true_lang_default","DialogTrigger_default","_createBlock","_unref","DialogRoot","_createVNode","DialogTrigger","_createElementVNode","DialogPortal","DialogOverlay","DialogContent","_hoisted_1","DialogTitle","DialogClose","_hoisted_2","_renderSlot"],"mappings":"qSAKA,KAAM,CAACA,EAAyBC,CAAwB,EAAkBC,EAAc,YAAY,EACpG,IAAIC,EAAyEC,EAAgB,CAC5F,aAAc,GACd,OAAQ,aACR,MAAO,CACN,KAAM,CACL,KAAM,QACN,SAAU,GACV,QAAS,MACZ,EACE,YAAa,CACZ,KAAM,QACN,SAAU,GACV,QAAS,EACZ,EACE,MAAO,CACN,KAAM,QACN,SAAU,GACV,QAAS,EACZ,CACA,EACC,MAAO,CAAC,aAAa,EACrB,MAAMC,EAAS,CAAE,KAAMC,CAAM,EAAI,CAChC,MAAMC,EAAQF,EAERG,EAAOC,EAAUF,EAAO,OADjBD,EAC+B,CAC3C,aAAcC,EAAM,YACpB,QAASA,EAAM,OAAS,MAC3B,CAAG,EACKG,EAAiBC,EAAG,EACpBC,EAAiBD,EAAG,EACpB,CAAE,MAAAE,CAAK,EAAKC,EAAOP,CAAK,EAC9B,OAAAN,EAAyB,CACxB,KAAAO,EACA,MAAAK,EACA,UAAW,IAAM,CAChBL,EAAK,MAAQ,EACd,EACA,aAAeO,GAAU,CACxBP,EAAK,M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N,EAAyDF,EAAAS,EAAA,EAAA,CAA5C,MAAM,cAAY,WAAC,IAAW,KAARjF,EAAA,KAAK,EAAA,CAAA,CAAA,SACxC0E,EAAoEF,EAAAU,CAAA,EAAA,CAAvD,MAAM,WAAW,aAAW,OAAA,aAAQ,IAAK,CAAA,GAAAtE,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,GAAL,QAAK,EAAA,CAAA,aAExDgE,EAEM,MAFNO,GAEM,CADJC,EAAQzE,EAAA,OAAA,SAAA,CAAA","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d as D,c as r,a as e,F as g,s as z,a0 as J,o as n,D as M,E as _,u as p,t as u,H as q,K as H,e as V,w as G,f as d,g as c,x as B,i as K,G as O,r as f,C as E,A as R,j as W,B as P}from"./index-D8OAewba.js";import{a as Q,s as U,t as X}from"./useFormat-CKJxQp_i.js";import{_ as Y}from"./StateBadge.vue_vue_type_script_setup_true_lang-B5C48Wlo.js";import{_ as Z}from"./ErrorNote.vue_vue_type_script_setup_true_lang-D28UQmNR.js";function k(o){var i;return(i=o.message)!=null&&i.startsWith("unverifiable")?"unverifiable":o.ok?"ok":o.phase==="assert_gone"?"leaked":"failed"}function ee(o){return{ok:"✓",unverifiable:"?",leaked:"!",failed:"✗"}[k(o)]}function se(o){return o.message?o.message:o.skipped?"skipped":k(o)==="ok"?"ok":`exit ${o.code}`}function te(o){return o.filter(i=>i.phase==="assert_gone"&&!i.ok).map(i=>i.axis)}function ae(o){return o.filter(i=>k(i)==="unverifiable").length}const oe={class:"steps stagger"},ne={class:"who"},le={class:"dim",style:{"font-size":"var(--t-sm)"}},re=D({__name:"StepList",props:{steps:{}},setup(o){return(i,t)=>(n(),r("div",null,[e("ul",oe,[(n(!0),r(g,null,z(o.steps,(l,v)=>(n(),r("li",{key:`${l.phase}-${l.axis}-${v}`,class:"step",style:M({"--i":v})},[e("span",{class:_(["mark",`s-${p(k)(l)}`]),"aria-hidden":"true"},u(p(ee)(l)),3),e("span",null,[e("span",ne,u(l.axis),1),e("span",le," · "+u(l.phase),1),e("span",{class:_(["badge",p(k)(l)]),style:{"margin-left":"var(--s2)"}},u(p(k)(l)),3),e("div",{class:_(["msg",`s-${p(k)(l)}`])},u(p(se)(l)),3)])],4))),128))]),t[0]||(t[0]=J('<p class="hint"><span class="s-ok">✓ ok</span> · <span class="s-failed">✗ failed</span> · <span class="s-leaked">! leaked — survived teardown</span> · <span class="s-unverifiable">? unverifiable — nothing to check, not a pass</span>. A <code>down</code> step marked ok may still carry a <code>non-fatal:</code> note: teardown is best-effort by design, so aborting halfway would leave more behind than continuing. </p>',1))]))}}),ue={class:"page-head"},ie={class:"sub"},de={key:1,class:"panel leaked-banner"},ce={key:2,class:"panel"},pe={class:"pre"},ve={class:"panel"},me={class:"phead"},fe={class:"row",style:{gap:"8px"}},ke={key:0,class:"mute pulse"},be={class:"row",style:{gap:"6px"}},ge={key:0,class:"mute"},he={key:1,class:"mute"},ye={class:"mute"},_e={key:3,class:"panel"},we={class:"phead"},xe={key:0,class:"mute"},Le=D({__name:"JobDetailView",props:{jobId:{}},setup(o){const i=o,t=f(null),l=f([]),v=f(""),w=f(!0),h=f(!1),x=f(!0),$=f(null);let m=null;const C=E(()=>{var a;return(a=t.value)!=null&&a.outcome?te(t.value.outcome.steps):[]}),S=E(()=>{var a;return(a=t.value)!=null&&a.outcome?ae(t.value.outcome.steps):0});async function j(){var s;const a=await R.get(`/api/jobs/${encodeURIComponent(i.jobId)}`);return w.value=!1,a.ok?(v.value="",t.value=a.body.job,(s=a.body.job.log)!=null&&s.length&&l.value.length===0&&(l.value=[...a.body.job.log]),a.body.job):(v.value=P(a,"load job"),null)}function y(){m==null||m.close(),m=null,h.value=!1}function L(){y(),m=new EventSource(R.url(`/api/jobs/${encodeURIComponent(i.jobId)}/stream`)),h.value=!0,m.onmessage=a=>{let s;try{s=JSON.parse(a.data)}catch{return}if(s.done){y(),j();return}l.value.push(s),x.value&&queueMicrotask(F)},m.onerror=()=>{y(),j()}}function F(){const a=$.value;a&&(a.scrollTop=a.scrollHeight)}return q(()=>i.jobId,async()=>{l.value=[],t.value=null,w.value=!0;const a=await j();a&&a.state==="running"&&L()},{immediate:!0}),H(y),(a,s)=>{var I,N,T;const A=W("RouterLink");return n(),r("div",null,[e("div",ue,[e("div",null,[e("h1",null,[V(A,{to:"/jobs",class:"mute"},{default:G(()=>[...s[1]||(s[1]=[d("Jobs",-1)])]),_:1}),s[2]||(s[2]=e("span",{class:"mute"}," / ",-1)),d(u(t.value?p(Q)(t.value.action):"…"),1)]),e("div",ie,[t.value?(n(),r(g,{key:0},[e("code",null,u(t.value.stack),1),d(" · started "+u(p(U)(t.value.startedAt))+" ",1),t.value.endedAt?(n(),r(g,{key:0},[d(" · took "+u(p(X)(t.value.startedAt,t.value.endedAt)),1)],64)):c("",!0)],64)):(n(),r(g,{key:1},[d(u(o.jobId),1)],64))])]),t.value?(n(),B(Y,{key:0,state:t.value.state},null,8,["state"])):c("",!0)]),v.value?(n(),B(Z,{key:0,text:v.value},null,8,["text"])):c("",!0),C.value.length?(n(),r("section",de,[s[3]||(s[3]=e("strong",null,"Leaked:",-1)),d(" "+u(C.value.join(", "))+" ",1),s[4]||(s[4]=e("div",{class:"mute"},[d(" These axes' "),e("code",null,"assert_gone"),d(" failed, so the resources are still present. They will not be retried — tear them down by hand, then re-run "),e("code",null,"verify"),d(". ")],-1))])):c("",!0),(I=t.value)!=null&&I.error?(n(),r("section",ce,[s[5]||(s[5]=e("strong",{class:"bad"},"The job crashed",-1)),e("pre",pe,u(t.value.error),1)])):c("",!0),e("section",ve,[e("div",me,[s[7]||(s[7]=e("h2",{class:"phead-title"},"Log",-1)),e("div",fe,[h.value?(n(),r("span",ke,"streaming…")):c("",!0),e("label",be,[K(e("input",{"onUpdate:modelValue":s[0]||(s[0]=b=>x.value=b),type:"checkbox"},null,512),[[O,x.value]]),s[6]||(s[6]=e("span",{class:"mute"},"Follow",-1))]),!h.value&&((N=t.value)==null?void 0:N.state)==="running"?(n(),r("button",{key:1,class:"btn",onClick:L}," Reconnect ")):c("",!0)])]),e("div",{ref_key:"logEl",ref:$,class:"logbox",role:"log","aria-live":"polite"},[w.value?(n(),r("div",ge,"Loading…")):l.value.length?c("",!0):(n(),r("div",he,"No output.")),(n(!0),r(g,null,z(l.value,b=>(n(),r("div",{key:b.seq,class:_(["logline",b.level])},[e("span",ye,u(p(U)(b.at)),1),d(" "+u(b.message),1)],2))),128))],512)]),(T=t.value)!=null&&T.outcome?(n(),r("section",_e,[e("div",we,[s[10]||(s[10]=e("h2",{class:"phead-title"},"Steps",-1)),S.value?(n(),r("span",xe,[d(u(S.value)+" unverifiable — no ",1),s[8]||(s[8]=e("code",null,"assert_gone",-1)),s[9]||(s[9]=d(", so nothing was checked ",-1))])):c("",!0)]),V(re,{steps:t.value.outcome.steps},null,8,["steps"])])):c("",!0)])}}});export{Le as default};
|
|
2
|
+
//# sourceMappingURL=JobDetailView-ow1_d8lc.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JobDetailView-ByaH2ylY.js","sources":["../../src/composables/useSteps.ts","../../src/components/StepList.vue","../../src/views/JobDetailView.vue"],"sourcesContent":["/**\n * Step classification — the single most important logic in this app.\n *\n * A job's outcome has four states that MUST NOT blur into one another. The whole product is the\n * distinction between the middle two:\n *\n * ok passed. A `down` step is ALWAYS ok and may still carry a \"non-fatal:\" note —\n * teardown is best-effort by design, so the step really did pass.\n * unverifiable the axis defines no `assert_gone`, so `verify` had nothing to check. NOT a pass.\n * A green here would be exactly the false confidence this tool exists to remove.\n * leaked `assert_gone` FAILED — the resource survived teardown. Nothing else will clean\n * it up. This is the signal the whole tool exists for, and the CLI's exit code 2.\n * failed any other non-zero step.\n *\n * Order matters: `unverifiable` is matched on the message FIRST, exactly as the CLI's own report\n * does. `skipped` alone is not enough — a dry run also skips.\n */\n\nimport type { StepResult } from '../api/types';\n\nexport type StepState = 'ok' | 'unverifiable' | 'leaked' | 'failed';\n\nexport function stepState(s: StepResult): StepState {\n if (s.message?.startsWith('unverifiable')) return 'unverifiable';\n if (!s.ok) return s.phase === 'assert_gone' ? 'leaked' : 'failed';\n return 'ok';\n}\n\nexport function stepMark(s: StepResult): string {\n return { ok: '✓', unverifiable: '?', leaked: '!', failed: '✗' }[stepState(s)];\n}\n\nexport function stepText(s: StepResult): string {\n if (s.message) return s.message;\n if (s.skipped) return 'skipped';\n return stepState(s) === 'ok' ? 'ok' : `exit ${s.code}`;\n}\n\n/** Only a failed `assert_gone` is a leak. Every other non-zero step is a plain failure. */\nexport function leakedAxes(steps: StepResult[]): string[] {\n return steps.filter((s) => s.phase === 'assert_gone' && !s.ok).map((s) => s.axis);\n}\n\nexport function countUnverifiable(steps: StepResult[]): number {\n return steps.filter((s) => stepState(s) === 'unverifiable').length;\n}\n","<script setup lang=\"ts\">\n/**\n * A job's step results.\n *\n * The legend is part of the component because the four states only mean anything together:\n * `unverifiable` is not a pass, and `leaked` is not the same problem as `failed`.\n */\nimport type { StepResult } from '../api/types';\nimport { stepMark, stepState, stepText } from '../composables/useSteps';\n\ndefineProps<{ steps: StepResult[] }>();\n</script>\n\n<template>\n <div>\n <ul class=\"steps stagger\">\n <li\n v-for=\"(s, i) in steps\"\n :key=\"`${s.phase}-${s.axis}-${i}`\"\n class=\"step\"\n :style=\"{ '--i': i }\"\n >\n <span class=\"mark\" :class=\"`s-${stepState(s)}`\" aria-hidden=\"true\">{{ stepMark(s) }}</span>\n <span>\n <span class=\"who\">{{ s.axis }}</span>\n <span class=\"dim\" style=\"font-size: var(--t-sm)\"> · {{ s.phase }}</span>\n <span class=\"badge\" :class=\"stepState(s)\" style=\"margin-left: var(--s2)\">\n {{ stepState(s) }}\n </span>\n <div class=\"msg\" :class=\"`s-${stepState(s)}`\">{{ stepText(s) }}</div>\n </span>\n </li>\n </ul>\n\n <p class=\"hint\">\n <span class=\"s-ok\">✓ ok</span> ·\n <span class=\"s-failed\">✗ failed</span> ·\n <span class=\"s-leaked\">! leaked — survived teardown</span> ·\n <span class=\"s-unverifiable\">? unverifiable — nothing to check, not a pass</span>.\n A <code>down</code> step marked ok may still carry a <code>non-fatal:</code> note: teardown is\n best-effort by design, so aborting halfway would leave more behind than continuing.\n </p>\n </div>\n</template>\n","<script setup lang=\"ts\">\n/**\n * One job: its live log while it runs, then the step table that says what actually happened.\n *\n * The log streams over `EventSource`. The server replays the whole buffered history first and then\n * sends live events, so attaching late still shows the beginning — no polling, no gap to reconcile.\n * A final `{done:true,state}` ends the stream; we close the source then and fetch the job once more\n * to pick up `outcome`, which only exists after the job finishes.\n */\nimport { computed, onBeforeUnmount, ref, watch } from 'vue';\nimport { api, problem } from '../api/client';\nimport type { Job, LogEvent } from '../api/types';\nimport { leakedAxes, countUnverifiable } from '../composables/useSteps';\nimport { actionLabel, stamp, took } from '../composables/useFormat';\nimport StepList from '../components/StepList.vue';\nimport StateBadge from '../components/StateBadge.vue';\nimport ErrorNote from '../components/ErrorNote.vue';\n\nconst props = defineProps<{ jobId: string }>();\n\nconst job = ref<Job | null>(null);\nconst lines = ref<LogEvent[]>([]);\nconst error = ref('');\nconst loading = ref(true);\nconst streaming = ref(false);\nconst follow = ref(true);\nconst logEl = ref<HTMLElement | null>(null);\n\nlet source: EventSource | null = null;\n\nconst leaks = computed(() => (job.value?.outcome ? leakedAxes(job.value.outcome.steps) : []));\nconst unverifiable = computed(() =>\n job.value?.outcome ? countUnverifiable(job.value.outcome.steps) : 0,\n);\n\n/** Returns the job it loaded, so callers need not re-read the ref — see the note at the watcher. */\nasync function load(): Promise<Job | null> {\n const r = await api.get<{ job: Job }>(`/api/jobs/${encodeURIComponent(props.jobId)}`);\n loading.value = false;\n if (!r.ok) {\n error.value = problem(r, 'load job');\n return null;\n }\n error.value = '';\n job.value = r.body.job;\n // The job carries its buffered log too. Seed from it so a finished job renders instantly without\n // opening a stream that would only replay and close.\n if (r.body.job.log?.length && lines.value.length === 0) lines.value = [...r.body.job.log];\n return r.body.job;\n}\n\nfunction closeStream(): void {\n source?.close();\n source = null;\n streaming.value = false;\n}\n\nfunction stream(): void {\n closeStream();\n // No auth header: EventSource cannot send one. Reads are unauthenticated by design, which is\n // exactly why the log is a GET.\n source = new EventSource(api.url(`/api/jobs/${encodeURIComponent(props.jobId)}/stream`));\n streaming.value = true;\n\n source.onmessage = (ev) => {\n let payload: unknown;\n try {\n payload = JSON.parse(ev.data as string);\n } catch {\n return; // a frame we cannot parse is not worth tearing the stream down for\n }\n const done = payload as { done?: boolean };\n if (done.done) {\n closeStream();\n void load(); // `outcome` only exists once the job has ended\n return;\n }\n lines.value.push(payload as LogEvent);\n if (follow.value) queueMicrotask(scrollToEnd);\n };\n\n // An error here is usually the job having ended between the fetch and the connect, or the API\n // becoming unreachable. Either way stop rather than let the browser reconnect forever.\n source.onerror = () => {\n closeStream();\n void load();\n };\n}\n\nfunction scrollToEnd(): void {\n const el = logEl.value;\n if (el) el.scrollTop = el.scrollHeight;\n}\n\nwatch(\n () => props.jobId,\n async () => {\n lines.value = [];\n job.value = null;\n loading.value = true;\n // Use what `load` returned rather than re-reading the ref: control-flow analysis still has\n // `job.value` narrowed to the `null` assigned above, because it cannot see that an awaited\n // call reassigned it.\n const loaded = await load();\n if (loaded && loaded.state === 'running') stream();\n },\n { immediate: true },\n);\n\nonBeforeUnmount(closeStream);\n</script>\n\n<template>\n <div>\n <div class=\"page-head\">\n <div>\n <h1>\n <RouterLink to=\"/jobs\" class=\"mute\">Jobs</RouterLink>\n <span class=\"mute\"> / </span>{{ job ? actionLabel(job.action) : '…' }}\n </h1>\n <div class=\"sub\">\n <template v-if=\"job\">\n <code>{{ job.stack }}</code> · started {{ stamp(job.startedAt) }}\n <template v-if=\"job.endedAt\"> · took {{ took(job.startedAt, job.endedAt) }}</template>\n </template>\n <template v-else>{{ jobId }}</template>\n </div>\n </div>\n <StateBadge v-if=\"job\" :state=\"job.state\" />\n </div>\n\n <ErrorNote v-if=\"error\" :text=\"error\" />\n\n <!--\n Leaked is called out above everything else. It means a resource survived teardown and nothing\n else is going to clean it up — the one outcome that needs a human.\n -->\n <section v-if=\"leaks.length\" class=\"panel leaked-banner\">\n <strong>Leaked:</strong> {{ leaks.join(', ') }}\n <div class=\"mute\">\n These axes' <code>assert_gone</code> failed, so the resources are still present. They will\n not be retried — tear them down by hand, then re-run <code>verify</code>.\n </div>\n </section>\n\n <section v-if=\"job?.error\" class=\"panel\">\n <strong class=\"bad\">The job crashed</strong>\n <pre class=\"pre\">{{ job.error }}</pre>\n </section>\n\n <section class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"phead-title\">Log</h2>\n <div class=\"row\" style=\"gap: 8px\">\n <span v-if=\"streaming\" class=\"mute pulse\">streaming…</span>\n <label class=\"row\" style=\"gap: 6px\">\n <input v-model=\"follow\" type=\"checkbox\" />\n <span class=\"mute\">Follow</span>\n </label>\n <button\n v-if=\"!streaming && job?.state === 'running'\"\n class=\"btn\"\n @click=\"stream\"\n >\n Reconnect\n </button>\n </div>\n </div>\n\n <div ref=\"logEl\" class=\"logbox\" role=\"log\" aria-live=\"polite\">\n <div v-if=\"loading\" class=\"mute\">Loading…</div>\n <div v-else-if=\"!lines.length\" class=\"mute\">No output.</div>\n <div v-for=\"l in lines\" :key=\"l.seq\" class=\"logline\" :class=\"l.level\">\n <span class=\"mute\">{{ stamp(l.at) }}</span> {{ l.message }}\n </div>\n </div>\n </section>\n\n <section v-if=\"job?.outcome\" class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"phead-title\">Steps</h2>\n <span v-if=\"unverifiable\" class=\"mute\">\n {{ unverifiable }} unverifiable — no <code>assert_gone</code>, so nothing was checked\n </span>\n </div>\n <StepList :steps=\"job.outcome.steps\" />\n </section>\n </div>\n</template>\n"],"names":["stepState","s","_a","stepMark","stepText","leakedAxes","steps","countUnverifiable","_createElementBlock","_createElementVNode","_hoisted_1","_openBlock","_Fragment","_renderList","__props","i","_normalizeClass","_unref","_toDisplayString","_hoisted_2","_hoisted_3","props","job","ref","lines","error","loading","streaming","follow","logEl","source","leaks","computed","unverifiable","load","r","api","problem","closeStream","stream","ev","payload","scrollToEnd","el","watch","loaded","onBeforeUnmount","_createVNode","_component_RouterLink","_cache","_createTextVNode","actionLabel","stamp","_createBlock","StateBadge","ErrorNote","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","$event","_b","_hoisted_11","_hoisted_12","l","_hoisted_13","_c","_hoisted_14","_hoisted_15","_hoisted_16","StepList"],"mappings":"2aAsBO,SAASA,EAAUC,EAA0B,OAClD,OAAIC,EAAAD,EAAE,UAAF,MAAAC,EAAW,WAAW,gBAAwB,eAC7CD,EAAE,GACA,KADWA,EAAE,QAAU,cAAgB,SAAW,QAE3D,CAEO,SAASE,GAASF,EAAuB,CAC9C,MAAO,CAAE,GAAI,IAAK,aAAc,IAAK,OAAQ,IAAK,OAAQ,GAAA,EAAMD,EAAUC,CAAC,CAAC,CAC9E,CAEO,SAASG,GAASH,EAAuB,CAC9C,OAAIA,EAAE,QAAgBA,EAAE,QACpBA,EAAE,QAAgB,UACfD,EAAUC,CAAC,IAAM,KAAO,KAAO,QAAQA,EAAE,IAAI,EACtD,CAGO,SAASI,GAAWC,EAA+B,CACxD,OAAOA,EAAM,OAAQL,GAAMA,EAAE,QAAU,eAAiB,CAACA,EAAE,EAAE,EAAE,IAAKA,GAAMA,EAAE,IAAI,CAClF,CAEO,SAASM,GAAkBD,EAA6B,CAC7D,OAAOA,EAAM,OAAQL,GAAMD,EAAUC,CAAC,IAAM,cAAc,EAAE,MAC9D,0KC/BEO,EA4BM,MAAA,KAAA,CA3BJC,EAiBK,KAjBLC,GAiBK,EAhBHC,EAAA,EAAA,EAAAH,EAeKI,EAAA,KAAAC,EAdcC,EAAA,MAAK,CAAdb,EAAGc,SADbP,EAeK,KAAA,CAbF,IAAG,GAAKP,EAAE,KAAK,IAAIA,EAAE,IAAI,IAAIc,CAAC,GAC/B,MAAM,OAC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I,EAAA,KAAAC,EAFWW,EAAA,MAAL2C,QAAZ3D,EAEM,MAAA,CAFmB,IAAK2D,EAAE,IAAK,MAAKnD,EAAA,CAAC,UAAkBmD,EAAE,KAAK,CAAA,CAAA,GAClE1D,EAA2C,OAA3C2D,GAA2ClD,EAArBD,KAAMkD,EAAE,EAAE,CAAA,EAAA,CAAA,IAAW,IAACjD,EAAGiD,EAAE,OAAO,EAAA,CAAA,CAAA,sBAK/CE,EAAA/C,EAAA,QAAA,MAAA+C,EAAK,SAApB1D,IAAAH,EAQU,UARV8D,GAQU,CAPR7D,EAKM,MALN8D,GAKM,CAJJtB,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAxC,EAAkC,KAAA,CAA9B,MAAM,aAAA,EAAc,QAAK,EAAA,GACjBwB,EAAA,OAAZtB,EAAA,EAAAH,EAEO,OAFPgE,GAEO,CADFtB,EAAAhC,EAAAe,EAAA,KAAY,EAAG,sBAAmB,CAAA,EAAAgB,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAxC,EAAwB,YAAlB,cAAW,EAAA,iBAAO,4BAC/D,EAAA,EAAA,eAEFsC,EAAuC0B,GAAA,CAA5B,MAAOnD,EAAA,MAAI,QAAQ,KAAA"}
|
|
1
|
+
{"version":3,"file":"JobDetailView-ow1_d8lc.js","sources":["../../src/composables/useSteps.ts","../../src/components/StepList.vue","../../src/views/JobDetailView.vue"],"sourcesContent":["/**\n * Step classification — the single most important logic in this app.\n *\n * A job's outcome has four states that MUST NOT blur into one another. The whole product is the\n * distinction between the middle two:\n *\n * ok passed. A `down` step is ALWAYS ok and may still carry a \"non-fatal:\" note —\n * teardown is best-effort by design, so the step really did pass.\n * unverifiable the axis defines no `assert_gone`, so `verify` had nothing to check. NOT a pass.\n * A green here would be exactly the false confidence this tool exists to remove.\n * leaked `assert_gone` FAILED — the resource survived teardown. Nothing else will clean\n * it up. This is the signal the whole tool exists for, and the CLI's exit code 2.\n * failed any other non-zero step.\n *\n * Order matters: `unverifiable` is matched on the message FIRST, exactly as the CLI's own report\n * does. `skipped` alone is not enough — a dry run also skips.\n */\n\nimport type { StepResult } from '../api/types';\n\nexport type StepState = 'ok' | 'unverifiable' | 'leaked' | 'failed';\n\nexport function stepState(s: StepResult): StepState {\n if (s.message?.startsWith('unverifiable')) return 'unverifiable';\n if (!s.ok) return s.phase === 'assert_gone' ? 'leaked' : 'failed';\n return 'ok';\n}\n\nexport function stepMark(s: StepResult): string {\n return { ok: '✓', unverifiable: '?', leaked: '!', failed: '✗' }[stepState(s)];\n}\n\nexport function stepText(s: StepResult): string {\n if (s.message) return s.message;\n if (s.skipped) return 'skipped';\n return stepState(s) === 'ok' ? 'ok' : `exit ${s.code}`;\n}\n\n/** Only a failed `assert_gone` is a leak. Every other non-zero step is a plain failure. */\nexport function leakedAxes(steps: StepResult[]): string[] {\n return steps.filter((s) => s.phase === 'assert_gone' && !s.ok).map((s) => s.axis);\n}\n\nexport function countUnverifiable(steps: StepResult[]): number {\n return steps.filter((s) => stepState(s) === 'unverifiable').length;\n}\n","<script setup lang=\"ts\">\n/**\n * A job's step results.\n *\n * The legend is part of the component because the four states only mean anything together:\n * `unverifiable` is not a pass, and `leaked` is not the same problem as `failed`.\n */\nimport type { StepResult } from '../api/types';\nimport { stepMark, stepState, stepText } from '../composables/useSteps';\n\ndefineProps<{ steps: StepResult[] }>();\n</script>\n\n<template>\n <div>\n <ul class=\"steps stagger\">\n <li\n v-for=\"(s, i) in steps\"\n :key=\"`${s.phase}-${s.axis}-${i}`\"\n class=\"step\"\n :style=\"{ '--i': i }\"\n >\n <span class=\"mark\" :class=\"`s-${stepState(s)}`\" aria-hidden=\"true\">{{ stepMark(s) }}</span>\n <span>\n <span class=\"who\">{{ s.axis }}</span>\n <span class=\"dim\" style=\"font-size: var(--t-sm)\"> · {{ s.phase }}</span>\n <span class=\"badge\" :class=\"stepState(s)\" style=\"margin-left: var(--s2)\">\n {{ stepState(s) }}\n </span>\n <div class=\"msg\" :class=\"`s-${stepState(s)}`\">{{ stepText(s) }}</div>\n </span>\n </li>\n </ul>\n\n <p class=\"hint\">\n <span class=\"s-ok\">✓ ok</span> ·\n <span class=\"s-failed\">✗ failed</span> ·\n <span class=\"s-leaked\">! leaked — survived teardown</span> ·\n <span class=\"s-unverifiable\">? unverifiable — nothing to check, not a pass</span>.\n A <code>down</code> step marked ok may still carry a <code>non-fatal:</code> note: teardown is\n best-effort by design, so aborting halfway would leave more behind than continuing.\n </p>\n </div>\n</template>\n","<script setup lang=\"ts\">\n/**\n * One job: its live log while it runs, then the step table that says what actually happened.\n *\n * The log streams over `EventSource`. The server replays the whole buffered history first and then\n * sends live events, so attaching late still shows the beginning — no polling, no gap to reconcile.\n * A final `{done:true,state}` ends the stream; we close the source then and fetch the job once more\n * to pick up `outcome`, which only exists after the job finishes.\n */\nimport { computed, onBeforeUnmount, ref, watch } from 'vue';\nimport { api, problem } from '../api/client';\nimport type { Job, LogEvent } from '../api/types';\nimport { leakedAxes, countUnverifiable } from '../composables/useSteps';\nimport { actionLabel, stamp, took } from '../composables/useFormat';\nimport StepList from '../components/StepList.vue';\nimport StateBadge from '../components/StateBadge.vue';\nimport ErrorNote from '../components/ErrorNote.vue';\n\nconst props = defineProps<{ jobId: string }>();\n\nconst job = ref<Job | null>(null);\nconst lines = ref<LogEvent[]>([]);\nconst error = ref('');\nconst loading = ref(true);\nconst streaming = ref(false);\nconst follow = ref(true);\nconst logEl = ref<HTMLElement | null>(null);\n\nlet source: EventSource | null = null;\n\nconst leaks = computed(() => (job.value?.outcome ? leakedAxes(job.value.outcome.steps) : []));\nconst unverifiable = computed(() =>\n job.value?.outcome ? countUnverifiable(job.value.outcome.steps) : 0,\n);\n\n/** Returns the job it loaded, so callers need not re-read the ref — see the note at the watcher. */\nasync function load(): Promise<Job | null> {\n const r = await api.get<{ job: Job }>(`/api/jobs/${encodeURIComponent(props.jobId)}`);\n loading.value = false;\n if (!r.ok) {\n error.value = problem(r, 'load job');\n return null;\n }\n error.value = '';\n job.value = r.body.job;\n // The job carries its buffered log too. Seed from it so a finished job renders instantly without\n // opening a stream that would only replay and close.\n if (r.body.job.log?.length && lines.value.length === 0) lines.value = [...r.body.job.log];\n return r.body.job;\n}\n\nfunction closeStream(): void {\n source?.close();\n source = null;\n streaming.value = false;\n}\n\nfunction stream(): void {\n closeStream();\n // No auth header: EventSource cannot send one. Reads are unauthenticated by design, which is\n // exactly why the log is a GET.\n source = new EventSource(api.url(`/api/jobs/${encodeURIComponent(props.jobId)}/stream`));\n streaming.value = true;\n\n source.onmessage = (ev) => {\n let payload: unknown;\n try {\n payload = JSON.parse(ev.data as string);\n } catch {\n return; // a frame we cannot parse is not worth tearing the stream down for\n }\n const done = payload as { done?: boolean };\n if (done.done) {\n closeStream();\n void load(); // `outcome` only exists once the job has ended\n return;\n }\n lines.value.push(payload as LogEvent);\n if (follow.value) queueMicrotask(scrollToEnd);\n };\n\n // An error here is usually the job having ended between the fetch and the connect, or the API\n // becoming unreachable. Either way stop rather than let the browser reconnect forever.\n source.onerror = () => {\n closeStream();\n void load();\n };\n}\n\nfunction scrollToEnd(): void {\n const el = logEl.value;\n if (el) el.scrollTop = el.scrollHeight;\n}\n\nwatch(\n () => props.jobId,\n async () => {\n lines.value = [];\n job.value = null;\n loading.value = true;\n // Use what `load` returned rather than re-reading the ref: control-flow analysis still has\n // `job.value` narrowed to the `null` assigned above, because it cannot see that an awaited\n // call reassigned it.\n const loaded = await load();\n if (loaded && loaded.state === 'running') stream();\n },\n { immediate: true },\n);\n\nonBeforeUnmount(closeStream);\n</script>\n\n<template>\n <div>\n <div class=\"page-head\">\n <div>\n <h1>\n <RouterLink to=\"/jobs\" class=\"mute\">Jobs</RouterLink>\n <span class=\"mute\"> / </span>{{ job ? actionLabel(job.action) : '…' }}\n </h1>\n <div class=\"sub\">\n <template v-if=\"job\">\n <code>{{ job.stack }}</code> · started {{ stamp(job.startedAt) }}\n <template v-if=\"job.endedAt\"> · took {{ took(job.startedAt, job.endedAt) }}</template>\n </template>\n <template v-else>{{ jobId }}</template>\n </div>\n </div>\n <StateBadge v-if=\"job\" :state=\"job.state\" />\n </div>\n\n <ErrorNote v-if=\"error\" :text=\"error\" />\n\n <!--\n Leaked is called out above everything else. It means a resource survived teardown and nothing\n else is going to clean it up — the one outcome that needs a human.\n -->\n <section v-if=\"leaks.length\" class=\"panel leaked-banner\">\n <strong>Leaked:</strong> {{ leaks.join(', ') }}\n <div class=\"mute\">\n These axes' <code>assert_gone</code> failed, so the resources are still present. They will\n not be retried — tear them down by hand, then re-run <code>verify</code>.\n </div>\n </section>\n\n <section v-if=\"job?.error\" class=\"panel\">\n <strong class=\"bad\">The job crashed</strong>\n <pre class=\"pre\">{{ job.error }}</pre>\n </section>\n\n <section class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"phead-title\">Log</h2>\n <div class=\"row\" style=\"gap: 8px\">\n <span v-if=\"streaming\" class=\"mute pulse\">streaming…</span>\n <label class=\"row\" style=\"gap: 6px\">\n <input v-model=\"follow\" type=\"checkbox\" />\n <span class=\"mute\">Follow</span>\n </label>\n <button\n v-if=\"!streaming && job?.state === 'running'\"\n class=\"btn\"\n @click=\"stream\"\n >\n Reconnect\n </button>\n </div>\n </div>\n\n <div ref=\"logEl\" class=\"logbox\" role=\"log\" aria-live=\"polite\">\n <div v-if=\"loading\" class=\"mute\">Loading…</div>\n <div v-else-if=\"!lines.length\" class=\"mute\">No output.</div>\n <div v-for=\"l in lines\" :key=\"l.seq\" class=\"logline\" :class=\"l.level\">\n <span class=\"mute\">{{ stamp(l.at) }}</span> {{ l.message }}\n </div>\n </div>\n </section>\n\n <section v-if=\"job?.outcome\" class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"phead-title\">Steps</h2>\n <span v-if=\"unverifiable\" class=\"mute\">\n {{ unverifiable }} unverifiable — no <code>assert_gone</code>, so nothing was checked\n </span>\n </div>\n <StepList :steps=\"job.outcome.steps\" />\n </section>\n </div>\n</template>\n"],"names":["stepState","s","_a","stepMark","stepText","leakedAxes","steps","countUnverifiable","_createElementBlock","_createElementVNode","_hoisted_1","_openBlock","_Fragment","_renderList","__props","i","_normalizeClass","_unref","_toDisplayString","_hoisted_2","_hoisted_3","props","job","ref","lines","error","loading","streaming","follow","logEl","source","leaks","computed","unverifiable","load","r","api","problem","closeStream","stream","ev","payload","scrollToEnd","el","watch","loaded","onBeforeUnmount","_createVNode","_component_RouterLink","_cache","_createTextVNode","actionLabel","stamp","_createBlock","StateBadge","ErrorNote","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","$event","_b","_hoisted_11","_hoisted_12","l","_hoisted_13","_c","_hoisted_14","_hoisted_15","_hoisted_16","StepList"],"mappings":"4aAsBO,SAASA,EAAUC,EAA0B,OAClD,OAAIC,EAAAD,EAAE,UAAF,MAAAC,EAAW,WAAW,gBAAwB,eAC7CD,EAAE,GACA,KADWA,EAAE,QAAU,cAAgB,SAAW,QAE3D,CAEO,SAASE,GAASF,EAAuB,CAC9C,MAAO,CAAE,GAAI,IAAK,aAAc,IAAK,OAAQ,IAAK,OAAQ,GAAA,EAAMD,EAAUC,CAAC,CAAC,CAC9E,CAEO,SAASG,GAASH,EAAuB,CAC9C,OAAIA,EAAE,QAAgBA,EAAE,QACpBA,EAAE,QAAgB,UACfD,EAAUC,CAAC,IAAM,KAAO,KAAO,QAAQA,EAAE,IAAI,EACtD,CAGO,SAASI,GAAWC,EAA+B,CACxD,OAAOA,EAAM,OAAQL,GAAMA,EAAE,QAAU,eAAiB,CAACA,EAAE,EAAE,EAAE,IAAKA,GAAMA,EAAE,IAAI,CAClF,CAEO,SAASM,GAAkBD,EAA6B,CAC7D,OAAOA,EAAM,OAAQL,GAAMD,EAAUC,CAAC,IAAM,cAAc,EAAE,MAC9D,0KC/BEO,EA4BM,MAAA,KAAA,CA3BJC,EAiBK,KAjBLC,GAiBK,EAhBHC,EAAA,EAAA,EAAAH,EAeKI,EAAA,KAAAC,EAdcC,EAAA,MAAK,CAAdb,EAAG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,MAA/CyD,GAAiC,UAAQ,GACxBzC,EAAA,MAAM,qBAAvBhB,EAA4D,MAA5D0D,GAA4C,YAAU,UACtD1D,EAEMI,EAAA,KAAAC,EAFWW,EAAA,MAAL2C,QAAZ3D,EAEM,MAAA,CAFmB,IAAK2D,EAAE,IAAK,MAAKnD,EAAA,CAAC,UAAkBmD,EAAE,KAAK,CAAA,CAAA,GAClE1D,EAA2C,OAA3C2D,GAA2ClD,EAArBD,KAAMkD,EAAE,EAAE,CAAA,EAAA,CAAA,IAAW,IAACjD,EAAGiD,EAAE,OAAO,EAAA,CAAA,CAAA,sBAK/CE,EAAA/C,EAAA,QAAA,MAAA+C,EAAK,SAApB1D,IAAAH,EAQU,UARV8D,GAQU,CAPR7D,EAKM,MALN8D,GAKM,CAJJtB,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAxC,EAAkC,KAAA,CAA9B,MAAM,aAAA,EAAc,QAAK,EAAA,GACjBwB,EAAA,OAAZtB,EAAA,EAAAH,EAEO,OAFPgE,GAEO,CADFtB,EAAAhC,EAAAe,EAAA,KAAY,EAAG,sBAAmB,CAAA,EAAAgB,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAxC,EAAwB,YAAlB,cAAW,EAAA,iBAAO,4BAC/D,EAAA,EAAA,eAEFsC,EAAuC0B,GAAA,CAA5B,MAAOnD,EAAA,MAAI,QAAQ,KAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d as k,c as l,a as t,i as y,v as g,e as n,u as o,y as r,t as i,x as w,F as m,s as x,f as p,g as C,r as f,C as V,o as a,D as L,w as b,j as N}from"./index-D8OAewba.js";import{a as $,t as A}from"./useFormat-CKJxQp_i.js";import{_ as R}from"./StateBadge.vue_vue_type_script_setup_true_lang-B5C48Wlo.js";import{_ as B}from"./SkeletonList.vue_vue_type_script_setup_true_lang-CIiWzcE5.js";import{_ as F}from"./RelativeTime.vue_vue_type_script_setup_true_lang-mzHGsi43.js";import{_ as S}from"./SelectMenu.vue_vue_type_script_setup_true_lang-CLqZAezG.js";import"./Teleport-0BmaJsBF.js";const U={class:"panel"},j={class:"phead"},q={class:"field",style:{flex:"1","min-width":"180px"}},z={class:"field"},D={key:0,class:"s-failed"},E={key:2,class:"cards"},T={class:"stagger"},I={"data-label":"state"},J={"data-label":"action"},M={class:"name","data-label":"stack"},H={class:"dim nowrap","data-label":"started"},O={class:"dim nowrap","data-label":"took"},G={class:"dim","data-label":"steps"},K={key:0},P={colspan:"6",class:"mute"},at=k({__name:"JobsView",setup(Q){const c=f(""),d=f("all"),_=V(()=>{const u=c.value.trim().toLowerCase();return r.jobs.filter(e=>d.value!=="all"&&e.state!==d.value?!1:u?e.stack.toLowerCase().includes(u)||e.action.includes(u):!0)});return(u,e)=>{const h=N("RouterLink");return a(),l("div",null,[e[6]||(e[6]=t("div",{class:"page-head"},[t("div",null,[t("h1",null,"Jobs"),t("div",{class:"sub"},"Most recent first, capped at the last 50.")])],-1)),t("section",U,[t("div",j,[t("div",q,[e[2]||(e[2]=t("label",{for:"jq",class:"mute",style:{"font-size":"var(--t-xs)"}},"Search — press /",-1)),y(t("input",{id:"jq","onUpdate:modelValue":e[0]||(e[0]=s=>c.value=s),"data-search":"",type:"search",placeholder:"stack or action",spellcheck:"false"},null,512),[[g,c.value]])]),t("div",z,[e[3]||(e[3]=t("label",{for:"js",class:"mute",style:{"font-size":"var(--t-xs)"}},"State",-1)),n(S,{modelValue:d.value,"onUpdate:modelValue":e[1]||(e[1]=s=>d.value=s),id:"js",label:"Filter jobs",options:[{value:"all",label:"All"},{value:"running",label:"Running"},{value:"ok",label:"Ok"},{value:"leaked",label:"Leaked"},{value:"failed",label:"Failed"}]},null,8,["modelValue"])])]),e[5]||(e[5]=t("p",{class:"hint",style:{margin:"0 0 var(--s3)"}}," Held in memory. A server restart clears the history — a job record is the transcript of an attempt, not the truth about what exists. That truth lives in docker and in each axis's own probe. ",-1)),o(r).jobsError?(a(),l("p",D,i(o(r).jobsError),1)):o(r).jobsLoaded?(a(),l("table",E,[e[4]||(e[4]=t("thead",null,[t("tr",null,[t("th",null,"state"),t("th",null,"action"),t("th",null,"stack"),t("th",null,"started"),t("th",null,"took"),t("th",null,"steps")])],-1)),t("tbody",T,[(a(!0),l(m,null,x(_.value,(s,v)=>(a(),l("tr",{key:s.id,style:L({"--i":v})},[t("td",I,[n(h,{to:`/jobs/${encodeURIComponent(s.id)}`},{default:b(()=>[n(R,{state:s.state},null,8,["state"])]),_:2},1032,["to"])]),t("td",J,i(o($)(s.action)),1),t("td",M,[n(h,{to:`/jobs/${encodeURIComponent(s.id)}`},{default:b(()=>[p(i(s.stack),1)]),_:2},1032,["to"])]),t("td",H,[n(F,{at:s.startedAt},null,8,["at"])]),t("td",O,i(o(A)(s.startedAt,s.endedAt)),1),t("td",G,i(s.outcome?s.outcome.steps.length:"—"),1)],4))),128)),_.value.length?C("",!0):(a(),l("tr",K,[t("td",P,[o(r).jobs.length?(a(),l(m,{key:0},[p("Nothing matches this filter.")],64)):(a(),l(m,{key:1},[p("No jobs recorded.")],64))])]))])])):(a(),w(B,{key:1,rows:5}))])])}}});export{at as default};
|
|
2
|
+
//# sourceMappingURL=JobsView-Boi9Cmdc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JobsView-Boi9Cmdc.js","sources":["../../src/views/JobsView.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/** Job history. Polled by the shell already, so this view only filters what is in memory. */\nimport { computed, ref } from 'vue';\nimport { state } from '../composables/useControlPlane';\nimport { actionLabel, took } from '../composables/useFormat';\nimport StateBadge from '../components/StateBadge.vue';\nimport SkeletonList from '../components/SkeletonList.vue';\nimport RelativeTime from '../components/RelativeTime.vue';\nimport SelectMenu from '../components/SelectMenu.vue';\nimport type { JobState } from '../api/types';\n\nconst q = ref('');\nconst only = ref<'all' | JobState>('all');\n\nconst rows = computed(() => {\n const needle = q.value.trim().toLowerCase();\n return state.jobs.filter((j) => {\n if (only.value !== 'all' && j.state !== only.value) return false;\n if (!needle) return true;\n return j.stack.toLowerCase().includes(needle) || j.action.includes(needle);\n });\n});\n</script>\n\n<template>\n <div>\n <div class=\"page-head\">\n <div>\n <h1>Jobs</h1>\n <div class=\"sub\">Most recent first, capped at the last 50.</div>\n </div>\n </div>\n\n <section class=\"panel\">\n <div class=\"phead\">\n <div class=\"field\" style=\"flex: 1; min-width: 180px\">\n <label for=\"jq\" class=\"mute\" style=\"font-size: var(--t-xs)\">Search — press /</label>\n <input id=\"jq\" v-model=\"q\" data-search type=\"search\" placeholder=\"stack or action\" spellcheck=\"false\" />\n </div>\n <div class=\"field\">\n <label for=\"js\" class=\"mute\" style=\"font-size: var(--t-xs)\">State</label>\n <SelectMenu v-model=\"only\" id=\"js\" label=\"Filter jobs\" :options=\"[{ value: 'all', label: 'All' }, { value: 'running', label: 'Running' }, { value: 'ok', label: 'Ok' }, { value: 'leaked', label: 'Leaked' }, { value: 'failed', label: 'Failed' }]\" />\n </div>\n </div>\n\n <p class=\"hint\" style=\"margin: 0 0 var(--s3)\">\n Held in memory. A server restart clears the history — a job record is the transcript of an\n attempt, not the truth about what exists. That truth lives in docker and in each axis's own\n probe.\n </p>\n\n <p v-if=\"state.jobsError\" class=\"s-failed\">{{ state.jobsError }}</p>\n <SkeletonList v-else-if=\"!state.jobsLoaded\" :rows=\"5\" />\n\n <table v-else class=\"cards\">\n <thead>\n <tr>\n <th>state</th>\n <th>action</th>\n <th>stack</th>\n <th>started</th>\n <th>took</th>\n <th>steps</th>\n </tr>\n </thead>\n <tbody class=\"stagger\">\n <tr v-for=\"(j, i) in rows\" :key=\"j.id\" :style=\"{ '--i': i }\">\n <td data-label=\"state\">\n <RouterLink :to=\"`/jobs/${encodeURIComponent(j.id)}`\">\n <StateBadge :state=\"j.state\" />\n </RouterLink>\n </td>\n <td data-label=\"action\">{{ actionLabel(j.action) }}</td>\n <td class=\"name\" data-label=\"stack\">\n <RouterLink :to=\"`/jobs/${encodeURIComponent(j.id)}`\">{{ j.stack }}</RouterLink>\n </td>\n <td class=\"dim nowrap\" data-label=\"started\"><RelativeTime :at=\"j.startedAt\" /></td>\n <td class=\"dim nowrap\" data-label=\"took\">{{ took(j.startedAt, j.endedAt) }}</td>\n <td class=\"dim\" data-label=\"steps\">{{ j.outcome ? j.outcome.steps.length : '—' }}</td>\n </tr>\n <tr v-if=\"!rows.length\">\n <td colspan=\"6\" class=\"mute\">\n <template v-if=\"state.jobs.length\">Nothing matches this filter.</template>\n <template v-else>No jobs recorded.</template>\n </td>\n </tr>\n </tbody>\n </table>\n </section>\n </div>\n</template>\n"],"names":["q","ref","only","rows","computed","needle","state","j","_createElementBlock","_createElementVNode","_hoisted_1","_hoisted_2","_hoisted_3","$event","_hoisted_4","_createVNode","SelectMenu","_unref","_openBlock","_hoisted_5","_toDisplayString","_hoisted_6","_hoisted_7","_Fragment","_renderList","i","_hoisted_8","_component_RouterLink","StateBadge","_hoisted_9","_hoisted_10","_createTextVNode","_hoisted_11","RelativeTime","_hoisted_12","took","_hoisted_13","_hoisted_14","_hoisted_15","_createBlock","SkeletonList"],"mappings":"giCAWA,MAAMA,EAAIC,EAAI,EAAE,EACVC,EAAOD,EAAsB,KAAK,EAElCE,EAAOC,EAAS,IAAM,CAC1B,MAAMC,EAASL,EAAE,MAAM,KAAA,EAAO,YAAA,EAC9B,OAAOM,EAAM,KAAK,OAAQC,GACpBL,EAAK,QAAU,OAASK,EAAE,QAAUL,EAAK,MAAc,GACtDG,EACEE,EAAE,MAAM,YAAA,EAAc,SAASF,CAAM,GAAKE,EAAE,OAAO,SAASF,CAAM,EADrD,EAErB,CACH,CAAC,mDAICG,EAgEM,MAAA,KAAA,aA/DJC,EAKM,MAAA,CALD,MAAM,aAAW,CACpBA,EAGM,MAAA,KAAA,CAFJA,EAAa,UAAT,MAAI,EACRA,EAAgE,MAAA,CAA3D,MAAM,KAAA,EAAM,2CAAyC,CAAA,SAI9DA,EAuDU,UAvDVC,EAuDU,CAtDRD,EASM,MATNE,EASM,CARJF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,k as T,l as U,o as f,m as L,n as R}from"./index-D8OAewba.js";import{_ as B}from"./ActionButton.vue_vue_type_script_setup_true_lang-DjO5RzbR.js";import{E}from"./EquivalentCommand-w1nGowVi.js";import{_ as A}from"./_plugin-vue_export-helper-DlAUqK2U.js";const D={class:"login-wrap"},F={class:"login-card panel"},I={class:"banner plain",style:{"margin-top":"var(--s3)"}},M={class:"mute",style:{"margin-top":"var(--s3)"}},P={class:"field",style:{"margin-top":"var(--s4)"}},$={class:"field"},j={key:0,class:"banner failed",style:{"margin-top":"var(--s3)"}},z={class:"row",style:{"margin-top":"var(--s4)"}},O=x({__name:"LoginView",setup(W){const k=T(),d=U(),r=u(""),o=u(""),a=u(!1),i=u("");async function c(){a.value=!0,i.value="";const p=await L(r.value.trim(),o.value);if(a.value=!1,p){i.value=p,o.value="";return}await R();const e=typeof d.query.next=="string"&&d.query.next.startsWith("/")?d.query.next:"/";k.replace(e)}return(p,e)=>{const _=N("RouterLink");return f(),v("div",D,[t("div",F,[e[12]||(e[12]=t("h1",{style:{"font-size":"var(--t-xl)","margin-bottom":"var(--s2)"}},"Sign in",-1)),S(V).hasUsers===!1?(f(),v(C,{key:0},[e[6]||(e[6]=t("p",{class:"dim"}," No accounts exist on this server yet — create the first one, then sign in. ",-1)),t("div",I,[e[4]||(e[4]=t("b",null,"Create the first account",-1)),e[5]||(e[5]=t("p",null," This has to be done with the host token, from a terminal — a browser has no way to prove it is allowed to claim a fresh server. ",-1)),n(E,{what:"creating the first account",method:"POST",path:"/api/auth/bootstrap",body:{username:"you",password:"…"}}),t("p",M,[e[3]||(e[3]=s(" It can also be set up ahead of time when the host is first provisioned. ",-1)),n(g,{label:"how"},{default:l(()=>[...e[2]||(e[2]=[s(" Set the admin username and password in the environment before running the setup command on the host. They are honoured only while no account exists, so they cannot overwrite one later. ",-1)])]),_:1})])])],64)):h("",!0),t("form",{onSubmit:q(c,["prevent"])},[t("div",P,[e[7]||(e[7]=t("label",{for:"u"},"Username",-1)),w(t("input",{id:"u","onUpdate:modelValue":e[0]||(e[0]=m=>r.value=m),type:"text",autocomplete:"username",spellcheck:"false"},null,512),[[y,r.value]])]),t("div",$,[e[8]||(e[8]=t("label",{for:"p"},"Password",-1)),w(t("input",{id:"p","onUpdate:modelValue":e[1]||(e[1]=m=>o.value=m),type:"password",autocomplete:"current-password"},null,512),[[y,o.value]])]),i.value?(f(),v("div",j,[t("p",null,b(i.value),1)])):h("",!0),t("div",z,[n(B,{variant:"primary",pending:a.value,disabled:a.value||!r.value.trim()||!o.value,onClick:c},{default:l(()=>[s(b(a.value?"Signing in…":"Sign in"),1)]),_:1},8,["pending","disabled"]),e[11]||(e[11]=t("span",{class:"grow"},null,-1)),n(_,{to:"/settings",class:"mute"},{default:l(()=>[e[10]||(e[10]=s(" Use a token instead ",-1)),n(g,{label:"token access",align:"end"},{default:l(()=>[...e[9]||(e[9]=[s(" A bearer token in Settings — the machine token from ",-1),t("code",null,"pstack init",-1),s(", or a personal token from your account — authenticates every request without a session. ",-1)])]),_:1})]),_:1})])],32)])])}}}),Q=A(O,[["__scopeId","data-v-93108325"]]);export{Q as default};
|
|
2
|
+
//# sourceMappingURL=LoginView-1ZpxP8a9.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoginView-1ZpxP8a9.js","sources":["../../src/views/LoginView.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Sign in — the one page reachable without a session.\n *\n * Two states it must distinguish, because they need opposite instructions:\n * - accounts exist → the form\n * - no accounts yet → bootstrap guidance. A dead login form with no way to create the\n * account it asks for is the worst version of this page.\n *\n * A bearer token in Settings also authenticates (CI-style access); the link stays visible for\n * operators who have the machine token and no account yet.\n */\nimport { ref } from 'vue';\nimport { useRoute, useRouter } from 'vue-router';\nimport { authState, checkAuth, login } from '../composables/useAuth';\nimport ActionButton from '../components/ActionButton.vue';\nimport InfoHint from '../components/InfoHint.vue';\nimport EquivalentCommand from '../components/EquivalentCommand.vue';\n\nconst router = useRouter();\nconst route = useRoute();\n\nconst username = ref('');\nconst password = ref('');\nconst pending = ref(false);\nconst error = ref('');\n\nasync function submit(): Promise<void> {\n pending.value = true;\n error.value = '';\n const failure = await login(username.value.trim(), password.value);\n pending.value = false;\n if (failure) {\n error.value = failure;\n password.value = '';\n return;\n }\n await checkAuth();\n // Back to wherever the guard bounced them from, or home.\n const dest = typeof route.query.next === 'string' && route.query.next.startsWith('/')\n ? route.query.next\n : '/';\n void router.replace(dest);\n}\n</script>\n\n<template>\n <div class=\"login-wrap\">\n <div class=\"login-card panel\">\n <h1 style=\"font-size: var(--t-xl); margin-bottom: var(--s2)\">Sign in</h1>\n\n <template v-if=\"authState.hasUsers === false\">\n <p class=\"dim\">\n No accounts exist on this server yet — create the first one, then sign in.\n </p>\n <!--\n A curl block used to sit here permanently, on the FIRST screen anyone sees. It is needed\n exactly once per host and by one person; behind the button it costs a click then and\n nothing on every later visit — and it is generated, so it cannot drift from the route.\n -->\n <div class=\"banner plain\" style=\"margin-top: var(--s3)\">\n <b>Create the first account</b>\n <p>\n This has to be done with the host token, from a terminal — a browser has no way to prove\n it is allowed to claim a fresh server.\n </p>\n <EquivalentCommand\n what=\"creating the first account\"\n method=\"POST\"\n path=\"/api/auth/bootstrap\"\n :body=\"{ username: 'you', password: '…' }\"\n />\n <p class=\"mute\" style=\"margin-top: var(--s3)\">\n It can also be set up ahead of time when the host is first provisioned.\n <InfoHint label=\"how\">\n Set the admin username and password in the environment before running the setup\n command on the host. They are honoured only while no account exists, so they cannot\n overwrite one later.\n </InfoHint>\n </p>\n </div>\n </template>\n\n <form @submit.prevent=\"submit\">\n <div class=\"field\" style=\"margin-top: var(--s4)\">\n <label for=\"u\">Username</label>\n <input id=\"u\" v-model=\"username\" type=\"text\" autocomplete=\"username\" spellcheck=\"false\" />\n </div>\n <div class=\"field\">\n <label for=\"p\">Password</label>\n <input id=\"p\" v-model=\"password\" type=\"password\" autocomplete=\"current-password\" />\n </div>\n\n <div v-if=\"error\" class=\"banner failed\" style=\"margin-top: var(--s3)\">\n <p>{{ error }}</p>\n </div>\n\n <div class=\"row\" style=\"margin-top: var(--s4)\">\n <ActionButton\n variant=\"primary\"\n :pending=\"pending\"\n :disabled=\"pending || !username.trim() || !password\"\n @click=\"submit\"\n >\n {{ pending ? 'Signing in…' : 'Sign in' }}\n </ActionButton>\n <span class=\"grow\" />\n <RouterLink to=\"/settings\" class=\"mute\">\n Use a token instead\n <InfoHint label=\"token access\" align=\"end\">\n A bearer token in Settings — the machine token from <code>pstack init</code>, or a\n personal token from your account — authenticates every request without a session.\n </InfoHint>\n </RouterLink>\n </div>\n </form>\n </div>\n </div>\n</template>\n\n<style scoped>\n/* The shell centres this now — see `.shell.no-rail .view`. A second centring context here would\n * fight it, and `min-height: 70vh` was what pinned the card toward the top of the window. */\n/* `100%`, not `92vw`: the shell already insets this by its own padding, so a viewport-relative\n * width added on top overflowed the right edge on a phone (measured 32px/0px at 390). */\n.login-wrap {\n width: min(420px, 100%);\n}\n.login-card {\n width: 100%;\n}\n</style>\n"],"names":["router","useRouter","route","useRoute","username","ref","password","pending","error","submit","failure","login","checkAuth","dest","_openBlock","_createElementBlock","_hoisted_1","_createElementVNode","_hoisted_2","_cache","_unref","authState","_Fragment","_hoisted_3","_createVNode","EquivalentCommand","_hoisted_4","InfoHint","_hoisted_5","$event","_hoisted_6","_hoisted_7","_hoisted_8","ActionButton","_component_RouterLink"],"mappings":"uvBAmBA,MAAMA,EAASC,EAAA,EACTC,EAAQC,EAAA,EAERC,EAAWC,EAAI,EAAE,EACjBC,EAAWD,EAAI,EAAE,EACjBE,EAAUF,EAAI,EAAK,EACnBG,EAAQH,EAAI,EAAE,EAEpB,eAAeI,GAAwB,CACrCF,EAAQ,MAAQ,GAChBC,EAAM,MAAQ,GACd,MAAME,EAAU,MAAMC,EAAMP,EAAS,MAAM,KAAA,EAAQE,EAAS,KAAK,EAEjE,GADAC,EAAQ,MAAQ,GACZG,EAAS,CACXF,EAAM,MAAQE,EACdJ,EA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F,GAAG,yCAAab,EAAQ,MAAAyB,GAAE,KAAK,OAAO,aAAa,WAAW,WAAW,OAAA,gBAAzDzB,EAAA,KAAQ,CAAA,KAEjCa,EAGM,MAHNa,EAGM,CAFJX,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAF,EAA+B,QAAA,CAAxB,IAAI,GAAA,EAAI,WAAQ,EAAA,KACvBA,EAAmF,QAAA,CAA5E,GAAG,yCAAaX,EAAQ,MAAAuB,GAAE,KAAK,WAAW,aAAa,kBAAA,gBAAvCvB,EAAA,KAAQ,CAAA,KAGtBE,EAAA,OAAXM,EAAA,EAAAC,EAEM,MAFNgB,EAEM,CADJd,EAAkB,WAAZT,EAAA,KAAK,EAAA,CAAA,CAAA,aAGbS,EAiBM,MAjBNe,EAiBM,CAhBJR,EAOeS,EAAA,CANb,QAAQ,UACP,QAAS1B,EAAA,MACT,SAAUA,EAAA,OAAO,CAAKH,QAAS,KAAA,IAAWE,EAAA,MAC1C,QAAOG,CAAA,aAER,IAAyC,KAAtCF,EAAA,MAAO,cAAA,SAAA,EAAA,CAAA,CAAA,gDAEZU,EAAqB,OAAA,CAAf,MAAM,MAAA,EAAM,KAAA,EAAA,GAClBO,EAMaU,EAAA,CAND,GAAG,YAAY,MAAM,MAAA,aAAO,IAEtC,iBAFsC,wBAEtC,EAAA,GAAAV,EAGWG,EAAA,CAHD,MAAM,eAAe,MAAM,KAAA,aAAM,IACW,CAAA,GAAAR,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,GADX,wDACW,EAAA,EAAAF,EAAwB,YAAlB,cAAW,EAAA,IAAO,4FAE9E,EAAA,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.login-wrap[data-v-93108325]{width:min(420px,100%)}.login-card[data-v-93108325]{width:100%}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{d as F,H as L,c as a,a as l,e as g,g as d,u as w,f as u,t as m,F as T,i as z,v as A,w as B,_ as R,r as v,C as k,A as x,J as _,B as I,o}from"./index-D8OAewba.js";import{d as r}from"./useDeployment-DplTFu7s.js";import{_ as C}from"./SelectMenu.vue_vue_type_script_setup_true_lang-CLqZAezG.js";import"./useVars-VN9gYdR6.js";import"./Teleport-0BmaJsBF.js";const M={class:"panel"},j={class:"phead"},D={key:0,class:"field"},E={class:"field"},H=["disabled"],O={key:0,class:"progress","aria-hidden":"true"},q={key:0,class:"mute"},J={key:1,class:"mute"},P={key:0,class:"banner failed"},G={key:1,class:"banner warn"},K={key:2,class:"field",style:{"margin-top":"var(--s3)"}},Q={key:3,class:"hint",style:{"margin-top":"var(--s3)"}},W={key:4,class:"log"},X={key:5,class:"mute",style:{"margin-top":"var(--s3)"}},Y={key:6,class:"hint"},oe=F({__name:"LogsTab",setup(Z){const y=v(200),p=v(""),f=v([]);async function V(){const s=await x.get(`/api/deployments/${encodeURIComponent(r.id)}/runtime${_(r.vars)}`);s.ok&&(f.value=[...new Set(s.body.containers.map(e=>e.service).filter(e=>!!e))].sort())}const $=k(()=>[{value:"",label:"All services"},...f.value.map(s=>({value:s,label:s}))]),h=v(""),n=v(null),b=v(""),c=v(!1);L(()=>{var s;return[r.id,!!((s=r.detail)!=null&&s.compose)]},([s,e],t)=>{(!t||t[0]!==s)&&(f.value=[],p.value="",n.value=null),e&&f.value.length===0&&V()},{immediate:!0});async function N(){var i;if(!((i=r.detail)!=null&&i.compose))return;const s=r.id;c.value=!0,b.value="";const e=p.value,t=await x.get(`/api/deployments/${encodeURIComponent(s)}/logs${_(r.vars,{tail:y.value,...e?{service:e}:{}})}`);if(c.value=!1,r.id===s&&!(t.ok&&(t.body.service??"")!==e)){if(!t.ok){n.value=null,b.value=I(t,"load the logs");return}n.value={...t.body,ok:t.body.ok!==!1,text:t.body.text??""}}}const S=k(()=>{var i;const s=((i=n.value)==null?void 0:i.text)??"",e=h.value.trim().toLowerCase();if(!e)return s;const t=s.split(`
|
|
2
|
+
`).filter(U=>U.toLowerCase().includes(e));return t.length?t.join(`
|
|
3
|
+
`):`(no line matches "${h.value}")`});return(s,e)=>{var t;return o(),a("section",M,[l("div",j,[e[5]||(e[5]=l("h2",{class:"section"},"Compose logs",-1)),e[6]||(e[6]=l("span",{class:"grow"},null,-1)),f.value.length>1?(o(),a("div",D,[e[3]||(e[3]=l("label",{for:"svc",class:"mute",style:{"font-size":"var(--t-xs)"}},"service",-1)),g(C,{modelValue:p.value,"onUpdate:modelValue":e[0]||(e[0]=i=>p.value=i),id:"svc",label:"Service",options:$.value},null,8,["modelValue","options"])])):d("",!0),l("div",E,[e[4]||(e[4]=l("label",{for:"tail",class:"mute",style:{"font-size":"var(--t-xs)"}},"tail",-1)),g(C,{"model-value":String(y.value),label:"How many lines",options:[{value:"50",label:"50"},{value:"200",label:"200"},{value:"500",label:"500"},{value:"1000",label:"1000"},{value:"2000",label:"2000"}],"onUpdate:modelValue":e[1]||(e[1]=i=>y.value=Number(i))},null,8,["model-value"])]),l("button",{class:"primary",style:{"align-self":"end"},disabled:c.value||!((t=w(r).detail)!=null&&t.compose),onClick:N},[u(m(c.value?"reading…":"Fetch")+" ",1),c.value?(o(),a("span",O)):d("",!0)],8,H)]),w(r).detail?w(r).detail.compose?(o(),a(T,{key:2},[e[16]||(e[16]=l("p",{class:"hint",style:{margin:"0 0 var(--s3)"}}," Fetched on demand, never polled: an auto-refresh against a chatty stack would hammer the host. The server caps how many lines it will return. ",-1)),b.value?(o(),a("div",P,m(b.value),1)):n.value&&!n.value.ok?(o(),a("div",G,[...e[8]||(e[8]=[l("b",null,"compose exited non-zero.",-1),l("p",null," Most often the project does not exist yet (nothing has been brought up), or a profile is missing. Any output it did produce is below. ",-1)])])):d("",!0),n.value?(o(),a("div",K,[e[9]||(e[9]=l("label",{for:"lf",class:"mute",style:{"font-size":"var(--t-xs)"}},"Search in these lines",-1)),z(l("input",{id:"lf","onUpdate:modelValue":e[2]||(e[2]=i=>h.value=i),"data-search":"",type:"search",placeholder:"substring",spellcheck:"false"},null,512),[[A,h.value]])])):d("",!0),n.value&&n.value.service?(o(),a("div",Q,[e[11]||(e[11]=u(" Showing ",-1)),l("b",null,m(n.value.service),1),e[12]||(e[12]=u(" only. ",-1)),g(R,{label:"why narrowing helps"},{default:B(()=>[...e[10]||(e[10]=[u(" On a stack with a chatty sidecar the interleaved output is unreadable, and the lines you want are often already past the tail. Narrowing spends the whole tail on one service. ",-1)])]),_:1})])):d("",!0),n.value?(o(),a("pre",W,m(S.value||"(no output)"),1)):c.value?d("",!0):(o(),a("p",X,[e[13]||(e[13]=u(" Press ",-1)),e[14]||(e[14]=l("b",null,"Fetch",-1)),u(" to read the last "+m(y.value)+" lines"+m(p.value?` of ${p.value}`:"")+". ",1)])),n.value?(o(),a("p",Y,[...e[15]||(e[15]=[u(" Redacted on the host before sending: credentials inside URLs, ",-1),l("code",null,"NAME=value",-1),u(" pairs whose name reads as a secret, and this server's own token. ",-1)])])):d("",!0)],64)):(o(),a("p",J,[...e[7]||(e[7]=[u(" This spec has no ",-1),l("code",null,"compose:",-1),u(" section, so there are no compose logs to read. Its axes may still have created resources — check those at their own source. ",-1)])])):(o(),a("p",q,"Unavailable until the spec resolves."))])}}});export{oe as default};
|
|
4
|
+
//# sourceMappingURL=LogsTab-Bgev0F7g.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogsTab-Bgev0F7g.js","sources":["../../src/views/tabs/LogsTab.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Compose logs, fetched ON DEMAND.\n *\n * Never polled: an auto-refresh against a chatty stack would hammer the host through\n * `docker compose logs` — the same host that is running everyone else's previews. The tail is\n * clamped to 1–2000 by the server for the same reason.\n */\nimport { computed, ref, watch } from 'vue';\nimport { api, problem, query } from '../../api/client';\nimport type { LogsResponse, RuntimeResponse } from '../../api/types';\nimport { dep } from '../../composables/useDeployment';\nimport InfoHint from '../../components/InfoHint.vue';\nimport SelectMenu from '../../components/SelectMenu.vue';\n\nconst tail = ref(200);\n/** '' means the whole stack. */\nconst service = ref('');\n/**\n * The services to choose from, taken from what is actually RUNNING rather than from the compose file.\n * A service the spec declares but never started has no logs, and offering it would produce an\n * empty pane that reads like a bug.\n */\nconst services = ref<string[]>([]);\n\nasync function loadServices(): Promise<void> {\n const r = await api.get<RuntimeResponse>(\n `/api/deployments/${encodeURIComponent(dep.id)}/runtime${query(dep.vars)}`,\n );\n if (!r.ok) return; // the picker is a convenience; without it the whole-stack read still works\n services.value = [\n ...new Set(r.body.containers.map((c) => c.service).filter((s): s is string => !!s)),\n ].sort();\n}\n\n/** Empty value = the whole stack, which is a real choice here rather than a placeholder. */\nconst serviceOptions = computed(() => [\n { value: '', label: 'All services' },\n ...services.value.map((s) => ({ value: s, label: s })),\n]);\n\nconst filter = ref('');\nconst logs = ref<LogsResponse | null>(null);\nconst error = ref('');\nconst loading = ref(false);\n\nwatch(\n () => [dep.id, !!dep.detail?.compose] as const,\n ([id, hasCompose], prev) => {\n if (!prev || prev[0] !== id) {\n services.value = [];\n service.value = '';\n logs.value = null;\n }\n // Gated on the RESOLVED spec, not just the id: this component mounts before the parent has\n // resolved the deployment, so an id-only watcher saw `dep.detail === undefined` and the service\n // picker never appeared.\n if (hasCompose && services.value.length === 0) void loadServices();\n },\n { immediate: true },\n);\n\nasync function fetchLogs(): Promise<void> {\n if (!dep.detail?.compose) return;\n const id = dep.id;\n loading.value = true;\n error.value = '';\n const chosen = service.value;\n const r = await api.get<LogsResponse>(\n `/api/deployments/${encodeURIComponent(id)}/logs${query(dep.vars, {\n tail: tail.value,\n ...(chosen ? { service: chosen } : {}),\n })}`,\n );\n loading.value = false;\n if (dep.id !== id) return; // navigated away mid-flight\n // A slow response for the previously-selected service must not land in a pane now labelled with a\n // different one.\n if (r.ok && (r.body.service ?? '') !== chosen) return;\n if (!r.ok) {\n logs.value = null;\n error.value = problem(r, 'load the logs');\n return;\n }\n logs.value = { ...r.body, ok: r.body.ok !== false, text: r.body.text ?? '' };\n}\n\n/** Search-in-logs: filter to matching lines rather than highlighting inside a wall of text. */\nconst shown = computed(() => {\n const text = logs.value?.text ?? '';\n const needle = filter.value.trim().toLowerCase();\n if (!needle) return text;\n const lines = text.split('\\n').filter((l) => l.toLowerCase().includes(needle));\n return lines.length ? lines.join('\\n') : `(no line matches \"${filter.value}\")`;\n});\n</script>\n\n<template>\n <section class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"section\">Compose logs</h2>\n <span class=\"grow\" />\n <div v-if=\"services.length > 1\" class=\"field\">\n <label for=\"svc\" class=\"mute\" style=\"font-size: var(--t-xs)\">service</label>\n <SelectMenu v-model=\"service\" id=\"svc\" label=\"Service\" :options=\"serviceOptions\" />\n </div>\n <div class=\"field\">\n <label for=\"tail\" class=\"mute\" style=\"font-size: var(--t-xs)\">tail</label>\n <SelectMenu :model-value=\"String(tail)\" label=\"How many lines\" :options=\"[{ value: '50', label: '50' }, { value: '200', label: '200' }, { value: '500', label: '500' }, { value: '1000', label: '1000' }, { value: '2000', label: '2000' }]\" @update:model-value=\"(v) => (tail = Number(v))\" />\n </div>\n <button\n class=\"primary\"\n style=\"align-self: end\"\n :disabled=\"loading || !dep.detail?.compose\"\n @click=\"fetchLogs\"\n >\n {{ loading ? 'reading…' : 'Fetch' }}\n <span v-if=\"loading\" class=\"progress\" aria-hidden=\"true\" />\n </button>\n </div>\n\n <p v-if=\"!dep.detail\" class=\"mute\">Unavailable until the spec resolves.</p>\n <!-- Guard on the field rather than calling and interpreting the failure after the fact. -->\n <p v-else-if=\"!dep.detail.compose\" class=\"mute\">\n This spec has no <code>compose:</code> section, so there are no compose logs to read. Its axes\n may still have created resources — check those at their own source.\n </p>\n\n <template v-else>\n <p class=\"hint\" style=\"margin: 0 0 var(--s3)\">\n Fetched on demand, never polled: an auto-refresh against a chatty stack would hammer the\n host. The server caps how many lines it will return.\n </p>\n\n <div v-if=\"error\" class=\"banner failed\">{{ error }}</div>\n\n <!--\n `ok: false` means compose exited non-zero. Usually \"no such project\" because the stack was\n never brought up — not a server fault, so it is a note rather than an error.\n -->\n <div v-else-if=\"logs && !logs.ok\" class=\"banner warn\">\n <b>compose exited non-zero.</b>\n <p>\n Most often the project does not exist yet (nothing has been brought up), or a profile is\n missing. Any output it did produce is below.\n </p>\n </div>\n\n <div v-if=\"logs\" class=\"field\" style=\"margin-top: var(--s3)\">\n <label for=\"lf\" class=\"mute\" style=\"font-size: var(--t-xs)\">Search in these lines</label>\n <input id=\"lf\" v-model=\"filter\" data-search type=\"search\" placeholder=\"substring\" spellcheck=\"false\" />\n </div>\n\n <div v-if=\"logs && logs.service\" class=\"hint\" style=\"margin-top: var(--s3)\">\n Showing <b>{{ logs.service }}</b> only.\n <InfoHint label=\"why narrowing helps\">\n On a stack with a chatty sidecar the interleaved output is unreadable, and the lines you want\n are often already past the tail. Narrowing spends the whole tail on one service.\n </InfoHint>\n </div>\n\n <pre v-if=\"logs\" class=\"log\">{{ shown || '(no output)' }}</pre>\n <p v-else-if=\"!loading\" class=\"mute\" style=\"margin-top: var(--s3)\">\n Press <b>Fetch</b> to read the last {{ tail }} lines{{ service ? ` of ${service}` : '' }}.\n </p>\n\n <p v-if=\"logs\" class=\"hint\">\n Redacted on the host before sending: credentials inside URLs, <code>NAME=value</code> pairs\n whose name reads as a secret, and this server's own token.\n </p>\n </template>\n </section>\n</template>\n"],"names":["tail","ref","service","services","loadServices","r","api","dep","query","c","s","serviceOptions","computed","filter","logs","error","loading","watch","_a","id","hasCompose","prev","fetchLogs","chosen","problem","shown","text","needle","lines","l","_openBlock","_createElementBlock","_hoisted_1","_createElementVNode","_hoisted_2","_cache","_hoisted_3","_createVNode","SelectMenu","$event","_hoisted_4","v","_unref","_createTextVNode","_toDisplayString","_hoisted_6","_Fragment","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","InfoHint","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_8","_hoisted_7"],"mappings":"21BAeA,MAAMA,EAAOC,EAAI,GAAG,EAEdC,EAAUD,EAAI,EAAE,EAMhBE,EAAWF,EAAc,EAAE,EAEjC,eA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AmC,sCAAoC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as i,c as d,a as o,
|
|
2
|
-
//# sourceMappingURL=NotFoundView-
|
|
1
|
+
import{d as i,c as d,a as o,f as s,t as r,u,e as n,w as l,l as p,j as f,o as m}from"./index-D8OAewba.js";const y={class:"page-head"},b={class:"sub"},g={class:"panel"},v={class:"row",style:{"margin-top":"12px",gap:"8px"}},x=i({__name:"NotFoundView",setup(w){const a=p();return(_,t)=>{const e=f("RouterLink");return m(),d("div",null,[o("div",y,[o("div",null,[t[2]||(t[2]=o("h1",null,"Not found",-1)),o("div",b,[t[0]||(t[0]=s("Nothing is routed at ",-1)),o("code",null,r(u(a).fullPath),1),t[1]||(t[1]=s(".",-1))])])]),o("section",g,[t[6]||(t[6]=o("p",{class:"mute"}," If you followed a link to a deployment that has since been forgotten, it will not resolve — the control plane only knows deployments that are still in its registry. ",-1)),o("div",v,[n(e,{class:"btn",to:"/"},{default:l(()=>[...t[3]||(t[3]=[s("Dashboard",-1)])]),_:1}),n(e,{class:"btn",to:"/deployments"},{default:l(()=>[...t[4]||(t[4]=[s("Deployments",-1)])]),_:1}),n(e,{class:"btn",to:"/jobs"},{default:l(()=>[...t[5]||(t[5]=[s("Jobs",-1)])]),_:1})])])])}}});export{x as default};
|
|
2
|
+
//# sourceMappingURL=NotFoundView-BhCKBrlY.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotFoundView-
|
|
1
|
+
{"version":3,"file":"NotFoundView-BhCKBrlY.js","sources":["../../src/views/NotFoundView.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Catch-all route.\n *\n * Exists so a mistyped or stale deep link renders something with a way out, rather than the blank\n * screen a SPA gives you by default when no route matches.\n */\nimport { useRoute } from 'vue-router';\n\nconst route = useRoute();\n</script>\n\n<template>\n <div>\n <div class=\"page-head\">\n <div>\n <h1>Not found</h1>\n <div class=\"sub\">Nothing is routed at <code>{{ route.fullPath }}</code>.</div>\n </div>\n </div>\n\n <section class=\"panel\">\n <p class=\"mute\">\n If you followed a link to a deployment that has since been forgotten, it will not resolve —\n the control plane only knows deployments that are still in its registry.\n </p>\n <div class=\"row\" style=\"margin-top: 12px; gap: 8px\">\n <RouterLink class=\"btn\" to=\"/\">Dashboard</RouterLink>\n <RouterLink class=\"btn\" to=\"/deployments\">Deployments</RouterLink>\n <RouterLink class=\"btn\" to=\"/jobs\">Jobs</RouterLink>\n </div>\n </section>\n </div>\n</template>\n"],"names":["route","useRoute","_createElementBlock","_createElementVNode","_hoisted_1","_cache","_hoisted_2","_toDisplayString","_unref","_hoisted_3","_hoisted_4","_createVNode","_component_RouterLink"],"mappings":"iQASA,MAAMA,EAAQC,EAAA,mDAIZC,EAmBM,MAAA,KAAA,CAlBJC,EAKM,MALNC,EAKM,CAJJD,EAGM,MAAA,KAAA,CAFJE,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAF,EAAkB,UAAd,YAAS,EAAA,GACbA,EAA8E,MAA9EG,EAA8E,eAA7D,wBAAqB,EAAA,GAAAH,EAAiC,OAAA,KAAAI,EAAxBC,EAAAR,CAAA,EAAM,QAAQ,EAAA,CAAA,gBAAU,IAAC,EAAA,EAAA,OAI5EG,EAUU,UAVVM,EAUU,CATRJ,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAF,EAGI,IAAA,CAHD,MAAM,MAAA,EAAO,yKAGhB,EAAA,GACAA,EAIM,MAJNO,EAIM,CAHJC,EAAqDC,EAAA,CAAzC,MAAM,MAAM,GAAG,GAAA,aAAI,IAAS,CAAA,GAAAP,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,GAAT,YAAS,EAAA,CAAA,WACxCM,EAAkEC,EAAA,CAAtD,MAAM,MAAM,GAAG,cAAA,aAAe,IAAW,CAAA,GAAAP,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,GAAX,cAAW,EAAA,CAAA,WACrDM,EAAoDC,EAAA,CAAxC,MAAM,MAAM,GAAG,OAAA,aAAQ,IAAI,CAAA,GAAAP,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,GAAJ,OAAI,EAAA,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d as J,H as K,c as o,a as t,f as n,e as h,w as g,_ as T,x as E,g as c,F as f,t as r,s as N,i as j,v as U,r as v,C as S,A as y,B as _,o as l,D as Q,E as X,u as Z,N as D}from"./index-D8OAewba.js";import{s as ee}from"./useFormat-CKJxQp_i.js";import{_ as F}from"./ActionButton.vue_vue_type_script_setup_true_lang-DjO5RzbR.js";import{_ as I}from"./ErrorNote.vue_vue_type_script_setup_true_lang-D28UQmNR.js";import{_ as te}from"./SkeletonList.vue_vue_type_script_setup_true_lang-CIiWzcE5.js";import{_ as se}from"./RelativeTime.vue_vue_type_script_setup_true_lang-mzHGsi43.js";import{_ as ae}from"./SelectMenu.vue_vue_type_script_setup_true_lang-CLqZAezG.js";import"./Teleport-0BmaJsBF.js";const le={class:"page-head"},oe={class:"sub"},ie={key:1,class:"panel"},ne={key:0,class:"banner ok"},re={class:"code"},de={class:"row"},ue={class:"panel"},ve={key:1,class:"cards"},ce={class:"stagger"},pe={class:"name","data-label":"name"},he={class:"mute",style:{"font-size":"var(--t-sm)"}},me={"data-label":"events"},fe={key:0,class:"badge"},ye={key:1},ke={"data-label":"last delivery"},ge={key:0,class:"mute"},_e={key:2,class:"mute",style:{"font-size":"var(--t-sm)"}},be={"data-label":""},we={class:"row",style:{"justify-content":"flex-end"}},$e={key:0,class:"badge off"},xe=["onClick"],Ce=["onClick"],Te=["onClick"],Ne={colspan:"4"},Ve={key:0,class:"kvlist"},Ae={class:"k"},Ee={class:"v"},Se={class:"mute",style:{"font-size":"var(--t-sm)"}},De={key:0,class:"s-failed",style:{"font-size":"var(--t-sm)"}},Re={key:1,class:"mute"},ze={key:2,class:"mute"},Be={class:"panel"},He={key:0,class:"field",style:{"max-width":"320px"}},Pe={class:"field",style:{"max-width":"380px"}},je=["for"],Ue=["id","onUpdate:modelValue","placeholder"],Xe={class:"section",style:{margin:"var(--s5) 0 var(--s3)"}},Fe={class:"row"},Ie={class:"check"},Me=["checked"],Oe={key:1,class:"check-grid"},We=["checked","onChange"],qe={class:"row",style:{"margin-top":"var(--s4)"}},Le={class:"hint"},at=J({__name:"NotifiersView",setup(Ye){const V=v([]),k=v(null),R=v(!1),p=v(""),z=v(!1),b=v(null),i=v({name:"",type:"webhook",events:[],config:{}}),w=v(!1),x=v(""),m=v(null),A=v([]),M=S(()=>{var a;return(((a=k.value)==null?void 0:a.types)??[]).map(e=>({value:e.kind,label:e.label}))}),B=S(()=>{var a;return((a=k.value)==null?void 0:a.types.find(e=>e.kind===i.value.type))??null});K(()=>i.value.type,()=>{i.value.config={}});const O=S(()=>{var a;return!w.value&&!!i.value.name.trim()&&i.value.events.length>0&&(((a=B.value)==null?void 0:a.fields)??[]).every(e=>{var u;return!e.required||!!((u=i.value.config[e.key])!=null&&u.trim())})});async function $(){const[a,e]=await Promise.all([y.get("/api/notifiers"),y.get("/api/notifiers/meta")]);if(R.value=!0,a.status===404||e.status===404){z.value=!0;return}if(!a.ok){p.value=_(a,"load the notifiers");return}p.value="",V.value=a.body.notifiers??[],e.ok&&(k.value=e.body)}$();function H(a){const e=i.value.events.indexOf(a);e===-1?i.value.events.push(a):i.value.events.splice(e,1)}async function W(){w.value=!0,x.value="";const a=await y.post("/api/notifiers",{name:i.value.name.trim(),type:i.value.type,events:i.value.events,config:i.value.config});if(w.value=!1,!a.ok){x.value=_(a,"register this notifier");return}b.value=a.body.secret?{name:a.body.notifier.name,secret:a.body.secret}:null,i.value={name:"",type:i.value.type,events:[],config:{}},$()}async function q(a,e){const u=await y.patch(`/api/notifiers/${a.id}`,{enabled:e});u.ok||(p.value=_(u,"update this notifier")),$()}async function L(a){const e=await y.del(`/api/notifiers/${a.id}`);if(!e.ok){p.value=_(e,"delete this notifier");return}m.value===a.id&&(m.value=null),D("ok",`Removed ${a.name}.`),$()}async function Y(a){const e=await y.post(`/api/notifiers/${a.id}/test`,{});if(!e.ok){p.value=_(e,"send a test delivery");return}const u=e.body.result;u.ok?D("ok",`${a.name} accepted the test delivery.`):D("error",`${a.name}: ${u.error??`HTTP ${u.status}`}`),$()}async function G(a){if(m.value===a.id){m.value=null;return}const e=await y.get(`/api/notifiers/${a.id}/deliveries`);if(!e.ok){p.value=_(e,"load the delivery log");return}A.value=e.body.deliveries??[],m.value=a.id}return(a,e)=>{var u,P;return l(),o("div",null,[t("div",le,[t("div",null,[e[6]||(e[6]=t("h1",null,"Notifiers",-1)),t("div",oe,[e[5]||(e[5]=n(" Where events on this host get sent ",-1)),h(T,{label:"what a notifier is"},{default:g(()=>[...e[4]||(e[4]=[n(" A registration that receives events — a teardown that leaked, a deployment created, a job that failed. Webhooks today; the server decides what other kinds exist, and this page renders whatever it offers. ",-1)])]),_:1})])])]),p.value?(l(),E(I,{key:0,text:p.value,title:"Could not load the notifiers."},null,8,["text"])):c("",!0),z.value?(l(),o("section",ie,[...e[7]||(e[7]=[t("div",{class:"banner plain"},[t("b",null,"This server has no notifiers."),t("p",null,"It is an older build of pstack. Upgrade the host to register webhooks.")],-1)])])):(l(),o(f,{key:2},[b.value?(l(),o("div",ne,[t("b",null,"Signing secret for “"+r(b.value.name)+"” — copy it now.",1),t("p",null,[e[9]||(e[9]=n(" This is the only time it is shown — the server keeps no way to show it again. Your receiver uses it to check that a delivery really came from here. ",-1)),h(T,{label:"how a receiver checks it"},{default:g(()=>[...e[8]||(e[8]=[n(" Each delivery carries a signature header computed from this secret and the exact body sent. Recompute it on your side and compare; a mismatch means the delivery was not sent by this host, or was altered on the way. ",-1)])]),_:1})]),t("pre",re,r(b.value.secret),1),t("div",de,[t("button",{class:"btn",onClick:e[0]||(e[0]=s=>b.value=null)},"I have stored it")])])):c("",!0),t("section",ue,[e[12]||(e[12]=t("div",{class:"phead"},[t("h2",{class:"section"},"Registered")],-1)),R.value?V.value.length?(l(),o("table",ve,[e[11]||(e[11]=t("thead",null,[t("tr",null,[t("th",null,"name"),t("th",null,"events"),t("th",null,"last delivery"),t("th")])],-1)),t("tbody",ce,[(l(!0),o(f,null,N(V.value,(s,C)=>(l(),o(f,{key:s.id},[t("tr",{style:Q({"--i":C})},[t("td",pe,[n(r(s.name)+" ",1),t("div",he,r(s.type)+" · "+r(String(s.config.url??"")),1)]),t("td",me,[s.events.includes("*")?(l(),o("span",fe,"all events")):(l(),o("span",ye,r(s.events.join(", ")),1))]),t("td",ke,[s.lastStatus?(l(),o("span",{key:1,class:X(s.lastStatus==="ok"?"s-ok":"s-failed")},r(s.lastStatus),3)):(l(),o("span",ge,"never")),s.lastAt?(l(),o("div",_e,[h(se,{at:s.lastAt},null,8,["at"])])):c("",!0)]),t("td",be,[t("div",we,[s.enabled?c("",!0):(l(),o("span",$e,"disabled")),t("button",{class:"ghost sm",onClick:d=>G(s)},r(m.value===s.id?"Hide":"Deliveries"),9,xe),t("button",{class:"ghost sm",onClick:d=>Y(s)},"Test",8,Ce),t("button",{class:"ghost sm",onClick:d=>q(s,!s.enabled)},r(s.enabled?"Disable":"Enable"),9,Te),h(F,{variant:"danger",onClick:d=>L(s)},{default:g(()=>[...e[10]||(e[10]=[n("Remove",-1)])]),_:1},8,["onClick"])])])],4),m.value===s.id?(l(),o("tr",{key:`d${s.id}`},[t("td",Ne,[A.value.length?(l(),o("ul",Ve,[(l(!0),o(f,null,N(A.value,d=>(l(),o("li",{key:d.id},[t("span",Ae,[t("span",{class:X(d.status==="ok"?"s-ok":"s-failed")},r(d.status),3)]),t("span",Ee,[n(r(d.event)+" ",1),t("span",Se,[n(" · "+r(Z(ee)(d.createdAt))+" · "+r(d.attempts)+" attempt(s)",1),d.responseCode?(l(),o(f,{key:0},[n(" · HTTP "+r(d.responseCode),1)],64)):c("",!0)]),d.error?(l(),o("div",De,r(d.error),1)):c("",!0)])]))),128))])):(l(),o("p",Re,"Nothing delivered yet."))])])):c("",!0)],64))),128))])])):(l(),o("p",ze," Nothing registered. Events still happen — nobody is being told about them. ")):(l(),E(te,{key:0,rows:2}))]),t("section",Be,[e[20]||(e[20]=t("h2",{class:"section",style:{"margin-bottom":"var(--s3)"}},"Add a notifier",-1)),k.value&&k.value.types.length>1?(l(),o("div",He,[e[13]||(e[13]=t("label",{for:"ty"},"Type",-1)),h(ae,{modelValue:i.value.type,"onUpdate:modelValue":e[1]||(e[1]=s=>i.value.type=s),id:"ty",label:"Notifier type",options:M.value},null,8,["modelValue","options"])])):c("",!0),t("div",Pe,[e[14]||(e[14]=t("label",{for:"nn"},"Name",-1)),j(t("input",{id:"nn","onUpdate:modelValue":e[2]||(e[2]=s=>i.value.name=s),type:"text",placeholder:"ops-slack-bridge",spellcheck:"false"},null,512),[[U,i.value.name,void 0,{trim:!0}]])]),(l(!0),o(f,null,N(((u=B.value)==null?void 0:u.fields)??[],s=>(l(),o("div",{key:s.key,class:"field",style:{"max-width":"380px"}},[t("label",{for:`cfg-${s.key}`},r(s.label),9,je),j(t("input",{id:`cfg-${s.key}`,"onUpdate:modelValue":C=>i.value.config[s.key]=C,type:"text",placeholder:s.placeholder,spellcheck:"false"},null,8,Ue),[[U,i.value.config[s.key],void 0,{trim:!0}]])]))),128)),t("h2",Xe,[e[16]||(e[16]=n(" Events ",-1)),h(T,{label:"which events to pick"},{default:g(()=>[...e[15]||(e[15]=[t("b",null,"All events",-1),n(" also covers events added in later versions — a specific list does not, and the failure mode of that is silence nobody can explain. ",-1),t("code",null,"job.leaked",-1),n(" is the one worth alerting on: a teardown ran and something survived it. ",-1)])]),_:1})]),t("div",Fe,[t("label",Ie,[t("input",{type:"checkbox",checked:i.value.events.includes("*"),onChange:e[3]||(e[3]=s=>H("*"))},null,40,Me),e[17]||(e[17]=n(" All events ",-1))])]),i.value.events.includes("*")?c("",!0):(l(),o("div",Oe,[(l(!0),o(f,null,N(((P=k.value)==null?void 0:P.events)??[],s=>(l(),o("label",{key:s,class:"check"},[t("input",{type:"checkbox",checked:i.value.events.includes(s),onChange:C=>H(s)},null,40,We),n(" "+r(s),1)]))),128))])),x.value?(l(),E(I,{key:2,text:x.value,title:"Could not register this notifier."},null,8,["text"])):c("",!0),t("div",qe,[h(F,{variant:"primary",pending:w.value,disabled:!O.value,onClick:W},{default:g(()=>[n(r(w.value?"Registering…":"Register"),1)]),_:1},8,["pending","disabled"])]),t("p",Le,[e[19]||(e[19]=n(" Deliveries from a signing type are signed with a secret shown once at registration, retried twice on failure, and logged here. ",-1)),h(T,{label:"how a receiver verifies a delivery"},{default:g(()=>[...e[18]||(e[18]=[n(" Recompute ",-1),t("code",null,"HMAC-SHA256(secret, `${timestamp}.${rawBody}`)",-1),n(" and compare against ",-1),t("code",null,"X-Pstack-Signature",-1),n(", using the ",-1),t("em",null,"raw",-1),n(" body — re-serialising it changes the bytes. Reject anything whose ",-1),t("code",null,"X-Pstack-Timestamp",-1),n(" is more than five minutes old, and dedupe on ",-1),t("code",null,"X-Pstack-Delivery",-1),n(": delivery is at-least-once, and that id is stable across retries. ",-1)])]),_:1})])])],64))])}}});export{at as default};
|
|
2
|
+
//# sourceMappingURL=NotifiersView-DN9UiqDs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotifiersView-DN9UiqDs.js","sources":["../../src/views/NotifiersView.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Notifiers — where events on this host get sent.\n *\n * THE FORM IS SERVER-DRIVEN. The event list and the per-type fields come from `/api/notifiers/meta`,\n * so adding a Slack or Discord type on the server puts it in this picker with its own form and no\n * change here. That is the composability seam reaching the UI; hard-coding the fields would have\n * quietly made the seam a lie.\n *\n * THE SIGNING SECRET IS SHOWN ONCE. Same discipline as a personal token and a registry credential:\n * there is no read path on the server, so this page cannot offer a reveal — it can only show the\n * value at the moment of creation and say plainly that this is the only time.\n */\nimport { computed, ref, watch } from 'vue';\nimport { api, problem } from '../api/client';\nimport type { DeliveryRow, NotifierMeta, NotifierRow } from '../api/types';\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 RelativeTime from '../components/RelativeTime.vue';\nimport SelectMenu from '../components/SelectMenu.vue';\n\nconst notifiers = ref<NotifierRow[]>([]);\nconst meta = ref<NotifierMeta | null>(null);\nconst loaded = ref(false);\nconst listError = ref('');\nconst unsupported = ref(false);\n\n/** The freshly-minted secret, held only until the operator dismisses it. */\nconst revealed = ref<{ name: string; secret: string } | null>(null);\n\nconst form = ref({ name: '', type: 'webhook', events: [] as string[], config: {} as Record<string, string> });\nconst saving = ref(false);\nconst formError = ref('');\n\nconst openDeliveries = ref<number | null>(null);\nconst deliveries = ref<DeliveryRow[]>([]);\n\n/** Server-driven, so a new notifier type appears here with no change to this file. */\nconst typeOptions = computed(() => (meta.value?.types ?? []).map((x) => ({ value: x.kind, label: x.label })));\n\nconst chosenType = computed(() => meta.value?.types.find((t) => t.kind === form.value.type) ?? null);\n\n/**\n * `config` is one bag shared by every type, so switching the picker leaves the previous type's\n * fields behind — fill a webhook URL, switch to Slack, and the POST carries a stray `url` alongside\n * `webhookUrl`. Nothing downstream rejects it: `config` is stored whole and each type validates only\n * its OWN fields, so the dead value is persisted forever and shows up in the detail view. Clearing on\n * change costs one line; unknown-key rejection on the server would cost a migration path for every\n * future type.\n */\nwatch(\n () => form.value.type,\n () => {\n form.value.config = {};\n },\n);\nconst canSave = computed(\n () =>\n !saving.value &&\n !!form.value.name.trim() &&\n form.value.events.length > 0 &&\n (chosenType.value?.fields ?? []).every((f) => !f.required || !!form.value.config[f.key]?.trim()),\n);\n\nasync function load(): Promise<void> {\n const [list, m] = await Promise.all([\n api.get<{ notifiers: NotifierRow[] }>('/api/notifiers'),\n api.get<NotifierMeta>('/api/notifiers/meta'),\n ]);\n loaded.value = true;\n // A server built before this feature answers 404 — a capability difference, not an error.\n if (list.status === 404 || m.status === 404) {\n unsupported.value = true;\n return;\n }\n if (!list.ok) {\n listError.value = problem(list, 'load the notifiers');\n return;\n }\n listError.value = '';\n notifiers.value = list.body.notifiers ?? [];\n if (m.ok) meta.value = m.body;\n}\n\nvoid load();\n\nfunction toggleEvent(name: string): void {\n const at = form.value.events.indexOf(name);\n if (at === -1) form.value.events.push(name);\n else form.value.events.splice(at, 1);\n}\n\nasync function create(): Promise<void> {\n saving.value = true;\n formError.value = '';\n const r = await api.post<{ notifier: NotifierRow; secret: string | null }>('/api/notifiers', {\n name: form.value.name.trim(),\n type: form.value.type,\n events: form.value.events,\n config: form.value.config,\n });\n saving.value = false;\n if (!r.ok) {\n formError.value = problem(r, 'register this notifier');\n return;\n }\n // `null` for a type whose config already carries its credential — a Slack notifier must not be\n // handed 48 hex characters and told its receiver needs them.\n revealed.value = r.body.secret ? { name: r.body.notifier.name, secret: r.body.secret } : null;\n form.value = { name: '', type: form.value.type, events: [], config: {} };\n void load();\n}\n\nasync function setEnabled(n: NotifierRow, enabled: boolean): Promise<void> {\n const r = await api.patch<{ notifier: NotifierRow }>(`/api/notifiers/${n.id}`, { enabled });\n if (!r.ok) listError.value = problem(r, 'update this notifier');\n void load();\n}\n\nasync function remove(n: NotifierRow): Promise<void> {\n const r = await api.del(`/api/notifiers/${n.id}`);\n if (!r.ok) {\n listError.value = problem(r, 'delete this notifier');\n return;\n }\n if (openDeliveries.value === n.id) openDeliveries.value = null;\n toast('ok', `Removed ${n.name}.`);\n void load();\n}\n\nasync function test(n: NotifierRow): Promise<void> {\n const r = await api.post<{ result: { ok: boolean; status?: number; error?: string } }>(\n `/api/notifiers/${n.id}/test`,\n {},\n );\n if (!r.ok) {\n listError.value = problem(r, 'send a test delivery');\n return;\n }\n const res = r.body.result;\n // The endpoint's own answer, verbatim — \"it failed\" without the reason is the thing this page\n // exists to avoid.\n if (res.ok) toast('ok', `${n.name} accepted the test delivery.`);\n else toast('error', `${n.name}: ${res.error ?? `HTTP ${res.status}`}`);\n void load();\n}\n\nasync function showDeliveries(n: NotifierRow): Promise<void> {\n if (openDeliveries.value === n.id) {\n openDeliveries.value = null;\n return;\n }\n const r = await api.get<{ deliveries: DeliveryRow[] }>(`/api/notifiers/${n.id}/deliveries`);\n if (!r.ok) {\n listError.value = problem(r, 'load the delivery log');\n return;\n }\n deliveries.value = r.body.deliveries ?? [];\n openDeliveries.value = n.id;\n}\n</script>\n\n<template>\n <div>\n <div class=\"page-head\">\n <div>\n <h1>Notifiers</h1>\n <div class=\"sub\">\n Where events on this host get sent\n <InfoHint label=\"what a notifier is\">\n A registration that receives events — a teardown that leaked, a deployment created, a job\n that failed. Webhooks today; the server decides what other kinds exist, and this page\n renders whatever it offers.\n </InfoHint>\n </div>\n </div>\n </div>\n\n <ErrorNote v-if=\"listError\" :text=\"listError\" title=\"Could not load the notifiers.\" />\n\n <section v-if=\"unsupported\" class=\"panel\">\n <div class=\"banner plain\">\n <b>This server has no notifiers.</b>\n <p>It is an older build of pstack. Upgrade the host to register webhooks.</p>\n </div>\n </section>\n\n <template v-else>\n <!--\n Shown once, and the page says so. There is no read path on the server, so this is not a\n design choice that could be softened later — the value genuinely does not exist anywhere\n retrievable after this moment.\n -->\n <!-- Only a signing type ever produces one; see `signs` in notify.ts. -->\n <div v-if=\"revealed\" class=\"banner ok\">\n <b>Signing secret for “{{ revealed.name }}” — copy it now.</b>\n <p>\n This is the only time it is shown — the server keeps no way to show it again. Your\n receiver uses it to check that a delivery really came from here.\n <InfoHint label=\"how a receiver checks it\">\n Each delivery carries a signature header computed from this secret and the exact body\n sent. Recompute it on your side and compare; a mismatch means the delivery was not sent\n by this host, or was altered on the way.\n </InfoHint>\n </p>\n <pre class=\"code\">{{ revealed.secret }}</pre>\n <div class=\"row\">\n <button class=\"btn\" @click=\"revealed = null\">I have stored it</button>\n </div>\n </div>\n\n <section class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"section\">Registered</h2>\n </div>\n\n <SkeletonList v-if=\"!loaded\" :rows=\"2\" />\n <table v-else-if=\"notifiers.length\" class=\"cards\">\n <thead>\n <tr>\n <th>name</th>\n <th>events</th>\n <th>last delivery</th>\n <th></th>\n </tr>\n </thead>\n <tbody class=\"stagger\">\n <template v-for=\"(n, i) in notifiers\" :key=\"n.id\">\n <tr :style=\"{ '--i': i }\">\n <td class=\"name\" data-label=\"name\">\n {{ n.name }}\n <div class=\"mute\" style=\"font-size: var(--t-sm)\">\n {{ n.type }} · {{ String(n.config.url ?? '') }}\n </div>\n </td>\n <td data-label=\"events\">\n <span v-if=\"n.events.includes('*')\" class=\"badge\">all events</span>\n <span v-else>{{ n.events.join(', ') }}</span>\n </td>\n <td data-label=\"last delivery\">\n <span v-if=\"!n.lastStatus\" class=\"mute\">never</span>\n <span v-else :class=\"n.lastStatus === 'ok' ? 's-ok' : 's-failed'\">\n {{ n.lastStatus }}\n </span>\n <div v-if=\"n.lastAt\" class=\"mute\" style=\"font-size: var(--t-sm)\">\n <RelativeTime :at=\"n.lastAt\" />\n </div>\n </td>\n <td data-label=\"\">\n <div class=\"row\" style=\"justify-content: flex-end\">\n <span v-if=\"!n.enabled\" class=\"badge off\">disabled</span>\n <button class=\"ghost sm\" @click=\"showDeliveries(n)\">\n {{ openDeliveries === n.id ? 'Hide' : 'Deliveries' }}\n </button>\n <button class=\"ghost sm\" @click=\"test(n)\">Test</button>\n <button class=\"ghost sm\" @click=\"setEnabled(n, !n.enabled)\">\n {{ n.enabled ? 'Disable' : 'Enable' }}\n </button>\n <ActionButton variant=\"danger\" @click=\"remove(n)\">Remove</ActionButton>\n </div>\n </td>\n </tr>\n <tr v-if=\"openDeliveries === n.id\" :key=\"`d${n.id}`\">\n <td colspan=\"4\">\n <ul v-if=\"deliveries.length\" class=\"kvlist\">\n <li v-for=\"d in deliveries\" :key=\"d.id\">\n <span class=\"k\">\n <span :class=\"d.status === 'ok' ? 's-ok' : 's-failed'\">{{ d.status }}</span>\n </span>\n <span class=\"v\">\n {{ d.event }}\n <span class=\"mute\" style=\"font-size: var(--t-sm)\">\n · {{ stamp(d.createdAt) }} · {{ d.attempts }} attempt(s)<template\n v-if=\"d.responseCode\"\n >\n · HTTP {{ d.responseCode }}</template\n >\n </span>\n <div v-if=\"d.error\" class=\"s-failed\" style=\"font-size: var(--t-sm)\">\n {{ d.error }}\n </div>\n </span>\n </li>\n </ul>\n <p v-else class=\"mute\">Nothing delivered yet.</p>\n </td>\n </tr>\n </template>\n </tbody>\n </table>\n <p v-else class=\"mute\">\n Nothing registered. Events still happen — nobody is being told about them.\n </p>\n </section>\n\n <section class=\"panel\">\n <h2 class=\"section\" style=\"margin-bottom: var(--s3)\">Add a notifier</h2>\n\n <div v-if=\"meta && meta.types.length > 1\" class=\"field\" style=\"max-width: 320px\">\n <label for=\"ty\">Type</label>\n <SelectMenu v-model=\"form.type\" id=\"ty\" label=\"Notifier type\" :options=\"typeOptions\" />\n </div>\n\n <div class=\"field\" style=\"max-width: 380px\">\n <label for=\"nn\">Name</label>\n <input id=\"nn\" v-model.trim=\"form.name\" type=\"text\" placeholder=\"ops-slack-bridge\" spellcheck=\"false\" />\n </div>\n\n <!-- Rendered from the server's field list — see the header. -->\n <div v-for=\"f in chosenType?.fields ?? []\" :key=\"f.key\" class=\"field\" style=\"max-width: 380px\">\n <label :for=\"`cfg-${f.key}`\">{{ f.label }}</label>\n <input\n :id=\"`cfg-${f.key}`\"\n v-model.trim=\"form.config[f.key]\"\n type=\"text\"\n :placeholder=\"f.placeholder\"\n spellcheck=\"false\"\n />\n </div>\n\n <h2 class=\"section\" style=\"margin: var(--s5) 0 var(--s3)\">\n Events\n <InfoHint label=\"which events to pick\">\n <b>All events</b> also covers events added in later versions — a specific list does not,\n and the failure mode of that is silence nobody can explain. <code>job.leaked</code> is the\n one worth alerting on: a teardown ran and something survived it.\n </InfoHint>\n </h2>\n <div class=\"row\">\n <label class=\"check\">\n <input\n type=\"checkbox\"\n :checked=\"form.events.includes('*')\"\n @change=\"toggleEvent('*')\"\n />\n All events\n </label>\n </div>\n <!-- A grid, not a wrapping row: eleven items of differing width wrapped into ragged lines\n with one stranded on its own, which reads as a layout accident. -->\n <div v-if=\"!form.events.includes('*')\" class=\"check-grid\">\n <label v-for=\"e in meta?.events ?? []\" :key=\"e\" class=\"check\">\n <input type=\"checkbox\" :checked=\"form.events.includes(e)\" @change=\"toggleEvent(e)\" />\n {{ e }}\n </label>\n </div>\n\n <ErrorNote v-if=\"formError\" :text=\"formError\" title=\"Could not register this notifier.\" />\n\n <div class=\"row\" style=\"margin-top: var(--s4)\">\n <ActionButton variant=\"primary\" :pending=\"saving\" :disabled=\"!canSave\" @click=\"create\">\n {{ saving ? 'Registering…' : 'Register' }}\n </ActionButton>\n </div>\n\n <p class=\"hint\">\n Deliveries from a signing type are signed with a secret shown once at registration, retried twice on failure,\n and logged here.\n <InfoHint label=\"how a receiver verifies a delivery\">\n Recompute <code>HMAC-SHA256(secret, `${timestamp}.${rawBody}`)</code> and compare against\n <code>X-Pstack-Signature</code>, using the <em>raw</em> body — re-serialising it changes\n the bytes. Reject anything whose <code>X-Pstack-Timestamp</code> is more than five minutes\n old, and dedupe on <code>X-Pstack-Delivery</code>: delivery is at-least-once, and that id\n is stable across retries.\n </InfoHint>\n </p>\n </section>\n </template>\n </div>\n</template>\n"],"names":["notifiers","ref","meta","loaded","listError","unsupported","revealed","form","saving","formError","openDeliveries","deliveries","typeOptions","computed","_a","x","chosenType","t","watch","canSave","f","load","list","m","api","problem","toggleEvent","name","at","create","r","setEnabled","n","enabled","remove","toast","test","res","showDeliveries","_createElementBlock","_createElementVNode","_hoisted_1","_cache","_hoisted_2","_createVNode","InfoHint","_createBlock","ErrorNote","_openBlock","_hoisted_3","_Fragment","_hoisted_4","_toDisplayString","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_renderList","i","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_normalizeClass","_hoisted_16","_hoisted_17","RelativeTime","_hoisted_18","_hoisted_19","_hoisted_20","$event","_hoisted_21","_hoisted_22","_hoisted_23","ActionButton","_hoisted_24","_hoisted_25","_hoisted_26","_hoisted_27","_hoisted_28","_createTextVNode","_unref","stamp","_hoisted_29","_hoisted_30","_hoisted_31","SkeletonList","_hoisted_32","_hoisted_33","SelectMenu","_hoisted_34","_hoisted_35","_hoisted_37","_hoisted_38","_hoisted_39","_hoisted_41","_b","e","_hoisted_43","_hoisted_44"],"mappings":"y8DAyBA,MAAMA,EAAYC,EAAmB,EAAE,EACjCC,EAAOD,EAAyB,IAAI,EACpCE,EAASF,EAAI,EAAK,EAClBG,EAAYH,EAAI,EAAE,EAClBI,EAAcJ,EAAI,EAAK,EAGvBK,EAAWL,EAA6C,IAAI,EAE5DM,EAAON,EAAI,CAAE,KAAM,GAAI,KAAM,UAAW,OAAQ,CAAA,EAAgB,OAAQ,CAAA,EAA8B,EACtGO,EAASP,EAAI,EAAK,EAClBQ,EAAYR,EAAI,EAAE,EAElBS,EAAiBT,EAAmB,IAAI,EACxCU,EAAaV,EAAmB,EAAE,EAGlCW,EAAcC,EAAS,IAAA,OAAO,SAAAC,EAAAZ,EAAK,QAAL,YAAAY,EAAY,QAAS,CAAA,GAAI,IAAKC,IAAO,CAAE,MAAOA,EAAE,KAAM,MAAOA,EAAE,KAAA,EAAQ,EAAC,EAEtGC,EAAaH,EAAS,IAAA,OAAM,QAAAC,EAAAZ,EAAK,QAAL,YAAAY,EAAY,MAAM,KAAMG,GAAMA,EAAE,OAASV,EAAK,MAAM,QAAS,KAAI,EAUnGW,EACE,IAAMX,EAAK,MAAM,KACjB,IAAM,CACJA,EAAK,MAAM,OAAS,CAAA,CACtB,CAAA,EAEF,MAAMY,EAAUN,EACd,IAAA,OACE,OAACL,EAAO,OACR,CAAC,CAACD,EAAK,MAAM,KAAK,KAAA,GAClBA,EAAK,MAAM,OAAO,OAAS,MAC1BO,EAAAE,EAAW,QAAX,YAAAF,EAAkB,SAAU,CAAA,GAAI,MAAOM,GAAA,OAAM,OAACA,EAAE,UAAY,CAAC,GAACN,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A,GACpD5D,EAAqF,QAAA,CAA9E,KAAK,WAAY,QAASjC,EAAA,MAAK,OAAO,SAAS6F,CAAC,EAAI,SAAM3B,GAAE/C,EAAY0E,CAAC,CAAA,cAAKjB,EAAA,MAClFiB,CAAC,EAAA,CAAA,CAAA,cAIS3F,EAAA,WAAjBqC,EAA0FC,EAAA,OAA7D,KAAMtC,EAAA,MAAW,MAAM,mCAAA,6BAEpD+B,EAIM,MAJN6D,GAIM,CAHJzD,EAEeiC,EAAA,CAFD,QAAQ,UAAW,QAASrE,EAAA,MAAS,UAAWW,EAAA,MAAU,QAAOU,CAAA,aAC7E,IAA0C,KAAvCrB,EAAA,MAAM,eAAA,UAAA,EAAA,CAAA,CAAA,oCAIbgC,EAUI,IAVJ8D,GAUI,iBAVY,mIAGd,EAAA,GAAA1D,EAMWC,EAAA,CAND,MAAM,sCAAoC,WAAC,IACzC,CAAA,GAAAH,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAA,GADyC,cACzC,EAAA,EAAAF,EAA2D,YAArD,iDAA8C,EAAA,IAAO,wBACrE,EAAA,EAAAA,EAA+B,YAAzB,qBAAkB,EAAA,IAAO,eAAY,EAAA,EAAAA,EAAY,UAAR,MAAG,EAAA,IAAK,sEACtB,EAAA,EAAAA,EAA+B,YAAzB,qBAAkB,EAAA,IAAO,iDAC7C,EAAA,EAAAA,EAA8B,YAAxB,oBAAiB,EAAA,IAAO,sEAEnD,EAAA,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as o,r as
|
|
2
|
-
//# sourceMappingURL=OverviewTab-
|
|
1
|
+
import{d as o,r as _,i as x}from"./useDeployment-DplTFu7s.js";import{s as h}from"./useFormat-CKJxQp_i.js";import{_ as C}from"./SkeletonList.vue_vue_type_script_setup_true_lang-CIiWzcE5.js";import{d as T,c as a,a as e,u as t,x as m,w as p,g as r,f as l,e as b,_ as g,t as i,E as A,F as u,s as k,C as N,j as R,o as n}from"./index-D8OAewba.js";import"./useVars-VN9gYdR6.js";const $={class:"panel"},B={class:"phead"},z={key:1,class:"mute"},L={key:1,class:"mute"},S={key:2,class:"kvlist"},U={class:"k"},V={class:"v mono"},E={class:"v"},I={class:"mute",style:{"margin-left":"8px","font-size":"var(--t-sm)"}},j={key:0},q={class:"v"},D={class:"v mono"},F={key:1},H={class:"v"},P={key:0,class:"mute"},K={key:2},O={class:"k"},G={class:"v"},J={class:"mono"},M={class:"mute",style:{"font-size":"var(--t-sm)"}},Q={key:3},W={class:"v"},X={key:0,class:"mute"},Y={class:"v"},Z={class:"v"},ss={class:"v"},es={class:"v"},rs=T({__name:"OverviewTab",setup(ts){const w=N(()=>x.value?"a host singleton previews borrow — no axes, and down is guarded":"one tenant, created and destroyed constantly, expected to leave nothing behind");return(os,s)=>{var y,v,f;const c=R("RouterLink");return n(),a("section",$,[e("div",B,[s[2]||(s[2]=e("h2",{class:"section"},"Resolved spec",-1)),s[3]||(s[3]=e("span",{class:"grow"},null,-1)),t(o).detail?(n(),m(c,{key:0,to:`/submit?from=${encodeURIComponent(t(o).id)}`},{default:p(()=>[...s[0]||(s[0]=[l(" Duplicate ",-1)])]),_:1},8,["to"])):r("",!0),t(o).detail?(n(),a("span",z,"·")):r("",!0),t(o).detail?(n(),m(c,{key:2,to:`/submit/${encodeURIComponent(t(o).id)}`},{default:p(()=>[...s[1]||(s[1]=[l(" Edit spec & compose → ",-1)])]),_:1},8,["to"])):r("",!0)]),!t(o).detail&&!t(o).error?(n(),m(C,{key:0,rows:5})):t(o).detail?(n(),a("ul",S,[e("li",null,[e("span",U,[s[5]||(s[5]=l(" stack ",-1)),b(g,{label:"the difference between id and stack"},{default:p(()=>[...s[4]||(s[4]=[l(" The ",-1),e("b",null,"id",-1),l(" is what you named this deployment. The ",-1),e("b",null,"stack",-1),l(" is what its spec resolved to once the variables were filled in — the compose project name, the hostname label, and ",-1),e("code",null,"$STACK",-1),l(" inside every hook. ",-1)])]),_:1})]),e("span",V,i(t(o).detail.stack||"—"),1)]),e("li",null,[s[6]||(s[6]=e("span",{class:"k"},"kind",-1)),e("span",E,[e("span",{class:A(["badge",t(o).detail.kind])},i(t(o).detail.kind),3),e("span",I,i(w.value),1)])]),(y=t(_))!=null&&y.specName?(n(),a("li",j,[s[8]||(s[8]=e("span",{class:"k"},"spec",-1)),e("span",q,[e("b",null,i(t(_).specName),1),s[7]||(s[7]=e("span",{class:"mute",style:{"font-size":"var(--t-sm)"}}," — stored, and shared with any other deployment using it ",-1))])])):r("",!0),e("li",null,[s[9]||(s[9]=e("span",{class:"k"},"compose file",-1)),e("span",D,i(t(o).detail.compose?t(o).detail.compose.file:"— (no compose section)"),1)]),t(o).detail.compose?(n(),a("li",F,[s[10]||(s[10]=e("span",{class:"k"},"profiles",-1)),e("span",H,[(n(!0),a(u,null,k(t(o).detail.compose.profiles,d=>(n(),a("span",{key:d,class:"badge",style:{"margin-right":"4px"}},i(d),1))),128)),t(o).detail.compose.profiles.length?r("",!0):(n(),a("span",P," none — a bare up starts every service "))])])):r("",!0),(f=(v=t(o).detail.compose)==null?void 0:v.subdomains)!=null&&f.length?(n(),a("li",K,[e("span",O,[s[15]||(s[15]=l(" subdomains ",-1)),b(g,{label:"how wildcard subdomains work"},{default:p(()=>[s[14]||(s[14]=l(" Anything one label under these hosts reaches the same service the bare host does. An exact hostname you route yourself always wins over the wildcard. ",-1)),t(o).detail.compose.subdomains.some(d=>d.depth==="any")?(n(),a(u,{key:0},[s[11]||(s[11]=l(" A route marked ",-1)),s[12]||(s[12]=e("b",null,"any depth",-1)),s[13]||(s[13]=l(" works over HTTP only — no TLS certificate can cover more than one label. ",-1))],64)):r("",!0)]),_:1})]),e("span",G,[(n(!0),a(u,null,k(t(o).detail.compose.subdomains,d=>(n(),a("div",{key:d.profile},[e("span",J,"*."+i(d.host),1),e("span",M,[l(" → "+i(d.profile),1),d.depth==="any"?(n(),a(u,{key:0},[l(" · any depth, HTTP only")],64)):r("",!0)])]))),128))])])):r("",!0),t(o).detail.compose?(n(),a("li",Q,[s[16]||(s[16]=e("span",{class:"k"},"overlays",-1)),e("span",W,[(n(!0),a(u,null,k(t(o).detail.compose.overlays,d=>(n(),a("span",{key:d,class:"mono",style:{"margin-right":"8px"}},i(d),1))),128)),t(o).detail.compose.overlays.length?r("",!0):(n(),a("span",X,"none"))])])):r("",!0),e("li",null,[s[18]||(s[18]=e("span",{class:"k"},"axes",-1)),e("span",Y,[l(i(t(o).detail.axes.length)+" ",1),t(o).detail.axes.length?(n(),m(c,{key:0,to:`/deployments/${encodeURIComponent(t(o).id)}/axes`},{default:p(()=>[...s[17]||(s[17]=[l(" view → ",-1)])]),_:1},8,["to"])):r("",!0)])]),e("li",null,[s[19]||(s[19]=e("span",{class:"k"},"requires",-1)),e("span",Z,i(t(o).detail.requires.length),1)]),e("li",null,[s[20]||(s[20]=e("span",{class:"k"},"created",-1)),e("span",ss,i(t(h)(t(o).detail.createdAt)),1)]),e("li",null,[s[21]||(s[21]=e("span",{class:"k"},"updated",-1)),e("span",es,i(t(h)(t(o).detail.updatedAt)),1)])])):(n(),a("p",L,"Unavailable until the spec resolves."))])}}});export{rs as default};
|
|
2
|
+
//# sourceMappingURL=OverviewTab-DzZG0moV.js.map
|