skypilot-nightly 1.0.0.dev20250527__py3-none-any.whl → 1.0.0.dev20250528__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. sky/__init__.py +2 -2
  2. sky/adaptors/kubernetes.py +13 -1
  3. sky/backends/cloud_vm_ray_backend.py +2 -2
  4. sky/check.py +4 -1
  5. sky/clouds/kubernetes.py +2 -2
  6. sky/dashboard/out/404.html +1 -1
  7. sky/dashboard/out/_next/static/Mx1iAbDQn1jMHh3UHmK3R/_buildManifest.js +1 -0
  8. sky/dashboard/out/_next/static/chunks/121-8f55ee3fa6301784.js +20 -0
  9. sky/dashboard/out/_next/static/chunks/{573-82bd40a37af834f1.js → 173-7db8607cefc20f70.js} +5 -5
  10. sky/dashboard/out/_next/static/chunks/236-d6900c828331f664.js +6 -0
  11. sky/dashboard/out/_next/static/chunks/293-351268365226d251.js +1 -0
  12. sky/dashboard/out/_next/static/chunks/470-4d003c441839094d.js +1 -0
  13. sky/dashboard/out/_next/static/chunks/578-9146658cead92981.js +6 -0
  14. sky/dashboard/out/_next/static/chunks/843-256ec920f6d5f41f.js +11 -0
  15. sky/dashboard/out/_next/static/chunks/856-62b87c68917b08ed.js +1 -0
  16. sky/dashboard/out/_next/static/chunks/973-1a09cac61cfcc1e1.js +1 -0
  17. sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/[job]-159bffb2fa34ed54.js +6 -0
  18. sky/dashboard/out/_next/static/chunks/pages/clusters/{[cluster]-e23fcddf60578a0d.js → [cluster]-9506c00257d10dbd.js} +1 -1
  19. sky/dashboard/out/_next/static/chunks/pages/{clusters-8afda8efa5b74997.js → clusters-943992b84fd6f4ee.js} +1 -1
  20. sky/dashboard/out/_next/static/chunks/pages/config-41738d1896fc02fe.js +6 -0
  21. sky/dashboard/out/_next/static/chunks/pages/infra-881fcd902fbbd0e5.js +6 -0
  22. sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-2c29e97a6aa50dd4.js +6 -0
  23. sky/dashboard/out/_next/static/chunks/pages/{jobs-ff7e8e377d02b651.js → jobs-a4efc09e61988f8d.js} +1 -1
  24. sky/dashboard/out/_next/static/chunks/pages/users-b2634885d67c49a6.js +6 -0
  25. sky/dashboard/out/_next/static/chunks/pages/workspace/{new-63763ffa3edb4508.js → new-579b3203c7c19d84.js} +1 -1
  26. sky/dashboard/out/_next/static/chunks/pages/workspaces/{[name]-3ede7a13caf23375.js → [name]-9388e38fac73ee8f.js} +1 -1
  27. sky/dashboard/out/_next/static/chunks/pages/workspaces-610c49ae3619ee85.js +1 -0
  28. sky/dashboard/out/_next/static/css/ffd1cd601648c303.css +3 -0
  29. sky/dashboard/out/clusters/[cluster]/[job].html +1 -1
  30. sky/dashboard/out/clusters/[cluster].html +1 -1
  31. sky/dashboard/out/clusters.html +1 -1
  32. sky/dashboard/out/config.html +1 -1
  33. sky/dashboard/out/index.html +1 -1
  34. sky/dashboard/out/infra.html +1 -1
  35. sky/dashboard/out/jobs/[job].html +1 -1
  36. sky/dashboard/out/jobs.html +1 -1
  37. sky/dashboard/out/users.html +1 -1
  38. sky/dashboard/out/workspace/new.html +1 -1
  39. sky/dashboard/out/workspaces/[name].html +1 -1
  40. sky/dashboard/out/workspaces.html +1 -1
  41. sky/global_user_state.py +181 -134
  42. sky/provision/kubernetes/utils.py +4 -4
  43. sky/server/server.py +6 -5
  44. sky/setup_files/dependencies.py +1 -0
  45. sky/skylet/constants.py +4 -0
  46. sky/utils/db_utils.py +34 -46
  47. sky/utils/subprocess_utils.py +2 -3
  48. {skypilot_nightly-1.0.0.dev20250527.dist-info → skypilot_nightly-1.0.0.dev20250528.dist-info}/METADATA +2 -1
  49. {skypilot_nightly-1.0.0.dev20250527.dist-info → skypilot_nightly-1.0.0.dev20250528.dist-info}/RECORD +55 -54
  50. sky/dashboard/out/_next/static/D5bjIfl4Ob3SV3LJz3CO0/_buildManifest.js +0 -1
  51. sky/dashboard/out/_next/static/chunks/236-e220ba0c35bf089e.js +0 -6
  52. sky/dashboard/out/_next/static/chunks/470-1d784f5c8750744a.js +0 -1
  53. sky/dashboard/out/_next/static/chunks/488-50d843fdb5396d32.js +0 -15
  54. sky/dashboard/out/_next/static/chunks/578-24f35aa98d38d638.js +0 -6
  55. sky/dashboard/out/_next/static/chunks/627-31b701e69f52db0c.js +0 -1
  56. sky/dashboard/out/_next/static/chunks/843-e35d71cf1c7f706e.js +0 -11
  57. sky/dashboard/out/_next/static/chunks/990-f85643b521f7ca65.js +0 -1
  58. sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/[job]-339b59921ccfe266.js +0 -1
  59. sky/dashboard/out/_next/static/chunks/pages/config-72b8c6c2edfd0e39.js +0 -6
  60. sky/dashboard/out/_next/static/chunks/pages/infra-1521baab6992916b.js +0 -1
  61. sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-4d913940b4fa6f5a.js +0 -1
  62. sky/dashboard/out/_next/static/chunks/pages/users-9900af52acf8648d.js +0 -1
  63. sky/dashboard/out/_next/static/chunks/pages/workspaces-72330c4d0fc9a4a2.js +0 -1
  64. sky/dashboard/out/_next/static/css/6a1c0d711a4bdaf1.css +0 -3
  65. /sky/dashboard/out/_next/static/{D5bjIfl4Ob3SV3LJz3CO0 → Mx1iAbDQn1jMHh3UHmK3R}/_ssgManifest.js +0 -0
  66. /sky/dashboard/out/_next/static/chunks/pages/{_app-3985f074c163a856.js → _app-a631df412d8172de.js} +0 -0
  67. {skypilot_nightly-1.0.0.dev20250527.dist-info → skypilot_nightly-1.0.0.dev20250528.dist-info}/WHEEL +0 -0
  68. {skypilot_nightly-1.0.0.dev20250527.dist-info → skypilot_nightly-1.0.0.dev20250528.dist-info}/entry_points.txt +0 -0
  69. {skypilot_nightly-1.0.0.dev20250527.dist-info → skypilot_nightly-1.0.0.dev20250528.dist-info}/licenses/LICENSE +0 -0
  70. {skypilot_nightly-1.0.0.dev20250527.dist-info → skypilot_nightly-1.0.0.dev20250528.dist-info}/top_level.txt +0 -0
@@ -1,14 +1,14 @@
1
- sky/__init__.py,sha256=2Q8nxP6Gmldp-lZvg6CZZMEyhdPNMEvYb7MPa1xvJs0,6428
1
+ sky/__init__.py,sha256=FFlXsYQu9dRHcNyAga16qo-oJ1-tGxDrDt8B9f8o6oQ,6428
2
2
  sky/admin_policy.py,sha256=hPo02f_A32gCqhUueF0QYy1fMSSKqRwYEg_9FxScN_s,3248
3
3
  sky/authentication.py,sha256=ND011K_-Ud1dVZF37A9KrwYir_ihJXcHc7iDWmuBc8Q,22872
4
- sky/check.py,sha256=wQ5ORtBpfAgX3WuHkj0d-rW0JlIMSagqi_FME3Yzap0,28361
4
+ sky/check.py,sha256=ENQ-NerQhMSUe_A9o79E3L4amhiiEeHQe7suasDuXwo,28593
5
5
  sky/cli.py,sha256=QqDm7Gxkqn7QyF79LgaP1kVOXyFVJ4sVpHI4qLq-lfo,243978
6
6
  sky/cloud_stores.py,sha256=Ln5GBpel-sEs7rVx7bBrMkfLwA_bctI05Rox2uoz7Lo,26388
7
7
  sky/core.py,sha256=aR9lIsZUkIMfM8HEAx186woTgxwCwuway6r46pi3XUM,52197
8
8
  sky/dag.py,sha256=8x-VMtjvSi0lYBemCMPLYq5ONljhoABjWzMKjmmdjSo,3369
9
9
  sky/exceptions.py,sha256=6TJ1MMw6Y9W94eig22xgun3rzvJCTh4yHNq3mGACX-U,17362
10
10
  sky/execution.py,sha256=YSzpSxoUqLlGZ5v-2pgCt9Jkkcwz12FovOeFs3lC3q8,33109
11
- sky/global_user_state.py,sha256=GE2Grs6nJpgOPRy2mrGepnRBYlh0baJnrpwoJ7eDvE4,40726
11
+ sky/global_user_state.py,sha256=0g4rb_TOddlMLklPSQH-POf66nhhCb1Ik5qL06Lifh0,41331
12
12
  sky/models.py,sha256=bGMSATMkSMr_Kp6SCoiJVVeebwSdZuzjw_jrJzVWAAc,1603
13
13
  sky/optimizer.py,sha256=24hkzaM1W_VRhVkhtWXmUhJDOX55WV9kEF1hAVW_tVg,61426
14
14
  sky/resources.py,sha256=QIUvDeEEcxxAMwl_MnLRP3Y6L0CBczNO4EoDhLcGR5A,92232
@@ -25,7 +25,7 @@ sky/adaptors/do.py,sha256=dJ0BYbkQoUWVu6_9Pxq3fOu6PngjZyyCQzgjnODXLCA,777
25
25
  sky/adaptors/docker.py,sha256=_kzpZ0fkWHqqQAVVl0llTsCE31KYz3Sjn8psTBQHVkA,468
26
26
  sky/adaptors/gcp.py,sha256=oEb9jClEtApw6PQnxdxDYxOCYsedvM3aiko1EW1FDVo,3501
27
27
  sky/adaptors/ibm.py,sha256=7YbHrWbYcZsJDgxMBNZr1yBI03mjs_C3pnCTCz-MNtQ,5068
28
- sky/adaptors/kubernetes.py,sha256=87etu8rXjlitr0QjfhZh-TVf3aJ6iDvKHaMkBj-GPfA,8835
28
+ sky/adaptors/kubernetes.py,sha256=za3TnGzsbnM4eUSCKaOsjApaDgbzAPwbmAV_wLHPf5k,9316
29
29
  sky/adaptors/nebius.py,sha256=5vshmw0kCX98Zb6fClx00BCuzF5lm-vL0CjxzUtZrLU,5897
30
30
  sky/adaptors/oci.py,sha256=xJt6J9xBSFIENa6FwEt1V1sZE8puAZ_vPEoGlyQACPs,2839
31
31
  sky/adaptors/runpod.py,sha256=4Nt_BfZhJAKQNA3wO8cxvvNI8x4NsDGHu_4EhRDlGYQ,225
@@ -34,7 +34,7 @@ sky/adaptors/vsphere.py,sha256=zJP9SeObEoLrpgHW2VHvZE48EhgVf8GfAEIwBeaDMfM,2129
34
34
  sky/backends/__init__.py,sha256=UDjwbUgpTRApbPJnNfR786GadUuwgRk3vsWoVu5RB_c,536
35
35
  sky/backends/backend.py,sha256=o47WUnB_h2nd_SkV0q0NTJ4vCwk23-KH5DgAm_JpKgE,7739
36
36
  sky/backends/backend_utils.py,sha256=-KMX7enVxTBUY_PN5EIHh3L0kPWpBr-sXWdYRy23Gc4,139005
37
- sky/backends/cloud_vm_ray_backend.py,sha256=IkOEbBFViSg3cwsVhmUoibNCe94wJcxJxSuSDYimPns,256785
37
+ sky/backends/cloud_vm_ray_backend.py,sha256=4IE8eCtXPkvsyQEPyL2sAPrkk3v_YlQawT6txKmYHT0,256785
38
38
  sky/backends/docker_utils.py,sha256=Hyw1YY20EyghhEbYx6O2FIMDcGkNzBzV9TM7LFynei8,8358
39
39
  sky/backends/local_docker_backend.py,sha256=r80BGJZmAH8F49v6Y_pG3_pHmW5LQEQRusLkKoYoe9Q,17047
40
40
  sky/backends/wheel_utils.py,sha256=IUruJijm5854UGDdSayHbHzjjWRM46bATK1nSnK44xY,11071
@@ -55,7 +55,7 @@ sky/clouds/do.py,sha256=JOhNAb4WTI8Zv6NGuJQcmAqJ-0aQC3XF4ehmp94Wu_E,11839
55
55
  sky/clouds/fluidstack.py,sha256=YZevkDLWR8dwXJFAC89JqzEnISmlA_8_rjIK_qVwGu8,12918
56
56
  sky/clouds/gcp.py,sha256=WFD5afjCrQyh63w6U2pATrsEIYpSg-aEUEU4sEflkbo,67369
57
57
  sky/clouds/ibm.py,sha256=9_7EGmCtYznJSvAC5reKAwTtb-ZRmhHZSrUKHF9CVBg,22352
58
- sky/clouds/kubernetes.py,sha256=HkPy9QNAFhef8nGLI8RZ1LLRcJh_MLIBUVVA6HYqTfw,39963
58
+ sky/clouds/kubernetes.py,sha256=uIBtKyGEVNybsuCTDQWTrpX8HkbFgi7jd5eJxkQYD_Q,39963
59
59
  sky/clouds/lambda_cloud.py,sha256=TAmc7K_YIg5Ixbftby0YqjNmA-4dWd__C78USa0_DbU,13037
60
60
  sky/clouds/nebius.py,sha256=biz0o9qwJuGG22V6KE3kYqen-v2XKf2nT8qlAWG1QdA,16210
61
61
  sky/clouds/oci.py,sha256=w86FhaVW30Kx0BVeFweTMThWmYAWG65vgdcqqJXGjy8,28011
@@ -103,28 +103,29 @@ sky/clouds/utils/azure_utils.py,sha256=NToRBnhEyuUvb-nBnsKTxjhOBRkMcrelL8LK4w6s4
103
103
  sky/clouds/utils/gcp_utils.py,sha256=YtuS4EoAMvcRnGPgE_WLENPOPWIdvhp7dLceTw_zfas,7114
104
104
  sky/clouds/utils/oci_utils.py,sha256=0YxhgZdeIHQUI1AZ86YuswsZg5HdVCIVfSTRJsSHYI0,6396
105
105
  sky/clouds/utils/scp_utils.py,sha256=MqawUhhFHHxVnn29nOI4gJ_nF665ich4Po7bsy1afsA,15948
106
- sky/dashboard/out/404.html,sha256=V68d95mrk488_BvwXBO9Hcwe1zFvymBsVWvL3mOAGkc,2296
107
- sky/dashboard/out/clusters.html,sha256=f6wdX6wY-dn_mcRjhocoI9Fu6KPX2P0486BH3blF8NY,13699
108
- sky/dashboard/out/config.html,sha256=aIpbvMOJ8FCtUwIvgZUdR9Dn3w0QDg9Czh1BnajUnWA,14748
106
+ sky/dashboard/out/404.html,sha256=N_mMy_ZaXYda0XdhNKm_Jzw_RltPhiaL_N0204Unpoc,2296
107
+ sky/dashboard/out/clusters.html,sha256=m-CUaAilCpRV2NZm1uD3agsD5njES2sLBBBRB8gNPmI,14554
108
+ sky/dashboard/out/config.html,sha256=IpjJPZlqgo5l2HI1ELBiG0C0Zcri2127NG9Se0gUc8c,15147
109
109
  sky/dashboard/out/favicon.ico,sha256=XilUZZglAl_1zRsg85QsbQgmQAzGPQjcUIJ-A3AzYn8,93590
110
- sky/dashboard/out/index.html,sha256=K1OwmkzoZc7j3OZeSvzWlGhopuQaolxhrNaKe4ItLqA,1407
111
- sky/dashboard/out/infra.html,sha256=uMn0V9xX5-dPmmR__iKG2iZID9xUW30dWvLmk2vcthE,18682
112
- sky/dashboard/out/jobs.html,sha256=FpcpFXlU5Cy7yl2at3Zxe2r08-i8X3afhnEsCbcq1Kk,14794
110
+ sky/dashboard/out/index.html,sha256=dOW45HqSez3EGIAXiWGsk1Yv2koaxzfk0jdCDwATils,1407
111
+ sky/dashboard/out/infra.html,sha256=QyW6SoaitwaCM3ayPGq4Y2gBBsX0vRiZK8exRq--FUg,19909
112
+ sky/dashboard/out/jobs.html,sha256=yWY5BEZ9bmufZ83kGk9zGU-wS5TFOO7x7zOkSJ8EpiY,15648
113
113
  sky/dashboard/out/skypilot.svg,sha256=c0iRtlfLlaUm2p0rG9NFmo5FN0Qhf3pq5Xph-AeMPJw,5064
114
- sky/dashboard/out/users.html,sha256=0E86UL0DZpFu2da-WgRxOewk1bxPYkVFIP6TucLaXPY,12366
115
- sky/dashboard/out/workspaces.html,sha256=5OpaUDK6idvj3E2Ijt6thXg_FLvuJmO2mgqJH9ayCCE,11988
116
- sky/dashboard/out/_next/static/D5bjIfl4Ob3SV3LJz3CO0/_buildManifest.js,sha256=yI7W3vfqslz5x0jDeE6K79vUsnexBL8QrZ5c6WIpLws,1784
117
- sky/dashboard/out/_next/static/D5bjIfl4Ob3SV3LJz3CO0/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
118
- sky/dashboard/out/_next/static/chunks/236-e220ba0c35bf089e.js,sha256=vsdDnqqwo2LOwFqsNpqJRPvT01n4Vzd2wQXpQTa_U-U,28514
114
+ sky/dashboard/out/users.html,sha256=1GURLSvN3anlpbezm1Fn6zU5IS_AKZkHgAFXd18XLak,13306
115
+ sky/dashboard/out/workspaces.html,sha256=9fqs3d_sq2qV5qiVp-W8007dW9k-V53CJp4quqfAa5s,13128
116
+ sky/dashboard/out/_next/static/Mx1iAbDQn1jMHh3UHmK3R/_buildManifest.js,sha256=qqfVQrDdCylDjmuGUu4ZtVP-DvU2d3hNSfisCaORRe0,1846
117
+ sky/dashboard/out/_next/static/Mx1iAbDQn1jMHh3UHmK3R/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
118
+ sky/dashboard/out/_next/static/chunks/121-8f55ee3fa6301784.js,sha256=RIwzzRiPiEGM8PV-7Wesb3CkChfz9cgvLseMyKfD_MY,9292
119
+ sky/dashboard/out/_next/static/chunks/173-7db8607cefc20f70.js,sha256=eB4k1aLBieIGFo-LiDz4KSvRfzVGLUo5B6619eZDpKc,284517
120
+ sky/dashboard/out/_next/static/chunks/236-d6900c828331f664.js,sha256=PDHh9ZoGntvoSZrw3QOlTmNipCgeBQbQaLni0lZnk-U,23673
121
+ sky/dashboard/out/_next/static/chunks/293-351268365226d251.js,sha256=kIKGZcJd0zyOkyYylqy_sRcpCMk2bjzq5A_6-Hrt0b8,12465
119
122
  sky/dashboard/out/_next/static/chunks/320-afea3ddcc5bd1c6c.js,sha256=TfRRqBkCCzHk0Hb8DUzYDRIt9ekDN9ZRdiYlDWAIiiQ,62726
