skypilot-nightly 1.0.0.dev20250831__py3-none-any.whl → 1.0.0.dev20250902__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.

Files changed (45) hide show
  1. sky/__init__.py +2 -2
  2. sky/dashboard/out/404.html +1 -1
  3. sky/dashboard/out/_next/static/chunks/3015-8089ed1e0b7e37fd.js +1 -0
  4. sky/dashboard/out/_next/static/chunks/webpack-0eaa6f7e63f51311.js +1 -0
  5. sky/dashboard/out/_next/static/{FtHzmn6BMJ5PzqHhEY51g → tio0QibqY2C0F2-rPy00p}/_buildManifest.js +1 -1
  6. sky/dashboard/out/clusters/[cluster]/[job].html +1 -1
  7. sky/dashboard/out/clusters/[cluster].html +1 -1
  8. sky/dashboard/out/clusters.html +1 -1
  9. sky/dashboard/out/config.html +1 -1
  10. sky/dashboard/out/index.html +1 -1
  11. sky/dashboard/out/infra/[context].html +1 -1
  12. sky/dashboard/out/infra.html +1 -1
  13. sky/dashboard/out/jobs/[job].html +1 -1
  14. sky/dashboard/out/jobs/pools/[pool].html +1 -1
  15. sky/dashboard/out/jobs.html +1 -1
  16. sky/dashboard/out/users.html +1 -1
  17. sky/dashboard/out/volumes.html +1 -1
  18. sky/dashboard/out/workspace/new.html +1 -1
  19. sky/dashboard/out/workspaces/[name].html +1 -1
  20. sky/dashboard/out/workspaces.html +1 -1
  21. sky/global_user_state.py +67 -0
  22. sky/jobs/server/server.py +2 -1
  23. sky/serve/server/server.py +2 -1
  24. sky/server/auth/oauth2_proxy.py +6 -0
  25. sky/server/common.py +8 -6
  26. sky/server/metrics.py +82 -6
  27. sky/server/requests/executor.py +6 -2
  28. sky/server/requests/preconditions.py +3 -2
  29. sky/server/requests/requests.py +118 -29
  30. sky/server/server.py +50 -18
  31. sky/server/stream_utils.py +7 -5
  32. sky/server/uvicorn.py +7 -0
  33. sky/setup_files/dependencies.py +4 -1
  34. sky/skylet/constants.py +3 -0
  35. sky/utils/db/db_utils.py +64 -1
  36. sky/utils/perf_utils.py +22 -0
  37. {skypilot_nightly-1.0.0.dev20250831.dist-info → skypilot_nightly-1.0.0.dev20250902.dist-info}/METADATA +38 -35
  38. {skypilot_nightly-1.0.0.dev20250831.dist-info → skypilot_nightly-1.0.0.dev20250902.dist-info}/RECORD +43 -42
  39. sky/dashboard/out/_next/static/chunks/3015-6c9c09593b1e67b6.js +0 -1
  40. sky/dashboard/out/_next/static/chunks/webpack-6e76f636a048e145.js +0 -1
  41. /sky/dashboard/out/_next/static/{FtHzmn6BMJ5PzqHhEY51g → tio0QibqY2C0F2-rPy00p}/_ssgManifest.js +0 -0
  42. {skypilot_nightly-1.0.0.dev20250831.dist-info → skypilot_nightly-1.0.0.dev20250902.dist-info}/WHEEL +0 -0
  43. {skypilot_nightly-1.0.0.dev20250831.dist-info → skypilot_nightly-1.0.0.dev20250902.dist-info}/entry_points.txt +0 -0
  44. {skypilot_nightly-1.0.0.dev20250831.dist-info → skypilot_nightly-1.0.0.dev20250902.dist-info}/licenses/LICENSE +0 -0
  45. {skypilot_nightly-1.0.0.dev20250831.dist-info → skypilot_nightly-1.0.0.dev20250902.dist-info}/top_level.txt +0 -0
sky/utils/db/db_utils.py CHANGED
@@ -1,11 +1,14 @@
1
1
  """Utils for sky databases."""
2
+ import asyncio
2
3
  import contextlib
3
4
  import enum
4
5
  import sqlite3
5
6
  import threading
6
7
  import typing
7
- from typing import Any, Callable, Optional
8
+ from typing import Any, Callable, Iterable, Optional
8
9
 
10
+ import aiosqlite
11
+ import aiosqlite.context
9
12
  import sqlalchemy
10
13
  from sqlalchemy import exc as sqlalchemy_exc
11
14
 
@@ -283,3 +286,63 @@ class SQLiteConn(threading.local):
283
286
  self.conn = sqlite3.connect(db_path, timeout=_DB_TIMEOUT_S)
284
287
  self.cursor = self.conn.cursor()
285
288
  create_table(self.cursor, self.conn)
289
+ self._async_conn: Optional[aiosqlite.Connection] = None
290
+ self._async_conn_lock: Optional[asyncio.Lock] = None
291
+
292
+ async def _get_async_conn(self) -> aiosqlite.Connection:
293
+ """Get the shared aiosqlite connection for current thread.
294
+
295
+ Typically, external caller should not get the connection directly,
296
+ instead, SQLiteConn.{operation}_async methods should be used. This
297
+ is to avoid txn interleaving on the shared aiosqlite connection.
298
+ E.g.
299
+ coroutine 1:
300
+ A: await write(row1)
301
+ B: cursor = await conn.execute(read_row1)
302
+ C: await cursor.fetchall()
303
+ coroutine 2:
304
+ D: await write(row2)
305
+ E: cursor = await conn.execute(read_row2)
306
+ F: await cursor.fetchall()
307
+ The A -> B -> D -> E -> C time sequence will cause B and D read at the
308
+ same snapshot point when B started, thus cause coroutine2 lost the
309
+ read-after-write consistency. When you are adding new async operations
310
+ to SQLiteConn, make sure the txn pattern does not cause this issue.
311
+ """
312
+ # Python 3.8 binds current event loop to asyncio.Lock(), which requires
313
+ # a loop available in current thread. Lazy-init the lock to avoid this
314
+ # dependency. The correctness is guranteed since SQLiteConn is
315
+ # thread-local so there is no race condition between check and init.
316
+ if self._async_conn_lock is None:
317
+ self._async_conn_lock = asyncio.Lock()
318
+ if self._async_conn is None:
319
+ async with self._async_conn_lock:
320
+ if self._async_conn is None:
321
+ # Init logic like requests.init_db_within_lock will handle
322
+ # initialization like setting the WAL mode, so we do not
323
+ # duplicate that logic here.
324
+ self._async_conn = await aiosqlite.connect(self.db_path)
325
+ return self._async_conn
326
+
327
+ async def execute_and_commit_async(self,
328
+ sql: str,
329
+ parameters: Optional[
330
+ Iterable[Any]] = None) -> None:
331
+ """Execute the sql and commit the transaction in a sync block."""
332
+ conn = await self._get_async_conn()
333
+
334
+ def exec_and_commit(sql: str, parameters: Optional[Iterable[Any]]):
335
+ # pylint: disable=protected-access
336
+ conn._conn.execute(sql, parameters)
337
+ conn._conn.commit()
338
+
339
+ # pylint: disable=protected-access
340
+ await conn._execute(exec_and_commit, sql, parameters)
341
+
342
+ @aiosqlite.context.contextmanager
343
+ async def execute_fetchall_async(self,
344
+ sql: str,
345
+ parameters: Optional[Iterable[Any]] = None
346
+ ) -> Iterable[sqlite3.Row]:
347
+ conn = await self._get_async_conn()
348
+ return await conn.execute_fetchall(sql, parameters)
@@ -0,0 +1,22 @@
1
+ """Utility functions for performance monitoring."""
2
+ import os
3
+ from typing import Optional
4
+
5
+ from sky import sky_logging
6
+ from sky.skylet import constants
7
+
8
+ logger = sky_logging.init_logger(__name__)
9
+
10
+
11
+ def get_loop_lag_threshold() -> Optional[float]:
12
+ """Get the loop lag threshold from the environment variable."""
13
+ lag_threshold = os.getenv(constants.ENV_VAR_LOOP_LAG_THRESHOLD_MS, None)
14
+ if lag_threshold is not None:
15
+ try:
16
+ return float(lag_threshold) / 1000.0
17
+ except ValueError:
18
+ logger.warning(
19
+ f'Invalid value for {constants.ENV_VAR_LOOP_LAG_THRESHOLD_MS}:'
20
+ f' {lag_threshold}')
21
+ return None
22
+ return None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: skypilot-nightly
3
- Version: 1.0.0.dev20250831
3
+ Version: 1.0.0.dev20250902
4
4
  Summary: SkyPilot: Run AI on Any Infra — Unified, Faster, Cheaper.
5
5
  Author: SkyPilot Team
6
6
  License: Apache 2.0
@@ -38,7 +38,7 @@ Requires-Dist: python-dotenv
38
38
  Requires-Dist: rich
39
39
  Requires-Dist: tabulate
40
40
  Requires-Dist: typing_extensions
41
- Requires-Dist: filelock>=3.6.0
41
+ Requires-Dist: filelock>=3.15.0
42
42
  Requires-Dist: packaging
43
43
  Requires-Dist: psutil
44
44
  Requires-Dist: pulp
@@ -63,6 +63,7 @@ Requires-Dist: gitpython
63
63
  Requires-Dist: types-paramiko
64
64
  Requires-Dist: alembic
65
65
  Requires-Dist: aiohttp
66
+ Requires-Dist: aiosqlite
66
67
  Requires-Dist: anyio
67
68
  Provides-Extra: aws
68
69
  Requires-Dist: awscli>=1.27.10; extra == "aws"
@@ -142,48 +143,50 @@ Requires-Dist: aiohttp; extra == "server"
142
143
  Requires-Dist: anyio; extra == "server"
143
144
  Requires-Dist: grpcio>=1.63.0; extra == "server"
144
145
  Requires-Dist: protobuf<7.0.0,>=5.26.1; extra == "server"
146
+ Requires-Dist: aiosqlite; extra == "server"
145
147
  Provides-Extra: all
