skypilot-nightly 1.0.0.dev20250526__py3-none-any.whl → 1.0.0.dev20250527__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 (73) hide show
  1. sky/__init__.py +2 -2
  2. sky/check.py +28 -5
  3. sky/cli.py +5 -22
  4. sky/client/cli.py +5 -22
  5. sky/client/sdk.py +5 -2
  6. sky/clouds/cloud.py +2 -2
  7. sky/clouds/kubernetes.py +10 -5
  8. sky/clouds/service_catalog/kubernetes_catalog.py +4 -0
  9. sky/clouds/ssh.py +24 -8
  10. sky/core.py +20 -2
  11. sky/dashboard/out/404.html +1 -1
  12. sky/dashboard/out/_next/static/D5bjIfl4Ob3SV3LJz3CO0/_buildManifest.js +1 -0
  13. sky/dashboard/out/_next/static/chunks/236-e220ba0c35bf089e.js +6 -0
  14. sky/dashboard/out/_next/static/chunks/{498-d7722313e5e5b4e6.js → 320-afea3ddcc5bd1c6c.js} +1 -16
  15. sky/dashboard/out/_next/static/chunks/{480-5a0de8b6570ea105.js → 470-1d784f5c8750744a.js} +1 -1
  16. sky/dashboard/out/_next/static/chunks/627-31b701e69f52db0c.js +1 -0
  17. sky/dashboard/out/_next/static/chunks/843-e35d71cf1c7f706e.js +11 -0
  18. sky/dashboard/out/_next/static/chunks/990-f85643b521f7ca65.js +1 -0
  19. sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/[job]-339b59921ccfe266.js +1 -0
  20. sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]-e23fcddf60578a0d.js +1 -0
  21. sky/dashboard/out/_next/static/chunks/pages/{clusters-9e6d1ec6e1ac5b29.js → clusters-8afda8efa5b74997.js} +1 -1
  22. sky/dashboard/out/_next/static/chunks/pages/config-72b8c6c2edfd0e39.js +6 -0
  23. sky/dashboard/out/_next/static/chunks/pages/infra-1521baab6992916b.js +1 -0
  24. sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-4d913940b4fa6f5a.js +1 -0
  25. sky/dashboard/out/_next/static/chunks/pages/jobs-ff7e8e377d02b651.js +1 -0
  26. sky/dashboard/out/_next/static/chunks/pages/users-9900af52acf8648d.js +1 -0
  27. sky/dashboard/out/_next/static/chunks/pages/workspace/{new-bbf436f41381e169.js → new-63763ffa3edb4508.js} +1 -1
  28. sky/dashboard/out/_next/static/chunks/pages/workspaces/{[name]-7733c960685b4385.js → [name]-3ede7a13caf23375.js} +1 -1
  29. sky/dashboard/out/_next/static/chunks/pages/workspaces-72330c4d0fc9a4a2.js +1 -0
  30. sky/dashboard/out/_next/static/css/6a1c0d711a4bdaf1.css +3 -0
  31. sky/dashboard/out/clusters/[cluster]/[job].html +1 -1
  32. sky/dashboard/out/clusters/[cluster].html +1 -1
  33. sky/dashboard/out/clusters.html +1 -1
  34. sky/dashboard/out/config.html +1 -0
  35. sky/dashboard/out/index.html +1 -1
  36. sky/dashboard/out/infra.html +1 -1
  37. sky/dashboard/out/jobs/[job].html +1 -1
  38. sky/dashboard/out/jobs.html +1 -1
  39. sky/dashboard/out/users.html +1 -1
  40. sky/dashboard/out/workspace/new.html +1 -1
  41. sky/dashboard/out/workspaces/[name].html +1 -1
  42. sky/dashboard/out/workspaces.html +1 -1
  43. sky/server/constants.py +1 -1
  44. sky/server/requests/payloads.py +18 -5
  45. sky/server/requests/serializers/decoders.py +0 -11
  46. sky/server/server.py +19 -9
  47. sky/skypilot_config.py +4 -0
  48. sky/utils/kubernetes/exec_kubeconfig_converter.py +19 -0
  49. sky/utils/schemas.py +57 -5
  50. sky/workspaces/core.py +186 -50
  51. sky/workspaces/server.py +25 -0
  52. {skypilot_nightly-1.0.0.dev20250526.dist-info → skypilot_nightly-1.0.0.dev20250527.dist-info}/METADATA +1 -1
  53. {skypilot_nightly-1.0.0.dev20250526.dist-info → skypilot_nightly-1.0.0.dev20250527.dist-info}/RECORD +61 -58
  54. {skypilot_nightly-1.0.0.dev20250526.dist-info → skypilot_nightly-1.0.0.dev20250527.dist-info}/WHEEL +1 -1
  55. sky/dashboard/out/_next/static/7GEgRyZKRaSnYZCV1Jwol/_buildManifest.js +0 -1
  56. sky/dashboard/out/_next/static/chunks/25-062253ea41fb8eec.js +0 -6
  57. sky/dashboard/out/_next/static/chunks/734-a6e01d7f98904741.js +0 -1
  58. sky/dashboard/out/_next/static/chunks/938-59956af3950b02ed.js +0 -1
  59. sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/[job]-3b5aad09a25f64b7.js +0 -1
  60. sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]-9529d9e882a0e75c.js +0 -16
  61. sky/dashboard/out/_next/static/chunks/pages/infra-abb7d744ecf15109.js +0 -1
  62. sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-48dc8d67d4b60be1.js +0 -1
  63. sky/dashboard/out/_next/static/chunks/pages/jobs-73d5e0c369d00346.js +0 -16
  64. sky/dashboard/out/_next/static/chunks/pages/users-b8acf6e6735323a2.js +0 -1
  65. sky/dashboard/out/_next/static/chunks/pages/workspaces-5ed48b3201b998c8.js +0 -1
  66. sky/dashboard/out/_next/static/css/28558d57108b05ae.css +0 -3
  67. /sky/dashboard/out/_next/static/{7GEgRyZKRaSnYZCV1Jwol → D5bjIfl4Ob3SV3LJz3CO0}/_ssgManifest.js +0 -0
  68. /sky/dashboard/out/_next/static/chunks/{573-f17bd89d9f9118b3.js → 573-82bd40a37af834f1.js} +0 -0
  69. /sky/dashboard/out/_next/static/chunks/{578-d351125af46c293f.js → 578-24f35aa98d38d638.js} +0 -0
  70. /sky/dashboard/out/_next/static/chunks/pages/{_app-96a715a6fb01e228.js → _app-3985f074c163a856.js} +0 -0
  71. {skypilot_nightly-1.0.0.dev20250526.dist-info → skypilot_nightly-1.0.0.dev20250527.dist-info}/entry_points.txt +0 -0
  72. {skypilot_nightly-1.0.0.dev20250526.dist-info → skypilot_nightly-1.0.0.dev20250527.dist-info}/licenses/LICENSE +0 -0
  73. {skypilot_nightly-1.0.0.dev20250526.dist-info → skypilot_nightly-1.0.0.dev20250527.dist-info}/top_level.txt +0 -0
@@ -1,10 +1,10 @@
1
- sky/__init__.py,sha256=wkBbWcDGwqieUPRT_DR9HdGtGFWluVMTWnR_o4eEnn0,6428
1
+ sky/__init__.py,sha256=2Q8nxP6Gmldp-lZvg6CZZMEyhdPNMEvYb7MPa1xvJs0,6428
2
2
  sky/admin_policy.py,sha256=hPo02f_A32gCqhUueF0QYy1fMSSKqRwYEg_9FxScN_s,3248
3
3
  sky/authentication.py,sha256=ND011K_-Ud1dVZF37A9KrwYir_ihJXcHc7iDWmuBc8Q,22872
4
- sky/check.py,sha256=CzYM5gyI3AIPvtSxAhau_cvuCGD91oTFCmc9ReYAQvs,26986
5
- sky/cli.py,sha256=7Tih3F7Y8DavpwfK7BRYgLomilUKY77e8x6pbKJpofw,244583
4
+ sky/check.py,sha256=wQ5ORtBpfAgX3WuHkj0d-rW0JlIMSagqi_FME3Yzap0,28361
5
+ sky/cli.py,sha256=QqDm7Gxkqn7QyF79LgaP1kVOXyFVJ4sVpHI4qLq-lfo,243978
6
6
  sky/cloud_stores.py,sha256=Ln5GBpel-sEs7rVx7bBrMkfLwA_bctI05Rox2uoz7Lo,26388
7
- sky/core.py,sha256=nZBAu-rNYeogpJKJCIEJqJNPxGox-SBSQC16t9RwPOU,51383
7
+ sky/core.py,sha256=aR9lIsZUkIMfM8HEAx186woTgxwCwuway6r46pi3XUM,52197
8
8
  sky/dag.py,sha256=8x-VMtjvSi0lYBemCMPLYq5ONljhoABjWzMKjmmdjSo,3369
9
9
  sky/exceptions.py,sha256=6TJ1MMw6Y9W94eig22xgun3rzvJCTh4yHNq3mGACX-U,17362
10
10
  sky/execution.py,sha256=YSzpSxoUqLlGZ5v-2pgCt9Jkkcwz12FovOeFs3lC3q8,33109
@@ -13,7 +13,7 @@ sky/models.py,sha256=bGMSATMkSMr_Kp6SCoiJVVeebwSdZuzjw_jrJzVWAAc,1603
13
13
  sky/optimizer.py,sha256=24hkzaM1W_VRhVkhtWXmUhJDOX55WV9kEF1hAVW_tVg,61426
14
14
  sky/resources.py,sha256=QIUvDeEEcxxAMwl_MnLRP3Y6L0CBczNO4EoDhLcGR5A,92232
15
15
  sky/sky_logging.py,sha256=cMurxhFExKEFX1frcMR71Ti_s9Obg9WY30veVxsZB6o,7285
16
- sky/skypilot_config.py,sha256=_le1hQwc8mH4BGFQIp7A637_k3Dw8780adfjtA22GWQ,28353
16
+ sky/skypilot_config.py,sha256=12NGZ2_nIuQaO4cRF4C9xu98EPK3OxtRAfhn3-smTwc,28618
17
17
  sky/task.py,sha256=trVBbnDejpRjDjpl-9FTt32sx6HXihAkCmQ4yKFebXg,58403
18
18
  sky/adaptors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
19
  sky/adaptors/aws.py,sha256=4caUTO5nxZQyDVPyQdoPljaF-Lz_Fa6NEnu3FfmLZd4,8633
@@ -43,26 +43,26 @@ sky/benchmark/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
43
43
  sky/benchmark/benchmark_state.py,sha256=X8CXmuU9KgsDRhKedhFgjeRMUFWtQsjFs1qECvPG2yg,8723
44
44
  sky/benchmark/benchmark_utils.py,sha256=7rf-iHt6RXZ_pnBBWOMwcdodHQW69x27xNyx0yVog1U,26385
45
45
  sky/client/__init__.py,sha256=pz6xvVSd9X-gwqbsDL0E9QOojYqM0KAD0j-NCyCIF1k,38
46
- sky/client/cli.py,sha256=7Tih3F7Y8DavpwfK7BRYgLomilUKY77e8x6pbKJpofw,244583
46
+ sky/client/cli.py,sha256=QqDm7Gxkqn7QyF79LgaP1kVOXyFVJ4sVpHI4qLq-lfo,243978
47
47
  sky/client/common.py,sha256=E_5cjxd8fWRB7fU1yfIbiyQf-IyVhpD5KkB7Fl3cQEI,15215
48
- sky/client/sdk.py,sha256=Ruxr7ZfUyprJxbY32NSActcHIBX8dRmPvC46qJzAT1k,78595
48
+ sky/client/sdk.py,sha256=bLBDpjT3_tFvN5eAQ-B8zmxUpraApwsOZRYjZuNzCtw,78768
49
49
  sky/clouds/__init__.py,sha256=5aPPmXGCnGN8DbOXTXh_BirESaW4wK-bao2n_3-fm6Q,1561
50
50
  sky/clouds/aws.py,sha256=BkD27knG7aaC033jFS5SO3qdG19a5yHlKTrLIeBUBck,55055
51
51
  sky/clouds/azure.py,sha256=1jxa8vxi3N8EHdeV3mzL6uc1XKrQy4_lGB9lnccswjM,32743
52
- sky/clouds/cloud.py,sha256=J8MZKf8tfSJHPc0t2VlkKCJUKwQrQRvJhNCUpLIr15s,37907
52
+ sky/clouds/cloud.py,sha256=2UGiWQ09UdhtJT7Rr_gwXazwzqx56vkFIhxmocl6Yeg,37913
53
53
  sky/clouds/cudo.py,sha256=K9_1IqQCLobsG0qlsxL_b1BiTqBIVNE5lB0WWNXTuws,13459
54
54
  sky/clouds/do.py,sha256=JOhNAb4WTI8Zv6NGuJQcmAqJ-0aQC3XF4ehmp94Wu_E,11839
55
55
  sky/clouds/fluidstack.py,sha256=YZevkDLWR8dwXJFAC89JqzEnISmlA_8_rjIK_qVwGu8,12918
56
56
  sky/clouds/gcp.py,sha256=WFD5afjCrQyh63w6U2pATrsEIYpSg-aEUEU4sEflkbo,67369
57
57
  sky/clouds/ibm.py,sha256=9_7EGmCtYznJSvAC5reKAwTtb-ZRmhHZSrUKHF9CVBg,22352
58
- sky/clouds/kubernetes.py,sha256=z4lhUPOjEvGQkX-gQm3AZkofaY646sL8y0qNWkj4Ul0,39674
58
+ sky/clouds/kubernetes.py,sha256=HkPy9QNAFhef8nGLI8RZ1LLRcJh_MLIBUVVA6HYqTfw,39963
59
59
  sky/clouds/lambda_cloud.py,sha256=TAmc7K_YIg5Ixbftby0YqjNmA-4dWd__C78USa0_DbU,13037
60
60
  sky/clouds/nebius.py,sha256=biz0o9qwJuGG22V6KE3kYqen-v2XKf2nT8qlAWG1QdA,16210
61
61
  sky/clouds/oci.py,sha256=w86FhaVW30Kx0BVeFweTMThWmYAWG65vgdcqqJXGjy8,28011
62
62
  sky/clouds/paperspace.py,sha256=ZdxZqwymxVMQ9S-wM_wAnS35_yFPSMgRgkvaTpXxuNM,11307
63
63
  sky/clouds/runpod.py,sha256=vqAO1CxQmnYRRwG5r30QROhBrSBHu8r674pK8fNr6XM,12769
64
64
  sky/clouds/scp.py,sha256=yaV5_kLycx4KXpbmD1BONrGxTNEikZOUtNBZ88s0B_Q,16262
65
- sky/clouds/ssh.py,sha256=mk25ujraATWU7Xx-Her7H8T4gaEiM6OcRJN1wOTyC3w,7577
65
+ sky/clouds/ssh.py,sha256=iDX-ToYnJBFn3I831ktfuQOVyvcXrXakRKlAeSdfy6Q,8319
66
66
  sky/clouds/vast.py,sha256=orwttbvp4sCgp0d22Bt-IuaueIM8065fcWZBdxm25g8,11584
67
67
  sky/clouds/vsphere.py,sha256=pUS_6TCDM9o2iRtTANost69ALZ10U9FxOio4OMldazc,12691
68
68
  sky/clouds/service_catalog/__init__.py,sha256=rw8ynYIQ3RyC9HP47J3NGhMg5rK4klYHfe1ABPVGcy4,15126
@@ -76,7 +76,7 @@ sky/clouds/service_catalog/do_catalog.py,sha256=Cug2QaQlSN6nFhba7f1ksyzs6z0ICTj6
76
76
  sky/clouds/service_catalog/fluidstack_catalog.py,sha256=21-cvrYEYTIi7n3ZNF2e7_0QX-PF4BkhlVJUWQOvKrY,5059
77
77
  sky/clouds/service_catalog/gcp_catalog.py,sha256=1fhw1nqgdqC1tByxFjOc04G7vEZ4-5H5iGgGtVZ19L4,25371
78
78
  sky/clouds/service_catalog/ibm_catalog.py,sha256=1iK0KvbI82U7sySb7chr-qm_16x3tTnZ6nIo7o76ouc,4493
79
- sky/clouds/service_catalog/kubernetes_catalog.py,sha256=vm7UDpOiG2EFWlxHz6td7-dXL_OtajpvuP5PoD9nkUk,13733
79
+ sky/clouds/service_catalog/kubernetes_catalog.py,sha256=iV01LO5j78-PMieVIp-dl0FAjeQAQaPKDYfcS72oeUM,14002
80
80
  sky/clouds/service_catalog/lambda_catalog.py,sha256=2R-ccu63BbdvO6X80MtxiniA-jLewXb6I0Ye1rYD9fY,5302
81
81
  sky/clouds/service_catalog/nebius_catalog.py,sha256=SEPyR9kCvirp6astnEUOfEMru48uyX_EIC6nbL1YBUA,4507
82
82
  sky/clouds/service_catalog/oci_catalog.py,sha256=cyA6ZqwHGOKuPxUl_dKmFGdeWdQGMrvl_-o2MtyF998,8580
@@ -103,26 +103,28 @@ sky/clouds/utils/azure_utils.py,sha256=NToRBnhEyuUvb-nBnsKTxjhOBRkMcrelL8LK4w6s4
103
103
  sky/clouds/utils/gcp_utils.py,sha256=YtuS4EoAMvcRnGPgE_WLENPOPWIdvhp7dLceTw_zfas,7114
104
104
  sky/clouds/utils/oci_utils.py,sha256=0YxhgZdeIHQUI1AZ86YuswsZg5HdVCIVfSTRJsSHYI0,6396
