first test

This commit is contained in:
Tomas Dvorak committed 2026-02-08 14:14:55 +01:00
1 parent 18aa702174
commit d27cf14110
372 files changed
+98087 -2583

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function n(s){if(s.ep)return;s.ep=!0;const l=r(s);fetch(s.href,l)}})();const Rt=!1,Ot=(e,t)=>e===t,nt=Symbol("solid-proxy"),Dt=typeof Proxy=="function",Mt=Symbol("solid-track"),qe={equals:Ot};let $t=Et;const ue=1,Be=2,wt={owned:null,cleanups:null,context:null,owner:null};var m=null;let et=null,Nt=null,C=null,q=null,le=null,He=0;function Fe(e,t){const r=C,n=m,s=e.length===0,l=t===void 0?n:t,o=s?wt:{owned:null,cleanups:null,context:l?l.context:null,owner:l},i=s?e:()=>e(()=>ee(()=>Ee(o)));m=o,C=null;try{return ye(i,!0)}finally{C=r,m=n}}function k(e,t){t=t?Object.assign({},qe,t):qe;const r={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},n=s=>(typeof s=="function"&&(s=s(r.value)),kt(r,s));return[St.bind(r),n]}function P(e,t,r){const n=at(e,t,!1,ue);Ae(n)}function Ut(e,t,r){$t=Ht;const n=at(e,t,!1,ue);n.user=!0,le?le.push(n):Ae(n)}function J(e,t,r){r=r?Object.assign({},qe,r):qe;const n=at(e,t,!0,0);return n.observers=null,n.observerSlots=null,n.comparator=r.equals||void 0,Ae(n),St.bind(n)}function ee(e){if(C===null)return e();const t=C;C=null;try{return e()}finally{C=t}}function Ft(e,t,r){const n=Array.isArray(e);let s;return l=>{let o;if(n){o=Array(e.length);for(let a=0;a<e.length;a++)o[a]=e[a]()}else o=e();const i=ee(()=>t(o,s,l));return s=o,i}}function lt(e){Ut(()=>ee(e))}function ot(e){return m===null||(m.cleanups===null?m.cleanups=[e]:m.cleanups.push(e)),e}function qt(){return m}function Bt(e,t){const r=m,n=C;m=e,C=null;try{return ye(t,!0)}catch(s){ct(s)}finally{m=r,C=n}}function Kt(e){const t=C,r=m;return Promise.resolve().then(()=>{C=t,m=r;let n;return ye(e,!1),C=m=null,n?n.done:void 0})}const[Wr,Yr]=k(!1);function _t(e,t){const r=Symbol("context");return{id:r,Provider:Jt(r),defaultValue:e}}function Vt(e){let t;return m&&m.context&&(t=m.context[e.id])!==void 0?t:e.defaultValue}function Ct(e){const t=J(e),r=J(()=>st(t()));return r.toArray=()=>{const n=r();return Array.isArray(n)?n:n!=null?[n]:[]},r}function St(){if(this.sources&&this.state)if(this.state===ue)Ae(this);else{const e=q;q=null,ye(()=>Ve(this),!1),q=e}if(C){const e=this.observers?this.observers.length:0;C.sources?(C.sources.push(this),C.sourceSlots.push(e)):(C.sources=[this],C.sourceSlots=[e]),this.observers?(this.observers.push(C),this.observerSlots.push(C.sources.length-1)):(this.observers=[C],this.observerSlots=[C.sources.length-1])}return this.value}function kt(e,t,r){let n=e.value;return(!e.comparator||!e.comparator(n,t))&&(e.value=t,e.observers&&e.observers.length&&ye(()=>{for(let s=0;s<e.observers.length;s+=1){const l=e.observers[s],o=et&&et.running;o&&et.disposed.has(l),(o?!l.tState:!l.state)&&(l.pure?q.push(l):le.push(l),l.observers&&At(l)),o||(l.state=ue)}if(q.length>1e6)throw q=[],new Error},!1)),t}function Ae(e){if(!e.fn)return;Ee(e);const t=He;zt(e,e.value,t)}function zt(e,t,r){let n;const s=m,l=C;C=m=e;try{n=e.fn(t)}catch(o){return e.pure&&(e.state=ue,e.owned&&e.owned.forEach(Ee),e.owned=null),e.updatedAt=r+1,ct(o)}finally{C=l,m=s}(!e.updatedAt||e.updatedAt<=r)&&(e.updatedAt!=null&&"observers"in e?kt(e,n):e.value=n,e.updatedAt=r)}function at(e,t,r,n=ue,s){const l={fn:e,state:n,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:m,context:m?m.context:null,pure:r};return m===null||m!==wt&&(m.owned?m.owned.push(l):m.owned=[l]),l}function Ke(e){if(e.state===0)return;if(e.state===Be)return Ve(e);if(e.suspense&&ee(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<He);)e.state&&t.push(e);for(let r=t.length-1;r>=0;r--)if(e=t[r],e.state===ue)Ae(e);else if(e.state===Be){const n=q;q=null,ye(()=>Ve(e,t[0]),!1),q=n}}function ye(e,t){if(q)return e();let r=!1;t||(q=[]),le?r=!0:le=[],He++;try{const n=e();return Gt(r),n}catch(n){r||(le=null),q=null,ct(n)}}function Gt(e){if(q&&(Et(q),q=null),e)return;const t=le;le=null,t.length&&ye(()=>$t(t),!1)}function Et(e){for(let t=0;t<e.length;t++)Ke(e[t])}function Ht(e){let t,r=0;for(t=0;t<e.length;t++){const n=e[t];n.user?e[r++]=n:Ke(n)}for(t=0;t<r;t++)Ke(e[t])}function Ve(e,t){e.state=0;for(let r=0;r<e.sources.length;r+=1){const n=e.sources[r];if(n.sources){const s=n.state;s===ue?n!==t&&(!n.updatedAt||n.updatedAt<He)&&Ke(n):s===Be&&Ve(n,t)}}}function At(e){for(let t=0;t<e.observers.length;t+=1){const r=e.observers[t];r.state||(r.state=Be,r.pure?q.push(r):le.push(Line truncated
API Key: ${N.api_key}
Save this key securely - it will not be shown again.`)}}else{const N=await y.json();alert("Error: "+(N.error||"Failed to save instance"))}}catch(p){console.error("Error saving instance:",p),alert("Error: Failed to save instance")}},O=async p=>{if(confirm("Are you sure you want to delete this instance? This action cannot be undone."))try{const x=await fetch(`/api/v1/instances/${p}`,{method:"DELETE",headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});if(x.ok)await u();else{const y=await x.json();alert("Error: "+(y.error||"Failed to delete instance"))}}catch(x){console.error("Error deleting instance:",x),alert("Error: Failed to delete instance")}},E=async p=>{try{(await fetch(`${p.url}/health`,{method:"GET",signal:AbortSignal.timeout(5e3)})).ok?alert("✅ Connection successful! Instance is responding."):alert("❌ Connection failed. Instance returned an error.")}catch{alert("❌ Connection failed. Unable to reach the instance.")}},L=(p,x)=>{navigator.clipboard.writeText(p).then(()=>{const y=x.target,N=y.textContent;y.textContent="Copied!",y.style.background="#10b981",setTimeout(()=>{y.textContent=N,y.style.background=""},2e3)})},j=p=>{if(!p)return"Never";const x=new Date(p);return x.toLocaleDateString()+" "+x.toLocaleTimeString()};return(()=>{var p=Vr(),x=p.firstChild,y=x.firstChild,N=y.nextSibling,oe=N.firstChild,ne=oe.firstChild,me=ne.nextSibling;return me.$$click=c,h(N,S(re,{get when(){return r()},get fallback(){return S(re,{get when(){return e().length>0},get fallback(){return Gr()},get children(){var v=zr();return h(v,S(de,{get each(){return e()},children:g=>(()=>{var $=Hr(),B=$.firstChild,W=B.nextSibling,D=W.firstChild,U=D.firstChild,d=U.firstChild,b=d.nextSibling,I=b.nextSibling,R=I.firstChild,K=R.nextSibling,H=D.nextSibling,Z=H.firstChild,X=Z.firstChild,F=X.nextSibling,V=Z.nextSibling,Y=V.firstChild,z=Y.nextSibling,ae=V.nextSibling,fe=ae.firstChild,ge=fe.nextSibling,$e=ae.nextSibling,he=$e.firstChild,se=he.nextSibling;se.firstChild;var pe=H.nextSibling,ce=pe.firstChild,we=ce.nextSibling,be=we.firstChild,xe=be.nextSibling,_e=pe.nextSibling,Te=_e.firstChild,Pe=Te.firstChild,ke=Te.nextSibling,Je=ke.firstChild,Ie=ke.nextSibling,je=Ie.firstChild,We=_e.nextSibling,Ce=We.firstChild,ve=Ce.nextSibling,Le=ve.nextSibling;return h(d,()=>g.name),h(b,()=>g.url),h(K,()=>g.is_active?"Active":"Inactive"),h(F,()=>g.version||"Unknown"),h(z,()=>j(g.created_at)),h(ge,()=>j(g.last_sync)),h(se,()=>g.id,null),xe.$$click=Q=>L(g.api_key,Q),h(Pe,()=>Math.floor(Math.random()*100)),h(Je,()=>Math.floor(Math.random()*50)),h(je,()=>Math.floor(Math.random()*1e3)),Ce.$$click=()=>E(g),ve.$$click=()=>w(g),Le.$$click=()=>O(g.id),P(Q=>{var Re=`absolute top-4 right-4 w-3 h-3 rounded-full ${g.is_active?"bg-green-500":"bg-red-500"} ${g.is_active?"animate-pulse":""}`,Oe=g.url,De=`w-2 h-2 rounded-full ${g.is_active?"bg-green-500":"bg-red-500"}`;return Re!==Q.e&&ze(B,Q.e=Re),Oe!==Q.t&&sr(b,"href",Q.t=Oe),De!==Q.a&&ze(R,Q.a=De),Q},{e:void 0,t:void 0,a:void 0}),P(()=>be.value=g.api_key),$})()})),v}})},get children(){return Br()}}),null),h(p,S(re,{get when(){return s()},get children(){var v=Kr(),g=v.firstChild,$=g.firstChild,B=$.firstChild,W=B.nextSibling,D=$.nextSibling,U=D.firstChild,d=U.firstChild,b=d.nextSibling,I=U.nextSibling,R=I.firstChild,K=R.nextSibling,H=I.nextSibling,Z=H.firstChild,X=Z.nextSibling,F=D.nextSibling,V=F.firstChild,Y=V.nextSibling;return h(B,()=>o()?"Edit Instance":"Register New Instance"),W.$$click=_,b.$$input=z=>f({...a(),name:z.currentTarget.value}),K.$$input=z=>f({...a(),url:z.currentTarget.value}),X.$$input=z=>f({...a(),version:z.currentTarget.value}),V.$$click=_,Y.$$click=M,h(Y,()=>o()?"Update Instance":"Register Instance"),P(()=>b.value=a().name),P(()=>K.value=a().url),P(()=>X.value=a().version),v}}),null),p})()};Xe(["click","input"]);function Jr(){return S(Tt,{get children(){return[S(Ue,{path:"/",component:vt}),S(Ue,{path:"/dashboard",component:vt}),S(Ue,{path:"/dashboard/courses",component:qr}),S(Ue,{path:"/dashboard/instances",component:Xr})]}})}const mt=document.getElementById("root");mt?nr(()=>S(Tt,{get children(){return S(Jr,{})}}),mt):console.error("Root element not found");
+1
View File
@@ -0,0 +1 @@
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.right-4{right:1rem}.top-4{top:1rem}.z-50{z-index:50}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-boLine truncated