skypilot-nightly 1.0.0.dev20251001__py3-none-any.whl → 1.0.0.dev20251003__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.
Potentially problematic release.
This version of skypilot-nightly might be problematic. Click here for more details.
- sky/__init__.py +2 -2
- sky/authentication.py +19 -109
- sky/client/cli/command.py +2 -3
- sky/client/cli/table_utils.py +222 -1
- sky/clouds/cudo.py +1 -1
- sky/clouds/kubernetes.py +7 -19
- sky/dashboard/out/404.html +1 -1
- sky/dashboard/out/_next/static/{m3YT2i5s6v4SsIdYc8WZa → Haazh5IQz6F8Wyiqxcaj8}/_buildManifest.js +1 -1
- sky/dashboard/out/_next/static/chunks/3015-8d748834fcc60b46.js +1 -0
- sky/dashboard/out/_next/static/chunks/8969-66237729cdf9749e.js +1 -0
- sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/{[job]-ad77b12fc736dca3.js → [job]-72794fc3fcdd517a.js} +1 -1
- sky/dashboard/out/_next/static/chunks/{webpack-4f0c389a4ce5fd9c.js → webpack-3286453d56f3c0a0.js} +1 -1
- 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 -1
- sky/dashboard/out/index.html +1 -1
- sky/dashboard/out/infra/[context].html +1 -1
- sky/dashboard/out/infra.html +1 -1
- sky/dashboard/out/jobs/[job].html +1 -1
- sky/dashboard/out/jobs/pools/[pool].html +1 -1
- sky/dashboard/out/jobs.html +1 -1
- sky/dashboard/out/users.html +1 -1
- sky/dashboard/out/volumes.html +1 -1
- sky/dashboard/out/workspace/new.html +1 -1
- sky/dashboard/out/workspaces/[name].html +1 -1
- sky/dashboard/out/workspaces.html +1 -1
- sky/data/storage_utils.py +9 -0
- sky/global_user_state.py +16 -0
- sky/jobs/server/core.py +60 -53
- sky/jobs/state.py +21 -1
- sky/jobs/utils.py +29 -11
- sky/provision/kubernetes/config.py +0 -42
- sky/provision/kubernetes/instance.py +1 -33
- sky/provision/kubernetes/manifests/fusermount-server-daemonset.yaml +1 -2
- sky/provision/kubernetes/network_utils.py +0 -21
- sky/provision/kubernetes/utils.py +68 -322
- sky/schemas/api/responses.py +21 -0
- sky/server/requests/serializers/decoders.py +8 -0
- sky/server/requests/serializers/encoders.py +6 -0
- sky/templates/kubernetes-ray.yml.j2 +4 -13
- sky/utils/env_options.py +4 -0
- sky/utils/kubernetes_enums.py +2 -15
- sky/utils/schemas.py +17 -6
- sky/volumes/client/sdk.py +3 -2
- sky/volumes/server/core.py +3 -2
- {skypilot_nightly-1.0.0.dev20251001.dist-info → skypilot_nightly-1.0.0.dev20251003.dist-info}/METADATA +37 -37
- {skypilot_nightly-1.0.0.dev20251001.dist-info → skypilot_nightly-1.0.0.dev20251003.dist-info}/RECORD +53 -56
- sky/dashboard/out/_next/static/chunks/3015-88c7c8d69b0b6dba.js +0 -1
- sky/dashboard/out/_next/static/chunks/8969-d8bc3a2b9cf839a9.js +0 -1
- sky/templates/kubernetes-ssh-jump.yml.j2 +0 -94
- sky/utils/kubernetes/ssh_jump_lifecycle_manager.py +0 -191
- sky/volumes/utils.py +0 -224
- /sky/dashboard/out/_next/static/{m3YT2i5s6v4SsIdYc8WZa → Haazh5IQz6F8Wyiqxcaj8}/_ssgManifest.js +0 -0
- {skypilot_nightly-1.0.0.dev20251001.dist-info → skypilot_nightly-1.0.0.dev20251003.dist-info}/WHEEL +0 -0
- {skypilot_nightly-1.0.0.dev20251001.dist-info → skypilot_nightly-1.0.0.dev20251003.dist-info}/entry_points.txt +0 -0
- {skypilot_nightly-1.0.0.dev20251001.dist-info → skypilot_nightly-1.0.0.dev20251003.dist-info}/licenses/LICENSE +0 -0
- {skypilot_nightly-1.0.0.dev20251001.dist-info → skypilot_nightly-1.0.0.dev20251003.dist-info}/top_level.txt +0 -0
sky/volumes/client/sdk.py
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"""SDK functions for managed jobs."""
|
|
2
2
|
import json
|
|
3
3
|
import typing
|
|
4
|
-
from typing import
|
|
4
|
+
from typing import List
|
|
5
5
|
|
|
6
6
|
from sky import exceptions
|
|
7
7
|
from sky import sky_logging
|
|
8
8
|
from sky.adaptors import common as adaptors_common
|
|
9
|
+
from sky.schemas.api import responses
|
|
9
10
|
from sky.server import common as server_common
|
|
10
11
|
from sky.server import versions
|
|
11
12
|
from sky.server.requests import payloads
|
|
@@ -116,7 +117,7 @@ def validate(volume: volume_lib.Volume) -> None:
|
|
|
116
117
|
@usage_lib.entrypoint
|
|
117
118
|
@server_common.check_server_healthy_or_start
|
|
118
119
|
@annotations.client_api
|
|
119
|
-
def ls() -> server_common.RequestId[List[
|
|
120
|
+
def ls() -> server_common.RequestId[List[responses.VolumeRecord]]:
|
|
120
121
|
"""Lists all volumes.
|
|
121
122
|
|
|
122
123
|
Returns:
|
sky/volumes/server/core.py
CHANGED
|
@@ -11,6 +11,7 @@ from sky import global_user_state
|
|
|
11
11
|
from sky import models
|
|
12
12
|
from sky import provision
|
|
13
13
|
from sky import sky_logging
|
|
14
|
+
from sky.schemas.api import responses
|
|
14
15
|
from sky.utils import common_utils
|
|
15
16
|
from sky.utils import registry
|
|
16
17
|
from sky.utils import rich_utils
|
|
@@ -56,7 +57,7 @@ def volume_refresh():
|
|
|
56
57
|
volume_name, status=status_lib.VolumeStatus.IN_USE)
|
|
57
58
|
|
|
58
59
|
|
|
59
|
-
def volume_list() -> List[
|
|
60
|
+
def volume_list() -> List[responses.VolumeRecord]:
|
|
60
61
|
"""Gets the volumes.
|
|
61
62
|
|
|
62
63
|
Returns:
|
|
@@ -143,7 +144,7 @@ def volume_list() -> List[Dict[str, Any]]:
|
|
|
143
144
|
record['name_on_cloud'] = config.name_on_cloud
|
|
144
145
|
record['usedby_pods'] = usedby_pods
|
|
145
146
|
record['usedby_clusters'] = usedby_clusters
|
|
146
|
-
records.append(record)
|
|
147
|
+
records.append(responses.VolumeRecord(**record))
|
|
147
148
|
return records
|
|
148
149
|
|
|
149
150
|
|
|
@@ -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.dev20251003
|
|
4
4
|
Summary: SkyPilot: Run AI on Any Infra — Unified, Faster, Cheaper.
|
|
5
5
|
Author: SkyPilot Team
|
|
6
6
|
License: Apache 2.0
|
|
@@ -154,51 +154,51 @@ Requires-Dist: protobuf<7.0.0,>=5.26.1; extra == "server"
|
|
|
154
154
|
Requires-Dist: aiosqlite; extra == "server"
|
|
155
155
|
Requires-Dist: greenlet; extra == "server"
|
|
156
156
|
Provides-Extra: all
|
|
157
|
-
Requires-Dist:
|
|
158
|
-
Requires-Dist: pydo>=0.3.0; extra == "all"
|
|
159
|
-
Requires-Dist: azure-core>=1.24.0; extra == "all"
|
|
160
|
-
Requires-Dist: anyio; extra == "all"
|
|
161
|
-
Requires-Dist: casbin; extra == "all"
|
|
157
|
+
Requires-Dist: msrestazure; extra == "all"
|
|
162
158
|
Requires-Dist: colorama<0.4.5; extra == "all"
|
|
163
|
-
Requires-Dist:
|
|
164
|
-
Requires-Dist:
|
|
159
|
+
Requires-Dist: python-dateutil; extra == "all"
|
|
160
|
+
Requires-Dist: azure-mgmt-compute>=33.0.0; extra == "all"
|
|
161
|
+
Requires-Dist: aiosqlite; extra == "all"
|
|
162
|
+
Requires-Dist: aiohttp; extra == "all"
|
|
163
|
+
Requires-Dist: azure-mgmt-network>=27.0.0; extra == "all"
|
|
164
|
+
Requires-Dist: ibm-cos-sdk; extra == "all"
|
|
165
|
+
Requires-Dist: protobuf<7.0.0,>=5.26.1; extra == "all"
|
|
166
|
+
Requires-Dist: botocore>=1.29.10; extra == "all"
|
|
167
|
+
Requires-Dist: nebius>=0.2.47; extra == "all"
|
|
168
|
+
Requires-Dist: msgraph-sdk; extra == "all"
|
|
169
|
+
Requires-Dist: azure-core>=1.24.0; extra == "all"
|
|
170
|
+
Requires-Dist: pyopenssl<24.3.0,>=23.2.0; extra == "all"
|
|
171
|
+
Requires-Dist: pydo>=0.3.0; extra == "all"
|
|
172
|
+
Requires-Dist: azure-common; extra == "all"
|
|
165
173
|
Requires-Dist: google-api-python-client>=2.69.0; extra == "all"
|
|
166
|
-
Requires-Dist:
|
|
174
|
+
Requires-Dist: greenlet; extra == "all"
|
|
175
|
+
Requires-Dist: pyjwt; extra == "all"
|
|
176
|
+
Requires-Dist: casbin; extra == "all"
|
|
177
|
+
Requires-Dist: oci; extra == "all"
|
|
167
178
|
Requires-Dist: ibm-vpc; extra == "all"
|
|
179
|
+
Requires-Dist: boto3>=1.26.1; extra == "all"
|
|
180
|
+
Requires-Dist: grpcio>=1.63.0; extra == "all"
|
|
181
|
+
Requires-Dist: azure-core>=1.31.0; extra == "all"
|
|
182
|
+
Requires-Dist: docker; extra == "all"
|
|
183
|
+
Requires-Dist: anyio; extra == "all"
|
|
184
|
+
Requires-Dist: azure-storage-blob>=12.23.1; extra == "all"
|
|
185
|
+
Requires-Dist: pyvmomi==8.0.1.0.2; extra == "all"
|
|
186
|
+
Requires-Dist: google-cloud-storage; extra == "all"
|
|
168
187
|
Requires-Dist: awscli>=1.27.10; extra == "all"
|
|
169
188
|
Requires-Dist: kubernetes!=32.0.0,>=20.0.0; extra == "all"
|
|
170
|
-
Requires-Dist:
|
|
171
|
-
Requires-Dist:
|
|
172
|
-
Requires-Dist: ibm-cos-sdk; extra == "all"
|
|
173
|
-
Requires-Dist: azure-mgmt-compute>=33.0.0; extra == "all"
|
|
174
|
-
Requires-Dist: pyvmomi==8.0.1.0.2; extra == "all"
|
|
175
|
-
Requires-Dist: nebius>=0.2.47; extra == "all"
|
|
176
|
-
Requires-Dist: azure-mgmt-network>=27.0.0; extra == "all"
|
|
189
|
+
Requires-Dist: websockets; extra == "all"
|
|
190
|
+
Requires-Dist: ibm-platform-services>=0.48.0; extra == "all"
|
|
177
191
|
Requires-Dist: vastai-sdk>=0.1.12; extra == "all"
|
|
178
|
-
Requires-Dist:
|
|
179
|
-
Requires-Dist: azure-core>=1.31.0; extra == "all"
|
|
180
|
-
Requires-Dist: msrestazure; extra == "all"
|
|
181
|
-
Requires-Dist: azure-common; extra == "all"
|
|
182
|
-
Requires-Dist: runpod>=1.6.1; extra == "all"
|
|
192
|
+
Requires-Dist: azure-identity>=1.19.0; extra == "all"
|
|
183
193
|
Requires-Dist: tomli; python_version < "3.11" and extra == "all"
|
|
184
|
-
Requires-Dist:
|
|
185
|
-
Requires-Dist:
|
|
186
|
-
Requires-Dist:
|
|
187
|
-
Requires-Dist:
|
|
188
|
-
Requires-Dist: docker; extra == "all"
|
|
189
|
-
Requires-Dist: cudo-compute>=0.1.10; extra == "all"
|
|
194
|
+
Requires-Dist: passlib; extra == "all"
|
|
195
|
+
Requires-Dist: ray[default]>=2.6.1; extra == "all"
|
|
196
|
+
Requires-Dist: runpod>=1.6.1; extra == "all"
|
|
197
|
+
Requires-Dist: ecsapi>=0.2.0; extra == "all"
|
|
190
198
|
Requires-Dist: sqlalchemy_adapter; extra == "all"
|
|
191
|
-
Requires-Dist:
|
|
192
|
-
Requires-Dist:
|
|
199
|
+
Requires-Dist: azure-cli>=2.65.0; extra == "all"
|
|
200
|
+
Requires-Dist: cudo-compute>=0.1.10; extra == "all"
|
|
193
201
|
Requires-Dist: ibm-cloud-sdk-core; extra == "all"
|
|
194
|
-
Requires-Dist: boto3>=1.26.1; extra == "all"
|
|
195
|
-
Requires-Dist: azure-identity>=1.19.0; extra == "all"
|
|
196
|
-
Requires-Dist: pyopenssl<24.3.0,>=23.2.0; extra == "all"
|
|
197
|
-
Requires-Dist: azure-storage-blob>=12.23.1; extra == "all"
|
|
198
|
-
Requires-Dist: grpcio>=1.63.0; extra == "all"
|
|
199
|
-
Requires-Dist: aiosqlite; extra == "all"
|
|
200
|
-
Requires-Dist: ibm-platform-services>=0.48.0; extra == "all"
|
|
201
|
-
Requires-Dist: oci; extra == "all"
|
|
202
202
|
Dynamic: author
|
|
203
203
|
Dynamic: classifier
|
|
204
204
|
Dynamic: description
|
{skypilot_nightly-1.0.0.dev20251001.dist-info → skypilot_nightly-1.0.0.dev20251003.dist-info}/RECORD
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
sky/__init__.py,sha256=
|
|
1
|
+
sky/__init__.py,sha256=GCvTnv2QS6fnUU2o38W-I3AawMA1gnbjOY6YduujLsQ,6713
|
|
2
2
|
sky/admin_policy.py,sha256=XdcJnYqmude-LGGop-8U-FeiJcqtfYsYtIy4rmoCJnM,9799
|
|
3
|
-
sky/authentication.py,sha256=
|
|
3
|
+
sky/authentication.py,sha256=P-bysZXiM4SBEnTcU-UqYoKSTX7Ylyij0DlitlCFBD8,24223
|
|
4
4
|
sky/check.py,sha256=hBDTkiADC3HFfO6brZV819FVWcdOs3aiuhB6x6mY4Q4,29728
|
|
5
5
|
sky/cli.py,sha256=VXIZryeTtJPYpPTBKymVPmuOCyh8knfWrq-qnkr6R-4,178
|
|
6
6
|
sky/cloud_stores.py,sha256=Ln5GBpel-sEs7rVx7bBrMkfLwA_bctI05Rox2uoz7Lo,26388
|
|
@@ -8,7 +8,7 @@ sky/core.py,sha256=VTHly9kJmwtmdiKwkrSrzuJ_8V8t-aI9weADd0SqDWA,58305
|
|
|
8
8
|
sky/dag.py,sha256=0ZpAEDXuIFo1SP7YJpF9vXiFxpRwqP8od-UXMg95td8,3929
|
|
9
9
|
sky/exceptions.py,sha256=IprWNwo6z5cHE-vTuQ5bMcjCfE2kgwZ3PRuawLPucXY,20466
|
|
10
10
|
sky/execution.py,sha256=1DtEne4EXROfnHKq6rrin69jtXvBmtRvrP7FUXBQCbk,35086
|
|
11
|
-
sky/global_user_state.py,sha256
|
|
11
|
+
sky/global_user_state.py,sha256=-niIwLLe_hQYb3OvWYbkGLtyrvoYx16HMVeFR6IYnZs,103080
|
|
12
12
|
sky/models.py,sha256=ZKisLai7vqUr6_BPev6Oziu5N23WLzTh9nRtHSlRchw,3999
|
|
13
13
|
sky/optimizer.py,sha256=iR57bL_8BeG6bh1sH3J6n6i65EBFjmyftezYM4nnDZA,64150
|
|
14
14
|
sky/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -87,21 +87,21 @@ sky/client/sdk.py,sha256=IwdheaffnHmmjEDzvqhrDuH8jPBlCYMrBjLYa4RL2O0,107259
|
|
|
87
87
|
sky/client/sdk_async.py,sha256=8G_E9Dn4d80rV-wxRH4zZUXZGAm6rLw3C8PI07fXwwQ,31106
|
|
88
88
|
sky/client/service_account_auth.py,sha256=5jXk0G6ufuW-SHCO7BEHQeTO0_2a8KfFmA63auXFRj4,1529
|
|
89
89
|
sky/client/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
90
|
-
sky/client/cli/command.py,sha256=
|
|
90
|
+
sky/client/cli/command.py,sha256=FBYtW17BNPNBHRipWsBMrzeKj8OCxM-A6QN2msaZq7o,250804
|
|
91
91
|
sky/client/cli/deprecation_utils.py,sha256=H_d5UyF2CekEoThduAzt5cihBO8hwKYMu0-Wqfbjv5E,3370
|
|
92
92
|
sky/client/cli/flags.py,sha256=lLXHooU4HEslbHJuGAiCrKYkJZx99hAKaJbstw7s1bc,12136
|
|
93
|
-
sky/client/cli/table_utils.py,sha256=
|
|
93
|
+
sky/client/cli/table_utils.py,sha256=HT_y__9_tZLKJ0aJu-hh67cu3NXfWDoiHir5fTmWaDw,10156
|
|
94
94
|
sky/clouds/__init__.py,sha256=hX6oZM4U6WuXQclg9-8mP2OAeFbzTbaVuPzJxqudKIc,1750
|
|
95
95
|
sky/clouds/aws.py,sha256=PrvbWuSAkPC18HsLVHx8NBJQiduz32NpDm1XXr6NPLo,63737
|
|
96
96
|
sky/clouds/azure.py,sha256=qnabVjfS3em-TvxOIqZ6mMiipnt51MBVf7R0pnyB7bo,33233
|
|
97
97
|
sky/clouds/cloud.py,sha256=2GlEvP8L1GueV8K_02zHWVTkA0A7sOmn1t6iMlEUSus,40160
|
|
98
|
-
sky/clouds/cudo.py,sha256=
|
|
98
|
+
sky/clouds/cudo.py,sha256=s1rvATmLCIqSIXCZNTM7sazJDSXWHZWZY161_n-WX18,14113
|
|
99
99
|
sky/clouds/do.py,sha256=a3Lk3nKLaYt97AV9cA1v50pNfKUTJF0rDg16rnnqYqQ,12618
|
|
100
100
|
sky/clouds/fluidstack.py,sha256=AbVYW2iwVVebIn0dWdSSsdItILHRLG3VVU3N2-n1I9c,13601
|
|
101
101
|
sky/clouds/gcp.py,sha256=LteGFf8kxmVoWyzM1YTNDh3xOrsuVJFB2-E7KNJ_Yz8,68861
|
|
102
102
|
sky/clouds/hyperbolic.py,sha256=bmV4NFpUPgzR0ownavHHVqyw26EtOgQ_ZB6SlxlgmJw,11999
|
|
103
103
|
sky/clouds/ibm.py,sha256=qMbOkTMJzPn2HDH9cie9zERvukRZbZoueLIaufCECAw,22860
|
|
104
|
-
sky/clouds/kubernetes.py,sha256=
|
|
104
|
+
sky/clouds/kubernetes.py,sha256=AWMc9doP4sgR-_LGrxWlQeidK04gsowSck9beHMlvbc,56154
|
|
105
105
|
sky/clouds/lambda_cloud.py,sha256=aRW4GwLjaFFR6_bPbBr9o8z-SKHtuP18BAVwoPuDtBE,13553
|
|
106
106
|
sky/clouds/nebius.py,sha256=onEFMQEKfgFEzaeGkejlOEDR6hcBPQaxDO5rrtQ7WFU,21663
|
|
107
107
|
sky/clouds/oci.py,sha256=Is9MP3EBoZ3zvqNTzcb57dXRinpSMp_R_CiazEu7rYM,28557
|
|
@@ -119,23 +119,25 @@ sky/clouds/utils/azure_utils.py,sha256=NToRBnhEyuUvb-nBnsKTxjhOBRkMcrelL8LK4w6s4
|
|
|
119
119
|
sky/clouds/utils/gcp_utils.py,sha256=09MF4Vx0EW7S-GXGpyxpl2aQlHrqeu9ioV0nyionAyk,9890
|
|
120
120
|
sky/clouds/utils/oci_utils.py,sha256=TFqAqRLggg4Z0bhxrrq8nouSSomZy-ub1frHXEkud2M,7302
|
|
121
121
|
sky/clouds/utils/scp_utils.py,sha256=VGuccVO5uFGr8-yolWSoYrgr11z6cIeDBGcqkBzAyOs,18409
|
|
122
|
-
sky/dashboard/out/404.html,sha256=
|
|
123
|
-
sky/dashboard/out/clusters.html,sha256=
|
|
124
|
-
sky/dashboard/out/config.html,sha256=
|
|
122
|
+
sky/dashboard/out/404.html,sha256=wnH7jys75sCVkZdAY2Y7ZTb3aM5cQJ09CYIXkFwZM0k,1423
|
|
123
|
+
sky/dashboard/out/clusters.html,sha256=R6bCIr2Xs1Na_F_5XjfFOCIWPq2G8d1Ol_z1sViZT3k,1418
|
|
124
|
+
sky/dashboard/out/config.html,sha256=n2CC_g9LD7oKbKSptzMvNGYWRaCZQqg5sFHC6jNJv6Q,1414
|
|
125
125
|
sky/dashboard/out/favicon.ico,sha256=XilUZZglAl_1zRsg85QsbQgmQAzGPQjcUIJ-A3AzYn8,93590
|
|
126
|
-
sky/dashboard/out/index.html,sha256=
|
|
127
|
-
sky/dashboard/out/infra.html,sha256=
|
|
128
|
-
sky/dashboard/out/jobs.html,sha256=
|
|
126
|
+
sky/dashboard/out/index.html,sha256=t2pDePeUX1ts6pxz3jL61HdFQYkf4QAPE6XaDX0aVHg,1407
|
|
127
|
+
sky/dashboard/out/infra.html,sha256=nVqIbit-tvw6INPAfUYrLqaEiHdRsZmqr7G4VMxc2NM,1412
|
|
128
|
+
sky/dashboard/out/jobs.html,sha256=9Of-RZfjkVMFwB2Ei68_P3GY3etyhBa5vBsmEFWfzZI,1410
|
|
129
129
|
sky/dashboard/out/skypilot.svg,sha256=c0iRtlfLlaUm2p0rG9NFmo5FN0Qhf3pq5Xph-AeMPJw,5064
|
|
130
|
-
sky/dashboard/out/users.html,sha256=
|
|
131
|
-
sky/dashboard/out/volumes.html,sha256=
|
|
132
|
-
sky/dashboard/out/workspaces.html,sha256=
|
|
130
|
+
sky/dashboard/out/users.html,sha256=V9YqrMGHifO7tEYdEGn6NxMoKYXIkYAEAIx7sSiVUU8,1412
|
|
131
|
+
sky/dashboard/out/volumes.html,sha256=9ANb3CRbOsCrBkvnZpeAs7idawJZalvo7kB_qtfueJQ,1416
|
|
132
|
+
sky/dashboard/out/workspaces.html,sha256=VHh1d_aaTWNOydZH5uDKJJMPvug8g6mULkRjqxigNCU,1422
|
|
133
|
+
sky/dashboard/out/_next/static/Haazh5IQz6F8Wyiqxcaj8/_buildManifest.js,sha256=fU6juI23eV2o12c76krAvb_jtylYA6BZxZI6dTzZ_Es,2428
|
|
134
|
+
sky/dashboard/out/_next/static/Haazh5IQz6F8Wyiqxcaj8/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
|
|
133
135
|
sky/dashboard/out/_next/static/chunks/1121-d0782b9251f0fcd3.js,sha256=jIvnDxaTleAz3HdZK9-RScSB0ZMg8-D63KQmn8avaHI,8883
|
|
134
136
|
sky/dashboard/out/_next/static/chunks/1141-159df2d4c441a9d1.js,sha256=kdYh_Ek9hdib5emC7Iezojh3qASBnOIUHH5zX_ScR0U,17355
|
|
135
137
|
sky/dashboard/out/_next/static/chunks/1272-1ef0bf0237faccdb.js,sha256=VJ6y-Z6Eg2T93hQIRfWAbjAkQ7nQhglmIaVbEpKSILY,38451
|
|
136
138
|
sky/dashboard/out/_next/static/chunks/1836-37fede578e2da5f8.js,sha256=2ibdKVUjO2N62T4dtfY0xsRFwG-IJh41sK450Dv0_48,10554
|
|
137
139
|
sky/dashboard/out/_next/static/chunks/2350.fab69e61bac57b23.js,sha256=TQCHO4AUL9MZo1e_8GOiL8y6vjQpj5tdXZ8oCKwM1LA,271
|
|
138
|
-
sky/dashboard/out/_next/static/chunks/3015-
|
|
140
|
+
sky/dashboard/out/_next/static/chunks/3015-8d748834fcc60b46.js,sha256=tj3H7To9B1N0JYiKiOjl-9n6BxWftbuDIuN7kKPtzrg,39407
|
|
139
141
|
sky/dashboard/out/_next/static/chunks/3294.93d9336bdc032b3a.js,sha256=x3dU97W3J2NHFar0SLASawUOTFcMAA7-l37BP7CQF_Y,43099
|
|
140
142
|
sky/dashboard/out/_next/static/chunks/3785.0fa442e16dd3f00e.js,sha256=4jP00x0jORTUAIGFUlQu_Ut-T07_OmfH46D5Nut_crQ,4438
|
|
141
143
|
sky/dashboard/out/_next/static/chunks/3850-ff4a9a69d978632b.js,sha256=XphBY9psNzmvGD28zgDunQEb-TX0_eOVaElmcuOjD1g,7455
|
|
@@ -157,7 +159,7 @@ sky/dashboard/out/_next/static/chunks/7325.b4bc99ce0892dcd5.js,sha256=5x42A-PEZA
|
|
|
157
159
|
sky/dashboard/out/_next/static/chunks/7411-b15471acd2cba716.js,sha256=Dnmr9e-yZQbnkjwzqIZU3aK-3u1Tqr8STF-ODYWLkaw,13304
|
|
158
160
|
sky/dashboard/out/_next/static/chunks/754-d0da8ab45f9509e9.js,sha256=R6UUmK1P1PfVx9zOU0jlBsVSk5ZchuPwWObAeVkkhU0,785694
|
|
159
161
|
sky/dashboard/out/_next/static/chunks/7669.1f5d9a402bf5cc42.js,sha256=FbppLXkHKPxzVKrJg15FwCoqLU18yn5jBgYgDkjqDGM,52179
|
|
160
|
-
sky/dashboard/out/_next/static/chunks/8969-
|
|
162
|
+
sky/dashboard/out/_next/static/chunks/8969-66237729cdf9749e.js,sha256=roQUWHfOmYlOYM3DTfaMCjFmm8QQWQx7sN1VodZFeso,13915
|
|
161
163
|
sky/dashboard/out/_next/static/chunks/9025.c12318fb6a1a9093.js,sha256=1Txv8nMuBYtB0UoWdwmFbkA2iB85jgKB1EJJrE1ETDo,10605
|
|
162
164
|
sky/dashboard/out/_next/static/chunks/9037-d0c00018a5ba198c.js,sha256=6P21MKO405fAX4VTgiwOI6OMzey3HW2TfPvOMUMmUVQ,19843
|
|
163
165
|
sky/dashboard/out/_next/static/chunks/fd9d1056-86323a29a8f7e46a.js,sha256=2lquiZSfbI-gX4j4TW4JSMLL_D5ShqwydgWpFyXrTy8,172834
|
|
@@ -165,7 +167,7 @@ sky/dashboard/out/_next/static/chunks/framework-cf60a09ccd051a10.js,sha256=_Qbam
|
|
|
165
167
|
sky/dashboard/out/_next/static/chunks/main-app-587214043926b3cc.js,sha256=t7glRfataAjNw691Wni-ZU4a3BsygRzPKoI8NOm-lsY,116244
|
|
166
168
|
sky/dashboard/out/_next/static/chunks/main-f15ccb73239a3bf1.js,sha256=jxOPLDVX3rkMc_jvGx2a-N2v6mvfOa8O6V0o-sLT0tI,110208
|
|
167
169
|
sky/dashboard/out/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js,sha256=6QPOwdWeAVe8x-SsiDrm-Ga6u2DkqgG5SFqglrlyIgA,91381
|
|
168
|
-
sky/dashboard/out/_next/static/chunks/webpack-
|
|
170
|
+
sky/dashboard/out/_next/static/chunks/webpack-3286453d56f3c0a0.js,sha256=72ni9jqp5FlgH5VNyLyd1bcuo5siUa3kZe3w02tswSg,4742
|
|
169
171
|
sky/dashboard/out/_next/static/chunks/pages/_app-ce361c6959bc2001.js,sha256=mllo4Yasw61zRtEO49uE_MrAutg9josSJShD0DNSjf0,95518
|
|
170
172
|
sky/dashboard/out/_next/static/chunks/pages/_error-c66a4e8afc46f17b.js,sha256=vjERjtMAbVk-19LyPf1Jc-H6TMcrSznSz6brzNqbqf8,253
|
|
171
173
|
sky/dashboard/out/_next/static/chunks/pages/clusters-469814d711d63b1b.js,sha256=p8CQtv5n745WbV7QdyCapmglI2s_2UBB-f_KZE4RAZg,879
|
|
@@ -177,41 +179,39 @@ sky/dashboard/out/_next/static/chunks/pages/users-018bf31cda52e11b.js,sha256=mZu
|
|
|
177
179
|
sky/dashboard/out/_next/static/chunks/pages/volumes-739726d6b823f532.js,sha256=URJ4PMHh15XCXB6os2a7ymR3mG3MfTNrKyizYEhW2OE,836
|
|
178
180
|
sky/dashboard/out/_next/static/chunks/pages/workspaces-7528cc0ef8c522c5.js,sha256=y_qEXM9YPRja20D8IVLj8mgIEHQPQr2Le733bVrsXJw,863
|
|
179
181
|
sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]-e052384df65ef200.js,sha256=i9XnmK5y5f83bYYZIAdMHPsPixB5FcTgOPKtIl3ADFM,19942
|
|
180
|
-
sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/[job]-
|
|
182
|
+
sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/[job]-72794fc3fcdd517a.js,sha256=4_DRvO8RVWAEVGMp2CXJTqPcxzHcSt-cDa0Ay_9ntdE,26590
|
|
181
183
|
sky/dashboard/out/_next/static/chunks/pages/infra/[context]-6563820e094f68ca.js,sha256=P3fWbG3DX-Q1SusyuaCuJILvs9suIxNsdo1SRAenZpc,847
|
|
182
184
|
sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-dd64309c3fe67ed2.js,sha256=pDCMgJauG-gMgWzCSTF3CBcc_WduZw75NhuyRBbm8bg,29203
|
|
183
185
|
sky/dashboard/out/_next/static/chunks/pages/jobs/pools/[pool]-509b2977a6373bf6.js,sha256=mCtSCJGhIG3YzwZnne61lhyfTy-Cmy80wTX0GThDWNo,25754
|
|
184
186
|
sky/dashboard/out/_next/static/chunks/pages/workspace/new-3f88a1c7e86a3f86.js,sha256=83s5N5CZwIaRcmYMfqn2we60n2VRmgFw6Tbx18b8-e0,762
|
|
185
187
|
sky/dashboard/out/_next/static/chunks/pages/workspaces/[name]-af76bb06dbb3954f.js,sha256=cGCpDszMI6ckUHVelwAh9ZVk1erfz_UXSLz9GCqGUAE,1495
|
|
186
188
|
sky/dashboard/out/_next/static/css/4614e06482d7309e.css,sha256=nk6GriyGVd1aGXrLd7BcMibnN4v0z-Q_mXGxrHFWqrE,56126
|
|
187
|
-
sky/dashboard/out/
|
|
188
|
-
sky/dashboard/out/
|
|
189
|
-
sky/dashboard/out/
|
|
190
|
-
sky/dashboard/out/
|
|
191
|
-
sky/dashboard/out/
|
|
192
|
-
sky/dashboard/out/jobs/[job].html,sha256=7hyl5cKq214FX87R8Lsge4PM4pguCnqeoM8f49pchhA,2304
|
|
193
|
-
sky/dashboard/out/jobs/pools/[pool].html,sha256=fe-Q2gIuIxy1yuZuK-sPknafiESC5amEA1md3JGs4OU,2142
|
|
189
|
+
sky/dashboard/out/clusters/[cluster].html,sha256=v2wAPdPggEbzWwCv4ShB9bI6aT2MwOfDrMIRmddOdMk,2936
|
|
190
|
+
sky/dashboard/out/clusters/[cluster]/[job].html,sha256=hVAvKfrD2rJvCF_ryrrkmuUycbmPB8xryuX2CM0Jf8M,2073
|
|
191
|
+
sky/dashboard/out/infra/[context].html,sha256=PeQfdiKovWN5Dq3YMtB9_TebvZmCxuBIaQTWsoRYPtI,1436
|
|
192
|
+
sky/dashboard/out/jobs/[job].html,sha256=t-e2le9WFqkL2hySYqK5y1feJUas0JKGgZpl5O2c3J4,2304
|
|
193
|
+
sky/dashboard/out/jobs/pools/[pool].html,sha256=doXzAIBDesU6Ym8aBSfD40nBeB9P9fPhYM4Ugdz3Xl4,2142
|
|
194
194
|
sky/dashboard/out/videos/cursor-small.mp4,sha256=8tRdp1vjawOrXUar1cfjOc-nkaKmcwCPZx_LO0XlCvQ,203285
|
|
195
|
-
sky/dashboard/out/workspace/new.html,sha256=
|
|
196
|
-
sky/dashboard/out/workspaces/[name].html,sha256=
|
|
195
|
+
sky/dashboard/out/workspace/new.html,sha256=K6HJ2TUYlMNXtpBdiacnyy4Zi-vmU-yPDKziEYP0TlA,1428
|
|
196
|
+
sky/dashboard/out/workspaces/[name].html,sha256=XQujwuXBJwPbNE0mkHCxA7BJY--Yc_3Pzc3MPSA2qfc,2759
|
|
197
197
|
sky/data/__init__.py,sha256=Nhaf1NURisXpZuwWANa2IuCyppIuc720FRwqSE2oEwY,184
|
|
198
198
|
sky/data/data_transfer.py,sha256=N8b0CQebDuHieXjvEVwlYmK6DbQxUGG1RQJEyTbh3dU,12040
|
|
199
199
|
sky/data/data_utils.py,sha256=AjEA_JRjo9NBMlv-Lq5iV4lBED_YZ1VqBR9pG6fGVWE,35179
|
|
200
200
|
sky/data/mounting_utils.py,sha256=QZjcSNB3HiQgzIodbx0I-IyKaW_XUzUuNTpgJAZAfEk,24594
|
|
201
201
|
sky/data/storage.py,sha256=y6cIgfmhgL8ldjHR7whg2q71TzFQ3Lxiyv6d3anC62I,209290
|
|
202
|
-
sky/data/storage_utils.py,sha256=
|
|
202
|
+
sky/data/storage_utils.py,sha256=bqCE7WQVOpFMxqVRkxee4oLn-iImh4ZL8qB5IicXh0w,14230
|
|
203
203
|
sky/jobs/__init__.py,sha256=BiABNdlab7xZDOv4C34kc1XuxG6C_Ip7Q96mT2iCnIg,1686
|
|
204
204
|
sky/jobs/constants.py,sha256=74kv_hCMbzDCYIXqa8Tc2BmECweNZIO2s5mP0IDunmg,3500
|
|
205
205
|
sky/jobs/controller.py,sha256=SymwS24D0nLuVJ_yBgF6055TQptglDiOdssCPNWHy-g,57020
|
|
206
206
|
sky/jobs/recovery_strategy.py,sha256=w8HqSnnVJ10nH-ENFO3NpIM70cyxBzTijzH6EFggiaM,36948
|
|
207
207
|
sky/jobs/scheduler.py,sha256=rUait5vQoIxAMuxWDRkR6DtFpmmVqQHxECHyhhrY9HI,16564
|
|
208
|
-
sky/jobs/state.py,sha256=
|
|
209
|
-
sky/jobs/utils.py,sha256=
|
|
208
|
+
sky/jobs/state.py,sha256=GarWqeMip2dCHXDLPCTDpXnfrS5kiOanJ3wi8gpo6MA,85229
|
|
209
|
+
sky/jobs/utils.py,sha256=qdwW8KomRaZS3d4FjU7gMkRULfcDT64BbpzUKap-tQs,94601
|
|
210
210
|
sky/jobs/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
211
211
|
sky/jobs/client/sdk.py,sha256=HQdnZtK-yWXvOX5XEVZU145vIzfCvYZFtL6uzQEm6-c,17133
|
|
212
212
|
sky/jobs/client/sdk_async.py,sha256=hsyPshdpbKG0RUzw2ntDeAJAkOIl-O9WDoSREV_km3o,4875
|
|
213
213
|
sky/jobs/server/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
214
|
-
sky/jobs/server/core.py,sha256=
|
|
214
|
+
sky/jobs/server/core.py,sha256=ldGh0b_jx1Jw-KTUdQ84RWsTxEDhgbWTp_a_8OCwiwk,48079
|
|
215
215
|
sky/jobs/server/server.py,sha256=oCFOE58oSXspgxIj4BaPIkqTrH0SUzgH0c__OG4Wc60,8894
|
|
216
216
|
sky/jobs/server/utils.py,sha256=rI_fVyEJhHjuapcB6JefkKgRuT_VeLiubAixsPo5jj0,5023
|
|
217
217
|
sky/logs/__init__.py,sha256=zW4gAEvWDz5S53FlLp3krAuKrmTSJ0e3kZDnhxSbW4E,722
|
|
@@ -263,14 +263,14 @@ sky/provision/hyperbolic/config.py,sha256=N7ekDE57bc8GPQc4zabQ1f9y95syadpADRRH6g
|
|
|
263
263
|
sky/provision/hyperbolic/instance.py,sha256=reVLEEnzxD4NGpRIf1MOOs0vr7cFO7rJVRMCn7LBiAg,17307
|
|
264
264
|
sky/provision/hyperbolic/utils.py,sha256=NCa3ULvIi64-YHYoOnPd3SShlJ6VuQsEwaTBqHFrqpg,14953
|
|
265
265
|
sky/provision/kubernetes/__init__.py,sha256=xUHCbN5fkbnM5_E1trFHHOndTsvEwBdi-8qvvpK92io,1030
|
|
266
|
-
sky/provision/kubernetes/config.py,sha256=
|
|
266
|
+
sky/provision/kubernetes/config.py,sha256=iY6WfgmRK_z5mzHGe_8hQS2Op3qKmZ18UY2MgArIGRE,27782
|
|
267
267
|
sky/provision/kubernetes/constants.py,sha256=vZJQsAVjAgwsOskB48tIFSXtNw7IFnJOQE_H6N-vOYQ,1130
|
|
268
|
-
sky/provision/kubernetes/instance.py,sha256=
|
|
268
|
+
sky/provision/kubernetes/instance.py,sha256=Ii-aeRoXKrscmeGfS_AZcMaaA74vJ2aKvD1rBaTowIg,76175
|
|
269
269
|
sky/provision/kubernetes/network.py,sha256=Dgj8u7IQBHKHt-mSDhYzue1wfDk96FR_8fO89TwuZ2E,12846
|
|
270
|
-
sky/provision/kubernetes/network_utils.py,sha256=
|
|
271
|
-
sky/provision/kubernetes/utils.py,sha256=
|
|
270
|
+
sky/provision/kubernetes/network_utils.py,sha256=qFiACDq4S1WKMyVbxhGax-K2SJM-4viC8CyEzwvXt6c,11480
|
|
271
|
+
sky/provision/kubernetes/utils.py,sha256=LYk1OIw8YwbYuKvcYpjGqU64hJMvnXtONd7b2ew2vXA,148742
|
|
272
272
|
sky/provision/kubernetes/volume.py,sha256=b5mozvUCw9rsGxiUS9LxR-MyELK-EQHYglJkGTFNobY,11473
|
|
273
|
-
sky/provision/kubernetes/manifests/fusermount-server-daemonset.yaml,sha256=
|
|
273
|
+
sky/provision/kubernetes/manifests/fusermount-server-daemonset.yaml,sha256=5oDGZUsDpO1B9E9JZptkakdIy7LWVR_CqHFFZpMulJE,1270
|
|
274
274
|
sky/provision/lambda_cloud/__init__.py,sha256=6EEvSgtUeEiup9ivIFevHmgv0GqleroO2X0K7TRa2nE,612
|
|
275
275
|
sky/provision/lambda_cloud/config.py,sha256=jq1iLzp4Up61r4JGxvtpVbJlgXnea3LHYQhCQyyl7ik,272
|
|
276
276
|
sky/provision/lambda_cloud/instance.py,sha256=DVHeA1jVKJmcDa64TywbJsXNehsl5Vm9es1l0wnEsfY,12977
|
|
@@ -329,7 +329,7 @@ sky/provision/vsphere/common/vapiconnect.py,sha256=piU29ZfdYCJQMV5n-5J0EQ8G56AWO
|
|
|
329
329
|
sky/provision/vsphere/common/vim_utils.py,sha256=TjDgxIzV5Iuc5j1aFNL3NpaOwS0KKXhEUEwq7dzQT-s,17849
|
|
330
330
|
sky/schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
331
331
|
sky/schemas/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
332
|
-
sky/schemas/api/responses.py,sha256=
|
|
332
|
+
sky/schemas/api/responses.py,sha256=4KEvw8-lhI81JPRK3gw5Y4AgYJNOqi0bYHPO0KzuiKA,6778
|
|
333
333
|
sky/schemas/db/README,sha256=M93NBw29groxXu-Gy7sgqSyxpppXpRBbXxEXANLhVCo,122
|
|
334
334
|
sky/schemas/db/env.py,sha256=T-2a00Z9RcaIqcMu90R-RNA_lCutsWBRopDy4LQFnoM,2918
|
|
335
335
|
sky/schemas/db/script.py.mako,sha256=04kgeBtNMa4cCnG8CfQcKt6P6rnloIfj8wy0u_DBydM,704
|
|
@@ -408,8 +408,8 @@ sky/server/requests/queues/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
|
|
|
408
408
|
sky/server/requests/queues/local_queue.py,sha256=X6VkBiUmgd_kfqIK1hCtMWG1b8GiZbY70TBiBR6c6GY,416
|
|
409
409
|
sky/server/requests/queues/mp_queue.py,sha256=jDqP4Jd28U3ibSFyMR1DF9I2OWZrPZqFJrG5S6RFpyw,3403
|
|
410
410
|
sky/server/requests/serializers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
411
|
-
sky/server/requests/serializers/decoders.py,sha256=
|
|
412
|
-
sky/server/requests/serializers/encoders.py,sha256=
|
|
411
|
+
sky/server/requests/serializers/decoders.py,sha256=4V3muIPH_QU_CfGyoHD99IXuJbKZKZ6rhmA7S-N2L58,8201
|
|
412
|
+
sky/server/requests/serializers/encoders.py,sha256=kEGUqUDx5mpc2DBxhzcGrSP325R1aMPg5NXUVScXfUs,8425
|
|
413
413
|
sky/setup_files/MANIFEST.in,sha256=4gbgHHwSdP6BbMJv5XOt-2K6wUVWF_T9CGsdESvh918,776
|
|
414
414
|
sky/setup_files/alembic.ini,sha256=854_UKvCaFmZ8vI16tSHbGgP9IMFQ42Td6c9Zmn2Oxs,5079
|
|
415
415
|
sky/setup_files/dependencies.py,sha256=sgsKCFkGlZXFm1xi50X9TvwM4L_pIhxls-ySAbfZJ94,8888
|
|
@@ -463,8 +463,7 @@ sky/templates/jobs-controller.yaml.j2,sha256=Yif85ihH1Q7YziQ55-KkLaBkkbZUrtE5lmQ
|
|
|
463
463
|
sky/templates/kubernetes-ingress.yml.j2,sha256=73iDklVDWBMbItg0IexCa6_ClXPJOxw7PWz3leku4nE,1340
|
|
464
464
|
sky/templates/kubernetes-loadbalancer.yml.j2,sha256=Dc44sC_-EwDG69eZoD4pkLKQjzxH_qrlhd-rZ2gePJc,804
|
|
465
465
|
sky/templates/kubernetes-port-forward-proxy-command.sh,sha256=iw7mypHszg6Ggq9MbyiYMFOkSlXaQZulaxqC5IWYGCc,3381
|
|
466
|
-
sky/templates/kubernetes-ray.yml.j2,sha256=
|
|
467
|
-
sky/templates/kubernetes-ssh-jump.yml.j2,sha256=k5W5sOIMppU7dDkJMwPlqsUcb92y7L5_TVG3hkgMy8M,2747
|
|
466
|
+
sky/templates/kubernetes-ray.yml.j2,sha256=BJZFjOtSagK3us7D0uqtqmfPGHhmPGfsFnxTMIk2PSk,64381
|
|
468
467
|
sky/templates/lambda-ray.yml.j2,sha256=PbUjxrGhyxhXxL2cmONAI_PRsua3I3Xr5V8yoEy7H6c,4760
|
|
469
468
|
sky/templates/local-ray.yml.j2,sha256=FNHeyHF6nW9nU9QLIZceUWfvrFTTcO51KqhTnYCEFaA,1185
|
|
470
469
|
sky/templates/nebius-ray.yml.j2,sha256=W1y4Mcg3yrBiaKFoKKCO_T2tU3DTqes216vKX4dspyk,6782
|
|
@@ -506,11 +505,11 @@ sky/utils/control_master_utils.py,sha256=iD4M0onjYOdZ2RuxjwMBl4KhafHXJzuHjvqlBUn
|
|
|
506
505
|
sky/utils/controller_utils.py,sha256=Ci8kA00qvBsjeKxTyFcxPhamf1e7F9S0LuggBA6to0o,59951
|
|
507
506
|
sky/utils/dag_utils.py,sha256=kPakbl9CVo1RECow7QHnp8Am-qLiTUWEcIPIUBKN1JQ,8563
|
|
508
507
|
sky/utils/directory_utils.py,sha256=hpvl7i5AFMffbg9TuIu1iRO8RqtLXMbSU_COkSf1Exc,327
|
|
509
|
-
sky/utils/env_options.py,sha256=
|
|
508
|
+
sky/utils/env_options.py,sha256=AhC3WEHGwOhW7YYpL1klm3wFChp_YMBAg52KHCZhAs0,2302
|
|
510
509
|
sky/utils/git.py,sha256=6TcTSHF7ZKkvY6hWfaoBxYNhhgwPbzjLzsAZMDyPQ5M,22526
|
|
511
510
|
sky/utils/git_clone.sh,sha256=hXOz7i1MCYl2IwMdKnFYhinhh8Jaf5a1Qwd65cePQYc,17790
|
|
512
511
|
sky/utils/infra_utils.py,sha256=WkkB4Hj6CX-3eV029fPYqydNVyFZ8ZwRAVA_GCLJ9QU,6981
|
|
513
|
-
sky/utils/kubernetes_enums.py,sha256=
|
|
512
|
+
sky/utils/kubernetes_enums.py,sha256=C2AZLqUvYOUg9ligoV2IV8xIvKa34p3ZaoM_1HIWdRs,1053
|
|
514
513
|
sky/utils/lock_events.py,sha256=qX4-Nlzm4S9bTD4e2eg2Vgn4AOlTjy7rhzLS_0B1IdA,2827
|
|
515
514
|
sky/utils/locks.py,sha256=qGxjEJXOyobhiHkeEn1LEFM2mBDhkWUhleLvWMoYb2A,12144
|
|
516
515
|
sky/utils/log_utils.py,sha256=RB5n58CAWmVepd_RAf-mjL2EViBFbtkPtSB5jJT6pLY,29684
|
|
@@ -521,7 +520,7 @@ sky/utils/resource_checker.py,sha256=uM6erLKU73k_tfuldh_kCj9gxhjuy0khI4TMSC6aCes
|
|
|
521
520
|
sky/utils/resources_utils.py,sha256=3wnzmSIldFS5NmHTx6r2viS8zaP1q20noQolgQqucUU,16722
|
|
522
521
|
sky/utils/rich_console_utils.py,sha256=wPvAlshaFHuMZSjiDnaK3OSBppZLBjAn-lj7AvxNBQk,553
|
|
523
522
|
sky/utils/rich_utils.py,sha256=Zb48ZeOX58WG2me48XYk2VO4N_BXL154xJwqlHu0zw8,20031
|
|
524
|
-
sky/utils/schemas.py,sha256=
|
|
523
|
+
sky/utils/schemas.py,sha256=dtyKZjv1-t010khv6yf6ckJ_JaOzbfUXhE6eUTBrsrM,58042
|
|
525
524
|
sky/utils/serialize_utils.py,sha256=nn2x-8cTZeiVr5cgaBpLOGGpSFtms62QAJFyxs_bodI,630
|
|
526
525
|
sky/utils/status_lib.py,sha256=QGkd6COD1GX1h30Mk9RMUdyeUOMJs5971GkxTcFgdsU,1705
|
|
527
526
|
sky/utils/subprocess_utils.py,sha256=0EcUxvHHUdGQS7HBVtDg_vibMbZRjC8oH_M08wEmHpY,15991
|
|
@@ -553,23 +552,21 @@ sky/utils/kubernetes/k8s_gpu_labeler_setup.yaml,sha256=VLKT2KKimZu1GDg_4AIlIt488
|
|
|
553
552
|
sky/utils/kubernetes/kubernetes_deploy_utils.py,sha256=B8pjaEl1JE9uAEmIqY1kfVj7vbuztWPa8Xacdbp58sU,22142
|
|
554
553
|
sky/utils/kubernetes/rsync_helper.sh,sha256=MT29sI5iD2QxYlXFwrN16oq0Er4TPFQVs4Z4A3U4a7Q,2483
|
|
555
554
|
sky/utils/kubernetes/ssh-tunnel.sh,sha256=60eHKF7phJe9pFEkGlqdwWzI80tpog8QCkL7fAbIAic,12143
|
|
556
|
-
sky/utils/kubernetes/ssh_jump_lifecycle_manager.py,sha256=Kq1MDygF2IxFmu9FXpCxqucXLmeUrvs6OtRij6XTQbo,6554
|
|
557
555
|
sky/utils/kubernetes/ssh_utils.py,sha256=hPV2gU6j3j1aVf8kFvkux_KE88R5j8-JUDEopG6v70o,9046
|
|
558
556
|
sky/volumes/__init__.py,sha256=oy7JTgRXxkK2nOOF-OWivr0xeSL1-Syz703kZEuUnn0,241
|
|
559
|
-
sky/volumes/utils.py,sha256=rBUDbR2nGmoreVXGs_6DbxHKzp9Yyg36eTnsqo4JKQk,7408
|
|
560
557
|
sky/volumes/volume.py,sha256=8K0EfriVslXmVnbIj0FJEv0TAoCvUpls9pSrdLAMujc,7842
|
|
561
558
|
sky/volumes/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
562
|
-
sky/volumes/client/sdk.py,sha256=
|
|
559
|
+
sky/volumes/client/sdk.py,sha256=VNZPmx09FSSpn7oVoYWtiY71DLA3BBhM1XXlAWipJmU,4183
|
|
563
560
|
sky/volumes/server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
564
|
-
sky/volumes/server/core.py,sha256=
|
|
561
|
+
sky/volumes/server/core.py,sha256=ZdKcedOZQEZYT-s-4qQIce5KgIw5AfVNLaPnsIblZkg,9974
|
|
565
562
|
sky/volumes/server/server.py,sha256=eCRCygyGeaTkrae7gxjscqTpJ3EaaRjS_mnsHBkrR5E,4552
|
|
566
563
|
sky/workspaces/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
567
564
|
sky/workspaces/core.py,sha256=kRrdh-8MhX1953pML1B_DoStnDuNrsmHcZlnWoAxVo0,27218
|
|
568
565
|
sky/workspaces/server.py,sha256=Box45DS54xXGHy7I3tGKGy-JP0a8G_z6IhfvGlEXtsA,3439
|
|
569
566
|
sky/workspaces/utils.py,sha256=IIAiFoS6sdb2t0X5YoX9AietpTanZUQNTK8cePun-sY,2143
|
|
570
|
-
skypilot_nightly-1.0.0.
|
|
571
|
-
skypilot_nightly-1.0.0.
|
|
572
|
-
skypilot_nightly-1.0.0.
|
|
573
|
-
skypilot_nightly-1.0.0.
|
|
574
|
-
skypilot_nightly-1.0.0.
|
|
575
|
-
skypilot_nightly-1.0.0.
|
|
567
|
+
skypilot_nightly-1.0.0.dev20251003.dist-info/licenses/LICENSE,sha256=emRJAvE7ngL6x0RhQvlns5wJzGI3NEQ_WMjNmd9TZc4,12170
|
|
568
|
+
skypilot_nightly-1.0.0.dev20251003.dist-info/METADATA,sha256=ZXOkdungAYdGnjzCNg2A1Ce6h6RqMJsOK7NtzZC23lI,20433
|
|
569
|
+
skypilot_nightly-1.0.0.dev20251003.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
570
|
+
skypilot_nightly-1.0.0.dev20251003.dist-info/entry_points.txt,sha256=StA6HYpuHj-Y61L2Ze-hK2IcLWgLZcML5gJu8cs6nU4,36
|
|
571
|
+
skypilot_nightly-1.0.0.dev20251003.dist-info/top_level.txt,sha256=qA8QuiNNb6Y1OF-pCUtPEr6sLEwy2xJX06Bd_CrtrHY,4
|
|
572
|
+
skypilot_nightly-1.0.0.dev20251003.dist-info/RECORD,,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3015],{23015:function(e,s,t){t.r(s),t.d(s,{ClusterJobs:function(){return H},ManagedJobs:function(){return Z},ManagedJobsTable:function(){return B},Status2Actions:function(){return q},filterJobsByName:function(){return J},filterJobsByPool:function(){return O},filterJobsByUser:function(){return W},filterJobsByWorkspace:function(){return U},statusGroups:function(){return z}});var a=t(85893),r=t(67294),l=t(11163),n=t(41664),i=t.n(n),c=t(55739),o=t(30803),d=t(37673),u=t(68764),h=t(36989),x=t(51214),m=t(68969),p=t(6378);class j{_generateFilterKey(e){let{allUsers:s=!0,nameMatch:t,userMatch:a,workspaceMatch:r,poolMatch:l,statuses:n}=e;return["allUsers:".concat(s),t?"name:".concat(t):"",a?"user:".concat(a):"",r?"workspace:".concat(r):"",l?"pool:".concat(l):"",n&&n.length>0?"statuses:".concat(n.sort().join(",")):""].filter(Boolean).join("|")||"default"}_getCacheStatus(e){let s=this.fullDataCache.get(e),t=Date.now();if(!s)return{isCached:!1,isFresh:!1,age:0,maxAge:12e4,hasData:!1};let a=t-s.timestamp;return{isCached:!0,isFresh:a<12e4,age:a,maxAge:12e4,hasData:s.jobs&&Array.isArray(s.jobs),data:s}}async getPaginatedJobs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{page:s=1,limit:t=10,...a}=e,r=this._generateFilterKey(a);try{let e=this._getCacheStatus(r);if(e.isCached&&e.hasData){let l=e.data;if(!l.jobs||Array.isArray(l.jobs)&&0===l.jobs.length){if(!this.prefetching.has(r)){let e=this._loadFullDataset(a,r).catch(()=>{}).finally(()=>this.prefetching.delete(r));this.prefetching.set(r,e)}}else{let n=(s-1)*t,i=l.jobs.slice(n,n+t);if(!this.prefetching.has(r)&&(!e.isFresh||e.age>e.maxAge/2)){let e=this._loadFullDataset(a,r).catch(()=>{}).finally(()=>this.prefetching.delete(r));this.prefetching.set(r,e)}return{jobs:i,total:l.total,totalNoFilter:l.totalNoFilter||l.total,controllerStopped:l.controllerStopped,statusCounts:l.statusCounts||{},fromCache:!0,cacheStatus:e.isFresh?"local_cache_hit":"local_cache_stale_hit"}}}let l=await p.default.get(m.getManagedJobs,[{...a,page:s,limit:t}]),n=(null==l?void 0:l.jobs)||[],i="number"==typeof(null==l?void 0:l.total)?l.total:n.length,c=!!(null==l?void 0:l.controllerStopped);if(!this.prefetching.has(r)){let e=this._loadFullDataset(a,r).catch(e=>{console.warn("Background prefetch of full jobs failed:",e)}).finally(()=>{this.prefetching.delete(r)});this.prefetching.set(r,e)}return{jobs:n,total:i,totalNoFilter:(null==l?void 0:l.totalNoFilter)||i,controllerStopped:c,statusCounts:(null==l?void 0:l.statusCounts)||{},fromCache:!1,cacheStatus:"server_page_fetch"}}catch(e){return console.error("Error in getPaginatedJobs:",e),{jobs:[],total:0,totalNoFilter:0,controllerStopped:!1,statusCounts:{},fromCache:!1,cacheStatus:"error"}}}async _loadFullDataset(e,s){let t=await p.default.get(m.getManagedJobs,[e]);if(t.controllerStopped||!t.jobs)return t;let a={jobs:t.jobs,total:t.jobs.length,totalNoFilter:t.totalNoFilter||t.jobs.length,controllerStopped:!1,statusCounts:t.statusCounts||{},timestamp:Date.now()};return this.fullDataCache.set(s,a),a}isDataLoading(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=this._generateFilterKey(e);return this.isLoading.has(s)||this.prefetching.has(s)}isDataCached(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=this._generateFilterKey(e),t=this._getCacheStatus(s);return t.isCached&&t.isFresh&&t.hasData}getCacheStatus(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=this._generateFilterKey(e);return this._getCacheStatus(s)}invalidateCache(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(e){let s=this._generateFilterKey(e);this.fullDataCache.delete(s),this.isLoading.delete(s),this.prefetching.delete(s)}else this.fullDataCache.clear(),this.isLoading.clear(),this.prefetching.clear();p.default.invalidateFunction(m.getManagedJobs)}getCacheStats(){let e={cachedFilters:Array.from(this.fullDataCache.keys()),loadingFilters:Array.from(this.isLoading.keys()),prefetchingFilters:Array.from(this.prefetching.keys()),cacheSize:this.fullDataCache.size,loadingCount:this.isLoading.size,prefetchingCount:this.prefetching.size};for(let[s,t]of(e.detailedStatus={},this.fullDataCache.entries())){let a=this._getCacheStatus(s);e.detailedStatus[s]={age:a.age,isFresh:a.isFresh,hasData:a.hasData,jobCount:t.jobs?t.jobs.length:0}}return e}constructor(){this.fullDataCache=new Map,this.isLoading=new Map,this.prefetching=new Map}}let f=new j;var g=t(23266),b=t(17324),v=t(53081),w=t(13626),y=t(23293),N=t(6521),k=t(16826),C=t(92128),S=t(94545),_=t(99307),L=t(20546),E=t(23001),R=t(88950);let D=(e,s)=>{let t={...e.query},a=[],r=[],l=[];s.map((e,s)=>{var t;a.push(null!==(t=e.property.toLowerCase())&&void 0!==t?t:""),r.push(e.operator),l.push(e.value)}),t.property=a,t.operator=r,t.value=l,e.replace({pathname:e.pathname,query:t},void 0,{shallow:!0})},F=(e,s)=>{let t={...e.query},a=t.property,r=t.operator,l=t.value;if(void 0===a)return[];let n=[],i=Array.isArray(a)?a.length:1;if(1===i)n.push({property:s.get(a),operator:r,value:l});else for(let e=0;e<i;e++)n.push({property:s.get(a[e]),operator:r[e],value:l[e]});return n},M=e=>{var s,t;let{propertyList:l=[],valueList:n,setFilters:i,updateURLParams:c,placeholder:o="Filter items"}=e,d=(0,r.useRef)(null),u=(0,r.useRef)(null),[h,x]=(0,r.useState)(!1),[m,p]=(0,r.useState)(""),[j,f]=(0,r.useState)((null===(s=l[0])||void 0===s?void 0:s.value)||"status"),[g,b]=(0,r.useState)([]);(0,r.useEffect)(()=>{let e=e=>{u.current&&!u.current.contains(e.target)&&d.current&&!d.current.contains(e.target)&&x(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]),(0,r.useEffect)(()=>{let e=[];n&&"object"==typeof n&&(e=n[j]||[]),""!==m.trim()&&(e=e.filter(e=>e&&e.toString().toLowerCase().includes(m.toLowerCase()))),b(e)},[j,n,m]);let v=e=>{let s=l.find(s=>s.value===e);return s?s.label:e},w=e=>{i(s=>{let t=[...s,{property:v(j),operator:":",value:e}];return c(t),t}),x(!1),p(""),d.current.focus()};return(0,a.jsxs)("div",{className:"flex flex-row border border-gray-300 rounded-md overflow-visible",children:[(0,a.jsx)("div",{className:"border-r border-gray-300 flex-shrink-0",children:(0,a.jsxs)(R.Ph,{onValueChange:f,value:j,children:[(0,a.jsx)(R.i4,{"aria-label":"Filter Property",className:"focus:ring-0 focus:ring-offset-0 border-none rounded-l-md rounded-r-none w-20 sm:w-24 md:w-32 h-8 text-xs sm:text-sm",children:(0,a.jsx)(R.ki,{placeholder:(null===(t=l[0])||void 0===t?void 0:t.label)||"Status"})}),(0,a.jsx)(R.Bw,{children:l.map((e,s)=>(0,a.jsx)(R.Ql,{value:e.value,children:e.label},"property-item-".concat(s)))})]})}),(0,a.jsxs)("div",{className:"relative flex-1",children:[(0,a.jsx)("input",{type:"text",ref:d,placeholder:o,value:m,onChange:e=>{p(e.target.value),h||x(!0)},onFocus:()=>{x(!0)},onKeyDown:e=>{"Enter"===e.key&&""!==m.trim()?(i(e=>{let s=[...e,{property:v(j),operator:":",value:m}];return c(s),s}),p(""),x(!1)):"Escape"===e.key&&(x(!1),d.current.blur())},className:"h-8 w-full sm:w-96 px-3 pr-8 text-sm border-none rounded-l-none rounded-r-md focus:ring-0 focus:outline-none",autoComplete:"off"}),m&&(0,a.jsx)("button",{onClick:()=>{p(""),x(!1)},className:"absolute right-2 top-1/2 transform -translate-y-1/2 text-gray-400 hover:text-gray-600",title:"Clear filter",tabIndex:-1,children:(0,a.jsx)("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),h&&g.length>0&&(0,a.jsx)("div",{ref:u,className:"absolute z-50 mt-1 w-full bg-white border border-gray-200 rounded-md shadow-lg max-h-60 overflow-y-auto",style:{zIndex:9999},children:g.map((e,s)=>(0,a.jsx)("div",{className:"px-3 py-2 cursor-pointer hover:bg-gray-50 text-sm ".concat(s!==g.length-1?"border-b border-gray-100":""),onClick:()=>w(e),children:(0,a.jsx)("span",{className:"text-sm text-gray-700",children:e})},"".concat(e,"-").concat(s)))})]})]})},I=e=>{let{filters:s=[],setFilters:t,updateURLParams:r}=e,l=e=>{t(s=>{let t=s.filter((s,t)=>t!==e);return r(t),t})};return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:"flex items-center gap-4 py-2 px-2",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-content gap-2",children:[s.map((e,s)=>(0,a.jsx)(A,{filter:e,onRemove:()=>l(s)},"filteritem-".concat(s))),s.length>0&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("button",{onClick:()=>{r([]),t([])},className:"rounded-full px-4 py-1 text-sm text-gray-700 bg-gray-200 hover:bg-gray-300",children:"Clear filters"})})]})})})},A=e=>{let{filter:s,onRemove:t}=e;return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{className:"flex items-center text-blue-600 bg-blue-100 px-1 py-1 rounded-full text-sm",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1 px-2",children:[(0,a.jsx)("span",{children:"".concat(s.property," ")}),(0,a.jsx)("span",{children:"".concat(s.operator," ")}),(0,a.jsx)("span",{children:" ".concat(s.value)})]}),(0,a.jsx)("button",{onClick:()=>t(),className:"p-0.5 ml-1 transform text-gray-400 hover:text-gray-600 bg-blue-500 hover:bg-blue-600 rounded-full flex flex-col items-center",title:"Clear filter",children:(0,a.jsx)("svg",{className:"h-3 w-3",fill:"none",stroke:"white",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:5,d:"M6 18L18 6M6 6l12 12"})})})]})})},z={active:["PENDING","RUNNING","RECOVERING","SUBMITTED","STARTING","CANCELLING"],finished:["SUCCEEDED","FAILED","CANCELLED","FAILED_SETUP","FAILED_PRECHECKS","FAILED_NO_RESOURCE","FAILED_CONTROLLER"]},P=[{label:"Name",value:"name"},{label:"User",value:"user"},{label:"Workspace",value:"workspace"},{label:"Pool",value:"pool"}];function J(e,s){if(!s||""===s.trim())return e;let t=s.toLowerCase().trim();return e.filter(e=>(e.name||"").toLowerCase().includes(t))}function U(e,s){return s&&"ALL_WORKSPACES"!==s?e.filter(e=>(e.workspace||"default").toLowerCase()===s.toLowerCase()):e}function W(e,s){return s&&"ALL_USERS"!==s?e.filter(e=>(e.user_hash||e.user)===s):e}function O(e,s){if(!s||""===s.trim())return e;let t=s.toLowerCase().trim();return e.filter(e=>(e.pool||"").toLowerCase().includes(t))}let T=e=>{if(!e)return"-";let s=e instanceof Date?e:new Date(1e3*e);return(0,a.jsx)(h.Zg,{date:s})};function Z(){let e=(0,l.useRouter)(),[s,t]=(0,r.useState)(!1),[n,c]=(0,r.useState)(!0),[o,d]=(0,r.useState)(!0),u=r.useRef(null),x=r.useRef(null),[j,g]=(0,r.useState)([]),[w,y]=(0,r.useState)([]),N=async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];t(!0),!e&&o&&c(!0);try{let[e]=await Promise.all([p.default.get(m.vs,[{}])]);g(e.pools||[])}catch(e){console.error("Error fetching data:",e)}finally{t(!1),!e&&o&&(c(!1),d(!1))}};(0,r.useEffect)(()=>{N()},[]);let k=s=>{D(e,s)},C=r.useCallback(()=>{let s=new Map;s.set("",""),s.set("status","Status"),s.set("name","Name"),s.set("user","User"),s.set("workspace","Workspace"),s.set("pool","Pool"),y(F(e,s))},[e,y]);return(0,r.useEffect)(()=>{e.isReady&&C()},[e.isReady,e.query.tab,C]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mb-1",children:[(0,a.jsx)("div",{className:"text-base",children:(0,a.jsx)(i(),{href:"/jobs",className:"text-sky-blue hover:underline leading-none",children:"Managed Jobs"})}),(0,a.jsx)("div",{className:"w-full sm:w-auto",children:(0,a.jsx)(M,{propertyList:P,valueList:{},setFilters:y,updateURLParams:k,placeholder:"Filter jobs"})})]}),(0,a.jsx)(I,{filters:w,setFilters:y,updateURLParams:k}),(0,a.jsx)(B,{refreshInterval:h.yc,setLoading:t,refreshDataRef:u,filters:w,onRefresh:()=>{f.invalidateCache(),p.default.invalidate(m.vs,[{}]),p.default.invalidate(b.getWorkspaces),p.default.invalidate(v.R),u.current&&u.current(),x.current&&x.current()},poolsData:j,poolsLoading:n}),(0,a.jsx)("div",{className:"mb-4",children:(0,a.jsx)(V,{refreshInterval:h.yc,setLoading:t,refreshDataRef:x})})]})}function B(e){let{refreshInterval:s,setLoading:t,refreshDataRef:l,filters:n,onRefresh:j,poolsData:b,poolsLoading:v}=e,[N,k]=(0,r.useState)([]),[R,D]=(0,r.useState)(0),[F,M]=(0,r.useState)(0),[I,A]=(0,r.useState)({key:null,direction:"ascending"}),[P,J]=(0,r.useState)(!1),[U,W]=(0,r.useState)(!0),[O,Z]=(0,r.useState)(1),[B,H]=(0,r.useState)(10),[V,Y]=(0,r.useState)(null),Q=(0,r.useRef)(null),[X,$]=(0,r.useState)([]),[ee,es]=(0,r.useState)({}),[et,ea]=(0,r.useState)({}),[er,el]=(0,r.useState)(!1),[en,ei]=(0,r.useState)(!1),[ec,eo]=(0,r.useState)(!1),[ed,eu]=(0,r.useState)("all"),[eh,ex]=(0,r.useState)(!0),[em,ep]=(0,r.useState)({isOpen:!1,title:"",message:"",onConfirm:null}),ej=(0,E.X)(),ef=(0,r.useRef)(0),eg=async()=>{ep({isOpen:!0,title:"Restart Controller",message:"Are you sure you want to restart the controller?",onConfirm:async()=>{try{eo(!0),J(!0),await (0,m.Ce)("restartcontroller"),await eb()}catch(e){console.error("Error restarting controller:",e)}finally{eo(!1),J(!1)}}})},eb=r.useCallback(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=!1!==e.includeStatus,a=ef.current+1;ef.current=a,J(!0),t(!0);try{let e,t;let r=e=>{let s=(n||[]).find(s=>(s.property||"").toLowerCase()===e);return s&&s.value?String(s.value):void 0};X.length>0?t=X:eh?"active"===ed?t=z.active:"finished"===ed&&(t=z.finished):t=[];let l={allUsers:!0,nameMatch:r("name"),userMatch:r("user"),workspaceMatch:r("workspace"),poolMatch:r("pool"),statuses:t,page:O,limit:B},i=null;if(f.isDataCached(l),f.isDataLoading(l),s){let[s,t]=await Promise.all([f.getPaginatedJobs(l),p.default.get(g.getClusters)]);e=s,i=t}else e=await f.getPaginatedJobs(l);let{jobs:c=[],total:o=0,totalNoFilter:d=0,controllerStopped:u=!1,cacheStatus:h="unknown",statusCounts:x={}}=e||{},m=!1,j=!1;if(s&&i){let e=null==i?void 0:i.find(e=>(0,S.Ym)(e.cluster)),s=e?e.status:"NOT_FOUND";"STOPPED"==s&&u&&(m=!0),"LAUNCHING"==s&&(j=!0)}a===ef.current&&(k(c),D(o||0),M(d||0),el(!!m),ei(!!j),ea(x),W(!1))}catch(e){console.error("Error fetching data:",e),a===ef.current&&(k([]),el(!1),W(!1))}finally{a===ef.current&&(J(!1),t(!1))}},[t,n,O,B,X,eh,ed]);r.useEffect(()=>{l&&(l.current=eb)},[l,eb]);let ev=r.useRef(eb);r.useEffect(()=>{ev.current=eb},[eb]),r.useEffect(()=>{eb({includeStatus:!0})},[]),r.useEffect(()=>{eb({includeStatus:!1})},[O]),r.useEffect(()=>{eb({includeStatus:!0})},[n,B]),r.useEffect(()=>{eb({includeStatus:!0})},[ed,X,eh]),(0,r.useEffect)(()=>{let e=setInterval(()=>{ev.current&&ev.current({includeStatus:!0})},s);return()=>{clearInterval(e)}},[s]),(0,r.useEffect)(()=>{Z(1)},[ed]),(0,r.useEffect)(()=>{Z(1)},[n,B]),(0,r.useEffect)(()=>{$([]),ex(!0)},[ed]);let ew=e=>{let s="ascending";I.key===e&&"ascending"===I.direction&&(s="descending"),A({key:e,direction:s})},ey=e=>I.key===e?"ascending"===I.direction?" ↑":" ↓":"";r.useMemo(()=>{let e=N||[];return{active:e.filter(e=>z.active.includes(e.status)).length,finished:e.filter(e=>z.finished.includes(e.status)).length}},[N]);let eN=e=>X.length>0?X.includes(e):"all"===ed||z[ed].includes(e),ek=r.useMemo(()=>N,[N]),eC=r.useMemo(()=>I.key?[...ek].sort((e,s)=>e[I.key]<s[I.key]?"ascending"===I.direction?-1:1:e[I.key]>s[I.key]?"ascending"===I.direction?1:-1:0):ek,[ek,I]),eS=(O-1)*B,e_=R>0?Math.ceil(R/B):0,eL=R>0?Math.min(eS+eC.length,R):0,eE=e=>{if(X.includes(e)){let s=X.filter(s=>s!==e);0===s.length?(ex(!0),$([])):($(s),ex(!1))}else $([...X,e]),ex(!1);Z(1)};return(0,r.useEffect)(()=>{es(et)},[et]),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("div",{className:"flex flex-col space-y-1 mb-1",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between text-sm mb-1",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center",children:[(0,a.jsx)("span",{className:"mr-2 text-sm font-medium",children:"Statuses:"}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2 items-center",children:[!P&&0===F&&!U&&(0,a.jsx)("span",{className:"text-gray-500 mr-2",children:"No jobs found"}),Object.entries(ee).map(e=>{let[s,t]=e;return(0,a.jsxs)("button",{onClick:()=>eE(s),className:"px-3 py-0.5 rounded-full flex items-center space-x-2 ".concat(eN(s)||X.includes(s)?(0,_.Cl)(s):"bg-gray-50 text-gray-600 hover:bg-gray-100"),children:[(0,a.jsx)("span",{children:s}),(0,a.jsx)("span",{className:"text-xs ".concat(eN(s)||X.includes(s)?"bg-white/50":"bg-gray-200"," px-1.5 py-0.5 rounded"),children:t})]},s)}),F>0&&(0,a.jsxs)("div",{className:"flex items-center ml-2 gap-2",children:[(0,a.jsx)("span",{className:"text-gray-500",children:"("}),(0,a.jsx)("button",{onClick:()=>{r.startTransition(()=>{eu("all"),$([]),ex(!0),Z(1)})},className:"text-sm font-medium ".concat("all"===ed&&eh?"text-purple-700 underline":"text-gray-600 hover:text-purple-700 hover:underline"),children:"show all jobs"}),(0,a.jsx)("span",{className:"text-gray-500 mx-1",children:"|"}),(0,a.jsx)("button",{onClick:()=>{r.startTransition(()=>{eu("active"),$([]),ex(!0),Z(1)})},className:"text-sm font-medium ".concat("active"===ed&&eh?"text-green-700 underline":"text-gray-600 hover:text-green-700 hover:underline"),children:"show all active jobs"}),(0,a.jsx)("span",{className:"text-gray-500 mx-1",children:"|"}),(0,a.jsx)("button",{onClick:()=>{r.startTransition(()=>{eu("finished"),$([]),ex(!0),Z(1)})},className:"text-sm font-medium ".concat("finished"===ed&&eh?"text-blue-700 underline":"text-gray-600 hover:text-blue-700 hover:underline"),children:"show all finished jobs"}),(0,a.jsx)("span",{className:"text-gray-500",children:")"})]})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[P&&(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(c.Z,{size:15,className:"mt-0"}),(0,a.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"Loading..."})]}),(0,a.jsxs)("button",{onClick:()=>{j&&j()},disabled:P,className:"text-sky-blue hover:text-sky-blue-bright flex items-center text-sm",children:[(0,a.jsx)(w.Z,{className:"h-4 w-4 mr-1.5"}),(0,a.jsx)("span",{children:"Refresh"})]})]})]})}),ej&&er&&0===eC.length&&!P&&!U&&(0,a.jsx)("div",{className:"mb-4 p-4 bg-gray-50 rounded-lg border",children:(0,a.jsxs)("div",{className:"flex flex-col items-center space-y-3",children:[(0,a.jsxs)("p",{className:"text-gray-700 text-center text-sm",children:["Job controller stopped.",(0,a.jsx)("br",{}),"Restart to check status."]}),(0,a.jsx)(o.z,{variant:"outline",size:"sm",onClick:eg,className:"text-sky-blue hover:text-sky-blue-bright",disabled:P||ec,children:ec?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.Z,{size:12,className:"mr-2"}),"Restarting..."]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(y.Z,{className:"h-4 w-4 mr-2"}),"Restart"]})})]})}),(0,a.jsx)(d.Zb,{children:(0,a.jsx)("div",{className:"overflow-x-auto rounded-lg",children:(0,a.jsxs)(u.iA,{className:"min-w-full",children:[(0,a.jsx)(u.xD,{children:(0,a.jsxs)(u.SC,{children:[(0,a.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>ew("id"),children:["ID",ey("id")]}),(0,a.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>ew("name"),children:["Name",ey("name")]}),(0,a.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>ew("user"),children:["User",ey("user")]}),(0,a.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>ew("workspace"),children:["Workspace",ey("workspace")]}),(0,a.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>ew("submitted_at"),children:["Submitted",ey("submitted_at")]}),(0,a.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>ew("job_duration"),children:["Duration",ey("job_duration")]}),(0,a.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>ew("status"),children:["Status",ey("status")]}),(0,a.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>ew("resources_str"),children:["Requested",ey("resources_str")]}),(0,a.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>ew("infra"),children:["Infra",ey("infra")]}),(0,a.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>ew("cluster"),children:["Resources",ey("cluster")]}),(0,a.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>ew("recoveries"),children:["Recoveries",ey("recoveries")]}),(0,a.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>ew("pool"),children:["Worker Pool",ey("pool")]}),(0,a.jsx)(u.ss,{children:"Details"}),(0,a.jsx)(u.ss,{children:"Logs"})]})}),(0,a.jsx)(u.RM,{children:P&&U?(0,a.jsx)(u.SC,{children:(0,a.jsx)(u.pj,{colSpan:12,className:"text-center py-6 text-gray-500",children:(0,a.jsxs)("div",{className:"flex justify-center items-center",children:[(0,a.jsx)(c.Z,{size:20,className:"mr-2"}),(0,a.jsx)("span",{children:"Loading..."})]})})}):eC.length>0?(0,a.jsx)(a.Fragment,{children:eC.map(e=>(0,a.jsxs)(r.Fragment,{children:[(0,a.jsxs)(u.SC,{children:[(0,a.jsx)(u.pj,{children:(0,a.jsx)(i(),{href:"/jobs/".concat(e.id),className:"text-blue-600",children:e.id})}),(0,a.jsx)(u.pj,{children:(0,a.jsx)(i(),{href:"/jobs/".concat(e.id),className:"text-blue-600",children:e.name})}),(0,a.jsx)(u.pj,{children:(0,a.jsx)(L.H,{username:e.user,userHash:e.user_hash})}),(0,a.jsx)(u.pj,{children:(0,a.jsx)(i(),{href:"/workspaces",className:"text-gray-700 hover:text-blue-600 hover:underline",children:e.workspace||"default"})}),(0,a.jsx)(u.pj,{children:T(e.submitted_at)}),(0,a.jsx)(u.pj,{children:(0,h.LU)(e.job_duration)}),(0,a.jsx)(u.pj,{children:(0,a.jsx)(_.OE,{status:e.status})}),(0,a.jsx)(u.pj,{children:e.requested_resources}),(0,a.jsx)(u.pj,{children:e.infra&&"-"!==e.infra?(0,a.jsx)(h.Md,{content:e.full_infra||e.infra,className:"text-sm text-muted-foreground",children:(0,a.jsxs)("span",{children:[(0,a.jsx)(i(),{href:"/infra",className:"text-blue-600 hover:underline",children:e.cloud||e.infra.split("(")[0].trim()}),e.infra.includes("(")&&(0,a.jsx)("span",{children:" "+(()=>{let s=x.MO.NAME_TRUNCATE_LENGTH,t=e.infra.substring(e.infra.indexOf("(")),a=t.substring(1,t.length-1);if(a.length<=s)return t;let r="".concat(a.substring(0,Math.floor((s-3)/2)),"...").concat(a.substring(a.length-Math.ceil((s-3)/2)));return"(".concat(r,")")})()})]})}):(0,a.jsx)("span",{children:e.infra||"-"})}),(0,a.jsx)(u.pj,{children:(0,a.jsx)(h.Md,{content:e.resources_str_full||e.resources_str,className:"text-sm text-muted-foreground",children:(0,a.jsx)("span",{children:e.resources_str})})}),(0,a.jsx)(u.pj,{children:e.recoveries}),(0,a.jsx)(u.pj,{children:(0,a.jsx)("div",{className:v?"blur-sm transition-all duration-300":"",children:v?"-":(0,h.os)(e.pool,e.pool_hash,b)})}),(0,a.jsx)(u.pj,{children:e.details?(0,a.jsx)(G,{text:e.details,rowId:e.id,expandedRowId:V,setExpandedRowId:Y}):"-"}),(0,a.jsx)(u.pj,{children:(0,a.jsx)(q,{jobParent:"/jobs",jobId:e.id,managed:!0,workspace:e.workspace})})]}),V===e.id&&(0,a.jsx)(K,{text:e.details,colSpan:13,innerRef:Q})]},e.task_job_id))}):(0,a.jsx)(u.SC,{children:(0,a.jsx)(u.pj,{colSpan:13,className:"text-center py-6",children:(0,a.jsxs)("div",{className:"flex flex-col items-center space-y-4",children:[en&&(0,a.jsxs)("div",{className:"flex flex-col items-center space-y-2",children:[(0,a.jsx)("p",{className:"text-gray-700",children:"The managed job controller is launching. It will be ready shortly."}),(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(c.Z,{size:12,className:"mr-2"}),(0,a.jsx)("span",{className:"text-gray-500",children:"Launching..."})]})]}),!er&&!en&&(0,a.jsx)("p",{className:"text-gray-500",children:"No active jobs"}),!ej&&er&&(0,a.jsxs)("div",{className:"flex flex-col items-center space-y-3 px-4",children:[(0,a.jsx)("p",{className:"text-gray-700 text-center text-sm sm:text-base max-w-md",children:"The managed job controller has been stopped. Restart to check the latest job status."}),(0,a.jsx)(o.z,{variant:"outline",size:"sm",onClick:eg,className:"text-sky-blue hover:text-sky-blue-bright",disabled:P||ec,children:ec?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.Z,{size:12,className:"mr-2"}),"Restarting..."]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(y.Z,{className:"h-4 w-4 mr-2"}),"Restart Controller"]})})]})]})})})})]})})}),(0,a.jsx)("div",{className:"flex justify-end items-center py-2 px-4 text-sm text-gray-700",children:(0,a.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("span",{className:"mr-2",children:"Rows per page:"}),(0,a.jsxs)("div",{className:"relative inline-block",children:[(0,a.jsxs)("select",{value:B,onChange:e=>{H(parseInt(e.target.value,10)),Z(1)},className:"py-1 pl-2 pr-6 appearance-none outline-none cursor-pointer border-none bg-transparent",style:{minWidth:"40px"},children:[(0,a.jsx)("option",{value:10,children:"10"}),(0,a.jsx)("option",{value:30,children:"30"}),(0,a.jsx)("option",{value:50,children:"50"}),(0,a.jsx)("option",{value:100,children:"100"}),(0,a.jsx)("option",{value:200,children:"200"})]}),(0,a.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,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),(0,a.jsx)("div",{children:R>0?"".concat(eS+1," – ").concat(eL," of ").concat(R):"0 – 0 of 0"}),(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)(o.z,{variant:"ghost",size:"icon",onClick:()=>{Z(e=>Math.max(e-1,1))},disabled:1===O||!eC||0===eC.length,className:"text-gray-500 h-8 w-8 p-0",children:(0,a.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,a.jsx)("path",{d:"M15 18l-6-6 6-6"})})}),(0,a.jsx)(o.z,{variant:"ghost",size:"icon",onClick:()=>{e_>0&&O<e_&&Z(e=>e+1)},disabled:0===e_||O>=e_||!eC||0===eC.length,className:"text-gray-500 h-8 w-8 p-0",children:(0,a.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,a.jsx)("path",{d:"M9 18l6-6-6-6"})})})]})]})}),(0,a.jsx)(C.cV,{isOpen:em.isOpen,onClose:()=>ep({...em,isOpen:!1}),onConfirm:em.onConfirm,title:em.title,message:em.message,confirmClassName:"bg-blue-600 hover:bg-blue-700 text-white"})]})}function q(e){let{withLabel:s=!1,jobParent:t,jobId:r,managed:n,workspace:i="default"}=e,c=(0,l.useRouter)(),o=(e,s)=>{e.preventDefault(),e.stopPropagation(),c.push({pathname:"".concat(t,"/").concat(r),query:{tab:s}})},d=function(e){let s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e.preventDefault(),e.stopPropagation(),n)(0,m.jh)({jobId:parseInt(r),controller:s});else{let e=t.match(/\/clusters\/(.+)/);if(e){let s=e[1];(0,g.GH)({clusterName:s,jobIds:[r],workspace:i})}}};return(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)(h.WH,{content:"View Job Logs",className:"capitalize text-sm text-muted-foreground",children:(0,a.jsxs)("button",{onClick:e=>o(e,"logs"),className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center h-8",children:[(0,a.jsx)(N.Z,{className:"w-4 h-4"}),s&&(0,a.jsx)("span",{className:"ml-1.5",children:"Logs"})]})},"logs"),(0,a.jsx)(h.WH,{content:"Download Job Logs",className:"capitalize text-sm text-muted-foreground",children:(0,a.jsxs)("button",{onClick:e=>d(e,!1),className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center h-8",children:[(0,a.jsx)(k.Z,{className:"w-4 h-4"}),s&&(0,a.jsx)("span",{className:"ml-1.5",children:"Download"})]})},"downloadlogs")]})}function H(e){let{clusterName:s,clusterJobData:t,loading:l,refreshClusterJobsOnly:n,userFilter:x=null,nameFilter:m=null,workspace:p="default"}=e,[j,f]=(0,r.useState)(null),[g,b]=(0,r.useState)({key:null,direction:"ascending"}),[v,y]=(0,r.useState)(1),[N,k]=(0,r.useState)(10),C=(0,r.useRef)(null),[S,E]=(0,r.useState)(null);(0,r.useEffect)(()=>{let e=e=>{j&&C.current&&!C.current.contains(e.target)&&f(null)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[j]);let R=r.useMemo(()=>{let e=t||[];return x&&"ALL_USERS"!==x&&(e=W(e,x)),m&&(e=J(e,m)),e},[t,x,m]);(0,r.useEffect)(()=>{JSON.stringify(t)!==JSON.stringify(S)&&E(t)},[t,S]);let D=r.useMemo(()=>g.key?[...R].sort((e,s)=>e[g.key]<s[g.key]?"ascending"===g.direction?-1:1:e[g.key]>s[g.key]?"ascending"===g.direction?1:-1:0):R,[R,g]),F=e=>{let s="ascending";g.key===e&&"ascending"===g.direction&&(s="descending"),b({key:e,direction:s})},M=e=>g.key===e?"ascending"===g.direction?" ↑":" ↓":"",I=Math.ceil(D.length/N),A=(v-1)*N,z=A+N,P=D.slice(A,z);return(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsxs)(d.Zb,{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Cluster Jobs"}),(0,a.jsx)("div",{className:"flex items-center",children:n&&(0,a.jsxs)("button",{onClick:n,disabled:l,className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center text-sm ml-2",children:[(0,a.jsx)(w.Z,{className:"w-4 h-4 mr-1"}),"Refresh Jobs"]})})]}),(0,a.jsxs)(u.iA,{children:[(0,a.jsx)(u.xD,{children:(0,a.jsxs)(u.SC,{children:[(0,a.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>F("id"),children:["ID",M("id")]}),(0,a.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>F("job"),children:["Name",M("job")]}),(0,a.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>F("user"),children:["User",M("user")]}),(0,a.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>F("workspace"),children:["Workspace",M("workspace")]}),(0,a.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>F("submitted_at"),children:["Submitted",M("submitted_at")]}),(0,a.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>F("job_duration"),children:["Duration",M("job_duration")]}),(0,a.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>F("status"),children:["Status",M("status")]}),(0,a.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>F("resources"),children:["Resources",M("resources")]}),(0,a.jsx)(u.ss,{className:"whitespace-nowrap",children:"Logs"})]})}),(0,a.jsx)(u.RM,{children:l?(0,a.jsx)(u.SC,{children:(0,a.jsx)(u.pj,{colSpan:9,className:"text-center py-12 text-gray-500",children:(0,a.jsxs)("div",{className:"flex justify-center items-center",children:[(0,a.jsx)(c.Z,{size:24,className:"mr-2"}),(0,a.jsx)("span",{children:"Loading cluster jobs..."})]})})}):P.length>0?P.map(e=>(0,a.jsxs)(r.Fragment,{children:[(0,a.jsxs)(u.SC,{className:j===e.id?"selected-row":"",children:[(0,a.jsx)(u.pj,{children:(0,a.jsx)(i(),{href:"/clusters/".concat(s,"/").concat(e.id),className:"text-blue-600",children:e.id})}),(0,a.jsx)(u.pj,{children:(0,a.jsx)(i(),{href:"/clusters/".concat(s,"/").concat(e.id),className:"text-blue-600",children:(0,a.jsx)(G,{text:e.job||"Unnamed job",rowId:e.id,expandedRowId:j,setExpandedRowId:f})})}),(0,a.jsx)(u.pj,{children:(0,a.jsx)(L.H,{username:e.user,userHash:e.user_hash})}),(0,a.jsx)(u.pj,{children:(0,a.jsx)(i(),{href:"/workspaces",className:"text-gray-700 hover:text-blue-600 hover:underline",children:e.workspace||"default"})}),(0,a.jsx)(u.pj,{children:T(e.submitted_at)}),(0,a.jsx)(u.pj,{children:(0,h.LU)(e.job_duration)}),(0,a.jsx)(u.pj,{children:(0,a.jsx)(_.OE,{status:e.status})}),(0,a.jsx)(u.pj,{children:e.resources}),(0,a.jsx)(u.pj,{className:"flex content-center items-center",children:(0,a.jsx)(q,{jobParent:"/clusters/".concat(s),jobId:e.id,managed:!1,workspace:p})})]}),j===e.id&&(0,a.jsx)(K,{text:e.job||"Unnamed job",colSpan:9,innerRef:C})]},e.id)):(0,a.jsx)(u.SC,{children:(0,a.jsx)(u.pj,{colSpan:8,className:"text-center py-6 text-gray-500",children:"No jobs found"})})})]})]}),D&&D.length>0&&(0,a.jsx)("div",{className:"flex justify-end items-center py-2 px-4 text-sm text-gray-700",children:(0,a.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("span",{className:"mr-2",children:"Rows per page:"}),(0,a.jsxs)("div",{className:"relative inline-block",children:[(0,a.jsxs)("select",{value:N,onChange:e=>{k(parseInt(e.target.value,10)),y(1)},className:"py-1 pl-2 pr-6 appearance-none outline-none cursor-pointer border-none bg-transparent",style:{minWidth:"40px"},children:[(0,a.jsx)("option",{value:5,children:"5"}),(0,a.jsx)("option",{value:10,children:"10"}),(0,a.jsx)("option",{value:20,children:"20"}),(0,a.jsx)("option",{value:50,children:"50"})]}),(0,a.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,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),(0,a.jsxs)("div",{children:[A+1," – ",Math.min(z,D.length)," of"," ",D.length]}),(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)(o.z,{variant:"ghost",size:"icon",onClick:()=>{y(e=>Math.max(e-1,1))},disabled:1===v,className:"text-gray-500 h-8 w-8 p-0",children:(0,a.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,a.jsx)("path",{d:"M15 18l-6-6 6-6"})})}),(0,a.jsx)(o.z,{variant:"ghost",size:"icon",onClick:()=>{y(e=>Math.min(e+1,I))},disabled:v===I||0===I,className:"text-gray-500 h-8 w-8 p-0",children:(0,a.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,a.jsx)("path",{d:"M9 18l6-6-6-6"})})})]})]})})]})}function K(e){let{text:s,colSpan:t,innerRef:r}=e;return(0,a.jsx)(u.SC,{className:"expanded-details",children:(0,a.jsx)(u.pj,{colSpan:t,children:(0,a.jsx)("div",{className:"p-4 bg-gray-50 rounded-md border border-gray-200",ref:r,children:(0,a.jsx)("div",{className:"flex justify-between items-start",children:(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-gray-900",children:"Full Details"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-gray-700",style:{whiteSpace:"pre-wrap"},children:s})]})})})})})}function G(e){let{text:s,rowId:t,expandedRowId:l,setExpandedRowId:n}=e,i=s||"",c=i.length>50,o=l===t,d=c?"".concat(i.substring(0,50)):i,u=(0,r.useRef)(null);return(0,a.jsxs)("div",{className:"truncated-details relative max-w-full flex items-center",children:[(0,a.jsx)("span",{className:"truncate",children:d}),c&&(0,a.jsx)("button",{ref:u,type:"button",onClick:e=>{e.preventDefault(),e.stopPropagation(),n(o?null:t)},className:"text-blue-600 hover:text-blue-800 font-medium ml-1 flex-shrink-0","data-button-type":"show-more-less",children:o?"... show less":"... show more"})]})}function V(e){let{refreshInterval:s,setLoading:t,refreshDataRef:l}=e,[n,o]=(0,r.useState)([]),[x,j]=(0,r.useState)({key:null,direction:"ascending"}),[f,g]=(0,r.useState)(!1),[b,v]=(0,r.useState)(!0),[w,y]=(0,r.useState)(1),[N,k]=(0,r.useState)(10),C=r.useCallback(async()=>{g(!0),t(!0);try{let{pools:e=[]}=await p.default.get(m.vs,[{}])||{};o(e),v(!1)}catch(e){console.error("Error fetching pools data:",e),o([]),v(!1)}finally{g(!1),t(!1)}},[t]);r.useEffect(()=>{l&&(l.current=C)},[l,C]),(0,r.useEffect)(()=>{o([]);let e=!0;C();let t=setInterval(()=>{e&&C()},s);return()=>{e=!1,clearInterval(t)}},[s,C]);let S=e=>{let s="ascending";x.key===e&&"ascending"===x.direction&&(s="descending"),j({key:e,direction:s})},L=e=>x.key===e?"ascending"===x.direction?" ↑":" ↓":"",E=r.useMemo(()=>x.key?[...n].sort((e,s)=>e[x.key]<s[x.key]?"ascending"===x.direction?-1:1:e[x.key]>s[x.key]?"ascending"===x.direction?1:-1:0):n,[n,x]),R=Math.ceil(E.length/N),D=(w-1)*N,F=D+N,M=E.slice(D,F),I=e=>{if(!e||!e.replica_info||0===e.replica_info.length)return"0 (target: 0)";let s=e.replica_info.filter(e=>"READY"===e.status).length,t=e.target_num_replicas||0;return"".concat(s," (target: ").concat(t,")")},A=e=>{let{jobCounts:s}=e;return(0,a.jsx)(h.x9,{jobCounts:s,getStatusStyle:_.Cl})},z=e=>{let{replicaInfo:s}=e;return(0,a.jsx)(h.Kl,{replicaInfo:s})};return(0,a.jsxs)(d.Zb,{children:[(0,a.jsx)("div",{className:"overflow-x-auto rounded-lg",children:(0,a.jsxs)(u.iA,{className:"min-w-full table-fixed",children:[(0,a.jsx)(u.xD,{children:(0,a.jsxs)(u.SC,{children:[(0,a.jsxs)(u.ss,{className:"sortable whitespace-nowrap w-32",onClick:()=>S("name"),children:["Pool",L("name")]}),(0,a.jsxs)(u.ss,{className:"sortable whitespace-nowrap w-40",onClick:()=>S("job_counts"),children:["Jobs",L("job_counts")]}),(0,a.jsx)(u.ss,{className:"whitespace-nowrap w-20",children:"Workers"}),(0,a.jsxs)(u.ss,{className:"sortable whitespace-nowrap w-36",onClick:()=>S("requested_resources_str"),children:["Worker Details",L("requested_resources_str")]}),(0,a.jsxs)(u.ss,{className:"sortable whitespace-nowrap w-40",onClick:()=>S("requested_resources_str"),children:["Worker Resources",L("requested_resources_str")]})]})}),(0,a.jsx)(u.RM,{children:f&&b?(0,a.jsx)(u.SC,{children:(0,a.jsx)(u.pj,{colSpan:5,className:"text-center py-6 text-gray-500",children:(0,a.jsxs)("div",{className:"flex justify-center items-center",children:[(0,a.jsx)(c.Z,{size:20,className:"mr-2"}),(0,a.jsx)("span",{children:"Loading..."})]})})}):M.length>0?M.map(e=>(0,a.jsxs)(u.SC,{children:[(0,a.jsx)(u.pj,{children:(0,a.jsx)(i(),{href:"/jobs/pools/".concat(e.name),className:"text-blue-600 hover:text-blue-800",children:e.name})}),(0,a.jsx)(u.pj,{children:(0,a.jsx)(A,{jobCounts:e.jobCounts})}),(0,a.jsx)(u.pj,{children:I(e)}),(0,a.jsx)(u.pj,{children:(0,a.jsx)(z,{replicaInfo:e.replica_info})}),(0,a.jsx)(u.pj,{children:e.requested_resources_str||"-"})]},e.name)):(0,a.jsx)(u.SC,{children:(0,a.jsx)(u.pj,{colSpan:5,className:"text-center py-6 text-gray-500",children:"No pools found"})})})]})}),M.length>0&&R>1&&(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-t border-gray-200",children:[(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)("span",{className:"text-sm text-gray-700",children:"Rows per page:"}),(0,a.jsxs)("select",{value:N,onChange:e=>{k(parseInt(e.target.value,10)),y(1)},className:"border border-gray-300 rounded px-2 py-1 text-sm",children:[(0,a.jsx)("option",{value:5,children:"5"}),(0,a.jsx)("option",{value:10,children:"10"}),(0,a.jsx)("option",{value:25,children:"25"}),(0,a.jsx)("option",{value:50,children:"50"})]})]}),(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsxs)("span",{className:"text-sm text-gray-700",children:[D+1,"-",Math.min(F,E.length)," of"," ",E.length]}),(0,a.jsx)("button",{onClick:()=>{y(e=>Math.max(e-1,1))},disabled:1===w,className:"px-2 py-1 text-sm border border-gray-300 rounded disabled:opacity-50 disabled:cursor-not-allowed hover:bg-gray-50",children:"Previous"}),(0,a.jsx)("button",{onClick:()=>{y(e=>Math.min(e+1,R))},disabled:w===R,className:"px-2 py-1 text-sm border border-gray-300 rounded disabled:opacity-50 disabled:cursor-not-allowed hover:bg-gray-50",children:"Next"})]})]})]})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8969],{68969:function(e,t,o){o.d(t,{Ce:function(){return p},NJ:function(){return h},UA:function(){return u},aT:function(){return i},getManagedJobs:function(){return l},jh:function(){return b},vs:function(){return d}});var r=o(67294),a=o(15821),n=o(93225),c=o(6378),s=o(47145);async function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{var t;let{allUsers:o=!0,skipFinished:r=!1,nameMatch:a,userMatch:c,workspaceMatch:l,poolMatch:i,page:d,limit:u,statuses:h}=e,p={all_users:o,verbose:!0,skip_finished:r};void 0!==a&&(p.name_match=a),void 0!==c&&(p.user_match=c),void 0!==l&&(p.workspace_match=l),void 0!==i&&(p.pool_match=i),void 0!==d&&(p.page=d),void 0!==u&&(p.limit=u),void 0!==h&&h.length>0&&(p.statuses=h);let b=(await s.x.post("/jobs/queue/v2",p)).headers.get("X-Skypilot-Request-ID"),f=await s.x.get("/api/get?request_id=".concat(b));if(500===f.status){try{let e=await f.json();if(e.detail&&e.detail.error)try{let t=JSON.parse(e.detail.error);if(t.type&&t.type===n.iW)return{jobs:[],total:0,controllerStopped:!0}}catch(e){console.error("Error parsing JSON:",e)}}catch(e){console.error("Error parsing JSON:",e)}return{jobs:[],total:0,controllerStopped:!1}}let g=await f.json(),m=g.return_value?JSON.parse(g.return_value):[],_=Array.isArray(m)?m:(null==m?void 0:m.jobs)||[],y=Array.isArray(m)?_.length:null!==(t=null==m?void 0:m.total)&&void 0!==t?t:_.length,w=(null==m?void 0:m.total_no_filter)||y,j=(null==m?void 0:m.status_counts)||{};return{jobs:_.map(e=>{var t;let o=0;e.end_at&&e.submitted_at?o=e.end_at-e.submitted_at:e.submitted_at&&(o=Date.now()/1e3-e.submitted_at);let r=[];e.submitted_at&&r.push({type:"PENDING",timestamp:e.submitted_at}),e.start_at&&r.push({type:"RUNNING",timestamp:e.start_at}),e.end_at&&r.push({type:e.status,timestamp:e.end_at});let a="",n="",c="",s="",l="";try{if(a=e.cloud||"",c=e.cluster_resources,n=e.region||"",a&&(s=a,n&&(s+="/".concat(n))),l=s,e.accelerators){let t=Object.entries(e.accelerators).map(e=>{let[t,o]=e;return"".concat(o,"x").concat(t)}).join(", ");t&&(l+=" (".concat(t,")"))}}catch(t){c=e.cluster_resources}return{id:e.job_id,task_job_id:e._job_id,task:e.task_name,name:e.job_name,job_duration:e.job_duration,total_duration:o,workspace:e.workspace,status:e.status,requested_resources:e.resources,resources_str:c,resources_str_full:e.cluster_resources_full||c,cloud:a,region:e.region,infra:s,full_infra:l,recoveries:e.recovery_count,details:e.details||e.failure_reason,user:e.user_name,user_hash:e.user_hash,submitted_at:e.submitted_at?new Date(1e3*e.submitted_at):null,events:r,dag_yaml:e.user_yaml,entrypoint:e.entrypoint,git_commit:(null===(t=e.metadata)||void 0===t?void 0:t.git_commit)||"-",pool:e.pool,pool_hash:e.pool_hash,current_cluster_name:e.current_cluster_name,job_id_on_pool_cluster:e.job_id_on_pool_cluster}}),total:y,totalNoFilter:w,controllerStopped:!1,statusCounts:j}}catch(e){return console.error("Error fetching managed job data:",e),{jobs:[],total:0,totalNoFilter:0,controllerStopped:!1,statusCounts:{}}}}async function i(e){let{allUsers:t=!0,nameMatch:o,userMatch:r,workspaceMatch:a,poolMatch:n,page:c=1,limit:s=10,useClientPagination:i=!0}=e||{};try{if(!i)return await l(e);let d=await l({allUsers:t,nameMatch:o,userMatch:r,workspaceMatch:a,poolMatch:n});if(d.controllerStopped||!d.jobs)return d;let u=d.jobs,h=u.length,p=(c-1)*s;return{jobs:u.slice(p,p+s),total:h,controllerStopped:!1}}catch(e){return console.error("Error fetching managed job data with client pagination:",e),{jobs:[],total:0,controllerStopped:!1}}}async function d(){try{let e=(await s.x.post("/jobs/pool_status",{pool_names:null})).headers.get("X-Skypilot-Request-ID"),t=await s.x.get("/api/get?request_id=".concat(e));if(500===t.status){try{let e=await t.json();if(e.detail&&e.detail.error)try{let t=JSON.parse(e.detail.error);if(t.type&&t.type===n.iW)return{pools:[],controllerStopped:!0}}catch(e){console.error("Failed to parse error JSON:",e)}}catch(e){console.error("Failed to parse response JSON:",e)}throw Error("Server error")}let o=await t.json(),r=o.return_value?JSON.parse(o.return_value):[],a={jobs:[]};try{let e=await l({allUsers:!0,skipFinished:!0});e.controllerStopped||(a=e)}catch(e){console.warn("Failed to fetch jobs for pool job counts:",e)}let c={},i=["SUCCEEDED","FAILED","FAILED_SETUP","FAILED_PRECHECKS","FAILED_NO_RESOURCE","FAILED_CONTROLLER","CANCELLED"];return a.jobs&&Array.isArray(a.jobs)&&a.jobs.forEach(e=>{let t=e.pool,o=e.status;t&&!i.includes(o)&&(c[t]||(c[t]={}),c[t][o]=(c[t][o]||0)+1)}),{pools:r.map(e=>({...e,jobCounts:c[e.name]||{}})),controllerStopped:!1}}catch(e){throw console.error("Error fetching pools:",e),e}}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,[o,a]=(0,r.useState)(null),[n,s]=(0,r.useState)(!0);return(0,r.useEffect)(()=>{(async function(){if(e)try{var t;s(!0);let o=await c.default.get(l,[{allUsers:!0}]),r=null==o?void 0:null===(t=o.jobs)||void 0===t?void 0:t.find(t=>String(t.id)===String(e));r?a({jobs:[r],controllerStopped:o.controllerStopped||!1}):a({jobs:[],controllerStopped:o.controllerStopped||!1})}catch(e){console.error("Error fetching single managed job data:",e),a({jobs:[],controllerStopped:!1})}finally{s(!1)}})()},[e,t]),{jobData:o,loading:n}}async function h(e){let t,{jobId:o,controller:r=!1,signal:c,onNewLog:s}=e,l=Date.now(),i=new Promise(e=>{let o=()=>{let r=Date.now()-l;r>=3e4?e({timeout:!0}):t=setTimeout(o,3e4-r)};t=setTimeout(o,3e4)}),d=window.location.origin,u="".concat(d).concat(n.f4),h=(async()=>{try{let e=(await fetch("".concat(u,"/jobs/logs"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({controller:r,follow:!1,job_id:o,tail:1e4}),...c?{signal:c}:{}})).body.getReader();try{for(;;){let{done:t,value:o}=await e.read();if(t)break;l=Date.now();let r=new TextDecoder().decode(o);s(r)}}finally{if(!c||!c.aborted)try{e.cancel()}catch(e){"AbortError"!==e.name&&console.warn("Error canceling reader:",e)}t&&clearTimeout(t)}return{timeout:!1}}catch(e){if(t&&clearTimeout(t),"AbortError"===e.name)return{timeout:!1};throw e}})(),p=await Promise.race([h,i]);if(t&&clearTimeout(t),p.timeout){(0,a.C)("Log request for job ".concat(o," timed out after ").concat(30,"s of inactivity"),"warning");return}}async function p(e,t,o){let r="",c="",s="",l={};if("restartcontroller"===e)r="Restarting",c="restarted",s="jobs/queue/v2",l={all_users:!0,refresh:!0},t="controller";else throw Error("Invalid action: ".concat(e));(0,a.C)("".concat(r," job ").concat(t,"..."),"info");let i=window.location.origin,d="".concat(i).concat(n.f4);try{try{let e=(await fetch("".concat(d,"/").concat(s),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)})).headers.get("X-Skypilot-Request-ID"),i=await fetch("".concat(d,"/api/get?request_id=").concat(e));if(200===i.status)(0,a.C)("Job ".concat(t," ").concat(c," successfully."),"success");else if(500===i.status)try{let e=await i.json();if(e.detail&&e.detail.error)try{let c=JSON.parse(e.detail.error);c.type&&c.type===n.Bo?(0,a.C)("".concat(r," job ").concat(t," is not supported!"),"error",1e4):c.type&&c.type===n.mF?(0,a.C)("Cluster ".concat(o," does not exist."),"error"):c.type&&c.type===n.iW?(0,a.C)("Cluster ".concat(o," is not up."),"error"):(0,a.C)("".concat(r," job ").concat(t," failed: ").concat(c.type),"error")}catch(o){(0,a.C)("".concat(r," job ").concat(t," failed: ").concat(e.detail.error),"error")}else(0,a.C)("".concat(r," job ").concat(t," failed with no details."),"error")}catch(e){(0,a.C)("".concat(r," job ").concat(t," failed with parse error."),"error")}else(0,a.C)("".concat(r," job ").concat(t," failed with status ").concat(i.status,"."),"error")}catch(e){console.error("Fetch error:",e),(0,a.C)("Network error ".concat(r," job ").concat(t,": ").concat(e.message),"error")}}catch(e){console.error("Error in handleStop:",e),(0,a.C)("Critical error ".concat(r," job ").concat(t,": ").concat(e.message),"error")}}async function b(e){let{jobId:t=null,name:o=null,controller:r=!1}=e;try{let e=await s.x.fetch("/jobs/download_logs",{job_id:t,name:o,controller:r,refresh:!1}),c=Object.values(e||{});if(!c.length){(0,a.C)("No logs found to download.","warning");return}let l=window.location.origin,i="".concat(l).concat(n.f4,"/download"),d=await fetch("".concat(i,"?relative=items"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({folder_paths:c})});if(!d.ok){let e=await d.text();throw Error("Download failed: ".concat(d.status," ").concat(e))}let u=await d.blob(),h=window.URL.createObjectURL(u),p=document.createElement("a"),b=new Date().toISOString().replace(/[:.]/g,"-"),f=t?"job-".concat(t):o?"job-".concat(o):"job";p.href=h,p.download="managed-".concat(f,"-").concat(r?"controller-logs":"logs","-").concat(b,".zip"),document.body.appendChild(p),p.click(),p.remove(),window.URL.revokeObjectURL(h)}catch(e){console.error("Error downloading managed job logs:",e),(0,a.C)("Error downloading managed job logs: ".concat(e.message),"error")}}},15821:function(e,t,o){o.d(t,{C:function(){return r}});function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5e3,r=document.getElementById("toast-container");r||((r=document.createElement("div")).id="toast-container",r.className="fixed top-0 right-0 p-4 z-[9999] flex flex-col items-end space-y-2",document.body.appendChild(r));let a=document.createElement("div");switch(a.className="rounded-md border-l-4 p-4 shadow-md flex items-center justify-between max-w-md w-full mb-2 pointer-events-auto",t){case"success":a.className+=" bg-green-100 border-green-500 text-green-800";break;case"error":a.className+=" bg-red-100 border-red-500 text-red-800";break;case"warning":a.className+=" bg-yellow-100 border-yellow-500 text-yellow-800";break;default:a.className+=" bg-blue-100 border-blue-500 text-blue-800"}return a.innerHTML='\n <div class="flex-1 mr-2">\n <p class="text-sm font-medium">'.concat(e,'</p>\n </div>\n <button class="text-gray-500 hover:text-gray-700 focus:outline-none" aria-label="Close toast">\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <line x1="18" y1="6" x2="6" y2="18"></line>\n <line x1="6" y1="6" x2="18" y2="18"></line>\n </svg>\n </button>\n '),r.appendChild(a),a.querySelector("button").addEventListener("click",()=>{r.removeChild(a)}),setTimeout(()=>{r.contains(a)&&r.removeChild(a)},o),a}},6378:function(e,t,o){o.r(t),o.d(t,{DashboardCache:function(){return a},dashboardCache:function(){return n}});let r=o(51214).ej.DEFAULT_TTL;class a{setPreloader(e){this.preloader=e}async get(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=o.ttl||r,n=!1!==o.refreshOnAccess,c=this._generateKey(e,t),s=e.name||"anonymous",l=this.cache.get(c),i=Date.now();if(l&&i-l.lastUpdated<a){let o=Math.round((i-l.lastUpdated)/1e3);if(this._debug("Cache HIT for ".concat(s," (age: ").concat(o,"s, TTL: ").concat(Math.round(a/1e3),"s)")),n&&(this.cache.set(c,{data:l.data,lastUpdated:i}),this._debug("Cache TTL refreshed for ".concat(s))),!this.backgroundJobs.has(c)){var d;(null===(d=this.preloader)||void 0===d?void 0:d.wasRecentlyPreloaded(e,t))?this._debug("Skipping background refresh for ".concat(s," - recently preloaded")):this._refreshInBackground(e,t,c)}return l.data}try{let o=await e(...t);return this.cache.set(c,{data:o,lastUpdated:i}),o}catch(e){if(l)return console.warn("Failed to fetch fresh data for ".concat(c,", returning stale data:"),e),l.data;throw e}}invalidate(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=this._generateKey(e,t);this.cache.delete(o),this.backgroundJobs.delete(o)}invalidateFunction(e){let t=e.name||"anonymous",o=[];for(let e of this.cache.keys())e.startsWith("".concat(t,"_"))&&o.push(e);o.forEach(e=>{this.cache.delete(e),this.backgroundJobs.delete(e)})}clear(){this.cache.clear(),this.backgroundJobs.clear()}getStats(){return{cacheSize:this.cache.size,backgroundJobs:this.backgroundJobs.size,keys:Array.from(this.cache.keys())}}getDetailedStats(){let e=Date.now(),t=[];for(let[o,r]of this.cache.entries()){let a=e-r.lastUpdated;t.push({key:o,age:Math.round(a/1e3),lastUpdated:new Date(r.lastUpdated).toISOString(),hasBackgroundJob:this.backgroundJobs.has(o)})}return{cacheSize:this.cache.size,backgroundJobs:this.backgroundJobs.size,entries:t.sort((e,t)=>e.age-t.age)}}setDebugMode(e){this.debugMode=e}_debug(e){for(var t=arguments.length,o=Array(t>1?t-1:0),r=1;r<t;r++)o[r-1]=arguments[r];this.debugMode&&console.log("[DashboardCache] ".concat(e),...o)}_refreshInBackground(e,t,o){this.backgroundJobs.set(o,!0),e(...t).then(e=>{this.cache.set(o,{data:e,lastUpdated:Date.now()})}).catch(e=>{console.warn("Background refresh failed for ".concat(o,":"),e)}).finally(()=>{this.backgroundJobs.delete(o)})}_generateKey(e,t){let o=function(e){let t=5381;for(let o=0;o<e.length;o++)t=(t<<5)+t+e.charCodeAt(o);return t>>>0}(e.toString()),r=t.length>0?JSON.stringify(t):"";return"".concat(o,"_").concat(r)}constructor(){this.cache=new Map,this.backgroundJobs=new Map,this.debugMode=!1,this.preloader=null}}let n=new a;t.default=n}}]);
|