105
105
  sky/clouds/utils/scp_utils.py,sha256=MqawUhhFHHxVnn29nOI4gJ_nF665ich4Po7bsy1afsA,15948
106
- sky/dashboard/out/404.html,sha256=S-xFtozoHT-f6CnVW8bi1Qhd_zjM4PmFKuaJt2e8Cq8,2296
107
- sky/dashboard/out/clusters.html,sha256=8H92yE4caY8mDowcIhZS8K5YeE7v6a9sBbVTsQaAXF0,13612
106
+ sky/dashboard/out/404.html,sha256=V68d95mrk488_BvwXBO9Hcwe1zFvymBsVWvL3mOAGkc,2296
107
+ sky/dashboard/out/clusters.html,sha256=f6wdX6wY-dn_mcRjhocoI9Fu6KPX2P0486BH3blF8NY,13699
108
+ sky/dashboard/out/config.html,sha256=aIpbvMOJ8FCtUwIvgZUdR9Dn3w0QDg9Czh1BnajUnWA,14748
108
109
  sky/dashboard/out/favicon.ico,sha256=XilUZZglAl_1zRsg85QsbQgmQAzGPQjcUIJ-A3AzYn8,93590
109
- sky/dashboard/out/index.html,sha256=ySHBQdcpKgaG7SzOYfQJ7_5INhV78rYFInMZQu_1Qh4,1407
110
- sky/dashboard/out/infra.html,sha256=4FeL7Z9E1OxA5JADdzlswThbpPIkPn_wVyeibNraRj4,18682
111
- sky/dashboard/out/jobs.html,sha256=kGyjxg-24fsBswB7g20KiDWbRIqdj5fKbvMmJXaOAcE,14707
110
+ sky/dashboard/out/index.html,sha256=K1OwmkzoZc7j3OZeSvzWlGhopuQaolxhrNaKe4ItLqA,1407
111
+ sky/dashboard/out/infra.html,sha256=uMn0V9xX5-dPmmR__iKG2iZID9xUW30dWvLmk2vcthE,18682
112
+ sky/dashboard/out/jobs.html,sha256=FpcpFXlU5Cy7yl2at3Zxe2r08-i8X3afhnEsCbcq1Kk,14794
112
113
  sky/dashboard/out/skypilot.svg,sha256=c0iRtlfLlaUm2p0rG9NFmo5FN0Qhf3pq5Xph-AeMPJw,5064
113
- sky/dashboard/out/users.html,sha256=Ihkyj_BcMpuGIN7AU3xNZ_yIEsBmvxC64hT_zlaagEY,12366
114
- sky/dashboard/out/workspaces.html,sha256=nFxSTM1Gzteitzmf5GcSf5ZBHvD1IGKiI4XmnTlIejc,11901
115
- sky/dashboard/out/_next/static/7GEgRyZKRaSnYZCV1Jwol/_buildManifest.js,sha256=gCA9z3nHRuoumlhXAHrhHiuFeGOY9sR74rO0MnvxS8k,1648
116
- sky/dashboard/out/_next/static/7GEgRyZKRaSnYZCV1Jwol/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
117
- sky/dashboard/out/_next/static/chunks/25-062253ea41fb8eec.js,sha256=JsmeTZAAvKLageHBNi5GlcMOmFYQsozdgC05xuYEFWs,14846
118
- sky/dashboard/out/_next/static/chunks/480-5a0de8b6570ea105.js,sha256=63umXKpoUEcQEddm5-FQEUGYJrYYk_m9PGi1cSfHIvE,23077
114
+ sky/dashboard/out/users.html,sha256=0E86UL0DZpFu2da-WgRxOewk1bxPYkVFIP6TucLaXPY,12366
115
+ sky/dashboard/out/workspaces.html,sha256=5OpaUDK6idvj3E2Ijt6thXg_FLvuJmO2mgqJH9ayCCE,11988
116
+ sky/dashboard/out/_next/static/D5bjIfl4Ob3SV3LJz3CO0/_buildManifest.js,sha256=yI7W3vfqslz5x0jDeE6K79vUsnexBL8QrZ5c6WIpLws,1784
117
+ sky/dashboard/out/_next/static/D5bjIfl4Ob3SV3LJz3CO0/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
118
+ sky/dashboard/out/_next/static/chunks/236-e220ba0c35bf089e.js,sha256=vsdDnqqwo2LOwFqsNpqJRPvT01n4Vzd2wQXpQTa_U-U,28514
119
+ sky/dashboard/out/_next/static/chunks/320-afea3ddcc5bd1c6c.js,sha256=TfRRqBkCCzHk0Hb8DUzYDRIt9ekDN9ZRdiYlDWAIiiQ,62726
120
+ sky/dashboard/out/_next/static/chunks/470-1d784f5c8750744a.js,sha256=29XeaPd2hX0_FPbSuDDLLGsd9VrHORLAK-L11rJSA9Q,21474
119
121
  sky/dashboard/out/_next/static/chunks/488-50d843fdb5396d32.js,sha256=0ECQ8dqh-FzJ-NQZ-JV6KsCZqfsenPoxacGpWQlOIzI,8916
120
- sky/dashboard/out/_next/static/chunks/498-d7722313e5e5b4e6.js,sha256=utGz6l3eM0QXd5NCMUTCyK_yfOoi2fqlTFY8sbRuQkM,64292
121
- sky/dashboard/out/_next/static/chunks/573-f17bd89d9f9118b3.js,sha256=p1Ce-Z3KwtCegMin6sGzif0oVLCT6uzvnfYhOs30tgg,283993
122
- sky/dashboard/out/_next/static/chunks/578-d351125af46c293f.js,sha256=sLLMKRpah8ozOKKARGCiha7eBzOiqGUJWATTZnE7ixA,10039
123
- sky/dashboard/out/_next/static/chunks/734-a6e01d7f98904741.js,sha256=ueu7mLMWTb5qKbGvTkLKoxJWHPxbBgqj-rLUVqVQM-A,28369
122
+ sky/dashboard/out/_next/static/chunks/573-82bd40a37af834f1.js,sha256=p1Ce-Z3KwtCegMin6sGzif0oVLCT6uzvnfYhOs30tgg,283993
123
+ sky/dashboard/out/_next/static/chunks/578-24f35aa98d38d638.js,sha256=sLLMKRpah8ozOKKARGCiha7eBzOiqGUJWATTZnE7ixA,10039
124
+ sky/dashboard/out/_next/static/chunks/627-31b701e69f52db0c.js,sha256=VoJFK0aaz9rjob7k7uyGA3IwSrgj9smpHG8ix-SLNx4,15862
125
+ sky/dashboard/out/_next/static/chunks/843-e35d71cf1c7f706e.js,sha256=_bSBgH6ze_YD5snPuV-GK1sxOpN6807TBPgI38NAhY8,15610
124
126
  sky/dashboard/out/_next/static/chunks/937.f97f83652028e944.js,sha256=3G2YlQgxD17Z7GeznWGDwYSKEB8W4FZFfLKEXmtBiWE,54452
125
- sky/dashboard/out/_next/static/chunks/938-59956af3950b02ed.js,sha256=1dFMyQWZaqxfyP8c_b0aTX14C-WIfXh2biqZ1GN8zII,27538
127
+ sky/dashboard/out/_next/static/chunks/990-f85643b521f7ca65.js,sha256=Jua91QPgAenefuXpvqjPXVPoIjOMSvFALdI9FNON1bg,15358
126
128
  sky/dashboard/out/_next/static/chunks/9f96d65d-5a3e4af68c26849e.js,sha256=wJGR2e5odhfpiO3-Y0iIQVUJ5rBhfM_9tSb5CIDHcaE,134395
127
129
  sky/dashboard/out/_next/static/chunks/fd9d1056-2821b0f0cabcd8bd.js,sha256=ce2WOATL1LdzsWouKQ-1NCiBQJmcykgzqP8wCp1yqbE,172831
128
130
  sky/dashboard/out/_next/static/chunks/framework-87d061ee6ed71b28.js,sha256=dh6TKdXcSRoGP4HqHe2uwzWCZBPz16dyTWufLsxeRvM,140942
@@ -130,26 +132,27 @@ sky/dashboard/out/_next/static/chunks/main-app-241eb28595532291.js,sha256=P0_tU7
130
132
  sky/dashboard/out/_next/static/chunks/main-e0e2335212e72357.js,sha256=BxTmVbZDnMUQvQd57MEl1Ui0VZaNmwLOviY7h_xMjP0,109884
131
133
  sky/dashboard/out/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js,sha256=6QPOwdWeAVe8x-SsiDrm-Ga6u2DkqgG5SFqglrlyIgA,91381
132
134
  sky/dashboard/out/_next/static/chunks/webpack-deda68c926e8d0bc.js,sha256=e2NBwO2sLf3MuwMPPaYQ5bWK1OwP5mbuzaaLkDLCJJ4,3620
133
- sky/dashboard/out/_next/static/chunks/pages/_app-96a715a6fb01e228.js,sha256=lqFYBo3gcDUyNT-vVEqyoXJkFmFKu6i4wvssOQiqQhE,2097
135
+ sky/dashboard/out/_next/static/chunks/pages/_app-3985f074c163a856.js,sha256=lqFYBo3gcDUyNT-vVEqyoXJkFmFKu6i4wvssOQiqQhE,2097
134
136
  sky/dashboard/out/_next/static/chunks/pages/_error-1be831200e60c5c0.js,sha256=TZqrus06KKPx-CMABDMPKF7w-NQ5s2gwJAM8Huyl7qU,247
135
- sky/dashboard/out/_next/static/chunks/pages/clusters-9e6d1ec6e1ac5b29.js,sha256=Q0SyquPBLEBEAVMN46t-MsmufK057ajul0gBNQQ3gNU,567
137
+ sky/dashboard/out/_next/static/chunks/pages/clusters-8afda8efa5b74997.js,sha256=ZAM68LQWisqekLlWJrBiq0mSr1OG7kLFH3zMaNF6bVU,571
138
+ sky/dashboard/out/_next/static/chunks/pages/config-72b8c6c2edfd0e39.js,sha256=WI8MzIxavCN-YfXDYafGzzyNXQccrcxnwOnXPivnzr8,7755
136
139
  sky/dashboard/out/_next/static/chunks/pages/index-6b0d9e5031b70c58.js,sha256=Fp2FKnKQtORK_5O7MEQ08tlTk7ewMLuecw_EY5g4Dlg,513
137
- sky/dashboard/out/_next/static/chunks/pages/infra-abb7d744ecf15109.js,sha256=VABF1icfIKGak3pfsuzxQUsKy9WRViUSQVp0PEg0Vs0,29939
138
- sky/dashboard/out/_next/static/chunks/pages/jobs-73d5e0c369d00346.js,sha256=BB_idE0HXeXdprv4NGSJbTDRSVJdCxMwvfq9Y09Zy-Y,2160
139
- sky/dashboard/out/_next/static/chunks/pages/users-b8acf6e6735323a2.js,sha256=VF3SqA2_zTY89HnXCGwebTEVVZ1RvubThg_LXosbvPI,19453
140
- sky/dashboard/out/_next/static/chunks/pages/workspaces-5ed48b3201b998c8.js,sha256=ehcthDoMLt1FN2NV-mJkKqZ9dHcbtl6mME5MxBfjL6A,11732
141
- sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]-9529d9e882a0e75c.js,sha256=0ozFlodCQDVNXR1iemuHFJXyytp2NSFGZfkq1kElnrY,6417
142
- sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/[job]-3b5aad09a25f64b7.js,sha256=YuwYsmtDERcOiaVNlvB-k-GD2X68CKNZmE7ve9fnmMc,13451
143
- sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-48dc8d67d4b60be1.js,sha256=HVyGtFN67KCMqUYCwbWdIIcRyjr03KdfgmIRqKt5LrE,18085
144
- sky/dashboard/out/_next/static/chunks/pages/workspace/new-bbf436f41381e169.js,sha256=A2mNnaY0O-nIp8eBR4dkZTUbOWH8YvikXjJXd8dVYBg,3537
145
- sky/dashboard/out/_next/static/chunks/pages/workspaces/[name]-7733c960685b4385.js,sha256=bf9iHxWW1cQK9r6hCrGOXOl2JlCd_shoabrI2t_emUM,564
146
- sky/dashboard/out/_next/static/css/28558d57108b05ae.css,sha256=kO6XnAPIvhQ-_AOvR6Hif7k5h08QZgPklXZjmmmDLRQ,37380
147
- sky/dashboard/out/clusters/[cluster].html,sha256=SM7fio2PL-v5tKRn6Miq6T94IllMOejDaaJ8Ef8T1QY,1985
148
- sky/dashboard/out/clusters/[cluster]/[job].html,sha256=BNlS344sJftNAedNWbdN6dqbfpOXd7t11GJOHuFvYHY,1653
149
- sky/dashboard/out/jobs/[job].html,sha256=LuxTFbSOBezEXQd0mOkj3xDUj9el-DT_maXLYPqWQWg,1621
140
+ sky/dashboard/out/_next/static/chunks/pages/infra-1521baab6992916b.js,sha256=Y1_vlaMvPC4kUjbMRTxvzBkkCyfOvKKKa7JhJiRm_c4,31568
141
+ sky/dashboard/out/_next/static/chunks/pages/jobs-ff7e8e377d02b651.js,sha256=OqDkDzrKfGux3FeLY4ETOnIauKRKfGeqbGz3QcXEibg,599
142
+ sky/dashboard/out/_next/static/chunks/pages/users-9900af52acf8648d.js,sha256=J7tnKrY9fOQR3HooXrJzemOyYJzdVnkQURHXNHzd23U,21068
143
+ sky/dashboard/out/_next/static/chunks/pages/workspaces-72330c4d0fc9a4a2.js,sha256=sGCcdbg-rgy2F1sHH7bbr8xvU6V_-MpIxrDDLffs7Zc,11785
144
+ sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]-e23fcddf60578a0d.js,sha256=IS9tMiK0t229eTdUFRC6ZiniFzopsxsv4AHL4gaGQtY,4856
145
+ sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/[job]-339b59921ccfe266.js,sha256=AEOuCtQ1DcQvb2gXkxfFNLwyAAx1zUt-h1f8iWxFhkY,15066
146
+ sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-4d913940b4fa6f5a.js,sha256=7JL-Jb4_fe_9TFHRqEd1GhTwZdXAG9_CvaHsmVk7TcI,19700
147
+ sky/dashboard/out/_next/static/chunks/pages/workspace/new-63763ffa3edb4508.js,sha256=MtzpGAcJaH3yVCaHXt1sVonlUfr6NUW6T6C79n_BXgY,3542
148
+ sky/dashboard/out/_next/static/chunks/pages/workspaces/[name]-3ede7a13caf23375.js,sha256=nvL7JKpCpmPutsmQZKrWk8COmnBHOfpIYEjlE5UROzk,569
149
+ sky/dashboard/out/_next/static/css/6a1c0d711a4bdaf1.css,sha256=-jC8V2D_hwvzsrBOV0cVqBDrwsbpkjc9MCn-sajGYGo,37971
150
+ sky/dashboard/out/clusters/[cluster].html,sha256=30XS0xYA1AVkcchScFKhk4falx5dljMwrCtbp7i8E10,2072
151
+ sky/dashboard/out/clusters/[cluster]/[job].html,sha256=w3GqPzH5Z9DPfAZyPtnF6NglvUCGy7FrRWBf26bGhdU,1653
152
+ sky/dashboard/out/jobs/[job].html,sha256=smkOQwJ5iZK0c_bLFtyQyubra34hJT1LWBvv7DLxZog,1621
150
153
  sky/dashboard/out/videos/cursor-small.mp4,sha256=8tRdp1vjawOrXUar1cfjOc-nkaKmcwCPZx_LO0XlCvQ,203285
151
- sky/dashboard/out/workspace/new.html,sha256=zz_qDVhIshS-yvvOIt6ZLCXjNKdMIU7povPB-Dx5zzA,11671
152
- sky/dashboard/out/workspaces/[name].html,sha256=_ZLaSxjeU7YM4oLFdvY1QU2avvrpldT1Ps0_KRT73pc,2161
154
+ sky/dashboard/out/workspace/new.html,sha256=ltTqf7A_TxiUvH7mtrVEcuzpc9BudNqLW9T9TSFUGVw,11759
155
+ sky/dashboard/out/workspaces/[name].html,sha256=rE6yeG5GuWmhVqiH4KnHSFthLbjUjdafGB7Kq1Dxkwc,2249
153
156
  sky/data/__init__.py,sha256=Nhaf1NURisXpZuwWANa2IuCyppIuc720FRwqSE2oEwY,184
154
157
  sky/data/data_transfer.py,sha256=N8b0CQebDuHieXjvEVwlYmK6DbQxUGG1RQJEyTbh3dU,12040
155
158
  sky/data/data_utils.py,sha256=CNYPM963qby5ddW0DZNbhiWXkqgB9MHh_jrC5DoBctM,33437
@@ -282,8 +285,8 @@ sky/serve/server/server.py,sha256=A9K37a0nQgZeN3eKWv62Oh2C5TSAReTZ9pHmztqlI-c,43
282
285
  sky/server/__init__.py,sha256=MPPBqFzXz6Jv5QSk6td_IcvnfXfNErDZVcizu4MLRow,27
283
286
  sky/server/common.py,sha256=JGkAkj1oexseiDRB0F5IvlhFZpmavHrX0Ovdf0rqjtU,30759
284
287
  sky/server/config.py,sha256=XWf5Kw4am6vMO5wcyWevbQAFH-dmKb7AMEgDzD083-M,8538