120
- sky/dashboard/out/_next/static/chunks/470-1d784f5c8750744a.js,sha256=29XeaPd2hX0_FPbSuDDLLGsd9VrHORLAK-L11rJSA9Q,21474
121
- sky/dashboard/out/_next/static/chunks/488-50d843fdb5396d32.js,sha256=0ECQ8dqh-FzJ-NQZ-JV6KsCZqfsenPoxacGpWQlOIzI,8916
122
- sky/dashboard/out/_next/static/chunks/573-82bd40a37af834f1.js,sha256=p1Ce-Z3KwtCegMin6sGzif0oVLCT6uzvnfYhOs30tgg,283993
123
- sky/dashboard/out/_next/static/chunks/578-24f35aa98d38d638.js,sha256=sLLMKRpah8ozOKKARGCiha7eBzOiqGUJWATTZnE7ixA,10039
124
- sky/dashboard/out/_next/static/chunks/627-31b701e69f52db0c.js,sha256=VoJFK0aaz9rjob7k7uyGA3IwSrgj9smpHG8ix-SLNx4,15862
125
- sky/dashboard/out/_next/static/chunks/843-e35d71cf1c7f706e.js,sha256=_bSBgH6ze_YD5snPuV-GK1sxOpN6807TBPgI38NAhY8,15610
123
+ sky/dashboard/out/_next/static/chunks/470-4d003c441839094d.js,sha256=9pWbenfMEX_WfceKxPD5sfdzwackdYUIdNKnyiHzoPw,22281
124
+ sky/dashboard/out/_next/static/chunks/578-9146658cead92981.js,sha256=4oCNy2OJVJbQJGnwwSQhniyuaOnx8--bK56ZqDUxypQ,10169
125
+ sky/dashboard/out/_next/static/chunks/843-256ec920f6d5f41f.js,sha256=v0hr9xIP0ayaBw1drG0Q_Z2Fa2PoNALKjVjGEc9lddc,15631
126
+ sky/dashboard/out/_next/static/chunks/856-62b87c68917b08ed.js,sha256=tNX0qwyMm2xVCQ5FgdPOJMZSfKluFqrJYwaYY1mglXY,23176
126
127
  sky/dashboard/out/_next/static/chunks/937.f97f83652028e944.js,sha256=3G2YlQgxD17Z7GeznWGDwYSKEB8W4FZFfLKEXmtBiWE,54452
127
- sky/dashboard/out/_next/static/chunks/990-f85643b521f7ca65.js,sha256=Jua91QPgAenefuXpvqjPXVPoIjOMSvFALdI9FNON1bg,15358
128
+ sky/dashboard/out/_next/static/chunks/973-1a09cac61cfcc1e1.js,sha256=QoNq70edEqfx5pik8iQhhFhU71DxhfND_wu3mLnEnmw,13476
128
129
  sky/dashboard/out/_next/static/chunks/9f96d65d-5a3e4af68c26849e.js,sha256=wJGR2e5odhfpiO3-Y0iIQVUJ5rBhfM_9tSb5CIDHcaE,134395
129
130
  sky/dashboard/out/_next/static/chunks/fd9d1056-2821b0f0cabcd8bd.js,sha256=ce2WOATL1LdzsWouKQ-1NCiBQJmcykgzqP8wCp1yqbE,172831
130
131
  sky/dashboard/out/_next/static/chunks/framework-87d061ee6ed71b28.js,sha256=dh6TKdXcSRoGP4HqHe2uwzWCZBPz16dyTWufLsxeRvM,140942
@@ -132,27 +133,27 @@ sky/dashboard/out/_next/static/chunks/main-app-241eb28595532291.js,sha256=P0_tU7
132
133
  sky/dashboard/out/_next/static/chunks/main-e0e2335212e72357.js,sha256=BxTmVbZDnMUQvQd57MEl1Ui0VZaNmwLOviY7h_xMjP0,109884
133
134
  sky/dashboard/out/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js,sha256=6QPOwdWeAVe8x-SsiDrm-Ga6u2DkqgG5SFqglrlyIgA,91381
134
135
  sky/dashboard/out/_next/static/chunks/webpack-deda68c926e8d0bc.js,sha256=e2NBwO2sLf3MuwMPPaYQ5bWK1OwP5mbuzaaLkDLCJJ4,3620
135
- sky/dashboard/out/_next/static/chunks/pages/_app-3985f074c163a856.js,sha256=lqFYBo3gcDUyNT-vVEqyoXJkFmFKu6i4wvssOQiqQhE,2097
136
+ sky/dashboard/out/_next/static/chunks/pages/_app-a631df412d8172de.js,sha256=lqFYBo3gcDUyNT-vVEqyoXJkFmFKu6i4wvssOQiqQhE,2097
136
137
  sky/dashboard/out/_next/static/chunks/pages/_error-1be831200e60c5c0.js,sha256=TZqrus06KKPx-CMABDMPKF7w-NQ5s2gwJAM8Huyl7qU,247
137
- sky/dashboard/out/_next/static/chunks/pages/clusters-8afda8efa5b74997.js,sha256=ZAM68LQWisqekLlWJrBiq0mSr1OG7kLFH3zMaNF6bVU,571
138
- sky/dashboard/out/_next/static/chunks/pages/config-72b8c6c2edfd0e39.js,sha256=WI8MzIxavCN-YfXDYafGzzyNXQccrcxnwOnXPivnzr8,7755
138
+ sky/dashboard/out/_next/static/chunks/pages/clusters-943992b84fd6f4ee.js,sha256=OGDlScOO6R0_7coQ7QgON-naAGvoN4qvfJT5F7JYrtU,575
139
+ sky/dashboard/out/_next/static/chunks/pages/config-41738d1896fc02fe.js,sha256=TvEEpWPXL-QU7A40Lf9vQBqh8IuetPPr8wCB1JoB9Pw,10561
139
140
  sky/dashboard/out/_next/static/chunks/pages/index-6b0d9e5031b70c58.js,sha256=Fp2FKnKQtORK_5O7MEQ08tlTk7ewMLuecw_EY5g4Dlg,513
140
- sky/dashboard/out/_next/static/chunks/pages/infra-1521baab6992916b.js,sha256=Y1_vlaMvPC4kUjbMRTxvzBkkCyfOvKKKa7JhJiRm_c4,31568
141
- sky/dashboard/out/_next/static/chunks/pages/jobs-ff7e8e377d02b651.js,sha256=OqDkDzrKfGux3FeLY4ETOnIauKRKfGeqbGz3QcXEibg,599
142
- sky/dashboard/out/_next/static/chunks/pages/users-9900af52acf8648d.js,sha256=J7tnKrY9fOQR3HooXrJzemOyYJzdVnkQURHXNHzd23U,21068
143
- sky/dashboard/out/_next/static/chunks/pages/workspaces-72330c4d0fc9a4a2.js,sha256=sGCcdbg-rgy2F1sHH7bbr8xvU6V_-MpIxrDDLffs7Zc,11785
144
- sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]-e23fcddf60578a0d.js,sha256=IS9tMiK0t229eTdUFRC6ZiniFzopsxsv4AHL4gaGQtY,4856
145
- sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/[job]-339b59921ccfe266.js,sha256=AEOuCtQ1DcQvb2gXkxfFNLwyAAx1zUt-h1f8iWxFhkY,15066
146
- sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-4d913940b4fa6f5a.js,sha256=7JL-Jb4_fe_9TFHRqEd1GhTwZdXAG9_CvaHsmVk7TcI,19700
147
- sky/dashboard/out/_next/static/chunks/pages/workspace/new-63763ffa3edb4508.js,sha256=MtzpGAcJaH3yVCaHXt1sVonlUfr6NUW6T6C79n_BXgY,3542
148
- sky/dashboard/out/_next/static/chunks/pages/workspaces/[name]-3ede7a13caf23375.js,sha256=nvL7JKpCpmPutsmQZKrWk8COmnBHOfpIYEjlE5UROzk,569
149
- sky/dashboard/out/_next/static/css/6a1c0d711a4bdaf1.css,sha256=-jC8V2D_hwvzsrBOV0cVqBDrwsbpkjc9MCn-sajGYGo,37971
150
- sky/dashboard/out/clusters/[cluster].html,sha256=30XS0xYA1AVkcchScFKhk4falx5dljMwrCtbp7i8E10,2072
151
- sky/dashboard/out/clusters/[cluster]/[job].html,sha256=w3GqPzH5Z9DPfAZyPtnF6NglvUCGy7FrRWBf26bGhdU,1653
152
- sky/dashboard/out/jobs/[job].html,sha256=smkOQwJ5iZK0c_bLFtyQyubra34hJT1LWBvv7DLxZog,1621
141
+ sky/dashboard/out/_next/static/chunks/pages/infra-881fcd902fbbd0e5.js,sha256=4O2zhkiZ5lmtne38KW45W88mvRswJSyc9GpwdEor2E0,17371
142
+ sky/dashboard/out/_next/static/chunks/pages/jobs-a4efc09e61988f8d.js,sha256=YsLWwwgrQke4KyYfLxKDttC5-JUHKrhrorwr_2hphV8,603
143
+ sky/dashboard/out/_next/static/chunks/pages/users-b2634885d67c49a6.js,sha256=rBIuOujFfFn5nznvB-CgsZvOoFDw2NFPR-uwO7QSTwc,10912
144
+ sky/dashboard/out/_next/static/chunks/pages/workspaces-610c49ae3619ee85.js,sha256=9Gmr2cE9-Mrhc_dVbetBKszoOC1CqtM4bjux0om_Q7E,12188
145
+ sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]-9506c00257d10dbd.js,sha256=7PWOxAh5pcx6HUdOOlkRpPSQHfKzmNUdKBiMYLmBKi0,4860
146
+ sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/[job]-159bffb2fa34ed54.js,sha256=6nXL2C-VEOBQC6jRqUy8mznS7drzuePOJaYqA8S815k,15480
147
+ sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-2c29e97a6aa50dd4.js,sha256=qk1hUEBJWomxgf6rchFD6LBvp_RkmxMUZ9uIxjeONCE,20117
148
+ sky/dashboard/out/_next/static/chunks/pages/workspace/new-579b3203c7c19d84.js,sha256=OPFOPb048yhMxq9ltjC-NcZ_xaDRLIWH0jv1JG2MbBA,3546
149
+ sky/dashboard/out/_next/static/chunks/pages/workspaces/[name]-9388e38fac73ee8f.js,sha256=WSoOBat7o9pZ1LwQRsaBXRvKlaeatYmDf2yO7OQqtKo,573
150
+ sky/dashboard/out/_next/static/css/ffd1cd601648c303.css,sha256=uu8ORNMhCFOYRwCTsKdG5SqMfYo5pypZkfo4yVpUMcs,37714
151
+ sky/dashboard/out/clusters/[cluster].html,sha256=TNCuxJnzp3cSwVseAQo9lqE-nu76G_ELNr0C4fntKCE,2159
152
+ sky/dashboard/out/clusters/[cluster]/[job].html,sha256=s7Tzqa4DkgiydFk416NwEn1h-O3A4BkdmfitOax7aOg,1653
153
+ sky/dashboard/out/jobs/[job].html,sha256=Am9pCa4gzX0Hd4VyYP-_aNEI6w218bhGTyiMoFsMWHk,1621
153
154
  sky/dashboard/out/videos/cursor-small.mp4,sha256=8tRdp1vjawOrXUar1cfjOc-nkaKmcwCPZx_LO0XlCvQ,203285
154
- sky/dashboard/out/workspace/new.html,sha256=ltTqf7A_TxiUvH7mtrVEcuzpc9BudNqLW9T9TSFUGVw,11759
155
- sky/dashboard/out/workspaces/[name].html,sha256=rE6yeG5GuWmhVqiH4KnHSFthLbjUjdafGB7Kq1Dxkwc,2249
155
+ sky/dashboard/out/workspace/new.html,sha256=fWA_Z-4WkYGA0-3PTmLLlx2lkydqLqUhnwGA4jAWfTw,12899
156
+ sky/dashboard/out/workspaces/[name].html,sha256=YYphhIsml0bPPgRbTKsKsRFqsCO60QEhGfzwJQolAJA,2336
156
157
  sky/data/__init__.py,sha256=Nhaf1NURisXpZuwWANa2IuCyppIuc720FRwqSE2oEwY,184
157
158
  sky/data/data_transfer.py,sha256=N8b0CQebDuHieXjvEVwlYmK6DbQxUGG1RQJEyTbh3dU,12040
158
159
  sky/data/data_utils.py,sha256=CNYPM963qby5ddW0DZNbhiWXkqgB9MHh_jrC5DoBctM,33437
@@ -219,7 +220,7 @@ sky/provision/kubernetes/constants.py,sha256=dZCUV8FOO9Gct80sdqeubKnxeW3CGl-u5mx
219
220
  sky/provision/kubernetes/instance.py,sha256=c-Cp2Y7ix8utxTJ3QyityZ0Ay8yX7wZxTBF1G3jeWIs,59525
220
221
  sky/provision/kubernetes/network.py,sha256=PEy7lZvmoysmormB49JW245tRcy4owAXzDGV5KHVPEI,12672
221
222
  sky/provision/kubernetes/network_utils.py,sha256=6uck1aBkgtm-gGBitU3_hEUp8j14ZuG_4Xo70ReZYXs,11654
222
- sky/provision/kubernetes/utils.py,sha256=wkM4e-MkzNLMJUp9vOP3nn3A-GPNFkvMpQE_wVO3v_U,132342
223
+ sky/provision/kubernetes/utils.py,sha256=r9qaMVJDcod_oGDUagYN9u5oY5b4KJAp_S46lUKdIeM,132342
223
224
  sky/provision/kubernetes/manifests/fusermount-server-daemonset.yaml,sha256=S87GNAbDqgTrLuxF-afPAqQ0V-i41El4s_9KBZMuaag,1331
224
225
  sky/provision/lambda_cloud/__init__.py,sha256=6EEvSgtUeEiup9ivIFevHmgv0GqleroO2X0K7TRa2nE,612
225
226
  sky/provision/lambda_cloud/config.py,sha256=jq1iLzp4Up61r4JGxvtpVbJlgXnea3LHYQhCQyyl7ik,272
@@ -286,7 +287,7 @@ sky/server/__init__.py,sha256=MPPBqFzXz6Jv5QSk6td_IcvnfXfNErDZVcizu4MLRow,27
286
287
  sky/server/common.py,sha256=JGkAkj1oexseiDRB0F5IvlhFZpmavHrX0Ovdf0rqjtU,30759
287
288
  sky/server/config.py,sha256=XWf5Kw4am6vMO5wcyWevbQAFH-dmKb7AMEgDzD083-M,8538
288
289
  sky/server/constants.py,sha256=hkDwRo3K6xx9TRb7i8zdZMUEue1oP6G6I0B-p9kprbY,1193
289
- sky/server/server.py,sha256=n5P-Jb_UUJfSgWMLOn52W_Dl1WMLYQIPEb1hZ9eS_Ac,54403
290
+ sky/server/server.py,sha256=QBApkqBs4Yz3oUsfbTc4n-IkxH2TNVo4cBUH4Lqs9RE,54501
290
291
  sky/server/stream_utils.py,sha256=4JMHgtoXPpCT8JwtqyUcDQ9IdZFir9om0JaCRr8rvbQ,5849
291
292
  sky/server/uvicorn.py,sha256=4bTlvqQiykYDEIfV6Ta9KXWKZUtSfIrhDeT1F9yQuvs,3323
292
293
  sky/server/html/log.html,sha256=TSGZktua9Ysl_ysg3w60rjxAxhH61AJnsYDHdtqrjmI,6929
@@ -305,14 +306,14 @@ sky/server/requests/serializers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm
305
306
  sky/server/requests/serializers/decoders.py,sha256=ULHekYJQeFVIFSQ7l30RKB2eJyR-9Z8SdqXjKFvwZ88,6376
306
307
  sky/server/requests/serializers/encoders.py,sha256=4bQV5yTg8RTPT_HkRyQpjaBY_uUvBJ4NH189W0-6Pi0,5578
307
308
  sky/setup_files/MANIFEST.in,sha256=xhxaTVBu63MiTRV52AIlHp6qrg0i301PDIvH0lRw4E0,619
308
- sky/setup_files/dependencies.py,sha256=ly4srNSgqjB9VLxZeu8h6fy_hx99nq7Vd2y0ke7rZhw,6441
309
+ sky/setup_files/dependencies.py,sha256=9FZhSWra_7ybTPblRNdempSRp2UCPOrFa9VeMspSbiI,6464
309
310
  sky/setup_files/setup.py,sha256=GTXvAi65S4_TSLhQ1GzkmaWf_yzciHiaxMbZumcTtKU,7522
310
311
  sky/skylet/LICENSE,sha256=BnFrJSvUFpMUoH5mOpWnEvaC5R6Uux8W6WXgrte8iYg,12381
311
312
  sky/skylet/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
312
313
  sky/skylet/attempt_skylet.py,sha256=GZ6ITjjA0m-da3IxXXfoHR6n4pjp3X3TOXUqVvSrV0k,2136
313
314
  sky/skylet/autostop_lib.py,sha256=kGUnHm-jpF4zl3UJfB-4pnoldWpnVeR96WwYGSw7em0,4630