146
- Requires-Dist: ibm-platform-services>=0.48.0; extra == "all"
147
- Requires-Dist: anyio; extra == "all"
148
- Requires-Dist: casbin; extra == "all"
149
- Requires-Dist: passlib; extra == "all"
150
- Requires-Dist: google-cloud-storage; extra == "all"
151
- Requires-Dist: botocore>=1.29.10; extra == "all"
152
- Requires-Dist: aiohttp; extra == "all"
153
- Requires-Dist: grpcio>=1.63.0; extra == "all"
154
- Requires-Dist: pyvmomi==8.0.1.0.2; extra == "all"
155
- Requires-Dist: nebius>=0.2.47; extra == "all"
156
- Requires-Dist: pydo>=0.3.0; extra == "all"
157
- Requires-Dist: azure-core>=1.24.0; extra == "all"
158
- Requires-Dist: boto3>=1.26.1; extra == "all"
159
- Requires-Dist: docker; extra == "all"
160
- Requires-Dist: cudo-compute>=0.1.10; extra == "all"
161
148
  Requires-Dist: sqlalchemy_adapter; extra == "all"
162
- Requires-Dist: python-dateutil; extra == "all"
163
- Requires-Dist: ray[default]!=2.6.0,>=2.2.0; extra == "all"
164
- Requires-Dist: azure-mgmt-network>=27.0.0; extra == "all"
165
- Requires-Dist: azure-cli>=2.65.0; extra == "all"
166
- Requires-Dist: msrestazure; extra == "all"
167
- Requires-Dist: ibm-vpc; extra == "all"
168
- Requires-Dist: runpod>=1.6.1; extra == "all"
169
149
  Requires-Dist: google-api-python-client>=2.69.0; extra == "all"
150
+ Requires-Dist: oci; extra == "all"
151
+ Requires-Dist: azure-common; extra == "all"
152
+ Requires-Dist: pyvmomi==8.0.1.0.2; extra == "all"
170
153
  Requires-Dist: azure-core>=1.31.0; extra == "all"
171
- Requires-Dist: azure-identity>=1.19.0; extra == "all"
172
154
  Requires-Dist: colorama<0.4.5; extra == "all"
173
- Requires-Dist: azure-mgmt-compute>=33.0.0; extra == "all"
174
- Requires-Dist: pyopenssl<24.3.0,>=23.2.0; extra == "all"
155
+ Requires-Dist: azure-cli>=2.65.0; extra == "all"
156
+ Requires-Dist: azure-storage-blob>=12.23.1; extra == "all"
157
+ Requires-Dist: docker; extra == "all"
158
+ Requires-Dist: azure-identity>=1.19.0; extra == "all"
159
+ Requires-Dist: botocore>=1.29.10; extra == "all"
160
+ Requires-Dist: casbin; extra == "all"
161
+ Requires-Dist: runpod>=1.6.1; extra == "all"
162
+ Requires-Dist: cudo-compute>=0.1.10; extra == "all"
163
+ Requires-Dist: protobuf<7.0.0,>=5.26.1; extra == "all"
164
+ Requires-Dist: ibm-vpc; extra == "all"
175
165
  Requires-Dist: awscli>=1.27.10; extra == "all"
176
- Requires-Dist: oci; extra == "all"
177
- Requires-Dist: msgraph-sdk; extra == "all"
178
- Requires-Dist: ibm-cos-sdk; extra == "all"
179
166
  Requires-Dist: pyjwt; extra == "all"
180
- Requires-Dist: vastai-sdk>=0.1.12; extra == "all"
167
+ Requires-Dist: anyio; extra == "all"
168
+ Requires-Dist: boto3>=1.26.1; extra == "all"
169
+ Requires-Dist: aiohttp; extra == "all"
170
+ Requires-Dist: msrestazure; extra == "all"
181
171
  Requires-Dist: kubernetes!=32.0.0,>=20.0.0; extra == "all"
182
- Requires-Dist: protobuf<7.0.0,>=5.26.1; extra == "all"
183
- Requires-Dist: azure-common; extra == "all"
184
- Requires-Dist: ibm-cloud-sdk-core; extra == "all"
172
+ Requires-Dist: vastai-sdk>=0.1.12; extra == "all"
173
+ Requires-Dist: pydo>=0.3.0; extra == "all"
174
+ Requires-Dist: pyopenssl<24.3.0,>=23.2.0; extra == "all"
175
+ Requires-Dist: nebius>=0.2.47; extra == "all"
185
176
  Requires-Dist: websockets; extra == "all"
186
- Requires-Dist: azure-storage-blob>=12.23.1; extra == "all"
177
+ Requires-Dist: ibm-platform-services>=0.48.0; extra == "all"
178
+ Requires-Dist: google-cloud-storage; extra == "all"
179
+ Requires-Dist: ray[default]!=2.6.0,>=2.2.0; extra == "all"
180
+ Requires-Dist: grpcio>=1.63.0; extra == "all"
181
+ Requires-Dist: azure-mgmt-network>=27.0.0; extra == "all"
182
+ Requires-Dist: azure-mgmt-compute>=33.0.0; extra == "all"
183
+ Requires-Dist: python-dateutil; extra == "all"
184
+ Requires-Dist: passlib; extra == "all"
185
+ Requires-Dist: azure-core>=1.24.0; extra == "all"
186
+ Requires-Dist: msgraph-sdk; extra == "all"
187
+ Requires-Dist: aiosqlite; extra == "all"
188
+ Requires-Dist: ibm-cloud-sdk-core; extra == "all"
189
+ Requires-Dist: ibm-cos-sdk; extra == "all"
187
190
  Dynamic: author
188
191
  Dynamic: classifier
189
192
  Dynamic: description
@@ -1,4 +1,4 @@
1
- sky/__init__.py,sha256=VSoLDReyowcBFOZ0pybs77kcqcJ3MnJv-TWWJo4D0dw,6615
1
+ sky/__init__.py,sha256=XwWsGu40Gw925dlwQuIqKFVosy4hlTjXOJbm7S8w40M,6615
2
2
  sky/admin_policy.py,sha256=XdcJnYqmude-LGGop-8U-FeiJcqtfYsYtIy4rmoCJnM,9799
3
3
  sky/authentication.py,sha256=00EHVELI7nuW7JQ_74t1RKIc7iohKnwdvlw6h2gXRmg,25487
4
4
  sky/check.py,sha256=Z7D6txaOAEL7fyEQ8q-Zxk1aWaHpEcl412Rj2mThbQ0,31025
@@ -8,7 +8,7 @@ sky/core.py,sha256=qL76-P4aE_BGsZDmnBIwMw_MoPtFVLsJ0cQP7OSyCt8,57534
8
8
  sky/dag.py,sha256=0ZpAEDXuIFo1SP7YJpF9vXiFxpRwqP8od-UXMg95td8,3929
9
9
  sky/exceptions.py,sha256=sZ0rYuPZKKv4brkfPPJacWo2dY48FfqevwFT1bFzORU,20328
10
10
  sky/execution.py,sha256=v1JNAjjQC1iOXjG8eba-zrMDVGrjZjx7Ys4f4ExwQp0,34674
11
- sky/global_user_state.py,sha256=GqOXBsL4e5Td9Xp3DqKNg-nPYIujYla0ErRmRqyEP5Y,88193
11
+ sky/global_user_state.py,sha256=BWHYU1qV7USGaTkWg4GyoWVt_sXq7qZItMA1DSmfVrU,89625
12
12
  sky/models.py,sha256=C5vuymhZtQHxtzE7sM63VV-dKJ8Zo7U7cQWCZKb9q10,3196
13
13
  sky/optimizer.py,sha256=iR57bL_8BeG6bh1sH3J6n6i65EBFjmyftezYM4nnDZA,64150
14
14
  sky/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -112,24 +112,22 @@ sky/clouds/utils/azure_utils.py,sha256=NToRBnhEyuUvb-nBnsKTxjhOBRkMcrelL8LK4w6s4
112
112
  sky/clouds/utils/gcp_utils.py,sha256=09MF4Vx0EW7S-GXGpyxpl2aQlHrqeu9ioV0nyionAyk,9890
113
113
  sky/clouds/utils/oci_utils.py,sha256=TFqAqRLggg4Z0bhxrrq8nouSSomZy-ub1frHXEkud2M,7302
114
114
  sky/clouds/utils/scp_utils.py,sha256=VGuccVO5uFGr8-yolWSoYrgr11z6cIeDBGcqkBzAyOs,18409
115
- sky/dashboard/out/404.html,sha256=zP0DKKLB0NS0kFUPskuI3imwYsf44Fh9E2XzW1-HhGc,1423
116
- sky/dashboard/out/clusters.html,sha256=0nE0TtlQd2_MmPRQGFqk1O3jdcHU84Z9jkCMVnl1oDM,1418
117
- sky/dashboard/out/config.html,sha256=JKuMgkSGva_F6jhQRfsRqxeY6PPV6zAhJeuEJKItP8U,1414
115
+ sky/dashboard/out/404.html,sha256=cFTduOITyJknpvAtD_-BM5DFBAlDgwpFBk-cuBYkeok,1423
116
+ sky/dashboard/out/clusters.html,sha256=PlozIDfS9pn7Wg2dRucWGlvI8mH-C6-xEyA_8b_5drc,1418
117
+ sky/dashboard/out/config.html,sha256=RgsewEwidlkhYE0KHdJev_MtzV4aB6n_YQ6aNbAPccE,1414
118
118
  sky/dashboard/out/favicon.ico,sha256=XilUZZglAl_1zRsg85QsbQgmQAzGPQjcUIJ-A3AzYn8,93590
119
- sky/dashboard/out/index.html,sha256=Vdr96Hi3yZ54CUUSYh1z-Z4Ap0WL5kPcUPm8jgH_Gnc,1407
120
- sky/dashboard/out/infra.html,sha256=65LhKxl4Sp-dJJVjvE2Z4POjJWfdVCMXtRg5LMagLUo,1412
121
- sky/dashboard/out/jobs.html,sha256=vNpEo2Kte6WFsUtgPc1lbZ3RzkUMRIG2u02JbkawGvk,1410
119
+ sky/dashboard/out/index.html,sha256=468mXKfygNcXuTeaN6v6EChWdRoA5Dknjeq0Hq4hXOE,1407
120
+ sky/dashboard/out/infra.html,sha256=DOLE4VfZaeAmDPKCAopWmEmNSyAg-FqPVDYCtYNkbIs,1412
121
+ sky/dashboard/out/jobs.html,sha256=X_t3OoyNdDl_6ya7sA5v4R1yYIF8bcULDT_HRjNMIhw,1410
122
122
  sky/dashboard/out/skypilot.svg,sha256=c0iRtlfLlaUm2p0rG9NFmo5FN0Qhf3pq5Xph-AeMPJw,5064