285
- sky/server/constants.py,sha256=rJAuxkxj6UqSey9hQaBZ__MyZ-rRew9XrpUBNzRdxHI,1193
286
- sky/server/server.py,sha256=LEcYqN_dZJuEn9GwCd12WcBQGdQRv2KKTjffx4zFZ9g,53902
288
+ sky/server/constants.py,sha256=hkDwRo3K6xx9TRb7i8zdZMUEue1oP6G6I0B-p9kprbY,1193
289
+ sky/server/server.py,sha256=n5P-Jb_UUJfSgWMLOn52W_Dl1WMLYQIPEb1hZ9eS_Ac,54403
287
290
  sky/server/stream_utils.py,sha256=4JMHgtoXPpCT8JwtqyUcDQ9IdZFir9om0JaCRr8rvbQ,5849
288
291
  sky/server/uvicorn.py,sha256=4bTlvqQiykYDEIfV6Ta9KXWKZUtSfIrhDeT1F9yQuvs,3323
289
292
  sky/server/html/log.html,sha256=TSGZktua9Ysl_ysg3w60rjxAxhH61AJnsYDHdtqrjmI,6929
@@ -291,7 +294,7 @@ sky/server/html/token_page.html,sha256=QuTT0vGswh64uIenfAOIcC8JJrJrfidPTZDd3ryYN
291
294
  sky/server/requests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
292
295
  sky/server/requests/event_loop.py,sha256=OhpPbuce65bbjpGRlcJa78AVnYSm08SzFKt70ypCUuQ,1211
293
296
  sky/server/requests/executor.py,sha256=7WiPNmB8DiJcPZhFtRebUkv1eOKAUSoQFpv_qa8kuGs,23596
294
- sky/server/requests/payloads.py,sha256=enOMWL44YO97c3R7_iDONfugZiM4523bYGe4KrS7B5s,18187
297
+ sky/server/requests/payloads.py,sha256=2XpTAZ2DrujwRHz2I5IOgFuS_508oS_9zs_uazYx_tY,18527
295
298
  sky/server/requests/preconditions.py,sha256=ipxIb_3JXG6S3-ymcOdqQNb7VDvoPqADxu9ZK7-nQWc,7179
296
299
  sky/server/requests/process.py,sha256=uv6JmqdT1vR6S5j3a0CEmxz3fUoKQoZCryQsjZpZE7E,8734
297
300
  sky/server/requests/requests.py,sha256=7WABtaxHOppJT6OgYQl4nkjDu5yPXtk1_VpfqPdeg5k,21923
@@ -299,7 +302,7 @@ sky/server/requests/queues/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
299
302
  sky/server/requests/queues/local_queue.py,sha256=X6VkBiUmgd_kfqIK1hCtMWG1b8GiZbY70TBiBR6c6GY,416
300
303
  sky/server/requests/queues/mp_queue.py,sha256=jDqP4Jd28U3ibSFyMR1DF9I2OWZrPZqFJrG5S6RFpyw,3403
301
304
  sky/server/requests/serializers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
302
- sky/server/requests/serializers/decoders.py,sha256=F7eqENzt7hH92BPYUGnSJ_-XGobA0whPezTh5EDLCQs,6729
305
+ sky/server/requests/serializers/decoders.py,sha256=ULHekYJQeFVIFSQ7l30RKB2eJyR-9Z8SdqXjKFvwZ88,6376
303
306
  sky/server/requests/serializers/encoders.py,sha256=4bQV5yTg8RTPT_HkRyQpjaBY_uUvBJ4NH189W0-6Pi0,5578
304
307
  sky/setup_files/MANIFEST.in,sha256=xhxaTVBu63MiTRV52AIlHp6qrg0i301PDIvH0lRw4E0,619
305
308
  sky/setup_files/dependencies.py,sha256=ly4srNSgqjB9VLxZeu8h6fy_hx99nq7Vd2y0ke7rZhw,6441
@@ -387,7 +390,7 @@ sky/utils/registry.py,sha256=I08nS0rvCF-xR5GEZoHEVgN1jcOeglz77h7xPpBCIjU,4179
387
390
  sky/utils/resources_utils.py,sha256=oxHFiISc0Y68gCGhTw4ep6bJ6Fi21epMyeu3EN20Smc,11673
388
391
  sky/utils/rich_console_utils.py,sha256=wPvAlshaFHuMZSjiDnaK3OSBppZLBjAn-lj7AvxNBQk,553
389
392
  sky/utils/rich_utils.py,sha256=ZTXdFJp--4CJDt2ANQz0VICLPc2V7llgA6LelHdG9Mw,14188
390
- sky/utils/schemas.py,sha256=Ql8HpO3E53QeyJHcNlbr2oLhSGYgQ8LBTqG-pBftyME,40211
393
+ sky/utils/schemas.py,sha256=G9siG8W48YrdJUbmxQOa7vp6b31B_l7HU97bMBVHQog,42073
391
394
  sky/utils/status_lib.py,sha256=zn_MSuRYQdNKF8pnFOGQ54X_s_R7dyqWS6Q3a9zENw8,1512
392
395
  sky/utils/subprocess_utils.py,sha256=NmW22zGe9iXDXQ7XfsP4i5fve8Jq9KKiUwD7qUmw44k,16069
393
396
  sky/utils/timeline.py,sha256=ob6s3bc7nwAuSI76yLKBrSR5bzOHnOhbozz1avwoet4,4070
@@ -403,7 +406,7 @@ sky/utils/kubernetes/config_map_utils.py,sha256=ucdQGp1XHliZxoCFWU8EMJ2NKfUEs7t-
403
406
  sky/utils/kubernetes/create_cluster.sh,sha256=VpFLLLzodeldN9-JKqcjs2LkKksMGlg14Q7qGZ49LQE,7816
404
407
  sky/utils/kubernetes/delete_cluster.sh,sha256=BSccHF43GyepDNf-FZcenzHzpXXATkVD92vgn1lWPgk,927
405
408
  sky/utils/kubernetes/deploy_remote_cluster.py,sha256=lxIiF3SHOp8ulcSbov27nna0i48FvVHzyqk0Wi0Q3D0,60844
406
- sky/utils/kubernetes/exec_kubeconfig_converter.py,sha256=fE1SnteoxI05EaugnWeV82hXwZTVHmbXsh1aaZAgF3c,2548
409
+ sky/utils/kubernetes/exec_kubeconfig_converter.py,sha256=_kS-Fo2dpAIlQV1cQGOW6LUb38K-V4Y1uuO38UqfwEY,3480
407
410
  sky/utils/kubernetes/generate_kind_config.py,sha256=_TNLnifA_r7-CRq083IP1xjelYqiLjzQX9ohuqYpDH8,3187
408
411
  sky/utils/kubernetes/generate_kubeconfig.sh,sha256=MBvXJio0PeujZSCXiRKE_pa6HCTiU9qBzR1WrXccVSY,10477
409
412
  sky/utils/kubernetes/gpu_labeler.py,sha256=YAwkytFo2j5GyGyX8RqnUXCMBff00Mdm9G_0mmtNZLo,10345
@@ -414,11 +417,11 @@ sky/utils/kubernetes/rsync_helper.sh,sha256=MT29sI5iD2QxYlXFwrN16oq0Er4TPFQVs4Z4
414
417
  sky/utils/kubernetes/ssh-tunnel.sh,sha256=60eHKF7phJe9pFEkGlqdwWzI80tpog8QCkL7fAbIAic,12143
415
418
  sky/utils/kubernetes/ssh_jump_lifecycle_manager.py,sha256=Kq1MDygF2IxFmu9FXpCxqucXLmeUrvs6OtRij6XTQbo,6554
416
419
  sky/workspaces/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
