skypilot-nightly 1.0.0.dev20250607__py3-none-any.whl → 1.0.0.dev20250609__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 (79) hide show
  1. sky/__init__.py +2 -2
  2. sky/backends/backend_utils.py +18 -2
  3. sky/check.py +4 -3
  4. sky/cli.py +5 -6
  5. sky/client/cli.py +5 -6
  6. sky/core.py +3 -2
  7. sky/dashboard/out/404.html +1 -1
  8. sky/dashboard/out/_next/static/chunks/470-680c19413b8f808b.js +1 -0
  9. sky/dashboard/out/_next/static/chunks/{614-635a84e87800f99e.js → 63-e2d7b1e75e67c713.js} +8 -8
  10. sky/dashboard/out/_next/static/chunks/843-16c7194621b2b512.js +11 -0
  11. sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/{[job]-18aed9b56247d074.js → [job]-d31688d3e52736dd.js} +1 -1
  12. sky/dashboard/out/_next/static/chunks/pages/clusters/{[cluster]-b919a73aecdfa78f.js → [cluster]-e7d8710a9b0491e5.js} +1 -1
  13. sky/dashboard/out/_next/static/chunks/pages/{clusters-4f6b9dd9abcb33ad.js → clusters-3c674e5d970e05cb.js} +1 -1
  14. sky/dashboard/out/_next/static/chunks/pages/config-3aac7a015c6eede1.js +6 -0
  15. sky/dashboard/out/_next/static/chunks/pages/infra/{[context]-3a18d0eeb5119fe4.js → [context]-46d2e4ad6c487260.js} +1 -1
  16. sky/dashboard/out/_next/static/chunks/pages/{infra-a1a6abeeb58c1051.js → infra-7013d816a2a0e76c.js} +1 -1
  17. sky/dashboard/out/_next/static/chunks/pages/jobs/{[job]-1354e28c81eeb686.js → [job]-f7f0c9e156d328bc.js} +1 -1
  18. sky/dashboard/out/_next/static/chunks/pages/{jobs-23bfc8bf373423db.js → jobs-87e60396c376292f.js} +1 -1
  19. sky/dashboard/out/_next/static/chunks/pages/users-9355a0f13d1db61d.js +16 -0
  20. sky/dashboard/out/_next/static/chunks/pages/workspace/{new-e1f9c0c3ff7ac4bd.js → new-9a749cca1813bd27.js} +1 -1
  21. sky/dashboard/out/_next/static/chunks/pages/workspaces/{[name]-686590e0ee4b2412.js → [name]-8eeb628e03902f1b.js} +1 -1
  22. sky/dashboard/out/_next/static/chunks/pages/workspaces-8fbcc5ab4af316d0.js +1 -0
  23. sky/dashboard/out/_next/static/css/8b1c8321d4c02372.css +3 -0
  24. sky/dashboard/out/_next/static/xos0euNCptbGAM7_Q3Acl/_buildManifest.js +1 -0
  25. sky/dashboard/out/clusters/[cluster]/[job].html +1 -1
  26. sky/dashboard/out/clusters/[cluster].html +1 -1
  27. sky/dashboard/out/clusters.html +1 -1
  28. sky/dashboard/out/config.html +1 -1
  29. sky/dashboard/out/index.html +1 -1
  30. sky/dashboard/out/infra/[context].html +1 -1
  31. sky/dashboard/out/infra.html +1 -1
  32. sky/dashboard/out/jobs/[job].html +1 -1
  33. sky/dashboard/out/jobs.html +1 -1
  34. sky/dashboard/out/users.html +1 -1
  35. sky/dashboard/out/workspace/new.html +1 -1
  36. sky/dashboard/out/workspaces/[name].html +1 -1
  37. sky/dashboard/out/workspaces.html +1 -1
  38. sky/exceptions.py +5 -0
  39. sky/global_user_state.py +11 -6
  40. sky/jobs/server/core.py +9 -1
  41. sky/jobs/server/server.py +0 -95
  42. sky/jobs/utils.py +2 -1
  43. sky/models.py +18 -0
  44. sky/serve/server/core.py +1 -1
  45. sky/server/common.py +4 -2
  46. sky/server/constants.py +0 -2
  47. sky/server/requests/executor.py +10 -2
  48. sky/server/requests/requests.py +4 -3
  49. sky/server/server.py +22 -5
  50. sky/skylet/constants.py +3 -0
  51. sky/skylet/job_lib.py +2 -1
  52. sky/skypilot_config.py +9 -0
  53. sky/users/model.conf +1 -1
  54. sky/users/permission.py +148 -31
  55. sky/users/rbac.py +26 -0
  56. sky/users/server.py +14 -13
  57. sky/utils/common.py +6 -1
  58. sky/utils/common_utils.py +21 -3
  59. sky/utils/schemas.py +9 -0
  60. sky/workspaces/core.py +100 -8
  61. sky/workspaces/server.py +15 -2
  62. sky/workspaces/utils.py +56 -0
  63. {skypilot_nightly-1.0.0.dev20250607.dist-info → skypilot_nightly-1.0.0.dev20250609.dist-info}/METADATA +1 -1
  64. {skypilot_nightly-1.0.0.dev20250607.dist-info → skypilot_nightly-1.0.0.dev20250609.dist-info}/RECORD +72 -71
  65. sky/dashboard/out/_next/static/1qG0HTmVilJPxQdBk0fX5/_buildManifest.js +0 -1
  66. sky/dashboard/out/_next/static/chunks/470-ad1e0db3afcbd9c9.js +0 -1
  67. sky/dashboard/out/_next/static/chunks/843-c296541442d4af88.js +0 -11
  68. sky/dashboard/out/_next/static/chunks/pages/config-fe375a56342cf609.js +0 -6
  69. sky/dashboard/out/_next/static/chunks/pages/users-5800045bd04e69c2.js +0 -16
  70. sky/dashboard/out/_next/static/chunks/pages/workspaces-76b07aa5da91b0df.js +0 -1
  71. sky/dashboard/out/_next/static/css/667d941a2888ce6e.css +0 -3
  72. /sky/dashboard/out/_next/static/chunks/{856-3a32da4b84176f6d.js → 856-affc52adf5403a3a.js} +0 -0
  73. /sky/dashboard/out/_next/static/chunks/{973-6d78a0814682d771.js → 973-aed916d5b02d2d63.js} +0 -0
  74. /sky/dashboard/out/_next/static/chunks/pages/{_app-cb81dc4d27f4d009.js → _app-5f16aba5794ee8e7.js} +0 -0
  75. /sky/dashboard/out/_next/static/{1qG0HTmVilJPxQdBk0fX5 → xos0euNCptbGAM7_Q3Acl}/_ssgManifest.js +0 -0
  76. {skypilot_nightly-1.0.0.dev20250607.dist-info → skypilot_nightly-1.0.0.dev20250609.dist-info}/WHEEL +0 -0
  77. {skypilot_nightly-1.0.0.dev20250607.dist-info → skypilot_nightly-1.0.0.dev20250609.dist-info}/entry_points.txt +0 -0
  78. {skypilot_nightly-1.0.0.dev20250607.dist-info → skypilot_nightly-1.0.0.dev20250609.dist-info}/licenses/LICENSE +0 -0
  79. {skypilot_nightly-1.0.0.dev20250607.dist-info → skypilot_nightly-1.0.0.dev20250609.dist-info}/top_level.txt +0 -0
@@ -1,19 +1,19 @@
1
- sky/__init__.py,sha256=D3diXu4kUWENok8_cvEs9fr5kO5FbPdGt3mat5BQ1oQ,6413
1
+ sky/__init__.py,sha256=cKtA4h0rds-nZUW00PHwy1b2pEdYdUtkxcKlWDp6CHg,6413
2
2
  sky/admin_policy.py,sha256=OsMSRbLPfuuUBCJi-q2pMCr1gcFOS8-AZmGsvGvhH0E,3567
3
3
  sky/authentication.py,sha256=jEo4hsbKqnutG-ictNT74vXUfTV85ePKtWY8E5V6Iac,25119
4
- sky/check.py,sha256=eaLrOmX5pbboe2n6pOWU6Q6dX4NJFGZ_TXha--F_J3E,28366
5
- sky/cli.py,sha256=at8oF_2Ym7iJ7HfKgQLSxhCUELCkIe2q4xRcFBgLQxA,245416
4
+ sky/check.py,sha256=T8EFZ_x7lVfSgK1nVWw3jsMjvicH180PFz6FoyG6OTk,28412
5
+ sky/cli.py,sha256=QXmH_ai4ZdHDdQvCLrgH9_vlifs41gnAbdV0Cc5Hn14,245365
6
6
  sky/cloud_stores.py,sha256=Ln5GBpel-sEs7rVx7bBrMkfLwA_bctI05Rox2uoz7Lo,26388
7
- sky/core.py,sha256=neMpeErhPWHbJICArkY0jrBQ4hcZ70iWyhZqDOGe34A,52174
7
+ sky/core.py,sha256=1A2vRsNScNduqZITNJXzwgQ2d49YGa1O6WG5x_Wkg1Q,52185
8
8
  sky/dag.py,sha256=8x-VMtjvSi0lYBemCMPLYq5ONljhoABjWzMKjmmdjSo,3369
9
- sky/exceptions.py,sha256=MKkGTj6ixRgZ7bSoTS4LkyDTC0XlGcUzO6G4SlmTeHM,17707
9
+ sky/exceptions.py,sha256=xqVoif5k2Z7XbS9g8QTx7QcSdRV4qIJ53GhZ4N5RT9M,17834
10
10
  sky/execution.py,sha256=LIRTPuRJFyvNkx1ZlIyUhbcy7k4YUnU-MEx6lnH1pg0,32990
11
- sky/global_user_state.py,sha256=XgYqgHkGLGgHoQckJ5i8sPCE_6ezceBgNgdgVC42geI,48684
12
- sky/models.py,sha256=Y4VS_EZ3XDWnXZyklEGsH2WUJrlbo2CGRjILF990RVk,1650
11
+ sky/global_user_state.py,sha256=LCznjl92Ro40w_gAoI4KEpUa86OKbLJB1ZaXSMaA5l4,48852
12
+ sky/models.py,sha256=VGMzCHRwjJRQBm6Y054vL6Yvfkrcm79b5dPpdXS3Syk,2183
13
13
  sky/optimizer.py,sha256=2JZl6exFMuOAzpWefvfY9CZPWnvjDLLvR92A2qpvtRs,61418
14
14
  sky/resources.py,sha256=pmDPdoScIQy_9kAlBdGTeRqtWfafKlcqUAA-NrtxfVk,97155
15
15
  sky/sky_logging.py,sha256=cMurxhFExKEFX1frcMR71Ti_s9Obg9WY30veVxsZB6o,7285
16
- sky/skypilot_config.py,sha256=NWqCEMLiP8ZVHcEQkjNs84C4hM5UDVummuV5xd8KE9s,30822
16
+ sky/skypilot_config.py,sha256=SIZRYe2VA4fkIq2hEaN6OUnDREuidThdwpeEnl-63Zk,31180
17
17
  sky/task.py,sha256=AEQqeJ2SHuBj36mdWjyF2OrLXwJ20Jnv-7Sw3g4m0bc,59240
18
18
  sky/adaptors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
19
  sky/adaptors/aws.py,sha256=4caUTO5nxZQyDVPyQdoPljaF-Lz_Fa6NEnu3FfmLZd4,8633
@@ -33,7 +33,7 @@ sky/adaptors/vast.py,sha256=tpvmHi7IkQNzbbHVkeo04kUSajoEpSzXr2XgeO_I1LU,695
33
33
  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
- sky/backends/backend_utils.py,sha256=YpvxvdCJq-q9WvCn4tk-xgk9TDPLPOSjczOHC9LM5ak,139687
36
+ sky/backends/backend_utils.py,sha256=RuNHihKFeozv1MfYRebJ_RWAhON38I53hFWu2Zub5bw,140297
37
37
  sky/backends/cloud_vm_ray_backend.py,sha256=CjKaVYumoNNEG4xbPHwtD_SC7SfMBLBi73qYmcGNtFk,257833
38
38
  sky/backends/docker_utils.py,sha256=Hyw1YY20EyghhEbYx6O2FIMDcGkNzBzV9TM7LFynei8,8358
39
39
  sky/backends/local_docker_backend.py,sha256=r80BGJZmAH8F49v6Y_pG3_pHmW5LQEQRusLkKoYoe9Q,17047
@@ -74,7 +74,7 @@ sky/catalog/data_fetchers/fetch_lambda_cloud.py,sha256=MUzogyLruLQmIt-To6TsfnGPg
74
74
  sky/catalog/data_fetchers/fetch_vast.py,sha256=MRxk52FUeG-R2hPUbkH44HXRPou73dxXWYAHDEXg3xU,5016
75
75
  sky/catalog/data_fetchers/fetch_vsphere.py,sha256=Yf7tKzwJsQ_4f64IT1EAP108C1D3Rg35RUIwp7UX8KI,21438
