skypilot-nightly 1.0.0.dev20250524__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.
- sky/__init__.py +2 -2
- sky/check.py +32 -6
- sky/cli.py +17 -24
- sky/client/cli.py +17 -24
- sky/client/sdk.py +5 -2
- sky/clouds/cloud.py +2 -2
- sky/clouds/kubernetes.py +10 -5
- sky/clouds/service_catalog/kubernetes_catalog.py +4 -0
- sky/clouds/ssh.py +24 -8
- sky/core.py +20 -2
- sky/dashboard/out/404.html +1 -1
- sky/dashboard/out/_next/static/D5bjIfl4Ob3SV3LJz3CO0/_buildManifest.js +1 -0
- sky/dashboard/out/_next/static/chunks/236-e220ba0c35bf089e.js +6 -0
- sky/dashboard/out/_next/static/chunks/{498-d7722313e5e5b4e6.js → 320-afea3ddcc5bd1c6c.js} +1 -16
- sky/dashboard/out/_next/static/chunks/470-1d784f5c8750744a.js +1 -0
- sky/dashboard/out/_next/static/chunks/578-24f35aa98d38d638.js +6 -0
- sky/dashboard/out/_next/static/chunks/627-31b701e69f52db0c.js +1 -0
- sky/dashboard/out/_next/static/chunks/843-e35d71cf1c7f706e.js +11 -0
- sky/dashboard/out/_next/static/chunks/990-f85643b521f7ca65.js +1 -0
- sky/dashboard/out/_next/static/chunks/pages/_app-3985f074c163a856.js +1 -0
- sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/[job]-339b59921ccfe266.js +1 -0
- sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]-e23fcddf60578a0d.js +1 -0
- sky/dashboard/out/_next/static/chunks/pages/{clusters-9e6d1ec6e1ac5b29.js → clusters-8afda8efa5b74997.js} +1 -1
- sky/dashboard/out/_next/static/chunks/pages/config-72b8c6c2edfd0e39.js +6 -0
- sky/dashboard/out/_next/static/chunks/pages/infra-1521baab6992916b.js +1 -0
- sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-4d913940b4fa6f5a.js +1 -0
- sky/dashboard/out/_next/static/chunks/pages/jobs-ff7e8e377d02b651.js +1 -0
- sky/dashboard/out/_next/static/chunks/pages/users-9900af52acf8648d.js +1 -0
- sky/dashboard/out/_next/static/chunks/pages/workspace/new-63763ffa3edb4508.js +1 -0
- sky/dashboard/out/_next/static/chunks/pages/workspaces/[name]-3ede7a13caf23375.js +1 -0
- sky/dashboard/out/_next/static/chunks/pages/workspaces-72330c4d0fc9a4a2.js +1 -0
- sky/dashboard/out/_next/static/css/6a1c0d711a4bdaf1.css +3 -0
- sky/dashboard/out/clusters/[cluster]/[job].html +1 -1
- sky/dashboard/out/clusters/[cluster].html +1 -1
- sky/dashboard/out/clusters.html +1 -1
- sky/dashboard/out/config.html +1 -0
- sky/dashboard/out/index.html +1 -1
- sky/dashboard/out/infra.html +1 -1
- sky/dashboard/out/jobs/[job].html +1 -1
- sky/dashboard/out/jobs.html +1 -1
- sky/dashboard/out/users.html +1 -1
- sky/dashboard/out/workspace/new.html +1 -0
- sky/dashboard/out/workspaces/[name].html +1 -0
- sky/dashboard/out/workspaces.html +1 -1
- sky/global_user_state.py +592 -552
- sky/server/constants.py +1 -1
- sky/server/requests/payloads.py +33 -3
- sky/server/requests/serializers/decoders.py +0 -11
- sky/server/server.py +23 -22
- sky/setup_files/dependencies.py +1 -0
- sky/skypilot_config.py +35 -9
- sky/utils/db_utils.py +53 -0
- sky/utils/kubernetes/config_map_utils.py +133 -0
- sky/utils/kubernetes/deploy_remote_cluster.py +20 -4
- sky/utils/kubernetes/exec_kubeconfig_converter.py +19 -0
- sky/utils/kubernetes/kubernetes_deploy_utils.py +49 -5
- sky/utils/kubernetes/ssh-tunnel.sh +20 -28
- sky/utils/schemas.py +57 -5
- sky/workspaces/__init__.py +0 -0
- sky/workspaces/core.py +431 -0
- sky/workspaces/server.py +87 -0
- {skypilot_nightly-1.0.0.dev20250524.dist-info → skypilot_nightly-1.0.0.dev20250527.dist-info}/METADATA +2 -1
- {skypilot_nightly-1.0.0.dev20250524.dist-info → skypilot_nightly-1.0.0.dev20250527.dist-info}/RECORD +69 -57
- {skypilot_nightly-1.0.0.dev20250524.dist-info → skypilot_nightly-1.0.0.dev20250527.dist-info}/WHEEL +1 -1
- sky/dashboard/out/_next/static/aHej19bZyl4hoHgrzPCn7/_buildManifest.js +0 -1
- sky/dashboard/out/_next/static/chunks/480-ee58038f1a4afd5c.js +0 -1
- sky/dashboard/out/_next/static/chunks/578-7a4795009a56430c.js +0 -6
- sky/dashboard/out/_next/static/chunks/734-5f5ce8f347b7f417.js +0 -1
- sky/dashboard/out/_next/static/chunks/938-f347f6144075b0c8.js +0 -1
- sky/dashboard/out/_next/static/chunks/pages/_app-dec800f9ef1b10f4.js +0 -1
- sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/[job]-37c042a356f8e608.js +0 -1
- sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]-9529d9e882a0e75c.js +0 -16
- sky/dashboard/out/_next/static/chunks/pages/infra-e690d864aa00e2ea.js +0 -1
- sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-db6558a5ec687011.js +0 -1
- sky/dashboard/out/_next/static/chunks/pages/jobs-73d5e0c369d00346.js +0 -16
- sky/dashboard/out/_next/static/chunks/pages/users-2d319455c3f1c3e2.js +0 -1
- sky/dashboard/out/_next/static/chunks/pages/workspaces-02a7b60f2ead275f.js +0 -1
- sky/dashboard/out/_next/static/css/d2cdba64c9202dd7.css +0 -3
- /sky/dashboard/out/_next/static/{aHej19bZyl4hoHgrzPCn7 → D5bjIfl4Ob3SV3LJz3CO0}/_ssgManifest.js +0 -0
- /sky/dashboard/out/_next/static/chunks/{573-f17bd89d9f9118b3.js → 573-82bd40a37af834f1.js} +0 -0
- {skypilot_nightly-1.0.0.dev20250524.dist-info → skypilot_nightly-1.0.0.dev20250527.dist-info}/entry_points.txt +0 -0
- {skypilot_nightly-1.0.0.dev20250524.dist-info → skypilot_nightly-1.0.0.dev20250527.dist-info}/licenses/LICENSE +0 -0
- {skypilot_nightly-1.0.0.dev20250524.dist-info → skypilot_nightly-1.0.0.dev20250527.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: skypilot-nightly
|
3
|
-
Version: 1.0.0.
|
3
|
+
Version: 1.0.0.dev20250527
|
4
4
|
Summary: SkyPilot: Run AI on Any Infra — Unified, Faster, Cheaper.
|
5
5
|
Author: SkyPilot Team
|
6
6
|
License: Apache 2.0
|
@@ -47,6 +47,7 @@ Requires-Dist: python-multipart
|
|
47
47
|
Requires-Dist: aiofiles
|
48
48
|
Requires-Dist: httpx
|
49
49
|
Requires-Dist: setproctitle
|
50
|
+
Requires-Dist: sqlalchemy
|
50
51
|
Provides-Extra: aws
|
51
52
|
Requires-Dist: awscli>=1.27.10; extra == "aws"
|
52
53
|
Requires-Dist: botocore>=1.29.10; extra == "aws"
|
{skypilot_nightly-1.0.0.dev20250524.dist-info → skypilot_nightly-1.0.0.dev20250527.dist-info}/RECORD
RENAMED
@@ -1,19 +1,19 @@
|
|
1
|
-
sky/__init__.py,sha256=
|
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=
|
5
|
-
sky/cli.py,sha256=
|
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=
|
7
|
+
sky/core.py,sha256=aR9lIsZUkIMfM8HEAx186woTgxwCwuway6r46pi3XUM,52197
|
8
8
|
sky/dag.py,sha256=8x-VMtjvSi0lYBemCMPLYq5ONljhoABjWzMKjmmdjSo,3369
|
9
9
|
sky/exceptions.py,sha256=6TJ1MMw6Y9W94eig22xgun3rzvJCTh4yHNq3mGACX-U,17362
|
10
10
|
sky/execution.py,sha256=YSzpSxoUqLlGZ5v-2pgCt9Jkkcwz12FovOeFs3lC3q8,33109
|
11
|
-
sky/global_user_state.py,sha256=
|
11
|
+
sky/global_user_state.py,sha256=GE2Grs6nJpgOPRy2mrGepnRBYlh0baJnrpwoJ7eDvE4,40726
|
12
12
|
sky/models.py,sha256=bGMSATMkSMr_Kp6SCoiJVVeebwSdZuzjw_jrJzVWAAc,1603
|
13
13
|
sky/optimizer.py,sha256=24hkzaM1W_VRhVkhtWXmUhJDOX55WV9kEF1hAVW_tVg,61426
|
14
14
|
sky/resources.py,sha256=QIUvDeEEcxxAMwl_MnLRP3Y6L0CBczNO4EoDhLcGR5A,92232
|
15
15
|
sky/sky_logging.py,sha256=cMurxhFExKEFX1frcMR71Ti_s9Obg9WY30veVxsZB6o,7285
|
16
|
-
sky/skypilot_config.py,sha256=
|
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=
|
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=
|
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=
|
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=
|
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=
|
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=
|
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,25 +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
|
107
|
-
sky/dashboard/out/clusters.html,sha256=
|
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=
|
110
|
-
sky/dashboard/out/infra.html,sha256=
|
111
|
-
sky/dashboard/out/jobs.html,sha256=
|
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=
|
114
|
-
sky/dashboard/out/workspaces.html,sha256=
|
115
|
-
sky/dashboard/out/_next/static/
|
116
|
-
sky/dashboard/out/_next/static/
|
117
|
-
sky/dashboard/out/_next/static/chunks/
|
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
|
118
121
|
sky/dashboard/out/_next/static/chunks/488-50d843fdb5396d32.js,sha256=0ECQ8dqh-FzJ-NQZ-JV6KsCZqfsenPoxacGpWQlOIzI,8916
|
119
|
-
sky/dashboard/out/_next/static/chunks/
|
120
|
-
sky/dashboard/out/_next/static/chunks/
|
121
|
-
sky/dashboard/out/_next/static/chunks/
|
122
|
-
sky/dashboard/out/_next/static/chunks/
|
122
|
+
sky/dashboard/out/_next/static/chunks/573-82bd40a37af834f1.js,sha256=p1Ce-Z3KwtCegMin6sGzif0oVLCT6uzvnfYhOs30tgg,283993
|
123
|
+
sky/dashboard/out/_next/static/chunks/578-24f35aa98d38d638.js,sha256=sLLMKRpah8ozOKKARGCiha7eBzOiqGUJWATTZnE7ixA,10039
|
124
|
+
sky/dashboard/out/_next/static/chunks/627-31b701e69f52db0c.js,sha256=VoJFK0aaz9rjob7k7uyGA3IwSrgj9smpHG8ix-SLNx4,15862
|
125
|
+
sky/dashboard/out/_next/static/chunks/843-e35d71cf1c7f706e.js,sha256=_bSBgH6ze_YD5snPuV-GK1sxOpN6807TBPgI38NAhY8,15610
|
123
126
|
sky/dashboard/out/_next/static/chunks/937.f97f83652028e944.js,sha256=3G2YlQgxD17Z7GeznWGDwYSKEB8W4FZFfLKEXmtBiWE,54452
|
124
|
-
sky/dashboard/out/_next/static/chunks/
|
127
|
+
sky/dashboard/out/_next/static/chunks/990-f85643b521f7ca65.js,sha256=Jua91QPgAenefuXpvqjPXVPoIjOMSvFALdI9FNON1bg,15358
|
125
128
|
sky/dashboard/out/_next/static/chunks/9f96d65d-5a3e4af68c26849e.js,sha256=wJGR2e5odhfpiO3-Y0iIQVUJ5rBhfM_9tSb5CIDHcaE,134395
|
126
129
|
sky/dashboard/out/_next/static/chunks/fd9d1056-2821b0f0cabcd8bd.js,sha256=ce2WOATL1LdzsWouKQ-1NCiBQJmcykgzqP8wCp1yqbE,172831
|
127
130
|
sky/dashboard/out/_next/static/chunks/framework-87d061ee6ed71b28.js,sha256=dh6TKdXcSRoGP4HqHe2uwzWCZBPz16dyTWufLsxeRvM,140942
|
@@ -129,22 +132,27 @@ sky/dashboard/out/_next/static/chunks/main-app-241eb28595532291.js,sha256=P0_tU7
|
|
129
132
|
sky/dashboard/out/_next/static/chunks/main-e0e2335212e72357.js,sha256=BxTmVbZDnMUQvQd57MEl1Ui0VZaNmwLOviY7h_xMjP0,109884
|
130
133
|
sky/dashboard/out/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js,sha256=6QPOwdWeAVe8x-SsiDrm-Ga6u2DkqgG5SFqglrlyIgA,91381
|
131
134
|
sky/dashboard/out/_next/static/chunks/webpack-deda68c926e8d0bc.js,sha256=e2NBwO2sLf3MuwMPPaYQ5bWK1OwP5mbuzaaLkDLCJJ4,3620
|
132
|
-
sky/dashboard/out/_next/static/chunks/pages/_app-
|
135
|
+
sky/dashboard/out/_next/static/chunks/pages/_app-3985f074c163a856.js,sha256=lqFYBo3gcDUyNT-vVEqyoXJkFmFKu6i4wvssOQiqQhE,2097
|
133
136
|
sky/dashboard/out/_next/static/chunks/pages/_error-1be831200e60c5c0.js,sha256=TZqrus06KKPx-CMABDMPKF7w-NQ5s2gwJAM8Huyl7qU,247
|
134
|
-
sky/dashboard/out/_next/static/chunks/pages/clusters-
|
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
|
135
139
|
sky/dashboard/out/_next/static/chunks/pages/index-6b0d9e5031b70c58.js,sha256=Fp2FKnKQtORK_5O7MEQ08tlTk7ewMLuecw_EY5g4Dlg,513
|
136
|
-
sky/dashboard/out/_next/static/chunks/pages/infra-
|
137
|
-
sky/dashboard/out/_next/static/chunks/pages/jobs-
|
138
|
-
sky/dashboard/out/_next/static/chunks/pages/users-
|
139
|
-
sky/dashboard/out/_next/static/chunks/pages/workspaces-
|
140
|
-
sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]-
|
141
|
-
sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/[job]-
|
142
|
-
sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-
|
143
|
-
sky/dashboard/out/_next/static/
|
144
|
-
sky/dashboard/out/
|
145
|
-
sky/dashboard/out/
|
146
|
-
sky/dashboard/out/
|
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
|
147
153
|
sky/dashboard/out/videos/cursor-small.mp4,sha256=8tRdp1vjawOrXUar1cfjOc-nkaKmcwCPZx_LO0XlCvQ,203285
|
154
|
+
sky/dashboard/out/workspace/new.html,sha256=ltTqf7A_TxiUvH7mtrVEcuzpc9BudNqLW9T9TSFUGVw,11759
|
155
|
+
sky/dashboard/out/workspaces/[name].html,sha256=rE6yeG5GuWmhVqiH4KnHSFthLbjUjdafGB7Kq1Dxkwc,2249
|
148
156
|
sky/data/__init__.py,sha256=Nhaf1NURisXpZuwWANa2IuCyppIuc720FRwqSE2oEwY,184
|
149
157
|
sky/data/data_transfer.py,sha256=N8b0CQebDuHieXjvEVwlYmK6DbQxUGG1RQJEyTbh3dU,12040
|
150
158
|
sky/data/data_utils.py,sha256=CNYPM963qby5ddW0DZNbhiWXkqgB9MHh_jrC5DoBctM,33437
|
@@ -277,8 +285,8 @@ sky/serve/server/server.py,sha256=A9K37a0nQgZeN3eKWv62Oh2C5TSAReTZ9pHmztqlI-c,43
|
|
277
285
|
sky/server/__init__.py,sha256=MPPBqFzXz6Jv5QSk6td_IcvnfXfNErDZVcizu4MLRow,27
|
278
286
|
sky/server/common.py,sha256=JGkAkj1oexseiDRB0F5IvlhFZpmavHrX0Ovdf0rqjtU,30759
|
279
287
|
sky/server/config.py,sha256=XWf5Kw4am6vMO5wcyWevbQAFH-dmKb7AMEgDzD083-M,8538
|
280
|
-
sky/server/constants.py,sha256=
|
281
|
-
sky/server/server.py,sha256=
|
288
|
+
sky/server/constants.py,sha256=hkDwRo3K6xx9TRb7i8zdZMUEue1oP6G6I0B-p9kprbY,1193
|
289
|
+
sky/server/server.py,sha256=n5P-Jb_UUJfSgWMLOn52W_Dl1WMLYQIPEb1hZ9eS_Ac,54403
|
282
290
|
sky/server/stream_utils.py,sha256=4JMHgtoXPpCT8JwtqyUcDQ9IdZFir9om0JaCRr8rvbQ,5849
|
283
291
|
sky/server/uvicorn.py,sha256=4bTlvqQiykYDEIfV6Ta9KXWKZUtSfIrhDeT1F9yQuvs,3323
|
284
292
|
sky/server/html/log.html,sha256=TSGZktua9Ysl_ysg3w60rjxAxhH61AJnsYDHdtqrjmI,6929
|
@@ -286,7 +294,7 @@ sky/server/html/token_page.html,sha256=QuTT0vGswh64uIenfAOIcC8JJrJrfidPTZDd3ryYN
|
|
286
294
|
sky/server/requests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
287
295
|
sky/server/requests/event_loop.py,sha256=OhpPbuce65bbjpGRlcJa78AVnYSm08SzFKt70ypCUuQ,1211
|
288
296
|
sky/server/requests/executor.py,sha256=7WiPNmB8DiJcPZhFtRebUkv1eOKAUSoQFpv_qa8kuGs,23596
|
289
|
-
sky/server/requests/payloads.py,sha256=
|
297
|
+
sky/server/requests/payloads.py,sha256=2XpTAZ2DrujwRHz2I5IOgFuS_508oS_9zs_uazYx_tY,18527
|
290
298
|
sky/server/requests/preconditions.py,sha256=ipxIb_3JXG6S3-ymcOdqQNb7VDvoPqADxu9ZK7-nQWc,7179
|
291
299
|
sky/server/requests/process.py,sha256=uv6JmqdT1vR6S5j3a0CEmxz3fUoKQoZCryQsjZpZE7E,8734
|
292
300
|
sky/server/requests/requests.py,sha256=7WABtaxHOppJT6OgYQl4nkjDu5yPXtk1_VpfqPdeg5k,21923
|
@@ -294,10 +302,10 @@ sky/server/requests/queues/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
|
|
294
302
|
sky/server/requests/queues/local_queue.py,sha256=X6VkBiUmgd_kfqIK1hCtMWG1b8GiZbY70TBiBR6c6GY,416
|
295
303
|
sky/server/requests/queues/mp_queue.py,sha256=jDqP4Jd28U3ibSFyMR1DF9I2OWZrPZqFJrG5S6RFpyw,3403
|
296
304
|
sky/server/requests/serializers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
297
|
-
sky/server/requests/serializers/decoders.py,sha256=
|
305
|
+
sky/server/requests/serializers/decoders.py,sha256=ULHekYJQeFVIFSQ7l30RKB2eJyR-9Z8SdqXjKFvwZ88,6376
|
298
306
|
sky/server/requests/serializers/encoders.py,sha256=4bQV5yTg8RTPT_HkRyQpjaBY_uUvBJ4NH189W0-6Pi0,5578
|
299
307
|
sky/setup_files/MANIFEST.in,sha256=xhxaTVBu63MiTRV52AIlHp6qrg0i301PDIvH0lRw4E0,619
|
300
|
-
sky/setup_files/dependencies.py,sha256=
|
308
|
+
sky/setup_files/dependencies.py,sha256=ly4srNSgqjB9VLxZeu8h6fy_hx99nq7Vd2y0ke7rZhw,6441
|
301
309
|
sky/setup_files/setup.py,sha256=GTXvAi65S4_TSLhQ1GzkmaWf_yzciHiaxMbZumcTtKU,7522
|
302
310
|
sky/skylet/LICENSE,sha256=BnFrJSvUFpMUoH5mOpWnEvaC5R6Uux8W6WXgrte8iYg,12381
|
303
311
|
sky/skylet/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -372,7 +380,7 @@ sky/utils/context_utils.py,sha256=cby-QPmnGObjIE4K7eZ_dkWZdUo7YJUmnJr5oKf_v54,67
|
|
372
380
|
sky/utils/control_master_utils.py,sha256=iD4M0onjYOdZ2RuxjwMBl4KhafHXJzuHjvqlBUnu-VE,1450
|
373
381
|
sky/utils/controller_utils.py,sha256=65cA--9V32HTcNS-gaXZRcLswafS7DlMZ9qSbdTLkF8,53396
|
374
382
|
sky/utils/dag_utils.py,sha256=FjxMaAT6ia4ndVg-ogXgiekLGD1GiPCAdK_c-cjIeuY,7607
|
375
|
-
sky/utils/db_utils.py,sha256=
|
383
|
+
sky/utils/db_utils.py,sha256=WKQvqU-Hw-Htzw4Gxm9IoT-9JMiMtV9pC3uPPXw8ztQ,5580
|
376
384
|
sky/utils/env_options.py,sha256=aaD6GoYK0LaZIqjOEZ-R7eccQuiRriW3EuLWtOI5En8,1578
|
377
385
|
sky/utils/infra_utils.py,sha256=CFDCxFJ0kGc5YkGcuwbPSK_AKxGFRUXMTjbeLUrRf8I,6961
|
378
386
|
sky/utils/kubernetes_enums.py,sha256=imGqHSa8O07zD_6xH1SDMM7dBU5lF5fzFFlQuQy00QM,1384
|
@@ -382,7 +390,7 @@ sky/utils/registry.py,sha256=I08nS0rvCF-xR5GEZoHEVgN1jcOeglz77h7xPpBCIjU,4179
|
|
382
390
|
sky/utils/resources_utils.py,sha256=oxHFiISc0Y68gCGhTw4ep6bJ6Fi21epMyeu3EN20Smc,11673
|
383
391
|
sky/utils/rich_console_utils.py,sha256=wPvAlshaFHuMZSjiDnaK3OSBppZLBjAn-lj7AvxNBQk,553
|
384
392
|
sky/utils/rich_utils.py,sha256=ZTXdFJp--4CJDt2ANQz0VICLPc2V7llgA6LelHdG9Mw,14188
|
385
|
-
sky/utils/schemas.py,sha256=
|
393
|
+
sky/utils/schemas.py,sha256=G9siG8W48YrdJUbmxQOa7vp6b31B_l7HU97bMBVHQog,42073
|
386
394
|
sky/utils/status_lib.py,sha256=zn_MSuRYQdNKF8pnFOGQ54X_s_R7dyqWS6Q3a9zENw8,1512
|
387
395
|
sky/utils/subprocess_utils.py,sha256=NmW22zGe9iXDXQ7XfsP4i5fve8Jq9KKiUwD7qUmw44k,16069
|
388
396
|
sky/utils/timeline.py,sha256=ob6s3bc7nwAuSI76yLKBrSR5bzOHnOhbozz1avwoet4,4070
|
@@ -394,22 +402,26 @@ sky/utils/cli_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
|
|
394
402
|
sky/utils/cli_utils/status_utils.py,sha256=ud-LCNi7GyJlavw7axG6fplcPDwhRWEM2xdQbxL-yp4,15667
|
395
403
|
sky/utils/kubernetes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
396
404
|
sky/utils/kubernetes/cleanup-tunnel.sh,sha256=rXMXuMfyB9bzKjLvXdMCjimDVvdjGPMXuqeo2ZNx9OA,2244
|
405
|
+
sky/utils/kubernetes/config_map_utils.py,sha256=ucdQGp1XHliZxoCFWU8EMJ2NKfUEs7t-ygw-J61It_w,4760
|
397
406
|
sky/utils/kubernetes/create_cluster.sh,sha256=VpFLLLzodeldN9-JKqcjs2LkKksMGlg14Q7qGZ49LQE,7816
|
398
407
|
sky/utils/kubernetes/delete_cluster.sh,sha256=BSccHF43GyepDNf-FZcenzHzpXXATkVD92vgn1lWPgk,927
|
399
|
-
sky/utils/kubernetes/deploy_remote_cluster.py,sha256=
|
400
|
-
sky/utils/kubernetes/exec_kubeconfig_converter.py,sha256=
|
408
|
+
sky/utils/kubernetes/deploy_remote_cluster.py,sha256=lxIiF3SHOp8ulcSbov27nna0i48FvVHzyqk0Wi0Q3D0,60844
|
409
|
+
sky/utils/kubernetes/exec_kubeconfig_converter.py,sha256=_kS-Fo2dpAIlQV1cQGOW6LUb38K-V4Y1uuO38UqfwEY,3480
|
401
410
|
sky/utils/kubernetes/generate_kind_config.py,sha256=_TNLnifA_r7-CRq083IP1xjelYqiLjzQX9ohuqYpDH8,3187
|
402
411
|
sky/utils/kubernetes/generate_kubeconfig.sh,sha256=MBvXJio0PeujZSCXiRKE_pa6HCTiU9qBzR1WrXccVSY,10477
|
403
412
|
sky/utils/kubernetes/gpu_labeler.py,sha256=YAwkytFo2j5GyGyX8RqnUXCMBff00Mdm9G_0mmtNZLo,10345
|
404
413
|
sky/utils/kubernetes/k8s_gpu_labeler_job.yaml,sha256=k0TBoQ4zgf79-sVkixKSGYFHQ7ZWF5gdVIZPupCCo9A,1224
|
405
414
|
sky/utils/kubernetes/k8s_gpu_labeler_setup.yaml,sha256=VLKT2KKimZu1GDg_4AIlIt488oMQvhRZWwsj9vBbPUg,3812
|
406
|
-
sky/utils/kubernetes/kubernetes_deploy_utils.py,sha256=
|
415
|
+
sky/utils/kubernetes/kubernetes_deploy_utils.py,sha256=lF9hMg0TVVX1jE8W1xmzkaz66YOwFJvGNws3ICC2syA,15932
|
407
416
|
sky/utils/kubernetes/rsync_helper.sh,sha256=MT29sI5iD2QxYlXFwrN16oq0Er4TPFQVs4Z4A3U4a7Q,2483
|
408
|
-
sky/utils/kubernetes/ssh-tunnel.sh,sha256=
|
417
|
+
sky/utils/kubernetes/ssh-tunnel.sh,sha256=60eHKF7phJe9pFEkGlqdwWzI80tpog8QCkL7fAbIAic,12143
|
409
418
|
sky/utils/kubernetes/ssh_jump_lifecycle_manager.py,sha256=Kq1MDygF2IxFmu9FXpCxqucXLmeUrvs6OtRij6XTQbo,6554
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
skypilot_nightly-1.0.0.
|
414
|
-
skypilot_nightly-1.0.0.
|
415
|
-
skypilot_nightly-1.0.0.
|
419
|
+
sky/workspaces/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
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 +0,0 @@
|
|
1
|
-
self.__BUILD_MANIFEST=function(s,c,e,t,a,r){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/":["static/chunks/pages/index-6b0d9e5031b70c58.js"],"/_error":["static/chunks/pages/_error-1be831200e60c5c0.js"],"/clusters":[s,e,c,t,r,"static/chunks/pages/clusters-9e6d1ec6e1ac5b29.js"],"/clusters/[cluster]":[s,e,c,t,a,r,"static/chunks/pages/clusters/[cluster]-9529d9e882a0e75c.js"],"/clusters/[cluster]/[job]":[s,c,"static/chunks/pages/clusters/[cluster]/[job]-37c042a356f8e608.js"],"/infra":[s,c,"static/chunks/pages/infra-e690d864aa00e2ea.js"],"/jobs":[s,e,c,t,a,"static/chunks/pages/jobs-73d5e0c369d00346.js"],"/jobs/[job]":[s,c,"static/chunks/pages/jobs/[job]-db6558a5ec687011.js"],"/users":[s,c,"static/chunks/pages/users-2d319455c3f1c3e2.js"],"/workspaces":["static/chunks/9f96d65d-5a3e4af68c26849e.js",s,e,"static/chunks/498-d7722313e5e5b4e6.js",c,t,a,"static/chunks/pages/workspaces-02a7b60f2ead275f.js"],sortedPages:["/","/_app","/_error","/clusters","/clusters/[cluster]","/clusters/[cluster]/[job]","/infra","/jobs","/jobs/[job]","/users","/workspaces"]}}("static/chunks/573-f17bd89d9f9118b3.js","static/chunks/480-ee58038f1a4afd5c.js","static/chunks/488-50d843fdb5396d32.js","static/chunks/734-5f5ce8f347b7f417.js","static/chunks/938-f347f6144075b0c8.js","static/chunks/578-7a4795009a56430c.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[480],{3850:function(e,t,n){n.d(t,{E9:function(){return w},J$:function(){return c},PC:function(){return f},Ps:function(){return a},QT:function(){return h},Vp:function(){return x},W2:function(){return i},Ye:function(){return d},aD:function(){return j},fp:function(){return u},fy:function(){return p},h0:function(){return m},lM:function(){return y},mU:function(){return g},oy:function(){return v}});var r=n(5893);n(7294);var s=n(8507),o=n(8586),l=n(9611);function a(e){return(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"0",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"})})}function i(e){return(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("circle",{cx:"10",cy:"10",r:"8"})})}function c(e){return(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("circle",{cx:"10",cy:"10",r:"8"})})}function d(e){return(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("path",{d:"M6 12l4 4 8-8"})})}function u(e){return(0,r.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"0",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("rect",{x:"6",y:"5",width:"4",height:"14",rx:"1"}),(0,r.jsx)("rect",{x:"14",y:"5",width:"4",height:"14",rx:"1"})]})}function h(e){return(0,r.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2"}),(0,r.jsx)("rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2"}),(0,r.jsx)("line",{x1:"6",x2:"6.01",y1:"6",y2:"6"}),(0,r.jsx)("line",{x1:"6",x2:"6.01",y1:"18",y2:"18"})]})}function x(e){return(0,r.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"}),(0,r.jsx)("rect",{width:"20",height:"14",x:"2",y:"6",rx:"2"})]})}function f(e){return(0,r.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",ry:"2"}),(0,r.jsx)("rect",{x:"9",y:"9",width:"6",height:"6"}),(0,r.jsx)("line",{x1:"9",y1:"1",x2:"9",y2:"4"}),(0,r.jsx)("line",{x1:"15",y1:"1",x2:"15",y2:"4"}),(0,r.jsx)("line",{x1:"9",y1:"20",x2:"9",y2:"23"}),(0,r.jsx)("line",{x1:"15",y1:"20",x2:"15",y2:"23"}),(0,r.jsx)("line",{x1:"20",y1:"9",x2:"23",y2:"9"}),(0,r.jsx)("line",{x1:"20",y1:"14",x2:"23",y2:"14"}),(0,r.jsx)("line",{x1:"1",y1:"9",x2:"4",y2:"9"}),(0,r.jsx)("line",{x1:"1",y1:"14",x2:"4",y2:"14"})]})}function m(e){return(0,r.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),(0,r.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,r.jsx)("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})}function p(e){return(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",children:(0,r.jsx)("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"})})}function g(e){return(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",children:(0,r.jsx)("path",{transform:"scale(0.85) translate(1.8, 1.8)",d:"M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z"})})}function w(e){return(0,r.jsx)("svg",{...e,stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsxs)("g",{children:[(0,r.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,r.jsx)("path",{d:"M3 18.5V5a3 3 0 0 1 3-3h14a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5A3.5 3.5 0 0 1 3 18.5zM19 20v-3H6.5a1.5 1.5 0 0 0 0 3H19zM10 4H6a1 1 0 0 0-1 1v10.337A3.486 3.486 0 0 1 6.5 15H19V4h-2v8l-3.5-2-3.5 2V4z"})]})})}let j=s.Z,v=o.Z;function y(e){return(0,r.jsx)(l.Z,{...e})}},9470:function(e,t,n){n.d(t,{A:function(){return w}});var r=n(5893),s=n(7294),o=n(5675),l=n.n(o),a=n(1163),i=n(1664),c=n.n(i),d=n(3850),u=n(3225),h=n(6989),x=n(3001);let f=(0,s.createContext)(null);function m(e){let{children:t}=e,[n,o]=(0,s.useState)(!0);return(0,r.jsx)(f.Provider,{value:{isSidebarOpen:n,toggleSidebar:()=>{o(e=>!e)}},children:t})}function p(){let e,t;let n=(0,a.useRouter)(),o=(0,x.X)(),[i,f]=(0,s.useState)(null),[m,p]=(0,s.useState)(!1),g=(0,s.useRef)(null);(0,s.useEffect)(()=>{fetch("".concat(u.f4,"/api/health")).then(e=>e.json()).then(e=>{e.user&&e.user.name&&f(e.user.name)}).catch(e=>{console.error("Error fetching user data:",e)})},[]),(0,s.useEffect)(()=>{function e(e){g.current&&!g.current.contains(e.target)&&p(!1)}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[g]);let w=e=>n.pathname.startsWith(e),j=e=>{let t=w(e);return"inline-flex items-center border-b-2 ".concat(t?"border-transparent text-blue-600":"border-transparent hover:text-blue-600"," ").concat(o?"px-2 py-1":"px-1 pt-1 space-x-2")};return(0,r.jsx)("div",{className:"fixed top-0 left-0 right-0 bg-white z-30 h-14 px-4 border-b border-gray-200 shadow-sm",children:(0,r.jsxs)("div",{className:"flex items-center h-full",children:[(0,r.jsx)("div",{className:"flex items-center ".concat(o?"space-x-2 mr-2":"space-x-4 mr-6"),children:(0,r.jsx)(c(),{href:"/",className:"flex items-center px-1 pt-1 h-full",prefetch:!1,children:(0,r.jsx)("div",{className:"h-20 w-20 flex items-center justify-center",children:(0,r.jsx)(l(),{src:"".concat(u.GW,"/skypilot.svg"),alt:"SkyPilot Logo",width:80,height:80,priority:!0,className:"w-full h-full object-contain"})})})}),(0,r.jsxs)("div",{className:"flex items-center ".concat(o?"space-x-1":"space-x-2 md:space-x-4"," ").concat(o?"mr-2":"mr-6"),children:[(0,r.jsxs)(c(),{href:"/clusters",className:j("/clusters"),prefetch:!1,children:[(0,r.jsx)(d.QT,{className:"w-4 h-4"}),!o&&(0,r.jsx)("span",{children:"Clusters"})]}),(0,r.jsxs)(c(),{href:"/jobs",className:j("/jobs"),prefetch:!1,children:[(0,r.jsx)(d.Vp,{className:"w-4 h-4"}),!o&&(0,r.jsx)("span",{children:"Jobs"})]}),(0,r.jsx)("div",{className:"border-l border-gray-200 h-6 mx-1"}),(0,r.jsxs)(c(),{href:"/infra",className:j("/infra"),prefetch:!1,children:[(0,r.jsx)(d.PC,{className:"w-4 h-4"}),!o&&(0,r.jsx)("span",{children:"Infra"})]}),(0,r.jsxs)(c(),{href:"/workspaces",className:j("/workspaces"),prefetch:!1,children:[(0,r.jsx)(d.E9,{className:"w-4 h-4"}),!o&&(0,r.jsx)("span",{children:"Workspaces"})]}),(0,r.jsxs)(c(),{href:"/users",className:j("/users"),prefetch:!1,children:[(0,r.jsx)(d.oy,{className:"w-4 h-4"}),!o&&(0,r.jsx)("span",{children:"Users"})]})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-1 ".concat(o?"ml-0":"ml-auto"),children:[(0,r.jsx)(h.WH,{content:"Documentation",className:"text-sm text-muted-foreground",children:(0,r.jsxs)("a",{href:"https://skypilot.readthedocs.io/en/latest/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center px-2 py-1 text-gray-600 hover:text-blue-600 transition-colors duration-150 cursor-pointer",title:"Docs",children:[!o&&(0,r.jsx)("span",{className:"mr-1",children:"Docs"}),(0,r.jsx)(d.h0,{className:"".concat(o?"w-4 h-4":"w-3.5 h-3.5")})]})}),(0,r.jsx)("div",{className:"border-l border-gray-200 h-6 mx-1"}),(0,r.jsx)(h.WH,{content:"GitHub Repository",className:"text-sm text-muted-foreground",children:(0,r.jsx)("a",{href:"https://github.com/skypilot-org/skypilot",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center p-2 rounded-full text-gray-600 hover:bg-gray-100 transition-colors duration-150 cursor-pointer",title:"GitHub",children:(0,r.jsx)(d.fy,{className:"".concat(o?"w-4 h-4":"w-5 h-5")})})}),(0,r.jsx)(h.WH,{content:"Join Slack",className:"text-sm text-muted-foreground",children:(0,r.jsx)("a",{href:"https://slack.skypilot.co/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center p-2 rounded-full text-gray-600 hover:bg-gray-100 transition-colors duration-150 cursor-pointer",title:"Slack",children:(0,r.jsx)(d.mU,{className:"".concat(o?"w-4 h-4":"w-5 h-5")})})}),(0,r.jsx)(h.WH,{content:"Leave Feedback",className:"text-sm text-muted-foreground",children:(0,r.jsx)("a",{href:"https://github.com/skypilot-org/skypilot/issues/new",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center p-2 rounded-full text-gray-600 hover:bg-gray-100 transition-colors duration-150 cursor-pointer",title:"Leave Feedback",children:(0,r.jsx)(d.aD,{className:"".concat(o?"w-4 h-4":"w-5 h-5")})})})]}),i&&(0,r.jsxs)("div",{className:"relative ml-2",ref:g,children:[(0,r.jsx)("button",{onClick:()=>p(!m),className:"inline-flex items-center justify-center p-2 rounded-full text-gray-600 hover:bg-gray-100 transition-colors duration-150 cursor-pointer",title:"User Profile",children:(0,r.jsx)(d.lM,{className:"".concat(o?"w-5 h-5":"w-6 h-6")})}),m&&(0,r.jsxs)("div",{className:"absolute right-0 mt-2 w-48 bg-white rounded-md shadow-lg z-50 border border-gray-200",children:[(e=i,t=null,i&&i.includes("@")&&(e=i.split("@")[0],t=i),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"px-4 pt-2 pb-1 text-sm font-medium text-gray-900",children:e}),t&&(0,r.jsx)("div",{className:"px-4 pt-0 pb-2 text-xs text-gray-500",children:t})]})),(0,r.jsx)("div",{className:"border-t border-gray-200 mx-1 my-1"}),(0,r.jsx)(c(),{href:"/users",className:"block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 hover:text-blue-600",onClick:()=>p(!1),prefetch:!1,children:"See all users"})]})]})]})})}function g(e){let{children:t,highlighted:n}=e;return(0,x.X)(),(0,r.jsxs)("div",{className:"min-h-screen bg-gray-50",children:[(0,r.jsx)("div",{className:"fixed top-0 left-0 right-0 z-50 shadow-sm",children:(0,r.jsx)(p,{})}),(0,r.jsx)("div",{className:"transition-all duration-200 ease-in-out min-h-screen",style:{paddingTop:"56px"},children:(0,r.jsx)("main",{className:"p-6",children:t})})]})}function w(e){return(0,r.jsx)(m,{children:(0,r.jsx)(g,{...e})})}},8950:function(e,t,n){n.d(t,{Bw:function(){return m},Ph:function(){return d},Ql:function(){return p},i4:function(){return h},ki:function(){return u}});var r=n(5893),s=n(7294),o=n(2067),l=n(5895),a=n(7242),i=n(282),c=n(2350);let d=o.fC;o.ZA;let u=o.B4,h=s.forwardRef((e,t)=>{let{className:n,children:s,...a}=e;return(0,r.jsxs)(o.xz,{ref:t,className:(0,c.cn)("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",n),...a,children:[s,(0,r.jsx)(o.JO,{asChild:!0,children:(0,r.jsx)(l.Z,{className:"h-4 w-4 opacity-50"})})]})});h.displayName=o.xz.displayName;let x=s.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,r.jsx)(o.u_,{ref:t,className:(0,c.cn)("flex cursor-default items-center justify-center py-1",n),...s,children:(0,r.jsx)(a.Z,{className:"h-4 w-4"})})});x.displayName=o.u_.displayName;let f=s.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,r.jsx)(o.$G,{ref:t,className:(0,c.cn)("flex cursor-default items-center justify-center py-1",n),...s,children:(0,r.jsx)(l.Z,{className:"h-4 w-4"})})});f.displayName=o.$G.displayName;let m=s.forwardRef((e,t)=>{let{className:n,children:s,position:l="popper",...a}=e;return(0,r.jsx)(o.h_,{children:(0,r.jsxs)(o.VY,{ref:t,className:(0,c.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===l&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n),position:l,...a,children:[(0,r.jsx)(x,{}),(0,r.jsx)(o.l_,{className:(0,c.cn)("p-1","popper"===l&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:s}),(0,r.jsx)(f,{})]})})});m.displayName=o.VY.displayName,s.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,r.jsx)(o.__,{ref:t,className:(0,c.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",n),...s})}).displayName=o.__.displayName;let p=s.forwardRef((e,t)=>{let{className:n,children:s,...l}=e;return(0,r.jsxs)(o.ck,{ref:t,className:(0,c.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n),...l,children:[(0,r.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,r.jsx)(o.wU,{children:(0,r.jsx)(i.Z,{className:"h-4 w-4"})})}),(0,r.jsx)(o.eT,{children:s})]})});p.displayName=o.ck.displayName,s.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,r.jsx)(o.Z0,{ref:t,className:(0,c.cn)("-mx-1 my-1 h-px bg-muted",n),...s})}).displayName=o.Z0.displayName},6989:function(e,t,n){n.d(t,{$B:function(){return g},GV:function(){return d},LU:function(){return m},Md:function(){return f},WH:function(){return x},q8:function(){return p},yc:function(){return i}});var r=n(5893),s=n(7294),o=n(3302),l=n(1886),a=n(8950);let i=3e4;function c(e){return e.charAt(0).toUpperCase()+e.slice(1)}function d(e){if(!e)return"N/A";let t=new Date;return 7>Math.abs((t-e)/864e5)?(0,r.jsx)(x,{content:u(e),className:"capitalize text-sm text-muted-foreground",children:c((0,l.B)(e,t,{addSuffix:!0}))}):(0,r.jsx)(x,{content:c(u(e)),className:"text-sm text-muted-foreground",children:c(e.toLocaleString("en-CA",{year:"numeric",month:"2-digit",day:"2-digit"}).replace(",",""))})}function u(e){return e.toLocaleString("en-CA",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1,timeZoneName:"short"}).replace(",","")}let h={placement:"bottom",color:"default"},x=e=>{let{children:t,...n}=e,s=n.content;return n.content=void 0,(0,r.jsx)(o.e,{...h,...n,content:(0,r.jsx)("span",{className:"left-full w-max px-2 py-1 text-sm text-gray-100 bg-gray-500 text-sm capitalize rounded",children:s}),children:t})},f=e=>{let{children:t,...n}=e,s=n.content;return n.content=void 0,(0,r.jsx)(o.e,{...h,...n,content:(0,r.jsx)("span",{className:"left-full w-max px-2 py-1 text-sm text-gray-100 bg-gray-500 text-sm rounded",children:s}),children:t})};function m(e){if(!e&&0!==e)return"-";let t=e=Math.floor(e),n="",r=0;for(let e of[{value:86400,label:"d"},{value:3600,label:"h"},{value:60,label:"m"},{value:1,label:"s"}])if(t>=e.value&&r<2){let s=Math.floor(t/e.value);n+="".concat(s).concat(e.label," "),t%=e.value,r++}return n.trim()||"0s"}function p(e){return e?(e=e.split("\n").filter(e=>!e.match(/<rich_.*?\[bold cyan\]/)&&!e.match(/<rich_.*>.*<\/rich_.*>/)&&!e.match(/├──/)&&!e.match(/└──/)).join("\n").replace(/\x1b\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGKH]/g,"")).split("\n").map(e=>{let t=e.match(/^([IWED])\s+(\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2})\s+([^:]+:\d+\])(.*)/);if(t){let[e,n,r,s,o]=t,l={I:"INFO",W:"WARNING",E:"ERROR",D:"DEBUG"}[n]||"";return'<span class="log-line '.concat(l,'"><span class="level">').concat(n,'</span><span class="timestamp">').concat(r,'</span><span class="location">').concat(s,'</span><span class="message">').concat(o,"</span></span>")}let n=e.match(/^(\([^)]+\))(.*)$/);if(n){let[e,t,r]=n;return'<span class="log-line"><span class="log-prefix">'.concat(t,'</span><span class="log-rest">').concat(r,"</span></span>")}return'<span class="log-line"><span class="message">'.concat(e,"</span></span>")}).join("\n"):""}function g(e){let{logs:t,controller:n=!1}=e,[o,l]=(0,s.useState)("all"),[i,c]=(0,s.useState)(t),[d,u]=(0,s.useState)([]);return(0,s.useEffect)(()=>{u(function(e){let t;let n=/\((head|worker\d+),/g,r=new Set;for(;null!==(t=n.exec(e));)r.add(t[1]);return Array.from(r).sort((e,t)=>"head"===e?-1:"head"===t?1:e.localeCompare(t,void 0,{numeric:!0,sensitivity:"base"}))}(t))},[t]),(0,s.useEffect)(()=>{"all"===o?c(t):c(t.split("\n").filter(e=>e.includes("(".concat(o,","))).join("\n"))},[o,t]),(0,r.jsxs)("div",{children:[(0,r.jsx)("style",{children:'\n .logs-container {\n background-color: #f7f7f7;\n padding: 16px;\n max-height: calc(100vh - 300px);\n overflow-y: auto;\n overflow-x: hidden;\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;\n line-height: 1.5;\n border-radius: 6px;\n min-height: fit-content;\n }\n\n .log-line {\n display: block;\n white-space: pre-wrap;\n margin: 2px 0;\n }\n\n .log-line .level {\n display: inline;\n width: 1ch;\n margin-right: 1ch;\n font-weight: bold;\n }\n\n .log-line.INFO .level {\n color: #2563eb;\n }\n\n .log-line.WARNING .level {\n color: #d97706;\n }\n\n .log-line.ERROR .level {\n color: #dc2626;\n }\n\n .log-line.DEBUG .level {\n color: #6b7280;\n }\n\n .log-line .timestamp {\n color: #059669;\n margin-right: 1ch;\n white-space: nowrap;\n }\n\n .log-line .location {\n color: #6366f1;\n margin-right: 1ch;\n white-space: nowrap;\n }\n\n .log-line .message {\n color: #111827;\n word-break: break-word;\n white-space: pre-wrap;\n }\n\n .log-line .log-prefix {\n color: #6366f1;\n font-weight: 500;\n }\n\n .log-line .log-rest {\n color: #111827;\n word-break: break-word;\n white-space: pre-wrap;\n }\n'}),!n&&(0,r.jsx)("div",{style:{marginBottom:"1rem"},children:(0,r.jsxs)(a.Ph,{onValueChange:e=>l(e),value:o,children:[(0,r.jsx)(a.i4,{"aria-label":"Node",className:"focus:ring-0 focus:ring-offset-0",children:(0,r.jsx)(a.ki,{placeholder:"Select Node"})}),(0,r.jsxs)(a.Bw,{children:[(0,r.jsx)(a.Ql,{value:"all",children:"All Nodes"}),d.map(e=>(0,r.jsx)(a.Ql,{value:e,children:e},e))]})]})}),(0,r.jsx)("div",{className:"logs-container",dangerouslySetInnerHTML:{__html:p(i)}})]})}},5821:function(e,t,n){n.d(t,{C:function(){return r}});function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5e3,r=document.getElementById("toast-container");r||((r=document.createElement("div")).id="toast-container",r.className="fixed top-0 right-0 p-4 z-[9999] flex flex-col items-end space-y-2",document.body.appendChild(r));let s=document.createElement("div");switch(s.className="rounded-md border-l-4 p-4 shadow-md flex items-center justify-between max-w-md w-full mb-2 pointer-events-auto",t){case"success":s.className+=" bg-green-100 border-green-500 text-green-800";break;case"error":s.className+=" bg-red-100 border-red-500 text-red-800";break;case"warning":s.className+=" bg-yellow-100 border-yellow-500 text-yellow-800";break;default:s.className+=" bg-blue-100 border-blue-500 text-blue-800"}return s.innerHTML='\n <div class="flex-1 mr-2">\n <p class="text-sm font-medium">'.concat(e,'</p>\n </div>\n <button class="text-gray-500 hover:text-gray-700 focus:outline-none" aria-label="Close toast">\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <line x1="18" y1="6" x2="6" y2="18"></line>\n <line x1="6" y1="6" x2="18" y2="18"></line>\n </svg>\n </button>\n '),r.appendChild(s),s.querySelector("button").addEventListener("click",()=>{r.removeChild(s)}),setTimeout(()=>{r.contains(s)&&r.removeChild(s)},n),s}},3001:function(e,t,n){n.d(t,{X:function(){return s}});var r=n(7294);function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:768,[t,n]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let t=()=>{n(window.innerWidth<e)};return t(),window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[e]),t}},2350:function(e,t,n){n.d(t,{cn:function(){return o}});var r=n(512),s=n(8388);function o(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,s.m6)((0,r.W)(t))}}}]);
|
@@ -1,6 +0,0 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[578],{9037:function(e,s,t){"use strict";t.d(s,{Cc:function(){return C},GV:function(){return z}});var n=t(5893),r=t(7294),l=t(8799),a=t(6989),c=t(1664),i=t.n(c),o=t(803),d=t(7673),h=t(8764),x=t(3266),u=t(7324),j=t(4545),p=t(3626),m=t(998);/**
|
2
|
-
* @license lucide-react v0.407.0 - ISC
|
3
|
-
*
|
4
|
-
* This source code is licensed under the ISC license.
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
6
|
-
*/let f=(0,m.Z)("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]),w=(0,m.Z)("SquareCode",[["path",{d:"M10 9.5 8 12l2 2.5",key:"3mjy60"}],["path",{d:"m14 9.5 2 2.5-2 2.5",key:"1bir2l"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);var k=t(9470),g=t(9284),N=t(9307),v=t(3001),y=t(8950);let b="__ALL_WORKSPACES__";function C(){let[e,s]=(0,r.useState)(!1),t=r.useRef(null),[c,d]=(0,r.useState)(!1),[h,j]=(0,r.useState)(!1),[m,f]=(0,r.useState)(null),[w,N]=(0,r.useState)(b),[C,_]=(0,r.useState)([]),M=(0,v.X)();return(0,r.useEffect)(()=>{(async()=>{try{let e=await (0,u.f)(),s=Object.keys(e),t=await (0,x.zd)(),n=[...new Set(t.map(e=>e.workspace||"default").filter(e=>e))],r=new Set(s);n.includes("default")&&r.has("default"),n.forEach(e=>r.add(e)),_(Array.from(r).sort())}catch(e){console.error("Error fetching data for workspace filter:",e),_(["default"])}})()},[]),(0,n.jsxs)(k.A,{highlighted:"clusters",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,n.jsxs)("div",{className:"text-base flex items-center",children:[(0,n.jsx)(i(),{href:"/clusters",className:"text-sky-blue hover:underline leading-none",children:"Sky Clusters"}),(0,n.jsxs)(y.Ph,{value:w,onValueChange:N,children:[(0,n.jsx)(y.i4,{className:"h-8 w-48 ml-4 mr-2 text-sm border-none focus:ring-0 focus:outline-none",children:(0,n.jsx)(y.ki,{placeholder:"Filter by workspace...",children:w===b?"All Workspaces":w})}),(0,n.jsxs)(y.Bw,{children:[(0,n.jsx)(y.Ql,{value:b,children:"All Workspaces"}),C.map(e=>(0,n.jsx)(y.Ql,{value:e,children:e},e))]})]})]}),(0,n.jsxs)("div",{className:"flex items-center",children:[e&&(0,n.jsxs)("div",{className:"flex items-center mr-2",children:[(0,n.jsx)(l.Z,{size:15,className:"mt-0"}),(0,n.jsx)("span",{className:"ml-2 text-gray-500",children:"Loading..."})]}),(0,n.jsxs)(o.z,{variant:"ghost",onClick:()=>{t.current&&t.current()},disabled:e,className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:[(0,n.jsx)(p.Z,{className:"h-4 w-4 mr-1.5"}),!M&&(0,n.jsx)("span",{children:"Refresh"})]})]})]}),(0,n.jsx)(S,{refreshInterval:a.yc,setLoading:s,refreshDataRef:t,workspaceFilter:w,onOpenSSHModal:e=>{f(e),d(!0)},onOpenVSCodeModal:e=>{f(e),j(!0)}}),(0,n.jsx)(g.Oh,{isOpen:c,onClose:()=>d(!1),cluster:m}),(0,n.jsx)(g._R,{isOpen:h,onClose:()=>j(!1),cluster:m})]})}function S(e){let{refreshInterval:s,setLoading:t,refreshDataRef:c,workspaceFilter:u,onOpenSSHModal:p,onOpenVSCodeModal:m}=e,[f,w]=(0,r.useState)([]),[k,g]=(0,r.useState)({key:null,direction:"ascending"}),[v,y]=(0,r.useState)(!1),[C,S]=(0,r.useState)(!0),[_,M]=(0,r.useState)(1),[L,O]=(0,r.useState)(10),V=r.useCallback(async()=>{t(!0),y(!0),w(await (0,x.zd)()),t(!1),y(!1),S(!1)},[t]),E=r.useMemo(()=>{let e=f;return u&&u!==b&&(e=f.filter(e=>(e.workspace||"default").toLowerCase()===u.toLowerCase())),(0,j.R0)(e,k.key,k.direction)},[f,k,u]);r.useEffect(()=>{c&&(c.current=V)},[c,V]),(0,r.useEffect)(()=>{w([]);let e=!0;V();let t=setInterval(()=>{e&&V()},s);return()=>{e=!1,clearInterval(t)}},[s,V]),(0,r.useEffect)(()=>{M(1)},[f.length]);let R=e=>{let s="ascending";k.key===e&&"ascending"===k.direction&&(s="descending"),g({key:e,direction:s})},W=e=>k.key===e?"ascending"===k.direction?" ↑":" ↓":"",A=Math.ceil(E.length/L),I=(_-1)*L,Z=I+L,H=E.slice(I,Z);return(0,n.jsxs)("div",{children:[(0,n.jsx)(d.Zb,{children:(0,n.jsxs)(h.iA,{children:[(0,n.jsx)(h.xD,{children:(0,n.jsxs)(h.SC,{children:[(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>R("status"),children:["Status",W("status")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>R("cluster"),children:["Cluster",W("cluster")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>R("user"),children:["User",W("user")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>R("workspace"),children:["Workspace",W("workspace")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>R("infra"),children:["Infra",W("infra")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>R("resources_str"),children:["Resources",W("resources_str")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>R("time"),children:["Started",W("time")]}),(0,n.jsx)(h.ss,{children:"Actions"})]})}),(0,n.jsx)(h.RM,{children:v&&C?(0,n.jsx)(h.SC,{children:(0,n.jsx)(h.pj,{colSpan:8,className:"text-center py-6 text-gray-500",children:(0,n.jsxs)("div",{className:"flex justify-center items-center",children:[(0,n.jsx)(l.Z,{size:20,className:"mr-2"}),(0,n.jsx)("span",{children:"Loading..."})]})})}):H.length>0?H.map((e,s)=>(0,n.jsxs)(h.SC,{children:[(0,n.jsx)(h.pj,{children:(0,n.jsx)(N.OE,{status:e.status})}),(0,n.jsx)(h.pj,{children:(0,n.jsx)(i(),{href:"/clusters/".concat(e.cluster),className:"text-blue-600",children:e.cluster})}),(0,n.jsx)(h.pj,{children:e.user}),(0,n.jsx)(h.pj,{children:(0,n.jsx)(i(),{href:"/workspaces",className:"text-blue-600 hover:underline",children:e.workspace||"default"})}),(0,n.jsx)(h.pj,{children:(0,n.jsx)(a.Md,{content:e.full_infra||e.infra,className:"text-sm text-muted-foreground",children:(0,n.jsxs)("span",{children:[(0,n.jsx)(i(),{href:"/infra",className:"text-blue-600 hover:underline",children:e.cloud}),e.infra.includes("(")&&(0,n.jsx)("span",{children:" "+e.infra.substring(e.infra.indexOf("("))})]})})}),(0,n.jsx)(h.pj,{children:(0,n.jsx)(a.Md,{content:e.resources_str_full||e.resources_str,className:"text-sm text-muted-foreground",children:(0,n.jsx)("span",{children:e.resources_str})})}),(0,n.jsx)(h.pj,{children:(0,a.GV)(e.time)}),(0,n.jsx)(h.pj,{className:"text-left",children:(0,n.jsx)(z,{cluster:e.cluster,status:e.status,onOpenSSHModal:p,onOpenVSCodeModal:m})})]},s)):(0,n.jsx)(h.SC,{children:(0,n.jsx)(h.pj,{colSpan:8,className:"text-center py-6 text-gray-500",children:"No active clusters"})})})]})}),f.length>0&&(0,n.jsx)("div",{className:"flex justify-end items-center py-2 px-4 text-sm text-gray-700",children:(0,n.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("span",{className:"mr-2",children:"Rows per page:"}),(0,n.jsxs)("div",{className:"relative inline-block",children:[(0,n.jsxs)("select",{value:L,onChange:e=>{O(parseInt(e.target.value,10)),M(1)},className:"py-1 pl-2 pr-6 appearance-none outline-none cursor-pointer border-none bg-transparent",style:{minWidth:"40px"},children:[(0,n.jsx)("option",{value:10,children:"10"}),(0,n.jsx)("option",{value:30,children:"30"}),(0,n.jsx)("option",{value:50,children:"50"}),(0,n.jsx)("option",{value:100,children:"100"}),(0,n.jsx)("option",{value:200,children:"200"})]}),(0,n.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,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),(0,n.jsxs)("div",{children:[I+1," – ",Math.min(Z,f.length)," of"," ",f.length]}),(0,n.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,n.jsx)(o.z,{variant:"ghost",size:"icon",onClick:()=>{M(e=>Math.max(e-1,1))},disabled:1===_,className:"text-gray-500 h-8 w-8 p-0",children:(0,n.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,n.jsx)("path",{d:"M15 18l-6-6 6-6"})})}),(0,n.jsx)(o.z,{variant:"ghost",size:"icon",onClick:()=>{M(e=>Math.min(e+1,A))},disabled:_===A||0===A,className:"text-gray-500 h-8 w-8 p-0",children:(0,n.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,n.jsx)("path",{d:"M9 18l6-6-6-6"})})})]})]})})]})}let _=(e,s)=>{s&&s(e)},M=(e,s)=>{s?s(e):window.open("ssh://".concat(e))},L=e=>"RUNNING"===e?["connect","VSCode"]:[],O={connect:(0,n.jsx)(f,{className:"w-4 h-4 text-gray-500 inline-block"}),VSCode:(0,n.jsx)(w,{className:"w-4 h-4 text-gray-500 inline-block"})};function z(e){let{withLabel:s=!1,cluster:t,status:r,onOpenSSHModal:l,onOpenVSCodeModal:c}=e,i=L(r),o=(0,v.X)(),d=e=>{switch(e){case"connect":M(t,l);break;case"VSCode":_(t,c);break;default:return}};return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{className:"flex items-center space-x-4",children:Object.entries(O).map(e=>{let t,r,[l,c]=e;switch(l){case"connect":t="Connect",r="Connect with SSH";break;case"VSCode":t="VSCode",r="Open in VS Code"}return(s||(t=""),i.includes(l))?(0,n.jsx)(a.WH,{content:r,className:"capitalize text-sm text-muted-foreground",children:(0,n.jsxs)("button",{onClick:()=>d(l),className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center",children:[c,!o&&(0,n.jsx)("span",{className:"ml-1.5",children:t})]})},l):(0,n.jsx)(a.WH,{content:r,className:"capitalize text-sm text-muted-foreground",children:(0,n.jsxs)("span",{className:"opacity-30 flex items-center cursor-not-allowed text-sm",title:l,children:[c,!o&&(0,n.jsx)("span",{className:"ml-1.5",children:t})]})},l)})})})}},9008:function(e,s,t){e.exports=t(7219)}}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[734],{9307:function(e,t,r){r.d(t,{Cl:function(){return c},OE:function(){return d}});var a=r(5893);r(7294);var s=r(8799),n=r(6989),o=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)(o.W2,{className:"w-3 h-3 mr-1"});case"STOPPED":return(0,a.jsx)(o.fp,{className:"w-3 h-3 mr-1"});case"TERMINATED":case"FAILED":case"CANCELLED":return(0,a.jsx)(o.Ps,{className:"w-3 h-3 mr-1"});case"SUCCEEDED":return(0,a.jsx)(o.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)(o.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]})},d=e=>{let{status:t}=e;return(0,a.jsx)(n.WH,{content:t,className:"text-muted-foreground text-sm",children:(0,a.jsx)("span",{children:i(t)})})}},9284:function(e,t,r){r.d(t,{Oh:function(){return f},_R:function(){return m},cV:function(){return h}});var a=r(5893),s=r(7294),n=r(326),o=r(803),c=r(7673),l=r(8671),i=r(6989),d=r(3225),u=r(3001);function f(e){let{isOpen:t,onClose:r,cluster:d}=e,[u,f]=s.useState(!1),m=e=>{navigator.clipboard.writeText(e),f(!0),setTimeout(()=>f(!1),2e3)},h=["sky status ".concat(d),"ssh ".concat(d)],p=h.join("\n");return(0,a.jsx)(n.Vq,{open:t,onOpenChange:r,children:(0,a.jsxs)(n.cZ,{className:"sm:max-w-md",children:[(0,a.jsxs)(n.fK,{children:[(0,a.jsxs)(n.$N,{children:["Connect to: ",(0,a.jsx)("span",{className:"font-light",children:d})]}),(0,a.jsx)(n.Be,{children:"Use these instructions to connect to your cluster via SSH."})]}),(0,a.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-sm font-medium mb-2",children:"SSH Command"}),(0,a.jsx)(c.Zb,{className:"p-3 bg-gray-50",children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("pre",{className:"text-sm w-full whitespace-pre-wrap",children:h.map((e,t)=>(0,a.jsx)("code",{className:"block",children:e},t))}),(0,a.jsx)(i.WH,{content:u?"Copied!":"Copy command",children:(0,a.jsx)(o.z,{variant:"ghost",size:"icon",onClick:()=>m(p),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 ",d]})," first to have SkyPilot set up the SSH access."]})]})]})]})})}function m(e){let{isOpen:t,onClose:r,cluster:s}=e,f=(0,u.X)();return(0,a.jsx)(n.Vq,{open:t,onOpenChange:r,children:(0,a.jsx)(n.cZ,{className:"sm:max-w-3xl",children:(0,a.jsxs)(n.fK,{children:[(0,a.jsxs)(n.$N,{children:["Connect to: ",(0,a.jsx)("span",{className:"font-light",children:s})]}),(0,a.jsx)(n.Be,{children:(0,a.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-sm font-medium mb-2 my-2",children:"Setup SSH access"}),(0,a.jsx)(c.Zb,{className:"p-3 bg-gray-50",children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("pre",{className:"text-sm",children:(0,a.jsxs)("code",{children:["sky status ",s]})}),(0,a.jsx)(i.WH,{content:"Copy command",children:(0,a.jsx)(o.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)(o.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(d.GW,"/videos/cursor-small.mp4"),type:"video/mp4"}),"Your browser does not support the video tag."]})})]})]})})]})})})}function h(e){let{isOpen:t,onClose:r,onConfirm:s,title:c,message:l,confirmText:i="Confirm",confirmVariant:d="destructive"}=e;return(0,a.jsx)(n.Vq,{open:t,onOpenChange:r,children:(0,a.jsxs)(n.cZ,{className:"sm:max-w-md",children:[(0,a.jsxs)(n.fK,{children:[(0,a.jsx)(n.$N,{children:c}),(0,a.jsx)(n.Be,{children:l})]}),(0,a.jsxs)(n.cN,{className:"flex justify-end gap-2 pt-4",children:[(0,a.jsx)(o.z,{variant:"outline",onClick:r,children:"Cancel"}),(0,a.jsx)(o.z,{variant:d,onClick:()=>{s(),r()},children:i})]})]})})}},803:function(e,t,r){r.d(t,{z:function(){return i}});var a=r(5893),s=r(7294),n=r(8426),o=r(2003),c=r(2350);let l=(0,o.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:o,asChild:i=!1,...d}=e,u=i?n.g7:"button";return(0,a.jsx)(u,{className:(0,c.cn)(l({variant:s,size:o,className:r})),ref:t,...d})});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 m},ll:function(){return d}});var a=r(5893),s=r(7294),n=r(5697),o=r.n(n),c=r(2350);let l=s.forwardRef((e,t)=>{let{className:r,children:s,...n}=e;return(0,a.jsx)("div",{ref:t,className:(0,c.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",r),...n,children:s})});l.displayName="Card",l.propTypes={className:o().string,children:o().node};let i=s.forwardRef((e,t)=>{let{className:r,children:s,...n}=e;return(0,a.jsx)("div",{ref:t,className:(0,c.cn)("flex flex-col space-y-1.5 p-6",r),...n,children:s})});i.displayName="CardHeader",i.propTypes={className:o().string,children:o().node};let d=s.forwardRef((e,t)=>{let{className:r,children:s,...n}=e;return(0,a.jsx)("h3",{ref:t,className:(0,c.cn)("text-2xl font-semibold leading-none tracking-tight",r),...n,children:s})});d.displayName="CardTitle",d.propTypes={className:o().string,children:o().node};let u=s.forwardRef((e,t)=>{let{className:r,children:s,...n}=e;return(0,a.jsx)("p",{ref:t,className:(0,c.cn)("text-sm text-muted-foreground",r),...n,children:s})});u.displayName="CardDescription",u.propTypes={className:o().string,children:o().node};let f=s.forwardRef((e,t)=>{let{className:r,children:s,...n}=e;return(0,a.jsx)("div",{ref:t,className:(0,c.cn)("p-6 pt-0",r),...n,children:s})});f.displayName="CardContent",f.propTypes={className:o().string,children:o().node};let m=s.forwardRef((e,t)=>{let{className:r,children:s,...n}=e;return(0,a.jsx)("div",{ref:t,className:(0,c.cn)("flex items-center p-6 pt-0",r),...n,children:s})});m.displayName="CardFooter",m.propTypes={className:o().string,children:o().node}},326:function(e,t,r){r.d(t,{$N:function(){return h},Be:function(){return p},Vq:function(){return l},cN:function(){return m},cZ:function(){return u},fK:function(){return f}});var a=r(5893),s=r(7294),n=r(6327),o=r(2350),c=r(3767);let l=n.fC;n.xz;let i=n.h_;n.x8;let d=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)(n.aV,{ref:t,className:(0,o.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})});d.displayName=n.aV.displayName;let u=s.forwardRef((e,t)=>{let{className:r,children:s,...l}=e;return(0,a.jsxs)(i,{children:[(0,a.jsx)(d,{}),(0,a.jsxs)(n.VY,{ref:t,className:(0,o.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)(n.x8,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-gray-400 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-gray-100 data-[state=open]:text-gray-500",children:[(0,a.jsx)(c.Z,{className:"h-4 w-4"}),(0,a.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});u.displayName=n.VY.displayName;let f=e=>{let{className:t,...r}=e;return(0,a.jsx)("div",{className:(0,o.cn)("flex flex-col space-y-1.5 text-center sm:text-left",t),...r})};f.displayName="DialogHeader";let m=e=>{let{className:t,...r}=e;return(0,a.jsx)("div",{className:(0,o.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...r})};m.displayName="DialogFooter";let h=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)(n.Dx,{ref:t,className:(0,o.cn)("text-lg font-semibold leading-none tracking-tight",r),...s})});h.displayName=n.Dx.displayName;let p=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)(n.dk,{ref:t,className:(0,o.cn)("text-sm text-gray-500",r),...s})});p.displayName=n.dk.displayName},8764:function(e,t,r){r.d(t,{RM:function(){return l},SC:function(){return i},iA:function(){return o},pj:function(){return u},ss:function(){return d},xD:function(){return c}});var a=r(5893),s=r(7294),n=r(2350);let o=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,n.cn)("w-full caption-bottom text-base",r),...s})})});o.displayName="Table";let c=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)("thead",{ref:t,className:(0,n.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,n.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,n.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,n.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",r),...s})});i.displayName="TableRow";let d=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)("th",{ref:t,className:(0,n.cn)("h-12 px-4 text-left align-middle font-medium text-[hsl(var(--text-strong))] [&:has([role=checkbox])]:pr-0",r),...s})});d.displayName="TableHead";let u=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)("td",{ref:t,className:(0,n.cn)("p-4 align-middle [&:has([role=checkbox])]:pr-0",r),...s})});u.displayName="TableCell",s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)("caption",{ref:t,className:(0,n.cn)("mt-4 text-base text-muted-foreground",r),...s})}).displayName="TableCaption"},3266:function(e,t,r){r.d(t,{QL:function(){return d},Sl:function(){return l},zd:function(){return c}});var a=r(7294),s=r(5821),n=r(3225);let o={UP:"RUNNING",STOPPED:"STOPPED",INIT:"LAUNCHING",null:"TERMINATED"};async function c(){let{clusterNames:e=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let t=await fetch("".concat(n.f4,"/status"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cluster_names:e,all_users:!0})}),r=t.headers.get("X-Skypilot-Request-ID")||t.headers.get("X-Request-ID"),a=await fetch("".concat(n.f4,"/api/get?request_id=").concat(r)),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:o[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:o}=e;try{let e=(await fetch("".concat(n.f4,"/logs"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({follow:!1,cluster_name:t,job_id:r,override_skypilot_config:{active_workspace:o||"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(n.f4,"/queue"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cluster_name:t,all_users:!0,override_skypilot_config:{active_workspace:r}})}),a=e.headers.get("X-Skypilot-Request-ID")||e.headers.get("X-Request-ID"),s=await fetch("".concat(n.f4,"/api/get?request_id=").concat(a)),o=await s.json();return JSON.parse(o.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 d(e){let{cluster:t,job:r=null}=e,[s,n]=(0,a.useState)(null),[o,l]=(0,a.useState)(null),[d,u]=(0,a.useState)(!0),[f,m]=(0,a.useState)(!0),h=(0,a.useCallback)(async()=>{if(t)try{u(!0);let e=await c({clusterNames:[t]});return n(e[0]),e[0]}catch(e){console.error("Error fetching cluster data:",e)}finally{u(!1)}return null},[t]),p=(0,a.useCallback)(async e=>{if(t)try{m(!0);let r=await i({clusterName:t,workspace:e||"default"});l(r)}catch(e){console.error("Error fetching cluster job data:",e)}finally{m(!1)}},[t]),g=(0,a.useCallback)(async()=>{let e=await h();e&&await p(e.workspace)},[h,p]);return(0,a.useEffect)(()=>{(async()=>{let e=await h();e&&await p(e.workspace)})()},[t,r,h,p]),{clusterData:s,clusterJobData:o,loading:d||f,refreshData:g}}},7324:function(e,t,r){r.d(t,{f:function(){return s},y:function(){return n}});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=s.error||s.result&&s.result.error||"Unknown error during task execution";throw Error("Fetching workspace data failed for request ID ".concat(t,": ").concat(e))}let n={};if("SUCCEEDED"===s.status&&s.return_value)try{n=JSON.parse(s.return_value),console.log("Successfully parsed workspace data from return_value:",n)}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)),n=s.result);return console.log("Effectively fetched workspace data (to be returned):",n),n||{}}catch(e){throw console.error("Failed to fetch workspaces (in getWorkspaces function):",e.message,e.stack),e}}async function n(){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 n=await fetch("".concat(a.f4,"/api/get?request_id=").concat(s));if(!n.ok){let e="Error fetching enabled_clouds data for request ID ".concat(s,": ").concat(n.statusText," (status ").concat(n.status,")");try{let t=await n.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 o=await n.json();if(console.log("[Connector Debug] Full resultData from /api/get for enabled_clouds:",o),"FAILED"===o.status){let e=o.error||o.result&&o.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"===o.status&&o.return_value)try{c=JSON.parse(o.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:",o.return_value),Error("Failed to parse enabled_clouds data for request ID ".concat(s,": ").concat(e.message))}else o.result&&(console.warn("Using resultData.result as fallback for enabled_clouds status ".concat(o.status)),c=o.result);return Array.isArray(c)?c:[]}catch(e){throw console.error("Failed to fetch enabled_clouds (in getEnabledClouds function):",e.message,e.stack),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),h=t(8764),u=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),N=t(9284),y=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,u.GV)(e);if(n.isValidElement(s)&&s.props&&s.props.children&&(s=n.isValidElement(s.props.children)&&s.props.children.props&&s.props.children.props.children?s.props.children.props.children:s.props.children),"string"!=typeof s)return s;if("just now"===s)return"now";let t=s.match(/^About\s+(\d+)\s+(\w+)\s+ago$/);if(t){let e=t[1],s=t[2],r={second:"sec",seconds:"secs",minute:"min",minutes:"mins",hour:"hr",hours:"hrs",day:"d",days:"d",month:"mo",months:"mos",year:"yr",years:"yrs"};if(r[s])return"~ ".concat(e," ").concat(r[s]," ago")}let r=s.match(/^a[n]?\s+(\w+)\s+ago$/);if(r){let e=r[1],s={second:"sec",minute:"min",hour:"hr",day:"d",month:"mo",year:"yr"};if(s[e])return"1 ".concat(s[e]," ago")}let a=s.match(/^(\d+)\s+(\w+)\s+ago$/);if(a){let e=a[1],s=a[2],t={seconds:"secs",minutes:"mins",hours:"hrs",days:"d",months:"mo",years:"yr"};if(t[s])return"".concat(e," ").concat(t[s]," ago")}return s};function L(){let[e,s]=(0,n.useState)(!1),t=n.useRef(null),[a,l]=(0,n.useState)({isOpen:!1,title:"",message:"",onConfirm:null}),d=(0,k.X)(),[h,m]=(0,n.useState)(S),[g,b]=(0,n.useState)([]);return(0,n.useEffect)(()=>{(async()=>{try{let e=await (0,p.f)(),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)),b(Array.from(n).sort())}catch(e){console.error("Error fetching data for workspace filter:",e),b(["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:h,onValueChange:m,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:h===S?"All Workspaces":h})}),(0,r.jsxs)(C.Bw,{children:[(0,r.jsx)(C.Ql,{value:S,children:"All Workspaces"}),g.map(e=>(0,r.jsx)(C.Ql,{value:e,children:e},e))]})]})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[e&&(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:()=>{t.current&&t.current()},disabled:e,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"}),!d&&(0,r.jsx)("span",{children:"Refresh"})]})]})]}),(0,r.jsx)(R,{refreshInterval:u.yc,setLoading:s,refreshDataRef:t,workspaceFilter:h}),(0,r.jsx)(N.cV,{isOpen:a.isOpen,onClose:()=>l({...a,isOpen:!1}),onConfirm:a.onConfirm,title:a.title,message:a.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),[z,A]=(0,n.useState)(10),[J,P]=(0,n.useState)(null),T=(0,n.useRef)(null),[W,F]=(0,n.useState)([]),[U,V]=(0,n.useState)({}),[q,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,y.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)(()=>{F([]),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/z),ed=(R-1)*z,eh=ed+z,eu=ei.slice(ed,eh),ex=e=>{if(W.includes(e)){let s=W.filter(s=>s!==e);0===s.length?(Y(!0),F([])):(F(s),Y(!1))}else F([...W,e]),Y(!1)};return(0,n.useEffect)(()=>{V(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(U).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"),F([]),Y(!0)},className:"text-sm font-medium ".concat("active"===$&&Q?"text-green-700 underline":"text-gray-600 hover:text-green-700 hover:underline"),children:"show all active jobs"}),(0,r.jsx)("span",{className:"text-gray-500 mx-1",children:"|"}),(0,r.jsx)("button",{onClick:()=>{K("finished"),F([]),Y(!0)},className:"text-sm font-medium ".concat("finished"===$&&Q?"text-blue-700 underline":"text-gray-600 hover:text-blue-700 hover:underline"),children:"show all finished jobs"}),(0,r.jsx)("span",{className:"text-gray-500",children:")"})]})]})]})}),(0,r.jsx)(d.Zb,{children:(0,r.jsxs)(h.iA,{children:[(0,r.jsx)(h.xD,{children:(0,r.jsxs)(h.SC,{children:[(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>en("id"),children:["ID",ea("id")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>en("name"),children:["Name",ea("name")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>en("user"),children:["User",ea("user")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>en("workspace"),children:["Workspace",ea("workspace")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>en("submitted_at"),children:["Submitted",ea("submitted_at")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>en("job_duration"),children:["Duration",ea("job_duration")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>en("status"),children:["Status",ea("status")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>en("resources_str"),children:["Requested",ea("resources_str")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>en("infra"),children:["Infra",ea("infra")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>en("cluster"),children:["Resources",ea("cluster")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>en("recoveries"),children:["Recoveries",ea("recoveries")]}),(0,r.jsx)(h.ss,{children:"Details"}),(0,r.jsx)(h.ss,{children:"Logs"})]})}),(0,r.jsx)(h.RM,{children:w&&C?(0,r.jsx)(h.SC,{children:(0,r.jsx)(h.pj,{colSpan:12,className:"text-center py-6 text-gray-500",children:(0,r.jsxs)("div",{className:"flex justify-center items-center",children:[(0,r.jsx)(i.Z,{size:20,className:"mr-2"}),(0,r.jsx)("span",{children:"Loading..."})]})})}):eu.length>0?(0,r.jsx)(r.Fragment,{children:eu.map(e=>(0,r.jsxs)(n.Fragment,{children:[(0,r.jsxs)(h.SC,{children:[(0,r.jsx)(h.pj,{children:(0,r.jsx)(c(),{href:"/jobs/".concat(e.id),className:"text-blue-600",children:e.id})}),(0,r.jsx)(h.pj,{children:(0,r.jsx)(c(),{href:"/jobs/".concat(e.id),className:"text-blue-600",children:e.name})}),(0,r.jsx)(h.pj,{children:e.user}),(0,r.jsx)(h.pj,{children:(0,r.jsx)(c(),{href:"/workspaces",className:"text-blue-600 hover:underline",children:e.workspace||"default"})}),(0,r.jsx)(h.pj,{children:E(e.submitted_at)}),(0,r.jsx)(h.pj,{children:(0,u.LU)(e.job_duration)}),(0,r.jsx)(h.pj,{children:(0,r.jsx)(v.OE,{status:e.status})}),(0,r.jsx)(h.pj,{children:e.requested_resources}),(0,r.jsx)(h.pj,{children:e.infra&&"-"!==e.infra?(0,r.jsx)(u.Md,{content:e.full_infra||e.infra,className:"text-sm text-muted-foreground",children:(0,r.jsxs)("span",{children:[(0,r.jsx)(c(),{href:"/infra",className:"text-blue-600 hover:underline",children:e.cloud||e.infra.split("(")[0].trim()}),e.infra.includes("(")&&(0,r.jsx)("span",{children:" "+e.infra.substring(e.infra.indexOf("("))})]})}):(0,r.jsx)("span",{children:e.infra||"-"})}),(0,r.jsx)(h.pj,{children:(0,r.jsx)(u.Md,{content:e.resources_str_full||e.resources_str,className:"text-sm text-muted-foreground",children:(0,r.jsx)("span",{children:e.resources_str})})}),(0,r.jsx)(h.pj,{children:e.recoveries}),(0,r.jsx)(h.pj,{children:e.details?(0,r.jsx)(M,{text:e.details,rowId:e.id,expandedRowId:J,setExpandedRowId:P}):"-"}),(0,r.jsx)(h.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)(h.SC,{children:(0,r.jsx)(h.pj,{colSpan:12,className:"text-center py-6",children:(0,r.jsxs)("div",{className:"flex flex-col items-center space-y-4",children:[B&&(0,r.jsxs)("div",{className:"flex flex-col items-center space-y-2",children:[(0,r.jsx)("p",{className:"text-gray-700",children:"The managed job controller is launching. Please wait for it to be ready."}),(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(i.Z,{size:12,className:"mr-2"}),(0,r.jsx)("span",{className:"text-gray-500",children:"Launching..."})]})]}),!q&&!B&&(0,r.jsx)("p",{className:"text-gray-500",children:"No active jobs"}),q&&(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:z,onChange:e=>{A(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(eh,ei.length)," of"," ",ei.length]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(o.z,{variant:"ghost",size:"icon",onClick:()=>{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)(N.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)(u.WH,{content:"View Job Logs",className:"capitalize text-sm text-muted-foreground",children:(0,r.jsxs)("button",{onClick:e=>i(e,"logs"),className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center h-8",children:[(0,r.jsx)(b.Z,{className:"w-4 h-4"}),s&&(0,r.jsx)("span",{className:"ml-1.5",children:"Logs"})]})},"logs"),l&&(0,r.jsx)(u.WH,{content:"View Controller Logs",className:"capitalize text-sm text-muted-foreground",children:(0,r.jsxs)("button",{onClick:e=>i(e,"controllerlogs"),className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center h-8",children:[(0,r.jsx)(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),[N,y]=(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(N)&&y(t)},[t,N]);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,z=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)(h.iA,{children:[(0,r.jsx)(h.xD,{children:(0,r.jsxs)(h.SC,{children:[(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>_("id"),children:["ID",S("id")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>_("job"),children:["Name",S("job")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>_("user"),children:["User",S("user")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>_("workspace"),children:["Workspace",S("workspace")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>_("submitted_at"),children:["Submitted",S("submitted_at")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>_("job_duration"),children:["Duration",S("job_duration")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>_("status"),children:["Status",S("status")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>_("resources"),children:["Resources",S("resources")]}),(0,r.jsx)(h.ss,{className:"whitespace-nowrap",children:"Logs"})]})}),(0,r.jsx)(h.RM,{children:z.length>0?z.map(e=>(0,r.jsxs)(n.Fragment,{children:[(0,r.jsxs)(h.SC,{className:l===e.id?"selected-row":"",children:[(0,r.jsx)(h.pj,{children:(0,r.jsx)(c(),{href:"/clusters/".concat(s,"/").concat(e.id),className:"text-blue-600",children:e.id})}),(0,r.jsx)(h.pj,{children:(0,r.jsx)(c(),{href:"/clusters/".concat(s,"/").concat(e.id),className:"text-blue-600",children:(0,r.jsx)(M,{text:e.job||"Unnamed job",rowId:e.id,expandedRowId:l,setExpandedRowId:x})})}),(0,r.jsx)(h.pj,{children:e.user}),(0,r.jsx)(h.pj,{children:(0,r.jsx)(c(),{href:"/workspaces",className:"text-blue-600 hover:underline",children:e.workspace||"default"})}),(0,r.jsx)(h.pj,{children:E(e.submitted_at)}),(0,r.jsx)(h.pj,{children:(0,u.LU)(e.job_duration)}),(0,r.jsx)(h.pj,{children:(0,r.jsx)(v.OE,{status:e.status})}),(0,r.jsx)(h.pj,{children:e.resources}),(0,r.jsx)(h.pj,{className:"flex content-center items-center",children:(0,r.jsx)(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)(h.SC,{children:(0,r.jsx)(h.pj,{colSpan:9,className:"text-center py-6 text-gray-500",children:"No jobs found"})})})]})]}),C.length>0&&(0,r.jsx)("div",{className:"flex justify-end items-center py-2 px-4 text-sm text-gray-700",children:(0,r.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("span",{className:"mr-2",children:"Rows per page:"}),(0,r.jsxs)("div",{className:"relative inline-block",children:[(0,r.jsxs)("select",{value:g,onChange:e=>{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)(h.SC,{className:"expanded-details",children:(0,r.jsx)(h.pj,{colSpan:t,children:(0,r.jsx)("div",{className:"p-4 bg-gray-50 rounded-md border border-gray-200",ref:n,children:(0,r.jsx)("div",{className:"flex justify-between items-start",children:(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-gray-900",children:"Full Details"}),(0,r.jsx)("p",{className:"mt-1 text-sm text-gray-700",style:{whiteSpace:"pre-wrap"},children:s})]})})})})})}function 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([[888],{1118:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return t(2586)}])},3225:function(e,n,t){"use strict";t.d(n,{$m:function(){return a},Bo:function(){return i},GW:function(){return o},f4:function(){return r},iW:function(){return c},mF:function(){return u}});let r="/internal/dashboard",o="/dashboard";"/api/v1".replace(/^http/,"ws");let u="ClusterDoesNotExist",i="NotSupportedError",c="ClusterNotUpError",a=["AWS","Azure","GCP","IBM","Lambda","SCP","OCI","RunPod","VAST","vSphere","Cudo","FluidStack","Paperspace","DO","Nebius"]},2586:function(e,n,t){"use strict";t.r(n);var r=t(5893),o=t(7294),u=t(5697),i=t.n(u);t(6501);var c=t(3225);function a(e){let{Component:n,pageProps:t}=e;return(0,o.useEffect)(()=>{let e=document.createElement("link");e.rel="icon",e.href="".concat(c.GW,"/favicon.ico"),document.head.appendChild(e)},[]),(0,r.jsx)(n,{...t})}a.propTypes={Component:i().elementType.isRequired,pageProps:i().object.isRequired},n.default=a},6501:function(){},2703:function(e,n,t){"use strict";var r=t(414);function o(){}function u(){}u.resetWarningCache=o,e.exports=function(){function e(e,n,t,o,u,i){if(i!==r){var c=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function n(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:u,resetWarningCache:o};return t.PropTypes=t,t}},5697:function(e,n,t){e.exports=t(2703)()},414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},function(e){var n=function(n){return e(e.s=n)};e.O(0,[774,179],function(){return n(1118),n(6036)}),_N_E=e.O()}]);
|
@@ -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()}]);
|