417
- sky/workspaces/core.py,sha256=kWB2YXDzo8Xz7VBmDGe4_dx6IZJ9C_ZuTw86pq54ynE,11424
418
- sky/workspaces/server.py,sha256=lx4cy4X-zOFZEjgvcw0G0KY7105Ll4aYT2DV0_IXITk,2033
419
- skypilot_nightly-1.0.0.dev20250526.dist-info/licenses/LICENSE,sha256=emRJAvE7ngL6x0RhQvlns5wJzGI3NEQ_WMjNmd9TZc4,12170
420
- skypilot_nightly-1.0.0.dev20250526.dist-info/METADATA,sha256=ePp5lDDo2YzVj-iawR-SpoaW6Y2u9idMdFzdol218wQ,18233
421
- skypilot_nightly-1.0.0.dev20250526.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
422
- skypilot_nightly-1.0.0.dev20250526.dist-info/entry_points.txt,sha256=StA6HYpuHj-Y61L2Ze-hK2IcLWgLZcML5gJu8cs6nU4,36
423
- skypilot_nightly-1.0.0.dev20250526.dist-info/top_level.txt,sha256=qA8QuiNNb6Y1OF-pCUtPEr6sLEwy2xJX06Bd_CrtrHY,4
424
- skypilot_nightly-1.0.0.dev20250526.dist-info/RECORD,,
420
+ sky/workspaces/core.py,sha256=YtmfIwq26MBQqI9eKdgiVpCq-5b-c8SHURJzjYsK-0k,16813
421
+ sky/workspaces/server.py,sha256=A3jt9RSzRXTYWpmVQNW0b4-QrgfLq3eiHcRA0tutZhw,2893
422
+ skypilot_nightly-1.0.0.dev20250527.dist-info/licenses/LICENSE,sha256=emRJAvE7ngL6x0RhQvlns5wJzGI3NEQ_WMjNmd9TZc4,12170
423
+ skypilot_nightly-1.0.0.dev20250527.dist-info/METADATA,sha256=3mAu8IYtfwsyoEO3Mmb0ocylO417TCz0J-P6JNsUJ28,18233
424
+ skypilot_nightly-1.0.0.dev20250527.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
425
+ skypilot_nightly-1.0.0.dev20250527.dist-info/entry_points.txt,sha256=StA6HYpuHj-Y61L2Ze-hK2IcLWgLZcML5gJu8cs6nU4,36
426
+ skypilot_nightly-1.0.0.dev20250527.dist-info/top_level.txt,sha256=qA8QuiNNb6Y1OF-pCUtPEr6sLEwy2xJX06Bd_CrtrHY,4
427
+ skypilot_nightly-1.0.0.dev20250527.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.8.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1 +0,0 @@
1
- self.__BUILD_MANIFEST=function(s,e,c,a,t,r,u,b,n){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/":["static/chunks/pages/index-6b0d9e5031b70c58.js"],"/_error":["static/chunks/pages/_error-1be831200e60c5c0.js"],"/clusters":[s,c,e,a,b,"static/chunks/pages/clusters-9e6d1ec6e1ac5b29.js"],"/clusters/[cluster]":[s,c,e,a,t,b,"static/chunks/pages/clusters/[cluster]-9529d9e882a0e75c.js"],"/clusters/[cluster]/[job]":[s,e,"static/chunks/pages/clusters/[cluster]/[job]-3b5aad09a25f64b7.js"],"/infra":[s,e,"static/chunks/pages/infra-abb7d744ecf15109.js"],"/jobs":[s,c,e,a,t,"static/chunks/pages/jobs-73d5e0c369d00346.js"],"/jobs/[job]":[s,e,"static/chunks/pages/jobs/[job]-48dc8d67d4b60be1.js"],"/users":[s,e,"static/chunks/pages/users-b8acf6e6735323a2.js"],"/workspace/new":[r,s,c,u,e,a,t,n,"static/chunks/pages/workspace/new-bbf436f41381e169.js"],"/workspaces":[r,s,c,u,e,a,t,"static/chunks/pages/workspaces-5ed48b3201b998c8.js"],"/workspaces/[name]":[r,s,c,u,e,a,t,n,"static/chunks/pages/workspaces/[name]-7733c960685b4385.js"],sortedPages:["/","/_app","/_error","/clusters","/clusters/[cluster]","/clusters/[cluster]/[job]","/infra","/jobs","/jobs/[job]","/users","/workspace/new","/workspaces","/workspaces/[name]"]}}("static/chunks/573-f17bd89d9f9118b3.js","static/chunks/480-5a0de8b6570ea105.js","static/chunks/488-50d843fdb5396d32.js","static/chunks/734-a6e01d7f98904741.js","static/chunks/938-59956af3950b02ed.js","static/chunks/9f96d65d-5a3e4af68c26849e.js","static/chunks/498-d7722313e5e5b4e6.js","static/chunks/578-d351125af46c293f.js","static/chunks/25-062253ea41fb8eec.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
@@ -1,6 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25],{1812:function(e,s,l){"use strict";l.d(s,{X:function(){return n}});var a=l(5893),t=l(7294);let r=e=>{if(!(null==e?void 0:e.message))return"An unexpected error occurred.";let s=e.message;return s.includes("failed:")&&(s=s.split("failed:")[1].trim()),s.charAt(0).toUpperCase()+s.slice(1)},n=e=>{let{error:s,title:l="Error",onDismiss:n}=e,[c,i]=(0,t.useState)(!1);if((0,t.useEffect)(()=>{s&&i(!1)},[s]),!s||c)return null;let o="string"==typeof s?s:r(s);return(0,a.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-md p-3 mb-4",children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex",children:[(0,a.jsx)("div",{className:"flex-shrink-0",children:(0,a.jsx)("svg",{className:"h-5 w-5 text-red-400",viewBox:"0 0 20 20",fill:"currentColor",children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),(0,a.jsx)("div",{className:"ml-3",children:(0,a.jsxs)("div",{className:"text-sm text-red-800",children:[(0,a.jsxs)("strong",{children:[l,":"]})," ",o]})})]}),(0,a.jsx)("button",{onClick:()=>{i(!0),n&&n()},className:"flex-shrink-0 ml-4 text-red-400 hover:text-red-600 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 focus:ring-offset-red-50 rounded","aria-label":"Dismiss error",children:(0,a.jsx)("svg",{className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]})})}},3025:function(e,s,l){"use strict";l.d(s,{I:function(){return O}});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),m=l.n(x),h=l(7673),f=l(803),p=l(2350);let g=t.forwardRef((e,s)=>{let{className:l,...t}=e;return(0,a.jsx)("textarea",{className:(0,p.cn)("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",l),ref:s,...t})});g.displayName="Textarea";var j=l(8799),b=l(282),y=l(3626),N=l(998);/**
2
- * @license lucide-react v0.407.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */let k=(0,N.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"}]]),v=(0,N.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"}]]);var w=l(326);let C=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})},L=e=>{let{className:s="",children:l,...t}=e;return(0,a.jsx)("div",{className:"text-sm leading-relaxed ".concat(s),...t,children:l})};var E=l(3850),S=l(1812),D=l(938),M=l(3320),A=l.n(M),W=l(3225);let z=e=>{let{message:s}=e;return s?(0,a.jsxs)(C,{className:"border-green-200 bg-green-50",children:[(0,a.jsx)(b.Z,{className:"h-4 w-4 text-green-600"}),(0,a.jsx)(L,{className:"text-green-800",children:s})]}):null},R=e=>{let{workspaceName:s,config:l}=e;if(!l)return null;let t="default"===s,r=0===Object.keys(l).length;if(t&&r)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 n=[],c=[];Object.entries(l).forEach(e=>{let[s,l]=e,t=W.MN[s.toLowerCase()];if((null==l?void 0:l.disabled)===!0)c.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,")")),n.push((0,a.jsxs)("span",{className:"block",children:[t,e," is enabled."]},"".concat(s,"-enabled")))}else n.push((0,a.jsxs)("span",{className:"block",children:[t," is enabled (using default settings)."]},"".concat(s,"-default-enabled")))});let i=[];if(c.length>0){let e=c.join(" and ");i.push((0,a.jsxs)("span",{className:"block",children:[e," ",1===c.length?"is":"are"," explicitly disabled."]},"disabled-clouds"))}return(i.push(...n),i.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:i}):!t&&r?(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 O(e){let{workspaceName:s,isNewWorkspace:l=!1}=e,d=(0,r.useRouter)(),[x,p]=(0,t.useState)({}),[b,N]=(0,t.useState)({}),[C,L]=(0,t.useState)(""),[M,W]=(0,t.useState)(!0),[O,_]=(0,t.useState)(!1),[Z,T]=(0,t.useState)(!1),[Y,I]=(0,t.useState)(null),[P,V]=(0,t.useState)(null),[J,H]=(0,t.useState)(null),[X,B]=(0,t.useState)({showDialog:!1,deleting:!1,error:null}),[F,U]=(0,t.useState)({totalClusterCount:0,runningClusterCount:0,managedJobsCount:0,clouds:[]}),[G,q]=(0,t.useState)(!1),K=(0,t.useCallback)(async()=>{W(!0),I(null);try{let e;let l=(await (0,n.fX)())[s]||{};p(l),N(l),e=0===Object.keys(l).length?"".concat(s,":\n # Empty workspace configuration - uses all accessible infrastructure\n"):A().dump({[s]:l},{indent:2,lineWidth:-1,noRefs:!0,skipInvalid:!0,flowLevel:-1}),L(e)}catch(e){console.error("Error fetching workspace config:",e),I(e)}finally{W(!1)}},[s]),Q=(0,t.useCallback)(async()=>{if(!l){q(!0);try{let[e,l,a]=await Promise.all([(0,c.zd)(),(0,i.Vp)(),(0,n.yz)(s)]),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(D.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.sort():[]})}catch(e){console.error("Failed to fetch workspace stats:",e)}finally{q(!1)}}},[s,l]);(0,t.useEffect)(()=>{l?(W(!1),L("".concat(s,":\n # New workspace configuration\n # Leave empty to use all accessible infrastructure\n"))):(K(),Q())},[s,l,K,Q]),(0,t.useEffect)(()=>{T(JSON.stringify(x)!==JSON.stringify(b))},[x,b]);let $=e=>{L(e),H(null);try{let l=A().load(e)||{},a=Object.keys(l);if(0===a.length)p({});else if(1===a.length){let e=a[0];if(e!==s){H('Workspace name cannot be changed. Expected "'.concat(s,'" but found "').concat(e,'".'));return}let t=l[s]||{};p(t)}else H("Configuration must contain only one workspace. Found: ".concat(a.join(", ")))}catch(e){H("Invalid YAML: ".concat(e.message))}},ee=async()=>{_(!0),I(null),V(null);try{if(J)throw Error("Please fix YAML errors before saving");let e=A().load(C)||{},a=Object.keys(e);if(a.length>0&&a[0]!==s)throw Error('Workspace name cannot be changed. Expected "'.concat(s,'".'));l?(await (0,n.MB)(s,x),V("Workspace created successfully!"),setTimeout(()=>{d.push("/workspaces/".concat(s))},1500)):(await (0,n.eA)(s,x),V("Workspace updated successfully!"),N(x),Q())}catch(e){console.error("Error saving workspace:",e),I(e)}finally{_(!1)}},es=async()=>{B(e=>({...e,deleting:!0,error:null}));try{await (0,n.zl)(s),V("Workspace deleted successfully!"),setTimeout(()=>{d.push("/workspaces")},1500)}catch(e){console.error("Error deleting workspace:",e),B(s=>({...s,deleting:!1,error:e}))}},el=()=>{B({showDialog:!1,deleting:!1,error:null})},ea=async()=>{await Promise.all([K(),Q()])};if(!d.isReady)return(0,a.jsx)("div",{children:"Loading..."});let et=l?"Create New Workspace | SkyPilot Dashboard":"Workspace: ".concat(s," | SkyPilot Dashboard");return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(m(),{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}),Z&&(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:[(M||O||G)&&(0,a.jsxs)("div",{className:"flex items-center mr-4",children:[(0,a.jsx)(j.Z,{size:15,className:"mt-0"}),(0,a.jsx)("span",{className:"ml-2 text-gray-500",children:O?"Saving...":"Loading..."})]}),(0,a.jsxs)("div",{className:"flex items-center space-x-4",children:[!l&&(0,a.jsxs)("button",{onClick:ea,disabled:M||O||G,className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center",children:[(0,a.jsx)(y.Z,{className:"w-4 h-4 mr-1.5"}),"Refresh"]}),!l&&"default"!==s&&(0,a.jsxs)("button",{onClick:()=>B({...X,showDialog:!0}),disabled:X.deleting||O,className:"text-red-600 hover:text-red-700 font-medium inline-flex items-center",children:[(0,a.jsx)(k,{className:"w-4 h-4 mr-1.5"}),"Delete"]})]})]})]}),M?(0,a.jsxs)("div",{className:"flex justify-center items-center py-12",children:[(0,a.jsx)(j.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)(S.X,{error:Y,title:"Error",onDismiss:()=>I(null)}),(0,a.jsx)(z,{message:P}),(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[!l&&(0,a.jsx)("div",{className:"lg:col-span-1",children:(0,a.jsxs)(h.Zb,{className:"h-full",children:[(0,a.jsx)(h.Ol,{children:(0,a.jsxs)(h.ll,{className:"text-base font-normal",children:[(0,a.jsx)("span",{className:"font-semibold",children:"Workspace:"})," ",s]})}),(0,a.jsxs)(h.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)(E.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)(E.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)(E.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)(R,{workspaceName:s,config:b})})]})]})}),(0,a.jsx)("div",{className:l?"lg:col-span-3":"lg:col-span-2",children:(0,a.jsxs)(h.Zb,{className:"h-full flex flex-col",children:[(0,a.jsx)(h.Ol,{children:(0,a.jsx)(h.ll,{className:"text-base font-normal",children:l?"New Workspace YAML":"Edit Workspace YAML"})}),(0,a.jsx)(h.aY,{className:"flex-1 flex flex-col",children:(0,a.jsxs)("div",{className:"space-y-4 flex-1 flex flex-col",children:[J&&(0,a.jsx)(S.X,{error:J,onDismiss:()=>H(null)}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col",children:[(0,a.jsxs)("p",{className:"text-sm text-gray-600 mb-3",children:["Configure infra-specific settings for this workspace. Leave empty to use all accessible infrastructure. Refer to"," ",(0,a.jsx)("a",{href:"https://docs.skypilot.co/en/latest/admin/workspaces.html#configuration",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600",children:"SkyPilot Docs"})," ","for more details."]}),(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("h4",{className:"text-sm font-medium text-gray-700 mb-2",children:"Example configuration:"}),(0,a.jsx)("div",{className:"p-3 bg-gray-50 border rounded-lg",children:(0,a.jsx)("pre",{className:"text-xs font-mono text-gray-600 whitespace-pre-wrap",children:"".concat(s||"my-workspace",":\n gcp:\n project_id: xxx\n aws:\n disabled: true")})})]}),(0,a.jsx)(g,{value:C,onChange:e=>$(e.target.value),className:"font-mono text-sm flex-1 resize-none",style:{minHeight:"350px"},spellCheck:!1,placeholder:"# Enter workspace configuration in YAML format"}),(0,a.jsx)("div",{className:"flex justify-end space-x-3 pt-3 border-gray-200",children:(0,a.jsxs)(f.z,{onClick:ee,disabled:O||J||M,className:"inline-flex items-center bg-blue-600 hover:bg-blue-700 text-white",children:[(0,a.jsx)(v,{className:"w-4 h-4 mr-1.5"}),O?"Applying...":"Apply"]})})]})]})})]})})]})]}),(0,a.jsx)(w.Vq,{open:X.showDialog,onOpenChange:el,children:(0,a.jsxs)(w.cZ,{className:"sm:max-w-md",children:[(0,a.jsxs)(w.fK,{className:"",children:[(0,a.jsx)(w.$N,{children:"Delete Workspace"}),(0,a.jsxs)(w.Be,{children:['Are you sure you want to delete workspace "',s,'"? This action cannot be undone.']})]}),X.error&&(0,a.jsx)(S.X,{error:X.error,title:"Deletion Failed",onDismiss:()=>B(e=>({...e,error:null}))}),(0,a.jsxs)(w.cN,{className:"",children:[(0,a.jsx)(f.z,{variant:"outline",onClick:el,disabled:X.deleting,children:"Cancel"}),(0,a.jsx)(f.z,{variant:"destructive",onClick:es,disabled:X.deleting,children:X.deleting?"Deleting...":"Delete"})]})]})})]})]})}},9008:function(e,s,l){e.exports=l(7219)}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[734],{9307:function(e,t,r){r.d(t,{Cl:function(){return c},OE:function(){return u}});var a=r(5893);r(7294);var s=r(8799),o=r(6989),n=r(3850);let c=e=>{switch(e){case"LAUNCHING":return"bg-blue-100 text-sky-blue";case"RUNNING":return"bg-green-50 text-green-700";case"STOPPED":return"bg-yellow-100 text-yellow-800";case"TERMINATED":default:return"bg-gray-100 text-gray-800";case"PENDING":case"CANCELLED":case"CANCELLING":return"bg-yellow-50 text-yellow-700";case"SUCCEEDED":return"bg-blue-50 text-blue-700";case"FAILED":case"FAILED_PRECHECKS":case"FAILED_NO_RESOURCE":case"FAILED_CONTROLLER":return"bg-red-50 text-red-700";case"RECOVERING":return"bg-orange-50 text-orange-700";case"SUBMITTED":return"bg-indigo-50 text-indigo-700";case"STARTING":return"bg-cyan-50 text-cyan-700";case"FAILED_SETUP":return"bg-pink-50 text-pink-700"}},l=e=>{switch(e){case"LAUNCHING":case"STARTING":return(0,a.jsx)(s.Z,{size:12,className:"w-3 h-3 mr-1"});case"RUNNING":default:return(0,a.jsx)(n.W2,{className:"w-3 h-3 mr-1"});case"STOPPED":return(0,a.jsx)(n.fp,{className:"w-3 h-3 mr-1"});case"TERMINATED":case"FAILED":case"CANCELLED":return(0,a.jsx)(n.Ps,{className:"w-3 h-3 mr-1"});case"SUCCEEDED":return(0,a.jsx)(n.Ye,{className:"w-3 h-3 mr-1"});case"PENDING":case"RECOVERING":case"SUBMITTED":case"CANCELLING":case"FAILED_SETUP":case"FAILED_PRECHECKS":case"FAILED_NO_RESOURCE":case"FAILED_CONTROLLER":return(0,a.jsx)(n.J$,{className:"w-3 h-3 mr-1"})}},i=e=>{let t=c(e),r=l(e);return(0,a.jsxs)("span",{className:"".concat("inline-flex items-center px-2 py-1 rounded-full text-sm"," ").concat(t),children:[r,e]})},u=e=>{let{status:t}=e;return(0,a.jsx)(o.WH,{content:t,className:"text-muted-foreground text-sm",children:(0,a.jsx)("span",{children:i(t)})})}},9284:function(e,t,r){r.d(t,{Oh:function(){return f},_R:function(){return p},cV:function(){return m}});var a=r(5893),s=r(7294),o=r(326),n=r(803),c=r(7673),l=r(8671),i=r(6989),u=r(3225),d=r(3001);function f(e){let{isOpen:t,onClose:r,cluster:u}=e,[d,f]=s.useState(!1),p=e=>{navigator.clipboard.writeText(e),f(!0),setTimeout(()=>f(!1),2e3)},m=["sky status ".concat(u),"ssh ".concat(u)],h=m.join("\n");return(0,a.jsx)(o.Vq,{open:t,onOpenChange:r,children:(0,a.jsxs)(o.cZ,{className:"sm:max-w-md",children:[(0,a.jsxs)(o.fK,{children:[(0,a.jsxs)(o.$N,{children:["Connect to: ",(0,a.jsx)("span",{className:"font-light",children:u})]}),(0,a.jsx)(o.Be,{children:"Use these instructions to connect to your cluster via SSH."})]}),(0,a.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-sm font-medium mb-2",children:"SSH Command"}),(0,a.jsx)(c.Zb,{className:"p-3 bg-gray-50",children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("pre",{className:"text-sm w-full whitespace-pre-wrap",children:m.map((e,t)=>(0,a.jsx)("code",{className:"block",children:e},t))}),(0,a.jsx)(i.WH,{content:d?"Copied!":"Copy command",children:(0,a.jsx)(n.z,{variant:"ghost",size:"icon",onClick:()=>p(h),className:"h-8 w-8 rounded-full",children:(0,a.jsx)(l.Z,{className:"h-4 w-4"})})})]})})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-sm font-medium mb-2",children:"Additional Information"}),(0,a.jsxs)("p",{className:"text-sm text-secondary-foreground",children:["Make sure to run"," ",(0,a.jsxs)("code",{className:"text-sm",children:["sky status ",u]})," first to have SkyPilot set up the SSH access."]})]})]})]})})}function p(e){let{isOpen:t,onClose:r,cluster:s}=e,f=(0,d.X)();return(0,a.jsx)(o.Vq,{open:t,onOpenChange:r,children:(0,a.jsx)(o.cZ,{className:"sm:max-w-3xl",children:(0,a.jsxs)(o.fK,{children:[(0,a.jsxs)(o.$N,{children:["Connect to: ",(0,a.jsx)("span",{className:"font-light",children:s})]}),(0,a.jsx)(o.Be,{children:(0,a.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-sm font-medium mb-2 my-2",children:"Setup SSH access"}),(0,a.jsx)(c.Zb,{className:"p-3 bg-gray-50",children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("pre",{className:"text-sm",children:(0,a.jsxs)("code",{children:["sky status ",s]})}),(0,a.jsx)(i.WH,{content:"Copy command",children:(0,a.jsx)(n.z,{variant:"ghost",size:"icon",onClick:()=>navigator.clipboard.writeText("sky status ".concat(s)),className:"h-8 w-8 rounded-full",children:(0,a.jsx)(l.Z,{className:"h-4 w-4"})})})]})})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-sm font-medium mb-2 my-2",children:"Connect with VSCode/Cursor"}),(0,a.jsx)(c.Zb,{className:"p-3 bg-gray-50",children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("pre",{className:"text-sm",children:(0,a.jsxs)("code",{children:["code --remote ssh-remote+",s]})}),(0,a.jsx)(i.WH,{content:"Copy command",children:(0,a.jsx)(n.z,{variant:"ghost",size:"icon",onClick:()=>navigator.clipboard.writeText("code --remote ssh-remote+".concat(s)),className:"h-8 w-8 rounded-full",children:(0,a.jsx)(l.Z,{className:"h-4 w-4"})})})]})})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-sm font-medium",children:"Or use the GUI to connect"}),(0,a.jsx)("div",{className:"relative ".concat(f?"-mt-5":"-mt-10"),style:{paddingBottom:"70%"},children:(0,a.jsxs)("video",{className:"absolute top-0 left-0 w-full h-full rounded-lg",controls:!0,autoPlay:!0,muted:!0,preload:"metadata",children:[(0,a.jsx)("source",{src:"".concat(u.GW,"/videos/cursor-small.mp4"),type:"video/mp4"}),"Your browser does not support the video tag."]})})]})]})})]})})})}function m(e){let{isOpen:t,onClose:r,onConfirm:s,title:c,message:l,confirmText:i="Confirm",confirmVariant:u="destructive"}=e;return(0,a.jsx)(o.Vq,{open:t,onOpenChange:r,children:(0,a.jsxs)(o.cZ,{className:"sm:max-w-md",children:[(0,a.jsxs)(o.fK,{children:[(0,a.jsx)(o.$N,{children:c}),(0,a.jsx)(o.Be,{children:l})]}),(0,a.jsxs)(o.cN,{className:"flex justify-end gap-2 pt-4",children:[(0,a.jsx)(n.z,{variant:"outline",onClick:r,children:"Cancel"}),(0,a.jsx)(n.z,{variant:u,onClick:()=>{s(),r()},children:i})]})]})})}},803:function(e,t,r){r.d(t,{z:function(){return i}});var a=r(5893),s=r(7294),o=r(8426),n=r(2003),c=r(2350);let l=(0,n.j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),i=s.forwardRef((e,t)=>{let{className:r,variant:s,size:n,asChild:i=!1,...u}=e,d=i?o.g7:"button";return(0,a.jsx)(d,{className:(0,c.cn)(l({variant:s,size:n,className:r})),ref:t,...u})});i.displayName="Button"},7673:function(e,t,r){r.d(t,{Ol:function(){return i},Zb:function(){return l},aY:function(){return f},eW:function(){return p},ll:function(){return u}});var a=r(5893),s=r(7294),o=r(5697),n=r.n(o),c=r(2350);let l=s.forwardRef((e,t)=>{let{className:r,children:s,...o}=e;return(0,a.jsx)("div",{ref:t,className:(0,c.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",r),...o,children:s})});l.displayName="Card",l.propTypes={className:n().string,children:n().node};let i=s.forwardRef((e,t)=>{let{className:r,children:s,...o}=e;return(0,a.jsx)("div",{ref:t,className:(0,c.cn)("flex flex-col space-y-1.5 p-6",r),...o,children:s})});i.displayName="CardHeader",i.propTypes={className:n().string,children:n().node};let u=s.forwardRef((e,t)=>{let{className:r,children:s,...o}=e;return(0,a.jsx)("h3",{ref:t,className:(0,c.cn)("text-2xl font-semibold leading-none tracking-tight",r),...o,children:s})});u.displayName="CardTitle",u.propTypes={className:n().string,children:n().node};let d=s.forwardRef((e,t)=>{let{className:r,children:s,...o}=e;return(0,a.jsx)("p",{ref:t,className:(0,c.cn)("text-sm text-muted-foreground",r),...o,children:s})});d.displayName="CardDescription",d.propTypes={className:n().string,children:n().node};let f=s.forwardRef((e,t)=>{let{className:r,children:s,...o}=e;return(0,a.jsx)("div",{ref:t,className:(0,c.cn)("p-6 pt-0",r),...o,children:s})});f.displayName="CardContent",f.propTypes={className:n().string,children:n().node};let p=s.forwardRef((e,t)=>{let{className:r,children:s,...o}=e;return(0,a.jsx)("div",{ref:t,className:(0,c.cn)("flex items-center p-6 pt-0",r),...o,children:s})});p.displayName="CardFooter",p.propTypes={className:n().string,children:n().node}},326:function(e,t,r){r.d(t,{$N:function(){return m},Be:function(){return h},Vq:function(){return l},cN:function(){return p},cZ:function(){return d},fK:function(){return f}});var a=r(5893),s=r(7294),o=r(6327),n=r(2350),c=r(3767);let l=o.fC;o.xz;let i=o.h_;o.x8;let u=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)(o.aV,{ref:t,className:(0,n.cn)("fixed inset-0 z-50 bg-black/50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",r),...s})});u.displayName=o.aV.displayName;let d=s.forwardRef((e,t)=>{let{className:r,children:s,...l}=e;return(0,a.jsxs)(i,{children:[(0,a.jsx)(u,{}),(0,a.jsxs)(o.VY,{ref:t,className:(0,n.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-gray-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",r),...l,children:[s,(0,a.jsxs)(o.x8,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-gray-400 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-gray-100 data-[state=open]:text-gray-500",children:[(0,a.jsx)(c.Z,{className:"h-4 w-4"}),(0,a.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});d.displayName=o.VY.displayName;let f=e=>{let{className:t,...r}=e;return(0,a.jsx)("div",{className:(0,n.cn)("flex flex-col space-y-1.5 text-center sm:text-left",t),...r})};f.displayName="DialogHeader";let p=e=>{let{className:t,...r}=e;return(0,a.jsx)("div",{className:(0,n.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...r})};p.displayName="DialogFooter";let m=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)(o.Dx,{ref:t,className:(0,n.cn)("text-lg font-semibold leading-none tracking-tight",r),...s})});m.displayName=o.Dx.displayName;let h=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)(o.dk,{ref:t,className:(0,n.cn)("text-sm text-gray-500",r),...s})});h.displayName=o.dk.displayName},8764:function(e,t,r){r.d(t,{RM:function(){return l},SC:function(){return i},iA:function(){return n},pj:function(){return d},ss:function(){return u},xD:function(){return c}});var a=r(5893),s=r(7294),o=r(2350);let n=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)("div",{className:"relative w-full overflow-auto",children:(0,a.jsx)("table",{ref:t,className:(0,o.cn)("w-full caption-bottom text-base",r),...s})})});n.displayName="Table";let c=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)("thead",{ref:t,className:(0,o.cn)("[&_tr]:border-b",r),...s})});c.displayName="TableHeader";let l=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)("tbody",{ref:t,className:(0,o.cn)("[&_tr:last-child]:border-0",r),...s})});l.displayName="TableBody",s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)("tfoot",{ref:t,className:(0,o.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",r),...s})}).displayName="TableFooter";let i=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)("tr",{ref:t,className:(0,o.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",r),...s})});i.displayName="TableRow";let u=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)("th",{ref:t,className:(0,o.cn)("h-12 px-4 text-left align-middle font-medium text-[hsl(var(--text-strong))] [&:has([role=checkbox])]:pr-0",r),...s})});u.displayName="TableHead";let d=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)("td",{ref:t,className:(0,o.cn)("p-4 align-middle [&:has([role=checkbox])]:pr-0",r),...s})});d.displayName="TableCell",s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)("caption",{ref:t,className:(0,o.cn)("mt-4 text-base text-muted-foreground",r),...s})}).displayName="TableCaption"},3266:function(e,t,r){r.d(t,{QL:function(){return u},Sl:function(){return l},zd:function(){return c}});var a=r(7294),s=r(5821),o=r(3225);let n={UP:"RUNNING",STOPPED:"STOPPED",INIT:"LAUNCHING",null:"TERMINATED"};async function c(){let{clusterNames:e=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let t=await fetch("".concat(o.f4,"/status"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cluster_names:e,all_users:!0})}),r=t.headers.get("X-Skypilot-Request-ID")||t.headers.get("X-Request-ID"),a=await fetch("".concat(o.f4,"/api/get?request_id=").concat(r)),s=await a.json();return(s.return_value?JSON.parse(s.return_value):[]).map(e=>{let t="",r=t=e.zone?e.zone:e.region;return t&&t.length>25&&(t=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15;if(!e||e.length<=t)return e;if(t<=3)return"...";let r=Math.floor((t-3)/2),a=r+(t-3)%2;return 0===r?e.substring(0,a)+"...":e.substring(0,a)+"..."+e.substring(e.length-r)}(t,25)),{status:n[e.status],cluster:e.name,user:e.user_name,user_hash:e.user_hash,cloud:e.cloud,infra:t?e.cloud+" ("+t+")":e.cloud,full_infra:r?"".concat(e.cloud," (").concat(r,")"):e.cloud,cpus:e.cpus,mem:e.memory,gpus:e.accelerators,resources_str:e.resources_str,resources_str_full:e.resources_str_full,time:new Date(1e3*e.launched_at),num_nodes:e.nodes,workspace:e.workspace,jobs:[],events:[{time:new Date(1e3*e.launched_at),event:"Cluster created."}]}})}catch(e){return console.error("Error fetching clusters:",e),[]}}async function l(e){let{clusterName:t,jobId:r,onNewLog:a,workspace:n}=e;try{let e=(await fetch("".concat(o.f4,"/logs"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({follow:!1,cluster_name:t,job_id:r,override_skypilot_config:{active_workspace:n||"default"}})})).body.getReader();for(;;){let{done:t,value:r}=await e.read();if(t)break;let s=new TextDecoder().decode(r);a(s)}}catch(e){console.error("Error in streamClusterJobLogs:",e),(0,s.C)("Error in streamClusterJobLogs: ".concat(e.message),"error")}}async function i(e){let{clusterName:t,workspace:r}=e;try{let e=await fetch("".concat(o.f4,"/queue"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cluster_name:t,all_users:!0,override_skypilot_config:{active_workspace:r}})}),a=e.headers.get("X-Skypilot-Request-ID")||e.headers.get("X-Request-ID"),s=await fetch("".concat(o.f4,"/api/get?request_id=").concat(a)),n=await s.json();return JSON.parse(n.return_value).map(e=>{let r=e.end_at?e.end_at:Date.now()/1e3,a=0,s=0;return e.submitted_at&&(a=r-e.submitted_at),e.start_at&&(s=r-e.start_at),{id:e.job_id,status:e.status,job:e.job_name,user:e.username,gpus:e.accelerators||{},submitted_at:e.submitted_at?new Date(1e3*e.submitted_at):null,resources:e.resources,cluster:t,total_duration:a,job_duration:s,infra:"",logs:""}})}catch(e){return console.error("Error fetching cluster jobs:",e),[]}}function u(e){let{cluster:t,job:r=null}=e,[s,o]=(0,a.useState)(null),[n,l]=(0,a.useState)(null),[u,d]=(0,a.useState)(!0),[f,p]=(0,a.useState)(!0),m=(0,a.useCallback)(async()=>{if(t)try{d(!0);let e=await c({clusterNames:[t]});return o(e[0]),e[0]}catch(e){console.error("Error fetching cluster data:",e)}finally{d(!1)}return null},[t]),h=(0,a.useCallback)(async e=>{if(t)try{p(!0);let r=await i({clusterName:t,workspace:e||"default"});l(r)}catch(e){console.error("Error fetching cluster job data:",e)}finally{p(!1)}},[t]),g=(0,a.useCallback)(async()=>{let e=await m();e&&await h(e.workspace)},[m,h]);return(0,a.useEffect)(()=>{(async()=>{let e=await m();e&&await h(e.workspace)})()},[t,r,m,h]),{clusterData:s,clusterJobData:n,loading:u||f,refreshData:g}}},7324:function(e,t,r){r.d(t,{MB:function(){return l},eA:function(){return c},fX:function(){return s},yz:function(){return o},zl:function(){return i}});var a=r(3225);async function s(){try{let e=await fetch("".concat(a.f4,"/workspaces"));if(!e.ok)throw Error("Error scheduling getWorkspaces: ".concat(e.statusText," (status ").concat(e.status,")"));let t=e.headers.get("X-Skypilot-Request-ID");if(!t){console.warn("X-Skypilot-Request-ID header not found in /workspaces response. Attempting to find request_id in response body as a fallback.");try{let r=await e.json();if(r&&r.request_id)t=r.request_id,console.log("Found request_id in /workspaces response body (fallback):",t);else throw Error("X-Skypilot-Request-ID header not found AND request_id not found in parsed response body from /workspaces.")}catch(t){let e=t.message||"Error processing fallback for request_id from /workspaces response body.";throw console.error("Error in /workspaces request_id fallback logic:",e),Error("X-Skypilot-Request-ID header not found, and fallback to read request_id from body failed: ".concat(e))}}if(!t)throw Error("Failed to obtain X-Skypilot-Request-ID from /workspaces response (checked header and attempted body fallback, but ID is still missing).");console.log("Fetching workspace data with request_id: ".concat(t));let r=await fetch("".concat(a.f4,"/api/get?request_id=").concat(t));if(!r.ok){let e="Error fetching workspace data for request ID ".concat(t,": ").concat(r.statusText," (status ").concat(r.status,")");try{let a=await r.json();if(a&&a.detail){let r=a.detail;try{let e=JSON.parse(r);e&&e.error?r=e.error:e&&e.result&&e.result.error&&(r=e.result.error)}catch(e){}e="Error fetching workspace data for request ID ".concat(t,": ").concat(r)}}catch(e){}throw Error(e)}let s=await r.json();if(console.log("[Connector Debug] Full resultData from /api/get:",s),"FAILED"===s.status){let e="Unknown error during task execution";if(s.error)"string"==typeof s.error?e=s.error:"object"==typeof s.error&&(e=s.error.message||s.error.detail||JSON.stringify(s.error));else if(s.result&&s.result.error)"string"==typeof s.result.error?e=s.result.error:"object"==typeof s.result.error&&(e=s.result.error.message||s.result.error.detail||JSON.stringify(s.result.error));else if(s.return_value)try{let t=JSON.parse(s.return_value);t.error&&(e="string"==typeof t.error?t.error:t.error.message||t.error.detail||JSON.stringify(t.error))}catch(t){(s.return_value.includes("Error")||s.return_value.includes("Cannot"))&&(e=s.return_value)}throw Error(e)}let o={};if("SUCCEEDED"===s.status&&s.return_value)try{o=JSON.parse(s.return_value),console.log("Successfully parsed workspace data from return_value:",o)}catch(e){throw console.error("Failed to parse workspace data from return_value:",e,"Raw return_value:",s.return_value),Error("Failed to parse workspace data for request ID ".concat(t,": ").concat(e.message))}else s.result&&(console.warn("Using resultData.result as fallback for status ".concat(s.status)),o=s.result);return console.log("Effectively fetched workspace data (to be returned):",o),o||{}}catch(e){throw console.error("Failed to fetch workspaces (in getWorkspaces function):",e.message,e.stack),e}}async function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;try{let t="".concat(a.f4,"/enabled_clouds");e&&(t+="?workspace=".concat(encodeURIComponent(e)));let r=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(!r.ok)throw Error("Error scheduling getEnabledClouds: ".concat(r.statusText," (status ").concat(r.status,")"));let s=r.headers.get("X-Skypilot-Request-ID");if(!s){console.warn("X-Skypilot-Request-ID header not found in /enabled_clouds response. Attempting to find request_id in response body as a fallback.");try{let e=await r.json();if(e&&e.request_id)s=e.request_id,console.log("Found request_id in /enabled_clouds response body (fallback):",s);else throw Error("X-Skypilot-Request-ID header not found AND request_id not found in parsed response body from /enabled_clouds.")}catch(t){let e=t.message||"Error processing fallback for request_id from /enabled_clouds response body.";throw console.error("Error in /enabled_clouds request_id fallback logic:",e),Error("X-Skypilot-Request-ID header not found, and fallback to read request_id from body failed: ".concat(e))}}if(!s)throw Error("Failed to obtain X-Skypilot-Request-ID from /enabled_clouds response (checked header and attempted body fallback, but ID is still missing).");console.log("Fetching enabled_clouds data with request_id: ".concat(s));let o=await fetch("".concat(a.f4,"/api/get?request_id=").concat(s));if(!o.ok){let e="Error fetching enabled_clouds data for request ID ".concat(s,": ").concat(o.statusText," (status ").concat(o.status,")");try{let t=await o.json();if(t&&t.detail){let r=t.detail;try{let e=JSON.parse(r);e&&e.error?r=e.error:e&&e.result&&e.result.error&&(r=e.result.error)}catch(e){}e="Error fetching enabled_clouds data for request ID ".concat(s,": ").concat(r)}}catch(e){}throw Error(e)}let n=await o.json();if(console.log("[Connector Debug] Full resultData from /api/get for enabled_clouds:",n),"FAILED"===n.status){let e=n.error||n.result&&n.result.error||"Unknown error during task execution for enabled_clouds";throw Error("Fetching enabled_clouds data failed for request ID ".concat(s,": ").concat(e))}let c=[];if("SUCCEEDED"===n.status&&n.return_value)try{c=JSON.parse(n.return_value),console.log("Successfully parsed enabled_clouds data from return_value:",c)}catch(e){throw console.error("Failed to parse enabled_clouds data from return_value:",e,"Raw return_value:",n.return_value),Error("Failed to parse enabled_clouds data for request ID ".concat(s,": ").concat(e.message))}else n.result&&(console.warn("Using resultData.result as fallback for enabled_clouds status ".concat(n.status)),c=n.result);return Array.isArray(c)?c:[]}catch(e){throw console.error("Failed to fetch enabled_clouds (in getEnabledClouds function):",e.message,e.stack),e}}async function n(e,t){console.log("Polling for ".concat(t," task completion with request_id: ").concat(e));let r=await fetch("".concat(a.f4,"/api/get?request_id=").concat(e));if(!r.ok){let a="Error fetching ".concat(t," data for request ID ").concat(e,": ").concat(r.statusText," (status ").concat(r.status,")");try{let e=await r.json();if(console.error("[Error Debug] ".concat(t," HTTP error response:"),JSON.stringify(e,null,2)),e&&e.detail){if("object"==typeof e.detail&&e.detail.error)try{let r=JSON.parse(e.detail.error);if(r&&r.message)a="".concat(t," failed: ").concat(r.message);else if(r&&"object"==typeof r){let e=r.type||JSON.stringify(r);a="".concat(t," failed: ").concat(e)}}catch(r){a="".concat(t," failed: ").concat(e.detail.error)}else if("string"==typeof e.detail)a="".concat(t," failed: ").concat(e.detail);else{let r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if("string"==typeof e&&(e.includes("Cannot")||e.includes("Error")||e.includes("Failed")))return e;if("object"==typeof e&&null!==e)for(let[a,s]of Object.entries(e)){let e=r(s,t?"".concat(t,".").concat(a):a);if(e)return e}return null},s=r(e.detail);s&&(a="".concat(t," failed: ").concat(s))}}}catch(e){console.error("[Error Debug] Failed to parse error response:",e)}throw Error(a)}let s=await r.json();if(console.log("[Connector Debug] ".concat(t," resultData:"),s),"FAILED"===s.status){console.error("[Error Debug] ".concat(t," failed. Full resultData:"),JSON.stringify(s,null,2)),console.error("[Error Debug] resultData.error:",s.error),console.error("[Error Debug] resultData.result:",s.result),console.error("[Error Debug] resultData.return_value:",s.return_value);let e="Unknown error during ".concat(t," task execution");if(s.error)"string"==typeof s.error?e=s.error:"object"==typeof s.error&&(e=s.error.message||s.error.detail||JSON.stringify(s.error));else if(s.result&&s.result.error)"string"==typeof s.result.error?e=s.result.error:"object"==typeof s.result.error&&(e=s.result.error.message||s.result.error.detail||JSON.stringify(s.result.error));else if(s.return_value)try{let t=JSON.parse(s.return_value);t.error&&(e="string"==typeof t.error?t.error:t.error.message||t.error.detail||JSON.stringify(t.error))}catch(t){s.return_value&&(s.return_value.includes("Error")||s.return_value.includes("Cannot"))&&(e=s.return_value)}if(e==="Unknown error during ".concat(t," task execution")){let t=function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if("string"==typeof e&&(e.includes("Cannot")||e.includes("Error")||e.includes("Failed")))return e;if("object"==typeof e&&null!==e)for(let[a,s]of Object.entries(e)){let e=t(s,r?"".concat(r,".").concat(a):a);if(e)return e}return null},r=t(s);r&&(e=r)}throw Error(e)}let o={};if("SUCCEEDED"===s.status&&s.return_value)try{o=JSON.parse(s.return_value),console.log("Successfully parsed ".concat(t," data:"),o)}catch(r){throw console.error("Failed to parse ".concat(t," data from return_value:"),r,"Raw return_value:",s.return_value),Error("Failed to parse ".concat(t," data for request ID ").concat(e,": ").concat(r.message))}else s.result&&(console.warn("Using resultData.result as fallback for ".concat(t," status ").concat(s.status)),o=s.result);return o}async function c(e,t){try{console.log("Updating workspace ".concat(e," with config:"),t);let r=await fetch("".concat(a.f4,"/workspaces/update"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace_name:e,config:t})});if(!r.ok)throw Error("Error scheduling updateWorkspace: ".concat(r.statusText," (status ").concat(r.status,")"));let s=r.headers.get("X-Skypilot-Request-ID");if(!s)throw Error("Failed to obtain request ID for updateWorkspace");return await n(s,"updateWorkspace")}catch(e){throw console.error("Failed to update workspace:",e),e}}let l=async(e,t)=>{try{let r=await fetch("".concat(a.f4,"/workspaces/create"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace_name:e,config:t})});if(!r.ok)throw await r.text(),Error("Error scheduling createWorkspace: ".concat(r.statusText," (status ").concat(r.status,")"));let s=r.headers.get("X-Skypilot-Request-ID");if(!s)throw Error("Failed to obtain request ID for createWorkspace");return await n(s,"createWorkspace")}catch(e){throw console.error("Failed to create workspace:",e),e}};async function i(e){try{console.log("Deleting workspace ".concat(e));let t=await fetch("".concat(a.f4,"/workspaces/delete"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace_name:e})});if(!t.ok)throw Error("Error scheduling deleteWorkspace: ".concat(t.statusText," (status ").concat(t.status,")"));let r=t.headers.get("X-Skypilot-Request-ID");if(!r)throw Error("Failed to obtain request ID for deleteWorkspace");console.log("[Delete Debug] Got request ID for deleteWorkspace: ".concat(r));try{let e=await n(r,"deleteWorkspace");return console.log("[Delete Debug] deleteWorkspace completed successfully:",e),e}catch(e){throw console.error("[Delete Debug] deleteWorkspace failed with error:",e),console.error("[Delete Debug] Error message:",e.message),e}}catch(e){throw console.error("Failed to delete workspace:",e),e}}},4545:function(e,t,r){function a(e){return e.startsWith("sky-jobs-controller-")}function s(e,t,r){return null===t?e:[...e].sort((e,a)=>e[t]<a[t]?"ascending"===r?-1:1:e[t]>a[t]?"ascending"===r?1:-1:0)}r.d(t,{R0:function(){return s},Ym:function(){return a}})}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[938],{938:function(e,s,t){t.d(s,{L4:function(){return D},Nk:function(){return L},x2:function(){return _}});var r=t(5893),n=t(7294),a=t(1163),l=t(1664),c=t.n(l),i=t(8799),o=t(803),d=t(7673),u=t(8764),h=t(6989),x=t(8969),m=t(3266),p=t(7324),j=t(9470),f=t(3626),g=t(3293),b=t(6521),w=t(3610),y=t(9284),N=t(4545),v=t(9307),k=t(3001),C=t(8950);let _={active:["PENDING","RUNNING","RECOVERING","SUBMITTED","STARTING","CANCELLING"],finished:["SUCCEEDED","FAILED","CANCELLED","FAILED_SETUP","FAILED_PRECHECKS","FAILED_NO_RESOURCE","FAILED_CONTROLLER"]},S="__ALL_WORKSPACES__",E=e=>{if(!e)return"-";let s=(0,h.GV)(e);if(n.isValidElement(s)&&s.props&&s.props.children&&(s=n.isValidElement(s.props.children)&&s.props.children.props&&s.props.children.props.children?s.props.children.props.children:s.props.children),"string"!=typeof s)return s;if("just now"===s)return"now";let t=s.match(/^About\s+(\d+)\s+(\w+)\s+ago$/);if(t){let e=t[1],s=t[2],r={second:"sec",seconds:"secs",minute:"min",minutes:"mins",hour:"hr",hours:"hrs",day:"d",days:"d",month:"mo",months:"mos",year:"yr",years:"yrs"};if(r[s])return"~ ".concat(e," ").concat(r[s]," ago")}let r=s.match(/^a[n]?\s+(\w+)\s+ago$/);if(r){let e=r[1],s={second:"sec",minute:"min",hour:"hr",day:"d",month:"mo",year:"yr"};if(s[e])return"1 ".concat(s[e]," ago")}let a=s.match(/^(\d+)\s+(\w+)\s+ago$/);if(a){let e=a[1],s=a[2],t={seconds:"secs",minutes:"mins",hours:"hrs",days:"d",months:"mo",years:"yr"};if(t[s])return"".concat(e," ").concat(t[s]," ago")}return s};function L(){let e=(0,a.useRouter)(),[s,t]=(0,n.useState)(!1),l=n.useRef(null),[d,u]=(0,n.useState)({isOpen:!1,title:"",message:"",onConfirm:null}),m=(0,k.X)(),[g,b]=(0,n.useState)(S),[w,N]=(0,n.useState)([]);return(0,n.useEffect)(()=>{e.isReady&&e.query.workspace&&b(Array.isArray(e.query.workspace)?e.query.workspace[0]:e.query.workspace)},[e.isReady,e.query.workspace]),(0,n.useEffect)(()=>{(async()=>{try{let e=await (0,p.fX)(),s=Object.keys(e),t=(await (0,x.Vp)()).jobs||[],r=[...new Set(t.map(e=>e.workspace||"default").filter(e=>e))],n=new Set(s);r.forEach(e=>n.add(e)),N(Array.from(n).sort())}catch(e){console.error("Error fetching data for workspace filter:",e),N(["default"])}})()},[]),(0,r.jsxs)(j.A,{highlighted:"jobs",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,r.jsxs)("div",{className:"text-base flex items-center",children:[(0,r.jsx)(c(),{href:"/jobs",className:"text-sky-blue hover:underline leading-none",children:"Managed Jobs"}),(0,r.jsxs)(C.Ph,{value:g,onValueChange:b,children:[(0,r.jsx)(C.i4,{className:"h-8 w-48 ml-4 mr-2 text-sm border-none focus:ring-0 focus:outline-none",children:(0,r.jsx)(C.ki,{placeholder:"Filter by workspace...",children:g===S?"All Workspaces":g})}),(0,r.jsxs)(C.Bw,{children:[(0,r.jsx)(C.Ql,{value:S,children:"All Workspaces"}),w.map(e=>(0,r.jsx)(C.Ql,{value:e,children:e},e))]})]})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,r.jsxs)("div",{className:"flex items-center mr-2",children:[(0,r.jsx)(i.Z,{size:15,className:"mt-0"}),(0,r.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"Loading..."})]}),(0,r.jsxs)(o.z,{variant:"ghost",size:"sm",onClick:()=>{l.current&&l.current()},disabled:s,className:"text-sky-blue hover:text-sky-blue-bright",title:"Refresh",children:[(0,r.jsx)(f.Z,{className:"h-4 w-4 mr-1.5"}),!m&&(0,r.jsx)("span",{children:"Refresh"})]})]})]}),(0,r.jsx)(R,{refreshInterval:h.yc,setLoading:t,refreshDataRef:l,workspaceFilter:g}),(0,r.jsx)(y.cV,{isOpen:d.isOpen,onClose:()=>u({...d,isOpen:!1}),onConfirm:d.onConfirm,title:d.title,message:d.message})]})}function R(e){let{refreshInterval:s,setLoading:t,refreshDataRef:a,workspaceFilter:l}=e,[p,j]=(0,n.useState)([]),[f,b]=(0,n.useState)({key:null,direction:"ascending"}),[w,k]=(0,n.useState)(!1),[C,L]=(0,n.useState)(!0),[R,D]=(0,n.useState)(1),[A,z]=(0,n.useState)(10),[J,P]=(0,n.useState)(null),T=(0,n.useRef)(null),[W,q]=(0,n.useState)([]),[F,U]=(0,n.useState)({}),[V,Z]=(0,n.useState)(!1),[B,G]=(0,n.useState)(!1),[H,X]=(0,n.useState)(!1),[$,K]=(0,n.useState)("active"),[Q,Y]=(0,n.useState)(!0),[ee,es]=(0,n.useState)({isOpen:!1,title:"",message:"",onConfirm:null}),et=async()=>{es({isOpen:!0,title:"Restart Controller",message:"Are you sure you want to restart the controller? This will temporarily interrupt job management.",onConfirm:async()=>{try{X(!0),k(!0),await (0,x.Ce)("restartcontroller"),await er()}catch(e){console.error("Error restarting controller:",e)}finally{X(!1),k(!1)}}})},er=n.useCallback(async()=>{k(!0),t(!0);try{let[e,s]=await Promise.all([(0,x.Vp)(),(0,m.zd)()]),{jobs:t,controllerStopped:r}=e,n=s.find(e=>(0,N.Ym)(e.cluster)),a=n?n.status:"NOT_FOUND",l=!1;"STOPPED"==a&&r&&(l=!0),"LAUNCHING"==a?G(!0):G(!1),j(t),Z(l)}catch(e){console.error("Error fetching data:",e),j([])}finally{k(!1),t(!1),L(!1)}},[t]);n.useEffect(()=>{a&&(a.current=er)},[a,er]),(0,n.useEffect)(()=>{j([]);let e=!0;er();let t=setInterval(()=>{e&&er()},s);return()=>{e=!1,clearInterval(t)}},[s,er]),(0,n.useEffect)(()=>{D(1)},[$,p.length]),(0,n.useEffect)(()=>{q([]),Y(!0)},[$]);let en=e=>{let s="ascending";f.key===e&&"ascending"===f.direction&&(s="descending"),b({key:e,direction:s})},ea=e=>f.key===e?"ascending"===f.direction?" ↑":" ↓":"";n.useMemo(()=>({active:p.filter(e=>_.active.includes(e.status)).length,finished:p.filter(e=>_.finished.includes(e.status)).length}),[p]);let el=e=>W.length>0?W.includes(e):_[$].includes(e),ec=n.useMemo(()=>{let e=l&&l!==S?p.filter(e=>(e.workspace||"default").toLowerCase()===l.toLowerCase()):p;return W.length>0?e.filter(e=>W.includes(e.status)):Q?e.filter(e=>_[$].includes(e.status)):[]},[p,$,W,Q,_,l]),ei=n.useMemo(()=>f.key?[...ec].sort((e,s)=>e[f.key]<s[f.key]?"ascending"===f.direction?-1:1:e[f.key]>s[f.key]?"ascending"===f.direction?1:-1:0):ec,[ec,f]),eo=Math.ceil(ei.length/A),ed=(R-1)*A,eu=ed+A,eh=ei.slice(ed,eu),ex=e=>{if(W.includes(e)){let s=W.filter(s=>s!==e);0===s.length?(Y(!0),q([])):(q(s),Y(!1))}else q([...W,e]),Y(!1)};return(0,n.useEffect)(()=>{U(p.reduce((e,s)=>(e[s.status]=(e[s.status]||0)+1,e),{}))},[p]),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("div",{className:"flex flex-col space-y-1 mb-1",children:(0,r.jsxs)("div",{className:"flex flex-wrap items-center text-sm mb-1",children:[(0,r.jsx)("span",{className:"mr-2 text-sm font-medium",children:"Statuses:"}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-2 items-center",children:[!w&&0===p.length&&!C&&(0,r.jsx)("span",{className:"text-gray-500 mr-2",children:"No jobs found"}),Object.entries(F).map(e=>{let[s,t]=e;return(0,r.jsxs)("button",{onClick:()=>ex(s),className:"px-3 py-1 rounded-full flex items-center space-x-2 ".concat(el(s)||W.includes(s)?(0,v.Cl)(s):"bg-gray-50 text-gray-600 hover:bg-gray-100"),children:[(0,r.jsx)("span",{children:s}),(0,r.jsx)("span",{className:"text-xs ".concat(el(s)||W.includes(s)?"bg-white/50":"bg-gray-200"," px-1.5 py-0.5 rounded"),children:t})]},s)}),p.length>0&&(0,r.jsxs)("div",{className:"flex items-center ml-2 gap-2",children:[(0,r.jsx)("span",{className:"text-gray-500",children:"("}),(0,r.jsx)("button",{onClick:()=>{K("active"),q([]),Y(!0)},className:"text-sm font-medium ".concat("active"===$&&Q?"text-green-700 underline":"text-gray-600 hover:text-green-700 hover:underline"),children:"show all active jobs"}),(0,r.jsx)("span",{className:"text-gray-500 mx-1",children:"|"}),(0,r.jsx)("button",{onClick:()=>{K("finished"),q([]),Y(!0)},className:"text-sm font-medium ".concat("finished"===$&&Q?"text-blue-700 underline":"text-gray-600 hover:text-blue-700 hover:underline"),children:"show all finished jobs"}),(0,r.jsx)("span",{className:"text-gray-500",children:")"})]})]})]})}),(0,r.jsx)(d.Zb,{children:(0,r.jsxs)(u.iA,{children:[(0,r.jsx)(u.xD,{children:(0,r.jsxs)(u.SC,{children:[(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>en("id"),children:["ID",ea("id")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>en("name"),children:["Name",ea("name")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>en("user"),children:["User",ea("user")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>en("workspace"),children:["Workspace",ea("workspace")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>en("submitted_at"),children:["Submitted",ea("submitted_at")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>en("job_duration"),children:["Duration",ea("job_duration")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>en("status"),children:["Status",ea("status")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>en("resources_str"),children:["Requested",ea("resources_str")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>en("infra"),children:["Infra",ea("infra")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>en("cluster"),children:["Resources",ea("cluster")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>en("recoveries"),children:["Recoveries",ea("recoveries")]}),(0,r.jsx)(u.ss,{children:"Details"}),(0,r.jsx)(u.ss,{children:"Logs"})]})}),(0,r.jsx)(u.RM,{children:w&&C?(0,r.jsx)(u.SC,{children:(0,r.jsx)(u.pj,{colSpan:12,className:"text-center py-6 text-gray-500",children:(0,r.jsxs)("div",{className:"flex justify-center items-center",children:[(0,r.jsx)(i.Z,{size:20,className:"mr-2"}),(0,r.jsx)("span",{children:"Loading..."})]})})}):eh.length>0?(0,r.jsx)(r.Fragment,{children:eh.map(e=>(0,r.jsxs)(n.Fragment,{children:[(0,r.jsxs)(u.SC,{children:[(0,r.jsx)(u.pj,{children:(0,r.jsx)(c(),{href:"/jobs/".concat(e.id),className:"text-blue-600",children:e.id})}),(0,r.jsx)(u.pj,{children:(0,r.jsx)(c(),{href:"/jobs/".concat(e.id),className:"text-blue-600",children:e.name})}),(0,r.jsx)(u.pj,{children:e.user}),(0,r.jsx)(u.pj,{children:(0,r.jsx)(c(),{href:"/workspaces",className:"text-blue-600 hover:underline",children:e.workspace||"default"})}),(0,r.jsx)(u.pj,{children:E(e.submitted_at)}),(0,r.jsx)(u.pj,{children:(0,h.LU)(e.job_duration)}),(0,r.jsx)(u.pj,{children:(0,r.jsx)(v.OE,{status:e.status})}),(0,r.jsx)(u.pj,{children:e.requested_resources}),(0,r.jsx)(u.pj,{children:e.infra&&"-"!==e.infra?(0,r.jsx)(h.Md,{content:e.full_infra||e.infra,className:"text-sm text-muted-foreground",children:(0,r.jsxs)("span",{children:[(0,r.jsx)(c(),{href:"/infra",className:"text-blue-600 hover:underline",children:e.cloud||e.infra.split("(")[0].trim()}),e.infra.includes("(")&&(0,r.jsx)("span",{children:" "+e.infra.substring(e.infra.indexOf("("))})]})}):(0,r.jsx)("span",{children:e.infra||"-"})}),(0,r.jsx)(u.pj,{children:(0,r.jsx)(h.Md,{content:e.resources_str_full||e.resources_str,className:"text-sm text-muted-foreground",children:(0,r.jsx)("span",{children:e.resources_str})})}),(0,r.jsx)(u.pj,{children:e.recoveries}),(0,r.jsx)(u.pj,{children:e.details?(0,r.jsx)(M,{text:e.details,rowId:e.id,expandedRowId:J,setExpandedRowId:P}):"-"}),(0,r.jsx)(u.pj,{children:(0,r.jsx)(O,{jobParent:"/jobs",jobId:e.id,managed:!0})})]}),J===e.id&&(0,r.jsx)(I,{text:e.details,colSpan:12,innerRef:T})]},e.id))}):(0,r.jsx)(u.SC,{children:(0,r.jsx)(u.pj,{colSpan:12,className:"text-center py-6",children:(0,r.jsxs)("div",{className:"flex flex-col items-center space-y-4",children:[B&&(0,r.jsxs)("div",{className:"flex flex-col items-center space-y-2",children:[(0,r.jsx)("p",{className:"text-gray-700",children:"The managed job controller is launching. Please wait for it to be ready."}),(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(i.Z,{size:12,className:"mr-2"}),(0,r.jsx)("span",{className:"text-gray-500",children:"Launching..."})]})]}),!V&&!B&&(0,r.jsx)("p",{className:"text-gray-500",children:"No active jobs"}),V&&(0,r.jsxs)("div",{className:"flex flex-col items-center space-y-2",children:[(0,r.jsx)("p",{className:"text-gray-700",children:"The managed job controller has been stopped. Please restart it to check the latest job status."}),(0,r.jsx)(o.z,{variant:"outline",size:"sm",onClick:et,className:"text-sky-blue hover:text-sky-blue-bright",disabled:w||H,children:H?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Z,{size:12,className:"mr-2"}),"Restarting..."]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(g.Z,{className:"h-4 w-4 mr-2"}),"Restart Controller"]})})]})]})})})})]})}),ei.length>0&&(0,r.jsx)("div",{className:"flex justify-end items-center py-2 px-4 text-sm text-gray-700",children:(0,r.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("span",{className:"mr-2",children:"Rows per page:"}),(0,r.jsxs)("div",{className:"relative inline-block",children:[(0,r.jsxs)("select",{value:A,onChange:e=>{z(parseInt(e.target.value,10)),D(1)},className:"py-1 pl-2 pr-6 appearance-none outline-none cursor-pointer border-none bg-transparent",style:{minWidth:"40px"},children:[(0,r.jsx)("option",{value:10,children:"10"}),(0,r.jsx)("option",{value:30,children:"30"}),(0,r.jsx)("option",{value:50,children:"50"}),(0,r.jsx)("option",{value:100,children:"100"}),(0,r.jsx)("option",{value:200,children:"200"})]}),(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-gray-500 absolute right-0 top-1/2 transform -translate-y-1/2 pointer-events-none",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),(0,r.jsxs)("div",{children:[ed+1," – ",Math.min(eu,ei.length)," of"," ",ei.length]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(o.z,{variant:"ghost",size:"icon",onClick:()=>{D(e=>Math.max(e-1,1))},disabled:1===R,className:"text-gray-500 h-8 w-8 p-0",children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"chevron-left",children:(0,r.jsx)("path",{d:"M15 18l-6-6 6-6"})})}),(0,r.jsx)(o.z,{variant:"ghost",size:"icon",onClick:()=>{D(e=>Math.min(e+1,eo))},disabled:R===eo||0===eo,className:"text-gray-500 h-8 w-8 p-0",children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"chevron-right",children:(0,r.jsx)("path",{d:"M9 18l6-6-6-6"})})})]})]})}),(0,r.jsx)(y.cV,{isOpen:ee.isOpen,onClose:()=>es({...ee,isOpen:!1}),onConfirm:ee.onConfirm,title:ee.title,message:ee.message})]})}function O(e){let{withLabel:s=!1,jobParent:t,jobId:n,managed:l}=e,c=(0,a.useRouter)(),i=(e,s)=>{e.preventDefault(),e.stopPropagation(),c.push({pathname:"".concat(t,"/").concat(n),query:{tab:s}})};return(0,r.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,r.jsx)(h.WH,{content:"View Job Logs",className:"capitalize text-sm text-muted-foreground",children:(0,r.jsxs)("button",{onClick:e=>i(e,"logs"),className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center h-8",children:[(0,r.jsx)(b.Z,{className:"w-4 h-4"}),s&&(0,r.jsx)("span",{className:"ml-1.5",children:"Logs"})]})},"logs"),l&&(0,r.jsx)(h.WH,{content:"View Controller Logs",className:"capitalize text-sm text-muted-foreground",children:(0,r.jsxs)("button",{onClick:e=>i(e,"controllerlogs"),className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center h-8",children:[(0,r.jsx)(w.Z,{className:"w-4 h-4"}),s&&(0,r.jsx)("span",{className:"ml-2",children:"Controller Logs"})]})},"controllerlogs")]})}function D(e){let{clusterName:s,clusterJobData:t,loading:a}=e,[l,x]=(0,n.useState)(null),[m,p]=(0,n.useState)({key:null,direction:"ascending"}),[j,f]=(0,n.useState)(1),[g,b]=(0,n.useState)(10),w=(0,n.useRef)(null),[y,N]=(0,n.useState)(null);(0,n.useEffect)(()=>{let e=e=>{l&&w.current&&!w.current.contains(e.target)&&x(null)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[l]);let k=n.useMemo(()=>t||[],[t]);(0,n.useEffect)(()=>{JSON.stringify(t)!==JSON.stringify(y)&&N(t)},[t,y]);let C=n.useMemo(()=>m.key?[...k].sort((e,s)=>e[m.key]<s[m.key]?"ascending"===m.direction?-1:1:e[m.key]>s[m.key]?"ascending"===m.direction?1:-1:0):k,[k,m]),_=e=>{let s="ascending";m.key===e&&"ascending"===m.direction&&(s="descending"),p({key:e,direction:s})},S=e=>m.key===e?"ascending"===m.direction?" ↑":" ↓":"",L=Math.ceil(C.length/g),R=(j-1)*g,D=R+g,A=C.slice(R,D);return(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsxs)(d.Zb,{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold",children:"Cluster Jobs"}),a&&(0,r.jsxs)("div",{className:"flex items-center mr-2",children:[(0,r.jsx)(i.Z,{size:15,className:"mt-0"}),(0,r.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"Loading..."})]})]}),(0,r.jsxs)(u.iA,{children:[(0,r.jsx)(u.xD,{children:(0,r.jsxs)(u.SC,{children:[(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>_("id"),children:["ID",S("id")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>_("job"),children:["Name",S("job")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>_("user"),children:["User",S("user")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>_("workspace"),children:["Workspace",S("workspace")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>_("submitted_at"),children:["Submitted",S("submitted_at")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>_("job_duration"),children:["Duration",S("job_duration")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>_("status"),children:["Status",S("status")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>_("resources"),children:["Resources",S("resources")]}),(0,r.jsx)(u.ss,{className:"whitespace-nowrap",children:"Logs"})]})}),(0,r.jsx)(u.RM,{children:A.length>0?A.map(e=>(0,r.jsxs)(n.Fragment,{children:[(0,r.jsxs)(u.SC,{className:l===e.id?"selected-row":"",children:[(0,r.jsx)(u.pj,{children:(0,r.jsx)(c(),{href:"/clusters/".concat(s,"/").concat(e.id),className:"text-blue-600",children:e.id})}),(0,r.jsx)(u.pj,{children:(0,r.jsx)(c(),{href:"/clusters/".concat(s,"/").concat(e.id),className:"text-blue-600",children:(0,r.jsx)(M,{text:e.job||"Unnamed job",rowId:e.id,expandedRowId:l,setExpandedRowId:x})})}),(0,r.jsx)(u.pj,{children:e.user}),(0,r.jsx)(u.pj,{children:(0,r.jsx)(c(),{href:"/workspaces",className:"text-blue-600 hover:underline",children:e.workspace||"default"})}),(0,r.jsx)(u.pj,{children:E(e.submitted_at)}),(0,r.jsx)(u.pj,{children:(0,h.LU)(e.job_duration)}),(0,r.jsx)(u.pj,{children:(0,r.jsx)(v.OE,{status:e.status})}),(0,r.jsx)(u.pj,{children:e.resources}),(0,r.jsx)(u.pj,{className:"flex content-center items-center",children:(0,r.jsx)(O,{jobParent:"/clusters/".concat(s),jobId:e.id,managed:!1})})]}),l===e.id&&(0,r.jsx)(I,{text:e.job||"Unnamed job",colSpan:9,innerRef:w})]},e.id)):(0,r.jsx)(u.SC,{children:(0,r.jsx)(u.pj,{colSpan:9,className:"text-center py-6 text-gray-500",children:"No jobs found"})})})]})]}),C.length>0&&(0,r.jsx)("div",{className:"flex justify-end items-center py-2 px-4 text-sm text-gray-700",children:(0,r.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("span",{className:"mr-2",children:"Rows per page:"}),(0,r.jsxs)("div",{className:"relative inline-block",children:[(0,r.jsxs)("select",{value:g,onChange:e=>{b(parseInt(e.target.value,10)),f(1)},className:"py-1 pl-2 pr-6 appearance-none outline-none cursor-pointer border-none bg-transparent",style:{minWidth:"40px"},children:[(0,r.jsx)("option",{value:5,children:"5"}),(0,r.jsx)("option",{value:10,children:"10"}),(0,r.jsx)("option",{value:20,children:"20"}),(0,r.jsx)("option",{value:50,children:"50"})]}),(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-gray-500 absolute right-0 top-1/2 transform -translate-y-1/2 pointer-events-none",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),(0,r.jsxs)("div",{children:[R+1," – ",Math.min(D,C.length)," of"," ",C.length]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(o.z,{variant:"ghost",size:"icon",onClick:()=>{f(e=>Math.max(e-1,1))},disabled:1===j,className:"text-gray-500 h-8 w-8 p-0",children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"chevron-left",children:(0,r.jsx)("path",{d:"M15 18l-6-6 6-6"})})}),(0,r.jsx)(o.z,{variant:"ghost",size:"icon",onClick:()=>{f(e=>Math.min(e+1,L))},disabled:j===L||0===L,className:"text-gray-500 h-8 w-8 p-0",children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"chevron-right",children:(0,r.jsx)("path",{d:"M9 18l6-6-6-6"})})})]})]})})]})}function I(e){let{text:s,colSpan:t,innerRef:n}=e;return(0,r.jsx)(u.SC,{className:"expanded-details",children:(0,r.jsx)(u.pj,{colSpan:t,children:(0,r.jsx)("div",{className:"p-4 bg-gray-50 rounded-md border border-gray-200",ref:n,children:(0,r.jsx)("div",{className:"flex justify-between items-start",children:(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-gray-900",children:"Full Details"}),(0,r.jsx)("p",{className:"mt-1 text-sm text-gray-700",style:{whiteSpace:"pre-wrap"},children:s})]})})})})})}function M(e){let{text:s,rowId:t,expandedRowId:a,setExpandedRowId:l}=e,c=s.length>50,i=a===t,o=c?"".concat(s.substring(0,50)):s,d=(0,n.useRef)(null);return(0,r.jsxs)("div",{className:"truncated-details relative max-w-full flex items-center",children:[(0,r.jsx)("span",{className:"truncate",children:o}),c&&(0,r.jsx)("button",{ref:d,type:"button",onClick:e=>{e.preventDefault(),e.stopPropagation(),l(i?null:t)},className:"text-blue-600 hover:text-blue-800 font-medium ml-1 flex-shrink-0","data-button-type":"show-more-less",children:i?"... show less":"... show more"})]})}},8969:function(e,s,t){t.d(s,{Ce:function(){return o},NJ:function(){return i},Pr:function(){return c},Vp:function(){return l}});var r=t(7294),n=t(5821),a=t(3225);async function l(){let{allUsers:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let s=(await fetch("".concat(a.f4,"/jobs/queue"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({all_users:e})})).headers.get("X-Skypilot-Request-ID"),t=await fetch("".concat(a.f4,"/api/get?request_id=").concat(s));if(500===t.status){try{let e=await t.json();if(e.detail&&e.detail.error)try{let s=JSON.parse(e.detail.error);if(s.type&&s.type===a.iW)return{jobs:[],controllerStopped:!0}}catch(e){console.error("Error parsing JSON:",e)}}catch(e){console.error("Error parsing JSON:",e)}return{jobs:[],controllerStopped:!1}}let r=await t.json();return{jobs:(r.return_value?JSON.parse(r.return_value):[]).map(e=>{let s=[];e.submitted_at&&s.push({time:new Date(1e3*e.submitted_at),event:"Job submitted."}),e.start_at&&s.push({time:new Date(1e3*e.start_at),event:"Job started."}),e.end_at&&("CANCELLING"==e.status||"CANCELLED"==e.status?s.push({time:new Date(1e3*e.end_at),event:"Job cancelled."}):s.push({time:new Date(1e3*e.end_at),event:"Job completed."})),e.last_recovered_at&&e.last_recovered_at!=e.start_at&&s.push({time:new Date(1e3*e.last_recovered_at),event:"Job recovered."});let t=(e.end_at?e.end_at:Date.now()/1e3)-e.submitted_at,r=e.cloud,n=e.cluster_resources;if(!r){if(e.cluster_resources&&"-"!==e.cluster_resources)try{r=e.cluster_resources.split("(")[0].split("x").pop().trim(),n=e.cluster_resources.replace("".concat(r,"("),"(").replace("x ","x")}catch(e){r="Unknown"}else r="Unknown"}let a="",l=a=e.zone?e.zone:e.region;a&&a.length>15&&(a=a.substring(0,15)+"...");let c=r+" ("+a+")";"-"===a&&(c=r);let i=r+" ("+l+")";return"-"===l&&(i=r),{id:e.job_id,task:e.task_name,name:e.job_name,job_duration:e.job_duration,total_duration:t,workspace:e.workspace,status:e.status,requested_resources:e.resources,resources_str:n,resources_str_full:e.cluster_resources_full||n,cloud:r,infra:c,full_infra:i,recoveries:e.recovery_count,details:e.failure_reason,user:e.user_name,user_hash:e.user_hash,submitted_at:e.submitted_at?new Date(1e3*e.submitted_at):null,events:s}}),controllerStopped:!1}}catch(e){return console.error("Error fetching managed job data:",e),{jobs:[],controllerStopped:!1}}}function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,[s,t]=(0,r.useState)(null),[n,a]=(0,r.useState)(!0);return(0,r.useEffect)(()=>{(async function(){try{a(!0);let e=await l({allUsers:!0});t(e)}catch(e){console.error("Error fetching managed job data:",e)}finally{a(!1)}})()},[e]),{jobData:s,loading:n}}async function i(e){let{jobId:s,controller:t=!1,signal:r,onNewLog:l}=e,c=new Promise(e=>{setTimeout(()=>{e({timeout:!0})},1e4)}),i=(async()=>{try{let e=(await fetch("".concat(a.f4,"/jobs/logs"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({controller:t,follow:!1,job_id:s}),...r?{signal:r}:{}})).body.getReader();try{for(;;){let{done:s,value:t}=await e.read();if(s)break;let r=new TextDecoder().decode(t);l(r)}}finally{e.cancel()}return{timeout:!1}}catch(e){if("AbortError"===e.name)return{timeout:!1};throw e}})();if((await Promise.race([i,c])).timeout){(0,n.C)("Log request for job ".concat(s," timed out after ").concat(1e4,"ms"),"error");return}}async function o(e,s,t){let r="",l="",c="",i={};if("restartcontroller"===e)r="Restarting",l="restarted",c="jobs/queue",i={all_users:!0,refresh:!0},s="controller";else throw Error("Invalid action: ".concat(e));(0,n.C)("".concat(r," job ").concat(s,"..."),"info");try{try{let e=(await fetch("".concat(a.f4,"/").concat(c),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)})).headers.get("X-Skypilot-Request-ID"),o=await fetch("".concat(a.f4,"/api/get?request_id=").concat(e));if(200===o.status)(0,n.C)("Job ".concat(s," ").concat(l," successfully."),"success");else if(500===o.status)try{let e=await o.json();if(e.detail&&e.detail.error)try{let l=JSON.parse(e.detail.error);l.type&&l.type===a.Bo?(0,n.C)("".concat(r," job ").concat(s," is not supported!"),"error",1e4):l.type&&l.type===a.mF?(0,n.C)("Cluster ".concat(t," does not exist."),"error"):l.type&&l.type===a.iW?(0,n.C)("Cluster ".concat(t," is not up."),"error"):(0,n.C)("".concat(r," job ").concat(s," failed: ").concat(l.type),"error")}catch(t){(0,n.C)("".concat(r," job ").concat(s," failed: ").concat(e.detail.error),"error")}else(0,n.C)("".concat(r," job ").concat(s," failed with no details."),"error")}catch(e){(0,n.C)("".concat(r," job ").concat(s," failed with parse error."),"error")}else(0,n.C)("".concat(r," job ").concat(s," failed with status ").concat(o.status,"."),"error")}catch(e){console.error("Fetch error:",e),(0,n.C)("Network error ".concat(r," job ").concat(s,": ").concat(e.message),"error")}}catch(e){console.error("Error in handleStop:",e),(0,n.C)("Critical error ".concat(r," job ").concat(s,": ").concat(e.message),"error")}}}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[826],{4966:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/clusters/[cluster]/[job]",function(){return t(190)}])},9307:function(e,s,t){"use strict";t.d(s,{Cl:function(){return l},OE:function(){return u}});var r=t(5893);t(7294);var a=t(8799),n=t(6989),c=t(3850);let l=e=>{switch(e){case"LAUNCHING":return"bg-blue-100 text-sky-blue";case"RUNNING":return"bg-green-50 text-green-700";case"STOPPED":return"bg-yellow-100 text-yellow-800";case"TERMINATED":default:return"bg-gray-100 text-gray-800";case"PENDING":case"CANCELLED":case"CANCELLING":return"bg-yellow-50 text-yellow-700";case"SUCCEEDED":return"bg-blue-50 text-blue-700";case"FAILED":case"FAILED_PRECHECKS":case"FAILED_NO_RESOURCE":case"FAILED_CONTROLLER":return"bg-red-50 text-red-700";case"RECOVERING":return"bg-orange-50 text-orange-700";case"SUBMITTED":return"bg-indigo-50 text-indigo-700";case"STARTING":return"bg-cyan-50 text-cyan-700";case"FAILED_SETUP":return"bg-pink-50 text-pink-700"}},i=e=>{switch(e){case"LAUNCHING":case"STARTING":return(0,r.jsx)(a.Z,{size:12,className:"w-3 h-3 mr-1"});case"RUNNING":default:return(0,r.jsx)(c.W2,{className:"w-3 h-3 mr-1"});case"STOPPED":return(0,r.jsx)(c.fp,{className:"w-3 h-3 mr-1"});case"TERMINATED":case"FAILED":case"CANCELLED":return(0,r.jsx)(c.Ps,{className:"w-3 h-3 mr-1"});case"SUCCEEDED":return(0,r.jsx)(c.Ye,{className:"w-3 h-3 mr-1"});case"PENDING":case"RECOVERING":case"SUBMITTED":case"CANCELLING":case"FAILED_SETUP":case"FAILED_PRECHECKS":case"FAILED_NO_RESOURCE":case"FAILED_CONTROLLER":return(0,r.jsx)(c.J$,{className:"w-3 h-3 mr-1"})}},o=e=>{let s=l(e),t=i(e);return(0,r.jsxs)("span",{className:"".concat("inline-flex items-center px-2 py-1 rounded-full text-sm"," ").concat(s),children:[t,e]})},u=e=>{let{status:s}=e;return(0,r.jsx)(n.WH,{content:s,className:"text-muted-foreground text-sm",children:(0,r.jsx)("span",{children:o(s)})})}},7673:function(e,s,t){"use strict";t.d(s,{Ol:function(){return o},Zb:function(){return i},aY:function(){return m},eW:function(){return x},ll:function(){return u}});var r=t(5893),a=t(7294),n=t(5697),c=t.n(n),l=t(2350);let i=a.forwardRef((e,s)=>{let{className:t,children:a,...n}=e;return(0,r.jsx)("div",{ref:s,className:(0,l.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",t),...n,children:a})});i.displayName="Card",i.propTypes={className:c().string,children:c().node};let o=a.forwardRef((e,s)=>{let{className:t,children:a,...n}=e;return(0,r.jsx)("div",{ref:s,className:(0,l.cn)("flex flex-col space-y-1.5 p-6",t),...n,children:a})});o.displayName="CardHeader",o.propTypes={className:c().string,children:c().node};let u=a.forwardRef((e,s)=>{let{className:t,children:a,...n}=e;return(0,r.jsx)("h3",{ref:s,className:(0,l.cn)("text-2xl font-semibold leading-none tracking-tight",t),...n,children:a})});u.displayName="CardTitle",u.propTypes={className:c().string,children:c().node};let d=a.forwardRef((e,s)=>{let{className:t,children:a,...n}=e;return(0,r.jsx)("p",{ref:s,className:(0,l.cn)("text-sm text-muted-foreground",t),...n,children:a})});d.displayName="CardDescription",d.propTypes={className:c().string,children:c().node};let m=a.forwardRef((e,s)=>{let{className:t,children:a,...n}=e;return(0,r.jsx)("div",{ref:s,className:(0,l.cn)("p-6 pt-0",t),...n,children:a})});m.displayName="CardContent",m.propTypes={className:c().string,children:c().node};let x=a.forwardRef((e,s)=>{let{className:t,children:a,...n}=e;return(0,r.jsx)("div",{ref:s,className:(0,l.cn)("flex items-center p-6 pt-0",t),...n,children:a})});x.displayName="CardFooter",x.propTypes={className:c().string,children:c().node}},3266:function(e,s,t){"use strict";t.d(s,{QL:function(){return u},Sl:function(){return i},zd:function(){return l}});var r=t(7294),a=t(5821),n=t(3225);let c={UP:"RUNNING",STOPPED:"STOPPED",INIT:"LAUNCHING",null:"TERMINATED"};async function l(){let{clusterNames:e=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let s=await fetch("".concat(n.f4,"/status"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cluster_names:e,all_users:!0})}),t=s.headers.get("X-Skypilot-Request-ID")||s.headers.get("X-Request-ID"),r=await fetch("".concat(n.f4,"/api/get?request_id=").concat(t)),a=await r.json();return(a.return_value?JSON.parse(a.return_value):[]).map(e=>{let s="",t=s=e.zone?e.zone:e.region;return s&&s.length>25&&(s=function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15;if(!e||e.length<=s)return e;if(s<=3)return"...";let t=Math.floor((s-3)/2),r=t+(s-3)%2;return 0===t?e.substring(0,r)+"...":e.substring(0,r)+"..."+e.substring(e.length-t)}(s,25)),{status:c[e.status],cluster:e.name,user:e.user_name,user_hash:e.user_hash,cloud:e.cloud,infra:s?e.cloud+" ("+s+")":e.cloud,full_infra:t?"".concat(e.cloud," (").concat(t,")"):e.cloud,cpus:e.cpus,mem:e.memory,gpus:e.accelerators,resources_str:e.resources_str,resources_str_full:e.resources_str_full,time:new Date(1e3*e.launched_at),num_nodes:e.nodes,workspace:e.workspace,jobs:[],events:[{time:new Date(1e3*e.launched_at),event:"Cluster created."}]}})}catch(e){return console.error("Error fetching clusters:",e),[]}}async function i(e){let{clusterName:s,jobId:t,onNewLog:r,workspace:c}=e;try{let e=(await fetch("".concat(n.f4,"/logs"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({follow:!1,cluster_name:s,job_id:t,override_skypilot_config:{active_workspace:c||"default"}})})).body.getReader();for(;;){let{done:s,value:t}=await e.read();if(s)break;let a=new TextDecoder().decode(t);r(a)}}catch(e){console.error("Error in streamClusterJobLogs:",e),(0,a.C)("Error in streamClusterJobLogs: ".concat(e.message),"error")}}async function o(e){let{clusterName:s,workspace:t}=e;try{let e=await fetch("".concat(n.f4,"/queue"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cluster_name:s,all_users:!0,override_skypilot_config:{active_workspace:t}})}),r=e.headers.get("X-Skypilot-Request-ID")||e.headers.get("X-Request-ID"),a=await fetch("".concat(n.f4,"/api/get?request_id=").concat(r)),c=await a.json();return JSON.parse(c.return_value).map(e=>{let t=e.end_at?e.end_at:Date.now()/1e3,r=0,a=0;return e.submitted_at&&(r=t-e.submitted_at),e.start_at&&(a=t-e.start_at),{id:e.job_id,status:e.status,job:e.job_name,user:e.username,gpus:e.accelerators||{},submitted_at:e.submitted_at?new Date(1e3*e.submitted_at):null,resources:e.resources,cluster:s,total_duration:r,job_duration:a,infra:"",logs:""}})}catch(e){return console.error("Error fetching cluster jobs:",e),[]}}function u(e){let{cluster:s,job:t=null}=e,[a,n]=(0,r.useState)(null),[c,i]=(0,r.useState)(null),[u,d]=(0,r.useState)(!0),[m,x]=(0,r.useState)(!0),h=(0,r.useCallback)(async()=>{if(s)try{d(!0);let e=await l({clusterNames:[s]});return n(e[0]),e[0]}catch(e){console.error("Error fetching cluster data:",e)}finally{d(!1)}return null},[s]),f=(0,r.useCallback)(async e=>{if(s)try{x(!0);let t=await o({clusterName:s,workspace:e||"default"});i(t)}catch(e){console.error("Error fetching cluster job data:",e)}finally{x(!1)}},[s]),N=(0,r.useCallback)(async()=>{let e=await h();e&&await f(e.workspace)},[h,f]);return(0,r.useEffect)(()=>{(async()=>{let e=await h();e&&await f(e.workspace)})()},[s,t,h,f]),{clusterData:a,clusterJobData:c,loading:u||m,refreshData:N}}},190:function(e,s,t){"use strict";t.r(s),t.d(s,{JobDetailPage:function(){return b}});var r=t(5893),a=t(7294),n=t(9470),c=t(7673),l=t(1664),i=t.n(l),o=t(1163),u=t(3266),d=t(6989),m=t(3626),x=t(8799),h=t(9307),f=t(3001),N=t(9008),j=t.n(N);function g(e){let{cluster:s,job:t,jobData:a,onRefresh:n,isRefreshing:c,loading:l}=e,o=(0,f.X)();return(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,r.jsxs)("div",{className:"text-base flex items-center",children:[(0,r.jsx)(i(),{href:"/clusters",className:"text-sky-blue hover:underline",children:"Sky Clusters"}),(0,r.jsx)("span",{className:"mx-2 text-gray-500",children:"›"}),(0,r.jsx)(i(),{href:"/clusters/".concat(s),className:"text-sky-blue hover:underline",children:s}),(0,r.jsx)("span",{className:"mx-2 text-gray-500",children:"›"}),(0,r.jsxs)(i(),{href:"/clusters/".concat(s,"/").concat(t),className:"text-sky-blue hover:underline",children:[t,a.job&&"-"!=a.job?" (".concat(a.job,")"):""]})]}),(0,r.jsxs)("div",{className:"flex items-center",children:[(l||c)&&(0,r.jsxs)("div",{className:"flex items-center mr-2",children:[(0,r.jsx)(x.Z,{size:15,className:"mt-0"}),(0,r.jsx)("span",{className:"text-sm ml-2 text-gray-500",children:"Loading..."})]}),(0,r.jsx)(d.WH,{content:"Refresh",className:"text-muted-foreground",children:(0,r.jsxs)("button",{onClick:n,disabled:l||c,className:"text-sm text-sky-blue hover:text-sky-blue-bright font-medium mx-2 flex items-center",children:[(0,r.jsx)(m.Z,{className:"w-4 h-4 mr-1.5"}),!o&&(0,r.jsx)("span",{children:"Refresh"})]})})]})]})}function b(){let e=(0,o.useRouter)(),{cluster:s,job:t}=e.query,{clusterData:l,clusterJobData:f,loading:N,refreshData:b}=(0,u.QL)({cluster:s}),[p,y]=(0,a.useState)(!1),[E,_]=(0,a.useState)(!0),[v,w]=(0,a.useState)(!1),[C,D]=(0,a.useState)([]),[R,S]=(0,a.useState)(!1),T=(0,a.useMemo)(()=>["INIT","PENDING","SETTING_UP"],[]),I=(0,a.useMemo)(()=>{if(!f||!t)return!0;let e=f.find(e=>e.id==t);return e&&T.includes(e.status)},[f,t,T]);a.useEffect(()=>{!N&&E&&_(!1)},[N,E]),(0,a.useEffect)(()=>{let e=!0;return s&&t&&!I?(w(!0),(0,u.Sl)({clusterName:s,jobId:t,onNewLog:s=>{if(e){let e=(0,d.q8)(s);D(s=>[...s,e])}},workspace:null==l?void 0:l.workspace}).then(()=>{e&&w(!1)}).catch(s=>{e&&(console.error("Error streaming logs:",s),w(!1))})):w(!1),()=>{e=!1}},[s,t,R,I,l]);let k=async()=>{y(!0),S(e=>!e),D([]);try{b&&await b()}catch(e){console.error("Error refreshing data:",e)}finally{y(!1)}};if(!e.isReady)return(0,r.jsx)("div",{children:"Loading..."});let L={id:t};if(l&&f){let e=f.find(e=>e.id==t);e&&(L={...e,infra:l.infra,cluster:l.cluster,user:l.user})}let O=s&&t?"Job: ".concat(t," @ ").concat(s," | SkyPilot Dashboard"):"Job Details | SkyPilot Dashboard";return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(j(),{children:(0,r.jsx)("title",{children:O})}),(0,r.jsxs)(n.A,{highlighted:"clusters",children:[(0,r.jsx)(g,{cluster:s,job:t,jobData:L,onRefresh:k,isRefreshing:p,loading:N}),N&&E?(0,r.jsxs)("div",{className:"flex items-center justify-center h-64",children:[(0,r.jsx)(x.Z,{size:24,className:"mr-2"}),(0,r.jsx)("span",{children:"Loading..."})]}):(0,r.jsxs)("div",{className:"space-y-8",children:[(0,r.jsx)("div",{id:"details",children:(0,r.jsxs)(c.Zb,{children:[(0,r.jsx)("div",{className:"flex items-center justify-between px-4 pt-4",children:(0,r.jsx)("h2",{className:"text-lg font-semibold",children:"Details"})}),(0,r.jsx)("div",{className:"p-4",children:(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Job ID"}),(0,r.jsx)("div",{className:"text-base mt-1",children:L.id})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Job Name"}),(0,r.jsx)("div",{className:"text-base mt-1",children:L.job})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Status"}),(0,r.jsx)("div",{className:"text-base mt-1",children:(0,r.jsx)(h.OE,{status:L.status})})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"User"}),(0,r.jsx)("div",{className:"text-base mt-1",children:L.user})]}),L.resources&&(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Requested Resources"}),(0,r.jsx)("div",{className:"text-base mt-1",children:L.resources||"N/A"})]}),L.cluster&&(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Cluster"}),(0,r.jsx)("div",{className:"text-base mt-1",children:(0,r.jsx)(i(),{href:"/clusters/".concat(L.cluster),className:"text-sky-blue hover:underline",children:L.cluster})})]})]})})]})}),(0,r.jsx)("div",{id:"logs",className:"mt-6",children:(0,r.jsxs)(c.Zb,{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-4 pt-4",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("h2",{className:"text-lg font-semibold",children:"Logs"}),(0,r.jsx)("span",{className:"ml-2 text-xs text-gray-500",children:"(Logs are not streaming; click refresh to fetch the latest logs.)"})]}),(0,r.jsx)(d.WH,{content:"Refresh logs",className:"text-muted-foreground",children:(0,r.jsx)("button",{onClick:()=>{S(e=>!e),D([])},disabled:v,className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:(0,r.jsx)(m.Z,{className:"w-4 h-4 ".concat(v?"animate-spin":"")})})})]}),(0,r.jsx)("div",{className:"p-4",children:I?(0,r.jsx)("div",{className:"bg-[#f7f7f7] flex items-center justify-center py-4 text-gray-500",children:(0,r.jsx)("span",{children:"Waiting for the job to start, please refresh after a while"})}):v?(0,r.jsxs)("div",{className:"flex items-center justify-center py-4",children:[(0,r.jsx)(x.Z,{size:20,className:"mr-2"}),(0,r.jsx)("span",{children:"Loading..."})]}):(0,r.jsx)("div",{className:"max-h-96 overflow-y-auto",children:(0,r.jsx)(d.$B,{logs:C.join("")})})})]})})]})]})]})}s.default=b},9008:function(e,s,t){e.exports=t(7219)}},function(e){e.O(0,[573,480,888,774,179],function(){return e(e.s=4966)}),_N_E=e.O()}]);
@@ -1,16 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[722],{8706:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/clusters/[cluster]",function(){return t(6996)}])},6521:function(e,s,t){"use strict";t.d(s,{Z:function(){return a}});/**
2
- * @license lucide-react v0.407.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */let a=(0,t(998).Z)("FileSearch",[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4.268 21a2 2 0 0 0 1.727 1H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"ms7g94"}],["path",{d:"m9 18-1.5-1.5",key:"1j6qii"}],["circle",{cx:"5",cy:"14",r:"3",key:"ufru5t"}]])},3610:function(e,s,t){"use strict";t.d(s,{Z:function(){return a}});/**
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 a=(0,t(998).Z)("MonitorPlay",[["path",{d:"M10 7.75a.75.75 0 0 1 1.142-.638l3.664 2.249a.75.75 0 0 1 0 1.278l-3.664 2.25a.75.75 0 0 1-1.142-.64z",key:"1pctta"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",key:"x3v2xh"}]])},3293:function(e,s,t){"use strict";t.d(s,{Z:function(){return a}});/**
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 a=(0,t(998).Z)("RefreshCcw",[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]])},6996:function(e,s,t){"use strict";t.r(s);var a=t(5893),i=t(7294),l=t(8799),r=t(938),n=t(1163),c=t(9470),d=t(1664),x=t.n(d),h=t(9037),u=t(9307),m=t(7673),o=t(3266),j=t(3626),f=t(6989),v=t(9284),N=t(3001),b=t(9008),y=t.n(b);function p(e){let{clusterData:s,clusterJobData:t,loading:i}=e;return(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"mb-6",children:(0,a.jsxs)(m.Zb,{children:[(0,a.jsx)("div",{className:"flex items-center justify-between px-4 pt-4",children:(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Details"})}),(0,a.jsx)("div",{className:"p-4",children:(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Status"}),(0,a.jsx)("div",{className:"text-base mt-1",children:(0,a.jsx)(u.OE,{status:s.status})})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Cluster"}),(0,a.jsx)("div",{className:"text-base mt-1",children:s.cluster})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"User"}),(0,a.jsx)("div",{className:"text-base mt-1",children:s.user})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Infra"}),(0,a.jsx)("div",{className:"text-base mt-1",children:s.infra?(0,a.jsx)(f.Md,{content:s.full_infra||s.infra,className:"text-sm text-muted-foreground",children:(0,a.jsxs)("span",{children:[(0,a.jsx)(x(),{href:"/infra",className:"text-blue-600 hover:underline",children:s.cloud||s.infra.split("(")[0].trim()}),s.infra.includes("(")&&(0,a.jsx)("span",{children:" "+s.infra.substring(s.infra.indexOf("("))})]})}):"N/A"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Resources"}),(0,a.jsx)("div",{className:"text-base mt-1",children:s.resources_str_full||s.resources_str||"N/A"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Started"}),(0,a.jsx)("div",{className:"text-base mt-1",children:s.time?new Date(s.time).toLocaleString():"N/A"})]})]})})]})}),(0,a.jsx)("div",{children:t&&(0,a.jsx)(r.L4,{clusterName:s.cluster,clusterJobData:t,loading:i})})]})}s.default=function(){let e=(0,n.useRouter)(),{cluster:s}=e.query,[t,r]=(0,i.useState)(!1),[d,u]=(0,i.useState)(!0),[m,b]=(0,i.useState)(!1),[g,k]=(0,i.useState)(!1),_=(0,N.X)(),{clusterData:w,clusterJobData:S,loading:M,refreshData:C}=(0,o.QL)({cluster:s});i.useEffect(()=>{!M&&d&&u(!1)},[M,d]);let Z=async()=>{r(!0),await C(),r(!1)};if(!e.isReady)return(0,a.jsx)("div",{children:"Loading..."});let L=s?"Cluster: ".concat(s," | SkyPilot Dashboard"):"Cluster Details | SkyPilot Dashboard";return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(y(),{children:(0,a.jsx)("title",{children:L})}),(0,a.jsxs)(c.A,{highlighted:"clusters",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,a.jsxs)("div",{className:"text-base flex items-center",children:[(0,a.jsx)(x(),{href:"/clusters",className:"text-sky-blue hover:underline",children:"Sky Clusters"}),(0,a.jsx)("span",{className:"mx-2 text-gray-500",children:"›"}),(0,a.jsx)(x(),{href:"/clusters/".concat(s),className:"text-sky-blue hover:underline",children:s})]}),(0,a.jsx)("div",{className:"text-sm flex items-center",children:(0,a.jsxs)("div",{className:"text-sm flex items-center",children:[(M||t)&&(0,a.jsxs)("div",{className:"flex items-center mr-4",children:[(0,a.jsx)(l.Z,{size:15,className:"mt-0"}),(0,a.jsx)("span",{className:"ml-2 text-gray-500",children:"Loading..."})]}),w&&(0,a.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,a.jsx)(f.WH,{content:"Refresh",className:"text-sm text-muted-foreground",children:(0,a.jsxs)("button",{onClick:Z,disabled:M||t,className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center",children:[(0,a.jsx)(j.Z,{className:"w-4 h-4 mr-1.5"}),!_&&(0,a.jsx)("span",{children:"Refresh"})]})}),(0,a.jsx)(h.GV,{withLabel:!0,cluster:w.cluster,status:w.status,onOpenSSHModal:()=>{b(!0)},onOpenVSCodeModal:()=>{k(!0)}})]})]})})]}),M&&d?(0,a.jsxs)("div",{className:"flex justify-center items-center py-12",children:[(0,a.jsx)(l.Z,{size:24,className:"mr-2"}),(0,a.jsx)("span",{className:"text-gray-500",children:"Loading..."})]}):w?(0,a.jsx)(p,{clusterData:w,clusterJobData:S,loading:M||t}):null,(0,a.jsx)(v.Oh,{isOpen:m,onClose:()=>b(!1),cluster:s}),(0,a.jsx)(v._R,{isOpen:g,onClose:()=>k(!1),cluster:s})]})]})}}},function(e){e.O(0,[573,488,480,734,938,578,888,774,179],function(){return e(e.s=8706)}),_N_E=e.O()}]);