76
76
  sky/client/__init__.py,sha256=pz6xvVSd9X-gwqbsDL0E9QOojYqM0KAD0j-NCyCIF1k,38
77
- sky/client/cli.py,sha256=at8oF_2Ym7iJ7HfKgQLSxhCUELCkIe2q4xRcFBgLQxA,245416
77
+ sky/client/cli.py,sha256=QXmH_ai4ZdHDdQvCLrgH9_vlifs41gnAbdV0Cc5Hn14,245365
78
78
  sky/client/common.py,sha256=E_5cjxd8fWRB7fU1yfIbiyQf-IyVhpD5KkB7Fl3cQEI,15215
79
79
  sky/client/oauth.py,sha256=sNJ_DMsSTcxluj5FeNQ2IafZJLImRFmCAZ79bXeABn4,2871
80
80
  sky/client/sdk.py,sha256=KESnrEhuzqM7XnjBTKNY-rMvrYL6gUA9K-qVqHVkgxk,82253
@@ -103,60 +103,60 @@ sky/clouds/utils/azure_utils.py,sha256=NToRBnhEyuUvb-nBnsKTxjhOBRkMcrelL8LK4w6s4
103
103
  sky/clouds/utils/gcp_utils.py,sha256=rh4a91euYFflq6V7bLpY9XnAwnwyNczRueOShpD-E8U,7204
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=AdY1A2SbRo_AAF2__GZDRRY6vVbAOJl1VBn1xTYD4jY,2296
107
- sky/dashboard/out/clusters.html,sha256=w_OfIzMkNN4bOSDNtiFwNwpEotcjFUUfxKu2AARgwdI,14889
108
- sky/dashboard/out/config.html,sha256=1ta9cM2JjfdgS8owsW_pkWwbkRTPYNcD78lNCTcS-98,15092
106
+ sky/dashboard/out/404.html,sha256=QCsZfxABsoQQu2F43C0yzfJr2YM-qDH_1OhjrCtnzhQ,2296
107
+ sky/dashboard/out/clusters.html,sha256=qk4cyvm4coWUbUxbXdJPufZMVtdrfWrc6_ndeiAVDiM,14888
108
+ sky/dashboard/out/config.html,sha256=8XMeuAs7cEbG05NGuCTzFxhBHvdFe-T_KPi6Ol9PRA8,15091
109
109
  sky/dashboard/out/favicon.ico,sha256=XilUZZglAl_1zRsg85QsbQgmQAzGPQjcUIJ-A3AzYn8,93590
110
- sky/dashboard/out/index.html,sha256=5LtCe3-X7yduE0y7aL4DI52x4Y95a1_gxbLeAw4rJOA,1407
111
- sky/dashboard/out/infra.html,sha256=YvSjxa2xuU-q4Rn527hzVr4vVay2n7dgaSdLme7kBXM,15586
112
- sky/dashboard/out/jobs.html,sha256=8-soBwB_TUOo6Rj9v7O7GAqkDPrp4cQUzU74Dm_VNbE,17785
110
+ sky/dashboard/out/index.html,sha256=WdoHc9e7IJyJ93sB8-sbzmMHP9beUJ50kATGM41CO1A,1407
111
+ sky/dashboard/out/infra.html,sha256=ksgKF7u-9pVLrWfTrwctRyzYNLaT03f61aZteFrH4gA,15585
112
+ sky/dashboard/out/jobs.html,sha256=ChLhu7twD5eNv5gMIc_nxVvFeXoqP18OoVTmwwvdhzw,17784
113
113
  sky/dashboard/out/skypilot.svg,sha256=c0iRtlfLlaUm2p0rG9NFmo5FN0Qhf3pq5Xph-AeMPJw,5064
114
- sky/dashboard/out/users.html,sha256=GsrMwFmN13wqSbCNqZsEiljvoMPCtovAK61k4Vjiha0,13393
115
- sky/dashboard/out/workspaces.html,sha256=YF8XpspOLpKQu97oKWhRUHosvVkz40NMbEkDHKk2zuk,13169
116
- sky/dashboard/out/_next/static/1qG0HTmVilJPxQdBk0fX5/_buildManifest.js,sha256=EiyZ61lZYpd34oLrGPeHzzDcBa33pl0_Ox1Bm6nUvbM,2010
117
- sky/dashboard/out/_next/static/1qG0HTmVilJPxQdBk0fX5/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
114
+ sky/dashboard/out/users.html,sha256=B9DOE47EnB06iQZtMFDfAQNsJ9nHesMzvSFx4CeMasc,13392
115
+ sky/dashboard/out/workspaces.html,sha256=ARVT3Z53isa90SCQ-XBGDGGQHLjsKLFch3drGXwLGLw,13168
118
116
  sky/dashboard/out/_next/static/chunks/121-865d2bf8a3b84c6a.js,sha256=RIwzzRiPiEGM8PV-7Wesb3CkChfz9cgvLseMyKfD_MY,9292
119
117
  sky/dashboard/out/_next/static/chunks/236-619ed0248fb6fdd9.js,sha256=2tFduyAXzB8EqnqqyuU3yyjAfepiSJkL9nPovhmfiD0,24812
120
118
  sky/dashboard/out/_next/static/chunks/293-351268365226d251.js,sha256=kIKGZcJd0zyOkyYylqy_sRcpCMk2bjzq5A_6-Hrt0b8,12465
121
119
  sky/dashboard/out/_next/static/chunks/37-600191c5804dcae2.js,sha256=xN1vjy0wvSL09KK8Ac_JfXo5aGaM8hiSEFCjRPJTUqc,10434
122
- sky/dashboard/out/_next/static/chunks/470-ad1e0db3afcbd9c9.js,sha256=zS0ZeRJav_RrxHjRoTsvx_F-dXVPrkyU-aWU9s1aBQg,23057
123
- sky/dashboard/out/_next/static/chunks/614-635a84e87800f99e.js,sha256=qHnrL1bnyATCis8Yc2ccrigNWilAm7x15RutUHgi_GU,284919
120
+ sky/dashboard/out/_next/static/chunks/470-680c19413b8f808b.js,sha256=U9gJ9EcLhx_e66T9O1BKjB6cGCQkQFWoAyRptwZSIKA,24182
121
+ sky/dashboard/out/_next/static/chunks/63-e2d7b1e75e67c713.js,sha256=4eHnF9fKz1Hdm08WMo4LTXmOintaYeFYazmTowYCwLM,284855
124
122
  sky/dashboard/out/_next/static/chunks/682-b60cfdacc15202e8.js,sha256=fNx6ANTK4A_T0L3gsBzYRm6lQy7Mwbv0g4DfXE3ZBUY,17179
125
123
  sky/dashboard/out/_next/static/chunks/798-c0525dc3f21e488d.js,sha256=qROA0j-IKFdZFhQdWglA67iuCH8pf6mQRDqD6Q4hy00,38450
126
- sky/dashboard/out/_next/static/chunks/843-c296541442d4af88.js,sha256=K32I4DcgHhwuliF47ZVauksEx3xL5xKz6Zc9_ez9iLw,15559
127
- sky/dashboard/out/_next/static/chunks/856-3a32da4b84176f6d.js,sha256=yhG6cHmlYb0nGYyPPuJE48a_z-i5Fr0OW34Pe07fxps,14350
124
+ sky/dashboard/out/_next/static/chunks/843-16c7194621b2b512.js,sha256=FrfZutdkx_P5Wot2JdVs-cThGmvUWYMS4TsrpIWycBM,17666
125
+ sky/dashboard/out/_next/static/chunks/856-affc52adf5403a3a.js,sha256=yhG6cHmlYb0nGYyPPuJE48a_z-i5Fr0OW34Pe07fxps,14350
128
126
  sky/dashboard/out/_next/static/chunks/937.3759f538f11a0953.js,sha256=IaXGhx7oSJ72AJzmF9c1IoK02F_rVo_YlnM2WWofWPo,54431
129
127
  sky/dashboard/out/_next/static/chunks/969-2c584e28e6b4b106.js,sha256=tRl8jMk2D98I0UxvVqM59El21gsKjB_G4Tao9yxMAE8,9815
130
- sky/dashboard/out/_next/static/chunks/973-6d78a0814682d771.js,sha256=FX5vd4dAVB6dunaX8-NwjALoZ-s-orU9Qq1YaL3UTAI,13521
128
+ sky/dashboard/out/_next/static/chunks/973-aed916d5b02d2d63.js,sha256=FX5vd4dAVB6dunaX8-NwjALoZ-s-orU9Qq1YaL3UTAI,13521
131
129
  sky/dashboard/out/_next/static/chunks/fd9d1056-2821b0f0cabcd8bd.js,sha256=ce2WOATL1LdzsWouKQ-1NCiBQJmcykgzqP8wCp1yqbE,172831
132
130
  sky/dashboard/out/_next/static/chunks/framework-87d061ee6ed71b28.js,sha256=dh6TKdXcSRoGP4HqHe2uwzWCZBPz16dyTWufLsxeRvM,140942
133
131
  sky/dashboard/out/_next/static/chunks/main-app-241eb28595532291.js,sha256=P0_tU7pqs_pOQaw-lVzCNl6recBw5lFfkAD0jRk2uzc,115881
134
132
  sky/dashboard/out/_next/static/chunks/main-e0e2335212e72357.js,sha256=BxTmVbZDnMUQvQd57MEl1Ui0VZaNmwLOviY7h_xMjP0,109884
135
133
  sky/dashboard/out/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js,sha256=6QPOwdWeAVe8x-SsiDrm-Ga6u2DkqgG5SFqglrlyIgA,91381
136
134
  sky/dashboard/out/_next/static/chunks/webpack-65d465f948974c0d.js,sha256=PDFfLqjOnenvnRxnYWZ7wbXjn9pMNLYKdBLQwOsxSM8,3605
137
- sky/dashboard/out/_next/static/chunks/pages/_app-cb81dc4d27f4d009.js,sha256=lqFYBo3gcDUyNT-vVEqyoXJkFmFKu6i4wvssOQiqQhE,2097
135
+ sky/dashboard/out/_next/static/chunks/pages/_app-5f16aba5794ee8e7.js,sha256=lqFYBo3gcDUyNT-vVEqyoXJkFmFKu6i4wvssOQiqQhE,2097
138
136
  sky/dashboard/out/_next/static/chunks/pages/_error-1be831200e60c5c0.js,sha256=TZqrus06KKPx-CMABDMPKF7w-NQ5s2gwJAM8Huyl7qU,247
139
- sky/dashboard/out/_next/static/chunks/pages/clusters-4f6b9dd9abcb33ad.js,sha256=incN-9hGAKofamESSlQokneuRzHEg5taoS1h8p_lnm8,582
140
- sky/dashboard/out/_next/static/chunks/pages/config-fe375a56342cf609.js,sha256=RpI0fqP2j14l01xLl4vOjnm-TjyDVhuW-M0EhtC9Nlw,11453
137
+ sky/dashboard/out/_next/static/chunks/pages/clusters-3c674e5d970e05cb.js,sha256=V0wJZVncDiL5EEBpCx6sW27bGZeimI2oyvd_PdcAVno,581
138
+ sky/dashboard/out/_next/static/chunks/pages/config-3aac7a015c6eede1.js,sha256=GAJYp0xKyyvLnZdgAaMhYpKciAkmkdS7DRa-G22EOew,12477
141
139
  sky/dashboard/out/_next/static/chunks/pages/index-6b0d9e5031b70c58.js,sha256=Fp2FKnKQtORK_5O7MEQ08tlTk7ewMLuecw_EY5g4Dlg,513