314
315
  sky/skylet/configs.py,sha256=UtnpmEL0F9hH6PSjhsps7xgjGZ6qzPOfW1p2yj9tSng,1887
315
- sky/skylet/constants.py,sha256=tOCkk8USZSbVr3EPHNxsgJsKu1T4ZkaWiTl4TlSNl_o,20534
316
+ sky/skylet/constants.py,sha256=gWAxJlawJTmh__gHxzIS_iW7TM7cowzsVsAJYisZT-o,20695
316
317
  sky/skylet/events.py,sha256=pnV3ZiwWhXqTHpU5B5Y9Xwam_7FQDI6IrxgSx7X_NVA,12743
317
318
  sky/skylet/job_lib.py,sha256=LInoIK4M37ZPSb5c7u5d8h990B68O2imiayDIH4wEaA,44473
318
319
  sky/skylet/log_lib.py,sha256=9nLOhevnM668itQyVyPSoQHKfZ2MWm_FwXPxK28X0oM,23201
@@ -380,7 +381,7 @@ sky/utils/context_utils.py,sha256=cby-QPmnGObjIE4K7eZ_dkWZdUo7YJUmnJr5oKf_v54,67
380
381
  sky/utils/control_master_utils.py,sha256=iD4M0onjYOdZ2RuxjwMBl4KhafHXJzuHjvqlBUnu-VE,1450
381
382
  sky/utils/controller_utils.py,sha256=65cA--9V32HTcNS-gaXZRcLswafS7DlMZ9qSbdTLkF8,53396
382
383
  sky/utils/dag_utils.py,sha256=FjxMaAT6ia4ndVg-ogXgiekLGD1GiPCAdK_c-cjIeuY,7607
383
- sky/utils/db_utils.py,sha256=WKQvqU-Hw-Htzw4Gxm9IoT-9JMiMtV9pC3uPPXw8ztQ,5580
384
+ sky/utils/db_utils.py,sha256=MlJN4dVUEcMkLMn5rYi1F-WnD9ap2oOoF9lDiqlL0h4,5243
384
385
  sky/utils/env_options.py,sha256=aaD6GoYK0LaZIqjOEZ-R7eccQuiRriW3EuLWtOI5En8,1578
385
386
  sky/utils/infra_utils.py,sha256=CFDCxFJ0kGc5YkGcuwbPSK_AKxGFRUXMTjbeLUrRf8I,6961
386
387
  sky/utils/kubernetes_enums.py,sha256=imGqHSa8O07zD_6xH1SDMM7dBU5lF5fzFFlQuQy00QM,1384
@@ -392,7 +393,7 @@ sky/utils/rich_console_utils.py,sha256=wPvAlshaFHuMZSjiDnaK3OSBppZLBjAn-lj7AvxNB
392
393
  sky/utils/rich_utils.py,sha256=ZTXdFJp--4CJDt2ANQz0VICLPc2V7llgA6LelHdG9Mw,14188
393
394
  sky/utils/schemas.py,sha256=G9siG8W48YrdJUbmxQOa7vp6b31B_l7HU97bMBVHQog,42073
394
395
  sky/utils/status_lib.py,sha256=zn_MSuRYQdNKF8pnFOGQ54X_s_R7dyqWS6Q3a9zENw8,1512
395
- sky/utils/subprocess_utils.py,sha256=NmW22zGe9iXDXQ7XfsP4i5fve8Jq9KKiUwD7qUmw44k,16069
396
+ sky/utils/subprocess_utils.py,sha256=3euz4h7B-tHulmjhQUkY9oWUA0Np5hlL8kHdTHHZOs0,16060
396
397
  sky/utils/timeline.py,sha256=ob6s3bc7nwAuSI76yLKBrSR5bzOHnOhbozz1avwoet4,4070
397
398
  sky/utils/ux_utils.py,sha256=FChNkVnTX3vKsu4_kXt7eaf2jNSoTfwH4XLMBtGK0t4,10233
398
399
  sky/utils/validator.py,sha256=yo5cPUjGxqfa0ZxGyEYZMCWZ8O35G-k3VOEAtAoA_3w,856
@@ -419,9 +420,9 @@ sky/utils/kubernetes/ssh_jump_lifecycle_manager.py,sha256=Kq1MDygF2IxFmu9FXpCxqu
419
420
  sky/workspaces/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
420
421
  sky/workspaces/core.py,sha256=YtmfIwq26MBQqI9eKdgiVpCq-5b-c8SHURJzjYsK-0k,16813
421
422
  sky/workspaces/server.py,sha256=A3jt9RSzRXTYWpmVQNW0b4-QrgfLq3eiHcRA0tutZhw,2893
