skypilot-nightly 1.0.0.dev20250701__py3-none-any.whl → 1.0.0.dev20250702__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. sky/__init__.py +2 -2
  2. sky/catalog/__init__.py +1 -1
  3. sky/client/cli/command.py +60 -21
  4. sky/dashboard/out/404.html +1 -1
  5. sky/dashboard/out/_next/static/{Md3rlE87jmL5uv7gSo8mR → N5IdFnjR1RaPGBAVYeTIr}/_buildManifest.js +1 -1
  6. sky/dashboard/out/_next/static/chunks/9984.b56614f3c4c5961d.js +1 -0
  7. sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]-1159f362b960e2b8.js +6 -0
  8. sky/dashboard/out/_next/static/chunks/{webpack-d427db53e54de9ce.js → webpack-9a81ea998672c303.js} +1 -1
  9. sky/dashboard/out/clusters/[cluster]/[job].html +1 -1
  10. sky/dashboard/out/clusters/[cluster].html +1 -1
  11. sky/dashboard/out/clusters.html +1 -1
  12. sky/dashboard/out/config.html +1 -1
  13. sky/dashboard/out/index.html +1 -1
  14. sky/dashboard/out/infra/[context].html +1 -1
  15. sky/dashboard/out/infra.html +1 -1
  16. sky/dashboard/out/jobs/[job].html +1 -1
  17. sky/dashboard/out/jobs.html +1 -1
  18. sky/dashboard/out/users.html +1 -1
  19. sky/dashboard/out/volumes.html +1 -1
  20. sky/dashboard/out/workspace/new.html +1 -1
  21. sky/dashboard/out/workspaces/[name].html +1 -1
  22. sky/dashboard/out/workspaces.html +1 -1
  23. sky/metrics/utils.py +210 -0
  24. sky/optimizer.py +1 -1
  25. sky/resources.py +145 -7
  26. sky/server/server.py +80 -7
  27. sky/setup_files/MANIFEST.in +1 -0
  28. sky/skylet/constants.py +3 -0
  29. sky/skypilot_config.py +62 -53
  30. sky/utils/accelerator_registry.py +28 -1
  31. sky/utils/schemas.py +3 -0
  32. sky/utils/ux_utils.py +9 -4
  33. {skypilot_nightly-1.0.0.dev20250701.dist-info → skypilot_nightly-1.0.0.dev20250702.dist-info}/METADATA +1 -1
  34. {skypilot_nightly-1.0.0.dev20250701.dist-info → skypilot_nightly-1.0.0.dev20250702.dist-info}/RECORD +39 -38
  35. sky/dashboard/out/_next/static/chunks/9984.739ae958a066298d.js +0 -1
  36. sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]-b8e1114e6d38218c.js +0 -6
  37. /sky/dashboard/out/_next/static/{Md3rlE87jmL5uv7gSo8mR → N5IdFnjR1RaPGBAVYeTIr}/_ssgManifest.js +0 -0
  38. {skypilot_nightly-1.0.0.dev20250701.dist-info → skypilot_nightly-1.0.0.dev20250702.dist-info}/WHEEL +0 -0
  39. {skypilot_nightly-1.0.0.dev20250701.dist-info → skypilot_nightly-1.0.0.dev20250702.dist-info}/entry_points.txt +0 -0
  40. {skypilot_nightly-1.0.0.dev20250701.dist-info → skypilot_nightly-1.0.0.dev20250702.dist-info}/licenses/LICENSE +0 -0
  41. {skypilot_nightly-1.0.0.dev20250701.dist-info → skypilot_nightly-1.0.0.dev20250702.dist-info}/top_level.txt +0 -0
sky/skylet/constants.py CHANGED
@@ -421,6 +421,9 @@ ENV_VAR_IS_SKYPILOT_SERVER = 'IS_SKYPILOT_SERVER'
421
421
  # Environment variable that is set to 'true' if metrics are enabled.
422
422
  ENV_VAR_SERVER_METRICS_ENABLED = 'SKY_API_SERVER_METRICS_ENABLED'
423
423
 
424
+ # If set, overrides the header that we can use to get the user name.
425
+ ENV_VAR_SERVER_AUTH_USER_HEADER = f'{SKYPILOT_ENV_VAR_PREFIX}AUTH_USER_HEADER'
426
+
424
427
  # Environment variable that is used as the DB connection string for the
425
428
  # skypilot server.
426
429
  ENV_VAR_DB_CONNECTION_URI = (f'{SKYPILOT_ENV_VAR_PREFIX}DB_CONNECTION_URI')
sky/skypilot_config.py CHANGED
@@ -63,6 +63,7 @@ from sqlalchemy import orm
63
63
  from sqlalchemy.dialects import postgresql
64
64
  from sqlalchemy.dialects import sqlite
65
65
  from sqlalchemy.ext import declarative
66
+ from sqlalchemy.pool import NullPool
66
67
 
67
68
  from sky import exceptions
68
69
  from sky import sky_logging
@@ -116,9 +117,10 @@ ENV_VAR_PROJECT_CONFIG = f'{constants.SKYPILOT_ENV_VAR_PREFIX}PROJECT_CONFIG'
116
117
  _GLOBAL_CONFIG_PATH = '~/.sky/config.yaml'
117
118
  _PROJECT_CONFIG_PATH = '.sky.yaml'
118
119
 
119
- _SQLALCHEMY_ENGINE: Optional[sqlalchemy.engine.Engine] = None
120
120
  API_SERVER_CONFIG_KEY = 'api_server_config'
121
121
 
122
+ _DB_USE_LOCK = threading.Lock()
123
+
122
124
  Base = declarative.declarative_base()
123
125
 
124
126
  config_yaml_table = sqlalchemy.Table(
@@ -129,44 +131,6 @@ config_yaml_table = sqlalchemy.Table(
129
131
  )
130
132
 
131
133
 
132
- def create_table():
133
- # Create tables if they don't exist
134
- Base.metadata.create_all(bind=_SQLALCHEMY_ENGINE)
135
-
136
-
137
- def _get_config_yaml_from_db(key: str) -> Optional[config_utils.Config]:
138
- assert _SQLALCHEMY_ENGINE is not None
139
- with orm.Session(_SQLALCHEMY_ENGINE) as session:
140
- row = session.query(config_yaml_table).filter_by(key=key).first()
141
- if row:
142
- db_config = config_utils.Config(yaml.safe_load(row.value))
143
- db_config.pop_nested(('db',), None)
144
- return db_config
145
- return None
146
-
147
-
148
- def _set_config_yaml_to_db(key: str, config: config_utils.Config):
149
- assert _SQLALCHEMY_ENGINE is not None
150
- config.pop_nested(('db',), None)
151
- config_str = common_utils.dump_yaml_str(dict(config))
152
- with orm.Session(_SQLALCHEMY_ENGINE) as session:
153
- if (_SQLALCHEMY_ENGINE.dialect.name ==
154
- db_utils.SQLAlchemyDialect.SQLITE.value):
155
- insert_func = sqlite.insert
156
- elif (_SQLALCHEMY_ENGINE.dialect.name ==
157
- db_utils.SQLAlchemyDialect.POSTGRESQL.value):
158
- insert_func = postgresql.insert
159
- else:
160
- raise ValueError('Unsupported database dialect')
161
- insert_stmnt = insert_func(config_yaml_table).values(key=key,
162
- value=config_str)
163
- do_update_stmt = insert_stmnt.on_conflict_do_update(
164
- index_elements=[config_yaml_table.c.key],
165
- set_={config_yaml_table.c.value: config_str})
166
- session.execute(do_update_stmt)
167
- session.commit()
168
-
169
-
170
134
  class ConfigContext:
171
135
 
172
136
  def __init__(self,
@@ -586,7 +550,6 @@ def _reload_config_from_internal_file(internal_config_path: str) -> None:
586
550
 
587
551
 
588
552
  def _reload_config_as_server() -> None:
589
- global _SQLALCHEMY_ENGINE
590
553
  # Reset the global variables, to avoid using stale values.
591
554
  _set_loaded_config(config_utils.Config())
592
555
  _set_loaded_config_path(None)
@@ -607,16 +570,33 @@ def _reload_config_as_server() -> None:
607
570
  'if db config is specified, no other config is allowed')
608
571
 
609
572
  if db_url:
610
- if _SQLALCHEMY_ENGINE is None:
611
- _SQLALCHEMY_ENGINE = sqlalchemy.create_engine(db_url)
612
- create_table()
613
- db_config = _get_config_yaml_from_db(API_SERVER_CONFIG_KEY)
614
- if db_config:
615
- if sky_logging.logging_enabled(logger, sky_logging.DEBUG):
616
- logger.debug(f'Config loaded from db:\n'
617
- f'{common_utils.dump_yaml_str(dict(db_config))}')
618
- server_config = overlay_skypilot_config(server_config, db_config)
619
-
573
+ with _DB_USE_LOCK:
574
+ sqlalchemy_engine = sqlalchemy.create_engine(db_url,
575
+ poolclass=NullPool)
576
+ Base.metadata.create_all(bind=sqlalchemy_engine)
577
+
578
+ def _get_config_yaml_from_db(
579
+ key: str) -> Optional[config_utils.Config]:
580
+ assert sqlalchemy_engine is not None
581
+ with orm.Session(sqlalchemy_engine) as session:
582
+ row = session.query(config_yaml_table).filter_by(
583
+ key=key).first()
584
+ if row:
585
+ db_config = config_utils.Config(yaml.safe_load(row.value))
586
+ db_config.pop_nested(('db',), None)
587
+ return db_config
588
+ return None
589
+
590
+ db_config = _get_config_yaml_from_db(API_SERVER_CONFIG_KEY)
591
+ if db_config:
592
+ if sky_logging.logging_enabled(logger, sky_logging.DEBUG):
593
+ logger.debug(
594
+ f'Config loaded from db:\n'
595
+ f'{common_utils.dump_yaml_str(dict(db_config))}')
596
+ server_config = overlay_skypilot_config(server_config,
597
+ db_config)
598
+ # Close the engine to avoid connection leaks
599
+ sqlalchemy_engine.dispose()
620
600
  _set_loaded_config(server_config)
621
601
  _set_loaded_config_path(server_config_path)
622
602
 
@@ -876,9 +856,38 @@ def update_api_server_config_no_lock(config: config_utils.Config) -> None:
876
856
  new_db_url = config.get_nested(('db',), None)
877
857
  if new_db_url and new_db_url != existing_db_url:
878
858
  raise ValueError('Cannot change db url while server is running')
879
- logger.debug('saving api_server config to db')
880
- _set_config_yaml_to_db(API_SERVER_CONFIG_KEY, config)
881
- db_updated = True
859
+ with _DB_USE_LOCK:
860
+ sqlalchemy_engine = sqlalchemy.create_engine(existing_db_url,
861
+ poolclass=NullPool)
862
+ Base.metadata.create_all(bind=sqlalchemy_engine)
863
+
864
+ def _set_config_yaml_to_db(key: str,
865
+ config: config_utils.Config):
866
+ assert sqlalchemy_engine is not None
867
+ config.pop_nested(('db',), None)
868
+ config_str = common_utils.dump_yaml_str(dict(config))
869
+ with orm.Session(sqlalchemy_engine) as session:
870
+ if (sqlalchemy_engine.dialect.name ==
871
+ db_utils.SQLAlchemyDialect.SQLITE.value):
872
+ insert_func = sqlite.insert
873
+ elif (sqlalchemy_engine.dialect.name ==
874
+ db_utils.SQLAlchemyDialect.POSTGRESQL.value):
875
+ insert_func = postgresql.insert
876
+ else:
877
+ raise ValueError('Unsupported database dialect')
878
+ insert_stmnt = insert_func(config_yaml_table).values(
879
+ key=key, value=config_str)
880
+ do_update_stmt = insert_stmnt.on_conflict_do_update(
881
+ index_elements=[config_yaml_table.c.key],
882
+ set_={config_yaml_table.c.value: config_str})
883
+ session.execute(do_update_stmt)
884
+ session.commit()
885
+
886
+ logger.debug('saving api_server config to db')
887
+ _set_config_yaml_to_db(API_SERVER_CONFIG_KEY, config)
888
+ db_updated = True
889
+ # Close the engine to avoid connection leaks
890
+ sqlalchemy_engine.dispose()
882
891
 
883
892
  if not db_updated:
884
893
  # save to the local file (PVC in Kubernetes, local file otherwise)
@@ -1,6 +1,6 @@
1
1
  """Accelerator registry."""
2
2
  import typing
3
- from typing import Optional
3
+ from typing import List, Optional
4
4
 
5
5
  from sky import catalog
6
6
  from sky.utils import rich_utils
@@ -35,6 +35,7 @@ if typing.TYPE_CHECKING:
35
35
  # Use a cached version of accelerators to cloud mapping, so that we don't have
36
36
  # to download and read the catalog file for every cloud locally.
37
37
  _accelerator_df = catalog.common.read_catalog('common/accelerators.csv')
38
+ _memory_df = catalog.common.read_catalog('common/metadata.csv')
38
39
 
39
40
  # List of non-GPU accelerators that are supported by our backend for job queue
40
41
  # scheduling.
@@ -45,6 +46,32 @@ _SCHEDULABLE_NON_GPU_ACCELERATORS = [
45
46
  ]
46
47
 
47
48
 
49
+ def get_devices_by_memory(memory: float,
50
+ plus: bool = False,
51
+ manufacturer: Optional[str] = None) -> List[str]:
52
+ """Returns a list of device names that meet the memory and manufacturer
53
+ requirements.
54
+
55
+ Args:
56
+ memory: The minimum memory size in GB.
57
+ plus: If True, returns devices with memory >= memory, otherwise returns
58
+ devices with memory == memory.
59
+ manufacturer: The manufacturer of the GPU.
60
+ """
61
+
62
+ # Filter by memory requirements
63
+ if plus:
64
+ df = _memory_df[_memory_df['MemoryGB'] >= memory]
65
+ else:
66
+ df = _memory_df[_memory_df['MemoryGB'] == memory]
67
+
68
+ # Filter by manufacturer if specified
69
+ if manufacturer is not None:
70
+ df = df[df['Manufacturer'].str.lower() == manufacturer.lower()]
71
+
72
+ return df['GPU'].tolist()
73
+
74
+
48
75
  def is_schedulable_non_gpu_accelerator(accelerator_name: str) -> bool:
49
76
  """Returns if this accelerator is a 'schedulable' non-GPU accelerator."""
50
77
  for name in _SCHEDULABLE_NON_GPU_ACCELERATORS:
sky/utils/schemas.py CHANGED
@@ -311,6 +311,9 @@ def _get_single_resources_schema():
311
311
  }
