skypilot-nightly 1.0.0.dev20250605__py3-none-any.whl → 1.0.0.dev20250607__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/backends/backend_utils.py +3 -1
- sky/check.py +14 -19
- sky/cli.py +0 -2
- sky/client/cli.py +0 -2
- sky/client/sdk.py +2 -1
- sky/clouds/cloud.py +4 -0
- sky/clouds/kubernetes.py +2 -2
- sky/clouds/nebius.py +44 -4
- sky/dashboard/out/404.html +1 -1
- sky/dashboard/out/_next/static/1qG0HTmVilJPxQdBk0fX5/_buildManifest.js +1 -0
- sky/dashboard/out/_next/static/chunks/236-619ed0248fb6fdd9.js +6 -0
- sky/dashboard/out/_next/static/chunks/{470-9e7a479cc8303baa.js → 470-ad1e0db3afcbd9c9.js} +1 -1
- sky/dashboard/out/_next/static/chunks/969-2c584e28e6b4b106.js +1 -0
- sky/dashboard/out/_next/static/chunks/973-6d78a0814682d771.js +1 -0
- sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]-b919a73aecdfa78f.js +6 -0
- sky/dashboard/out/_next/static/chunks/pages/{clusters-5549a350f97d7ef3.js → clusters-4f6b9dd9abcb33ad.js} +1 -1
- sky/dashboard/out/_next/static/chunks/pages/infra/{[context]-b68ddeed712d45b5.js → [context]-3a18d0eeb5119fe4.js} +1 -1
- sky/dashboard/out/_next/static/chunks/pages/{infra-13b117a831702196.js → infra-a1a6abeeb58c1051.js} +1 -1
- sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-1354e28c81eeb686.js +16 -0
- sky/dashboard/out/_next/static/chunks/pages/{jobs-a76b2700eca236f7.js → jobs-23bfc8bf373423db.js} +1 -1
- sky/dashboard/out/_next/static/chunks/pages/{users-262aab38b9baaf3a.js → users-5800045bd04e69c2.js} +1 -1
- sky/dashboard/out/_next/static/chunks/pages/workspace/{new-c7516f2b4c3727c0.js → new-e1f9c0c3ff7ac4bd.js} +1 -1
- sky/dashboard/out/_next/static/chunks/pages/workspaces/{[name]-7799de9e691e35d8.js → [name]-686590e0ee4b2412.js} +1 -1
- sky/dashboard/out/_next/static/chunks/pages/{workspaces-384ea5fa0cea8f28.js → workspaces-76b07aa5da91b0df.js} +1 -1
- 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/[context].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/jobs/scheduler.py +9 -4
- sky/jobs/server/core.py +14 -1
- sky/jobs/state.py +18 -15
- sky/provision/kubernetes/utils.py +12 -5
- sky/provision/nebius/constants.py +47 -0
- sky/provision/nebius/instance.py +2 -1
- sky/provision/nebius/utils.py +28 -7
- sky/serve/load_balancer.py +56 -45
- sky/skylet/constants.py +1 -0
- sky/skypilot_config.py +4 -1
- sky/templates/jobs-controller.yaml.j2 +3 -1
- sky/templates/nebius-ray.yml.j2 +6 -0
- sky/utils/kubernetes/deploy_remote_cluster.py +5 -3
- sky/utils/resources_utils.py +3 -1
- {skypilot_nightly-1.0.0.dev20250605.dist-info → skypilot_nightly-1.0.0.dev20250607.dist-info}/METADATA +1 -1
- {skypilot_nightly-1.0.0.dev20250605.dist-info → skypilot_nightly-1.0.0.dev20250607.dist-info}/RECORD +63 -62
- sky/dashboard/out/_next/static/chunks/236-4c0dc6f63ccc6319.js +0 -6
- sky/dashboard/out/_next/static/chunks/969-c7abda31c10440ac.js +0 -1
- sky/dashboard/out/_next/static/chunks/973-1a09cac61cfcc1e1.js +0 -1
- sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]-beabbcd7606c1a23.js +0 -6
- sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-86c47edc500f15f9.js +0 -11
- sky/dashboard/out/_next/static/qjhIe-yC6nHcLKBqpzO1M/_buildManifest.js +0 -1
- /sky/dashboard/out/_next/static/{qjhIe-yC6nHcLKBqpzO1M → 1qG0HTmVilJPxQdBk0fX5}/_ssgManifest.js +0 -0
- /sky/dashboard/out/_next/static/chunks/{37-beedd583fea84cc8.js → 37-600191c5804dcae2.js} +0 -0
- /sky/dashboard/out/_next/static/chunks/{682-6647f0417d5662f0.js → 682-b60cfdacc15202e8.js} +0 -0
- /sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/{[job]-65d04d5d77cbb6b6.js → [job]-18aed9b56247d074.js} +0 -0
- /sky/dashboard/out/_next/static/chunks/pages/{config-1a1eeb949dab8897.js → config-fe375a56342cf609.js} +0 -0
- {skypilot_nightly-1.0.0.dev20250605.dist-info → skypilot_nightly-1.0.0.dev20250607.dist-info}/WHEEL +0 -0
- {skypilot_nightly-1.0.0.dev20250605.dist-info → skypilot_nightly-1.0.0.dev20250607.dist-info}/entry_points.txt +0 -0
- {skypilot_nightly-1.0.0.dev20250605.dist-info → skypilot_nightly-1.0.0.dev20250607.dist-info}/licenses/LICENSE +0 -0
- {skypilot_nightly-1.0.0.dev20250605.dist-info → skypilot_nightly-1.0.0.dev20250607.dist-info}/top_level.txt +0 -0
sky/dashboard/out/_next/static/chunks/pages/{infra-13b117a831702196.js → infra-a1a6abeeb58c1051.js}
RENAMED
@@ -1 +1 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[588],{3177:function(n,r,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/infra",function(){return t(9054)}])},9054:function(n,r,t){"use strict";t.r(r),t.d(r,{default:function(){return f}});var u=t(5893);t(7294);var i=t(8682),e=t(9008),c=t.n(e);function f(){return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(c(),{children:(0,u.jsx)("title",{children:"Infra | SkyPilot Dashboard"})}),(0,u.jsx)(i.fx,{})]})}}},function(n){n.O(0,[614,470,293,
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[588],{3177:function(n,r,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/infra",function(){return t(9054)}])},9054:function(n,r,t){"use strict";t.r(r),t.d(r,{default:function(){return f}});var u=t(5893);t(7294);var i=t(8682),e=t(9008),c=t.n(e);function f(){return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(c(),{children:(0,u.jsx)("title",{children:"Infra | SkyPilot Dashboard"})}),(0,u.jsx)(i.fx,{})]})}}},function(n){n.O(0,[614,470,969,293,856,682,888,774,179],function(){return n(n.s=3177)}),_N_E=n.O()}]);
|
@@ -0,0 +1,16 @@
|
|
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)}])},6639:function(e,t,s){"use strict";s.d(t,{Z:function(){return r}});/**
|
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 r=(0,s(998).Z)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},8671:function(e,t,s){"use strict";s.d(t,{Z:function(){return r}});/**
|
7
|
+
* @license lucide-react v0.407.0 - ISC
|
8
|
+
*
|
9
|
+
* This source code is licensed under the ISC license.
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
11
|
+
*/let r=(0,s(998).Z)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},3626:function(e,t,s){"use strict";s.d(t,{Z:function(){return r}});/**
|
12
|
+
* @license lucide-react v0.407.0 - ISC
|
13
|
+
*
|
14
|
+
* This source code is licensed under the ISC license.
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
16
|
+
*/let r=(0,s(998).Z)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},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),l=s(6989),a=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"}},o=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)(a.W2,{className:"w-3 h-3 mr-1"});case"STOPPED":return(0,r.jsx)(a.fp,{className:"w-3 h-3 mr-1"});case"TERMINATED":case"FAILED":case"CANCELLED":return(0,r.jsx)(a.Ps,{className:"w-3 h-3 mr-1"});case"SUCCEEDED":return(0,r.jsx)(a.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)(a.J$,{className:"w-3 h-3 mr-1"})}},i=e=>{let t=c(e),s=o(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)(l.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 o},aY:function(){return m},eW:function(){return x},ll:function(){return d}});var r=s(5893),n=s(7294),l=s(5697),a=s.n(l),c=s(2350);let o=n.forwardRef((e,t)=>{let{className:s,children:n,...l}=e;return(0,r.jsx)("div",{ref:t,className:(0,c.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",s),...l,children:n})});o.displayName="Card",o.propTypes={className:a().string,children:a().node};let i=n.forwardRef((e,t)=>{let{className:s,children:n,...l}=e;return(0,r.jsx)("div",{ref:t,className:(0,c.cn)("flex flex-col space-y-1.5 p-6",s),...l,children:n})});i.displayName="CardHeader",i.propTypes={className:a().string,children:a().node};let d=n.forwardRef((e,t)=>{let{className:s,children:n,...l}=e;return(0,r.jsx)("h3",{ref:t,className:(0,c.cn)("text-2xl font-semibold leading-none tracking-tight",s),...l,children:n})});d.displayName="CardTitle",d.propTypes={className:a().string,children:a().node};let u=n.forwardRef((e,t)=>{let{className:s,children:n,...l}=e;return(0,r.jsx)("p",{ref:t,className:(0,c.cn)("text-sm text-muted-foreground",s),...l,children:n})});u.displayName="CardDescription",u.propTypes={className:a().string,children:a().node};let m=n.forwardRef((e,t)=>{let{className:s,children:n,...l}=e;return(0,r.jsx)("div",{ref:t,className:(0,c.cn)("p-6 pt-0",s),...l,children:n})});m.displayName="CardContent",m.propTypes={className:a().string,children:a().node};let x=n.forwardRef((e,t)=>{let{className:s,children:n,...l}=e;return(0,r.jsx)("div",{ref:t,className:(0,c.cn)("flex items-center p-6 pt-0",s),...l,children:n})});x.displayName="CardFooter",x.propTypes={className:a().string,children:a().node}},8099:function(e,t,s){"use strict";s.r(t);var r=s(5893),n=s(7294),l=s(8799),a=s(1163),c=s(9470),o=s(7673),i=s(8969),d=s(1664),u=s.n(d),m=s(3626),x=s(282),g=s(8671),f=s(5895),h=s(6639),j=s(6989),N=s(9307),p=s(3001),y=s(9008),b=s.n(y),v=s(1272);function E(e){let{jobData:t,activeTab:s,setIsLoadingLogs:a,setIsLoadingControllerLogs:c,isLoadingLogs:o,isLoadingControllerLogs:d,refreshFlag:m}=e,[p,y]=(0,n.useState)(""),[b,E]=(0,n.useState)(""),[w,L]=(0,n.useState)(!1),[C,R]=(0,n.useState)({}),[S,T]=(0,n.useState)(!1),[I,k]=(0,n.useState)(!1),[A,D]=(0,n.useState)(0),[_,Z]=(0,n.useState)(0),[P,F]=(0,n.useState)(!1),[M,O]=(0,n.useState)(!1),[q,U]=(0,n.useState)(!1),[G,H]=(0,n.useState)(!1),W=(0,n.useRef)(null),B=(0,n.useRef)(null),Y=(0,n.useRef)(new WeakSet),J=(0,n.useRef)(null),z=(0,n.useRef)(null),$=(0,n.useRef)(""),V=(0,n.useRef)(""),K=(0,n.useRef)(null);(0,n.useRef)(0);let X=(0,n.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"request";if(e){if(Y.current.has(e)){console.log("".concat(t," controller already aborted previously, skipping"));return}try{if("function"!=typeof e.abort){console.warn("Controller for ".concat(t," does not have abort method"));return}if(e.signal&&e.signal.aborted){console.log("".concat(t," already aborted via signal, skipping")),Y.current.add(e);return}e.abort(),Y.current.add(e),console.log("Successfully aborted ".concat(t))}catch(s){console.log("Caught error while aborting ".concat(t,":"),s.name,s.message),Y.current.add(e),"AbortError"!==s.name&&"InvalidStateError"!==s.name&&console.warn("Unexpected error aborting ".concat(t,":"),s)}}},[]),Q=(0,n.useCallback)(e=>{let t="logs"===e?J:z;if(t.current)for(let s of[()=>t.current.querySelector(".logs-container"),()=>t.current.querySelector('[class*="logs-container"]'),()=>t.current.querySelector('div[style*="overflow"]'),()=>t.current]){let t=s();if(t&&t.scrollHeight>t.clientHeight){t.scrollTop=t.scrollHeight,console.log("Auto-scrolled ".concat(e," to bottom"));break}}},[]),ee=["PENDING","SUBMITTED","STARTING"].includes(t.status),et=["PENDING","SUBMITTED"].includes(t.status),es=["RECOVERING"].includes(t.status),er=e=>{R(t=>({...t,[e]:!t[e]}))},en=async()=>{try{let e=ea(t.dag_yaml),s="";s=1===e.length?e[0].content:e.length>1?e.map(e=>e.content).join("\n---\n"):t.dag_yaml,await navigator.clipboard.writeText(s),T(!0),setTimeout(()=>T(!1),2e3)}catch(e){console.error("Failed to copy YAML to clipboard:",e)}},el=async()=>{try{await navigator.clipboard.writeText(t.entrypoint),k(!0),setTimeout(()=>k(!1),2e3)}catch(e){console.error("Failed to copy command to clipboard:",e)}},ea=e=>{if(!e)return[];try{let t=[],s=e.split(/^---$/m);for(let e=0;e<s.length;e++){let r=s[e].trim();r&&""!==r&&t.push(r)}return(t.length>1?t.slice(1):t).map((e,t)=>{try{let s=v.ZP.load(e),r=v.ZP.dump(s,{lineWidth:-1,styles:{"!!str":"literal"},quotingType:"'",forceQuotes:!1,noRefs:!0,sortKeys:!1,condenseFlow:!1,indent:2}).split("\n"),n=[],l=-1;for(let e=0;e<r.length;e++){let t=r[e],s=t.search(/\S/);0===s&&l>=0&&e>0&&n.push(""),n.push(t),l=s}return{index:t,content:n.join("\n").trim(),preview:ec(s)}}catch(s){return console.error("YAML formatting error for document ".concat(t,":"),s),{index:t,content:e,preview:"Invalid YAML"}}})}catch(t){return console.error("YAML formatting error:",t),[{index:0,content:e,preview:"Invalid YAML"}]}},ec=e=>"string"==typeof e?e.substring(0,50)+"...":e&&e.name?"name: ".concat(e.name):e&&e.resources?"Task configuration":"YAML document";(0,n.useEffect)(()=>{y(""),D(0),H(!1)},[s,t.id]),(0,n.useEffect)(()=>{E(""),Z(0),H(!1)},[s,t.id]);let eo=(0,n.useCallback)(function(e,t,s,r){let n=arguments.length>4&&void 0!==arguments[4]&&arguments[4],l="logs"===e?W:B;if(l.current)return console.log("Request already active for ".concat(e,", skipping...")),()=>{};let a=!0,c=new AbortController;return"logs"===e&&(ee||es)?(r(!1),n&&F(!1),()=>{}):"controllerlogs"===e&&et?(r(!1),n&&O(!1),()=>{}):t?(l.current=c,r(!0),U(!0),n&&(s(""),"logs"===e?D(0):Z(0)),(0,i.NJ)({jobId:t,controller:"controllerlogs"===e,signal:c.signal,onNewLog:t=>{if(a){let s=(0,j.q8)(t);G||H(!0),ei(e,s),"logs"===e?D(e=>e+s.length):Z(e=>e+s.length)}}}).then(()=>{a&&(r(!1),n&&("logs"===e?F(!1):O(!1)),requestAnimationFrame(()=>{Q(e)}))}).catch(t=>{a&&("AbortError"!==t.name&&(console.error("Error streaming ".concat(e,":"),t),t.message&&s(e=>e+"Error fetching logs: ".concat(t.message,"\n"))),r(!1),n&&("logs"===e?F(!1):O(!1)))}).finally(()=>{console.log("Cleaning up ".concat(e," request")),a=!1,l.current===c&&(X(c,e),l.current=null),"logs"===e?$.current="":V.current="",K.current&&(clearTimeout(K.current),K.current=null)}),()=>{console.log("Cleaning up ".concat(e," request")),a=!1,l.current===c&&(X(c,"".concat(e," cleanup")),l.current=null),"logs"===e?$.current="":V.current="",K.current&&(clearTimeout(K.current),K.current=null)}):()=>{a=!1}},[ee,et,es,G,X]);(0,n.useEffect)(()=>{if(W.current&&(X(W.current,"logs"),W.current=null),!ee&&!es)return eo("logs",t.id,y,a)},[t.id,eo,a,ee,es,X]),(0,n.useEffect)(()=>{if(B.current&&(X(B.current,"controller logs"),B.current=null),!et)return eo("controllerlogs",t.id,E,c)},[t.id,eo,c,et,X]),(0,n.useEffect)(()=>{if(m>0&&"logs"===s)return W.current&&(X(W.current,"logs refresh"),W.current=null),F(!0),eo("logs",t.id,y,a,!0)},[m,s,t.id,eo,a,X]),(0,n.useEffect)(()=>{if(m>0&&"controllerlogs"===s)return B.current&&(X(B.current,"controller logs refresh"),B.current=null),O(!0),eo("controllerlogs",t.id,E,c,!0)},[m,s,t.id,eo,c,X]),(0,n.useEffect)(()=>()=>{console.log("Cleaning up managed job log requests..."),W.current&&(X(W.current,"logs cleanup"),W.current=null),B.current&&(X(B.current,"controller logs cleanup"),B.current=null),K.current&&(clearTimeout(K.current),K.current=null),$.current="",V.current="",a(!1),c(!1),F(!1),O(!1)},[X]),(0,n.useEffect)(()=>{let e=()=>{document.hidden?(console.log("Page hidden - pausing log streaming for performance"),K.current&&(clearTimeout(K.current),K.current=null)):console.log("Page visible - resuming normal operation")};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[]),(0,n.useEffect)(()=>{let e=()=>{("logs"===s&&p||"controllerlogs"===s&&b)&&Q("logs"===s?"logs":"controllerlogs")};requestAnimationFrame(()=>{requestAnimationFrame(e)})},[s,p,b,Q]);let ei=(0,n.useCallback)((e,t)=>{("logs"===e?y:E)(e=>e+t),requestAnimationFrame(()=>{Q(e)})},[Q]);return"logs"===s?(0,r.jsx)("div",{className:"max-h-96 overflow-y-auto",ref:J,children:ee?(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"})}):es?(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"})}):G||p?(0,r.jsx)(j.$B,{logs:p}):o?(0,r.jsxs)("div",{className:"flex items-center justify-center py-4",children:[(0,r.jsx)(l.Z,{size:20,className:"mr-2"}),(0,r.jsx)("span",{children:"Loading logs..."})]}):(0,r.jsx)(j.$B,{logs:p})}):"controllerlogs"===s?(0,r.jsx)("div",{className:"max-h-96 overflow-y-auto",ref:z,children:et?(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"})}):G||b?(0,r.jsx)(j.$B,{logs:b,controller:!0}):d?(0,r.jsxs)("div",{className:"flex items-center justify-center py-4",children:[(0,r.jsx)(l.Z,{size:20,className:"mr-2"}),(0,r.jsx)("span",{children:"Loading logs..."})]}):(0,r.jsx)(j.$B,{logs:b,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.jsxs)("div",{className:"text-base mt-1 flex items-center",children:[(0,r.jsx)(N.OE,{status:t.status}),t.priority&&(0,r.jsxs)("span",{className:"ml-2",children:[" (Priority: ",t.priority,")"]})]})]}),(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)(j.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.entrypoint||t.dag_yaml)&&(0,r.jsxs)("div",{className:"col-span-2",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Entrypoint"}),t.entrypoint&&(0,r.jsx)(j.WH,{content:I?"Copied!":"Copy command",className:"text-muted-foreground",children:(0,r.jsx)("button",{onClick:el,className:"flex items-center text-gray-500 hover:text-gray-700 transition-colors duration-200 p-1 ml-2",children:I?(0,r.jsx)(x.Z,{className:"w-4 h-4 text-green-600"}):(0,r.jsx)(g.Z,{className:"w-4 h-4"})})})]}),(0,r.jsxs)("div",{className:"space-y-4 mt-3",children:[t.entrypoint&&(0,r.jsx)("div",{children:(0,r.jsx)("div",{className:"bg-gray-50 border border-gray-200 rounded-md p-3",children:(0,r.jsx)("code",{className:"text-sm text-gray-800 font-mono break-all",children:t.entrypoint})})}),t.dag_yaml&&"{}"!==t.dag_yaml&&(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center mb-2",children:[(0,r.jsxs)("button",{onClick:()=>{L(!w)},className:"flex items-center text-left focus:outline-none text-gray-700 hover:text-gray-900 transition-colors duration-200",children:[w?(0,r.jsx)(f.Z,{className:"w-4 h-4 mr-1"}):(0,r.jsx)(h.Z,{className:"w-4 h-4 mr-1"}),(0,r.jsx)("span",{className:"text-base",children:"Show SkyPilot YAML"})]}),(0,r.jsx)(j.WH,{content:S?"Copied!":"Copy YAML",className:"text-muted-foreground",children:(0,r.jsx)("button",{onClick:en,className:"flex items-center text-gray-500 hover:text-gray-700 transition-colors duration-200 p-1 ml-2",children:S?(0,r.jsx)(x.Z,{className:"w-4 h-4 text-green-600"}):(0,r.jsx)(g.Z,{className:"w-4 h-4"})})})]}),w&&(0,r.jsx)("div",{className:"bg-gray-50 border border-gray-200 rounded-md p-3 max-h-96 overflow-y-auto",children:(()=>{let e=ea(t.dag_yaml);return 0===e.length?(0,r.jsx)("div",{className:"text-gray-500",children:"No YAML available"}):1===e.length?(0,r.jsx)("pre",{className:"text-sm text-gray-800 font-mono whitespace-pre-wrap",children:e[0].content}):(0,r.jsx)("div",{className:"space-y-4",children:e.map((e,t)=>(0,r.jsxs)("div",{className:"border-b border-gray-200 pb-4 last:border-b-0",children:[(0,r.jsx)("button",{onClick:()=>er(t),className:"flex items-center justify-between w-full text-left focus:outline-none",children:(0,r.jsxs)("div",{className:"flex items-center",children:[C[t]?(0,r.jsx)(f.Z,{className:"w-4 h-4 mr-2"}):(0,r.jsx)(h.Z,{className:"w-4 h-4 mr-2"}),(0,r.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["Task ",t+1,": ",e.preview]})]})}),C[t]&&(0,r.jsx)("div",{className:"mt-3 ml-6",children:(0,r.jsx)("pre",{className:"text-sm text-gray-800 font-mono whitespace-pre-wrap",children:e.content})})]},t))})})()})]})]})]})]})}t.default=function(){var e;let t=(0,a.useRouter)(),{job:s,tab:d}=t.query,[x,g]=(0,n.useState)(0),{jobData:f,loading:h}=(0,i.UA)(s,x),[N,y]=(0,n.useState)(!1),[v,w]=(0,n.useState)(!0),[L,C]=(0,n.useState)(!1),[R,S]=(0,n.useState)(!1),[T,I]=(0,n.useState)(!1),[k,A]=(0,n.useState)(!1),[D,_]=(0,n.useState)(!1),[Z,P]=(0,n.useState)(0),[F,M]=(0,n.useState)(0),O=(0,p.X)();n.useEffect(()=>{!h&&v&&w(!1)},[h,v]);let q=e=>{let t=document.getElementById(e);t&&t.scrollIntoView({behavior:"smooth"})};(0,n.useEffect)(()=>{A(!0)},[]),(0,n.useEffect)(()=>{if(!D){let e=new MutationObserver(()=>{let t=document.getElementById("logs-section"),s=document.getElementById("controller-logs-section");("logs"===d&&t||"controllerlogs"===d&&s)&&(_(!0),e.disconnect())});return e.observe(document.body,{childList:!0,subtree:!0}),()=>e.disconnect()}},[D,d]),(0,n.useEffect)(()=>{if(t.isReady&&k&&D&&!T){let e=setTimeout(()=>{"logs"===d?(q("logs-section"),I(!0)):"controllerlogs"===d&&(q("controller-logs-section"),I(!0))},800);return()=>clearTimeout(e)}},[t.isReady,d,T,k,D]),(0,n.useEffect)(()=>{I(!1),_(!1)},[d]);let U=async()=>{y(!0);try{g(e=>e+1),P(e=>e+1),M(e=>e+1)}catch(e){console.error("Error refreshing data:",e)}finally{y(!1)}};if(!t.isReady)return(0,r.jsx)("div",{children:"Loading..."});let G=null==f?void 0:null===(e=f.jobs)||void 0===e?void 0:e.find(e=>String(e.id)===String(s)),H=s?"Job: ".concat(s," | SkyPilot Dashboard"):"Job Details | SkyPilot Dashboard";return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b(),{children:(0,r.jsx)("title",{children:H})}),(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==G?void 0:G.name)?"(".concat(G.name,")"):""]})]}),(0,r.jsxs)("div",{className:"text-sm flex items-center",children:[(h||N||L||R)&&(0,r.jsxs)("div",{className:"flex items-center mr-4",children:[(0,r.jsx)(l.Z,{size:15,className:"mt-0"}),(0,r.jsx)("span",{className:"ml-2 text-gray-500",children:"Loading..."})]}),(0,r.jsx)(j.WH,{content:"Refresh",className:"text-muted-foreground",children:(0,r.jsxs)("button",{onClick:U,disabled:h||N,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"}),!O&&(0,r.jsx)("span",{children:"Refresh"})]})})]})]}),h&&v?(0,r.jsxs)("div",{className:"flex items-center justify-center py-32",children:[(0,r.jsx)(l.Z,{size:20,className:"mr-2"}),(0,r.jsx)("span",{children:"Loading..."})]}):G?(0,r.jsxs)("div",{className:"space-y-8",children:[(0,r.jsx)("div",{id:"details-section",children:(0,r.jsxs)(o.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)(E,{jobData:G,activeTab:"info",setIsLoadingLogs:C,setIsLoadingControllerLogs:S,isLoadingLogs:L,isLoadingControllerLogs:R,refreshFlag:0})})]})}),(0,r.jsx)("div",{id:"logs-section",className:"mt-6",children:(0,r.jsxs)(o.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)(j.WH,{content:"Refresh logs",className:"text-muted-foreground",children:(0,r.jsx)("button",{onClick:()=>{P(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)(E,{jobData:G,activeTab:"logs",setIsLoadingLogs:C,setIsLoadingControllerLogs:S,isLoadingLogs:L,isLoadingControllerLogs:R,refreshFlag:Z})})]})}),(0,r.jsx)("div",{id:"controller-logs-section",className:"mt-6",children:(0,r.jsxs)(o.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)(j.WH,{content:"Refresh controller logs",className:"text-muted-foreground",children:(0,r.jsx)("button",{onClick:()=>{M(e=>e+1)},disabled:R,className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:(0,r.jsx)(m.Z,{className:"w-4 h-4 ".concat(R?"animate-spin":"")})})})]}),(0,r.jsx)("div",{className:"p-4",children:(0,r.jsx)(E,{jobData:G,activeTab:"controllerlogs",setIsLoadingLogs:C,setIsLoadingControllerLogs:S,isLoadingLogs:L,isLoadingControllerLogs:R,refreshFlag:F})})]})})]}):(0,r.jsx)("div",{className:"flex items-center justify-center py-32",children:(0,r.jsx)("span",{children:"Job not found"})})]})]})}}},function(e){e.O(0,[614,798,470,969,888,774,179],function(){return e(e.s=479)}),_N_E=e.O()}]);
|
sky/dashboard/out/_next/static/chunks/pages/{jobs-a76b2700eca236f7.js → jobs-23bfc8bf373423db.js}
RENAMED
@@ -1 +1 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[142],{1446:function(n,t,u){(window.__NEXT_P=window.__NEXT_P||[]).push(["/jobs",function(){return u(8929)}])},8929:function(n,t,u){"use strict";u.r(t),u.d(t,{default:function(){return c}});var e=u(5893),r=u(9008),i=u.n(r),s=u(8236);function c(){return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(i(),{children:(0,e.jsx)("title",{children:"Managed Jobs | SkyPilot Dashboard"})}),(0,e.jsx)(s.Nk,{})]})}}},function(n){n.O(0,[614,121,470,293,
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[142],{1446:function(n,t,u){(window.__NEXT_P=window.__NEXT_P||[]).push(["/jobs",function(){return u(8929)}])},8929:function(n,t,u){"use strict";u.r(t),u.d(t,{default:function(){return c}});var e=u(5893),r=u(9008),i=u.n(r),s=u(8236);function c(){return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(i(),{children:(0,e.jsx)("title",{children:"Managed Jobs | SkyPilot Dashboard"})}),(0,e.jsx)(s.Nk,{})]})}}},function(n){n.O(0,[614,121,470,969,293,856,973,236,888,774,179],function(){return n(n.s=1446)}),_N_E=n.O()}]);
|
sky/dashboard/out/_next/static/chunks/pages/{users-262aab38b9baaf3a.js → users-5800045bd04e69c2.js}
RENAMED
@@ -13,4 +13,4 @@
|
|
13
13
|
*
|
14
14
|
* This source code is licensed under the ISC license.
|
15
15
|
* See the LICENSE file in the root directory of this source tree.
|
16
|
-
*/let w=(0,t(998).Z)("Pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);var C=t(9470),k=t(3001),R=t(7673),E=t(3225);let T=e=>e&&e.includes("@")?e.split("@")[0]:e||"N/A",_=e=>e&&e.includes("@")?e:"-",Z=b.nb.REFRESH_INTERVAL;function S(){let[e,r]=(0,n.useState)(!1),t=(0,n.useRef)(null),a=(0,k.X)();return(0,s.jsxs)(C.A,{highlighted:"users",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,s.jsx)("div",{className:"text-base",children:(0,s.jsx)(u(),{href:"/users",className:"text-sky-blue hover:underline leading-none",children:"Users"})}),(0,s.jsxs)("div",{className:"flex items-center",children:[e&&(0,s.jsxs)("div",{className:"flex items-center mr-2",children:[(0,s.jsx)(c.Z,{size:15,className:"mt-0"}),(0,s.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"Loading..."})]}),(0,s.jsxs)("button",{onClick:()=>{p.default.invalidate(m.R),p.default.invalidate(x.getClusters),p.default.invalidate(h.getManagedJobs,[{allUsers:!0}]),t.current&&t.current()},disabled:e,className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:[(0,s.jsx)(j.Z,{className:"h-4 w-4 mr-1.5"}),!a&&(0,s.jsx)("span",{children:"Refresh"})]})]})]}),(0,s.jsx)(D,{refreshInterval:Z,setLoading:r,refreshDataRef:t})]})}function D(e){let{refreshInterval:r,setLoading:t,refreshDataRef:a}=e,[l,i]=(0,n.useState)([]),[o,d]=(0,n.useState)(!0),[u,b]=(0,n.useState)(!1),[j,C]=(0,n.useState)({key:"username",direction:"ascending"}),[k,Z]=(0,n.useState)(null),[S,D]=(0,n.useState)(""),I=(0,n.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];t&&e&&t(!0),e&&d(!0);try{let r=await p.default.get(m.R),s=(r||[]).map(e=>({...e,usernameDisplay:T(e.username),fullEmail:_(e.username),clusterCount:-1,jobCount:-1}));i(s),b(!0),t&&e&&t(!1),e&&d(!1);let[n,a]=await Promise.all([p.default.get(x.getClusters),p.default.get(h.getManagedJobs,[{allUsers:!0}])]),l=a.jobs||[],o=(r||[]).map(e=>{let r=(n||[]).filter(r=>r.user_hash===e.userId),t=(l||[]).filter(r=>r.user_hash===e.userId);return{...e,usernameDisplay:T(e.username),fullEmail:_(e.username),clusterCount:r.length,jobCount:t.length}});i(o)}catch(r){console.error("Failed to fetch or process user data:",r),i([]),b(!0),t&&e&&t(!1),e&&d(!1)}},[t]);(0,n.useEffect)(()=>{a&&(a.current=()=>I(!0))},[a,I]),(0,n.useEffect)(()=>{(async()=>{b(!1),d(!0),await g.ZP.preloadForPage("users"),I(!0)})();let e=setInterval(()=>{I(!1)},r);return()=>clearInterval(e)},[I,r]);let F=(0,n.useMemo)(()=>(0,y.R0)(l,j.key,j.direction),[l,j]),L=e=>{let r="ascending";j.key===e&&"ascending"===j.direction&&(r="descending"),C({key:e,direction:r})},M=e=>j.key===e?"ascending"===j.direction?" ↑":" ↓":"",z=async(e,r)=>{try{let t=await fetch("".concat(E.f4,"/users/role"));if(!t.ok){let e=await t.json();throw Error(e.detail||"Failed to get user role")}let s=await t.json();console.log("data",s);let n=s.role;if("admin"!=n){alert("".concat(s.name," is logged in as no admin, cannot edit user role."));return}Z(e),D(r)}catch(e){console.error("Failed to check user role:",e),alert("Error: ".concat(e.message))}},A=()=>{Z(null),D("")},O=async e=>{if(!e||!S){console.error("User ID or role is missing."),alert("Error: User ID or role is missing.");return}d(!0);try{let r=await fetch("".concat(E.f4,"/users/update"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({user_id:e,role:S})});if(!r.ok){let e=await r.json();throw Error(e.detail||"Failed to update role")}p.default.invalidate(m.R),await I(!0),A()}catch(e){console.error("Failed to update user role:",e),alert("Error updating role: ".concat(e.message))}finally{d(!1)}};return o&&0===l.length&&!u?(0,s.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,s.jsx)(c.Z,{})}):u?F&&0!==F.length?(0,s.jsx)(R.Zb,{children:(0,s.jsxs)(f.iA,{children:[(0,s.jsx)(f.xD,{children:(0,s.jsxs)(f.SC,{children:[(0,s.jsxs)(f.ss,{onClick:()=>L("usernameDisplay"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/5",children:["Name",M("usernameDisplay")]}),(0,s.jsxs)(f.ss,{onClick:()=>L("fullEmail"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/5",children:["Email",M("fullEmail")]}),(0,s.jsxs)(f.ss,{onClick:()=>L("role"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/5",children:["Role",M("role")]}),(0,s.jsxs)(f.ss,{onClick:()=>L("clusterCount"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/5",children:["Clusters",M("clusterCount")]}),(0,s.jsxs)(f.ss,{onClick:()=>L("jobCount"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/5",children:["Jobs",M("jobCount")]})]})}),(0,s.jsx)(f.RM,{children:F.map(e=>(0,s.jsxs)(f.SC,{children:[(0,s.jsx)(f.pj,{className:"truncate",title:e.username,children:e.usernameDisplay}),(0,s.jsx)(f.pj,{className:"truncate",title:e.fullEmail,children:e.fullEmail}),(0,s.jsx)(f.pj,{className:"truncate",title:e.role,children:(0,s.jsx)("div",{className:"flex items-center gap-2",children:k===e.userId?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("select",{value:S,onChange:e=>D(e.target.value),className:"block w-auto p-1 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-sky-blue focus:border-sky-blue sm:text-sm",children:[(0,s.jsx)("option",{value:"admin",children:"Admin"}),(0,s.jsx)("option",{value:"user",children:"User"})]}),(0,s.jsx)("button",{onClick:()=>O(e.userId),className:"text-green-600 hover:text-green-800 p-1",title:"Save",children:(0,s.jsx)(N.Z,{className:"h-4 w-4"})}),(0,s.jsx)("button",{onClick:A,className:"text-gray-500 hover:text-gray-700 p-1",title:"Cancel",children:(0,s.jsx)(v.Z,{className:"h-4 w-4"})})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"capitalize",children:e.role}),(0,s.jsx)("button",{onClick:()=>z(e.userId,e.role),className:"text-gray-400 hover:text-sky-blue p-1",title:"Edit role",children:(0,s.jsx)(w,{className:"h-3 w-3"})})]})})}),(0,s.jsx)(f.pj,{children:-1===e.clusterCount?(0,s.jsxs)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-400 rounded text-xs font-medium flex items-center",children:[(0,s.jsx)(c.Z,{size:10,className:"mr-1"}),"Loading..."]}):e.clusterCount>0?(0,s.jsx)("span",{className:"px-2 py-0.5 bg-blue-100 text-blue-800 rounded text-xs font-medium",children:e.clusterCount}):(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)(f.pj,{children:-1===e.jobCount?(0,s.jsxs)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-400 rounded text-xs font-medium flex items-center",children:[(0,s.jsx)(c.Z,{size:10,className:"mr-1"}),"Loading..."]}):e.jobCount>0?(0,s.jsx)("span",{className:"px-2 py-0.5 bg-green-100 text-green-800 rounded text-xs font-medium",children:e.jobCount}):(0,s.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-500 rounded text-xs font-medium",children:"0"})})]},e.userId))})]})}):(0,s.jsxs)("div",{className:"text-center py-12",children:[(0,s.jsx)("p",{className:"text-lg font-semibold text-gray-500",children:"No users found."}),(0,s.jsx)("p",{className:"text-sm text-gray-400 mt-1",children:"There are currently no users to display."})]}):(0,s.jsxs)("div",{className:"flex justify-center items-center h-64",children:[(0,s.jsx)(c.Z,{}),(0,s.jsx)("span",{className:"ml-2 text-gray-500",children:"Loading users..."})]})}function I(){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l(),{children:(0,s.jsx)("title",{children:"Users | SkyPilot Dashboard"})}),(0,s.jsx)(S,{})]})}D.propTypes={refreshInterval:o().number.isRequired,setLoading:o().func.isRequired,refreshDataRef:o().shape({current:o().func}).isRequired}},2003:function(e,r,t){"use strict";t.d(r,{j:function(){return l}});var s=t(512);let n=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,a=s.W,l=(e,r)=>t=>{var s;if((null==r?void 0:r.variants)==null)return a(e,null==t?void 0:t.class,null==t?void 0:t.className);let{variants:l,defaultVariants:i}=r,o=Object.keys(l).map(e=>{let r=null==t?void 0:t[e],s=null==i?void 0:i[e];if(null===r)return null;let a=n(r)||n(s);return l[e][a]}),c=t&&Object.entries(t).reduce((e,r)=>{let[t,s]=r;return void 0===s||(e[t]=s),e},{});return a(e,o,null==r?void 0:null===(s=r.compoundVariants)||void 0===s?void 0:s.reduce((e,r)=>{let{class:t,className:s,...n}=r;return Object.entries(n).every(e=>{let[r,t]=e;return Array.isArray(t)?t.includes({...i,...c}[r]):({...i,...c})[r]===t})?[...e,t,s]:e},[]),null==t?void 0:t.class,null==t?void 0:t.className)}}},function(e){e.O(0,[614,470,293,
|
16
|
+
*/let w=(0,t(998).Z)("Pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);var C=t(9470),k=t(3001),R=t(7673),E=t(3225);let T=e=>e&&e.includes("@")?e.split("@")[0]:e||"N/A",_=e=>e&&e.includes("@")?e:"-",Z=b.nb.REFRESH_INTERVAL;function S(){let[e,r]=(0,n.useState)(!1),t=(0,n.useRef)(null),a=(0,k.X)();return(0,s.jsxs)(C.A,{highlighted:"users",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,s.jsx)("div",{className:"text-base",children:(0,s.jsx)(u(),{href:"/users",className:"text-sky-blue hover:underline leading-none",children:"Users"})}),(0,s.jsxs)("div",{className:"flex items-center",children:[e&&(0,s.jsxs)("div",{className:"flex items-center mr-2",children:[(0,s.jsx)(c.Z,{size:15,className:"mt-0"}),(0,s.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"Loading..."})]}),(0,s.jsxs)("button",{onClick:()=>{p.default.invalidate(m.R),p.default.invalidate(x.getClusters),p.default.invalidate(h.getManagedJobs,[{allUsers:!0}]),t.current&&t.current()},disabled:e,className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:[(0,s.jsx)(j.Z,{className:"h-4 w-4 mr-1.5"}),!a&&(0,s.jsx)("span",{children:"Refresh"})]})]})]}),(0,s.jsx)(D,{refreshInterval:Z,setLoading:r,refreshDataRef:t})]})}function D(e){let{refreshInterval:r,setLoading:t,refreshDataRef:a}=e,[l,i]=(0,n.useState)([]),[o,d]=(0,n.useState)(!0),[u,b]=(0,n.useState)(!1),[j,C]=(0,n.useState)({key:"username",direction:"ascending"}),[k,Z]=(0,n.useState)(null),[S,D]=(0,n.useState)(""),I=(0,n.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];t&&e&&t(!0),e&&d(!0);try{let r=await p.default.get(m.R),s=(r||[]).map(e=>({...e,usernameDisplay:T(e.username),fullEmail:_(e.username),clusterCount:-1,jobCount:-1}));i(s),b(!0),t&&e&&t(!1),e&&d(!1);let[n,a]=await Promise.all([p.default.get(x.getClusters),p.default.get(h.getManagedJobs,[{allUsers:!0}])]),l=a.jobs||[],o=(r||[]).map(e=>{let r=(n||[]).filter(r=>r.user_hash===e.userId),t=(l||[]).filter(r=>r.user_hash===e.userId);return{...e,usernameDisplay:T(e.username),fullEmail:_(e.username),clusterCount:r.length,jobCount:t.length}});i(o)}catch(r){console.error("Failed to fetch or process user data:",r),i([]),b(!0),t&&e&&t(!1),e&&d(!1)}},[t]);(0,n.useEffect)(()=>{a&&(a.current=()=>I(!0))},[a,I]),(0,n.useEffect)(()=>{(async()=>{b(!1),d(!0),await g.ZP.preloadForPage("users"),I(!0)})();let e=setInterval(()=>{I(!1)},r);return()=>clearInterval(e)},[I,r]);let F=(0,n.useMemo)(()=>(0,y.R0)(l,j.key,j.direction),[l,j]),L=e=>{let r="ascending";j.key===e&&"ascending"===j.direction&&(r="descending"),C({key:e,direction:r})},M=e=>j.key===e?"ascending"===j.direction?" ↑":" ↓":"",z=async(e,r)=>{try{let t=await fetch("".concat(E.f4,"/users/role"));if(!t.ok){let e=await t.json();throw Error(e.detail||"Failed to get user role")}let s=await t.json();console.log("data",s);let n=s.role;if("admin"!=n){alert("".concat(s.name," is logged in as no admin, cannot edit user role."));return}Z(e),D(r)}catch(e){console.error("Failed to check user role:",e),alert("Error: ".concat(e.message))}},A=()=>{Z(null),D("")},O=async e=>{if(!e||!S){console.error("User ID or role is missing."),alert("Error: User ID or role is missing.");return}d(!0);try{let r=await fetch("".concat(E.f4,"/users/update"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({user_id:e,role:S})});if(!r.ok){let e=await r.json();throw Error(e.detail||"Failed to update role")}p.default.invalidate(m.R),await I(!0),A()}catch(e){console.error("Failed to update user role:",e),alert("Error updating role: ".concat(e.message))}finally{d(!1)}};return o&&0===l.length&&!u?(0,s.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,s.jsx)(c.Z,{})}):u?F&&0!==F.length?(0,s.jsx)(R.Zb,{children:(0,s.jsxs)(f.iA,{children:[(0,s.jsx)(f.xD,{children:(0,s.jsxs)(f.SC,{children:[(0,s.jsxs)(f.ss,{onClick:()=>L("usernameDisplay"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/5",children:["Name",M("usernameDisplay")]}),(0,s.jsxs)(f.ss,{onClick:()=>L("fullEmail"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/5",children:["Email",M("fullEmail")]}),(0,s.jsxs)(f.ss,{onClick:()=>L("role"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/5",children:["Role",M("role")]}),(0,s.jsxs)(f.ss,{onClick:()=>L("clusterCount"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/5",children:["Clusters",M("clusterCount")]}),(0,s.jsxs)(f.ss,{onClick:()=>L("jobCount"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/5",children:["Jobs",M("jobCount")]})]})}),(0,s.jsx)(f.RM,{children:F.map(e=>(0,s.jsxs)(f.SC,{children:[(0,s.jsx)(f.pj,{className:"truncate",title:e.username,children:e.usernameDisplay}),(0,s.jsx)(f.pj,{className:"truncate",title:e.fullEmail,children:e.fullEmail}),(0,s.jsx)(f.pj,{className:"truncate",title:e.role,children:(0,s.jsx)("div",{className:"flex items-center gap-2",children:k===e.userId?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("select",{value:S,onChange:e=>D(e.target.value),className:"block w-auto p-1 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-sky-blue focus:border-sky-blue sm:text-sm",children:[(0,s.jsx)("option",{value:"admin",children:"Admin"}),(0,s.jsx)("option",{value:"user",children:"User"})]}),(0,s.jsx)("button",{onClick:()=>O(e.userId),className:"text-green-600 hover:text-green-800 p-1",title:"Save",children:(0,s.jsx)(N.Z,{className:"h-4 w-4"})}),(0,s.jsx)("button",{onClick:A,className:"text-gray-500 hover:text-gray-700 p-1",title:"Cancel",children:(0,s.jsx)(v.Z,{className:"h-4 w-4"})})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"capitalize",children:e.role}),(0,s.jsx)("button",{onClick:()=>z(e.userId,e.role),className:"text-gray-400 hover:text-sky-blue p-1",title:"Edit role",children:(0,s.jsx)(w,{className:"h-3 w-3"})})]})})}),(0,s.jsx)(f.pj,{children:-1===e.clusterCount?(0,s.jsxs)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-400 rounded text-xs font-medium flex items-center",children:[(0,s.jsx)(c.Z,{size:10,className:"mr-1"}),"Loading..."]}):e.clusterCount>0?(0,s.jsx)("span",{className:"px-2 py-0.5 bg-blue-100 text-blue-800 rounded text-xs font-medium",children:e.clusterCount}):(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)(f.pj,{children:-1===e.jobCount?(0,s.jsxs)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-400 rounded text-xs font-medium flex items-center",children:[(0,s.jsx)(c.Z,{size:10,className:"mr-1"}),"Loading..."]}):e.jobCount>0?(0,s.jsx)("span",{className:"px-2 py-0.5 bg-green-100 text-green-800 rounded text-xs font-medium",children:e.jobCount}):(0,s.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-500 rounded text-xs font-medium",children:"0"})})]},e.userId))})]})}):(0,s.jsxs)("div",{className:"text-center py-12",children:[(0,s.jsx)("p",{className:"text-lg font-semibold text-gray-500",children:"No users found."}),(0,s.jsx)("p",{className:"text-sm text-gray-400 mt-1",children:"There are currently no users to display."})]}):(0,s.jsxs)("div",{className:"flex justify-center items-center h-64",children:[(0,s.jsx)(c.Z,{}),(0,s.jsx)("span",{className:"ml-2 text-gray-500",children:"Loading users..."})]})}function I(){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l(),{children:(0,s.jsx)("title",{children:"Users | SkyPilot Dashboard"})}),(0,s.jsx)(S,{})]})}D.propTypes={refreshInterval:o().number.isRequired,setLoading:o().func.isRequired,refreshDataRef:o().shape({current:o().func}).isRequired}},2003:function(e,r,t){"use strict";t.d(r,{j:function(){return l}});var s=t(512);let n=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,a=s.W,l=(e,r)=>t=>{var s;if((null==r?void 0:r.variants)==null)return a(e,null==t?void 0:t.class,null==t?void 0:t.className);let{variants:l,defaultVariants:i}=r,o=Object.keys(l).map(e=>{let r=null==t?void 0:t[e],s=null==i?void 0:i[e];if(null===r)return null;let a=n(r)||n(s);return l[e][a]}),c=t&&Object.entries(t).reduce((e,r)=>{let[t,s]=r;return void 0===s||(e[t]=s),e},{});return a(e,o,null==r?void 0:null===(s=r.compoundVariants)||void 0===s?void 0:s.reduce((e,r)=>{let{class:t,className:s,...n}=r;return Object.entries(n).every(e=>{let[r,t]=e;return Array.isArray(t)?t.includes({...i,...c}[r]):({...i,...c})[r]===t})?[...e,t,s]:e},[]),null==t?void 0:t.class,null==t?void 0:t.className)}}},function(e){e.O(0,[614,470,969,293,856,888,774,179],function(){return e(e.s=7476)}),_N_E=e.O()}]);
|
@@ -1 +1 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[963],{5113:function(e,s,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/workspace/new",function(){return a(26)}])},26:function(e,s,a){"use strict";a.r(s),a.d(s,{default:function(){return g}});var t=a(5893),r=a(7294),n=a(1163),l=a(5843),i=a(7324),o=a(9470),c=a(1664),d=a.n(c),u=a(9008),f=a.n(u),m=a(803),x=a(2350);let p=r.forwardRef((e,s)=>{let{className:a,type:r,...n}=e;return(0,t.jsx)("input",{type:r,className:(0,x.cn)("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",a),ref:s,...n})});p.displayName="Input";var h=a(5320),b=r.forwardRef((e,s)=>(0,t.jsx)(h.WV.label,{...e,ref:s,onMouseDown:s=>{s.target.closest("button, input, select, textarea")||(e.onMouseDown?.(s),!s.defaultPrevented&&s.detail>1&&s.preventDefault())}}));b.displayName="Label";let w=(0,a(2003).j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),k=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)(b,{ref:s,className:(0,x.cn)(w(),a),...r})});k.displayName=b.displayName;var N=a(7673);function g(){(0,n.useRouter)();let[e,s]=(0,r.useState)(""),[a,c]=(0,r.useState)(!1),[u,x]=(0,r.useState)({}),[h,b]=(0,r.useState)(!0);(0,r.useEffect)(()=>{w()},[]);let w=async()=>{try{let e=await (0,i.fX)();x(e)}catch(e){console.error("Failed to fetch existing workspaces:",e)}finally{b(!1)}},g=()=>{e.trim()&&!j&&c(!0)},j=e.trim()&&u.hasOwnProperty(e.trim()),y=e.trim()&&!j;return a?(0,t.jsx)(l.I,{workspaceName:e,isNewWorkspace:!0}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f(),{children:(0,t.jsx)("title",{children:"Create New Workspace | SkyPilot Dashboard"})}),(0,t.jsxs)(o.A,{highlighted:"workspaces",children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4 h-5",children:(0,t.jsxs)("div",{className:"text-base flex items-center",children:[(0,t.jsx)(d(),{href:"/workspaces",className:"text-sky-blue hover:underline",children:"Workspaces"}),(0,t.jsx)("span",{className:"mx-2 text-gray-500",children:"›"}),(0,t.jsx)("span",{className:"text-sky-blue",children:"New Workspace"})]})}),(0,t.jsxs)(N.Zb,{className:"max-w-md",children:[(0,t.jsx)(N.Ol,{children:(0,t.jsx)(N.ll,{className:"text-base font-normal",children:"Create New Workspace"})}),(0,t.jsxs)(N.aY,{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(k,{htmlFor:"workspace-name",className:"text-sm font-normal",children:"Workspace name"}),(0,t.jsx)(p,{id:"workspace-name",value:e,onChange:e=>s(e.target.value),placeholder:"Enter workspace name",autoFocus:!0,onKeyPress:e=>{"Enter"===e.key&&y&&g()}}),j?(0,t.jsxs)("p",{className:"text-sm text-gray-500 mt-1",children:['Workspace "',e,'" already exists.'," ",(0,t.jsx)(d(),{href:"/workspaces/".concat(e),className:"text-blue-600 hover:underline",children:"View the workspace"})]}):(0,t.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:"Choose a unique name for your workspace"})]}),(0,t.jsx)(m.z,{onClick:g,disabled:!y||h,className:"w-full bg-blue-600 hover:bg-blue-700 text-white disabled:bg-gray-300 disabled:text-gray-500",children:h?"Loading...":"Next: Configure Workspace"})]})]})]})]})}}},function(e){e.O(0,[614,798,121,470,293,
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[963],{5113:function(e,s,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/workspace/new",function(){return a(26)}])},26:function(e,s,a){"use strict";a.r(s),a.d(s,{default:function(){return g}});var t=a(5893),r=a(7294),n=a(1163),l=a(5843),i=a(7324),o=a(9470),c=a(1664),d=a.n(c),u=a(9008),f=a.n(u),m=a(803),x=a(2350);let p=r.forwardRef((e,s)=>{let{className:a,type:r,...n}=e;return(0,t.jsx)("input",{type:r,className:(0,x.cn)("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",a),ref:s,...n})});p.displayName="Input";var h=a(5320),b=r.forwardRef((e,s)=>(0,t.jsx)(h.WV.label,{...e,ref:s,onMouseDown:s=>{s.target.closest("button, input, select, textarea")||(e.onMouseDown?.(s),!s.defaultPrevented&&s.detail>1&&s.preventDefault())}}));b.displayName="Label";let w=(0,a(2003).j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),k=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)(b,{ref:s,className:(0,x.cn)(w(),a),...r})});k.displayName=b.displayName;var N=a(7673);function g(){(0,n.useRouter)();let[e,s]=(0,r.useState)(""),[a,c]=(0,r.useState)(!1),[u,x]=(0,r.useState)({}),[h,b]=(0,r.useState)(!0);(0,r.useEffect)(()=>{w()},[]);let w=async()=>{try{let e=await (0,i.fX)();x(e)}catch(e){console.error("Failed to fetch existing workspaces:",e)}finally{b(!1)}},g=()=>{e.trim()&&!j&&c(!0)},j=e.trim()&&u.hasOwnProperty(e.trim()),y=e.trim()&&!j;return a?(0,t.jsx)(l.I,{workspaceName:e,isNewWorkspace:!0}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f(),{children:(0,t.jsx)("title",{children:"Create New Workspace | SkyPilot Dashboard"})}),(0,t.jsxs)(o.A,{highlighted:"workspaces",children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4 h-5",children:(0,t.jsxs)("div",{className:"text-base flex items-center",children:[(0,t.jsx)(d(),{href:"/workspaces",className:"text-sky-blue hover:underline",children:"Workspaces"}),(0,t.jsx)("span",{className:"mx-2 text-gray-500",children:"›"}),(0,t.jsx)("span",{className:"text-sky-blue",children:"New Workspace"})]})}),(0,t.jsxs)(N.Zb,{className:"max-w-md",children:[(0,t.jsx)(N.Ol,{children:(0,t.jsx)(N.ll,{className:"text-base font-normal",children:"Create New Workspace"})}),(0,t.jsxs)(N.aY,{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(k,{htmlFor:"workspace-name",className:"text-sm font-normal",children:"Workspace name"}),(0,t.jsx)(p,{id:"workspace-name",value:e,onChange:e=>s(e.target.value),placeholder:"Enter workspace name",autoFocus:!0,onKeyPress:e=>{"Enter"===e.key&&y&&g()}}),j?(0,t.jsxs)("p",{className:"text-sm text-gray-500 mt-1",children:['Workspace "',e,'" already exists.'," ",(0,t.jsx)(d(),{href:"/workspaces/".concat(e),className:"text-blue-600 hover:underline",children:"View the workspace"})]}):(0,t.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:"Choose a unique name for your workspace"})]}),(0,t.jsx)(m.z,{onClick:g,disabled:!y||h,className:"w-full bg-blue-600 hover:bg-blue-700 text-white disabled:bg-gray-300 disabled:text-gray-500",children:h?"Loading...":"Next: Configure Workspace"})]})]})]})]})}}},function(e){e.O(0,[614,798,121,470,969,293,856,973,236,843,888,774,179],function(){return e(e.s=5113)}),_N_E=e.O()}]);
|
@@ -1 +1 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[324],{7614:function(n,e,u){(window.__NEXT_P=window.__NEXT_P||[]).push(["/workspaces/[name]",function(){return u(9431)}])},9431:function(n,e,u){"use strict";u.r(e),u.d(e,{default:function(){return s}});var r=u(5893);u(7294);var t=u(1163),i=u(5843);function s(){let n=(0,t.useRouter)(),{name:e}=n.query;return n.isReady&&e?(0,r.jsx)(i.I,{workspaceName:e}):(0,r.jsx)("div",{children:"Loading..."})}}},function(n){n.O(0,[614,798,121,470,293,
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[324],{7614:function(n,e,u){(window.__NEXT_P=window.__NEXT_P||[]).push(["/workspaces/[name]",function(){return u(9431)}])},9431:function(n,e,u){"use strict";u.r(e),u.d(e,{default:function(){return s}});var r=u(5893);u(7294);var t=u(1163),i=u(5843);function s(){let n=(0,t.useRouter)(),{name:e}=n.query;return n.isReady&&e?(0,r.jsx)(i.I,{workspaceName:e}):(0,r.jsx)("div",{children:"Loading..."})}}},function(n){n.O(0,[614,798,121,470,969,293,856,973,236,843,888,774,179],function(){return n(n.s=7614)}),_N_E=n.O()}]);
|
@@ -1 +1 @@
|
|
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 n}});var r=t(5893),l=t(7294);let a=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)},n=e=>{let{error:s,title:t="Error",onDismiss:n}=e,[c,o]=(0,l.useState)(!1);if((0,l.useEffect)(()=>{s&&o(!1)},[s]),!s||c)return null;let i="string"==typeof s?s:a(s);return(0,r.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-md p-3 mb-4",children:(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)("div",{className:"flex-shrink-0",children:(0,r.jsx)("svg",{className:"h-5 w-5 text-red-400",viewBox:"0 0 20 20",fill:"currentColor",children:(0,r.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,r.jsx)("div",{className:"ml-3",children:(0,r.jsxs)("div",{className:"text-sm text-red-800",children:[(0,r.jsxs)("strong",{children:[t,":"]})," ",i]})})]}),(0,r.jsx)("button",{onClick:()=>{o(!0),n&&n()},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,r.jsx)("svg",{className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",children:(0,r.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 _}});var r=t(5893),l=t(7294),a=t(9008),n=t.n(a),c=t(9470),o=t(1163),i=t(3266),d=t(8969),u=t(7324),x=t(7673),m=t(803),h=t(8799),f=t(1272),p=t(326),g=t(3850),j=t(1812),w=t(3626),N=t(3001),b=t(8236),k=t(6378),v=t(1214),y=t(6856),C=t(3225);let E=e=>{let{workspace:s,onDelete:t,onEdit:l,router:a}=e,n=async()=>{try{let e=await fetch("".concat(C.f4,"/users/role"));if(!e.ok){let s=await e.json();throw Error(s.detail||"Failed to get user role")}let t=await e.json(),r=t.role;if("admin"!=r){alert("".concat(t.name," is logged in as no admin, cannot edit workspace"));return}l(s.name)}catch(e){console.error("Failed to check user role:",e),alert("Error: ".concat(e.message))}};return(0,r.jsxs)(x.Zb,{children:[(0,r.jsx)(x.Ol,{children:(0,r.jsxs)(x.ll,{className:"text-base font-normal",children:[(0,r.jsx)("span",{className:"font-semibold",children:"Workspace:"})," ",s.name]})}),(0,r.jsxs)(x.aY,{className:"text-sm pb-2",children:[(0,r.jsxs)("div",{className:"py-2 flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center text-gray-600",children:[(0,r.jsx)(g.QT,{className:"w-4 h-4 mr-2 text-gray-500"}),(0,r.jsx)("span",{children:"Clusters (Running / Total)"})]}),(0,r.jsxs)("button",{onClick:()=>{a.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,r.jsxs)("div",{className:"py-2 flex items-center justify-between border-t border-gray-100",children:[(0,r.jsxs)("div",{className:"flex items-center text-gray-600",children:[(0,r.jsx)(g.Vp,{className:"w-4 h-4 mr-2 text-gray-500"}),(0,r.jsx)("span",{children:"Managed Jobs"})]}),(0,r.jsx)("button",{onClick:()=>{a.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,r.jsxs)("div",{className:"px-6 pb-3 text-sm pt-3",children:[(0,r.jsx)("h4",{className:"mb-2 text-xs text-gray-500 tracking-wider",children:"Enabled Infra"}),(0,r.jsx)("div",{className:"flex flex-wrap gap-x-4 gap-y-1",children:s.clouds.map(e=>(0,r.jsxs)("div",{className:"flex items-center text-gray-700",children:[(0,r.jsx)(g.Ye,{className:"w-3.5 h-3.5 mr-1.5 text-green-500"}),(0,r.jsx)("span",{children:e})]},e))})]}),(0,r.jsxs)(x.eW,{className:"flex justify-end pt-3 gap-2",children:[(0,r.jsx)(m.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,r.jsx)(m.z,{variant:"outline",size:"sm",onClick:n,children:"Edit"})]})]},s.name)},D=e=>{let{onClick:s}=e,t=async()=>{try{let e=await fetch("".concat(C.f4,"/users/role"));if(!e.ok){let s=await e.json();throw Error(s.detail||"Failed to get user role")}let t=await e.json(),r=t.role;if("admin"!=r){alert("".concat(t.name," is logged in as no admin, cannot create workspace"));return}s()}catch(e){console.error("Failed to check user role:",e),alert("Error: ".concat(e.message))}};return(0,r.jsx)(x.Zb,{className:"border-2 border-dashed border-sky-300 hover:border-sky-400 cursor-pointer transition-colors flex flex-col",onClick:t,children:(0,r.jsx)("div",{className:"flex-1 flex items-center justify-center p-6",children:(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("div",{className:"w-16 h-16 rounded-full bg-sky-100 flex items-center justify-center mb-4 mx-auto",children:(0,r.jsx)("span",{className:"text-3xl text-sky-600",children:"+"})}),(0,r.jsx)("h3",{className:"text-lg font-medium text-sky-700 mb-2",children:"Create New Workspace"}),(0,r.jsx)("p",{className:"text-sm text-gray-500",children:"Set up a new workspace with custom infrastructure configurations"})]})})},"create-new")},z=e=>{let{workspaceCount:s,runningClusters:t,totalClusters:l,managedJobs:a,router:n}=e;return(0,r.jsx)("div",{className:"bg-sky-50 p-4 rounded-lg shadow mb-6",children:(0,r.jsxs)("div",{className:"flex flex-col sm:flex-row justify-around items-center",children:[(0,r.jsx)("div",{className:"p-2",children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(g.E9,{className:"w-5 h-5 mr-2 text-sky-600"}),(0,r.jsx)("span",{className:"text-sm text-gray-600",children:"Workspaces:"}),(0,r.jsx)("span",{className:"ml-1 text-xl font-semibold text-sky-700",children:s})]})}),(0,r.jsx)("div",{className:"p-2",children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(g.QT,{className:"w-5 h-5 mr-2 text-sky-600"}),(0,r.jsx)("span",{className:"text-sm text-gray-600",children:"Clusters (Running / Total):"}),(0,r.jsxs)("button",{onClick:()=>n.push("/clusters"),className:"ml-1 text-xl font-semibold text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",children:[t," / ",l]})]})}),(0,r.jsx)("div",{className:"p-2",children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(g.Vp,{className:"w-5 h-5 mr-2 text-sky-600"}),(0,r.jsx)("span",{className:"text-sm text-gray-600",children:"Managed Jobs:"}),(0,r.jsx)("button",{onClick:()=>n.push("/jobs"),className:"ml-1 text-xl font-semibold text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",children:a})]})})]})})},O=v.nb.REFRESH_INTERVAL;function T(){let[e,s]=(0,l.useState)([]),[t,a]=(0,l.useState)({runningClusters:0,totalClusters:0,managedJobs:0}),[n,c]=(0,l.useState)(!0),[x,g]=(0,l.useState)(null),[v,T]=(0,l.useState)(!1),[_,R]=(0,l.useState)({confirmOpen:!1,workspaceToDelete:null,deleting:!1,error:null}),S=(0,o.useRouter)(),F=(0,N.X)(),J=async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e&&c(!0);try{let[e,t,r]=await Promise.all([k.default.get(u.fX),k.default.get(i.getClusters),k.default.get(d.getManagedJobs,[{allUsers:!0}])]);g(e);let l=Object.keys(e),n=await Promise.all(l.map(e=>k.default.get(u.yz,[e]))),c=Object.fromEntries(l.map((e,s)=>[e,n[s]])),o=Object.fromEntries(t.map(e=>[e.cluster,e.workspace||"default"])),x={};l.forEach(e=>{x[e]={name:e,totalClusterCount:0,runningClusterCount:0,managedJobsCount:0,clouds:new Set}});let m=0;t.forEach(e=>{let s=e.workspace||"default";x[s]||(x[s]={name:s,totalClusterCount:0,runningClusterCount:0,managedJobsCount:0,clouds:new Set}),x[s].totalClusterCount++,("RUNNING"===e.status||"LAUNCHING"===e.status)&&(x[s].runningClusterCount++,m++),e.cloud&&x[s].clouds.add(e.cloud)});let h=r.jobs||[],f=new Set(b.x2.active),p=0;h.forEach(e=>{let s=e.cluster_name||e.resources&&e.resources.cluster_name;if(s){let t=o[s];t&&x[t]&&f.has(e.status)&&x[t].managedJobsCount++}f.has(e.status)&&p++});let j=Object.values(x).filter(e=>l.includes(e.name)).map(e=>({...e,clouds:Array.isArray(c[e.name])?c[e.name]:[]})).sort((e,s)=>e.name.localeCompare(s.name));s(j),a({runningClusters:m,totalClusters:t.length,managedJobs:p})}catch(e){console.error("Error fetching workspace data:",e),s([]),a({runningClusters:0,totalClusters:0,managedJobs:0})}e&&c(!1)};(0,l.useEffect)(()=>{(async()=>{await y.ZP.preloadForPage("workspaces"),J(!0)})();let e=setInterval(()=>{J(!1)},O);return()=>clearInterval(e)},[]);let L=async e=>{try{let s=await fetch("".concat(C.f4,"/users/role"));if(!s.ok){let e=await s.json();throw Error(e.detail||"Failed to get user role")}let t=await s.json(),r=t.role;if("admin"!=r){alert("".concat(t.name," is logged in as no admin, cannot delete workspace"));return}R({confirmOpen:!0,workspaceToDelete:e,deleting:!1,error:null})}catch(e){console.error("Failed to check user role:",e),alert("Error: ".concat(e.message))}},A=async()=>{if(_.workspaceToDelete){R(e=>({...e,deleting:!0,error:null}));try{await (0,u.zl)(_.workspaceToDelete),R({confirmOpen:!1,workspaceToDelete:null,deleting:!1,error:null}),await J()}catch(e){console.error("Error deleting workspace:",e),R(s=>({...s,deleting:!1,error:e}))}}},Z=()=>{R({confirmOpen:!1,workspaceToDelete:null,deleting:!1,error:null})},P=async()=>{try{let e=await fetch("".concat(C.f4,"/users/role"));if(!e.ok){let s=await e.json();throw Error(s.detail||"Failed to get user role")}let s=await e.json(),t=s.role;if("admin"!=t){alert("".concat(s.name," is logged in as no admin, cannot edit config"));return}S.push("/config")}catch(e){console.error("Failed to check user role:",e),alert("Error: ".concat(e.message))}};return n&&0===e.length?(0,r.jsxs)("div",{className:"flex justify-center items-center h-64",children:[(0,r.jsx)(h.Z,{}),(0,r.jsx)("span",{className:"ml-2 text-gray-500",children:"Loading workspaces..."})]}):(0,r.jsxs)("div",{children:[(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)("span",{className:"text-sky-blue leading-none",children:"Workspaces"}),(0,r.jsx)(m.z,{variant:"outline",size:"sm",onClick:P,className:"ml-4 px-2 py-1 text-xs",disabled:n||!x||0===Object.keys(x).length,children:"Edit All Configs"})]}),(0,r.jsxs)("div",{className:"flex items-center",children:[n&&(0,r.jsxs)("div",{className:"flex items-center mr-2",children:[(0,r.jsx)(h.Z,{size:15,className:"mt-0"}),(0,r.jsx)("span",{className:"ml-2 text-gray-500 text-xs",children:"Refreshing..."})]}),(0,r.jsxs)("button",{onClick:()=>{k.default.invalidate(u.fX),k.default.invalidate(i.getClusters),k.default.invalidate(d.getManagedJobs,[{allUsers:!0}]),k.default.invalidateFunction(u.yz),J(!0)},disabled:n,className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:[(0,r.jsx)(w.Z,{className:"h-4 w-4 mr-1.5"}),!F&&(0,r.jsx)("span",{children:"Refresh"})]})]})]}),(0,r.jsx)(z,{workspaceCount:e.length,runningClusters:t.runningClusters,totalClusters:t.totalClusters,managedJobs:t.managedJobs,router:S}),0!==e.length||n?(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[e.map(e=>(0,r.jsx)(E,{workspace:e,onDelete:L,onEdit:e=>S.push("/workspaces/".concat(e)),router:S},e.name)),(0,r.jsx)(D,{onClick:()=>S.push("/workspace/new")})]}):(0,r.jsxs)("div",{className:"text-center py-10",children:[(0,r.jsx)("p",{className:"text-lg text-gray-600",children:"No workspaces found."}),(0,r.jsx)("p",{className:"text-sm text-gray-500 mt-2",children:"Create a cluster to see its workspace here."})]}),x&&(0,r.jsx)(p.Vq,{open:v,onOpenChange:T,children:(0,r.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,r.jsx)(p.fK,{children:(0,r.jsx)(p.$N,{className:"pr-10",children:"All Workspaces Configuration"})}),(0,r.jsx)("div",{className:"flex-grow overflow-y-auto py-4",children:(0,r.jsx)("pre",{style:{backgroundColor:"#f5f5f5",padding:"16px",borderRadius:"8px",overflowX:"auto",whiteSpace:"pre",wordBreak:"normal"},children:f.ZP.dump(x,{indent:2})})})]})}),(0,r.jsx)(p.Vq,{open:_.confirmOpen,onOpenChange:Z,children:(0,r.jsxs)(p.cZ,{className:"sm:max-w-md",children:[(0,r.jsxs)(p.fK,{children:[(0,r.jsx)(p.$N,{children:"Delete Workspace"}),(0,r.jsxs)(p.Be,{children:['Are you sure you want to delete workspace "',_.workspaceToDelete,'"? This action cannot be undone.']})]}),(0,r.jsx)(j.X,{error:_.error,title:"Deletion Failed",onDismiss:()=>R(e=>({...e,error:null}))}),(0,r.jsxs)(p.cN,{children:[(0,r.jsx)(m.z,{variant:"outline",onClick:Z,disabled:_.deleting,children:"Cancel"}),(0,r.jsx)(m.z,{variant:"destructive",onClick:A,disabled:_.deleting,children:_.deleting?"Deleting...":"Delete"})]})]})})]})}function _(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n(),{children:(0,r.jsx)("title",{children:"Workspaces | SkyPilot Dashboard"})}),(0,r.jsx)(c.A,{highlighted:"workspaces",children:(0,r.jsx)(T,{})})]})}}},function(e){e.O(0,[614,798,121,470,293,969,856,973,236,888,774,179],function(){return e(e.s=2592)}),_N_E=e.O()}]);
|
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 n}});var r=t(5893),l=t(7294);let a=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)},n=e=>{let{error:s,title:t="Error",onDismiss:n}=e,[c,o]=(0,l.useState)(!1);if((0,l.useEffect)(()=>{s&&o(!1)},[s]),!s||c)return null;let i="string"==typeof s?s:a(s);return(0,r.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-md p-3 mb-4",children:(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)("div",{className:"flex-shrink-0",children:(0,r.jsx)("svg",{className:"h-5 w-5 text-red-400",viewBox:"0 0 20 20",fill:"currentColor",children:(0,r.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,r.jsx)("div",{className:"ml-3",children:(0,r.jsxs)("div",{className:"text-sm text-red-800",children:[(0,r.jsxs)("strong",{children:[t,":"]})," ",i]})})]}),(0,r.jsx)("button",{onClick:()=>{o(!0),n&&n()},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,r.jsx)("svg",{className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",children:(0,r.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 _}});var r=t(5893),l=t(7294),a=t(9008),n=t.n(a),c=t(9470),o=t(1163),i=t(3266),d=t(8969),u=t(7324),x=t(7673),m=t(803),h=t(8799),f=t(1272),p=t(326),g=t(3850),j=t(1812),w=t(3626),N=t(3001),b=t(8236),k=t(6378),v=t(1214),y=t(6856),C=t(3225);let E=e=>{let{workspace:s,onDelete:t,onEdit:l,router:a}=e,n=async()=>{try{let e=await fetch("".concat(C.f4,"/users/role"));if(!e.ok){let s=await e.json();throw Error(s.detail||"Failed to get user role")}let t=await e.json(),r=t.role;if("admin"!=r){alert("".concat(t.name," is logged in as no admin, cannot edit workspace"));return}l(s.name)}catch(e){console.error("Failed to check user role:",e),alert("Error: ".concat(e.message))}};return(0,r.jsxs)(x.Zb,{children:[(0,r.jsx)(x.Ol,{children:(0,r.jsxs)(x.ll,{className:"text-base font-normal",children:[(0,r.jsx)("span",{className:"font-semibold",children:"Workspace:"})," ",s.name]})}),(0,r.jsxs)(x.aY,{className:"text-sm pb-2",children:[(0,r.jsxs)("div",{className:"py-2 flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center text-gray-600",children:[(0,r.jsx)(g.QT,{className:"w-4 h-4 mr-2 text-gray-500"}),(0,r.jsx)("span",{children:"Clusters (Running / Total)"})]}),(0,r.jsxs)("button",{onClick:()=>{a.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,r.jsxs)("div",{className:"py-2 flex items-center justify-between border-t border-gray-100",children:[(0,r.jsxs)("div",{className:"flex items-center text-gray-600",children:[(0,r.jsx)(g.Vp,{className:"w-4 h-4 mr-2 text-gray-500"}),(0,r.jsx)("span",{children:"Managed Jobs"})]}),(0,r.jsx)("button",{onClick:()=>{a.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,r.jsxs)("div",{className:"px-6 pb-3 text-sm pt-3",children:[(0,r.jsx)("h4",{className:"mb-2 text-xs text-gray-500 tracking-wider",children:"Enabled Infra"}),(0,r.jsx)("div",{className:"flex flex-wrap gap-x-4 gap-y-1",children:s.clouds.map(e=>(0,r.jsxs)("div",{className:"flex items-center text-gray-700",children:[(0,r.jsx)(g.Ye,{className:"w-3.5 h-3.5 mr-1.5 text-green-500"}),(0,r.jsx)("span",{children:e})]},e))})]}),(0,r.jsxs)(x.eW,{className:"flex justify-end pt-3 gap-2",children:[(0,r.jsx)(m.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,r.jsx)(m.z,{variant:"outline",size:"sm",onClick:n,children:"Edit"})]})]},s.name)},D=e=>{let{onClick:s}=e,t=async()=>{try{let e=await fetch("".concat(C.f4,"/users/role"));if(!e.ok){let s=await e.json();throw Error(s.detail||"Failed to get user role")}let t=await e.json(),r=t.role;if("admin"!=r){alert("".concat(t.name," is logged in as no admin, cannot create workspace"));return}s()}catch(e){console.error("Failed to check user role:",e),alert("Error: ".concat(e.message))}};return(0,r.jsx)(x.Zb,{className:"border-2 border-dashed border-sky-300 hover:border-sky-400 cursor-pointer transition-colors flex flex-col",onClick:t,children:(0,r.jsx)("div",{className:"flex-1 flex items-center justify-center p-6",children:(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("div",{className:"w-16 h-16 rounded-full bg-sky-100 flex items-center justify-center mb-4 mx-auto",children:(0,r.jsx)("span",{className:"text-3xl text-sky-600",children:"+"})}),(0,r.jsx)("h3",{className:"text-lg font-medium text-sky-700 mb-2",children:"Create New Workspace"}),(0,r.jsx)("p",{className:"text-sm text-gray-500",children:"Set up a new workspace with custom infrastructure configurations"})]})})},"create-new")},z=e=>{let{workspaceCount:s,runningClusters:t,totalClusters:l,managedJobs:a,router:n}=e;return(0,r.jsx)("div",{className:"bg-sky-50 p-4 rounded-lg shadow mb-6",children:(0,r.jsxs)("div",{className:"flex flex-col sm:flex-row justify-around items-center",children:[(0,r.jsx)("div",{className:"p-2",children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(g.E9,{className:"w-5 h-5 mr-2 text-sky-600"}),(0,r.jsx)("span",{className:"text-sm text-gray-600",children:"Workspaces:"}),(0,r.jsx)("span",{className:"ml-1 text-xl font-semibold text-sky-700",children:s})]})}),(0,r.jsx)("div",{className:"p-2",children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(g.QT,{className:"w-5 h-5 mr-2 text-sky-600"}),(0,r.jsx)("span",{className:"text-sm text-gray-600",children:"Clusters (Running / Total):"}),(0,r.jsxs)("button",{onClick:()=>n.push("/clusters"),className:"ml-1 text-xl font-semibold text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",children:[t," / ",l]})]})}),(0,r.jsx)("div",{className:"p-2",children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(g.Vp,{className:"w-5 h-5 mr-2 text-sky-600"}),(0,r.jsx)("span",{className:"text-sm text-gray-600",children:"Managed Jobs:"}),(0,r.jsx)("button",{onClick:()=>n.push("/jobs"),className:"ml-1 text-xl font-semibold text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",children:a})]})})]})})},O=v.nb.REFRESH_INTERVAL;function T(){let[e,s]=(0,l.useState)([]),[t,a]=(0,l.useState)({runningClusters:0,totalClusters:0,managedJobs:0}),[n,c]=(0,l.useState)(!0),[x,g]=(0,l.useState)(null),[v,T]=(0,l.useState)(!1),[_,R]=(0,l.useState)({confirmOpen:!1,workspaceToDelete:null,deleting:!1,error:null}),S=(0,o.useRouter)(),F=(0,N.X)(),J=async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e&&c(!0);try{let[e,t,r]=await Promise.all([k.default.get(u.fX),k.default.get(i.getClusters),k.default.get(d.getManagedJobs,[{allUsers:!0}])]);g(e);let l=Object.keys(e),n=await Promise.all(l.map(e=>k.default.get(u.yz,[e]))),c=Object.fromEntries(l.map((e,s)=>[e,n[s]])),o=Object.fromEntries(t.map(e=>[e.cluster,e.workspace||"default"])),x={};l.forEach(e=>{x[e]={name:e,totalClusterCount:0,runningClusterCount:0,managedJobsCount:0,clouds:new Set}});let m=0;t.forEach(e=>{let s=e.workspace||"default";x[s]||(x[s]={name:s,totalClusterCount:0,runningClusterCount:0,managedJobsCount:0,clouds:new Set}),x[s].totalClusterCount++,("RUNNING"===e.status||"LAUNCHING"===e.status)&&(x[s].runningClusterCount++,m++),e.cloud&&x[s].clouds.add(e.cloud)});let h=r.jobs||[],f=new Set(b.x2.active),p=0;h.forEach(e=>{let s=e.cluster_name||e.resources&&e.resources.cluster_name;if(s){let t=o[s];t&&x[t]&&f.has(e.status)&&x[t].managedJobsCount++}f.has(e.status)&&p++});let j=Object.values(x).filter(e=>l.includes(e.name)).map(e=>({...e,clouds:Array.isArray(c[e.name])?c[e.name]:[]})).sort((e,s)=>e.name.localeCompare(s.name));s(j),a({runningClusters:m,totalClusters:t.length,managedJobs:p})}catch(e){console.error("Error fetching workspace data:",e),s([]),a({runningClusters:0,totalClusters:0,managedJobs:0})}e&&c(!1)};(0,l.useEffect)(()=>{(async()=>{await y.ZP.preloadForPage("workspaces"),J(!0)})();let e=setInterval(()=>{J(!1)},O);return()=>clearInterval(e)},[]);let L=async e=>{try{let s=await fetch("".concat(C.f4,"/users/role"));if(!s.ok){let e=await s.json();throw Error(e.detail||"Failed to get user role")}let t=await s.json(),r=t.role;if("admin"!=r){alert("".concat(t.name," is logged in as no admin, cannot delete workspace"));return}R({confirmOpen:!0,workspaceToDelete:e,deleting:!1,error:null})}catch(e){console.error("Failed to check user role:",e),alert("Error: ".concat(e.message))}},A=async()=>{if(_.workspaceToDelete){R(e=>({...e,deleting:!0,error:null}));try{await (0,u.zl)(_.workspaceToDelete),R({confirmOpen:!1,workspaceToDelete:null,deleting:!1,error:null}),await J()}catch(e){console.error("Error deleting workspace:",e),R(s=>({...s,deleting:!1,error:e}))}}},Z=()=>{R({confirmOpen:!1,workspaceToDelete:null,deleting:!1,error:null})},P=async()=>{try{let e=await fetch("".concat(C.f4,"/users/role"));if(!e.ok){let s=await e.json();throw Error(s.detail||"Failed to get user role")}let s=await e.json(),t=s.role;if("admin"!=t){alert("".concat(s.name," is logged in as no admin, cannot edit config"));return}S.push("/config")}catch(e){console.error("Failed to check user role:",e),alert("Error: ".concat(e.message))}};return n&&0===e.length?(0,r.jsxs)("div",{className:"flex justify-center items-center h-64",children:[(0,r.jsx)(h.Z,{}),(0,r.jsx)("span",{className:"ml-2 text-gray-500",children:"Loading workspaces..."})]}):(0,r.jsxs)("div",{children:[(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)("span",{className:"text-sky-blue leading-none",children:"Workspaces"}),(0,r.jsx)(m.z,{variant:"outline",size:"sm",onClick:P,className:"ml-4 px-2 py-1 text-xs",disabled:n||!x||0===Object.keys(x).length,children:"Edit All Configs"})]}),(0,r.jsxs)("div",{className:"flex items-center",children:[n&&(0,r.jsxs)("div",{className:"flex items-center mr-2",children:[(0,r.jsx)(h.Z,{size:15,className:"mt-0"}),(0,r.jsx)("span",{className:"ml-2 text-gray-500 text-xs",children:"Refreshing..."})]}),(0,r.jsxs)("button",{onClick:()=>{k.default.invalidate(u.fX),k.default.invalidate(i.getClusters),k.default.invalidate(d.getManagedJobs,[{allUsers:!0}]),k.default.invalidateFunction(u.yz),J(!0)},disabled:n,className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:[(0,r.jsx)(w.Z,{className:"h-4 w-4 mr-1.5"}),!F&&(0,r.jsx)("span",{children:"Refresh"})]})]})]}),(0,r.jsx)(z,{workspaceCount:e.length,runningClusters:t.runningClusters,totalClusters:t.totalClusters,managedJobs:t.managedJobs,router:S}),0!==e.length||n?(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[e.map(e=>(0,r.jsx)(E,{workspace:e,onDelete:L,onEdit:e=>S.push("/workspaces/".concat(e)),router:S},e.name)),(0,r.jsx)(D,{onClick:()=>S.push("/workspace/new")})]}):(0,r.jsxs)("div",{className:"text-center py-10",children:[(0,r.jsx)("p",{className:"text-lg text-gray-600",children:"No workspaces found."}),(0,r.jsx)("p",{className:"text-sm text-gray-500 mt-2",children:"Create a cluster to see its workspace here."})]}),x&&(0,r.jsx)(p.Vq,{open:v,onOpenChange:T,children:(0,r.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,r.jsx)(p.fK,{children:(0,r.jsx)(p.$N,{className:"pr-10",children:"All Workspaces Configuration"})}),(0,r.jsx)("div",{className:"flex-grow overflow-y-auto py-4",children:(0,r.jsx)("pre",{style:{backgroundColor:"#f5f5f5",padding:"16px",borderRadius:"8px",overflowX:"auto",whiteSpace:"pre",wordBreak:"normal"},children:f.ZP.dump(x,{indent:2})})})]})}),(0,r.jsx)(p.Vq,{open:_.confirmOpen,onOpenChange:Z,children:(0,r.jsxs)(p.cZ,{className:"sm:max-w-md",children:[(0,r.jsxs)(p.fK,{children:[(0,r.jsx)(p.$N,{children:"Delete Workspace"}),(0,r.jsxs)(p.Be,{children:['Are you sure you want to delete workspace "',_.workspaceToDelete,'"? This action cannot be undone.']})]}),(0,r.jsx)(j.X,{error:_.error,title:"Deletion Failed",onDismiss:()=>R(e=>({...e,error:null}))}),(0,r.jsxs)(p.cN,{children:[(0,r.jsx)(m.z,{variant:"outline",onClick:Z,disabled:_.deleting,children:"Cancel"}),(0,r.jsx)(m.z,{variant:"destructive",onClick:A,disabled:_.deleting,children:_.deleting?"Deleting...":"Delete"})]})]})})]})}function _(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n(),{children:(0,r.jsx)("title",{children:"Workspaces | SkyPilot Dashboard"})}),(0,r.jsx)(c.A,{highlighted:"workspaces",children:(0,r.jsx)(T,{})})]})}}},function(e){e.O(0,[614,798,121,470,969,293,856,973,236,888,774,179],function(){return e(e.s=2592)}),_N_E=e.O()}]);
|
@@ -1 +1 @@
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/dashboard/_next/static/css/667d941a2888ce6e.css" as="style"/><link rel="stylesheet" href="/dashboard/_next/static/css/667d941a2888ce6e.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/dashboard/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/dashboard/_next/static/chunks/webpack-65d465f948974c0d.js" defer=""></script><script src="/dashboard/_next/static/chunks/framework-87d061ee6ed71b28.js" defer=""></script><script src="/dashboard/_next/static/chunks/main-e0e2335212e72357.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/_app-cb81dc4d27f4d009.js" defer=""></script><script src="/dashboard/_next/static/chunks/614-635a84e87800f99e.js" defer=""></script><script src="/dashboard/_next/static/chunks/470-
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/dashboard/_next/static/css/667d941a2888ce6e.css" as="style"/><link rel="stylesheet" href="/dashboard/_next/static/css/667d941a2888ce6e.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/dashboard/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/dashboard/_next/static/chunks/webpack-65d465f948974c0d.js" defer=""></script><script src="/dashboard/_next/static/chunks/framework-87d061ee6ed71b28.js" defer=""></script><script src="/dashboard/_next/static/chunks/main-e0e2335212e72357.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/_app-cb81dc4d27f4d009.js" defer=""></script><script src="/dashboard/_next/static/chunks/614-635a84e87800f99e.js" defer=""></script><script src="/dashboard/_next/static/chunks/470-ad1e0db3afcbd9c9.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/clusters/%5Bcluster%5D/%5Bjob%5D-18aed9b56247d074.js" defer=""></script><script src="/dashboard/_next/static/1qG0HTmVilJPxQdBk0fX5/_buildManifest.js" defer=""></script><script src="/dashboard/_next/static/1qG0HTmVilJPxQdBk0fX5/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div>Loading...</div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/clusters/[cluster]/[job]","query":{},"buildId":"1qG0HTmVilJPxQdBk0fX5","assetPrefix":"/dashboard","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
@@ -1 +1 @@
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/dashboard/_next/static/css/667d941a2888ce6e.css" as="style"/><link rel="stylesheet" href="/dashboard/_next/static/css/667d941a2888ce6e.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/dashboard/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/dashboard/_next/static/chunks/webpack-65d465f948974c0d.js" defer=""></script><script src="/dashboard/_next/static/chunks/framework-87d061ee6ed71b28.js" defer=""></script><script src="/dashboard/_next/static/chunks/main-e0e2335212e72357.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/_app-cb81dc4d27f4d009.js" defer=""></script><script src="/dashboard/_next/static/chunks/614-635a84e87800f99e.js" defer=""></script><script src="/dashboard/_next/static/chunks/798-c0525dc3f21e488d.js" defer=""></script><script src="/dashboard/_next/static/chunks/121-865d2bf8a3b84c6a.js" defer=""></script><script src="/dashboard/_next/static/chunks/470-
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/dashboard/_next/static/css/667d941a2888ce6e.css" as="style"/><link rel="stylesheet" href="/dashboard/_next/static/css/667d941a2888ce6e.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/dashboard/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/dashboard/_next/static/chunks/webpack-65d465f948974c0d.js" defer=""></script><script src="/dashboard/_next/static/chunks/framework-87d061ee6ed71b28.js" defer=""></script><script src="/dashboard/_next/static/chunks/main-e0e2335212e72357.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/_app-cb81dc4d27f4d009.js" defer=""></script><script src="/dashboard/_next/static/chunks/614-635a84e87800f99e.js" defer=""></script><script src="/dashboard/_next/static/chunks/798-c0525dc3f21e488d.js" defer=""></script><script src="/dashboard/_next/static/chunks/121-865d2bf8a3b84c6a.js" defer=""></script><script src="/dashboard/_next/static/chunks/470-ad1e0db3afcbd9c9.js" defer=""></script><script src="/dashboard/_next/static/chunks/969-2c584e28e6b4b106.js" defer=""></script><script src="/dashboard/_next/static/chunks/293-351268365226d251.js" defer=""></script><script src="/dashboard/_next/static/chunks/856-3a32da4b84176f6d.js" defer=""></script><script src="/dashboard/_next/static/chunks/973-6d78a0814682d771.js" defer=""></script><script src="/dashboard/_next/static/chunks/236-619ed0248fb6fdd9.js" defer=""></script><script src="/dashboard/_next/static/chunks/37-600191c5804dcae2.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/clusters/%5Bcluster%5D-b919a73aecdfa78f.js" defer=""></script><script src="/dashboard/_next/static/1qG0HTmVilJPxQdBk0fX5/_buildManifest.js" defer=""></script><script src="/dashboard/_next/static/1qG0HTmVilJPxQdBk0fX5/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div>Loading...</div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/clusters/[cluster]","query":{},"buildId":"1qG0HTmVilJPxQdBk0fX5","assetPrefix":"/dashboard","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
sky/dashboard/out/clusters.html
CHANGED
@@ -1 +1 @@
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>Clusters | SkyPilot Dashboard</title><link rel="preload" href="/dashboard/skypilot.svg" as="image" fetchpriority="high"/><meta name="next-head-count" content="4"/><link rel="preload" href="/dashboard/_next/static/css/667d941a2888ce6e.css" as="style"/><link rel="stylesheet" href="/dashboard/_next/static/css/667d941a2888ce6e.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/dashboard/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/dashboard/_next/static/chunks/webpack-65d465f948974c0d.js" defer=""></script><script src="/dashboard/_next/static/chunks/framework-87d061ee6ed71b28.js" defer=""></script><script src="/dashboard/_next/static/chunks/main-e0e2335212e72357.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/_app-cb81dc4d27f4d009.js" defer=""></script><script src="/dashboard/_next/static/chunks/614-635a84e87800f99e.js" defer=""></script><script src="/dashboard/_next/static/chunks/798-c0525dc3f21e488d.js" defer=""></script><script src="/dashboard/_next/static/chunks/121-865d2bf8a3b84c6a.js" defer=""></script><script src="/dashboard/_next/static/chunks/470-9e7a479cc8303baa.js" defer=""></script><script src="/dashboard/_next/static/chunks/293-351268365226d251.js" defer=""></script><script src="/dashboard/_next/static/chunks/969-c7abda31c10440ac.js" defer=""></script><script src="/dashboard/_next/static/chunks/856-3a32da4b84176f6d.js" defer=""></script><script src="/dashboard/_next/static/chunks/973-1a09cac61cfcc1e1.js" defer=""></script><script src="/dashboard/_next/static/chunks/37-beedd583fea84cc8.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/clusters-5549a350f97d7ef3.js" defer=""></script><script src="/dashboard/_next/static/qjhIe-yC6nHcLKBqpzO1M/_buildManifest.js" defer=""></script><script src="/dashboard/_next/static/qjhIe-yC6nHcLKBqpzO1M/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div class="min-h-screen bg-gray-50"><div class="fixed top-0 left-0 right-0 z-50 shadow-sm"><div class="fixed top-0 left-0 right-0 bg-white z-30 h-14 px-4 border-b border-gray-200 shadow-sm"><div class="flex items-center h-full"><div class="flex items-center space-x-4 mr-6"><a class="flex items-center px-1 pt-1 h-full" href="/dashboard"><div class="h-20 w-20 flex items-center justify-center"><img alt="SkyPilot Logo" fetchpriority="high" width="80" height="80" decoding="async" data-nimg="1" class="w-full h-full object-contain" style="color:transparent" src="/dashboard/skypilot.svg"/></div></a></div><div class="flex items-center space-x-2 md:space-x-4 mr-6"><a class="inline-flex items-center border-b-2 border-transparent text-blue-600 px-1 pt-1 space-x-2" href="/dashboard/clusters"><svg class="w-4 h-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="8" x="2" y="2" rx="2" ry="2"></rect><rect width="20" height="8" x="2" y="14" rx="2" ry="2"></rect><line x1="6" x2="6.01" y1="6" y2="6"></line><line x1="6" x2="6.01" y1="18" y2="18"></line></svg><span>Clusters</span></a><a class="inline-flex items-center border-b-2 border-transparent hover:text-blue-600 px-1 pt-1 space-x-2" href="/dashboard/jobs"><svg class="w-4 h-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"></path><rect width="20" height="14" x="2" y="6" rx="2"></rect></svg><span>Jobs</span></a><div class="border-l border-gray-200 h-6 mx-1"></div><a class="inline-flex items-center border-b-2 border-transparent hover:text-blue-600 px-1 pt-1 space-x-2" href="/dashboard/infra"><svg class="w-4 h-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="4" width="16" height="16" rx="2" ry="2"></rect><rect x="9" y="9" width="6" height="6"></rect><line x1="9" y1="1" x2="9" y2="4"></line><line x1="15" y1="1" x2="15" y2="4"></line><line x1="9" y1="20" x2="9" y2="23"></line><line x1="15" y1="20" x2="15" y2="23"></line><line x1="20" y1="9" x2="23" y2="9"></line><line x1="20" y1="14" x2="23" y2="14"></line><line x1="1" y1="9" x2="4" y2="9"></line><line x1="1" y1="14" x2="4" y2="14"></line></svg><span>Infra</span></a><a class="inline-flex items-center border-b-2 border-transparent hover:text-blue-600 px-1 pt-1 space-x-2" href="/dashboard/workspaces"><svg class="w-4 h-4" stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g><path fill="none" d="M0 0h24v24H0z"></path><path d="M3 18.5V5a3 3 0 0 1 3-3h14a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5A3.5 3.5 0 0 1 3 18.5zM19 20v-3H6.5a1.5 1.5 0 0 0 0 3H19zM10 4H6a1 1 0 0 0-1 1v10.337A3.486 3.486 0 0 1 6.5 15H19V4h-2v8l-3.5-2-3.5 2V4z"></path></g></svg><span>Workspaces</span></a><a class="inline-flex items-center border-b-2 border-transparent hover:text-blue-600 px-1 pt-1 space-x-2" href="/dashboard/users"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-users w-4 h-4"><path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M22 21v-2a4 4 0 0 0-3-3.87"></path><path d="M16 3.13a4 4 0 0 1 0 7.75"></path></svg><span>Users</span></a></div><div class="flex items-center space-x-1 ml-auto"><a href="https://skypilot.readthedocs.io/en/latest/" target="_blank" rel="noopener noreferrer" class="inline-flex items-center px-2 py-1 text-gray-600 hover:text-blue-600 transition-colors duration-150 cursor-pointer" title="Docs" tabindex="0"><span class="mr-1">Docs</span><svg class="w-3.5 h-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line></svg></a><a href="https://github.com/skypilot-org/skypilot" target="_blank" rel="noopener noreferrer" class="inline-flex items-center justify-center p-2 rounded-full text-gray-600 hover:bg-gray-100 transition-colors duration-150 cursor-pointer" title="GitHub" tabindex="0"><svg class="w-5 h-5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"></path></svg></a><a href="https://slack.skypilot.co/" target="_blank" rel="noopener noreferrer" class="inline-flex items-center justify-center p-2 rounded-full text-gray-600 hover:bg-gray-100 transition-colors duration-150 cursor-pointer" title="Slack" tabindex="0"><svg class="w-5 h-5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><path transform="scale(0.85) translate(1.8, 1.8)" d="M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z"></path></svg></a><a href="https://github.com/skypilot-org/skypilot/issues/new" target="_blank" rel="noopener noreferrer" class="inline-flex items-center justify-center p-2 rounded-full text-gray-600 hover:bg-gray-100 transition-colors duration-150 cursor-pointer" title="Leave Feedback" tabindex="0"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-message-square w-5 h-5"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg></a><div class="border-l border-gray-200 h-6"></div><a class="inline-flex items-center justify-center p-2 rounded-full transition-colors duration-150 cursor-pointer text-gray-600 hover:bg-gray-100" title="Configuration" tabindex="0" href="/dashboard/config"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-settings w-5 h-5"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"></path><circle cx="12" cy="12" r="3"></circle></svg></a></div></div></div></div><div class="transition-all duration-200 ease-in-out min-h-screen" style="padding-top:56px"><main class="p-6"><div class="flex items-center justify-between mb-4 h-5"><div class="text-base flex items-center"><a class="text-sky-blue hover:underline leading-none" href="/dashboard/clusters">Sky Clusters</a><button type="button" role="combobox" aria-controls="radix-:Rid6:" aria-expanded="false" aria-autocomplete="none" dir="ltr" data-state="closed" class="flex items-center justify-between rounded-md border border-input bg-background px-3 py-2 ring-offset-background placeholder:text-muted-foreground focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 h-8 w-48 ml-4 mr-2 text-sm border-none focus:ring-0 focus:outline-none"><span style="pointer-events:none">All Workspaces</span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down h-4 w-4 opacity-50" aria-hidden="true"><path d="m6 9 6 6 6-6"></path></svg></button><select aria-hidden="true" tabindex="-1" style="position:absolute;border:0;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;word-wrap:normal"></select></div><div class="flex items-center"><button class="text-sky-blue hover:text-sky-blue-bright flex items-center"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-rotate-cw h-4 w-4 mr-1.5"><path d="M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path></svg><span>Refresh</span></button></div></div><div><div class="rounded-lg border bg-card text-card-foreground shadow-sm"><div class="relative w-full overflow-auto"><table class="w-full caption-bottom text-base"><thead class="[&_tr]:border-b"><tr class="border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted"><th class="h-12 px-4 text-left align-middle font-medium text-[hsl(var(--text-strong))] [&:has([role=checkbox])]:pr-0 sortable whitespace-nowrap">Status</th><th class="h-12 px-4 text-left align-middle font-medium text-[hsl(var(--text-strong))] [&:has([role=checkbox])]:pr-0 sortable whitespace-nowrap">Cluster</th><th class="h-12 px-4 text-left align-middle font-medium text-[hsl(var(--text-strong))] [&:has([role=checkbox])]:pr-0 sortable whitespace-nowrap">User</th><th class="h-12 px-4 text-left align-middle font-medium text-[hsl(var(--text-strong))] [&:has([role=checkbox])]:pr-0 sortable whitespace-nowrap">Workspace</th><th class="h-12 px-4 text-left align-middle font-medium text-[hsl(var(--text-strong))] [&:has([role=checkbox])]:pr-0 sortable whitespace-nowrap">Infra</th><th class="h-12 px-4 text-left align-middle font-medium text-[hsl(var(--text-strong))] [&:has([role=checkbox])]:pr-0 sortable whitespace-nowrap">Resources</th><th class="h-12 px-4 text-left align-middle font-medium text-[hsl(var(--text-strong))] [&:has([role=checkbox])]:pr-0 sortable whitespace-nowrap">Started</th><th class="h-12 px-4 text-left align-middle font-medium text-[hsl(var(--text-strong))] [&:has([role=checkbox])]:pr-0 sortable whitespace-nowrap">Autostop</th><th class="h-12 px-4 text-left align-middle font-medium text-[hsl(var(--text-strong))] [&:has([role=checkbox])]:pr-0">Actions</th></tr></thead><tbody class="[&_tr:last-child]:border-0"><tr class="border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted"><td class="p-4 align-middle [&:has([role=checkbox])]:pr-0 text-center py-6 text-gray-500" colSpan="9">No active clusters</td></tr></tbody></table></div></div></div></main></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/clusters","query":{},"buildId":"qjhIe-yC6nHcLKBqpzO1M","assetPrefix":"/dashboard","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>Clusters | SkyPilot Dashboard</title><link rel="preload" href="/dashboard/skypilot.svg" as="image" fetchpriority="high"/><meta name="next-head-count" content="4"/><link rel="preload" href="/dashboard/_next/static/css/667d941a2888ce6e.css" as="style"/><link rel="stylesheet" href="/dashboard/_next/static/css/667d941a2888ce6e.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/dashboard/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/dashboard/_next/static/chunks/webpack-65d465f948974c0d.js" defer=""></script><script src="/dashboard/_next/static/chunks/framework-87d061ee6ed71b28.js" defer=""></script><script src="/dashboard/_next/static/chunks/main-e0e2335212e72357.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/_app-cb81dc4d27f4d009.js" defer=""></script><script src="/dashboard/_next/static/chunks/614-635a84e87800f99e.js" defer=""></script><script src="/dashboard/_next/static/chunks/798-c0525dc3f21e488d.js" defer=""></script><script src="/dashboard/_next/static/chunks/121-865d2bf8a3b84c6a.js" defer=""></script><script src="/dashboard/_next/static/chunks/470-ad1e0db3afcbd9c9.js" defer=""></script><script src="/dashboard/_next/static/chunks/969-2c584e28e6b4b106.js" defer=""></script><script src="/dashboard/_next/static/chunks/293-351268365226d251.js" defer=""></script><script src="/dashboard/_next/static/chunks/856-3a32da4b84176f6d.js" defer=""></script><script src="/dashboard/_next/static/chunks/973-6d78a0814682d771.js" defer=""></script><script src="/dashboard/_next/static/chunks/37-600191c5804dcae2.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/clusters-4f6b9dd9abcb33ad.js" defer=""></script><script src="/dashboard/_next/static/1qG0HTmVilJPxQdBk0fX5/_buildManifest.js" defer=""></script><script src="/dashboard/_next/static/1qG0HTmVilJPxQdBk0fX5/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div class="min-h-screen bg-gray-50"><div class="fixed top-0 left-0 right-0 z-50 shadow-sm"><div class="fixed top-0 left-0 right-0 bg-white z-30 h-14 px-4 border-b border-gray-200 shadow-sm"><div class="flex items-center h-full"><div class="flex items-center space-x-4 mr-6"><a class="flex items-center px-1 pt-1 h-full" href="/dashboard"><div class="h-20 w-20 flex items-center justify-center"><img alt="SkyPilot Logo" fetchpriority="high" width="80" height="80" decoding="async" data-nimg="1" class="w-full h-full object-contain" style="color:transparent" src="/dashboard/skypilot.svg"/></div></a></div><div class="flex items-center space-x-2 md:space-x-4 mr-6"><a class="inline-flex items-center border-b-2 border-transparent text-blue-600 px-1 pt-1 space-x-2" href="/dashboard/clusters"><svg class="w-4 h-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="8" x="2" y="2" rx="2" ry="2"></rect><rect width="20" height="8" x="2" y="14" rx="2" ry="2"></rect><line x1="6" x2="6.01" y1="6" y2="6"></line><line x1="6" x2="6.01" y1="18" y2="18"></line></svg><span>Clusters</span></a><a class="inline-flex items-center border-b-2 border-transparent hover:text-blue-600 px-1 pt-1 space-x-2" href="/dashboard/jobs"><svg class="w-4 h-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"></path><rect width="20" height="14" x="2" y="6" rx="2"></rect></svg><span>Jobs</span></a><div class="border-l border-gray-200 h-6 mx-1"></div><a class="inline-flex items-center border-b-2 border-transparent hover:text-blue-600 px-1 pt-1 space-x-2" href="/dashboard/infra"><svg class="w-4 h-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="4" width="16" height="16" rx="2" ry="2"></rect><rect x="9" y="9" width="6" height="6"></rect><line x1="9" y1="1" x2="9" y2="4"></line><line x1="15" y1="1" x2="15" y2="4"></line><line x1="9" y1="20" x2="9" y2="23"></line><line x1="15" y1="20" x2="15" y2="23"></line><line x1="20" y1="9" x2="23" y2="9"></line><line x1="20" y1="14" x2="23" y2="14"></line><line x1="1" y1="9" x2="4" y2="9"></line><line x1="1" y1="14" x2="4" y2="14"></line></svg><span>Infra</span></a><a class="inline-flex items-center border-b-2 border-transparent hover:text-blue-600 px-1 pt-1 space-x-2" href="/dashboard/workspaces"><svg class="w-4 h-4" stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g><path fill="none" d="M0 0h24v24H0z"></path><path d="M3 18.5V5a3 3 0 0 1 3-3h14a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5A3.5 3.5 0 0 1 3 18.5zM19 20v-3H6.5a1.5 1.5 0 0 0 0 3H19zM10 4H6a1 1 0 0 0-1 1v10.337A3.486 3.486 0 0 1 6.5 15H19V4h-2v8l-3.5-2-3.5 2V4z"></path></g></svg><span>Workspaces</span></a><a class="inline-flex items-center border-b-2 border-transparent hover:text-blue-600 px-1 pt-1 space-x-2" href="/dashboard/users"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-users w-4 h-4"><path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M22 21v-2a4 4 0 0 0-3-3.87"></path><path d="M16 3.13a4 4 0 0 1 0 7.75"></path></svg><span>Users</span></a></div><div class="flex items-center space-x-1 ml-auto"><a href="https://skypilot.readthedocs.io/en/latest/" target="_blank" rel="noopener noreferrer" class="inline-flex items-center px-2 py-1 text-gray-600 hover:text-blue-600 transition-colors duration-150 cursor-pointer" title="Docs" tabindex="0"><span class="mr-1">Docs</span><svg class="w-3.5 h-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line></svg></a><a href="https://github.com/skypilot-org/skypilot" target="_blank" rel="noopener noreferrer" class="inline-flex items-center justify-center p-2 rounded-full text-gray-600 hover:bg-gray-100 transition-colors duration-150 cursor-pointer" title="GitHub" tabindex="0"><svg class="w-5 h-5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"></path></svg></a><a href="https://slack.skypilot.co/" target="_blank" rel="noopener noreferrer" class="inline-flex items-center justify-center p-2 rounded-full text-gray-600 hover:bg-gray-100 transition-colors duration-150 cursor-pointer" title="Slack" tabindex="0"><svg class="w-5 h-5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><path transform="scale(0.85) translate(1.8, 1.8)" d="M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z"></path></svg></a><a href="https://github.com/skypilot-org/skypilot/issues/new" target="_blank" rel="noopener noreferrer" class="inline-flex items-center justify-center p-2 rounded-full text-gray-600 hover:bg-gray-100 transition-colors duration-150 cursor-pointer" title="Leave Feedback" tabindex="0"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-message-square w-5 h-5"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg></a><div class="border-l border-gray-200 h-6"></div><a class="inline-flex items-center justify-center p-2 rounded-full transition-colors duration-150 cursor-pointer text-gray-600 hover:bg-gray-100" title="Configuration" tabindex="0" href="/dashboard/config"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-settings w-5 h-5"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"></path><circle cx="12" cy="12" r="3"></circle></svg></a></div></div></div></div><div class="transition-all duration-200 ease-in-out min-h-screen" style="padding-top:56px"><main class="p-6"><div class="flex items-center justify-between mb-4 h-5"><div class="text-base flex items-center"><a class="text-sky-blue hover:underline leading-none" href="/dashboard/clusters">Sky Clusters</a><button type="button" role="combobox" aria-controls="radix-:Rid6:" aria-expanded="false" aria-autocomplete="none" dir="ltr" data-state="closed" class="flex items-center justify-between rounded-md border border-input bg-background px-3 py-2 ring-offset-background placeholder:text-muted-foreground focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 h-8 w-48 ml-4 mr-2 text-sm border-none focus:ring-0 focus:outline-none"><span style="pointer-events:none">All Workspaces</span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down h-4 w-4 opacity-50" aria-hidden="true"><path d="m6 9 6 6 6-6"></path></svg></button><select aria-hidden="true" tabindex="-1" style="position:absolute;border:0;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;word-wrap:normal"></select></div><div class="flex items-center"><button class="text-sky-blue hover:text-sky-blue-bright flex items-center"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-rotate-cw h-4 w-4 mr-1.5"><path d="M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path></svg><span>Refresh</span></button></div></div><div><div class="rounded-lg border bg-card text-card-foreground shadow-sm"><div class="relative w-full overflow-auto"><table class="w-full caption-bottom text-base"><thead class="[&_tr]:border-b"><tr class="border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted"><th class="h-12 px-4 text-left align-middle font-medium text-[hsl(var(--text-strong))] [&:has([role=checkbox])]:pr-0 sortable whitespace-nowrap">Status</th><th class="h-12 px-4 text-left align-middle font-medium text-[hsl(var(--text-strong))] [&:has([role=checkbox])]:pr-0 sortable whitespace-nowrap">Cluster</th><th class="h-12 px-4 text-left align-middle font-medium text-[hsl(var(--text-strong))] [&:has([role=checkbox])]:pr-0 sortable whitespace-nowrap">User</th><th class="h-12 px-4 text-left align-middle font-medium text-[hsl(var(--text-strong))] [&:has([role=checkbox])]:pr-0 sortable whitespace-nowrap">Workspace</th><th class="h-12 px-4 text-left align-middle font-medium text-[hsl(var(--text-strong))] [&:has([role=checkbox])]:pr-0 sortable whitespace-nowrap">Infra</th><th class="h-12 px-4 text-left align-middle font-medium text-[hsl(var(--text-strong))] [&:has([role=checkbox])]:pr-0 sortable whitespace-nowrap">Resources</th><th class="h-12 px-4 text-left align-middle font-medium text-[hsl(var(--text-strong))] [&:has([role=checkbox])]:pr-0 sortable whitespace-nowrap">Started</th><th class="h-12 px-4 text-left align-middle font-medium text-[hsl(var(--text-strong))] [&:has([role=checkbox])]:pr-0 sortable whitespace-nowrap">Autostop</th><th class="h-12 px-4 text-left align-middle font-medium text-[hsl(var(--text-strong))] [&:has([role=checkbox])]:pr-0">Actions</th></tr></thead><tbody class="[&_tr:last-child]:border-0"><tr class="border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted"><td class="p-4 align-middle [&:has([role=checkbox])]:pr-0 text-center py-6 text-gray-500" colSpan="9">No active clusters</td></tr></tbody></table></div></div></div></main></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/clusters","query":{},"buildId":"1qG0HTmVilJPxQdBk0fX5","assetPrefix":"/dashboard","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
sky/dashboard/out/config.html
CHANGED
@@ -1 +1 @@
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>Edit SkyPilot Configuration | SkyPilot Dashboard</title><link rel="preload" href="/dashboard/skypilot.svg" as="image" fetchpriority="high"/><meta name="next-head-count" content="4"/><link rel="preload" href="/dashboard/_next/static/css/667d941a2888ce6e.css" as="style"/><link rel="stylesheet" href="/dashboard/_next/static/css/667d941a2888ce6e.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/dashboard/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/dashboard/_next/static/chunks/webpack-65d465f948974c0d.js" defer=""></script><script src="/dashboard/_next/static/chunks/framework-87d061ee6ed71b28.js" defer=""></script><script src="/dashboard/_next/static/chunks/main-e0e2335212e72357.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/_app-cb81dc4d27f4d009.js" defer=""></script><script src="/dashboard/_next/static/chunks/614-635a84e87800f99e.js" defer=""></script><script src="/dashboard/_next/static/chunks/798-c0525dc3f21e488d.js" defer=""></script><script src="/dashboard/_next/static/chunks/470-9e7a479cc8303baa.js" defer=""></script><script src="/dashboard/_next/static/chunks/293-351268365226d251.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/config-1a1eeb949dab8897.js" defer=""></script><script src="/dashboard/_next/static/qjhIe-yC6nHcLKBqpzO1M/_buildManifest.js" defer=""></script><script src="/dashboard/_next/static/qjhIe-yC6nHcLKBqpzO1M/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div class="min-h-screen bg-gray-50"><div class="fixed top-0 left-0 right-0 z-50 shadow-sm"><div class="fixed top-0 left-0 right-0 bg-white z-30 h-14 px-4 border-b border-gray-200 shadow-sm"><div class="flex items-center h-full"><div class="flex items-center space-x-4 mr-6"><a class="flex items-center px-1 pt-1 h-full" href="/dashboard"><div class="h-20 w-20 flex items-center justify-center"><img alt="SkyPilot Logo" fetchpriority="high" width="80" height="80" decoding="async" data-nimg="1" class="w-full h-full object-contain" style="color:transparent" src="/dashboard/skypilot.svg"/></div></a></div><div class="flex items-center space-x-2 md:space-x-4 mr-6"><a class="inline-flex items-center border-b-2 border-transparent hover:text-blue-600 px-1 pt-1 space-x-2" href="/dashboard/clusters"><svg class="w-4 h-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="8" x="2" y="2" rx="2" ry="2"></rect><rect width="20" height="8" x="2" y="14" rx="2" ry="2"></rect><line x1="6" x2="6.01" y1="6" y2="6"></line><line x1="6" x2="6.01" y1="18" y2="18"></line></svg><span>Clusters</span></a><a class="inline-flex items-center border-b-2 border-transparent hover:text-blue-600 px-1 pt-1 space-x-2" href="/dashboard/jobs"><svg class="w-4 h-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"></path><rect width="20" height="14" x="2" y="6" rx="2"></rect></svg><span>Jobs</span></a><div class="border-l border-gray-200 h-6 mx-1"></div><a class="inline-flex items-center border-b-2 border-transparent hover:text-blue-600 px-1 pt-1 space-x-2" href="/dashboard/infra"><svg class="w-4 h-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="4" width="16" height="16" rx="2" ry="2"></rect><rect x="9" y="9" width="6" height="6"></rect><line x1="9" y1="1" x2="9" y2="4"></line><line x1="15" y1="1" x2="15" y2="4"></line><line x1="9" y1="20" x2="9" y2="23"></line><line x1="15" y1="20" x2="15" y2="23"></line><line x1="20" y1="9" x2="23" y2="9"></line><line x1="20" y1="14" x2="23" y2="14"></line><line x1="1" y1="9" x2="4" y2="9"></line><line x1="1" y1="14" x2="4" y2="14"></line></svg><span>Infra</span></a><a class="inline-flex items-center border-b-2 border-transparent hover:text-blue-600 px-1 pt-1 space-x-2" href="/dashboard/workspaces"><svg class="w-4 h-4" stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g><path fill="none" d="M0 0h24v24H0z"></path><path d="M3 18.5V5a3 3 0 0 1 3-3h14a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5A3.5 3.5 0 0 1 3 18.5zM19 20v-3H6.5a1.5 1.5 0 0 0 0 3H19zM10 4H6a1 1 0 0 0-1 1v10.337A3.486 3.486 0 0 1 6.5 15H19V4h-2v8l-3.5-2-3.5 2V4z"></path></g></svg><span>Workspaces</span></a><a class="inline-flex items-center border-b-2 border-transparent hover:text-blue-600 px-1 pt-1 space-x-2" href="/dashboard/users"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-users w-4 h-4"><path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M22 21v-2a4 4 0 0 0-3-3.87"></path><path d="M16 3.13a4 4 0 0 1 0 7.75"></path></svg><span>Users</span></a></div><div class="flex items-center space-x-1 ml-auto"><a href="https://skypilot.readthedocs.io/en/latest/" target="_blank" rel="noopener noreferrer" class="inline-flex items-center px-2 py-1 text-gray-600 hover:text-blue-600 transition-colors duration-150 cursor-pointer" title="Docs" tabindex="0"><span class="mr-1">Docs</span><svg class="w-3.5 h-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line></svg></a><a href="https://github.com/skypilot-org/skypilot" target="_blank" rel="noopener noreferrer" class="inline-flex items-center justify-center p-2 rounded-full text-gray-600 hover:bg-gray-100 transition-colors duration-150 cursor-pointer" title="GitHub" tabindex="0"><svg class="w-5 h-5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"></path></svg></a><a href="https://slack.skypilot.co/" target="_blank" rel="noopener noreferrer" class="inline-flex items-center justify-center p-2 rounded-full text-gray-600 hover:bg-gray-100 transition-colors duration-150 cursor-pointer" title="Slack" tabindex="0"><svg class="w-5 h-5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><path transform="scale(0.85) translate(1.8, 1.8)" d="M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z"></path></svg></a><a href="https://github.com/skypilot-org/skypilot/issues/new" target="_blank" rel="noopener noreferrer" class="inline-flex items-center justify-center p-2 rounded-full text-gray-600 hover:bg-gray-100 transition-colors duration-150 cursor-pointer" title="Leave Feedback" tabindex="0"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-message-square w-5 h-5"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg></a><div class="border-l border-gray-200 h-6"></div><a class="inline-flex items-center justify-center p-2 rounded-full transition-colors duration-150 cursor-pointer text-blue-600 hover:bg-gray-100" title="Configuration" tabindex="0" href="/dashboard/config"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-settings w-5 h-5"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"></path><circle cx="12" cy="12" r="3"></circle></svg></a></div></div></div></div><div class="transition-all duration-200 ease-in-out min-h-screen" style="padding-top:56px"><main class="p-6"><div class="flex items-center justify-between mb-4 h-5"><div class="text-base flex items-center"><span class="text-sky-blue">SkyPilot Configuration</span></div><div class="flex items-center"><div class="text-sm flex items-center"><div class="flex items-center mr-4"><style data-emotion="css z01bqi animation-61bdi0">.css-z01bqi{display:inline-block;color:#1976d2;-webkit-animation:animation-61bdi0 1.4s linear infinite;animation:animation-61bdi0 1.4s linear infinite;}@-webkit-keyframes animation-61bdi0{0%{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0deg);}100%{-webkit-transform:rotate(360deg);-moz-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}@keyframes animation-61bdi0{0%{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0deg);}100%{-webkit-transform:rotate(360deg);-moz-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}</style><span class="MuiCircularProgress-root MuiCircularProgress-indeterminate MuiCircularProgress-colorPrimary mt-0 css-z01bqi" style="width:15px;height:15px" role="progressbar"><style data-emotion="css 13o7eu2">.css-13o7eu2{display:block;}</style><svg class="MuiCircularProgress-svg css-13o7eu2" viewBox="22 22 44 44"><style data-emotion="css 14891ef animation-1p2h4ri">.css-14891ef{stroke:currentColor;stroke-dasharray:80px,200px;stroke-dashoffset:0;-webkit-animation:animation-1p2h4ri 1.4s ease-in-out infinite;animation:animation-1p2h4ri 1.4s ease-in-out infinite;}@-webkit-keyframes animation-1p2h4ri{0%{stroke-dasharray:1px,200px;stroke-dashoffset:0;}50%{stroke-dasharray:100px,200px;stroke-dashoffset:-15px;}100%{stroke-dasharray:100px,200px;stroke-dashoffset:-125px;}}@keyframes animation-1p2h4ri{0%{stroke-dasharray:1px,200px;stroke-dashoffset:0;}50%{stroke-dasharray:100px,200px;stroke-dashoffset:-15px;}100%{stroke-dasharray:100px,200px;stroke-dashoffset:-125px;}}</style><circle class="MuiCircularProgress-circle MuiCircularProgress-circleIndeterminate css-14891ef" cx="44" cy="44" r="20.2" fill="none" stroke-width="3.6"></circle></svg></span><span class="ml-2 text-gray-500">Loading...</span></div></div></div></div><div class="rounded-lg border bg-card text-card-foreground shadow-sm w-full"><div class="flex flex-col space-y-1.5 p-6"><h3 class="tracking-tight text-base font-normal flex items-center justify-between"><span>Edit SkyPilot API Server Configuration</span></h3></div><div class="p-6 pt-0 space-y-4"><p class="text-sm text-gray-600 mb-3">Refer to the<!-- --> <a href="https://docs.skypilot.co/en/latest/reference/config.html" target="_blank" rel="noopener noreferrer" class="text-blue-600 hover:underline">SkyPilot Docs</a> <!-- -->for details. The configuration should be in YAML format.</p><div class="w-full"><textarea class="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=""></textarea></div><div class="flex justify-end space-x-3 pt-3"><button class="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 border border-input bg-background hover:bg-accent hover:text-accent-foreground h-10 px-4 py-2">Cancel</button><button class="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 h-10 px-4 py-2 inline-flex items-center bg-blue-600 hover:bg-blue-700 text-white" disabled=""><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-save w-4 h-4 mr-1.5"><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"></path><path d="M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7"></path><path d="M7 3v4a1 1 0 0 0 1 1h7"></path></svg>Apply</button></div></div></div></main></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/config","query":{},"buildId":"qjhIe-yC6nHcLKBqpzO1M","assetPrefix":"/dashboard","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>Edit SkyPilot Configuration | SkyPilot Dashboard</title><link rel="preload" href="/dashboard/skypilot.svg" as="image" fetchpriority="high"/><meta name="next-head-count" content="4"/><link rel="preload" href="/dashboard/_next/static/css/667d941a2888ce6e.css" as="style"/><link rel="stylesheet" href="/dashboard/_next/static/css/667d941a2888ce6e.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/dashboard/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/dashboard/_next/static/chunks/webpack-65d465f948974c0d.js" defer=""></script><script src="/dashboard/_next/static/chunks/framework-87d061ee6ed71b28.js" defer=""></script><script src="/dashboard/_next/static/chunks/main-e0e2335212e72357.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/_app-cb81dc4d27f4d009.js" defer=""></script><script src="/dashboard/_next/static/chunks/614-635a84e87800f99e.js" defer=""></script><script src="/dashboard/_next/static/chunks/798-c0525dc3f21e488d.js" defer=""></script><script src="/dashboard/_next/static/chunks/470-ad1e0db3afcbd9c9.js" defer=""></script><script src="/dashboard/_next/static/chunks/293-351268365226d251.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/config-fe375a56342cf609.js" defer=""></script><script src="/dashboard/_next/static/1qG0HTmVilJPxQdBk0fX5/_buildManifest.js" defer=""></script><script src="/dashboard/_next/static/1qG0HTmVilJPxQdBk0fX5/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div class="min-h-screen bg-gray-50"><div class="fixed top-0 left-0 right-0 z-50 shadow-sm"><div class="fixed top-0 left-0 right-0 bg-white z-30 h-14 px-4 border-b border-gray-200 shadow-sm"><div class="flex items-center h-full"><div class="flex items-center space-x-4 mr-6"><a class="flex items-center px-1 pt-1 h-full" href="/dashboard"><div class="h-20 w-20 flex items-center justify-center"><img alt="SkyPilot Logo" fetchpriority="high" width="80" height="80" decoding="async" data-nimg="1" class="w-full h-full object-contain" style="color:transparent" src="/dashboard/skypilot.svg"/></div></a></div><div class="flex items-center space-x-2 md:space-x-4 mr-6"><a class="inline-flex items-center border-b-2 border-transparent hover:text-blue-600 px-1 pt-1 space-x-2" href="/dashboard/clusters"><svg class="w-4 h-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="8" x="2" y="2" rx="2" ry="2"></rect><rect width="20" height="8" x="2" y="14" rx="2" ry="2"></rect><line x1="6" x2="6.01" y1="6" y2="6"></line><line x1="6" x2="6.01" y1="18" y2="18"></line></svg><span>Clusters</span></a><a class="inline-flex items-center border-b-2 border-transparent hover:text-blue-600 px-1 pt-1 space-x-2" href="/dashboard/jobs"><svg class="w-4 h-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"></path><rect width="20" height="14" x="2" y="6" rx="2"></rect></svg><span>Jobs</span></a><div class="border-l border-gray-200 h-6 mx-1"></div><a class="inline-flex items-center border-b-2 border-transparent hover:text-blue-600 px-1 pt-1 space-x-2" href="/dashboard/infra"><svg class="w-4 h-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="4" width="16" height="16" rx="2" ry="2"></rect><rect x="9" y="9" width="6" height="6"></rect><line x1="9" y1="1" x2="9" y2="4"></line><line x1="15" y1="1" x2="15" y2="4"></line><line x1="9" y1="20" x2="9" y2="23"></line><line x1="15" y1="20" x2="15" y2="23"></line><line x1="20" y1="9" x2="23" y2="9"></line><line x1="20" y1="14" x2="23" y2="14"></line><line x1="1" y1="9" x2="4" y2="9"></line><line x1="1" y1="14" x2="4" y2="14"></line></svg><span>Infra</span></a><a class="inline-flex items-center border-b-2 border-transparent hover:text-blue-600 px-1 pt-1 space-x-2" href="/dashboard/workspaces"><svg class="w-4 h-4" stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g><path fill="none" d="M0 0h24v24H0z"></path><path d="M3 18.5V5a3 3 0 0 1 3-3h14a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5A3.5 3.5 0 0 1 3 18.5zM19 20v-3H6.5a1.5 1.5 0 0 0 0 3H19zM10 4H6a1 1 0 0 0-1 1v10.337A3.486 3.486 0 0 1 6.5 15H19V4h-2v8l-3.5-2-3.5 2V4z"></path></g></svg><span>Workspaces</span></a><a class="inline-flex items-center border-b-2 border-transparent hover:text-blue-600 px-1 pt-1 space-x-2" href="/dashboard/users"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-users w-4 h-4"><path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M22 21v-2a4 4 0 0 0-3-3.87"></path><path d="M16 3.13a4 4 0 0 1 0 7.75"></path></svg><span>Users</span></a></div><div class="flex items-center space-x-1 ml-auto"><a href="https://skypilot.readthedocs.io/en/latest/" target="_blank" rel="noopener noreferrer" class="inline-flex items-center px-2 py-1 text-gray-600 hover:text-blue-600 transition-colors duration-150 cursor-pointer" title="Docs" tabindex="0"><span class="mr-1">Docs</span><svg class="w-3.5 h-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line></svg></a><a href="https://github.com/skypilot-org/skypilot" target="_blank" rel="noopener noreferrer" class="inline-flex items-center justify-center p-2 rounded-full text-gray-600 hover:bg-gray-100 transition-colors duration-150 cursor-pointer" title="GitHub" tabindex="0"><svg class="w-5 h-5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"></path></svg></a><a href="https://slack.skypilot.co/" target="_blank" rel="noopener noreferrer" class="inline-flex items-center justify-center p-2 rounded-full text-gray-600 hover:bg-gray-100 transition-colors duration-150 cursor-pointer" title="Slack" tabindex="0"><svg class="w-5 h-5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><path transform="scale(0.85) translate(1.8, 1.8)" d="M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z"></path></svg></a><a href="https://github.com/skypilot-org/skypilot/issues/new" target="_blank" rel="noopener noreferrer" class="inline-flex items-center justify-center p-2 rounded-full text-gray-600 hover:bg-gray-100 transition-colors duration-150 cursor-pointer" title="Leave Feedback" tabindex="0"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-message-square w-5 h-5"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg></a><div class="border-l border-gray-200 h-6"></div><a class="inline-flex items-center justify-center p-2 rounded-full transition-colors duration-150 cursor-pointer text-blue-600 hover:bg-gray-100" title="Configuration" tabindex="0" href="/dashboard/config"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-settings w-5 h-5"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"></path><circle cx="12" cy="12" r="3"></circle></svg></a></div></div></div></div><div class="transition-all duration-200 ease-in-out min-h-screen" style="padding-top:56px"><main class="p-6"><div class="flex items-center justify-between mb-4 h-5"><div class="text-base flex items-center"><span class="text-sky-blue">SkyPilot Configuration</span></div><div class="flex items-center"><div class="text-sm flex items-center"><div class="flex items-center mr-4"><style data-emotion="css z01bqi animation-61bdi0">.css-z01bqi{display:inline-block;color:#1976d2;-webkit-animation:animation-61bdi0 1.4s linear infinite;animation:animation-61bdi0 1.4s linear infinite;}@-webkit-keyframes animation-61bdi0{0%{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0deg);}100%{-webkit-transform:rotate(360deg);-moz-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}@keyframes animation-61bdi0{0%{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0deg);}100%{-webkit-transform:rotate(360deg);-moz-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}</style><span class="MuiCircularProgress-root MuiCircularProgress-indeterminate MuiCircularProgress-colorPrimary mt-0 css-z01bqi" style="width:15px;height:15px" role="progressbar"><style data-emotion="css 13o7eu2">.css-13o7eu2{display:block;}</style><svg class="MuiCircularProgress-svg css-13o7eu2" viewBox="22 22 44 44"><style data-emotion="css 14891ef animation-1p2h4ri">.css-14891ef{stroke:currentColor;stroke-dasharray:80px,200px;stroke-dashoffset:0;-webkit-animation:animation-1p2h4ri 1.4s ease-in-out infinite;animation:animation-1p2h4ri 1.4s ease-in-out infinite;}@-webkit-keyframes animation-1p2h4ri{0%{stroke-dasharray:1px,200px;stroke-dashoffset:0;}50%{stroke-dasharray:100px,200px;stroke-dashoffset:-15px;}100%{stroke-dasharray:100px,200px;stroke-dashoffset:-125px;}}@keyframes animation-1p2h4ri{0%{stroke-dasharray:1px,200px;stroke-dashoffset:0;}50%{stroke-dasharray:100px,200px;stroke-dashoffset:-15px;}100%{stroke-dasharray:100px,200px;stroke-dashoffset:-125px;}}</style><circle class="MuiCircularProgress-circle MuiCircularProgress-circleIndeterminate css-14891ef" cx="44" cy="44" r="20.2" fill="none" stroke-width="3.6"></circle></svg></span><span class="ml-2 text-gray-500">Loading...</span></div></div></div></div><div class="rounded-lg border bg-card text-card-foreground shadow-sm w-full"><div class="flex flex-col space-y-1.5 p-6"><h3 class="tracking-tight text-base font-normal flex items-center justify-between"><span>Edit SkyPilot API Server Configuration</span></h3></div><div class="p-6 pt-0 space-y-4"><p class="text-sm text-gray-600 mb-3">Refer to the<!-- --> <a href="https://docs.skypilot.co/en/latest/reference/config.html" target="_blank" rel="noopener noreferrer" class="text-blue-600 hover:underline">SkyPilot Docs</a> <!-- -->for details. The configuration should be in YAML format.</p><div class="w-full"><textarea class="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=""></textarea></div><div class="flex justify-end space-x-3 pt-3"><button class="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 border border-input bg-background hover:bg-accent hover:text-accent-foreground h-10 px-4 py-2">Cancel</button><button class="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 h-10 px-4 py-2 inline-flex items-center bg-blue-600 hover:bg-blue-700 text-white" disabled=""><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-save w-4 h-4 mr-1.5"><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"></path><path d="M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7"></path><path d="M7 3v4a1 1 0 0 0 1 1h7"></path></svg>Apply</button></div></div></div></main></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/config","query":{},"buildId":"1qG0HTmVilJPxQdBk0fX5","assetPrefix":"/dashboard","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
sky/dashboard/out/index.html
CHANGED
@@ -1 +1 @@
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/dashboard/_next/static/css/667d941a2888ce6e.css" as="style"/><link rel="stylesheet" href="/dashboard/_next/static/css/667d941a2888ce6e.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/dashboard/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/dashboard/_next/static/chunks/webpack-65d465f948974c0d.js" defer=""></script><script src="/dashboard/_next/static/chunks/framework-87d061ee6ed71b28.js" defer=""></script><script src="/dashboard/_next/static/chunks/main-e0e2335212e72357.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/_app-cb81dc4d27f4d009.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/index-6b0d9e5031b70c58.js" defer=""></script><script src="/dashboard/_next/static/
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/dashboard/_next/static/css/667d941a2888ce6e.css" as="style"/><link rel="stylesheet" href="/dashboard/_next/static/css/667d941a2888ce6e.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/dashboard/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/dashboard/_next/static/chunks/webpack-65d465f948974c0d.js" defer=""></script><script src="/dashboard/_next/static/chunks/framework-87d061ee6ed71b28.js" defer=""></script><script src="/dashboard/_next/static/chunks/main-e0e2335212e72357.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/_app-cb81dc4d27f4d009.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/index-6b0d9e5031b70c58.js" defer=""></script><script src="/dashboard/_next/static/1qG0HTmVilJPxQdBk0fX5/_buildManifest.js" defer=""></script><script src="/dashboard/_next/static/1qG0HTmVilJPxQdBk0fX5/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/","query":{},"buildId":"1qG0HTmVilJPxQdBk0fX5","assetPrefix":"/dashboard","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|