arize-phoenix 10.2.2__py3-none-any.whl → 10.3.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of arize-phoenix might be problematic. Click here for more details.
- {arize_phoenix-10.2.2.dist-info → arize_phoenix-10.3.0.dist-info}/METADATA +5 -2
- {arize_phoenix-10.2.2.dist-info → arize_phoenix-10.3.0.dist-info}/RECORD +25 -24
- phoenix/db/enums.py +3 -12
- phoenix/db/facilitator.py +25 -33
- phoenix/db/models.py +6 -1
- phoenix/server/api/mutations/api_key_mutations.py +5 -4
- phoenix/server/api/mutations/user_mutations.py +3 -11
- phoenix/server/api/queries.py +5 -5
- phoenix/server/api/routers/oauth2.py +1 -4
- phoenix/server/api/routers/v1/__init__.py +2 -0
- phoenix/server/api/routers/v1/models.py +7 -0
- phoenix/server/api/routers/v1/projects.py +2 -3
- phoenix/server/api/routers/v1/users.py +346 -0
- phoenix/server/bearer_auth.py +3 -4
- phoenix/server/jwt_store.py +9 -9
- phoenix/server/static/.vite/manifest.json +9 -9
- phoenix/server/static/assets/{components-ClD3sHta.js → components-DVEsaeYg.js} +2 -2
- phoenix/server/static/assets/{index-CXawXHw0.js → index-cY-swWDK.js} +2 -2
- phoenix/server/static/assets/{pages-BFtNRfTL.js → pages-xeDsefDx.js} +389 -389
- phoenix/server/types.py +3 -2
- phoenix/version.py +1 -1
- {arize_phoenix-10.2.2.dist-info → arize_phoenix-10.3.0.dist-info}/WHEEL +0 -0
- {arize_phoenix-10.2.2.dist-info → arize_phoenix-10.3.0.dist-info}/entry_points.txt +0 -0
- {arize_phoenix-10.2.2.dist-info → arize_phoenix-10.3.0.dist-info}/licenses/IP_NOTICE +0 -0
- {arize_phoenix-10.2.2.dist-info → arize_phoenix-10.3.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
import logging
|
|
3
|
+
import secrets
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
from functools import partial
|
|
6
|
+
from typing import Annotated, Literal, Union
|
|
7
|
+
|
|
8
|
+
from fastapi import APIRouter, Depends, HTTPException, Path, Query, Request
|
|
9
|
+
from pydantic import Field
|
|
10
|
+
from sqlalchemy import select
|
|
11
|
+
from sqlalchemy.exc import IntegrityError as PostgreSQLIntegrityError
|
|
12
|
+
from sqlalchemy.orm import joinedload
|
|
13
|
+
from sqlean.dbapi2 import IntegrityError as SQLiteIntegrityError # type: ignore[import-untyped]
|
|
14
|
+
from starlette.datastructures import Secret
|
|
15
|
+
from starlette.status import (
|
|
16
|
+
HTTP_201_CREATED,
|
|
17
|
+
HTTP_204_NO_CONTENT,
|
|
18
|
+
HTTP_400_BAD_REQUEST,
|
|
19
|
+
HTTP_403_FORBIDDEN,
|
|
20
|
+
HTTP_404_NOT_FOUND,
|
|
21
|
+
HTTP_409_CONFLICT,
|
|
22
|
+
HTTP_422_UNPROCESSABLE_ENTITY,
|
|
23
|
+
)
|
|
24
|
+
from strawberry.relay import GlobalID
|
|
25
|
+
from typing_extensions import TypeAlias, assert_never
|
|
26
|
+
|
|
27
|
+
from phoenix.auth import (
|
|
28
|
+
DEFAULT_ADMIN_EMAIL,
|
|
29
|
+
DEFAULT_ADMIN_USERNAME,
|
|
30
|
+
DEFAULT_SECRET_LENGTH,
|
|
31
|
+
DEFAULT_SYSTEM_EMAIL,
|
|
32
|
+
DEFAULT_SYSTEM_USERNAME,
|
|
33
|
+
compute_password_hash,
|
|
34
|
+
validate_email_format,
|
|
35
|
+
validate_password_format,
|
|
36
|
+
)
|
|
37
|
+
from phoenix.db import models
|
|
38
|
+
from phoenix.db.types.db_models import UNDEFINED
|
|
39
|
+
from phoenix.server.api.routers.v1.models import V1RoutesBaseModel
|
|
40
|
+
from phoenix.server.api.routers.v1.utils import (
|
|
41
|
+
PaginatedResponseBody,
|
|
42
|
+
ResponseBody,
|
|
43
|
+
add_errors_to_responses,
|
|
44
|
+
)
|
|
45
|
+
from phoenix.server.api.types.node import from_global_id_with_expected_type
|
|
46
|
+
from phoenix.server.authorization import require_admin
|
|
47
|
+
|
|
48
|
+
logger = logging.getLogger(__name__)
|
|
49
|
+
|
|
50
|
+
router = APIRouter(tags=["users"])
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
class UserData(V1RoutesBaseModel):
|
|
54
|
+
email: str
|
|
55
|
+
username: str
|
|
56
|
+
role: models.UserRoleName
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
class LocalUserData(UserData):
|
|
60
|
+
auth_method: Literal["LOCAL"]
|
|
61
|
+
password: str = UNDEFINED
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
class OAuth2UserData(UserData):
|
|
65
|
+
auth_method: Literal["OAUTH2"]
|
|
66
|
+
oauth2_client_id: str = UNDEFINED
|
|
67
|
+
oauth2_user_id: str = UNDEFINED
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
class DbUser(V1RoutesBaseModel):
|
|
71
|
+
id: str
|
|
72
|
+
created_at: datetime
|
|
73
|
+
updated_at: datetime
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
class LocalUser(LocalUserData, DbUser):
|
|
77
|
+
password_needs_reset: bool
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
class OAuth2User(OAuth2UserData, DbUser):
|
|
81
|
+
profile_picture_url: str = UNDEFINED
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
User: TypeAlias = Annotated[Union[LocalUser, OAuth2User], Field(..., discriminator="auth_method")]
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
class GetUsersResponseBody(PaginatedResponseBody[User]):
|
|
88
|
+
pass
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
class GetUserResponseBody(ResponseBody[User]):
|
|
92
|
+
pass
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
class CreateUserRequestBody(V1RoutesBaseModel):
|
|
96
|
+
user: Annotated[Union[LocalUserData, OAuth2UserData], Field(..., discriminator="auth_method")]
|
|
97
|
+
send_welcome_email: bool = True
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
class CreateUserResponseBody(ResponseBody[User]):
|
|
101
|
+
pass
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
DEFAULT_PAGINATION_PAGE_LIMIT = 100
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
@router.get(
|
|
108
|
+
"/users",
|
|
109
|
+
operation_id="getUsers",
|
|
110
|
+
summary="List all users",
|
|
111
|
+
description="Retrieve a paginated list of all users in the system.",
|
|
112
|
+
response_description="A list of users.",
|
|
113
|
+
responses=add_errors_to_responses(
|
|
114
|
+
[
|
|
115
|
+
HTTP_422_UNPROCESSABLE_ENTITY,
|
|
116
|
+
],
|
|
117
|
+
),
|
|
118
|
+
dependencies=[Depends(require_admin)],
|
|
119
|
+
response_model_by_alias=True,
|
|
120
|
+
response_model_exclude_unset=True,
|
|
121
|
+
response_model_exclude_defaults=True,
|
|
122
|
+
)
|
|
123
|
+
async def list_users(
|
|
124
|
+
request: Request,
|
|
125
|
+
cursor: str = Query(default=None, description="Cursor for pagination (base64-encoded user ID)"),
|
|
126
|
+
limit: int = Query(
|
|
127
|
+
default=DEFAULT_PAGINATION_PAGE_LIMIT,
|
|
128
|
+
description="The max number of users to return at a time.",
|
|
129
|
+
gt=0,
|
|
130
|
+
),
|
|
131
|
+
) -> GetUsersResponseBody:
|
|
132
|
+
stmt = select(models.User).options(joinedload(models.User.role)).order_by(models.User.id.desc())
|
|
133
|
+
if cursor:
|
|
134
|
+
try:
|
|
135
|
+
cursor_id = GlobalID.from_id(cursor).node_id
|
|
136
|
+
except Exception:
|
|
137
|
+
raise HTTPException(status_code=422, detail=f"Invalid cursor format: {cursor}")
|
|
138
|
+
else:
|
|
139
|
+
stmt = stmt.where(models.User.id <= int(cursor_id))
|
|
140
|
+
stmt = stmt.limit(limit + 1)
|
|
141
|
+
async with request.app.state.db() as session:
|
|
142
|
+
result = (await session.scalars(stmt)).all()
|
|
143
|
+
next_cursor = None
|
|
144
|
+
if len(result) == limit + 1:
|
|
145
|
+
last_user = result[-1]
|
|
146
|
+
next_cursor = str(GlobalID("User", str(last_user.id)))
|
|
147
|
+
result = result[:-1]
|
|
148
|
+
data: list[User] = []
|
|
149
|
+
for user in result:
|
|
150
|
+
if isinstance(user, models.LocalUser):
|
|
151
|
+
data.append(
|
|
152
|
+
LocalUser(
|
|
153
|
+
id=str(GlobalID("User", str(user.id))),
|
|
154
|
+
username=user.username,
|
|
155
|
+
email=user.email,
|
|
156
|
+
role=user.role.name,
|
|
157
|
+
created_at=user.created_at,
|
|
158
|
+
updated_at=user.updated_at,
|
|
159
|
+
auth_method="LOCAL",
|
|
160
|
+
password_needs_reset=user.reset_password,
|
|
161
|
+
)
|
|
162
|
+
)
|
|
163
|
+
elif isinstance(user, models.OAuth2User):
|
|
164
|
+
oauth2_user = OAuth2User(
|
|
165
|
+
id=str(GlobalID("User", str(user.id))),
|
|
166
|
+
username=user.username,
|
|
167
|
+
email=user.email,
|
|
168
|
+
role=user.role.name,
|
|
169
|
+
created_at=user.created_at,
|
|
170
|
+
updated_at=user.updated_at,
|
|
171
|
+
auth_method="OAUTH2",
|
|
172
|
+
)
|
|
173
|
+
if user.oauth2_client_id:
|
|
174
|
+
oauth2_user.oauth2_client_id = user.oauth2_client_id
|
|
175
|
+
if user.oauth2_user_id:
|
|
176
|
+
oauth2_user.oauth2_user_id = user.oauth2_user_id
|
|
177
|
+
if user.profile_picture_url:
|
|
178
|
+
oauth2_user.profile_picture_url = user.profile_picture_url
|
|
179
|
+
data.append(oauth2_user)
|
|
180
|
+
return GetUsersResponseBody(next_cursor=next_cursor, data=data)
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
@router.post(
|
|
184
|
+
"/users",
|
|
185
|
+
operation_id="createUser",
|
|
186
|
+
summary="Create a new user",
|
|
187
|
+
description="Create a new user with the specified configuration.",
|
|
188
|
+
response_description="The newly created user.",
|
|
189
|
+
status_code=HTTP_201_CREATED,
|
|
190
|
+
responses=add_errors_to_responses(
|
|
191
|
+
[
|
|
192
|
+
{"status_code": HTTP_400_BAD_REQUEST, "description": "Role not found."},
|
|
193
|
+
{"status_code": HTTP_409_CONFLICT, "description": "Username or email already exists."},
|
|
194
|
+
HTTP_422_UNPROCESSABLE_ENTITY,
|
|
195
|
+
]
|
|
196
|
+
),
|
|
197
|
+
dependencies=[Depends(require_admin)],
|
|
198
|
+
response_model_by_alias=True,
|
|
199
|
+
response_model_exclude_unset=True,
|
|
200
|
+
response_model_exclude_defaults=True,
|
|
201
|
+
)
|
|
202
|
+
async def create_user(
|
|
203
|
+
request: Request,
|
|
204
|
+
request_body: CreateUserRequestBody,
|
|
205
|
+
) -> CreateUserResponseBody:
|
|
206
|
+
user_data = request_body.user
|
|
207
|
+
email, username, role = user_data.email, user_data.username, user_data.role
|
|
208
|
+
validate_email_format(email)
|
|
209
|
+
|
|
210
|
+
# Prevent creation of SYSTEM users
|
|
211
|
+
if role == "SYSTEM":
|
|
212
|
+
raise HTTPException(
|
|
213
|
+
status_code=HTTP_400_BAD_REQUEST,
|
|
214
|
+
detail="Cannot create users with SYSTEM role",
|
|
215
|
+
)
|
|
216
|
+
|
|
217
|
+
user: models.User
|
|
218
|
+
if isinstance(user_data, LocalUserData):
|
|
219
|
+
password = (user_data.password or secrets.token_hex()).strip()
|
|
220
|
+
validate_password_format(password)
|
|
221
|
+
|
|
222
|
+
# Generate salt and hash password using the same method as in context.py
|
|
223
|
+
salt = secrets.token_bytes(DEFAULT_SECRET_LENGTH)
|
|
224
|
+
compute = partial(compute_password_hash, password=Secret(password), salt=salt)
|
|
225
|
+
password_hash = await asyncio.get_running_loop().run_in_executor(None, compute)
|
|
226
|
+
|
|
227
|
+
user = models.LocalUser(
|
|
228
|
+
email=email,
|
|
229
|
+
username=username,
|
|
230
|
+
password_hash=password_hash,
|
|
231
|
+
password_salt=salt,
|
|
232
|
+
reset_password=True,
|
|
233
|
+
)
|
|
234
|
+
elif isinstance(user_data, OAuth2UserData):
|
|
235
|
+
user = models.OAuth2User(
|
|
236
|
+
email=email,
|
|
237
|
+
username=username,
|
|
238
|
+
oauth2_client_id=user_data.oauth2_client_id or None,
|
|
239
|
+
oauth2_user_id=user_data.oauth2_user_id or None,
|
|
240
|
+
)
|
|
241
|
+
else:
|
|
242
|
+
assert_never(user_data)
|
|
243
|
+
try:
|
|
244
|
+
async with request.app.state.db() as session:
|
|
245
|
+
user_role_id = await session.scalar(select(models.UserRole.id).filter_by(name=role))
|
|
246
|
+
if user_role_id is None:
|
|
247
|
+
raise HTTPException(status_code=400, detail=f"Role '{role}' not found")
|
|
248
|
+
user.user_role_id = user_role_id
|
|
249
|
+
session.add(user)
|
|
250
|
+
except (PostgreSQLIntegrityError, SQLiteIntegrityError) as e:
|
|
251
|
+
if "users.username" in str(e):
|
|
252
|
+
raise HTTPException(status_code=HTTP_409_CONFLICT, detail="Username already exists")
|
|
253
|
+
elif "users.email" in str(e):
|
|
254
|
+
raise HTTPException(status_code=HTTP_409_CONFLICT, detail="Email already exists")
|
|
255
|
+
else:
|
|
256
|
+
raise HTTPException(
|
|
257
|
+
status_code=HTTP_409_CONFLICT,
|
|
258
|
+
detail="Failed to create user due to a conflict with existing data",
|
|
259
|
+
)
|
|
260
|
+
id_ = str(GlobalID("User", str(user.id)))
|
|
261
|
+
data: User
|
|
262
|
+
if isinstance(user_data, LocalUserData):
|
|
263
|
+
data = LocalUser(
|
|
264
|
+
id=id_,
|
|
265
|
+
email=email,
|
|
266
|
+
username=username,
|
|
267
|
+
auth_method="LOCAL",
|
|
268
|
+
role=user_data.role,
|
|
269
|
+
created_at=user.created_at,
|
|
270
|
+
updated_at=user.updated_at,
|
|
271
|
+
password_needs_reset=user.reset_password,
|
|
272
|
+
)
|
|
273
|
+
elif isinstance(user_data, OAuth2UserData):
|
|
274
|
+
data = OAuth2User(
|
|
275
|
+
id=id_,
|
|
276
|
+
email=email,
|
|
277
|
+
username=username,
|
|
278
|
+
auth_method="OAUTH2",
|
|
279
|
+
role=user_data.role,
|
|
280
|
+
created_at=user.created_at,
|
|
281
|
+
updated_at=user.updated_at,
|
|
282
|
+
)
|
|
283
|
+
if user.oauth2_client_id:
|
|
284
|
+
data.oauth2_client_id = user.oauth2_client_id
|
|
285
|
+
if user.oauth2_user_id:
|
|
286
|
+
data.oauth2_user_id = user.oauth2_user_id
|
|
287
|
+
if user.profile_picture_url:
|
|
288
|
+
data.profile_picture_url = user.profile_picture_url
|
|
289
|
+
else:
|
|
290
|
+
assert_never(user_data)
|
|
291
|
+
# Send welcome email if requested
|
|
292
|
+
if request_body.send_welcome_email and request.app.state.email_sender is not None:
|
|
293
|
+
try:
|
|
294
|
+
await request.app.state.email_sender.send_welcome_email(user.email, user.username)
|
|
295
|
+
except Exception as error:
|
|
296
|
+
# Log the error but do not raise it
|
|
297
|
+
logger.error(f"Failed to send welcome email: {error}")
|
|
298
|
+
return CreateUserResponseBody(data=data)
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
@router.delete(
|
|
302
|
+
"/users/{user_id}",
|
|
303
|
+
operation_id="deleteUser",
|
|
304
|
+
summary="Delete a user by ID",
|
|
305
|
+
description="Delete an existing user by their unique GlobalID.",
|
|
306
|
+
response_description="No content returned on successful deletion.",
|
|
307
|
+
status_code=HTTP_204_NO_CONTENT,
|
|
308
|
+
responses=add_errors_to_responses(
|
|
309
|
+
[
|
|
310
|
+
{"status_code": HTTP_404_NOT_FOUND, "description": "User not found."},
|
|
311
|
+
HTTP_422_UNPROCESSABLE_ENTITY,
|
|
312
|
+
{
|
|
313
|
+
"status_code": HTTP_403_FORBIDDEN,
|
|
314
|
+
"description": "Cannot delete the default admin or system user",
|
|
315
|
+
},
|
|
316
|
+
]
|
|
317
|
+
),
|
|
318
|
+
dependencies=[Depends(require_admin)],
|
|
319
|
+
response_model_by_alias=True,
|
|
320
|
+
response_model_exclude_unset=True,
|
|
321
|
+
response_model_exclude_defaults=True,
|
|
322
|
+
)
|
|
323
|
+
async def delete_user(
|
|
324
|
+
request: Request,
|
|
325
|
+
user_id: str = Path(..., description="The GlobalID of the user (e.g. 'VXNlcjox')."),
|
|
326
|
+
) -> None:
|
|
327
|
+
try:
|
|
328
|
+
id_ = from_global_id_with_expected_type(GlobalID.from_id(user_id), "User")
|
|
329
|
+
except Exception:
|
|
330
|
+
raise HTTPException(status_code=422, detail=f"Invalid User GlobalID format: {user_id}")
|
|
331
|
+
async with request.app.state.db() as session:
|
|
332
|
+
user = await session.get(models.User, id_)
|
|
333
|
+
if not user:
|
|
334
|
+
raise HTTPException(status_code=404, detail="User not found")
|
|
335
|
+
# Prevent deletion of system and default admin users
|
|
336
|
+
if (
|
|
337
|
+
user.email == DEFAULT_ADMIN_EMAIL
|
|
338
|
+
or user.email == DEFAULT_SYSTEM_EMAIL
|
|
339
|
+
or user.username == DEFAULT_ADMIN_USERNAME
|
|
340
|
+
or user.username == DEFAULT_SYSTEM_USERNAME
|
|
341
|
+
):
|
|
342
|
+
raise HTTPException(
|
|
343
|
+
status_code=403, detail="Cannot delete the default admin or system user"
|
|
344
|
+
)
|
|
345
|
+
await session.delete(user)
|
|
346
|
+
return None
|
phoenix/server/bearer_auth.py
CHANGED
|
@@ -20,7 +20,7 @@ from phoenix.auth import (
|
|
|
20
20
|
Token,
|
|
21
21
|
)
|
|
22
22
|
from phoenix.config import get_env_phoenix_admin_secret
|
|
23
|
-
from phoenix.db import
|
|
23
|
+
from phoenix.db import models
|
|
24
24
|
from phoenix.server.types import (
|
|
25
25
|
AccessToken,
|
|
26
26
|
AccessTokenAttributes,
|
|
@@ -74,8 +74,7 @@ class PhoenixUser(BaseUser):
|
|
|
74
74
|
self.claims = claims
|
|
75
75
|
assert claims.attributes
|
|
76
76
|
self._is_admin = (
|
|
77
|
-
claims.status is ClaimSetStatus.VALID
|
|
78
|
-
and claims.attributes.user_role == enums.UserRole.ADMIN
|
|
77
|
+
claims.status is ClaimSetStatus.VALID and claims.attributes.user_role == "ADMIN"
|
|
79
78
|
)
|
|
80
79
|
|
|
81
80
|
@cached_property
|
|
@@ -163,7 +162,7 @@ async def create_access_and_refresh_tokens(
|
|
|
163
162
|
) -> tuple[AccessToken, RefreshToken]:
|
|
164
163
|
issued_at = datetime.now(timezone.utc)
|
|
165
164
|
user_id = UserId(user.id)
|
|
166
|
-
user_role =
|
|
165
|
+
user_role = user.role.name
|
|
167
166
|
refresh_token_claims = RefreshTokenClaims(
|
|
168
167
|
subject=user_id,
|
|
169
168
|
issued_at=issued_at,
|
phoenix/server/jwt_store.py
CHANGED
|
@@ -20,7 +20,7 @@ from phoenix.auth import (
|
|
|
20
20
|
)
|
|
21
21
|
from phoenix.config import get_env_enable_prometheus
|
|
22
22
|
from phoenix.db import models
|
|
23
|
-
from phoenix.db.
|
|
23
|
+
from phoenix.db.models import UserRoleName
|
|
24
24
|
from phoenix.server.types import (
|
|
25
25
|
AccessToken,
|
|
26
26
|
AccessTokenAttributes,
|
|
@@ -260,7 +260,7 @@ class _Store(DaemonTask, Generic[_ClaimSetT, _TokenT, _TokenIdT, _RecordT], ABC)
|
|
|
260
260
|
if not record:
|
|
261
261
|
return None
|
|
262
262
|
token, role = record
|
|
263
|
-
_, claims = self._from_db(token,
|
|
263
|
+
_, claims = self._from_db(token, role)
|
|
264
264
|
self._claims[token_id] = claims
|
|
265
265
|
return claims
|
|
266
266
|
|
|
@@ -277,7 +277,7 @@ class _Store(DaemonTask, Generic[_ClaimSetT, _TokenT, _TokenIdT, _RecordT], ABC)
|
|
|
277
277
|
await session.execute(stmt)
|
|
278
278
|
|
|
279
279
|
@abstractmethod
|
|
280
|
-
def _from_db(self, record: _RecordT, role:
|
|
280
|
+
def _from_db(self, record: _RecordT, role: UserRoleName) -> tuple[_TokenIdT, _ClaimSetT]: ...
|
|
281
281
|
|
|
282
282
|
@abstractmethod
|
|
283
283
|
def _to_db(self, claims: _ClaimSetT) -> _RecordT: ...
|
|
@@ -300,12 +300,12 @@ class _Store(DaemonTask, Generic[_ClaimSetT, _TokenT, _TokenIdT, _RecordT], ABC)
|
|
|
300
300
|
await self._delete_expired_tokens(session)
|
|
301
301
|
async with session.begin_nested():
|
|
302
302
|
async for record, role in await session.stream(self._update_stmt):
|
|
303
|
-
token_id, claim_set = self._from_db(record,
|
|
303
|
+
token_id, claim_set = self._from_db(record, role)
|
|
304
304
|
claims[token_id] = claim_set
|
|
305
305
|
self._claims = claims
|
|
306
306
|
|
|
307
307
|
@cached_property
|
|
308
|
-
def _update_stmt(self) -> Select[tuple[_RecordT,
|
|
308
|
+
def _update_stmt(self) -> Select[tuple[_RecordT, UserRoleName]]:
|
|
309
309
|
return (
|
|
310
310
|
select(self._table, models.UserRole.name)
|
|
311
311
|
.join_from(self._table, models.User)
|
|
@@ -341,7 +341,7 @@ class _PasswordResetTokenStore(
|
|
|
341
341
|
def _from_db(
|
|
342
342
|
self,
|
|
343
343
|
record: models.PasswordResetToken,
|
|
344
|
-
user_role:
|
|
344
|
+
user_role: UserRoleName,
|
|
345
345
|
) -> tuple[PasswordResetTokenId, PasswordResetTokenClaims]:
|
|
346
346
|
token_id = PasswordResetTokenId(record.id)
|
|
347
347
|
return token_id, PasswordResetTokenClaims(
|
|
@@ -380,7 +380,7 @@ class _AccessTokenStore(
|
|
|
380
380
|
def _from_db(
|
|
381
381
|
self,
|
|
382
382
|
record: models.AccessToken,
|
|
383
|
-
user_role:
|
|
383
|
+
user_role: UserRoleName,
|
|
384
384
|
) -> tuple[AccessTokenId, AccessTokenClaims]:
|
|
385
385
|
token_id = AccessTokenId(record.id)
|
|
386
386
|
refresh_token_id = RefreshTokenId(record.refresh_token_id)
|
|
@@ -424,7 +424,7 @@ class _RefreshTokenStore(
|
|
|
424
424
|
def _from_db(
|
|
425
425
|
self,
|
|
426
426
|
record: models.RefreshToken,
|
|
427
|
-
user_role:
|
|
427
|
+
user_role: UserRoleName,
|
|
428
428
|
) -> tuple[RefreshTokenId, RefreshTokenClaims]:
|
|
429
429
|
token_id = RefreshTokenId(record.id)
|
|
430
430
|
return token_id, RefreshTokenClaims(
|
|
@@ -470,7 +470,7 @@ class _ApiKeyStore(
|
|
|
470
470
|
def _from_db(
|
|
471
471
|
self,
|
|
472
472
|
record: models.ApiKey,
|
|
473
|
-
user_role:
|
|
473
|
+
user_role: UserRoleName,
|
|
474
474
|
) -> tuple[ApiKeyId, ApiKeyClaims]:
|
|
475
475
|
token_id = ApiKeyId(record.id)
|
|
476
476
|
return token_id, ApiKeyClaims(
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_components-
|
|
3
|
-
"file": "assets/components-
|
|
2
|
+
"_components-DVEsaeYg.js": {
|
|
3
|
+
"file": "assets/components-DVEsaeYg.js",
|
|
4
4
|
"name": "components",
|
|
5
5
|
"imports": [
|
|
6
6
|
"_vendor-DOUbLVp5.js",
|
|
7
|
-
"_pages-
|
|
7
|
+
"_pages-xeDsefDx.js",
|
|
8
8
|
"_vendor-arizeai-DHqMQzfV.js",
|
|
9
9
|
"_vendor-codemirror-DWdZV1Is.js",
|
|
10
10
|
"_vendor-three-C5WAXd5r.js"
|
|
11
11
|
]
|
|
12
12
|
},
|
|
13
|
-
"_pages-
|
|
14
|
-
"file": "assets/pages-
|
|
13
|
+
"_pages-xeDsefDx.js": {
|
|
14
|
+
"file": "assets/pages-xeDsefDx.js",
|
|
15
15
|
"name": "pages",
|
|
16
16
|
"imports": [
|
|
17
17
|
"_vendor-DOUbLVp5.js",
|
|
18
18
|
"_vendor-arizeai-DHqMQzfV.js",
|
|
19
|
-
"_components-
|
|
19
|
+
"_components-DVEsaeYg.js",
|
|
20
20
|
"_vendor-codemirror-DWdZV1Is.js",
|
|
21
21
|
"_vendor-recharts-BfHdRd1Y.js"
|
|
22
22
|
]
|
|
@@ -69,15 +69,15 @@
|
|
|
69
69
|
"name": "vendor-three"
|
|
70
70
|
},
|
|
71
71
|
"index.tsx": {
|
|
72
|
-
"file": "assets/index-
|
|
72
|
+
"file": "assets/index-cY-swWDK.js",
|
|
73
73
|
"name": "index",
|
|
74
74
|
"src": "index.tsx",
|
|
75
75
|
"isEntry": true,
|
|
76
76
|
"imports": [
|
|
77
77
|
"_vendor-DOUbLVp5.js",
|
|
78
78
|
"_vendor-arizeai-DHqMQzfV.js",
|
|
79
|
-
"_pages-
|
|
80
|
-
"_components-
|
|
79
|
+
"_pages-xeDsefDx.js",
|
|
80
|
+
"_components-DVEsaeYg.js",
|
|
81
81
|
"_vendor-three-C5WAXd5r.js",
|
|
82
82
|
"_vendor-codemirror-DWdZV1Is.js",
|
|
83
83
|
"_vendor-shiki-CHu75YVL.js",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as p,j as e,u as wa,a as Ke,e as vn,s as Wn,b as Qn,c as Ye,d as da,f as mr,g as Ae,h as pr,i as hr,k as ua,l as s,m as Ge,p as En,n as on,R as _e,o as K,q as Sa,t as Je,v as fr,C as wn,w as br,x as yr,L as qt,y as Xt,z as Yt,A as Ce,B as L,D as Pn,E as xa,F as m,G as Jt,$ as vr,H as e1,I as G,J as n1,K as Ve,M as Cr,N as Lr,O as Aa,P as kr,Q as Z,S as Be,T as O,U as B,V as W,W as a1,X as t1,Y as wr,Z as i1,_ as Sr,a0 as xr,a1 as Ar,a2 as Tr,a3 as Mr,a4 as Ir,a5 as zr,a6 as Fr,a7 as Er,a8 as Pr,a9 as sn,aa as r1,ab as Fe,ac as _r,ad as Vr,ae as Se,af as ga,ag as ma,ah as pa,ai as $,aj as We,ak as gt,al as Kr,am as Dr,an as Or,ao as Rr,ap as Nr,aq as $r,ar as Br,as as Hr,at as l1,au as jr,av as Zr,aw as Ur,ax as Gr,ay as Wr,az as Qr,aA as qr,aB as U,aC as o1,aD as Ie,aE as Ta,aF as Xr,aG as Yr,aH as Jr,aI as el,aJ as nl,aK as mt,aL as al,aM as Ma,aN as tl,aO as Ia,aP as il,aQ as za,aR as rl,aS as ll,aT as ol,aU as _n,aV as sl,aW as cl,aX as dl,aY as ul,aZ as gl,a_ as ml,a$ as pl,b0 as hl,b1 as fl,b2 as bl,b3 as yl,b4 as vl,b5 as Cl,b6 as pt,b7 as Ll,b8 as kl,b9 as wl,ba as qn,bb as Sl,bc as xl,bd as Al,be as Tl,bf as Ml,bg as Il,bh as zl,bi as Fl,bj as El}from"./vendor-DOUbLVp5.js";import{a as ht,R as Pl,b as _l,c as Vl,m as Kl,T as Dl,A as Ol,S as Rl,d as Nl,e as $l,f as Bl,u as Hl}from"./pages-
|
|
1
|
+
import{r as p,j as e,u as wa,a as Ke,e as vn,s as Wn,b as Qn,c as Ye,d as da,f as mr,g as Ae,h as pr,i as hr,k as ua,l as s,m as Ge,p as En,n as on,R as _e,o as K,q as Sa,t as Je,v as fr,C as wn,w as br,x as yr,L as qt,y as Xt,z as Yt,A as Ce,B as L,D as Pn,E as xa,F as m,G as Jt,$ as vr,H as e1,I as G,J as n1,K as Ve,M as Cr,N as Lr,O as Aa,P as kr,Q as Z,S as Be,T as O,U as B,V as W,W as a1,X as t1,Y as wr,Z as i1,_ as Sr,a0 as xr,a1 as Ar,a2 as Tr,a3 as Mr,a4 as Ir,a5 as zr,a6 as Fr,a7 as Er,a8 as Pr,a9 as sn,aa as r1,ab as Fe,ac as _r,ad as Vr,ae as Se,af as ga,ag as ma,ah as pa,ai as $,aj as We,ak as gt,al as Kr,am as Dr,an as Or,ao as Rr,ap as Nr,aq as $r,ar as Br,as as Hr,at as l1,au as jr,av as Zr,aw as Ur,ax as Gr,ay as Wr,az as Qr,aA as qr,aB as U,aC as o1,aD as Ie,aE as Ta,aF as Xr,aG as Yr,aH as Jr,aI as el,aJ as nl,aK as mt,aL as al,aM as Ma,aN as tl,aO as Ia,aP as il,aQ as za,aR as rl,aS as ll,aT as ol,aU as _n,aV as sl,aW as cl,aX as dl,aY as ul,aZ as gl,a_ as ml,a$ as pl,b0 as hl,b1 as fl,b2 as bl,b3 as yl,b4 as vl,b5 as Cl,b6 as pt,b7 as Ll,b8 as kl,b9 as wl,ba as qn,bb as Sl,bc as xl,bd as Al,be as Tl,bf as Ml,bg as Il,bh as zl,bi as Fl,bj as El}from"./vendor-DOUbLVp5.js";import{a as ht,R as Pl,b as _l,c as Vl,m as Kl,T as Dl,A as Ol,S as Rl,d as Nl,e as $l,f as Bl,u as Hl}from"./pages-xeDsefDx.js";import{u as jl,_ as s1,a as ge,T as re,E as c1,b as cn,c as be,d as Zl,e as He,f as Ul,D as Fa,g as Gl,C as d1,F as u1,I as Wl,h as Ql,i as ql,j as Xl,k as Yl,l as Jl,m as eo,P as no,n as ao,o as g1,p as m1,q as to,r as io,s as ro}from"./vendor-arizeai-DHqMQzfV.js";import{L as p1,a as h1,d as an,E as Ea,k as f1,b as b1,l as ha,h as lo,j as oo,c as so,e as co,f as uo,s as go,g as dn,i as un,R as gn,p as mo,m as po}from"./vendor-codemirror-DWdZV1Is.js";import{V as ho}from"./vendor-three-C5WAXd5r.js";const y1=function(){var n={defaultValue:null,kind:"LocalArgument",name:"clusters"},a={defaultValue:null,kind:"LocalArgument",name:"dataQualityMetricColumnName"},t={defaultValue:null,kind:"LocalArgument",name:"fetchDataQualityMetric"},i={defaultValue:null,kind:"LocalArgument",name:"fetchPerformanceMetric"},r={defaultValue:null,kind:"LocalArgument",name:"performanceMetric"},l=[{alias:null,args:null,kind:"ScalarField",name:"primaryValue",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"referenceValue",storageKey:null}],o=[{alias:null,args:[{kind:"Variable",name:"clusters",variableName:"clusters"}],concreteType:"Cluster",kind:"LinkedField",name:"clusters",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"eventIds",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"driftRatio",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"primaryToCorpusRatio",storageKey:null},{condition:"fetchDataQualityMetric",kind:"Condition",passingValue:!0,selections:[{alias:null,args:[{fields:[{kind:"Variable",name:"columnName",variableName:"dataQualityMetricColumnName"},{kind:"Literal",name:"metric",value:"mean"}],kind:"ObjectValue",name:"metric"}],concreteType:"DatasetValues",kind:"LinkedField",name:"dataQualityMetric",plural:!1,selections:l,storageKey:null}]},{condition:"fetchPerformanceMetric",kind:"Condition",passingValue:!0,selections:[{alias:null,args:[{fields:[{kind:"Variable",name:"metric",variableName:"performanceMetric"}],kind:"ObjectValue",name:"metric"}],concreteType:"DatasetValues",kind:"LinkedField",name:"performanceMetric",plural:!1,selections:l,storageKey:null}]}],storageKey:null}];return{fragment:{argumentDefinitions:[n,a,t,i,r],kind:"Fragment",metadata:null,name:"pointCloudStore_clusterMetricsQuery",selections:o,type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,t,a,i,r],kind:"Operation",name:"pointCloudStore_clusterMetricsQuery",selections:o},params:{cacheID:"86666967012812887ac0a0149d2d2535",id:null,metadata:{},name:"pointCloudStore_clusterMetricsQuery",operationKind:"query",text:`query pointCloudStore_clusterMetricsQuery(
|
|
2
2
|
$clusters: [ClusterInput!]!
|
|
3
3
|
$fetchDataQualityMetric: Boolean!
|
|
4
4
|
$dataQualityMetricColumnName: String
|
|
@@ -4410,4 +4410,4 @@ resource: new Resource({
|
|
|
4410
4410
|
__typename
|
|
4411
4411
|
}
|
|
4412
4412
|
}
|
|
4413
|
-
`}}}();gr.hash="c7f4f68f0256356c77264cc16b83e638";function o7(n){const[a,t]=K.useMutation(gr),{projectId:i,isQuiet:r=!1}=n,l=Ma(),[o,c]=p.useState(null),d=Ka(),u=x1(),g=n.onExperimentDeleted,h=p.useCallback(y=>{a({variables:{input:{experimentIds:[y]}},onCompleted:()=>{d({title:"Experiment deleted",message:"The experiment has been deleted."})},onError:C=>{const k=hi(C);u({title:"An error occurred",message:`Failed to delete experiment: ${(k==null?void 0:k[0])??C.message}`})}}),g==null||g()},[a,d,u,g]),f=p.useCallback(y=>{c(s(He,{size:"S",title:"Delete Experiment",isDismissable:!0,onDismiss:()=>c(null),children:[e(w,{padding:"size-200",children:e(v,{color:"danger",children:"Are you sure you want to delete this experiment and its annotations and traces?"})}),e(w,{paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderTopColor:"light",borderTopWidth:"thin",children:e(S,{direction:"row",justifyContent:"end",children:e(E,{variant:"danger",onPress:()=>{h(y),c(null)},children:"Delete Experiment"})})})]}))},[h]),b=[e(U,{children:s(S,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(z,{svg:e(D0,{})}),e(v,{children:"View run traces"})]})},"GO_TO_EXPERIMENT_RUN_TRACES"),e(U,{children:s(S,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(z,{svg:e(Ya,{})}),e(v,{children:"View metadata"})]})},"VIEW_METADATA"),e(U,{children:s(S,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(z,{svg:e(ai,{})}),e(v,{children:"Copy experiment ID"})]})},"COPY_EXPERIMENT_ID")];return n.canDeleteExperiment&&b.push(e(U,{children:s(S,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(z,{svg:e(et,{})}),e(v,{children:t?"Deleting...":"Delete"})]})},"DELETE_EXPERIMENT")),s("div",{onClick:y=>{y.preventDefault(),y.stopPropagation()},children:[e(ro,{buttonSize:"compact",align:"end",isQuiet:r,disabledKeys:i?[]:["GO_TO_EXPERIMENT_RUN_TRACES"],onAction:y=>{switch(y){case"GO_TO_EXPERIMENT_RUN_TRACES":return l(`/projects/${i}`);case"VIEW_METADATA":{c(e(He,{title:"Metadata",onDismiss:()=>c(null),children:e(fi,{value:JSON.stringify(n.metadata,null,2)})}));break}case"COPY_EXPERIMENT_ID":{Jt(n.experimentId),d({title:"Copied",message:"The experiment ID has been copied to your clipboard"});break}case"DELETE_EXPERIMENT":{f(n.experimentId);break}default:P()}},children:b}),e(Fa,{type:"modal",isDismissable:!0,onDismiss:()=>{c(null)},children:o})]})}export{tt as $,H as A,x1 as B,J4 as C,B1 as D,ju as E,Ka as F,E9 as G,L9 as H,z as I,k9 as J,et as K,Pe as L,C2 as M,ii as N,Pu as O,a9 as P,zu as Q,hn as R,Ic as S,ke as T,V9 as U,pi as V,Fn as W,ze as X,hi as Y,Q as Z,w as _,On as a,
|
|
4413
|
+
`}}}();gr.hash="c7f4f68f0256356c77264cc16b83e638";function o7(n){const[a,t]=K.useMutation(gr),{projectId:i,isQuiet:r=!1}=n,l=Ma(),[o,c]=p.useState(null),d=Ka(),u=x1(),g=n.onExperimentDeleted,h=p.useCallback(y=>{a({variables:{input:{experimentIds:[y]}},onCompleted:()=>{d({title:"Experiment deleted",message:"The experiment has been deleted."})},onError:C=>{const k=hi(C);u({title:"An error occurred",message:`Failed to delete experiment: ${(k==null?void 0:k[0])??C.message}`})}}),g==null||g()},[a,d,u,g]),f=p.useCallback(y=>{c(s(He,{size:"S",title:"Delete Experiment",isDismissable:!0,onDismiss:()=>c(null),children:[e(w,{padding:"size-200",children:e(v,{color:"danger",children:"Are you sure you want to delete this experiment and its annotations and traces?"})}),e(w,{paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderTopColor:"light",borderTopWidth:"thin",children:e(S,{direction:"row",justifyContent:"end",children:e(E,{variant:"danger",onPress:()=>{h(y),c(null)},children:"Delete Experiment"})})})]}))},[h]),b=[e(U,{children:s(S,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(z,{svg:e(D0,{})}),e(v,{children:"View run traces"})]})},"GO_TO_EXPERIMENT_RUN_TRACES"),e(U,{children:s(S,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(z,{svg:e(Ya,{})}),e(v,{children:"View metadata"})]})},"VIEW_METADATA"),e(U,{children:s(S,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(z,{svg:e(ai,{})}),e(v,{children:"Copy experiment ID"})]})},"COPY_EXPERIMENT_ID")];return n.canDeleteExperiment&&b.push(e(U,{children:s(S,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(z,{svg:e(et,{})}),e(v,{children:t?"Deleting...":"Delete"})]})},"DELETE_EXPERIMENT")),s("div",{onClick:y=>{y.preventDefault(),y.stopPropagation()},children:[e(ro,{buttonSize:"compact",align:"end",isQuiet:r,disabledKeys:i?[]:["GO_TO_EXPERIMENT_RUN_TRACES"],onAction:y=>{switch(y){case"GO_TO_EXPERIMENT_RUN_TRACES":return l(`/projects/${i}`);case"VIEW_METADATA":{c(e(He,{title:"Metadata",onDismiss:()=>c(null),children:e(fi,{value:JSON.stringify(n.metadata,null,2)})}));break}case"COPY_EXPERIMENT_ID":{Jt(n.experimentId),d({title:"Copied",message:"The experiment ID has been copied to your clipboard"});break}case"DELETE_EXPERIMENT":{f(n.experimentId);break}default:P()}},children:b}),e(Fa,{type:"modal",isDismissable:!0,onDismiss:()=>{c(null)},children:o})]})}export{tt as $,H as A,x1 as B,J4 as C,B1 as D,ju as E,Ka as F,E9 as G,L9 as H,z as I,k9 as J,et as K,Pe as L,C2 as M,ii as N,Pu as O,a9 as P,zu as Q,hn as R,Ic as S,ke as T,V9 as U,pi as V,Fn as W,ze as X,hi as Y,Q as Z,w as _,On as a,Qe as a$,ti as a0,vi as a1,Eo as a2,$n as a3,$9 as a4,B9 as a5,G9 as a6,N9 as a7,Ja as a8,R9 as a9,b6 as aA,m6 as aB,j4 as aC,g6 as aD,h6 as aE,Ou as aF,Qu as aG,$u as aH,n9 as aI,Yu as aJ,Du as aK,d6 as aL,o9 as aM,c6 as aN,qu as aO,u6 as aP,e9 as aQ,f6 as aR,Xu as aS,p6 as aT,nt as aU,A9 as aV,y6 as aW,N4 as aX,it as aY,fn as aZ,me as a_,J2 as aa,Vt as ab,x9 as ac,X2 as ad,D9 as ae,wc as af,Q9 as ag,W9 as ah,o6 as ai,s6 as aj,It as ak,ld as al,mn as am,ki as an,od as ao,Li as ap,pn as aq,H4 as ar,Ga as as,yi as at,ue as au,C9 as av,_9 as aw,h9 as ax,_u as ay,y9 as az,U1 as b,T3 as b$,Zn as b0,R4 as b1,g9 as b2,X4 as b3,u9 as b4,d9 as b5,fi as b6,lu as b7,ru as b8,Su as b9,k6 as bA,i0 as bB,J as bC,qa as bD,ku as bE,v9 as bF,we as bG,Sc as bH,Cc as bI,M6 as bJ,Ad as bK,Te as bL,wd as bM,T0 as bN,ai as bO,Ee as bP,u3 as bQ,Lc as bR,q9 as bS,t6 as bT,di as bU,k2 as bV,F6 as bW,h3 as bX,E6 as bY,P6 as bZ,A3 as b_,c9 as ba,pu as bb,hu as bc,fu as bd,C6 as be,v6 as bf,uu as bg,Rn as bh,Nn as bi,vs as bj,O9 as bk,Kc as bl,Vc as bm,Hu as bn,Zu as bo,Q2 as bp,Ds as bq,Jo as br,vu as bs,hs as bt,_c as bu,r9 as bv,Ld as bw,Tc as bx,Ya as by,D0 as bz,Z1 as c,t9 as c$,Tu as c0,f3 as c1,I6 as c2,H9 as c3,_6 as c4,Gc as c5,V6 as c6,Nu as c7,Uu as c8,si as c9,P9 as cA,K9 as cB,Gu as cC,Xa as cD,ie as cE,zs as cF,N6 as cG,wu as cH,p9 as cI,m9 as cJ,S9 as cK,w9 as cL,Y4 as cM,ps as cN,du as cO,cu as cP,bn as cQ,yu as cR,B6 as cS,au as cT,nu as cU,Ms as cV,z9 as cW,F9 as cX,$6 as cY,H6 as cZ,L6 as c_,ci as ca,M9 as cb,I9 as cc,D6 as cd,O6 as ce,oi as cf,a0 as cg,xu as ch,Cd as ci,ee as cj,c0 as ck,E4 as cl,x6 as cm,T6 as cn,A6 as co,Rt as cp,Wu as cq,Gd as cr,z6 as cs,S6 as ct,xd as cu,Eu as cv,Fu as cw,R6 as cx,Ls as cy,w6 as cz,P4 as d,R3 as d$,Mn as d0,l6 as d1,Qa as d2,Vn as d3,To as d4,j6 as d5,Z6 as d6,U6 as d7,W6 as d8,G6 as d9,W4 as dA,G4 as dB,Q4 as dC,V4 as dD,Q6 as dE,Lu as dF,X6 as dG,e7 as dH,q6 as dI,kc as dJ,J9 as dK,i6 as dL,mi as dM,gi as dN,Au as dO,q4 as dP,l9 as dQ,Ru as dR,ce as dS,j5 as dT,Hc as dU,su as dV,Ju as dW,t7 as dX,i7 as dY,Ku as dZ,b9 as d_,So as da,wo as db,A as dc,S1 as dd,Bu as de,$3 as df,e6 as dg,n6 as dh,a6 as di,X9 as dj,Y9 as dk,t5 as dl,i5 as dm,O1 as dn,d5 as dp,nn as dq,Me as dr,lr as ds,va as dt,je as du,a7 as dv,Y6 as dw,Na as dx,J6 as dy,n7 as dz,ou as e,U9 as e0,Qd as e1,r7 as e2,K4 as e3,_4 as e4,k0 as e5,x0 as e6,r6 as e7,ya as e8,$e as e9,$4 as eA,D4 as eB,Yc as ea,K6 as eb,T9 as ec,f9 as ed,g0 as ee,i9 as ef,j9 as eg,Mc as eh,b0 as ei,$c as ej,Iu as ek,ui as el,l7 as em,o7 as en,Z9 as eo,Mt as ep,C0 as eq,w0 as er,U4 as es,Z4 as et,Mu as eu,B4 as ev,Vu as ew,L0 as ex,s9 as ey,O4 as ez,Os as f,An as g,bu as h,le as i,xn as j,es as k,Cs as l,P as m,eu as n,Ts as o,gu as p,mu as q,tu as r,Ao as s,iu as t,gs as u,Cu as v,S as w,v as x,E as y,rt as z};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{F as e,j as o,cA as f,ez as y,eA as v,eB as h,l as r,bW as x,eC as a,r as z,o as w,eD as P}from"./vendor-DOUbLVp5.js";import{K as k,M as S}from"./vendor-arizeai-DHqMQzfV.js";import{L,g as
|
|
1
|
+
import{F as e,j as o,cA as f,ez as y,eA as v,eB as h,l as r,bW as x,eC as a,r as z,o as w,eD as P}from"./vendor-DOUbLVp5.js";import{K as k,M as S}from"./vendor-arizeai-DHqMQzfV.js";import{L,g as j,r as C,h as R,i as I,F as E,j as A,P as D,k as T,M as s,l as F,D as O,n as G,E as M,o as N,p as q,q as B,s as V,t,v as W,w as _,x as K,y as $,z as U,B as H,C as J,G as Q,H as X,I as Y,J as Z,K as oo,N as ao,O as lo,Q as ro,U as co,V as d,W as m,X as p,Y as go,Z as eo,_ as bo,$ as no,a0 as io,a1 as so,a2 as to,a3 as mo,a4 as po,a5 as uo,a6 as fo,a7 as yo,a8 as vo,a9 as ho,aa as xo,ab as zo,ac as wo,ad as Po,ae as ko,af as So,ag as Lo,ah as jo,ai as Co,aj as Ro,ak as Io,al as Eo,am as Ao,an as Do,ao as To,ap as Fo,aq as Oo,ar as Go,as as Mo,at as No,au as qo,av as Bo,aw as Vo,ax as Wo,ay as _o}from"./pages-xeDsefDx.js";import{ez as Ko,cj as $o,R as Uo,eA as Ho,eB as Jo}from"./components-DVEsaeYg.js";import"./vendor-three-C5WAXd5r.js";import"./vendor-codemirror-DWdZV1Is.js";import"./vendor-shiki-CHu75YVL.js";import"./vendor-recharts-BfHdRd1Y.js";(function(){const b=document.createElement("link").relList;if(b&&b.supports&&b.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))i(c);new MutationObserver(c=>{for(const g of c)if(g.type==="childList")for(const n of g.addedNodes)n.tagName==="LINK"&&n.rel==="modulepreload"&&i(n)}).observe(document,{childList:!0,subtree:!0});function u(c){const g={};return c.integrity&&(g.integrity=c.integrity),c.referrerPolicy&&(g.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?g.credentials="include":c.crossOrigin==="anonymous"?g.credentials="omit":g.credentials="same-origin",g}function i(c){if(c.ep)return;c.ep=!0;const g=u(c);fetch(c.href,g)}})();const Qo=e`
|
|
2
2
|
:root {
|
|
3
3
|
--ac-global-dimension-scale-factor: 1;
|
|
4
4
|
--ac-global-dimension-size-0: 0px;
|
|
@@ -1185,4 +1185,4 @@ import{F as e,j as o,cA as f,ez as y,eA as v,eB as h,l as r,bW as x,eC as a,r as
|
|
|
1185
1185
|
.ac-theme--dark .react-resizable-handle {
|
|
1186
1186
|
filter: invert(1);
|
|
1187
1187
|
}
|
|
1188
|
-
`;function ea(){const{theme:l="dark"}=k();return o(f,{styles:e(Yo,Xo,l==="dark"?Zo:oa,aa(l),Qo,la,ra,ca,ga)})}const ba=y(v(r(a,{path:"/",errorElement:o(Bo,{}),children:[o(a,{path:"/v1/*",element:o(x,{to:"/",replace:!0})}),o(a,{path:"/login",element:o(L,{})}),o(a,{path:"/logout",element:o(
|
|
1188
|
+
`;function ea(){const{theme:l="dark"}=k();return o(f,{styles:e(Yo,Xo,l==="dark"?Zo:oa,aa(l),Qo,la,ra,ca,ga)})}const ba=y(v(r(a,{path:"/",errorElement:o(Bo,{}),children:[o(a,{path:"/v1/*",element:o(x,{to:"/",replace:!0})}),o(a,{path:"/login",element:o(L,{})}),o(a,{path:"/logout",element:o(j,{})}),o(a,{path:"/reset-password",element:o(R,{}),loader:C}),o(a,{path:"/reset-password-with-token",element:o(I,{})}),o(a,{path:"/forgot-password",element:o(E,{})}),o(a,{element:o(qo,{}),loader:A,children:r(a,{element:o(No,{}),children:[o(a,{path:"/profile",handle:{crumb:()=>"profile"},element:o(D,{})}),o(a,{index:!0,loader:T}),r(a,{path:"/model",handle:{crumb:()=>"model"},element:o(N,{}),children:[o(a,{index:!0,element:o(s,{})}),o(a,{element:o(s,{}),children:o(a,{path:"dimensions",children:o(a,{path:":dimensionId",element:o(O,{}),loader:F})})}),o(a,{path:"embeddings",children:o(a,{path:":embeddingDimensionId",element:o(M,{}),loader:G,handle:{crumb:l=>l.embedding.name}})})]}),r(a,{path:"/projects",handle:{crumb:()=>"projects"},element:o(X,{}),children:[o(a,{index:!0,element:o(q,{})}),r(a,{path:":projectId",loader:B,handle:{crumb:l=>l.project.name},element:o(Q,{}),children:[o(a,{index:!0,element:o(V,{})}),r(a,{element:o(J,{}),children:[o(a,{path:"traces",element:o(W,{}),children:o(a,{path:":traceId",element:o(t,{})})}),o(a,{path:"spans",element:o(_,{}),children:o(a,{path:":traceId",element:o(t,{})})}),o(a,{path:"sessions",element:o(U,{}),children:o(a,{path:":sessionId",element:o($,{}),loader:K})}),o(a,{path:"config",element:o(H,{})})]})]})]}),r(a,{path:"/dashboards",handle:{crumb:()=>"dashboards"},element:o(ro,{}),children:[o(a,{index:!0,element:o(Z,{}),loader:Y}),o(a,{path:"projects/:projectId",element:o(ao,{}),loader:oo,handle:{crumb:l=>l.project.name}}),o(a,{path:":dashboardId",handle:{crumb:()=>"dashboard"},element:o(lo,{})})]}),r(a,{path:"/datasets",handle:{crumb:()=>"datasets"},children:[o(a,{index:!0,element:o(co,{})}),r(a,{path:":datasetId",loader:d,handle:{crumb:l=>l.dataset.name},children:[r(a,{element:o(no,{}),loader:d,children:[o(a,{index:!0,element:o(p,{}),loader:m}),o(a,{path:"experiments",element:o(p,{}),loader:m}),o(a,{path:"examples",element:o(bo,{}),loader:go,children:o(a,{path:":exampleId",element:o(eo,{})})})]}),o(a,{path:"compare",handle:{crumb:()=>"compare"},loader:io,element:o(so,{})})]})]}),r(a,{path:"/playground",handle:{crumb:()=>"Playground"},children:[o(a,{index:!0,element:o(to,{})}),o(a,{path:"spans/:spanId",element:o(po,{}),loader:mo,handle:{crumb:l=>l.span.__typename==="Span"?`span ${l.span.spanId}`:"span unknown"}})]}),r(a,{path:"/prompts",handle:{crumb:()=>"prompts"},children:[o(a,{index:!0,element:o(fo,{}),loader:uo}),r(a,{path:":promptId",loader:yo,shouldRevalidate:()=>!0,handle:{crumb:l=>l.prompt.__typename==="Prompt"?l.prompt.name:"unknown"},children:[r(a,{element:o(So,{}),children:[o(a,{index:!0,element:o(vo,{})}),o(a,{path:"versions",loader:ho,element:o(wo,{}),children:o(a,{path:":versionId",loader:xo,element:o(zo,{})})}),o(a,{path:"config",element:o(ko,{}),loader:Po})]}),o(a,{path:"playground",element:o(jo,{}),loader:Lo,handle:{crumb:()=>"playground"}})]})]}),o(a,{path:"/apis",element:o(Co,{}),handle:{crumb:()=>"APIs"}}),o(a,{path:"/support",element:o(Ro,{}),handle:{crumb:()=>"support"}}),r(a,{path:"/settings",element:o(Mo,{}),handle:{crumb:()=>"settings"},children:[o(a,{path:"general",loader:Io,element:o(Eo,{}),handle:{crumb:()=>"general"}}),o(a,{path:"providers",loader:Ao,element:o(Do,{}),handle:{crumb:()=>"providers"}}),o(a,{path:"annotations",loader:To,element:o(Fo,{}),handle:{crumb:()=>"annotations"}}),o(a,{path:"data",element:o(Go,{}),handle:{crumb:()=>"data retention"},loader:Oo})]})]})})]})),{basename:window.Config.basename});function na(){return o(h,{router:ba})}function ia(){return o(Vo,{children:o(Ko,{children:o(sa,{})})})}function sa(){const{theme:l}=$o();return o(S,{theme:l,mountGlobalStyles:!1,children:r(w.RelayEnvironmentProvider,{environment:Uo,children:[o(ea,{}),o(Wo,{children:o(Ho,{children:o(_o,{children:o(z.Suspense,{children:o(Jo,{children:o(na,{})})})})})})]})})}const ta=document.getElementById("root"),da=P.createRoot(ta);da.render(o(ia,{}));
|