skypilot-nightly 1.0.0.dev20250606__py3-none-any.whl → 1.0.0.dev20250609__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sky/__init__.py +2 -2
- sky/backends/backend_utils.py +21 -3
- sky/check.py +18 -22
- sky/cli.py +5 -8
- sky/client/cli.py +5 -8
- sky/client/sdk.py +2 -1
- sky/clouds/cloud.py +4 -0
- sky/clouds/nebius.py +44 -4
- sky/core.py +3 -2
- sky/dashboard/out/404.html +1 -1
- sky/dashboard/out/_next/static/chunks/236-619ed0248fb6fdd9.js +6 -0
- sky/dashboard/out/_next/static/chunks/470-680c19413b8f808b.js +1 -0
- sky/dashboard/out/_next/static/chunks/{614-635a84e87800f99e.js → 63-e2d7b1e75e67c713.js} +8 -8
- sky/dashboard/out/_next/static/chunks/843-16c7194621b2b512.js +11 -0
- sky/dashboard/out/_next/static/chunks/969-2c584e28e6b4b106.js +1 -0
- sky/dashboard/out/_next/static/chunks/973-aed916d5b02d2d63.js +1 -0
- sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/{[job]-65d04d5d77cbb6b6.js → [job]-d31688d3e52736dd.js} +1 -1
- sky/dashboard/out/_next/static/chunks/pages/clusters/{[cluster]-35cbeb5214fd4036.js → [cluster]-e7d8710a9b0491e5.js} +1 -1
- sky/dashboard/out/_next/static/chunks/pages/{clusters-5549a350f97d7ef3.js → clusters-3c674e5d970e05cb.js} +1 -1
- sky/dashboard/out/_next/static/chunks/pages/config-3aac7a015c6eede1.js +6 -0
- sky/dashboard/out/_next/static/chunks/pages/infra/{[context]-b68ddeed712d45b5.js → [context]-46d2e4ad6c487260.js} +1 -1
- sky/dashboard/out/_next/static/chunks/pages/{infra-13b117a831702196.js → infra-7013d816a2a0e76c.js} +1 -1
- sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-f7f0c9e156d328bc.js +16 -0
- sky/dashboard/out/_next/static/chunks/pages/{jobs-a76b2700eca236f7.js → jobs-87e60396c376292f.js} +1 -1
- sky/dashboard/out/_next/static/chunks/pages/users-9355a0f13d1db61d.js +16 -0
- sky/dashboard/out/_next/static/chunks/pages/workspace/{new-c7516f2b4c3727c0.js → new-9a749cca1813bd27.js} +1 -1
- sky/dashboard/out/_next/static/chunks/pages/workspaces/{[name]-7799de9e691e35d8.js → [name]-8eeb628e03902f1b.js} +1 -1
- sky/dashboard/out/_next/static/chunks/pages/workspaces-8fbcc5ab4af316d0.js +1 -0
- sky/dashboard/out/_next/static/css/8b1c8321d4c02372.css +3 -0
- sky/dashboard/out/_next/static/xos0euNCptbGAM7_Q3Acl/_buildManifest.js +1 -0
- sky/dashboard/out/clusters/[cluster]/[job].html +1 -1
- sky/dashboard/out/clusters/[cluster].html +1 -1
- sky/dashboard/out/clusters.html +1 -1
- sky/dashboard/out/config.html +1 -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.html +1 -1
- sky/dashboard/out/users.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/exceptions.py +5 -0
- sky/global_user_state.py +11 -6
- sky/jobs/scheduler.py +9 -4
- sky/jobs/server/core.py +23 -2
- sky/jobs/server/server.py +0 -95
- sky/jobs/state.py +18 -15
- sky/jobs/utils.py +2 -1
- sky/models.py +18 -0
- sky/provision/kubernetes/utils.py +12 -5
- sky/provision/nebius/constants.py +47 -0
- sky/provision/nebius/instance.py +2 -1
- sky/provision/nebius/utils.py +28 -7
- sky/serve/server/core.py +1 -1
- sky/server/common.py +4 -2
- sky/server/constants.py +0 -2
- sky/server/requests/executor.py +10 -2
- sky/server/requests/requests.py +4 -3
- sky/server/server.py +22 -5
- sky/skylet/constants.py +4 -0
- sky/skylet/job_lib.py +2 -1
- sky/skypilot_config.py +13 -1
- sky/templates/jobs-controller.yaml.j2 +3 -1
- sky/templates/nebius-ray.yml.j2 +6 -0
- sky/users/model.conf +1 -1
- sky/users/permission.py +148 -31
- sky/users/rbac.py +26 -0
- sky/users/server.py +14 -13
- sky/utils/common.py +6 -1
- sky/utils/common_utils.py +21 -3
- sky/utils/kubernetes/deploy_remote_cluster.py +5 -3
- sky/utils/resources_utils.py +3 -1
- sky/utils/schemas.py +9 -0
- sky/workspaces/core.py +100 -8
- sky/workspaces/server.py +15 -2
- sky/workspaces/utils.py +56 -0
- {skypilot_nightly-1.0.0.dev20250606.dist-info → skypilot_nightly-1.0.0.dev20250609.dist-info}/METADATA +1 -1
- {skypilot_nightly-1.0.0.dev20250606.dist-info → skypilot_nightly-1.0.0.dev20250609.dist-info}/RECORD +89 -87
- sky/dashboard/out/_next/static/99m-BAySO8Q7J-ul1jZVL/_buildManifest.js +0 -1
- sky/dashboard/out/_next/static/chunks/236-a90f0a9753a10420.js +0 -6
- sky/dashboard/out/_next/static/chunks/470-9e7a479cc8303baa.js +0 -1
- sky/dashboard/out/_next/static/chunks/843-c296541442d4af88.js +0 -11
- sky/dashboard/out/_next/static/chunks/969-c7abda31c10440ac.js +0 -1
- sky/dashboard/out/_next/static/chunks/973-1a09cac61cfcc1e1.js +0 -1
- sky/dashboard/out/_next/static/chunks/pages/config-1a1eeb949dab8897.js +0 -6
- sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-2d23a9c7571e6320.js +0 -16
- sky/dashboard/out/_next/static/chunks/pages/users-262aab38b9baaf3a.js +0 -16
- sky/dashboard/out/_next/static/chunks/pages/workspaces-384ea5fa0cea8f28.js +0 -1
- sky/dashboard/out/_next/static/css/667d941a2888ce6e.css +0 -3
- /sky/dashboard/out/_next/static/chunks/{37-beedd583fea84cc8.js → 37-600191c5804dcae2.js} +0 -0
- /sky/dashboard/out/_next/static/chunks/{682-6647f0417d5662f0.js → 682-b60cfdacc15202e8.js} +0 -0
- /sky/dashboard/out/_next/static/chunks/{856-3a32da4b84176f6d.js → 856-affc52adf5403a3a.js} +0 -0
- /sky/dashboard/out/_next/static/chunks/pages/{_app-cb81dc4d27f4d009.js → _app-5f16aba5794ee8e7.js} +0 -0
- /sky/dashboard/out/_next/static/{99m-BAySO8Q7J-ul1jZVL → xos0euNCptbGAM7_Q3Acl}/_ssgManifest.js +0 -0
- {skypilot_nightly-1.0.0.dev20250606.dist-info → skypilot_nightly-1.0.0.dev20250609.dist-info}/WHEEL +0 -0
- {skypilot_nightly-1.0.0.dev20250606.dist-info → skypilot_nightly-1.0.0.dev20250609.dist-info}/entry_points.txt +0 -0
- {skypilot_nightly-1.0.0.dev20250606.dist-info → skypilot_nightly-1.0.0.dev20250609.dist-info}/licenses/LICENSE +0 -0
- {skypilot_nightly-1.0.0.dev20250606.dist-info → skypilot_nightly-1.0.0.dev20250609.dist-info}/top_level.txt +0 -0
sky/__init__.py
CHANGED
@@ -5,7 +5,7 @@ from typing import Optional
|
|
5
5
|
import urllib.request
|
6
6
|
|
7
7
|
# Replaced with the current commit when building the wheels.
|
8
|
-
_SKYPILOT_COMMIT_SHA = '
|
8
|
+
_SKYPILOT_COMMIT_SHA = 'a2f62cdbc1e7e0e9f9f7f38e01271b040e0ec2f2'
|
9
9
|
|
10
10
|
|
11
11
|
def _get_git_commit():
|
@@ -35,7 +35,7 @@ def _get_git_commit():
|
|
35
35
|
|
36
36
|
|
37
37
|
__commit__ = _get_git_commit()
|
38
|
-
__version__ = '1.0.0.
|
38
|
+
__version__ = '1.0.0.dev20250609'
|
39
39
|
__root_dir__ = os.path.dirname(os.path.abspath(__file__))
|
40
40
|
|
41
41
|
|
sky/backends/backend_utils.py
CHANGED
@@ -51,6 +51,7 @@ from sky.utils import status_lib
|
|
51
51
|
from sky.utils import subprocess_utils
|
52
52
|
from sky.utils import timeline
|
53
53
|
from sky.utils import ux_utils
|
54
|
+
from sky.workspaces import core as workspaces_core
|
54
55
|
|
55
56
|
if typing.TYPE_CHECKING:
|
56
57
|
import requests
|
@@ -815,7 +816,9 @@ def write_cluster_config(
|
|
815
816
|
if isinstance(cloud, clouds.Kubernetes):
|
816
817
|
cluster_config_overrides = to_provision.cluster_config_overrides
|
817
818
|
kubernetes_utils.combine_pod_config_fields(
|
818
|
-
tmp_yaml_path,
|
819
|
+
tmp_yaml_path,
|
820
|
+
cluster_config_overrides=cluster_config_overrides,
|
821
|
+
cloud=cloud)
|
819
822
|
kubernetes_utils.combine_metadata_fields(tmp_yaml_path)
|
820
823
|
yaml_obj = common_utils.read_yaml(tmp_yaml_path)
|
821
824
|
pod_config: Dict[str, Any] = yaml_obj['available_node_types'][
|
@@ -2568,19 +2571,34 @@ def get_clusters(
|
|
2568
2571
|
public clouds only, and 'local' for only local clouds.
|
2569
2572
|
cluster_names: If provided, only return records for the given cluster
|
2570
2573
|
names.
|
2574
|
+
all_users: If True, return clusters from all users. If False, only
|
2575
|
+
return clusters from the current user.
|
2571
2576
|
|
2572
2577
|
Returns:
|
2573
2578
|
A list of cluster records. If the cluster does not exist or has been
|
2574
2579
|
terminated, the record will be omitted from the returned list.
|
2575
2580
|
"""
|
2576
2581
|
records = global_user_state.get_clusters()
|
2582
|
+
current_user = common_utils.get_current_user()
|
2583
|
+
|
2584
|
+
# Filter by user if requested
|
2577
2585
|
if not all_users:
|
2578
|
-
current_user_hash = common_utils.get_user_hash()
|
2579
2586
|
records = [
|
2580
2587
|
record for record in records
|
2581
|
-
if record['user_hash'] ==
|
2588
|
+
if record['user_hash'] == current_user.id
|
2582
2589
|
]
|
2583
2590
|
|
2591
|
+
accessible_workspaces = workspaces_core.get_workspaces()
|
2592
|
+
|
2593
|
+
workspace_filtered_records = []
|
2594
|
+
for record in records:
|
2595
|
+
cluster_workspace = record.get('workspace',
|
2596
|
+
constants.SKYPILOT_DEFAULT_WORKSPACE)
|
2597
|
+
if cluster_workspace in accessible_workspaces:
|
2598
|
+
workspace_filtered_records.append(record)
|
2599
|
+
|
2600
|
+
records = workspace_filtered_records
|
2601
|
+
|
2584
2602
|
yellow = colorama.Fore.YELLOW
|
2585
2603
|
bright = colorama.Style.BRIGHT
|
2586
2604
|
reset = colorama.Style.RESET_ALL
|
sky/check.py
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
"""Credential checks: check cloud credentials and enable clouds."""
|
2
2
|
import collections
|
3
|
-
import itertools
|
4
3
|
import os
|
5
4
|
import traceback
|
6
5
|
from types import ModuleType
|
@@ -70,14 +69,17 @@ def check_capabilities(
|
|
70
69
|
|
71
70
|
def check_one_cloud_one_capability(
|
72
71
|
payload: Tuple[Tuple[str, Union[sky_clouds.Cloud, ModuleType]],
|
73
|
-
sky_cloud.CloudCapability]
|
72
|
+
sky_cloud.CloudCapability, bool]
|
74
73
|
) -> Optional[Tuple[sky_cloud.CloudCapability, bool, Optional[Union[
|
75
74
|
str, Dict[str, str]]]]]:
|
75
|
+
cloud_tuple, capability, allowed = payload
|
76
|
+
if not allowed:
|
77
|
+
return (capability, False, f'{cloud_tuple[0]} is not included '
|
78
|
+
'in allowed_clouds in ~/.sky/config.yaml')
|
76
79
|
with skypilot_config.local_active_workspace_ctx(
|
77
80
|
current_workspace_name):
|
78
81
|
# Have to override again for specific thread, as the
|
79
82
|
# local_active_workspace_ctx is thread-local.
|
80
|
-
cloud_tuple, capability = payload
|
81
83
|
_, cloud = cloud_tuple
|
82
84
|
try:
|
83
85
|
ok, reason = cloud.check_credentials(capability)
|
@@ -103,8 +105,10 @@ def check_capabilities(
|
|
103
105
|
|
104
106
|
if clouds is not None:
|
105
107
|
cloud_list = clouds
|
108
|
+
check_explicit = True
|
106
109
|
else:
|
107
110
|
cloud_list = get_all_clouds()
|
111
|
+
check_explicit = False
|
108
112
|
|
109
113
|
clouds_to_check = [get_cloud_tuple(c) for c in cloud_list]
|
110
114
|
|
@@ -135,24 +139,15 @@ def check_capabilities(
|
|
135
139
|
disallowed_cloud_names = [
|
136
140
|
c for c in get_all_clouds() if c not in config_allowed_cloud_names
|
137
141
|
]
|
138
|
-
# Check only the clouds which are allowed in the config.
|
139
|
-
clouds_to_check = [
|
140
|
-
c for c in clouds_to_check if c[0] in config_allowed_cloud_names
|
141
|
-
]
|
142
142
|
|
143
|
-
combinations =
|
143
|
+
combinations = []
|
144
|
+
for c in clouds_to_check:
|
145
|
+
allowed = c[0] in config_allowed_cloud_names
|
146
|
+
if allowed or check_explicit:
|
147
|
+
for capability in capabilities:
|
148
|
+
combinations.append((c, capability, allowed))
|
144
149
|
|
145
150
|
cloud2ctx2text: Dict[str, Dict[str, str]] = {}
|
146
|
-
if not config_allowed_cloud_names:
|
147
|
-
for capability in capabilities:
|
148
|
-
global_user_state.set_enabled_clouds([], capability,
|
149
|
-
current_workspace_name)
|
150
|
-
if not combinations:
|
151
|
-
echo(
|
152
|
-
_summary_message(enabled_clouds, cloud2ctx2text,
|
153
|
-
current_workspace_name, hide_workspace_str,
|
154
|
-
disallowed_cloud_names))
|
155
|
-
return {}
|
156
151
|
|
157
152
|
workspace_str = f' for workspace: {current_workspace_name!r}'
|
158
153
|
if hide_workspace_str:
|
@@ -172,7 +167,7 @@ def check_capabilities(
|
|
172
167
|
if check_result is None:
|
173
168
|
continue
|
174
169
|
capability, ok, ctx2text = check_result
|
175
|
-
cloud_tuple, _ = combination
|
170
|
+
cloud_tuple, _, _ = combination
|
176
171
|
cloud_repr = cloud_tuple[0]
|
177
172
|
if isinstance(ctx2text, dict):
|
178
173
|
cloud2ctx2text[cloud_repr] = ctx2text
|
@@ -345,18 +340,19 @@ def get_cached_enabled_clouds_or_refresh(
|
|
345
340
|
exceptions.NoCloudAccessError: if no public cloud is enabled and
|
346
341
|
raise_if_no_cloud_access is set to True.
|
347
342
|
"""
|
343
|
+
active_workspace = skypilot_config.get_active_workspace()
|
348
344
|
cached_enabled_clouds = global_user_state.get_cached_enabled_clouds(
|
349
|
-
capability,
|
345
|
+
capability, active_workspace)
|
350
346
|
if not cached_enabled_clouds:
|
351
347
|
try:
|
352
|
-
check_capability(capability, quiet=True)
|
348
|
+
check_capability(capability, quiet=True, workspace=active_workspace)
|
353
349
|
except SystemExit:
|
354
350
|
# If no cloud is enabled, check() will raise SystemExit.
|
355
351
|
# Here we catch it and raise the exception later only if
|
356
352
|
# raise_if_no_cloud_access is set to True.
|
357
353
|
pass
|
358
354
|
cached_enabled_clouds = global_user_state.get_cached_enabled_clouds(
|
359
|
-
capability,
|
355
|
+
capability, active_workspace)
|
360
356
|
if raise_if_no_cloud_access and not cached_enabled_clouds:
|
361
357
|
with ux_utils.print_exception_no_traceback():
|
362
358
|
raise exceptions.NoCloudAccessError(
|
sky/cli.py
CHANGED
@@ -28,7 +28,6 @@ import copy
|
|
28
28
|
import datetime
|
29
29
|
import fnmatch
|
30
30
|
import functools
|
31
|
-
import getpass
|
32
31
|
import os
|
33
32
|
import pathlib
|
34
33
|
import shlex
|
@@ -6056,7 +6055,6 @@ def api():
|
|
6056
6055
|
|
6057
6056
|
|
6058
6057
|
@api.command('start', cls=_DocumentedCodeCommand)
|
6059
|
-
@config_option(expose_value=False)
|
6060
6058
|
@click.option('--deploy',
|
6061
6059
|
type=bool,
|
6062
6060
|
is_flag=True,
|
@@ -6089,7 +6087,6 @@ def api_start(deploy: bool, host: Optional[str], foreground: bool):
|
|
6089
6087
|
|
6090
6088
|
|
6091
6089
|
@api.command('stop', cls=_DocumentedCodeCommand)
|
6092
|
-
@config_option(expose_value=False)
|
6093
6090
|
@usage_lib.entrypoint
|
6094
6091
|
def api_stop():
|
6095
6092
|
"""Stops the SkyPilot API server locally."""
|
@@ -6245,18 +6242,18 @@ def api_info():
|
|
6245
6242
|
"""Shows the SkyPilot API server URL."""
|
6246
6243
|
url = server_common.get_server_url()
|
6247
6244
|
api_server_info = sdk.api_info()
|
6248
|
-
user_name = os.getenv(constants.USER_ENV_VAR, getpass.getuser())
|
6249
|
-
user_hash = common_utils.get_user_hash()
|
6250
6245
|
api_server_user = api_server_info.get('user')
|
6251
6246
|
if api_server_user is not None:
|
6252
|
-
|
6253
|
-
|
6247
|
+
user = models.User(id=api_server_user['id'],
|
6248
|
+
name=api_server_user['name'])
|
6249
|
+
else:
|
6250
|
+
user = models.User.get_current_user()
|
6254
6251
|
dashboard_url = server_common.get_dashboard_url(url)
|
6255
6252
|
click.echo(f'Using SkyPilot API server: {url}\n'
|
6256
6253
|
f'{ux_utils.INDENT_SYMBOL}Status: {api_server_info["status"]}, '
|
6257
6254
|
f'commit: {api_server_info["commit"]}, '
|
6258
6255
|
f'version: {api_server_info["version"]}\n'
|
6259
|
-
f'{ux_utils.INDENT_SYMBOL}User: {
|
6256
|
+
f'{ux_utils.INDENT_SYMBOL}User: {user.name} ({user.id})\n'
|
6260
6257
|
f'{ux_utils.INDENT_LAST_SYMBOL}Dashboard: {dashboard_url}')
|
6261
6258
|
|
6262
6259
|
|
sky/client/cli.py
CHANGED
@@ -28,7 +28,6 @@ import copy
|
|
28
28
|
import datetime
|
29
29
|
import fnmatch
|
30
30
|
import functools
|
31
|
-
import getpass
|
32
31
|
import os
|
33
32
|
import pathlib
|
34
33
|
import shlex
|
@@ -6056,7 +6055,6 @@ def api():
|
|
6056
6055
|
|
6057
6056
|
|
6058
6057
|
@api.command('start', cls=_DocumentedCodeCommand)
|
6059
|
-
@config_option(expose_value=False)
|
6060
6058
|
@click.option('--deploy',
|
6061
6059
|
type=bool,
|
6062
6060
|
is_flag=True,
|
@@ -6089,7 +6087,6 @@ def api_start(deploy: bool, host: Optional[str], foreground: bool):
|
|
6089
6087
|
|
6090
6088
|
|
6091
6089
|
@api.command('stop', cls=_DocumentedCodeCommand)
|
6092
|
-
@config_option(expose_value=False)
|
6093
6090
|
@usage_lib.entrypoint
|
6094
6091
|
def api_stop():
|
6095
6092
|
"""Stops the SkyPilot API server locally."""
|
@@ -6245,18 +6242,18 @@ def api_info():
|
|
6245
6242
|
"""Shows the SkyPilot API server URL."""
|
6246
6243
|
url = server_common.get_server_url()
|
6247
6244
|
api_server_info = sdk.api_info()
|
6248
|
-
user_name = os.getenv(constants.USER_ENV_VAR, getpass.getuser())
|
6249
|
-
user_hash = common_utils.get_user_hash()
|
6250
6245
|
api_server_user = api_server_info.get('user')
|
6251
6246
|
if api_server_user is not None:
|
6252
|
-
|
6253
|
-
|
6247
|
+
user = models.User(id=api_server_user['id'],
|
6248
|
+
name=api_server_user['name'])
|
6249
|
+
else:
|
6250
|
+
user = models.User.get_current_user()
|
6254
6251
|
dashboard_url = server_common.get_dashboard_url(url)
|
6255
6252
|
click.echo(f'Using SkyPilot API server: {url}\n'
|
6256
6253
|
f'{ux_utils.INDENT_SYMBOL}Status: {api_server_info["status"]}, '
|
6257
6254
|
f'commit: {api_server_info["commit"]}, '
|
6258
6255
|
f'version: {api_server_info["version"]}\n'
|
6259
|
-
f'{ux_utils.INDENT_SYMBOL}User: {
|
6256
|
+
f'{ux_utils.INDENT_SYMBOL}User: {user.name} ({user.id})\n'
|
6260
6257
|
f'{ux_utils.INDENT_LAST_SYMBOL}Dashboard: {dashboard_url}')
|
6261
6258
|
|
6262
6259
|
|
sky/client/sdk.py
CHANGED
@@ -85,7 +85,8 @@ def stream_response(request_id: Optional[str],
|
|
85
85
|
for line in rich_utils.decode_rich_status(response):
|
86
86
|
if line is not None:
|
87
87
|
print(line, flush=True, end='', file=output_stream)
|
88
|
-
|
88
|
+
if request_id is not None:
|
89
|
+
return get(request_id)
|
89
90
|
except Exception: # pylint: disable=broad-except
|
90
91
|
logger.debug(f'To stream request logs: sky api logs {request_id}')
|
91
92
|
raise
|
sky/clouds/cloud.py
CHANGED
@@ -726,10 +726,14 @@ class Cloud:
|
|
726
726
|
"""Errors out if the network tier is not supported by the
|
727
727
|
cloud provider.
|
728
728
|
|
729
|
+
For BEST tier: always succeeds, will use best available tier.
|
730
|
+
|
729
731
|
Raises:
|
730
732
|
exceptions.NotSupportedError: If the network tier is not supported.
|
731
733
|
"""
|
732
734
|
del instance_type # unused
|
735
|
+
|
736
|
+
# For other tiers, check if supported
|
733
737
|
if network_tier not in cls._SUPPORTED_NETWORK_TIERS:
|
734
738
|
with ux_utils.print_exception_no_traceback():
|
735
739
|
raise exceptions.NotSupportedError(
|
sky/clouds/nebius.py
CHANGED
@@ -9,6 +9,7 @@ from sky import clouds
|
|
9
9
|
from sky import exceptions
|
10
10
|
from sky import skypilot_config
|
11
11
|
from sky.adaptors import nebius
|
12
|
+
from sky.provision.nebius import constants as nebius_constants
|
12
13
|
from sky.utils import annotations
|
13
14
|
from sky.utils import registry
|
14
15
|
from sky.utils import resources_utils
|
@@ -76,8 +77,20 @@ class Nebius(clouds.Cloud):
|
|
76
77
|
def _unsupported_features_for_resources(
|
77
78
|
cls, resources: 'resources_lib.Resources'
|
78
79
|
) -> Dict[clouds.CloudImplementationFeatures, str]:
|
79
|
-
|
80
|
-
|
80
|
+
unsupported = cls._CLOUD_UNSUPPORTED_FEATURES.copy()
|
81
|
+
|
82
|
+
# Check if the accelerators support InfiniBand (H100 or H200) and 8 GPUs
|
83
|
+
if resources.accelerators is not None:
|
84
|
+
for acc_name, acc_count in resources.accelerators.items():
|
85
|
+
if acc_name.lower() in ('h100', 'h200') and acc_count == 8:
|
86
|
+
# Remove CUSTOM_NETWORK_TIER from unsupported features for
|
87
|
+
# InfiniBand-capable accelerators
|
88
|
+
unsupported.pop(
|
89
|
+
clouds.CloudImplementationFeatures.CUSTOM_NETWORK_TIER,
|
90
|
+
None)
|
91
|
+
break
|
92
|
+
|
93
|
+
return unsupported
|
81
94
|
|
82
95
|
@classmethod
|
83
96
|
def _max_cluster_name_length(cls) -> Optional[int]:
|
@@ -227,14 +240,41 @@ class Nebius(clouds.Cloud):
|
|
227
240
|
'image_id': image_family,
|
228
241
|
# Nebius does not support specific zones.
|
229
242
|
'zones': None,
|
230
|
-
'filesystems': resources_vars_fs
|
243
|
+
'filesystems': resources_vars_fs,
|
244
|
+
'network_tier': resources.network_tier
|
231
245
|
}
|
232
246
|
|
247
|
+
docker_run_options = []
|
248
|
+
|
233
249
|
if acc_dict is not None:
|
234
250
|
# Nebius cloud's docker runtime information does not contain
|
235
251
|
# 'nvidia-container-runtime', causing no GPU option to be added to
|
236
252
|
# the docker run command. We patch this by adding it here.
|
237
|
-
|
253
|
+
docker_run_options.append('--gpus all')
|
254
|
+
|
255
|
+
# Check for InfiniBand support with network_tier: best
|
256
|
+
is_infiniband_capable = (
|
257
|
+
platform in nebius_constants.INFINIBAND_INSTANCE_PLATFORMS)
|
258
|
+
if (is_infiniband_capable and
|
259
|
+
resources.network_tier == resources_utils.NetworkTier.BEST):
|
260
|
+
# For Docker containers, add InfiniBand device access and
|
261
|
+
# IPC_LOCK capability
|
262
|
+
if resources.extract_docker_image() is not None:
|
263
|
+
docker_run_options.extend(
|
264
|
+
nebius_constants.INFINIBAND_DOCKER_OPTIONS)
|
265
|
+
|
266
|
+
# Add InfiniBand environment variables to docker run options
|
267
|
+
for env_var, env_value in (
|
268
|
+
nebius_constants.INFINIBAND_ENV_VARS.items()):
|
269
|
+
docker_run_options.extend(
|
270
|
+
['-e', f'{env_var}={env_value}'])
|
271
|
+
|
272
|
+
# For all InfiniBand-capable instances, add env variables
|
273
|
+
resources_vars[
|
274
|
+
'env_vars'] = nebius_constants.INFINIBAND_ENV_VARS
|
275
|
+
|
276
|
+
if docker_run_options:
|
277
|
+
resources_vars['docker_run_options'] = docker_run_options
|
238
278
|
|
239
279
|
return resources_vars
|
240
280
|
|
sky/core.py
CHANGED
@@ -711,9 +711,10 @@ def queue(cluster_name: str,
|
|
711
711
|
exceptions.CommandError: if failed to get the job queue with ssh.
|
712
712
|
"""
|
713
713
|
all_jobs = not skip_finished
|
714
|
-
user_hash: Optional[str] = common_utils.get_user_hash()
|
715
714
|
if all_users:
|
716
715
|
user_hash = None
|
716
|
+
else:
|
717
|
+
user_hash = common_utils.get_current_user().id
|
717
718
|
code = job_lib.JobLibCodeGen.get_job_queue(user_hash, all_jobs)
|
718
719
|
|
719
720
|
handle = backend_utils.check_cluster_available(
|
@@ -829,7 +830,7 @@ def cancel(
|
|
829
830
|
backend.cancel_jobs(handle,
|
830
831
|
job_ids,
|
831
832
|
cancel_all=all or all_users,
|
832
|
-
user_hash=common_utils.
|
833
|
+
user_hash=common_utils.get_current_user().id)
|
833
834
|
|
834
835
|
|
835
836
|
@usage_lib.entrypoint
|
sky/dashboard/out/404.html
CHANGED
@@ -1 +1 @@
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>404: This page could not be found</title><meta name="next-head-count" content="3"/><link rel="preload" href="/dashboard/_next/static/css/
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>404: This page could not be found</title><meta name="next-head-count" content="3"/><link rel="preload" href="/dashboard/_next/static/css/8b1c8321d4c02372.css" as="style"/><link rel="stylesheet" href="/dashboard/_next/static/css/8b1c8321d4c02372.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/dashboard/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/dashboard/_next/static/chunks/webpack-65d465f948974c0d.js" defer=""></script><script src="/dashboard/_next/static/chunks/framework-87d061ee6ed71b28.js" defer=""></script><script src="/dashboard/_next/static/chunks/main-e0e2335212e72357.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/_app-5f16aba5794ee8e7.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/_error-1be831200e60c5c0.js" defer=""></script><script src="/dashboard/_next/static/xos0euNCptbGAM7_Q3Acl/_buildManifest.js" defer=""></script><script src="/dashboard/_next/static/xos0euNCptbGAM7_Q3Acl/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">This page could not be found<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"xos0euNCptbGAM7_Q3Acl","assetPrefix":"/dashboard","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[236],{8236:function(e,s,t){t.d(s,{L4:function(){return A},Nk:function(){return I},x2:function(){return R}});var n=t(5893),r=t(7294),a=t(1163),l=t(1664),i=t.n(l),c=t(8799),o=t(803),d=t(7673),h=t(8764),x=t(6989),u=t(8969),m=t(3266),j=t(7324),p=t(9470),f=t(3626),g=t(998);/**
|
2
|
+
* @license lucide-react v0.407.0 - ISC
|
3
|
+
*
|
4
|
+
* This source code is licensed under the ISC license.
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
6
|
+
*/let w=(0,g.Z)("RefreshCcw",[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]]),b=(0,g.Z)("FileSearch",[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4.268 21a2 2 0 0 0 1.727 1H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"ms7g94"}],["path",{d:"m9 18-1.5-1.5",key:"1j6qii"}],["circle",{cx:"5",cy:"14",r:"3",key:"ufru5t"}]]),N=(0,g.Z)("MonitorPlay",[["path",{d:"M10 7.75a.75.75 0 0 1 1.142-.638l3.664 2.249a.75.75 0 0 1 0 1.278l-3.664 2.25a.75.75 0 0 1-1.142-.64z",key:"1pctta"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",key:"x3v2xh"}]]);var y=t(9284),v=t(4545),k=t(9307),C=t(3001),S=t(8950),L=t(6378),E=t(6856);let R={active:["PENDING","RUNNING","RECOVERING","SUBMITTED","STARTING","CANCELLING"],finished:["SUCCEEDED","FAILED","CANCELLED","FAILED_SETUP","FAILED_PRECHECKS","FAILED_NO_RESOURCE","FAILED_CONTROLLER"]},M="__ALL_WORKSPACES__",_=e=>{if(!e)return"-";let s=e instanceof Date?e:new Date(1e3*e),t=(0,x.GV)(s);if(r.isValidElement(t)&&t.props&&t.props.children&&(t=r.isValidElement(t.props.children)&&t.props.children.props&&t.props.children.props.children?t.props.children.props.children:t.props.children),"string"!=typeof t)return t;let a=function(e){if(!e||"string"!=typeof e)return e;if("just now"===e)return"now";if("less than a minute ago"===e.toLowerCase())return"Less than a minute ago";let s=e.match(/^About\s+(\d+)\s+(\w+)\s+ago$/);if(s){let e=s[1],t=s[2],n={second:"s",seconds:"s",minute:"m",minutes:"m",hour:"h",hours:"h",day:"d",days:"d",month:"mo",months:"mo",year:"yr",years:"yr"};if(n[t])return"".concat(e).concat(n[t]," ago")}let t=e.match(/^a[n]?\s+(\w+)\s+ago$/);if(t){let e=t[1],s={second:"s",minute:"m",hour:"h",day:"d",month:"mo",year:"yr"};if(s[e])return"1".concat(s[e]," ago")}let n=e.match(/^(\d+)\s+(\w+)\s+ago$/);if(n){let e=n[1],s=n[2],t={second:"s",seconds:"s",minute:"m",minutes:"m",hour:"h",hours:"h",day:"d",days:"d",month:"mo",months:"mo",year:"yr",years:"yr"};if(t[s])return"".concat(e).concat(t[s]," ago")}return e}(t);return 7>Math.abs((new Date().getTime()-s.getTime())/864e5)?(0,n.jsx)(x.WH,{content:(0,x.o0)(s),className:"capitalize text-sm text-muted-foreground",children:a}):(0,n.jsx)(x.WH,{content:(0,x.o0)(s),className:"text-sm text-muted-foreground",children:a})};function I(){let e=(0,a.useRouter)(),[s,t]=(0,r.useState)(!1),l=r.useRef(null),[o,d]=(0,r.useState)({isOpen:!1,title:"",message:"",onConfirm:null}),h=(0,C.X)(),[m,g]=(0,r.useState)(M),[w,b]=(0,r.useState)([]);return(0,r.useEffect)(()=>{e.isReady&&e.query.workspace&&g(Array.isArray(e.query.workspace)?e.query.workspace[0]:e.query.workspace)},[e.isReady,e.query.workspace]),(0,r.useEffect)(()=>{(async()=>{try{await E.ZP.preloadForPage("jobs");let e=await L.default.get(j.fX),s=Object.keys(e),t=(await L.default.get(u.getManagedJobs,[{allUsers:!0}])).jobs||[],n=[...new Set(t.map(e=>e.workspace||"default").filter(e=>e))],r=new Set(s);n.forEach(e=>r.add(e)),b(Array.from(r).sort())}catch(e){console.error("Error fetching data for workspace filter:",e),b(["default"])}})()},[]),(0,n.jsxs)(p.A,{highlighted:"jobs",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,n.jsxs)("div",{className:"text-base flex items-center",children:[(0,n.jsx)(i(),{href:"/jobs",className:"text-sky-blue hover:underline leading-none",children:"Managed Jobs"}),(0,n.jsxs)(S.Ph,{value:m,onValueChange:g,children:[(0,n.jsx)(S.i4,{className:"h-8 w-48 ml-4 mr-2 text-sm border-none focus:ring-0 focus:outline-none",children:(0,n.jsx)(S.ki,{placeholder:"Filter by workspace...",children:m===M?"All Workspaces":m})}),(0,n.jsxs)(S.Bw,{children:[(0,n.jsx)(S.Ql,{value:M,children:"All Workspaces"}),w.map(e=>(0,n.jsx)(S.Ql,{value:e,children:e},e))]})]})]}),(0,n.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,n.jsxs)("div",{className:"flex items-center mr-2",children:[(0,n.jsx)(c.Z,{size:15,className:"mt-0"}),(0,n.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"Loading..."})]}),(0,n.jsxs)("button",{onClick:()=>{L.default.invalidate(u.getManagedJobs,[{allUsers:!0}]),L.default.invalidate(j.fX),l.current&&l.current()},disabled:s,className:"text-sky-blue hover:text-sky-blue-bright flex items-center",title:"Refresh",children:[(0,n.jsx)(f.Z,{className:"h-4 w-4 mr-1.5"}),!h&&(0,n.jsx)("span",{children:"Refresh"})]})]})]}),(0,n.jsx)(D,{refreshInterval:x.yc,setLoading:t,refreshDataRef:l,workspaceFilter:m}),(0,n.jsx)(y.cV,{isOpen:o.isOpen,onClose:()=>d({...o,isOpen:!1}),onConfirm:o.onConfirm,title:o.title,message:o.message})]})}function D(e){let{refreshInterval:s,setLoading:t,refreshDataRef:a,workspaceFilter:l}=e,[j,p]=(0,r.useState)([]),[f,g]=(0,r.useState)({key:null,direction:"ascending"}),[b,N]=(0,r.useState)(!1),[C,S]=(0,r.useState)(!0),[E,I]=(0,r.useState)(1),[D,A]=(0,r.useState)(10),[F,P]=(0,r.useState)(null),U=(0,r.useRef)(null),[Z,T]=(0,r.useState)([]),[q,V]=(0,r.useState)({}),[J,B]=(0,r.useState)(!1),[H,G]=(0,r.useState)(!1),[X,$]=(0,r.useState)(!1),[K,Q]=(0,r.useState)("active"),[Y,ee]=(0,r.useState)(!0),[es,et]=(0,r.useState)({isOpen:!1,title:"",message:"",onConfirm:null}),en=async()=>{et({isOpen:!0,title:"Restart Controller",message:"Are you sure you want to restart the controller?",onConfirm:async()=>{try{$(!0),N(!0),await (0,u.Ce)("restartcontroller"),await er()}catch(e){console.error("Error restarting controller:",e)}finally{$(!1),N(!1)}}})},er=r.useCallback(async()=>{N(!0),t(!0);try{let[e,s]=await Promise.all([L.default.get(u.getManagedJobs,[{allUsers:!0}]),L.default.get(m.getClusters)]),{jobs:t=[],controllerStopped:n=!1}=e||{},r=null==s?void 0:s.find(e=>(0,v.Ym)(e.cluster)),a=r?r.status:"NOT_FOUND",l=!1;"STOPPED"==a&&n&&(l=!0),"LAUNCHING"==a?G(!0):G(!1),p(t),B(l),S(!1)}catch(e){console.error("Error fetching data:",e),p([]),B(!1),S(!1)}finally{N(!1),t(!1)}},[t]);r.useEffect(()=>{a&&(a.current=er)},[a,er]),(0,r.useEffect)(()=>{p([]);let e=!0;er();let t=setInterval(()=>{e&&er()},s);return()=>{e=!1,clearInterval(t)}},[s,er]),(0,r.useEffect)(()=>{I(1)},[K,null==j?void 0:j.length]),(0,r.useEffect)(()=>{T([]),ee(!0)},[K]);let ea=e=>{let s="ascending";f.key===e&&"ascending"===f.direction&&(s="descending"),g({key:e,direction:s})},el=e=>f.key===e?"ascending"===f.direction?" ↑":" ↓":"";r.useMemo(()=>{let e=j||[];return{active:e.filter(e=>R.active.includes(e.status)).length,finished:e.filter(e=>R.finished.includes(e.status)).length}},[j]);let ei=e=>Z.length>0?Z.includes(e):R[K].includes(e),ec=r.useMemo(()=>{let e=l&&l!==M?j.filter(e=>(e.workspace||"default").toLowerCase()===l.toLowerCase()):j;return Z.length>0?e.filter(e=>Z.includes(e.status)):Y?e.filter(e=>R[K].includes(e.status)):[]},[j,K,Z,Y,l]),eo=r.useMemo(()=>f.key?[...ec].sort((e,s)=>e[f.key]<s[f.key]?"ascending"===f.direction?-1:1:e[f.key]>s[f.key]?"ascending"===f.direction?1:-1:0):ec,[ec,f]),ed=Math.ceil(eo.length/D),eh=(E-1)*D,ex=eh+D,eu=eo.slice(eh,ex),em=e=>{if(Z.includes(e)){let s=Z.filter(s=>s!==e);0===s.length?(ee(!0),T([])):(T(s),ee(!1))}else T([...Z,e]),ee(!1)};return(0,r.useEffect)(()=>{V((j||[]).reduce((e,s)=>(e[s.status]=(e[s.status]||0)+1,e),{}))},[j]),(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)("div",{className:"flex flex-col space-y-1 mb-1",children:(0,n.jsxs)("div",{className:"flex flex-wrap items-center text-sm mb-1",children:[(0,n.jsx)("span",{className:"mr-2 text-sm font-medium",children:"Statuses:"}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-2 items-center",children:[!b&&(!j||0===j.length)&&!C&&(0,n.jsx)("span",{className:"text-gray-500 mr-2",children:"No jobs found"}),Object.entries(q).map(e=>{let[s,t]=e;return(0,n.jsxs)("button",{onClick:()=>em(s),className:"px-3 py-1 rounded-full flex items-center space-x-2 ".concat(ei(s)||Z.includes(s)?(0,k.Cl)(s):"bg-gray-50 text-gray-600 hover:bg-gray-100"),children:[(0,n.jsx)("span",{children:s}),(0,n.jsx)("span",{className:"text-xs ".concat(ei(s)||Z.includes(s)?"bg-white/50":"bg-gray-200"," px-1.5 py-0.5 rounded"),children:t})]},s)}),j&&j.length>0&&(0,n.jsxs)("div",{className:"flex items-center ml-2 gap-2",children:[(0,n.jsx)("span",{className:"text-gray-500",children:"("}),(0,n.jsx)("button",{onClick:()=>{Q("active"),T([]),ee(!0)},className:"text-sm font-medium ".concat("active"===K&&Y?"text-green-700 underline":"text-gray-600 hover:text-green-700 hover:underline"),children:"show all active jobs"}),(0,n.jsx)("span",{className:"text-gray-500 mx-1",children:"|"}),(0,n.jsx)("button",{onClick:()=>{Q("finished"),T([]),ee(!0)},className:"text-sm font-medium ".concat("finished"===K&&Y?"text-blue-700 underline":"text-gray-600 hover:text-blue-700 hover:underline"),children:"show all finished jobs"}),(0,n.jsx)("span",{className:"text-gray-500",children:")"})]})]})]})}),(0,n.jsx)(d.Zb,{children:(0,n.jsxs)(h.iA,{children:[(0,n.jsx)(h.xD,{children:(0,n.jsxs)(h.SC,{children:[(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>ea("id"),children:["ID",el("id")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>ea("name"),children:["Name",el("name")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>ea("user"),children:["User",el("user")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>ea("workspace"),children:["Workspace",el("workspace")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>ea("submitted_at"),children:["Submitted",el("submitted_at")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>ea("job_duration"),children:["Duration",el("job_duration")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>ea("status"),children:["Status",el("status")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>ea("priority"),children:["Priority",el("priority")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>ea("resources_str"),children:["Requested",el("resources_str")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>ea("infra"),children:["Infra",el("infra")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>ea("cluster"),children:["Resources",el("cluster")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>ea("recoveries"),children:["Recoveries",el("recoveries")]}),(0,n.jsx)(h.ss,{children:"Details"}),(0,n.jsx)(h.ss,{children:"Logs"})]})}),(0,n.jsx)(h.RM,{children:b||C?(0,n.jsx)(h.SC,{children:(0,n.jsx)(h.pj,{colSpan:13,className:"text-center py-6 text-gray-500",children:(0,n.jsxs)("div",{className:"flex justify-center items-center",children:[(0,n.jsx)(c.Z,{size:20,className:"mr-2"}),(0,n.jsx)("span",{children:"Loading..."})]})})}):eu.length>0?(0,n.jsx)(n.Fragment,{children:eu.map(e=>(0,n.jsxs)(r.Fragment,{children:[(0,n.jsxs)(h.SC,{children:[(0,n.jsx)(h.pj,{children:(0,n.jsx)(i(),{href:"/jobs/".concat(e.id),className:"text-blue-600",children:e.id})}),(0,n.jsx)(h.pj,{children:(0,n.jsx)(i(),{href:"/jobs/".concat(e.id),className:"text-blue-600",children:e.name})}),(0,n.jsx)(h.pj,{children:e.user}),(0,n.jsx)(h.pj,{children:(0,n.jsx)(i(),{href:"/workspaces",className:"text-blue-600 hover:underline",children:e.workspace||"default"})}),(0,n.jsx)(h.pj,{children:_(e.submitted_at)}),(0,n.jsx)(h.pj,{children:(0,x.LU)(e.job_duration)}),(0,n.jsx)(h.pj,{children:(0,n.jsx)(k.OE,{status:e.status})}),(0,n.jsx)(h.pj,{children:e.priority}),(0,n.jsx)(h.pj,{children:e.requested_resources}),(0,n.jsx)(h.pj,{children:e.infra&&"-"!==e.infra?(0,n.jsx)(x.Md,{content:e.full_infra||e.infra,className:"text-sm text-muted-foreground",children:(0,n.jsxs)("span",{children:[(0,n.jsx)(i(),{href:"/infra",className:"text-blue-600 hover:underline",children:e.cloud||e.infra.split("(")[0].trim()}),e.infra.includes("(")&&(0,n.jsx)("span",{children:" "+e.infra.substring(e.infra.indexOf("("))})]})}):(0,n.jsx)("span",{children:e.infra||"-"})}),(0,n.jsx)(h.pj,{children:(0,n.jsx)(x.Md,{content:e.resources_str_full||e.resources_str,className:"text-sm text-muted-foreground",children:(0,n.jsx)("span",{children:e.resources_str})})}),(0,n.jsx)(h.pj,{children:e.recoveries}),(0,n.jsx)(h.pj,{children:e.details?(0,n.jsx)(W,{text:e.details,rowId:e.id,expandedRowId:F,setExpandedRowId:P}):"-"}),(0,n.jsx)(h.pj,{children:(0,n.jsx)(O,{jobParent:"/jobs",jobId:e.id,managed:!0})})]}),F===e.id&&(0,n.jsx)(z,{text:e.details,colSpan:13,innerRef:U})]},e.id))}):(0,n.jsx)(h.SC,{children:(0,n.jsx)(h.pj,{colSpan:13,className:"text-center py-6",children:(0,n.jsxs)("div",{className:"flex flex-col items-center space-y-4",children:[H&&(0,n.jsxs)("div",{className:"flex flex-col items-center space-y-2",children:[(0,n.jsx)("p",{className:"text-gray-700",children:"The managed job controller is launching. It will be ready shortly."}),(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)(c.Z,{size:12,className:"mr-2"}),(0,n.jsx)("span",{className:"text-gray-500",children:"Launching..."})]})]}),!J&&!H&&(0,n.jsx)("p",{className:"text-gray-500",children:"No active jobs"}),J&&(0,n.jsxs)("div",{className:"flex flex-col items-center space-y-2",children:[(0,n.jsx)("p",{className:"text-gray-700",children:"The managed job controller has been stopped. Restart to check the latest job status."}),(0,n.jsx)(o.z,{variant:"outline",size:"sm",onClick:en,className:"text-sky-blue hover:text-sky-blue-bright",disabled:b||X,children:X?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.Z,{size:12,className:"mr-2"}),"Restarting..."]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(w,{className:"h-4 w-4 mr-2"}),"Restart Controller"]})})]})]})})})})]})}),eo&&eo.length>0&&(0,n.jsx)("div",{className:"flex justify-end items-center py-2 px-4 text-sm text-gray-700",children:(0,n.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("span",{className:"mr-2",children:"Rows per page:"}),(0,n.jsxs)("div",{className:"relative inline-block",children:[(0,n.jsxs)("select",{value:D,onChange:e=>{A(parseInt(e.target.value,10)),I(1)},className:"py-1 pl-2 pr-6 appearance-none outline-none cursor-pointer border-none bg-transparent",style:{minWidth:"40px"},children:[(0,n.jsx)("option",{value:10,children:"10"}),(0,n.jsx)("option",{value:30,children:"30"}),(0,n.jsx)("option",{value:50,children:"50"}),(0,n.jsx)("option",{value:100,children:"100"}),(0,n.jsx)("option",{value:200,children:"200"})]}),(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-gray-500 absolute right-0 top-1/2 transform -translate-y-1/2 pointer-events-none",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),(0,n.jsxs)("div",{children:[eh+1," – ",Math.min(ex,eo.length)," of"," ",eo.length]}),(0,n.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,n.jsx)(o.z,{variant:"ghost",size:"icon",onClick:()=>{I(e=>Math.max(e-1,1))},disabled:1===E,className:"text-gray-500 h-8 w-8 p-0",children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"chevron-left",children:(0,n.jsx)("path",{d:"M15 18l-6-6 6-6"})})}),(0,n.jsx)(o.z,{variant:"ghost",size:"icon",onClick:()=>{I(e=>Math.min(e+1,ed))},disabled:E===ed||0===ed,className:"text-gray-500 h-8 w-8 p-0",children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"chevron-right",children:(0,n.jsx)("path",{d:"M9 18l6-6-6-6"})})})]})]})}),(0,n.jsx)(y.cV,{isOpen:es.isOpen,onClose:()=>et({...es,isOpen:!1}),onConfirm:es.onConfirm,title:es.title,message:es.message,confirmClassName:"bg-blue-600 hover:bg-blue-700 text-white"})]})}function O(e){let{withLabel:s=!1,jobParent:t,jobId:r,managed:l}=e,i=(0,a.useRouter)(),c=(e,s)=>{e.preventDefault(),e.stopPropagation(),i.push({pathname:"".concat(t,"/").concat(r),query:{tab:s}})};return(0,n.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,n.jsx)(x.WH,{content:"View Job Logs",className:"capitalize text-sm text-muted-foreground",children:(0,n.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,n.jsx)(b,{className:"w-4 h-4"}),s&&(0,n.jsx)("span",{className:"ml-1.5",children:"Logs"})]})},"logs"),l&&(0,n.jsx)(x.WH,{content:"View Controller Logs",className:"capitalize text-sm text-muted-foreground",children:(0,n.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,n.jsx)(N,{className:"w-4 h-4"}),s&&(0,n.jsx)("span",{className:"ml-2",children:"Controller Logs"})]})},"controllerlogs")]})}function A(e){let{clusterName:s,clusterJobData:t,loading:a,refreshClusterJobsOnly:l}=e,[u,m]=(0,r.useState)(null),[j,p]=(0,r.useState)({key:null,direction:"ascending"}),[g,w]=(0,r.useState)(1),[b,N]=(0,r.useState)(10),y=(0,r.useRef)(null),[v,C]=(0,r.useState)(null);(0,r.useEffect)(()=>{let e=e=>{u&&y.current&&!y.current.contains(e.target)&&m(null)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[u]);let S=r.useMemo(()=>t||[],[t]);(0,r.useEffect)(()=>{JSON.stringify(t)!==JSON.stringify(v)&&C(t)},[t,v]);let L=r.useMemo(()=>j.key?[...S].sort((e,s)=>e[j.key]<s[j.key]?"ascending"===j.direction?-1:1:e[j.key]>s[j.key]?"ascending"===j.direction?1:-1:0):S,[S,j]),E=e=>{let s="ascending";j.key===e&&"ascending"===j.direction&&(s="descending"),p({key:e,direction:s})},R=e=>j.key===e?"ascending"===j.direction?" ↑":" ↓":"",M=Math.ceil(L.length/b),I=(g-1)*b,D=I+b,A=L.slice(I,D);return(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsxs)(d.Zb,{children:[(0,n.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,n.jsx)("h3",{className:"text-lg font-semibold",children:"Cluster Jobs"}),(0,n.jsx)("div",{className:"flex items-center",children:l&&(0,n.jsxs)("button",{onClick:l,disabled:a,className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center text-sm ml-2",children:[(0,n.jsx)(f.Z,{className:"w-4 h-4 mr-1"}),"Refresh Jobs"]})})]}),(0,n.jsxs)(h.iA,{children:[(0,n.jsx)(h.xD,{children:(0,n.jsxs)(h.SC,{children:[(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>E("id"),children:["ID",R("id")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>E("job"),children:["Name",R("job")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>E("user"),children:["User",R("user")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>E("workspace"),children:["Workspace",R("workspace")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>E("submitted_at"),children:["Submitted",R("submitted_at")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>E("job_duration"),children:["Duration",R("job_duration")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>E("status"),children:["Status",R("status")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>E("resources"),children:["Resources",R("resources")]}),(0,n.jsx)(h.ss,{className:"whitespace-nowrap",children:"Logs"})]})}),(0,n.jsx)(h.RM,{children:a?(0,n.jsx)(h.SC,{children:(0,n.jsx)(h.pj,{colSpan:9,className:"text-center py-12 text-gray-500",children:(0,n.jsxs)("div",{className:"flex justify-center items-center",children:[(0,n.jsx)(c.Z,{size:24,className:"mr-2"}),(0,n.jsx)("span",{children:"Loading cluster jobs..."})]})})}):A.length>0?A.map(e=>(0,n.jsxs)(r.Fragment,{children:[(0,n.jsxs)(h.SC,{className:u===e.id?"selected-row":"",children:[(0,n.jsx)(h.pj,{children:(0,n.jsx)(i(),{href:"/clusters/".concat(s,"/").concat(e.id),className:"text-blue-600",children:e.id})}),(0,n.jsx)(h.pj,{children:(0,n.jsx)(i(),{href:"/clusters/".concat(s,"/").concat(e.id),className:"text-blue-600",children:(0,n.jsx)(W,{text:e.job||"Unnamed job",rowId:e.id,expandedRowId:u,setExpandedRowId:m})})}),(0,n.jsx)(h.pj,{children:e.user}),(0,n.jsx)(h.pj,{children:(0,n.jsx)(i(),{href:"/workspaces",className:"text-blue-600 hover:underline",children:e.workspace||"default"})}),(0,n.jsx)(h.pj,{children:_(e.submitted_at)}),(0,n.jsx)(h.pj,{children:(0,x.LU)(e.job_duration)}),(0,n.jsx)(h.pj,{children:(0,n.jsx)(k.OE,{status:e.status})}),(0,n.jsx)(h.pj,{children:e.resources}),(0,n.jsx)(h.pj,{className:"flex content-center items-center",children:(0,n.jsx)(O,{jobParent:"/clusters/".concat(s),jobId:e.id,managed:!1})})]}),u===e.id&&(0,n.jsx)(z,{text:e.job||"Unnamed job",colSpan:9,innerRef:y})]},e.id)):(0,n.jsx)(h.SC,{children:(0,n.jsx)(h.pj,{colSpan:8,className:"text-center py-6 text-gray-500",children:"No jobs found"})})})]})]}),L&&L.length>0&&(0,n.jsx)("div",{className:"flex justify-end items-center py-2 px-4 text-sm text-gray-700",children:(0,n.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("span",{className:"mr-2",children:"Rows per page:"}),(0,n.jsxs)("div",{className:"relative inline-block",children:[(0,n.jsxs)("select",{value:b,onChange:e=>{N(parseInt(e.target.value,10)),w(1)},className:"py-1 pl-2 pr-6 appearance-none outline-none cursor-pointer border-none bg-transparent",style:{minWidth:"40px"},children:[(0,n.jsx)("option",{value:5,children:"5"}),(0,n.jsx)("option",{value:10,children:"10"}),(0,n.jsx)("option",{value:20,children:"20"}),(0,n.jsx)("option",{value:50,children:"50"})]}),(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-gray-500 absolute right-0 top-1/2 transform -translate-y-1/2 pointer-events-none",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),(0,n.jsxs)("div",{children:[I+1," – ",Math.min(D,L.length)," of"," ",L.length]}),(0,n.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,n.jsx)(o.z,{variant:"ghost",size:"icon",onClick:()=>{w(e=>Math.max(e-1,1))},disabled:1===g,className:"text-gray-500 h-8 w-8 p-0",children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"chevron-left",children:(0,n.jsx)("path",{d:"M15 18l-6-6 6-6"})})}),(0,n.jsx)(o.z,{variant:"ghost",size:"icon",onClick:()=>{w(e=>Math.min(e+1,M))},disabled:g===M||0===M,className:"text-gray-500 h-8 w-8 p-0",children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"chevron-right",children:(0,n.jsx)("path",{d:"M9 18l6-6-6-6"})})})]})]})})]})}function z(e){let{text:s,colSpan:t,innerRef:r}=e;return(0,n.jsx)(h.SC,{className:"expanded-details",children:(0,n.jsx)(h.pj,{colSpan:t,children:(0,n.jsx)("div",{className:"p-4 bg-gray-50 rounded-md border border-gray-200",ref:r,children:(0,n.jsx)("div",{className:"flex justify-between items-start",children:(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)("p",{className:"text-sm font-medium text-gray-900",children:"Full Details"}),(0,n.jsx)("p",{className:"mt-1 text-sm text-gray-700",style:{whiteSpace:"pre-wrap"},children:s})]})})})})})}function W(e){let{text:s,rowId:t,expandedRowId:a,setExpandedRowId:l}=e,i=s||"",c=i.length>50,o=a===t,d=c?"".concat(i.substring(0,50)):i,h=(0,r.useRef)(null);return(0,n.jsxs)("div",{className:"truncated-details relative max-w-full flex items-center",children:[(0,n.jsx)("span",{className:"truncate",children:d}),c&&(0,n.jsx)("button",{ref:h,type:"button",onClick:e=>{e.preventDefault(),e.stopPropagation(),l(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"})]})}}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[470],{3850:function(e,t,n){n.d(t,{E9:function(){return w},J$:function(){return l},PC:function(){return x},Ps:function(){return i},QT:function(){return u},Vp:function(){return h},W2:function(){return a},Ye:function(){return c},aD:function(){return j},fp:function(){return d},fy:function(){return m},h0:function(){return f},mU:function(){return g},oy:function(){return y},r7:function(){return p}});var r=n(5893);n(7294);var s=n(8507),o=n(8586);function i(e){return(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"0",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"})})}function a(e){return(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("circle",{cx:"10",cy:"10",r:"8"})})}function l(e){return(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("circle",{cx:"10",cy:"10",r:"8"})})}function c(e){return(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("path",{d:"M6 12l4 4 8-8"})})}function d(e){return(0,r.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"0",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("rect",{x:"6",y:"5",width:"4",height:"14",rx:"1"}),(0,r.jsx)("rect",{x:"14",y:"5",width:"4",height:"14",rx:"1"})]})}function u(e){return(0,r.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2"}),(0,r.jsx)("rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2"}),(0,r.jsx)("line",{x1:"6",x2:"6.01",y1:"6",y2:"6"}),(0,r.jsx)("line",{x1:"6",x2:"6.01",y1:"18",y2:"18"})]})}function h(e){return(0,r.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"}),(0,r.jsx)("rect",{width:"20",height:"14",x:"2",y:"6",rx:"2"})]})}function x(e){return(0,r.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",ry:"2"}),(0,r.jsx)("rect",{x:"9",y:"9",width:"6",height:"6"}),(0,r.jsx)("line",{x1:"9",y1:"1",x2:"9",y2:"4"}),(0,r.jsx)("line",{x1:"15",y1:"1",x2:"15",y2:"4"}),(0,r.jsx)("line",{x1:"9",y1:"20",x2:"9",y2:"23"}),(0,r.jsx)("line",{x1:"15",y1:"20",x2:"15",y2:"23"}),(0,r.jsx)("line",{x1:"20",y1:"9",x2:"23",y2:"9"}),(0,r.jsx)("line",{x1:"20",y1:"14",x2:"23",y2:"14"}),(0,r.jsx)("line",{x1:"1",y1:"9",x2:"4",y2:"9"}),(0,r.jsx)("line",{x1:"1",y1:"14",x2:"4",y2:"14"})]})}function f(e){return(0,r.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),(0,r.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,r.jsx)("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})}function m(e){return(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",children:(0,r.jsx)("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"})})}function p(e){return(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"})})}function g(e){return(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",children:(0,r.jsx)("path",{transform:"scale(0.85) translate(1.8, 1.8)",d:"M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z"})})}function w(e){return(0,r.jsx)("svg",{...e,stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsxs)("g",{children:[(0,r.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,r.jsx)("path",{d:"M3 18.5V5a3 3 0 0 1 3-3h14a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5A3.5 3.5 0 0 1 3 18.5zM19 20v-3H6.5a1.5 1.5 0 0 0 0 3H19zM10 4H6a1 1 0 0 0-1 1v10.337A3.486 3.486 0 0 1 6.5 15H19V4h-2v8l-3.5-2-3.5 2V4z"})]})})}let j=s.Z,y=o.Z},9470:function(e,t,n){n.d(t,{A:function(){return y}});var r=n(5893),s=n(7294),o=n(5675),i=n.n(o),a=n(1163),l=n(1664),c=n.n(l),d=n(3850),u=n(355),h=n(6021),x=n(3225),f=n(6989),m=n(3001);let p=(0,s.createContext)(null);function g(e){let{children:t}=e,[n,o]=(0,s.useState)(!0),[i,a]=(0,s.useState)(null),[l,c]=(0,s.useState)(null);return(0,s.useEffect)(()=>{fetch("".concat(x.f4,"/api/health")).then(e=>e.json()).then(e=>{e.user&&e.user.name&&(a(e.user.name),(async()=>{try{let e=await fetch("".concat(x.f4,"/users/role"));if(e.ok){let t=await e.json();t.role&&c(t.role)}}catch(e){console.log("Could not fetch user role:",e)}})())}).catch(e=>{console.error("Error fetching user data:",e)})},[]),(0,r.jsx)(p.Provider,{value:{isSidebarOpen:n,toggleSidebar:()=>{o(e=>!e)},userEmail:i,userRole:l},children:t})}function w(){let e,t;let n=(0,a.useRouter)(),o=(0,m.X)(),{userEmail:l,userRole:g}=function(){let e=(0,s.useContext)(p);if(!e)throw Error("useSidebar must be used within a SidebarProvider");return e}(),[w,j]=(0,s.useState)(!1),y=(0,s.useRef)(null);(0,s.useEffect)(()=>{function e(e){y.current&&!y.current.contains(e.target)&&j(!1)}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[y]);let v=e=>"/workspaces"===e?n.pathname.startsWith("/workspaces")||n.pathname.startsWith("/workspace"):n.pathname.startsWith(e),b=e=>{let t=v(e);return"inline-flex items-center border-b-2 ".concat(t?"border-transparent text-blue-600":"border-transparent hover:text-blue-600"," ").concat(o?"px-2 py-1":"px-1 pt-1 space-x-2")};return(0,r.jsx)("div",{className:"fixed top-0 left-0 right-0 bg-white z-30 h-14 px-4 border-b border-gray-200 shadow-sm",children:(0,r.jsxs)("div",{className:"flex items-center h-full",children:[(0,r.jsx)("div",{className:"flex items-center ".concat(o?"space-x-2 mr-2":"space-x-4 mr-6"),children:(0,r.jsx)(c(),{href:"/",className:"flex items-center px-1 pt-1 h-full",prefetch:!1,children:(0,r.jsx)("div",{className:"h-20 w-20 flex items-center justify-center",children:(0,r.jsx)(i(),{src:"".concat(x.GW,"/skypilot.svg"),alt:"SkyPilot Logo",width:80,height:80,priority:!0,className:"w-full h-full object-contain"})})})}),(0,r.jsxs)("div",{className:"flex items-center ".concat(o?"space-x-1":"space-x-2 md:space-x-4"," ").concat(o?"mr-2":"mr-6"),children:[(0,r.jsxs)(c(),{href:"/clusters",className:b("/clusters"),prefetch:!1,children:[(0,r.jsx)(d.QT,{className:"w-4 h-4"}),!o&&(0,r.jsx)("span",{children:"Clusters"})]}),(0,r.jsxs)(c(),{href:"/jobs",className:b("/jobs"),prefetch:!1,children:[(0,r.jsx)(d.Vp,{className:"w-4 h-4"}),!o&&(0,r.jsx)("span",{children:"Jobs"})]}),(0,r.jsx)("div",{className:"border-l border-gray-200 h-6 mx-1"}),(0,r.jsxs)(c(),{href:"/infra",className:b("/infra"),prefetch:!1,children:[(0,r.jsx)(d.PC,{className:"w-4 h-4"}),!o&&(0,r.jsx)("span",{children:"Infra"})]}),(0,r.jsxs)(c(),{href:"/workspaces",className:b("/workspaces"),prefetch:!1,children:[(0,r.jsx)(d.E9,{className:"w-4 h-4"}),!o&&(0,r.jsx)("span",{children:"Workspaces"})]}),(0,r.jsxs)(c(),{href:"/users",className:b("/users"),prefetch:!1,children:[(0,r.jsx)(d.oy,{className:"w-4 h-4"}),!o&&(0,r.jsx)("span",{children:"Users"})]})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-1 ".concat(o?"ml-0":"ml-auto"),children:[(0,r.jsx)(f.WH,{content:"Documentation",className:"text-sm text-muted-foreground",children:(0,r.jsxs)("a",{href:"https://skypilot.readthedocs.io/en/latest/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center px-2 py-1 text-gray-600 hover:text-blue-600 transition-colors duration-150 cursor-pointer",title:"Docs",children:[!o&&(0,r.jsx)("span",{className:"mr-1",children:"Docs"}),(0,r.jsx)(d.h0,{className:"".concat(o?"w-4 h-4":"w-3.5 h-3.5")})]})}),(0,r.jsx)(f.WH,{content:"GitHub Repository",className:"text-sm text-muted-foreground",children:(0,r.jsx)("a",{href:"https://github.com/skypilot-org/skypilot",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center p-2 rounded-full text-gray-600 hover:bg-gray-100 transition-colors duration-150 cursor-pointer",title:"GitHub",children:(0,r.jsx)(d.fy,{className:"".concat(o?"w-4 h-4":"w-5 h-5")})})}),(0,r.jsx)(f.WH,{content:"Join Slack",className:"text-sm text-muted-foreground",children:(0,r.jsx)("a",{href:"https://slack.skypilot.co/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center p-2 rounded-full text-gray-600 hover:bg-gray-100 transition-colors duration-150 cursor-pointer",title:"Slack",children:(0,r.jsx)(d.mU,{className:"".concat(o?"w-4 h-4":"w-5 h-5")})})}),(0,r.jsx)(f.WH,{content:"Leave Feedback",className:"text-sm text-muted-foreground",children:(0,r.jsx)("a",{href:"https://github.com/skypilot-org/skypilot/issues/new",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center p-2 rounded-full text-gray-600 hover:bg-gray-100 transition-colors duration-150 cursor-pointer",title:"Leave Feedback",children:(0,r.jsx)(d.aD,{className:"".concat(o?"w-4 h-4":"w-5 h-5")})})}),(0,r.jsx)("div",{className:"border-l border-gray-200 h-6"}),(0,r.jsx)(f.WH,{content:"Configuration",className:"text-sm text-muted-foreground",children:(0,r.jsx)(c(),{href:"/config",className:"inline-flex items-center justify-center p-2 rounded-full transition-colors duration-150 cursor-pointer ".concat(v("/config")?"text-blue-600 hover:bg-gray-100":"text-gray-600 hover:bg-gray-100"),title:"Configuration",prefetch:!1,children:(0,r.jsx)(u.Z,{className:"".concat(o?"w-4 h-4":"w-5 h-5")})})}),l&&(0,r.jsxs)("div",{className:"relative",ref:y,children:[(0,r.jsx)("button",{onClick:()=>j(!w),className:"inline-flex items-center justify-center rounded-full transition-colors duration-150 cursor-pointer hover:ring-2 hover:ring-blue-200",title:"User Profile",children:(0,r.jsx)("div",{className:"".concat(o?"w-6 h-6":"w-7 h-7"," bg-blue-600 text-white rounded-full flex items-center justify-center font-medium ").concat(o?"text-xs":"text-sm"," hover:bg-blue-700 transition-colors"),children:l?l.includes("@")?l.split("@")[0].charAt(0).toUpperCase():l.charAt(0).toUpperCase():"?"})}),w&&(0,r.jsxs)("div",{className:"absolute right-0 mt-2 w-48 bg-white rounded-md shadow-lg z-50 border border-gray-200",children:[(e=l,t=null,l&&l.includes("@")&&(e=l.split("@")[0],t=l),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"px-4 pt-2 pb-1 text-sm font-medium text-gray-900",children:e}),t&&(0,r.jsx)("div",{className:"px-4 pt-0 pb-1 text-xs text-gray-500",children:t}),g&&(0,r.jsx)("div",{className:"px-4 pt-0 pb-2 text-xs",children:"admin"===g?(0,r.jsxs)("span",{className:"inline-flex items-center text-blue-600",children:[(0,r.jsx)(d.r7,{className:"w-3 h-3 mr-1"}),"Admin"]}):(0,r.jsxs)("span",{className:"inline-flex items-center text-gray-600",children:[(0,r.jsx)(h.Z,{className:"w-3 h-3 mr-1"}),"User"]})})]})),(0,r.jsx)("div",{className:"border-t border-gray-200 mx-1 my-1"}),(0,r.jsx)(c(),{href:"/users",className:"block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 hover:text-blue-600",onClick:()=>j(!1),prefetch:!1,children:"See all users"})]})]})]})]})})}function j(e){let{children:t,highlighted:n}=e;return(0,m.X)(),(0,r.jsxs)("div",{className:"min-h-screen bg-gray-50",children:[(0,r.jsx)("div",{className:"fixed top-0 left-0 right-0 z-50 shadow-sm",children:(0,r.jsx)(w,{})}),(0,r.jsx)("div",{className:"transition-all duration-200 ease-in-out min-h-screen",style:{paddingTop:"56px"},children:(0,r.jsx)("main",{className:"p-6",children:t})})]})}function y(e){return(0,r.jsx)(g,{children:(0,r.jsx)(j,{...e})})}},8950:function(e,t,n){n.d(t,{Bw:function(){return m},Ph:function(){return d},Ql:function(){return p},i4:function(){return h},ki:function(){return u}});var r=n(5893),s=n(7294),o=n(2067),i=n(5895),a=n(7242),l=n(282),c=n(2350);let d=o.fC;o.ZA;let u=o.B4,h=s.forwardRef((e,t)=>{let{className:n,children:s,...a}=e;return(0,r.jsxs)(o.xz,{ref:t,className:(0,c.cn)("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",n),...a,children:[s,(0,r.jsx)(o.JO,{asChild:!0,children:(0,r.jsx)(i.Z,{className:"h-4 w-4 opacity-50"})})]})});h.displayName=o.xz.displayName;let x=s.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,r.jsx)(o.u_,{ref:t,className:(0,c.cn)("flex cursor-default items-center justify-center py-1",n),...s,children:(0,r.jsx)(a.Z,{className:"h-4 w-4"})})});x.displayName=o.u_.displayName;let f=s.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,r.jsx)(o.$G,{ref:t,className:(0,c.cn)("flex cursor-default items-center justify-center py-1",n),...s,children:(0,r.jsx)(i.Z,{className:"h-4 w-4"})})});f.displayName=o.$G.displayName;let m=s.forwardRef((e,t)=>{let{className:n,children:s,position:i="popper",...a}=e;return(0,r.jsx)(o.h_,{children:(0,r.jsxs)(o.VY,{ref:t,className:(0,c.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===i&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n),position:i,...a,children:[(0,r.jsx)(x,{}),(0,r.jsx)(o.l_,{className:(0,c.cn)("p-1","popper"===i&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:s}),(0,r.jsx)(f,{})]})})});m.displayName=o.VY.displayName,s.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,r.jsx)(o.__,{ref:t,className:(0,c.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",n),...s})}).displayName=o.__.displayName;let p=s.forwardRef((e,t)=>{let{className:n,children:s,...i}=e;return(0,r.jsxs)(o.ck,{ref:t,className:(0,c.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n),...i,children:[(0,r.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,r.jsx)(o.wU,{children:(0,r.jsx)(l.Z,{className:"h-4 w-4"})})}),(0,r.jsx)(o.eT,{children:s})]})});p.displayName=o.ck.displayName,s.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,r.jsx)(o.Z0,{ref:t,className:(0,c.cn)("-mx-1 my-1 h-px bg-muted",n),...s})}).displayName=o.Z0.displayName},6989:function(e,t,n){n.d(t,{$B:function(){return g},GV:function(){return d},LU:function(){return m},Md:function(){return f},WH:function(){return x},o0:function(){return u},q8:function(){return p},yc:function(){return l}});var r=n(5893),s=n(7294),o=n(3302),i=n(1886),a=n(8950);let l=n(1214).nb.REFRESH_INTERVAL;function c(e){return e.charAt(0).toUpperCase()+e.slice(1)}function d(e){if(!e)return"N/A";let t=new Date;if(!(7>Math.abs((t-e)/864e5)))return(0,r.jsx)(x,{content:c(u(e)),className:"text-sm text-muted-foreground",children:c(e.toLocaleString("en-CA",{year:"numeric",month:"2-digit",day:"2-digit"}).replace(",",""))});{let n=function(e){if(!e||"string"!=typeof e)return e;if("just now"===e)return"now";let t=e.match(/^about\s+(\d+)\s+(\w+)\s+ago$/i);if(t){let e=t[1],n=t[2],r={second:"s",seconds:"s",minute:"m",minutes:"m",hour:"h",hours:"h",day:"d",days:"d",month:"mo",months:"mo",year:"yr",years:"yr"};if(r[n])return"".concat(e).concat(r[n]," ago")}let n=e.match(/^a[n]?\s+(\w+)\s+ago$/i);if(n){let e=n[1],t={second:"s",minute:"m",hour:"h",day:"d",month:"mo",year:"yr"};if(t[e])return"1".concat(t[e]," ago")}let r=e.match(/^(\d+)\s+(\w+)\s+ago$/i);if(r){let e=r[1],t=r[2],n={second:"s",seconds:"s",minute:"m",minutes:"m",hour:"h",hours:"h",day:"d",days:"d",month:"mo",months:"mo",year:"yr",years:"yr"};if(n[t])return"".concat(e).concat(n[t]," ago")}return e}((0,i.B)(e,t,{addSuffix:!0}));return(0,r.jsx)(x,{content:u(e),className:"capitalize text-sm text-muted-foreground",children:n})}}function u(e){return e.toLocaleString("en-CA",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1,timeZoneName:"short"}).replace(",","")}let h={placement:"bottom",color:"default"},x=e=>{let{children:t,...n}=e,s=n.content;return n.content=void 0,(0,r.jsx)(o.e,{...h,...n,content:(0,r.jsx)("span",{className:"left-full w-max px-2 py-1 text-sm text-gray-100 bg-gray-500 text-sm capitalize rounded",children:s}),children:t})},f=e=>{let{children:t,...n}=e,s=n.content;return n.content=void 0,(0,r.jsx)(o.e,{...h,...n,content:(0,r.jsx)("span",{className:"left-full w-max px-2 py-1 text-sm text-gray-100 bg-gray-500 text-sm rounded",children:s}),children:t})};function m(e){if(!e&&0!==e)return"-";let t=e=Math.floor(e),n="",r=0;for(let e of[{value:86400,label:"d"},{value:3600,label:"h"},{value:60,label:"m"},{value:1,label:"s"}])if(t>=e.value&&r<2){let s=Math.floor(t/e.value);n+="".concat(s).concat(e.label," "),t%=e.value,r++}return n.trim()||"0s"}function p(e){return e?(e=e.split("\n").filter(e=>!e.match(/<rich_.*?\[bold cyan\]/)&&!e.match(/<rich_.*>.*<\/rich_.*>/)&&!e.match(/├──/)&&!e.match(/└──/)).join("\n").replace(/\x1b\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGKH]/g,"")).split("\n").map(e=>{let t=e.match(/^([IWED])\s+(\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2})\s+([^:]+:\d+\])(.*)/);if(t){let[e,n,r,s,o]=t,i={I:"INFO",W:"WARNING",E:"ERROR",D:"DEBUG"}[n]||"";return'<span class="log-line '.concat(i,'"><span class="level">').concat(n,'</span><span class="timestamp">').concat(r,'</span><span class="location">').concat(s,'</span><span class="message">').concat(o,"</span></span>")}let n=e.match(/^(\([^)]+\))(.*)$/);if(n){let[e,t,r]=n;return'<span class="log-line"><span class="log-prefix">'.concat(t,'</span><span class="log-rest">').concat(r,"</span></span>")}return'<span class="log-line"><span class="message">'.concat(e,"</span></span>")}).join("\n"):""}function g(e){let{logs:t,controller:n=!1}=e,[o,i]=(0,s.useState)("all"),[l,c]=(0,s.useState)(t),[d,u]=(0,s.useState)([]);return(0,s.useEffect)(()=>{u(function(e){let t;let n=/\((head|worker\d+),/g,r=new Set;for(;null!==(t=n.exec(e));)r.add(t[1]);return Array.from(r).sort((e,t)=>"head"===e?-1:"head"===t?1:e.localeCompare(t,void 0,{numeric:!0,sensitivity:"base"}))}(t))},[t]),(0,s.useEffect)(()=>{"all"===o?c(t):c(t.split("\n").filter(e=>e.includes("(".concat(o,","))).join("\n"))},[o,t]),(0,r.jsxs)("div",{children:[(0,r.jsx)("style",{children:'\n .logs-container {\n background-color: #f7f7f7;\n padding: 16px;\n max-height: calc(100vh - 300px);\n overflow-y: auto;\n overflow-x: hidden;\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;\n line-height: 1.5;\n border-radius: 6px;\n min-height: fit-content;\n }\n\n .log-line {\n display: block;\n white-space: pre-wrap;\n margin: 2px 0;\n }\n\n .log-line .level {\n display: inline;\n width: 1ch;\n margin-right: 1ch;\n font-weight: bold;\n }\n\n .log-line.INFO .level {\n color: #2563eb;\n }\n\n .log-line.WARNING .level {\n color: #d97706;\n }\n\n .log-line.ERROR .level {\n color: #dc2626;\n }\n\n .log-line.DEBUG .level {\n color: #6b7280;\n }\n\n .log-line .timestamp {\n color: #059669;\n margin-right: 1ch;\n white-space: nowrap;\n }\n\n .log-line .location {\n color: #6366f1;\n margin-right: 1ch;\n white-space: nowrap;\n }\n\n .log-line .message {\n color: #111827;\n word-break: break-word;\n white-space: pre-wrap;\n }\n\n .log-line .log-prefix {\n color: #6366f1;\n font-weight: 500;\n }\n\n .log-line .log-rest {\n color: #111827;\n word-break: break-word;\n white-space: pre-wrap;\n }\n'}),!n&&(0,r.jsx)("div",{style:{marginBottom:"1rem"},children:(0,r.jsxs)(a.Ph,{onValueChange:e=>i(e),value:o,children:[(0,r.jsx)(a.i4,{"aria-label":"Node",className:"focus:ring-0 focus:ring-offset-0",children:(0,r.jsx)(a.ki,{placeholder:"Select Node"})}),(0,r.jsxs)(a.Bw,{children:[(0,r.jsx)(a.Ql,{value:"all",children:"All Nodes"}),d.map(e=>(0,r.jsx)(a.Ql,{value:e,children:e},e))]})]})}),(0,r.jsx)("div",{className:"logs-container",dangerouslySetInnerHTML:{__html:l}})]})}},3001:function(e,t,n){n.d(t,{X:function(){return s}});var r=n(7294);function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:768,[t,n]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let t=()=>{n(window.innerWidth<e)};return t(),window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[e]),t}},1214:function(e,t,n){n.d(t,{MO:function(){return o},ej:function(){return r},nb:function(){return s}});let r={DEFAULT_TTL:12e4},s={REFRESH_INTERVAL:3e4,GPU_REFRESH_INTERVAL:3e4},o={NAME_TRUNCATE_LENGTH:20}},2350:function(e,t,n){n.d(t,{cn:function(){return o}});var r=n(512),s=n(8388);function o(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,s.m6)((0,r.W)(t))}}}]);
|