142
- sky/dashboard/out/_next/static/chunks/pages/infra-a1a6abeeb58c1051.js,sha256=P3y2q9aZrafLxFJ4zjm4zNd3nVM989udYBfm9Io_-sE,565
143
- sky/dashboard/out/_next/static/chunks/pages/jobs-23bfc8bf373423db.js,sha256=kLxhcfM2Qod476Uwky9-d0vI0r3SaDAcwkSoFmHBvwk,567
144
- sky/dashboard/out/_next/static/chunks/pages/users-5800045bd04e69c2.js,sha256=7S8szOJj9FKex4jB_YIZDI0G4PHF7fj21zpcqpt2EFQ,15048
145
- sky/dashboard/out/_next/static/chunks/pages/workspaces-76b07aa5da91b0df.js,sha256=AjaCPyJnAMUXXq8vRvNzQf_YbVbVU_qWJmn5Pw12aog,13861
146
- sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]-b919a73aecdfa78f.js,sha256=3GlJG_-0qHP7WzCJ-28OPiVxLP82Ie895ARonlgU-XQ,8548
147
- sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/[job]-18aed9b56247d074.js,sha256=wSsiDpkwR3Yfw3Xpt5HnTloDReejo6sB23OdTt7qbOc,18413
148
- sky/dashboard/out/_next/static/chunks/pages/infra/[context]-3a18d0eeb5119fe4.js,sha256=4DgeSrFHSKZ4aPqRAhNIDC0VKUueUObddVt9xs7Dr6s,575
149
- sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-1354e28c81eeb686.js,sha256=Poo3Pk1jqKx06PXMgn85CFYynMedTOky6abqns3DT2Y,22308
150
- sky/dashboard/out/_next/static/chunks/pages/workspace/new-e1f9c0c3ff7ac4bd.js,sha256=susXJHEj4b5-QLReYkWshfIHkkxcHCtgqOPsU6pzFjA,3546
151
- sky/dashboard/out/_next/static/chunks/pages/workspaces/[name]-686590e0ee4b2412.js,sha256=wFyHNWzgSrVk-JiKItWCS1npsU5uXAQDyJXz4iwh9gQ,573
152
- sky/dashboard/out/_next/static/css/667d941a2888ce6e.css,sha256=lK65zgWkJBVwaDpmOfEA0wNo-Ws5Bs2WRVHTWAbjc5Y,38700
153
- sky/dashboard/out/clusters/[cluster].html,sha256=fSBbOPuw2jbOJka9bBre9coKAXL-gYUtxFzHK_ENvik,2332
154
- sky/dashboard/out/clusters/[cluster]/[job].html,sha256=me1aMKxy0rM0t5U2inHmpK2yDjqv0bgLYZMpArn7kKs,1653
155
- sky/dashboard/out/infra/[context].html,sha256=YqwYxAl05Jc0nq7GhLeg2KsCC1SjgdNoayDCwQri3Nc,15610
156
- sky/dashboard/out/jobs/[job].html,sha256=isDTf1tKkXyU_Xh5JU0v1_ig_mTZG4-AAr_P3rXzb2Q,1795
140
+ sky/dashboard/out/_next/static/chunks/pages/infra-7013d816a2a0e76c.js,sha256=q7YYXBGicxyltG4-VcKVuWYs9P65rL0YcRRVRtM2QHg,564
141
+ sky/dashboard/out/_next/static/chunks/pages/jobs-87e60396c376292f.js,sha256=AJ_zvuEJ-H4YPRzHYQ9b7fQJ0NZiuzU4UKadPS6hj3I,566
142
+ sky/dashboard/out/_next/static/chunks/pages/users-9355a0f13d1db61d.js,sha256=UinWVYDZVbHuu8DYIgNhpWtP_bUHpi-wiebcK5jJKWg,15137
143
+ sky/dashboard/out/_next/static/chunks/pages/workspaces-8fbcc5ab4af316d0.js,sha256=JpDQKki9dCJ40vflg6axPjIgUOE8IZsP8PMS4d2axEU,15125
144
+ sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]-e7d8710a9b0491e5.js,sha256=an6e8W0_AIen8lY6uiOI4S9824l5a5uNTQJOFGSGyZ8,8547
145
+ sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/[job]-d31688d3e52736dd.js,sha256=BYlyTcImh1Kdj1zNyn-aHBmGZiTR7OOZaAKoNJW5gNI,18412
146
+ sky/dashboard/out/_next/static/chunks/pages/infra/[context]-46d2e4ad6c487260.js,sha256=VHy2tq01sXIND1lcLmnlgzjDw96QNud6YuKEqCIC19E,574
147
+ sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-f7f0c9e156d328bc.js,sha256=UgPKnTHZNdp3xeYhkDK-eBnr1vXRBrX5iHUu2BQc17Y,22307
148
+ sky/dashboard/out/_next/static/chunks/pages/workspace/new-9a749cca1813bd27.js,sha256=wh7yw3zXjNHBWwev64xUwa_8lMF6BdDc_vNDL2-S5lI,3545
149
+ sky/dashboard/out/_next/static/chunks/pages/workspaces/[name]-8eeb628e03902f1b.js,sha256=5G8y3T78SQEvJUntqR-3GOcuLkHRYobvOJ95SpOy6Ls,572
150
+ sky/dashboard/out/_next/static/css/8b1c8321d4c02372.css,sha256=N9CaXqTkz53Ndmnh8C-5iE9Jgu3R2NZhCaaB2nnjIf0,40254
151
+ sky/dashboard/out/_next/static/xos0euNCptbGAM7_Q3Acl/_buildManifest.js,sha256=opBLzoglvuZZpaEyIAQmEXoqok_smL3hcXZAZtEBxME,2009
152
+ sky/dashboard/out/_next/static/xos0euNCptbGAM7_Q3Acl/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
153
+ sky/dashboard/out/clusters/[cluster].html,sha256=0SrlkDMuMWys51anBiKehr_b_xm7mAjc5WkaOh6bBzE,2331
154
+ sky/dashboard/out/clusters/[cluster]/[job].html,sha256=ME9XKvGd_YYLx2-J7F4U0l4FpxQ5m8gDlQ1TADsqL3o,1652
155
+ sky/dashboard/out/infra/[context].html,sha256=ZJXiqs4F0iumpVOfDaYvy8LXepw6AdoynXquvKVzabA,15609
156
+ sky/dashboard/out/jobs/[job].html,sha256=sBF9ad7YB02PObqP60q7YM7QjLW1vec6OI_1a4Pq2_E,1794
157
157
  sky/dashboard/out/videos/cursor-small.mp4,sha256=8tRdp1vjawOrXUar1cfjOc-nkaKmcwCPZx_LO0XlCvQ,203285
158
- sky/dashboard/out/workspace/new.html,sha256=wBgssnIRuvXHoJwcI-QZkGPsiBB-kYhk20YcHh_T6yY,12894
159
- sky/dashboard/out/workspaces/[name].html,sha256=lJi51smM5pYXHOJFkJjXEUiPSg5ac5-PZTvkCvQy7hY,2331
158
+ sky/dashboard/out/workspace/new.html,sha256=XLQMgyEIwmAsiDwkPGG2BofEQERjPRYshdAdTxyZyX4,12893
159
+ sky/dashboard/out/workspaces/[name].html,sha256=Q5twMZJ9N4R6dCHUCjWNvLe_sILA3f8dJ39FsiHjEtI,2330
160
160
  sky/data/__init__.py,sha256=Nhaf1NURisXpZuwWANa2IuCyppIuc720FRwqSE2oEwY,184
161
161
  sky/data/data_transfer.py,sha256=N8b0CQebDuHieXjvEVwlYmK6DbQxUGG1RQJEyTbh3dU,12040
162
162
  sky/data/data_utils.py,sha256=CNYPM963qby5ddW0DZNbhiWXkqgB9MHh_jrC5DoBctM,33437
@@ -169,16 +169,16 @@ sky/jobs/controller.py,sha256=1MHXM4fmPdVuOPeqsOpNxyTFUPlJWC9JGmFytaG35aY,31211
169
169
  sky/jobs/recovery_strategy.py,sha256=a9A4W-6U3KU-pjkWiFpIdgTHC8W26-jYrmi4vzU9iOg,28818
170
170
  sky/jobs/scheduler.py,sha256=Z9vdJ3Z0TJLAihIGGf656iLC4ufTG6xXhSuCHjaaNQU,14147
171
171
  sky/jobs/state.py,sha256=MIhjPVHj0vo3TEBLv689dVWMx4MGVJvGF_C3f-s26rI,50809
172
- sky/jobs/utils.py,sha256=nCFjAYMejE91vSS3WgX6v3K9rGnNObLXHdATMiICjrk,65110
172
+ sky/jobs/utils.py,sha256=FJqr9q7TKu3VoUKKdyNb-mKNSkIsRMav8c_50kgY3dQ,65164
173
173
  sky/jobs/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
174
174
  sky/jobs/client/sdk.py,sha256=GdLQcdXVKv06Vete2a4JupH4nHASo8hyJn3gZAnaPLU,10796
175
175
  sky/jobs/dashboard/dashboard.py,sha256=JKg8cCH_Y0sf3MoDTx85BghVEXWpp8ItPLshp09-_Js,7618
176
176
  sky/jobs/dashboard/static/favicon.ico,sha256=uYlvgxSM7gjBmXpZ8wydvZUPAbJiiix-rc2Xe5mma9s,15086
177
177
  sky/jobs/dashboard/templates/index.html,sha256=NrlTDiEHJDt7sViwWgXUSxVCyVl_IEukE5jdvN8WhtQ,33132
178
178
  sky/jobs/server/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
179
- sky/jobs/server/core.py,sha256=wixQZIGxsVeJr_rp3edSIb22DGzop7Mg4nW8v4LPuFo,29403
179
+ sky/jobs/server/core.py,sha256=PoKVTo_2GXSKwDWQrNgnXFRjemm-wFaHe1dwo2ZiPAw,29712
180
180
  sky/jobs/server/dashboard_utils.py,sha256=2Mbx40W1pQqPEPHsSDbHeaF0j5cgyKy-_A9Owdwp_AQ,2315
181
- sky/jobs/server/server.py,sha256=LqBWzYVMMJ6rRcGeDsqCQco6pG_CcDCAHzmVbt57IQM,8618
181
+ sky/jobs/server/server.py,sha256=ae8JAs-2ipWqL_GsA3x8T2mY-OJLc3ioWg_CfRzCUIY,4011
182
182
  sky/provision/__init__.py,sha256=c4QZli6zQz1YVG0plR27kGDjxhRQwDrT5d0UZemrNPI,6487
183
183
  sky/provision/common.py,sha256=mTsL1UU-kPYGAc1gWUo-btI8bdL6tAWg9OMMAb-v8ws,10197
184
184
  sky/provision/constants.py,sha256=oc_XDUkcoLQ_lwDy5yMeMSWviKS0j0s1c0pjlvpNeWY,800
@@ -285,24 +285,24 @@ sky/serve/spot_placer.py,sha256=auRlYZNg8uIW-lxiirxpDP-iIaJtkrhesm6OGMgwPq4,1128
285
285
  sky/serve/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
286
286
  sky/serve/client/sdk.py,sha256=7wJf_Ob1291Cs4yKAghZ_xWvd-Kc0IDtHiLIlphj8tQ,14673
287
287
  sky/serve/server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
288
- sky/serve/server/core.py,sha256=36OT94NnYYURDcKuhF3wRZohoNe6SA9tRQYPsGtUyuQ,41231
288
+ sky/serve/server/core.py,sha256=DVpInZkZzFV7TYCUr1rFHQYkTHr91RC823j0W70SPMQ,41226
289
289
  sky/serve/server/server.py,sha256=A9K37a0nQgZeN3eKWv62Oh2C5TSAReTZ9pHmztqlI-c,4396
290
290
  sky/server/__init__.py,sha256=MPPBqFzXz6Jv5QSk6td_IcvnfXfNErDZVcizu4MLRow,27
291
- sky/server/common.py,sha256=dbWDUT2rAJGEhJD5Otc7NkG8T-JCAFi58iCa-d3oP5I,32057
291
+ sky/server/common.py,sha256=viiq-aMSsMh6JDBzbnNg2-ah8WKdPU8BGNxT8JlCbZs,32126
292
292
  sky/server/config.py,sha256=XWf5Kw4am6vMO5wcyWevbQAFH-dmKb7AMEgDzD083-M,8538
293
- sky/server/constants.py,sha256=oXbOcNcAbN-66mguq6gb9lCaLAR1dxwO4p1tjCZhjT8,1271
294
- sky/server/server.py,sha256=UkgmaGStLI_CewCvaJJZNg9zUubs1uZGoZHXeffONgk,55543
293
+ sky/server/constants.py,sha256=fhNLbK-Oc2S6h05e91IvmKAq4DoOp6G0YyWfqdEH_CY,1189
294
+ sky/server/server.py,sha256=A0DpI-38KfsYK-vrfCVmZHsAjAbZLBABueYiOOdyVj8,56310
295
295
  sky/server/stream_utils.py,sha256=yyfKLcaB3RDC8BfhLLiOQW-nQE05ojUsQ26K0teSea0,6878
296
296
  sky/server/uvicorn.py,sha256=4bTlvqQiykYDEIfV6Ta9KXWKZUtSfIrhDeT1F9yQuvs,3323
297
297
  sky/server/html/log.html,sha256=TSGZktua9Ysl_ysg3w60rjxAxhH61AJnsYDHdtqrjmI,6929
298
298
  sky/server/html/token_page.html,sha256=eUndS5u1foL9vaWGPRTLMt7lCzD1g0wYJ2v_EeeFzlc,7046
299
299
  sky/server/requests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
300
300
  sky/server/requests/event_loop.py,sha256=OhpPbuce65bbjpGRlcJa78AVnYSm08SzFKt70ypCUuQ,1211
301
- sky/server/requests/executor.py,sha256=gmUnrgTpElMSwlCO9YM1tNNjNIx6wPu_LjwTtirFx54,23754
301
+ sky/server/requests/executor.py,sha256=9CpXlcE_IMfXd3JFv6Zzw6487Vz_nt-pFqpwB2r6FBg,24182
302
302
  sky/server/requests/payloads.py,sha256=10P8GwHuCLGLw0JoUFbRLAUiuqkyNPdMzLjriq9epjs,19573
