@parallelworks/tandem-web 0.157.1 → 0.159.0

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.
@@ -176,7 +176,9 @@ var e = {
176
176
  tokenNotUsed: "Never used",
177
177
  theme: "Theme",
178
178
  themeDescription: "How Tandem looks in this browser.",
179
- themeTandem: "Tandem (match device)"
179
+ themeTandem: "Tandem (match device)",
180
+ runnerIsolated: "Pods isolated",
181
+ runnerNotIsolated: "{count, plural, one {# isolation check failed} other {# isolation checks failed}}"
180
182
  },
181
183
  notificationSettings: {
182
184
  description: "Choose where Tandem tells you about work that needs you, and about what.",
@@ -2340,6 +2342,21 @@ var e = {
2340
2342
  parent: "Under",
2341
2343
  thisDoc: "This doc"
2342
2344
  },
2345
+ figma: {
2346
+ site: "Figma",
2347
+ reading: "Reading Figma…",
2348
+ file: "Figma file",
2349
+ edited: "Edited {when}",
2350
+ editedBy: "Edited {when} by {who}",
2351
+ connectToPreview: "Connect your Figma account to see a preview.",
2352
+ connect: "Connect Figma",
2353
+ noAccess: "You can't open this file in Figma",
2354
+ embedAddress: "Link to a Figma file or frame",
2355
+ embed: "Embed",
2356
+ embedTitle: "Figma frame",
2357
+ issueSection: "Design",
2358
+ changed: "Changed since the issue was updated"
2359
+ },
2343
2360
  linkCard: {
2344
2361
  address: "Address of the page",
2345
2362
  make: "Make card",
@@ -2499,6 +2516,11 @@ var e = {
2499
2516
  hint: "An equation in the line, in LaTeX",
2500
2517
  keywords: "math inline equation latex formula"
2501
2518
  },
2519
+ figma: {
2520
+ label: "Figma frame",
2521
+ hint: "A live Figma file or frame",
2522
+ keywords: "figma design frame prototype embed mockup"
2523
+ },
2502
2524
  linkCard: {
2503
2525
  label: "Link card",
2504
2526
  hint: "A link shown with its page's title, description and icon",
@@ -3851,6 +3873,25 @@ var e = {
3851
3873
  snoozed: "Snoozed",
3852
3874
  closed: "Closed"
3853
3875
  }
3876
+ },
3877
+ compute: {
3878
+ title: "Cluster compute",
3879
+ description: "Compute your organization's admins granted Tandem, such as a Kubernetes cluster. Turned on, agents run in isolated pods there, as the person who assigned them.",
3880
+ noneTitle: "No compute granted",
3881
+ noneDescription: "Your organization's admins haven't granted Tandem a cluster yet.",
3882
+ grant: "Grant compute",
3883
+ healthy: "Ready",
3884
+ unhealthy: "Not ready",
3885
+ useFor: "Run agents on {name}",
3886
+ teams: "Teams",
3887
+ teamsHelp: "Runs on these teams' issues go here.",
3888
+ allTeams: "All teams",
3889
+ labels: "Runner labels",
3890
+ labelsHelp: "Agents that need labels run here only when it has them all.",
3891
+ labelsPlaceholder: "gpu, large",
3892
+ save: "Save",
3893
+ use: "Run agents here",
3894
+ useHelp: "Agents in this workspace run in pods on this cluster."
3854
3895
  }
3855
3896
  };
3856
3897
  export { e as default };
@@ -176,7 +176,9 @@ var e = {
176
176
  tokenNotUsed: "Nunca usado",
177
177
  theme: "Tema",
178
178
  themeDescription: "Cómo se ve Tandem en este navegador.",
179
- themeTandem: "Tandem (igual que el dispositivo)"
179
+ themeTandem: "Tandem (igual que el dispositivo)",
180
+ runnerIsolated: "Pods aislados",
181
+ runnerNotIsolated: "{count, plural, one {# comprobación de aislamiento falló} other {# comprobaciones de aislamiento fallaron}}"
180
182
  },
181
183
  notificationSettings: {
182
184
  description: "Elige dónde te avisa Tandem del trabajo que te necesita, y de qué.",
@@ -2340,6 +2342,21 @@ var e = {
2340
2342
  parent: "Dentro de",
2341
2343
  thisDoc: "Este documento"
2342
2344
  },
2345
+ figma: {
2346
+ site: "Figma",
2347
+ reading: "Leyendo Figma…",
2348
+ file: "Archivo de Figma",
2349
+ edited: "Editado {when}",
2350
+ editedBy: "Editado {when} por {who}",
2351
+ connectToPreview: "Conecta tu cuenta de Figma para ver una vista previa.",
2352
+ connect: "Conectar Figma",
2353
+ noAccess: "No puedes abrir este archivo en Figma",
2354
+ embedAddress: "Enlace a un archivo o marco de Figma",
2355
+ embed: "Insertar",
2356
+ embedTitle: "Marco de Figma",
2357
+ issueSection: "Diseño",
2358
+ changed: "Cambió desde que se actualizó la incidencia"
2359
+ },
2343
2360
  linkCard: {
2344
2361
  address: "Dirección de la página",
2345
2362
  make: "Crear tarjeta",
@@ -2499,6 +2516,11 @@ var e = {
2499
2516
  hint: "Una ecuación dentro del texto, en LaTeX",
2500
2517
  keywords: "matemáticas ecuación en línea latex math"
2501
2518
  },
2519
+ figma: {
2520
+ label: "Marco de Figma",
2521
+ hint: "Un archivo o marco de Figma en vivo",
2522
+ keywords: "figma diseño marco prototipo insertar maqueta design frame"
2523
+ },
2502
2524
  linkCard: {
2503
2525
  label: "Tarjeta de enlace",
2504
2526
  hint: "Un enlace con el título, la descripción y el icono de su página",
@@ -3851,6 +3873,25 @@ var e = {
3851
3873
  snoozed: "Pospuesta",
3852
3874
  closed: "Cerrada"
3853
3875
  }
3876
+ },
3877
+ compute: {
3878
+ title: "Cómputo del clúster",
3879
+ description: "Cómputo que los administradores de tu organización concedieron a Tandem, como un clúster de Kubernetes. Activado, los agentes se ejecutan allí en pods aislados, como la persona que los asignó.",
3880
+ noneTitle: "No hay cómputo concedido",
3881
+ noneDescription: "Los administradores de tu organización aún no han concedido un clúster a Tandem.",
3882
+ grant: "Conceder cómputo",
3883
+ healthy: "Listo",
3884
+ unhealthy: "No está listo",
3885
+ useFor: "Ejecutar agentes en {name}",
3886
+ teams: "Equipos",
3887
+ teamsHelp: "Las ejecuciones en incidencias de estos equipos van aquí.",
3888
+ allTeams: "Todos los equipos",
3889
+ labels: "Etiquetas de ejecutor",
3890
+ labelsHelp: "Los agentes que necesitan etiquetas se ejecutan aquí solo si las tiene todas.",
3891
+ labelsPlaceholder: "gpu, grande",
3892
+ save: "Guardar",
3893
+ use: "Ejecutar agentes aquí",
3894
+ useHelp: "Los agentes de este espacio de trabajo se ejecutan en pods de este clúster."
3854
3895
  }
3855
3896
  };
3856
3897
  export { e as default };
@@ -176,7 +176,9 @@ var e = {
176
176
  tokenNotUsed: "未使用",
177
177
  theme: "テーマ",
178
178
  themeDescription: "このブラウザーでの Tandem の表示です。",
179
- themeTandem: "Tandem (デバイスに合わせる)"
179
+ themeTandem: "Tandem (デバイスに合わせる)",
180
+ runnerIsolated: "ポッドは分離されています",
181
+ runnerNotIsolated: "{count} 件の分離チェックが失敗しました"
180
182
  },
181
183
  notificationSettings: {
182
184
  description: "対応が必要な作業について、Tandem がどこに、何を通知するかを選択します。",
@@ -2340,6 +2342,21 @@ var e = {
2340
2342
  parent: "親",
2341
2343
  thisDoc: "このドキュメント"
2342
2344
  },
2345
+ figma: {
2346
+ site: "Figma",
2347
+ reading: "Figma を読み込み中…",
2348
+ file: "Figma ファイル",
2349
+ edited: "{when}に編集",
2350
+ editedBy: "{when}に {who} が編集",
2351
+ connectToPreview: "プレビューを表示するには Figma アカウントを接続してください。",
2352
+ connect: "Figma を接続",
2353
+ noAccess: "このファイルは Figma で開けません",
2354
+ embedAddress: "Figma のファイルまたはフレームへのリンク",
2355
+ embed: "埋め込む",
2356
+ embedTitle: "Figma フレーム",
2357
+ issueSection: "デザイン",
2358
+ changed: "課題の更新後に変更あり"
2359
+ },
2343
2360
  linkCard: {
2344
2361
  address: "ページのアドレス",
2345
2362
  make: "カードを作成",
@@ -2499,6 +2516,11 @@ var e = {
2499
2516
  hint: "行内の数式(LaTeX)",
2500
2517
  keywords: "数式 インライン latex math"
2501
2518
  },
2519
+ figma: {
2520
+ label: "Figma フレーム",
2521
+ hint: "ライブの Figma ファイルまたはフレーム",
2522
+ keywords: "figma デザイン フレーム プロトタイプ 埋め込み design frame"
2523
+ },
2502
2524
  linkCard: {
2503
2525
  label: "リンクカード",
2504
2526
  hint: "ページのタイトル、説明、アイコン付きのリンク",
@@ -3851,6 +3873,25 @@ var e = {
3851
3873
  snoozed: "スヌーズ中",
3852
3874
  closed: "クローズ"
3853
3875
  }
3876
+ },
3877
+ compute: {
3878
+ title: "クラスターのコンピュート",
3879
+ description: "組織の管理者が Tandem に許可したコンピュート(Kubernetes クラスターなど)。オンにすると、エージェントは割り当てた人として、そこにある分離されたポッドで実行されます。",
3880
+ noneTitle: "許可されたコンピュートはありません",
3881
+ noneDescription: "組織の管理者はまだ Tandem にクラスターを許可していません。",
3882
+ grant: "コンピュートを許可",
3883
+ healthy: "準備完了",
3884
+ unhealthy: "準備ができていません",
3885
+ useFor: "{name} でエージェントを実行",
3886
+ teams: "チーム",
3887
+ teamsHelp: "これらのチームの課題の実行はここで行われます。",
3888
+ allTeams: "すべてのチーム",
3889
+ labels: "ランナーのラベル",
3890
+ labelsHelp: "ラベルが必要なエージェントは、すべてのラベルがある場合にのみここで実行されます。",
3891
+ labelsPlaceholder: "gpu, large",
3892
+ save: "保存",
3893
+ use: "ここでエージェントを実行",
3894
+ useHelp: "このワークスペースのエージェントは、このクラスターのポッドで実行されます。"
3854
3895
  }
3855
3896
  };
3856
3897
  export { e as default };
@@ -176,7 +176,9 @@ var e = {
176
176
  tokenNotUsed: "사용한 적 없음",
177
177
  theme: "테마",
178
178
  themeDescription: "이 브라우저에서 Tandem이 보이는 방식입니다.",
179
- themeTandem: "Tandem (기기 설정 따르기)"
179
+ themeTandem: "Tandem (기기 설정 따르기)",
180
+ runnerIsolated: "파드 격리됨",
181
+ runnerNotIsolated: "격리 검사 {count}개 실패"
180
182
  },
181
183
  notificationSettings: {
182
184
  description: "회원님이 필요한 작업을 Tandem이 어디로, 어떤 내용으로 알릴지 선택하세요.",
@@ -2340,6 +2342,21 @@ var e = {
2340
2342
  parent: "상위",
2341
2343
  thisDoc: "이 문서"
2342
2344
  },
2345
+ figma: {
2346
+ site: "Figma",
2347
+ reading: "Figma 읽는 중…",
2348
+ file: "Figma 파일",
2349
+ edited: "{when} 편집됨",
2350
+ editedBy: "{when} {who}님이 편집함",
2351
+ connectToPreview: "미리보기를 보려면 Figma 계정을 연결하세요.",
2352
+ connect: "Figma 연결",
2353
+ noAccess: "Figma에서 이 파일을 열 수 없습니다",
2354
+ embedAddress: "Figma 파일 또는 프레임 링크",
2355
+ embed: "삽입",
2356
+ embedTitle: "Figma 프레임",
2357
+ issueSection: "디자인",
2358
+ changed: "이슈가 업데이트된 후 변경됨"
2359
+ },
2343
2360
  linkCard: {
2344
2361
  address: "페이지 주소",
2345
2362
  make: "카드 만들기",
@@ -2499,6 +2516,11 @@ var e = {
2499
2516
  hint: "줄 안의 수식(LaTeX)",
2500
2517
  keywords: "수식 인라인 latex math"
2501
2518
  },
2519
+ figma: {
2520
+ label: "Figma 프레임",
2521
+ hint: "실시간 Figma 파일 또는 프레임",
2522
+ keywords: "figma 디자인 프레임 프로토타입 삽입 design frame"
2523
+ },
2502
2524
  linkCard: {
2503
2525
  label: "링크 카드",
2504
2526
  hint: "페이지 제목, 설명, 아이콘이 있는 링크",
@@ -3851,6 +3873,25 @@ var e = {
3851
3873
  snoozed: "다시 알림",
3852
3874
  closed: "종료됨"
3853
3875
  }
3876
+ },
3877
+ compute: {
3878
+ title: "클러스터 컴퓨트",
3879
+ description: "조직 관리자가 Tandem에 허용한 컴퓨트(예: Kubernetes 클러스터)입니다. 켜면 에이전트가 할당한 사람으로서 그곳의 격리된 파드에서 실행됩니다.",
3880
+ noneTitle: "허용된 컴퓨트 없음",
3881
+ noneDescription: "조직 관리자가 아직 Tandem에 클러스터를 허용하지 않았습니다.",
3882
+ grant: "컴퓨트 허용",
3883
+ healthy: "준비됨",
3884
+ unhealthy: "준비 안 됨",
3885
+ useFor: "{name}에서 에이전트 실행",
3886
+ teams: "팀",
3887
+ teamsHelp: "이 팀 이슈의 실행이 여기로 옵니다.",
3888
+ allTeams: "모든 팀",
3889
+ labels: "러너 레이블",
3890
+ labelsHelp: "레이블이 필요한 에이전트는 모든 레이블이 있을 때만 여기서 실행됩니다.",
3891
+ labelsPlaceholder: "gpu, large",
3892
+ save: "저장",
3893
+ use: "여기서 에이전트 실행",
3894
+ useHelp: "이 워크스페이스의 에이전트가 이 클러스터의 파드에서 실행됩니다."
3854
3895
  }
3855
3896
  };
3856
3897
  export { e as default };
@@ -176,7 +176,9 @@ var e = {
176
176
  tokenNotUsed: "从未使用",
177
177
  theme: "主题",
178
178
  themeDescription: "Tandem 在此浏览器中的外观。",
179
- themeTandem: "Tandem(跟随设备)"
179
+ themeTandem: "Tandem(跟随设备)",
180
+ runnerIsolated: "Pod 已隔离",
181
+ runnerNotIsolated: "{count} 项隔离检查未通过"
180
182
  },
181
183
  notificationSettings: {
182
184
  description: "选择 Tandem 在哪里、就哪些事项通知您需要您处理的工作。",
@@ -2340,6 +2342,21 @@ var e = {
2340
2342
  parent: "上级",
2341
2343
  thisDoc: "此文档"
2342
2344
  },
2345
+ figma: {
2346
+ site: "Figma",
2347
+ reading: "正在读取 Figma…",
2348
+ file: "Figma 文件",
2349
+ edited: "{when}编辑",
2350
+ editedBy: "{who} 于{when}编辑",
2351
+ connectToPreview: "连接你的 Figma 账号以查看预览。",
2352
+ connect: "连接 Figma",
2353
+ noAccess: "你无法在 Figma 中打开此文件",
2354
+ embedAddress: "Figma 文件或画框的链接",
2355
+ embed: "嵌入",
2356
+ embedTitle: "Figma 画框",
2357
+ issueSection: "设计",
2358
+ changed: "问题更新后有改动"
2359
+ },
2343
2360
  linkCard: {
2344
2361
  address: "页面地址",
2345
2362
  make: "创建卡片",
@@ -2499,6 +2516,11 @@ var e = {
2499
2516
  hint: "行内的公式(LaTeX)",
2500
2517
  keywords: "公式 行内 数学 latex math"
2501
2518
  },
2519
+ figma: {
2520
+ label: "Figma 画框",
2521
+ hint: "实时的 Figma 文件或画框",
2522
+ keywords: "figma 设计 画框 原型 嵌入 design frame"
2523
+ },
2502
2524
  linkCard: {
2503
2525
  label: "链接卡片",
2504
2526
  hint: "显示页面标题、描述和图标的链接",
@@ -3851,6 +3873,25 @@ var e = {
3851
3873
  snoozed: "已延后",
3852
3874
  closed: "已关闭"
3853
3875
  }
3876
+ },
3877
+ compute: {
3878
+ title: "集群计算",
3879
+ description: "组织管理员授予 Tandem 的计算资源,例如 Kubernetes 集群。开启后,智能体会以指派它们的人的身份在其中的隔离 Pod 里运行。",
3880
+ noneTitle: "尚未授予计算资源",
3881
+ noneDescription: "你的组织管理员还没有向 Tandem 授予集群。",
3882
+ grant: "授予计算资源",
3883
+ healthy: "就绪",
3884
+ unhealthy: "未就绪",
3885
+ useFor: "在 {name} 上运行智能体",
3886
+ teams: "团队",
3887
+ teamsHelp: "这些团队事项的运行会在这里进行。",
3888
+ allTeams: "所有团队",
3889
+ labels: "运行器标签",
3890
+ labelsHelp: "需要标签的智能体仅在这里具备全部标签时运行。",
3891
+ labelsPlaceholder: "gpu, large",
3892
+ save: "保存",
3893
+ use: "在此运行智能体",
3894
+ useHelp: "此工作区的智能体会在该集群的 Pod 中运行。"
3854
3895
  }
3855
3896
  };
3856
3897
  export { e as default };
package/api/queries.js CHANGED
@@ -1415,5 +1415,43 @@ var Ke = (e) => i({
1415
1415
  params: h(e, r),
1416
1416
  signal: i
1417
1417
  }))
1418
+ }), mt = (e, r) => i({
1419
+ queryKey: [
1420
+ "workspace",
1421
+ e,
1422
+ "issues",
1423
+ r.toUpperCase(),
1424
+ "figma"
1425
+ ],
1426
+ queryFn: async ({ signal: i }) => n(await t.GET("/api/v1/workspaces/{workspace}/issues/{identifier}/figma", {
1427
+ params: h(e, r),
1428
+ signal: i
1429
+ }))
1430
+ }), ht = (e, r) => i({
1431
+ queryKey: [
1432
+ "workspace",
1433
+ e,
1434
+ "figma",
1435
+ r
1436
+ ],
1437
+ queryFn: async ({ signal: i }) => n(await t.GET("/api/v1/workspaces/{workspace}/figma/preview", {
1438
+ params: {
1439
+ path: { workspace: e },
1440
+ query: { url: r }
1441
+ },
1442
+ signal: i
1443
+ })),
1444
+ staleTime: 12e4
1445
+ }), gt = (e) => i({
1446
+ queryKey: [
1447
+ "workspace",
1448
+ e,
1449
+ "compute-targets"
1450
+ ],
1451
+ queryFn: async ({ signal: r }) => n(await t.GET("/api/v1/workspaces/{workspace}/compute-targets", {
1452
+ params: s(e),
1453
+ signal: r
1454
+ })),
1455
+ retry: !1
1418
1456
  });
1419
- export { U as agentQuery, H as agentsQuery, Ve as allDecisionsQuery, De as areaThreadQuery, Oe as areasQuery, b as attachmentsQuery, ot as auditLogQuery, $ as availableRepositoriesQuery, it as branchesQuery, et as codeHostAccountsQuery, $e as codeHostQuery, y as commentsQuery, Ee as countsQuery, V as customerRequestsQuery, B as customersQuery, ct as cycleReportQuery, Xe as cyclesQuery, I as dashboardQuery, F as dashboardsQuery, Pe as docBacklinksQuery, me as docCommentsQuery, ae as docDecisionsQuery, ve as docGraphQuery, Me as docIssuesQuery, _e as docQuery, pe as docTemplatesQuery, ge as docVersionQuery, he as docVersionsQuery, fe as docsQuery, x as eventsQuery, se as favoritesQuery, Ge as followQuery, He as githubAccountQuery, We as githubSettingsQuery, A as gitlabQuery, R as groupsQuery, oe as inboxQuery, ft as intercomQuery, ie as issueDecisionsQuery, Ne as issueDocsQuery, pt as issueIntercomQuery, Qe as issueLinksQuery, g as issueQuery, m as issueSearchQuery, dt as issueSentryQuery, d as issueTemplatesQuery, rt as issueZendeskQuery, p as issuesQuery, j as jiraImportQuery, Ie as knowledgeEntryQuery, Re as knowledgeEventsQuery, Ae as knowledgeGraphQuery, Le as knowledgeMentionsQuery, Fe as knowledgeQuery, ne as labelsQuery, M as linearImportQuery, Se as lostSectionsQuery, a as meQuery, we as measuresQuery, u as membersQuery, Be as myAllDecisionsQuery, ze as myDecisionsQuery, z as myModelsQuery, ue as notificationSettingsQuery, le as notificationsQuery, Te as pageLinkQuery, L as panelQuery, q as parallelWorksBucketsQuery, K as parallelWorksQuery, w as peopleQuery, O as permissionsQuery, at as personActivityQuery, re as personCardQuery, k as projectAccessQuery, Je as projectEventsQuery, Q as projectOf, Ye as projectQuery, qe as projectUpdatesQuery, Ke as projectsQuery, o as providersQuery, nt as pullRequestsQuery, de as pushSettingsQuery, v as reactionsQuery, Ze as relatedIssuesQuery, tt as repositoriesQuery, D as rolesQuery, Y as runActivityQuery, Ce as runReadsQuery, J as runnersQuery, X as runsQuery, ut as sentryProjectsQuery, lt as sentryQuery, G as sessionsQuery, ye as shareLinksQuery, xe as sharedDocQuery, be as sharedQuery, N as slackQuery, Ue as ssoQuery, st as statusHistoryQuery, te as statusesQuery, _ as subscriptionQuery, E as teamAccessQuery, S as teamMembersQuery, C as teamRotationQuery, ee as teamsQuery, W as tokensQuery, ke as unfiledQuery, ce as viewsQuery, l as webhooksQuery, T as workspaceAccessQuery, je as workspaceGraphQuery, c as workspaceQuery, P as zendeskQuery };
1457
+ export { U as agentQuery, H as agentsQuery, Ve as allDecisionsQuery, De as areaThreadQuery, Oe as areasQuery, b as attachmentsQuery, ot as auditLogQuery, $ as availableRepositoriesQuery, it as branchesQuery, et as codeHostAccountsQuery, $e as codeHostQuery, y as commentsQuery, gt as computeTargetsQuery, Ee as countsQuery, V as customerRequestsQuery, B as customersQuery, ct as cycleReportQuery, Xe as cyclesQuery, I as dashboardQuery, F as dashboardsQuery, Pe as docBacklinksQuery, me as docCommentsQuery, ae as docDecisionsQuery, ve as docGraphQuery, Me as docIssuesQuery, _e as docQuery, pe as docTemplatesQuery, ge as docVersionQuery, he as docVersionsQuery, fe as docsQuery, x as eventsQuery, se as favoritesQuery, ht as figmaPreviewQuery, Ge as followQuery, He as githubAccountQuery, We as githubSettingsQuery, A as gitlabQuery, R as groupsQuery, oe as inboxQuery, ft as intercomQuery, ie as issueDecisionsQuery, Ne as issueDocsQuery, mt as issueFigmaQuery, pt as issueIntercomQuery, Qe as issueLinksQuery, g as issueQuery, m as issueSearchQuery, dt as issueSentryQuery, d as issueTemplatesQuery, rt as issueZendeskQuery, p as issuesQuery, j as jiraImportQuery, Ie as knowledgeEntryQuery, Re as knowledgeEventsQuery, Ae as knowledgeGraphQuery, Le as knowledgeMentionsQuery, Fe as knowledgeQuery, ne as labelsQuery, M as linearImportQuery, Se as lostSectionsQuery, a as meQuery, we as measuresQuery, u as membersQuery, Be as myAllDecisionsQuery, ze as myDecisionsQuery, z as myModelsQuery, ue as notificationSettingsQuery, le as notificationsQuery, Te as pageLinkQuery, L as panelQuery, q as parallelWorksBucketsQuery, K as parallelWorksQuery, w as peopleQuery, O as permissionsQuery, at as personActivityQuery, re as personCardQuery, k as projectAccessQuery, Je as projectEventsQuery, Q as projectOf, Ye as projectQuery, qe as projectUpdatesQuery, Ke as projectsQuery, o as providersQuery, nt as pullRequestsQuery, de as pushSettingsQuery, v as reactionsQuery, Ze as relatedIssuesQuery, tt as repositoriesQuery, D as rolesQuery, Y as runActivityQuery, Ce as runReadsQuery, J as runnersQuery, X as runsQuery, ut as sentryProjectsQuery, lt as sentryQuery, G as sessionsQuery, ye as shareLinksQuery, xe as sharedDocQuery, be as sharedQuery, N as slackQuery, Ue as ssoQuery, st as statusHistoryQuery, te as statusesQuery, _ as subscriptionQuery, E as teamAccessQuery, S as teamMembersQuery, C as teamRotationQuery, ee as teamsQuery, W as tokensQuery, ke as unfiledQuery, ce as viewsQuery, l as webhooksQuery, T as workspaceAccessQuery, je as workspaceGraphQuery, c as workspaceQuery, P as zendeskQuery };
@@ -0,0 +1,117 @@
1
+ import { api as e, unwrap as t } from "../api/client.js";
2
+ import { computeTargetsQuery as n, teamsQuery as r } from "../api/queries.js";
3
+ import { WorkerIcon as i } from "./icons.js";
4
+ import { Button as a, Combobox as o, EmptyState as s, ErrorText as c, Input as l, SettingRow as u, SettingsCard as d, StatusDot as f, Switch as p } from "@parallelworks/ui";
5
+ import { useState as m } from "react";
6
+ import { useErrorMessage as h } from "@parallelworks/problem/react";
7
+ import { useTranslations as g } from "use-intl";
8
+ import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
9
+ import { useMutation as b, useQuery as x, useQueryClient as S } from "@tanstack/react-query";
10
+ // src/components/ComputeTargets.tsx
11
+ function C({ workspace: e }) {
12
+ let t = g("compute"), { data: r } = x(n(e));
13
+ return r?.available ? /* @__PURE__ */ y("section", {
14
+ "aria-labelledby": "compute-title",
15
+ className: "space-y-3 px-4 pt-8",
16
+ children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("h2", {
17
+ id: "compute-title",
18
+ className: "text-base font-semibold",
19
+ children: t("title")
20
+ }), /* @__PURE__ */ v("p", {
21
+ className: "mt-1 text-sm text-muted-foreground text-pretty",
22
+ children: t("description")
23
+ })] }), r.targets.length === 0 ? /* @__PURE__ */ v(s, {
24
+ icon: /* @__PURE__ */ v(i, {}),
25
+ title: t("noneTitle"),
26
+ description: t("noneDescription"),
27
+ action: r.grantUrl && /* @__PURE__ */ v(a, {
28
+ render: /* @__PURE__ */ v("a", { href: r.grantUrl }),
29
+ nativeButton: !1,
30
+ children: t("grant")
31
+ })
32
+ }) : r.targets.map((t) => /* @__PURE__ */ v(w, {
33
+ workspace: e,
34
+ target: t
35
+ }, t.id))]
36
+ }) : null;
37
+ }
38
+ function w({ workspace: i, target: s }) {
39
+ let C = g("compute"), w = h(), T = S(), { data: E = [] } = x(r(i)), [D, O] = m(s.labels.join(", ")), k = b({
40
+ mutationFn: async (n) => t(await e.PUT("/api/v1/workspaces/{workspace}/compute-targets/{target}", {
41
+ params: { path: {
42
+ workspace: i,
43
+ target: s.id
44
+ } },
45
+ body: n
46
+ })),
47
+ onSettled: () => T.invalidateQueries({ queryKey: n(i).queryKey })
48
+ }), A = {
49
+ on: s.on,
50
+ labels: s.labels,
51
+ teamIds: s.teamIds
52
+ }, j = D.split(",").map((e) => e.trim()).filter(Boolean);
53
+ return /* @__PURE__ */ y(d, {
54
+ title: s.name,
55
+ description: /* @__PURE__ */ y("span", {
56
+ className: "flex items-center gap-1.5",
57
+ children: [/* @__PURE__ */ v(f, { variant: s.healthy ? "success" : "warning" }), s.healthy ? C("healthy") : s.problem ?? C("unhealthy")]
58
+ }),
59
+ error: k.error && /* @__PURE__ */ v(c, { children: w(k.error) }),
60
+ children: [/* @__PURE__ */ v(u, {
61
+ label: C("use"),
62
+ helpText: C("useHelp"),
63
+ children: /* @__PURE__ */ v(p, {
64
+ "aria-label": C("useFor", { name: s.name }),
65
+ checked: s.on,
66
+ disabled: k.isPending,
67
+ onCheckedChange: (e) => k.mutate({
68
+ ...A,
69
+ on: e
70
+ })
71
+ })
72
+ }), s.on && /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(u, {
73
+ label: C("teams"),
74
+ helpText: C("teamsHelp"),
75
+ children: /* @__PURE__ */ v(o, {
76
+ multiple: !0,
77
+ items: E.map((e) => ({
78
+ value: e.id,
79
+ label: e.name
80
+ })),
81
+ value: s.teamIds,
82
+ onValueChange: (e) => k.mutate({
83
+ ...A,
84
+ teamIds: e
85
+ }),
86
+ align: "end",
87
+ placeholder: C("allTeams"),
88
+ "aria-label": C("teams")
89
+ })
90
+ }), /* @__PURE__ */ v(u, {
91
+ label: C("labels"),
92
+ helpText: C("labelsHelp"),
93
+ children: /* @__PURE__ */ y("form", {
94
+ className: "flex gap-2",
95
+ onSubmit: (e) => {
96
+ e.preventDefault(), k.mutate({
97
+ ...A,
98
+ labels: j
99
+ });
100
+ },
101
+ children: [/* @__PURE__ */ v(l, {
102
+ value: D,
103
+ onChange: (e) => O(e.target.value),
104
+ placeholder: C("labelsPlaceholder"),
105
+ "aria-label": C("labels"),
106
+ className: "w-48"
107
+ }), /* @__PURE__ */ v(a, {
108
+ type: "submit",
109
+ disabled: j.join(",") === s.labels.join(","),
110
+ loading: k.isPending,
111
+ children: C("save")
112
+ })]
113
+ })
114
+ })] })]
115
+ });
116
+ }
117
+ export { C as ComputeTargets };