skypilot-nightly 1.0.0.dev20250602__py3-none-any.whl → 1.0.0.dev20250604__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.
Files changed (138) hide show
  1. sky/__init__.py +3 -3
  2. sky/adaptors/kubernetes.py +8 -0
  3. sky/backends/backend_utils.py +1 -0
  4. sky/backends/cloud_vm_ray_backend.py +8 -4
  5. sky/{clouds/service_catalog → catalog}/__init__.py +6 -17
  6. sky/{clouds/service_catalog → catalog}/aws_catalog.py +3 -3
  7. sky/{clouds/service_catalog → catalog}/azure_catalog.py +2 -2
  8. sky/{clouds/service_catalog → catalog}/common.py +10 -8
  9. sky/{clouds/service_catalog → catalog}/cudo_catalog.py +1 -1
  10. sky/{clouds/service_catalog → catalog}/data_fetchers/analyze.py +1 -1
  11. sky/{clouds/service_catalog → catalog}/data_fetchers/fetch_aws.py +1 -1
  12. sky/{clouds/service_catalog → catalog}/data_fetchers/fetch_vsphere.py +1 -1
  13. sky/{clouds/service_catalog → catalog}/do_catalog.py +1 -1
  14. sky/{clouds/service_catalog → catalog}/fluidstack_catalog.py +1 -1
  15. sky/{clouds/service_catalog → catalog}/gcp_catalog.py +2 -2
  16. sky/{clouds/service_catalog → catalog}/ibm_catalog.py +1 -1
  17. sky/{clouds/service_catalog → catalog}/kubernetes_catalog.py +2 -2
  18. sky/{clouds/service_catalog → catalog}/lambda_catalog.py +1 -1
  19. sky/{clouds/service_catalog → catalog}/nebius_catalog.py +1 -1
  20. sky/{clouds/service_catalog → catalog}/oci_catalog.py +1 -1
  21. sky/{clouds/service_catalog → catalog}/paperspace_catalog.py +1 -1
  22. sky/{clouds/service_catalog → catalog}/runpod_catalog.py +1 -1
  23. sky/{clouds/service_catalog → catalog}/scp_catalog.py +1 -1
  24. sky/{clouds/service_catalog → catalog}/ssh_catalog.py +3 -3
  25. sky/{clouds/service_catalog → catalog}/vast_catalog.py +1 -1
  26. sky/{clouds/service_catalog → catalog}/vsphere_catalog.py +1 -1
  27. sky/cli.py +7 -6
  28. sky/client/cli.py +7 -6
  29. sky/client/sdk.py +3 -4
  30. sky/clouds/aws.py +41 -40
  31. sky/clouds/azure.py +31 -34
  32. sky/clouds/cloud.py +8 -8
  33. sky/clouds/cudo.py +26 -26
  34. sky/clouds/do.py +24 -24
  35. sky/clouds/fluidstack.py +27 -29
  36. sky/clouds/gcp.py +45 -48
  37. sky/clouds/ibm.py +26 -26
  38. sky/clouds/kubernetes.py +24 -12
  39. sky/clouds/lambda_cloud.py +28 -30
  40. sky/clouds/nebius.py +26 -28
  41. sky/clouds/oci.py +32 -32
  42. sky/clouds/paperspace.py +24 -26
  43. sky/clouds/runpod.py +26 -28
  44. sky/clouds/scp.py +37 -36
  45. sky/clouds/utils/gcp_utils.py +3 -2
  46. sky/clouds/vast.py +27 -27
  47. sky/clouds/vsphere.py +12 -15
  48. sky/core.py +2 -2
  49. sky/dashboard/out/404.html +1 -1
  50. sky/dashboard/out/_next/static/chunks/236-fef38aa6e5639300.js +6 -0
  51. sky/dashboard/out/_next/static/chunks/37-947904ccc5687bac.js +6 -0
  52. sky/dashboard/out/_next/static/chunks/682-2be9b0f169727f2f.js +6 -0
  53. sky/dashboard/out/_next/static/chunks/856-f1b1f7f47edde2e8.js +1 -0
  54. sky/dashboard/out/_next/static/chunks/969-d7b6fb7f602bfcb3.js +1 -0
  55. sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/[job]-158b70da336d8607.js +6 -0
  56. sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]-62c9982dc3675725.js +6 -0
  57. sky/dashboard/out/_next/static/chunks/pages/{clusters-f37ff20f0af29aae.js → clusters-5549a350f97d7ef3.js} +1 -1
  58. sky/dashboard/out/_next/static/chunks/pages/config-35383adcb0edb5e2.js +6 -0
  59. sky/dashboard/out/_next/static/chunks/pages/infra/{[context]-342bc15bb78ab2e5.js → [context]-b68ddeed712d45b5.js} +1 -1
  60. sky/dashboard/out/_next/static/chunks/pages/{infra-7b4b8e7fa9fa0827.js → infra-13b117a831702196.js} +1 -1
  61. sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-a62a3c65dc9bc57c.js +11 -0
  62. sky/dashboard/out/_next/static/chunks/pages/{jobs-78a6c5ba3e24c0cf.js → jobs-a76b2700eca236f7.js} +1 -1
  63. sky/dashboard/out/_next/static/chunks/pages/{users-89f9212b81d8897e.js → users-07b523ccb19317ad.js} +1 -1
  64. sky/dashboard/out/_next/static/chunks/pages/workspace/{new-198b6e00d7d724c5.js → new-c7516f2b4c3727c0.js} +1 -1
  65. sky/dashboard/out/_next/static/chunks/pages/workspaces/{[name]-2ce792183b03c341.js → [name]-7799de9e691e35d8.js} +1 -1
  66. sky/dashboard/out/_next/static/chunks/pages/workspaces-f54921ec9eb20965.js +1 -0
  67. sky/dashboard/out/_next/static/css/63d3995d8b528eb1.css +3 -0
  68. sky/dashboard/out/_next/static/vWwfD3jOky5J5jULHp8JT/_buildManifest.js +1 -0
  69. sky/dashboard/out/clusters/[cluster]/[job].html +1 -1
  70. sky/dashboard/out/clusters/[cluster].html +1 -1
  71. sky/dashboard/out/clusters.html +1 -1
  72. sky/dashboard/out/config.html +1 -1
  73. sky/dashboard/out/index.html +1 -1
  74. sky/dashboard/out/infra/[context].html +1 -1
  75. sky/dashboard/out/infra.html +1 -1
  76. sky/dashboard/out/jobs/[job].html +1 -1
  77. sky/dashboard/out/jobs.html +1 -1
  78. sky/dashboard/out/users.html +1 -1
  79. sky/dashboard/out/workspace/new.html +1 -1
  80. sky/dashboard/out/workspaces/[name].html +1 -1
  81. sky/dashboard/out/workspaces.html +1 -1
  82. sky/data/storage_utils.py +5 -2
  83. sky/execution.py +1 -2
  84. sky/global_user_state.py +2 -4
  85. sky/jobs/server/core.py +1 -1
  86. sky/jobs/utils.py +31 -1
  87. sky/optimizer.py +1 -1
  88. sky/provision/cudo/cudo_machine_type.py +1 -1
  89. sky/provision/gcp/constants.py +4 -0
  90. sky/provision/kubernetes/utils.py +35 -22
  91. sky/provision/vast/utils.py +1 -1
  92. sky/provision/vsphere/common/vim_utils.py +1 -2
  93. sky/provision/vsphere/instance.py +1 -1
  94. sky/provision/vsphere/vsphere_utils.py +7 -11
  95. sky/resources.py +33 -2
  96. sky/serve/server/core.py +1 -1
  97. sky/server/common.py +86 -53
  98. sky/server/constants.py +1 -1
  99. sky/server/requests/executor.py +4 -1
  100. sky/server/requests/payloads.py +16 -0
  101. sky/server/requests/serializers/decoders.py +1 -1
  102. sky/server/server.py +3 -3
  103. sky/skypilot_config.py +88 -37
  104. sky/usage/usage_lib.py +4 -3
  105. sky/utils/accelerator_registry.py +3 -3
  106. sky/utils/controller_utils.py +4 -14
  107. sky/utils/kubernetes/deploy_remote_cluster.py +2 -1
  108. sky/utils/schemas.py +6 -9
  109. {skypilot_nightly-1.0.0.dev20250602.dist-info → skypilot_nightly-1.0.0.dev20250604.dist-info}/METADATA +1 -1
  110. {skypilot_nightly-1.0.0.dev20250602.dist-info → skypilot_nightly-1.0.0.dev20250604.dist-info}/RECORD +127 -126
  111. sky/dashboard/out/_next/static/chunks/236-7458fda7b295f305.js +0 -6
  112. sky/dashboard/out/_next/static/chunks/37-b638675d511d58b4.js +0 -6
  113. sky/dashboard/out/_next/static/chunks/682-5c12535476a21ce3.js +0 -6
  114. sky/dashboard/out/_next/static/chunks/856-ab9627e7e8ac35e8.js +0 -1
  115. sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/[job]-8f270e2c9c59fa1a.js +0 -6
  116. sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]-25edb867a41b6b20.js +0 -6
  117. sky/dashboard/out/_next/static/chunks/pages/config-3c6a2dabf56e8cd6.js +0 -6
  118. sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-c0c1dff3cd463d9e.js +0 -11
  119. sky/dashboard/out/_next/static/chunks/pages/workspaces-17d41826537196e7.js +0 -1
  120. sky/dashboard/out/_next/static/css/2b3ee34e586949a3.css +0 -3
  121. sky/dashboard/out/_next/static/dev-ndwjPgd_uQ4dcXXiv/_buildManifest.js +0 -1
  122. /sky/{clouds/service_catalog → catalog}/config.py +0 -0
  123. /sky/{clouds/service_catalog → catalog}/constants.py +0 -0
  124. /sky/{clouds/service_catalog → catalog}/data_fetchers/__init__.py +0 -0
  125. /sky/{clouds/service_catalog → catalog}/data_fetchers/fetch_azure.py +0 -0
  126. /sky/{clouds/service_catalog → catalog}/data_fetchers/fetch_cudo.py +0 -0
  127. /sky/{clouds/service_catalog → catalog}/data_fetchers/fetch_fluidstack.py +0 -0
  128. /sky/{clouds/service_catalog → catalog}/data_fetchers/fetch_gcp.py +0 -0
  129. /sky/{clouds/service_catalog → catalog}/data_fetchers/fetch_ibm.py +0 -0
  130. /sky/{clouds/service_catalog → catalog}/data_fetchers/fetch_lambda_cloud.py +0 -0
  131. /sky/{clouds/service_catalog → catalog}/data_fetchers/fetch_vast.py +0 -0
  132. /sky/dashboard/out/_next/static/chunks/{843-786c36624d5ff61f.js → 843-a097338acb89b7d7.js} +0 -0
  133. /sky/dashboard/out/_next/static/chunks/pages/{_app-ad1edd7fe17ea796.js → _app-67925f5e6382e22f.js} +0 -0
  134. /sky/dashboard/out/_next/static/{dev-ndwjPgd_uQ4dcXXiv → vWwfD3jOky5J5jULHp8JT}/_ssgManifest.js +0 -0
  135. {skypilot_nightly-1.0.0.dev20250602.dist-info → skypilot_nightly-1.0.0.dev20250604.dist-info}/WHEEL +0 -0
  136. {skypilot_nightly-1.0.0.dev20250602.dist-info → skypilot_nightly-1.0.0.dev20250604.dist-info}/entry_points.txt +0 -0
  137. {skypilot_nightly-1.0.0.dev20250602.dist-info → skypilot_nightly-1.0.0.dev20250604.dist-info}/licenses/LICENSE +0 -0
  138. {skypilot_nightly-1.0.0.dev20250602.dist-info → skypilot_nightly-1.0.0.dev20250604.dist-info}/top_level.txt +0 -0