312
312
  }
313
313
  },
314
+ '_no_missing_accel_warnings': {
315
+ 'type': 'boolean'
316
+ },
314
317
  'image_id': {
315
318
  'anyOf': [{
316
319
  'type': 'string',
sky/utils/ux_utils.py CHANGED
@@ -12,6 +12,7 @@ import colorama
12
12
  from sky import sky_logging
13
13
  from sky.skylet import constants
14
14
  from sky.utils import common_utils
15
+ from sky.utils import env_options
15
16
  from sky.utils import rich_console_utils
16
17
 
17
18
  if typing.TYPE_CHECKING:
@@ -57,10 +58,14 @@ def print_exception_no_traceback():
57
58
  if error():
58
59
  raise ValueError('...')
59
60
  """
60
- original_tracelimit = getattr(sys, 'tracebacklimit', 1000)
61
- sys.tracebacklimit = 0
62
- yield
63
- sys.tracebacklimit = original_tracelimit
61
+ if env_options.Options.SHOW_DEBUG_INFO.get():
62
+ # When SKYPILOT_DEBUG is set, show the full traceback
63
+ yield
64
+ else:
65
+ original_tracelimit = getattr(sys, 'tracebacklimit', 1000)
66
+ sys.tracebacklimit = 0
67
+ yield
68
+ sys.tracebacklimit = original_tracelimit
64
69
 
65
70
 
66
71
  @contextlib.contextmanager
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: skypilot-nightly
3
- Version: 1.0.0.dev20250701
3
+ Version: 1.0.0.dev20250702
4
4
  Summary: SkyPilot: Run AI on Any Infra — Unified, Faster, Cheaper.
5
5
  Author: SkyPilot Team
6
6
  License: Apache 2.0
@@ -1,4 +1,4 @@
1
- sky/__init__.py,sha256=xnNASWOZXK5qA6EMZvK5Jd4Jy4gjv6TiCS3UG2yGe2M,6419
1
+ sky/__init__.py,sha256=zvfkWi3ntfcQgmKXA4dcrMIKftYVQETwn9-qXK8JQqc,6419
2
2
  sky/admin_policy.py,sha256=FMiizgvVTmD9gFA2OUaveXnuY3lbNU-fCbUYAODBZj4,9427
3
3
  sky/authentication.py,sha256=V7zGSV7bqcAKC_EGOOS0KhJ01ZFLnme0WnjLFO7zavs,25603
4
4
  sky/check.py,sha256=R0pFsTq2v-wr3NFePlX9DmDhsbvWEoFJAXsys3pUmT4,30338
@@ -10,10 +10,10 @@ sky/exceptions.py,sha256=YRPgpFkBRGE9jmG2r3SWJGS9p9-RPP2TZGjfd2VblSc,19044
10
10
  sky/execution.py,sha256=BhI4paGKpXMhWJoelHFe7LGFbCnW7hl0rIAmdIay-dk,33223
11
11
  sky/global_user_state.py,sha256=8_oKM5l5aey_IadFC6beiilfsbG10J27sqVxnHxFc7A,73040
12
12
  sky/models.py,sha256=Eor-cT4D71QTimogcnJ5ey1G1PXK-OXN-snEtE8Uu_g,3152
13
- sky/optimizer.py,sha256=mE3VG2AhMsY6yL0uIqtqWudjVLZPYaBw9eLhQIAi6jI,63282
14
- sky/resources.py,sha256=Xqnda_-2Gegtdf8GVTy8QaUZToYy4zFrn4ACMuE7gFM,100267
13
+ sky/optimizer.py,sha256=oE4NrDmyE1A9B5NI3T_s7QUV5HkCeSJUU75NoJoVIPI,63323
14
+ sky/resources.py,sha256=bvmapuT5vBZQShWtdpfOw3o3hNjsjQslxmpxCfF6-64,106309
15
15
  sky/sky_logging.py,sha256=cMurxhFExKEFX1frcMR71Ti_s9Obg9WY30veVxsZB6o,7285
16
- sky/skypilot_config.py,sha256=6o5T4_U-b38tJglH3vRV0cfvsD8wLAt2qFuLux_FDv4,35235
16
+ sky/skypilot_config.py,sha256=TjuYBU99GLhWD7E9ioAP7qiiHJybc5EY_T1A_rFW-rM,36222
17
17
  sky/task.py,sha256=ftmaGsxLoX8Uewzh45OjhlPDJu5n3060Za1S0X9i7M0,71076
18
18
  sky/adaptors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
19
  sky/adaptors/aws.py,sha256=4caUTO5nxZQyDVPyQdoPljaF-Lz_Fa6NEnu3FfmLZd4,8633
@@ -40,7 +40,7 @@ sky/backends/docker_utils.py,sha256=Hyw1YY20EyghhEbYx6O2FIMDcGkNzBzV9TM7LFynei8,
40
40
  sky/backends/local_docker_backend.py,sha256=r80BGJZmAH8F49v6Y_pG3_pHmW5LQEQRusLkKoYoe9Q,17047
41
41
  sky/backends/wheel_utils.py,sha256=IUruJijm5854UGDdSayHbHzjjWRM46bATK1nSnK44xY,11071
42
42
  sky/backends/monkey_patches/monkey_patch_ray_up.py,sha256=76-y2fCaE3JINj8lEwHT1eirYzCbpD8O1ySsysuGu8o,3450
43
- sky/catalog/__init__.py,sha256=BkIr4FdTpuIuynl5ijTraecm38viZjRgY3jIexlDbgk,14602
43
+ sky/catalog/__init__.py,sha256=SRV7fsgTDOtidYxXYzyxgPAQTQR6fsIb2epVISCH_AU,14616
44
44
  sky/catalog/aws_catalog.py,sha256=VnFLKmr4nBuc5NXske7thEByJz_wOg9w5vuN6FtLMuo,13473
45
45
  sky/catalog/azure_catalog.py,sha256=r_ZBacLF7U8EPGlrMF-zVSwAGjjmh9K1e1MZ3-UPfXo,8126
46
46
  sky/catalog/common.py,sha256=KX77r8zPYe7hMX4Hf7_ny_wjC4Y9_FAskKb7qmr1aJY,28283
@@ -79,7 +79,7 @@ sky/client/oauth.py,sha256=sNJ_DMsSTcxluj5FeNQ2IafZJLImRFmCAZ79bXeABn4,2871
79
79
  sky/client/sdk.py,sha256=uVzzJpsokxAdhLaK4JyMRia1wj6PI5qYpvBSZfnFwqk,91054
80
80
  sky/client/service_account_auth.py,sha256=5jXk0G6ufuW-SHCO7BEHQeTO0_2a8KfFmA63auXFRj4,1529
81
81
  sky/client/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
82
- sky/client/cli/command.py,sha256=w3umzVSbOa8eLhCYTecpR12gA1KtO-wN6jQLtJdEb1E,215665
82
+ sky/client/cli/command.py,sha256=tuK-39aOz9xresShPe4uvGAjn7OgnyxLovnycJUAzaE,217309
83
83
  sky/client/cli/deprecation_utils.py,sha256=H_d5UyF2CekEoThduAzt5cihBO8hwKYMu0-Wqfbjv5E,3370
84
84
  sky/client/cli/flags.py,sha256=6IdS_G2lB1C6r8kJMzLVREY_qV50VHiSfWlmppVrWuc,11623
85
85
  sky/clouds/__init__.py,sha256=tC9_Vi6GvVceWUi6uZvm7vXzBa0uH3CjRQ-QCYqdJMw,1624
@@ -108,19 +108,19 @@ sky/clouds/utils/azure_utils.py,sha256=NToRBnhEyuUvb-nBnsKTxjhOBRkMcrelL8LK4w6s4
108
108
  sky/clouds/utils/gcp_utils.py,sha256=ZNupZEBsZS9ZvvzB7vsc6f5y1JUBoRcKE0erso_Y93k,7659
109
109
  sky/clouds/utils/oci_utils.py,sha256=yv_Y9oM5WNCnOofu44aKyOPTZZdKfpFLCx3ewZ2VBFY,7994
110
110
  sky/clouds/utils/scp_utils.py,sha256=VGuccVO5uFGr8-yolWSoYrgr11z6cIeDBGcqkBzAyOs,18409
111
- sky/dashboard/out/404.html,sha256=5MaLosc-IEF7yxlimcsZtcZAPwAmjcprtQ1a9-ykypk,1423
112
- sky/dashboard/out/clusters.html,sha256=I8_99s0orihQ5OmxiECaCxny8d2zUQJbRUShl9tC6u0,1418
113
- sky/dashboard/out/config.html,sha256=-EuRAnr8xDTjBy6fmYDce0BDnmmXhyQjA09HkwQq3xc,1414
111
+ sky/dashboard/out/404.html,sha256=yR0gHfhgYY3Nqefhv2EDtn7lda5COkbUnQRPxvSe6Hc,1423
112
+ sky/dashboard/out/clusters.html,sha256=Vq_CaBEdMFrpWSbWqYmV2EwY8g_iLuoYkhrzp-kI1Kk,1418
113
+ sky/dashboard/out/config.html,sha256=Wv9UMBqjMGRJajReNMUGFbZrWKqVres0MaIfHl0DODI,1414
114
114
  sky/dashboard/out/favicon.ico,sha256=XilUZZglAl_1zRsg85QsbQgmQAzGPQjcUIJ-A3AzYn8,93590
115
- sky/dashboard/out/index.html,sha256=zqBxJWLb1AxOznjRnBO1d7_H_gxhaDtq75C5ZlPI8P8,1407
116
- sky/dashboard/out/infra.html,sha256=1zcQrK3TZ6uKVb-1bSlhSnvVeGrWEEEEJgFRD82n9uQ,1412
117
- sky/dashboard/out/jobs.html,sha256=FHnt5J53N3Y0zkcAsAqejGG_ZMNhKhxbn0oo_nu_1z0,1410
115
+ sky/dashboard/out/index.html,sha256=bujiqQK9MkGC81TpTKRt8HclBSHsKVHBuApms6EgoBA,1407
116
+ sky/dashboard/out/infra.html,sha256=x8KQCNDphnAehxphBuQdEawNUbqefSO_d7pJ-JdZCP8,1412
117
+ sky/dashboard/out/jobs.html,sha256=_Y5_dDzlB7jt8M0B5y2U5gi2Ngx_O5ZAHKYmqvr-xCc,1410
118
118
  sky/dashboard/out/skypilot.svg,sha256=c0iRtlfLlaUm2p0rG9NFmo5FN0Qhf3pq5Xph-AeMPJw,5064
119
- sky/dashboard/out/users.html,sha256=hPV_Ds1avur0T3aTExSTKPw-9FqE77kaOHB2rHfsyho,1412
120
- sky/dashboard/out/volumes.html,sha256=hTKhfj3aZW_ejYDfnh0L4FKiJgf_IyovP-mG9FUUtBI,1416
121
- sky/dashboard/out/workspaces.html,sha256=yOA8huFvBqfdODzzvuD5J4ZZL_kQX5JHP6RA-4IQn5Y,1422
122
- sky/dashboard/out/_next/static/Md3rlE87jmL5uv7gSo8mR/_buildManifest.js,sha256=AUBq9iFFkgyZiALTu2JdM3ypyEQ-Wfa_vECVEP0p3Zc,2235
123
- sky/dashboard/out/_next/static/Md3rlE87jmL5uv7gSo8mR/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
119
+ sky/dashboard/out/users.html,sha256=qrUKhocHSDU1LRg4N25-EkuXY3rVWk_7uup5SCM1gbA,1412
120
+ sky/dashboard/out/volumes.html,sha256=Ji2EKpMhKqwVq7Fjc8S9rubatOnowkdpgaetmHMh82E,1416
121
+ sky/dashboard/out/workspaces.html,sha256=HR2tiOtj5PX3aIgJw8W3Ju2Gg2P8b9p_r86f1wwCRLw,1422
122
+ sky/dashboard/out/_next/static/N5IdFnjR1RaPGBAVYeTIr/_buildManifest.js,sha256=SMKLljkiS_9UQoF0v1MyY_ziwbXl8KnBBlwCuTRc3V8,2235
123
+ sky/dashboard/out/_next/static/N5IdFnjR1RaPGBAVYeTIr/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
124
124
  sky/dashboard/out/_next/static/chunks/1043-1b39779691bb4030.js,sha256=k8-hHIedPKi22M0wZwGOdWZ_S-H0jVnepFwm7i9_zg4,18192
125
125
  sky/dashboard/out/_next/static/chunks/1141-726e5a3f00b67185.js,sha256=lEAVPk_18NZpZuPrGx1Xy9VWqE_5n3JuqWbIPS1_ZMw,17823
126
126
  sky/dashboard/out/_next/static/chunks/1272-1ef0bf0237faccdb.js,sha256=VJ6y-Z6Eg2T93hQIRfWAbjAkQ7nQhglmIaVbEpKSILY,38451
@@ -150,13 +150,13 @@ sky/dashboard/out/_next/static/chunks/8982.a2e214068f30a857.js,sha256=fQlHyU9rqS
150
150
  sky/dashboard/out/_next/static/chunks/9025.a7c44babfe56ce09.js,sha256=0ciCX9lNsRd3HNYlFQ29BXu2S-xCuoqUwGcrawVwiZM,10637
151
151
  sky/dashboard/out/_next/static/chunks/938-044ad21de8b4626b.js,sha256=cbzoiWQ1IkgyTfObKZsxVts30tFHFl_1e9_PQdcXCjs,25784
152
152
  sky/dashboard/out/_next/static/chunks/9470-21d059a1dfa03f61.js,sha256=CPmGRW2grevoF93p_jmh9tgO2X15tldm-_xFa4-qXXU,7887
153
- sky/dashboard/out/_next/static/chunks/9984.739ae958a066298d.js,sha256=EKp61c5XqOsOtVfduulgrzIrW1O4u0lK8MQfOha8lMg,40809
153
+ sky/dashboard/out/_next/static/chunks/9984.b56614f3c4c5961d.js,sha256=kij2wjmGv52Dl66I9E_Nrc7aG9JN_orwMY-GqPJriN8,41450
154
154
  sky/dashboard/out/_next/static/chunks/fd9d1056-61f2257a9cd8b32b.js,sha256=49S_KmXpB4D3U299iKHRbYnFxJnoeN36awxwhBbUn8U,172832
155
155
  sky/dashboard/out/_next/static/chunks/framework-efc06c2733009cd3.js,sha256=XKYUV5T_2HxRwN7wZa9-Lj1J5gHLS0TKT2t2GobVewY,140943
156
156
  sky/dashboard/out/_next/static/chunks/main-app-68c028b1bc5e1b72.js,sha256=zSukg-WO1Xy-B2xEIIGHXYApy2KOY9xWHcLqAYQvF3A,115883
157
157
  sky/dashboard/out/_next/static/chunks/main-c0a4f1ea606d48d2.js,sha256=DPLM6ccDgTnITBgsqZPN3gmcI2szGCi9b_60PJZkTJQ,109885
158
158
  sky/dashboard/out/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js,sha256=6QPOwdWeAVe8x-SsiDrm-Ga6u2DkqgG5SFqglrlyIgA,91381
159
- sky/dashboard/out/_next/static/chunks/webpack-d427db53e54de9ce.js,sha256=MuHC5puVDDg-0slukNrIQDSvWd26QKHJX9e7jJYdep8,4655
159
+ sky/dashboard/out/_next/static/chunks/webpack-9a81ea998672c303.js,sha256=fUbydZntvLJZCDi467P46nwf0uvI6VRaNnpvsLirfDs,4655
160
160
  sky/dashboard/out/_next/static/chunks/pages/_app-a37b06ddb64521fd.js,sha256=H1r6Y8kJC7-I-8jRr71VINRghHy_yaY6scBkjN4cyxw,7587
161
161
  sky/dashboard/out/_next/static/chunks/pages/_error-c72a1f77a3c0be1b.js,sha256=D2OpMaqpdtCPyq6iPhZHuF2ekyMjleRchSNCLR6fqps,250
162
162
  sky/dashboard/out/_next/static/chunks/pages/clusters-9744c271a1642f76.js,sha256=wzNhCoIzkSiOuaTm9dGBVIYYIYWf4COJOklBr1aaLxE,859
@@ -167,20 +167,20 @@ sky/dashboard/out/_next/static/chunks/pages/jobs-5bbdc71878f0a068.js,sha256=DzFF
167
167
  sky/dashboard/out/_next/static/chunks/pages/users-cd43fb3c122eedde.js,sha256=ZmBi5Bo3Nuc8h98X3A1f3Wf5vXXoJhSdf4dMArPfe0s,830
168
168
  sky/dashboard/out/_next/static/chunks/pages/volumes-4ebf6484f7216387.js,sha256=1F6IwI6S3p3hsDBy_fuLwFRz3Elg0IfrWNj5z3fhxdg,827
169
169
  sky/dashboard/out/_next/static/chunks/pages/workspaces-06bde99155fa6292.js,sha256=l9iLMdY_ShOHIo368M98I4mADuUWtiu_ZDHci8ffJjM,874
170
- sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]-b8e1114e6d38218c.js,sha256=EdNVNlM8Unh6OfzlKkkouwq7KlrNQRIZ2ljRg4_qeZI,16592
170
+ sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]-1159f362b960e2b8.js,sha256=GqMjMN3_Z8kYZWCz01aabcu8epNuKAUihohv9wxF34Y,16659
171
171
  sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/[job]-8135aba0712bda37.js,sha256=XaBZD-8HP9h4o5YnQ0oYQOUJd2-uimamGbYnlD_5YVg,21263
172
172
  sky/dashboard/out/_next/static/chunks/pages/infra/[context]-8b0809f59034d509.js,sha256=2X6wnNqROGTzwZorrDJpUmO6XnUmS9VN3ImpTvhJ4IM,839
173
173
  sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-c4d5cfac7fbc0668.js,sha256=4-YK-gpB6rWVM8QMkzaB8B_uUwI6As62G2rj9wGmqnE,25246
174
174
  sky/dashboard/out/_next/static/chunks/pages/workspace/new-5629d4e551dba1ee.js,sha256=K9tqKHcB2kiSHTAddLaM2oL1PzmqZNTdLDOuNzCaJNM,765
175
175
  sky/dashboard/out/_next/static/chunks/pages/workspaces/[name]-7c0187f43757a548.js,sha256=FsoenC6VRkPLE29KkLd4nlSq2qociH4zFexYMxgetOM,1530
176
176
  sky/dashboard/out/_next/static/css/0da6afe66176678a.css,sha256=I8b7x4ULdoXHkgk0BsNa0D6k2UYoA2mEhq7H1G_tVQE,44869
177
- sky/dashboard/out/clusters/[cluster].html,sha256=1SgSWlE8Zlgz36DjsoDSTXHLCCXabVK3hiMyiHCp0go,2847
178
- sky/dashboard/out/clusters/[cluster]/[job].html,sha256=B3KAlHNVXs_w3DA7skM3wpGym9KOEBig4SH2G8c5a_g,2160
179
- sky/dashboard/out/infra/[context].html,sha256=bjSWPRZqsrSfNnW9AEUjH2o1vxK8L-1gr-vlDlEWlIU,1436
180
- sky/dashboard/out/jobs/[job].html,sha256=uq434sj_B9qiP3a2RfhrbTmP8LJuOIUdtsrkwGVN2K4,2304
177
+ sky/dashboard/out/clusters/[cluster].html,sha256=qYiMQO245xkWrOAYe11EfaLrWj84EbxuSdiZe8Iua0w,2847
178
+ sky/dashboard/out/clusters/[cluster]/[job].html,sha256=8_YZlQl4GTSVr0CNJAZo4KAHptEmECn4uPx-g04_nEU,2160
179
+ sky/dashboard/out/infra/[context].html,sha256=3v2yCWMr3JQ3d-tTHh6Etia72wZTniMtPkzvG-S0xGI,1436
180
+ sky/dashboard/out/jobs/[job].html,sha256=lhlOnKyLEBpx6URDwI24qtk4xUwUsapdX_OXextT5Aw,2304
181
181
  sky/dashboard/out/videos/cursor-small.mp4,sha256=8tRdp1vjawOrXUar1cfjOc-nkaKmcwCPZx_LO0XlCvQ,203285
182
- sky/dashboard/out/workspace/new.html,sha256=vFvjxf5LJuidZLZb2ISaL3Nt9W7p1YN9vlSGKZq3Amg,1428
183
- sky/dashboard/out/workspaces/[name].html,sha256=LRYjKeeAflSeMm7oiulrN9uLHCwsr81usO_FBwN3U4M,2845
182
+ sky/dashboard/out/workspace/new.html,sha256=iauAVpCteFD0PZ4jV8M44Qj_zL5VUu6n3BSHcQ60kT0,1428
183
+ sky/dashboard/out/workspaces/[name].html,sha256=NEluCe56SZiw_t6lbftdgqVNNsAqGfWpi5SA5x_USXg,2845
184
184
  sky/data/__init__.py,sha256=Nhaf1NURisXpZuwWANa2IuCyppIuc720FRwqSE2oEwY,184
185
185
  sky/data/data_transfer.py,sha256=N8b0CQebDuHieXjvEVwlYmK6DbQxUGG1RQJEyTbh3dU,12040
186
186
  sky/data/data_utils.py,sha256=CNYPM963qby5ddW0DZNbhiWXkqgB9MHh_jrC5DoBctM,33437
@@ -202,6 +202,7 @@ sky/jobs/server/server.py,sha256=ae8JAs-2ipWqL_GsA3x8T2mY-OJLc3ioWg_CfRzCUIY,401
202
202
  sky/logs/__init__.py,sha256=0ybWMfXcpAzh8dtDnJwpfovNIk0zJRJvzdISqFdKmdE,549
203
203
  sky/logs/agent.py,sha256=tv0C40_FauZpvU93Ro_mC23LnaXWhSTjqch1JQMXiqw,2771
204
204
  sky/logs/gcp.py,sha256=eKVEcHO3FJRg_YTcE9omE8uAIF6AdBWWpkEPqWFAqXg,3857
205
+ sky/metrics/utils.py,sha256=Cww3yNG4HyW4DEdLOFUayFgMZ16t2JFSvvhuTTV7Vio,7654
205
206
  sky/provision/__init__.py,sha256=bADZkpZdy7QxIc7WDkh-X5cd3Uv64wy2K7IB9Xpw348,7554
206
207
  sky/provision/common.py,sha256=LdjM9SL9NDtsARom12tVv_WoUNL3PTlU5RoLfeWGGgM,10807
207
208
  sky/provision/constants.py,sha256=oc_XDUkcoLQ_lwDy5yMeMSWviKS0j0s1c0pjlvpNeWY,800
@@ -324,7 +325,7 @@ sky/server/config.py,sha256=XWf5Kw4am6vMO5wcyWevbQAFH-dmKb7AMEgDzD083-M,8538
324
325
  sky/server/constants.py,sha256=15r9CGX4yo62BeRLSfyrVaKd5fqeu_8GBS_JqyeXSfk,1431
325
326
  sky/server/metrics.py,sha256=aVRaSwpBVXE9dXIVd9bNsSigKM4bkqNq0eTpP0Noyo8,3657
326
327
  sky/server/rest.py,sha256=3xOQXsQ_r9XBcUOhQbf-Wk0UXx0XrAmzQ6JSqLr6nJ0,5430
327
- sky/server/server.py,sha256=C-JOBQ1cbu840ve06Onwt5VYSPAB57vyhJ96D1A5BxE,67590
328
+ sky/server/server.py,sha256=OOg8ZvF4NAbo-qwwD0B6ZlUibcR2kaHSrTsoCoRrTp8,70703
328
329
  sky/server/state.py,sha256=YbVOMJ1JipQQv17gLIGyiGN7MKfnP83qlUa5MB1z0Yk,747
329
330
  sky/server/stream_utils.py,sha256=RS4RuMxQqTGqp3uxzZVtmFWzos4d49P7hMX_VklzEVU,9189
330
331
  sky/server/uvicorn.py,sha256=3mdSUbc8zHRYAbZZLkfPB6U9VXD_t2jDM1BMjpTx1Mo,9014
@@ -343,7 +344,7 @@ sky/server/requests/queues/mp_queue.py,sha256=jDqP4Jd28U3ibSFyMR1DF9I2OWZrPZqFJr
343
344
  sky/server/requests/serializers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
344
345
  sky/server/requests/serializers/decoders.py,sha256=qphN79pRAaaitCbcsZIrslphgZn1iYndl6JnmergEe4,6361
345
346
  sky/server/requests/serializers/encoders.py,sha256=4bQV5yTg8RTPT_HkRyQpjaBY_uUvBJ4NH189W0-6Pi0,5578
346
- sky/setup_files/MANIFEST.in,sha256=BzWGsYZz9fO40HN1Uxm1Ca4pn1FkKn3lcoY1B9-YRiA,644
347
+ sky/setup_files/MANIFEST.in,sha256=9osXc1PANaHXqD1MVrZIf-koWCiU4GUUL7NBe-0y5oY,666
347
348
  sky/setup_files/dependencies.py,sha256=OY4-KzEp2MObl4vTUUFD_UVXXb4IYFl51_O4iZny8Jg,7127
348
349
  sky/setup_files/setup.py,sha256=GTXvAi65S4_TSLhQ1GzkmaWf_yzciHiaxMbZumcTtKU,7522
349
350
  sky/skylet/LICENSE,sha256=BnFrJSvUFpMUoH5mOpWnEvaC5R6Uux8W6WXgrte8iYg,12381
@@ -351,7 +352,7 @@ sky/skylet/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
351
352
  sky/skylet/attempt_skylet.py,sha256=GZ6ITjjA0m-da3IxXXfoHR6n4pjp3X3TOXUqVvSrV0k,2136
352
353
  sky/skylet/autostop_lib.py,sha256=kGUnHm-jpF4zl3UJfB-4pnoldWpnVeR96WwYGSw7em0,4630
353
354
  sky/skylet/configs.py,sha256=kV490lonYVVQMDRO2haizlt9fpQmqBIpwBScn14zS78,2132
354
- sky/skylet/constants.py,sha256=U4vVBIaispgRKESUaFhMxURDV3jga3_lZbjR7oFHTqY,23303
355
+ sky/skylet/constants.py,sha256=jveG7A_vi3mWIG8Ix5_vD2GnmTSm8gGalXxyxsx7yQ8,23452
355
356
  sky/skylet/events.py,sha256=pnV3ZiwWhXqTHpU5B5Y9Xwam_7FQDI6IrxgSx7X_NVA,12743
356
357
  sky/skylet/job_lib.py,sha256=aZ_lUU1u0HVU2AdTcYcFUAS7eeelK-bAbJlCoZ3QX7A,48267
357
358
  sky/skylet/log_lib.py,sha256=9nLOhevnM668itQyVyPSoQHKfZ2MWm_FwXPxK28X0oM,23201
@@ -411,7 +412,7 @@ sky/users/rbac.py,sha256=3ZWukXo85u6zWbPmHcPsF9EtZ3cd_51PLZYf2h-7uAM,3636
411
412
  sky/users/server.py,sha256=59I2WITevRqvo-kEzmP0p0qyEYATnUQXTRvA_81xZYM,27922
412
413
  sky/users/token_service.py,sha256=nzIryoYSbw58SceBVRJ4VF7Z9beTSpYZd6WSyYYzK-s,7179
413
414
  sky/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
414
- sky/utils/accelerator_registry.py,sha256=yNP7HDflg2bnhnCXFfjdVmJcpId7WBQCQPiGuc41EwE,3874
415
+ sky/utils/accelerator_registry.py,sha256=I2BLe74i7qBTE4X73N-cVbOJNX1Pcextm9OIRQFfnl0,4803
415
416
  sky/utils/admin_policy_utils.py,sha256=VkE3FGzv5a7KnRO0R1PX0buJ274vF__n1xgXJ_9ykTs,7105
416
417
  sky/utils/annotations.py,sha256=-rfacB30Sl0xkFriejGvxma3oKctGfXXLZkQPHG33eo,1626
417
418
  sky/utils/atomic.py,sha256=vrw-7XCnckF0xCx-ttamao7evPdGtVsnjaTtgMlBXIE,1280
@@ -437,11 +438,11 @@ sky/utils/resource_checker.py,sha256=N18XhoVIqjY1VzmKvxQxRchRgC2WIgcEQyHDkLvg4Y8
437
438
  sky/utils/resources_utils.py,sha256=9HyFUySaXZsF_XKJvJa1_dy35CrX5tAm5HoOnpYWREo,15106
438
439
  sky/utils/rich_console_utils.py,sha256=wPvAlshaFHuMZSjiDnaK3OSBppZLBjAn-lj7AvxNBQk,553
439
440
  sky/utils/rich_utils.py,sha256=ZKztFc0D5q7ma_NE2p9UKjVS9zqcJ3L53FRw6SPoUvg,14707
440
- sky/utils/schemas.py,sha256=xPgT4I1dywXhYHI5k3zvu26rZZJv6duK1hOspO8UNjA,51633
441
+ sky/utils/schemas.py,sha256=pfoJA2EXYp0NOUj20D3lw232Pw8XGuVyf6KkvJ8vUmE,51726
441
442
  sky/utils/status_lib.py,sha256=QGkd6COD1GX1h30Mk9RMUdyeUOMJs5971GkxTcFgdsU,1705
442
443
  sky/utils/subprocess_utils.py,sha256=tOpFY_1ml7JkVGAN1o473lcKPklGR95qBCW61eu8kEo,15773
443
444
  sky/utils/timeline.py,sha256=ob6s3bc7nwAuSI76yLKBrSR5bzOHnOhbozz1avwoet4,4070
444
- sky/utils/ux_utils.py,sha256=FChNkVnTX3vKsu4_kXt7eaf2jNSoTfwH4XLMBtGK0t4,10233
445
+ sky/utils/ux_utils.py,sha256=hris-DNQR0-okNOzH2EZQJXBPWAn3LdAl3dtl9KPgng,10419
445
446
  sky/utils/validator.py,sha256=AHIYEBpxzpC2Eg8TulruFqQSjTxeynB0Dc7cfP1RX2M,1159
446
447
  sky/utils/aws/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
447
448
  sky/utils/aws/get_default_security_group.py,sha256=LPzz5133ZUMbzDD3iqqACL9PdlgqiQR5hKZIn-D1zhw,228
@@ -476,9 +477,9 @@ sky/workspaces/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
476
477
  sky/workspaces/core.py,sha256=MkQoVqWN67tf4VRq284U9vgAw4lwb_cpUfwHQT4V9Ow,16598
477
478
  sky/workspaces/server.py,sha256=Box45DS54xXGHy7I3tGKGy-JP0a8G_z6IhfvGlEXtsA,3439
478
479
  sky/workspaces/utils.py,sha256=IIAiFoS6sdb2t0X5YoX9AietpTanZUQNTK8cePun-sY,2143
479
- skypilot_nightly-1.0.0.dev20250701.dist-info/licenses/LICENSE,sha256=emRJAvE7ngL6x0RhQvlns5wJzGI3NEQ_WMjNmd9TZc4,12170
480
- skypilot_nightly-1.0.0.dev20250701.dist-info/METADATA,sha256=PWitj6oqOfvmSkruLvIhdnonMphHD7Jn_L82thZX_y8,18908
481
- skypilot_nightly-1.0.0.dev20250701.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
482
- skypilot_nightly-1.0.0.dev20250701.dist-info/entry_points.txt,sha256=StA6HYpuHj-Y61L2Ze-hK2IcLWgLZcML5gJu8cs6nU4,36
483
- skypilot_nightly-1.0.0.dev20250701.dist-info/top_level.txt,sha256=qA8QuiNNb6Y1OF-pCUtPEr6sLEwy2xJX06Bd_CrtrHY,4
484
- skypilot_nightly-1.0.0.dev20250701.dist-info/RECORD,,
480
+ skypilot_nightly-1.0.0.dev20250702.dist-info/licenses/LICENSE,sha256=emRJAvE7ngL6x0RhQvlns5wJzGI3NEQ_WMjNmd9TZc4,12170
481
+ skypilot_nightly-1.0.0.dev20250702.dist-info/METADATA,sha256=a-sgt0ERBnbGvrYW3np8kpboo3h4MD6ygJxyhxA1HYk,18908
482
+ skypilot_nightly-1.0.0.dev20250702.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
483
+ skypilot_nightly-1.0.0.dev20250702.dist-info/entry_points.txt,sha256=StA6HYpuHj-Y61L2Ze-hK2IcLWgLZcML5gJu8cs6nU4,36
484
+ skypilot_nightly-1.0.0.dev20250702.dist-info/top_level.txt,sha256=qA8QuiNNb6Y1OF-pCUtPEr6sLEwy2xJX06Bd_CrtrHY,4
485
+ skypilot_nightly-1.0.0.dev20250702.dist-info/RECORD,,
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9984],{9984:function(e,t,s){s.r(t),s.d(t,{ContextDetails:function(){return L},GPUs:function(){return Z},InfrastructureSection:function(){return G}});var a=s(5893),l=s(7294),r=s(5739);s(9470);var o=s(6409),n=s(8418),c=s(3626),i=s(3001),d=s(7853),m=s(2045),u=s(3266),h=s(8969),x=s(3225),p=s(5821);async function g(){try{let e=await fetch("".concat(x.f4,"/ssh_node_pools"),{method:"GET",headers:{"Content-Type":"application/json"}});if(!e.ok)throw Error("HTTP error! status: ".concat(e.status));return await e.json()}catch(e){return console.error("Error fetching SSH Node Pools:",e),{}}}async function f(e){try{let t=await fetch("".concat(x.f4,"/ssh_node_pools"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw Error("HTTP error! status: ".concat(t.status));return await t.json()}catch(e){throw console.error("Error updating SSH Node Pools:",e),e}}async function y(e){try{let t=await fetch("".concat(x.f4,"/ssh_node_pools/").concat(e),{method:"DELETE",headers:{"Content-Type":"application/json"}});if(!t.ok)throw Error("HTTP error! status: ".concat(t.status));return await t.json()}catch(e){throw console.error("Error deleting SSH Node Pool:",e),e}}async function j(e,t){try{let s=new FormData;s.append("key_name",e),s.append("key_file",t);let a=await fetch("".concat(x.f4,"/ssh_node_pools/keys"),{method:"POST",body:s});if(!a.ok)throw Error("HTTP error! status: ".concat(a.status));return await a.json()}catch(e){throw console.error("Error uploading SSH key:",e),e}}async function N(e){try{let t=await fetch("".concat(x.f4,"/ssh_node_pools/").concat(e,"/deploy"),{method:"POST",headers:{"Content-Type":"application/json"}});if(!t.ok)throw Error("HTTP error! status: ".concat(t.status));return await t.json()}catch(e){throw console.error("Error deploying SSH Node Pool:",e),e}}async function b(e){try{let t=await fetch("".concat(x.f4,"/ssh_node_pools/").concat(e,"/down"),{method:"POST",headers:{"Content-Type":"application/json"}});if(!t.ok)throw Error("HTTP error! status: ".concat(t.status));return await t.json()}catch(e){throw console.error("Error tearing down SSH Node Pool:",e),e}}async function w(e){try{let t=await fetch("".concat(x.f4,"/ssh_node_pools/").concat(e,"/status"),{method:"GET",headers:{"Content-Type":"application/json"}});if(!t.ok)throw Error("HTTP error! status: ".concat(t.status));return await t.json()}catch(e){throw console.error("Error fetching SSH Node Pool status:",e),e}}async function v(e){let t,{requestId:s,signal:a,onNewLog:l}=e,r=Date.now(),o=new Promise(e=>{let s=()=>{let a=Date.now()-r;a>=3e5?e({timeout:!0}):t=setTimeout(s,3e5-a)};t=setTimeout(s,3e5)}),n=(async()=>{try{let e=await fetch("".concat(x.f4,"/api/stream?request_id=").concat(s,"&format=plain&tail=").concat(1e3,"&follow=true"),{method:"GET",headers:{"Content-Type":"application/json"},...a?{signal:a}:{}});if(!e.ok)throw Error("HTTP error! status: ".concat(e.status));let o=e.body.getReader();try{for(;;){let{done:e,value:t}=await o.read();if(e)break;r=Date.now();let s=new TextDecoder().decode(t);l(s)}}finally{o.cancel(),t&&clearTimeout(t)}return{timeout:!1}}catch(e){if(t&&clearTimeout(t),"AbortError"===e.name)return{timeout:!1};throw e}})(),c=await Promise.race([n,o]);if(t&&clearTimeout(t),c.timeout){(0,p.C)("SSH deployment log stream timed out after ".concat(300,"s of inactivity"),"warning");return}}async function S(e){let t,{requestId:s,signal:a,onNewLog:l,operationType:r="operation"}=e,o=Date.now(),n=new Promise(e=>{let s=()=>{let a=Date.now()-o;a>=3e5?e({timeout:!0}):t=setTimeout(s,3e5-a)};t=setTimeout(s,3e5)}),c=(async()=>{try{let e=await fetch("".concat(x.f4,"/api/stream?request_id=").concat(s,"&format=plain&tail=").concat(1e3,"&follow=true"),{method:"GET",headers:{"Content-Type":"application/json"},...a?{signal:a}:{}});if(!e.ok)throw Error("HTTP error! status: ".concat(e.status));let r=e.body.getReader();try{for(;;){let{done:e,value:t}=await r.read();if(e)break;o=Date.now();let s=new TextDecoder().decode(t);l(s)}}finally{r.cancel(),t&&clearTimeout(t)}return{timeout:!1}}catch(e){if(t&&clearTimeout(t),"AbortError"===e.name)return{timeout:!1};throw e}})(),i=await Promise.race([c,n]);if(t&&clearTimeout(t),i.timeout){(0,p.C)("SSH ".concat(r," log stream timed out after ").concat(300,"s of inactivity"),"warning");return}}var _=s(326),C=s(803),P=s(2557),k=s(6185),T=s(9123);function E(e){let{isOpen:t,onClose:s,onSave:o,poolData:n=null,isLoading:c=!1}=e,[i,d]=(0,l.useState)(""),[m,u]=(0,l.useState)(""),[h,x]=(0,l.useState)("ubuntu"),[p,g]=(0,l.useState)(null),[f,y]=(0,l.useState)(""),[N,b]=(0,l.useState)({}),w=null!==n;(0,l.useEffect)(()=>{if(w&&n){var e,t,s;d(n.name||""),u(((null===(e=n.config)||void 0===e?void 0:e.hosts)||[]).join("\n")),x((null===(t=n.config)||void 0===t?void 0:t.user)||"ubuntu"),y((null===(s=n.config)||void 0===s?void 0:s.password)||"")}else d(""),u(""),x("ubuntu"),g(null),y("");b({})},[w,n]);let v=()=>{let e={};return i.trim()||(e.poolName="Pool name is required"),m.trim()||(e.hosts="At least one host is required"),h.trim()||(e.sshUser="SSH user is required"),p||f||(e.auth="Either SSH key file or password is required"),b(e),0===Object.keys(e).length},S=async()=>{if(!v())return;let e={hosts:m.split("\n").map(e=>e.trim()).filter(e=>e.length>0),user:h};try{if(p){let t=p.name;await j(t,p),e.identity_file="~/.sky/ssh_keys/".concat(t)}f&&(e.password=f),o(i,e)}catch(e){console.error("Failed to upload SSH key:",e),b({...N,keyUpload:"Failed to upload SSH key"})}},E=()=>{c||s()};return(0,a.jsx)(_.Vq,{open:t,onOpenChange:E,children:(0,a.jsxs)(_.cZ,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[(0,a.jsx)(_.fK,{children:(0,a.jsx)(_.$N,{children:w?"Edit SSH Node Pool: ".concat(null==n?void 0:n.name):"Add SSH Node Pool"})}),(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(k._,{htmlFor:"poolName",children:"Pool Name"}),(0,a.jsx)(P.I,{id:"poolName",placeholder:"my-ssh-cluster",value:i,onChange:e=>d(e.target.value),disabled:w,className:"placeholder:text-gray-500 ".concat(N.poolName?"border-red-500":"")}),N.poolName&&(0,a.jsx)("p",{className:"text-sm text-red-500",children:N.poolName})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(k._,{htmlFor:"hosts",children:"Hosts (one per line)"}),(0,a.jsx)(T.g,{id:"hosts",placeholder:"192.168.1.10\n192.168.1.11\nhostname.example.com",value:m,onChange:e=>u(e.target.value),rows:6,className:"placeholder:text-gray-500 ".concat(N.hosts?"border-red-500":"")}),N.hosts&&(0,a.jsx)("p",{className:"text-sm text-red-500",children:N.hosts})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(k._,{htmlFor:"sshUser",children:"SSH User"}),(0,a.jsx)(P.I,{id:"sshUser",placeholder:"ubuntu",value:h,onChange:e=>x(e.target.value),className:"placeholder:text-gray-500 ".concat(N.sshUser?"border-red-500":"")}),N.sshUser&&(0,a.jsx)("p",{className:"text-sm text-red-500",children:N.sshUser})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(k._,{htmlFor:"keyFile",children:"SSH Private Key File"}),(0,a.jsx)(P.I,{id:"keyFile",type:"file",accept:".pem,.key,id_rsa,id_ed25519",onChange:e=>{var t;return g((null===(t=e.target.files)||void 0===t?void 0:t[0])||null)},className:"border-0 bg-transparent p-0 shadow-none focus:ring-0 file:mr-2 file:text-sm file:py-1 file:px-3 file:border file:border-gray-300 file:rounded file:bg-gray-50 hover:file:bg-gray-100 file:cursor-pointer"}),N.keyUpload&&(0,a.jsx)("p",{className:"text-sm text-red-500",children:N.keyUpload})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(k._,{htmlFor:"password",children:"Password (optional, if sudo requires a password)"}),(0,a.jsx)(P.I,{id:"password",type:"password",placeholder:"Leave empty if using passwordless sudo",value:f,onChange:e=>y(e.target.value),className:"placeholder:text-gray-500"})]}),N.auth&&(0,a.jsx)("p",{className:"text-sm text-red-500",children:N.auth})]}),(0,a.jsxs)(_.cN,{children:[(0,a.jsx)(C.z,{variant:"outline",onClick:E,disabled:c,children:"Cancel"}),(0,a.jsx)(C.z,{onClick:S,disabled:c,className:"bg-blue-600 hover:bg-blue-700 text-white disabled:bg-gray-300 disabled:text-gray-500",children:c?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.Z,{size:16,className:"mr-2"}),"Saving..."]}):w?"Update Pool":"Create Pool"})]})]})})}var H=s(6378),D=s(6856),U=s(1214),I=s(1163),F=s(1664),q=s.n(F),O=s(6989);s(7673);let R=U.nb.REFRESH_INTERVAL,A=U.MO.NAME_TRUNCATE_LENGTH;function G(e){let{title:t,isLoading:s,isDataLoaded:l,contexts:o,gpus:n,groupedPerContextGPUs:c,groupedPerNodeGPUs:i,handleContextClick:d,contextStats:m={},isSSH:u=!1,actionButton:h=null}=e,x=o||[];return s||!l?(0,a.jsx)("div",{className:"rounded-lg border bg-card text-card-foreground shadow-sm mb-6",children:(0,a.jsxs)("div",{className:"p-5",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold mb-4",children:t}),(0,a.jsxs)("div",{className:"flex items-center justify-center py-6",children:[(0,a.jsx)(r.Z,{size:24,className:"mr-3"}),(0,a.jsxs)("span",{className:"text-gray-500",children:["Loading ",t,"..."]})]})]})}):l&&0===x.length?(0,a.jsx)("div",{className:"rounded-lg border bg-card text-card-foreground shadow-sm mb-6",children:(0,a.jsxs)("div",{className:"p-5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold",children:t}),h]}),(0,a.jsxs)("p",{className:"text-sm text-gray-500",children:["No ",t," found or ",t," is not configured."]})]})}):l&&x.length>0?(0,a.jsx)("div",{className:"rounded-lg border bg-card text-card-foreground shadow-sm mb-6",children:(0,a.jsxs)("div",{className:"p-5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold",children:t}),(0,a.jsxs)("span",{className:"ml-2 px-2 py-0.5 bg-blue-100 text-blue-800 rounded-full text-xs font-medium",children:[x.length," ",1===x.length?u?"pool":"context":u?"pools":"contexts"]})]}),h]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[(0,a.jsx)("div",{children:(0,a.jsx)("div",{className:"overflow-x-auto rounded-md border border-gray-200 shadow-sm bg-white",children:(0,a.jsxs)("table",{className:"min-w-full text-sm",children:[(0,a.jsx)("thead",{className:"bg-gray-50",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-1/4",children:u?"Node Pool":"Context"}),(0,a.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-1/8",children:"Clusters"}),(0,a.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-1/8",children:"Jobs"}),(0,a.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-1/8",children:"Nodes"}),(0,a.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-1/4",children:"GPU Types"}),(0,a.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-1/8",children:"#GPUs"})]})}),(0,a.jsx)("tbody",{className:"bg-white divide-y divide-gray-200 ".concat(x.length>5?"max-h-[250px] overflow-y-auto block":""),children:x.map(e=>{let t=c[e]||[],s=i[e]||[],l=t.reduce((e,t)=>e+(t.gpu_total||0),0),r=m[u?"ssh/".concat(e.replace(/^ssh-/,"")):"kubernetes/".concat(e)]||{clusters:0,jobs:0},o=Object.keys(t.reduce((e,t)=>(e[t.gpu_name]=(e[t.gpu_name]||0)+(t.gpu_total||0),e),{})).join(", "),n=u?e.replace(/^ssh-/,""):e;return(0,a.jsxs)("tr",{className:"hover:bg-gray-50",children:[(0,a.jsx)("td",{className:"p-3",children:(0,a.jsx)(O.Md,{content:n,className:"text-sm text-muted-foreground",children:(0,a.jsx)("span",{className:"text-blue-600 hover:underline cursor-pointer",onClick:()=>d(e),children:n.length>A?"".concat(n.substring(0,Math.floor((A-3)/2)),"...").concat(n.substring(n.length-Math.ceil((A-3)/2))):n})})}),(0,a.jsx)("td",{className:"p-3",children:r.clusters>0?(0,a.jsx)("span",{className:"px-2 py-0.5 bg-blue-100 text-blue-800 rounded text-xs font-medium",children:r.clusters}):(0,a.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-500 rounded text-xs font-medium",children:"0"})}),(0,a.jsx)("td",{className:"p-3",children:r.jobs>0?(0,a.jsx)("span",{className:"px-2 py-0.5 bg-green-100 text-green-800 rounded text-xs font-medium",children:r.jobs}):(0,a.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-500 rounded text-xs font-medium",children:"0"})}),(0,a.jsx)("td",{className:"p-3",children:s.length}),(0,a.jsx)("td",{className:"p-3",children:o||"-"}),(0,a.jsx)("td",{className:"p-3",children:l})]},e)})})]})})}),n&&n.length>0&&(0,a.jsx)("div",{children:(0,a.jsx)("div",{className:"overflow-x-auto rounded-md border border-gray-200 shadow-sm bg-white",children:(0,a.jsxs)("table",{className:"min-w-full text-sm",children:[(0,a.jsx)("thead",{className:"bg-gray-50",children:(0,a.jsxs)("tr",{children:[(0,a.jsxs)("th",{className:"p-3 text-left font-medium text-gray-600 w-1/4 whitespace-nowrap",children:["GPU",(0,a.jsxs)("span",{className:"ml-2 px-2 py-0.5 bg-green-100 text-green-800 rounded-full text-xs font-medium whitespace-nowrap",children:[n.reduce((e,t)=>e+t.gpu_free,0)," ","of"," ",n.reduce((e,t)=>e+t.gpu_total,0)," ","free"]})]}),(0,a.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-1/4",children:"Requestable"}),(0,a.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-1/2",children:(0,a.jsx)("div",{className:"flex items-center",children:(0,a.jsx)("span",{children:"Utilization"})})})]})}),(0,a.jsx)("tbody",{className:"bg-white divide-y divide-gray-200 ".concat(n.length>5?"max-h-[250px] overflow-y-auto block":""),children:n.map(e=>{let t=e.gpu_total-e.gpu_free,s=e.gpu_total>0?e.gpu_free/e.gpu_total*100:0,l=e.gpu_total>0?t/e.gpu_total*100:0,r=c?Object.values(c).flat().filter(t=>t.gpu_name===e.gpu_name&&(u?t.context.startsWith("ssh-"):!t.context.startsWith("ssh-"))).map(e=>e.gpu_requestable_qty_per_node).filter((e,t,s)=>s.indexOf(e)===t).join(", "):"-";return(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{className:"p-3 font-medium w-24 whitespace-nowrap",children:e.gpu_name}),(0,a.jsxs)("td",{className:"p-3 text-xs text-gray-600",children:[r||"-"," / node"]}),(0,a.jsx)("td",{className:"p-3 w-2/3",children:(0,a.jsx)("div",{className:"flex items-center gap-3",children:(0,a.jsxs)("div",{className:"flex-1 bg-gray-100 rounded-md h-5 flex overflow-hidden shadow-sm min-w-[100px] w-full",children:[l>0&&(0,a.jsx)("div",{style:{width:"".concat(l,"%")},className:"bg-yellow-500 h-full flex items-center justify-center text-white text-xs font-medium",children:l>15&&"".concat(t," used")}),s>0&&(0,a.jsx)("div",{style:{width:"".concat(s,"%")},className:"bg-green-700 h-full flex items-center justify-center text-white text-xs font-medium",children:s>15&&"".concat(e.gpu_free," free")})]})})})]},e.gpu_name)})})]})})})]})]})}):null}function L(e){let{contextName:t,gpusInContext:s,nodesInContext:o}=e;t.startsWith("ssh-");let[n,c]=(0,l.useState)([]),[i,m]=(0,l.useState)("$__all"),[u,h]=(0,l.useState)({from:"now-1h",to:"now"}),[x,p]=(0,l.useState)(!1),[g,f]=(0,l.useState)(!1);(0,l.useEffect)(()=>{(async()=>{f(await (0,d.TO)())})()},[]);let y=(0,l.useCallback)(async()=>{if(g){p(!0);try{let e=(0,d.ki)();for(let t of["/api/datasources/proxy/1/api/v1/label/node/values"])try{let s=await fetch("".concat(e).concat(t),{method:"GET",credentials:"include",headers:{Accept:"application/json"}});if(s.ok){let e=await s.json();if(e.data&&e.data.length>0){c(e.data.sort()),console.log("Successfully fetched hosts from ".concat(t,":"),e.data);break}}else console.log("HTTP ".concat(s.status," from ").concat(t,": ").concat(s.statusText))}catch(e){console.log("Failed to fetch from ".concat(t,":"),e);continue}}catch(e){console.error("Error fetching available hosts:",e)}finally{p(!1)}}},[g]);(0,l.useEffect)(()=>{g&&o&&o.length>0&&y()},[o,g,y]);let j=e=>{let t=(0,d.ki)(),s="$__all"===i?"$__all":i;return"".concat(t,"/d-solo/skypilot-dcgm-cluster-dashboard/skypilot-dcgm-kubernetes-cluster-dashboard?orgId=1&timezone=browser&var-datasource=prometheus&var-host=").concat(encodeURIComponent(s),"&var-gpu=$__all&refresh=5s&theme=light&from=").concat(encodeURIComponent(u.from),"&to=").concat(encodeURIComponent(u.to),"&panelId=").concat(e,"&__feature.dashboardSceneSolo")},N=e=>{h({"15m":{from:"now-15m",to:"now"},"1h":{from:"now-1h",to:"now"},"6h":{from:"now-6h",to:"now"},"24h":{from:"now-24h",to:"now"},"7d":{from:"now-7d",to:"now"}}[e])};return(0,a.jsx)("div",{className:"mb-4",children:(0,a.jsx)("div",{className:"rounded-lg border bg-card text-card-foreground shadow-sm h-full",children:(0,a.jsxs)("div",{className:"p-5",children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,a.jsx)("h4",{className:"text-lg font-semibold",children:"Available GPUs"})}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 mb-6",children:s.map(e=>{let t=e.gpu_total-e.gpu_free,s=e.gpu_total>0?e.gpu_free/e.gpu_total*100:0,l=e.gpu_total>0?t/e.gpu_total*100:0;return(0,a.jsxs)("div",{className:"p-3 bg-gray-50 rounded-md border border-gray-200 shadow-sm",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-1.5 flex-wrap",children:[(0,a.jsxs)("div",{className:"font-medium text-gray-800 text-sm",children:[e.gpu_name,(0,a.jsxs)("span",{className:"text-xs text-gray-500 ml-2",children:["(Requestable: ",e.gpu_requestable_qty_per_node," / node)"]})]}),(0,a.jsxs)("span",{className:"text-xs font-medium",children:[e.gpu_free," free / ",e.gpu_total," total"]})]}),(0,a.jsxs)("div",{className:"w-full bg-gray-100 rounded-md h-4 flex overflow-hidden shadow-sm",children:[l>0&&(0,a.jsx)("div",{style:{width:"".concat(l,"%")},className:"bg-yellow-500 h-full flex items-center justify-center text-white text-xs",children:l>15&&"".concat(t," used")}),s>0&&(0,a.jsx)("div",{style:{width:"".concat(s,"%")},className:"bg-green-700 h-full flex items-center justify-center text-white text-xs",children:s>15&&"".concat(e.gpu_free," free")})]})]},e.gpu_name)})}),o&&o.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h4",{className:"text-lg font-semibold mb-4",children:"Nodes"}),(0,a.jsx)("div",{className:"overflow-x-auto rounded-md border border-gray-200 shadow-sm",children:(0,a.jsxs)("table",{className:"min-w-full text-sm",children:[(0,a.jsx)("thead",{className:"bg-gray-100",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"p-3 text-left font-medium text-gray-600",children:"Node"}),(0,a.jsx)("th",{className:"p-3 text-left font-medium text-gray-600",children:"IP Address"}),(0,a.jsx)("th",{className:"p-3 text-left font-medium text-gray-600",children:"GPU"}),(0,a.jsx)("th",{className:"p-3 text-right font-medium text-gray-600",children:"Availability"})]})}),(0,a.jsx)("tbody",{className:"bg-white divide-y divide-gray-200",children:o.map((e,t)=>(0,a.jsxs)("tr",{className:"hover:bg-gray-50",children:[(0,a.jsx)("td",{className:"p-3 whitespace-nowrap text-gray-700",children:e.node_name}),(0,a.jsx)("td",{className:"p-3 whitespace-nowrap text-gray-700",children:e.ip_address||"-"}),(0,a.jsx)("td",{className:"p-3 whitespace-nowrap text-gray-700",children:e.gpu_name}),(0,a.jsx)("td",{className:"p-3 whitespace-nowrap text-right text-gray-700",children:"".concat(e.gpu_free," of ").concat(e.gpu_total," free")})]},"".concat(e.node_name,"-").concat(t)))})]})})]}),g&&o&&o.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h4",{className:"text-lg font-semibold mb-4 mt-6",children:"GPU Metrics"}),(0,a.jsxs)("div",{className:"mb-4 p-4 bg-gray-50 rounded-md border border-gray-200",children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-4 items-start sm:items-center",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("label",{htmlFor:"host-select",className:"text-sm font-medium text-gray-700 whitespace-nowrap",children:"Node:"}),(0,a.jsxs)("select",{id:"host-select",value:i,onChange:e=>{m(e.target.value)},disabled:x,className:"px-3 py-1 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-sky-blue focus:border-transparent",children:[(0,a.jsx)("option",{value:"$__all",children:"All Nodes"}),n.map(e=>(0,a.jsx)("option",{value:e,children:e},e))]}),x&&(0,a.jsx)("div",{className:"ml-2",children:(0,a.jsx)(r.Z,{size:16})})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium text-gray-700 whitespace-nowrap",children:"Time Range:"}),(0,a.jsx)("div",{className:"flex gap-1",children:[{label:"15m",value:"15m"},{label:"1h",value:"1h"},{label:"6h",value:"6h"},{label:"24h",value:"24h"},{label:"7d",value:"7d"}].map(e=>(0,a.jsx)("button",{onClick:()=>N(e.value),className:"px-2 py-1 text-xs font-medium rounded border transition-colors ".concat(u.from==="now-".concat(e.value)&&"now"===u.to?"bg-sky-blue text-white border-sky-blue":"bg-white text-gray-600 border-gray-300 hover:bg-gray-50"),children:e.label},e.value))})]})]}),(0,a.jsxs)("div",{className:"mt-2 text-xs text-gray-500",children:["Showing:"," ","$__all"===i?"All nodes":i," • Time: ",u.from," to ",u.to,n.length>0&&(0,a.jsxs)("span",{children:[" • ",n.length," nodes available"]})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,a.jsx)("div",{className:"bg-white rounded-md",children:(0,a.jsx)("div",{className:"p-2",children:(0,a.jsx)("iframe",{src:j("6"),width:"100%",height:"400",frameBorder:"0",title:"GPU Utilization",className:"rounded"},"gpu-util-".concat(i,"-").concat(u.from,"-").concat(u.to))})}),(0,a.jsx)("div",{className:"bg-white rounded-md",children:(0,a.jsx)("div",{className:"p-2",children:(0,a.jsx)("iframe",{src:j("18"),width:"100%",height:"400",frameBorder:"0",title:"GPU Memory",className:"rounded"},"gpu-memory-".concat(i,"-").concat(u.from,"-").concat(u.to))})}),(0,a.jsx)("div",{className:"bg-white rounded-md",children:(0,a.jsx)("div",{className:"p-2",children:(0,a.jsx)("iframe",{src:j("10"),width:"100%",height:"400",frameBorder:"0",title:"GPU Power Consumption",className:"rounded"},"gpu-power-".concat(i,"-").concat(u.from,"-").concat(u.to))})})]})]})]})})})}function z(e){var t;let{poolName:s,gpusInContext:c,nodesInContext:i,handleDeploySSHPool:d,handleEditSSHPool:m,handleDeleteSSHPool:u,poolConfig:h}=e,[x,p]=(0,l.useState)(null),[g,f]=(0,l.useState)(!0),[y,j]=(0,l.useState)({isOpen:!1,action:null,loading:!1}),[N,P]=(0,l.useState)({isOpen:!1,logs:"",isStreaming:!1,deploymentComplete:!1,deploymentSuccess:!1,requestId:null});(0,l.useEffect)(()=>{(async()=>{try{f(!0);let e=await w(s);p(e)}catch(e){console.error("Failed to fetch SSH Node Pool status:",e),p({pool_name:s,status:"Error",reason:"Failed to fetch status"})}finally{f(!1)}})()},[s]);let{deployDisabled:k}=(()=>{if(!x)return{deployDisabled:!0};let e=x.status;return"Ready"===e?{deployDisabled:!0}:"Error"===e?{deployDisabled:!0}:{deployDisabled:!1}})(),T=async()=>{j({...y,loading:!0});try{if("deploy"===y.action){j({isOpen:!1,action:null,loading:!1}),P({isOpen:!0,logs:"",isStreaming:!0,deploymentComplete:!1,deploymentSuccess:!1,requestId:null});try{let e=(await d(s)).request_id;P(t=>({...t,requestId:e}));let t=new AbortController;await v({requestId:e,signal:t.signal,onNewLog:e=>{P(t=>({...t,logs:t.logs+e}))}}),P(e=>({...e,isStreaming:!1,deploymentComplete:!0,deploymentSuccess:!0})),setTimeout(async()=>{(async()=>{try{let e=await w(s);p(e)}catch(e){console.error("Failed to fetch SSH Node Pool status after deployment:",e)}})()},1e3)}catch(e){console.error("Deployment failed:",e),P(t=>({...t,isStreaming:!1,deploymentComplete:!0,deploymentSuccess:!1,logs:t.logs+"\nDeployment failed: ".concat(e.message)}))}}else if("delete"===y.action){j({isOpen:!1,action:null,loading:!1}),P({isOpen:!0,logs:"",isStreaming:!0,deploymentComplete:!1,deploymentSuccess:!1,requestId:null});try{let e=(await b(s)).request_id;P(t=>({...t,requestId:e})),e&&await S({requestId:e,signal:null,onNewLog:e=>{P(t=>({...t,logs:t.logs+e}))},operationType:"down"}),await u(s),P(e=>({...e,isStreaming:!1,deploymentComplete:!0,deploymentSuccess:!0,logs:e.logs+"\nSSH Node Pool teardown completed successfully."}))}catch(e){console.error("Down operation failed:",e),P(t=>({...t,isStreaming:!1,deploymentComplete:!0,deploymentSuccess:!1,logs:t.logs+"\nTeardown failed: ".concat(e.message)}))}}}catch(e){console.error("Action failed:",e),j({...y,loading:!1})}},E=()=>{j({isOpen:!1,action:null,loading:!1})},H=()=>{P({isOpen:!1,logs:"",isStreaming:!1,deploymentComplete:!1,deploymentSuccess:!1,requestId:null}),N.deploymentComplete&&setTimeout(()=>{(async()=>{try{let e=await w(s);p(e)}catch(e){console.error("Failed to refresh status:",e)}})()},1e3)},D="deploy"===y.action?{title:"Deploy SSH Node Pool",description:'Are you sure you want to deploy SSH Node Pool "'.concat(s,'"?'),details:["• Set up SkyPilot runtime on the configured SSH hosts","• Install required components and dependencies","• Make the node pool available for workloads","","This process may take a few minutes to complete."]}:{title:"Delete SSH Node Pool",description:'Are you sure you want to delete SSH Node Pool "'.concat(s,'"?'),details:["• Clean up any deployed resources","• Remove the SSH Node Pool configuration"]};return(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"mb-6",children:(0,a.jsxs)("div",{className:"rounded-lg border bg-card text-card-foreground shadow-sm",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 pt-4",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"SSH Node Pool Details"}),(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsxs)("button",{className:"px-3 py-1 text-sm border rounded flex items-center ".concat(k?"border-gray-300 bg-gray-100 text-gray-400 cursor-not-allowed":"border-green-300 bg-green-50 text-green-700 hover:bg-green-100"),onClick:k?void 0:()=>{j({isOpen:!0,action:"deploy",loading:!1})},disabled:k,children:[(0,a.jsx)(o.Z,{className:"w-4 h-4 mr-2"}),"Deploy"]}),(0,a.jsxs)("button",{className:"px-3 py-1 text-sm border border-gray-300 rounded hover:bg-gray-50 flex items-center text-red-600 hover:text-red-700",onClick:()=>{j({isOpen:!0,action:"delete",loading:!1})},children:[(0,a.jsx)(n.Z,{className:"w-4 h-4 mr-2"}),"Delete"]})]})]}),(0,a.jsx)("div",{className:"p-4",children:(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Pool Name"}),(0,a.jsx)("div",{className:"text-base mt-1",children:s})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Nodes"}),(0,a.jsx)("div",{className:"text-base mt-1",children:i?i.length:0})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Status"}),(0,a.jsx)("div",{className:"text-base mt-1",children:g?(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(r.Z,{size:16,className:"mr-2"}),(0,a.jsx)("span",{className:"text-gray-500",children:"Loading..."})]}):x?(0,a.jsx)(e=>{let{status:t,reason:s}=e,l="Ready"===t,r="Not Ready"===t?"Click Deploy to set up this node pool":s;return(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)("span",{className:"px-2 py-0.5 rounded text-xs font-medium ".concat(l?"bg-green-100":"bg-red-100"," ").concat(l?"text-green-800":"text-red-800"),children:t}),!l&&r&&(0,a.jsxs)("span",{className:"text-sm text-gray-600",children:["(",r,")"]})]})},{status:x.status,reason:x.reason}):(0,a.jsx)("span",{className:"text-gray-500",children:"Unknown"})})]})]})})]})}),(0,a.jsx)(L,{contextName:"ssh-".concat(s),gpusInContext:c,nodesInContext:i}),(0,a.jsx)(_.Vq,{open:y.isOpen,onOpenChange:E,children:(0,a.jsxs)(_.cZ,{className:"sm:max-w-md",children:[(0,a.jsxs)(_.fK,{className:"",children:[(0,a.jsx)(_.$N,{className:"",children:D.title}),(0,a.jsx)(_.Be,{className:"",children:D.description})]}),(0,a.jsx)("div",{className:"py-4",children:(0,a.jsxs)("div",{className:"text-sm text-gray-600 space-y-1",children:[(0,a.jsx)("p",{className:"font-medium mb-2",children:"This will:"}),D.details.map((e,t)=>(0,a.jsx)("p",{className:""===e?"pt-2":"",children:e},t))]})}),(0,a.jsxs)(_.cN,{className:"",children:[(0,a.jsx)(C.z,{variant:"outline",onClick:E,disabled:y.loading,className:"",children:"Cancel"}),(0,a.jsx)(C.z,{onClick:T,disabled:y.loading,className:"deploy"===y.action?"bg-green-600 hover:bg-green-700 text-white":"bg-red-600 hover:bg-red-700 text-white",children:y.loading?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.Z,{size:16,className:"mr-2"}),"deploy"===y.action?"Deploying...":"Deleting..."]}):"deploy"===y.action?"Deploy":"Delete"})]})]})}),(0,a.jsx)(_.Vq,{open:N.isOpen,onOpenChange:N.isStreaming?void 0:H,children:(0,a.jsxs)(_.cZ,{className:"sm:max-w-4xl max-h-[80vh]",children:[(0,a.jsxs)(_.fK,{className:"",children:[(0,a.jsxs)(_.$N,{className:"",children:["Deploying SSH Node Pool: ",s]}),(0,a.jsx)(_.Be,{className:"",children:N.isStreaming?"Deployment in progress. Do not close this dialog.":N.deploymentSuccess?"Deployment completed successfully!":"Deployment completed with errors."})]}),(0,a.jsx)("div",{className:"py-4",children:(0,a.jsxs)("div",{className:"bg-black text-green-400 p-4 rounded-md font-mono text-sm max-h-96 overflow-y-auto",children:[(0,a.jsx)("pre",{className:"whitespace-pre-wrap",children:(t=N.logs)?t.split("\n").map(e=>(e=e.replace(/\x1b\[[0-9;]*m/g,"")).match(/^D \d{2}-\d{2} \d{2}:\d{2}:\d{2}/)?null:e=(e=e.replace(/├──/g,"├─")).replace(/└──/g,"└─")).filter(e=>null!==e&&""!==e.trim()).join("\n"):""}),N.isStreaming&&(0,a.jsxs)("div",{className:"flex items-center mt-2",children:[(0,a.jsx)(r.Z,{size:16,className:"mr-2 text-green-400"}),(0,a.jsx)("span",{className:"text-green-400",children:"Streaming logs..."})]})]})}),(0,a.jsx)(_.cN,{className:"",children:(0,a.jsx)(C.z,{onClick:H,disabled:N.isStreaming,className:N.deploymentSuccess?"bg-green-600 hover:bg-green-700 text-white":N.deploymentComplete&&!N.deploymentSuccess?"bg-red-600 hover:bg-red-700 text-white":"bg-gray-600 hover:bg-gray-700 text-white",children:N.isStreaming?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.Z,{size:16,className:"mr-2"}),"Deploying..."]}):"Close"})})]})})]})}function Z(){let[e,t]=(0,l.useState)(!0),[s,o]=(0,l.useState)(!0),[n,d]=(0,l.useState)(!0),x=l.useRef(null),p=(0,i.X)(),[j,b]=(0,l.useState)(!1),[w,v]=(0,l.useState)(!1),S=(0,I.useRouter)(),[_,C]=(0,l.useState)([]),[P,k]=(0,l.useState)([]),[T,U]=(0,l.useState)([]),[F,O]=(0,l.useState)([]),[A,Z]=(0,l.useState)([]),[M,W]=(0,l.useState)(0),[$,B]=(0,l.useState)(0),[K,J]=(0,l.useState)({}),[V,X]=(0,l.useState)({}),[Q,Y]=(0,l.useState)(!1),[ee,et]=(0,l.useState)(null),[es,ea]=(0,l.useState)(!1),[el,er]=(0,l.useState)(null),eo=l.useCallback(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{showLoadingIndicators:!0};e.showLoadingIndicators&&(t(!0),o(!0));try{let e=await H.default.get(m.l4),{gpuData:t,cloudData:s}=e||{};if(t){let{allContextNames:e,allGPUs:s,perContextGPUs:a,perNodeGPUs:l,contextStats:r}=t;C(e||[]),k(s||[]),U(a||[]),O(l||[]),J(r||{}),b(!0)}else e&&null===e.gpuData?(C([]),k([]),U([]),O([]),J({}),b(!0)):e||console.log("No infra data received from cache");s?(Z(s.clouds||[]),W(s.totalClouds||0),B(s.enabledClouds||0),v(!0)):e&&null===e.cloudData?(Z([]),W(0),B(0),v(!0)):e||console.log("No cloud data received from cache"),await en()}catch(e){console.error("Error in fetchData:",e),C([]),k([]),U([]),O([]),J({}),Z([]),W(0),B(0),b(!0),v(!0)}finally{e.showLoadingIndicators&&(t(!1),o(!1)),n&&e.showLoadingIndicators&&d(!1)}},[n]),en=async()=>{try{let e=await g();X(e)}catch(e){console.error("Failed to fetch SSH Node Pools:",e),X({})}},ec=(e,t)=>{et({name:e,config:t}),Y(!0)},ei=async e=>{try{await y(e),await en(),er(null),S.push("/infra")}catch(e){throw console.error("Failed to delete SSH Node Pool:",e),e}},ed=async e=>{try{await N(e)}catch(e){throw console.error("Failed to deploy SSH Node Pool:",e),e}},em=async(e,t)=>{ea(!0);try{let s={...V};s[e]=t,await f(s),await en(),Y(!1)}catch(e){console.error("Failed to save SSH Node Pool:",e),alert("Failed to save SSH Node Pool. Please try again.")}finally{ea(!1)}};(0,l.useEffect)(()=>{x.current=eo},[eo]),(0,l.useEffect)(()=>{(async()=>{await D.ZP.preloadForPage("infra"),eo({showLoadingIndicators:!0})})()},[eo]),(0,l.useEffect)(()=>{let e=!0,t=setInterval(()=>{e&&x.current&&x.current({showLoadingIndicators:!1})},R);return()=>{e=!1,clearInterval(t)}},[]),(0,l.useEffect)(()=>()=>{b(!1),v(!1),d(!0)},[]),(P||[]).length,(P||[]).reduce((e,t)=>e+t.gpu_total,0),(P||[]).reduce((e,t)=>e+t.gpu_free,0);let eu=l.useMemo(()=>T?T.reduce((e,t)=>{let{context:s}=t;return e[s]||(e[s]=[]),e[s].push(t),e},{}):{},[T]),eh=l.useMemo(()=>_&&Array.isArray(_)?_.filter(e=>e.startsWith("ssh-")):[],[_]),ex=l.useMemo(()=>_&&Array.isArray(_)?_.filter(e=>!e.startsWith("ssh-")):[],[_]),ep=l.useMemo(()=>{if(!T||!P)return[];let e=new Set;return T.forEach(t=>{t.context.startsWith("ssh-")&&e.add(t.gpu_name)}),P.filter(t=>e.has(t.gpu_name))},[P,T]),eg=l.useMemo(()=>{if(!T||!P)return[];let e=new Set;return T.forEach(t=>{t.context.startsWith("ssh-")||e.add(t.gpu_name)}),P.filter(t=>e.has(t.gpu_name))},[P,T]),ef=l.useMemo(()=>F?F.reduce((e,t)=>{let{context:s}=t;return e[s]||(e[s]=[]),e[s].push(t),e},{}):{},[F]);(0,l.useEffect)(()=>{S.isReady&&S.query.context&&er(decodeURIComponent(Array.isArray(S.query.context)?S.query.context[0]:S.query.context))},[S.isReady,S.query.context]);let ey=e=>{er(e),S.push("/infra/".concat(encodeURIComponent(e)))},ej=e||s,eN=j&&w&&!n;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,a.jsxs)("div",{className:"text-base flex items-center",children:[(0,a.jsx)(q(),{href:"/infra",className:"text-sky-blue hover:underline ".concat(el?"":"cursor-default"),children:"Infrastructure"}),el&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"mx-2 text-gray-500",children:"›"}),el.startsWith("ssh-")?(0,a.jsx)(q(),{href:"/infra",className:"text-sky-blue hover:underline cursor-pointer",children:"SSH Node Pool"}):(0,a.jsx)(q(),{href:"/infra",className:"text-sky-blue hover:underline cursor-pointer",children:"Kubernetes"}),(0,a.jsx)("span",{className:"mx-2 text-gray-500",children:"›"}),(0,a.jsx)("span",{className:"text-sky-blue",children:el.startsWith("ssh-")?el.replace(/^ssh-/,""):el})]})]}),(0,a.jsxs)("div",{className:"flex items-center",children:[ej&&(0,a.jsxs)("div",{className:"flex items-center mr-2",children:[(0,a.jsx)(r.Z,{size:15,className:"mt-0"}),(0,a.jsx)("span",{className:"ml-2 text-gray-500",children:"Loading..."})]}),(0,a.jsxs)("button",{onClick:()=>{H.default.invalidate(u.getClusters),H.default.invalidate(h.getManagedJobs,[{allUsers:!0}]),H.default.invalidate(m.l4),x.current&&x.current({showLoadingIndicators:!0})},disabled:ej,className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:[(0,a.jsx)(c.Z,{className:"h-4 w-4 mr-1.5"}),!p&&"Refresh"]})]})]}),eN?el?e&&!j?(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center h-64",children:[(0,a.jsx)(r.Z,{size:32,className:"mb-4"}),(0,a.jsx)("span",{className:"text-gray-500 text-lg",children:"Loading Context..."})]}):(t=>{let s=eu[t]||[],l=ef[t]||[];if(e&&!j)return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center h-64",children:[(0,a.jsx)(r.Z,{size:32,className:"mb-4"}),(0,a.jsx)("span",{className:"text-gray-500 text-lg",children:"Loading Context..."})]});if(t.startsWith("ssh-")){let e=t.replace(/^ssh-/,"");return(0,a.jsx)(z,{poolName:e,gpusInContext:s,nodesInContext:l,handleDeploySSHPool:ed,handleEditSSHPool:ec,handleDeleteSSHPool:ei,poolConfig:V[e]})}return(0,a.jsx)(L,{contextName:t,gpusInContext:s,nodesInContext:l})})(el):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(G,{title:"SSH Node Pool",isLoading:e,isDataLoaded:j,contexts:eh,gpus:ep,groupedPerContextGPUs:eu,groupedPerNodeGPUs:ef,handleContextClick:ey,contextStats:K,isSSH:!0,actionButton:null}),(0,a.jsx)(G,{title:"Kubernetes",isLoading:e,isDataLoaded:j,contexts:ex,gpus:eg,groupedPerContextGPUs:eu,groupedPerNodeGPUs:ef,handleContextClick:ey,contextStats:K,isSSH:!1}),s||!w?(0,a.jsx)("div",{className:"rounded-lg border bg-card text-card-foreground shadow-sm mb-6",children:(0,a.jsxs)("div",{className:"p-5",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold mb-4",children:"Cloud"}),(0,a.jsxs)("div",{className:"flex items-center justify-center py-6",children:[(0,a.jsx)(r.Z,{size:24,className:"mr-3"}),(0,a.jsx)("span",{className:"text-gray-500",children:"Loading Cloud..."})]})]})}):(0,a.jsx)("div",{className:"rounded-lg border bg-card text-card-foreground shadow-sm mb-6",children:(0,a.jsxs)("div",{className:"p-5",children:[(0,a.jsxs)("div",{className:"flex items-center mb-4",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Cloud"}),(0,a.jsxs)("span",{className:"ml-2 px-2 py-0.5 bg-blue-100 text-blue-800 rounded-full text-xs font-medium",children:[$," of ",M," enabled"]})]}),A&&0!==A.length?(0,a.jsx)("div",{className:"overflow-x-auto rounded-md border border-gray-200 shadow-sm bg-white",children:(0,a.jsxs)("table",{className:"min-w-full text-sm",children:[(0,a.jsx)("thead",{className:"bg-gray-50",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-32",children:"Cloud"}),(0,a.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-24",children:"Clusters"}),(0,a.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-24",children:"Jobs"})]})}),(0,a.jsx)("tbody",{className:"bg-white divide-y divide-gray-200",children:A.map(e=>(0,a.jsxs)("tr",{className:"hover:bg-gray-50",children:[(0,a.jsx)("td",{className:"p-3 font-medium text-gray-700",children:e.name}),(0,a.jsx)("td",{className:"p-3",children:e.clusters>0?(0,a.jsx)("span",{className:"px-2 py-0.5 bg-blue-100 text-blue-800 rounded text-xs font-medium",children:e.clusters}):(0,a.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-500 rounded text-xs font-medium",children:"0"})}),(0,a.jsx)("td",{className:"p-3",children:e.jobs>0?(0,a.jsx)("span",{className:"px-2 py-0.5 bg-green-100 text-green-800 rounded text-xs font-medium",children:e.jobs}):(0,a.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-500 rounded text-xs font-medium",children:"0"})})]},e.name))})]})}):(0,a.jsx)("p",{className:"text-sm text-gray-500",children:"No enabled clouds available."})]})})]}):(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-32",children:[(0,a.jsx)(r.Z,{size:32,className:"mb-4"}),(0,a.jsx)("span",{className:"text-gray-500 text-lg",children:"Loading infrastructure data..."})]}),(0,a.jsx)(E,{isOpen:Q,onClose:()=>Y(!1),onSave:em,poolData:ee,isLoading:es})]})}},2557:function(e,t,s){s.d(t,{I:function(){return o}});var a=s(5893),l=s(7294),r=s(2350);let o=l.forwardRef((e,t)=>{let{className:s,type:l,...o}=e;return(0,a.jsx)("input",{type:l,className:(0,r.cn)("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",s),ref:t,...o})});o.displayName="Input"},6185:function(e,t,s){s.d(t,{_:function(){return i}});var a=s(5893),l=s(7294),r=s(9102),o=s(2003),n=s(2350);let c=(0,o.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),i=l.forwardRef((e,t)=>{let{className:s,...l}=e;return(0,a.jsx)(r.f,{ref:t,className:(0,n.cn)(c(),s),...l})});i.displayName=r.f.displayName},9123:function(e,t,s){s.d(t,{g:function(){return o}});var a=s(5893),l=s(7294),r=s(2350);let o=l.forwardRef((e,t)=>{let{className:s,...l}=e;return(0,a.jsx)("textarea",{className:(0,r.cn)("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",s),ref:t,...l})});o.displayName="Textarea"},7853:function(e,t,s){s.d(t,{TO:function(){return r},ki:function(){return o}});let a=null,l=null,r=async()=>null!==a?a:l||(l=(async()=>{try{let e="".concat(window.location.origin,"/grafana"),t=await fetch("".concat(e,"/api/health"),{method:"GET",credentials:"include",headers:{Accept:"application/json"},signal:AbortSignal.timeout(5e3)});return 200==t.status}catch(e){return console.debug("Grafana availability check failed:",e),a=!1,!1}finally{l=null}})()),o=()=>"".concat(window.location.origin,"/grafana")}}]);