skypilot-nightly 1.0.0.dev20250527__py3-none-any.whl → 1.0.0.dev20250528__py3-none-any.whl
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.
- sky/__init__.py +2 -2
- sky/adaptors/kubernetes.py +13 -1
- sky/backends/cloud_vm_ray_backend.py +2 -2
- sky/check.py +4 -1
- sky/clouds/kubernetes.py +2 -2
- sky/dashboard/out/404.html +1 -1
- sky/dashboard/out/_next/static/Mx1iAbDQn1jMHh3UHmK3R/_buildManifest.js +1 -0
- sky/dashboard/out/_next/static/chunks/121-8f55ee3fa6301784.js +20 -0
- sky/dashboard/out/_next/static/chunks/{573-82bd40a37af834f1.js → 173-7db8607cefc20f70.js} +5 -5
- sky/dashboard/out/_next/static/chunks/236-d6900c828331f664.js +6 -0
- sky/dashboard/out/_next/static/chunks/293-351268365226d251.js +1 -0
- sky/dashboard/out/_next/static/chunks/470-4d003c441839094d.js +1 -0
- sky/dashboard/out/_next/static/chunks/578-9146658cead92981.js +6 -0
- sky/dashboard/out/_next/static/chunks/843-256ec920f6d5f41f.js +11 -0
- sky/dashboard/out/_next/static/chunks/856-62b87c68917b08ed.js +1 -0
- sky/dashboard/out/_next/static/chunks/973-1a09cac61cfcc1e1.js +1 -0
- sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/[job]-159bffb2fa34ed54.js +6 -0
- sky/dashboard/out/_next/static/chunks/pages/clusters/{[cluster]-e23fcddf60578a0d.js → [cluster]-9506c00257d10dbd.js} +1 -1
- sky/dashboard/out/_next/static/chunks/pages/{clusters-8afda8efa5b74997.js → clusters-943992b84fd6f4ee.js} +1 -1
- sky/dashboard/out/_next/static/chunks/pages/config-41738d1896fc02fe.js +6 -0
- sky/dashboard/out/_next/static/chunks/pages/infra-881fcd902fbbd0e5.js +6 -0
- sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-2c29e97a6aa50dd4.js +6 -0
- sky/dashboard/out/_next/static/chunks/pages/{jobs-ff7e8e377d02b651.js → jobs-a4efc09e61988f8d.js} +1 -1
- sky/dashboard/out/_next/static/chunks/pages/users-b2634885d67c49a6.js +6 -0
- sky/dashboard/out/_next/static/chunks/pages/workspace/{new-63763ffa3edb4508.js → new-579b3203c7c19d84.js} +1 -1
- sky/dashboard/out/_next/static/chunks/pages/workspaces/{[name]-3ede7a13caf23375.js → [name]-9388e38fac73ee8f.js} +1 -1
- sky/dashboard/out/_next/static/chunks/pages/workspaces-610c49ae3619ee85.js +1 -0
- sky/dashboard/out/_next/static/css/ffd1cd601648c303.css +3 -0
- sky/dashboard/out/clusters/[cluster]/[job].html +1 -1
- sky/dashboard/out/clusters/[cluster].html +1 -1
- sky/dashboard/out/clusters.html +1 -1
- sky/dashboard/out/config.html +1 -1
- sky/dashboard/out/index.html +1 -1
- sky/dashboard/out/infra.html +1 -1
- sky/dashboard/out/jobs/[job].html +1 -1
- sky/dashboard/out/jobs.html +1 -1
- sky/dashboard/out/users.html +1 -1
- sky/dashboard/out/workspace/new.html +1 -1
- sky/dashboard/out/workspaces/[name].html +1 -1
- sky/dashboard/out/workspaces.html +1 -1
- sky/global_user_state.py +181 -134
- sky/provision/kubernetes/utils.py +4 -4
- sky/server/server.py +6 -5
- sky/setup_files/dependencies.py +1 -0
- sky/skylet/constants.py +4 -0
- sky/utils/db_utils.py +34 -46
- sky/utils/subprocess_utils.py +2 -3
- {skypilot_nightly-1.0.0.dev20250527.dist-info → skypilot_nightly-1.0.0.dev20250528.dist-info}/METADATA +2 -1
- {skypilot_nightly-1.0.0.dev20250527.dist-info → skypilot_nightly-1.0.0.dev20250528.dist-info}/RECORD +55 -54
- sky/dashboard/out/_next/static/D5bjIfl4Ob3SV3LJz3CO0/_buildManifest.js +0 -1
- sky/dashboard/out/_next/static/chunks/236-e220ba0c35bf089e.js +0 -6
- sky/dashboard/out/_next/static/chunks/470-1d784f5c8750744a.js +0 -1
- sky/dashboard/out/_next/static/chunks/488-50d843fdb5396d32.js +0 -15
- sky/dashboard/out/_next/static/chunks/578-24f35aa98d38d638.js +0 -6
- sky/dashboard/out/_next/static/chunks/627-31b701e69f52db0c.js +0 -1
- sky/dashboard/out/_next/static/chunks/843-e35d71cf1c7f706e.js +0 -11
- sky/dashboard/out/_next/static/chunks/990-f85643b521f7ca65.js +0 -1
- sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/[job]-339b59921ccfe266.js +0 -1
- sky/dashboard/out/_next/static/chunks/pages/config-72b8c6c2edfd0e39.js +0 -6
- sky/dashboard/out/_next/static/chunks/pages/infra-1521baab6992916b.js +0 -1
- sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-4d913940b4fa6f5a.js +0 -1
- sky/dashboard/out/_next/static/chunks/pages/users-9900af52acf8648d.js +0 -1
- sky/dashboard/out/_next/static/chunks/pages/workspaces-72330c4d0fc9a4a2.js +0 -1
- sky/dashboard/out/_next/static/css/6a1c0d711a4bdaf1.css +0 -3
- /sky/dashboard/out/_next/static/{D5bjIfl4Ob3SV3LJz3CO0 → Mx1iAbDQn1jMHh3UHmK3R}/_ssgManifest.js +0 -0
- /sky/dashboard/out/_next/static/chunks/pages/{_app-3985f074c163a856.js → _app-a631df412d8172de.js} +0 -0
- {skypilot_nightly-1.0.0.dev20250527.dist-info → skypilot_nightly-1.0.0.dev20250528.dist-info}/WHEEL +0 -0
- {skypilot_nightly-1.0.0.dev20250527.dist-info → skypilot_nightly-1.0.0.dev20250528.dist-info}/entry_points.txt +0 -0
- {skypilot_nightly-1.0.0.dev20250527.dist-info → skypilot_nightly-1.0.0.dev20250528.dist-info}/licenses/LICENSE +0 -0
- {skypilot_nightly-1.0.0.dev20250527.dist-info → skypilot_nightly-1.0.0.dev20250528.dist-info}/top_level.txt +0 -0
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[990],{803:function(e,r,t){t.d(r,{z:function(){return i}});var o=t(5893),a=t(7294),s=t(8426),n=t(2003),c=t(2350);let l=(0,n.j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),i=a.forwardRef((e,r)=>{let{className:t,variant:a,size:n,asChild:i=!1,...u}=e,d=i?s.g7:"button";return(0,o.jsx)(d,{className:(0,c.cn)(l({variant:a,size:n,className:t})),ref:r,...u})});i.displayName="Button"},7673:function(e,r,t){t.d(r,{Ol:function(){return i},Zb:function(){return l},aY:function(){return f},eW:function(){return p},ll:function(){return u}});var o=t(5893),a=t(7294),s=t(5697),n=t.n(s),c=t(2350);let l=a.forwardRef((e,r)=>{let{className:t,children:a,...s}=e;return(0,o.jsx)("div",{ref:r,className:(0,c.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",t),...s,children:a})});l.displayName="Card",l.propTypes={className:n().string,children:n().node};let i=a.forwardRef((e,r)=>{let{className:t,children:a,...s}=e;return(0,o.jsx)("div",{ref:r,className:(0,c.cn)("flex flex-col space-y-1.5 p-6",t),...s,children:a})});i.displayName="CardHeader",i.propTypes={className:n().string,children:n().node};let u=a.forwardRef((e,r)=>{let{className:t,children:a,...s}=e;return(0,o.jsx)("h3",{ref:r,className:(0,c.cn)("text-2xl font-semibold leading-none tracking-tight",t),...s,children:a})});u.displayName="CardTitle",u.propTypes={className:n().string,children:n().node};let d=a.forwardRef((e,r)=>{let{className:t,children:a,...s}=e;return(0,o.jsx)("p",{ref:r,className:(0,c.cn)("text-sm text-muted-foreground",t),...s,children:a})});d.displayName="CardDescription",d.propTypes={className:n().string,children:n().node};let f=a.forwardRef((e,r)=>{let{className:t,children:a,...s}=e;return(0,o.jsx)("div",{ref:r,className:(0,c.cn)("p-6 pt-0",t),...s,children:a})});f.displayName="CardContent",f.propTypes={className:n().string,children:n().node};let p=a.forwardRef((e,r)=>{let{className:t,children:a,...s}=e;return(0,o.jsx)("div",{ref:r,className:(0,c.cn)("flex items-center p-6 pt-0",t),...s,children:a})});p.displayName="CardFooter",p.propTypes={className:n().string,children:n().node}},7324:function(e,r,t){t.d(r,{MB:function(){return l},eA:function(){return c},fX:function(){return a},iE:function(){return u},rF:function(){return d},yz:function(){return s},zl:function(){return i}});var o=t(3225);async function a(){try{let e=await fetch("".concat(o.f4,"/workspaces"));if(!e.ok)throw Error("Error scheduling getWorkspaces: ".concat(e.statusText," (status ").concat(e.status,")"));let r=e.headers.get("X-Skypilot-Request-ID");if(!r){console.warn("X-Skypilot-Request-ID header not found in /workspaces response. Attempting to find request_id in response body as a fallback.");try{let t=await e.json();if(t&&t.request_id)r=t.request_id,console.log("Found request_id in /workspaces response body (fallback):",r);else throw Error("X-Skypilot-Request-ID header not found AND request_id not found in parsed response body from /workspaces.")}catch(r){let e=r.message||"Error processing fallback for request_id from /workspaces response body.";throw console.error("Error in /workspaces request_id fallback logic:",e),Error("X-Skypilot-Request-ID header not found, and fallback to read request_id from body failed: ".concat(e))}}if(!r)throw Error("Failed to obtain X-Skypilot-Request-ID from /workspaces response (checked header and attempted body fallback, but ID is still missing).");console.log("Fetching workspace data with request_id: ".concat(r));let t=await fetch("".concat(o.f4,"/api/get?request_id=").concat(r));if(!t.ok){let e="Error fetching workspace data for request ID ".concat(r,": ").concat(t.statusText," (status ").concat(t.status,")");try{let o=await t.json();if(o&&o.detail){let t=o.detail;try{let e=JSON.parse(t);e&&e.error?t=e.error:e&&e.result&&e.result.error&&(t=e.result.error)}catch(e){}e="Error fetching workspace data for request ID ".concat(r,": ").concat(t)}}catch(e){}throw Error(e)}let a=await t.json();if(console.log("[Connector Debug] Full resultData from /api/get:",a),"FAILED"===a.status){let e="Unknown error during task execution";if(a.error)"string"==typeof a.error?e=a.error:"object"==typeof a.error&&(e=a.error.message||a.error.detail||JSON.stringify(a.error));else if(a.result&&a.result.error)"string"==typeof a.result.error?e=a.result.error:"object"==typeof a.result.error&&(e=a.result.error.message||a.result.error.detail||JSON.stringify(a.result.error));else if(a.return_value)try{let r=JSON.parse(a.return_value);r.error&&(e="string"==typeof r.error?r.error:r.error.message||r.error.detail||JSON.stringify(r.error))}catch(r){(a.return_value.includes("Error")||a.return_value.includes("Cannot"))&&(e=a.return_value)}throw Error(e)}let s={};if("SUCCEEDED"===a.status&&a.return_value)try{s=JSON.parse(a.return_value),console.log("Successfully parsed workspace data from return_value:",s)}catch(e){throw console.error("Failed to parse workspace data from return_value:",e,"Raw return_value:",a.return_value),Error("Failed to parse workspace data for request ID ".concat(r,": ").concat(e.message))}else a.result&&(console.warn("Using resultData.result as fallback for status ".concat(a.status)),s=a.result);return console.log("Effectively fetched workspace data (to be returned):",s),s||{}}catch(e){throw console.error("Failed to fetch workspaces (in getWorkspaces function):",e.message,e.stack),e}}async function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];try{let t="".concat(o.f4,"/enabled_clouds"),a=new URLSearchParams;e&&a.append("workspace",e),r&&a.append("expand","true"),a.toString()&&(t+="?".concat(a.toString()));let s=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(!s.ok)throw Error("Error scheduling getEnabledClouds: ".concat(s.statusText," (status ").concat(s.status,")"));let n=s.headers.get("X-Skypilot-Request-ID");if(!n){console.warn("X-Skypilot-Request-ID header not found in /enabled_clouds response. Attempting to find request_id in response body as a fallback.");try{let e=await s.json();if(e&&e.request_id)n=e.request_id,console.log("Found request_id in /enabled_clouds response body (fallback):",n);else throw Error("X-Skypilot-Request-ID header not found AND request_id not found in parsed response body from /enabled_clouds.")}catch(r){let e=r.message||"Error processing fallback for request_id from /enabled_clouds response body.";throw console.error("Error in /enabled_clouds request_id fallback logic:",e),Error("X-Skypilot-Request-ID header not found, and fallback to read request_id from body failed: ".concat(e))}}if(!n)throw Error("Failed to obtain X-Skypilot-Request-ID from /enabled_clouds response (checked header and attempted body fallback, but ID is still missing).");console.log("Fetching enabled_clouds data with request_id: ".concat(n));let c=await fetch("".concat(o.f4,"/api/get?request_id=").concat(n));if(!c.ok){let e="Error fetching enabled_clouds data for request ID ".concat(n,": ").concat(c.statusText," (status ").concat(c.status,")");try{let r=await c.json();if(r&&r.detail){let t=r.detail;try{let e=JSON.parse(t);e&&e.error?t=e.error:e&&e.result&&e.result.error&&(t=e.result.error)}catch(e){}e="Error fetching enabled_clouds data for request ID ".concat(n,": ").concat(t)}}catch(e){}throw Error(e)}let l=await c.json();if(console.log("[Connector Debug] Full resultData from /api/get for enabled_clouds:",l),"FAILED"===l.status){let e=l.error||l.result&&l.result.error||"Unknown error during task execution for enabled_clouds";throw Error("Fetching enabled_clouds data failed for request ID ".concat(n,": ").concat(e))}let i=[];if("SUCCEEDED"===l.status&&l.return_value)try{i=JSON.parse(l.return_value),console.log("Successfully parsed enabled_clouds data from return_value:",i)}catch(e){throw console.error("Failed to parse enabled_clouds data from return_value:",e,"Raw return_value:",l.return_value),Error("Failed to parse enabled_clouds data for request ID ".concat(n,": ").concat(e.message))}else l.result&&(console.warn("Using resultData.result as fallback for enabled_clouds status ".concat(l.status)),i=l.result);return Array.isArray(i)?i:[]}catch(e){throw console.error("Failed to fetch enabled_clouds (in getEnabledClouds function):",e.message,e.stack),e}}async function n(e,r){console.log("Polling for ".concat(r," task completion with request_id: ").concat(e));let t=await fetch("".concat(o.f4,"/api/get?request_id=").concat(e));if(!t.ok){let o="Error fetching ".concat(r," data for request ID ").concat(e,": ").concat(t.statusText," (status ").concat(t.status,")");try{let e=await t.json();if(console.error("[Error Debug] ".concat(r," HTTP error response:"),JSON.stringify(e,null,2)),e&&e.detail){if("object"==typeof e.detail&&e.detail.error)try{let t=JSON.parse(e.detail.error);if(t&&t.message)o="".concat(r," failed: ").concat(t.message);else if(t&&"object"==typeof t){let e=t.type||JSON.stringify(t);o="".concat(r," failed: ").concat(e)}}catch(t){o="".concat(r," failed: ").concat(e.detail.error)}else if("string"==typeof e.detail)o="".concat(r," failed: ").concat(e.detail);else{let t=function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if("string"==typeof e&&(e.includes("Cannot")||e.includes("Error")||e.includes("Failed")))return e;if("object"==typeof e&&null!==e)for(let[o,a]of Object.entries(e)){let e=t(a,r?"".concat(r,".").concat(o):o);if(e)return e}return null},a=t(e.detail);a&&(o="".concat(r," failed: ").concat(a))}}}catch(e){console.error("[Error Debug] Failed to parse error response:",e)}throw Error(o)}let a=await t.json();if(console.log("[Connector Debug] ".concat(r," resultData:"),a),"FAILED"===a.status){console.error("[Error Debug] ".concat(r," failed. Full resultData:"),JSON.stringify(a,null,2)),console.error("[Error Debug] resultData.error:",a.error),console.error("[Error Debug] resultData.result:",a.result),console.error("[Error Debug] resultData.return_value:",a.return_value);let e="Unknown error during ".concat(r," task execution");if(a.error)"string"==typeof a.error?e=a.error:"object"==typeof a.error&&(e=a.error.message||a.error.detail||JSON.stringify(a.error));else if(a.result&&a.result.error)"string"==typeof a.result.error?e=a.result.error:"object"==typeof a.result.error&&(e=a.result.error.message||a.result.error.detail||JSON.stringify(a.result.error));else if(a.return_value)try{let r=JSON.parse(a.return_value);r.error&&(e="string"==typeof r.error?r.error:r.error.message||r.error.detail||JSON.stringify(r.error))}catch(r){a.return_value&&(a.return_value.includes("Error")||a.return_value.includes("Cannot"))&&(e=a.return_value)}if(e==="Unknown error during ".concat(r," task execution")){let r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if("string"==typeof e&&(e.includes("Cannot")||e.includes("Error")||e.includes("Failed")))return e;if("object"==typeof e&&null!==e)for(let[o,a]of Object.entries(e)){let e=r(a,t?"".concat(t,".").concat(o):o);if(e)return e}return null},t=r(a);t&&(e=t)}throw Error(e)}let s={};if("SUCCEEDED"===a.status&&a.return_value)try{s=JSON.parse(a.return_value),console.log("Successfully parsed ".concat(r," data:"),s)}catch(t){throw console.error("Failed to parse ".concat(r," data from return_value:"),t,"Raw return_value:",a.return_value),Error("Failed to parse ".concat(r," data for request ID ").concat(e,": ").concat(t.message))}else a.result&&(console.warn("Using resultData.result as fallback for ".concat(r," status ").concat(a.status)),s=a.result);return s}async function c(e,r){try{console.log("Updating workspace ".concat(e," with config:"),r);let t=await fetch("".concat(o.f4,"/workspaces/update"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace_name:e,config:r})});if(!t.ok)throw Error("Error scheduling updateWorkspace: ".concat(t.statusText," (status ").concat(t.status,")"));let a=t.headers.get("X-Skypilot-Request-ID");if(!a)throw Error("Failed to obtain request ID for updateWorkspace");return await n(a,"updateWorkspace")}catch(e){throw console.error("Failed to update workspace:",e),e}}let l=async(e,r)=>{try{let t=await fetch("".concat(o.f4,"/workspaces/create"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace_name:e,config:r})});if(!t.ok)throw await t.text(),Error("Error scheduling createWorkspace: ".concat(t.statusText," (status ").concat(t.status,")"));let a=t.headers.get("X-Skypilot-Request-ID");if(!a)throw Error("Failed to obtain request ID for createWorkspace");return await n(a,"createWorkspace")}catch(e){throw console.error("Failed to create workspace:",e),e}};async function i(e){try{console.log("Deleting workspace ".concat(e));let r=await fetch("".concat(o.f4,"/workspaces/delete"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace_name:e})});if(!r.ok)throw Error("Error scheduling deleteWorkspace: ".concat(r.statusText," (status ").concat(r.status,")"));let t=r.headers.get("X-Skypilot-Request-ID");if(!t)throw Error("Failed to obtain request ID for deleteWorkspace");console.log("[Delete Debug] Got request ID for deleteWorkspace: ".concat(t));try{let e=await n(t,"deleteWorkspace");return console.log("[Delete Debug] deleteWorkspace completed successfully:",e),e}catch(e){throw console.error("[Delete Debug] deleteWorkspace failed with error:",e),console.error("[Delete Debug] Error message:",e.message),e}}catch(e){throw console.error("Failed to delete workspace:",e),e}}async function u(){try{console.log("Getting entire SkyPilot configuration");let e=await fetch("".concat(o.f4,"/workspaces/config"));if(!e.ok)throw Error("Error scheduling getConfig: ".concat(e.statusText," (status ").concat(e.status,")"));let r=e.headers.get("X-Skypilot-Request-ID");if(!r)throw Error("Failed to obtain request ID for getConfig");return await n(r,"getConfig")}catch(e){throw console.error("Failed to get config:",e),e}}async function d(e){try{console.log("Updating entire SkyPilot configuration with config:",e);let r=await fetch("".concat(o.f4,"/workspaces/config"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({config:e})});if(!r.ok)throw Error("Error scheduling updateConfig: ".concat(r.statusText," (status ").concat(r.status,")"));let t=r.headers.get("X-Skypilot-Request-ID");if(!t)throw Error("Failed to obtain request ID for updateConfig");return await n(t,"updateConfig")}catch(e){throw console.error("Failed to update config:",e),e}}}}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[826],{4966:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/clusters/[cluster]/[job]",function(){return s(190)}])},9307:function(e,t,s){"use strict";s.d(t,{Cl:function(){return c},OE:function(){return d}});var r=s(5893);s(7294);var a=s(8799),n=s(6989),l=s(3850);let c=e=>{switch(e){case"LAUNCHING":return"bg-blue-100 text-sky-blue";case"RUNNING":return"bg-green-50 text-green-700";case"STOPPED":return"bg-yellow-100 text-yellow-800";case"TERMINATED":default:return"bg-gray-100 text-gray-800";case"PENDING":case"CANCELLED":case"CANCELLING":return"bg-yellow-50 text-yellow-700";case"SUCCEEDED":return"bg-blue-50 text-blue-700";case"FAILED":case"FAILED_PRECHECKS":case"FAILED_NO_RESOURCE":case"FAILED_CONTROLLER":return"bg-red-50 text-red-700";case"RECOVERING":return"bg-orange-50 text-orange-700";case"SUBMITTED":return"bg-indigo-50 text-indigo-700";case"STARTING":return"bg-cyan-50 text-cyan-700";case"FAILED_SETUP":return"bg-pink-50 text-pink-700"}},i=e=>{switch(e){case"LAUNCHING":case"STARTING":return(0,r.jsx)(a.Z,{size:12,className:"w-3 h-3 mr-1"});case"RUNNING":default:return(0,r.jsx)(l.W2,{className:"w-3 h-3 mr-1"});case"STOPPED":return(0,r.jsx)(l.fp,{className:"w-3 h-3 mr-1"});case"TERMINATED":case"FAILED":case"CANCELLED":return(0,r.jsx)(l.Ps,{className:"w-3 h-3 mr-1"});case"SUCCEEDED":return(0,r.jsx)(l.Ye,{className:"w-3 h-3 mr-1"});case"PENDING":case"RECOVERING":case"SUBMITTED":case"CANCELLING":case"FAILED_SETUP":case"FAILED_PRECHECKS":case"FAILED_NO_RESOURCE":case"FAILED_CONTROLLER":return(0,r.jsx)(l.J$,{className:"w-3 h-3 mr-1"})}},o=e=>{let t=c(e),s=i(e);return(0,r.jsxs)("span",{className:"".concat("inline-flex items-center px-2 py-1 rounded-full text-sm"," ").concat(t),children:[s,e]})},d=e=>{let{status:t}=e;return(0,r.jsx)(n.WH,{content:t,className:"text-muted-foreground text-sm",children:(0,r.jsx)("span",{children:o(t)})})}},7673:function(e,t,s){"use strict";s.d(t,{Ol:function(){return o},Zb:function(){return i},aY:function(){return m},eW:function(){return x},ll:function(){return d}});var r=s(5893),a=s(7294),n=s(5697),l=s.n(n),c=s(2350);let i=a.forwardRef((e,t)=>{let{className:s,children:a,...n}=e;return(0,r.jsx)("div",{ref:t,className:(0,c.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",s),...n,children:a})});i.displayName="Card",i.propTypes={className:l().string,children:l().node};let o=a.forwardRef((e,t)=>{let{className:s,children:a,...n}=e;return(0,r.jsx)("div",{ref:t,className:(0,c.cn)("flex flex-col space-y-1.5 p-6",s),...n,children:a})});o.displayName="CardHeader",o.propTypes={className:l().string,children:l().node};let d=a.forwardRef((e,t)=>{let{className:s,children:a,...n}=e;return(0,r.jsx)("h3",{ref:t,className:(0,c.cn)("text-2xl font-semibold leading-none tracking-tight",s),...n,children:a})});d.displayName="CardTitle",d.propTypes={className:l().string,children:l().node};let u=a.forwardRef((e,t)=>{let{className:s,children:a,...n}=e;return(0,r.jsx)("p",{ref:t,className:(0,c.cn)("text-sm text-muted-foreground",s),...n,children:a})});u.displayName="CardDescription",u.propTypes={className:l().string,children:l().node};let m=a.forwardRef((e,t)=>{let{className:s,children:a,...n}=e;return(0,r.jsx)("div",{ref:t,className:(0,c.cn)("p-6 pt-0",s),...n,children:a})});m.displayName="CardContent",m.propTypes={className:l().string,children:l().node};let x=a.forwardRef((e,t)=>{let{className:s,children:a,...n}=e;return(0,r.jsx)("div",{ref:t,className:(0,c.cn)("flex items-center p-6 pt-0",s),...n,children:a})});x.displayName="CardFooter",x.propTypes={className:l().string,children:l().node}},3266:function(e,t,s){"use strict";s.d(t,{QL:function(){return d},Sl:function(){return i},zd:function(){return c}});var r=s(7294),a=s(5821),n=s(3225);let l={UP:"RUNNING",STOPPED:"STOPPED",INIT:"LAUNCHING",null:"TERMINATED"};async function c(){let{clusterNames:e=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let t=await fetch("".concat(n.f4,"/status"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cluster_names:e,all_users:!0})}),s=t.headers.get("X-Skypilot-Request-ID")||t.headers.get("X-Request-ID"),r=await fetch("".concat(n.f4,"/api/get?request_id=").concat(s)),a=await r.json();return(a.return_value?JSON.parse(a.return_value):[]).map(e=>{let t="",s=t=e.zone?e.zone:e.region;return t&&t.length>25&&(t=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15;if(!e||e.length<=t)return e;if(t<=3)return"...";let s=Math.floor((t-3)/2),r=s+(t-3)%2;return 0===s?e.substring(0,r)+"...":e.substring(0,r)+"..."+e.substring(e.length-s)}(t,25)),{status:l[e.status],cluster:e.name,user:e.user_name,user_hash:e.user_hash,cloud:e.cloud,infra:t?e.cloud+" ("+t+")":e.cloud,full_infra:s?"".concat(e.cloud," (").concat(s,")"):e.cloud,cpus:e.cpus,mem:e.memory,gpus:e.accelerators,resources_str:e.resources_str,resources_str_full:e.resources_str_full,time:new Date(1e3*e.launched_at),num_nodes:e.nodes,workspace:e.workspace,jobs:[],events:[{time:new Date(1e3*e.launched_at),event:"Cluster created."}]}})}catch(e){return console.error("Error fetching clusters:",e),[]}}async function i(e){let{clusterName:t,jobId:s,onNewLog:r,workspace:l}=e;try{let e=(await fetch("".concat(n.f4,"/logs"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({follow:!1,cluster_name:t,job_id:s,override_skypilot_config:{active_workspace:l||"default"}})})).body.getReader();for(;;){let{done:t,value:s}=await e.read();if(t)break;let a=new TextDecoder().decode(s);r(a)}}catch(e){console.error("Error in streamClusterJobLogs:",e),(0,a.C)("Error in streamClusterJobLogs: ".concat(e.message),"error")}}async function o(e){let{clusterName:t,workspace:s}=e;try{let e=await fetch("".concat(n.f4,"/queue"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cluster_name:t,all_users:!0,override_skypilot_config:{active_workspace:s}})}),r=e.headers.get("X-Skypilot-Request-ID")||e.headers.get("X-Request-ID"),a=await fetch("".concat(n.f4,"/api/get?request_id=").concat(r)),l=await a.json();return JSON.parse(l.return_value).map(e=>{let s=e.end_at?e.end_at:Date.now()/1e3,r=0,a=0;return e.submitted_at&&(r=s-e.submitted_at),e.start_at&&(a=s-e.start_at),{id:e.job_id,status:e.status,job:e.job_name,user:e.username,gpus:e.accelerators||{},submitted_at:e.submitted_at?new Date(1e3*e.submitted_at):null,resources:e.resources,cluster:t,total_duration:r,job_duration:a,infra:"",logs:""}})}catch(e){return console.error("Error fetching cluster jobs:",e),[]}}function d(e){let{cluster:t,job:s=null}=e,[a,n]=(0,r.useState)(null),[l,i]=(0,r.useState)(null),[d,u]=(0,r.useState)(!0),[m,x]=(0,r.useState)(!0),h=(0,r.useCallback)(async()=>{if(t)try{u(!0);let e=await c({clusterNames:[t]});return n(e[0]),e[0]}catch(e){console.error("Error fetching cluster data:",e)}finally{u(!1)}return null},[t]),f=(0,r.useCallback)(async e=>{if(t)try{x(!0);let s=await o({clusterName:t,workspace:e||"default"});i(s)}catch(e){console.error("Error fetching cluster job data:",e)}finally{x(!1)}},[t]),N=(0,r.useCallback)(async()=>{let e=await h();e&&await f(e.workspace)},[h,f]);return(0,r.useEffect)(()=>{(async()=>{let e=await h();e&&await f(e.workspace)})()},[t,s,h,f]),{clusterData:a,clusterJobData:l,loading:d||m,refreshData:N}}},5821:function(e,t,s){"use strict";function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5e3,r=document.getElementById("toast-container");r||((r=document.createElement("div")).id="toast-container",r.className="fixed top-0 right-0 p-4 z-[9999] flex flex-col items-end space-y-2",document.body.appendChild(r));let a=document.createElement("div");switch(a.className="rounded-md border-l-4 p-4 shadow-md flex items-center justify-between max-w-md w-full mb-2 pointer-events-auto",t){case"success":a.className+=" bg-green-100 border-green-500 text-green-800";break;case"error":a.className+=" bg-red-100 border-red-500 text-red-800";break;case"warning":a.className+=" bg-yellow-100 border-yellow-500 text-yellow-800";break;default:a.className+=" bg-blue-100 border-blue-500 text-blue-800"}return a.innerHTML='\n <div class="flex-1 mr-2">\n <p class="text-sm font-medium">'.concat(e,'</p>\n </div>\n <button class="text-gray-500 hover:text-gray-700 focus:outline-none" aria-label="Close toast">\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <line x1="18" y1="6" x2="6" y2="18"></line>\n <line x1="6" y1="6" x2="18" y2="18"></line>\n </svg>\n </button>\n '),r.appendChild(a),a.querySelector("button").addEventListener("click",()=>{r.removeChild(a)}),setTimeout(()=>{r.contains(a)&&r.removeChild(a)},s),a}s.d(t,{C:function(){return r}})},190:function(e,t,s){"use strict";s.r(t),s.d(t,{JobDetailPage:function(){return j}});var r=s(5893),a=s(7294),n=s(9470),l=s(7673),c=s(1664),i=s.n(c),o=s(1163),d=s(3266),u=s(6989),m=s(3626),x=s(8799),h=s(9307),f=s(3001),N=s(9008),g=s.n(N);function b(e){let{cluster:t,job:s,jobData:a,onRefresh:n,isRefreshing:l,loading:c}=e,o=(0,f.X)();return(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,r.jsxs)("div",{className:"text-base flex items-center",children:[(0,r.jsx)(i(),{href:"/clusters",className:"text-sky-blue hover:underline",children:"Sky Clusters"}),(0,r.jsx)("span",{className:"mx-2 text-gray-500",children:"›"}),(0,r.jsx)(i(),{href:"/clusters/".concat(t),className:"text-sky-blue hover:underline",children:t}),(0,r.jsx)("span",{className:"mx-2 text-gray-500",children:"›"}),(0,r.jsxs)(i(),{href:"/clusters/".concat(t,"/").concat(s),className:"text-sky-blue hover:underline",children:[s,a.job&&"-"!=a.job?" (".concat(a.job,")"):""]})]}),(0,r.jsxs)("div",{className:"flex items-center",children:[(c||l)&&(0,r.jsxs)("div",{className:"flex items-center mr-2",children:[(0,r.jsx)(x.Z,{size:15,className:"mt-0"}),(0,r.jsx)("span",{className:"text-sm ml-2 text-gray-500",children:"Loading..."})]}),(0,r.jsx)(u.WH,{content:"Refresh",className:"text-muted-foreground",children:(0,r.jsxs)("button",{onClick:n,disabled:c||l,className:"text-sm text-sky-blue hover:text-sky-blue-bright font-medium mx-2 flex items-center",children:[(0,r.jsx)(m.Z,{className:"w-4 h-4 mr-1.5"}),!o&&(0,r.jsx)("span",{children:"Refresh"})]})})]})]})}function j(){let e=(0,o.useRouter)(),{cluster:t,job:s}=e.query,{clusterData:c,clusterJobData:f,loading:N,refreshData:j}=(0,d.QL)({cluster:t}),[p,y]=(0,a.useState)(!1),[v,w]=(0,a.useState)(!0),[E,_]=(0,a.useState)(!1),[C,k]=(0,a.useState)([]),[D,T]=(0,a.useState)(!1),S=(0,a.useMemo)(()=>["INIT","PENDING","SETTING_UP"],[]),I=(0,a.useMemo)(()=>{if(!f||!s)return!0;let e=f.find(e=>e.id==s);return e&&S.includes(e.status)},[f,s,S]);a.useEffect(()=>{!N&&v&&w(!1)},[N,v]),(0,a.useEffect)(()=>{let e=!0;return t&&s&&!I?(_(!0),(0,d.Sl)({clusterName:t,jobId:s,onNewLog:t=>{if(e){let e=(0,u.q8)(t);k(t=>[...t,e])}},workspace:null==c?void 0:c.workspace}).then(()=>{e&&_(!1)}).catch(t=>{e&&(console.error("Error streaming logs:",t),_(!1))})):_(!1),()=>{e=!1}},[t,s,D,I,c]);let R=async()=>{y(!0),T(e=>!e),k([]);try{j&&await j()}catch(e){console.error("Error refreshing data:",e)}finally{y(!1)}};if(!e.isReady)return(0,r.jsx)("div",{children:"Loading..."});let L={id:s};if(c&&f){let e=f.find(e=>e.id==s);e&&(L={...e,infra:c.infra,cluster:c.cluster,user:c.user})}let O=t&&s?"Job: ".concat(s," @ ").concat(t," | SkyPilot Dashboard"):"Job Details | SkyPilot Dashboard";return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(g(),{children:(0,r.jsx)("title",{children:O})}),(0,r.jsxs)(n.A,{highlighted:"clusters",children:[(0,r.jsx)(b,{cluster:t,job:s,jobData:L,onRefresh:R,isRefreshing:p,loading:N}),N&&v?(0,r.jsxs)("div",{className:"flex items-center justify-center h-64",children:[(0,r.jsx)(x.Z,{size:24,className:"mr-2"}),(0,r.jsx)("span",{children:"Loading..."})]}):(0,r.jsxs)("div",{className:"space-y-8",children:[(0,r.jsx)("div",{id:"details",children:(0,r.jsxs)(l.Zb,{children:[(0,r.jsx)("div",{className:"flex items-center justify-between px-4 pt-4",children:(0,r.jsx)("h2",{className:"text-lg font-semibold",children:"Details"})}),(0,r.jsx)("div",{className:"p-4",children:(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Job ID"}),(0,r.jsx)("div",{className:"text-base mt-1",children:L.id})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Job Name"}),(0,r.jsx)("div",{className:"text-base mt-1",children:L.job})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Status"}),(0,r.jsx)("div",{className:"text-base mt-1",children:(0,r.jsx)(h.OE,{status:L.status})})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"User"}),(0,r.jsx)("div",{className:"text-base mt-1",children:L.user})]}),L.resources&&(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Requested Resources"}),(0,r.jsx)("div",{className:"text-base mt-1",children:L.resources||"N/A"})]}),L.cluster&&(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Cluster"}),(0,r.jsx)("div",{className:"text-base mt-1",children:(0,r.jsx)(i(),{href:"/clusters/".concat(L.cluster),className:"text-sky-blue hover:underline",children:L.cluster})})]})]})})]})}),(0,r.jsx)("div",{id:"logs",className:"mt-6",children:(0,r.jsxs)(l.Zb,{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-4 pt-4",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("h2",{className:"text-lg font-semibold",children:"Logs"}),(0,r.jsx)("span",{className:"ml-2 text-xs text-gray-500",children:"(Logs are not streaming; click refresh to fetch the latest logs.)"})]}),(0,r.jsx)(u.WH,{content:"Refresh logs",className:"text-muted-foreground",children:(0,r.jsx)("button",{onClick:()=>{T(e=>!e),k([])},disabled:E,className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:(0,r.jsx)(m.Z,{className:"w-4 h-4 ".concat(E?"animate-spin":"")})})})]}),(0,r.jsx)("div",{className:"p-4",children:I?(0,r.jsx)("div",{className:"bg-[#f7f7f7] flex items-center justify-center py-4 text-gray-500",children:(0,r.jsx)("span",{children:"Waiting for the job to start, please refresh after a while"})}):E?(0,r.jsxs)("div",{className:"flex items-center justify-center py-4",children:[(0,r.jsx)(x.Z,{size:20,className:"mr-2"}),(0,r.jsx)("span",{children:"Loading..."})]}):(0,r.jsx)("div",{className:"max-h-96 overflow-y-auto",children:(0,r.jsx)(u.$B,{logs:C.join("")})})})]})})]})]})]})}t.default=j},9008:function(e,t,s){e.exports=s(7219)}},function(e){e.O(0,[573,470,888,774,179],function(){return e(e.s=4966)}),_N_E=e.O()}]);
|
@@ -1,6 +0,0 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[490],{4483:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/config",function(){return l(9649)}])},9333:function(e,s,l){"use strict";l.d(s,{Z:function(){return n}});/**
|
2
|
-
* @license lucide-react v0.407.0 - ISC
|
3
|
-
*
|
4
|
-
* This source code is licensed under the ISC license.
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
6
|
-
*/let n=(0,l(998).Z)("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]])},1812:function(e,s,l){"use strict";l.d(s,{X:function(){return i}});var n=l(5893),t=l(7294);let r=e=>{if(!(null==e?void 0:e.message))return"An unexpected error occurred.";let s=e.message;return s.includes("failed:")&&(s=s.split("failed:")[1].trim()),s.charAt(0).toUpperCase()+s.slice(1)},i=e=>{let{error:s,title:l="Error",onDismiss:i}=e,[a,c]=(0,t.useState)(!1);if((0,t.useEffect)(()=>{s&&c(!1)},[s]),!s||a)return null;let d="string"==typeof s?s:r(s);return(0,n.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-md p-3 mb-4",children:(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("div",{className:"flex-shrink-0",children:(0,n.jsx)("svg",{className:"h-5 w-5 text-red-400",viewBox:"0 0 20 20",fill:"currentColor",children:(0,n.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),(0,n.jsx)("div",{className:"ml-3",children:(0,n.jsxs)("div",{className:"text-sm text-red-800",children:[(0,n.jsxs)("strong",{children:[l,":"]})," ",d]})})]}),(0,n.jsx)("button",{onClick:()=>{c(!0),i&&i()},className:"flex-shrink-0 ml-4 text-red-400 hover:text-red-600 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 focus:ring-offset-red-50 rounded","aria-label":"Dismiss error",children:(0,n.jsx)("svg",{className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",children:(0,n.jsx)("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]})})}},9649:function(e,s,l){"use strict";l.r(s),l.d(s,{default:function(){return g}});var n=l(5893),t=l(7294),r=l(1163),i=l(9470);l(1664);var a=l(9008),c=l.n(a),d=l(803),o=l(7673),u=l(7324),f=l(1812),x=l(8799),m=l(3626),h=l(9333),v=l(3320),j=l.n(v);function g(){let e=(0,r.useRouter)(),[s,l]=(0,t.useState)(""),[a,v]=(0,t.useState)(!0),[g,p]=(0,t.useState)(!1),[b,N]=(0,t.useState)(null),[y,k]=(0,t.useState)(!1);(0,t.useEffect)(()=>{w()},[]);let w=async()=>{v(!0),N(null);try{let e=await (0,u.iE)();0===Object.keys(e).length?l("# Empty SkyPilot config. Enter config in YAML format\n"):l(j().dump(e,{indent:2}))}catch(e){console.error("Error loading config:",e),N(e)}finally{v(!1)}},C=async()=>{p(!0),N(null),k(!1);try{let e=j().load(s);await (0,u.rF)(e),k(!0),setTimeout(()=>k(!1),3e3)}catch(e){console.error("Error saving config:",e),N(e)}finally{p(!1)}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c(),{children:(0,n.jsx)("title",{children:"Edit SkyPilot Configuration | SkyPilot Dashboard"})}),(0,n.jsxs)(i.A,{highlighted:"workspaces",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,n.jsx)("div",{className:"text-base flex items-center",children:(0,n.jsx)("span",{className:"text-sky-blue",children:"SkyPilot Configuration"})}),(0,n.jsxs)("div",{className:"text-sm flex items-center",children:[(a||g)&&(0,n.jsxs)("div",{className:"flex items-center mr-4",children:[(0,n.jsx)(x.Z,{size:15,className:"mt-0"}),(0,n.jsx)("span",{className:"ml-2 text-gray-500",children:g?"Applying...":"Loading..."})]}),(0,n.jsx)("div",{className:"flex items-center space-x-4",children:(0,n.jsxs)("button",{onClick:w,disabled:a||g,className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center",children:[(0,n.jsx)(m.Z,{className:"w-4 h-4 mr-1.5"}),"Refresh"]})})]})]}),(0,n.jsxs)(o.Zb,{className:"w-full",children:[(0,n.jsx)(o.Ol,{children:(0,n.jsx)(o.ll,{className:"text-base font-normal flex items-center justify-between",children:(0,n.jsx)("span",{children:"Edit SkyPilot Configuration YAML"})})}),(0,n.jsxs)(o.aY,{className:"space-y-4",children:[(0,n.jsxs)("p",{className:"text-sm text-gray-600 mb-3",children:["Refer to the"," ",(0,n.jsx)("a",{href:"https://docs.skypilot.co/en/latest/reference/config.html",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline",children:"SkyPilot Docs"})," ","for details. Click"," ",(0,n.jsx)("button",{onClick:w,disabled:a||g,className:"text-blue-600 hover:underline underline-offset-2 disabled:text-gray-400 disabled:no-underline",children:"Refresh"})," ","to reset to the latest config on API server."]}),y&&(0,n.jsx)("div",{className:"bg-green-50 border border-green-200 rounded p-4 mb-6",children:(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("div",{className:"flex-shrink-0",children:(0,n.jsx)("svg",{className:"h-5 w-5 text-green-400",viewBox:"0 0 20 20",fill:"currentColor",children:(0,n.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})})}),(0,n.jsx)("div",{className:"ml-3",children:(0,n.jsx)("p",{className:"text-sm font-medium text-green-800",children:"Configuration saved successfully!"})})]})}),b&&(0,n.jsx)("div",{className:"mb-6",children:(0,n.jsx)(f.X,{error:b,title:"Failed to apply new configuration",onDismiss:()=>N(null)})}),(0,n.jsx)("div",{className:"w-full",children:(0,n.jsx)("textarea",{value:s,onChange:e=>l(e.target.value),className:"w-full h-96 p-3 border border-gray-300 rounded font-mono text-sm resize-vertical focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Loading configuration...",disabled:a||g})}),(0,n.jsxs)("div",{className:"flex justify-end space-x-3 pt-3",children:[(0,n.jsx)(d.z,{variant:"outline",onClick:()=>{e.push("/workspaces")},disabled:g,children:"Cancel"}),(0,n.jsx)(d.z,{onClick:C,disabled:a||g||!s.trim(),className:"inline-flex items-center bg-blue-600 hover:bg-blue-700 text-white",children:g?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.Z,{size:16,className:"mr-2"}),"Applying..."]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(h.Z,{className:"w-4 h-4 mr-1.5"}),"Apply"]})})]})]})]})]})]})}},9008:function(e,s,l){e.exports=l(7219)},2003:function(e,s,l){"use strict";l.d(s,{j:function(){return i}});var n=l(512);let t=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,r=n.W,i=(e,s)=>l=>{var n;if((null==s?void 0:s.variants)==null)return r(e,null==l?void 0:l.class,null==l?void 0:l.className);let{variants:i,defaultVariants:a}=s,c=Object.keys(i).map(e=>{let s=null==l?void 0:l[e],n=null==a?void 0:a[e];if(null===s)return null;let r=t(s)||t(n);return i[e][r]}),d=l&&Object.entries(l).reduce((e,s)=>{let[l,n]=s;return void 0===n||(e[l]=n),e},{});return r(e,c,null==s?void 0:null===(n=s.compoundVariants)||void 0===n?void 0:n.reduce((e,s)=>{let{class:l,className:n,...t}=s;return Object.entries(t).every(e=>{let[s,l]=e;return Array.isArray(l)?l.includes({...a,...d}[s]):({...a,...d})[s]===l})?[...e,l,n]:e},[]),null==l?void 0:l.class,null==l?void 0:l.className)}}},function(e){e.O(0,[146,573,320,470,990,888,774,179],function(){return e(e.s=4483)}),_N_E=e.O()}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[588],{3177:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/infra",function(){return r(1090)}])},3266:function(e,t,r){"use strict";r.d(t,{QL:function(){return d},Sl:function(){return c},zd:function(){return o}});var s=r(7294),a=r(5821),n=r(3225);let l={UP:"RUNNING",STOPPED:"STOPPED",INIT:"LAUNCHING",null:"TERMINATED"};async function o(){let{clusterNames:e=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let t=await fetch("".concat(n.f4,"/status"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cluster_names:e,all_users:!0})}),r=t.headers.get("X-Skypilot-Request-ID")||t.headers.get("X-Request-ID"),s=await fetch("".concat(n.f4,"/api/get?request_id=").concat(r)),a=await s.json();return(a.return_value?JSON.parse(a.return_value):[]).map(e=>{let t="",r=t=e.zone?e.zone:e.region;return t&&t.length>25&&(t=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15;if(!e||e.length<=t)return e;if(t<=3)return"...";let r=Math.floor((t-3)/2),s=r+(t-3)%2;return 0===r?e.substring(0,s)+"...":e.substring(0,s)+"..."+e.substring(e.length-r)}(t,25)),{status:l[e.status],cluster:e.name,user:e.user_name,user_hash:e.user_hash,cloud:e.cloud,infra:t?e.cloud+" ("+t+")":e.cloud,full_infra:r?"".concat(e.cloud," (").concat(r,")"):e.cloud,cpus:e.cpus,mem:e.memory,gpus:e.accelerators,resources_str:e.resources_str,resources_str_full:e.resources_str_full,time:new Date(1e3*e.launched_at),num_nodes:e.nodes,workspace:e.workspace,jobs:[],events:[{time:new Date(1e3*e.launched_at),event:"Cluster created."}]}})}catch(e){return console.error("Error fetching clusters:",e),[]}}async function c(e){let{clusterName:t,jobId:r,onNewLog:s,workspace:l}=e;try{let e=(await fetch("".concat(n.f4,"/logs"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({follow:!1,cluster_name:t,job_id:r,override_skypilot_config:{active_workspace:l||"default"}})})).body.getReader();for(;;){let{done:t,value:r}=await e.read();if(t)break;let a=new TextDecoder().decode(r);s(a)}}catch(e){console.error("Error in streamClusterJobLogs:",e),(0,a.C)("Error in streamClusterJobLogs: ".concat(e.message),"error")}}async function i(e){let{clusterName:t,workspace:r}=e;try{let e=await fetch("".concat(n.f4,"/queue"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cluster_name:t,all_users:!0,override_skypilot_config:{active_workspace:r}})}),s=e.headers.get("X-Skypilot-Request-ID")||e.headers.get("X-Request-ID"),a=await fetch("".concat(n.f4,"/api/get?request_id=").concat(s)),l=await a.json();return JSON.parse(l.return_value).map(e=>{let r=e.end_at?e.end_at:Date.now()/1e3,s=0,a=0;return e.submitted_at&&(s=r-e.submitted_at),e.start_at&&(a=r-e.start_at),{id:e.job_id,status:e.status,job:e.job_name,user:e.username,gpus:e.accelerators||{},submitted_at:e.submitted_at?new Date(1e3*e.submitted_at):null,resources:e.resources,cluster:t,total_duration:s,job_duration:a,infra:"",logs:""}})}catch(e){return console.error("Error fetching cluster jobs:",e),[]}}function d(e){let{cluster:t,job:r=null}=e,[a,n]=(0,s.useState)(null),[l,c]=(0,s.useState)(null),[d,u]=(0,s.useState)(!0),[m,h]=(0,s.useState)(!0),f=(0,s.useCallback)(async()=>{if(t)try{u(!0);let e=await o({clusterNames:[t]});return n(e[0]),e[0]}catch(e){console.error("Error fetching cluster data:",e)}finally{u(!1)}return null},[t]),x=(0,s.useCallback)(async e=>{if(t)try{h(!0);let r=await i({clusterName:t,workspace:e||"default"});c(r)}catch(e){console.error("Error fetching cluster job data:",e)}finally{h(!1)}},[t]),g=(0,s.useCallback)(async()=>{let e=await f();e&&await x(e.workspace)},[f,x]);return(0,s.useEffect)(()=>{(async()=>{let e=await f();e&&await x(e.workspace)})()},[t,r,f,x]),{clusterData:a,clusterJobData:l,loading:d||m,refreshData:g}}},8969:function(e,t,r){"use strict";r.d(t,{Ce:function(){return i},NJ:function(){return c},Pr:function(){return o},Vp:function(){return l}});var s=r(7294),a=r(5821),n=r(3225);async function l(){let{allUsers:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let t=(await fetch("".concat(n.f4,"/jobs/queue"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({all_users:e})})).headers.get("X-Skypilot-Request-ID"),r=await fetch("".concat(n.f4,"/api/get?request_id=").concat(t));if(500===r.status){try{let e=await r.json();if(e.detail&&e.detail.error)try{let t=JSON.parse(e.detail.error);if(t.type&&t.type===n.iW)return{jobs:[],controllerStopped:!0}}catch(e){console.error("Error parsing JSON:",e)}}catch(e){console.error("Error parsing JSON:",e)}return{jobs:[],controllerStopped:!1}}let s=await r.json();return{jobs:(s.return_value?JSON.parse(s.return_value):[]).map(e=>{let t=[];e.submitted_at&&t.push({time:new Date(1e3*e.submitted_at),event:"Job submitted."}),e.start_at&&t.push({time:new Date(1e3*e.start_at),event:"Job started."}),e.end_at&&("CANCELLING"==e.status||"CANCELLED"==e.status?t.push({time:new Date(1e3*e.end_at),event:"Job cancelled."}):t.push({time:new Date(1e3*e.end_at),event:"Job completed."})),e.last_recovered_at&&e.last_recovered_at!=e.start_at&&t.push({time:new Date(1e3*e.last_recovered_at),event:"Job recovered."});let r=(e.end_at?e.end_at:Date.now()/1e3)-e.submitted_at,s=e.cloud,a=e.cluster_resources;if(!s){if(e.cluster_resources&&"-"!==e.cluster_resources)try{s=e.cluster_resources.split("(")[0].split("x").pop().trim(),a=e.cluster_resources.replace("".concat(s,"("),"(").replace("x ","x")}catch(e){s="Unknown"}else s="Unknown"}let n="",l=n=e.zone?e.zone:e.region;n&&n.length>15&&(n=n.substring(0,15)+"...");let o=s+" ("+n+")";"-"===n&&(o=s);let c=s+" ("+l+")";return"-"===l&&(c=s),{id:e.job_id,task:e.task_name,name:e.job_name,job_duration:e.job_duration,total_duration:r,workspace:e.workspace,status:e.status,requested_resources:e.resources,resources_str:a,resources_str_full:e.cluster_resources_full||a,cloud:s,infra:o,full_infra:c,recoveries:e.recovery_count,details:e.failure_reason,user:e.user_name,user_hash:e.user_hash,submitted_at:e.submitted_at?new Date(1e3*e.submitted_at):null,events:t}}),controllerStopped:!1}}catch(e){return console.error("Error fetching managed job data:",e),{jobs:[],controllerStopped:!1}}}function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,[t,r]=(0,s.useState)(null),[a,n]=(0,s.useState)(!0);return(0,s.useEffect)(()=>{(async function(){try{n(!0);let e=await l({allUsers:!0});r(e)}catch(e){console.error("Error fetching managed job data:",e)}finally{n(!1)}})()},[e]),{jobData:t,loading:a}}async function c(e){let{jobId:t,controller:r=!1,signal:s,onNewLog:l}=e,o=new Promise(e=>{setTimeout(()=>{e({timeout:!0})},1e4)}),c=(async()=>{try{let e=(await fetch("".concat(n.f4,"/jobs/logs"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({controller:r,follow:!1,job_id:t}),...s?{signal:s}:{}})).body.getReader();try{for(;;){let{done:t,value:r}=await e.read();if(t)break;let s=new TextDecoder().decode(r);l(s)}}finally{e.cancel()}return{timeout:!1}}catch(e){if("AbortError"===e.name)return{timeout:!1};throw e}})();if((await Promise.race([c,o])).timeout){(0,a.C)("Log request for job ".concat(t," timed out after ").concat(1e4,"ms"),"error");return}}async function i(e,t,r){let s="",l="",o="",c={};if("restartcontroller"===e)s="Restarting",l="restarted",o="jobs/queue",c={all_users:!0,refresh:!0},t="controller";else throw Error("Invalid action: ".concat(e));(0,a.C)("".concat(s," job ").concat(t,"..."),"info");try{try{let e=(await fetch("".concat(n.f4,"/").concat(o),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)})).headers.get("X-Skypilot-Request-ID"),i=await fetch("".concat(n.f4,"/api/get?request_id=").concat(e));if(200===i.status)(0,a.C)("Job ".concat(t," ").concat(l," successfully."),"success");else if(500===i.status)try{let e=await i.json();if(e.detail&&e.detail.error)try{let l=JSON.parse(e.detail.error);l.type&&l.type===n.Bo?(0,a.C)("".concat(s," job ").concat(t," is not supported!"),"error",1e4):l.type&&l.type===n.mF?(0,a.C)("Cluster ".concat(r," does not exist."),"error"):l.type&&l.type===n.iW?(0,a.C)("Cluster ".concat(r," is not up."),"error"):(0,a.C)("".concat(s," job ").concat(t," failed: ").concat(l.type),"error")}catch(r){(0,a.C)("".concat(s," job ").concat(t," failed: ").concat(e.detail.error),"error")}else(0,a.C)("".concat(s," job ").concat(t," failed with no details."),"error")}catch(e){(0,a.C)("".concat(s," job ").concat(t," failed with parse error."),"error")}else(0,a.C)("".concat(s," job ").concat(t," failed with status ").concat(i.status,"."),"error")}catch(e){console.error("Fetch error:",e),(0,a.C)("Network error ".concat(s," job ").concat(t,": ").concat(e.message),"error")}}catch(e){console.error("Error in handleStop:",e),(0,a.C)("Critical error ".concat(s," job ").concat(t,": ").concat(e.message),"error")}}},5821:function(e,t,r){"use strict";function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5e3,s=document.getElementById("toast-container");s||((s=document.createElement("div")).id="toast-container",s.className="fixed top-0 right-0 p-4 z-[9999] flex flex-col items-end space-y-2",document.body.appendChild(s));let a=document.createElement("div");switch(a.className="rounded-md border-l-4 p-4 shadow-md flex items-center justify-between max-w-md w-full mb-2 pointer-events-auto",t){case"success":a.className+=" bg-green-100 border-green-500 text-green-800";break;case"error":a.className+=" bg-red-100 border-red-500 text-red-800";break;case"warning":a.className+=" bg-yellow-100 border-yellow-500 text-yellow-800";break;default:a.className+=" bg-blue-100 border-blue-500 text-blue-800"}return a.innerHTML='\n <div class="flex-1 mr-2">\n <p class="text-sm font-medium">'.concat(e,'</p>\n </div>\n <button class="text-gray-500 hover:text-gray-700 focus:outline-none" aria-label="Close toast">\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <line x1="18" y1="6" x2="6" y2="18"></line>\n <line x1="6" y1="6" x2="18" y2="18"></line>\n </svg>\n </button>\n '),s.appendChild(a),a.querySelector("button").addEventListener("click",()=>{s.removeChild(a)}),setTimeout(()=>{s.contains(a)&&s.removeChild(a)},r),a}r.d(t,{C:function(){return s}})},1090:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return k}});var s=r(5893),a=r(7294),n=r(8799),l=r(9470),o=r(3626),c=r(3001),i=r(3225),d=r(3266),u=r(8969);async function m(){try{let[e,t]=await Promise.all([(0,d.zd)(),(0,u.Vp)()]),r=(null==t?void 0:t.jobs)||[],s=[];try{let e=await fetch("".concat(i.f4,"/enabled_clouds"),{method:"GET",headers:{"Content-Type":"application/json"}}),t=e.headers.get("X-Skypilot-Request-ID")||e.headers.get("X-Request-ID"),r=await fetch("".concat(i.f4,"/api/get?request_id=").concat(t)),a=await r.json();s=a.return_value?JSON.parse(a.return_value):[],console.log("Enabled clouds:",s)}catch(e){console.error("Error fetching enabled clouds:",e),s=[]}let a={};i.$m.forEach(e=>{let t=s.includes(e.toLowerCase());a[e]={name:e,clusters:0,jobs:0,enabled:t}}),(e||[]).forEach(e=>{if(e.cloud){let t=e.cloud;a[t]&&(a[t].clusters+=1,a[t].enabled=!0)}}),r.forEach(e=>{if(e.cloud){let t=e.cloud;a[t]&&(a[t].jobs+=1,a[t].enabled=!0)}});let n=i.$m.length,l=Object.values(a).filter(e=>e.enabled).length;return{clouds:Object.values(a).filter(e=>e.enabled).sort((e,t)=>t.clusters-e.clusters||t.jobs-e.jobs),totalClouds:n,enabledClouds:l}}catch(e){return console.error("Error fetching cloud infrastructure:",e),{clouds:[],totalClouds:i.$m.length,enabledClouds:0}}}async function h(){return await p()}async function f(){try{let e=await fetch("".concat(i.f4,"/realtime_kubernetes_gpu_availability"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({context:null,name_filter:null,quantity_filter:null})});if(!e.ok)return console.error("Error fetching Kubernetes context GPUs (in getKubernetesContextGPUs): ".concat(e.status," ").concat(e.statusText)),[];let t=e.headers.get("X-Skypilot-Request-ID")||e.headers.get("x-request-id");if(!t)return console.error("No request ID returned for Kubernetes GPU availability (in getKubernetesContextGPUs)"),[];let r=await fetch("".concat(i.f4,"/api/get?request_id=").concat(t)),s=await r.text();if(500===r.status){try{let e=JSON.parse(s);if(e.detail&&e.detail.error)try{let t=JSON.parse(e.detail.error);console.error("[infra.jsx] getKubernetesContextGPUs: Server error detail:",t.message)}catch(t){console.error("[infra.jsx] getKubernetesContextGPUs: Error parsing server error JSON:",t,"Original error text:",e.detail.error)}}catch(e){console.error("[infra.jsx] getKubernetesContextGPUs: Error parsing 500 error response JSON:",e,"Raw text was:",s)}return[]}let a=JSON.parse(s);return a.return_value?JSON.parse(a.return_value):[]}catch(e){return console.error("[infra.jsx] Outer error in getKubernetesContextGPUs:",e),[]}}async function x(){try{let e=await fetch("".concat(i.f4,"/all_contexts"),{method:"GET",headers:{"Content-Type":"application/json"}});if(!e.ok)return console.error("Error fetching all contexts: ".concat(e.status," ").concat(e.statusText)),[];let t=e.headers.get("X-Skypilot-Request-ID")||e.headers.get("x-request-id");if(!t)return console.error("No request ID returned for /all_contexts"),[];let r=await fetch("".concat(i.f4,"/api/get?request_id=").concat(t)),s=await r.json();return s.return_value?JSON.parse(s.return_value):[]}catch(e){return console.error("[infra.jsx] Error in getAllContexts:",e),[]}}async function g(e){try{let t=await fetch("".concat(i.f4,"/kubernetes_node_info"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({context:e})}),r=t.headers.get("X-Skypilot-Request-ID")||t.headers.get("x-request-id"),s=await fetch("".concat(i.f4,"/api/get?request_id=").concat(r));if(500===s.status){try{let e=await s.json();if(e.detail&&e.detail.error)try{let t=JSON.parse(e.detail.error);console.error("Error fetching Kubernetes per node GPUs:",t.message)}catch(e){console.error("Error parsing JSON:",e)}}catch(e){console.error("Error parsing JSON:",e)}return{}}let a=await s.json();return(a.return_value?JSON.parse(a.return_value):{}).node_info_dict||{}}catch(t){return console.error("[infra.jsx] Error in getKubernetesPerNodeGPUs for context",e,":",t),{}}}async function p(){try{let a=await x();if(!a||0===a.length)return console.log("No contexts found from /all_contexts endpoint."),{allContextNames:[],allGPUs:[],perContextGPUs:[],perNodeGPUs:[]};let n=await f(),l=new Map;n&&n.forEach(e=>{l.set(e[0],e[1])});let o={},c={},i={};for(let n of a){c[n]||(c[n]=[]);let a=l.get(n);if(a&&a.length>0)for(let e of a){let t=e[0],r=e[1].join(", "),s=e[2],a=e[3];t in o?(o[t].gpu_total+=s,o[t].gpu_free+=a):o[t]={gpu_total:s,gpu_free:a,gpu_name:t},c[n].push({gpu_name:t,gpu_requestable_qty_per_node:r,gpu_total:s,gpu_free:a,context:n})}let d=await g(n);if(d&&Object.keys(d).length>0)for(let a in d){var e,t,r,s;let l=d[a],u=l.accelerator_type||"-",m=null!==(r=null===(e=l.total)||void 0===e?void 0:e.accelerator_count)&&void 0!==r?r:0,h=null!==(s=null===(t=l.free)||void 0===t?void 0:t.accelerators_available)&&void 0!==s?s:0;i["".concat(n,"/").concat(a)]={node_name:l.name,gpu_name:u,gpu_total:m,gpu_free:h,context:n},"-"===u||c[n].some(e=>e.gpu_name===u)||(u in o||(o[u]={gpu_total:0,gpu_free:0,gpu_name:u}),c[n].find(e=>e.gpu_name===u)||c[n].push({gpu_name:u,gpu_requestable_qty_per_node:"-",gpu_total:0,gpu_free:0,context:n}))}0===c[n].length&&d&&Object.keys(d).length}return{allContextNames:a.sort(),allGPUs:Object.values(o).sort((e,t)=>e.gpu_name.localeCompare(t.gpu_name)),perContextGPUs:Object.values(c).flat().sort((e,t)=>e.context.localeCompare(t.context)||e.gpu_name.localeCompare(t.gpu_name)),perNodeGPUs:Object.values(i).sort((e,t)=>e.context.localeCompare(t.context)||e.node_name.localeCompare(t.node_name)||e.gpu_name.localeCompare(t.gpu_name))}}catch(e){return console.error("[infra.jsx] Outer error in getKubernetesGPUs:",e),{allContextNames:[],allGPUs:[],perContextGPUs:[],perNodeGPUs:[]}}}var b=r(1163),y=r(1664),j=r.n(y),_=r(6989);function N(e){let{title:t,isLoading:r,isDataLoaded:a,contexts:l,gpus:o,groupedPerContextGPUs:c,groupedPerNodeGPUs:i,handleContextClick:d,isSSH:u=!1}=e;return r&&!a?(0,s.jsx)("div",{className:"rounded-lg border bg-card text-card-foreground shadow-sm mb-6",children:(0,s.jsxs)("div",{className:"p-5",children:[(0,s.jsx)("h3",{className:"text-lg font-semibold mb-4",children:t}),(0,s.jsxs)("div",{className:"flex items-center justify-center py-6",children:[(0,s.jsx)(n.Z,{size:24,className:"mr-3"}),(0,s.jsxs)("span",{className:"text-gray-500",children:["Loading ",t,"..."]})]})]})}):a&&0===l.length?(0,s.jsx)("div",{className:"rounded-lg border bg-card text-card-foreground shadow-sm mb-6",children:(0,s.jsxs)("div",{className:"p-5",children:[(0,s.jsx)("h3",{className:"text-lg font-semibold mb-4",children:t}),(0,s.jsxs)("p",{className:"text-sm text-gray-500",children:["No ",t," found."]})]})}):a&&l.length>0?(0,s.jsx)("div",{className:"rounded-lg border bg-card text-card-foreground shadow-sm mb-6",children:(0,s.jsxs)("div",{className:"p-5",children:[(0,s.jsxs)("div",{className:"flex items-center mb-4",children:[(0,s.jsx)("h3",{className:"text-lg font-semibold",children:t}),(0,s.jsxs)("span",{className:"ml-2 px-2 py-0.5 bg-blue-100 text-blue-800 rounded-full text-xs font-medium",children:[l.length," ",1===l.length?u?"pool":"context":u?"pools":"contexts"]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[(0,s.jsx)("div",{children:(0,s.jsx)("div",{className:"overflow-x-auto rounded-md border border-gray-200 shadow-sm bg-white",children:(0,s.jsxs)("table",{className:"min-w-full text-sm",children:[(0,s.jsx)("thead",{className:"bg-gray-50",children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-1/3",children:u?"Node Pool":"Context"}),(0,s.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-1/6",children:"Nodes"}),(0,s.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-1/3",children:"GPU Types"}),(0,s.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-1/6",children:"#GPUs"})]})}),(0,s.jsx)("tbody",{className:"bg-white divide-y divide-gray-200 ".concat(l.length>5?"max-h-[250px] overflow-y-auto block":""),children:l.map(e=>{let t=c[e]||[],r=i[e]||[],a=t.reduce((e,t)=>e+(t.gpu_total||0),0),n=Object.keys(t.reduce((e,t)=>(e[t.gpu_name]=(e[t.gpu_name]||0)+(t.gpu_total||0),e),{})).join(", "),l=u?e.replace(/^ssh-/,""):e;return(0,s.jsxs)("tr",{className:"hover:bg-gray-50",children:[(0,s.jsx)("td",{className:"p-3",children:(0,s.jsx)(_.Md,{content:l,className:"text-sm text-muted-foreground",children:(0,s.jsx)("span",{className:"text-blue-600 hover:underline cursor-pointer",onClick:()=>d(e),children:l.length>30?"".concat(l.substring(0,Math.floor(13.5)),"...").concat(l.substring(l.length-Math.ceil(13.5))):l})})}),(0,s.jsx)("td",{className:"p-3",children:r.length}),(0,s.jsx)("td",{className:"p-3",children:n||"-"}),(0,s.jsx)("td",{className:"p-3",children:a})]},e)})})]})})}),o.length>0&&(0,s.jsx)("div",{children:(0,s.jsx)("div",{className:"overflow-x-auto rounded-md border border-gray-200 shadow-sm bg-white",children:(0,s.jsxs)("table",{className:"min-w-full text-sm",children:[(0,s.jsx)("thead",{className:"bg-gray-50",children:(0,s.jsxs)("tr",{children:[(0,s.jsxs)("th",{className:"p-3 text-left font-medium text-gray-600 w-1/4 whitespace-nowrap",children:["GPU",(0,s.jsxs)("span",{className:"ml-2 px-2 py-0.5 bg-green-100 text-green-800 rounded-full text-xs font-medium whitespace-nowrap",children:[o.reduce((e,t)=>e+t.gpu_free,0)," ","of"," ",o.reduce((e,t)=>e+t.gpu_total,0)," ","free"]})]}),(0,s.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-1/4",children:"Requestable"}),(0,s.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-1/2",children:(0,s.jsx)("div",{className:"flex items-center",children:(0,s.jsx)("span",{children:"Utilization"})})})]})}),(0,s.jsx)("tbody",{className:"bg-white divide-y divide-gray-200 ".concat(o.length>5?"max-h-[250px] overflow-y-auto block":""),children:o.map(e=>{let t=e.gpu_total-e.gpu_free,r=e.gpu_total>0?e.gpu_free/e.gpu_total*100:0,a=e.gpu_total>0?t/e.gpu_total*100:0,n=c?Object.values(c).flat().filter(t=>t.gpu_name===e.gpu_name&&(u?t.context.startsWith("ssh-"):!t.context.startsWith("ssh-"))).map(e=>e.gpu_requestable_qty_per_node).filter((e,t,r)=>r.indexOf(e)===t).join(", "):"-";return(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{className:"p-3 font-medium w-24 whitespace-nowrap",children:e.gpu_name}),(0,s.jsxs)("td",{className:"p-3 text-xs text-gray-600",children:[n||"-"," / node"]}),(0,s.jsx)("td",{className:"p-3 w-2/3",children:(0,s.jsx)("div",{className:"flex items-center gap-3",children:(0,s.jsxs)("div",{className:"flex-1 bg-gray-100 rounded-md h-5 flex overflow-hidden shadow-sm min-w-[100px] w-full",children:[a>0&&(0,s.jsx)("div",{style:{width:"".concat(a,"%")},className:"bg-yellow-500 h-full flex items-center justify-center text-white text-xs font-medium",children:a>15&&"".concat(t," used")}),r>0&&(0,s.jsx)("div",{style:{width:"".concat(r,"%")},className:"bg-green-700 h-full flex items-center justify-center text-white text-xs font-medium",children:r>15&&"".concat(e.gpu_free," free")})]})})})]},e.gpu_name)})})]})})})]})]})}):null}function w(e){let{contextName:t,gpusInContext:r,nodesInContext:a}=e;return t.startsWith("ssh-"),(0,s.jsx)("div",{className:"mb-4",children:(0,s.jsx)("div",{className:"rounded-lg border bg-card text-card-foreground shadow-sm h-full",children:(0,s.jsxs)("div",{className:"p-5",children:[(0,s.jsx)("h4",{className:"text-lg font-semibold mb-4",children:"Available GPUs"}),(0,s.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 mb-6",children:r.map(e=>{let t=e.gpu_total-e.gpu_free,r=e.gpu_total>0?e.gpu_free/e.gpu_total*100:0,a=e.gpu_total>0?t/e.gpu_total*100:0;return(0,s.jsxs)("div",{className:"p-3 bg-gray-50 rounded-md border border-gray-200 shadow-sm",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-1.5 flex-wrap",children:[(0,s.jsxs)("div",{className:"font-medium text-gray-800 text-sm",children:[e.gpu_name,(0,s.jsxs)("span",{className:"text-xs text-gray-500 ml-2",children:["(Requestable: ",e.gpu_requestable_qty_per_node," / node)"]})]}),(0,s.jsxs)("span",{className:"text-xs font-medium",children:[e.gpu_free," free / ",e.gpu_total," total"]})]}),(0,s.jsxs)("div",{className:"w-full bg-gray-100 rounded-md h-4 flex overflow-hidden shadow-sm",children:[a>0&&(0,s.jsx)("div",{style:{width:"".concat(a,"%")},className:"bg-yellow-500 h-full flex items-center justify-center text-white text-xs",children:a>15&&"".concat(t," used")}),r>0&&(0,s.jsx)("div",{style:{width:"".concat(r,"%")},className:"bg-green-700 h-full flex items-center justify-center text-white text-xs",children:r>15&&"".concat(e.gpu_free," free")})]})]},e.gpu_name)})}),a.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h4",{className:"text-lg font-semibold mb-4",children:"Nodes"}),(0,s.jsx)("div",{className:"overflow-x-auto rounded-md border border-gray-200 shadow-sm",children:(0,s.jsxs)("table",{className:"min-w-full text-sm",children:[(0,s.jsx)("thead",{className:"bg-gray-100",children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"p-3 text-left font-medium text-gray-600",children:"Node"}),(0,s.jsx)("th",{className:"p-3 text-left font-medium text-gray-600",children:"GPU"}),(0,s.jsx)("th",{className:"p-3 text-right font-medium text-gray-600",children:"Availability"})]})}),(0,s.jsx)("tbody",{className:"bg-white divide-y divide-gray-200",children:a.map((e,t)=>(0,s.jsxs)("tr",{className:"hover:bg-gray-50",children:[(0,s.jsx)("td",{className:"p-3 whitespace-nowrap text-gray-700",children:e.node_name}),(0,s.jsx)("td",{className:"p-3 whitespace-nowrap text-gray-700",children:e.gpu_name}),(0,s.jsx)("td",{className:"p-3 whitespace-nowrap text-right text-gray-700",children:"".concat(e.gpu_free," of ").concat(e.gpu_total," free")})]},"".concat(e.node_name,"-").concat(t)))})]})})]})]})})})}function v(){let[e,t]=(0,a.useState)(!0),[r,i]=(0,a.useState)(!0),[d,u]=(0,a.useState)(!0),f=a.useRef(null),x=(0,c.X)(),[g,p]=(0,a.useState)(!1),[y,_]=(0,a.useState)(!1),v=(0,b.useRouter)(),[C,S]=(0,a.useState)([]),[k,P]=(0,a.useState)([]),[E,O]=(0,a.useState)([]),[q,U]=(0,a.useState)([]),[G,J]=(0,a.useState)([]),[D,T]=(0,a.useState)(0),[I,R]=(0,a.useState)(0),[L,K]=(0,a.useState)(null),X=a.useCallback(async()=>{t(!0),i(!0);try{let{allContextNames:e,allGPUs:t,perContextGPUs:r,perNodeGPUs:s}=await h();S(e||[]),P(t||[]),O(r||[]),U(s||[]),p(!0)}catch(e){console.error("Error fetching Kubernetes data:",e),S([]),P([]),O([]),U([])}finally{t(!1)}try{let e=await m();J((null==e?void 0:e.clouds)||[]),T((null==e?void 0:e.totalClouds)||0),R((null==e?void 0:e.enabledClouds)||0),_(!0)}catch(e){console.error("Error fetching cloud infrastructure data:",e),J([]),T(0),R(0)}finally{i(!1),d&&u(!1)}},[d]);a.useEffect(()=>{f&&(f.current=X)},[f,X]),(0,a.useEffect)(()=>{let e=!0;X();let t=setInterval(()=>{e&&X()},6e4);return()=>{e=!1,clearInterval(t)}},[X]),k.length,k.reduce((e,t)=>e+t.gpu_total,0),k.reduce((e,t)=>e+t.gpu_free,0);let z=a.useMemo(()=>E?E.reduce((e,t)=>{let{context:r}=t;return e[r]||(e[r]=[]),e[r].push(t),e},{}):{},[E]),M=a.useMemo(()=>C.filter(e=>e.startsWith("ssh-")),[C]),A=a.useMemo(()=>C.filter(e=>!e.startsWith("ssh-")),[C]),W=a.useMemo(()=>{if(!E)return[];let e=new Set;return E.forEach(t=>{t.context.startsWith("ssh-")&&e.add(t.gpu_name)}),k.filter(t=>e.has(t.gpu_name))},[k,E]),F=a.useMemo(()=>{if(!E)return[];let e=new Set;return E.forEach(t=>{t.context.startsWith("ssh-")||e.add(t.gpu_name)}),k.filter(t=>e.has(t.gpu_name))},[k,E]),H=a.useMemo(()=>q?q.reduce((e,t)=>{let{context:r}=t;return e[r]||(e[r]=[]),e[r].push(t),e},{}):{},[q]);(0,a.useEffect)(()=>{v.query.context&&K(decodeURIComponent(Array.isArray(v.query.context)?v.query.context[0]:v.query.context))},[v.isReady,v.query]);let Z=e=>{K(e),v.replace({pathname:"/infra",query:e?{context:e}:void 0},e?"/infra/".concat(encodeURIComponent(e)):"/infra",{shallow:!0})},$=()=>{K(null),v.replace({pathname:"/infra"},"/infra",{shallow:!0})};(0,a.useEffect)(()=>{let e=e=>{let t=e.match(/\/infra\/([^\/]+)$/);t?K(decodeURIComponent(t[1])):"/infra"===e&&K(null)};return v.events.on("routeChangeComplete",e),()=>{v.events.off("routeChangeComplete",e)}},[v.events]);let B=e||r;return(0,s.jsxs)(l.A,{highlighted:"infra",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,s.jsxs)("div",{className:"text-base flex items-center",children:[(0,s.jsx)(j(),{href:"/infra",className:"text-sky-blue hover:underline ".concat(L?"":"cursor-default"),onClick:e=>{L&&(e.preventDefault(),$())},children:"Infrastructure"}),L&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"mx-2 text-gray-500",children:"›"}),L.startsWith("ssh-")?(0,s.jsx)("span",{className:"text-sky-blue hover:underline cursor-pointer",onClick:e=>{e.preventDefault(),$()},children:"SSH Node Pool"}):(0,s.jsx)("span",{className:"text-sky-blue hover:underline cursor-pointer",onClick:e=>{e.preventDefault(),$()},children:"Kubernetes"}),(0,s.jsx)("span",{className:"mx-2 text-gray-500",children:"›"}),(0,s.jsx)("span",{className:"text-sky-blue",children:L.startsWith("ssh-")?L.replace(/^ssh-/,""):L})]})]}),(0,s.jsxs)("div",{className:"flex items-center",children:[B&&(0,s.jsxs)("div",{className:"flex items-center mr-2",children:[(0,s.jsx)(n.Z,{size:15,className:"mt-0"}),(0,s.jsx)("span",{className:"ml-2 text-gray-500",children:"Loading..."})]}),(0,s.jsxs)("button",{onClick:()=>{f.current&&(u(!1),f.current())},disabled:B,className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:[(0,s.jsx)(o.Z,{className:"h-4 w-4 mr-1.5"}),!x&&"Refresh"]})]})]}),L?e&&!g?(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center h-64",children:[(0,s.jsx)(n.Z,{size:32,className:"mb-4"}),(0,s.jsx)("span",{className:"text-gray-500 text-lg",children:"Loading Context..."})]}):(t=>{let r=z[t]||[],a=H[t]||[];return e&&!g?(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center h-64",children:[(0,s.jsx)(n.Z,{size:32,className:"mb-4"}),(0,s.jsx)("span",{className:"text-gray-500 text-lg",children:"Loading Context..."})]}):(0,s.jsx)(w,{contextName:t,gpusInContext:r,nodesInContext:a})})(L):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(N,{title:"SSH Node Pool",isLoading:e,isDataLoaded:g,contexts:M,gpus:W,groupedPerContextGPUs:z,groupedPerNodeGPUs:H,handleContextClick:Z,isSSH:!0}),(0,s.jsx)(N,{title:"Kubernetes",isLoading:e,isDataLoaded:g,contexts:A,gpus:F,groupedPerContextGPUs:z,groupedPerNodeGPUs:H,handleContextClick:Z,isSSH:!1}),r&&!y?(0,s.jsx)("div",{className:"rounded-lg border bg-card text-card-foreground shadow-sm mb-6",children:(0,s.jsxs)("div",{className:"p-5",children:[(0,s.jsx)("h3",{className:"text-lg font-semibold mb-4",children:"Cloud"}),(0,s.jsxs)("div",{className:"flex items-center justify-center py-6",children:[(0,s.jsx)(n.Z,{size:24,className:"mr-3"}),(0,s.jsx)("span",{className:"text-gray-500",children:"Loading Cloud..."})]})]})}):(0,s.jsx)("div",{className:"rounded-lg border bg-card text-card-foreground shadow-sm mb-6",children:(0,s.jsxs)("div",{className:"p-5",children:[(0,s.jsxs)("div",{className:"flex items-center mb-4",children:[(0,s.jsx)("h3",{className:"text-lg font-semibold",children:"Cloud"}),(0,s.jsxs)("span",{className:"ml-2 px-2 py-0.5 bg-blue-100 text-blue-800 rounded-full text-xs font-medium",children:[I," of ",D," enabled"]})]}),0===G.length?(0,s.jsx)("p",{className:"text-sm text-gray-500",children:"No enabled clouds available."}):(0,s.jsx)("div",{className:"overflow-x-auto rounded-md border border-gray-200 shadow-sm bg-white",children:(0,s.jsxs)("table",{className:"min-w-full text-sm",children:[(0,s.jsx)("thead",{className:"bg-gray-50",children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-32",children:"Cloud"}),(0,s.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-24",children:"Clusters"}),(0,s.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-24",children:"Jobs"})]})}),(0,s.jsx)("tbody",{className:"bg-white divide-y divide-gray-200",children:G.map(e=>(0,s.jsxs)("tr",{className:"hover:bg-gray-50",children:[(0,s.jsx)("td",{className:"p-3 font-medium text-gray-700",children:e.name}),(0,s.jsx)("td",{className:"p-3",children:e.clusters>0?(0,s.jsx)("span",{className:"px-2 py-0.5 bg-blue-100 text-blue-800 rounded text-xs font-medium",children:e.clusters}):(0,s.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-500 rounded text-xs font-medium",children:"0"})}),(0,s.jsx)("td",{className:"p-3",children:e.jobs>0?(0,s.jsx)("span",{className:"px-2 py-0.5 bg-green-100 text-green-800 rounded text-xs font-medium",children:e.jobs}):(0,s.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-500 rounded text-xs font-medium",children:"0"})})]},e.name))})]})})]})})]})]})}var C=r(9008),S=r.n(C);function k(){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(S(),{children:(0,s.jsx)("title",{children:"Infra | SkyPilot Dashboard"})}),(0,s.jsx)(v,{})]})}},9008:function(e,t,r){e.exports=r(7219)}},function(e){e.O(0,[573,470,888,774,179],function(){return e(e.s=3177)}),_N_E=e.O()}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[315],{479:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/jobs/[job]",function(){return s(8099)}])},9307:function(e,t,s){"use strict";s.d(t,{Cl:function(){return c},OE:function(){return d}});var r=s(5893);s(7294);var n=s(8799),a=s(6989),o=s(3850);let c=e=>{switch(e){case"LAUNCHING":return"bg-blue-100 text-sky-blue";case"RUNNING":return"bg-green-50 text-green-700";case"STOPPED":return"bg-yellow-100 text-yellow-800";case"TERMINATED":default:return"bg-gray-100 text-gray-800";case"PENDING":case"CANCELLED":case"CANCELLING":return"bg-yellow-50 text-yellow-700";case"SUCCEEDED":return"bg-blue-50 text-blue-700";case"FAILED":case"FAILED_PRECHECKS":case"FAILED_NO_RESOURCE":case"FAILED_CONTROLLER":return"bg-red-50 text-red-700";case"RECOVERING":return"bg-orange-50 text-orange-700";case"SUBMITTED":return"bg-indigo-50 text-indigo-700";case"STARTING":return"bg-cyan-50 text-cyan-700";case"FAILED_SETUP":return"bg-pink-50 text-pink-700"}},l=e=>{switch(e){case"LAUNCHING":case"STARTING":return(0,r.jsx)(n.Z,{size:12,className:"w-3 h-3 mr-1"});case"RUNNING":default:return(0,r.jsx)(o.W2,{className:"w-3 h-3 mr-1"});case"STOPPED":return(0,r.jsx)(o.fp,{className:"w-3 h-3 mr-1"});case"TERMINATED":case"FAILED":case"CANCELLED":return(0,r.jsx)(o.Ps,{className:"w-3 h-3 mr-1"});case"SUCCEEDED":return(0,r.jsx)(o.Ye,{className:"w-3 h-3 mr-1"});case"PENDING":case"RECOVERING":case"SUBMITTED":case"CANCELLING":case"FAILED_SETUP":case"FAILED_PRECHECKS":case"FAILED_NO_RESOURCE":case"FAILED_CONTROLLER":return(0,r.jsx)(o.J$,{className:"w-3 h-3 mr-1"})}},i=e=>{let t=c(e),s=l(e);return(0,r.jsxs)("span",{className:"".concat("inline-flex items-center px-2 py-1 rounded-full text-sm"," ").concat(t),children:[s,e]})},d=e=>{let{status:t}=e;return(0,r.jsx)(a.WH,{content:t,className:"text-muted-foreground text-sm",children:(0,r.jsx)("span",{children:i(t)})})}},7673:function(e,t,s){"use strict";s.d(t,{Ol:function(){return i},Zb:function(){return l},aY:function(){return m},eW:function(){return f},ll:function(){return d}});var r=s(5893),n=s(7294),a=s(5697),o=s.n(a),c=s(2350);let l=n.forwardRef((e,t)=>{let{className:s,children:n,...a}=e;return(0,r.jsx)("div",{ref:t,className:(0,c.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",s),...a,children:n})});l.displayName="Card",l.propTypes={className:o().string,children:o().node};let i=n.forwardRef((e,t)=>{let{className:s,children:n,...a}=e;return(0,r.jsx)("div",{ref:t,className:(0,c.cn)("flex flex-col space-y-1.5 p-6",s),...a,children:n})});i.displayName="CardHeader",i.propTypes={className:o().string,children:o().node};let d=n.forwardRef((e,t)=>{let{className:s,children:n,...a}=e;return(0,r.jsx)("h3",{ref:t,className:(0,c.cn)("text-2xl font-semibold leading-none tracking-tight",s),...a,children:n})});d.displayName="CardTitle",d.propTypes={className:o().string,children:o().node};let u=n.forwardRef((e,t)=>{let{className:s,children:n,...a}=e;return(0,r.jsx)("p",{ref:t,className:(0,c.cn)("text-sm text-muted-foreground",s),...a,children:n})});u.displayName="CardDescription",u.propTypes={className:o().string,children:o().node};let m=n.forwardRef((e,t)=>{let{className:s,children:n,...a}=e;return(0,r.jsx)("div",{ref:t,className:(0,c.cn)("p-6 pt-0",s),...a,children:n})});m.displayName="CardContent",m.propTypes={className:o().string,children:o().node};let f=n.forwardRef((e,t)=>{let{className:s,children:n,...a}=e;return(0,r.jsx)("div",{ref:t,className:(0,c.cn)("flex items-center p-6 pt-0",s),...a,children:n})});f.displayName="CardFooter",f.propTypes={className:o().string,children:o().node}},8969:function(e,t,s){"use strict";s.d(t,{Ce:function(){return i},NJ:function(){return l},Pr:function(){return c},Vp:function(){return o}});var r=s(7294),n=s(5821),a=s(3225);async function o(){let{allUsers:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let t=(await fetch("".concat(a.f4,"/jobs/queue"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({all_users:e})})).headers.get("X-Skypilot-Request-ID"),s=await fetch("".concat(a.f4,"/api/get?request_id=").concat(t));if(500===s.status){try{let e=await s.json();if(e.detail&&e.detail.error)try{let t=JSON.parse(e.detail.error);if(t.type&&t.type===a.iW)return{jobs:[],controllerStopped:!0}}catch(e){console.error("Error parsing JSON:",e)}}catch(e){console.error("Error parsing JSON:",e)}return{jobs:[],controllerStopped:!1}}let r=await s.json();return{jobs:(r.return_value?JSON.parse(r.return_value):[]).map(e=>{let t=[];e.submitted_at&&t.push({time:new Date(1e3*e.submitted_at),event:"Job submitted."}),e.start_at&&t.push({time:new Date(1e3*e.start_at),event:"Job started."}),e.end_at&&("CANCELLING"==e.status||"CANCELLED"==e.status?t.push({time:new Date(1e3*e.end_at),event:"Job cancelled."}):t.push({time:new Date(1e3*e.end_at),event:"Job completed."})),e.last_recovered_at&&e.last_recovered_at!=e.start_at&&t.push({time:new Date(1e3*e.last_recovered_at),event:"Job recovered."});let s=(e.end_at?e.end_at:Date.now()/1e3)-e.submitted_at,r=e.cloud,n=e.cluster_resources;if(!r){if(e.cluster_resources&&"-"!==e.cluster_resources)try{r=e.cluster_resources.split("(")[0].split("x").pop().trim(),n=e.cluster_resources.replace("".concat(r,"("),"(").replace("x ","x")}catch(e){r="Unknown"}else r="Unknown"}let a="",o=a=e.zone?e.zone:e.region;a&&a.length>15&&(a=a.substring(0,15)+"...");let c=r+" ("+a+")";"-"===a&&(c=r);let l=r+" ("+o+")";return"-"===o&&(l=r),{id:e.job_id,task:e.task_name,name:e.job_name,job_duration:e.job_duration,total_duration:s,workspace:e.workspace,status:e.status,requested_resources:e.resources,resources_str:n,resources_str_full:e.cluster_resources_full||n,cloud:r,infra:c,full_infra:l,recoveries:e.recovery_count,details:e.failure_reason,user:e.user_name,user_hash:e.user_hash,submitted_at:e.submitted_at?new Date(1e3*e.submitted_at):null,events:t}}),controllerStopped:!1}}catch(e){return console.error("Error fetching managed job data:",e),{jobs:[],controllerStopped:!1}}}function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,[t,s]=(0,r.useState)(null),[n,a]=(0,r.useState)(!0);return(0,r.useEffect)(()=>{(async function(){try{a(!0);let e=await o({allUsers:!0});s(e)}catch(e){console.error("Error fetching managed job data:",e)}finally{a(!1)}})()},[e]),{jobData:t,loading:n}}async function l(e){let{jobId:t,controller:s=!1,signal:r,onNewLog:o}=e,c=new Promise(e=>{setTimeout(()=>{e({timeout:!0})},1e4)}),l=(async()=>{try{let e=(await fetch("".concat(a.f4,"/jobs/logs"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({controller:s,follow:!1,job_id:t}),...r?{signal:r}:{}})).body.getReader();try{for(;;){let{done:t,value:s}=await e.read();if(t)break;let r=new TextDecoder().decode(s);o(r)}}finally{e.cancel()}return{timeout:!1}}catch(e){if("AbortError"===e.name)return{timeout:!1};throw e}})();if((await Promise.race([l,c])).timeout){(0,n.C)("Log request for job ".concat(t," timed out after ").concat(1e4,"ms"),"error");return}}async function i(e,t,s){let r="",o="",c="",l={};if("restartcontroller"===e)r="Restarting",o="restarted",c="jobs/queue",l={all_users:!0,refresh:!0},t="controller";else throw Error("Invalid action: ".concat(e));(0,n.C)("".concat(r," job ").concat(t,"..."),"info");try{try{let e=(await fetch("".concat(a.f4,"/").concat(c),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)})).headers.get("X-Skypilot-Request-ID"),i=await fetch("".concat(a.f4,"/api/get?request_id=").concat(e));if(200===i.status)(0,n.C)("Job ".concat(t," ").concat(o," successfully."),"success");else if(500===i.status)try{let e=await i.json();if(e.detail&&e.detail.error)try{let o=JSON.parse(e.detail.error);o.type&&o.type===a.Bo?(0,n.C)("".concat(r," job ").concat(t," is not supported!"),"error",1e4):o.type&&o.type===a.mF?(0,n.C)("Cluster ".concat(s," does not exist."),"error"):o.type&&o.type===a.iW?(0,n.C)("Cluster ".concat(s," is not up."),"error"):(0,n.C)("".concat(r," job ").concat(t," failed: ").concat(o.type),"error")}catch(s){(0,n.C)("".concat(r," job ").concat(t," failed: ").concat(e.detail.error),"error")}else(0,n.C)("".concat(r," job ").concat(t," failed with no details."),"error")}catch(e){(0,n.C)("".concat(r," job ").concat(t," failed with parse error."),"error")}else(0,n.C)("".concat(r," job ").concat(t," failed with status ").concat(i.status,"."),"error")}catch(e){console.error("Fetch error:",e),(0,n.C)("Network error ".concat(r," job ").concat(t,": ").concat(e.message),"error")}}catch(e){console.error("Error in handleStop:",e),(0,n.C)("Critical error ".concat(r," job ").concat(t,": ").concat(e.message),"error")}}},5821:function(e,t,s){"use strict";function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5e3,r=document.getElementById("toast-container");r||((r=document.createElement("div")).id="toast-container",r.className="fixed top-0 right-0 p-4 z-[9999] flex flex-col items-end space-y-2",document.body.appendChild(r));let n=document.createElement("div");switch(n.className="rounded-md border-l-4 p-4 shadow-md flex items-center justify-between max-w-md w-full mb-2 pointer-events-auto",t){case"success":n.className+=" bg-green-100 border-green-500 text-green-800";break;case"error":n.className+=" bg-red-100 border-red-500 text-red-800";break;case"warning":n.className+=" bg-yellow-100 border-yellow-500 text-yellow-800";break;default:n.className+=" bg-blue-100 border-blue-500 text-blue-800"}return n.innerHTML='\n <div class="flex-1 mr-2">\n <p class="text-sm font-medium">'.concat(e,'</p>\n </div>\n <button class="text-gray-500 hover:text-gray-700 focus:outline-none" aria-label="Close toast">\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <line x1="18" y1="6" x2="6" y2="18"></line>\n <line x1="6" y1="6" x2="18" y2="18"></line>\n </svg>\n </button>\n '),r.appendChild(n),n.querySelector("button").addEventListener("click",()=>{r.removeChild(n)}),setTimeout(()=>{r.contains(n)&&r.removeChild(n)},s),n}s.d(t,{C:function(){return r}})},8099:function(e,t,s){"use strict";s.r(t);var r=s(5893),n=s(7294),a=s(8799),o=s(1163),c=s(9470),l=s(7673),i=s(8969),d=s(1664),u=s.n(d),m=s(3626),f=s(6989),x=s(9307),h=s(3001),g=s(9008),j=s.n(g);function b(e){let{jobData:t,activeTab:s,setIsLoadingLogs:o,setIsLoadingControllerLogs:c,isLoadingLogs:l,isLoadingControllerLogs:d}=e,[m,h]=(0,n.useState)([]),[g,j]=(0,n.useState)([]),b=["PENDING","SUBMITTED","STARTING"].includes(t.status),p=["PENDING","SUBMITTED"].includes(t.status),N=["RECOVERING"].includes(t.status);(0,n.useEffect)(()=>{h([])},[s,t.id]),(0,n.useEffect)(()=>{j([])},[s,t.id]);let y=(0,n.useCallback)((e,t,r,n)=>{let a=!0,o=new AbortController;return"logs"===e&&(b||N)||"controllerlogs"===e&&p?(n(!1),()=>{}):(s===e&&t&&(n(!0),(0,i.NJ)({jobId:t,controller:"controllerlogs"===e,signal:o.signal,onNewLog:e=>{if(a){let t=(0,f.q8)(e);r(e=>[...e,t])}}}).then(()=>{a&&n(!1)}).catch(t=>{a&&("AbortError"!==t.name&&(console.error("Error streaming ".concat(e,":"),t),t.message&&r(e=>[...e,"Error fetching logs: ".concat(t.message)])),n(!1))})),()=>{a=!1})},[s,b,p,N]);return((0,n.useEffect)(()=>y("logs",t.id,h,o),[s,t.id,y,o]),(0,n.useEffect)(()=>y("controllerlogs",t.id,j,c),[s,t.id,y,c]),"logs"===s)?(0,r.jsx)("div",{className:"max-h-96 overflow-y-auto",children:b?(0,r.jsx)("div",{className:"bg-[#f7f7f7] flex items-center justify-center py-4 text-gray-500",children:(0,r.jsx)("span",{children:"Waiting for the job to start, please refresh after a while"})}):N?(0,r.jsx)("div",{className:"bg-[#f7f7f7] flex items-center justify-center py-4 text-gray-500",children:(0,r.jsx)("span",{children:"Waiting for the job to recover, please refresh after a while"})}):l?(0,r.jsxs)("div",{className:"flex items-center justify-center py-4",children:[(0,r.jsx)(a.Z,{size:20,className:"mr-2"}),(0,r.jsx)("span",{children:"Loading..."})]}):(0,r.jsx)(f.$B,{logs:m.join("")})}):"controllerlogs"===s?(0,r.jsx)("div",{className:"max-h-96 overflow-y-auto",children:p?(0,r.jsx)("div",{className:"bg-[#f7f7f7] flex items-center justify-center py-4 text-gray-500",children:(0,r.jsx)("span",{children:"Waiting for the job controller process to start, please refresh after a while"})}):d?(0,r.jsxs)("div",{className:"flex items-center justify-center py-4",children:[(0,r.jsx)(a.Z,{size:20,className:"mr-2"}),(0,r.jsx)("span",{children:"Loading..."})]}):(0,r.jsx)(f.$B,{logs:g.join(""),controller:!0})}):(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Job ID (Name)"}),(0,r.jsxs)("div",{className:"text-base mt-1",children:[t.id," ",t.name?"(".concat(t.name,")"):""]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Status"}),(0,r.jsx)("div",{className:"text-base mt-1",children:(0,r.jsx)(x.OE,{status:t.status})})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"User"}),(0,r.jsx)("div",{className:"text-base mt-1",children:t.user})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Requested Resources"}),(0,r.jsx)("div",{className:"text-base mt-1",children:t.requested_resources||"N/A"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Infra"}),(0,r.jsx)("div",{className:"text-base mt-1",children:t.infra?(0,r.jsx)(f.Md,{content:t.full_infra||t.infra,className:"text-sm text-muted-foreground",children:(0,r.jsxs)("span",{children:[(0,r.jsx)(u(),{href:"/infra",className:"text-blue-600 hover:underline",children:t.cloud||t.infra.split("(")[0].trim()}),t.infra.includes("(")&&(0,r.jsx)("span",{children:" "+t.infra.substring(t.infra.indexOf("("))})]})}):"-"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Resources"}),(0,r.jsx)("div",{className:"text-base mt-1",children:t.resources_str_full||t.resources_str||"-"})]})]})}t.default=function(){var e;let t=(0,o.useRouter)(),{job:s,tab:d}=t.query,[x,g]=(0,n.useState)(0),{jobData:p,loading:N}=(0,i.Pr)(x),[y,v]=(0,n.useState)(!1),[E,w]=(0,n.useState)(!0),[C,_]=(0,n.useState)(!1),[L,S]=(0,n.useState)(!1),[I,D]=(0,n.useState)(!1),[T,R]=(0,n.useState)(!1),[k,O]=(0,n.useState)(!1),[A,P]=(0,n.useState)(0),[J,U]=(0,n.useState)(0),G=(0,h.X)();n.useEffect(()=>{!N&&E&&w(!1)},[N,E]);let F=e=>{let t=document.getElementById(e);t&&t.scrollIntoView({behavior:"smooth"})};(0,n.useEffect)(()=>{R(!0)},[]),(0,n.useEffect)(()=>{if(!k){let e=new MutationObserver(()=>{let t=document.getElementById("logs-section"),s=document.getElementById("controller-logs-section");("logs"===d&&t||"controllerlogs"===d&&s)&&(O(!0),e.disconnect())});return e.observe(document.body,{childList:!0,subtree:!0}),()=>e.disconnect()}},[k,d]),(0,n.useEffect)(()=>{if(t.isReady&&T&&k&&!I){let e=setTimeout(()=>{"logs"===d?(F("logs-section"),D(!0)):"controllerlogs"===d&&(F("controller-logs-section"),D(!0))},800);return()=>clearTimeout(e)}},[t.isReady,d,I,T,k]),(0,n.useEffect)(()=>{D(!1),O(!1)},[d]);let q=async()=>{v(!0);try{g(e=>e+1),P(e=>e+1),U(e=>e+1)}catch(e){console.error("Error refreshing data:",e)}finally{v(!1)}};if(!t.isReady)return(0,r.jsx)("div",{children:"Loading..."});let B=null==p?void 0:null===(e=p.jobs)||void 0===e?void 0:e.find(e=>String(e.id)===String(s)),Z=s?"Job: ".concat(s," | SkyPilot Dashboard"):"Job Details | SkyPilot Dashboard";return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(j(),{children:(0,r.jsx)("title",{children:Z})}),(0,r.jsxs)(c.A,{highlighted:"managed-jobs",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsxs)("div",{className:"text-base flex items-center",children:[(0,r.jsx)(u(),{href:"/jobs",className:"text-sky-blue hover:underline",children:"Managed Jobs"}),(0,r.jsx)("span",{className:"mx-2 text-gray-500",children:"›"}),(0,r.jsxs)(u(),{href:"/jobs/".concat(s),className:"text-sky-blue hover:underline",children:[s," ",(null==B?void 0:B.name)?"(".concat(B.name,")"):""]})]}),(0,r.jsxs)("div",{className:"text-sm flex items-center",children:[(N||y||C||L)&&(0,r.jsxs)("div",{className:"flex items-center mr-4",children:[(0,r.jsx)(a.Z,{size:15,className:"mt-0"}),(0,r.jsx)("span",{className:"ml-2 text-gray-500",children:"Loading..."})]}),(0,r.jsx)(f.WH,{content:"Refresh",className:"text-muted-foreground",children:(0,r.jsxs)("button",{onClick:q,disabled:N||y,className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center h-8",children:[(0,r.jsx)(m.Z,{className:"w-4 h-4 mr-1.5"}),!G&&(0,r.jsx)("span",{children:"Refresh"})]})})]})]}),N&&E?(0,r.jsxs)("div",{className:"flex items-center justify-center py-32",children:[(0,r.jsx)(a.Z,{size:20,className:"mr-2"}),(0,r.jsx)("span",{children:"Loading..."})]}):B?(0,r.jsxs)("div",{className:"space-y-8",children:[(0,r.jsx)("div",{id:"details-section",children:(0,r.jsxs)(l.Zb,{children:[(0,r.jsx)("div",{className:"flex items-center justify-between px-4 pt-4",children:(0,r.jsx)("h3",{className:"text-lg font-semibold",children:"Details"})}),(0,r.jsx)("div",{className:"p-4",children:(0,r.jsx)(b,{jobData:B,activeTab:"info",setIsLoadingLogs:_,setIsLoadingControllerLogs:S,isLoadingLogs:C,isLoadingControllerLogs:L})})]})}),(0,r.jsx)("div",{id:"logs-section",className:"mt-6",children:(0,r.jsxs)(l.Zb,{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-4 pt-4",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold",children:"Logs"}),(0,r.jsx)("span",{className:"ml-2 text-xs text-gray-500",children:"(Logs are not streaming; click refresh to fetch the latest logs.)"})]}),(0,r.jsx)(f.WH,{content:"Refresh logs",className:"text-muted-foreground",children:(0,r.jsx)("button",{onClick:()=>{P(e=>e+1)},disabled:C,className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:(0,r.jsx)(m.Z,{className:"w-4 h-4 ".concat(C?"animate-spin":"")})})})]}),(0,r.jsx)("div",{className:"p-4",children:(0,r.jsx)(b,{jobData:B,activeTab:"logs",setIsLoadingLogs:_,setIsLoadingControllerLogs:S,isLoadingLogs:C,isLoadingControllerLogs:L},A)})]})}),(0,r.jsx)("div",{id:"controller-logs-section",className:"mt-6",children:(0,r.jsxs)(l.Zb,{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-4 pt-4",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold",children:"Controller Logs"}),(0,r.jsx)("span",{className:"ml-2 text-xs text-gray-500",children:"(Logs are not streaming; click refresh to fetch the latest logs.)"})]}),(0,r.jsx)(f.WH,{content:"Refresh controller logs",className:"text-muted-foreground",children:(0,r.jsx)("button",{onClick:()=>{U(e=>e+1)},disabled:L,className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:(0,r.jsx)(m.Z,{className:"w-4 h-4 ".concat(L?"animate-spin":"")})})})]}),(0,r.jsx)("div",{className:"p-4",children:(0,r.jsx)(b,{jobData:B,activeTab:"controllerlogs",setIsLoadingLogs:_,setIsLoadingControllerLogs:S,isLoadingLogs:C,isLoadingControllerLogs:L},J)})]})})]}):(0,r.jsx)("div",{className:"flex items-center justify-center py-32",children:(0,r.jsx)("span",{children:"Job not found"})})]})]})}},9008:function(e,t,s){e.exports=s(7219)}},function(e){e.O(0,[573,470,888,774,179],function(){return e(e.s=479)}),_N_E=e.O()}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[892],{7476:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/users",function(){return r(7823)}])},803:function(e,t,r){"use strict";r.d(t,{z:function(){return i}});var n=r(5893),s=r(7294),a=r(8426),o=r(2003),l=r(2350);let c=(0,o.j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),i=s.forwardRef((e,t)=>{let{className:r,variant:s,size:o,asChild:i=!1,...u}=e,d=i?a.g7:"button";return(0,n.jsx)(d,{className:(0,l.cn)(c({variant:s,size:o,className:r})),ref:t,...u})});i.displayName="Button"},7673:function(e,t,r){"use strict";r.d(t,{Ol:function(){return i},Zb:function(){return c},aY:function(){return f},eW:function(){return m},ll:function(){return u}});var n=r(5893),s=r(7294),a=r(5697),o=r.n(a),l=r(2350);let c=s.forwardRef((e,t)=>{let{className:r,children:s,...a}=e;return(0,n.jsx)("div",{ref:t,className:(0,l.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",r),...a,children:s})});c.displayName="Card",c.propTypes={className:o().string,children:o().node};let i=s.forwardRef((e,t)=>{let{className:r,children:s,...a}=e;return(0,n.jsx)("div",{ref:t,className:(0,l.cn)("flex flex-col space-y-1.5 p-6",r),...a,children:s})});i.displayName="CardHeader",i.propTypes={className:o().string,children:o().node};let u=s.forwardRef((e,t)=>{let{className:r,children:s,...a}=e;return(0,n.jsx)("h3",{ref:t,className:(0,l.cn)("text-2xl font-semibold leading-none tracking-tight",r),...a,children:s})});u.displayName="CardTitle",u.propTypes={className:o().string,children:o().node};let d=s.forwardRef((e,t)=>{let{className:r,children:s,...a}=e;return(0,n.jsx)("p",{ref:t,className:(0,l.cn)("text-sm text-muted-foreground",r),...a,children:s})});d.displayName="CardDescription",d.propTypes={className:o().string,children:o().node};let f=s.forwardRef((e,t)=>{let{className:r,children:s,...a}=e;return(0,n.jsx)("div",{ref:t,className:(0,l.cn)("p-6 pt-0",r),...a,children:s})});f.displayName="CardContent",f.propTypes={className:o().string,children:o().node};let m=s.forwardRef((e,t)=>{let{className:r,children:s,...a}=e;return(0,n.jsx)("div",{ref:t,className:(0,l.cn)("flex items-center p-6 pt-0",r),...a,children:s})});m.displayName="CardFooter",m.propTypes={className:o().string,children:o().node}},8764:function(e,t,r){"use strict";r.d(t,{RM:function(){return c},SC:function(){return i},iA:function(){return o},pj:function(){return d},ss:function(){return u},xD:function(){return l}});var n=r(5893),s=r(7294),a=r(2350);let o=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("div",{className:"relative w-full overflow-auto",children:(0,n.jsx)("table",{ref:t,className:(0,a.cn)("w-full caption-bottom text-base",r),...s})})});o.displayName="Table";let l=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("thead",{ref:t,className:(0,a.cn)("[&_tr]:border-b",r),...s})});l.displayName="TableHeader";let c=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("tbody",{ref:t,className:(0,a.cn)("[&_tr:last-child]:border-0",r),...s})});c.displayName="TableBody",s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("tfoot",{ref:t,className:(0,a.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",r),...s})}).displayName="TableFooter";let i=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("tr",{ref:t,className:(0,a.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",r),...s})});i.displayName="TableRow";let u=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("th",{ref:t,className:(0,a.cn)("h-12 px-4 text-left align-middle font-medium text-[hsl(var(--text-strong))] [&:has([role=checkbox])]:pr-0",r),...s})});u.displayName="TableHead";let d=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("td",{ref:t,className:(0,a.cn)("p-4 align-middle [&:has([role=checkbox])]:pr-0",r),...s})});d.displayName="TableCell",s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("caption",{ref:t,className:(0,a.cn)("mt-4 text-base text-muted-foreground",r),...s})}).displayName="TableCaption"},3266:function(e,t,r){"use strict";r.d(t,{QL:function(){return u},Sl:function(){return c},zd:function(){return l}});var n=r(7294),s=r(5821),a=r(3225);let o={UP:"RUNNING",STOPPED:"STOPPED",INIT:"LAUNCHING",null:"TERMINATED"};async function l(){let{clusterNames:e=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let t=await fetch("".concat(a.f4,"/status"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cluster_names:e,all_users:!0})}),r=t.headers.get("X-Skypilot-Request-ID")||t.headers.get("X-Request-ID"),n=await fetch("".concat(a.f4,"/api/get?request_id=").concat(r)),s=await n.json();return(s.return_value?JSON.parse(s.return_value):[]).map(e=>{let t="",r=t=e.zone?e.zone:e.region;return t&&t.length>25&&(t=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15;if(!e||e.length<=t)return e;if(t<=3)return"...";let r=Math.floor((t-3)/2),n=r+(t-3)%2;return 0===r?e.substring(0,n)+"...":e.substring(0,n)+"..."+e.substring(e.length-r)}(t,25)),{status:o[e.status],cluster:e.name,user:e.user_name,user_hash:e.user_hash,cloud:e.cloud,infra:t?e.cloud+" ("+t+")":e.cloud,full_infra:r?"".concat(e.cloud," (").concat(r,")"):e.cloud,cpus:e.cpus,mem:e.memory,gpus:e.accelerators,resources_str:e.resources_str,resources_str_full:e.resources_str_full,time:new Date(1e3*e.launched_at),num_nodes:e.nodes,workspace:e.workspace,jobs:[],events:[{time:new Date(1e3*e.launched_at),event:"Cluster created."}]}})}catch(e){return console.error("Error fetching clusters:",e),[]}}async function c(e){let{clusterName:t,jobId:r,onNewLog:n,workspace:o}=e;try{let e=(await fetch("".concat(a.f4,"/logs"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({follow:!1,cluster_name:t,job_id:r,override_skypilot_config:{active_workspace:o||"default"}})})).body.getReader();for(;;){let{done:t,value:r}=await e.read();if(t)break;let s=new TextDecoder().decode(r);n(s)}}catch(e){console.error("Error in streamClusterJobLogs:",e),(0,s.C)("Error in streamClusterJobLogs: ".concat(e.message),"error")}}async function i(e){let{clusterName:t,workspace:r}=e;try{let e=await fetch("".concat(a.f4,"/queue"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cluster_name:t,all_users:!0,override_skypilot_config:{active_workspace:r}})}),n=e.headers.get("X-Skypilot-Request-ID")||e.headers.get("X-Request-ID"),s=await fetch("".concat(a.f4,"/api/get?request_id=").concat(n)),o=await s.json();return JSON.parse(o.return_value).map(e=>{let r=e.end_at?e.end_at:Date.now()/1e3,n=0,s=0;return e.submitted_at&&(n=r-e.submitted_at),e.start_at&&(s=r-e.start_at),{id:e.job_id,status:e.status,job:e.job_name,user:e.username,gpus:e.accelerators||{},submitted_at:e.submitted_at?new Date(1e3*e.submitted_at):null,resources:e.resources,cluster:t,total_duration:n,job_duration:s,infra:"",logs:""}})}catch(e){return console.error("Error fetching cluster jobs:",e),[]}}function u(e){let{cluster:t,job:r=null}=e,[s,a]=(0,n.useState)(null),[o,c]=(0,n.useState)(null),[u,d]=(0,n.useState)(!0),[f,m]=(0,n.useState)(!0),p=(0,n.useCallback)(async()=>{if(t)try{d(!0);let e=await l({clusterNames:[t]});return a(e[0]),e[0]}catch(e){console.error("Error fetching cluster data:",e)}finally{d(!1)}return null},[t]),h=(0,n.useCallback)(async e=>{if(t)try{m(!0);let r=await i({clusterName:t,workspace:e||"default"});c(r)}catch(e){console.error("Error fetching cluster job data:",e)}finally{m(!1)}},[t]),b=(0,n.useCallback)(async()=>{let e=await p();e&&await h(e.workspace)},[p,h]);return(0,n.useEffect)(()=>{(async()=>{let e=await p();e&&await h(e.workspace)})()},[t,r,p,h]),{clusterData:s,clusterJobData:o,loading:u||f,refreshData:b}}},8969:function(e,t,r){"use strict";r.d(t,{Ce:function(){return i},NJ:function(){return c},Pr:function(){return l},Vp:function(){return o}});var n=r(7294),s=r(5821),a=r(3225);async function o(){let{allUsers:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let t=(await fetch("".concat(a.f4,"/jobs/queue"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({all_users:e})})).headers.get("X-Skypilot-Request-ID"),r=await fetch("".concat(a.f4,"/api/get?request_id=").concat(t));if(500===r.status){try{let e=await r.json();if(e.detail&&e.detail.error)try{let t=JSON.parse(e.detail.error);if(t.type&&t.type===a.iW)return{jobs:[],controllerStopped:!0}}catch(e){console.error("Error parsing JSON:",e)}}catch(e){console.error("Error parsing JSON:",e)}return{jobs:[],controllerStopped:!1}}let n=await r.json();return{jobs:(n.return_value?JSON.parse(n.return_value):[]).map(e=>{let t=[];e.submitted_at&&t.push({time:new Date(1e3*e.submitted_at),event:"Job submitted."}),e.start_at&&t.push({time:new Date(1e3*e.start_at),event:"Job started."}),e.end_at&&("CANCELLING"==e.status||"CANCELLED"==e.status?t.push({time:new Date(1e3*e.end_at),event:"Job cancelled."}):t.push({time:new Date(1e3*e.end_at),event:"Job completed."})),e.last_recovered_at&&e.last_recovered_at!=e.start_at&&t.push({time:new Date(1e3*e.last_recovered_at),event:"Job recovered."});let r=(e.end_at?e.end_at:Date.now()/1e3)-e.submitted_at,n=e.cloud,s=e.cluster_resources;if(!n){if(e.cluster_resources&&"-"!==e.cluster_resources)try{n=e.cluster_resources.split("(")[0].split("x").pop().trim(),s=e.cluster_resources.replace("".concat(n,"("),"(").replace("x ","x")}catch(e){n="Unknown"}else n="Unknown"}let a="",o=a=e.zone?e.zone:e.region;a&&a.length>15&&(a=a.substring(0,15)+"...");let l=n+" ("+a+")";"-"===a&&(l=n);let c=n+" ("+o+")";return"-"===o&&(c=n),{id:e.job_id,task:e.task_name,name:e.job_name,job_duration:e.job_duration,total_duration:r,workspace:e.workspace,status:e.status,requested_resources:e.resources,resources_str:s,resources_str_full:e.cluster_resources_full||s,cloud:n,infra:l,full_infra:c,recoveries:e.recovery_count,details:e.failure_reason,user:e.user_name,user_hash:e.user_hash,submitted_at:e.submitted_at?new Date(1e3*e.submitted_at):null,events:t}}),controllerStopped:!1}}catch(e){return console.error("Error fetching managed job data:",e),{jobs:[],controllerStopped:!1}}}function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,[t,r]=(0,n.useState)(null),[s,a]=(0,n.useState)(!0);return(0,n.useEffect)(()=>{(async function(){try{a(!0);let e=await o({allUsers:!0});r(e)}catch(e){console.error("Error fetching managed job data:",e)}finally{a(!1)}})()},[e]),{jobData:t,loading:s}}async function c(e){let{jobId:t,controller:r=!1,signal:n,onNewLog:o}=e,l=new Promise(e=>{setTimeout(()=>{e({timeout:!0})},1e4)}),c=(async()=>{try{let e=(await fetch("".concat(a.f4,"/jobs/logs"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({controller:r,follow:!1,job_id:t}),...n?{signal:n}:{}})).body.getReader();try{for(;;){let{done:t,value:r}=await e.read();if(t)break;let n=new TextDecoder().decode(r);o(n)}}finally{e.cancel()}return{timeout:!1}}catch(e){if("AbortError"===e.name)return{timeout:!1};throw e}})();if((await Promise.race([c,l])).timeout){(0,s.C)("Log request for job ".concat(t," timed out after ").concat(1e4,"ms"),"error");return}}async function i(e,t,r){let n="",o="",l="",c={};if("restartcontroller"===e)n="Restarting",o="restarted",l="jobs/queue",c={all_users:!0,refresh:!0},t="controller";else throw Error("Invalid action: ".concat(e));(0,s.C)("".concat(n," job ").concat(t,"..."),"info");try{try{let e=(await fetch("".concat(a.f4,"/").concat(l),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)})).headers.get("X-Skypilot-Request-ID"),i=await fetch("".concat(a.f4,"/api/get?request_id=").concat(e));if(200===i.status)(0,s.C)("Job ".concat(t," ").concat(o," successfully."),"success");else if(500===i.status)try{let e=await i.json();if(e.detail&&e.detail.error)try{let o=JSON.parse(e.detail.error);o.type&&o.type===a.Bo?(0,s.C)("".concat(n," job ").concat(t," is not supported!"),"error",1e4):o.type&&o.type===a.mF?(0,s.C)("Cluster ".concat(r," does not exist."),"error"):o.type&&o.type===a.iW?(0,s.C)("Cluster ".concat(r," is not up."),"error"):(0,s.C)("".concat(n," job ").concat(t," failed: ").concat(o.type),"error")}catch(r){(0,s.C)("".concat(n," job ").concat(t," failed: ").concat(e.detail.error),"error")}else(0,s.C)("".concat(n," job ").concat(t," failed with no details."),"error")}catch(e){(0,s.C)("".concat(n," job ").concat(t," failed with parse error."),"error")}else(0,s.C)("".concat(n," job ").concat(t," failed with status ").concat(i.status,"."),"error")}catch(e){console.error("Fetch error:",e),(0,s.C)("Network error ".concat(n," job ").concat(t,": ").concat(e.message),"error")}}catch(e){console.error("Error in handleStop:",e),(0,s.C)("Critical error ".concat(n," job ").concat(t,": ").concat(e.message),"error")}}},5821:function(e,t,r){"use strict";function n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5e3,n=document.getElementById("toast-container");n||((n=document.createElement("div")).id="toast-container",n.className="fixed top-0 right-0 p-4 z-[9999] flex flex-col items-end space-y-2",document.body.appendChild(n));let s=document.createElement("div");switch(s.className="rounded-md border-l-4 p-4 shadow-md flex items-center justify-between max-w-md w-full mb-2 pointer-events-auto",t){case"success":s.className+=" bg-green-100 border-green-500 text-green-800";break;case"error":s.className+=" bg-red-100 border-red-500 text-red-800";break;case"warning":s.className+=" bg-yellow-100 border-yellow-500 text-yellow-800";break;default:s.className+=" bg-blue-100 border-blue-500 text-blue-800"}return s.innerHTML='\n <div class="flex-1 mr-2">\n <p class="text-sm font-medium">'.concat(e,'</p>\n </div>\n <button class="text-gray-500 hover:text-gray-700 focus:outline-none" aria-label="Close toast">\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <line x1="18" y1="6" x2="6" y2="18"></line>\n <line x1="6" y1="6" x2="18" y2="18"></line>\n </svg>\n </button>\n '),n.appendChild(s),s.querySelector("button").addEventListener("click",()=>{n.removeChild(s)}),setTimeout(()=>{n.contains(s)&&n.removeChild(s)},r),s}r.d(t,{C:function(){return n}})},4545:function(e,t,r){"use strict";function n(e){return e.startsWith("sky-jobs-controller-")}function s(e,t,r){return null===t?e:[...e].sort((e,n)=>e[t]<n[t]?"ascending"===r?-1:1:e[t]>n[t]?"ascending"===r?1:-1:0)}r.d(t,{R0:function(){return s},Ym:function(){return n}})},7823:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return C}});var n=r(5893),s=r(7294),a=r(9008),o=r.n(a),l=r(8799),c=r(1664),i=r.n(c),u=r(803),d=r(8764),f=r(3225);async function m(){try{let e=await fetch("".concat(f.f4,"/users"));if(!e.ok)throw Error("HTTP error! status: ".concat(e.status));return(await e.json()).map(e=>({userId:e.id,username:e.name}))||[]}catch(e){return console.error("Failed to fetch users:",e),[]}}var p=r(3266),h=r(8969),b=r(4545),g=r(3626),y=r(9470),x=r(3001),j=r(7673);let w=e=>e&&e.includes("@")?e.split("@")[0]:e||"N/A",v=e=>e&&e.includes("@")?e:"-";function _(){let[e,t]=(0,s.useState)(!1),r=(0,s.useRef)(null),a=(0,x.X)();return(0,n.jsxs)(y.A,{highlighted:"users",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,n.jsx)("div",{className:"text-base",children:(0,n.jsx)(i(),{href:"/users",className:"text-sky-blue hover:underline leading-none",children:"Users"})}),(0,n.jsxs)("div",{className:"flex items-center",children:[e&&(0,n.jsxs)("div",{className:"flex items-center mr-2",children:[(0,n.jsx)(l.Z,{size:15,className:"mt-0"}),(0,n.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"Loading..."})]}),(0,n.jsxs)(u.z,{variant:"ghost",onClick:()=>{r.current&&r.current()},disabled:e,className:"text-sky-blue hover:text-sky-blue-bright flex items-center px-3 py-1.5 text-sm",children:[(0,n.jsx)(g.Z,{className:"h-4 w-4 mr-1.5"}),!a&&(0,n.jsx)("span",{children:"Refresh"})]})]})]}),(0,n.jsx)(N,{refreshInterval:3e4,setLoading:t,refreshDataRef:r})]})}function N(e){let{refreshInterval:t,setLoading:r,refreshDataRef:a}=e,[o,c]=(0,s.useState)([]),[i,u]=(0,s.useState)(!0),[f,g]=(0,s.useState)({key:"username",direction:"ascending"}),y=(0,s.useCallback)(async()=>{r&&r(!0),u(!0);try{let[e,t,r]=await Promise.all([m(),(0,p.zd)(),(0,h.Vp)()]),n=r.jobs||[],s=(e||[]).map(e=>{let r=(t||[]).filter(t=>t.user_hash===e.userId),s=(n||[]).filter(t=>t.user_hash===e.userId);return{...e,usernameDisplay:w(e.username),fullEmail:v(e.username),clusterCount:r.length,jobCount:s.length}});c(s)}catch(e){console.error("Failed to fetch or process user data:",e),c([])}r&&r(!1),u(!1)},[r]);(0,s.useEffect)(()=>{a&&(a.current=y)},[a,y]),(0,s.useEffect)(()=>{y();let e=setInterval(y,t);return()=>clearInterval(e)},[y,t]);let x=(0,s.useMemo)(()=>(0,b.R0)(o,f.key,f.direction),[o,f]),_=e=>{let t="ascending";f.key===e&&"ascending"===f.direction&&(t="descending"),g({key:e,direction:t})},N=e=>f.key===e?"ascending"===f.direction?" ↑":" ↓":"";return i&&0===o.length?(0,n.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,n.jsx)(l.Z,{})}):x&&0!==x.length?(0,n.jsx)(j.Zb,{children:(0,n.jsxs)(d.iA,{children:[(0,n.jsx)(d.xD,{children:(0,n.jsxs)(d.SC,{children:[(0,n.jsxs)(d.ss,{onClick:()=>_("usernameDisplay"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/4",children:["Name",N("usernameDisplay")]}),(0,n.jsxs)(d.ss,{onClick:()=>_("fullEmail"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/4",children:["Email",N("fullEmail")]}),(0,n.jsxs)(d.ss,{onClick:()=>_("clusterCount"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/4",children:["Clusters",N("clusterCount")]}),(0,n.jsxs)(d.ss,{onClick:()=>_("jobCount"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/4",children:["Jobs",N("jobCount")]})]})}),(0,n.jsx)(d.RM,{children:x.map(e=>(0,n.jsxs)(d.SC,{children:[(0,n.jsx)(d.pj,{className:"truncate",title:e.username,children:e.usernameDisplay}),(0,n.jsx)(d.pj,{className:"truncate",title:e.fullEmail,children:e.fullEmail}),(0,n.jsx)(d.pj,{children:e.clusterCount>0?(0,n.jsx)("span",{className:"px-2 py-0.5 bg-blue-100 text-blue-800 rounded text-xs font-medium",children:e.clusterCount}):(0,n.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-500 rounded text-xs font-medium",children:"0"})}),(0,n.jsx)(d.pj,{children:e.jobCount>0?(0,n.jsx)("span",{className:"px-2 py-0.5 bg-green-100 text-green-800 rounded text-xs font-medium",children:e.jobCount}):(0,n.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-500 rounded text-xs font-medium",children:"0"})})]},e.userId))})]})}):(0,n.jsxs)("div",{className:"text-center py-12",children:[(0,n.jsx)("p",{className:"text-lg font-semibold text-gray-500",children:"No users found."}),(0,n.jsx)("p",{className:"text-sm text-gray-400 mt-1",children:"There are currently no users to display."})]})}function C(){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o(),{children:(0,n.jsx)("title",{children:"Users | SkyPilot Dashboard"})}),(0,n.jsx)(_,{})]})}},9008:function(e,t,r){e.exports=r(7219)},2003:function(e,t,r){"use strict";r.d(t,{j:function(){return o}});var n=r(512);let s=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,a=n.W,o=(e,t)=>r=>{var n;if((null==t?void 0:t.variants)==null)return a(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:o,defaultVariants:l}=t,c=Object.keys(o).map(e=>{let t=null==r?void 0:r[e],n=null==l?void 0:l[e];if(null===t)return null;let a=s(t)||s(n);return o[e][a]}),i=r&&Object.entries(r).reduce((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e},{});return a(e,c,null==t?void 0:null===(n=t.compoundVariants)||void 0===n?void 0:n.reduce((e,t)=>{let{class:r,className:n,...s}=t;return Object.entries(s).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...l,...i}[t]):({...l,...i})[t]===r})?[...e,r,n]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)}}},function(e){e.O(0,[573,470,888,774,179],function(){return e(e.s=7476)}),_N_E=e.O()}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[590],{2592:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/workspaces",function(){return t(9434)}])},1812:function(e,s,t){"use strict";t.d(s,{X:function(){return a}});var l=t(5893),r=t(7294);let n=e=>{if(!(null==e?void 0:e.message))return"An unexpected error occurred.";let s=e.message;return s.includes("failed:")&&(s=s.split("failed:")[1].trim()),s.charAt(0).toUpperCase()+s.slice(1)},a=e=>{let{error:s,title:t="Error",onDismiss:a}=e,[c,i]=(0,r.useState)(!1);if((0,r.useEffect)(()=>{s&&i(!1)},[s]),!s||c)return null;let o="string"==typeof s?s:n(s);return(0,l.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-md p-3 mb-4",children:(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex",children:[(0,l.jsx)("div",{className:"flex-shrink-0",children:(0,l.jsx)("svg",{className:"h-5 w-5 text-red-400",viewBox:"0 0 20 20",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),(0,l.jsx)("div",{className:"ml-3",children:(0,l.jsxs)("div",{className:"text-sm text-red-800",children:[(0,l.jsxs)("strong",{children:[t,":"]})," ",o]})})]}),(0,l.jsx)("button",{onClick:()=>{i(!0),a&&a()},className:"flex-shrink-0 ml-4 text-red-400 hover:text-red-600 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 focus:ring-offset-red-50 rounded","aria-label":"Dismiss error",children:(0,l.jsx)("svg",{className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]})})}},9434:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return y}});var l=t(5893),r=t(7294),n=t(9470),a=t(1163),c=t(3266),i=t(8969),o=t(7324),d=t(7673),x=t(803),u=t(8799),m=t(3320),h=t.n(m),p=t(326),f=t(3850),j=t(1812),g=t(3626),N=t(3001),b=t(8236);let w=e=>{let{workspace:s,onDelete:t,onEdit:r,router:n}=e;return(0,l.jsxs)(d.Zb,{children:[(0,l.jsx)(d.Ol,{children:(0,l.jsxs)(d.ll,{className:"text-base font-normal",children:[(0,l.jsx)("span",{className:"font-semibold",children:"Workspace:"})," ",s.name]})}),(0,l.jsxs)(d.aY,{className:"text-sm pb-2",children:[(0,l.jsxs)("div",{className:"py-2 flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center text-gray-600",children:[(0,l.jsx)(f.QT,{className:"w-4 h-4 mr-2 text-gray-500"}),(0,l.jsx)("span",{children:"Clusters (Running / Total)"})]}),(0,l.jsxs)("button",{onClick:()=>{n.push({pathname:"/clusters",query:{workspace:s.name}})},className:"font-normal text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",children:[s.runningClusterCount," / ",s.totalClusterCount]})]}),(0,l.jsxs)("div",{className:"py-2 flex items-center justify-between border-t border-gray-100",children:[(0,l.jsxs)("div",{className:"flex items-center text-gray-600",children:[(0,l.jsx)(f.Vp,{className:"w-4 h-4 mr-2 text-gray-500"}),(0,l.jsx)("span",{children:"Managed Jobs"})]}),(0,l.jsx)("button",{onClick:()=>{n.push({pathname:"/jobs",query:{workspace:s.name}})},className:"font-normal text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",children:s.managedJobsCount})]})]}),(0,l.jsxs)("div",{className:"px-6 pb-3 text-sm pt-3",children:[(0,l.jsx)("h4",{className:"mb-2 text-xs text-gray-500 tracking-wider",children:"Enabled Infra"}),(0,l.jsx)("div",{className:"flex flex-wrap gap-x-4 gap-y-1",children:s.clouds.map(e=>(0,l.jsxs)("div",{className:"flex items-center text-gray-700",children:[(0,l.jsx)(f.Ye,{className:"w-3.5 h-3.5 mr-1.5 text-green-500"}),(0,l.jsx)("span",{children:e})]},e))})]}),(0,l.jsxs)(d.eW,{className:"flex justify-end pt-3 gap-2",children:[(0,l.jsx)(x.z,{variant:"outline",size:"sm",onClick:()=>t(s.name),disabled:"default"===s.name,title:"default"===s.name?"Cannot delete default workspace":"Delete workspace",className:"text-red-600 hover:text-red-700 hover:bg-red-50",children:"Delete"}),(0,l.jsx)(x.z,{variant:"outline",size:"sm",onClick:()=>r(s.name),children:"Edit"})]})]},s.name)},k=e=>{let{onClick:s}=e;return(0,l.jsx)(d.Zb,{className:"border-2 border-dashed border-sky-300 hover:border-sky-400 cursor-pointer transition-colors flex flex-col",onClick:s,children:(0,l.jsx)("div",{className:"flex-1 flex items-center justify-center p-6",children:(0,l.jsxs)("div",{className:"text-center",children:[(0,l.jsx)("div",{className:"w-16 h-16 rounded-full bg-sky-100 flex items-center justify-center mb-4 mx-auto",children:(0,l.jsx)("span",{className:"text-3xl text-sky-600",children:"+"})}),(0,l.jsx)("h3",{className:"text-lg font-medium text-sky-700 mb-2",children:"Create New Workspace"}),(0,l.jsx)("p",{className:"text-sm text-gray-500",children:"Set up a new workspace with custom infrastructure configurations"})]})})},"create-new")},v=e=>{let{workspaceCount:s,runningClusters:t,totalClusters:r,managedJobs:n,router:a}=e;return(0,l.jsx)("div",{className:"bg-sky-50 p-4 rounded-lg shadow mb-6",children:(0,l.jsxs)("div",{className:"flex flex-col sm:flex-row justify-around items-center",children:[(0,l.jsx)("div",{className:"p-2",children:(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)(f.E9,{className:"w-5 h-5 mr-2 text-sky-600"}),(0,l.jsx)("span",{className:"text-sm text-gray-600",children:"Workspaces:"}),(0,l.jsx)("span",{className:"ml-1 text-xl font-semibold text-sky-700",children:s})]})}),(0,l.jsx)("div",{className:"p-2",children:(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)(f.QT,{className:"w-5 h-5 mr-2 text-sky-600"}),(0,l.jsx)("span",{className:"text-sm text-gray-600",children:"Clusters (Running / Total):"}),(0,l.jsxs)("button",{onClick:()=>a.push("/clusters"),className:"ml-1 text-xl font-semibold text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",children:[t," / ",r]})]})}),(0,l.jsx)("div",{className:"p-2",children:(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)(f.Vp,{className:"w-5 h-5 mr-2 text-sky-600"}),(0,l.jsx)("span",{className:"text-sm text-gray-600",children:"Managed Jobs:"}),(0,l.jsx)("button",{onClick:()=>a.push("/jobs"),className:"ml-1 text-xl font-semibold text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",children:n})]})})]})})};function C(){let[e,s]=(0,r.useState)([]),[t,n]=(0,r.useState)({runningClusters:0,totalClusters:0,managedJobs:0}),[d,m]=(0,r.useState)(!0),[f,C]=(0,r.useState)(null),[y,E]=(0,r.useState)(!1),[z,D]=(0,r.useState)({confirmOpen:!1,workspaceToDelete:null,deleting:!1,error:null}),O=(0,a.useRouter)(),T=(0,N.X)(),_=async()=>{m(!0);try{let[e,t,l]=await Promise.all([(0,o.fX)(),(0,c.zd)(),(0,i.Vp)()]);C(e);let r=Object.keys(e),a=await Promise.all(r.map(e=>(0,o.yz)(e,!0))),d=Object.fromEntries(r.map((e,s)=>[e,a[s]])),x=Object.fromEntries(t.map(e=>[e.cluster,e.workspace||"default"])),u={};r.forEach(e=>{u[e]={name:e,totalClusterCount:0,runningClusterCount:0,managedJobsCount:0,clouds:new Set}});let m=0;t.forEach(e=>{let s=e.workspace||"default";u[s]||(u[s]={name:s,totalClusterCount:0,runningClusterCount:0,managedJobsCount:0,clouds:new Set}),u[s].totalClusterCount++,("RUNNING"===e.status||"LAUNCHING"===e.status)&&(u[s].runningClusterCount++,m++),e.cloud&&u[s].clouds.add(e.cloud)});let h=l.jobs||[],p=new Set(b.x2.active),f=0;h.forEach(e=>{let s=e.cluster_name||e.resources&&e.resources.cluster_name;if(s){let t=x[s];t&&u[t]&&p.has(e.status)&&u[t].managedJobsCount++}p.has(e.status)&&f++});let j=Object.values(u).filter(e=>r.includes(e.name)).map(e=>({...e,clouds:Array.isArray(d[e.name])?d[e.name]:[]})).sort((e,s)=>e.name.localeCompare(s.name));s(j),n({runningClusters:m,totalClusters:t.length,managedJobs:f})}catch(e){console.error("Error fetching workspace data:",e),s([]),n({runningClusters:0,totalClusters:0,managedJobs:0})}m(!1)};(0,r.useEffect)(()=>{_()},[]);let S=e=>{D({confirmOpen:!0,workspaceToDelete:e,deleting:!1,error:null})},J=async()=>{if(z.workspaceToDelete){D(e=>({...e,deleting:!0,error:null}));try{await (0,o.zl)(z.workspaceToDelete),D({confirmOpen:!1,workspaceToDelete:null,deleting:!1,error:null}),await _()}catch(e){console.error("Error deleting workspace:",e),D(s=>({...s,deleting:!1,error:e}))}}},R=()=>{D({confirmOpen:!1,workspaceToDelete:null,deleting:!1,error:null})};return d&&0===e.length?(0,l.jsxs)("div",{className:"flex justify-center items-center h-64",children:[(0,l.jsx)(u.Z,{}),(0,l.jsx)("span",{className:"ml-2 text-gray-500",children:"Loading workspaces..."})]}):(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,l.jsxs)("div",{className:"text-base flex items-center",children:[(0,l.jsx)("span",{className:"text-sky-blue leading-none",children:"Workspaces"}),(0,l.jsx)(x.z,{variant:"outline",size:"sm",onClick:()=>O.push("/config"),className:"ml-4 px-2 py-1 text-xs",disabled:d||!f||0===Object.keys(f).length,children:"Edit All Configs"})]}),(0,l.jsxs)("div",{className:"flex items-center",children:[d&&(0,l.jsxs)("div",{className:"flex items-center mr-2",children:[(0,l.jsx)(u.Z,{size:15,className:"mt-0"}),(0,l.jsx)("span",{className:"ml-2 text-gray-500 text-xs",children:"Refreshing..."})]}),(0,l.jsxs)(x.z,{variant:"ghost",onClick:_,disabled:d,className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:[(0,l.jsx)(g.Z,{className:"h-4 w-4 mr-1.5"}),!T&&(0,l.jsx)("span",{children:"Refresh"})]})]})]}),(0,l.jsx)(v,{workspaceCount:e.length,runningClusters:t.runningClusters,totalClusters:t.totalClusters,managedJobs:t.managedJobs,router:O}),0!==e.length||d?(0,l.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[e.map(e=>(0,l.jsx)(w,{workspace:e,onDelete:S,onEdit:e=>O.push("/workspaces/".concat(e)),router:O},e.name)),(0,l.jsx)(k,{onClick:()=>O.push("/workspace/new")})]}):(0,l.jsxs)("div",{className:"text-center py-10",children:[(0,l.jsx)("p",{className:"text-lg text-gray-600",children:"No workspaces found."}),(0,l.jsx)("p",{className:"text-sm text-gray-500 mt-2",children:"Create a cluster to see its workspace here."})]}),f&&(0,l.jsx)(p.Vq,{open:y,onOpenChange:E,children:(0,l.jsxs)(p.cZ,{className:"sm:max-w-md md:max-w-lg lg:max-w-xl xl:max-w-2xl w-full max-h-[90vh] flex flex-col",children:[(0,l.jsx)(p.fK,{children:(0,l.jsx)(p.$N,{className:"pr-10",children:"All Workspaces Configuration"})}),(0,l.jsx)("div",{className:"flex-grow overflow-y-auto py-4",children:(0,l.jsx)("pre",{style:{backgroundColor:"#f5f5f5",padding:"16px",borderRadius:"8px",overflowX:"auto",whiteSpace:"pre",wordBreak:"normal"},children:h().dump(f,{indent:2})})})]})}),(0,l.jsx)(p.Vq,{open:z.confirmOpen,onOpenChange:R,children:(0,l.jsxs)(p.cZ,{className:"sm:max-w-md",children:[(0,l.jsxs)(p.fK,{children:[(0,l.jsx)(p.$N,{children:"Delete Workspace"}),(0,l.jsxs)(p.Be,{children:['Are you sure you want to delete workspace "',z.workspaceToDelete,'"? This action cannot be undone.']})]}),(0,l.jsx)(j.X,{error:z.error,title:"Deletion Failed",onDismiss:()=>D(e=>({...e,error:null}))}),(0,l.jsxs)(p.cN,{children:[(0,l.jsx)(x.z,{variant:"outline",onClick:R,disabled:z.deleting,children:"Cancel"}),(0,l.jsx)(x.z,{variant:"destructive",onClick:J,disabled:z.deleting,children:z.deleting?"Deleting...":"Delete"})]})]})})]})}function y(){return(0,l.jsx)(n.A,{highlighted:"workspaces",children:(0,l.jsx)(C,{})})}}},function(e){e.O(0,[146,573,488,320,470,990,627,236,888,774,179],function(){return e(e.s=2592)}),_N_E=e.O()}]);
|
@@ -1,3 +0,0 @@
|
|
1
|
-
*,:after,:before{--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:rgba(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:rgba(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: }/*
|
2
|
-
! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com
|
3
|
-
*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-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]){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,pre,samp{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,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background:0 0% 100%;--foreground:220 17% 27%;--card:0 0% 100%;--card-foreground:220 17% 27%;--popover:0 0% 100%;--popover-foreground:220 17% 27%;--primary:222.2 47.4% 11.2%;--primary-foreground:220 17% 27%;--secondary:210 40% 96.1%;--secondary-foreground:220 9% 46%;--muted:210 40% 96.1%;--muted-foreground:210 40% 96.1%;--accent:210 40% 96.1%;--accent-foreground:220 17% 27%;--destructive:0 84.2% 60.2%;--destructive-foreground:210 40% 98%;--border:214.3 31.8% 91.4%;--input:214.3 31.8% 91.4%;--ring:222.2 84% 4.9%;--radius:0.5rem;--chart-1:12 76% 61%;--chart-2:173 58% 39%;--chart-3:197 37% 24%;--chart-4:43 74% 66%;--chart-5:27 87% 67%;--text-strong:220 17% 27%}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width:1400px){.container{max-width:1400px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.left-0{left:0}.left-2{left:.5rem}.left-\[50\%\]{left:50%}.left-full{left:100%}.right-0{right:0}.right-4{right:1rem}.top-0{top:0}.top-1\/2{top:50%}.top-14{top:3.5rem}.top-4{top:1rem}.top-\[50\%\]{top:50%}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-50{z-index:50}.z-\[9999\]{z-index:9999}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.-mt-10{margin-top:-2.5rem}.-mt-5{margin-top:-1.25rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-1\.5{margin-right:.375rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mr-6{margin-right:1.5rem}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1/1}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-20{height:5rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-96{height:24rem}.h-\[calc\(100vh-56px\)\]{height:calc(100vh - 56px)}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-full{height:100%}.h-px{height:1px}.max-h-96{max-height:24rem}.max-h-\[250px\]{max-height:250px}.max-h-\[90vh\]{max-height:90vh}.min-h-\[80px\]{min-height:80px}.min-h-screen{min-height:100vh}.w-1\/2{width:50%}.w-1\/3{width:33.333333%}.w-1\/4{width:25%}.w-1\/6{width:16.666667%}.w-10{width:2.5rem}.w-16{width:4rem}.w-2\/3{width:66.666667%}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-8{width:2rem}.w-full{width:100%}.w-max{width:max-content}.min-w-5{min-width:1.25rem}.min-w-\[100px\]{min-width:100px}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.min-w-full{min-width:100%}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.caption-bottom{caption-side:bottom}.-translate-x-full{--tw-translate-x:-100%}.-translate-x-full,.-translate-y-1\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y:-50%}.translate-x-0{--tw-translate-x:0px}.translate-x-0,.translate-x-\[-50\%\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\[-50\%\]{--tw-translate-x:-50%}.translate-y-\[-50\%\]{--tw-translate-y:-50%}.transform,.translate-y-\[-50\%\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{user-select:none}.resize-none{resize:none}.resize{resize:both}.appearance-none{appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.content-center{align-content:center}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-x-4{column-gap:1rem}.gap-y-1{row-gap:.25rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(229 231 235/var(--tw-divide-opacity,1))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity,1))}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.border-green-500{--tw-border-opacity:1;border-color:rgb(34 197 94/var(--tw-border-opacity,1))}.border-input{border-color:hsl(var(--input))}.border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.border-sky-200{--tw-border-opacity:1;border-color:rgb(186 230 253/var(--tw-border-opacity,1))}.border-sky-300{--tw-border-opacity:1;border-color:rgb(125 211 252/var(--tw-border-opacity,1))}.border-transparent{border-color:transparent}.border-yellow-500{--tw-border-opacity:1;border-color:rgb(234 179 8/var(--tw-border-opacity,1))}.bg-\[\#f7f7f7\]{--tw-bg-opacity:1;background-color:rgb(247 247 247/var(--tw-bg-opacity,1))}.bg-background{background-color:hsl(var(--background))}.bg-black\/50{background-color:rgba(0,0,0,.5)}.bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.bg-card{background-color:hsl(var(--card))}.bg-cyan-50{--tw-bg-opacity:1;background-color:rgb(236 254 255/var(--tw-bg-opacity,1))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.bg-green-700{--tw-bg-opacity:1;background-color:rgb(21 128 61/var(--tw-bg-opacity,1))}.bg-indigo-50{--tw-bg-opacity:1;background-color:rgb(238 242 255/var(--tw-bg-opacity,1))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/50{background-color:hsl(var(--muted)/.5)}.bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}.bg-pink-50{--tw-bg-opacity:1;background-color:rgb(253 242 248/var(--tw-bg-opacity,1))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-sky-100{--tw-bg-opacity:1;background-color:rgb(224 242 254/var(--tw-bg-opacity,1))}.bg-sky-50{--tw-bg-opacity:1;background-color:rgb(240 249 255/var(--tw-bg-opacity,1))}.bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-white\/50{background-color:hsla(0,0%,100%,.5)}.bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.bg-yellow-50{--tw-bg-opacity:1;background-color:rgb(254 252 232/var(--tw-bg-opacity,1))}.bg-yellow-500{--tw-bg-opacity:1;background-color:rgb(234 179 8/var(--tw-bg-opacity,1))}.object-contain{object-fit:contain}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-32{padding-top:8rem;padding-bottom:8rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-6{padding-bottom:1.5rem}.pl-2{padding-left:.5rem}.pl-8{padding-left:2rem}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-6{padding-right:1.5rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.tracking-tight{letter-spacing:-.025em}.tracking-wider{letter-spacing:.05em}.text-\[hsl\(var\(--text-strong\)\)\]{color:hsl(var(--text-strong))}.text-amber-700{--tw-text-opacity:1;color:rgb(180 83 9/var(--tw-text-opacity,1))}.text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-cyan-700{--tw-text-opacity:1;color:rgb(14 116 144/var(--tw-text-opacity,1))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-gray-100{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity,1))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.text-green-400{--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity,1))}.text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.text-indigo-700{--tw-text-opacity:1;color:rgb(67 56 202/var(--tw-text-opacity,1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-orange-700{--tw-text-opacity:1;color:rgb(194 65 12/var(--tw-text-opacity,1))}.text-pink-700{--tw-text-opacity:1;color:rgb(190 24 93/var(--tw-text-opacity,1))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-sky-600{--tw-text-opacity:1;color:rgb(2 132 199/var(--tw-text-opacity,1))}.text-sky-700{--tw-text-opacity:1;color:rgb(3 105 161/var(--tw-text-opacity,1))}.text-sky-blue{--tw-text-opacity:1;color:rgb(14 46 101/var(--tw-text-opacity,1))}.text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.text-slate-950{--tw-text-opacity:1;color:rgb(2 6 23/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-yellow-700{--tw-text-opacity:1;color:rgb(161 98 7/var(--tw-text-opacity,1))}.text-yellow-800{--tw-text-opacity:1;color:rgb(133 77 14/var(--tw-text-opacity,1))}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.underline-offset-4{text-underline-offset:4px}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-md,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.ring-offset-white{--tw-ring-offset-color:#fff}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-150,.transition-transform{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.duration-150{animation-duration:.15s}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.running{animation-play-state:running}.sortable{cursor:pointer;user-select:none}.sortable:hover{text-decoration:underline}.container{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin:20px}.chart{border:1px solid #ccc;padding:10px;border-radius:5px;background-color:#fff;box-shadow:0 2px 10px rgba(0,0,0,.1);max-height:400px;overflow:auto}.flip-card-container{display:flex;flex-wrap:wrap;gap:20px;justify-content:center}.flip-card-back,.flip-card-front{width:300px;height:350px;border:1px solid #ccc;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#fff;border-radius:10px;box-shadow:0 4px 8px rgba(0,0,0,.1)}.flip-card-back{padding:20px;text-align:center}.home-card{display:flex;flex-direction:column;justify-content:space-between;flex:1 1 0;height:100%}.home-cloud-card{background-color:#f0fff0}.chartContainer{width:200px;height:200px}.tableCellWidth{width:210px!important}.tableCellWidth-sm{width:10px!important}.items-center h3.text-xl.font-semibold.mb-4:first-of-type{font-size:0;margin-bottom:1rem}.items-center h3.text-xl.font-semibold.mb-4:first-of-type:after{content:"";font-size:1.25rem}.file\:border-0::file-selector-button{border-width:0}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.hover\:border-sky-400:hover{--tw-border-opacity:1;border-color:rgb(56 189 248/var(--tw-border-opacity,1))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive)/.9)}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.hover\:bg-gray-200:hover{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.hover\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted)/.5)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary)/.9)}.hover\:bg-red-50:hover{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary)/.8)}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-blue-600:hover{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.hover\:text-blue-700:hover{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.hover\:text-blue-800:hover{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.hover\:text-gray-700:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.hover\:text-green-700:hover{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.hover\:text-red-600:hover{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.hover\:text-red-700:hover{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.hover\:text-sky-blue-bright:hover{--tw-text-opacity:1;color:rgb(30 98 204/var(--tw-text-opacity,1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-0:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-0:focus,.focus\:ring-2:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-blue-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.focus\:ring-gray-400:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(156 163 175/var(--tw-ring-opacity,1))}.focus\:ring-red-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(239 68 68/var(--tw-ring-opacity,1))}.focus\:ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\:ring-offset-0:focus{--tw-ring-offset-width:0px}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px}.focus\:ring-offset-red-50:focus{--tw-ring-offset-color:#fef2f2}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:hsl(var(--ring))}.focus-visible\:ring-slate-400:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(148 163 184/var(--tw-ring-opacity,1))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-gray-300:disabled{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.disabled\:text-gray-400:disabled{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.disabled\:text-gray-500:disabled{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.disabled\:no-underline:disabled{text-decoration-line:none}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:hover\:bg-transparent:hover:disabled{background-color:transparent}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom],.data-\[side\=left\]\:-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.data-\[side\=right\]\:translate-x-1[data-side=right],.data-\[side\=top\]\:-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.data-\[state\=active\]\:bg-white[data-state=active]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.data-\[state\=open\]\:bg-gray-100[data-state=open]{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[state\=active\]\:text-slate-950[data-state=active]{--tw-text-opacity:1;color:rgb(2 6 23/var(--tw-text-opacity,1))}.data-\[state\=open\]\:text-gray-500[data-state=open]{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=active\]\:shadow-sm[data-state=active]{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:0.5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-0.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x:-50%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y:-48%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x:-50%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y:-48%}.dark\:bg-slate-800:is(.dark *){--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity,1))}.dark\:bg-slate-950:is(.dark *){--tw-bg-opacity:1;background-color:rgb(2 6 23/var(--tw-bg-opacity,1))}.dark\:text-slate-400:is(.dark *){--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.dark\:text-slate-50:is(.dark *){--tw-text-opacity:1;color:rgb(248 250 252/var(--tw-text-opacity,1))}.dark\:ring-offset-slate-950:is(.dark *){--tw-ring-offset-color:#020617}.dark\:focus-visible\:ring-slate-800:focus-visible:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(30 41 59/var(--tw-ring-opacity,1))}.dark\:data-\[state\=active\]\:bg-slate-950[data-state=active]:is(.dark *){--tw-bg-opacity:1;background-color:rgb(2 6 23/var(--tw-bg-opacity,1))}.dark\:data-\[state\=active\]\:text-slate-50[data-state=active]:is(.dark *){--tw-text-opacity:1;color:rgb(248 250 252/var(--tw-text-opacity,1))}@media (min-width:640px){.sm\:max-w-3xl{max-width:48rem}.sm\:max-w-md{max-width:28rem}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}}@media (min-width:768px){.md\:max-w-lg{max-width:32rem}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}}@media (min-width:1024px){.lg\:col-span-1{grid-column:span 1/span 1}.lg\:col-span-2{grid-column:span 2/span 2}.lg\:col-span-3{grid-column:span 3/span 3}.lg\:max-w-xl{max-width:36rem}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width:1280px){.xl\:max-w-2xl{max-width:42rem}}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0}.\[\&_tr\]\:border-b tr{border-bottom-width:1px}
|
/sky/dashboard/out/_next/static/{D5bjIfl4Ob3SV3LJz3CO0 → Mx1iAbDQn1jMHh3UHmK3R}/_ssgManifest.js
RENAMED
File without changes
|
/sky/dashboard/out/_next/static/chunks/pages/{_app-3985f074c163a856.js → _app-a631df412d8172de.js}
RENAMED
File without changes
|
{skypilot_nightly-1.0.0.dev20250527.dist-info → skypilot_nightly-1.0.0.dev20250528.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|