123
- sky/dashboard/out/users.html,sha256=yR2BWaFvYzhn1usuMsa0aZF28wAhbEwsoiOvh172DaY,1412
124
- sky/dashboard/out/volumes.html,sha256=wEZvnaW0tKl2fqQtAbLudZ4sFAF9kjO1Up6nbRcqkX4,1416
125
- sky/dashboard/out/workspaces.html,sha256=v90WLdIu5pI5dUk_wUa47fgqZt3-oF5W--fQri42pNU,1422
126
- sky/dashboard/out/_next/static/FtHzmn6BMJ5PzqHhEY51g/_buildManifest.js,sha256=osxUordT3Fb32OsAF270nSx4GMgfsKF6Vc8OBBxtPgk,2428
127
- sky/dashboard/out/_next/static/FtHzmn6BMJ5PzqHhEY51g/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
123
+ sky/dashboard/out/users.html,sha256=xTNuwrA38-9nqr3otP9pECKAGQVWg02HsxYD6jNX__Q,1412
124
+ sky/dashboard/out/volumes.html,sha256=6niIILnUyCbdD0TrNrOEOkqiRt-X2g5si85nG4S_KAg,1416
125
+ sky/dashboard/out/workspaces.html,sha256=5ywF630zGG40thN-2GnbtZPYg72mMyWxV5Ic09X77Ng,1422
128
126
  sky/dashboard/out/_next/static/chunks/1121-8afcf719ea87debc.js,sha256=fLXxFyYpxIIH-GAL9X9Ew3rc2f6zqOZqg6TjrapDZUM,8554
129
127
  sky/dashboard/out/_next/static/chunks/1141-943efc7aff0f0c06.js,sha256=tUOoU0nIEShZeD5pBiOWrl8-czHc6PpnxxJilnDplHM,17330
130
128
  sky/dashboard/out/_next/static/chunks/1272-1ef0bf0237faccdb.js,sha256=VJ6y-Z6Eg2T93hQIRfWAbjAkQ7nQhglmIaVbEpKSILY,38451
131
129
  sky/dashboard/out/_next/static/chunks/2350.fab69e61bac57b23.js,sha256=TQCHO4AUL9MZo1e_8GOiL8y6vjQpj5tdXZ8oCKwM1LA,271
132
- sky/dashboard/out/_next/static/chunks/3015-6c9c09593b1e67b6.js,sha256=fsoCBib_DsqEXqCKMiUF29cseBjqGJQr-HwMsy4eHhs,39821
130
+ sky/dashboard/out/_next/static/chunks/3015-8089ed1e0b7e37fd.js,sha256=rA7xoHpljSEvc9r-Owxyftb9ze4rPK6r2yKh96MlbYs,39820
133
131
  sky/dashboard/out/_next/static/chunks/3785.d5b86f6ebc88e6e6.js,sha256=vYbhoNejiE7xKPOKVVw4OyepR6jVNDQ5rrZ4TeihJKE,4427
134
132
  sky/dashboard/out/_next/static/chunks/3850-ff4a9a69d978632b.js,sha256=XphBY9psNzmvGD28zgDunQEb-TX0_eOVaElmcuOjD1g,7455
135
133
  sky/dashboard/out/_next/static/chunks/3937.210053269f121201.js,sha256=0tYP8uuog_WLEZmEuej4zenfX0PUa17nR874wSSBgqI,54583
@@ -160,7 +158,7 @@ sky/dashboard/out/_next/static/chunks/framework-cf60a09ccd051a10.js,sha256=_Qbam
160
158
  sky/dashboard/out/_next/static/chunks/main-app-587214043926b3cc.js,sha256=t7glRfataAjNw691Wni-ZU4a3BsygRzPKoI8NOm-lsY,116244
161
159
  sky/dashboard/out/_next/static/chunks/main-f15ccb73239a3bf1.js,sha256=jxOPLDVX3rkMc_jvGx2a-N2v6mvfOa8O6V0o-sLT0tI,110208
162
160
  sky/dashboard/out/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js,sha256=6QPOwdWeAVe8x-SsiDrm-Ga6u2DkqgG5SFqglrlyIgA,91381
163
- sky/dashboard/out/_next/static/chunks/webpack-6e76f636a048e145.js,sha256=wq1Fj-i_9I-RNvESKj6vxLA60J8FBnV47TSTw8yRGgE,4744
161
+ sky/dashboard/out/_next/static/chunks/webpack-0eaa6f7e63f51311.js,sha256=odmY5M8FZZSGJJ9rjv5IoGsoAroxSdBPMizetl4FKwc,4744
164
162
  sky/dashboard/out/_next/static/chunks/pages/_app-ce361c6959bc2001.js,sha256=mllo4Yasw61zRtEO49uE_MrAutg9josSJShD0DNSjf0,95518
165
163
  sky/dashboard/out/_next/static/chunks/pages/_error-c66a4e8afc46f17b.js,sha256=vjERjtMAbVk-19LyPf1Jc-H6TMcrSznSz6brzNqbqf8,253
166
164
  sky/dashboard/out/_next/static/chunks/pages/clusters-469814d711d63b1b.js,sha256=p8CQtv5n745WbV7QdyCapmglI2s_2UBB-f_KZE4RAZg,879
@@ -179,14 +177,16 @@ sky/dashboard/out/_next/static/chunks/pages/jobs/pools/[pool]-07349868f7905d37.j
179
177
  sky/dashboard/out/_next/static/chunks/pages/workspace/new-3f88a1c7e86a3f86.js,sha256=83s5N5CZwIaRcmYMfqn2we60n2VRmgFw6Tbx18b8-e0,762
180
178
  sky/dashboard/out/_next/static/chunks/pages/workspaces/[name]-de06e613e20bc977.js,sha256=8d4XLtF8E3ahNnsbdNUQkJVbM1b9sIG9wRaoRjRwMhE,1495
181
179
  sky/dashboard/out/_next/static/css/4614e06482d7309e.css,sha256=nk6GriyGVd1aGXrLd7BcMibnN4v0z-Q_mXGxrHFWqrE,56126
182
- sky/dashboard/out/clusters/[cluster].html,sha256=QHwpP1bvvrqeTLqW3lfPAXRZNDh0Ro6NYYfQk5OUzks,2936
183
- sky/dashboard/out/clusters/[cluster]/[job].html,sha256=ZsFM8jW6b4jl7yeCY-q-j83r8LBMTKqcHDnGLx63ul8,2073
184
- sky/dashboard/out/infra/[context].html,sha256=DltpGQafEPvac38i-hF98t4y6BcQmwRdbz_0bI8eS10,1436
185
- sky/dashboard/out/jobs/[job].html,sha256=KT7P6_2bv1vxySzG-psNwQdCfDv8fX9iMsDwrwKTjug,2304
186
- sky/dashboard/out/jobs/pools/[pool].html,sha256=wvbpW0XkdWRjPlch2JlFLjZGhCU6bYkqMpjoEhHOkvU,2142
180
+ sky/dashboard/out/_next/static/tio0QibqY2C0F2-rPy00p/_buildManifest.js,sha256=fDN_T9ct3m03CbW7pSYzCMYZ5LYmeYwfXztKMd8RkNU,2428
181
+ sky/dashboard/out/_next/static/tio0QibqY2C0F2-rPy00p/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
182
+ sky/dashboard/out/clusters/[cluster].html,sha256=yAkdpJGq-H-4K3qcBdREzCJFSNOussny5XS6dl1Qh5c,2936
183
+ sky/dashboard/out/clusters/[cluster]/[job].html,sha256=GH9OTobUtd_zQ5UfvJBTH8AWULW2tZciGVkVS44mDjA,2073
184
+ sky/dashboard/out/infra/[context].html,sha256=O2g-Q2T7oq3MXJkHnbhEPIhrwBpk8TCBSw3c8ubZl_U,1436
185
+ sky/dashboard/out/jobs/[job].html,sha256=tpv9_4kQk3sZhl9RDdrYyiMApPGNMcAsAjEUlkQLmZE,2304
186
+ sky/dashboard/out/jobs/pools/[pool].html,sha256=m6fLfJIKEzH6EkXVT0BwXGq_QmYoa2rdiIEdGSrVb7s,2142
187
187
  sky/dashboard/out/videos/cursor-small.mp4,sha256=8tRdp1vjawOrXUar1cfjOc-nkaKmcwCPZx_LO0XlCvQ,203285
188
- sky/dashboard/out/workspace/new.html,sha256=AC3oQBJBM-kGg5JXqiVsPkXAgi3ckxC5JwrQ3x8n0T4,1428
189
- sky/dashboard/out/workspaces/[name].html,sha256=aLfgEaUuE8xHBbyJIozXtl4vgM0QuHD4fSglyZ7EzXA,2759
188
+ sky/dashboard/out/workspace/new.html,sha256=2RGyPFkpcpcM_pWPO5biI61jZoIHuQKZ3tD5bZ2ns4Y,1428
189
+ sky/dashboard/out/workspaces/[name].html,sha256=sb3O6cUo8B_m97Ml3Ng1ldL1RSm8QRcQjRR_G0v_nJ8,2759
190
190
  sky/data/__init__.py,sha256=Nhaf1NURisXpZuwWANa2IuCyppIuc720FRwqSE2oEwY,184
191
191
  sky/data/data_transfer.py,sha256=N8b0CQebDuHieXjvEVwlYmK6DbQxUGG1RQJEyTbh3dU,12040
192
192
  sky/data/data_utils.py,sha256=AjEA_JRjo9NBMlv-Lq5iV4lBED_YZ1VqBR9pG6fGVWE,35179
@@ -205,7 +205,7 @@ sky/jobs/client/sdk.py,sha256=ypSb8iRHWI7WEwai5ngBeShgBNTJf_0iehdGx-xyASA,16566
205
205
  sky/jobs/client/sdk_async.py,sha256=qOI5TB5FDdX36R9rZ1lL9ouzQtJ6qnZxuK9uoKF86oU,4791
206
206
  sky/jobs/server/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
207
207
  sky/jobs/server/core.py,sha256=rtD5S82P6NnHk5XDpeSlbg-0lGShRrZWRutOn_rDVs0,40821
