4cab047432
- control-plane default listen addr is now :3452 (was :8080). An unusual port to avoid collisions on the VM. - agent-micro and agent-gateway default SDP_CP_URL points at ws://localhost:3452/ws/agent. docker-compose.yml updates the control plane command, host port mapping, and agent -cp URLs. - nginx/nginx.conf (the legacy root-mount reference) uses 127.0.0.1:3452 for the upstream. nginx/sandbox.conf is the new deployment config: four location blocks for the /sandbox/credit-card mount — _next/static serves cached chunks, /api/ and /ws/ proxy to 127.0.0.1:3452, /sandbox/credit-card serves the static dashboard with try_files for SPA routing. - scripts/patch-nginx.sh: deleted. The user configures nginx on 186 by hand. scripts/deploy.sh no longer calls it. - AGENTS.md: new file. Documents the build/lint/test commands (with the golang:1.24-alpine container — local Go can't fetch the toolchain), the wire protocol, the Slice-2 conventions (sdp-<repo> container naming, snapshot persistence, PreGitReset/AfterStart hooks), the repo-path gotcha, and the build-artifacts-in-git rationale. - dashboard/out: now tracked in git, alongside bin/. The dashboard static export is scp'd to 186 on deploy; the VMs have no internet so they can't regenerate it. .gitignore comment explains this and warns against re-ignoring. - README.md / REQUIREMENTS.md: status updated to 'Slice 2 done', per-feature checklist marked. Erangel repo path corrected to /var/www/html/erangel-ocean (was wrongly ~/SDP in earlier docs).
1 line
9.1 KiB
JavaScript
1 line
9.1 KiB
JavaScript
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{8619:function(e,t,r){Promise.resolve().then(r.bind(r,5733))},7907:function(e,t,r){"use strict";var n=r(5313);r.o(n,"useParams")&&r.d(t,{useParams:function(){return n.useParams}}),r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}})},5733:function(e,t,r){"use strict";r.r(t),r.d(t,{LoginForm:function(){return c}});var n=r(3827),o=r(4090),i=r(7907),a=r(575),l=r(2782),s=r(2647),u=r(5671);function c(){let[e,t]=(0,o.useState)(""),[r,c]=(0,o.useState)(""),[d,f]=(0,o.useState)(null),[p,m]=(0,o.useState)(!1),v=(0,i.useRouter)();async function h(t){t.preventDefault(),m(!0),f(null);try{var n;let t=((n="/sandbox/credit-card",void 0!==n)?n:"").replace(/\/$/,"");if(!(await fetch("".concat(t,"/api/login"),{method:"POST",headers:{"content-type":"application/json"},credentials:"include",body:JSON.stringify({username:e,password:r})})).ok){f("Login failed — check your Bitbucket credentials.");return}v.push("/dashboard")}catch(e){f("Network error")}finally{m(!1)}}return(0,n.jsxs)(u.Zb,{className:"w-full max-w-sm",children:[(0,n.jsxs)(u.Ol,{children:[(0,n.jsx)(u.ll,{children:"Sign in"}),(0,n.jsx)(u.SZ,{children:"Use your Bitbucket account."})]}),(0,n.jsx)(u.aY,{children:(0,n.jsxs)("form",{onSubmit:h,className:"space-y-4",children:[(0,n.jsxs)("div",{className:"space-y-1.5",children:[(0,n.jsx)(s._,{htmlFor:"u",children:"Username"}),(0,n.jsx)(l.I,{id:"u",value:e,onChange:e=>t(e.target.value),required:!0,autoComplete:"username"})]}),(0,n.jsxs)("div",{className:"space-y-1.5",children:[(0,n.jsx)(s._,{htmlFor:"p",children:"Password"}),(0,n.jsx)(l.I,{id:"p",type:"password",value:r,onChange:e=>c(e.target.value),required:!0,autoComplete:"current-password"})]}),d&&(0,n.jsx)("p",{className:"text-sm text-destructive",children:d}),(0,n.jsx)(a.z,{type:"submit",disabled:p,className:"w-full",children:p?"Signing in…":"Sign in"})]})})]})}},575:function(e,t,r){"use strict";r.d(t,{z:function(){return u}});var n=r(3827),o=r(4090),i=r(9143),a=r(9769),l=r(2169);let s=(0,a.j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),u=o.forwardRef((e,t)=>{let{className:r,variant:o,size:a,asChild:u=!1,...c}=e,d=u?i.g7:"button";return(0,n.jsx)(d,{className:(0,l.cn)(s({variant:o,size:a,className:r})),ref:t,...c})});u.displayName="Button"},5671:function(e,t,r){"use strict";r.d(t,{Ol:function(){return l},SZ:function(){return u},Zb:function(){return a},aY:function(){return c},ll:function(){return s}});var n=r(3827),o=r(4090),i=r(2169);let a=o.forwardRef((e,t)=>{let{className:r,...o}=e;return(0,n.jsx)("div",{ref:t,className:(0,i.cn)("rounded-xl border bg-card text-card-foreground shadow",r),...o})});a.displayName="Card";let l=o.forwardRef((e,t)=>{let{className:r,...o}=e;return(0,n.jsx)("div",{ref:t,className:(0,i.cn)("flex flex-col space-y-1.5 p-6",r),...o})});l.displayName="CardHeader";let s=o.forwardRef((e,t)=>{let{className:r,...o}=e;return(0,n.jsx)("div",{ref:t,className:(0,i.cn)("font-semibold leading-none tracking-tight",r),...o})});s.displayName="CardTitle";let u=o.forwardRef((e,t)=>{let{className:r,...o}=e;return(0,n.jsx)("div",{ref:t,className:(0,i.cn)("text-sm text-muted-foreground",r),...o})});u.displayName="CardDescription";let c=o.forwardRef((e,t)=>{let{className:r,...o}=e;return(0,n.jsx)("div",{ref:t,className:(0,i.cn)("p-6 pt-0",r),...o})});c.displayName="CardContent",o.forwardRef((e,t)=>{let{className:r,...o}=e;return(0,n.jsx)("div",{ref:t,className:(0,i.cn)("flex items-center p-6 pt-0",r),...o})}).displayName="CardFooter"},2782:function(e,t,r){"use strict";r.d(t,{I:function(){return a}});var n=r(3827),o=r(4090),i=r(2169);let a=o.forwardRef((e,t)=>{let{className:r,type:o,...a}=e;return(0,n.jsx)("input",{type:o,className:(0,i.cn)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",r),ref:t,...a})});a.displayName="Input"},2647:function(e,t,r){"use strict";r.d(t,{_:function(){return l}});var n=r(3827),o=r(4090),i=r(4602),a=r(2169);let l=o.forwardRef((e,t)=>{let{className:r,...o}=e;return(0,n.jsx)(i.f,{ref:t,className:(0,a.cn)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",r),...o})});l.displayName=i.f.displayName},2169:function(e,t,r){"use strict";r.d(t,{cn:function(){return i}});var n=r(3167),o=r(1367);function i(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,o.m6)((0,n.W)(t))}},1266:function(e,t,r){"use strict";r.d(t,{e:function(){return i}});var n=r(4090);function o(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function i(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.useCallback(function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return e=>{let r=!1,n=t.map(t=>{let n=o(t,e);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let e=0;e<n.length;e++){let r=n[e];"function"==typeof r?r():o(t[e],null)}}}}(...t),t)}},4602:function(e,t,r){"use strict";r.d(t,{f:function(){return l}});var n=r(4090),o=r(9586),i=r(3827),a=n.forwardRef((e,t)=>(0,i.jsx)(o.WV.label,{...e,ref:t,onMouseDown:t=>{var r;t.target.closest("button, input, select, textarea")||(null===(r=e.onMouseDown)||void 0===r||r.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));a.displayName="Label";var l=a},9586:function(e,t,r){"use strict";r.d(t,{WV:function(){return l},jH:function(){return s}});var n=r(4090),o=r(9542),i=r(9143),a=r(3827),l=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let r=(0,i.Z8)("Primitive.".concat(t)),o=n.forwardRef((e,n)=>{let{asChild:o,...i}=e,l=o?r:t;return window[Symbol.for("radix-ui")]=!0,(0,a.jsx)(l,{...i,ref:n})});return o.displayName="Primitive.".concat(t),{...e,[t]:o}},{});function s(e,t){e&&o.flushSync(()=>e.dispatchEvent(t))}},9143:function(e,t,r){"use strict";r.d(t,{Z8:function(){return a},g7:function(){return l}});var n,o=r(4090),i=r(1266);function a(e){let t=o.forwardRef((t,r)=>{var n,a,l,c;let v,h;let{children:y,...g}=t,b=null,x=!1,w=[];d(y)&&"function"==typeof m&&(y=m(y._payload)),o.Children.forEach(y,e=>{var t;if(o.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===s){x=!0;let r="child"in e.props?e.props.child:e.props.children;d(r)&&"function"==typeof m&&(r=m(r._payload)),b=u(e,r),w.push(null==b?void 0:null===(t=b.props)||void 0===t?void 0:t.children)}else w.push(e)}),b?b=o.cloneElement(b,void 0,w):!x&&1===o.Children.count(y)&&o.isValidElement(y)&&(b=y);let j=b?(v=null===(l=Object.getOwnPropertyDescriptor((a=b).props,"ref"))||void 0===l?void 0:l.get)&&"isReactWarning"in v&&v.isReactWarning?a.ref:(v=null===(c=Object.getOwnPropertyDescriptor(a,"ref"))||void 0===c?void 0:c.get)&&"isReactWarning"in v&&v.isReactWarning?a.props.ref:a.props.ref||a.ref:void 0,N=(0,i.e)(r,j);if(!b){if(y||0===y)throw Error(x?p(e):f(e));return y}let R=function(e,t){let r={...t};for(let n in t){let o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];let n=i(...t);return o(...t),n}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}(g,null!==(n=b.props)&&void 0!==n?n:{});return b.type!==o.Fragment&&(R.ref=r?N:j),o.cloneElement(b,R)});return t.displayName="".concat(e,".Slot"),t}var l=a("Slot"),s=Symbol.for("radix.slottable"),u=(e,t)=>{if("child"in e.props){let t=e.props.child;return o.isValidElement(t)?o.cloneElement(t,void 0,e.props.children(t.props.children)):null}return o.isValidElement(t)?t:null},c=Symbol.for("react.lazy");function d(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===c&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var f=e=>"".concat(e," failed to slot onto its children. Expected a single React element child or `Slottable`."),p=e=>"".concat(e," failed to slot onto its `Slottable`. Expected `Slottable` to receive a single React element child."),m=(n||(n=r.t(o,2)))[" use ".trim().toString()]}},function(e){e.O(0,[504,971,69,744],function(){return e(e.s=8619)}),_N_E=e.O()}]); |