422
- skypilot_nightly-1.0.0.dev20250527.dist-info/licenses/LICENSE,sha256=emRJAvE7ngL6x0RhQvlns5wJzGI3NEQ_WMjNmd9TZc4,12170
423
- skypilot_nightly-1.0.0.dev20250527.dist-info/METADATA,sha256=3mAu8IYtfwsyoEO3Mmb0ocylO417TCz0J-P6JNsUJ28,18233
424
- skypilot_nightly-1.0.0.dev20250527.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
425
- skypilot_nightly-1.0.0.dev20250527.dist-info/entry_points.txt,sha256=StA6HYpuHj-Y61L2Ze-hK2IcLWgLZcML5gJu8cs6nU4,36
426
- skypilot_nightly-1.0.0.dev20250527.dist-info/top_level.txt,sha256=qA8QuiNNb6Y1OF-pCUtPEr6sLEwy2xJX06Bd_CrtrHY,4
427
- skypilot_nightly-1.0.0.dev20250527.dist-info/RECORD,,
423
+ skypilot_nightly-1.0.0.dev20250528.dist-info/licenses/LICENSE,sha256=emRJAvE7ngL6x0RhQvlns5wJzGI3NEQ_WMjNmd9TZc4,12170
424
+ skypilot_nightly-1.0.0.dev20250528.dist-info/METADATA,sha256=pDYIraSJeVAgx22bra4WzNlO5OZnO3VSICVvXj6deWA,18264
425
+ skypilot_nightly-1.0.0.dev20250528.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
426
+ skypilot_nightly-1.0.0.dev20250528.dist-info/entry_points.txt,sha256=StA6HYpuHj-Y61L2Ze-hK2IcLWgLZcML5gJu8cs6nU4,36
427
+ skypilot_nightly-1.0.0.dev20250528.dist-info/top_level.txt,sha256=qA8QuiNNb6Y1OF-pCUtPEr6sLEwy2xJX06Bd_CrtrHY,4
428
+ skypilot_nightly-1.0.0.dev20250528.dist-info/RECORD,,
@@ -1 +0,0 @@
1
- self.__BUILD_MANIFEST=function(s,c,e,a,t,r,f,u,n,j){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/":["static/chunks/pages/index-6b0d9e5031b70c58.js"],"/_error":["static/chunks/pages/_error-1be831200e60c5c0.js"],"/clusters":[s,a,c,e,t,n,"static/chunks/pages/clusters-8afda8efa5b74997.js"],"/clusters/[cluster]":[s,a,c,e,t,r,n,"static/chunks/pages/clusters/[cluster]-e23fcddf60578a0d.js"],"/clusters/[cluster]/[job]":[s,c,"static/chunks/pages/clusters/[cluster]/[job]-339b59921ccfe266.js"],"/config":[f,s,u,c,e,"static/chunks/pages/config-72b8c6c2edfd0e39.js"],"/infra":[s,c,"static/chunks/pages/infra-1521baab6992916b.js"],"/jobs":[s,a,c,e,t,r,"static/chunks/pages/jobs-ff7e8e377d02b651.js"],"/jobs/[job]":[s,c,"static/chunks/pages/jobs/[job]-4d913940b4fa6f5a.js"],"/users":[s,c,"static/chunks/pages/users-9900af52acf8648d.js"],"/workspace/new":[f,s,a,u,c,e,t,r,j,"static/chunks/pages/workspace/new-63763ffa3edb4508.js"],"/workspaces":[f,s,a,u,c,e,t,r,"static/chunks/pages/workspaces-72330c4d0fc9a4a2.js"],"/workspaces/[name]":[f,s,a,u,c,e,t,r,j,"static/chunks/pages/workspaces/[name]-3ede7a13caf23375.js"],sortedPages:["/","/_app","/_error","/clusters","/clusters/[cluster]","/clusters/[cluster]/[job]","/config","/infra","/jobs","/jobs/[job]","/users","/workspace/new","/workspaces","/workspaces/[name]"]}}("static/chunks/573-82bd40a37af834f1.js","static/chunks/470-1d784f5c8750744a.js","static/chunks/990-f85643b521f7ca65.js","static/chunks/488-50d843fdb5396d32.js","static/chunks/627-31b701e69f52db0c.js","static/chunks/236-e220ba0c35bf089e.js","static/chunks/9f96d65d-5a3e4af68c26849e.js","static/chunks/320-afea3ddcc5bd1c6c.js","static/chunks/578-24f35aa98d38d638.js","static/chunks/843-e35d71cf1c7f706e.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
@@ -1,6 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[236],{8236:function(e,s,t){t.d(s,{L4:function(){return D},Nk:function(){return R},x2:function(){return S}});var r=t(5893),n=t(7294),a=t(1163),l=t(1664),c=t.n(l),i=t(8799),o=t(803),d=t(7673),h=t(8764),u=t(6989),x=t(8969),m=t(3266),p=t(7324),j=t(9470),f=t(3626),g=t(998);/**
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 w=(0,g.Z)("RefreshCcw",[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]]),b=(0,g.Z)("FileSearch",[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4.268 21a2 2 0 0 0 1.727 1H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"ms7g94"}],["path",{d:"m9 18-1.5-1.5",key:"1j6qii"}],["circle",{cx:"5",cy:"14",r:"3",key:"ufru5t"}]]),y=(0,g.Z)("MonitorPlay",[["path",{d:"M10 7.75a.75.75 0 0 1 1.142-.638l3.664 2.249a.75.75 0 0 1 0 1.278l-3.664 2.25a.75.75 0 0 1-1.142-.64z",key:"1pctta"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",key:"x3v2xh"}]]);var N=t(9284),v=t(4545),k=t(9307),C=t(3001),_=t(8950);let S={active:["PENDING","RUNNING","RECOVERING","SUBMITTED","STARTING","CANCELLING"],finished:["SUCCEEDED","FAILED","CANCELLED","FAILED_SETUP","FAILED_PRECHECKS","FAILED_NO_RESOURCE","FAILED_CONTROLLER"]},E="__ALL_WORKSPACES__",L=e=>{if(!e)return"-";let s=(0,u.GV)(e);if(n.isValidElement(s)&&s.props&&s.props.children&&(s=n.isValidElement(s.props.children)&&s.props.children.props&&s.props.children.props.children?s.props.children.props.children:s.props.children),"string"!=typeof s)return s;if("just now"===s)return"now";let t=s.match(/^About\s+(\d+)\s+(\w+)\s+ago$/);if(t){let e=t[1],s=t[2],r={second:"sec",seconds:"secs",minute:"min",minutes:"mins",hour:"hr",hours:"hrs",day:"d",days:"d",month:"mo",months:"mos",year:"yr",years:"yrs"};if(r[s])return"~ ".concat(e," ").concat(r[s]," ago")}let r=s.match(/^a[n]?\s+(\w+)\s+ago$/);if(r){let e=r[1],s={second:"sec",minute:"min",hour:"hr",day:"d",month:"mo",year:"yr"};if(s[e])return"1 ".concat(s[e]," ago")}let a=s.match(/^(\d+)\s+(\w+)\s+ago$/);if(a){let e=a[1],s=a[2],t={seconds:"secs",minutes:"mins",hours:"hrs",days:"d",months:"mo",years:"yr"};if(t[s])return"".concat(e," ").concat(t[s]," ago")}return s};function R(){let e=(0,a.useRouter)(),[s,t]=(0,n.useState)(!1),l=n.useRef(null),[d,h]=(0,n.useState)({isOpen:!1,title:"",message:"",onConfirm:null}),m=(0,C.X)(),[g,w]=(0,n.useState)(E),[b,y]=(0,n.useState)([]);return(0,n.useEffect)(()=>{e.isReady&&e.query.workspace&&w(Array.isArray(e.query.workspace)?e.query.workspace[0]:e.query.workspace)},[e.isReady,e.query.workspace]),(0,n.useEffect)(()=>{(async()=>{try{let e=await (0,p.fX)(),s=Object.keys(e),t=(await (0,x.Vp)()).jobs||[],r=[...new Set(t.map(e=>e.workspace||"default").filter(e=>e))],n=new Set(s);r.forEach(e=>n.add(e)),y(Array.from(n).sort())}catch(e){console.error("Error fetching data for workspace filter:",e),y(["default"])}})()},[]),(0,r.jsxs)(j.A,{highlighted:"jobs",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,r.jsxs)("div",{className:"text-base flex items-center",children:[(0,r.jsx)(c(),{href:"/jobs",className:"text-sky-blue hover:underline leading-none",children:"Managed Jobs"}),(0,r.jsxs)(_.Ph,{value:g,onValueChange:w,children:[(0,r.jsx)(_.i4,{className:"h-8 w-48 ml-4 mr-2 text-sm border-none focus:ring-0 focus:outline-none",children:(0,r.jsx)(_.ki,{placeholder:"Filter by workspace...",children:g===E?"All Workspaces":g})}),(0,r.jsxs)(_.Bw,{children:[(0,r.jsx)(_.Ql,{value:E,children:"All Workspaces"}),b.map(e=>(0,r.jsx)(_.Ql,{value:e,children:e},e))]})]})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,r.jsxs)("div",{className:"flex items-center mr-2",children:[(0,r.jsx)(i.Z,{size:15,className:"mt-0"}),(0,r.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"Loading..."})]}),(0,r.jsxs)(o.z,{variant:"ghost",size:"sm",onClick:()=>{l.current&&l.current()},disabled:s,className:"text-sky-blue hover:text-sky-blue-bright",title:"Refresh",children:[(0,r.jsx)(f.Z,{className:"h-4 w-4 mr-1.5"}),!m&&(0,r.jsx)("span",{children:"Refresh"})]})]})]}),(0,r.jsx)(O,{refreshInterval:u.yc,setLoading:t,refreshDataRef:l,workspaceFilter:g}),(0,r.jsx)(N.cV,{isOpen:d.isOpen,onClose:()=>h({...d,isOpen:!1}),onConfirm:d.onConfirm,title:d.title,message:d.message})]})}function O(e){let{refreshInterval:s,setLoading:t,refreshDataRef:a,workspaceFilter:l}=e,[p,j]=(0,n.useState)([]),[f,g]=(0,n.useState)({key:null,direction:"ascending"}),[b,y]=(0,n.useState)(!1),[C,_]=(0,n.useState)(!0),[R,O]=(0,n.useState)(1),[D,z]=(0,n.useState)(10),[P,J]=(0,n.useState)(null),q=(0,n.useRef)(null),[T,F]=(0,n.useState)([]),[W,U]=(0,n.useState)({}),[V,Z]=(0,n.useState)(!1),[B,G]=(0,n.useState)(!1),[H,X]=(0,n.useState)(!1),[$,K]=(0,n.useState)("active"),[Q,Y]=(0,n.useState)(!0),[ee,es]=(0,n.useState)({isOpen:!1,title:"",message:"",onConfirm:null}),et=async()=>{es({isOpen:!0,title:"Restart Controller",message:"Are you sure you want to restart the controller? This will temporarily interrupt job management.",onConfirm:async()=>{try{X(!0),y(!0),await (0,x.Ce)("restartcontroller"),await er()}catch(e){console.error("Error restarting controller:",e)}finally{X(!1),y(!1)}}})},er=n.useCallback(async()=>{y(!0),t(!0);try{let[e,s]=await Promise.all([(0,x.Vp)(),(0,m.zd)()]),{jobs:t,controllerStopped:r}=e,n=s.find(e=>(0,v.Ym)(e.cluster)),a=n?n.status:"NOT_FOUND",l=!1;"STOPPED"==a&&r&&(l=!0),"LAUNCHING"==a?G(!0):G(!1),j(t),Z(l)}catch(e){console.error("Error fetching data:",e),j([])}finally{y(!1),t(!1),_(!1)}},[t]);n.useEffect(()=>{a&&(a.current=er)},[a,er]),(0,n.useEffect)(()=>{j([]);let e=!0;er();let t=setInterval(()=>{e&&er()},s);return()=>{e=!1,clearInterval(t)}},[s,er]),(0,n.useEffect)(()=>{O(1)},[$,p.length]),(0,n.useEffect)(()=>{F([]),Y(!0)},[$]);let en=e=>{let s="ascending";f.key===e&&"ascending"===f.direction&&(s="descending"),g({key:e,direction:s})},ea=e=>f.key===e?"ascending"===f.direction?" ↑":" ↓":"";n.useMemo(()=>({active:p.filter(e=>S.active.includes(e.status)).length,finished:p.filter(e=>S.finished.includes(e.status)).length}),[p]);let el=e=>T.length>0?T.includes(e):S[$].includes(e),ec=n.useMemo(()=>{let e=l&&l!==E?p.filter(e=>(e.workspace||"default").toLowerCase()===l.toLowerCase()):p;return T.length>0?e.filter(e=>T.includes(e.status)):Q?e.filter(e=>S[$].includes(e.status)):[]},[p,$,T,Q,S,l]),ei=n.useMemo(()=>f.key?[...ec].sort((e,s)=>e[f.key]<s[f.key]?"ascending"===f.direction?-1:1:e[f.key]>s[f.key]?"ascending"===f.direction?1:-1:0):ec,[ec,f]),eo=Math.ceil(ei.length/D),ed=(R-1)*D,eh=ed+D,eu=ei.slice(ed,eh),ex=e=>{if(T.includes(e)){let s=T.filter(s=>s!==e);0===s.length?(Y(!0),F([])):(F(s),Y(!1))}else F([...T,e]),Y(!1)};return(0,n.useEffect)(()=>{U(p.reduce((e,s)=>(e[s.status]=(e[s.status]||0)+1,e),{}))},[p]),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("div",{className:"flex flex-col space-y-1 mb-1",children:(0,r.jsxs)("div",{className:"flex flex-wrap items-center text-sm mb-1",children:[(0,r.jsx)("span",{className:"mr-2 text-sm font-medium",children:"Statuses:"}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-2 items-center",children:[!b&&0===p.length&&!C&&(0,r.jsx)("span",{className:"text-gray-500 mr-2",children:"No jobs found"}),Object.entries(W).map(e=>{let[s,t]=e;return(0,r.jsxs)("button",{onClick:()=>ex(s),className:"px-3 py-1 rounded-full flex items-center space-x-2 ".concat(el(s)||T.includes(s)?(0,k.Cl)(s):"bg-gray-50 text-gray-600 hover:bg-gray-100"),children:[(0,r.jsx)("span",{children:s}),(0,r.jsx)("span",{className:"text-xs ".concat(el(s)||T.includes(s)?"bg-white/50":"bg-gray-200"," px-1.5 py-0.5 rounded"),children:t})]},s)}),p.length>0&&(0,r.jsxs)("div",{className:"flex items-center ml-2 gap-2",children:[(0,r.jsx)("span",{className:"text-gray-500",children:"("}),(0,r.jsx)("button",{onClick:()=>{K("active"),F([]),Y(!0)},className:"text-sm font-medium ".concat("active"===$&&Q?"text-green-700 underline":"text-gray-600 hover:text-green-700 hover:underline"),children:"show all active jobs"}),(0,r.jsx)("span",{className:"text-gray-500 mx-1",children:"|"}),(0,r.jsx)("button",{onClick:()=>{K("finished"),F([]),Y(!0)},className:"text-sm font-medium ".concat("finished"===$&&Q?"text-blue-700 underline":"text-gray-600 hover:text-blue-700 hover:underline"),children:"show all finished jobs"}),(0,r.jsx)("span",{className:"text-gray-500",children:")"})]})]})]})}),(0,r.jsx)(d.Zb,{children:(0,r.jsxs)(h.iA,{children:[(0,r.jsx)(h.xD,{children:(0,r.jsxs)(h.SC,{children:[(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>en("id"),children:["ID",ea("id")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>en("name"),children:["Name",ea("name")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>en("user"),children:["User",ea("user")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>en("workspace"),children:["Workspace",ea("workspace")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>en("submitted_at"),children:["Submitted",ea("submitted_at")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>en("job_duration"),children:["Duration",ea("job_duration")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>en("status"),children:["Status",ea("status")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>en("resources_str"),children:["Requested",ea("resources_str")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>en("infra"),children:["Infra",ea("infra")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>en("cluster"),children:["Resources",ea("cluster")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>en("recoveries"),children:["Recoveries",ea("recoveries")]}),(0,r.jsx)(h.ss,{children:"Details"}),(0,r.jsx)(h.ss,{children:"Logs"})]})}),(0,r.jsx)(h.RM,{children:b&&C?(0,r.jsx)(h.SC,{children:(0,r.jsx)(h.pj,{colSpan:12,className:"text-center py-6 text-gray-500",children:(0,r.jsxs)("div",{className:"flex justify-center items-center",children:[(0,r.jsx)(i.Z,{size:20,className:"mr-2"}),(0,r.jsx)("span",{children:"Loading..."})]})})}):eu.length>0?(0,r.jsx)(r.Fragment,{children:eu.map(e=>(0,r.jsxs)(n.Fragment,{children:[(0,r.jsxs)(h.SC,{children:[(0,r.jsx)(h.pj,{children:(0,r.jsx)(c(),{href:"/jobs/".concat(e.id),className:"text-blue-600",children:e.id})}),(0,r.jsx)(h.pj,{children:(0,r.jsx)(c(),{href:"/jobs/".concat(e.id),className:"text-blue-600",children:e.name})}),(0,r.jsx)(h.pj,{children:e.user}),(0,r.jsx)(h.pj,{children:(0,r.jsx)(c(),{href:"/workspaces",className:"text-blue-600 hover:underline",children:e.workspace||"default"})}),(0,r.jsx)(h.pj,{children:L(e.submitted_at)}),(0,r.jsx)(h.pj,{children:(0,u.LU)(e.job_duration)}),(0,r.jsx)(h.pj,{children:(0,r.jsx)(k.OE,{status:e.status})}),(0,r.jsx)(h.pj,{children:e.requested_resources}),(0,r.jsx)(h.pj,{children:e.infra&&"-"!==e.infra?(0,r.jsx)(u.Md,{content:e.full_infra||e.infra,className:"text-sm text-muted-foreground",children:(0,r.jsxs)("span",{children:[(0,r.jsx)(c(),{href:"/infra",className:"text-blue-600 hover:underline",children:e.cloud||e.infra.split("(")[0].trim()}),e.infra.includes("(")&&(0,r.jsx)("span",{children:" "+e.infra.substring(e.infra.indexOf("("))})]})}):(0,r.jsx)("span",{children:e.infra||"-"})}),(0,r.jsx)(h.pj,{children:(0,r.jsx)(u.Md,{content:e.resources_str_full||e.resources_str,className:"text-sm text-muted-foreground",children:(0,r.jsx)("span",{children:e.resources_str})})}),(0,r.jsx)(h.pj,{children:e.recoveries}),(0,r.jsx)(h.pj,{children:e.details?(0,r.jsx)(A,{text:e.details,rowId:e.id,expandedRowId:P,setExpandedRowId:J}):"-"}),(0,r.jsx)(h.pj,{children:(0,r.jsx)(M,{jobParent:"/jobs",jobId:e.id,managed:!0})})]}),P===e.id&&(0,r.jsx)(I,{text:e.details,colSpan:12,innerRef:q})]},e.id))}):(0,r.jsx)(h.SC,{children:(0,r.jsx)(h.pj,{colSpan:12,className:"text-center py-6",children:(0,r.jsxs)("div",{className:"flex flex-col items-center space-y-4",children:[B&&(0,r.jsxs)("div",{className:"flex flex-col items-center space-y-2",children:[(0,r.jsx)("p",{className:"text-gray-700",children:"The managed job controller is launching. Please wait for it to be ready."}),(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(i.Z,{size:12,className:"mr-2"}),(0,r.jsx)("span",{className:"text-gray-500",children:"Launching..."})]})]}),!V&&!B&&(0,r.jsx)("p",{className:"text-gray-500",children:"No active jobs"}),V&&(0,r.jsxs)("div",{className:"flex flex-col items-center space-y-2",children:[(0,r.jsx)("p",{className:"text-gray-700",children:"The managed job controller has been stopped. Please restart it to check the latest job status."}),(0,r.jsx)(o.z,{variant:"outline",size:"sm",onClick:et,className:"text-sky-blue hover:text-sky-blue-bright",disabled:b||H,children:H?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Z,{size:12,className:"mr-2"}),"Restarting..."]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(w,{className:"h-4 w-4 mr-2"}),"Restart Controller"]})})]})]})})})})]})}),ei.length>0&&(0,r.jsx)("div",{className:"flex justify-end items-center py-2 px-4 text-sm text-gray-700",children:(0,r.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("span",{className:"mr-2",children:"Rows per page:"}),(0,r.jsxs)("div",{className:"relative inline-block",children:[(0,r.jsxs)("select",{value:D,onChange:e=>{z(parseInt(e.target.value,10)),O(1)},className:"py-1 pl-2 pr-6 appearance-none outline-none cursor-pointer border-none bg-transparent",style:{minWidth:"40px"},children:[(0,r.jsx)("option",{value:10,children:"10"}),(0,r.jsx)("option",{value:30,children:"30"}),(0,r.jsx)("option",{value:50,children:"50"}),(0,r.jsx)("option",{value:100,children:"100"}),(0,r.jsx)("option",{value:200,children:"200"})]}),(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-gray-500 absolute right-0 top-1/2 transform -translate-y-1/2 pointer-events-none",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),(0,r.jsxs)("div",{children:[ed+1," – ",Math.min(eh,ei.length)," of"," ",ei.length]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(o.z,{variant:"ghost",size:"icon",onClick:()=>{O(e=>Math.max(e-1,1))},disabled:1===R,className:"text-gray-500 h-8 w-8 p-0",children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"chevron-left",children:(0,r.jsx)("path",{d:"M15 18l-6-6 6-6"})})}),(0,r.jsx)(o.z,{variant:"ghost",size:"icon",onClick:()=>{O(e=>Math.min(e+1,eo))},disabled:R===eo||0===eo,className:"text-gray-500 h-8 w-8 p-0",children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"chevron-right",children:(0,r.jsx)("path",{d:"M9 18l6-6-6-6"})})})]})]})}),(0,r.jsx)(N.cV,{isOpen:ee.isOpen,onClose:()=>es({...ee,isOpen:!1}),onConfirm:ee.onConfirm,title:ee.title,message:ee.message})]})}function M(e){let{withLabel:s=!1,jobParent:t,jobId:n,managed:l}=e,c=(0,a.useRouter)(),i=(e,s)=>{e.preventDefault(),e.stopPropagation(),c.push({pathname:"".concat(t,"/").concat(n),query:{tab:s}})};return(0,r.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,r.jsx)(u.WH,{content:"View Job Logs",className:"capitalize text-sm text-muted-foreground",children:(0,r.jsxs)("button",{onClick:e=>i(e,"logs"),className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center h-8",children:[(0,r.jsx)(b,{className:"w-4 h-4"}),s&&(0,r.jsx)("span",{className:"ml-1.5",children:"Logs"})]})},"logs"),l&&(0,r.jsx)(u.WH,{content:"View Controller Logs",className:"capitalize text-sm text-muted-foreground",children:(0,r.jsxs)("button",{onClick:e=>i(e,"controllerlogs"),className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center h-8",children:[(0,r.jsx)(y,{className:"w-4 h-4"}),s&&(0,r.jsx)("span",{className:"ml-2",children:"Controller Logs"})]})},"controllerlogs")]})}function D(e){let{clusterName:s,clusterJobData:t,loading:a}=e,[l,x]=(0,n.useState)(null),[m,p]=(0,n.useState)({key:null,direction:"ascending"}),[j,f]=(0,n.useState)(1),[g,w]=(0,n.useState)(10),b=(0,n.useRef)(null),[y,N]=(0,n.useState)(null);(0,n.useEffect)(()=>{let e=e=>{l&&b.current&&!b.current.contains(e.target)&&x(null)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[l]);let v=n.useMemo(()=>t||[],[t]);(0,n.useEffect)(()=>{JSON.stringify(t)!==JSON.stringify(y)&&N(t)},[t,y]);let C=n.useMemo(()=>m.key?[...v].sort((e,s)=>e[m.key]<s[m.key]?"ascending"===m.direction?-1:1:e[m.key]>s[m.key]?"ascending"===m.direction?1:-1:0):v,[v,m]),_=e=>{let s="ascending";m.key===e&&"ascending"===m.direction&&(s="descending"),p({key:e,direction:s})},S=e=>m.key===e?"ascending"===m.direction?" ↑":" ↓":"",E=Math.ceil(C.length/g),R=(j-1)*g,O=R+g,D=C.slice(R,O);return(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsxs)(d.Zb,{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold",children:"Cluster Jobs"}),a&&(0,r.jsxs)("div",{className:"flex items-center mr-2",children:[(0,r.jsx)(i.Z,{size:15,className:"mt-0"}),(0,r.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"Loading..."})]})]}),(0,r.jsxs)(h.iA,{children:[(0,r.jsx)(h.xD,{children:(0,r.jsxs)(h.SC,{children:[(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>_("id"),children:["ID",S("id")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>_("job"),children:["Name",S("job")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>_("user"),children:["User",S("user")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>_("workspace"),children:["Workspace",S("workspace")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>_("submitted_at"),children:["Submitted",S("submitted_at")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>_("job_duration"),children:["Duration",S("job_duration")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>_("status"),children:["Status",S("status")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>_("resources"),children:["Resources",S("resources")]}),(0,r.jsx)(h.ss,{className:"whitespace-nowrap",children:"Logs"})]})}),(0,r.jsx)(h.RM,{children:D.length>0?D.map(e=>(0,r.jsxs)(n.Fragment,{children:[(0,r.jsxs)(h.SC,{className:l===e.id?"selected-row":"",children:[(0,r.jsx)(h.pj,{children:(0,r.jsx)(c(),{href:"/clusters/".concat(s,"/").concat(e.id),className:"text-blue-600",children:e.id})}),(0,r.jsx)(h.pj,{children:(0,r.jsx)(c(),{href:"/clusters/".concat(s,"/").concat(e.id),className:"text-blue-600",children:(0,r.jsx)(A,{text:e.job||"Unnamed job",rowId:e.id,expandedRowId:l,setExpandedRowId:x})})}),(0,r.jsx)(h.pj,{children:e.user}),(0,r.jsx)(h.pj,{children:(0,r.jsx)(c(),{href:"/workspaces",className:"text-blue-600 hover:underline",children:e.workspace||"default"})}),(0,r.jsx)(h.pj,{children:L(e.submitted_at)}),(0,r.jsx)(h.pj,{children:(0,u.LU)(e.job_duration)}),(0,r.jsx)(h.pj,{children:(0,r.jsx)(k.OE,{status:e.status})}),(0,r.jsx)(h.pj,{children:e.resources}),(0,r.jsx)(h.pj,{className:"flex content-center items-center",children:(0,r.jsx)(M,{jobParent:"/clusters/".concat(s),jobId:e.id,managed:!1})})]}),l===e.id&&(0,r.jsx)(I,{text:e.job||"Unnamed job",colSpan:9,innerRef:b})]},e.id)):(0,r.jsx)(h.SC,{children:(0,r.jsx)(h.pj,{colSpan:9,className:"text-center py-6 text-gray-500",children:"No jobs found"})})})]})]}),C.length>0&&(0,r.jsx)("div",{className:"flex justify-end items-center py-2 px-4 text-sm text-gray-700",children:(0,r.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("span",{className:"mr-2",children:"Rows per page:"}),(0,r.jsxs)("div",{className:"relative inline-block",children:[(0,r.jsxs)("select",{value:g,onChange:e=>{w(parseInt(e.target.value,10)),f(1)},className:"py-1 pl-2 pr-6 appearance-none outline-none cursor-pointer border-none bg-transparent",style:{minWidth:"40px"},children:[(0,r.jsx)("option",{value:5,children:"5"}),(0,r.jsx)("option",{value:10,children:"10"}),(0,r.jsx)("option",{value:20,children:"20"}),(0,r.jsx)("option",{value:50,children:"50"})]}),(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-gray-500 absolute right-0 top-1/2 transform -translate-y-1/2 pointer-events-none",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),(0,r.jsxs)("div",{children:[R+1," – ",Math.min(O,C.length)," of"," ",C.length]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(o.z,{variant:"ghost",size:"icon",onClick:()=>{f(e=>Math.max(e-1,1))},disabled:1===j,className:"text-gray-500 h-8 w-8 p-0",children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"chevron-left",children:(0,r.jsx)("path",{d:"M15 18l-6-6 6-6"})})}),(0,r.jsx)(o.z,{variant:"ghost",size:"icon",onClick:()=>{f(e=>Math.min(e+1,E))},disabled:j===E||0===E,className:"text-gray-500 h-8 w-8 p-0",children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"chevron-right",children:(0,r.jsx)("path",{d:"M9 18l6-6-6-6"})})})]})]})})]})}function I(e){let{text:s,colSpan:t,innerRef:n}=e;return(0,r.jsx)(h.SC,{className:"expanded-details",children:(0,r.jsx)(h.pj,{colSpan:t,children:(0,r.jsx)("div",{className:"p-4 bg-gray-50 rounded-md border border-gray-200",ref:n,children:(0,r.jsx)("div",{className:"flex justify-between items-start",children:(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-gray-900",children:"Full Details"}),(0,r.jsx)("p",{className:"mt-1 text-sm text-gray-700",style:{whiteSpace:"pre-wrap"},children:s})]})})})})})}function A(e){let{text:s,rowId:t,expandedRowId:a,setExpandedRowId:l}=e,c=s.length>50,i=a===t,o=c?"".concat(s.substring(0,50)):s,d=(0,n.useRef)(null);return(0,r.jsxs)("div",{className:"truncated-details relative max-w-full flex items-center",children:[(0,r.jsx)("span",{className:"truncate",children:o}),c&&(0,r.jsx)("button",{ref:d,type:"button",onClick:e=>{e.preventDefault(),e.stopPropagation(),l(i?null:t)},className:"text-blue-600 hover:text-blue-800 font-medium ml-1 flex-shrink-0","data-button-type":"show-more-less",children:i?"... show less":"... show more"})]})}},8969:function(e,s,t){t.d(s,{Ce:function(){return o},NJ:function(){return i},Pr:function(){return c},Vp:function(){return l}});var r=t(7294),n=t(5821),a=t(3225);async function l(){let{allUsers:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let s=(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"),t=await fetch("".concat(a.f4,"/api/get?request_id=").concat(s));if(500===t.status){try{let e=await t.json();if(e.detail&&e.detail.error)try{let s=JSON.parse(e.detail.error);if(s.type&&s.type===a.iW)return{jobs:[],controllerStopped:!0}}catch(e){console.error("Error parsing JSON:",e)}}catch(e){console.error("Error parsing JSON:",e)}return{jobs:[],controllerStopped:!1}}let r=await t.json();return{jobs:(r.return_value?JSON.parse(r.return_value):[]).map(e=>{let s=[];e.submitted_at&&s.push({time:new Date(1e3*e.submitted_at),event:"Job submitted."}),e.start_at&&s.push({time:new Date(1e3*e.start_at),event:"Job started."}),e.end_at&&("CANCELLING"==e.status||"CANCELLED"==e.status?s.push({time:new Date(1e3*e.end_at),event:"Job cancelled."}):s.push({time:new Date(1e3*e.end_at),event:"Job completed."})),e.last_recovered_at&&e.last_recovered_at!=e.start_at&&s.push({time:new Date(1e3*e.last_recovered_at),event:"Job recovered."});let t=(e.end_at?e.end_at:Date.now()/1e3)-e.submitted_at,r=e.cloud,n=e.cluster_resources;if(!r){if(e.cluster_resources&&"-"!==e.cluster_resources)try{r=e.cluster_resources.split("(")[0].split("x").pop().trim(),n=e.cluster_resources.replace("".concat(r,"("),"(").replace("x ","x")}catch(e){r="Unknown"}else r="Unknown"}let a="",l=a=e.zone?e.zone:e.region;a&&a.length>15&&(a=a.substring(0,15)+"...");let c=r+" ("+a+")";"-"===a&&(c=r);let i=r+" ("+l+")";return"-"===l&&(i=r),{id:e.job_id,task:e.task_name,name:e.job_name,job_duration:e.job_duration,total_duration:t,workspace:e.workspace,status:e.status,requested_resources:e.resources,resources_str:n,resources_str_full:e.cluster_resources_full||n,cloud:r,infra:c,full_infra:i,recoveries:e.recovery_count,details:e.failure_reason,user:e.user_name,user_hash:e.user_hash,submitted_at:e.submitted_at?new Date(1e3*e.submitted_at):null,events:s}}),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,[s,t]=(0,r.useState)(null),[n,a]=(0,r.useState)(!0);return(0,r.useEffect)(()=>{(async function(){try{a(!0);let e=await l({allUsers:!0});t(e)}catch(e){console.error("Error fetching managed job data:",e)}finally{a(!1)}})()},[e]),{jobData:s,loading:n}}async function i(e){let{jobId:s,controller:t=!1,signal:r,onNewLog:l}=e,c=new Promise(e=>{setTimeout(()=>{e({timeout:!0})},1e4)}),i=(async()=>{try{let e=(await fetch("".concat(a.f4,"/jobs/logs"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({controller:t,follow:!1,job_id:s}),...r?{signal:r}:{}})).body.getReader();try{for(;;){let{done:s,value:t}=await e.read();if(s)break;let r=new TextDecoder().decode(t);l(r)}}finally{e.cancel()}return{timeout:!1}}catch(e){if("AbortError"===e.name)return{timeout:!1};throw e}})();if((await Promise.race([i,c])).timeout){(0,n.C)("Log request for job ".concat(s," timed out after ").concat(1e4,"ms"),"error");return}}async function o(e,s,t){let r="",l="",c="",i={};if("restartcontroller"===e)r="Restarting",l="restarted",c="jobs/queue",i={all_users:!0,refresh:!0},s="controller";else throw Error("Invalid action: ".concat(e));(0,n.C)("".concat(r," job ").concat(s,"..."),"info");try{try{let e=(await fetch("".concat(a.f4,"/").concat(c),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)})).headers.get("X-Skypilot-Request-ID"),o=await fetch("".concat(a.f4,"/api/get?request_id=").concat(e));if(200===o.status)(0,n.C)("Job ".concat(s," ").concat(l," successfully."),"success");else if(500===o.status)try{let e=await o.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(r," job ").concat(s," is not supported!"),"error",1e4):l.type&&l.type===a.mF?(0,n.C)("Cluster ".concat(t," does not exist."),"error"):l.type&&l.type===a.iW?(0,n.C)("Cluster ".concat(t," is not up."),"error"):(0,n.C)("".concat(r," job ").concat(s," failed: ").concat(l.type),"error")}catch(t){(0,n.C)("".concat(r," job ").concat(s," failed: ").concat(e.detail.error),"error")}else(0,n.C)("".concat(r," job ").concat(s," failed with no details."),"error")}catch(e){(0,n.C)("".concat(r," job ").concat(s," failed with parse error."),"error")}else(0,n.C)("".concat(r," job ").concat(s," failed with status ").concat(o.status,"."),"error")}catch(e){console.error("Fetch error:",e),(0,n.C)("Network error ".concat(r," job ").concat(s,": ").concat(e.message),"error")}}catch(e){console.error("Error in handleStop:",e),(0,n.C)("Critical error ".concat(r," job ").concat(s,": ").concat(e.message),"error")}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[470],{3850:function(e,t,n){n.d(t,{E9:function(){return w},J$:function(){return c},PC:function(){return f},Ps:function(){return i},QT:function(){return h},Vp:function(){return x},W2:function(){return l},Ye:function(){return d},aD:function(){return j},fp:function(){return u},fy:function(){return m},h0:function(){return p},lM:function(){return y},mU:function(){return g},oy:function(){return v}});var r=n(5893);n(7294);var s=n(8507),o=n(8586),a=n(9611);function i(e){return(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"0",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"})})}function l(e){return(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("circle",{cx:"10",cy:"10",r:"8"})})}function c(e){return(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("circle",{cx:"10",cy:"10",r:"8"})})}function d(e){return(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("path",{d:"M6 12l4 4 8-8"})})}function u(e){return(0,r.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"0",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("rect",{x:"6",y:"5",width:"4",height:"14",rx:"1"}),(0,r.jsx)("rect",{x:"14",y:"5",width:"4",height:"14",rx:"1"})]})}function h(e){return(0,r.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2"}),(0,r.jsx)("rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2"}),(0,r.jsx)("line",{x1:"6",x2:"6.01",y1:"6",y2:"6"}),(0,r.jsx)("line",{x1:"6",x2:"6.01",y1:"18",y2:"18"})]})}function x(e){return(0,r.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"}),(0,r.jsx)("rect",{width:"20",height:"14",x:"2",y:"6",rx:"2"})]})}function f(e){return(0,r.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",ry:"2"}),(0,r.jsx)("rect",{x:"9",y:"9",width:"6",height:"6"}),(0,r.jsx)("line",{x1:"9",y1:"1",x2:"9",y2:"4"}),(0,r.jsx)("line",{x1:"15",y1:"1",x2:"15",y2:"4"}),(0,r.jsx)("line",{x1:"9",y1:"20",x2:"9",y2:"23"}),(0,r.jsx)("line",{x1:"15",y1:"20",x2:"15",y2:"23"}),(0,r.jsx)("line",{x1:"20",y1:"9",x2:"23",y2:"9"}),(0,r.jsx)("line",{x1:"20",y1:"14",x2:"23",y2:"14"}),(0,r.jsx)("line",{x1:"1",y1:"9",x2:"4",y2:"9"}),(0,r.jsx)("line",{x1:"1",y1:"14",x2:"4",y2:"14"})]})}function p(e){return(0,r.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),(0,r.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,r.jsx)("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})}function m(e){return(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",children:(0,r.jsx)("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"})})}function g(e){return(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",children:(0,r.jsx)("path",{transform:"scale(0.85) translate(1.8, 1.8)",d:"M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z"})})}function w(e){return(0,r.jsx)("svg",{...e,stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsxs)("g",{children:[(0,r.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,r.jsx)("path",{d:"M3 18.5V5a3 3 0 0 1 3-3h14a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5A3.5 3.5 0 0 1 3 18.5zM19 20v-3H6.5a1.5 1.5 0 0 0 0 3H19zM10 4H6a1 1 0 0 0-1 1v10.337A3.486 3.486 0 0 1 6.5 15H19V4h-2v8l-3.5-2-3.5 2V4z"})]})})}let j=s.Z,v=o.Z;function y(e){return(0,r.jsx)(a.Z,{...e})}},9470:function(e,t,n){n.d(t,{A:function(){return w}});var r=n(5893),s=n(7294),o=n(5675),a=n.n(o),i=n(1163),l=n(1664),c=n.n(l),d=n(3850),u=n(3225),h=n(6989),x=n(3001);let f=(0,s.createContext)(null);function p(e){let{children:t}=e,[n,o]=(0,s.useState)(!0);return(0,r.jsx)(f.Provider,{value:{isSidebarOpen:n,toggleSidebar:()=>{o(e=>!e)}},children:t})}function m(){let e,t;let n=(0,i.useRouter)(),o=(0,x.X)(),[l,f]=(0,s.useState)(null),[p,m]=(0,s.useState)(!1),g=(0,s.useRef)(null);(0,s.useEffect)(()=>{fetch("".concat(u.f4,"/api/health")).then(e=>e.json()).then(e=>{e.user&&e.user.name&&f(e.user.name)}).catch(e=>{console.error("Error fetching user data:",e)})},[]),(0,s.useEffect)(()=>{function e(e){g.current&&!g.current.contains(e.target)&&m(!1)}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[g]);let w=e=>"/workspaces"===e?n.pathname.startsWith("/workspaces")||n.pathname.startsWith("/workspace"):n.pathname.startsWith(e),j=e=>{let t=w(e);return"inline-flex items-center border-b-2 ".concat(t?"border-transparent text-blue-600":"border-transparent hover:text-blue-600"," ").concat(o?"px-2 py-1":"px-1 pt-1 space-x-2")};return(0,r.jsx)("div",{className:"fixed top-0 left-0 right-0 bg-white z-30 h-14 px-4 border-b border-gray-200 shadow-sm",children:(0,r.jsxs)("div",{className:"flex items-center h-full",children:[(0,r.jsx)("div",{className:"flex items-center ".concat(o?"space-x-2 mr-2":"space-x-4 mr-6"),children:(0,r.jsx)(c(),{href:"/",className:"flex items-center px-1 pt-1 h-full",prefetch:!1,children:(0,r.jsx)("div",{className:"h-20 w-20 flex items-center justify-center",children:(0,r.jsx)(a(),{src:"".concat(u.GW,"/skypilot.svg"),alt:"SkyPilot Logo",width:80,height:80,priority:!0,className:"w-full h-full object-contain"})})})}),(0,r.jsxs)("div",{className:"flex items-center ".concat(o?"space-x-1":"space-x-2 md:space-x-4"," ").concat(o?"mr-2":"mr-6"),children:[(0,r.jsxs)(c(),{href:"/clusters",className:j("/clusters"),prefetch:!1,children:[(0,r.jsx)(d.QT,{className:"w-4 h-4"}),!o&&(0,r.jsx)("span",{children:"Clusters"})]}),(0,r.jsxs)(c(),{href:"/jobs",className:j("/jobs"),prefetch:!1,children:[(0,r.jsx)(d.Vp,{className:"w-4 h-4"}),!o&&(0,r.jsx)("span",{children:"Jobs"})]}),(0,r.jsx)("div",{className:"border-l border-gray-200 h-6 mx-1"}),(0,r.jsxs)(c(),{href:"/infra",className:j("/infra"),prefetch:!1,children:[(0,r.jsx)(d.PC,{className:"w-4 h-4"}),!o&&(0,r.jsx)("span",{children:"Infra"})]}),(0,r.jsxs)(c(),{href:"/workspaces",className:j("/workspaces"),prefetch:!1,children:[(0,r.jsx)(d.E9,{className:"w-4 h-4"}),!o&&(0,r.jsx)("span",{children:"Workspaces"})]}),(0,r.jsxs)(c(),{href:"/users",className:j("/users"),prefetch:!1,children:[(0,r.jsx)(d.oy,{className:"w-4 h-4"}),!o&&(0,r.jsx)("span",{children:"Users"})]})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-1 ".concat(o?"ml-0":"ml-auto"),children:[(0,r.jsx)(h.WH,{content:"Documentation",className:"text-sm text-muted-foreground",children:(0,r.jsxs)("a",{href:"https://skypilot.readthedocs.io/en/latest/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center px-2 py-1 text-gray-600 hover:text-blue-600 transition-colors duration-150 cursor-pointer",title:"Docs",children:[!o&&(0,r.jsx)("span",{className:"mr-1",children:"Docs"}),(0,r.jsx)(d.h0,{className:"".concat(o?"w-4 h-4":"w-3.5 h-3.5")})]})}),(0,r.jsx)("div",{className:"border-l border-gray-200 h-6 mx-1"}),(0,r.jsx)(h.WH,{content:"GitHub Repository",className:"text-sm text-muted-foreground",children:(0,r.jsx)("a",{href:"https://github.com/skypilot-org/skypilot",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center p-2 rounded-full text-gray-600 hover:bg-gray-100 transition-colors duration-150 cursor-pointer",title:"GitHub",children:(0,r.jsx)(d.fy,{className:"".concat(o?"w-4 h-4":"w-5 h-5")})})}),(0,r.jsx)(h.WH,{content:"Join Slack",className:"text-sm text-muted-foreground",children:(0,r.jsx)("a",{href:"https://slack.skypilot.co/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center p-2 rounded-full text-gray-600 hover:bg-gray-100 transition-colors duration-150 cursor-pointer",title:"Slack",children:(0,r.jsx)(d.mU,{className:"".concat(o?"w-4 h-4":"w-5 h-5")})})}),(0,r.jsx)(h.WH,{content:"Leave Feedback",className:"text-sm text-muted-foreground",children:(0,r.jsx)("a",{href:"https://github.com/skypilot-org/skypilot/issues/new",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center p-2 rounded-full text-gray-600 hover:bg-gray-100 transition-colors duration-150 cursor-pointer",title:"Leave Feedback",children:(0,r.jsx)(d.aD,{className:"".concat(o?"w-4 h-4":"w-5 h-5")})})})]}),l&&(0,r.jsxs)("div",{className:"relative ml-2",ref:g,children:[(0,r.jsx)("button",{onClick:()=>m(!p),className:"inline-flex items-center justify-center p-2 rounded-full text-gray-600 hover:bg-gray-100 transition-colors duration-150 cursor-pointer",title:"User Profile",children:(0,r.jsx)(d.lM,{className:"".concat(o?"w-5 h-5":"w-6 h-6")})}),p&&(0,r.jsxs)("div",{className:"absolute right-0 mt-2 w-48 bg-white rounded-md shadow-lg z-50 border border-gray-200",children:[(e=l,t=null,l&&l.includes("@")&&(e=l.split("@")[0],t=l),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"px-4 pt-2 pb-1 text-sm font-medium text-gray-900",children:e}),t&&(0,r.jsx)("div",{className:"px-4 pt-0 pb-2 text-xs text-gray-500",children:t})]})),(0,r.jsx)("div",{className:"border-t border-gray-200 mx-1 my-1"}),(0,r.jsx)(c(),{href:"/users",className:"block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 hover:text-blue-600",onClick:()=>m(!1),prefetch:!1,children:"See all users"})]})]})]})})}function g(e){let{children:t,highlighted:n}=e;return(0,x.X)(),(0,r.jsxs)("div",{className:"min-h-screen bg-gray-50",children:[(0,r.jsx)("div",{className:"fixed top-0 left-0 right-0 z-50 shadow-sm",children:(0,r.jsx)(m,{})}),(0,r.jsx)("div",{className:"transition-all duration-200 ease-in-out min-h-screen",style:{paddingTop:"56px"},children:(0,r.jsx)("main",{className:"p-6",children:t})})]})}function w(e){return(0,r.jsx)(p,{children:(0,r.jsx)(g,{...e})})}},8950:function(e,t,n){n.d(t,{Bw:function(){return p},Ph:function(){return d},Ql:function(){return m},i4:function(){return h},ki:function(){return u}});var r=n(5893),s=n(7294),o=n(2067),a=n(5895),i=n(7242),l=n(282),c=n(2350);let d=o.fC;o.ZA;let u=o.B4,h=s.forwardRef((e,t)=>{let{className:n,children:s,...i}=e;return(0,r.jsxs)(o.xz,{ref:t,className:(0,c.cn)("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",n),...i,children:[s,(0,r.jsx)(o.JO,{asChild:!0,children:(0,r.jsx)(a.Z,{className:"h-4 w-4 opacity-50"})})]})});h.displayName=o.xz.displayName;let x=s.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,r.jsx)(o.u_,{ref:t,className:(0,c.cn)("flex cursor-default items-center justify-center py-1",n),...s,children:(0,r.jsx)(i.Z,{className:"h-4 w-4"})})});x.displayName=o.u_.displayName;let f=s.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,r.jsx)(o.$G,{ref:t,className:(0,c.cn)("flex cursor-default items-center justify-center py-1",n),...s,children:(0,r.jsx)(a.Z,{className:"h-4 w-4"})})});f.displayName=o.$G.displayName;let p=s.forwardRef((e,t)=>{let{className:n,children:s,position:a="popper",...i}=e;return(0,r.jsx)(o.h_,{children:(0,r.jsxs)(o.VY,{ref:t,className:(0,c.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===a&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n),position:a,...i,children:[(0,r.jsx)(x,{}),(0,r.jsx)(o.l_,{className:(0,c.cn)("p-1","popper"===a&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:s}),(0,r.jsx)(f,{})]})})});p.displayName=o.VY.displayName,s.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,r.jsx)(o.__,{ref:t,className:(0,c.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",n),...s})}).displayName=o.__.displayName;let m=s.forwardRef((e,t)=>{let{className:n,children:s,...a}=e;return(0,r.jsxs)(o.ck,{ref:t,className:(0,c.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n),...a,children:[(0,r.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,r.jsx)(o.wU,{children:(0,r.jsx)(l.Z,{className:"h-4 w-4"})})}),(0,r.jsx)(o.eT,{children:s})]})});m.displayName=o.ck.displayName,s.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,r.jsx)(o.Z0,{ref:t,className:(0,c.cn)("-mx-1 my-1 h-px bg-muted",n),...s})}).displayName=o.Z0.displayName},6989:function(e,t,n){n.d(t,{$B:function(){return g},GV:function(){return d},LU:function(){return p},Md:function(){return f},WH:function(){return x},q8:function(){return m},yc:function(){return l}});var r=n(5893),s=n(7294),o=n(3302),a=n(1886),i=n(8950);let l=3e4;function c(e){return e.charAt(0).toUpperCase()+e.slice(1)}function d(e){if(!e)return"N/A";let t=new Date;return 7>Math.abs((t-e)/864e5)?(0,r.jsx)(x,{content:u(e),className:"capitalize text-sm text-muted-foreground",children:c((0,a.B)(e,t,{addSuffix:!0}))}):(0,r.jsx)(x,{content:c(u(e)),className:"text-sm text-muted-foreground",children:c(e.toLocaleString("en-CA",{year:"numeric",month:"2-digit",day:"2-digit"}).replace(",",""))})}function u(e){return e.toLocaleString("en-CA",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1,timeZoneName:"short"}).replace(",","")}let h={placement:"bottom",color:"default"},x=e=>{let{children:t,...n}=e,s=n.content;return n.content=void 0,(0,r.jsx)(o.e,{...h,...n,content:(0,r.jsx)("span",{className:"left-full w-max px-2 py-1 text-sm text-gray-100 bg-gray-500 text-sm capitalize rounded",children:s}),children:t})},f=e=>{let{children:t,...n}=e,s=n.content;return n.content=void 0,(0,r.jsx)(o.e,{...h,...n,content:(0,r.jsx)("span",{className:"left-full w-max px-2 py-1 text-sm text-gray-100 bg-gray-500 text-sm rounded",children:s}),children:t})};function p(e){if(!e&&0!==e)return"-";let t=e=Math.floor(e),n="",r=0;for(let e of[{value:86400,label:"d"},{value:3600,label:"h"},{value:60,label:"m"},{value:1,label:"s"}])if(t>=e.value&&r<2){let s=Math.floor(t/e.value);n+="".concat(s).concat(e.label," "),t%=e.value,r++}return n.trim()||"0s"}function m(e){return e?(e=e.split("\n").filter(e=>!e.match(/<rich_.*?\[bold cyan\]/)&&!e.match(/<rich_.*>.*<\/rich_.*>/)&&!e.match(/├──/)&&!e.match(/└──/)).join("\n").replace(/\x1b\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGKH]/g,"")).split("\n").map(e=>{let t=e.match(/^([IWED])\s+(\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2})\s+([^:]+:\d+\])(.*)/);if(t){let[e,n,r,s,o]=t,a={I:"INFO",W:"WARNING",E:"ERROR",D:"DEBUG"}[n]||"";return'<span class="log-line '.concat(a,'"><span class="level">').concat(n,'</span><span class="timestamp">').concat(r,'</span><span class="location">').concat(s,'</span><span class="message">').concat(o,"</span></span>")}let n=e.match(/^(\([^)]+\))(.*)$/);if(n){let[e,t,r]=n;return'<span class="log-line"><span class="log-prefix">'.concat(t,'</span><span class="log-rest">').concat(r,"</span></span>")}return'<span class="log-line"><span class="message">'.concat(e,"</span></span>")}).join("\n"):""}function g(e){let{logs:t,controller:n=!1}=e,[o,a]=(0,s.useState)("all"),[l,c]=(0,s.useState)(t),[d,u]=(0,s.useState)([]);return(0,s.useEffect)(()=>{u(function(e){let t;let n=/\((head|worker\d+),/g,r=new Set;for(;null!==(t=n.exec(e));)r.add(t[1]);return Array.from(r).sort((e,t)=>"head"===e?-1:"head"===t?1:e.localeCompare(t,void 0,{numeric:!0,sensitivity:"base"}))}(t))},[t]),(0,s.useEffect)(()=>{"all"===o?c(t):c(t.split("\n").filter(e=>e.includes("(".concat(o,","))).join("\n"))},[o,t]),(0,r.jsxs)("div",{children:[(0,r.jsx)("style",{children:'\n .logs-container {\n background-color: #f7f7f7;\n padding: 16px;\n max-height: calc(100vh - 300px);\n overflow-y: auto;\n overflow-x: hidden;\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;\n line-height: 1.5;\n border-radius: 6px;\n min-height: fit-content;\n }\n\n .log-line {\n display: block;\n white-space: pre-wrap;\n margin: 2px 0;\n }\n\n .log-line .level {\n display: inline;\n width: 1ch;\n margin-right: 1ch;\n font-weight: bold;\n }\n\n .log-line.INFO .level {\n color: #2563eb;\n }\n\n .log-line.WARNING .level {\n color: #d97706;\n }\n\n .log-line.ERROR .level {\n color: #dc2626;\n }\n\n .log-line.DEBUG .level {\n color: #6b7280;\n }\n\n .log-line .timestamp {\n color: #059669;\n margin-right: 1ch;\n white-space: nowrap;\n }\n\n .log-line .location {\n color: #6366f1;\n margin-right: 1ch;\n white-space: nowrap;\n }\n\n .log-line .message {\n color: #111827;\n word-break: break-word;\n white-space: pre-wrap;\n }\n\n .log-line .log-prefix {\n color: #6366f1;\n font-weight: 500;\n }\n\n .log-line .log-rest {\n color: #111827;\n word-break: break-word;\n white-space: pre-wrap;\n }\n'}),!n&&(0,r.jsx)("div",{style:{marginBottom:"1rem"},children:(0,r.jsxs)(i.Ph,{onValueChange:e=>a(e),value:o,children:[(0,r.jsx)(i.i4,{"aria-label":"Node",className:"focus:ring-0 focus:ring-offset-0",children:(0,r.jsx)(i.ki,{placeholder:"Select Node"})}),(0,r.jsxs)(i.Bw,{children:[(0,r.jsx)(i.Ql,{value:"all",children:"All Nodes"}),d.map(e=>(0,r.jsx)(i.Ql,{value:e,children:e},e))]})]})}),(0,r.jsx)("div",{className:"logs-container",dangerouslySetInnerHTML:{__html:m(l)}})]})}},3001:function(e,t,n){n.d(t,{X:function(){return s}});var r=n(7294);function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:768,[t,n]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let t=()=>{n(window.innerWidth<e)};return t(),window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[e]),t}},2350:function(e,t,n){n.d(t,{cn:function(){return o}});var r=n(512),s=n(8388);function o(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,s.m6)((0,r.W)(t))}}}]);
@@ -1,15 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[488],{8671:function(e,n,t){t.d(n,{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,t(998).Z)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},3767:function(e,n,t){t.d(n,{Z:function(){return r}});/**
7
- * @license lucide-react v0.407.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */let r=(0,t(998).Z)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},6327:function(e,n,t){t.d(n,{x8:function(){return ea},VY:function(){return eo},dk:function(){return el},aV:function(){return er},h_:function(){return et},fC:function(){return ee},Dx:function(){return ei},xz:function(){return en}});var r=t(7294),o=t(6206),i=t(8771),l=t(5360),a=t(1276),u=t(7342),s=t(6063),d=t(5420),c=t(2651),f=t(9981),p=e=>{let n,t;let{present:o,children:l}=e,a=function(e){var n,t;let[o,i]=r.useState(),l=r.useRef(null),a=r.useRef(e),u=r.useRef("none"),[s,d]=(n=e?"mounted":"unmounted",t={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},r.useReducer((e,n)=>t[e][n]??e,n));return r.useEffect(()=>{let e=m(l.current);u.current="mounted"===s?e:"none"},[s]),(0,f.b)(()=>{let n=l.current,t=a.current;if(t!==e){let r=u.current,o=m(n);e?d("MOUNT"):"none"===o||n?.display==="none"?d("UNMOUNT"):t&&r!==o?d("ANIMATION_OUT"):d("UNMOUNT"),a.current=e}},[e,d]),(0,f.b)(()=>{if(o){let e;let n=o.ownerDocument.defaultView??window,t=t=>{let r=m(l.current).includes(t.animationName);if(t.target===o&&r&&(d("ANIMATION_END"),!a.current)){let t=o.style.animationFillMode;o.style.animationFillMode="forwards",e=n.setTimeout(()=>{"forwards"===o.style.animationFillMode&&(o.style.animationFillMode=t)})}},r=e=>{e.target===o&&(u.current=m(l.current))};return o.addEventListener("animationstart",r),o.addEventListener("animationcancel",t),o.addEventListener("animationend",t),()=>{n.clearTimeout(e),o.removeEventListener("animationstart",r),o.removeEventListener("animationcancel",t),o.removeEventListener("animationend",t)}}d("ANIMATION_END")},[o,d]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:r.useCallback(e=>{l.current=e?getComputedStyle(e):null,i(e)},[])}}(o),u="function"==typeof l?l({present:a.isPresent}):r.Children.only(l),s=(0,i.e)(a.ref,(n=Object.getOwnPropertyDescriptor(u.props,"ref")?.get)&&"isReactWarning"in n&&n.isReactWarning?u.ref:(n=Object.getOwnPropertyDescriptor(u,"ref")?.get)&&"isReactWarning"in n&&n.isReactWarning?u.props.ref:u.props.ref||u.ref);return"function"==typeof l||a.isPresent?r.cloneElement(u,{ref:s}):null};function m(e){return e?.animationName||"none"}p.displayName="Presence";var g=t(5320),v=t(7552),y=t(6223),N=t(3541),h=t(8426),D=t(5893),O="Dialog",[b,R]=(0,l.b)(O),[x,M]=b(O),j=e=>{let{__scopeDialog:n,children:t,open:o,defaultOpen:i,onOpenChange:l,modal:s=!0}=e,d=r.useRef(null),c=r.useRef(null),[f,p]=(0,u.T)({prop:o,defaultProp:i??!1,onChange:l,caller:O});return(0,D.jsx)(x,{scope:n,triggerRef:d,contentRef:c,contentId:(0,a.M)(),titleId:(0,a.M)(),descriptionId:(0,a.M)(),open:f,onOpenChange:p,onOpenToggle:r.useCallback(()=>p(e=>!e),[p]),modal:s,children:t})};j.displayName=O;var w="DialogTrigger",I=r.forwardRef((e,n)=>{let{__scopeDialog:t,...r}=e,l=M(w,t),a=(0,i.e)(n,l.triggerRef);return(0,D.jsx)(g.WV.button,{type:"button","aria-haspopup":"dialog","aria-expanded":l.open,"aria-controls":l.contentId,"data-state":H(l.open),...r,ref:a,onClick:(0,o.M)(e.onClick,l.onOpenToggle)})});I.displayName=w;var C="DialogPortal",[E,_]=b(C,{forceMount:void 0}),T=e=>{let{__scopeDialog:n,forceMount:t,children:o,container:i}=e,l=M(C,n);return(0,D.jsx)(E,{scope:n,forceMount:t,children:r.Children.map(o,e=>(0,D.jsx)(p,{present:t||l.open,children:(0,D.jsx)(c.h,{asChild:!0,container:i,children:e})}))})};T.displayName=C;var A="DialogOverlay",k=r.forwardRef((e,n)=>{let t=_(A,e.__scopeDialog),{forceMount:r=t.forceMount,...o}=e,i=M(A,e.__scopeDialog);return i.modal?(0,D.jsx)(p,{present:r||i.open,children:(0,D.jsx)(P,{...o,ref:n})}):null});k.displayName=A;var F=(0,h.Z8)("DialogOverlay.RemoveScroll"),P=r.forwardRef((e,n)=>{let{__scopeDialog:t,...r}=e,o=M(A,t);return(0,D.jsx)(y.Z,{as:F,allowPinchZoom:!0,shards:[o.contentRef],children:(0,D.jsx)(g.WV.div,{"data-state":H(o.open),...r,ref:n,style:{pointerEvents:"auto",...r.style}})})}),W="DialogContent",U=r.forwardRef((e,n)=>{let t=_(W,e.__scopeDialog),{forceMount:r=t.forceMount,...o}=e,i=M(W,e.__scopeDialog);return(0,D.jsx)(p,{present:r||i.open,children:i.modal?(0,D.jsx)(V,{...o,ref:n}):(0,D.jsx)(S,{...o,ref:n})})});U.displayName=W;var V=r.forwardRef((e,n)=>{let t=M(W,e.__scopeDialog),l=r.useRef(null),a=(0,i.e)(n,t.contentRef,l);return r.useEffect(()=>{let e=l.current;if(e)return(0,N.Ry)(e)},[]),(0,D.jsx)(Z,{...e,ref:a,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,o.M)(e.onCloseAutoFocus,e=>{e.preventDefault(),t.triggerRef.current?.focus()}),onPointerDownOutside:(0,o.M)(e.onPointerDownOutside,e=>{let n=e.detail.originalEvent,t=0===n.button&&!0===n.ctrlKey;(2===n.button||t)&&e.preventDefault()}),onFocusOutside:(0,o.M)(e.onFocusOutside,e=>e.preventDefault())})}),S=r.forwardRef((e,n)=>{let t=M(W,e.__scopeDialog),o=r.useRef(!1),i=r.useRef(!1);return(0,D.jsx)(Z,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:n=>{e.onCloseAutoFocus?.(n),n.defaultPrevented||(o.current||t.triggerRef.current?.focus(),n.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:n=>{e.onInteractOutside?.(n),n.defaultPrevented||(o.current=!0,"pointerdown"!==n.detail.originalEvent.type||(i.current=!0));let r=n.target;t.triggerRef.current?.contains(r)&&n.preventDefault(),"focusin"===n.detail.originalEvent.type&&i.current&&n.preventDefault()}})}),Z=r.forwardRef((e,n)=>{let{__scopeDialog:t,trapFocus:o,onOpenAutoFocus:l,onCloseAutoFocus:a,...u}=e,c=M(W,t),f=r.useRef(null),p=(0,i.e)(n,f);return(0,v.EW)(),(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(d.M,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:l,onUnmountAutoFocus:a,children:(0,D.jsx)(s.XB,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":H(c.open),...u,ref:p,onDismiss:()=>c.onOpenChange(!1)})}),(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(J,{titleId:c.titleId}),(0,D.jsx)(Q,{contentRef:f,descriptionId:c.descriptionId})]})]})}),L="DialogTitle",$=r.forwardRef((e,n)=>{let{__scopeDialog:t,...r}=e,o=M(L,t);return(0,D.jsx)(g.WV.h2,{id:o.titleId,...r,ref:n})});$.displayName=L;var B="DialogDescription",z=r.forwardRef((e,n)=>{let{__scopeDialog:t,...r}=e,o=M(B,t);return(0,D.jsx)(g.WV.p,{id:o.descriptionId,...r,ref:n})});z.displayName=B;var X="DialogClose",q=r.forwardRef((e,n)=>{let{__scopeDialog:t,...r}=e,i=M(X,t);return(0,D.jsx)(g.WV.button,{type:"button",...r,ref:n,onClick:(0,o.M)(e.onClick,()=>i.onOpenChange(!1))})});function H(e){return e?"open":"closed"}q.displayName=X;var K="DialogTitleWarning",[Y,G]=(0,l.k)(K,{contentName:W,titleName:L,docsSlug:"dialog"}),J=({titleId:e})=>{let n=G(K),t=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.
12
-
13
- If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
14
-
15
- For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return r.useEffect(()=>{e&&!document.getElementById(e)&&console.error(t)},[t,e]),null},Q=({contentRef:e,descriptionId:n})=>{let t=G("DialogDescriptionWarning"),o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${t.contentName}}.`;return r.useEffect(()=>{let t=e.current?.getAttribute("aria-describedby");n&&t&&!document.getElementById(n)&&console.warn(o)},[o,e,n]),null},ee=j,en=I,et=T,er=k,eo=U,ei=$,el=z,ea=q},2003:function(e,n,t){t.d(n,{j:function(){return l}});var r=t(512);let o=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,i=r.W,l=(e,n)=>t=>{var r;if((null==n?void 0:n.variants)==null)return i(e,null==t?void 0:t.class,null==t?void 0:t.className);let{variants:l,defaultVariants:a}=n,u=Object.keys(l).map(e=>{let n=null==t?void 0:t[e],r=null==a?void 0:a[e];if(null===n)return null;let i=o(n)||o(r);return l[e][i]}),s=t&&Object.entries(t).reduce((e,n)=>{let[t,r]=n;return void 0===r||(e[t]=r),e},{});return i(e,u,null==n?void 0:null===(r=n.compoundVariants)||void 0===r?void 0:r.reduce((e,n)=>{let{class:t,className:r,...o}=n;return Object.entries(o).every(e=>{let[n,t]=e;return Array.isArray(t)?t.includes({...a,...s}[n]):({...a,...s})[n]===t})?[...e,t,r]:e},[]),null==t?void 0:t.class,null==t?void 0:t.className)}}}]);
@@ -1,6 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[578],{9037:function(e,s,t){"use strict";t.d(s,{Cc:function(){return S},GV:function(){return z}});var r=t(5893),n=t(7294),l=t(1163),a=t(8799),c=t(6989),i=t(1664),o=t.n(i),d=t(803),h=t(7673),x=t(8764),u=t(3266),p=t(7324),j=t(4545),m=t(3626),f=t(998);/**
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 w=(0,f.Z)("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]),k=(0,f.Z)("SquareCode",[["path",{d:"M10 9.5 8 12l2 2.5",key:"3mjy60"}],["path",{d:"m14 9.5 2 2.5-2 2.5",key:"1bir2l"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);var g=t(9470),y=t(9284),N=t(9307),v=t(3001),b=t(8950);let C="__ALL_WORKSPACES__";function S(){let e=(0,l.useRouter)(),[s,t]=(0,n.useState)(!1),i=n.useRef(null),[h,x]=(0,n.useState)(!1),[j,f]=(0,n.useState)(!1),[w,k]=(0,n.useState)(null),[N,S]=(0,n.useState)(C),[M,L]=(0,n.useState)([]),O=(0,v.X)();return(0,n.useEffect)(()=>{e.isReady&&e.query.workspace&&S(Array.isArray(e.query.workspace)?e.query.workspace[0]:e.query.workspace)},[e.isReady,e.query.workspace]),(0,n.useEffect)(()=>{(async()=>{try{let e=await (0,p.fX)(),s=Object.keys(e),t=await (0,u.zd)(),r=[...new Set(t.map(e=>e.workspace||"default").filter(e=>e))],n=new Set(s);r.includes("default")&&n.has("default"),r.forEach(e=>n.add(e)),L(Array.from(n).sort())}catch(e){console.error("Error fetching data for workspace filter:",e),L(["default"])}})()},[]),(0,r.jsxs)(g.A,{highlighted:"clusters",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,r.jsxs)("div",{className:"text-base flex items-center",children:[(0,r.jsx)(o(),{href:"/clusters",className:"text-sky-blue hover:underline leading-none",children:"Sky Clusters"}),(0,r.jsxs)(b.Ph,{value:N,onValueChange:S,children:[(0,r.jsx)(b.i4,{className:"h-8 w-48 ml-4 mr-2 text-sm border-none focus:ring-0 focus:outline-none",children:(0,r.jsx)(b.ki,{placeholder:"Filter by workspace...",children:N===C?"All Workspaces":N})}),(0,r.jsxs)(b.Bw,{children:[(0,r.jsx)(b.Ql,{value:C,children:"All Workspaces"}),M.map(e=>(0,r.jsx)(b.Ql,{value:e,children:e},e))]})]})]}),(0,r.jsxs)("div",{className:"flex items-center",children:[s&&(0,r.jsxs)("div",{className:"flex items-center mr-2",children:[(0,r.jsx)(a.Z,{size:15,className:"mt-0"}),(0,r.jsx)("span",{className:"ml-2 text-gray-500",children:"Loading..."})]}),(0,r.jsxs)(d.z,{variant:"ghost",onClick:()=>{i.current&&i.current()},disabled:s,className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:[(0,r.jsx)(m.Z,{className:"h-4 w-4 mr-1.5"}),!O&&(0,r.jsx)("span",{children:"Refresh"})]})]})]}),(0,r.jsx)(_,{refreshInterval:c.yc,setLoading:t,refreshDataRef:i,workspaceFilter:N,onOpenSSHModal:e=>{k(e),x(!0)},onOpenVSCodeModal:e=>{k(e),f(!0)}}),(0,r.jsx)(y.Oh,{isOpen:h,onClose:()=>x(!1),cluster:w}),(0,r.jsx)(y._R,{isOpen:j,onClose:()=>f(!1),cluster:w})]})}function _(e){let{refreshInterval:s,setLoading:t,refreshDataRef:l,workspaceFilter:i,onOpenSSHModal:p,onOpenVSCodeModal:m}=e,[f,w]=(0,n.useState)([]),[k,g]=(0,n.useState)({key:null,direction:"ascending"}),[y,v]=(0,n.useState)(!1),[b,S]=(0,n.useState)(!0),[_,M]=(0,n.useState)(1),[L,O]=(0,n.useState)(10),R=n.useCallback(async()=>{t(!0),v(!0),w(await (0,u.zd)()),t(!1),v(!1),S(!1)},[t]),E=n.useMemo(()=>{let e=f;return i&&i!==C&&(e=f.filter(e=>(e.workspace||"default").toLowerCase()===i.toLowerCase())),(0,j.R0)(e,k.key,k.direction)},[f,k,i]);n.useEffect(()=>{l&&(l.current=R)},[l,R]),(0,n.useEffect)(()=>{w([]);let e=!0;R();let t=setInterval(()=>{e&&R()},s);return()=>{e=!1,clearInterval(t)}},[s,R]),(0,n.useEffect)(()=>{M(1)},[f.length]);let V=e=>{let s="ascending";k.key===e&&"ascending"===k.direction&&(s="descending"),g({key:e,direction:s})},A=e=>k.key===e?"ascending"===k.direction?" ↑":" ↓":"",W=Math.ceil(E.length/L),q=(_-1)*L,I=q+L,Z=E.slice(q,I);return(0,r.jsxs)("div",{children:[(0,r.jsx)(h.Zb,{children:(0,r.jsxs)(x.iA,{children:[(0,r.jsx)(x.xD,{children:(0,r.jsxs)(x.SC,{children:[(0,r.jsxs)(x.ss,{className:"sortable whitespace-nowrap",onClick:()=>V("status"),children:["Status",A("status")]}),(0,r.jsxs)(x.ss,{className:"sortable whitespace-nowrap",onClick:()=>V("cluster"),children:["Cluster",A("cluster")]}),(0,r.jsxs)(x.ss,{className:"sortable whitespace-nowrap",onClick:()=>V("user"),children:["User",A("user")]}),(0,r.jsxs)(x.ss,{className:"sortable whitespace-nowrap",onClick:()=>V("workspace"),children:["Workspace",A("workspace")]}),(0,r.jsxs)(x.ss,{className:"sortable whitespace-nowrap",onClick:()=>V("infra"),children:["Infra",A("infra")]}),(0,r.jsxs)(x.ss,{className:"sortable whitespace-nowrap",onClick:()=>V("resources_str"),children:["Resources",A("resources_str")]}),(0,r.jsxs)(x.ss,{className:"sortable whitespace-nowrap",onClick:()=>V("time"),children:["Started",A("time")]}),(0,r.jsx)(x.ss,{children:"Actions"})]})}),(0,r.jsx)(x.RM,{children:y&&b?(0,r.jsx)(x.SC,{children:(0,r.jsx)(x.pj,{colSpan:8,className:"text-center py-6 text-gray-500",children:(0,r.jsxs)("div",{className:"flex justify-center items-center",children:[(0,r.jsx)(a.Z,{size:20,className:"mr-2"}),(0,r.jsx)("span",{children:"Loading..."})]})})}):Z.length>0?Z.map((e,s)=>(0,r.jsxs)(x.SC,{children:[(0,r.jsx)(x.pj,{children:(0,r.jsx)(N.OE,{status:e.status})}),(0,r.jsx)(x.pj,{children:(0,r.jsx)(o(),{href:"/clusters/".concat(e.cluster),className:"text-blue-600",children:e.cluster})}),(0,r.jsx)(x.pj,{children:e.user}),(0,r.jsx)(x.pj,{children:(0,r.jsx)(o(),{href:"/workspaces",className:"text-blue-600 hover:underline",children:e.workspace||"default"})}),(0,r.jsx)(x.pj,{children:(0,r.jsx)(c.Md,{content:e.full_infra||e.infra,className:"text-sm text-muted-foreground",children:(0,r.jsxs)("span",{children:[(0,r.jsx)(o(),{href:"/infra",className:"text-blue-600 hover:underline",children:e.cloud}),e.infra.includes("(")&&(0,r.jsx)("span",{children:" "+e.infra.substring(e.infra.indexOf("("))})]})})}),(0,r.jsx)(x.pj,{children:(0,r.jsx)(c.Md,{content:e.resources_str_full||e.resources_str,className:"text-sm text-muted-foreground",children:(0,r.jsx)("span",{children:e.resources_str})})}),(0,r.jsx)(x.pj,{children:(0,c.GV)(e.time)}),(0,r.jsx)(x.pj,{className:"text-left",children:(0,r.jsx)(z,{cluster:e.cluster,status:e.status,onOpenSSHModal:p,onOpenVSCodeModal:m})})]},s)):(0,r.jsx)(x.SC,{children:(0,r.jsx)(x.pj,{colSpan:8,className:"text-center py-6 text-gray-500",children:"No active clusters"})})})]})}),f.length>0&&(0,r.jsx)("div",{className:"flex justify-end items-center py-2 px-4 text-sm text-gray-700",children:(0,r.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("span",{className:"mr-2",children:"Rows per page:"}),(0,r.jsxs)("div",{className:"relative inline-block",children:[(0,r.jsxs)("select",{value:L,onChange:e=>{O(parseInt(e.target.value,10)),M(1)},className:"py-1 pl-2 pr-6 appearance-none outline-none cursor-pointer border-none bg-transparent",style:{minWidth:"40px"},children:[(0,r.jsx)("option",{value:10,children:"10"}),(0,r.jsx)("option",{value:30,children:"30"}),(0,r.jsx)("option",{value:50,children:"50"}),(0,r.jsx)("option",{value:100,children:"100"}),(0,r.jsx)("option",{value:200,children:"200"})]}),(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-gray-500 absolute right-0 top-1/2 transform -translate-y-1/2 pointer-events-none",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),(0,r.jsxs)("div",{children:[q+1," – ",Math.min(I,f.length)," of"," ",f.length]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(d.z,{variant:"ghost",size:"icon",onClick:()=>{M(e=>Math.max(e-1,1))},disabled:1===_,className:"text-gray-500 h-8 w-8 p-0",children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"chevron-left",children:(0,r.jsx)("path",{d:"M15 18l-6-6 6-6"})})}),(0,r.jsx)(d.z,{variant:"ghost",size:"icon",onClick:()=>{M(e=>Math.min(e+1,W))},disabled:_===W||0===W,className:"text-gray-500 h-8 w-8 p-0",children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"chevron-right",children:(0,r.jsx)("path",{d:"M9 18l6-6-6-6"})})})]})]})})]})}let M=(e,s)=>{s&&s(e)},L=(e,s)=>{s?s(e):window.open("ssh://".concat(e))},O=e=>"RUNNING"===e?["connect","VSCode"]:[],R={connect:(0,r.jsx)(w,{className:"w-4 h-4 text-gray-500 inline-block"}),VSCode:(0,r.jsx)(k,{className:"w-4 h-4 text-gray-500 inline-block"})};function z(e){let{withLabel:s=!1,cluster:t,status:n,onOpenSSHModal:l,onOpenVSCodeModal:a}=e,i=O(n),o=(0,v.X)(),d=e=>{switch(e){case"connect":L(t,l);break;case"VSCode":M(t,a);break;default:return}};return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("div",{className:"flex items-center space-x-4",children:Object.entries(R).map(e=>{let t,n,[l,a]=e;switch(l){case"connect":t="Connect",n="Connect with SSH";break;case"VSCode":t="VSCode",n="Open in VS Code"}return(s||(t=""),i.includes(l))?(0,r.jsx)(c.WH,{content:n,className:"capitalize text-sm text-muted-foreground",children:(0,r.jsxs)("button",{onClick:()=>d(l),className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center",children:[a,!o&&(0,r.jsx)("span",{className:"ml-1.5",children:t})]})},l):(0,r.jsx)(c.WH,{content:n,className:"capitalize text-sm text-muted-foreground",children:(0,r.jsxs)("span",{className:"opacity-30 flex items-center cursor-not-allowed text-sm",title:l,children:[a,!o&&(0,r.jsx)("span",{className:"ml-1.5",children:t})]})},l)})})})}},9008:function(e,s,t){e.exports=t(7219)}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[627],{9307:function(e,t,s){s.d(t,{Cl:function(){return c},OE:function(){return d}});var a=s(5893);s(7294);var r=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"}},o=e=>{switch(e){case"LAUNCHING":case"STARTING":return(0,a.jsx)(r.Z,{size:12,className:"w-3 h-3 mr-1"});case"RUNNING":default:return(0,a.jsx)(l.W2,{className:"w-3 h-3 mr-1"});case"STOPPED":return(0,a.jsx)(l.fp,{className:"w-3 h-3 mr-1"});case"TERMINATED":case"FAILED":case"CANCELLED":return(0,a.jsx)(l.Ps,{className:"w-3 h-3 mr-1"});case"SUCCEEDED":return(0,a.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,a.jsx)(l.J$,{className:"w-3 h-3 mr-1"})}},i=e=>{let t=c(e),s=o(e);return(0,a.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,a.jsx)(n.WH,{content:t,className:"text-muted-foreground text-sm",children:(0,a.jsx)("span",{children:i(t)})})}},9284:function(e,t,s){s.d(t,{Oh:function(){return m},_R:function(){return f},cV:function(){return x}});var a=s(5893),r=s(7294),n=s(326),l=s(803),c=s(7673),o=s(8671),i=s(6989),d=s(3225),u=s(3001);function m(e){let{isOpen:t,onClose:s,cluster:d}=e,[u,m]=r.useState(!1),f=e=>{navigator.clipboard.writeText(e),m(!0),setTimeout(()=>m(!1),2e3)},x=["sky status ".concat(d),"ssh ".concat(d)],h=x.join("\n");return(0,a.jsx)(n.Vq,{open:t,onOpenChange:s,children:(0,a.jsxs)(n.cZ,{className:"sm:max-w-md",children:[(0,a.jsxs)(n.fK,{children:[(0,a.jsxs)(n.$N,{children:["Connect to: ",(0,a.jsx)("span",{className:"font-light",children:d})]}),(0,a.jsx)(n.Be,{children:"Use these instructions to connect to your cluster via SSH."})]}),(0,a.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-sm font-medium mb-2",children:"SSH Command"}),(0,a.jsx)(c.Zb,{className:"p-3 bg-gray-50",children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("pre",{className:"text-sm w-full whitespace-pre-wrap",children:x.map((e,t)=>(0,a.jsx)("code",{className:"block",children:e},t))}),(0,a.jsx)(i.WH,{content:u?"Copied!":"Copy command",children:(0,a.jsx)(l.z,{variant:"ghost",size:"icon",onClick:()=>f(h),className:"h-8 w-8 rounded-full",children:(0,a.jsx)(o.Z,{className:"h-4 w-4"})})})]})})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-sm font-medium mb-2",children:"Additional Information"}),(0,a.jsxs)("p",{className:"text-sm text-secondary-foreground",children:["Make sure to run"," ",(0,a.jsxs)("code",{className:"text-sm",children:["sky status ",d]})," first to have SkyPilot set up the SSH access."]})]})]})]})})}function f(e){let{isOpen:t,onClose:s,cluster:r}=e,m=(0,u.X)();return(0,a.jsx)(n.Vq,{open:t,onOpenChange:s,children:(0,a.jsx)(n.cZ,{className:"sm:max-w-3xl",children:(0,a.jsxs)(n.fK,{children:[(0,a.jsxs)(n.$N,{children:["Connect to: ",(0,a.jsx)("span",{className:"font-light",children:r})]}),(0,a.jsx)(n.Be,{children:(0,a.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-sm font-medium mb-2 my-2",children:"Setup SSH access"}),(0,a.jsx)(c.Zb,{className:"p-3 bg-gray-50",children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("pre",{className:"text-sm",children:(0,a.jsxs)("code",{children:["sky status ",r]})}),(0,a.jsx)(i.WH,{content:"Copy command",children:(0,a.jsx)(l.z,{variant:"ghost",size:"icon",onClick:()=>navigator.clipboard.writeText("sky status ".concat(r)),className:"h-8 w-8 rounded-full",children:(0,a.jsx)(o.Z,{className:"h-4 w-4"})})})]})})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-sm font-medium mb-2 my-2",children:"Connect with VSCode/Cursor"}),(0,a.jsx)(c.Zb,{className:"p-3 bg-gray-50",children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("pre",{className:"text-sm",children:(0,a.jsxs)("code",{children:["code --remote ssh-remote+",r]})}),(0,a.jsx)(i.WH,{content:"Copy command",children:(0,a.jsx)(l.z,{variant:"ghost",size:"icon",onClick:()=>navigator.clipboard.writeText("code --remote ssh-remote+".concat(r)),className:"h-8 w-8 rounded-full",children:(0,a.jsx)(o.Z,{className:"h-4 w-4"})})})]})})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-sm font-medium",children:"Or use the GUI to connect"}),(0,a.jsx)("div",{className:"relative ".concat(m?"-mt-5":"-mt-10"),style:{paddingBottom:"70%"},children:(0,a.jsxs)("video",{className:"absolute top-0 left-0 w-full h-full rounded-lg",controls:!0,autoPlay:!0,muted:!0,preload:"metadata",children:[(0,a.jsx)("source",{src:"".concat(d.GW,"/videos/cursor-small.mp4"),type:"video/mp4"}),"Your browser does not support the video tag."]})})]})]})})]})})})}function x(e){let{isOpen:t,onClose:s,onConfirm:r,title:c,message:o,confirmText:i="Confirm",confirmVariant:d="destructive"}=e;return(0,a.jsx)(n.Vq,{open:t,onOpenChange:s,children:(0,a.jsxs)(n.cZ,{className:"sm:max-w-md",children:[(0,a.jsxs)(n.fK,{children:[(0,a.jsx)(n.$N,{children:c}),(0,a.jsx)(n.Be,{children:o})]}),(0,a.jsxs)(n.cN,{className:"flex justify-end gap-2 pt-4",children:[(0,a.jsx)(l.z,{variant:"outline",onClick:s,children:"Cancel"}),(0,a.jsx)(l.z,{variant:d,onClick:()=>{r(),s()},children:i})]})]})})}},326:function(e,t,s){s.d(t,{$N:function(){return x},Be:function(){return h},Vq:function(){return o},cN:function(){return f},cZ:function(){return u},fK:function(){return m}});var a=s(5893),r=s(7294),n=s(6327),l=s(2350),c=s(3767);let o=n.fC;n.xz;let i=n.h_;n.x8;let d=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(n.aV,{ref:t,className:(0,l.cn)("fixed inset-0 z-50 bg-black/50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...r})});d.displayName=n.aV.displayName;let u=r.forwardRef((e,t)=>{let{className:s,children:r,...o}=e;return(0,a.jsxs)(i,{children:[(0,a.jsx)(d,{}),(0,a.jsxs)(n.VY,{ref:t,className:(0,l.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-gray-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",s),...o,children:[r,(0,a.jsxs)(n.x8,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-gray-400 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-gray-100 data-[state=open]:text-gray-500",children:[(0,a.jsx)(c.Z,{className:"h-4 w-4"}),(0,a.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});u.displayName=n.VY.displayName;let m=e=>{let{className:t,...s}=e;return(0,a.jsx)("div",{className:(0,l.cn)("flex flex-col space-y-1.5 text-center sm:text-left",t),...s})};m.displayName="DialogHeader";let f=e=>{let{className:t,...s}=e;return(0,a.jsx)("div",{className:(0,l.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...s})};f.displayName="DialogFooter";let x=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(n.Dx,{ref:t,className:(0,l.cn)("text-lg font-semibold leading-none tracking-tight",s),...r})});x.displayName=n.Dx.displayName;let h=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(n.dk,{ref:t,className:(0,l.cn)("text-sm text-gray-500",s),...r})});h.displayName=n.dk.displayName},8764:function(e,t,s){s.d(t,{RM:function(){return o},SC:function(){return i},iA:function(){return l},pj:function(){return u},ss:function(){return d},xD:function(){return c}});var a=s(5893),r=s(7294),n=s(2350);let l=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)("div",{className:"relative w-full overflow-auto",children:(0,a.jsx)("table",{ref:t,className:(0,n.cn)("w-full caption-bottom text-base",s),...r})})});l.displayName="Table";let c=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)("thead",{ref:t,className:(0,n.cn)("[&_tr]:border-b",s),...r})});c.displayName="TableHeader";let o=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)("tbody",{ref:t,className:(0,n.cn)("[&_tr:last-child]:border-0",s),...r})});o.displayName="TableBody",r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)("tfoot",{ref:t,className:(0,n.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",s),...r})}).displayName="TableFooter";let i=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)("tr",{ref:t,className:(0,n.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",s),...r})});i.displayName="TableRow";let d=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)("th",{ref:t,className:(0,n.cn)("h-12 px-4 text-left align-middle font-medium text-[hsl(var(--text-strong))] [&:has([role=checkbox])]:pr-0",s),...r})});d.displayName="TableHead";let u=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)("td",{ref:t,className:(0,n.cn)("p-4 align-middle [&:has([role=checkbox])]:pr-0",s),...r})});u.displayName="TableCell",r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)("caption",{ref:t,className:(0,n.cn)("mt-4 text-base text-muted-foreground",s),...r})}).displayName="TableCaption"},3266:function(e,t,s){s.d(t,{QL:function(){return d},Sl:function(){return o},zd:function(){return c}});var a=s(7294),r=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"),a=await fetch("".concat(n.f4,"/api/get?request_id=").concat(s)),r=await a.json();return(r.return_value?JSON.parse(r.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),a=s+(t-3)%2;return 0===s?e.substring(0,a)+"...":e.substring(0,a)+"..."+e.substring(e.length-s)}(t,25)),{status:l[e.status],cluster:e.name,user:e.user_name,user_hash:e.user_hash,cloud:e.cloud,infra:t?e.cloud+" ("+t+")":e.cloud,full_infra:s?"".concat(e.cloud," (").concat(s,")"):e.cloud,cpus:e.cpus,mem:e.memory,gpus:e.accelerators,resources_str:e.resources_str,resources_str_full:e.resources_str_full,time:new Date(1e3*e.launched_at),num_nodes:e.nodes,workspace:e.workspace,jobs:[],events:[{time:new Date(1e3*e.launched_at),event:"Cluster created."}]}})}catch(e){return console.error("Error fetching clusters:",e),[]}}async function o(e){let{clusterName:t,jobId:s,onNewLog:a,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 r=new TextDecoder().decode(s);a(r)}}catch(e){console.error("Error in streamClusterJobLogs:",e),(0,r.C)("Error in streamClusterJobLogs: ".concat(e.message),"error")}}async function i(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}})}),a=e.headers.get("X-Skypilot-Request-ID")||e.headers.get("X-Request-ID"),r=await fetch("".concat(n.f4,"/api/get?request_id=").concat(a)),l=await r.json();return JSON.parse(l.return_value).map(e=>{let s=e.end_at?e.end_at:Date.now()/1e3,a=0,r=0;return e.submitted_at&&(a=s-e.submitted_at),e.start_at&&(r=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:a,job_duration:r,infra:"",logs:""}})}catch(e){return console.error("Error fetching cluster jobs:",e),[]}}function d(e){let{cluster:t,job:s=null}=e,[r,n]=(0,a.useState)(null),[l,o]=(0,a.useState)(null),[d,u]=(0,a.useState)(!0),[m,f]=(0,a.useState)(!0),x=(0,a.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]),h=(0,a.useCallback)(async e=>{if(t)try{f(!0);let s=await i({clusterName:t,workspace:e||"default"});o(s)}catch(e){console.error("Error fetching cluster job data:",e)}finally{f(!1)}},[t]),p=(0,a.useCallback)(async()=>{let e=await x();e&&await h(e.workspace)},[x,h]);return(0,a.useEffect)(()=>{(async()=>{let e=await x();e&&await h(e.workspace)})()},[t,s,x,h]),{clusterData:r,clusterJobData:l,loading:d||m,refreshData:p}}},5821:function(e,t,s){s.d(t,{C:function(){return a}});function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",s=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 r=document.createElement("div");switch(r.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":r.className+=" bg-green-100 border-green-500 text-green-800";break;case"error":r.className+=" bg-red-100 border-red-500 text-red-800";break;case"warning":r.className+=" bg-yellow-100 border-yellow-500 text-yellow-800";break;default:r.className+=" bg-blue-100 border-blue-500 text-blue-800"}return r.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(r),r.querySelector("button").addEventListener("click",()=>{a.removeChild(r)}),setTimeout(()=>{a.contains(r)&&a.removeChild(r)},s),r}},4545:function(e,t,s){function a(e){return e.startsWith("sky-jobs-controller-")}function r(e,t,s){return null===t?e:[...e].sort((e,a)=>e[t]<a[t]?"ascending"===s?-1:1:e[t]>a[t]?"ascending"===s?1:-1:0)}s.d(t,{R0:function(){return r},Ym:function(){return a}})}}]);
@@ -1,11 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[843],{9333:function(e,s,l){"use strict";l.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,l(998).Z)("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]])},1812:function(e,s,l){"use strict";l.d(s,{X:function(){return n}});var a=l(5893),t=l(7294);let r=e=>{if(!(null==e?void 0:e.message))return"An unexpected error occurred.";let s=e.message;return s.includes("failed:")&&(s=s.split("failed:")[1].trim()),s.charAt(0).toUpperCase()+s.slice(1)},n=e=>{let{error:s,title:l="Error",onDismiss:n}=e,[c,i]=(0,t.useState)(!1);if((0,t.useEffect)(()=>{s&&i(!1)},[s]),!s||c)return null;let o="string"==typeof s?s:r(s);return(0,a.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-md p-3 mb-4",children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex",children:[(0,a.jsx)("div",{className:"flex-shrink-0",children:(0,a.jsx)("svg",{className:"h-5 w-5 text-red-400",viewBox:"0 0 20 20",fill:"currentColor",children:(0,a.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,a.jsx)("div",{className:"ml-3",children:(0,a.jsxs)("div",{className:"text-sm text-red-800",children:[(0,a.jsxs)("strong",{children:[l,":"]})," ",o]})})]}),(0,a.jsx)("button",{onClick:()=>{i(!0),n&&n()},className:"flex-shrink-0 ml-4 text-red-400 hover:text-red-600 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 focus:ring-offset-red-50 rounded","aria-label":"Dismiss error",children:(0,a.jsx)("svg",{className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",children:(0,a.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"})})})]})})}},5843:function(e,s,l){"use strict";l.d(s,{I:function(){return R}});var a=l(5893),t=l(7294),r=l(1163),n=l(7324),c=l(3266),i=l(8969),o=l(9470),d=l(1664),u=l.n(d),x=l(9008),h=l.n(x),m=l(7673),f=l(803),p=l(2350);let g=t.forwardRef((e,s)=>{let{className:l,...t}=e;return(0,a.jsx)("textarea",{className:(0,p.cn)("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",l),ref:s,...t})});g.displayName="Textarea";var b=l(8799),j=l(282),y=l(3626);/**
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 N=(0,l(998).Z)("Trash",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]]);var k=l(9333),v=l(326);let w=e=>{let{className:s="",variant:l="default",children:t,...r}=e;return(0,a.jsx)("div",{role:"alert",className:"".concat("relative w-full rounded-lg border p-4 flex items-start space-x-2"," ").concat({default:"bg-blue-50 border-blue-200 text-blue-800",destructive:"bg-red-50 border-red-200 text-red-800"}[l]," ").concat(s),...r,children:t})},C=e=>{let{className:s="",children:l,...t}=e;return(0,a.jsx)("div",{className:"text-sm leading-relaxed ".concat(s),...t,children:l})};var L=l(3850),E=l(1812),S=l(8236),D=l(3320),M=l.n(D),A=l(3225);let W=e=>{let{message:s}=e;return s?(0,a.jsxs)(w,{className:"border-green-200 bg-green-50",children:[(0,a.jsx)(j.Z,{className:"h-4 w-4 text-green-600"}),(0,a.jsx)(C,{className:"text-green-800",children:s})]}):null},z=e=>{let{workspaceName:s,config:l,enabledClouds:t=[]}=e;if(!l)return null;let r="default"===s,n=0===Object.keys(l).length;if(r&&n)return(0,a.jsx)("div",{className:"text-sm text-gray-500 mb-3 italic p-3 bg-sky-50 rounded border border-sky-200",children:"Workspace 'default' can use all accessible infrastructure."});let c=[],i=[],o=[],d=new Set(t.map(e=>e.toLowerCase()));Object.entries(l).forEach(e=>{let[s,l]=e,t=A.MN[s.toLowerCase()],r=d.has(null==t?void 0:t.toLowerCase());if((null==l?void 0:l.disabled)===!0)i.push(t);else if(l&&Object.keys(l).length>0){let e="";"gcp"===s.toLowerCase()&&l.project_id?e=" (Project ID: ".concat(l.project_id,")"):"aws"===s.toLowerCase()&&l.region&&(e=" (Region: ".concat(l.region,")")),r?c.push((0,a.jsxs)("span",{className:"block",children:[t,e," is enabled."]},"".concat(s,"-enabled"))):o.push((0,a.jsxs)("span",{className:"block text-amber-700",children:[t,e," is configured but not currently available."]},"".concat(s,"-configured-not-enabled")))}else r?c.push((0,a.jsxs)("span",{className:"block",children:[t," is enabled (using default settings)."]},"".concat(s,"-default-enabled"))):o.push((0,a.jsxs)("span",{className:"block text-amber-700",children:[t," is configured but not currently available."]},"".concat(s,"-default-not-enabled")))});let u=[];if(i.length>0){let e=i.join(" and ");u.push((0,a.jsxs)("span",{className:"block",children:[e," ",1===i.length?"is":"are"," explicitly disabled."]},"disabled-clouds"))}return(u.push(...c),u.push(...o),u.length>0)?(0,a.jsx)("div",{className:"text-sm text-gray-700 mb-3 p-3 bg-sky-50 rounded border border-sky-200",children:u}):!r&&n?(0,a.jsx)("div",{className:"text-sm text-gray-500 mb-3 italic p-3 bg-sky-50 rounded border border-sky-200",children:"This workspace has no specific cloud resource configurations and can use all accessible infrastructure."}):null};function R(e){let{workspaceName:s,isNewWorkspace:l=!1}=e,d=(0,r.useRouter)(),[x,p]=(0,t.useState)({}),[j,w]=(0,t.useState)({}),[C,D]=(0,t.useState)(""),[A,R]=(0,t.useState)(!0),[O,Z]=(0,t.useState)(!1),[_,T]=(0,t.useState)(!1),[Y,I]=(0,t.useState)(null),[P,V]=(0,t.useState)(null),[J,H]=(0,t.useState)(null),[X,B]=(0,t.useState)({showDialog:!1,deleting:!1,error:null}),[F,U]=(0,t.useState)({totalClusterCount:0,runningClusterCount:0,managedJobsCount:0,clouds:[]}),[G,q]=(0,t.useState)(!1),K=(0,t.useCallback)(async()=>{R(!0),I(null);try{let e;let l=(await (0,n.fX)())[s]||{};p(l),w(l),e=0===Object.keys(l).length?"".concat(s,":\n # Empty workspace configuration - uses all accessible infrastructure\n"):M().dump({[s]:l},{indent:2,lineWidth:-1,noRefs:!0,skipInvalid:!0,flowLevel:-1}),D(e)}catch(e){console.error("Error fetching workspace config:",e),I(e)}finally{R(!1)}},[s]),Q=(0,t.useCallback)(async()=>{if(!l){q(!0);try{let[e,l,a]=await Promise.all([(0,c.zd)(),(0,i.Vp)(),(0,n.yz)(s,!0)]),t=e.filter(e=>(e.workspace||"default")===s),r=t.filter(e=>"RUNNING"===e.status||"LAUNCHING"===e.status),o={};e.forEach(e=>{o[e.cluster]=e.workspace||"default"});let d=l.jobs||[],u=new Set(S.x2.active),x=0;d.forEach(e=>{let l=e.cluster_name||e.resources&&e.resources.cluster_name;l&&o[l]===s&&u.has(e.status)&&x++}),U({totalClusterCount:t.length,runningClusterCount:r.length,managedJobsCount:x,clouds:Array.isArray(a)?a:[]})}catch(e){console.error("Failed to fetch workspace stats:",e)}finally{q(!1)}}},[s,l]);(0,t.useEffect)(()=>{l?(R(!1),D("".concat(s,":\n # New workspace configuration\n # Leave empty to use all accessible infrastructure\n"))):(K(),Q())},[s,l,K,Q]),(0,t.useEffect)(()=>{T(JSON.stringify(x)!==JSON.stringify(j))},[x,j]);let $=e=>{D(e),H(null);try{let l=M().load(e)||{},a=Object.keys(l);if(0===a.length)p({});else if(1===a.length){let e=a[0];if(e!==s){H('Workspace name cannot be changed. Expected "'.concat(s,'" but found "').concat(e,'".'));return}let t=l[s]||{};p(t)}else H("Configuration must contain only one workspace. Found: ".concat(a.join(", ")))}catch(e){H("Invalid YAML: ".concat(e.message))}},ee=async()=>{Z(!0),I(null),V(null);try{if(J)throw Error("Please fix YAML errors before saving");let e=M().load(C)||{},a=Object.keys(e);if(a.length>0&&a[0]!==s)throw Error('Workspace name cannot be changed. Expected "'.concat(s,'".'));l?(await (0,n.MB)(s,x),V("Workspace created successfully!"),setTimeout(()=>{d.push("/workspaces/".concat(s))},1500)):(await (0,n.eA)(s,x),V("Workspace updated successfully!"),w(x),Q())}catch(e){console.error("Error saving workspace:",e),I(e)}finally{Z(!1)}},es=async()=>{B(e=>({...e,deleting:!0,error:null}));try{await (0,n.zl)(s),V("Workspace deleted successfully!"),setTimeout(()=>{d.push("/workspaces")},1500)}catch(e){console.error("Error deleting workspace:",e),B(s=>({...s,deleting:!1,error:e}))}},el=()=>{B({showDialog:!1,deleting:!1,error:null})},ea=async()=>{await Promise.all([K(),Q()])};if(!d.isReady)return(0,a.jsx)("div",{children:"Loading..."});let et=l?"Create New Workspace | SkyPilot Dashboard":"Workspace: ".concat(s," | SkyPilot Dashboard");return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(h(),{children:(0,a.jsx)("title",{children:et})}),(0,a.jsxs)(o.A,{highlighted:"workspaces",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)(u(),{href:"/workspaces",className:"text-sky-blue hover:underline",children:"Workspaces"}),(0,a.jsx)("span",{className:"mx-2 text-gray-500",children:"›"}),(0,a.jsx)(u(),{href:l?"/workspace/new":"/workspaces/".concat(s),className:"text-sky-blue hover:underline",children:l?"New Workspace":s}),_&&(0,a.jsx)("span",{className:"ml-3 px-2 py-1 bg-yellow-100 text-yellow-800 text-xs rounded",children:"Unsaved changes"})]}),(0,a.jsxs)("div",{className:"text-sm flex items-center",children:[(A||O||G)&&(0,a.jsxs)("div",{className:"flex items-center mr-4",children:[(0,a.jsx)(b.Z,{size:15,className:"mt-0"}),(0,a.jsx)("span",{className:"ml-2 text-gray-500",children:O?"Saving...":"Loading..."})]}),(0,a.jsxs)("div",{className:"flex items-center space-x-4",children:[!l&&(0,a.jsxs)("button",{onClick:ea,disabled:A||O||G,className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center",children:[(0,a.jsx)(y.Z,{className:"w-4 h-4 mr-1.5"}),"Refresh"]}),!l&&"default"!==s&&(0,a.jsxs)("button",{onClick:()=>B({...X,showDialog:!0}),disabled:X.deleting||O,className:"text-red-600 hover:text-red-700 font-medium inline-flex items-center",children:[(0,a.jsx)(N,{className:"w-4 h-4 mr-1.5"}),"Delete"]})]})]})]}),A?(0,a.jsxs)("div",{className:"flex justify-center items-center py-12",children:[(0,a.jsx)(b.Z,{size:24,className:"mr-2"}),(0,a.jsx)("span",{className:"text-gray-500",children:"Loading workspace configuration..."})]}):(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)(E.X,{error:Y,title:"Error",onDismiss:()=>I(null)}),(0,a.jsx)(W,{message:P}),(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[!l&&(0,a.jsx)("div",{className:"lg:col-span-1",children:(0,a.jsxs)(m.Zb,{className:"h-full",children:[(0,a.jsx)(m.Ol,{children:(0,a.jsxs)(m.ll,{className:"text-base font-normal",children:[(0,a.jsx)("span",{className:"font-semibold",children:"Workspace:"})," ",s]})}),(0,a.jsxs)(m.aY,{className:"text-sm pb-2 flex-1",children:[(0,a.jsxs)("div",{className:"py-2 flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center text-gray-600",children:[(0,a.jsx)(L.QT,{className:"w-4 h-4 mr-2 text-gray-500"}),(0,a.jsx)("span",{children:"Clusters (Running / Total)"})]}),(0,a.jsx)("span",{className:"font-normal text-gray-800",children:G?"...":"".concat(F.runningClusterCount," / ").concat(F.totalClusterCount)})]}),(0,a.jsxs)("div",{className:"py-2 flex items-center justify-between border-t border-gray-100",children:[(0,a.jsxs)("div",{className:"flex items-center text-gray-600",children:[(0,a.jsx)(L.Vp,{className:"w-4 h-4 mr-2 text-gray-500"}),(0,a.jsx)("span",{children:"Managed Jobs"})]}),(0,a.jsx)("span",{className:"font-normal text-gray-800",children:G?"...":F.managedJobsCount})]})]}),(0,a.jsxs)("div",{className:"px-6 pb-6 text-sm pt-3",children:[(0,a.jsx)("h4",{className:"mb-2 text-xs text-gray-500 tracking-wider",children:"Enabled Infra"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-x-4 gap-y-1",children:G?(0,a.jsx)("span",{className:"text-gray-500",children:"Loading..."}):F.clouds.length>0?F.clouds.map(e=>(0,a.jsxs)("div",{className:"flex items-center text-gray-700",children:[(0,a.jsx)(L.Ye,{className:"w-3.5 h-3.5 mr-1.5 text-green-500"}),(0,a.jsx)("span",{children:e})]},e)):(0,a.jsx)("span",{className:"text-gray-500 italic",children:"No enabled infrastructure"})}),(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsx)(z,{workspaceName:s,config:j,enabledClouds:F.clouds})})]})]})}),(0,a.jsx)("div",{className:l?"lg:col-span-3":"lg:col-span-2",children:(0,a.jsxs)(m.Zb,{className:"h-full flex flex-col",children:[(0,a.jsx)(m.Ol,{children:(0,a.jsx)(m.ll,{className:"text-base font-normal",children:l?"New Workspace YAML":"Edit Workspace YAML"})}),(0,a.jsx)(m.aY,{className:"flex-1 flex flex-col",children:(0,a.jsxs)("div",{className:"space-y-4 flex-1 flex flex-col",children:[J&&(0,a.jsx)(E.X,{error:J,onDismiss:()=>H(null)}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col",children:[(0,a.jsxs)("p",{className:"text-sm text-gray-600 mb-3",children:["Configure infra-specific settings for this workspace. Leave empty to use all accessible infrastructure. Refer to"," ",(0,a.jsx)("a",{href:"https://docs.skypilot.co/en/latest/admin/workspaces.html#configuration",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600",children:"SkyPilot Docs"})," ","for more details."]}),(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("h4",{className:"text-sm font-medium text-gray-700 mb-2",children:"Example configuration:"}),(0,a.jsx)("div",{className:"p-3 bg-gray-50 border rounded-lg",children:(0,a.jsx)("pre",{className:"text-xs font-mono text-gray-600 whitespace-pre-wrap",children:"".concat(s||"my-workspace",":\n gcp:\n project_id: xxx\n disabled: false\n kubernetes:\n allowed_contexts:\n - context-1")})})]}),(0,a.jsx)(g,{value:C,onChange:e=>$(e.target.value),className:"font-mono text-sm flex-1 resize-none",style:{minHeight:"350px"},spellCheck:!1,placeholder:"# Enter workspace configuration in YAML format"}),(0,a.jsx)("div",{className:"flex justify-end space-x-3 pt-3 border-gray-200",children:(0,a.jsxs)(f.z,{onClick:ee,disabled:O||J||A,className:"inline-flex items-center bg-blue-600 hover:bg-blue-700 text-white",children:[(0,a.jsx)(k.Z,{className:"w-4 h-4 mr-1.5"}),O?"Applying...":"Apply"]})})]})]})})]})})]})]}),(0,a.jsx)(v.Vq,{open:X.showDialog,onOpenChange:el,children:(0,a.jsxs)(v.cZ,{className:"sm:max-w-md",children:[(0,a.jsxs)(v.fK,{className:"",children:[(0,a.jsx)(v.$N,{children:"Delete Workspace"}),(0,a.jsxs)(v.Be,{children:['Are you sure you want to delete workspace "',s,'"? This action cannot be undone.']})]}),X.error&&(0,a.jsx)(E.X,{error:X.error,title:"Deletion Failed",onDismiss:()=>B(e=>({...e,error:null}))}),(0,a.jsxs)(v.cN,{className:"",children:[(0,a.jsx)(f.z,{variant:"outline",onClick:el,disabled:X.deleting,children:"Cancel"}),(0,a.jsx)(f.z,{variant:"destructive",onClick:es,disabled:X.deleting,children:X.deleting?"Deleting...":"Delete"})]})]})})]})]})}},9008:function(e,s,l){e.exports=l(7219)}}]);