208
- sky/jobs/server/server.py,sha256=v91KdT-ntLna46arzIgjckvNqebyREPw8z8U61t79qo,7195
208
+ sky/jobs/server/server.py,sha256=Wi3TcDg9AnI3yEJNXBA0G5LudEUSdT4C9oiofAa_dfM,7263
209
209
  sky/jobs/server/utils.py,sha256=7YRZNF8BGTQwWRiY7P40n4hQpCCOkp9gBiapd5rVFaI,3517
210
210
  sky/logs/__init__.py,sha256=zW4gAEvWDz5S53FlLp3krAuKrmTSJ0e3kZDnhxSbW4E,722
211
211
  sky/logs/agent.py,sha256=qtH56xbnKYLPrepSIX63or5YBLaAEMh8atTGl77BUck,2767
@@ -352,31 +352,31 @@ sky/serve/client/sdk_async.py,sha256=idvbLb6q_NBo79OnXE-3SF-bwYFMPzDg_khiNqOLd3o
352
352
  sky/serve/server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
353
353
  sky/serve/server/core.py,sha256=QEdBUE0clX8ZSQEO_mb5Gt3ykeWBdVzqtmiRcBjH7UY,10321
354
354
  sky/serve/server/impl.py,sha256=mqK3FZR8Nutu9p3WPNJZaHoLetcF1UghKB21aZ5J5_M,42789
355
- sky/serve/server/server.py,sha256=A9K37a0nQgZeN3eKWv62Oh2C5TSAReTZ9pHmztqlI-c,4396
355
+ sky/serve/server/server.py,sha256=zzHQdsFWdSzoAIgPw-SQsxem559psu31X6BG0sSWSxw,4464
356
356
  sky/server/__init__.py,sha256=MPPBqFzXz6Jv5QSk6td_IcvnfXfNErDZVcizu4MLRow,27
357
- sky/server/common.py,sha256=WCKQT3tHi6D5-w8IaMEXHeD6iIITeiXVK4Du9640V1Y,39317
357
+ sky/server/common.py,sha256=0sXjJqrAg1G1oZKg3492RzYuBjzCgXp8JXqyRIf3ysk,39410
358
358
  sky/server/config.py,sha256=XWf5Kw4am6vMO5wcyWevbQAFH-dmKb7AMEgDzD083-M,8538
359
359
  sky/server/constants.py,sha256=yjX8t73w6gj3_SDSP4vBFdNdiOqq7dnlXT2pw3yo0jM,2321
360
360
  sky/server/daemons.py,sha256=Og2F560XO4n70TPxxvrbkNUujftX4V4GxRA0E6-nSrw,9206
361
- sky/server/metrics.py,sha256=6H6n6dq_C5HMaU97mJlRUB9bqOEA_k205PO15wE3AWk,3648
361
+ sky/server/metrics.py,sha256=G9HMhioPmx9ppbyrPAk-pyVe5yUw6LBuXD5aRqqsEfM,6140
362
362
  sky/server/rest.py,sha256=6Qcn6fjypP3j9UHdKRgvt2-PU1LKz2VU2aVQEA1D6EI,14354
363
- sky/server/server.py,sha256=nwHagVG3bS2Nr4_uepkl7DxulEtuDzYYIyHmwiBWLto,79134
363
+ sky/server/server.py,sha256=v86-47mJtk_e25j3f9PkW-Lod3FdjDCM7426LWxe2G0,80390
364
364
  sky/server/state.py,sha256=YbVOMJ1JipQQv17gLIGyiGN7MKfnP83qlUa5MB1z0Yk,747
365
- sky/server/stream_utils.py,sha256=RS4RuMxQqTGqp3uxzZVtmFWzos4d49P7hMX_VklzEVU,9189
366
- sky/server/uvicorn.py,sha256=4D4uoz5Hv-IpVGkhOF2FozBJwCE13fYWwHCNUc_N17s,10665
365
+ sky/server/stream_utils.py,sha256=Ym9yIP-JhA58YUFfHL8gM0Xwnho1AYO9WX_UJ_gOIdM,9274
366
+ sky/server/uvicorn.py,sha256=r3TWSI8647Df67aTcX1PT1JJPyr3sWsei_vWBklVx2A,11022
367
367
  sky/server/versions.py,sha256=3atZzUa7y1XeKNcrfVxKWAo_5ZyCOnbY7DKpIqed7Do,10011
368
368
  sky/server/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
369
369
  sky/server/auth/authn.py,sha256=zvabLsEAf9Ql6AbXJuWZ54uaiOr1mwFGGvQn84v66H4,2037
370
- sky/server/auth/oauth2_proxy.py,sha256=g0_mAMHxPpLx-7yUaGxBgApDCrg0J641OViMZN3TtXs,8859
370
+ sky/server/auth/oauth2_proxy.py,sha256=PErQfiGoPEL69wEgrvVEG4guLNoyITFTdgOn23JaCNQ,9148
371
371
  sky/server/html/log.html,sha256=TSGZktua9Ysl_ysg3w60rjxAxhH61AJnsYDHdtqrjmI,6929
372
372
  sky/server/html/token_page.html,sha256=eUndS5u1foL9vaWGPRTLMt7lCzD1g0wYJ2v_EeeFzlc,7046
373
373
  sky/server/requests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
374
374
  sky/server/requests/event_loop.py,sha256=OhpPbuce65bbjpGRlcJa78AVnYSm08SzFKt70ypCUuQ,1211
375
- sky/server/requests/executor.py,sha256=_6GGgRc7OyATwa8sy9tlIQ3wqC439eNtSFzYqt8GhIs,27503
375
+ sky/server/requests/executor.py,sha256=5yrttKUBi2wReUlizGIX5XYofVNp4TUfhGyxDWuTioI,27735
376
376
  sky/server/requests/payloads.py,sha256=_d_jLV7c4crSe7mydCKD3uXtfXR3f25aoQtGKzUnBZY,26375
377
- sky/server/requests/preconditions.py,sha256=uUQjzFFHf7O5-WvBypMzqViGmd1CXksbqrrDPmY_s_Y,7178
377
+ sky/server/requests/preconditions.py,sha256=S86OYSQHvdO2J9AkK6ZSxu_IlutfEu2OttR9EXbEEk0,7231
378
378
  sky/server/requests/process.py,sha256=UpJp5rZizNMFRCNRtudFSjbcJhFarFbtAGDWI9x_ZyE,13197
379
- sky/server/requests/requests.py,sha256=Pkr9sMsUBDcAHZFHVxzCxzCrcgGFt2wCH7D9Jb-IzQg,25024
379
+ sky/server/requests/requests.py,sha256=42K8OUX019iVjrolePzp8aHDBOinUAAPDUEsVaEAlsg,27780
380
380
  sky/server/requests/queues/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
381
381
  sky/server/requests/queues/local_queue.py,sha256=X6VkBiUmgd_kfqIK1hCtMWG1b8GiZbY70TBiBR6c6GY,416
382
382
  sky/server/requests/queues/mp_queue.py,sha256=jDqP4Jd28U3ibSFyMR1DF9I2OWZrPZqFJrG5S6RFpyw,3403
@@ -385,14 +385,14 @@ sky/server/requests/serializers/decoders.py,sha256=zE2BeTYVcBAK6a_V9YmMPRBQ9xos5
385
385
  sky/server/requests/serializers/encoders.py,sha256=EsKpscRTjxLRgDDw4DgJNjmRu1q-5bvj6zBe-tebaLc,7584
386
386
  sky/setup_files/MANIFEST.in,sha256=4gbgHHwSdP6BbMJv5XOt-2K6wUVWF_T9CGsdESvh918,776
387
387
  sky/setup_files/alembic.ini,sha256=854_UKvCaFmZ8vI16tSHbGgP9IMFQ42Td6c9Zmn2Oxs,5079
388
- sky/setup_files/dependencies.py,sha256=iU-bM-Q3JYfMcVBG3BNaMBANLjZdmo8zpFd_IsV_wu4,7860
388
+ sky/setup_files/dependencies.py,sha256=rNs8UXu6gbWiOWh9WC3_fZu5MIaiep6eRH65GbqAb34,7963
389
389
  sky/setup_files/setup.py,sha256=MjI1R652CYCnV4YscgndphTTISa-OzQ53lv1umxMqw0,7622
390
390
  sky/skylet/LICENSE,sha256=BnFrJSvUFpMUoH5mOpWnEvaC5R6Uux8W6WXgrte8iYg,12381
391
391
  sky/skylet/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
392
392
  sky/skylet/attempt_skylet.py,sha256=GZ6ITjjA0m-da3IxXXfoHR6n4pjp3X3TOXUqVvSrV0k,2136
393
393
  sky/skylet/autostop_lib.py,sha256=2eab980ckQ5dA2DFAJlI5bAJ6EI7YI-JSlzFoTA9XwU,9698
394
394
  sky/skylet/configs.py,sha256=nNBnpuzoU696FbC3Nv0qKVSDuTw4GAbr7eCcg0_Sldo,2135
395
- sky/skylet/constants.py,sha256=uLlryUYPUcWQIHYTzm_fX9fOAE51JkBXeUE9RNO-ieI,24028
395
+ sky/skylet/constants.py,sha256=5rZEEB6fEjnp5py1Gxc7G8APBE4KKtICd1TlUJGahy0,24152
396
396
  sky/skylet/events.py,sha256=vOGqqgZM0aJAjSg3YluIO7mnbbxg9VF-iBVPuQHuBac,13801
397
397
  sky/skylet/job_lib.py,sha256=cUud2sVcnHcZbqzHYGpiBy7EKSIphX8SqWg5Rsh-Su4,49533
398
398
  sky/skylet/log_lib.py,sha256=-kfeSNb7gR7Z-G7ADHh9Na4_QO-T0o2WzYYhcrrHSIE,23349
@@ -485,6 +485,7 @@ sky/utils/lock_events.py,sha256=qX4-Nlzm4S9bTD4e2eg2Vgn4AOlTjy7rhzLS_0B1IdA,2827
485
485
  sky/utils/locks.py,sha256=L51SbGY48b1gQQp8qk3HBentcENozYx1u68KuNL-_Jo,10729
486
486
  sky/utils/log_utils.py,sha256=RB5n58CAWmVepd_RAf-mjL2EViBFbtkPtSB5jJT6pLY,29684
487
487
  sky/utils/message_utils.py,sha256=zi2Z7PEX6Xq_zvho-aEZe_J7UvpKOLdVDdGAcipRQPU,2662