@@ -1,6 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[682],{3626:function(e,s,t){t.d(s,{Z:function(){return a}});/**
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 a=(0,t(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"}]])},8682:function(e,s,t){t.d(s,{fx:function(){return v}});var a=t(5893),l=t(7294),r=t(8799),n=t(9470),d=t(3626),c=t(3001),i=t(2045),o=t(3266),x=t(8969),m=t(6378),h=t(6856),u=t(1214),g=t(1163),f=t(1664),p=t.n(f),j=t(6989);let N=u.nb.REFRESH_INTERVAL,b=u.MO.NAME_TRUNCATE_LENGTH;function y(e){let{title:s,isLoading:t,isDataLoaded:l,contexts:n,gpus:d,groupedPerContextGPUs:c,groupedPerNodeGPUs:i,handleContextClick:o,contextStats:x={},isSSH:m=!1}=e;return t&&!l?(0,a.jsx)("div",{className:"rounded-lg border bg-card text-card-foreground shadow-sm mb-6",children:(0,a.jsxs)("div",{className:"p-5",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold mb-4",children:s}),(0,a.jsxs)("div",{className:"flex items-center justify-center py-6",children:[(0,a.jsx)(r.Z,{size:24,className:"mr-3"}),(0,a.jsxs)("span",{className:"text-gray-500",children:["Loading ",s,"..."]})]})]})}):l&&0===n.length?(0,a.jsx)("div",{className:"rounded-lg border bg-card text-card-foreground shadow-sm mb-6",children:(0,a.jsxs)("div",{className:"p-5",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold mb-4",children:s}),(0,a.jsxs)("p",{className:"text-sm text-gray-500",children:["No ",s," found or ",s," is not configured."]})]})}):l&&n.length>0?(0,a.jsx)("div",{className:"rounded-lg border bg-card text-card-foreground shadow-sm mb-6",children:(0,a.jsxs)("div",{className:"p-5",children:[(0,a.jsxs)("div",{className:"flex items-center mb-4",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold",children:s}),(0,a.jsxs)("span",{className:"ml-2 px-2 py-0.5 bg-blue-100 text-blue-800 rounded-full text-xs font-medium",children:[n.length," ",1===n.length?m?"pool":"context":m?"pools":"contexts"]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[(0,a.jsx)("div",{children:(0,a.jsx)("div",{className:"overflow-x-auto rounded-md border border-gray-200 shadow-sm bg-white",children:(0,a.jsxs)("table",{className:"min-w-full text-sm",children:[(0,a.jsx)("thead",{className:"bg-gray-50",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-1/4",children:m?"Node Pool":"Context"}),(0,a.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-1/8",children:"Clusters"}),(0,a.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-1/8",children:"Jobs"}),(0,a.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-1/8",children:"Nodes"}),(0,a.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-1/4",children:"GPU Types"}),(0,a.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-1/8",children:"#GPUs"})]})}),(0,a.jsx)("tbody",{className:"bg-white divide-y divide-gray-200 ".concat(n.length>5?"max-h-[250px] overflow-y-auto block":""),children:n.map(e=>{let s=c[e]||[],t=i[e]||[],l=s.reduce((e,s)=>e+(s.gpu_total||0),0),r=x[m?"ssh/".concat(e.replace(/^ssh-/,"")):"kubernetes/".concat(e)]||{clusters:0,jobs:0},n=Object.keys(s.reduce((e,s)=>(e[s.gpu_name]=(e[s.gpu_name]||0)+(s.gpu_total||0),e),{})).join(", "),d=m?e.replace(/^ssh-/,""):e;return(0,a.jsxs)("tr",{className:"hover:bg-gray-50",children:[(0,a.jsx)("td",{className:"p-3",children:(0,a.jsx)(j.Md,{content:d,className:"text-sm text-muted-foreground",children:(0,a.jsx)("span",{className:"text-blue-600 hover:underline cursor-pointer",onClick:()=>o(e),children:d.length>b?"".concat(d.substring(0,Math.floor((b-3)/2)),"...").concat(d.substring(d.length-Math.ceil((b-3)/2))):d})})}),(0,a.jsx)("td",{className:"p-3",children:r.clusters>0?(0,a.jsx)("span",{className:"px-2 py-0.5 bg-blue-100 text-blue-800 rounded text-xs font-medium",children:r.clusters}):(0,a.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-500 rounded text-xs font-medium",children:"0"})}),(0,a.jsx)("td",{className:"p-3",children:r.jobs>0?(0,a.jsx)("span",{className:"px-2 py-0.5 bg-green-100 text-green-800 rounded text-xs font-medium",children:r.jobs}):(0,a.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-500 rounded text-xs font-medium",children:"0"})}),(0,a.jsx)("td",{className:"p-3",children:t.length}),(0,a.jsx)("td",{className:"p-3",children:n||"-"}),(0,a.jsx)("td",{className:"p-3",children:l})]},e)})})]})})}),d.length>0&&(0,a.jsx)("div",{children:(0,a.jsx)("div",{className:"overflow-x-auto rounded-md border border-gray-200 shadow-sm bg-white",children:(0,a.jsxs)("table",{className:"min-w-full text-sm",children:[(0,a.jsx)("thead",{className:"bg-gray-50",children:(0,a.jsxs)("tr",{children:[(0,a.jsxs)("th",{className:"p-3 text-left font-medium text-gray-600 w-1/4 whitespace-nowrap",children:["GPU",(0,a.jsxs)("span",{className:"ml-2 px-2 py-0.5 bg-green-100 text-green-800 rounded-full text-xs font-medium whitespace-nowrap",children:[d.reduce((e,s)=>e+s.gpu_free,0)," ","of"," ",d.reduce((e,s)=>e+s.gpu_total,0)," ","free"]})]}),(0,a.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-1/4",children:"Requestable"}),(0,a.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-1/2",children:(0,a.jsx)("div",{className:"flex items-center",children:(0,a.jsx)("span",{children:"Utilization"})})})]})}),(0,a.jsx)("tbody",{className:"bg-white divide-y divide-gray-200 ".concat(d.length>5?"max-h-[250px] overflow-y-auto block":""),children:d.map(e=>{let s=e.gpu_total-e.gpu_free,t=e.gpu_total>0?e.gpu_free/e.gpu_total*100:0,l=e.gpu_total>0?s/e.gpu_total*100:0,r=c?Object.values(c).flat().filter(s=>s.gpu_name===e.gpu_name&&(m?s.context.startsWith("ssh-"):!s.context.startsWith("ssh-"))).map(e=>e.gpu_requestable_qty_per_node).filter((e,s,t)=>t.indexOf(e)===s).join(", "):"-";return(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{className:"p-3 font-medium w-24 whitespace-nowrap",children:e.gpu_name}),(0,a.jsxs)("td",{className:"p-3 text-xs text-gray-600",children:[r||"-"," / node"]}),(0,a.jsx)("td",{className:"p-3 w-2/3",children:(0,a.jsx)("div",{className:"flex items-center gap-3",children:(0,a.jsxs)("div",{className:"flex-1 bg-gray-100 rounded-md h-5 flex overflow-hidden shadow-sm min-w-[100px] w-full",children:[l>0&&(0,a.jsx)("div",{style:{width:"".concat(l,"%")},className:"bg-yellow-500 h-full flex items-center justify-center text-white text-xs font-medium",children:l>15&&"".concat(s," used")}),t>0&&(0,a.jsx)("div",{style:{width:"".concat(t,"%")},className:"bg-green-700 h-full flex items-center justify-center text-white text-xs font-medium",children:t>15&&"".concat(e.gpu_free," free")})]})})})]},e.gpu_name)})})]})})})]})]})}):null}function w(e){let{contextName:s,gpusInContext:t,nodesInContext:l}=e;return s.startsWith("ssh-"),(0,a.jsx)("div",{className:"mb-4",children:(0,a.jsx)("div",{className:"rounded-lg border bg-card text-card-foreground shadow-sm h-full",children:(0,a.jsxs)("div",{className:"p-5",children:[(0,a.jsx)("h4",{className:"text-lg font-semibold mb-4",children:"Available GPUs"}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 mb-6",children:t.map(e=>{let s=e.gpu_total-e.gpu_free,t=e.gpu_total>0?e.gpu_free/e.gpu_total*100:0,l=e.gpu_total>0?s/e.gpu_total*100:0;return(0,a.jsxs)("div",{className:"p-3 bg-gray-50 rounded-md border border-gray-200 shadow-sm",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-1.5 flex-wrap",children:[(0,a.jsxs)("div",{className:"font-medium text-gray-800 text-sm",children:[e.gpu_name,(0,a.jsxs)("span",{className:"text-xs text-gray-500 ml-2",children:["(Requestable: ",e.gpu_requestable_qty_per_node," / node)"]})]}),(0,a.jsxs)("span",{className:"text-xs font-medium",children:[e.gpu_free," free / ",e.gpu_total," total"]})]}),(0,a.jsxs)("div",{className:"w-full bg-gray-100 rounded-md h-4 flex overflow-hidden shadow-sm",children:[l>0&&(0,a.jsx)("div",{style:{width:"".concat(l,"%")},className:"bg-yellow-500 h-full flex items-center justify-center text-white text-xs",children:l>15&&"".concat(s," used")}),t>0&&(0,a.jsx)("div",{style:{width:"".concat(t,"%")},className:"bg-green-700 h-full flex items-center justify-center text-white text-xs",children:t>15&&"".concat(e.gpu_free," free")})]})]},e.gpu_name)})}),l.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h4",{className:"text-lg font-semibold mb-4",children:"Nodes"}),(0,a.jsx)("div",{className:"overflow-x-auto rounded-md border border-gray-200 shadow-sm",children:(0,a.jsxs)("table",{className:"min-w-full text-sm",children:[(0,a.jsx)("thead",{className:"bg-gray-100",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"p-3 text-left font-medium text-gray-600",children:"Node"}),(0,a.jsx)("th",{className:"p-3 text-left font-medium text-gray-600",children:"GPU"}),(0,a.jsx)("th",{className:"p-3 text-right font-medium text-gray-600",children:"Availability"})]})}),(0,a.jsx)("tbody",{className:"bg-white divide-y divide-gray-200",children:l.map((e,s)=>(0,a.jsxs)("tr",{className:"hover:bg-gray-50",children:[(0,a.jsx)("td",{className:"p-3 whitespace-nowrap text-gray-700",children:e.node_name}),(0,a.jsx)("td",{className:"p-3 whitespace-nowrap text-gray-700",children:e.gpu_name}),(0,a.jsx)("td",{className:"p-3 whitespace-nowrap text-right text-gray-700",children:"".concat(e.gpu_free," of ").concat(e.gpu_total," free")})]},"".concat(e.node_name,"-").concat(s)))})]})})]})]})})})}function v(){let[e,s]=(0,l.useState)(!0),[t,u]=(0,l.useState)(!0),[f,j]=(0,l.useState)(!0),b=l.useRef(null),v=(0,c.X)(),[_,C]=(0,l.useState)(!1),[S,P]=(0,l.useState)(!1),k=(0,g.useRouter)(),[L,U]=(0,l.useState)([]),[E,I]=(0,l.useState)([]),[M,R]=(0,l.useState)([]),[G,Z]=(0,l.useState)([]),[q,W]=(0,l.useState)([]),[A,z]=(0,l.useState)(0),[H,F]=(0,l.useState)(0),[T,O]=(0,l.useState)({}),[D,J]=(0,l.useState)(null),K=l.useCallback(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{showLoadingIndicators:!0};e.showLoadingIndicators&&(s(!0),u(!0));try{let{gpuData:e,cloudData:s}=await m.ZP.get(i.l4),{allContextNames:t,allGPUs:a,perContextGPUs:l,perNodeGPUs:r,contextStats:n}=e;U(t||[]),I(a||[]),R(l||[]),Z(r||[]),O(n||{}),C(!0),W((null==s?void 0:s.clouds)||[]),z((null==s?void 0:s.totalClouds)||0),F((null==s?void 0:s.enabledClouds)||0),P(!0)}catch(e){console.error("Error in fetchData:",e)}finally{s(!1),u(!1),f&&e.showLoadingIndicators&&j(!1)}},[f]);(0,l.useEffect)(()=>{b.current=K},[K]),(0,l.useEffect)(()=>{(async()=>{await h.ZP.preloadForPage("infra"),K({showLoadingIndicators:!0})})()},[K]),(0,l.useEffect)(()=>{let e=!0,s=setInterval(()=>{e&&b.current&&b.current({showLoadingIndicators:!1})},N);return()=>{e=!1,clearInterval(s)}},[]),E.length,E.reduce((e,s)=>e+s.gpu_total,0),E.reduce((e,s)=>e+s.gpu_free,0);let V=l.useMemo(()=>M?M.reduce((e,s)=>{let{context:t}=s;return e[t]||(e[t]=[]),e[t].push(s),e},{}):{},[M]),X=l.useMemo(()=>L.filter(e=>e.startsWith("ssh-")),[L]),B=l.useMemo(()=>L.filter(e=>!e.startsWith("ssh-")),[L]),Q=l.useMemo(()=>{if(!M)return[];let e=new Set;return M.forEach(s=>{s.context.startsWith("ssh-")&&e.add(s.gpu_name)}),E.filter(s=>e.has(s.gpu_name))},[E,M]),Y=l.useMemo(()=>{if(!M)return[];let e=new Set;return M.forEach(s=>{s.context.startsWith("ssh-")||e.add(s.gpu_name)}),E.filter(s=>e.has(s.gpu_name))},[E,M]),$=l.useMemo(()=>G?G.reduce((e,s)=>{let{context:t}=s;return e[t]||(e[t]=[]),e[t].push(s),e},{}):{},[G]);(0,l.useEffect)(()=>{k.isReady&&k.query.context&&J(decodeURIComponent(Array.isArray(k.query.context)?k.query.context[0]:k.query.context))},[k.isReady,k.query.context]);let ee=e=>{J(e),k.push("/infra/".concat(encodeURIComponent(e)))},es=e||t;return(0,a.jsxs)(n.A,{highlighted:"infra",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,a.jsxs)("div",{className:"text-base flex items-center",children:[(0,a.jsx)(p(),{href:"/infra",className:"text-sky-blue hover:underline ".concat(D?"":"cursor-default"),children:"Infrastructure"}),D&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"mx-2 text-gray-500",children:"›"}),D.startsWith("ssh-")?(0,a.jsx)(p(),{href:"/infra",className:"text-sky-blue hover:underline cursor-pointer",children:"SSH Node Pool"}):(0,a.jsx)(p(),{href:"/infra",className:"text-sky-blue hover:underline cursor-pointer",children:"Kubernetes"}),(0,a.jsx)("span",{className:"mx-2 text-gray-500",children:"›"}),(0,a.jsx)("span",{className:"text-sky-blue",children:D.startsWith("ssh-")?D.replace(/^ssh-/,""):D})]})]}),(0,a.jsxs)("div",{className:"flex items-center",children:[es&&(0,a.jsxs)("div",{className:"flex items-center mr-2",children:[(0,a.jsx)(r.Z,{size:15,className:"mt-0"}),(0,a.jsx)("span",{className:"ml-2 text-gray-500",children:"Loading..."})]}),(0,a.jsxs)("button",{onClick:()=>{m.ZP.invalidate(o.getClusters),m.ZP.invalidate(x.getManagedJobs),m.ZP.invalidate(i.l4),b.current&&b.current({showLoadingIndicators:!0})},disabled:es,className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:[(0,a.jsx)(d.Z,{className:"h-4 w-4 mr-1.5"}),!v&&"Refresh"]})]})]}),D?e&&!_?(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center h-64",children:[(0,a.jsx)(r.Z,{size:32,className:"mb-4"}),(0,a.jsx)("span",{className:"text-gray-500 text-lg",children:"Loading Context..."})]}):(s=>{let t=V[s]||[],l=$[s]||[];return e&&!_?(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center h-64",children:[(0,a.jsx)(r.Z,{size:32,className:"mb-4"}),(0,a.jsx)("span",{className:"text-gray-500 text-lg",children:"Loading Context..."})]}):(0,a.jsx)(w,{contextName:s,gpusInContext:t,nodesInContext:l})})(D):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(y,{title:"SSH Node Pool",isLoading:e,isDataLoaded:_,contexts:X,gpus:Q,groupedPerContextGPUs:V,groupedPerNodeGPUs:$,handleContextClick:ee,contextStats:T,isSSH:!0}),(0,a.jsx)(y,{title:"Kubernetes",isLoading:e,isDataLoaded:_,contexts:B,gpus:Y,groupedPerContextGPUs:V,groupedPerNodeGPUs:$,handleContextClick:ee,contextStats:T,isSSH:!1}),t&&!S?(0,a.jsx)("div",{className:"rounded-lg border bg-card text-card-foreground shadow-sm mb-6",children:(0,a.jsxs)("div",{className:"p-5",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold mb-4",children:"Cloud"}),(0,a.jsxs)("div",{className:"flex items-center justify-center py-6",children:[(0,a.jsx)(r.Z,{size:24,className:"mr-3"}),(0,a.jsx)("span",{className:"text-gray-500",children:"Loading Cloud..."})]})]})}):(0,a.jsx)("div",{className:"rounded-lg border bg-card text-card-foreground shadow-sm mb-6",children:(0,a.jsxs)("div",{className:"p-5",children:[(0,a.jsxs)("div",{className:"flex items-center mb-4",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Cloud"}),(0,a.jsxs)("span",{className:"ml-2 px-2 py-0.5 bg-blue-100 text-blue-800 rounded-full text-xs font-medium",children:[H," of ",A," enabled"]})]}),0===q.length?(0,a.jsx)("p",{className:"text-sm text-gray-500",children:"No enabled clouds available."}):(0,a.jsx)("div",{className:"overflow-x-auto rounded-md border border-gray-200 shadow-sm bg-white",children:(0,a.jsxs)("table",{className:"min-w-full text-sm",children:[(0,a.jsx)("thead",{className:"bg-gray-50",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-32",children:"Cloud"}),(0,a.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-24",children:"Clusters"}),(0,a.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-24",children:"Jobs"})]})}),(0,a.jsx)("tbody",{className:"bg-white divide-y divide-gray-200",children:q.map(e=>(0,a.jsxs)("tr",{className:"hover:bg-gray-50",children:[(0,a.jsx)("td",{className:"p-3 font-medium text-gray-700",children:e.name}),(0,a.jsx)("td",{className:"p-3",children:e.clusters>0?(0,a.jsx)("span",{className:"px-2 py-0.5 bg-blue-100 text-blue-800 rounded text-xs font-medium",children:e.clusters}):(0,a.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-500 rounded text-xs font-medium",children:"0"})}),(0,a.jsx)("td",{className:"p-3",children:e.jobs>0?(0,a.jsx)("span",{className:"px-2 py-0.5 bg-green-100 text-green-800 rounded text-xs font-medium",children:e.jobs}):(0,a.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-500 rounded text-xs font-medium",children:"0"})})]},e.name))})]})})]})})]})]})}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[856],{3266:function(e,t,r){r.d(t,{QL:function(){return u},Sl:function(){return l},getClusters:function(){return c}});var a=r(7294),o=r(5821),n=r(3225);let s={UP:"RUNNING",STOPPED:"STOPPED",INIT:"LAUNCHING",null:"TERMINATED"};async function c(){let{clusterNames:e=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let t=await fetch("".concat(n.f4,"/status"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cluster_names:e,all_users:!0})}),r=t.headers.get("X-Skypilot-Request-ID")||t.headers.get("X-Request-ID"),a=await fetch("".concat(n.f4,"/api/get?request_id=").concat(r)),o=await a.json();return(o.return_value?JSON.parse(o.return_value):[]).map(e=>{let t="",r=t=e.zone?e.zone:e.region;return t&&t.length>25&&(t=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15;if(!e||e.length<=t)return e;if(t<=3)return"...";let r=Math.floor((t-3)/2),a=r+(t-3)%2;return 0===r?e.substring(0,a)+"...":e.substring(0,a)+"..."+e.substring(e.length-r)}(t,25)),{status:s[e.status],cluster:e.name,user:e.user_name,user_hash:e.user_hash,cloud:e.cloud,region:e.region,infra:t?e.cloud+" ("+t+")":e.cloud,full_infra:r?"".concat(e.cloud," (").concat(r,")"):e.cloud,cpus:e.cpus,mem:e.memory,gpus:e.accelerators,resources_str:e.resources_str,resources_str_full:e.resources_str_full,time:new Date(1e3*e.launched_at),num_nodes:e.nodes,workspace:e.workspace,autostop:e.autostop,to_down:e.to_down,jobs:[],command:e.last_creation_command||e.last_use,task_yaml:e.last_creation_yaml||"{}",events:[{time:new Date(1e3*e.launched_at),event:"Cluster created."}]}})}catch(e){return console.error("Error fetching clusters:",e),[]}}async function l(e){let{clusterName:t,jobId:r,onNewLog:a,workspace:s}=e;try{let e=(await fetch("".concat(n.f4,"/logs"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({follow:!1,cluster_name:t,job_id:r,override_skypilot_config:{active_workspace:s||"default"}})})).body.getReader();for(;;){let{done:t,value:r}=await e.read();if(t)break;let o=new TextDecoder().decode(r);a(o)}}catch(e){console.error("Error in streamClusterJobLogs:",e),(0,o.C)("Error in streamClusterJobLogs: ".concat(e.message),"error")}}async function i(e){let{clusterName:t,workspace:r}=e;try{let e=await fetch("".concat(n.f4,"/queue"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cluster_name:t,all_users:!0,override_skypilot_config:{active_workspace:r}})}),a=e.headers.get("X-Skypilot-Request-ID")||e.headers.get("X-Request-ID"),o=await fetch("".concat(n.f4,"/api/get?request_id=").concat(a)),s=await o.json();return JSON.parse(s.return_value).map(e=>{let r=e.end_at?e.end_at:Date.now()/1e3,a=0,o=0;return e.submitted_at&&(a=r-e.submitted_at),e.start_at&&(o=r-e.start_at),{id:e.job_id,status:e.status,job:e.job_name,user:e.username,gpus:e.accelerators||{},submitted_at:e.submitted_at?new Date(1e3*e.submitted_at):null,resources:e.resources,cluster:t,total_duration:a,job_duration:o,infra:"",logs:""}})}catch(e){return console.error("Error fetching cluster jobs:",e),[]}}function u(e){let{cluster:t,job:r=null}=e,[o,n]=(0,a.useState)(null),[s,l]=(0,a.useState)(null),[u,d]=(0,a.useState)(!0),[g,h]=(0,a.useState)(!0),f=(0,a.useCallback)(async()=>{if(t)try{d(!0);let e=await c({clusterNames:[t]});return n(e[0]),e[0]}catch(e){console.error("Error fetching cluster data:",e)}finally{d(!1)}return null},[t]),p=(0,a.useCallback)(async e=>{if(t)try{h(!0);let r=await i({clusterName:t,workspace:e||"default"});l(r)}catch(e){console.error("Error fetching cluster job data:",e)}finally{h(!1)}},[t]),b=(0,a.useCallback)(async()=>{let e=await f();e&&await p(e.workspace)},[f,p]);return(0,a.useEffect)(()=>{(async()=>{let e=await f();e&&await p(e.workspace)})()},[t,r,f,p]),{clusterData:o,clusterJobData:s,loading:u||g,refreshData:b}}},2045:function(e,t,r){r.d(t,{l4:function(){return n}});var a=r(3225);async function o(e,t){try{let r=[];try{let e=await fetch("".concat(a.f4,"/enabled_clouds"),{method:"GET",headers:{"Content-Type":"application/json"}}),t=e.headers.get("X-Skypilot-Request-ID")||e.headers.get("X-Request-ID"),o=await fetch("".concat(a.f4,"/api/get?request_id=").concat(t)),n=await o.json();r=n.return_value?JSON.parse(n.return_value):[],console.log("Enabled clouds:",r)}catch(e){console.error("Error fetching enabled clouds:",e),r=[]}let o={};a.$m.forEach(e=>{let t=r.includes(e.toLowerCase());o[e]={name:e,clusters:0,jobs:0,enabled:t}}),e.forEach(e=>{if(e.cloud){let t=e.cloud;o[t]&&(o[t].clusters+=1,o[t].enabled=!0)}}),t.forEach(e=>{if(e.cloud){let t=e.cloud;o[t]&&(o[t].jobs+=1,o[t].enabled=!0)}});let n=a.$m.length,s=Object.values(o).filter(e=>e.enabled).length;return{clouds:Object.values(o).filter(e=>e.enabled).sort((e,t)=>t.clusters-e.clusters||t.jobs-e.jobs),totalClouds:n,enabledClouds:s}}catch(e){return console.error("Error fetching cloud infrastructure:",e),{clouds:[],totalClouds:a.$m.length,enabledClouds:0}}}async function n(){let{getClusters:e}=await Promise.resolve().then(r.bind(r,3266)),{getManagedJobs:t}=await Promise.resolve().then(r.bind(r,8969)),[a,n]=await Promise.all([e(),t()]),c=a||[],l=(null==n?void 0:n.jobs)||[],[i,u]=await Promise.all([s(c,l),o(c,l)]);return{gpuData:i,cloudData:u}}async function s(e,t){return await d({clusters:e||[],jobs:t||[]})}async function c(){try{let e=await fetch("".concat(a.f4,"/realtime_kubernetes_gpu_availability"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({context:null,name_filter:null,quantity_filter:null})});if(!e.ok)return console.error("Error fetching Kubernetes context GPUs (in getKubernetesContextGPUs): ".concat(e.status," ").concat(e.statusText)),[];let t=e.headers.get("X-Skypilot-Request-ID")||e.headers.get("x-request-id");if(!t)return console.error("No request ID returned for Kubernetes GPU availability (in getKubernetesContextGPUs)"),[];let r=await fetch("".concat(a.f4,"/api/get?request_id=").concat(t)),o=await r.text();if(500===r.status){try{let e=JSON.parse(o);if(e.detail&&e.detail.error)try{let t=JSON.parse(e.detail.error);console.error("[infra.jsx] getKubernetesContextGPUs: Server error detail:",t.message)}catch(t){console.error("[infra.jsx] getKubernetesContextGPUs: Error parsing server error JSON:",t,"Original error text:",e.detail.error)}}catch(e){console.error("[infra.jsx] getKubernetesContextGPUs: Error parsing 500 error response JSON:",e,"Raw text was:",o)}return[]}let n=JSON.parse(o);return n.return_value?JSON.parse(n.return_value):[]}catch(e){return console.error("[infra.jsx] Outer error in getKubernetesContextGPUs:",e),[]}}async function l(){try{let e=await fetch("".concat(a.f4,"/all_contexts"),{method:"GET",headers:{"Content-Type":"application/json"}});if(!e.ok)return console.error("Error fetching all contexts: ".concat(e.status," ").concat(e.statusText)),[];let t=e.headers.get("X-Skypilot-Request-ID")||e.headers.get("x-request-id");if(!t)return console.error("No request ID returned for /all_contexts"),[];let r=await fetch("".concat(a.f4,"/api/get?request_id=").concat(t)),o=await r.json();return o.return_value?JSON.parse(o.return_value):[]}catch(e){return console.error("[infra.jsx] Error in getAllContexts:",e),[]}}async function i(e){try{let t=await fetch("".concat(a.f4,"/kubernetes_node_info"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({context:e})}),r=t.headers.get("X-Skypilot-Request-ID")||t.headers.get("x-request-id"),o=await fetch("".concat(a.f4,"/api/get?request_id=").concat(r));if(500===o.status){try{let e=await o.json();if(e.detail&&e.detail.error)try{let t=JSON.parse(e.detail.error);console.error("Error fetching Kubernetes per node GPUs:",t.message)}catch(e){console.error("Error parsing JSON:",e)}}catch(e){console.error("Error parsing JSON:",e)}return{}}let n=await o.json();return(n.return_value?JSON.parse(n.return_value):{}).node_info_dict||{}}catch(t){return console.error("[infra.jsx] Error in getKubernetesPerNodeGPUs for context",e,":",t),{}}}async function u(e){try{let t=e.clusters,r=e.jobs,a={};return t.forEach(e=>{let t=null;if("Kubernetes"===e.cloud)(t=e.region)&&(t="kubernetes/".concat(t));else if("SSH"===e.cloud&&(t=e.region)){let e=t.startsWith("ssh-")?t.substring(4):t;t="ssh/".concat(e)}t&&(a[t]||(a[t]={clusters:0,jobs:0}),a[t].clusters+=1)}),r.forEach(e=>{let t=null;if("Kubernetes"===e.cloud)(t=e.region)&&(t="kubernetes/".concat(t));else if("SSH"===e.cloud&&(t=e.region)){let e=t.startsWith("ssh-")?t.substring(4):t;t="ssh/".concat(e)}t&&(a[t]||(a[t]={clusters:0,jobs:0}),a[t].jobs+=1)}),a}catch(e){return console.error("=== Error in getContextClustersAndJobs ===",e),{}}}async function d(e){try{let n=await l();if(!n||0===n.length)return console.log("No contexts found from /all_contexts endpoint."),{allContextNames:[],allGPUs:[],perContextGPUs:[],perNodeGPUs:[],contextStats:{}};let s=await u(e),d=await c(),g=new Map;d&&d.forEach(e=>{g.set(e[0],e[1])});let h={},f={},p={};for(let e of n){f[e]||(f[e]=[]);let n=g.get(e);if(n&&n.length>0)for(let t of n){let r=t[0],a=t[1].join(", "),o=t[2],n=t[3];r in h?(h[r].gpu_total+=o,h[r].gpu_free+=n):h[r]={gpu_total:o,gpu_free:n,gpu_name:r},f[e].push({gpu_name:r,gpu_requestable_qty_per_node:a,gpu_total:o,gpu_free:n,context:e})}let s=await i(e);if(s&&Object.keys(s).length>0)for(let n in s){var t,r,a,o;let c=s[n],l=c.accelerator_type||"-",i=null!==(a=null===(t=c.total)||void 0===t?void 0:t.accelerator_count)&&void 0!==a?a:0,u=null!==(o=null===(r=c.free)||void 0===r?void 0:r.accelerators_available)&&void 0!==o?o:0;p["".concat(e,"/").concat(n)]={node_name:c.name,gpu_name:l,gpu_total:i,gpu_free:u,context:e},"-"===l||f[e].some(e=>e.gpu_name===l)||(l in h||(h[l]={gpu_total:0,gpu_free:0,gpu_name:l}),f[e].find(e=>e.gpu_name===l)||f[e].push({gpu_name:l,gpu_requestable_qty_per_node:"-",gpu_total:0,gpu_free:0,context:e}))}0===f[e].length&&s&&Object.keys(s).length}return{allContextNames:n.sort(),allGPUs:Object.values(h).sort((e,t)=>e.gpu_name.localeCompare(t.gpu_name)),perContextGPUs:Object.values(f).flat().sort((e,t)=>e.context.localeCompare(t.context)||e.gpu_name.localeCompare(t.gpu_name)),perNodeGPUs:Object.values(p).sort((e,t)=>e.context.localeCompare(t.context)||e.node_name.localeCompare(t.node_name)||e.gpu_name.localeCompare(t.gpu_name)),contextStats:s}}catch(e){return console.error("[infra.jsx] Outer error in getKubernetesGPUs:",e),{allContextNames:[],allGPUs:[],perContextGPUs:[],perNodeGPUs:[],contextStats:{}}}}r(3266),r(8969)},8969:function(e,t,r){r.d(t,{Ce:function(){return i},NJ:function(){return l},Pr:function(){return c},getManagedJobs:function(){return s}});var a=r(7294),o=r(5821),n=r(3225);async function s(){let{allUsers:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let t=(await fetch("".concat(n.f4,"/jobs/queue"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({all_users:e})})).headers.get("X-Skypilot-Request-ID"),r=await fetch("".concat(n.f4,"/api/get?request_id=").concat(t));if(500===r.status){try{let e=await r.json();if(e.detail&&e.detail.error)try{let t=JSON.parse(e.detail.error);if(t.type&&t.type===n.iW)return{jobs:[],controllerStopped:!0}}catch(e){console.error("Error parsing JSON:",e)}}catch(e){console.error("Error parsing JSON:",e)}return{jobs:[],controllerStopped:!1}}let a=await r.json();return{jobs:(a.return_value?JSON.parse(a.return_value):[]).map(e=>{let t=[];e.submitted_at&&t.push({time:new Date(1e3*e.submitted_at),event:"Job submitted."}),e.start_at&&t.push({time:new Date(1e3*e.start_at),event:"Job started."}),e.end_at&&("CANCELLING"==e.status||"CANCELLED"==e.status?t.push({time:new Date(1e3*e.end_at),event:"Job cancelled."}):t.push({time:new Date(1e3*e.end_at),event:"Job completed."})),e.last_recovered_at&&e.last_recovered_at!=e.start_at&&t.push({time:new Date(1e3*e.last_recovered_at),event:"Job recovered."});let r=(e.end_at?e.end_at:Date.now()/1e3)-e.submitted_at,a=e.cloud,o=e.cluster_resources;if(!a){if(e.cluster_resources&&"-"!==e.cluster_resources)try{a=e.cluster_resources.split("(")[0].split("x").pop().trim(),o=e.cluster_resources.replace("".concat(a,"("),"(").replace("x ","x")}catch(e){a="Unknown"}else a="Unknown"}let n="",s=n=e.zone?e.zone:e.region;n&&n.length>15&&(n=n.substring(0,15)+"...");let c=a+" ("+n+")";"-"===n&&(c=a);let l=a+" ("+s+")";return"-"===s&&(l=a),{id:e.job_id,task:e.task_name,name:e.job_name,job_duration:e.job_duration,total_duration:r,workspace:e.workspace,status:e.status,priority:e.priority,requested_resources:e.resources,resources_str:o,resources_str_full:e.cluster_resources_full||o,cloud:a,region:e.region,infra:c,full_infra:l,recoveries:e.recovery_count,details:e.details||e.failure_reason,user:e.user_name,user_hash:e.user_hash,submitted_at:e.submitted_at?new Date(1e3*e.submitted_at):null,events:t,dag_yaml:e.dag_yaml,entrypoint:e.entrypoint}}),controllerStopped:!1}}catch(e){return console.error("Error fetching managed job data:",e),{jobs:[],controllerStopped:!1}}}function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,[t,r]=(0,a.useState)(null),[o,n]=(0,a.useState)(!0);return(0,a.useEffect)(()=>{(async function(){try{n(!0);let e=await s({allUsers:!0});r(e)}catch(e){console.error("Error fetching managed job data:",e)}finally{n(!1)}})()},[e]),{jobData:t,loading:o}}async function l(e){let t,{jobId:r,controller:a=!1,signal:s,onNewLog:c}=e,l=Date.now(),i=new Promise(e=>{let r=()=>{let a=Date.now()-l;a>=3e4?e({timeout:!0}):t=setTimeout(r,3e4-a)};t=setTimeout(r,3e4)}),u=(async()=>{try{let e=(await fetch("".concat(n.f4,"/jobs/logs"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({controller:a,follow:!1,job_id:r,tail:1e3}),...s?{signal:s}:{}})).body.getReader();try{for(;;){let{done:t,value:r}=await e.read();if(t)break;l=Date.now();let a=new TextDecoder().decode(r);c(a)}}finally{e.cancel(),t&&clearTimeout(t)}return{timeout:!1}}catch(e){if(t&&clearTimeout(t),"AbortError"===e.name)return{timeout:!1};throw e}})(),d=await Promise.race([u,i]);if(t&&clearTimeout(t),d.timeout){(0,o.C)("Log request for job ".concat(r," timed out after ").concat(30,"s of inactivity"),"warning");return}}async function i(e,t,r){let a="",s="",c="",l={};if("restartcontroller"===e)a="Restarting",s="restarted",c="jobs/queue",l={all_users:!0,refresh:!0},t="controller";else throw Error("Invalid action: ".concat(e));(0,o.C)("".concat(a," job ").concat(t,"..."),"info");try{try{let e=(await fetch("".concat(n.f4,"/").concat(c),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)})).headers.get("X-Skypilot-Request-ID"),i=await fetch("".concat(n.f4,"/api/get?request_id=").concat(e));if(200===i.status)(0,o.C)("Job ".concat(t," ").concat(s," successfully."),"success");else if(500===i.status)try{let e=await i.json();if(e.detail&&e.detail.error)try{let s=JSON.parse(e.detail.error);s.type&&s.type===n.Bo?(0,o.C)("".concat(a," job ").concat(t," is not supported!"),"error",1e4):s.type&&s.type===n.mF?(0,o.C)("Cluster ".concat(r," does not exist."),"error"):s.type&&s.type===n.iW?(0,o.C)("Cluster ".concat(r," is not up."),"error"):(0,o.C)("".concat(a," job ").concat(t," failed: ").concat(s.type),"error")}catch(r){(0,o.C)("".concat(a," job ").concat(t," failed: ").concat(e.detail.error),"error")}else(0,o.C)("".concat(a," job ").concat(t," failed with no details."),"error")}catch(e){(0,o.C)("".concat(a," job ").concat(t," failed with parse error."),"error")}else(0,o.C)("".concat(a," job ").concat(t," failed with status ").concat(i.status,"."),"error")}catch(e){console.error("Fetch error:",e),(0,o.C)("Network error ".concat(a," job ").concat(t,": ").concat(e.message),"error")}}catch(e){console.error("Error in handleStop:",e),(0,o.C)("Critical error ".concat(a," job ").concat(t,": ").concat(e.message),"error")}}},5821:function(e,t,r){r.d(t,{C:function(){return a}});function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5e3,a=document.getElementById("toast-container");a||((a=document.createElement("div")).id="toast-container",a.className="fixed top-0 right-0 p-4 z-[9999] flex flex-col items-end space-y-2",document.body.appendChild(a));let o=document.createElement("div");switch(o.className="rounded-md border-l-4 p-4 shadow-md flex items-center justify-between max-w-md w-full mb-2 pointer-events-auto",t){case"success":o.className+=" bg-green-100 border-green-500 text-green-800";break;case"error":o.className+=" bg-red-100 border-red-500 text-red-800";break;case"warning":o.className+=" bg-yellow-100 border-yellow-500 text-yellow-800";break;default:o.className+=" bg-blue-100 border-blue-500 text-blue-800"}return o.innerHTML='\n <div class="flex-1 mr-2">\n <p class="text-sm font-medium">'.concat(e,'</p>\n </div>\n <button class="text-gray-500 hover:text-gray-700 focus:outline-none" aria-label="Close toast">\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <line x1="18" y1="6" x2="6" y2="18"></line>\n <line x1="6" y1="6" x2="18" y2="18"></line>\n </svg>\n </button>\n '),a.appendChild(o),o.querySelector("button").addEventListener("click",()=>{a.removeChild(o)}),setTimeout(()=>{a.contains(o)&&a.removeChild(o)},r),o}},3081:function(e,t,r){r.d(t,{R:function(){return l},i:function(){return i}});var a=r(3225),o=r(3266),n=r(8969);let s=e=>e&&e.includes("@")?e.split("@")[0]:e||"N/A",c=e=>e&&e.includes("@")?e:"-";async function l(){try{let e=await fetch("".concat(a.f4,"/users"));if(!e.ok)throw Error("HTTP error! status: ".concat(e.status));return(await e.json()).map(e=>({userId:e.id,username:e.name}))||[]}catch(e){return console.error("Failed to fetch users:",e),[]}}async function i(){let[e,t,r]=await Promise.all([l(),(0,o.getClusters)(),(0,n.getManagedJobs)()]),a=r.jobs||[];return(e||[]).map(e=>{let r=(t||[]).filter(t=>t.user_hash===e.userId),o=(a||[]).filter(t=>t.user_hash===e.userId);return{...e,usernameDisplay:s(e.username),fullEmail:c(e.username),clusterCount:r.length,jobCount:o.length}})}},6856:function(e,t,r){var a=r(6378),o=r(3266),n=r(8969),s=r(7324),c=r(3081),l=r(2045);let i={base:{getClusters:{fn:o.getClusters,args:[]},getManagedJobs:{fn:n.getManagedJobs,args:[]},getWorkspaces:{fn:s.fX,args:[]},getUsers:{fn:c.R,args:[]},getUsersWithCounts:{fn:c.i,args:[]},getInfraData:{fn:l.l4,args:[]}},dynamic:{getEnabledClouds:{fn:s.yz,requiresWorkspaces:!0}},pages:{clusters:["getClusters","getWorkspaces"],jobs:["getManagedJobs","getClusters","getWorkspaces"],infra:["getInfraData"],workspaces:["getWorkspaces","getClusters","getManagedJobs","getEnabledClouds"],users:["getUsersWithCounts"]}};class u{async preloadForPage(e,t){let{backgroundPreload:r=!0,force:a=!1}=t||{};if(!i.pages[e]){console.warn("Unknown page: ".concat(e));return}console.log("[CachePreloader] Preloading cache for page: ".concat(e));try{await this._loadPageData(e,a),r&&this._backgroundPreloadOtherPages(e)}catch(t){console.error("[CachePreloader] Error preloading for page ".concat(e,":"),t)}}async _loadPageData(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=i.pages[e],o=[];for(let e of r)if(i.base[e]){let{fn:r,args:n}=i.base[e];t&&a.ZP.invalidate(r,n),o.push(a.ZP.get(r,n))}else"getEnabledClouds"===e&&o.push(this._loadEnabledCloudsForAllWorkspaces(t));await Promise.allSettled(o),console.log("[CachePreloader] Loaded data for page: ".concat(e))}async _loadEnabledCloudsForAllWorkspaces(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];try{e&&a.ZP.invalidate(s.fX);let t=await a.ZP.get(s.fX),r=Object.keys(t||{}).map(t=>(e&&a.ZP.invalidate(s.yz,[t]),a.ZP.get(s.yz,[t])));await Promise.allSettled(r)}catch(e){console.error("[CachePreloader] Error loading enabled clouds:",e)}}_backgroundPreloadOtherPages(e){if(this.isPreloading)return;this.isPreloading=!0;let t=Object.keys(i.pages).filter(t=>t!==e);console.log("[CachePreloader] Background preloading pages: ".concat(t.join(", "))),Promise.allSettled(t.map(async e=>{try{await this._loadPageData(e,!1),console.log("[CachePreloader] Background loaded: ".concat(e))}catch(t){console.error("[CachePreloader] Background load failed for ".concat(e,":"),t)}})).then(()=>{this.isPreloading=!1,console.log("[CachePreloader] Background preloading complete")})}async preloadBaseFunctions(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];console.log("[CachePreloader] Preloading all base functions");let t=Object.entries(i.base).map(t=>{let[r,{fn:o,args:n}]=t;return e&&a.ZP.invalidate(o,n),a.ZP.get(o,n).catch(e=>{console.error("[CachePreloader] Failed to preload ".concat(r,":"),e)})});await Promise.allSettled(t),console.log("[CachePreloader] Base functions preloaded")}getCacheStats(){return{...a.ZP.getStats(),isPreloading:this.isPreloading,preloadPromises:this.preloadPromises.size}}clearCache(){a.ZP.clear(),this.isPreloading=!1,this.preloadPromises.clear(),console.log("[CachePreloader] Cache cleared")}constructor(){this.isPreloading=!1,this.preloadPromises=new Map}}let d=new u;t.ZP=d},6378:function(e,t,r){let a=r(1214).ej.DEFAULT_TTL;class o{async get(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r.ttl||a,n=!1!==r.refreshOnAccess,s=this._generateKey(e,t),c=e.name||"anonymous",l=this.cache.get(s),i=Date.now();if(l&&i-l.lastUpdated<o){let r=Math.round((i-l.lastUpdated)/1e3);return this._debug("Cache HIT for ".concat(c," (age: ").concat(r,"s, TTL: ").concat(Math.round(o/1e3),"s)")),n&&(this.cache.set(s,{data:l.data,lastUpdated:i}),this._debug("Cache TTL refreshed for ".concat(c))),this.backgroundJobs.has(s)||this._refreshInBackground(e,t,s),l.data}try{let r=await e(...t);return this.cache.set(s,{data:r,lastUpdated:i}),r}catch(e){if(l)return console.warn("Failed to fetch fresh data for ".concat(s,", returning stale data:"),e),l.data;throw e}}invalidate(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=this._generateKey(e,t);this.cache.delete(r),this.backgroundJobs.delete(r)}invalidateFunction(e){let t=e.name||"anonymous",r=[];for(let e of this.cache.keys())e.startsWith("".concat(t,"_"))&&r.push(e);r.forEach(e=>{this.cache.delete(e),this.backgroundJobs.delete(e)})}clear(){this.cache.clear(),this.backgroundJobs.clear()}getStats(){return{cacheSize:this.cache.size,backgroundJobs:this.backgroundJobs.size,keys:Array.from(this.cache.keys())}}getDetailedStats(){let e=Date.now(),t=[];for(let[r,a]of this.cache.entries()){let o=e-a.lastUpdated;t.push({key:r,age:Math.round(o/1e3),lastUpdated:new Date(a.lastUpdated).toISOString(),hasBackgroundJob:this.backgroundJobs.has(r)})}return{cacheSize:this.cache.size,backgroundJobs:this.backgroundJobs.size,entries:t.sort((e,t)=>e.age-t.age)}}setDebugMode(e){this.debugMode=e}_debug(e){for(var t=arguments.length,r=Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];this.debugMode&&console.log("[DashboardCache] ".concat(e),...r)}_refreshInBackground(e,t,r){this.backgroundJobs.set(r,!0),e(...t).then(e=>{this.cache.set(r,{data:e,lastUpdated:Date.now()})}).catch(e=>{console.warn("Background refresh failed for ".concat(r,":"),e)}).finally(()=>{this.backgroundJobs.delete(r)})}_generateKey(e,t){let r=e.name||"anonymous",a=t.length>0?JSON.stringify(t):"";return"".concat(r,"_").concat(a)}constructor(){this.cache=new Map,this.backgroundJobs=new Map,this.debugMode=!1}}let n=new o;t.ZP=n}}]);
@@ -1,6 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[826],{4966:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/clusters/[cluster]/[job]",function(){return s(190)}])},3626: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)("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 a=s(8799),n=s(6989),l=s(3850);let c=e=>{switch(e){case"LAUNCHING":return"bg-blue-100 text-sky-blue";case"RUNNING":return"bg-green-50 text-green-700";case"STOPPED":return"bg-yellow-100 text-yellow-800";case"TERMINATED":default:return"bg-gray-100 text-gray-800";case"PENDING":case"CANCELLED":case"CANCELLING":return"bg-yellow-50 text-yellow-700";case"SUCCEEDED":return"bg-blue-50 text-blue-700";case"FAILED":case"FAILED_PRECHECKS":case"FAILED_NO_RESOURCE":case"FAILED_CONTROLLER":return"bg-red-50 text-red-700";case"RECOVERING":return"bg-orange-50 text-orange-700";case"SUBMITTED":return"bg-indigo-50 text-indigo-700";case"STARTING":return"bg-cyan-50 text-cyan-700";case"FAILED_SETUP":return"bg-pink-50 text-pink-700"}},i=e=>{switch(e){case"LAUNCHING":case"STARTING":return(0,r.jsx)(a.Z,{size:12,className:"w-3 h-3 mr-1"});case"RUNNING":default:return(0,r.jsx)(l.W2,{className:"w-3 h-3 mr-1"});case"STOPPED":return(0,r.jsx)(l.fp,{className:"w-3 h-3 mr-1"});case"TERMINATED":case"FAILED":case"CANCELLED":return(0,r.jsx)(l.Ps,{className:"w-3 h-3 mr-1"});case"SUCCEEDED":return(0,r.jsx)(l.Ye,{className:"w-3 h-3 mr-1"});case"PENDING":case"RECOVERING":case"SUBMITTED":case"CANCELLING":case"FAILED_SETUP":case"FAILED_PRECHECKS":case"FAILED_NO_RESOURCE":case"FAILED_CONTROLLER":return(0,r.jsx)(l.J$,{className:"w-3 h-3 mr-1"})}},o=e=>{let t=c(e),s=i(e);return(0,r.jsxs)("span",{className:"".concat("inline-flex items-center px-2 py-1 rounded-full text-sm"," ").concat(t),children:[s,e]})},d=e=>{let{status:t}=e;return(0,r.jsx)(n.WH,{content:t,className:"text-muted-foreground text-sm",children:(0,r.jsx)("span",{children:o(t)})})}},7673:function(e,t,s){"use strict";s.d(t,{Ol:function(){return o},Zb:function(){return i},aY:function(){return m},eW:function(){return x},ll:function(){return d}});var r=s(5893),a=s(7294),n=s(5697),l=s.n(n),c=s(2350);let i=a.forwardRef((e,t)=>{let{className:s,children:a,...n}=e;return(0,r.jsx)("div",{ref:t,className:(0,c.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",s),...n,children:a})});i.displayName="Card",i.propTypes={className:l().string,children:l().node};let o=a.forwardRef((e,t)=>{let{className:s,children:a,...n}=e;return(0,r.jsx)("div",{ref:t,className:(0,c.cn)("flex flex-col space-y-1.5 p-6",s),...n,children:a})});o.displayName="CardHeader",o.propTypes={className:l().string,children:l().node};let d=a.forwardRef((e,t)=>{let{className:s,children:a,...n}=e;return(0,r.jsx)("h3",{ref:t,className:(0,c.cn)("text-2xl font-semibold leading-none tracking-tight",s),...n,children:a})});d.displayName="CardTitle",d.propTypes={className:l().string,children:l().node};let u=a.forwardRef((e,t)=>{let{className:s,children:a,...n}=e;return(0,r.jsx)("p",{ref:t,className:(0,c.cn)("text-sm text-muted-foreground",s),...n,children:a})});u.displayName="CardDescription",u.propTypes={className:l().string,children:l().node};let m=a.forwardRef((e,t)=>{let{className:s,children:a,...n}=e;return(0,r.jsx)("div",{ref:t,className:(0,c.cn)("p-6 pt-0",s),...n,children:a})});m.displayName="CardContent",m.propTypes={className:l().string,children:l().node};let x=a.forwardRef((e,t)=>{let{className:s,children:a,...n}=e;return(0,r.jsx)("div",{ref:t,className:(0,c.cn)("flex items-center p-6 pt-0",s),...n,children:a})});x.displayName="CardFooter",x.propTypes={className:l().string,children:l().node}},3266:function(e,t,s){"use strict";s.d(t,{QL:function(){return d},Sl:function(){return i},getClusters:function(){return c}});var r=s(7294),a=s(5821),n=s(3225);let l={UP:"RUNNING",STOPPED:"STOPPED",INIT:"LAUNCHING",null:"TERMINATED"};async function c(){let{clusterNames:e=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let t=await fetch("".concat(n.f4,"/status"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cluster_names:e,all_users:!0})}),s=t.headers.get("X-Skypilot-Request-ID")||t.headers.get("X-Request-ID"),r=await fetch("".concat(n.f4,"/api/get?request_id=").concat(s)),a=await r.json();return(a.return_value?JSON.parse(a.return_value):[]).map(e=>{let t="",s=t=e.zone?e.zone:e.region;return t&&t.length>25&&(t=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15;if(!e||e.length<=t)return e;if(t<=3)return"...";let s=Math.floor((t-3)/2),r=s+(t-3)%2;return 0===s?e.substring(0,r)+"...":e.substring(0,r)+"..."+e.substring(e.length-s)}(t,25)),{status:l[e.status],cluster:e.name,user:e.user_name,user_hash:e.user_hash,cloud:e.cloud,region:e.region,infra:t?e.cloud+" ("+t+")":e.cloud,full_infra:s?"".concat(e.cloud," (").concat(s,")"):e.cloud,cpus:e.cpus,mem:e.memory,gpus:e.accelerators,resources_str:e.resources_str,resources_str_full:e.resources_str_full,time:new Date(1e3*e.launched_at),num_nodes:e.nodes,workspace:e.workspace,autostop:e.autostop,to_down:e.to_down,jobs:[],command:e.last_creation_command||e.last_use,task_yaml:e.last_creation_yaml||"{}",events:[{time:new Date(1e3*e.launched_at),event:"Cluster created."}]}})}catch(e){return console.error("Error fetching clusters:",e),[]}}async function i(e){let{clusterName:t,jobId:s,onNewLog:r,workspace:l}=e;try{let e=(await fetch("".concat(n.f4,"/logs"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({follow:!1,cluster_name:t,job_id:s,override_skypilot_config:{active_workspace:l||"default"}})})).body.getReader();for(;;){let{done:t,value:s}=await e.read();if(t)break;let a=new TextDecoder().decode(s);r(a)}}catch(e){console.error("Error in streamClusterJobLogs:",e),(0,a.C)("Error in streamClusterJobLogs: ".concat(e.message),"error")}}async function o(e){let{clusterName:t,workspace:s}=e;try{let e=await fetch("".concat(n.f4,"/queue"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cluster_name:t,all_users:!0,override_skypilot_config:{active_workspace:s}})}),r=e.headers.get("X-Skypilot-Request-ID")||e.headers.get("X-Request-ID"),a=await fetch("".concat(n.f4,"/api/get?request_id=").concat(r)),l=await a.json();return JSON.parse(l.return_value).map(e=>{let s=e.end_at?e.end_at:Date.now()/1e3,r=0,a=0;return e.submitted_at&&(r=s-e.submitted_at),e.start_at&&(a=s-e.start_at),{id:e.job_id,status:e.status,job:e.job_name,user:e.username,gpus:e.accelerators||{},submitted_at:e.submitted_at?new Date(1e3*e.submitted_at):null,resources:e.resources,cluster:t,total_duration:r,job_duration:a,infra:"",logs:""}})}catch(e){return console.error("Error fetching cluster jobs:",e),[]}}function d(e){let{cluster:t,job:s=null}=e,[a,n]=(0,r.useState)(null),[l,i]=(0,r.useState)(null),[d,u]=(0,r.useState)(!0),[m,x]=(0,r.useState)(!0),h=(0,r.useCallback)(async()=>{if(t)try{u(!0);let e=await c({clusterNames:[t]});return n(e[0]),e[0]}catch(e){console.error("Error fetching cluster data:",e)}finally{u(!1)}return null},[t]),f=(0,r.useCallback)(async e=>{if(t)try{x(!0);let s=await o({clusterName:t,workspace:e||"default"});i(s)}catch(e){console.error("Error fetching cluster job data:",e)}finally{x(!1)}},[t]),N=(0,r.useCallback)(async()=>{let e=await h();e&&await f(e.workspace)},[h,f]);return(0,r.useEffect)(()=>{(async()=>{let e=await h();e&&await f(e.workspace)})()},[t,s,h,f]),{clusterData:a,clusterJobData:l,loading:d||m,refreshData:N}}},5821:function(e,t,s){"use strict";function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5e3,r=document.getElementById("toast-container");r||((r=document.createElement("div")).id="toast-container",r.className="fixed top-0 right-0 p-4 z-[9999] flex flex-col items-end space-y-2",document.body.appendChild(r));let a=document.createElement("div");switch(a.className="rounded-md border-l-4 p-4 shadow-md flex items-center justify-between max-w-md w-full mb-2 pointer-events-auto",t){case"success":a.className+=" bg-green-100 border-green-500 text-green-800";break;case"error":a.className+=" bg-red-100 border-red-500 text-red-800";break;case"warning":a.className+=" bg-yellow-100 border-yellow-500 text-yellow-800";break;default:a.className+=" bg-blue-100 border-blue-500 text-blue-800"}return a.innerHTML='\n <div class="flex-1 mr-2">\n <p class="text-sm font-medium">'.concat(e,'</p>\n </div>\n <button class="text-gray-500 hover:text-gray-700 focus:outline-none" aria-label="Close toast">\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <line x1="18" y1="6" x2="6" y2="18"></line>\n <line x1="6" y1="6" x2="18" y2="18"></line>\n </svg>\n </button>\n '),r.appendChild(a),a.querySelector("button").addEventListener("click",()=>{r.removeChild(a)}),setTimeout(()=>{r.contains(a)&&r.removeChild(a)},s),a}s.d(t,{C:function(){return r}})},190:function(e,t,s){"use strict";s.r(t),s.d(t,{JobDetailPage:function(){return j}});var r=s(5893),a=s(7294),n=s(9470),l=s(7673),c=s(1664),i=s.n(c),o=s(1163),d=s(3266),u=s(6989),m=s(3626),x=s(8799),h=s(9307),f=s(3001),N=s(9008),g=s.n(N);function b(e){let{cluster:t,job:s,jobData:a,onRefresh:n,isRefreshing:l,loading:c}=e,o=(0,f.X)();return(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,r.jsxs)("div",{className:"text-base flex items-center",children:[(0,r.jsx)(i(),{href:"/clusters",className:"text-sky-blue hover:underline",children:"Sky Clusters"}),(0,r.jsx)("span",{className:"mx-2 text-gray-500",children:"›"}),(0,r.jsx)(i(),{href:"/clusters/".concat(t),className:"text-sky-blue hover:underline",children:t}),(0,r.jsx)("span",{className:"mx-2 text-gray-500",children:"›"}),(0,r.jsxs)(i(),{href:"/clusters/".concat(t,"/").concat(s),className:"text-sky-blue hover:underline",children:[s,a.job&&"-"!=a.job?" (".concat(a.job,")"):""]})]}),(0,r.jsxs)("div",{className:"flex items-center",children:[(c||l)&&(0,r.jsxs)("div",{className:"flex items-center mr-2",children:[(0,r.jsx)(x.Z,{size:15,className:"mt-0"}),(0,r.jsx)("span",{className:"text-sm ml-2 text-gray-500",children:"Loading..."})]}),(0,r.jsx)(u.WH,{content:"Refresh",className:"text-muted-foreground",children:(0,r.jsxs)("button",{onClick:n,disabled:c||l,className:"text-sm text-sky-blue hover:text-sky-blue-bright font-medium mx-2 flex items-center",children:[(0,r.jsx)(m.Z,{className:"w-4 h-4 mr-1.5"}),!o&&(0,r.jsx)("span",{children:"Refresh"})]})})]})]})}function j(){let e=(0,o.useRouter)(),{cluster:t,job:s}=e.query,{clusterData:c,clusterJobData:f,loading:N,refreshData:j}=(0,d.QL)({cluster:t}),[p,y]=(0,a.useState)(!1),[w,v]=(0,a.useState)(!0),[E,_]=(0,a.useState)(!1),[C,k]=(0,a.useState)([]),[D,T]=(0,a.useState)(!1),R=(0,a.useMemo)(()=>["INIT","PENDING","SETTING_UP"],[]),S=(0,a.useMemo)(()=>{if(!f||!s)return!0;let e=f.find(e=>e.id==s);return e&&R.includes(e.status)},[f,s,R]);a.useEffect(()=>{!N&&w&&v(!1)},[N,w]),(0,a.useEffect)(()=>{let e=!0;return t&&s&&!S?(_(!0),(0,d.Sl)({clusterName:t,jobId:s,onNewLog:t=>{if(e){let e=(0,u.q8)(t);k(t=>[...t,e])}},workspace:null==c?void 0:c.workspace}).then(()=>{e&&_(!1)}).catch(t=>{e&&(console.error("Error streaming logs:",t),_(!1))})):_(!1),()=>{e=!1}},[t,s,D,S,c]);let I=async()=>{y(!0),T(e=>!e),k([]);try{j&&await j()}catch(e){console.error("Error refreshing data:",e)}finally{y(!1)}};if(!e.isReady)return(0,r.jsx)("div",{children:"Loading..."});let L={id:s};if(c&&f){let e=f.find(e=>e.id==s);e&&(L={...e,infra:c.infra,cluster:c.cluster,user:c.user})}let O=t&&s?"Job: ".concat(s," @ ").concat(t," | SkyPilot Dashboard"):"Job Details | SkyPilot Dashboard";return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(g(),{children:(0,r.jsx)("title",{children:O})}),(0,r.jsxs)(n.A,{highlighted:"clusters",children:[(0,r.jsx)(b,{cluster:t,job:s,jobData:L,onRefresh:I,isRefreshing:p,loading:N}),N&&w?(0,r.jsxs)("div",{className:"flex items-center justify-center h-64",children:[(0,r.jsx)(x.Z,{size:24,className:"mr-2"}),(0,r.jsx)("span",{children:"Loading..."})]}):(0,r.jsxs)("div",{className:"space-y-8",children:[(0,r.jsx)("div",{id:"details",children:(0,r.jsxs)(l.Zb,{children:[(0,r.jsx)("div",{className:"flex items-center justify-between px-4 pt-4",children:(0,r.jsx)("h2",{className:"text-lg font-semibold",children:"Details"})}),(0,r.jsx)("div",{className:"p-4",children:(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Job ID"}),(0,r.jsx)("div",{className:"text-base mt-1",children:L.id})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Job Name"}),(0,r.jsx)("div",{className:"text-base mt-1",children:L.job})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Status"}),(0,r.jsx)("div",{className:"text-base mt-1",children:(0,r.jsx)(h.OE,{status:L.status})})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"User"}),(0,r.jsx)("div",{className:"text-base mt-1",children:L.user})]}),L.resources&&(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Requested Resources"}),(0,r.jsx)("div",{className:"text-base mt-1",children:L.resources||"N/A"})]}),L.cluster&&(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Cluster"}),(0,r.jsx)("div",{className:"text-base mt-1",children:(0,r.jsx)(i(),{href:"/clusters/".concat(L.cluster),className:"text-sky-blue hover:underline",children:L.cluster})})]})]})})]})}),(0,r.jsx)("div",{id:"logs",className:"mt-6",children:(0,r.jsxs)(l.Zb,{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-4 pt-4",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("h2",{className:"text-lg font-semibold",children:"Logs"}),(0,r.jsx)("span",{className:"ml-2 text-xs text-gray-500",children:"(Logs are not streaming; click refresh to fetch the latest logs.)"})]}),(0,r.jsx)(u.WH,{content:"Refresh logs",className:"text-muted-foreground",children:(0,r.jsx)("button",{onClick:()=>{T(e=>!e),k([])},disabled:E,className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:(0,r.jsx)(m.Z,{className:"w-4 h-4 ".concat(E?"animate-spin":"")})})})]}),(0,r.jsx)("div",{className:"p-4",children:S?(0,r.jsx)("div",{className:"bg-[#f7f7f7] flex items-center justify-center py-4 text-gray-500",children:(0,r.jsx)("span",{children:"Waiting for the job to start, please refresh after a while"})}):E?(0,r.jsxs)("div",{className:"flex items-center justify-center py-4",children:[(0,r.jsx)(x.Z,{size:20,className:"mr-2"}),(0,r.jsx)("span",{children:"Loading..."})]}):(0,r.jsx)("div",{className:"max-h-96 overflow-y-auto",children:(0,r.jsx)(u.$B,{logs:C.join("")})})})]})})]})]})]})}t.default=j}},function(e){e.O(0,[614,470,888,774,179],function(){return e(e.s=4966)}),_N_E=e.O()}]);
@@ -1,6 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[722],{8706:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/clusters/[cluster]",function(){return t(6996)}])},6639:function(e,s,t){"use strict";t.d(s,{Z:function(){return a}});/**
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 a=(0,t(998).Z)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},6996:function(e,s,t){"use strict";t.r(s);var a=t(5893),r=t(7294),l=t(8799),n=t(8236),i=t(1163),c=t(9470),d=t(1664),x=t.n(d),m=t(9037),o=t(9307),u=t(7673),h=t(3266),j=t(3626),f=t(5895),N=t(6639),v=t(1272),b=t(6989),y=t(9284),g=t(3001),p=t(9008),w=t.n(p);let _=(e,s)=>{let t="",a="";return e>=0&&(t=e+"m",a=" "),s&&(t+="".concat(a,"(down)")),""===t&&(t="-"),t};function k(e){let{clusterData:s,clusterJobData:t,loading:l}=e,[i,c]=(0,r.useState)(!1),d=(null==s?void 0:s.command)||(null==s?void 0:s.task_yaml);return(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"mb-6",children:(0,a.jsxs)(u.Zb,{children:[(0,a.jsx)("div",{className:"flex items-center justify-between px-4 pt-4",children:(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Details"})}),(0,a.jsx)("div",{className:"p-4",children:(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Status"}),(0,a.jsx)("div",{className:"text-base mt-1",children:(0,a.jsx)(o.OE,{status:s.status})})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Cluster"}),(0,a.jsx)("div",{className:"text-base mt-1",children:s.cluster})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"User"}),(0,a.jsx)("div",{className:"text-base mt-1",children:s.user})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Infra"}),(0,a.jsx)("div",{className:"text-base mt-1",children:s.infra?(0,a.jsx)(b.Md,{content:s.full_infra||s.infra,className:"text-sm text-muted-foreground",children:(0,a.jsxs)("span",{children:[(0,a.jsx)(x(),{href:"/infra",className:"text-blue-600 hover:underline",children:s.cloud||s.infra.split("(")[0].trim()}),s.infra.includes("(")&&(0,a.jsx)("span",{children:" "+s.infra.substring(s.infra.indexOf("("))})]})}):"N/A"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Resources"}),(0,a.jsx)("div",{className:"text-base mt-1",children:s.resources_str_full||s.resources_str||"N/A"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Started"}),(0,a.jsx)("div",{className:"text-base mt-1",children:s.time?new Date(s.time).toLocaleString():"N/A"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Autostop"}),(0,a.jsx)("div",{className:"text-base mt-1",children:_(s.autostop,s.to_down)})]}),d&&(0,a.jsxs)("div",{className:"col-span-2",children:[(0,a.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Entrypoint"}),(0,a.jsxs)("div",{className:"space-y-4 mt-3",children:[s.command&&(0,a.jsx)("div",{children:(0,a.jsx)("div",{className:"bg-gray-50 border border-gray-200 rounded-md p-3",children:(0,a.jsx)("code",{className:"text-sm text-gray-800 font-mono break-all",children:s.command})})}),s.task_yaml&&"{}"!==s.task_yaml&&(0,a.jsxs)("div",{children:[(0,a.jsx)("button",{onClick:()=>{c(!i)},className:"flex items-center text-left focus:outline-none mb-2 text-gray-700 hover:text-gray-900 transition-colors duration-200",children:(0,a.jsxs)("div",{className:"flex items-center",children:[i?(0,a.jsx)(f.Z,{className:"w-4 h-4 mr-1"}):(0,a.jsx)(N.Z,{className:"w-4 h-4 mr-1"}),(0,a.jsx)("span",{className:"text-base",children:"Show SkyPilot YAML"})]})}),i&&(0,a.jsx)("div",{className:"bg-gray-50 border border-gray-200 rounded-md p-3 max-h-96 overflow-y-auto",children:(0,a.jsx)("pre",{className:"text-sm text-gray-800 font-mono whitespace-pre-wrap",children:(e=>{if(!e)return"No YAML available";try{let s=v.ZP.load(e),t=v.ZP.dump(s,{lineWidth:-1,styles:{"!!str":"literal"},quotingType:"'",forceQuotes:!1,noRefs:!0,sortKeys:!1,condenseFlow:!1,indent:2}).split("\n"),a=[],r=-1;for(let e=0;e<t.length;e++){let s=t[e],l=s.search(/\S/);0===l&&r>=0&&e>0&&a.push(""),a.push(s),r=l}return a.join("\n").trim()}catch(s){return console.error("YAML formatting error:",s),e}})(s.task_yaml)})})]})]})]})]})})]})}),(0,a.jsx)("div",{className:"mb-8",children:t&&(0,a.jsx)(n.L4,{clusterName:s.cluster,clusterJobData:t,loading:l})})]})}s.default=function(){let e=(0,i.useRouter)(),{cluster:s}=e.query,[t,n]=(0,r.useState)(!1),[d,o]=(0,r.useState)(!0),[u,f]=(0,r.useState)(!1),[N,v]=(0,r.useState)(!1),p=(0,g.X)(),{clusterData:_,clusterJobData:S,loading:C,refreshData:L}=(0,h.QL)({cluster:s});r.useEffect(()=>{!C&&d&&o(!1)},[C,d]);let Z=async()=>{n(!0),await L(),n(!1)};if(!e.isReady)return(0,a.jsx)("div",{children:"Loading..."});let O=s?"Cluster: ".concat(s," | SkyPilot Dashboard"):"Cluster Details | SkyPilot Dashboard";return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(w(),{children:(0,a.jsx)("title",{children:O})}),(0,a.jsxs)(c.A,{highlighted:"clusters",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,a.jsxs)("div",{className:"text-base flex items-center",children:[(0,a.jsx)(x(),{href:"/clusters",className:"text-sky-blue hover:underline",children:"Sky Clusters"}),(0,a.jsx)("span",{className:"mx-2 text-gray-500",children:"›"}),(0,a.jsx)(x(),{href:"/clusters/".concat(s),className:"text-sky-blue hover:underline",children:s})]}),(0,a.jsx)("div",{className:"text-sm flex items-center",children:(0,a.jsxs)("div",{className:"text-sm flex items-center",children:[(C||t)&&(0,a.jsxs)("div",{className:"flex items-center mr-4",children:[(0,a.jsx)(l.Z,{size:15,className:"mt-0"}),(0,a.jsx)("span",{className:"ml-2 text-gray-500",children:"Loading..."})]}),_&&(0,a.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,a.jsx)(b.WH,{content:"Refresh",className:"text-sm text-muted-foreground",children:(0,a.jsxs)("button",{onClick:Z,disabled:C||t,className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center",children:[(0,a.jsx)(j.Z,{className:"w-4 h-4 mr-1.5"}),!p&&(0,a.jsx)("span",{children:"Refresh"})]})}),(0,a.jsx)(m.GV,{withLabel:!0,cluster:_.cluster,status:_.status,onOpenSSHModal:()=>{f(!0)},onOpenVSCodeModal:()=>{v(!0)}})]})]})})]}),C&&d?(0,a.jsxs)("div",{className:"flex justify-center items-center py-12",children:[(0,a.jsx)(l.Z,{size:24,className:"mr-2"}),(0,a.jsx)("span",{className:"text-gray-500",children:"Loading..."})]}):_?(0,a.jsx)(k,{clusterData:_,clusterJobData:S,loading:C||t}):null,(0,a.jsx)(y.Oh,{isOpen:u,onClose:()=>f(!1),cluster:s}),(0,a.jsx)(y._R,{isOpen:N,onClose:()=>v(!1),cluster:s})]})]})}}},function(e){e.O(0,[614,798,121,470,293,856,973,236,37,888,774,179],function(){return e(e.s=8706)}),_N_E=e.O()}]);
@@ -1,6 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[490],{4483:function(e,r,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/config",function(){return n(9377)}])},9333:function(e,r,n){"use strict";n.d(r,{Z:function(){return t}});/**
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 t=(0,n(998).Z)("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]])},1812:function(e,r,n){"use strict";n.d(r,{X:function(){return i}});var t=n(5893),s=n(7294);let l=e=>{if(!(null==e?void 0:e.message))return"An unexpected error occurred.";let r=e.message;return r.includes("failed:")&&(r=r.split("failed:")[1].trim()),r.charAt(0).toUpperCase()+r.slice(1)},i=e=>{let{error:r,title:n="Error",onDismiss:i}=e,[a,o]=(0,s.useState)(!1);if((0,s.useEffect)(()=>{r&&o(!1)},[r]),!r||a)return null;let c="string"==typeof r?r:l(r);return(0,t.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-md p-3 mb-4",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:(0,t.jsx)("svg",{className:"h-5 w-5 text-red-400",viewBox:"0 0 20 20",fill:"currentColor",children:(0,t.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,t.jsx)("div",{className:"ml-3",children:(0,t.jsxs)("div",{className:"text-sm text-red-800",children:[(0,t.jsxs)("strong",{children:[n,":"]})," ",c]})})]}),(0,t.jsx)("button",{onClick:()=>{o(!0),i&&i()},className:"flex-shrink-0 ml-4 text-red-400 hover:text-red-600 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 focus:ring-offset-red-50 rounded","aria-label":"Dismiss error",children:(0,t.jsx)("svg",{className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",children:(0,t.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"})})})]})})}},803:function(e,r,n){"use strict";n.d(r,{z:function(){return c}});var t=n(5893),s=n(7294),l=n(8426),i=n(2003),a=n(2350);let o=(0,i.j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),c=s.forwardRef((e,r)=>{let{className:n,variant:s,size:i,asChild:c=!1,...d}=e,u=c?l.g7:"button";return(0,t.jsx)(u,{className:(0,a.cn)(o({variant:s,size:i,className:n})),ref:r,...d})});c.displayName="Button"},7673:function(e,r,n){"use strict";n.d(r,{Ol:function(){return c},Zb:function(){return o},aY:function(){return f},eW:function(){return m},ll:function(){return d}});var t=n(5893),s=n(7294),l=n(5697),i=n.n(l),a=n(2350);let o=s.forwardRef((e,r)=>{let{className:n,children:s,...l}=e;return(0,t.jsx)("div",{ref:r,className:(0,a.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",n),...l,children:s})});o.displayName="Card",o.propTypes={className:i().string,children:i().node};let c=s.forwardRef((e,r)=>{let{className:n,children:s,...l}=e;return(0,t.jsx)("div",{ref:r,className:(0,a.cn)("flex flex-col space-y-1.5 p-6",n),...l,children:s})});c.displayName="CardHeader",c.propTypes={className:i().string,children:i().node};let d=s.forwardRef((e,r)=>{let{className:n,children:s,...l}=e;return(0,t.jsx)("h3",{ref:r,className:(0,a.cn)("text-2xl font-semibold leading-none tracking-tight",n),...l,children:s})});d.displayName="CardTitle",d.propTypes={className:i().string,children:i().node};let u=s.forwardRef((e,r)=>{let{className:n,children:s,...l}=e;return(0,t.jsx)("p",{ref:r,className:(0,a.cn)("text-sm text-muted-foreground",n),...l,children:s})});u.displayName="CardDescription",u.propTypes={className:i().string,children:i().node};let f=s.forwardRef((e,r)=>{let{className:n,children:s,...l}=e;return(0,t.jsx)("div",{ref:r,className:(0,a.cn)("p-6 pt-0",n),...l,children:s})});f.displayName="CardContent",f.propTypes={className:i().string,children:i().node};let m=s.forwardRef((e,r)=>{let{className:n,children:s,...l}=e;return(0,t.jsx)("div",{ref:r,className:(0,a.cn)("flex items-center p-6 pt-0",n),...l,children:s})});m.displayName="CardFooter",m.propTypes={className:i().string,children:i().node}},9377:function(e,r,n){"use strict";n.r(r),n.d(r,{default:function(){return g}});var t=n(5893),s=n(7294),l=n(1163),i=n(9470);n(1664);var a=n(9008),o=n.n(a),c=n(803),d=n(7673),u=n(7324),f=n(1812),m=n(8799),x=n(9333),h=n(1272),p=n(3225);function v(){let[e,r]=(0,s.useState)(null);return((0,s.useEffect)(()=>{fetch("".concat(p.f4,"/api/health")).then(e=>e.json()).then(e=>{e.version&&r(e.version)}).catch(e=>{console.error("Error fetching version:",e)})},[]),e)?(0,t.jsxs)("div",{className:"text-sm text-gray-500",children:["Version: ",e]}):null}function g(){let e=(0,l.useRouter)(),[r,n]=(0,s.useState)(""),[a,p]=(0,s.useState)(!0),[g,y]=(0,s.useState)(!1),[j,b]=(0,s.useState)(null),[N,w]=(0,s.useState)(!1);(0,s.useEffect)(()=>{k()},[]);let k=async()=>{p(!0),b(null);try{let e=await (0,u.iE)();0===Object.keys(e).length?n(""):n(h.ZP.dump(e,{indent:2}))}catch(e){console.error("Error loading config:",e),b(e)}finally{p(!1)}},C=async()=>{y(!0),b(null),w(!1);try{let e=h.ZP.load(r);if(null==e&&(e={}),"object"!=typeof e||Array.isArray(e)){let r="Invalid config structure: Configuration must be a mapping (key-value pairs) in YAML format.";Array.isArray(e),r="Invalid config structure: Configuration must be a mapping (key-value pairs) in YAML format.",b(Error(r)),y(!1);return}await (0,u.rF)(e),w(!0),setTimeout(()=>w(!1),3e3)}catch(e){console.error("Error saving config:",e),b(e)}finally{y(!1)}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o(),{children:(0,t.jsx)("title",{children:"Edit SkyPilot Configuration | SkyPilot Dashboard"})}),(0,t.jsxs)(i.A,{highlighted:"workspaces",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,t.jsx)("div",{className:"text-base flex items-center",children:(0,t.jsx)("span",{className:"text-sky-blue",children:"SkyPilot Configuration"})}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("div",{className:"text-sm flex items-center",children:(a||g)&&(0,t.jsxs)("div",{className:"flex items-center mr-4",children:[(0,t.jsx)(m.Z,{size:15,className:"mt-0"}),(0,t.jsx)("span",{className:"ml-2 text-gray-500",children:g?"Applying...":"Loading..."})]})}),(0,t.jsx)(v,{})]})]}),(0,t.jsxs)(d.Zb,{className:"w-full",children:[(0,t.jsx)(d.Ol,{children:(0,t.jsx)(d.ll,{className:"text-base font-normal flex items-center justify-between",children:(0,t.jsx)("span",{children:"Edit SkyPilot API Server Configuration"})})}),(0,t.jsxs)(d.aY,{className:"space-y-4",children:[(0,t.jsxs)("p",{className:"text-sm text-gray-600 mb-3",children:["Refer to the"," ",(0,t.jsx)("a",{href:"https://docs.skypilot.co/en/latest/reference/config.html",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline",children:"SkyPilot Docs"})," ","for details. The configuration should be in YAML format."]}),N&&(0,t.jsx)("div",{className:"bg-green-50 border border-green-200 rounded p-4 mb-6",children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:(0,t.jsx)("svg",{className:"h-5 w-5 text-green-400",viewBox:"0 0 20 20",fill:"currentColor",children:(0,t.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})})}),(0,t.jsx)("div",{className:"ml-3",children:(0,t.jsx)("p",{className:"text-sm font-medium text-green-800",children:"Configuration saved successfully!"})})]})}),j&&(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(f.X,{error:j,title:"Failed to apply new configuration",onDismiss:()=>b(null)})}),(0,t.jsx)("div",{className:"w-full",children:(0,t.jsx)("textarea",{value:r,onChange:e=>n(e.target.value),className:"w-full h-96 p-3 border border-gray-300 rounded font-mono text-sm resize-vertical focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:a?"Loading configuration...":"# Enter SkyPilot configuration in YAML format\n# Example:\n# kubernetes:\n# allowed_contexts: [default, my-context]",disabled:a||g})}),(0,t.jsxs)("div",{className:"flex justify-end space-x-3 pt-3",children:[(0,t.jsx)(c.z,{variant:"outline",onClick:()=>{e.push("/workspaces")},disabled:g,children:"Cancel"}),(0,t.jsx)(c.z,{onClick:C,disabled:a||g,className:"inline-flex items-center bg-blue-600 hover:bg-blue-700 text-white",children:g?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m.Z,{size:16,className:"mr-2"}),"Applying..."]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x.Z,{className:"w-4 h-4 mr-1.5"}),"Apply"]})})]})]})]})]})]})}},2003:function(e,r,n){"use strict";n.d(r,{j:function(){return i}});var t=n(512);let s=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,l=t.W,i=(e,r)=>n=>{var t;if((null==r?void 0:r.variants)==null)return l(e,null==n?void 0:n.class,null==n?void 0:n.className);let{variants:i,defaultVariants:a}=r,o=Object.keys(i).map(e=>{let r=null==n?void 0:n[e],t=null==a?void 0:a[e];if(null===r)return null;let l=s(r)||s(t);return i[e][l]}),c=n&&Object.entries(n).reduce((e,r)=>{let[n,t]=r;return void 0===t||(e[n]=t),e},{});return l(e,o,null==r?void 0:null===(t=r.compoundVariants)||void 0===t?void 0:t.reduce((e,r)=>{let{class:n,className:t,...s}=r;return Object.entries(s).every(e=>{let[r,n]=e;return Array.isArray(n)?n.includes({...a,...c}[r]):({...a,...c})[r]===n})?[...e,n,t]:e},[]),null==n?void 0:n.class,null==n?void 0:n.className)}}},function(e){e.O(0,[614,798,470,293,888,774,179],function(){return e(e.s=4483)}),_N_E=e.O()}]);
@@ -1,11 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[315],{479:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/jobs/[job]",function(){return r(8099)}])},6639:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});/**
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 s=(0,r(998).Z)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},3626:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});/**
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 s=(0,r(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,r){"use strict";r.d(t,{Cl:function(){return o},OE:function(){return d}});var s=r(5893);r(7294);var n=r(8799),a=r(6989),l=r(3850);let o=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"}},c=e=>{switch(e){case"LAUNCHING":case"STARTING":return(0,s.jsx)(n.Z,{size:12,className:"w-3 h-3 mr-1"});case"RUNNING":default:return(0,s.jsx)(l.W2,{className:"w-3 h-3 mr-1"});case"STOPPED":return(0,s.jsx)(l.fp,{className:"w-3 h-3 mr-1"});case"TERMINATED":case"FAILED":case"CANCELLED":return(0,s.jsx)(l.Ps,{className:"w-3 h-3 mr-1"});case"SUCCEEDED":return(0,s.jsx)(l.Ye,{className:"w-3 h-3 mr-1"});case"PENDING":case"RECOVERING":case"SUBMITTED":case"CANCELLING":case"FAILED_SETUP":case"FAILED_PRECHECKS":case"FAILED_NO_RESOURCE":case"FAILED_CONTROLLER":return(0,s.jsx)(l.J$,{className:"w-3 h-3 mr-1"})}},i=e=>{let t=o(e),r=c(e);return(0,s.jsxs)("span",{className:"".concat("inline-flex items-center px-2 py-1 rounded-full text-sm"," ").concat(t),children:[r,e]})},d=e=>{let{status:t}=e;return(0,s.jsx)(a.WH,{content:t,className:"text-muted-foreground text-sm",children:(0,s.jsx)("span",{children:i(t)})})}},7673:function(e,t,r){"use strict";r.d(t,{Ol:function(){return i},Zb:function(){return c},aY:function(){return m},eW:function(){return f},ll:function(){return d}});var s=r(5893),n=r(7294),a=r(5697),l=r.n(a),o=r(2350);let c=n.forwardRef((e,t)=>{let{className:r,children:n,...a}=e;return(0,s.jsx)("div",{ref:t,className:(0,o.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",r),...a,children:n})});c.displayName="Card",c.propTypes={className:l().string,children:l().node};let i=n.forwardRef((e,t)=>{let{className:r,children:n,...a}=e;return(0,s.jsx)("div",{ref:t,className:(0,o.cn)("flex flex-col space-y-1.5 p-6",r),...a,children:n})});i.displayName="CardHeader",i.propTypes={className:l().string,children:l().node};let d=n.forwardRef((e,t)=>{let{className:r,children:n,...a}=e;return(0,s.jsx)("h3",{ref:t,className:(0,o.cn)("text-2xl font-semibold leading-none tracking-tight",r),...a,children:n})});d.displayName="CardTitle",d.propTypes={className:l().string,children:l().node};let u=n.forwardRef((e,t)=>{let{className:r,children:n,...a}=e;return(0,s.jsx)("p",{ref:t,className:(0,o.cn)("text-sm text-muted-foreground",r),...a,children:n})});u.displayName="CardDescription",u.propTypes={className:l().string,children:l().node};let m=n.forwardRef((e,t)=>{let{className:r,children:n,...a}=e;return(0,s.jsx)("div",{ref:t,className:(0,o.cn)("p-6 pt-0",r),...a,children:n})});m.displayName="CardContent",m.propTypes={className:l().string,children:l().node};let f=n.forwardRef((e,t)=>{let{className:r,children:n,...a}=e;return(0,s.jsx)("div",{ref:t,className:(0,o.cn)("flex items-center p-6 pt-0",r),...a,children:n})});f.displayName="CardFooter",f.propTypes={className:l().string,children:l().node}},8969:function(e,t,r){"use strict";r.d(t,{Ce:function(){return i},NJ:function(){return c},Pr:function(){return o},getManagedJobs:function(){return l}});var s=r(7294),n=r(5821),a=r(3225);async function l(){let{allUsers:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let t=(await fetch("".concat(a.f4,"/jobs/queue"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({all_users:e})})).headers.get("X-Skypilot-Request-ID"),r=await fetch("".concat(a.f4,"/api/get?request_id=").concat(t));if(500===r.status){try{let e=await r.json();if(e.detail&&e.detail.error)try{let t=JSON.parse(e.detail.error);if(t.type&&t.type===a.iW)return{jobs:[],controllerStopped:!0}}catch(e){console.error("Error parsing JSON:",e)}}catch(e){console.error("Error parsing JSON:",e)}return{jobs:[],controllerStopped:!1}}let s=await r.json();return{jobs:(s.return_value?JSON.parse(s.return_value):[]).map(e=>{let t=[];e.submitted_at&&t.push({time:new Date(1e3*e.submitted_at),event:"Job submitted."}),e.start_at&&t.push({time:new Date(1e3*e.start_at),event:"Job started."}),e.end_at&&("CANCELLING"==e.status||"CANCELLED"==e.status?t.push({time:new Date(1e3*e.end_at),event:"Job cancelled."}):t.push({time:new Date(1e3*e.end_at),event:"Job completed."})),e.last_recovered_at&&e.last_recovered_at!=e.start_at&&t.push({time:new Date(1e3*e.last_recovered_at),event:"Job recovered."});let r=(e.end_at?e.end_at:Date.now()/1e3)-e.submitted_at,s=e.cloud,n=e.cluster_resources;if(!s){if(e.cluster_resources&&"-"!==e.cluster_resources)try{s=e.cluster_resources.split("(")[0].split("x").pop().trim(),n=e.cluster_resources.replace("".concat(s,"("),"(").replace("x ","x")}catch(e){s="Unknown"}else s="Unknown"}let a="",l=a=e.zone?e.zone:e.region;a&&a.length>15&&(a=a.substring(0,15)+"...");let o=s+" ("+a+")";"-"===a&&(o=s);let c=s+" ("+l+")";return"-"===l&&(c=s),{id:e.job_id,task:e.task_name,name:e.job_name,job_duration:e.job_duration,total_duration:r,workspace:e.workspace,status:e.status,priority:e.priority,requested_resources:e.resources,resources_str:n,resources_str_full:e.cluster_resources_full||n,cloud:s,region:e.region,infra:o,full_infra:c,recoveries:e.recovery_count,details:e.details||e.failure_reason,user:e.user_name,user_hash:e.user_hash,submitted_at:e.submitted_at?new Date(1e3*e.submitted_at):null,events:t,dag_yaml:e.dag_yaml,entrypoint:e.entrypoint}}),controllerStopped:!1}}catch(e){return console.error("Error fetching managed job data:",e),{jobs:[],controllerStopped:!1}}}function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,[t,r]=(0,s.useState)(null),[n,a]=(0,s.useState)(!0);return(0,s.useEffect)(()=>{(async function(){try{a(!0);let e=await l({allUsers:!0});r(e)}catch(e){console.error("Error fetching managed job data:",e)}finally{a(!1)}})()},[e]),{jobData:t,loading:n}}async function c(e){let t,{jobId:r,controller:s=!1,signal:l,onNewLog:o}=e,c=Date.now(),i=new Promise(e=>{let r=()=>{let s=Date.now()-c;s>=3e4?e({timeout:!0}):t=setTimeout(r,3e4-s)};t=setTimeout(r,3e4)}),d=(async()=>{try{let e=(await fetch("".concat(a.f4,"/jobs/logs"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({controller:s,follow:!1,job_id:r,tail:1e3}),...l?{signal:l}:{}})).body.getReader();try{for(;;){let{done:t,value:r}=await e.read();if(t)break;c=Date.now();let s=new TextDecoder().decode(r);o(s)}}finally{e.cancel(),t&&clearTimeout(t)}return{timeout:!1}}catch(e){if(t&&clearTimeout(t),"AbortError"===e.name)return{timeout:!1};throw e}})(),u=await Promise.race([d,i]);if(t&&clearTimeout(t),u.timeout){(0,n.C)("Log request for job ".concat(r," timed out after ").concat(30,"s of inactivity"),"warning");return}}async function i(e,t,r){let s="",l="",o="",c={};if("restartcontroller"===e)s="Restarting",l="restarted",o="jobs/queue",c={all_users:!0,refresh:!0},t="controller";else throw Error("Invalid action: ".concat(e));(0,n.C)("".concat(s," job ").concat(t,"..."),"info");try{try{let e=(await fetch("".concat(a.f4,"/").concat(o),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)})).headers.get("X-Skypilot-Request-ID"),i=await fetch("".concat(a.f4,"/api/get?request_id=").concat(e));if(200===i.status)(0,n.C)("Job ".concat(t," ").concat(l," successfully."),"success");else if(500===i.status)try{let e=await i.json();if(e.detail&&e.detail.error)try{let l=JSON.parse(e.detail.error);l.type&&l.type===a.Bo?(0,n.C)("".concat(s," job ").concat(t," is not supported!"),"error",1e4):l.type&&l.type===a.mF?(0,n.C)("Cluster ".concat(r," does not exist."),"error"):l.type&&l.type===a.iW?(0,n.C)("Cluster ".concat(r," is not up."),"error"):(0,n.C)("".concat(s," job ").concat(t," failed: ").concat(l.type),"error")}catch(r){(0,n.C)("".concat(s," job ").concat(t," failed: ").concat(e.detail.error),"error")}else(0,n.C)("".concat(s," job ").concat(t," failed with no details."),"error")}catch(e){(0,n.C)("".concat(s," job ").concat(t," failed with parse error."),"error")}else(0,n.C)("".concat(s," job ").concat(t," failed with status ").concat(i.status,"."),"error")}catch(e){console.error("Fetch error:",e),(0,n.C)("Network error ".concat(s," job ").concat(t,": ").concat(e.message),"error")}}catch(e){console.error("Error in handleStop:",e),(0,n.C)("Critical error ".concat(s," job ").concat(t,": ").concat(e.message),"error")}}},5821:function(e,t,r){"use strict";function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5e3,s=document.getElementById("toast-container");s||((s=document.createElement("div")).id="toast-container",s.className="fixed top-0 right-0 p-4 z-[9999] flex flex-col items-end space-y-2",document.body.appendChild(s));let n=document.createElement("div");switch(n.className="rounded-md border-l-4 p-4 shadow-md flex items-center justify-between max-w-md w-full mb-2 pointer-events-auto",t){case"success":n.className+=" bg-green-100 border-green-500 text-green-800";break;case"error":n.className+=" bg-red-100 border-red-500 text-red-800";break;case"warning":n.className+=" bg-yellow-100 border-yellow-500 text-yellow-800";break;default:n.className+=" bg-blue-100 border-blue-500 text-blue-800"}return n.innerHTML='\n <div class="flex-1 mr-2">\n <p class="text-sm font-medium">'.concat(e,'</p>\n </div>\n <button class="text-gray-500 hover:text-gray-700 focus:outline-none" aria-label="Close toast">\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <line x1="18" y1="6" x2="6" y2="18"></line>\n <line x1="6" y1="6" x2="18" y2="18"></line>\n </svg>\n </button>\n '),s.appendChild(n),n.querySelector("button").addEventListener("click",()=>{s.removeChild(n)}),setTimeout(()=>{s.contains(n)&&s.removeChild(n)},r),n}r.d(t,{C:function(){return s}})},8099:function(e,t,r){"use strict";r.r(t);var s=r(5893),n=r(7294),a=r(8799),l=r(1163),o=r(9470),c=r(7673),i=r(8969),d=r(1664),u=r.n(d),m=r(3626),f=r(5895),h=r(6639),g=r(6989),x=r(9307),p=r(3001),b=r(9008),j=r.n(b),y=r(1272);function N(e){let{jobData:t,activeTab:r,setIsLoadingLogs:l,setIsLoadingControllerLogs:o,isLoadingLogs:c,isLoadingControllerLogs:d,refreshFlag:m}=e,[p,b]=(0,n.useState)(""),[j,N]=(0,n.useState)(""),[v,w]=(0,n.useState)(!1),[E,C]=(0,n.useState)({}),[_,L]=(0,n.useState)(0),[S,T]=(0,n.useState)(0),[R,k]=(0,n.useState)(!1),[I,D]=(0,n.useState)(!1),[A,O]=(0,n.useState)(!1),[P,q]=(0,n.useState)(!1),J=(0,n.useRef)(null),F=(0,n.useRef)(null),Z=(0,n.useRef)(null),M=(0,n.useRef)(null),U=(0,n.useRef)(""),G=(0,n.useRef)(""),B=(0,n.useRef)(null);(0,n.useRef)(0);let H=(0,n.useCallback)(e=>{let t="logs"===e?Z:M;if(t.current)for(let r of[()=>t.current.querySelector(".logs-container"),()=>t.current.querySelector('[class*="logs-container"]'),()=>t.current.querySelector('div[style*="overflow"]'),()=>t.current]){let t=r();if(t&&t.scrollHeight>t.clientHeight){t.scrollTop=t.scrollHeight,console.log("Auto-scrolled ".concat(e," to bottom"));break}}},[]),W=["PENDING","SUBMITTED","STARTING"].includes(t.status),Y=["PENDING","SUBMITTED"].includes(t.status),z=["RECOVERING"].includes(t.status),$=e=>{C(t=>({...t,[e]:!t[e]}))},X=e=>{if(!e)return[];try{let t=[],r=e.split(/^---$/m);for(let e=0;e<r.length;e++){let s=r[e].trim();s&&""!==s&&t.push(s)}return(t.length>1?t.slice(1):t).map((e,t)=>{try{let r=y.ZP.load(e),s=y.ZP.dump(r,{lineWidth:-1,styles:{"!!str":"literal"},quotingType:"'",forceQuotes:!1,noRefs:!0,sortKeys:!1,condenseFlow:!1,indent:2}).split("\n"),n=[],a=-1;for(let e=0;e<s.length;e++){let t=s[e],r=t.search(/\S/);0===r&&a>=0&&e>0&&n.push(""),n.push(t),a=r}return{index:t,content:n.join("\n").trim(),preview:V(r)}}catch(r){return console.error("YAML formatting error for document ".concat(t,":"),r),{index:t,content:e,preview:"Invalid YAML"}}})}catch(t){return console.error("YAML formatting error:",t),[{index:0,content:e,preview:"Invalid YAML"}]}},V=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)(()=>{b(""),L(0),q(!1)},[r,t.id]),(0,n.useEffect)(()=>{N(""),T(0),q(!1)},[r,t.id]);let K=(0,n.useCallback)(function(e,t,r,s){let n=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a="logs"===e?J:F;if(a.current)return console.log("Request already active for ".concat(e,", skipping...")),()=>{};let l=!0,o=new AbortController;return"logs"===e&&(W||z)?(s(!1),n&&k(!1),()=>{}):"controllerlogs"===e&&Y?(s(!1),n&&D(!1),()=>{}):t?(a.current=o,s(!0),O(!0),n&&(r(""),"logs"===e?L(0):T(0)),(0,i.NJ)({jobId:t,controller:"controllerlogs"===e,signal:o.signal,onNewLog:t=>{if(l){let r=(0,g.q8)(t);P||q(!0),Q(e,r),"logs"===e?L(e=>e+r.length):T(e=>e+r.length)}}}).then(()=>{l&&(s(!1),n&&("logs"===e?k(!1):D(!1)),requestAnimationFrame(()=>{H(e)}))}).catch(t=>{l&&("AbortError"!==t.name&&(console.error("Error streaming ".concat(e,":"),t),t.message&&r(e=>e+"Error fetching logs: ".concat(t.message,"\n"))),s(!1),n&&("logs"===e?k(!1):D(!1)))}).finally(()=>{console.log("Cleaning up ".concat(e," request")),l=!1,a.current===o&&(a.current.abort(),a.current=null),"logs"===e?U.current="":G.current="",B.current&&(clearTimeout(B.current),B.current=null)}),()=>{console.log("Cleaning up ".concat(e," request")),l=!1,a.current===o&&(a.current.abort(),a.current=null),"logs"===e?U.current="":G.current="",B.current&&(clearTimeout(B.current),B.current=null)}):()=>{l=!1}},[W,Y,z,P]);(0,n.useEffect)(()=>{if(J.current&&(J.current.abort(),J.current=null),!W&&!z)return K("logs",t.id,b,l)},[t.id,K,l,W,z]),(0,n.useEffect)(()=>{if(F.current&&(F.current.abort(),F.current=null),!Y)return K("controllerlogs",t.id,N,o)},[t.id,K,o,Y]),(0,n.useEffect)(()=>{if(m>0&&"logs"===r)return J.current&&(J.current.abort(),J.current=null),k(!0),K("logs",t.id,b,l,!0)},[m,r,t.id,K,l]),(0,n.useEffect)(()=>{if(m>0&&"controllerlogs"===r)return F.current&&(F.current.abort(),F.current=null),D(!0),K("controllerlogs",t.id,N,o,!0)},[m,r,t.id,K,o]),(0,n.useEffect)(()=>()=>{console.log("Cleaning up managed job log requests..."),J.current&&(J.current.abort(),J.current=null),F.current&&(F.current.abort(),F.current=null),B.current&&(clearTimeout(B.current),B.current=null),U.current="",G.current="",l(!1),o(!1),k(!1),D(!1)},[]),(0,n.useEffect)(()=>{let e=()=>{document.hidden?(console.log("Page hidden - pausing log streaming for performance"),B.current&&(clearTimeout(B.current),B.current=null)):console.log("Page visible - resuming normal operation")};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[]),(0,n.useEffect)(()=>{let e=()=>{("logs"===r&&p||"controllerlogs"===r&&j)&&H("logs"===r?"logs":"controllerlogs")};requestAnimationFrame(()=>{requestAnimationFrame(e)})},[r,p,j,H]);let Q=(0,n.useCallback)((e,t)=>{("logs"===e?b:N)(e=>e+t),requestAnimationFrame(()=>{H(e)})},[H]);return"logs"===r?(0,s.jsx)("div",{className:"max-h-96 overflow-y-auto",ref:Z,children:W?(0,s.jsx)("div",{className:"bg-[#f7f7f7] flex items-center justify-center py-4 text-gray-500",children:(0,s.jsx)("span",{children:"Waiting for the job to start, please refresh after a while"})}):z?(0,s.jsx)("div",{className:"bg-[#f7f7f7] flex items-center justify-center py-4 text-gray-500",children:(0,s.jsx)("span",{children:"Waiting for the job to recover, please refresh after a while"})}):P||p?(0,s.jsx)(g.$B,{logs:p}):c?(0,s.jsxs)("div",{className:"flex items-center justify-center py-4",children:[(0,s.jsx)(a.Z,{size:20,className:"mr-2"}),(0,s.jsx)("span",{children:"Loading logs..."})]}):(0,s.jsx)(g.$B,{logs:p})}):"controllerlogs"===r?(0,s.jsx)("div",{className:"max-h-96 overflow-y-auto",ref:M,children:Y?(0,s.jsx)("div",{className:"bg-[#f7f7f7] flex items-center justify-center py-4 text-gray-500",children:(0,s.jsx)("span",{children:"Waiting for the job controller process to start, please refresh after a while"})}):P||j?(0,s.jsx)(g.$B,{logs:j,controller:!0}):d?(0,s.jsxs)("div",{className:"flex items-center justify-center py-4",children:[(0,s.jsx)(a.Z,{size:20,className:"mr-2"}),(0,s.jsx)("span",{children:"Loading logs..."})]}):(0,s.jsx)(g.$B,{logs:j,controller:!0})}):(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Job ID (Name)"}),(0,s.jsxs)("div",{className:"text-base mt-1",children:[t.id," ",t.name?"(".concat(t.name,")"):""]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Status"}),(0,s.jsxs)("div",{className:"text-base mt-1 flex items-center",children:[(0,s.jsx)(x.OE,{status:t.status}),t.priority&&(0,s.jsxs)("span",{className:"ml-2",children:[" (priority: ",t.priority,")"]})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"User"}),(0,s.jsx)("div",{className:"text-base mt-1",children:t.user})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Requested Resources"}),(0,s.jsx)("div",{className:"text-base mt-1",children:t.requested_resources||"N/A"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Infra"}),(0,s.jsx)("div",{className:"text-base mt-1",children:t.infra?(0,s.jsx)(g.Md,{content:t.full_infra||t.infra,className:"text-sm text-muted-foreground",children:(0,s.jsxs)("span",{children:[(0,s.jsx)(u(),{href:"/infra",className:"text-blue-600 hover:underline",children:t.cloud||t.infra.split("(")[0].trim()}),t.infra.includes("(")&&(0,s.jsx)("span",{children:" "+t.infra.substring(t.infra.indexOf("("))})]})}):"-"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Resources"}),(0,s.jsx)("div",{className:"text-base mt-1",children:t.resources_str_full||t.resources_str||"-"})]}),(t.entrypoint||t.dag_yaml)&&(0,s.jsxs)("div",{className:"col-span-2",children:[(0,s.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Entrypoint"}),(0,s.jsxs)("div",{className:"space-y-4 mt-3",children:[t.entrypoint&&(0,s.jsx)("div",{children:(0,s.jsx)("div",{className:"bg-gray-50 border border-gray-200 rounded-md p-3",children:(0,s.jsx)("code",{className:"text-sm text-gray-800 font-mono break-all",children:t.entrypoint})})}),t.dag_yaml&&"{}"!==t.dag_yaml&&(0,s.jsxs)("div",{children:[(0,s.jsx)("button",{onClick:()=>{w(!v)},className:"flex items-center text-left focus:outline-none mb-2 text-gray-700 hover:text-gray-900 transition-colors duration-200",children:(0,s.jsxs)("div",{className:"flex items-center",children:[v?(0,s.jsx)(f.Z,{className:"w-4 h-4 mr-1"}):(0,s.jsx)(h.Z,{className:"w-4 h-4 mr-1"}),(0,s.jsx)("span",{className:"text-base",children:"Show SkyPilot YAML"})]})}),v&&(0,s.jsx)("div",{className:"bg-gray-50 border border-gray-200 rounded-md p-3 max-h-96 overflow-y-auto",children:(()=>{let e=X(t.dag_yaml);return 0===e.length?(0,s.jsx)("div",{className:"text-gray-500",children:"No YAML available"}):1===e.length?(0,s.jsx)("pre",{className:"text-sm text-gray-800 font-mono whitespace-pre-wrap",children:e[0].content}):(0,s.jsx)("div",{className:"space-y-4",children:e.map((e,t)=>(0,s.jsxs)("div",{className:"border-b border-gray-200 pb-4 last:border-b-0",children:[(0,s.jsx)("button",{onClick:()=>$(t),className:"flex items-center justify-between w-full text-left focus:outline-none",children:(0,s.jsxs)("div",{className:"flex items-center",children:[E[t]?(0,s.jsx)(f.Z,{className:"w-4 h-4 mr-2"}):(0,s.jsx)(h.Z,{className:"w-4 h-4 mr-2"}),(0,s.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["Task ",t+1,": ",e.preview]})]})}),E[t]&&(0,s.jsx)("div",{className:"mt-3 ml-6",children:(0,s.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,l.useRouter)(),{job:r,tab:d}=t.query,[f,h]=(0,n.useState)(0),{jobData:x,loading:b}=(0,i.Pr)(f),[y,v]=(0,n.useState)(!1),[w,E]=(0,n.useState)(!0),[C,_]=(0,n.useState)(!1),[L,S]=(0,n.useState)(!1),[T,R]=(0,n.useState)(!1),[k,I]=(0,n.useState)(!1),[D,A]=(0,n.useState)(!1),[O,P]=(0,n.useState)(0),[q,J]=(0,n.useState)(0),F=(0,p.X)();n.useEffect(()=>{!b&&w&&E(!1)},[b,w]);let Z=e=>{let t=document.getElementById(e);t&&t.scrollIntoView({behavior:"smooth"})};(0,n.useEffect)(()=>{I(!0)},[]),(0,n.useEffect)(()=>{if(!D){let e=new MutationObserver(()=>{let t=document.getElementById("logs-section"),r=document.getElementById("controller-logs-section");("logs"===d&&t||"controllerlogs"===d&&r)&&(A(!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?(Z("logs-section"),R(!0)):"controllerlogs"===d&&(Z("controller-logs-section"),R(!0))},800);return()=>clearTimeout(e)}},[t.isReady,d,T,k,D]),(0,n.useEffect)(()=>{R(!1),A(!1)},[d]);let M=async()=>{v(!0);try{h(e=>e+1),P(e=>e+1),J(e=>e+1)}catch(e){console.error("Error refreshing data:",e)}finally{v(!1)}};if(!t.isReady)return(0,s.jsx)("div",{children:"Loading..."});let U=null==x?void 0:null===(e=x.jobs)||void 0===e?void 0:e.find(e=>String(e.id)===String(r)),G=r?"Job: ".concat(r," | SkyPilot Dashboard"):"Job Details | SkyPilot Dashboard";return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(j(),{children:(0,s.jsx)("title",{children:G})}),(0,s.jsxs)(o.A,{highlighted:"managed-jobs",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,s.jsxs)("div",{className:"text-base flex items-center",children:[(0,s.jsx)(u(),{href:"/jobs",className:"text-sky-blue hover:underline",children:"Managed Jobs"}),(0,s.jsx)("span",{className:"mx-2 text-gray-500",children:"›"}),(0,s.jsxs)(u(),{href:"/jobs/".concat(r),className:"text-sky-blue hover:underline",children:[r," ",(null==U?void 0:U.name)?"(".concat(U.name,")"):""]})]}),(0,s.jsxs)("div",{className:"text-sm flex items-center",children:[(b||y||C||L)&&(0,s.jsxs)("div",{className:"flex items-center mr-4",children:[(0,s.jsx)(a.Z,{size:15,className:"mt-0"}),(0,s.jsx)("span",{className:"ml-2 text-gray-500",children:"Loading..."})]}),(0,s.jsx)(g.WH,{content:"Refresh",className:"text-muted-foreground",children:(0,s.jsxs)("button",{onClick:M,disabled:b||y,className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center h-8",children:[(0,s.jsx)(m.Z,{className:"w-4 h-4 mr-1.5"}),!F&&(0,s.jsx)("span",{children:"Refresh"})]})})]})]}),b&&w?(0,s.jsxs)("div",{className:"flex items-center justify-center py-32",children:[(0,s.jsx)(a.Z,{size:20,className:"mr-2"}),(0,s.jsx)("span",{children:"Loading..."})]}):U?(0,s.jsxs)("div",{className:"space-y-8",children:[(0,s.jsx)("div",{id:"details-section",children:(0,s.jsxs)(c.Zb,{children:[(0,s.jsx)("div",{className:"flex items-center justify-between px-4 pt-4",children:(0,s.jsx)("h3",{className:"text-lg font-semibold",children:"Details"})}),(0,s.jsx)("div",{className:"p-4",children:(0,s.jsx)(N,{jobData:U,activeTab:"info",setIsLoadingLogs:_,setIsLoadingControllerLogs:S,isLoadingLogs:C,isLoadingControllerLogs:L,refreshFlag:0})})]})}),(0,s.jsx)("div",{id:"logs-section",className:"mt-6",children:(0,s.jsxs)(c.Zb,{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-4 pt-4",children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)("h3",{className:"text-lg font-semibold",children:"Logs"}),(0,s.jsx)("span",{className:"ml-2 text-xs text-gray-500",children:"(Logs are not streaming; click refresh to fetch the latest logs.)"})]}),(0,s.jsx)(g.WH,{content:"Refresh logs",className:"text-muted-foreground",children:(0,s.jsx)("button",{onClick:()=>{P(e=>e+1)},disabled:C,className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:(0,s.jsx)(m.Z,{className:"w-4 h-4 ".concat(C?"animate-spin":"")})})})]}),(0,s.jsx)("div",{className:"p-4",children:(0,s.jsx)(N,{jobData:U,activeTab:"logs",setIsLoadingLogs:_,setIsLoadingControllerLogs:S,isLoadingLogs:C,isLoadingControllerLogs:L,refreshFlag:O})})]})}),(0,s.jsx)("div",{id:"controller-logs-section",className:"mt-6",children:(0,s.jsxs)(c.Zb,{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-4 pt-4",children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)("h3",{className:"text-lg font-semibold",children:"Controller Logs"}),(0,s.jsx)("span",{className:"ml-2 text-xs text-gray-500",children:"(Logs are not streaming; click refresh to fetch the latest logs.)"})]}),(0,s.jsx)(g.WH,{content:"Refresh controller logs",className:"text-muted-foreground",children:(0,s.jsx)("button",{onClick:()=>{J(e=>e+1)},disabled:L,className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:(0,s.jsx)(m.Z,{className:"w-4 h-4 ".concat(L?"animate-spin":"")})})})]}),(0,s.jsx)("div",{className:"p-4",children:(0,s.jsx)(N,{jobData:U,activeTab:"controllerlogs",setIsLoadingLogs:_,setIsLoadingControllerLogs:S,isLoadingLogs:C,isLoadingControllerLogs:L,refreshFlag:q})})]})})]}):(0,s.jsx)("div",{className:"flex items-center justify-center py-32",children:(0,s.jsx)("span",{children:"Job not found"})})]})]})}}},function(e){e.O(0,[614,798,470,888,774,179],function(){return e(e.s=479)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[590],{2592:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/workspaces",function(){return t(9434)}])},1812:function(e,s,t){"use strict";t.d(s,{X:function(){return a}});var l=t(5893),r=t(7294);let n=e=>{if(!(null==e?void 0:e.message))return"An unexpected error occurred.";let s=e.message;return s.includes("failed:")&&(s=s.split("failed:")[1].trim()),s.charAt(0).toUpperCase()+s.slice(1)},a=e=>{let{error:s,title:t="Error",onDismiss:a}=e,[c,i]=(0,r.useState)(!1);if((0,r.useEffect)(()=>{s&&i(!1)},[s]),!s||c)return null;let o="string"==typeof s?s:n(s);return(0,l.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-md p-3 mb-4",children:(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex",children:[(0,l.jsx)("div",{className:"flex-shrink-0",children:(0,l.jsx)("svg",{className:"h-5 w-5 text-red-400",viewBox:"0 0 20 20",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),(0,l.jsx)("div",{className:"ml-3",children:(0,l.jsxs)("div",{className:"text-sm text-red-800",children:[(0,l.jsxs)("strong",{children:[t,":"]})," ",o]})})]}),(0,l.jsx)("button",{onClick:()=>{i(!0),a&&a()},className:"flex-shrink-0 ml-4 text-red-400 hover:text-red-600 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 focus:ring-offset-red-50 rounded","aria-label":"Dismiss error",children:(0,l.jsx)("svg",{className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]})})}},9434:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return z}});var l=t(5893),r=t(7294),n=t(9008),a=t.n(n),c=t(9470),i=t(1163),o=t(3266),d=t(8969),u=t(7324),x=t(7673),m=t(803),h=t(8799),p=t(1272),f=t(326),j=t(3850),g=t(1812),N=t(3626),b=t(3001),w=t(8236),v=t(6378),k=t(1214),C=t(6856);let y=e=>{let{workspace:s,onDelete:t,onEdit:r,router:n}=e;return(0,l.jsxs)(x.Zb,{children:[(0,l.jsx)(x.Ol,{children:(0,l.jsxs)(x.ll,{className:"text-base font-normal",children:[(0,l.jsx)("span",{className:"font-semibold",children:"Workspace:"})," ",s.name]})}),(0,l.jsxs)(x.aY,{className:"text-sm pb-2",children:[(0,l.jsxs)("div",{className:"py-2 flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center text-gray-600",children:[(0,l.jsx)(j.QT,{className:"w-4 h-4 mr-2 text-gray-500"}),(0,l.jsx)("span",{children:"Clusters (Running / Total)"})]}),(0,l.jsxs)("button",{onClick:()=>{n.push({pathname:"/clusters",query:{workspace:s.name}})},className:"font-normal text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",children:[s.runningClusterCount," / ",s.totalClusterCount]})]}),(0,l.jsxs)("div",{className:"py-2 flex items-center justify-between border-t border-gray-100",children:[(0,l.jsxs)("div",{className:"flex items-center text-gray-600",children:[(0,l.jsx)(j.Vp,{className:"w-4 h-4 mr-2 text-gray-500"}),(0,l.jsx)("span",{children:"Managed Jobs"})]}),(0,l.jsx)("button",{onClick:()=>{n.push({pathname:"/jobs",query:{workspace:s.name}})},className:"font-normal text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",children:s.managedJobsCount})]})]}),(0,l.jsxs)("div",{className:"px-6 pb-3 text-sm pt-3",children:[(0,l.jsx)("h4",{className:"mb-2 text-xs text-gray-500 tracking-wider",children:"Enabled Infra"}),(0,l.jsx)("div",{className:"flex flex-wrap gap-x-4 gap-y-1",children:s.clouds.map(e=>(0,l.jsxs)("div",{className:"flex items-center text-gray-700",children:[(0,l.jsx)(j.Ye,{className:"w-3.5 h-3.5 mr-1.5 text-green-500"}),(0,l.jsx)("span",{children:e})]},e))})]}),(0,l.jsxs)(x.eW,{className:"flex justify-end pt-3 gap-2",children:[(0,l.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,l.jsx)(m.z,{variant:"outline",size:"sm",onClick:()=>r(s.name),children:"Edit"})]})]},s.name)},E=e=>{let{onClick:s}=e;return(0,l.jsx)(x.Zb,{className:"border-2 border-dashed border-sky-300 hover:border-sky-400 cursor-pointer transition-colors flex flex-col",onClick:s,children:(0,l.jsx)("div",{className:"flex-1 flex items-center justify-center p-6",children:(0,l.jsxs)("div",{className:"text-center",children:[(0,l.jsx)("div",{className:"w-16 h-16 rounded-full bg-sky-100 flex items-center justify-center mb-4 mx-auto",children:(0,l.jsx)("span",{className:"text-3xl text-sky-600",children:"+"})}),(0,l.jsx)("h3",{className:"text-lg font-medium text-sky-700 mb-2",children:"Create New Workspace"}),(0,l.jsx)("p",{className:"text-sm text-gray-500",children:"Set up a new workspace with custom infrastructure configurations"})]})})},"create-new")},D=e=>{let{workspaceCount:s,runningClusters:t,totalClusters:r,managedJobs:n,router:a}=e;return(0,l.jsx)("div",{className:"bg-sky-50 p-4 rounded-lg shadow mb-6",children:(0,l.jsxs)("div",{className:"flex flex-col sm:flex-row justify-around items-center",children:[(0,l.jsx)("div",{className:"p-2",children:(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)(j.E9,{className:"w-5 h-5 mr-2 text-sky-600"}),(0,l.jsx)("span",{className:"text-sm text-gray-600",children:"Workspaces:"}),(0,l.jsx)("span",{className:"ml-1 text-xl font-semibold text-sky-700",children:s})]})}),(0,l.jsx)("div",{className:"p-2",children:(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)(j.QT,{className:"w-5 h-5 mr-2 text-sky-600"}),(0,l.jsx)("span",{className:"text-sm text-gray-600",children:"Clusters (Running / Total):"}),(0,l.jsxs)("button",{onClick:()=>a.push("/clusters"),className:"ml-1 text-xl font-semibold text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",children:[t," / ",r]})]})}),(0,l.jsx)("div",{className:"p-2",children:(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)(j.Vp,{className:"w-5 h-5 mr-2 text-sky-600"}),(0,l.jsx)("span",{className:"text-sm text-gray-600",children:"Managed Jobs:"}),(0,l.jsx)("button",{onClick:()=>a.push("/jobs"),className:"ml-1 text-xl font-semibold text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",children:n})]})})]})})},Z=k.nb.REFRESH_INTERVAL;function P(){let[e,s]=(0,r.useState)([]),[t,n]=(0,r.useState)({runningClusters:0,totalClusters:0,managedJobs:0}),[a,c]=(0,r.useState)(!0),[x,j]=(0,r.useState)(null),[k,P]=(0,r.useState)(!1),[z,O]=(0,r.useState)({confirmOpen:!1,workspaceToDelete:null,deleting:!1,error:null}),T=(0,i.useRouter)(),_=(0,b.X)(),R=async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e&&c(!0);try{let[e,t,l]=await Promise.all([v.ZP.get(u.fX),v.ZP.get(o.getClusters),v.ZP.get(d.getManagedJobs)]);j(e);let r=Object.keys(e),a=await Promise.all(r.map(e=>v.ZP.get(u.yz,[e]))),c=Object.fromEntries(r.map((e,s)=>[e,a[s]])),i=Object.fromEntries(t.map(e=>[e.cluster,e.workspace||"default"])),x={};r.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=l.jobs||[],p=new Set(w.x2.active),f=0;h.forEach(e=>{let s=e.cluster_name||e.resources&&e.resources.cluster_name;if(s){let t=i[s];t&&x[t]&&p.has(e.status)&&x[t].managedJobsCount++}p.has(e.status)&&f++});let g=Object.values(x).filter(e=>r.includes(e.name)).map(e=>({...e,clouds:Array.isArray(c[e.name])?c[e.name]:[]})).sort((e,s)=>e.name.localeCompare(s.name));s(g),n({runningClusters:m,totalClusters:t.length,managedJobs:f})}catch(e){console.error("Error fetching workspace data:",e),s([]),n({runningClusters:0,totalClusters:0,managedJobs:0})}e&&c(!1)};(0,r.useEffect)(()=>{(async()=>{await C.ZP.preloadForPage("workspaces"),R(!0)})();let e=setInterval(()=>{R(!1)},Z);return()=>clearInterval(e)},[]);let S=e=>{O({confirmOpen:!0,workspaceToDelete:e,deleting:!1,error:null})},J=async()=>{if(z.workspaceToDelete){O(e=>({...e,deleting:!0,error:null}));try{await (0,u.zl)(z.workspaceToDelete),O({confirmOpen:!1,workspaceToDelete:null,deleting:!1,error:null}),await R()}catch(e){console.error("Error deleting workspace:",e),O(s=>({...s,deleting:!1,error:e}))}}},L=()=>{O({confirmOpen:!1,workspaceToDelete:null,deleting:!1,error:null})};return a&&0===e.length?(0,l.jsxs)("div",{className:"flex justify-center items-center h-64",children:[(0,l.jsx)(h.Z,{}),(0,l.jsx)("span",{className:"ml-2 text-gray-500",children:"Loading workspaces..."})]}):(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,l.jsxs)("div",{className:"text-base flex items-center",children:[(0,l.jsx)("span",{className:"text-sky-blue leading-none",children:"Workspaces"}),(0,l.jsx)(m.z,{variant:"outline",size:"sm",onClick:()=>T.push("/config"),className:"ml-4 px-2 py-1 text-xs",disabled:a||!x||0===Object.keys(x).length,children:"Edit All Configs"})]}),(0,l.jsxs)("div",{className:"flex items-center",children:[a&&(0,l.jsxs)("div",{className:"flex items-center mr-2",children:[(0,l.jsx)(h.Z,{size:15,className:"mt-0"}),(0,l.jsx)("span",{className:"ml-2 text-gray-500 text-xs",children:"Refreshing..."})]}),(0,l.jsxs)("button",{onClick:()=>{v.ZP.invalidate(u.fX),v.ZP.invalidate(o.getClusters),v.ZP.invalidate(d.getManagedJobs),v.ZP.invalidateFunction(u.yz),R(!0)},disabled:a,className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:[(0,l.jsx)(N.Z,{className:"h-4 w-4 mr-1.5"}),!_&&(0,l.jsx)("span",{children:"Refresh"})]})]})]}),(0,l.jsx)(D,{workspaceCount:e.length,runningClusters:t.runningClusters,totalClusters:t.totalClusters,managedJobs:t.managedJobs,router:T}),0!==e.length||a?(0,l.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[e.map(e=>(0,l.jsx)(y,{workspace:e,onDelete:S,onEdit:e=>T.push("/workspaces/".concat(e)),router:T},e.name)),(0,l.jsx)(E,{onClick:()=>T.push("/workspace/new")})]}):(0,l.jsxs)("div",{className:"text-center py-10",children:[(0,l.jsx)("p",{className:"text-lg text-gray-600",children:"No workspaces found."}),(0,l.jsx)("p",{className:"text-sm text-gray-500 mt-2",children:"Create a cluster to see its workspace here."})]}),x&&(0,l.jsx)(f.Vq,{open:k,onOpenChange:P,children:(0,l.jsxs)(f.cZ,{className:"sm:max-w-md md:max-w-lg lg:max-w-xl xl:max-w-2xl w-full max-h-[90vh] flex flex-col",children:[(0,l.jsx)(f.fK,{children:(0,l.jsx)(f.$N,{className:"pr-10",children:"All Workspaces Configuration"})}),(0,l.jsx)("div",{className:"flex-grow overflow-y-auto py-4",children:(0,l.jsx)("pre",{style:{backgroundColor:"#f5f5f5",padding:"16px",borderRadius:"8px",overflowX:"auto",whiteSpace:"pre",wordBreak:"normal"},children:p.ZP.dump(x,{indent:2})})})]})}),(0,l.jsx)(f.Vq,{open:z.confirmOpen,onOpenChange:L,children:(0,l.jsxs)(f.cZ,{className:"sm:max-w-md",children:[(0,l.jsxs)(f.fK,{children:[(0,l.jsx)(f.$N,{children:"Delete Workspace"}),(0,l.jsxs)(f.Be,{children:['Are you sure you want to delete workspace "',z.workspaceToDelete,'"? This action cannot be undone.']})]}),(0,l.jsx)(g.X,{error:z.error,title:"Deletion Failed",onDismiss:()=>O(e=>({...e,error:null}))}),(0,l.jsxs)(f.cN,{children:[(0,l.jsx)(m.z,{variant:"outline",onClick:L,disabled:z.deleting,children:"Cancel"}),(0,l.jsx)(m.z,{variant:"destructive",onClick:J,disabled:z.deleting,children:z.deleting?"Deleting...":"Delete"})]})]})})]})}function z(){return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(a(),{children:(0,l.jsx)("title",{children:"Workspaces | SkyPilot Dashboard"})}),(0,l.jsx)(c.A,{highlighted:"workspaces",children:(0,l.jsx)(P,{})})]})}}},function(e){e.O(0,[614,798,121,470,293,856,973,236,888,774,179],function(){return e(e.s=2592)}),_N_E=e.O()}]);
@@ -1,3 +0,0 @@
1
- *,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*
2
- ! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com
3
- */*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background:0 0% 100%;--foreground:220 17% 27%;--card:0 0% 100%;--card-foreground:220 17% 27%;--popover:0 0% 100%;--popover-foreground:220 17% 27%;--primary:222.2 47.4% 11.2%;--primary-foreground:220 17% 27%;--secondary:210 40% 96.1%;--secondary-foreground:220 9% 46%;--muted:210 40% 96.1%;--muted-foreground:210 40% 96.1%;--accent:210 40% 96.1%;--accent-foreground:220 17% 27%;--destructive:0 84.2% 60.2%;--destructive-foreground:210 40% 98%;--border:214.3 31.8% 91.4%;--input:214.3 31.8% 91.4%;--ring:222.2 84% 4.9%;--radius:0.5rem;--chart-1:12 76% 61%;--chart-2:173 58% 39%;--chart-3:197 37% 24%;--chart-4:43 74% 66%;--chart-5:27 87% 67%;--text-strong:220 17% 27%}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width:1400px){.container{max-width:1400px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.left-0{left:0}.left-2{left:.5rem}.left-\[50\%\]{left:50%}.left-full{left:100%}.right-0{right:0}.right-4{right:1rem}.top-0{top:0}.top-1\/2{top:50%}.top-14{top:3.5rem}.top-4{top:1rem}.top-\[50\%\]{top:50%}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-50{z-index:50}.z-\[9999\]{z-index:9999}.col-span-2{grid-column:span 2/span 2}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.-mt-10{margin-top:-2.5rem}.-mt-5{margin-top:-1.25rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-6{margin-left:1.5rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-1\.5{margin-right:.375rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mr-6{margin-right:1.5rem}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1/1}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-20{height:5rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-96{height:24rem}.h-\[calc\(100vh-56px\)\]{height:calc(100vh - 56px)}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-full{height:100%}.h-px{height:1px}.max-h-96{max-height:24rem}.max-h-\[250px\]{max-height:250px}.max-h-\[90vh\]{max-height:90vh}.min-h-\[80px\]{min-height:80px}.min-h-screen{min-height:100vh}.w-1\/2{width:50%}.w-1\/4{width:25%}.w-10{width:2.5rem}.w-16{width:4rem}.w-2\/3{width:66.666667%}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-8{width:2rem}.w-full{width:100%}.w-max{width:max-content}.min-w-5{min-width:1.25rem}.min-w-\[100px\]{min-width:100px}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.min-w-full{min-width:100%}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.caption-bottom{caption-side:bottom}.-translate-x-full{--tw-translate-x:-100%}.-translate-x-full,.-translate-y-1\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y:-50%}.translate-x-0{--tw-translate-x:0px}.translate-x-0,.translate-x-\[-50\%\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\[-50\%\]{--tw-translate-x:-50%}.translate-y-\[-50\%\]{--tw-translate-y:-50%}.transform,.translate-y-\[-50\%\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{user-select:none}.resize-none{resize:none}.resize{resize:both}.appearance-none{appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.content-center{align-content:center}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-x-4{column-gap:1rem}.gap-y-1{row-gap:.25rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(229 231 235/var(--tw-divide-opacity,1))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity,1))}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.border-green-500{--tw-border-opacity:1;border-color:rgb(34 197 94/var(--tw-border-opacity,1))}.border-input{border-color:hsl(var(--input))}.border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.border-sky-200{--tw-border-opacity:1;border-color:rgb(186 230 253/var(--tw-border-opacity,1))}.border-sky-300{--tw-border-opacity:1;border-color:rgb(125 211 252/var(--tw-border-opacity,1))}.border-transparent{border-color:transparent}.border-yellow-500{--tw-border-opacity:1;border-color:rgb(234 179 8/var(--tw-border-opacity,1))}.bg-\[\#f7f7f7\]{--tw-bg-opacity:1;background-color:rgb(247 247 247/var(--tw-bg-opacity,1))}.bg-background{background-color:hsl(var(--background))}.bg-black\/50{background-color:rgba(0,0,0,.5)}.bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.bg-card{background-color:hsl(var(--card))}.bg-cyan-50{--tw-bg-opacity:1;background-color:rgb(236 254 255/var(--tw-bg-opacity,1))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.bg-green-700{--tw-bg-opacity:1;background-color:rgb(21 128 61/var(--tw-bg-opacity,1))}.bg-indigo-50{--tw-bg-opacity:1;background-color:rgb(238 242 255/var(--tw-bg-opacity,1))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/50{background-color:hsl(var(--muted)/.5)}.bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}.bg-pink-50{--tw-bg-opacity:1;background-color:rgb(253 242 248/var(--tw-bg-opacity,1))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-sky-100{--tw-bg-opacity:1;background-color:rgb(224 242 254/var(--tw-bg-opacity,1))}.bg-sky-50{--tw-bg-opacity:1;background-color:rgb(240 249 255/var(--tw-bg-opacity,1))}.bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-white\/50{background-color:hsla(0,0%,100%,.5)}.bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.bg-yellow-50{--tw-bg-opacity:1;background-color:rgb(254 252 232/var(--tw-bg-opacity,1))}.bg-yellow-500{--tw-bg-opacity:1;background-color:rgb(234 179 8/var(--tw-bg-opacity,1))}.object-contain{object-fit:contain}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-32{padding-top:8rem;padding-bottom:8rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pl-2{padding-left:.5rem}.pl-8{padding-left:2rem}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-6{padding-right:1.5rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.tracking-tight{letter-spacing:-.025em}.tracking-wider{letter-spacing:.05em}.text-\[hsl\(var\(--text-strong\)\)\]{color:hsl(var(--text-strong))}.text-amber-700{--tw-text-opacity:1;color:rgb(180 83 9/var(--tw-text-opacity,1))}.text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-cyan-700{--tw-text-opacity:1;color:rgb(14 116 144/var(--tw-text-opacity,1))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-gray-100{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity,1))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.text-green-400{--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity,1))}.text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.text-indigo-700{--tw-text-opacity:1;color:rgb(67 56 202/var(--tw-text-opacity,1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-orange-700{--tw-text-opacity:1;color:rgb(194 65 12/var(--tw-text-opacity,1))}.text-pink-700{--tw-text-opacity:1;color:rgb(190 24 93/var(--tw-text-opacity,1))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-sky-600{--tw-text-opacity:1;color:rgb(2 132 199/var(--tw-text-opacity,1))}.text-sky-700{--tw-text-opacity:1;color:rgb(3 105 161/var(--tw-text-opacity,1))}.text-sky-blue{--tw-text-opacity:1;color:rgb(14 46 101/var(--tw-text-opacity,1))}.text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.text-slate-950{--tw-text-opacity:1;color:rgb(2 6 23/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-yellow-700{--tw-text-opacity:1;color:rgb(161 98 7/var(--tw-text-opacity,1))}.text-yellow-800{--tw-text-opacity:1;color:rgb(133 77 14/var(--tw-text-opacity,1))}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-md,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.ring-offset-white{--tw-ring-offset-color:#fff}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-150,.transition-transform{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.duration-150{animation-duration:.15s}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.running{animation-play-state:running}.sortable{cursor:pointer;user-select:none}.sortable:hover{text-decoration:underline}.container{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin:20px}.chart{border:1px solid #ccc;padding:10px;border-radius:5px;background-color:#fff;box-shadow:0 2px 10px rgba(0,0,0,.1);max-height:400px;overflow:auto}.flip-card-container{display:flex;flex-wrap:wrap;gap:20px;justify-content:center}.flip-card-back,.flip-card-front{width:300px;height:350px;border:1px solid #ccc;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#fff;border-radius:10px;box-shadow:0 4px 8px rgba(0,0,0,.1)}.flip-card-back{padding:20px;text-align:center}.home-card{display:flex;flex-direction:column;justify-content:space-between;flex:1 1 0;height:100%}.home-cloud-card{background-color:#f0fff0}.chartContainer{width:200px;height:200px}.tableCellWidth{width:210px!important}.tableCellWidth-sm{width:10px!important}.items-center h3.text-xl.font-semibold.mb-4:first-of-type{font-size:0;margin-bottom:1rem}.items-center h3.text-xl.font-semibold.mb-4:first-of-type:after{content:"";font-size:1.25rem}.file\:border-0::file-selector-button{border-width:0}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.last\:border-b-0:last-child{border-bottom-width:0}.hover\:border-sky-400:hover{--tw-border-opacity:1;border-color:rgb(56 189 248/var(--tw-border-opacity,1))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive)/.9)}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.hover\:bg-gray-200:hover{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.hover\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted)/.5)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary)/.9)}.hover\:bg-red-50:hover{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary)/.8)}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-blue-600:hover{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.hover\:text-blue-700:hover{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.hover\:text-blue-800:hover{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.hover\:text-gray-700:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.hover\:text-gray-900:hover{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.hover\:text-green-700:hover{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.hover\:text-red-600:hover{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.hover\:text-red-700:hover{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.hover\:text-sky-blue-bright:hover{--tw-text-opacity:1;color:rgb(30 98 204/var(--tw-text-opacity,1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-0:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-0:focus,.focus\:ring-2:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-blue-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.focus\:ring-gray-400:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(156 163 175/var(--tw-ring-opacity,1))}.focus\:ring-red-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(239 68 68/var(--tw-ring-opacity,1))}.focus\:ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\:ring-offset-0:focus{--tw-ring-offset-width:0px}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px}.focus\:ring-offset-red-50:focus{--tw-ring-offset-color:#fef2f2}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:hsl(var(--ring))}.focus-visible\:ring-slate-400:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(148 163 184/var(--tw-ring-opacity,1))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-gray-300:disabled{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.disabled\:text-gray-500:disabled{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:hover\:bg-transparent:hover:disabled{background-color:transparent}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom],.data-\[side\=left\]\:-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.data-\[side\=right\]\:translate-x-1[data-side=right],.data-\[side\=top\]\:-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.data-\[state\=active\]\:bg-white[data-state=active]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.data-\[state\=open\]\:bg-gray-100[data-state=open]{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[state\=active\]\:text-slate-950[data-state=active]{--tw-text-opacity:1;color:rgb(2 6 23/var(--tw-text-opacity,1))}.data-\[state\=open\]\:text-gray-500[data-state=open]{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=active\]\:shadow-sm[data-state=active]{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:0.5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-0.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x:-50%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y:-48%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x:-50%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y:-48%}.dark\:bg-slate-800:is(.dark *){--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity,1))}.dark\:bg-slate-950:is(.dark *){--tw-bg-opacity:1;background-color:rgb(2 6 23/var(--tw-bg-opacity,1))}.dark\:text-slate-400:is(.dark *){--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.dark\:text-slate-50:is(.dark *){--tw-text-opacity:1;color:rgb(248 250 252/var(--tw-text-opacity,1))}.dark\:ring-offset-slate-950:is(.dark *){--tw-ring-offset-color:#020617}.dark\:focus-visible\:ring-slate-800:focus-visible:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(30 41 59/var(--tw-ring-opacity,1))}.dark\:data-\[state\=active\]\:bg-slate-950[data-state=active]:is(.dark *){--tw-bg-opacity:1;background-color:rgb(2 6 23/var(--tw-bg-opacity,1))}.dark\:data-\[state\=active\]\:text-slate-50[data-state=active]:is(.dark *){--tw-text-opacity:1;color:rgb(248 250 252/var(--tw-text-opacity,1))}@media (min-width:640px){.sm\:max-w-3xl{max-width:48rem}.sm\:max-w-md{max-width:28rem}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}}@media (min-width:768px){.md\:max-w-lg{max-width:32rem}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}}@media (min-width:1024px){.lg\:col-span-1{grid-column:span 1/span 1}.lg\:col-span-2{grid-column:span 2/span 2}.lg\:col-span-3{grid-column:span 3/span 3}.lg\:max-w-xl{max-width:36rem}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width:1280px){.xl\:max-w-2xl{max-width:42rem}}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0}.\[\&_tr\]\:border-b tr{border-bottom-width:1px}
@@ -1 +0,0 @@
1
- self.__BUILD_MANIFEST=function(s,c,e,a,t,r,n,u,f,i,b){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/":["static/chunks/pages/index-6b0d9e5031b70c58.js"],"/_error":["static/chunks/pages/_error-1be831200e60c5c0.js"],"/clusters":[s,t,r,c,e,a,n,f,"static/chunks/pages/clusters-f37ff20f0af29aae.js"],"/clusters/[cluster]":[s,t,r,c,e,a,n,u,f,"static/chunks/pages/clusters/[cluster]-25edb867a41b6b20.js"],"/clusters/[cluster]/[job]":[s,c,"static/chunks/pages/clusters/[cluster]/[job]-8f270e2c9c59fa1a.js"],"/config":[s,t,c,e,"static/chunks/pages/config-3c6a2dabf56e8cd6.js"],"/infra":[s,c,e,a,i,"static/chunks/pages/infra-7b4b8e7fa9fa0827.js"],"/infra/[context]":[s,c,e,a,i,"static/chunks/pages/infra/[context]-342bc15bb78ab2e5.js"],"/jobs":[s,r,c,e,a,n,u,"static/chunks/pages/jobs-78a6c5ba3e24c0cf.js"],"/jobs/[job]":[s,t,c,"static/chunks/pages/jobs/[job]-c0c1dff3cd463d9e.js"],"/users":[s,c,e,a,"static/chunks/pages/users-89f9212b81d8897e.js"],"/workspace/new":[s,t,r,c,e,a,n,u,b,"static/chunks/pages/workspace/new-198b6e00d7d724c5.js"],"/workspaces":[s,t,r,c,e,a,n,u,"static/chunks/pages/workspaces-17d41826537196e7.js"],"/workspaces/[name]":[s,t,r,c,e,a,n,u,b,"static/chunks/pages/workspaces/[name]-2ce792183b03c341.js"],sortedPages:["/","/_app","/_error","/clusters","/clusters/[cluster]","/clusters/[cluster]/[job]","/config","/infra","/infra/[context]","/jobs","/jobs/[job]","/users","/workspace/new","/workspaces","/workspaces/[name]"]}}("static/chunks/614-3d29f98e0634b179.js","static/chunks/470-9e7a479cc8303baa.js","static/chunks/293-351268365226d251.js","static/chunks/856-ab9627e7e8ac35e8.js","static/chunks/798-c0525dc3f21e488d.js","static/chunks/121-8f55ee3fa6301784.js","static/chunks/973-1a09cac61cfcc1e1.js","static/chunks/236-7458fda7b295f305.js","static/chunks/37-b638675d511d58b4.js","static/chunks/682-5c12535476a21ce3.js","static/chunks/843-786c36624d5ff61f.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
File without changes
File without changes