@sixb/app 0.2.5 → 0.2.7
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.
- package/dist/agent/components/agent-threads.d.ts.map +1 -1
- package/dist/agent/components/composer-place.d.ts.map +1 -1
- package/dist/agent/components/computer-place.d.ts +24 -6
- package/dist/agent/components/computer-place.d.ts.map +1 -1
- package/dist/agent/components/conversation-panel.d.ts.map +1 -1
- package/dist/agent/components/message-view.d.ts +13 -3
- package/dist/agent/components/message-view.d.ts.map +1 -1
- package/dist/agent/components/pending-messages.d.ts.map +1 -1
- package/dist/agent/components/sandbox-recovery.d.ts +8 -2
- package/dist/agent/components/sandbox-recovery.d.ts.map +1 -1
- package/dist/agent/components/transcript.d.ts +13 -0
- package/dist/agent/components/transcript.d.ts.map +1 -1
- package/dist/agent/conversation.d.ts +4 -0
- package/dist/agent/conversation.d.ts.map +1 -1
- package/dist/agent/delegation/use-children.d.ts +5 -5
- package/dist/agent/delegation/use-children.d.ts.map +1 -1
- package/dist/agent/format.d.ts +7 -0
- package/dist/agent/format.d.ts.map +1 -1
- package/dist/agent/hooks/thread-queries.d.ts +1548 -0
- package/dist/agent/hooks/thread-queries.d.ts.map +1 -0
- package/dist/agent/hooks/use-agent-conversation.d.ts +41 -2
- package/dist/agent/hooks/use-agent-conversation.d.ts.map +1 -1
- package/dist/agent/hooks/use-thread-lists.d.ts +80 -3
- package/dist/agent/hooks/use-thread-lists.d.ts.map +1 -1
- package/dist/agent/hooks/use-thread-place.d.ts +49 -0
- package/dist/agent/hooks/use-thread-place.d.ts.map +1 -0
- package/dist/agent/i18n/en.d.ts +44 -6
- package/dist/agent/i18n/en.d.ts.map +1 -1
- package/dist/agent/i18n/fr.d.ts.map +1 -1
- package/dist/agent/i18n/index.d.ts +76 -12
- package/dist/agent/i18n/index.d.ts.map +1 -1
- package/dist/agent/live-run.d.ts.map +1 -1
- package/dist/agent/model-selection.d.ts +3 -2
- package/dist/agent/model-selection.d.ts.map +1 -1
- package/dist/agent/moves.d.ts +40 -0
- package/dist/agent/moves.d.ts.map +1 -0
- package/dist/agent/thread-reader-state.d.ts +30 -0
- package/dist/agent/thread-reader-state.d.ts.map +1 -0
- package/dist/agent/types.d.ts +4 -0
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/artifacts/live/session.d.ts.map +1 -1
- package/dist/artifacts/queries.d.ts.map +1 -1
- package/dist/artifacts/renderers/live-frame.d.ts.map +1 -1
- package/dist/{chunk-69qgh20f.js → chunk-1f4h75n3.js} +1 -1
- package/dist/{chunk-4fex83k2.js → chunk-7v9622qb.js} +2254 -739
- package/dist/{chunk-4fex83k2.js.map → chunk-7v9622qb.js.map} +29 -26
- package/dist/{chunk-5sgac68y.js → chunk-dntecmwb.js} +1 -1
- package/dist/{chunk-4wm09prf.js → chunk-qmka6aea.js} +1 -1
- package/dist/createCustomApp.d.ts +8 -1
- package/dist/createCustomApp.d.ts.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +3 -3
- package/dist/pages/console/data/accounts.d.ts +94 -0
- package/dist/pages/console/data/accounts.d.ts.map +1 -0
- package/dist/pages/console/data/connectors.d.ts.map +1 -1
- package/dist/pages/console/data/datasets.d.ts.map +1 -1
- package/dist/pages/console/data/live-updates.d.ts.map +1 -1
- package/dist/pages/console/data/messages.d.ts +46 -0
- package/dist/pages/console/data/messages.d.ts.map +1 -1
- package/dist/pages/console/data/pipelines.d.ts.map +1 -1
- package/dist/pages/console/data/projections.d.ts.map +1 -1
- package/dist/pages/console/data/sync-button.d.ts.map +1 -1
- package/dist/pages/console/data/syncs.d.ts.map +1 -1
- package/dist/pages/console/ontology/actions.d.ts.map +1 -1
- package/dist/pages/console/ontology/object-type.d.ts.map +1 -1
- package/dist/pages/console/ontology/object-types.d.ts.map +1 -1
- package/dist/pages/console/ontology/rules.d.ts.map +1 -1
- package/dist/pages/console/ontology/workflow.d.ts.map +1 -1
- package/dist/pages/console/ontology/workflows.d.ts.map +1 -1
- package/dist/pages/folders.d.ts +106 -0
- package/dist/pages/folders.d.ts.map +1 -0
- package/dist/pages/settings/usage/breakdown.d.ts.map +1 -1
- package/dist/pages/settings/usage/page.d.ts +4 -1
- package/dist/pages/settings/usage/page.d.ts.map +1 -1
- package/dist/pages/settings/usage/spend-model.d.ts +43 -19
- package/dist/pages/settings/usage/spend-model.d.ts.map +1 -1
- package/dist/pages.js +23453 -22656
- package/dist/pages.js.map +23 -21
- package/dist/server.d.ts +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +40 -3
- package/dist/server.js.map +3 -3
- package/package.json +3 -3
- package/src/agent/agent-chat.tsx +2 -2
- package/src/agent/components/agent-threads.tsx +42 -2
- package/src/agent/components/composer-place.tsx +2 -7
- package/src/agent/components/computer-place.tsx +415 -70
- package/src/agent/components/conversation-panel.tsx +31 -26
- package/src/agent/components/message-view.tsx +418 -9
- package/src/agent/components/pending-messages.tsx +5 -1
- package/src/agent/components/sandbox-recovery.tsx +24 -6
- package/src/agent/components/transcript.tsx +136 -5
- package/src/agent/conversation.ts +16 -1
- package/src/agent/format.ts +52 -0
- package/src/agent/hooks/thread-queries.ts +75 -0
- package/src/agent/hooks/use-agent-conversation.ts +461 -112
- package/src/agent/hooks/use-thread-lists.ts +72 -7
- package/src/agent/hooks/use-thread-place.ts +239 -0
- package/src/agent/i18n/en.ts +69 -16
- package/src/agent/i18n/fr.ts +71 -19
- package/src/agent/live-run.ts +38 -0
- package/src/agent/model-selection.ts +3 -2
- package/src/agent/moves.ts +174 -0
- package/src/agent/thread-reader-state.ts +75 -0
- package/src/agent/types.ts +6 -0
- package/src/artifacts/live/session.ts +5 -0
- package/src/createCustomApp.ts +57 -3
- package/src/index.ts +4 -0
- package/src/pages/console/data/accounts.tsx +509 -0
- package/src/pages/console/data/connectors.tsx +67 -64
- package/src/pages/console/data/datasets.tsx +79 -68
- package/src/pages/console/data/live-updates.ts +2 -0
- package/src/pages/console/data/messages.ts +73 -0
- package/src/pages/console/data/pipelines.tsx +80 -69
- package/src/pages/console/data/projections.tsx +111 -82
- package/src/pages/console/data/sync-button.tsx +56 -16
- package/src/pages/console/data/syncs.tsx +121 -86
- package/src/pages/console/ontology/actions.tsx +51 -24
- package/src/pages/console/ontology/object-type.tsx +5 -1
- package/src/pages/console/ontology/object-types.tsx +41 -32
- package/src/pages/console/ontology/rules.tsx +48 -38
- package/src/pages/console/ontology/workflow.tsx +9 -3
- package/src/pages/console/ontology/workflows.tsx +55 -67
- package/src/pages/folders.tsx +335 -0
- package/src/pages/section-ui.tsx +1 -1
- package/src/pages/settings/usage/breakdown.tsx +5 -2
- package/src/pages/settings/usage/filter-menu.tsx +1 -1
- package/src/pages/settings/usage/page.tsx +32 -13
- package/src/pages/settings/usage/spend-chart.tsx +2 -2
- package/src/pages/settings/usage/spend-model.ts +118 -50
- package/src/server.ts +1 -0
- /package/dist/{chunk-69qgh20f.js.map → chunk-1f4h75n3.js.map} +0 -0
- /package/dist/{chunk-5sgac68y.js.map → chunk-dntecmwb.js.map} +0 -0
- /package/dist/{chunk-4wm09prf.js.map → chunk-qmka6aea.js.map} +0 -0
|
@@ -39,6 +39,7 @@ import { keepPreviousData, useQuery } from "@tanstack/react-query"
|
|
|
39
39
|
import { ChevronLeft, ChevronRight, Columns3, Database, Info, Search } from "lucide-react"
|
|
40
40
|
import { type ReactNode, useMemo, useState } from "react"
|
|
41
41
|
import { Link, useParams, useSearchParams } from "react-router-dom"
|
|
42
|
+
import { FolderContents, folderBack, noItems, useFolderBrowser } from "../../folders"
|
|
42
43
|
import { DetailFallback, SectionPage, SectionWorkspace, WorkspaceHeader } from "../../section-page"
|
|
43
44
|
import {
|
|
44
45
|
apiErrorMessage,
|
|
@@ -73,80 +74,87 @@ export function ConsoleDatasetsPage() {
|
|
|
73
74
|
const numbers = useNumbers()
|
|
74
75
|
useDatasetLiveUpdates()
|
|
75
76
|
const datasetsQuery = useQuery({ ...listDatasetsOptions(), retry: false })
|
|
76
|
-
const
|
|
77
|
+
const browser = useFolderBrowser({
|
|
78
|
+
items: datasetsQuery.data ?? noItems,
|
|
79
|
+
title: messages.datasets.title,
|
|
80
|
+
description: messages.datasets.description,
|
|
81
|
+
})
|
|
77
82
|
|
|
78
83
|
return (
|
|
79
|
-
<SectionPage
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
/>
|
|
92
|
-
) : datasetsQuery.isError ? (
|
|
93
|
-
<PanelEmpty
|
|
94
|
-
tone="error"
|
|
95
|
-
icon={Database}
|
|
96
|
-
title={messages.datasets.title}
|
|
97
|
-
description={apiErrorMessage(datasetsQuery.error, messages.common.loadFailed)}
|
|
98
|
-
/>
|
|
99
|
-
) : datasets.length === 0 ? (
|
|
100
|
-
<PanelEmpty
|
|
101
|
-
icon={Database}
|
|
102
|
-
title={messages.datasets.emptyTitle}
|
|
103
|
-
description={messages.datasets.emptyDescription}
|
|
104
|
-
/>
|
|
105
|
-
) : (
|
|
106
|
-
datasets.map((dataset) => (
|
|
107
|
-
<PanelRow
|
|
108
|
-
key={dataset.id}
|
|
109
|
-
href={`/console/datasets/${encodeURIComponent(dataset.id)}`}
|
|
110
|
-
leading={<IconTile icon={Database} />}
|
|
111
|
-
title={<span className="truncate">{dataset.id}</span>}
|
|
112
|
-
meta={
|
|
113
|
-
<>
|
|
114
|
-
{dataset.latestVersion?.rowCount !== undefined ? (
|
|
84
|
+
<SectionPage section="console" page="datasets" {...browser.frame}>
|
|
85
|
+
{datasetsQuery.isSuccess && datasetsQuery.data.length > 0 ? (
|
|
86
|
+
<FolderContents browser={browser} rootLabel={messages.datasets.title}>
|
|
87
|
+
{(datasets) => (
|
|
88
|
+
<Panel>
|
|
89
|
+
{datasets.map((dataset) => (
|
|
90
|
+
<PanelRow
|
|
91
|
+
key={dataset.id}
|
|
92
|
+
href={`/console/datasets/${encodeURIComponent(dataset.id)}`}
|
|
93
|
+
leading={<IconTile icon={Database} />}
|
|
94
|
+
title={<span className="truncate">{dataset.id}</span>}
|
|
95
|
+
meta={
|
|
115
96
|
<>
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
97
|
+
{dataset.latestVersion?.rowCount !== undefined ? (
|
|
98
|
+
<>
|
|
99
|
+
<span className="tabular-nums">
|
|
100
|
+
{messages.common.rows(
|
|
101
|
+
dataset.latestVersion.rowCount,
|
|
102
|
+
numbers.count(dataset.latestVersion.rowCount)
|
|
103
|
+
)}
|
|
104
|
+
</span>
|
|
105
|
+
<MetaDot />
|
|
106
|
+
</>
|
|
107
|
+
) : null}
|
|
108
|
+
<span>{messages.common.columns(dataset.schema.columns.length)}</span>
|
|
109
|
+
{dataset.latestVersion ? (
|
|
110
|
+
<>
|
|
111
|
+
<MetaDot />
|
|
112
|
+
<span>
|
|
113
|
+
{messages.datasets.updated(
|
|
114
|
+
format.relative(dataset.latestVersion.createdAt)
|
|
115
|
+
)}
|
|
116
|
+
</span>
|
|
117
|
+
</>
|
|
118
|
+
) : null}
|
|
123
119
|
</>
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
{dataset.latestVersion ? (
|
|
120
|
+
}
|
|
121
|
+
trailing={
|
|
127
122
|
<>
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
)}
|
|
133
|
-
</span>
|
|
123
|
+
{dataset.latestVersion ? null : (
|
|
124
|
+
<Pill tone="muted">{messages.datasets.declared}</Pill>
|
|
125
|
+
)}
|
|
126
|
+
<ChevronRight className="size-4 text-muted-foreground/60" />
|
|
134
127
|
</>
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
}
|
|
128
|
+
}
|
|
129
|
+
/>
|
|
130
|
+
))}
|
|
131
|
+
</Panel>
|
|
132
|
+
)}
|
|
133
|
+
</FolderContents>
|
|
134
|
+
) : (
|
|
135
|
+
<Panel>
|
|
136
|
+
{datasetsQuery.isPending ? (
|
|
137
|
+
<PanelSkeleton
|
|
138
|
+
rows={4}
|
|
139
|
+
interactive
|
|
140
|
+
trailing={<TrailingSkeleton pill={false} chevron />}
|
|
146
141
|
/>
|
|
147
|
-
)
|
|
148
|
-
|
|
149
|
-
|
|
142
|
+
) : datasetsQuery.isError ? (
|
|
143
|
+
<PanelEmpty
|
|
144
|
+
tone="error"
|
|
145
|
+
icon={Database}
|
|
146
|
+
title={messages.datasets.title}
|
|
147
|
+
description={apiErrorMessage(datasetsQuery.error, messages.common.loadFailed)}
|
|
148
|
+
/>
|
|
149
|
+
) : (
|
|
150
|
+
<PanelEmpty
|
|
151
|
+
icon={Database}
|
|
152
|
+
title={messages.datasets.emptyTitle}
|
|
153
|
+
description={messages.datasets.emptyDescription}
|
|
154
|
+
/>
|
|
155
|
+
)}
|
|
156
|
+
</Panel>
|
|
157
|
+
)}
|
|
150
158
|
</SectionPage>
|
|
151
159
|
)
|
|
152
160
|
}
|
|
@@ -219,7 +227,10 @@ function DatasetDetail({ datasetId }: { readonly datasetId: string }) {
|
|
|
219
227
|
)
|
|
220
228
|
: allRows
|
|
221
229
|
|
|
222
|
-
const back =
|
|
230
|
+
const back = folderBack(
|
|
231
|
+
{ href: "/console/datasets", label: messages.datasets.title },
|
|
232
|
+
dataset?.folder
|
|
233
|
+
)
|
|
223
234
|
|
|
224
235
|
if (!dataset) {
|
|
225
236
|
return (
|
|
@@ -27,6 +27,8 @@ export function useSyncLiveUpdates(options: { syncId?: string } = {}) {
|
|
|
27
27
|
key("listSyncs"),
|
|
28
28
|
key("listSyncRuns"),
|
|
29
29
|
key("getSync", { syncId: event.payload.syncId }),
|
|
30
|
+
// Which connector a sync reads isn't in its events: refresh every connector's accounts.
|
|
31
|
+
key("listConnectorAccounts"),
|
|
30
32
|
]
|
|
31
33
|
if ("datasetId" in event.payload && event.payload.datasetId) {
|
|
32
34
|
keys.push(...datasetChangedKeys(event.payload.datasetId))
|
|
@@ -41,6 +41,17 @@ export const en = {
|
|
|
41
41
|
synced: (when: string) => `Synced ${when}`,
|
|
42
42
|
failed: "Last sync failed",
|
|
43
43
|
never: "Never synced",
|
|
44
|
+
noAccounts: "No account connected",
|
|
45
|
+
accountsNeedReconnecting: (count: number) =>
|
|
46
|
+
plural("en", count, {
|
|
47
|
+
one: "An account needs reconnecting",
|
|
48
|
+
other: `${count} accounts need reconnecting`,
|
|
49
|
+
}),
|
|
50
|
+
accountsFailed: (count: number) =>
|
|
51
|
+
plural("en", count, {
|
|
52
|
+
one: "An account failed to sync",
|
|
53
|
+
other: `${count} accounts failed to sync`,
|
|
54
|
+
}),
|
|
44
55
|
requestFailed: "The sync could not be started.",
|
|
45
56
|
},
|
|
46
57
|
connectors: {
|
|
@@ -52,6 +63,12 @@ export const en = {
|
|
|
52
63
|
webhookCount: (count: number) =>
|
|
53
64
|
plural("en", count, { one: "1 webhook", other: `${count} webhooks` }),
|
|
54
65
|
oauth: "Connects with OAuth",
|
|
66
|
+
accountsTitle: "Accounts",
|
|
67
|
+
accountsDescription: "Each connected account, and how its syncs last ran.",
|
|
68
|
+
noAccountsTitle: "No accounts connected",
|
|
69
|
+
searchAccounts: "Search accounts",
|
|
70
|
+
noMatchingAccounts: "No accounts match",
|
|
71
|
+
showAllAccounts: (count: string) => `Show all ${count} accounts`,
|
|
55
72
|
syncsTitle: "Syncs",
|
|
56
73
|
syncsDescription: "What this connector copies into the project.",
|
|
57
74
|
noSyncsTitle: "No syncs",
|
|
@@ -80,6 +97,25 @@ export const en = {
|
|
|
80
97
|
connector: "Connector",
|
|
81
98
|
dataset: "Dataset",
|
|
82
99
|
runWhat: "Sync runs",
|
|
100
|
+
accounts: (count: number, formatted: string) =>
|
|
101
|
+
plural("en", count, { one: `${formatted} account`, other: `${formatted} accounts` }),
|
|
102
|
+
needReconnecting: (count: number) =>
|
|
103
|
+
plural("en", count, {
|
|
104
|
+
one: "1 needs reconnecting",
|
|
105
|
+
other: `${count} need reconnecting`,
|
|
106
|
+
}),
|
|
107
|
+
failingAccounts: (count: number) => `${count} failing`,
|
|
108
|
+
project: "Project",
|
|
109
|
+
slot: (slot: string) => `Slot ${slot}`,
|
|
110
|
+
notSyncedYet: "Not synced yet",
|
|
111
|
+
needsReconnecting: "Needs reconnecting",
|
|
112
|
+
syncAccount: (account: string) => `Sync ${account}`,
|
|
113
|
+
needsAttention: "Needs attention",
|
|
114
|
+
noAccounts: "No accounts",
|
|
115
|
+
accountsStat: "Accounts",
|
|
116
|
+
syncedStat: "Synced",
|
|
117
|
+
attentionStat: "Need attention",
|
|
118
|
+
lastSynced: "Last synced",
|
|
83
119
|
},
|
|
84
120
|
datasets: {
|
|
85
121
|
title: "Datasets",
|
|
@@ -283,6 +319,17 @@ export const fr: Translation<DataMessages> = {
|
|
|
283
319
|
synced: (when: string) => `Synchronisé ${when}`,
|
|
284
320
|
failed: "La dernière synchronisation a échoué",
|
|
285
321
|
never: "Jamais synchronisé",
|
|
322
|
+
noAccounts: "Aucun compte connecté",
|
|
323
|
+
accountsNeedReconnecting: (count: number) =>
|
|
324
|
+
plural("fr", count, {
|
|
325
|
+
one: "Un compte à reconnecter",
|
|
326
|
+
other: `${count} comptes à reconnecter`,
|
|
327
|
+
}),
|
|
328
|
+
accountsFailed: (count: number) =>
|
|
329
|
+
plural("fr", count, {
|
|
330
|
+
one: "Un compte en échec",
|
|
331
|
+
other: `${count} comptes en échec`,
|
|
332
|
+
}),
|
|
286
333
|
requestFailed: "Impossible de lancer la synchronisation.",
|
|
287
334
|
},
|
|
288
335
|
connectors: {
|
|
@@ -295,6 +342,12 @@ export const fr: Translation<DataMessages> = {
|
|
|
295
342
|
webhookCount: (count: number) =>
|
|
296
343
|
plural("fr", count, { one: "1 webhook", other: `${count} webhooks` }),
|
|
297
344
|
oauth: "Se connecte avec OAuth",
|
|
345
|
+
accountsTitle: "Comptes",
|
|
346
|
+
accountsDescription: "Chaque compte connecté, et le dernier passage de ses synchronisations.",
|
|
347
|
+
noAccountsTitle: "Aucun compte connecté",
|
|
348
|
+
searchAccounts: "Rechercher un compte",
|
|
349
|
+
noMatchingAccounts: "Aucun compte ne correspond",
|
|
350
|
+
showAllAccounts: (count: string) => `Afficher les ${count} comptes`,
|
|
298
351
|
syncsTitle: "Synchronisations",
|
|
299
352
|
syncsDescription: "Ce que ce connecteur copie dans le projet.",
|
|
300
353
|
noSyncsTitle: "Aucune synchronisation",
|
|
@@ -324,6 +377,26 @@ export const fr: Translation<DataMessages> = {
|
|
|
324
377
|
connector: "Connecteur",
|
|
325
378
|
dataset: "Jeu de données",
|
|
326
379
|
runWhat: "Les synchronisations",
|
|
380
|
+
accounts: (count: number, formatted: string) =>
|
|
381
|
+
plural("fr", count, { one: `${formatted} compte`, other: `${formatted} comptes` }),
|
|
382
|
+
needReconnecting: (count: number) =>
|
|
383
|
+
plural("fr", count, {
|
|
384
|
+
one: "1 à reconnecter",
|
|
385
|
+
other: `${count} à reconnecter`,
|
|
386
|
+
}),
|
|
387
|
+
failingAccounts: (count: number) =>
|
|
388
|
+
plural("fr", count, { one: "1 en échec", other: `${count} en échec` }),
|
|
389
|
+
project: "Projet",
|
|
390
|
+
slot: (slot: string) => `Emplacement ${slot}`,
|
|
391
|
+
notSyncedYet: "Pas encore synchronisé",
|
|
392
|
+
needsReconnecting: "À reconnecter",
|
|
393
|
+
syncAccount: (account: string) => `Synchroniser ${account}`,
|
|
394
|
+
needsAttention: "À traiter",
|
|
395
|
+
noAccounts: "Aucun compte",
|
|
396
|
+
accountsStat: "Comptes",
|
|
397
|
+
syncedStat: "Synchronisés",
|
|
398
|
+
attentionStat: "À traiter",
|
|
399
|
+
lastSynced: "Dernière synchronisation",
|
|
327
400
|
},
|
|
328
401
|
datasets: {
|
|
329
402
|
title: "Jeux de données",
|
|
@@ -26,6 +26,7 @@ import {
|
|
|
26
26
|
} from "lucide-react"
|
|
27
27
|
import { lazy, type ReactNode, Suspense, useMemo, useState } from "react"
|
|
28
28
|
import { Link, useParams, useSearchParams } from "react-router-dom"
|
|
29
|
+
import { FolderContents, folderBack, noItems, useFolderBrowser } from "../../folders"
|
|
29
30
|
import {
|
|
30
31
|
DetailFallback,
|
|
31
32
|
notify,
|
|
@@ -66,80 +67,87 @@ export function ConsolePipelinesPage() {
|
|
|
66
67
|
const format = useFormat()
|
|
67
68
|
usePipelineLiveUpdates()
|
|
68
69
|
const pipelinesQuery = useQuery({ ...listPipelinesOptions(), retry: false })
|
|
69
|
-
const
|
|
70
|
+
const browser = useFolderBrowser({
|
|
71
|
+
items: pipelinesQuery.data ?? noItems,
|
|
72
|
+
title: messages.pipelines.title,
|
|
73
|
+
description: messages.pipelines.description,
|
|
74
|
+
})
|
|
70
75
|
|
|
71
76
|
return (
|
|
72
|
-
<SectionPage
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
/>
|
|
88
|
-
) : pipelines.length === 0 ? (
|
|
89
|
-
<PanelEmpty
|
|
90
|
-
icon={Workflow}
|
|
91
|
-
title={messages.pipelines.emptyTitle}
|
|
92
|
-
description={messages.pipelines.emptyDescription}
|
|
93
|
-
/>
|
|
94
|
-
) : (
|
|
95
|
-
pipelines.map((pipeline) => {
|
|
96
|
-
const steps = pipeline.graph.nodes
|
|
97
|
-
const output = steps.at(-1)?.step.output.id
|
|
98
|
-
return (
|
|
99
|
-
<PanelRow
|
|
100
|
-
key={pipeline.id}
|
|
101
|
-
href={`/console/pipelines/${encodeURIComponent(pipeline.id)}`}
|
|
102
|
-
leading={<IconTile icon={Workflow} />}
|
|
103
|
-
title={<span className="truncate">{humanize(pipeline.id)}</span>}
|
|
104
|
-
meta={
|
|
105
|
-
<>
|
|
106
|
-
<span>{messages.pipelines.stepCount(steps.length)}</span>
|
|
107
|
-
{output ? (
|
|
77
|
+
<SectionPage section="console" page="pipelines" {...browser.frame}>
|
|
78
|
+
{pipelinesQuery.isSuccess && pipelinesQuery.data.length > 0 ? (
|
|
79
|
+
<FolderContents browser={browser} rootLabel={messages.pipelines.title}>
|
|
80
|
+
{(pipelines) => (
|
|
81
|
+
<Panel>
|
|
82
|
+
{pipelines.map((pipeline) => {
|
|
83
|
+
const steps = pipeline.graph.nodes
|
|
84
|
+
const output = steps.at(-1)?.step.output.id
|
|
85
|
+
return (
|
|
86
|
+
<PanelRow
|
|
87
|
+
key={pipeline.id}
|
|
88
|
+
href={`/console/pipelines/${encodeURIComponent(pipeline.id)}`}
|
|
89
|
+
leading={<IconTile icon={Workflow} />}
|
|
90
|
+
title={<span className="truncate">{humanize(pipeline.id)}</span>}
|
|
91
|
+
meta={
|
|
108
92
|
<>
|
|
109
|
-
<
|
|
110
|
-
|
|
93
|
+
<span>{messages.pipelines.stepCount(steps.length)}</span>
|
|
94
|
+
{output ? (
|
|
95
|
+
<>
|
|
96
|
+
<MetaDot />
|
|
97
|
+
<span className="truncate">{messages.common.writes(output)}</span>
|
|
98
|
+
</>
|
|
99
|
+
) : null}
|
|
100
|
+
{pipeline.triggers.map((trigger) => (
|
|
101
|
+
<ScheduleMeta key={trigger.scheduleId} id={trigger.scheduleId} />
|
|
102
|
+
))}
|
|
103
|
+
{pipeline.latestRun ? (
|
|
104
|
+
<>
|
|
105
|
+
<MetaDot />
|
|
106
|
+
<span>
|
|
107
|
+
{format.relative(
|
|
108
|
+
pipeline.latestRun.startedAt ?? pipeline.latestRun.queuedAt
|
|
109
|
+
)}
|
|
110
|
+
</span>
|
|
111
|
+
</>
|
|
112
|
+
) : null}
|
|
111
113
|
</>
|
|
112
|
-
|
|
113
|
-
{
|
|
114
|
-
<ScheduleMeta key={trigger.scheduleId} id={trigger.scheduleId} />
|
|
115
|
-
))}
|
|
116
|
-
{pipeline.latestRun ? (
|
|
114
|
+
}
|
|
115
|
+
trailing={
|
|
117
116
|
<>
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
117
|
+
{pipeline.latestRun ? (
|
|
118
|
+
<RunStatusPill status={pipeline.latestRun.status} />
|
|
119
|
+
) : (
|
|
120
|
+
<Pill tone="muted">{messages.common.neverRun}</Pill>
|
|
121
|
+
)}
|
|
122
|
+
<ChevronRight className="size-4 text-muted-foreground/60" />
|
|
124
123
|
</>
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
124
|
+
}
|
|
125
|
+
/>
|
|
126
|
+
)
|
|
127
|
+
})}
|
|
128
|
+
</Panel>
|
|
129
|
+
)}
|
|
130
|
+
</FolderContents>
|
|
131
|
+
) : (
|
|
132
|
+
<Panel>
|
|
133
|
+
{pipelinesQuery.isPending ? (
|
|
134
|
+
<PanelSkeleton rows={3} interactive trailing={<TrailingSkeleton chevron />} />
|
|
135
|
+
) : pipelinesQuery.isError ? (
|
|
136
|
+
<PanelEmpty
|
|
137
|
+
tone="error"
|
|
138
|
+
icon={Workflow}
|
|
139
|
+
title={messages.pipelines.title}
|
|
140
|
+
description={apiErrorMessage(pipelinesQuery.error, messages.common.loadFailed)}
|
|
141
|
+
/>
|
|
142
|
+
) : (
|
|
143
|
+
<PanelEmpty
|
|
144
|
+
icon={Workflow}
|
|
145
|
+
title={messages.pipelines.emptyTitle}
|
|
146
|
+
description={messages.pipelines.emptyDescription}
|
|
147
|
+
/>
|
|
148
|
+
)}
|
|
149
|
+
</Panel>
|
|
150
|
+
)}
|
|
143
151
|
</SectionPage>
|
|
144
152
|
)
|
|
145
153
|
}
|
|
@@ -212,7 +220,10 @@ function PipelineDetail({ pipelineId }: { readonly pipelineId: string }) {
|
|
|
212
220
|
onError: (error) => notify.error(apiErrorMessage(error, messages.pipelines.requestFailed)),
|
|
213
221
|
})
|
|
214
222
|
|
|
215
|
-
const back =
|
|
223
|
+
const back = folderBack(
|
|
224
|
+
{ href: "/console/pipelines", label: messages.pipelines.title },
|
|
225
|
+
pipelineQuery.data?.folder
|
|
226
|
+
)
|
|
216
227
|
|
|
217
228
|
if (!pipeline) {
|
|
218
229
|
return (
|