488
+ sky/utils/perf_utils.py,sha256=HxmTmVQc5DSfqJwISPxdVLWmUxNZHbibJg1kKVI-1Cg,700
488
489
  sky/utils/registry.py,sha256=I08nS0rvCF-xR5GEZoHEVgN1jcOeglz77h7xPpBCIjU,4179
489
490
  sky/utils/resource_checker.py,sha256=0rwr7yLVkYO3Qq5FZmniyPp-p66tIXmSoK5t0ZgIfso,10498
490
491
  sky/utils/resources_utils.py,sha256=3wnzmSIldFS5NmHTx6r2viS8zaP1q20noQolgQqucUU,16722
@@ -505,7 +506,7 @@ sky/utils/aws/get_default_security_group.py,sha256=LPzz5133ZUMbzDD3iqqACL9Pdlgqi
505
506
  sky/utils/cli_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
506
507
  sky/utils/cli_utils/status_utils.py,sha256=KYjicOiPs9n8C9VsA-JiDbhh5onHj2HwtLmIaicGjbc,16122
507
508
  sky/utils/db/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
508
- sky/utils/db/db_utils.py,sha256=7xgcawVq0U99P9t9iPJbwJqZjdG_ZCqBFyUTTW0UTnk,9917
509
+ sky/utils/db/db_utils.py,sha256=JKHYHNqAwVSqpFAgJT1ESJl5AIWA3Q1kRLYYXGuP3-E,12968
509
510
  sky/utils/db/migration_utils.py,sha256=4k3U3s5lUY9UifmLft4rL1ZrYhRKsToA1RcnPoyCfkE,5067
510
511
  sky/utils/kubernetes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
511
512
  sky/utils/kubernetes/cleanup-tunnel.sh,sha256=rXMXuMfyB9bzKjLvXdMCjimDVvdjGPMXuqeo2ZNx9OA,2244
@@ -536,9 +537,9 @@ sky/workspaces/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
536
537
  sky/workspaces/core.py,sha256=AjwbbRwk0glzCnqICJk4sQzMoUcawixbXoQWKLB3-aQ,25372
537
538
  sky/workspaces/server.py,sha256=Box45DS54xXGHy7I3tGKGy-JP0a8G_z6IhfvGlEXtsA,3439
538
539
  sky/workspaces/utils.py,sha256=IIAiFoS6sdb2t0X5YoX9AietpTanZUQNTK8cePun-sY,2143