303
303
  sky/server/requests/preconditions.py,sha256=ipxIb_3JXG6S3-ymcOdqQNb7VDvoPqADxu9ZK7-nQWc,7179
304
304
  sky/server/requests/process.py,sha256=uv6JmqdT1vR6S5j3a0CEmxz3fUoKQoZCryQsjZpZE7E,8734
305
- sky/server/requests/requests.py,sha256=7WABtaxHOppJT6OgYQl4nkjDu5yPXtk1_VpfqPdeg5k,21923
305
+ sky/server/requests/requests.py,sha256=kOgKwrbTryPODiMUQvCyy0MOJhK7a7Yx_xrNmFnEYRc,22028
306
306
  sky/server/requests/queues/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
307
307
  sky/server/requests/queues/local_queue.py,sha256=X6VkBiUmgd_kfqIK1hCtMWG1b8GiZbY70TBiBR6c6GY,416
308
308
  sky/server/requests/queues/mp_queue.py,sha256=jDqP4Jd28U3ibSFyMR1DF9I2OWZrPZqFJrG5S6RFpyw,3403
@@ -317,9 +317,9 @@ sky/skylet/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
317
317
  sky/skylet/attempt_skylet.py,sha256=GZ6ITjjA0m-da3IxXXfoHR6n4pjp3X3TOXUqVvSrV0k,2136
318
318
  sky/skylet/autostop_lib.py,sha256=kGUnHm-jpF4zl3UJfB-4pnoldWpnVeR96WwYGSw7em0,4630
319
319
  sky/skylet/configs.py,sha256=UtnpmEL0F9hH6PSjhsps7xgjGZ6qzPOfW1p2yj9tSng,1887
320
- sky/skylet/constants.py,sha256=M2fkINRx06iSTRuimID5GCRyQPxwBFhVLkoIjL8RaIU,21188
320
+ sky/skylet/constants.py,sha256=Y--eqfqocB4IfMRJ_44zmI2_YCMnoUvrCqjE__2mjl8,21271
321
321
  sky/skylet/events.py,sha256=pnV3ZiwWhXqTHpU5B5Y9Xwam_7FQDI6IrxgSx7X_NVA,12743
322
- sky/skylet/job_lib.py,sha256=LInoIK4M37ZPSb5c7u5d8h990B68O2imiayDIH4wEaA,44473
322
+ sky/skylet/job_lib.py,sha256=kasxTZ9vFO27S_3XVZTtWjTuvGzyYlvxUaDU_artigo,44523
323
323
  sky/skylet/log_lib.py,sha256=9nLOhevnM668itQyVyPSoQHKfZ2MWm_FwXPxK28X0oM,23201
324
324
  sky/skylet/log_lib.pyi,sha256=6LXFSpyW4lMHAELKllvK73B3538JjSo9lPw30DEuO0o,4542
325
325
  sky/skylet/skylet.py,sha256=mWmqCvxSlfdVU_L8NL6P52jmCt3smd8K0HdyNBfMPeI,1234
@@ -370,10 +370,10 @@ sky/usage/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
370
370
  sky/usage/constants.py,sha256=mFrTgrFIfFf4kpcl-M1VDU7_moD5_mJazUJTUDrybms,1102
371
371
  sky/usage/usage_lib.py,sha256=PEjQH7do7lrcGMaIqW6bFQvNIFo-ipoF7L0xlt3vmDg,21427
372
372
  sky/users/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
373
- sky/users/model.conf,sha256=VHk3HcAYbl9Kvwh5AcZw4U8MdITvgB6wZAKGw5NkJEo,242
374
- sky/users/permission.py,sha256=AG-Au4TC87CPLnwla8N4mn4I30vsAovVQ7HlcR59rvs,7234
375
- sky/users/rbac.py,sha256=46_D3Wn1ihfnJ6zTWdbyMN2JNP0FHAiXj5rsf73ixvg,2410
376
- sky/users/server.py,sha256=dh58pHkYr1fiHUq54TL6Ksnu0iwwGpCuTMYreyftmMs,2221
373
+ sky/users/model.conf,sha256=nPAaMai2fc-nlnEDTfW5Lyw6vgCcOS32BSms4aFOHoY,259
374
+ sky/users/permission.py,sha256=mHbJ_FUk1jofvZuaQsxaEAFjt8-HGCq-adcnqbZBPKI,12374
375
+ sky/users/rbac.py,sha256=7JYzyeY9HoXAiCmYxWXz_hiBrmJ2G1JUEaMEfqxHj8Y,3472
376
+ sky/users/server.py,sha256=aDAymKbfhz0sOpx4nayTJRKEgPZzxJllk4P0mPlgqJk,2417
377
377
  sky/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
378
378
  sky/utils/accelerator_registry.py,sha256=yNP7HDflg2bnhnCXFfjdVmJcpId7WBQCQPiGuc41EwE,3874
379
379
  sky/utils/admin_policy_utils.py,sha256=1f-iwc0Z2h1dKxQxfYldkWyEuZLws4LERptRcBO-5qs,6020
@@ -382,8 +382,8 @@ sky/utils/atomic.py,sha256=vrw-7XCnckF0xCx-ttamao7evPdGtVsnjaTtgMlBXIE,1280
382
382
  sky/utils/cluster_utils.py,sha256=s6DFRXktv6_gF_DnwDEXJ7CniifHp8CAPeGciRCbXgI,14432
383
383
  sky/utils/command_runner.py,sha256=6VknLKttMwPAHGJt_ccyr3l6lXZGVoX6C3-ZtQ7WtR0,39613
384
384
  sky/utils/command_runner.pyi,sha256=SDwvKvwaK4_-l2S3bwKSHZX8tGKU5SkbKuYRDn03o7o,7810
385
- sky/utils/common.py,sha256=P4oVXFATUYgkruHX92cN12SJBtfb8DiOOYZtbN1kvP0,1927
386
- sky/utils/common_utils.py,sha256=xSB7WWk88tuEDZrL0CZ41GEucCkUIJ4GNWIlWzGMuUA,34774
385
+ sky/utils/common.py,sha256=nTg-mjNu0diZjs2UvyiMc84Tu1ZonRLRAmfqFIP1TtY,2242
386
+ sky/utils/common_utils.py,sha256=6Lqs8VwOZ3uO_XYqWxbmwfUdNR1cx02qMLUmOnB9ky0,35266
387
387
  sky/utils/config_utils.py,sha256=v8yZcr8OvEfXmBDYcdOj3U-AH1XERY76zGJMNdqzvqc,10339
388
388
  sky/utils/context.py,sha256=yxNlkVV9_7_0bnXJkXXe8h9t_LbFbYzPAnWIx8aTLJI,9327
389
389
  sky/utils/context_utils.py,sha256=cby-QPmnGObjIE4K7eZ_dkWZdUo7YJUmnJr5oKf_v54,6712
@@ -400,7 +400,7 @@ sky/utils/registry.py,sha256=I08nS0rvCF-xR5GEZoHEVgN1jcOeglz77h7xPpBCIjU,4179
400
400
  sky/utils/resources_utils.py,sha256=C_iDlFz1CGgkNusiy5OdKpiLHZKWpzILiISgMyLOAq0,12578
401
401
  sky/utils/rich_console_utils.py,sha256=wPvAlshaFHuMZSjiDnaK3OSBppZLBjAn-lj7AvxNBQk,553
402
402
  sky/utils/rich_utils.py,sha256=EmtLN6U49SKiANTGmqgZXICXEnDLJW9EPpw6O4-FVUE,14432
403
- sky/utils/schemas.py,sha256=O9_cya6dL5MhxIiRnOO5BzAH-geiFmT4No2f15Gc5y8,43374
403
+ sky/utils/schemas.py,sha256=CkcOj9ZQeCOgPZfcFfgNEdvJyy5IHAkkvKrN6YVWeK0,43648
404
404
  sky/utils/status_lib.py,sha256=zn_MSuRYQdNKF8pnFOGQ54X_s_R7dyqWS6Q3a9zENw8,1512
405
405
  sky/utils/subprocess_utils.py,sha256=3euz4h7B-tHulmjhQUkY9oWUA0Np5hlL8kHdTHHZOs0,16060
406
406
  sky/utils/timeline.py,sha256=ob6s3bc7nwAuSI76yLKBrSR5bzOHnOhbozz1avwoet4,4070
@@ -427,11 +427,12 @@ sky/utils/kubernetes/rsync_helper.sh,sha256=MT29sI5iD2QxYlXFwrN16oq0Er4TPFQVs4Z4
427
427
  sky/utils/kubernetes/ssh-tunnel.sh,sha256=60eHKF7phJe9pFEkGlqdwWzI80tpog8QCkL7fAbIAic,12143
428
428
  sky/utils/kubernetes/ssh_jump_lifecycle_manager.py,sha256=Kq1MDygF2IxFmu9FXpCxqucXLmeUrvs6OtRij6XTQbo,6554
429
429
  sky/workspaces/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