539
- skypilot_nightly-1.0.0.dev20250831.dist-info/licenses/LICENSE,sha256=emRJAvE7ngL6x0RhQvlns5wJzGI3NEQ_WMjNmd9TZc4,12170
540
- skypilot_nightly-1.0.0.dev20250831.dist-info/METADATA,sha256=X5TnfxOBirYarpM6ushmIZlPg3vAkHr-tbfV9Wbq_n0,19598
541
- skypilot_nightly-1.0.0.dev20250831.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
542
- skypilot_nightly-1.0.0.dev20250831.dist-info/entry_points.txt,sha256=StA6HYpuHj-Y61L2Ze-hK2IcLWgLZcML5gJu8cs6nU4,36
543
- skypilot_nightly-1.0.0.dev20250831.dist-info/top_level.txt,sha256=qA8QuiNNb6Y1OF-pCUtPEr6sLEwy2xJX06Bd_CrtrHY,4
544
- skypilot_nightly-1.0.0.dev20250831.dist-info/RECORD,,
540
+ skypilot_nightly-1.0.0.dev20250902.dist-info/licenses/LICENSE,sha256=emRJAvE7ngL6x0RhQvlns5wJzGI3NEQ_WMjNmd9TZc4,12170
541
+ skypilot_nightly-1.0.0.dev20250902.dist-info/METADATA,sha256=yJ4beUeg1vxcpmZ17Ye9MH0feIVoo-mtYrrCCYTEKu8,19709
542
+ skypilot_nightly-1.0.0.dev20250902.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
543
+ skypilot_nightly-1.0.0.dev20250902.dist-info/entry_points.txt,sha256=StA6HYpuHj-Y61L2Ze-hK2IcLWgLZcML5gJu8cs6nU4,36
544
+ skypilot_nightly-1.0.0.dev20250902.dist-info/top_level.txt,sha256=qA8QuiNNb6Y1OF-pCUtPEr6sLEwy2xJX06Bd_CrtrHY,4
545
+ skypilot_nightly-1.0.0.dev20250902.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 K},ManagedJobs:function(){return B},ManagedJobsTable:function(){return H},Status2Actions:function(){return q},filterJobsByName:function(){return J},filterJobsByPool:function(){return Z},filterJobsByUser:function(){return O},filterJobsByWorkspace:function(){return U},statusGroups:function(){return P}});var r=t(85893),a=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:r,workspaceMatch:a,poolMatch:l,statuses:n}=e;return["allUsers:".concat(s),t?"name:".concat(t):"",r?"user:".concat(r):"",a?"workspace:".concat(a):"",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 r=t-s.timestamp;return{isCached:!0,isFresh:r<12e4,age:r,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,...r}=e,a=this._generateFilterKey(r);try{let e=this._getCacheStatus(a);if(e.isCached&&e.hasData){let l=e.data,n=(s-1)*t,i=l.jobs.slice(n,n+t);if(!this.prefetching.has(a)&&(!e.isFresh||e.age>e.maxAge/2)){let e=this._loadFullDataset(r,a).catch(()=>{}).finally(()=>this.prefetching.delete(a));this.prefetching.set(a,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,[{...r,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(a)){let e=this._loadFullDataset(r,a).catch(e=>{console.warn("Background prefetch of full jobs failed:",e)}).finally(()=>{this.prefetching.delete(a)});this.prefetching.set(a,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 r={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,r),r}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 r=this._getCacheStatus(s);e.detailedStatus[s]={age:r.age,isFresh:r.isFresh,hasData:r.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),N=t(13626),w=t(23293),y=t(6521),k=t(16826),C=t(53610),S=t(92128),L=t(94545),_=t(99307),E=t(20546),D=t(23001),R=t(88950);let F=(e,s)=>{let t={...e.query},r=[],a=[],l=[];s.map((e,s)=>{var t;r.push(null!==(t=e.property.toLowerCase())&&void 0!==t?t:""),a.push(e.operator),l.push(e.value)}),t.property=r,t.operator=a,t.value=l,e.replace({pathname:e.pathname,query:t},void 0,{shallow:!0})},M=(e,s)=>{let t={...e.query},r=t.property,a=t.operator,l=t.value;if(void 0===r)return[];let n=[],i=Array.isArray(r)?r.length:1;if(1===i)n.push({property:s.get(r),operator:a,value:l});else for(let e=0;e<i;e++)n.push({property:s.get(r[e]),operator:a[e],value:l[e]});return n},I=e=>{var s,t;let{propertyList:l=[],valueList:n,setFilters:i,updateURLParams:c,placeholder:o="Filter items"}=e,d=(0,a.useRef)(null),u=(0,a.useRef)(null),[h,x]=(0,a.useState)(!1),[m,p]=(0,a.useState)(""),[j,f]=(0,a.useState)((null===(s=l[0])||void 0===s?void 0:s.value)||"status"),[g,b]=(0,a.useState)([]);(0,a.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,a.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},N=e=>{i(s=>{let t=[...s,{property:v(j),operator:":",value:e}];return c(t),t}),x(!1),p(""),d.current.focus()};return(0,r.jsxs)("div",{className:"flex flex-row border border-gray-300 rounded-md overflow-visible",children:[(0,r.jsx)("div",{className:"border-r border-gray-300 flex-shrink-0",children:(0,r.jsxs)(R.Ph,{onValueChange:f,value:j,children:[(0,r.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,r.jsx)(R.ki,{placeholder:(null===(t=l[0])||void 0===t?void 0:t.label)||"Status"})}),(0,r.jsx)(R.Bw,{children:l.map((e,s)=>(0,r.jsx)(R.Ql,{value:e.value,children:e.label},"property-item-".concat(s)))})]})}),(0,r.jsxs)("div",{className:"relative flex-1",children:[(0,r.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,r.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,r.jsx)("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),h&&g.length>0&&(0,r.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,r.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:()=>N(e),children:(0,r.jsx)("span",{className:"text-sm text-gray-700",children:e})},"".concat(e,"-").concat(s)))})]})]})},A=e=>{let{filters:s=[],setFilters:t,updateURLParams:a}=e,l=e=>{t(s=>{let t=s.filter((s,t)=>t!==e);return a(t),t})};return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("div",{className:"flex items-center gap-4 py-2 px-2",children:(0,r.jsxs)("div",{className:"flex flex-wrap items-content gap-2",children:[s.map((e,s)=>(0,r.jsx)(z,{filter:e,onRemove:()=>l(s)},"filteritem-".concat(s))),s.length>0&&(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("button",{onClick:()=>{a([]),t([])},className:"rounded-full px-4 py-1 text-sm text-gray-700 bg-gray-200 hover:bg-gray-300",children:"Clear filters"})})]})})})},z=e=>{let{filter:s,onRemove:t}=e;return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{className:"flex items-center text-blue-600 bg-blue-100 px-1 py-1 rounded-full text-sm",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1 px-2",children:[(0,r.jsx)("span",{children:"".concat(s.property," ")}),(0,r.jsx)("span",{children:"".concat(s.operator," ")}),(0,r.jsx)("span",{children:" ".concat(s.value)})]}),(0,r.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,r.jsx)("svg",{className:"h-3 w-3",fill:"none",stroke:"white",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:5,d:"M6 18L18 6M6 6l12 12"})})})]})})},P={active:["PENDING","RUNNING","RECOVERING","SUBMITTED","STARTING","CANCELLING"],finished:["SUCCEEDED","FAILED","CANCELLED","FAILED_SETUP","FAILED_PRECHECKS","FAILED_NO_RESOURCE","FAILED_CONTROLLER"]},W=[{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 O(e,s){return s&&"ALL_USERS"!==s?e.filter(e=>(e.user_hash||e.user)===s):e}function Z(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,r.jsx)(h.Zg,{date:s})};function B(){let e=(0,l.useRouter)(),[s,t]=(0,a.useState)(!1),[n,c]=(0,a.useState)(!0),[o,d]=(0,a.useState)(!0),u=a.useRef(null),x=a.useRef(null),[j,g]=(0,a.useState)([]),[N,w]=(0,a.useState)([]),y=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,a.useEffect)(()=>{y()},[]);let k=s=>{F(e,s)},C=a.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"),w(M(e,s))},[e,w]);return(0,a.useEffect)(()=>{e.isReady&&C()},[e.isReady,e.query.tab,C]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mb-1",children:[(0,r.jsx)("div",{className:"text-base",children:(0,r.jsx)(i(),{href:"/jobs",className:"text-sky-blue hover:underline leading-none",children:"Managed Jobs"})}),(0,r.jsx)("div",{className:"w-full sm:w-auto",children:(0,r.jsx)(I,{propertyList:W,valueList:{},setFilters:w,updateURLParams:k,placeholder:"Filter jobs"})})]}),(0,r.jsx)(A,{filters:N,setFilters:w,updateURLParams:k}),(0,r.jsx)(H,{refreshInterval:h.yc,setLoading:t,refreshDataRef:u,filters:N,onRefresh:()=>{f.invalidateCache(),p.default.invalidate(m.vs,[{}]),p.default.invalidate(b.fX),p.default.invalidate(v.R),y(!0),u.current&&u.current(),x.current&&x.current()},poolsData:j,poolsLoading:n}),(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)(X,{refreshInterval:h.yc,setLoading:t,refreshDataRef:x})})]})}function H(e){let{refreshInterval:s,setLoading:t,refreshDataRef:l,filters:n,onRefresh:j,poolsData:b,poolsLoading:v}=e,[y,k]=(0,a.useState)([]),[C,R]=(0,a.useState)(0),[F,M]=(0,a.useState)(0),[I,A]=(0,a.useState)({key:null,direction:"ascending"}),[z,W]=(0,a.useState)(!1),[J,U]=(0,a.useState)(!0),[O,Z]=(0,a.useState)(1),[B,H]=(0,a.useState)(10),[K,X]=(0,a.useState)(null),Y=(0,a.useRef)(null),[Q,$]=(0,a.useState)([]),[ee,es]=(0,a.useState)({}),[et,er]=(0,a.useState)({}),[ea,el]=(0,a.useState)(!1),[en,ei]=(0,a.useState)(!1),[ec,eo]=(0,a.useState)(!1),[ed,eu]=(0,a.useState)("all"),[eh,ex]=(0,a.useState)(!0),[em,ep]=(0,a.useState)({isOpen:!1,title:"",message:"",onConfirm:null}),ej=(0,D.X)(),ef=async()=>{ep({isOpen:!0,title:"Restart Controller",message:"Are you sure you want to restart the controller?",onConfirm:async()=>{try{eo(!0),W(!0),await (0,m.Ce)("restartcontroller"),await eg()}catch(e){console.error("Error restarting controller:",e)}finally{eo(!1),W(!1)}}})},eg=a.useCallback(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=!1!==e.includeStatus;W(!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};Q.length>0?t=Q:eh?"active"===ed?t=P.active:"finished"===ed&&(t=P.finished):t=[];let a={allUsers:!0,nameMatch:r("name"),userMatch:r("user"),workspaceMatch:r("workspace"),poolMatch:r("pool"),statuses:t,page:O,limit:B},l=null;if(f.isDataCached(a),f.isDataLoading(a),s){let[s,t]=await Promise.all([f.getPaginatedJobs(a),p.default.get(g.getClusters)]);e=s,l=t}else e=await f.getPaginatedJobs(a);let{jobs:i=[],total:c=0,totalNoFilter:o=0,controllerStopped:d=!1,cacheStatus:u="unknown",statusCounts:h={}}=e||{},x=!!d,m=!1;if(s&&l){let e=null==l?void 0:l.find(e=>(0,L.Ym)(e.cluster)),s=e?e.status:"NOT_FOUND";"STOPPED"==s&&d&&(x=!0),"LAUNCHING"==s&&(m=!0)}k(i),R(c||0),M(o||0),el(!!x),ei(!!m),er(h),U(!1)}catch(e){console.error("Error fetching data:",e),k([]),el(!1),U(!1)}finally{W(!1),t(!1)}},[t,n,O,B,Q,eh,ed]);a.useEffect(()=>{l&&(l.current=eg)},[l,eg]);let eb=a.useRef(eg);a.useEffect(()=>{eb.current=eg},[eg]),a.useEffect(()=>{eg({includeStatus:!0})},[]),a.useEffect(()=>{eg({includeStatus:!1})},[O]),a.useEffect(()=>{eg({includeStatus:!0})},[n,B]),a.useEffect(()=>{eg({includeStatus:!0})},[ed,Q,eh]),(0,a.useEffect)(()=>{let e=setInterval(()=>{eb.current&&eb.current({includeStatus:!0})},s);return()=>{clearInterval(e)}},[s]),(0,a.useEffect)(()=>{Z(1)},[ed]),(0,a.useEffect)(()=>{Z(1)},[n,B]),(0,a.useEffect)(()=>{$([]),ex(!0)},[ed]);let ev=e=>{let s="ascending";I.key===e&&"ascending"===I.direction&&(s="descending"),A({key:e,direction:s})},eN=e=>I.key===e?"ascending"===I.direction?" ↑":" ↓":"";a.useMemo(()=>{let e=y||[];return{active:e.filter(e=>P.active.includes(e.status)).length,finished:e.filter(e=>P.finished.includes(e.status)).length}},[y]);let ew=e=>Q.length>0?Q.includes(e):"all"===ed||P[ed].includes(e),ey=a.useMemo(()=>y,[y]),ek=a.useMemo(()=>I.key?[...ey].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):ey,[ey,I]),eC=(O-1)*B,eS=C>0?Math.ceil(C/B):0,eL=C>0?Math.min(eC+ek.length,C):0,e_=e=>{if(Q.includes(e)){let s=Q.filter(s=>s!==e);0===s.length?(ex(!0),$([])):($(s),ex(!1))}else $([...Q,e]),ex(!1);Z(1)};return(0,a.useEffect)(()=>{es(et)},[et]),(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 justify-between text-sm mb-1",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center",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:[!z&&0===F&&!J&&(0,r.jsx)("span",{className:"text-gray-500 mr-2",children:"No jobs found"}),Object.entries(ee).map(e=>{let[s,t]=e;return(0,r.jsxs)("button",{onClick:()=>e_(s),className:"px-3 py-0.5 rounded-full flex items-center space-x-2 ".concat(ew(s)||Q.includes(s)?(0,_.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(ew(s)||Q.includes(s)?"bg-white/50":"bg-gray-200"," px-1.5 py-0.5 rounded"),children:t})]},s)}),F>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:()=>{a.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,r.jsx)("span",{className:"text-gray-500 mx-1",children:"|"}),(0,r.jsx)("button",{onClick:()=>{a.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,r.jsx)("span",{className:"text-gray-500 mx-1",children:"|"}),(0,r.jsx)("button",{onClick:()=>{a.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,r.jsx)("span",{className:"text-gray-500",children:")"})]})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[z&&(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(c.Z,{size:15,className:"mt-0"}),(0,r.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"Loading..."})]}),(0,r.jsxs)("button",{onClick:()=>{j&&j(),l&&l.current&&l.current()},disabled:z,className:"text-sky-blue hover:text-sky-blue-bright flex items-center text-sm",children:[(0,r.jsx)(N.Z,{className:"h-4 w-4 mr-1.5"}),(0,r.jsx)("span",{children:"Refresh"})]})]})]})}),ej&&ea&&0===ek.length&&!z&&!J&&(0,r.jsx)("div",{className:"mb-4 p-4 bg-gray-50 rounded-lg border",children:(0,r.jsxs)("div",{className:"flex flex-col items-center space-y-3",children:[(0,r.jsxs)("p",{className:"text-gray-700 text-center text-sm",children:["Job controller stopped.",(0,r.jsx)("br",{}),"Restart to check status."]}),(0,r.jsx)(o.z,{variant:"outline",size:"sm",onClick:ef,className:"text-sky-blue hover:text-sky-blue-bright",disabled:z||ec,children:ec?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.Z,{size:12,className:"mr-2"}),"Restarting..."]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(w.Z,{className:"h-4 w-4 mr-2"}),"Restart"]})})]})}),(0,r.jsx)(d.Zb,{children:(0,r.jsx)("div",{className:"overflow-x-auto rounded-lg",children:(0,r.jsxs)(u.iA,{className:"min-w-full",children:[(0,r.jsx)(u.xD,{children:(0,r.jsxs)(u.SC,{children:[(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>ev("id"),children:["ID",eN("id")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>ev("name"),children:["Name",eN("name")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>ev("user"),children:["User",eN("user")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>ev("workspace"),children:["Workspace",eN("workspace")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>ev("submitted_at"),children:["Submitted",eN("submitted_at")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>ev("job_duration"),children:["Duration",eN("job_duration")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>ev("status"),children:["Status",eN("status")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>ev("resources_str"),children:["Requested",eN("resources_str")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>ev("infra"),children:["Infra",eN("infra")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>ev("cluster"),children:["Resources",eN("cluster")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>ev("recoveries"),children:["Recoveries",eN("recoveries")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>ev("pool"),children:["Worker Pool",eN("pool")]}),(0,r.jsx)(u.ss,{children:"Details"}),(0,r.jsx)(u.ss,{children:"Logs"})]})}),(0,r.jsx)(u.RM,{children:z&&J?(0,r.jsx)(u.SC,{children:(0,r.jsx)(u.pj,{colSpan:12,className:"text-center py-6 text-gray-500",children:(0,r.jsxs)("div",{className:"flex justify-center items-center",children:[(0,r.jsx)(c.Z,{size:20,className:"mr-2"}),(0,r.jsx)("span",{children:"Loading..."})]})})}):ek.length>0?(0,r.jsx)(r.Fragment,{children:ek.map(e=>(0,r.jsxs)(a.Fragment,{children:[(0,r.jsxs)(u.SC,{children:[(0,r.jsx)(u.pj,{children:(0,r.jsx)(i(),{href:"/jobs/".concat(e.id),className:"text-blue-600",children:e.id})}),(0,r.jsx)(u.pj,{children:(0,r.jsx)(i(),{href:"/jobs/".concat(e.id),className:"text-blue-600",children:e.name})}),(0,r.jsx)(u.pj,{children:(0,r.jsx)(E.H,{username:e.user,userHash:e.user_hash})}),(0,r.jsx)(u.pj,{children:(0,r.jsx)(i(),{href:"/workspaces",className:"text-gray-700 hover:text-blue-600 hover:underline",children:e.workspace||"default"})}),(0,r.jsx)(u.pj,{children:T(e.submitted_at)}),(0,r.jsx)(u.pj,{children:(0,h.LU)(e.job_duration)}),(0,r.jsx)(u.pj,{children:(0,r.jsx)(_.OE,{status:e.status})}),(0,r.jsx)(u.pj,{children:e.requested_resources}),(0,r.jsx)(u.pj,{children:e.infra&&"-"!==e.infra?(0,r.jsx)(h.Md,{content:e.full_infra||e.infra,className:"text-sm text-muted-foreground",children:(0,r.jsxs)("span",{children:[(0,r.jsx)(i(),{href:"/infra",className:"text-blue-600 hover:underline",children:e.cloud||e.infra.split("(")[0].trim()}),e.infra.includes("(")&&(0,r.jsx)("span",{children:" "+(()=>{let s=x.MO.NAME_TRUNCATE_LENGTH,t=e.infra.substring(e.infra.indexOf("(")),r=t.substring(1,t.length-1);if(r.length<=s)return t;let a="".concat(r.substring(0,Math.floor((s-3)/2)),"...").concat(r.substring(r.length-Math.ceil((s-3)/2)));return"(".concat(a,")")})()})]})}):(0,r.jsx)("span",{children:e.infra||"-"})}),(0,r.jsx)(u.pj,{children:(0,r.jsx)(h.Md,{content:e.resources_str_full||e.resources_str,className:"text-sm text-muted-foreground",children:(0,r.jsx)("span",{children:e.resources_str})})}),(0,r.jsx)(u.pj,{children:e.recoveries}),(0,r.jsx)(u.pj,{children:(0,r.jsx)("div",{className:v?"blur-sm transition-all duration-300":"",children:v?"-":(0,h.os)(e.pool,e.pool_hash,b)})}),(0,r.jsx)(u.pj,{children:e.details?(0,r.jsx)(V,{text:e.details,rowId:e.id,expandedRowId:K,setExpandedRowId:X}):"-"}),(0,r.jsx)(u.pj,{children:(0,r.jsx)(q,{jobParent:"/jobs",jobId:e.id,managed:!0})})]}),K===e.id&&(0,r.jsx)(G,{text:e.details,colSpan:13,innerRef:Y})]},e.task_job_id))}):(0,r.jsx)(u.SC,{children:(0,r.jsx)(u.pj,{colSpan:13,className:"text-center py-6",children:(0,r.jsxs)("div",{className:"flex flex-col items-center space-y-4",children:[en&&(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. It will be ready shortly."}),(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(c.Z,{size:12,className:"mr-2"}),(0,r.jsx)("span",{className:"text-gray-500",children:"Launching..."})]})]}),!ea&&!en&&(0,r.jsx)("p",{className:"text-gray-500",children:"No active jobs"}),!ej&&ea&&(0,r.jsxs)("div",{className:"flex flex-col items-center space-y-3 px-4",children:[(0,r.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,r.jsx)(o.z,{variant:"outline",size:"sm",onClick:ef,className:"text-sky-blue hover:text-sky-blue-bright",disabled:z||ec,children:ec?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.Z,{size:12,className:"mr-2"}),"Restarting..."]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(w.Z,{className:"h-4 w-4 mr-2"}),"Restart Controller"]})})]})]})})})})]})})}),(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: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,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.jsx)("div",{children:C>0?"".concat(eC+1," – ").concat(eL," of ").concat(C):"0 – 0 of 0"}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(o.z,{variant:"ghost",size:"icon",onClick:()=>{Z(e=>Math.max(e-1,1))},disabled:1===O||!ek||0===ek.length,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:()=>{eS>0&&O<eS&&Z(e=>e+1)},disabled:0===eS||O>=eS||!ek||0===ek.length,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)(S.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:a,managed:n}=e,i=(0,l.useRouter)(),c=(e,s)=>{e.preventDefault(),e.stopPropagation(),i.push({pathname:"".concat(t,"/").concat(a),query:{tab:s}})},o=function(e){let s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e.preventDefault(),e.stopPropagation(),n)(0,m.jh)({jobId:parseInt(a),controller:s});else{let e=t.match(/\/clusters\/(.+)/);if(e){let s=e[1];(0,g.GH)({clusterName:s,jobIds:[a],workspace:"default"})}}};return(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(h.WH,{content:"View Job Logs",className:"capitalize text-sm text-muted-foreground",children:(0,r.jsxs)("button",{onClick:e=>c(e,"logs"),className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center h-8",children:[(0,r.jsx)(y.Z,{className:"w-4 h-4"}),s&&(0,r.jsx)("span",{className:"ml-1.5",children:"Logs"})]})},"logs"),(0,r.jsx)(h.WH,{content:"Download Job Logs",className:"capitalize text-sm text-muted-foreground",children:(0,r.jsxs)("button",{onClick:e=>o(e,!1),className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center h-8",children:[(0,r.jsx)(k.Z,{className:"w-4 h-4"}),s&&(0,r.jsx)("span",{className:"ml-1.5",children:"Download"})]})},"downloadlogs"),n&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.WH,{content:"View Controller Logs",className:"capitalize text-sm text-muted-foreground",children:(0,r.jsxs)("button",{onClick:e=>c(e,"controllerlogs"),className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center h-8",children:[(0,r.jsx)(C.Z,{className:"w-4 h-4"}),s&&(0,r.jsx)("span",{className:"ml-2",children:"Controller Logs"})]})},"controllerlogs"),(0,r.jsx)(h.WH,{content:"Download Controller Logs",className:"capitalize text-sm text-muted-foreground",children:(0,r.jsxs)("button",{onClick:e=>o(e,!0),className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center h-8",children:[(0,r.jsx)(k.Z,{className:"w-4 h-4"}),s&&(0,r.jsx)("span",{className:"ml-1.5",children:"Download Controller"})]})},"downloadcontrollerlogs")]})]})}function K(e){let{clusterName:s,clusterJobData:t,loading:l,refreshClusterJobsOnly:n,userFilter:x=null,nameFilter:m=null}=e,[p,j]=(0,a.useState)(null),[f,g]=(0,a.useState)({key:null,direction:"ascending"}),[b,v]=(0,a.useState)(1),[w,y]=(0,a.useState)(10),k=(0,a.useRef)(null),[C,S]=(0,a.useState)(null);(0,a.useEffect)(()=>{let e=e=>{p&&k.current&&!k.current.contains(e.target)&&j(null)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[p]);let L=a.useMemo(()=>{let e=t||[];return x&&"ALL_USERS"!==x&&(e=O(e,x)),m&&(e=J(e,m)),e},[t,x,m]);(0,a.useEffect)(()=>{JSON.stringify(t)!==JSON.stringify(C)&&S(t)},[t,C]);let D=a.useMemo(()=>f.key?[...L].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):L,[L,f]),R=e=>{let s="ascending";f.key===e&&"ascending"===f.direction&&(s="descending"),g({key:e,direction:s})},F=e=>f.key===e?"ascending"===f.direction?" ↑":" ↓":"",M=Math.ceil(D.length/w),I=(b-1)*w,A=I+w,z=D.slice(I,A);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"}),(0,r.jsx)("div",{className:"flex items-center",children:n&&(0,r.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,r.jsx)(N.Z,{className:"w-4 h-4 mr-1"}),"Refresh Jobs"]})})]}),(0,r.jsxs)(u.iA,{children:[(0,r.jsx)(u.xD,{children:(0,r.jsxs)(u.SC,{children:[(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>R("id"),children:["ID",F("id")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>R("job"),children:["Name",F("job")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>R("user"),children:["User",F("user")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>R("workspace"),children:["Workspace",F("workspace")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>R("submitted_at"),children:["Submitted",F("submitted_at")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>R("job_duration"),children:["Duration",F("job_duration")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>R("status"),children:["Status",F("status")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>R("resources"),children:["Resources",F("resources")]}),(0,r.jsx)(u.ss,{className:"whitespace-nowrap",children:"Logs"})]})}),(0,r.jsx)(u.RM,{children:l?(0,r.jsx)(u.SC,{children:(0,r.jsx)(u.pj,{colSpan:9,className:"text-center py-12 text-gray-500",children:(0,r.jsxs)("div",{className:"flex justify-center items-center",children:[(0,r.jsx)(c.Z,{size:24,className:"mr-2"}),(0,r.jsx)("span",{children:"Loading cluster jobs..."})]})})}):z.length>0?z.map(e=>(0,r.jsxs)(a.Fragment,{children:[(0,r.jsxs)(u.SC,{className:p===e.id?"selected-row":"",children:[(0,r.jsx)(u.pj,{children:(0,r.jsx)(i(),{href:"/clusters/".concat(s,"/").concat(e.id),className:"text-blue-600",children:e.id})}),(0,r.jsx)(u.pj,{children:(0,r.jsx)(i(),{href:"/clusters/".concat(s,"/").concat(e.id),className:"text-blue-600",children:(0,r.jsx)(V,{text:e.job||"Unnamed job",rowId:e.id,expandedRowId:p,setExpandedRowId:j})})}),(0,r.jsx)(u.pj,{children:(0,r.jsx)(E.H,{username:e.user,userHash:e.user_hash})}),(0,r.jsx)(u.pj,{children:(0,r.jsx)(i(),{href:"/workspaces",className:"text-gray-700 hover:text-blue-600 hover:underline",children:e.workspace||"default"})}),(0,r.jsx)(u.pj,{children:T(e.submitted_at)}),(0,r.jsx)(u.pj,{children:(0,h.LU)(e.job_duration)}),(0,r.jsx)(u.pj,{children:(0,r.jsx)(_.OE,{status:e.status})}),(0,r.jsx)(u.pj,{children:e.resources}),(0,r.jsx)(u.pj,{className:"flex content-center items-center",children:(0,r.jsx)(q,{jobParent:"/clusters/".concat(s),jobId:e.id,managed:!1})})]}),p===e.id&&(0,r.jsx)(G,{text:e.job||"Unnamed job",colSpan:9,innerRef:k})]},e.id)):(0,r.jsx)(u.SC,{children:(0,r.jsx)(u.pj,{colSpan:8,className:"text-center py-6 text-gray-500",children:"No jobs found"})})})]})]}),D&&D.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:w,onChange:e=>{y(parseInt(e.target.value,10)),v(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:[I+1," – ",Math.min(A,D.length)," of"," ",D.length]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(o.z,{variant:"ghost",size:"icon",onClick:()=>{v(e=>Math.max(e-1,1))},disabled:1===b,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:()=>{v(e=>Math.min(e+1,M))},disabled:b===M||0===M,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 G(e){let{text:s,colSpan:t,innerRef:a}=e;return(0,r.jsx)(u.SC,{className:"expanded-details",children:(0,r.jsx)(u.pj,{colSpan:t,children:(0,r.jsx)("div",{className:"p-4 bg-gray-50 rounded-md border border-gray-200",ref:a,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 V(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,a.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:d}),c&&(0,r.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 X(e){let{refreshInterval:s,setLoading:t,refreshDataRef:l}=e,[n,o]=(0,a.useState)([]),[x,j]=(0,a.useState)({key:null,direction:"ascending"}),[f,g]=(0,a.useState)(!1),[b,v]=(0,a.useState)(!0),[N,w]=(0,a.useState)(1),[y,k]=(0,a.useState)(10),C=a.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]);a.useEffect(()=>{l&&(l.current=C)},[l,C]),(0,a.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=a.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]),D=Math.ceil(E.length/y),R=(N-1)*y,F=R+y,M=E.slice(R,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,r.jsx)(h.x9,{jobCounts:s,getStatusStyle:_.Cl})},z=e=>{let{replicaInfo:s}=e;return(0,r.jsx)(h.Kl,{replicaInfo:s})};return(0,r.jsxs)(d.Zb,{children:[(0,r.jsx)("div",{className:"overflow-x-auto rounded-lg",children:(0,r.jsxs)(u.iA,{className:"min-w-full table-fixed",children:[(0,r.jsx)(u.xD,{children:(0,r.jsxs)(u.SC,{children:[(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap w-32",onClick:()=>S("name"),children:["Pool",L("name")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap w-40",onClick:()=>S("job_counts"),children:["Jobs",L("job_counts")]}),(0,r.jsx)(u.ss,{className:"whitespace-nowrap w-20",children:"Workers"}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap w-36",onClick:()=>S("requested_resources_str"),children:["Worker Details",L("requested_resources_str")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap w-40",onClick:()=>S("requested_resources_str"),children:["Worker Resources",L("requested_resources_str")]})]})}),(0,r.jsx)(u.RM,{children:f&&b?(0,r.jsx)(u.SC,{children:(0,r.jsx)(u.pj,{colSpan:5,className:"text-center py-6 text-gray-500",children:(0,r.jsxs)("div",{className:"flex justify-center items-center",children:[(0,r.jsx)(c.Z,{size:20,className:"mr-2"}),(0,r.jsx)("span",{children:"Loading..."})]})})}):M.length>0?M.map(e=>(0,r.jsxs)(u.SC,{children:[(0,r.jsx)(u.pj,{children:(0,r.jsx)(i(),{href:"/jobs/pools/".concat(e.name),className:"text-blue-600 hover:text-blue-800",children:e.name})}),(0,r.jsx)(u.pj,{children:(0,r.jsx)(A,{jobCounts:e.jobCounts})}),(0,r.jsx)(u.pj,{children:I(e)}),(0,r.jsx)(u.pj,{children:(0,r.jsx)(z,{replicaInfo:e.replica_info})}),(0,r.jsx)(u.pj,{children:e.requested_resources_str||"-"})]},e.name)):(0,r.jsx)(u.SC,{children:(0,r.jsx)(u.pj,{colSpan:5,className:"text-center py-6 text-gray-500",children:"No pools found"})})})]})}),M.length>0&&D>1&&(0,r.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-t border-gray-200",children:[(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)("span",{className:"text-sm text-gray-700",children:"Rows per page:"}),(0,r.jsxs)("select",{value:y,onChange:e=>{k(parseInt(e.target.value,10)),w(1)},className:"border border-gray-300 rounded px-2 py-1 text-sm",children:[(0,r.jsx)("option",{value:5,children:"5"}),(0,r.jsx)("option",{value:10,children:"10"}),(0,r.jsx)("option",{value:25,children:"25"}),(0,r.jsx)("option",{value:50,children:"50"})]})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsxs)("span",{className:"text-sm text-gray-700",children:[R+1,"-",Math.min(F,E.length)," of"," ",E.length]}),(0,r.jsx)("button",{onClick:()=>{w(e=>Math.max(e-1,1))},disabled:1===N,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,r.jsx)("button",{onClick:()=>{w(e=>Math.min(e+1,D))},disabled:N===D,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
- !function(){"use strict";var t,e,n,r,c,o,u,a,i,f={},s={};function d(t){var e=s[t];if(void 0!==e)return e.exports;var n=s[t]={exports:{}},r=!0;try{f[t](n,n.exports,d),r=!1}finally{r&&delete s[t]}return n.exports}d.m=f,t=[],d.O=function(e,n,r,c){if(n){c=c||0;for(var o=t.length;o>0&&t[o-1][2]>c;o--)t[o]=t[o-1];t[o]=[n,r,c];return}for(var u=1/0,o=0;o<t.length;o++){for(var n=t[o][0],r=t[o][1],c=t[o][2],a=!0,i=0;i<n.length;i++)u>=c&&Object.keys(d.O).every(function(t){return d.O[t](n[i])})?n.splice(i--,1):(a=!1,c<u&&(u=c));if(a){t.splice(o--,1);var f=r();void 0!==f&&(e=f)}}return e},d.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return d.d(e,{a:e}),e},n=Object.getPrototypeOf?function(t){return Object.getPrototypeOf(t)}:function(t){return t.__proto__},d.t=function(t,r){if(1&r&&(t=this(t)),8&r||"object"==typeof t&&t&&(4&r&&t.__esModule||16&r&&"function"==typeof t.then))return t;var c=Object.create(null);d.r(c);var o={};e=e||[null,n({}),n([]),n(n)];for(var u=2&r&&t;"object"==typeof u&&!~e.indexOf(u);u=n(u))Object.getOwnPropertyNames(u).forEach(function(e){o[e]=function(){return t[e]}});return o.default=function(){return t},d.d(c,o),c},d.d=function(t,e){for(var n in e)d.o(e,n)&&!d.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},d.f={},d.e=function(t){return Promise.all(Object.keys(d.f).reduce(function(e,n){return d.f[n](t,e),e},[]))},d.u=function(t){return 2350===t?"static/chunks/2350.fab69e61bac57b23.js":7325===t?"static/chunks/7325.b4bc99ce0892dcd5.js":3937===t?"static/chunks/3937.210053269f121201.js":9025===t?"static/chunks/9025.a1bef12d672bb66d.js":9984===t?"static/chunks/9984.7eb6cc51fb460cae.js":9946===t?"static/chunks/9946.3b7b43c217ff70ec.js":7669===t?"static/chunks/7669.1f5d9a402bf5cc42.js":4045===t?"static/chunks/4045.b30465273dc5e468.js":4725===t?"static/chunks/4725.10f7a9a5d3ea8208.js":3785===t?"static/chunks/3785.d5b86f6ebc88e6e6.js":4783===t?"static/chunks/4783.c485f48348349f47.js":"static/chunks/"+t+"-"+({616:"3d59f75e2ccf9321",1121:"8afcf719ea87debc",1141:"943efc7aff0f0c06",1272:"1ef0bf0237faccdb",3015:"6c9c09593b1e67b6",3850:"ff4a9a69d978632b",4676:"9da7fdbde90b5549",5739:"d67458fcb1386c92",6130:"2be46d70a38f1e82",6135:"4b4d5e824b7f9d3c",6601:"06114c982db410b6",6856:"049014c6d43d127b",6989:"01359c57e018caa4",6990:"08b2a1cae076a943",7205:"88191679e7988c57",7411:"b15471acd2cba716",8969:"4a6f1a928fb6d370",9037:"89a84fd7fa31362d"})[t]+".js"},d.miniCssF=function(t){},d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(t){if("object"==typeof window)return window}}(),d.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r={},c="_N_E:",d.l=function(t,e,n,o){if(r[t]){r[t].push(e);return}if(void 0!==n)for(var u,a,i=document.getElementsByTagName("script"),f=0;f<i.length;f++){var s=i[f];if(s.getAttribute("src")==t||s.getAttribute("data-webpack")==c+n){u=s;break}}u||(a=!0,(u=document.createElement("script")).charset="utf-8",u.timeout=120,d.nc&&u.setAttribute("nonce",d.nc),u.setAttribute("data-webpack",c+n),u.src=d.tu(t)),r[t]=[e];var b=function(e,n){u.onerror=u.onload=null,clearTimeout(l);var c=r[t];if(delete r[t],u.parentNode&&u.parentNode.removeChild(u),c&&c.forEach(function(t){return t(n)}),e)return e(n)},l=setTimeout(b.bind(null,void 0,{type:"timeout",target:u}),12e4);u.onerror=b.bind(null,u.onerror),u.onload=b.bind(null,u.onload),a&&document.head.appendChild(u)},d.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},d.tt=function(){return void 0===o&&(o={createScriptURL:function(t){return t}},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(o=trustedTypes.createPolicy("nextjs#bundler",o))),o},d.tu=function(t){return d.tt().createScriptURL(t)},d.p="/dashboard/_next/",u={2272:0},d.f.j=function(t,e){var n=d.o(u,t)?u[t]:void 0;if(0!==n){if(n)e.push(n[2]);else if(2272!=t){var r=new Promise(function(e,r){n=u[t]=[e,r]});e.push(n[2]=r);var c=d.p+d.u(t),o=Error();d.l(c,function(e){if(d.o(u,t)&&(0!==(n=u[t])&&(u[t]=void 0),n)){var r=e&&("load"===e.type?"missing":e.type),c=e&&e.target&&e.target.src;o.message="Loading chunk "+t+" failed.\n("+r+": "+c+")",o.name="ChunkLoadError",o.type=r,o.request=c,n[1](o)}},"chunk-"+t,t)}else u[t]=0}},d.O.j=function(t){return 0===u[t]},a=function(t,e){var n,r,c=e[0],o=e[1],a=e[2],i=0;if(c.some(function(t){return 0!==u[t]})){for(n in o)d.o(o,n)&&(d.m[n]=o[n]);if(a)var f=a(d)}for(t&&t(e);i<c.length;i++)r=c[i],d.o(u,r)&&u[r]&&u[r][0](),u[r]=0;return d.O(f)},(i=self.webpackChunk_N_E=self.webpackChunk_N_E||[]).forEach(a.bind(null,0)),i.push=a.bind(null,i.push.bind(i)),d.nc=void 0}();