430
- sky/workspaces/core.py,sha256=m6OhX49DBX25m5siHNitF6j8FkG9gbXNJkTz1G03ht0,16835
431
- sky/workspaces/server.py,sha256=A3jt9RSzRXTYWpmVQNW0b4-QrgfLq3eiHcRA0tutZhw,2893
432
- skypilot_nightly-1.0.0.dev20250607.dist-info/licenses/LICENSE,sha256=emRJAvE7ngL6x0RhQvlns5wJzGI3NEQ_WMjNmd9TZc4,12170
433
- skypilot_nightly-1.0.0.dev20250607.dist-info/METADATA,sha256=9TnMUDHzuli6XqUukghvZG9VdbO5CDYfSMMV7o_T7LE,18434
434
- skypilot_nightly-1.0.0.dev20250607.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
435
- skypilot_nightly-1.0.0.dev20250607.dist-info/entry_points.txt,sha256=StA6HYpuHj-Y61L2Ze-hK2IcLWgLZcML5gJu8cs6nU4,36
436
- skypilot_nightly-1.0.0.dev20250607.dist-info/top_level.txt,sha256=qA8QuiNNb6Y1OF-pCUtPEr6sLEwy2xJX06Bd_CrtrHY,4
437
- skypilot_nightly-1.0.0.dev20250607.dist-info/RECORD,,
430
+ sky/workspaces/core.py,sha256=2kKUP-V5Qo1n-xfayA4M1OE_ina6_4bxkTF3dv3yBEU,20704
431
+ sky/workspaces/server.py,sha256=Box45DS54xXGHy7I3tGKGy-JP0a8G_z6IhfvGlEXtsA,3439
432
+ sky/workspaces/utils.py,sha256=IIAiFoS6sdb2t0X5YoX9AietpTanZUQNTK8cePun-sY,2143
433
+ skypilot_nightly-1.0.0.dev20250609.dist-info/licenses/LICENSE,sha256=emRJAvE7ngL6x0RhQvlns5wJzGI3NEQ_WMjNmd9TZc4,12170
434
+ skypilot_nightly-1.0.0.dev20250609.dist-info/METADATA,sha256=HWjTD4uXYm6P91CZ0qph4hsiNf1ERrU8OI4yrrtwVYE,18434
435
+ skypilot_nightly-1.0.0.dev20250609.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
436
+ skypilot_nightly-1.0.0.dev20250609.dist-info/entry_points.txt,sha256=StA6HYpuHj-Y61L2Ze-hK2IcLWgLZcML5gJu8cs6nU4,36
437
+ skypilot_nightly-1.0.0.dev20250609.dist-info/top_level.txt,sha256=qA8QuiNNb6Y1OF-pCUtPEr6sLEwy2xJX06Bd_CrtrHY,4
438
+ skypilot_nightly-1.0.0.dev20250609.dist-info/RECORD,,
@@ -1 +0,0 @@
1
- self.__BUILD_MANIFEST=function(s,c,e,a,t,r,n,u,b,i,j,f){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/":["static/chunks/pages/index-6b0d9e5031b70c58.js"],"/_error":["static/chunks/pages/_error-1be831200e60c5c0.js"],"/clusters":[s,r,n,c,e,a,t,u,i,"static/chunks/pages/clusters-4f6b9dd9abcb33ad.js"],"/clusters/[cluster]":[s,r,n,c,e,a,t,u,b,i,"static/chunks/pages/clusters/[cluster]-b919a73aecdfa78f.js"],"/clusters/[cluster]/[job]":[s,c,"static/chunks/pages/clusters/[cluster]/[job]-18aed9b56247d074.js"],"/config":[s,r,c,a,"static/chunks/pages/config-fe375a56342cf609.js"],"/infra":[s,c,e,a,t,j,"static/chunks/pages/infra-a1a6abeeb58c1051.js"],"/infra/[context]":[s,c,e,a,t,j,"static/chunks/pages/infra/[context]-3a18d0eeb5119fe4.js"],"/jobs":[s,n,c,e,a,t,u,b,"static/chunks/pages/jobs-23bfc8bf373423db.js"],"/jobs/[job]":[s,r,c,e,"static/chunks/pages/jobs/[job]-1354e28c81eeb686.js"],"/users":[s,c,e,a,t,"static/chunks/pages/users-5800045bd04e69c2.js"],"/workspace/new":[s,r,n,c,e,a,t,u,b,f,"static/chunks/pages/workspace/new-e1f9c0c3ff7ac4bd.js"],"/workspaces":[s,r,n,c,e,a,t,u,b,"static/chunks/pages/workspaces-76b07aa5da91b0df.js"],"/workspaces/[name]":[s,r,n,c,e,a,t,u,b,f,"static/chunks/pages/workspaces/[name]-686590e0ee4b2412.js"],sortedPages:["/","/_app","/_error","/clusters","/clusters/[cluster]","/clusters/[cluster]/[job]","/config","/infra","/infra/[context]","/jobs","/jobs/[job]","/users","/workspace/new","/workspaces","/workspaces/[name]"]}}("static/chunks/614-635a84e87800f99e.js","static/chunks/470-ad1e0db3afcbd9c9.js","static/chunks/969-2c584e28e6b4b106.js","static/chunks/293-351268365226d251.js","static/chunks/856-3a32da4b84176f6d.js","static/chunks/798-c0525dc3f21e488d.js","static/chunks/121-865d2bf8a3b84c6a.js","static/chunks/973-6d78a0814682d771.js","static/chunks/236-619ed0248fb6fdd9.js","static/chunks/37-600191c5804dcae2.js","static/chunks/682-b60cfdacc15202e8.js","static/chunks/843-c296541442d4af88.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
@@ -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 p},h0:function(){return m},lM:function(){return v},mU:function(){return g},oy:function(){return y}});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 m(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 p(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,y=o.Z;function v(e){return(0,r.jsx)(a.Z,{...e})}},9470:function(e,t,n){n.d(t,{A:function(){return j}});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(355),h=n(3225),x=n(6989),f=n(3001);let m=(0,s.createContext)(null);function p(e){let{children:t}=e,[n,o]=(0,s.useState)(!0),[a,i]=(0,s.useState)(null);return(0,s.useEffect)(()=>{fetch("".concat(h.f4,"/api/health")).then(e=>e.json()).then(e=>{e.user&&e.user.name&&i(e.user.name)}).catch(e=>{console.error("Error fetching user data:",e)})},[]),(0,r.jsx)(m.Provider,{value:{isSidebarOpen:n,toggleSidebar:()=>{o(e=>!e)},userEmail:a},children:t})}function g(){let e,t;let n=(0,i.useRouter)(),o=(0,f.X)(),{userEmail:l}=function(){let e=(0,s.useContext)(m);if(!e)throw Error("useSidebar must be used within a SidebarProvider");return e}(),[p,g]=(0,s.useState)(!1),w=(0,s.useRef)(null);(0,s.useEffect)(()=>{function e(e){w.current&&!w.current.contains(e.target)&&g(!1)}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[w]);let j=e=>"/workspaces"===e?n.pathname.startsWith("/workspaces")||n.pathname.startsWith("/workspace"):n.pathname.startsWith(e),y=e=>{let t=j(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(h.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:y("/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:y("/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:y("/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:y("/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:y("/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)(x.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)(x.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)(x.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)(x.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")})})}),(0,r.jsx)("div",{className:"border-l border-gray-200 h-6"}),(0,r.jsx)(x.WH,{content:"Configuration",className:"text-sm text-muted-foreground",children:(0,r.jsx)(c(),{href:"/config",className:"inline-flex items-center justify-center p-2 rounded-full transition-colors duration-150 cursor-pointer ".concat(j("/config")?"text-blue-600 hover:bg-gray-100":"text-gray-600 hover:bg-gray-100"),title:"Configuration",prefetch:!1,children:(0,r.jsx)(u.Z,{className:"".concat(o?"w-4 h-4":"w-5 h-5")})})}),l&&(0,r.jsxs)("div",{className:"relative",ref:w,children:[(0,r.jsx)("button",{onClick:()=>g(!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:()=>g(!1),prefetch:!1,children:"See all users"})]})]})]})]})})}function w(e){let{children:t,highlighted:n}=e;return(0,f.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)(g,{})}),(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 j(e){return(0,r.jsx)(p,{children:(0,r.jsx)(w,{...e})})}},8950:function(e,t,n){n.d(t,{Bw:function(){return m},Ph:function(){return d},Ql:function(){return p},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 m=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,{})]})})});m.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 p=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})]})});p.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 m},Md:function(){return f},WH:function(){return x},o0:function(){return u},q8:function(){return p},yc:function(){return l}});var r=n(5893),s=n(7294),o=n(3302),a=n(1886),i=n(8950);let l=n(1214).nb.REFRESH_INTERVAL;function c(e){return e.charAt(0).toUpperCase()+e.slice(1)}function d(e){if(!e)return"N/A";let t=new Date;if(!(7>Math.abs((t-e)/864e5)))return(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(",",""))});{let n=function(e){if(!e||"string"!=typeof e)return e;if("just now"===e)return"now";let t=e.match(/^about\s+(\d+)\s+(\w+)\s+ago$/i);if(t){let e=t[1],n=t[2],r={second:"s",seconds:"s",minute:"m",minutes:"m",hour:"h",hours:"h",day:"d",days:"d",month:"mo",months:"mo",year:"yr",years:"yr"};if(r[n])return"".concat(e).concat(r[n]," ago")}let n=e.match(/^a[n]?\s+(\w+)\s+ago$/i);if(n){let e=n[1],t={second:"s",minute:"m",hour:"h",day:"d",month:"mo",year:"yr"};if(t[e])return"1".concat(t[e]," ago")}let r=e.match(/^(\d+)\s+(\w+)\s+ago$/i);if(r){let e=r[1],t=r[2],n={second:"s",seconds:"s",minute:"m",minutes:"m",hour:"h",hours:"h",day:"d",days:"d",month:"mo",months:"mo",year:"yr",years:"yr"};if(n[t])return"".concat(e).concat(n[t]," ago")}return e}((0,a.B)(e,t,{addSuffix:!0}));return(0,r.jsx)(x,{content:u(e),className:"capitalize text-sm text-muted-foreground",children:n})}}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 m(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 p(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: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}},1214:function(e,t,n){n.d(t,{MO:function(){return o},ej:function(){return r},nb:function(){return s}});let r={DEFAULT_TTL:12e4},s={REFRESH_INTERVAL:3e4,GPU_REFRESH_INTERVAL:3e4},o={NAME_TRUNCATE_LENGTH:20}},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,11 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[843],{9333:function(e,s,l){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){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){l.d(s,{I:function(){return Z}});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),g=l(2350);let p=t.forwardRef((e,s)=>{let{className:l,...t}=e;return(0,a.jsx)("textarea",{className:(0,g.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})});p.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),M=l(1272),D=l(3225);let A=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},W=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=D.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 Z(e){let{workspaceName:s,isNewWorkspace:l=!1}=e,d=(0,r.useRouter)(),[x,g]=(0,t.useState)({}),[j,w]=(0,t.useState)({}),[C,D]=(0,t.useState)(""),[Z,R]=(0,t.useState)(!0),[z,O]=(0,t.useState)(!1),[_,P]=(0,t.useState)(!1),[T,Y]=(0,t.useState)(null),[I,J]=(0,t.useState)(null),[V,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),Y(null);try{let e;let l=(await (0,n.fX)())[s]||{};g(l),w(l),e=0===Object.keys(l).length?"".concat(s,":\n # Empty workspace configuration - uses all accessible infrastructure\n"):M.ZP.dump({[s]:l},{indent:2,lineWidth:-1,noRefs:!0,skipInvalid:!0,flowLevel:-1}),D(e)}catch(e){console.error("Error fetching workspace config:",e),Y(e)}finally{R(!1)}},[s]),Q=(0,t.useCallback)(async()=>{if(!l){q(!0);try{let[e,l,a]=await Promise.all([(0,c.getClusters)(),(0,i.getManagedJobs)(),(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)(()=>{P(JSON.stringify(x)!==JSON.stringify(j))},[x,j]);let $=e=>{D(e),H(null);try{let l=M.ZP.load(e)||{},a=Object.keys(l);if(0===a.length)g({});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]||{};g(t)}else H("Configuration must contain only one workspace. Found: ".concat(a.join(", ")))}catch(e){H("Invalid YAML: ".concat(e.message))}},ee=async()=>{O(!0),Y(null),J(null);try{if(V)throw Error("Please fix YAML errors before saving");let e=M.ZP.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),J("Workspace created successfully!"),setTimeout(()=>{d.push("/workspaces/".concat(s))},1500)):(await (0,n.eA)(s,x),J("Workspace updated successfully!"),w(x),Q())}catch(e){console.error("Error saving workspace:",e),Y(e)}finally{O(!1)}},es=async()=>{B(e=>({...e,deleting:!0,error:null}));try{await (0,n.zl)(s),J("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:[(Z||z||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:z?"Saving...":"Loading..."})]}),(0,a.jsxs)("div",{className:"flex items-center space-x-4",children:[!l&&(0,a.jsxs)("button",{onClick:ea,disabled:Z||z||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||z,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"]})]})]})]}),Z?(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:T,title:"Error",onDismiss:()=>Y(null)}),(0,a.jsx)(A,{message:I}),(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)(W,{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:[V&&(0,a.jsx)(E.X,{error:V,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)(p,{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:z||V||Z,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"}),z?"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"})]})]})})]})]})}}}]);
@@ -1,6 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[490],{4483:function(e,r,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/config",function(){return t(9377)}])},9333:function(e,r,t){"use strict";t.d(r,{Z:function(){return n}});/**
2
- * @license lucide-react v0.407.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */let n=(0,t(998).Z)("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]])},1812:function(e,r,t){"use strict";t.d(r,{X:function(){return i}});var n=t(5893),s=t(7294);let l=e=>{if(!(null==e?void 0:e.message))return"An unexpected error occurred.";let r=e.message;return r.includes("failed:")&&(r=r.split("failed:")[1].trim()),r.charAt(0).toUpperCase()+r.slice(1)},i=e=>{let{error:r,title:t="Error",onDismiss:i}=e,[a,o]=(0,s.useState)(!1);if((0,s.useEffect)(()=>{r&&o(!1)},[r]),!r||a)return null;let c="string"==typeof r?r:l(r);return(0,n.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-md p-3 mb-4",children:(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("div",{className:"flex-shrink-0",children:(0,n.jsx)("svg",{className:"h-5 w-5 text-red-400",viewBox:"0 0 20 20",fill:"currentColor",children:(0,n.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),(0,n.jsx)("div",{className:"ml-3",children:(0,n.jsxs)("div",{className:"text-sm text-red-800",children:[(0,n.jsxs)("strong",{children:[t,":"]})," ",c]})})]}),(0,n.jsx)("button",{onClick:()=>{o(!0),i&&i()},className:"flex-shrink-0 ml-4 text-red-400 hover:text-red-600 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 focus:ring-offset-red-50 rounded","aria-label":"Dismiss error",children:(0,n.jsx)("svg",{className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",children:(0,n.jsx)("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]})})}},803:function(e,r,t){"use strict";t.d(r,{z:function(){return c}});var n=t(5893),s=t(7294),l=t(8426),i=t(2003),a=t(2350);let o=(0,i.j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),c=s.forwardRef((e,r)=>{let{className:t,variant:s,size:i,asChild:c=!1,...d}=e,u=c?l.g7:"button";return(0,n.jsx)(u,{className:(0,a.cn)(o({variant:s,size:i,className:t})),ref:r,...d})});c.displayName="Button"},7673:function(e,r,t){"use strict";t.d(r,{Ol:function(){return c},Zb:function(){return o},aY:function(){return f},eW:function(){return m},ll:function(){return d}});var n=t(5893),s=t(7294),l=t(5697),i=t.n(l),a=t(2350);let o=s.forwardRef((e,r)=>{let{className:t,children:s,...l}=e;return(0,n.jsx)("div",{ref:r,className:(0,a.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",t),...l,children:s})});o.displayName="Card",o.propTypes={className:i().string,children:i().node};let c=s.forwardRef((e,r)=>{let{className:t,children:s,...l}=e;return(0,n.jsx)("div",{ref:r,className:(0,a.cn)("flex flex-col space-y-1.5 p-6",t),...l,children:s})});c.displayName="CardHeader",c.propTypes={className:i().string,children:i().node};let d=s.forwardRef((e,r)=>{let{className:t,children:s,...l}=e;return(0,n.jsx)("h3",{ref:r,className:(0,a.cn)("text-2xl font-semibold leading-none tracking-tight",t),...l,children:s})});d.displayName="CardTitle",d.propTypes={className:i().string,children:i().node};let u=s.forwardRef((e,r)=>{let{className:t,children:s,...l}=e;return(0,n.jsx)("p",{ref:r,className:(0,a.cn)("text-sm text-muted-foreground",t),...l,children:s})});u.displayName="CardDescription",u.propTypes={className:i().string,children:i().node};let f=s.forwardRef((e,r)=>{let{className:t,children:s,...l}=e;return(0,n.jsx)("div",{ref:r,className:(0,a.cn)("p-6 pt-0",t),...l,children:s})});f.displayName="CardContent",f.propTypes={className:i().string,children:i().node};let m=s.forwardRef((e,r)=>{let{className:t,children:s,...l}=e;return(0,n.jsx)("div",{ref:r,className:(0,a.cn)("flex items-center p-6 pt-0",t),...l,children:s})});m.displayName="CardFooter",m.propTypes={className:i().string,children:i().node}},9377:function(e,r,t){"use strict";t.r(r),t.d(r,{default:function(){return b}});var n=t(5893),s=t(7294),l=t(1163),i=t(9470);t(1664);var a=t(9008),o=t.n(a),c=t(803),d=t(7673),u=t(7324),f=t(1812),m=t(8799),h=t(9333),x=t(1272),p=t(3225),g=t(6989);function v(){let[e,r]=(0,s.useState)(null),[t,l]=(0,s.useState)(null);return((0,s.useEffect)(()=>{fetch("".concat(p.f4,"/api/health")).then(e=>e.json()).then(e=>{e.version&&r(e.version),e.commit&&l(e.commit)}).catch(e=>{console.error("Error fetching API server version and commit hash:",e)})},[]),e)?(0,n.jsx)(g.Md,{content:t?"Commit: ".concat(t):"Commit information not available",className:"text-sm text-muted-foreground",children:(0,n.jsxs)("div",{className:"text-sm text-gray-500 cursor-help border-b border-dotted border-gray-400 inline-block",children:["Version: ",e]})}):null}function b(){let e=(0,l.useRouter)(),[r,t]=(0,s.useState)(""),[a,g]=(0,s.useState)(!0),[b,j]=(0,s.useState)(!1),[y,N]=(0,s.useState)(null),[w,k]=(0,s.useState)(!1);(0,s.useEffect)(()=>{C()},[]);let C=async()=>{g(!0),N(null);try{let e=await (0,u.iE)();0===Object.keys(e).length?t(""):t(x.ZP.dump(e,{indent:2}))}catch(e){console.error("Error loading config:",e),N(e)}finally{g(!1)}},E=async()=>{j(!0),N(null),k(!1);try{let e=await fetch("".concat(p.f4,"/users/role"));if(!e.ok){let r=await e.json();throw Error(r.detail||"Failed to get user role")}let t=await e.json(),n=t.role;if("admin"!=n){N(Error("".concat(t.name," is logged in as no admin, cannot edit config"))),j(!1);return}let s=x.ZP.load(r);if(null==s&&(s={}),"object"!=typeof s||Array.isArray(s)){let e="Invalid config structure: Configuration must be a mapping (key-value pairs) in YAML format.";Array.isArray(s),e="Invalid config structure: Configuration must be a mapping (key-value pairs) in YAML format.",N(Error(e)),j(!1);return}await (0,u.rF)(s),k(!0),setTimeout(()=>k(!1),3e3)}catch(e){console.error("Error saving config:",e),N(e)}finally{j(!1)}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o(),{children:(0,n.jsx)("title",{children:"Edit SkyPilot Configuration | SkyPilot Dashboard"})}),(0,n.jsxs)(i.A,{highlighted:"workspaces",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,n.jsx)("div",{className:"text-base flex items-center",children:(0,n.jsx)("span",{className:"text-sky-blue",children:"SkyPilot Configuration"})}),(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("div",{className:"text-sm flex items-center",children:(a||b)&&(0,n.jsxs)("div",{className:"flex items-center mr-4",children:[(0,n.jsx)(m.Z,{size:15,className:"mt-0"}),(0,n.jsx)("span",{className:"ml-2 text-gray-500",children:b?"Applying...":"Loading..."})]})}),(0,n.jsx)(v,{})]})]}),(0,n.jsxs)(d.Zb,{className:"w-full",children:[(0,n.jsx)(d.Ol,{children:(0,n.jsx)(d.ll,{className:"text-base font-normal flex items-center justify-between",children:(0,n.jsx)("span",{children:"Edit SkyPilot API Server Configuration"})})}),(0,n.jsxs)(d.aY,{className:"space-y-4",children:[(0,n.jsxs)("p",{className:"text-sm text-gray-600 mb-3",children:["Refer to the"," ",(0,n.jsx)("a",{href:"https://docs.skypilot.co/en/latest/reference/config.html",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline",children:"SkyPilot Docs"})," ","for details. The configuration should be in YAML format."]}),w&&(0,n.jsx)("div",{className:"bg-green-50 border border-green-200 rounded p-4 mb-6",children:(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("div",{className:"flex-shrink-0",children:(0,n.jsx)("svg",{className:"h-5 w-5 text-green-400",viewBox:"0 0 20 20",fill:"currentColor",children:(0,n.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})})}),(0,n.jsx)("div",{className:"ml-3",children:(0,n.jsx)("p",{className:"text-sm font-medium text-green-800",children:"Configuration saved successfully!"})})]})}),y&&(0,n.jsx)("div",{className:"mb-6",children:(0,n.jsx)(f.X,{error:y,title:"Failed to apply new configuration",onDismiss:()=>N(null)})}),(0,n.jsx)("div",{className:"w-full",children:(0,n.jsx)("textarea",{value:r,onChange:e=>t(e.target.value),className:"w-full h-96 p-3 border border-gray-300 rounded font-mono text-sm resize-vertical focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:a?"Loading configuration...":"# Enter SkyPilot configuration in YAML format\n# Example:\n# kubernetes:\n# allowed_contexts: [default, my-context]",disabled:a||b})}),(0,n.jsxs)("div",{className:"flex justify-end space-x-3 pt-3",children:[(0,n.jsx)(c.z,{variant:"outline",onClick:()=>{e.push("/workspaces")},disabled:b,children:"Cancel"}),(0,n.jsx)(c.z,{onClick:E,disabled:a||b,className:"inline-flex items-center bg-blue-600 hover:bg-blue-700 text-white",children:b?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(m.Z,{size:16,className:"mr-2"}),"Applying..."]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(h.Z,{className:"w-4 h-4 mr-1.5"}),"Apply"]})})]})]})]})]})]})}},2003:function(e,r,t){"use strict";t.d(r,{j:function(){return i}});var n=t(512);let s=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,l=n.W,i=(e,r)=>t=>{var n;if((null==r?void 0:r.variants)==null)return l(e,null==t?void 0:t.class,null==t?void 0:t.className);let{variants:i,defaultVariants:a}=r,o=Object.keys(i).map(e=>{let r=null==t?void 0:t[e],n=null==a?void 0:a[e];if(null===r)return null;let l=s(r)||s(n);return i[e][l]}),c=t&&Object.entries(t).reduce((e,r)=>{let[t,n]=r;return void 0===n||(e[t]=n),e},{});return l(e,o,null==r?void 0:null===(n=r.compoundVariants)||void 0===n?void 0:n.reduce((e,r)=>{let{class:t,className:n,...s}=r;return Object.entries(s).every(e=>{let[r,t]=e;return Array.isArray(t)?t.includes({...a,...c}[r]):({...a,...c})[r]===t})?[...e,t,n]:e},[]),null==t?void 0:t.class,null==t?void 0:t.className)}}},function(e){e.O(0,[614,798,470,293,888,774,179],function(){return e(e.s=4483)}),_N_E=e.O()}]);
@@ -1,16 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[892],{7476:function(e,r,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/users",function(){return t(9253)}])},3626:function(e,r,t){"use strict";t.d(r,{Z:function(){return s}});/**
2
- * @license lucide-react v0.407.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */let s=(0,t(998).Z)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},3767:function(e,r,t){"use strict";t.d(r,{Z:function(){return s}});/**
7
- * @license lucide-react v0.407.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */let s=(0,t(998).Z)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},803:function(e,r,t){"use strict";t.d(r,{z:function(){return c}});var s=t(5893),n=t(7294),a=t(8426),l=t(2003),i=t(2350);let o=(0,l.j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),c=n.forwardRef((e,r)=>{let{className:t,variant:n,size:l,asChild:c=!1,...d}=e,u=c?a.g7:"button";return(0,s.jsx)(u,{className:(0,i.cn)(o({variant:n,size:l,className:t})),ref:r,...d})});c.displayName="Button"},7673:function(e,r,t){"use strict";t.d(r,{Ol:function(){return c},Zb:function(){return o},aY:function(){return f},eW:function(){return m},ll:function(){return d}});var s=t(5893),n=t(7294),a=t(5697),l=t.n(a),i=t(2350);let o=n.forwardRef((e,r)=>{let{className:t,children:n,...a}=e;return(0,s.jsx)("div",{ref:r,className:(0,i.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",t),...a,children:n})});o.displayName="Card",o.propTypes={className:l().string,children:l().node};let c=n.forwardRef((e,r)=>{let{className:t,children:n,...a}=e;return(0,s.jsx)("div",{ref:r,className:(0,i.cn)("flex flex-col space-y-1.5 p-6",t),...a,children:n})});c.displayName="CardHeader",c.propTypes={className:l().string,children:l().node};let d=n.forwardRef((e,r)=>{let{className:t,children:n,...a}=e;return(0,s.jsx)("h3",{ref:r,className:(0,i.cn)("text-2xl font-semibold leading-none tracking-tight",t),...a,children:n})});d.displayName="CardTitle",d.propTypes={className:l().string,children:l().node};let u=n.forwardRef((e,r)=>{let{className:t,children:n,...a}=e;return(0,s.jsx)("p",{ref:r,className:(0,i.cn)("text-sm text-muted-foreground",t),...a,children:n})});u.displayName="CardDescription",u.propTypes={className:l().string,children:l().node};let f=n.forwardRef((e,r)=>{let{className:t,children:n,...a}=e;return(0,s.jsx)("div",{ref:r,className:(0,i.cn)("p-6 pt-0",t),...a,children:n})});f.displayName="CardContent",f.propTypes={className:l().string,children:l().node};let m=n.forwardRef((e,r)=>{let{className:t,children:n,...a}=e;return(0,s.jsx)("div",{ref:r,className:(0,i.cn)("flex items-center p-6 pt-0",t),...a,children:n})});m.displayName="CardFooter",m.propTypes={className:l().string,children:l().node}},8764:function(e,r,t){"use strict";t.d(r,{RM:function(){return o},SC:function(){return c},iA:function(){return l},pj:function(){return u},ss:function(){return d},xD:function(){return i}});var s=t(5893),n=t(7294),a=t(2350);let l=n.forwardRef((e,r)=>{let{className:t,...n}=e;return(0,s.jsx)("div",{className:"relative w-full overflow-auto",children:(0,s.jsx)("table",{ref:r,className:(0,a.cn)("w-full caption-bottom text-base",t),...n})})});l.displayName="Table";let i=n.forwardRef((e,r)=>{let{className:t,...n}=e;return(0,s.jsx)("thead",{ref:r,className:(0,a.cn)("[&_tr]:border-b",t),...n})});i.displayName="TableHeader";let o=n.forwardRef((e,r)=>{let{className:t,...n}=e;return(0,s.jsx)("tbody",{ref:r,className:(0,a.cn)("[&_tr:last-child]:border-0",t),...n})});o.displayName="TableBody",n.forwardRef((e,r)=>{let{className:t,...n}=e;return(0,s.jsx)("tfoot",{ref:r,className:(0,a.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",t),...n})}).displayName="TableFooter";let c=n.forwardRef((e,r)=>{let{className:t,...n}=e;return(0,s.jsx)("tr",{ref:r,className:(0,a.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",t),...n})});c.displayName="TableRow";let d=n.forwardRef((e,r)=>{let{className:t,...n}=e;return(0,s.jsx)("th",{ref:r,className:(0,a.cn)("h-12 px-4 text-left align-middle font-medium text-[hsl(var(--text-strong))] [&:has([role=checkbox])]:pr-0",t),...n})});d.displayName="TableHead";let u=n.forwardRef((e,r)=>{let{className:t,...n}=e;return(0,s.jsx)("td",{ref:r,className:(0,a.cn)("p-4 align-middle [&:has([role=checkbox])]:pr-0",t),...n})});u.displayName="TableCell",n.forwardRef((e,r)=>{let{className:t,...n}=e;return(0,s.jsx)("caption",{ref:r,className:(0,a.cn)("mt-4 text-base text-muted-foreground",t),...n})}).displayName="TableCaption"},4545:function(e,r,t){"use strict";function s(e){return e.startsWith("sky-jobs-controller-")}function n(e,r,t){return null===r?e:[...e].sort((e,s)=>e[r]<s[r]?"ascending"===t?-1:1:e[r]>s[r]?"ascending"===t?1:-1:0)}t.d(r,{R0:function(){return n},Ym:function(){return s}})},9253:function(e,r,t){"use strict";t.r(r),t.d(r,{default:function(){return I}});var s=t(5893),n=t(7294),a=t(9008),l=t.n(a),i=t(5697),o=t.n(i),c=t(8799),d=t(1664),u=t.n(d);t(803);var f=t(8764),m=t(3081),x=t(3266),h=t(8969),p=t(6378),g=t(6856),b=t(1214),y=t(4545),j=t(3626),N=t(282),v=t(3767);/**
12
- * @license lucide-react v0.407.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */let w=(0,t(998).Z)("Pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);var C=t(9470),k=t(3001),R=t(7673),E=t(3225);let T=e=>e&&e.includes("@")?e.split("@")[0]:e||"N/A",_=e=>e&&e.includes("@")?e:"-",Z=b.nb.REFRESH_INTERVAL;function S(){let[e,r]=(0,n.useState)(!1),t=(0,n.useRef)(null),a=(0,k.X)();return(0,s.jsxs)(C.A,{highlighted:"users",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,s.jsx)("div",{className:"text-base",children:(0,s.jsx)(u(),{href:"/users",className:"text-sky-blue hover:underline leading-none",children:"Users"})}),(0,s.jsxs)("div",{className:"flex items-center",children:[e&&(0,s.jsxs)("div",{className:"flex items-center mr-2",children:[(0,s.jsx)(c.Z,{size:15,className:"mt-0"}),(0,s.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"Loading..."})]}),(0,s.jsxs)("button",{onClick:()=>{p.default.invalidate(m.R),p.default.invalidate(x.getClusters),p.default.invalidate(h.getManagedJobs,[{allUsers:!0}]),t.current&&t.current()},disabled:e,className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:[(0,s.jsx)(j.Z,{className:"h-4 w-4 mr-1.5"}),!a&&(0,s.jsx)("span",{children:"Refresh"})]})]})]}),(0,s.jsx)(D,{refreshInterval:Z,setLoading:r,refreshDataRef:t})]})}function D(e){let{refreshInterval:r,setLoading:t,refreshDataRef:a}=e,[l,i]=(0,n.useState)([]),[o,d]=(0,n.useState)(!0),[u,b]=(0,n.useState)(!1),[j,C]=(0,n.useState)({key:"username",direction:"ascending"}),[k,Z]=(0,n.useState)(null),[S,D]=(0,n.useState)(""),I=(0,n.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];t&&e&&t(!0),e&&d(!0);try{let r=await p.default.get(m.R),s=(r||[]).map(e=>({...e,usernameDisplay:T(e.username),fullEmail:_(e.username),clusterCount:-1,jobCount:-1}));i(s),b(!0),t&&e&&t(!1),e&&d(!1);let[n,a]=await Promise.all([p.default.get(x.getClusters),p.default.get(h.getManagedJobs,[{allUsers:!0}])]),l=a.jobs||[],o=(r||[]).map(e=>{let r=(n||[]).filter(r=>r.user_hash===e.userId),t=(l||[]).filter(r=>r.user_hash===e.userId);return{...e,usernameDisplay:T(e.username),fullEmail:_(e.username),clusterCount:r.length,jobCount:t.length}});i(o)}catch(r){console.error("Failed to fetch or process user data:",r),i([]),b(!0),t&&e&&t(!1),e&&d(!1)}},[t]);(0,n.useEffect)(()=>{a&&(a.current=()=>I(!0))},[a,I]),(0,n.useEffect)(()=>{(async()=>{b(!1),d(!0),await g.ZP.preloadForPage("users"),I(!0)})();let e=setInterval(()=>{I(!1)},r);return()=>clearInterval(e)},[I,r]);let F=(0,n.useMemo)(()=>(0,y.R0)(l,j.key,j.direction),[l,j]),L=e=>{let r="ascending";j.key===e&&"ascending"===j.direction&&(r="descending"),C({key:e,direction:r})},M=e=>j.key===e?"ascending"===j.direction?" ↑":" ↓":"",z=async(e,r)=>{try{let t=await fetch("".concat(E.f4,"/users/role"));if(!t.ok){let e=await t.json();throw Error(e.detail||"Failed to get user role")}let s=await t.json();console.log("data",s);let n=s.role;if("admin"!=n){alert("".concat(s.name," is logged in as no admin, cannot edit user role."));return}Z(e),D(r)}catch(e){console.error("Failed to check user role:",e),alert("Error: ".concat(e.message))}},A=()=>{Z(null),D("")},O=async e=>{if(!e||!S){console.error("User ID or role is missing."),alert("Error: User ID or role is missing.");return}d(!0);try{let r=await fetch("".concat(E.f4,"/users/update"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({user_id:e,role:S})});if(!r.ok){let e=await r.json();throw Error(e.detail||"Failed to update role")}p.default.invalidate(m.R),await I(!0),A()}catch(e){console.error("Failed to update user role:",e),alert("Error updating role: ".concat(e.message))}finally{d(!1)}};return o&&0===l.length&&!u?(0,s.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,s.jsx)(c.Z,{})}):u?F&&0!==F.length?(0,s.jsx)(R.Zb,{children:(0,s.jsxs)(f.iA,{children:[(0,s.jsx)(f.xD,{children:(0,s.jsxs)(f.SC,{children:[(0,s.jsxs)(f.ss,{onClick:()=>L("usernameDisplay"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/5",children:["Name",M("usernameDisplay")]}),(0,s.jsxs)(f.ss,{onClick:()=>L("fullEmail"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/5",children:["Email",M("fullEmail")]}),(0,s.jsxs)(f.ss,{onClick:()=>L("role"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/5",children:["Role",M("role")]}),(0,s.jsxs)(f.ss,{onClick:()=>L("clusterCount"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/5",children:["Clusters",M("clusterCount")]}),(0,s.jsxs)(f.ss,{onClick:()=>L("jobCount"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/5",children:["Jobs",M("jobCount")]})]})}),(0,s.jsx)(f.RM,{children:F.map(e=>(0,s.jsxs)(f.SC,{children:[(0,s.jsx)(f.pj,{className:"truncate",title:e.username,children:e.usernameDisplay}),(0,s.jsx)(f.pj,{className:"truncate",title:e.fullEmail,children:e.fullEmail}),(0,s.jsx)(f.pj,{className:"truncate",title:e.role,children:(0,s.jsx)("div",{className:"flex items-center gap-2",children:k===e.userId?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("select",{value:S,onChange:e=>D(e.target.value),className:"block w-auto p-1 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-sky-blue focus:border-sky-blue sm:text-sm",children:[(0,s.jsx)("option",{value:"admin",children:"Admin"}),(0,s.jsx)("option",{value:"user",children:"User"})]}),(0,s.jsx)("button",{onClick:()=>O(e.userId),className:"text-green-600 hover:text-green-800 p-1",title:"Save",children:(0,s.jsx)(N.Z,{className:"h-4 w-4"})}),(0,s.jsx)("button",{onClick:A,className:"text-gray-500 hover:text-gray-700 p-1",title:"Cancel",children:(0,s.jsx)(v.Z,{className:"h-4 w-4"})})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"capitalize",children:e.role}),(0,s.jsx)("button",{onClick:()=>z(e.userId,e.role),className:"text-gray-400 hover:text-sky-blue p-1",title:"Edit role",children:(0,s.jsx)(w,{className:"h-3 w-3"})})]})})}),(0,s.jsx)(f.pj,{children:-1===e.clusterCount?(0,s.jsxs)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-400 rounded text-xs font-medium flex items-center",children:[(0,s.jsx)(c.Z,{size:10,className:"mr-1"}),"Loading..."]}):e.clusterCount>0?(0,s.jsx)("span",{className:"px-2 py-0.5 bg-blue-100 text-blue-800 rounded text-xs font-medium",children:e.clusterCount}):(0,s.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-500 rounded text-xs font-medium",children:"0"})}),(0,s.jsx)(f.pj,{children:-1===e.jobCount?(0,s.jsxs)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-400 rounded text-xs font-medium flex items-center",children:[(0,s.jsx)(c.Z,{size:10,className:"mr-1"}),"Loading..."]}):e.jobCount>0?(0,s.jsx)("span",{className:"px-2 py-0.5 bg-green-100 text-green-800 rounded text-xs font-medium",children:e.jobCount}):(0,s.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-500 rounded text-xs font-medium",children:"0"})})]},e.userId))})]})}):(0,s.jsxs)("div",{className:"text-center py-12",children:[(0,s.jsx)("p",{className:"text-lg font-semibold text-gray-500",children:"No users found."}),(0,s.jsx)("p",{className:"text-sm text-gray-400 mt-1",children:"There are currently no users to display."})]}):(0,s.jsxs)("div",{className:"flex justify-center items-center h-64",children:[(0,s.jsx)(c.Z,{}),(0,s.jsx)("span",{className:"ml-2 text-gray-500",children:"Loading users..."})]})}function I(){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l(),{children:(0,s.jsx)("title",{children:"Users | SkyPilot Dashboard"})}),(0,s.jsx)(S,{})]})}D.propTypes={refreshInterval:o().number.isRequired,setLoading:o().func.isRequired,refreshDataRef:o().shape({current:o().func}).isRequired}},2003:function(e,r,t){"use strict";t.d(r,{j:function(){return l}});var s=t(512);let n=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,a=s.W,l=(e,r)=>t=>{var s;if((null==r?void 0:r.variants)==null)return a(e,null==t?void 0:t.class,null==t?void 0:t.className);let{variants:l,defaultVariants:i}=r,o=Object.keys(l).map(e=>{let r=null==t?void 0:t[e],s=null==i?void 0:i[e];if(null===r)return null;let a=n(r)||n(s);return l[e][a]}),c=t&&Object.entries(t).reduce((e,r)=>{let[t,s]=r;return void 0===s||(e[t]=s),e},{});return a(e,o,null==r?void 0:null===(s=r.compoundVariants)||void 0===s?void 0:s.reduce((e,r)=>{let{class:t,className:s,...n}=r;return Object.entries(n).every(e=>{let[r,t]=e;return Array.isArray(t)?t.includes({...i,...c}[r]):({...i,...c})[r]===t})?[...e,t,s]:e},[]),null==t?void 0:t.class,null==t?void 0:t.className)}}},function(e){e.O(0,[614,470,969,293,856,888,774,179],function(){return e(e.s=7476)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[590],{2592:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/workspaces",function(){return t(9434)}])},1812:function(e,s,t){"use strict";t.d(s,{X:function(){return n}});var r=t(5893),l=t(7294);let a=e=>{if(!(null==e?void 0:e.message))return"An unexpected error occurred.";let s=e.message;return s.includes("failed:")&&(s=s.split("failed:")[1].trim()),s.charAt(0).toUpperCase()+s.slice(1)},n=e=>{let{error:s,title:t="Error",onDismiss:n}=e,[c,o]=(0,l.useState)(!1);if((0,l.useEffect)(()=>{s&&o(!1)},[s]),!s||c)return null;let i="string"==typeof s?s:a(s);return(0,r.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-md p-3 mb-4",children:(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)("div",{className:"flex-shrink-0",children:(0,r.jsx)("svg",{className:"h-5 w-5 text-red-400",viewBox:"0 0 20 20",fill:"currentColor",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),(0,r.jsx)("div",{className:"ml-3",children:(0,r.jsxs)("div",{className:"text-sm text-red-800",children:[(0,r.jsxs)("strong",{children:[t,":"]})," ",i]})})]}),(0,r.jsx)("button",{onClick:()=>{o(!0),n&&n()},className:"flex-shrink-0 ml-4 text-red-400 hover:text-red-600 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 focus:ring-offset-red-50 rounded","aria-label":"Dismiss error",children:(0,r.jsx)("svg",{className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]})})}},9434:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return _}});var r=t(5893),l=t(7294),a=t(9008),n=t.n(a),c=t(9470),o=t(1163),i=t(3266),d=t(8969),u=t(7324),x=t(7673),m=t(803),h=t(8799),f=t(1272),p=t(326),g=t(3850),j=t(1812),w=t(3626),N=t(3001),b=t(8236),k=t(6378),v=t(1214),y=t(6856),C=t(3225);let E=e=>{let{workspace:s,onDelete:t,onEdit:l,router:a}=e,n=async()=>{try{let e=await fetch("".concat(C.f4,"/users/role"));if(!e.ok){let s=await e.json();throw Error(s.detail||"Failed to get user role")}let t=await e.json(),r=t.role;if("admin"!=r){alert("".concat(t.name," is logged in as no admin, cannot edit workspace"));return}l(s.name)}catch(e){console.error("Failed to check user role:",e),alert("Error: ".concat(e.message))}};return(0,r.jsxs)(x.Zb,{children:[(0,r.jsx)(x.Ol,{children:(0,r.jsxs)(x.ll,{className:"text-base font-normal",children:[(0,r.jsx)("span",{className:"font-semibold",children:"Workspace:"})," ",s.name]})}),(0,r.jsxs)(x.aY,{className:"text-sm pb-2",children:[(0,r.jsxs)("div",{className:"py-2 flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center text-gray-600",children:[(0,r.jsx)(g.QT,{className:"w-4 h-4 mr-2 text-gray-500"}),(0,r.jsx)("span",{children:"Clusters (Running / Total)"})]}),(0,r.jsxs)("button",{onClick:()=>{a.push({pathname:"/clusters",query:{workspace:s.name}})},className:"font-normal text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",children:[s.runningClusterCount," / ",s.totalClusterCount]})]}),(0,r.jsxs)("div",{className:"py-2 flex items-center justify-between border-t border-gray-100",children:[(0,r.jsxs)("div",{className:"flex items-center text-gray-600",children:[(0,r.jsx)(g.Vp,{className:"w-4 h-4 mr-2 text-gray-500"}),(0,r.jsx)("span",{children:"Managed Jobs"})]}),(0,r.jsx)("button",{onClick:()=>{a.push({pathname:"/jobs",query:{workspace:s.name}})},className:"font-normal text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",children:s.managedJobsCount})]})]}),(0,r.jsxs)("div",{className:"px-6 pb-3 text-sm pt-3",children:[(0,r.jsx)("h4",{className:"mb-2 text-xs text-gray-500 tracking-wider",children:"Enabled Infra"}),(0,r.jsx)("div",{className:"flex flex-wrap gap-x-4 gap-y-1",children:s.clouds.map(e=>(0,r.jsxs)("div",{className:"flex items-center text-gray-700",children:[(0,r.jsx)(g.Ye,{className:"w-3.5 h-3.5 mr-1.5 text-green-500"}),(0,r.jsx)("span",{children:e})]},e))})]}),(0,r.jsxs)(x.eW,{className:"flex justify-end pt-3 gap-2",children:[(0,r.jsx)(m.z,{variant:"outline",size:"sm",onClick:()=>t(s.name),disabled:"default"===s.name,title:"default"===s.name?"Cannot delete default workspace":"Delete workspace",className:"text-red-600 hover:text-red-700 hover:bg-red-50",children:"Delete"}),(0,r.jsx)(m.z,{variant:"outline",size:"sm",onClick:n,children:"Edit"})]})]},s.name)},D=e=>{let{onClick:s}=e,t=async()=>{try{let e=await fetch("".concat(C.f4,"/users/role"));if(!e.ok){let s=await e.json();throw Error(s.detail||"Failed to get user role")}let t=await e.json(),r=t.role;if("admin"!=r){alert("".concat(t.name," is logged in as no admin, cannot create workspace"));return}s()}catch(e){console.error("Failed to check user role:",e),alert("Error: ".concat(e.message))}};return(0,r.jsx)(x.Zb,{className:"border-2 border-dashed border-sky-300 hover:border-sky-400 cursor-pointer transition-colors flex flex-col",onClick:t,children:(0,r.jsx)("div",{className:"flex-1 flex items-center justify-center p-6",children:(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("div",{className:"w-16 h-16 rounded-full bg-sky-100 flex items-center justify-center mb-4 mx-auto",children:(0,r.jsx)("span",{className:"text-3xl text-sky-600",children:"+"})}),(0,r.jsx)("h3",{className:"text-lg font-medium text-sky-700 mb-2",children:"Create New Workspace"}),(0,r.jsx)("p",{className:"text-sm text-gray-500",children:"Set up a new workspace with custom infrastructure configurations"})]})})},"create-new")},z=e=>{let{workspaceCount:s,runningClusters:t,totalClusters:l,managedJobs:a,router:n}=e;return(0,r.jsx)("div",{className:"bg-sky-50 p-4 rounded-lg shadow mb-6",children:(0,r.jsxs)("div",{className:"flex flex-col sm:flex-row justify-around items-center",children:[(0,r.jsx)("div",{className:"p-2",children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(g.E9,{className:"w-5 h-5 mr-2 text-sky-600"}),(0,r.jsx)("span",{className:"text-sm text-gray-600",children:"Workspaces:"}),(0,r.jsx)("span",{className:"ml-1 text-xl font-semibold text-sky-700",children:s})]})}),(0,r.jsx)("div",{className:"p-2",children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(g.QT,{className:"w-5 h-5 mr-2 text-sky-600"}),(0,r.jsx)("span",{className:"text-sm text-gray-600",children:"Clusters (Running / Total):"}),(0,r.jsxs)("button",{onClick:()=>n.push("/clusters"),className:"ml-1 text-xl font-semibold text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",children:[t," / ",l]})]})}),(0,r.jsx)("div",{className:"p-2",children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(g.Vp,{className:"w-5 h-5 mr-2 text-sky-600"}),(0,r.jsx)("span",{className:"text-sm text-gray-600",children:"Managed Jobs:"}),(0,r.jsx)("button",{onClick:()=>n.push("/jobs"),className:"ml-1 text-xl font-semibold text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",children:a})]})})]})})},O=v.nb.REFRESH_INTERVAL;function T(){let[e,s]=(0,l.useState)([]),[t,a]=(0,l.useState)({runningClusters:0,totalClusters:0,managedJobs:0}),[n,c]=(0,l.useState)(!0),[x,g]=(0,l.useState)(null),[v,T]=(0,l.useState)(!1),[_,R]=(0,l.useState)({confirmOpen:!1,workspaceToDelete:null,deleting:!1,error:null}),S=(0,o.useRouter)(),F=(0,N.X)(),J=async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e&&c(!0);try{let[e,t,r]=await Promise.all([k.default.get(u.fX),k.default.get(i.getClusters),k.default.get(d.getManagedJobs,[{allUsers:!0}])]);g(e);let l=Object.keys(e),n=await Promise.all(l.map(e=>k.default.get(u.yz,[e]))),c=Object.fromEntries(l.map((e,s)=>[e,n[s]])),o=Object.fromEntries(t.map(e=>[e.cluster,e.workspace||"default"])),x={};l.forEach(e=>{x[e]={name:e,totalClusterCount:0,runningClusterCount:0,managedJobsCount:0,clouds:new Set}});let m=0;t.forEach(e=>{let s=e.workspace||"default";x[s]||(x[s]={name:s,totalClusterCount:0,runningClusterCount:0,managedJobsCount:0,clouds:new Set}),x[s].totalClusterCount++,("RUNNING"===e.status||"LAUNCHING"===e.status)&&(x[s].runningClusterCount++,m++),e.cloud&&x[s].clouds.add(e.cloud)});let h=r.jobs||[],f=new Set(b.x2.active),p=0;h.forEach(e=>{let s=e.cluster_name||e.resources&&e.resources.cluster_name;if(s){let t=o[s];t&&x[t]&&f.has(e.status)&&x[t].managedJobsCount++}f.has(e.status)&&p++});let j=Object.values(x).filter(e=>l.includes(e.name)).map(e=>({...e,clouds:Array.isArray(c[e.name])?c[e.name]:[]})).sort((e,s)=>e.name.localeCompare(s.name));s(j),a({runningClusters:m,totalClusters:t.length,managedJobs:p})}catch(e){console.error("Error fetching workspace data:",e),s([]),a({runningClusters:0,totalClusters:0,managedJobs:0})}e&&c(!1)};(0,l.useEffect)(()=>{(async()=>{await y.ZP.preloadForPage("workspaces"),J(!0)})();let e=setInterval(()=>{J(!1)},O);return()=>clearInterval(e)},[]);let L=async e=>{try{let s=await fetch("".concat(C.f4,"/users/role"));if(!s.ok){let e=await s.json();throw Error(e.detail||"Failed to get user role")}let t=await s.json(),r=t.role;if("admin"!=r){alert("".concat(t.name," is logged in as no admin, cannot delete workspace"));return}R({confirmOpen:!0,workspaceToDelete:e,deleting:!1,error:null})}catch(e){console.error("Failed to check user role:",e),alert("Error: ".concat(e.message))}},A=async()=>{if(_.workspaceToDelete){R(e=>({...e,deleting:!0,error:null}));try{await (0,u.zl)(_.workspaceToDelete),R({confirmOpen:!1,workspaceToDelete:null,deleting:!1,error:null}),await J()}catch(e){console.error("Error deleting workspace:",e),R(s=>({...s,deleting:!1,error:e}))}}},Z=()=>{R({confirmOpen:!1,workspaceToDelete:null,deleting:!1,error:null})},P=async()=>{try{let e=await fetch("".concat(C.f4,"/users/role"));if(!e.ok){let s=await e.json();throw Error(s.detail||"Failed to get user role")}let s=await e.json(),t=s.role;if("admin"!=t){alert("".concat(s.name," is logged in as no admin, cannot edit config"));return}S.push("/config")}catch(e){console.error("Failed to check user role:",e),alert("Error: ".concat(e.message))}};return n&&0===e.length?(0,r.jsxs)("div",{className:"flex justify-center items-center h-64",children:[(0,r.jsx)(h.Z,{}),(0,r.jsx)("span",{className:"ml-2 text-gray-500",children:"Loading workspaces..."})]}):(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,r.jsxs)("div",{className:"text-base flex items-center",children:[(0,r.jsx)("span",{className:"text-sky-blue leading-none",children:"Workspaces"}),(0,r.jsx)(m.z,{variant:"outline",size:"sm",onClick:P,className:"ml-4 px-2 py-1 text-xs",disabled:n||!x||0===Object.keys(x).length,children:"Edit All Configs"})]}),(0,r.jsxs)("div",{className:"flex items-center",children:[n&&(0,r.jsxs)("div",{className:"flex items-center mr-2",children:[(0,r.jsx)(h.Z,{size:15,className:"mt-0"}),(0,r.jsx)("span",{className:"ml-2 text-gray-500 text-xs",children:"Refreshing..."})]}),(0,r.jsxs)("button",{onClick:()=>{k.default.invalidate(u.fX),k.default.invalidate(i.getClusters),k.default.invalidate(d.getManagedJobs,[{allUsers:!0}]),k.default.invalidateFunction(u.yz),J(!0)},disabled:n,className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:[(0,r.jsx)(w.Z,{className:"h-4 w-4 mr-1.5"}),!F&&(0,r.jsx)("span",{children:"Refresh"})]})]})]}),(0,r.jsx)(z,{workspaceCount:e.length,runningClusters:t.runningClusters,totalClusters:t.totalClusters,managedJobs:t.managedJobs,router:S}),0!==e.length||n?(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[e.map(e=>(0,r.jsx)(E,{workspace:e,onDelete:L,onEdit:e=>S.push("/workspaces/".concat(e)),router:S},e.name)),(0,r.jsx)(D,{onClick:()=>S.push("/workspace/new")})]}):(0,r.jsxs)("div",{className:"text-center py-10",children:[(0,r.jsx)("p",{className:"text-lg text-gray-600",children:"No workspaces found."}),(0,r.jsx)("p",{className:"text-sm text-gray-500 mt-2",children:"Create a cluster to see its workspace here."})]}),x&&(0,r.jsx)(p.Vq,{open:v,onOpenChange:T,children:(0,r.jsxs)(p.cZ,{className:"sm:max-w-md md:max-w-lg lg:max-w-xl xl:max-w-2xl w-full max-h-[90vh] flex flex-col",children:[(0,r.jsx)(p.fK,{children:(0,r.jsx)(p.$N,{className:"pr-10",children:"All Workspaces Configuration"})}),(0,r.jsx)("div",{className:"flex-grow overflow-y-auto py-4",children:(0,r.jsx)("pre",{style:{backgroundColor:"#f5f5f5",padding:"16px",borderRadius:"8px",overflowX:"auto",whiteSpace:"pre",wordBreak:"normal"},children:f.ZP.dump(x,{indent:2})})})]})}),(0,r.jsx)(p.Vq,{open:_.confirmOpen,onOpenChange:Z,children:(0,r.jsxs)(p.cZ,{className:"sm:max-w-md",children:[(0,r.jsxs)(p.fK,{children:[(0,r.jsx)(p.$N,{children:"Delete Workspace"}),(0,r.jsxs)(p.Be,{children:['Are you sure you want to delete workspace "',_.workspaceToDelete,'"? This action cannot be undone.']})]}),(0,r.jsx)(j.X,{error:_.error,title:"Deletion Failed",onDismiss:()=>R(e=>({...e,error:null}))}),(0,r.jsxs)(p.cN,{children:[(0,r.jsx)(m.z,{variant:"outline",onClick:Z,disabled:_.deleting,children:"Cancel"}),(0,r.jsx)(m.z,{variant:"destructive",onClick:A,disabled:_.deleting,children:_.deleting?"Deleting...":"Delete"})]})]})})]})}function _(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n(),{children:(0,r.jsx)("title",{children:"Workspaces | SkyPilot Dashboard"})}),(0,r.jsx)(c.A,{highlighted:"workspaces",children:(0,r.jsx)(T,{})})]})}}},function(e){e.O(0,[614,798,121,470,969,293,856,973,236,888,774,179],function(){return e(e.s=2592)}),_N_E=e.O()}]);