@burdenoff/microfe-cosmicintersection 2026.1108.2 → 2026.1109.1
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/cosmicintersection/api/databricksTransport.d.ts +13 -0
- package/dist/cosmicintersection/api/databricksTransport.d.ts.map +1 -0
- package/dist/cosmicintersection/api/databricksTransport.js +38 -0
- package/dist/cosmicintersection/api/databricksTransport.js.map +1 -0
- package/dist/cosmicintersection/components/ActionMenu.js +17 -17
- package/dist/cosmicintersection/components/DatabricksQueueForm.d.ts +13 -0
- package/dist/cosmicintersection/components/DatabricksQueueForm.d.ts.map +1 -0
- package/dist/cosmicintersection/components/DatabricksQueueForm.js +221 -0
- package/dist/cosmicintersection/components/DatabricksQueueForm.js.map +1 -0
- package/dist/cosmicintersection/components/DatabricksRunPanel.d.ts +6 -0
- package/dist/cosmicintersection/components/DatabricksRunPanel.d.ts.map +1 -0
- package/dist/cosmicintersection/components/DatabricksRunPanel.js +206 -0
- package/dist/cosmicintersection/components/DatabricksRunPanel.js.map +1 -0
- package/dist/cosmicintersection/components/EntityFormShell.js +7 -7
- package/dist/cosmicintersection/components/EntityTagsField.js +8 -8
- package/dist/cosmicintersection/components/ErrorState.js +4 -4
- package/dist/cosmicintersection/components/FileUploadField.js +8 -8
- package/dist/cosmicintersection/components/Pagination.js +6 -6
- package/dist/cosmicintersection/components/ReleaseDraftDialog.js +17 -17
- package/dist/cosmicintersection/components/RunTriageCard.js +12 -12
- package/dist/cosmicintersection/components/SchemaProposalPanel.js +35 -35
- package/dist/cosmicintersection/components/SchemaProposalPanel.js.map +1 -1
- package/dist/cosmicintersection/components/WorkspaceTagsPicker.js +12 -12
- package/dist/cosmicintersection/components/index.js +7 -7
- package/dist/cosmicintersection/context/CosmicIntersectionContext.d.ts +2 -0
- package/dist/cosmicintersection/context/CosmicIntersectionContext.d.ts.map +1 -1
- package/dist/cosmicintersection/context/CosmicIntersectionContext.js +17 -13
- package/dist/cosmicintersection/context/CosmicIntersectionContext.js.map +1 -1
- package/dist/cosmicintersection/hooks/useDatabricksExecutions.d.ts +69 -0
- package/dist/cosmicintersection/hooks/useDatabricksExecutions.d.ts.map +1 -0
- package/dist/cosmicintersection/hooks/useDatabricksExecutions.js +89 -0
- package/dist/cosmicintersection/hooks/useDatabricksExecutions.js.map +1 -0
- package/dist/cosmicintersection/hooks/useDatabricksQueueForm.d.ts +59 -0
- package/dist/cosmicintersection/hooks/useDatabricksQueueForm.d.ts.map +1 -0
- package/dist/cosmicintersection/hooks/useDatabricksQueueForm.js +158 -0
- package/dist/cosmicintersection/hooks/useDatabricksQueueForm.js.map +1 -0
- package/dist/cosmicintersection/lib/databricksForm.d.ts +4 -0
- package/dist/cosmicintersection/lib/databricksForm.d.ts.map +1 -0
- package/dist/cosmicintersection/lib/databricksForm.js +31 -0
- package/dist/cosmicintersection/lib/databricksForm.js.map +1 -0
- package/dist/cosmicintersection/lib/databricksIntent.d.ts +19 -0
- package/dist/cosmicintersection/lib/databricksIntent.d.ts.map +1 -0
- package/dist/cosmicintersection/lib/databricksIntent.js +60 -0
- package/dist/cosmicintersection/lib/databricksIntent.js.map +1 -0
- package/dist/cosmicintersection/lib/databricksPresentation.d.ts +5 -0
- package/dist/cosmicintersection/lib/databricksPresentation.d.ts.map +1 -0
- package/dist/cosmicintersection/lib/databricksPresentation.js +27 -0
- package/dist/cosmicintersection/lib/databricksPresentation.js.map +1 -0
- package/dist/cosmicintersection/pages/access/AccessPage.js +62 -62
- package/dist/cosmicintersection/pages/access/AccessPage.js.map +1 -1
- package/dist/cosmicintersection/pages/analyses/AnalysesPage.js +107 -107
- package/dist/cosmicintersection/pages/analyses/AnalysesPage.js.map +1 -1
- package/dist/cosmicintersection/pages/collections/CollectionDetailPage.js +24 -24
- package/dist/cosmicintersection/pages/collections/CollectionsPage.js +12 -12
- package/dist/cosmicintersection/pages/dashboard/DashboardPage.js +18 -18
- package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js +91 -91
- package/dist/cosmicintersection/pages/datasets/DatasetsPage.js +209 -209
- package/dist/cosmicintersection/pages/datasets/DatasetsPage.js.map +1 -1
- package/dist/cosmicintersection/pages/discovery/DiscoveryPage.js +98 -98
- package/dist/cosmicintersection/pages/discovery/DiscoveryPage.js.map +1 -1
- package/dist/cosmicintersection/pages/lineage/LineagePage.js +15 -15
- package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.js +139 -139
- package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.js.map +1 -1
- package/dist/cosmicintersection/pages/notebooks/NotebooksPage.js +34 -34
- package/dist/cosmicintersection/pages/pipelines/PipelineDetailPage.js +39 -39
- package/dist/cosmicintersection/pages/pipelines/PipelineDetailPage.js.map +1 -1
- package/dist/cosmicintersection/pages/pipelines/PipelineFormPage.js +107 -107
- package/dist/cosmicintersection/pages/pipelines/PipelineFormPage.js.map +1 -1
- package/dist/cosmicintersection/pages/pipelines/PipelinesPage.js +32 -32
- package/dist/cosmicintersection/pages/releases/ReleasesPage.js +213 -213
- package/dist/cosmicintersection/pages/releases/ReleasesPage.js.map +1 -1
- package/dist/cosmicintersection/pages/runs/RunDetailPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/runs/RunDetailPage.js +250 -213
- package/dist/cosmicintersection/pages/runs/RunDetailPage.js.map +1 -1
- package/dist/cosmicintersection/pages/runs/RunsPage.js +31 -31
- package/dist/cosmicintersection/pages/sources/SourceDetailPage.js +41 -41
- package/dist/cosmicintersection/pages/sources/SourcesPage.js +122 -122
- package/dist/cosmicintersection/pages/sources/SourcesPage.js.map +1 -1
- package/dist/generated/wspace-operations.d.ts +243 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -0
- package/dist/generated/wspace-operations.js +1472 -0
- package/dist/generated/wspace-operations.js.map +1 -0
- package/dist/generated/wspace-types.d.ts +183281 -30204
- package/dist/generated/wspace-types.d.ts.map +1 -1
- package/package.json +10 -7
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DocumentNode } from 'graphql';
|
|
2
|
+
/** Captured by the mounted run panel; never persisted or used as a cache key. */
|
|
3
|
+
export interface DatabricksRequestScope {
|
|
4
|
+
apiGatewayUrl: string;
|
|
5
|
+
authToken: string;
|
|
6
|
+
actorId: string;
|
|
7
|
+
workspaceId: string;
|
|
8
|
+
tenantId?: string;
|
|
9
|
+
organizationId?: string;
|
|
10
|
+
projectId?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function databricksRequest<T>(scope: DatabricksRequestScope, document: DocumentNode, variables: Record<string, unknown>, signal: AbortSignal): Promise<T>;
|
|
13
|
+
//# sourceMappingURL=databricksTransport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"databricksTransport.d.ts","sourceRoot":"","sources":["../../../src/cosmicintersection/api/databricksTransport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AASnD,iFAAiF;AACjF,MAAM,WAAW,sBAAsB;IACrC,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAsB,iBAAiB,CAAC,CAAC,EACvC,KAAK,EAAE,sBAAsB,EAC7B,QAAQ,EAAE,YAAY,EACtB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClC,MAAM,EAAE,WAAW,GAClB,OAAO,CAAC,CAAC,CAAC,CA0CZ"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { getStoredOrganizationId as e, getStoredProjectId as t, graphqlFetchPinned as n, prepareWorkspaceRequest as r, resolveGatewayUrl as i } from "@burdenoff/fe-libs/shared/graphql";
|
|
2
|
+
import { print as a } from "graphql";
|
|
3
|
+
//#region src/cosmicintersection/api/databricksTransport.ts
|
|
4
|
+
async function o(o, s, c, l) {
|
|
5
|
+
let u = () => {
|
|
6
|
+
if ((o.organizationId ?? null) !== (e() ?? null) || (o.projectId ?? null) !== (t() ?? null)) throw Error("The active context changed. Reopen the Databricks panel before continuing.");
|
|
7
|
+
};
|
|
8
|
+
u();
|
|
9
|
+
let d = i("workspace", o.apiGatewayUrl), f = a(s), p = await r({
|
|
10
|
+
url: d,
|
|
11
|
+
authToken: o.authToken,
|
|
12
|
+
actorId: o.actorId,
|
|
13
|
+
workspaceId: o.workspaceId,
|
|
14
|
+
tenantId: o.tenantId,
|
|
15
|
+
currentQuery: f,
|
|
16
|
+
signal: l
|
|
17
|
+
});
|
|
18
|
+
u(), p.assertCurrent();
|
|
19
|
+
let m = await n({
|
|
20
|
+
gateway: "workspace",
|
|
21
|
+
baseUrl: d,
|
|
22
|
+
query: f,
|
|
23
|
+
variables: c,
|
|
24
|
+
authToken: o.authToken,
|
|
25
|
+
workspaceToken: p.workspaceToken,
|
|
26
|
+
workspaceId: o.workspaceId,
|
|
27
|
+
organizationId: o.organizationId ?? !1,
|
|
28
|
+
tenantId: o.tenantId ?? !1,
|
|
29
|
+
projectId: o.projectId ?? !1,
|
|
30
|
+
signal: l
|
|
31
|
+
});
|
|
32
|
+
if (u(), p.assertCurrent(), m.errors?.length || m.data == null) throw Error("Databricks request was not confirmed. Refresh status before retrying.");
|
|
33
|
+
return m.data;
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { o as databricksRequest };
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=databricksTransport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"databricksTransport.js","names":[],"sources":["../../../src/cosmicintersection/api/databricksTransport.ts"],"sourcesContent":["import { print, type DocumentNode } from 'graphql';\nimport {\n getStoredOrganizationId,\n getStoredProjectId,\n graphqlFetchPinned,\n prepareWorkspaceRequest,\n resolveGatewayUrl,\n} from '@burdenoff/fe-libs/shared/graphql';\n\n/** Captured by the mounted run panel; never persisted or used as a cache key. */\nexport interface DatabricksRequestScope {\n apiGatewayUrl: string;\n authToken: string;\n actorId: string;\n workspaceId: string;\n tenantId?: string;\n organizationId?: string;\n projectId?: string;\n}\n\nexport async function databricksRequest<T>(\n scope: DatabricksRequestScope,\n document: DocumentNode,\n variables: Record<string, unknown>,\n signal: AbortSignal\n): Promise<T> {\n const assertCapturedContext = () => {\n if (\n (scope.organizationId ?? null) !== (getStoredOrganizationId() ?? null) ||\n (scope.projectId ?? null) !== (getStoredProjectId() ?? null)\n ) {\n throw new Error('The active context changed. Reopen the Databricks panel before continuing.');\n }\n };\n assertCapturedContext();\n const url = resolveGatewayUrl('workspace', scope.apiGatewayUrl);\n const query = print(document);\n const prepared = await prepareWorkspaceRequest({\n url,\n authToken: scope.authToken,\n actorId: scope.actorId,\n workspaceId: scope.workspaceId,\n tenantId: scope.tenantId,\n currentQuery: query,\n signal,\n });\n assertCapturedContext();\n prepared.assertCurrent();\n const response = await graphqlFetchPinned<T>({\n gateway: 'workspace',\n baseUrl: url,\n query,\n variables,\n authToken: scope.authToken,\n workspaceToken: prepared.workspaceToken,\n workspaceId: scope.workspaceId,\n organizationId: scope.organizationId ?? false,\n tenantId: scope.tenantId ?? false,\n projectId: scope.projectId ?? false,\n signal,\n });\n assertCapturedContext();\n prepared.assertCurrent();\n if (response.errors?.length || response.data == null) {\n throw new Error('Databricks request was not confirmed. Refresh status before retrying.');\n }\n return response.data;\n}\n"],"mappings":";;;AAoBA,eAAsB,EACpB,GACA,GACA,GACA,GACY;CACZ,IAAM,UAA8B;EAClC,KACG,EAAM,kBAAkB,WAAW,EAAwB,KAAK,UAChE,EAAM,aAAa,WAAW,EAAmB,KAAK,OAEvD,MAAU,MAAM,4EAA4E;CAEhG;CACA,EAAsB;CACtB,IAAM,IAAM,EAAkB,aAAa,EAAM,aAAa,GACxD,IAAQ,EAAM,CAAQ,GACtB,IAAW,MAAM,EAAwB;EAC7C;EACA,WAAW,EAAM;EACjB,SAAS,EAAM;EACf,aAAa,EAAM;EACnB,UAAU,EAAM;EAChB,cAAc;EACd;CACF,CAAC;CAED,AADA,EAAsB,GACtB,EAAS,cAAc;CACvB,IAAM,IAAW,MAAM,EAAsB;EAC3C,SAAS;EACT,SAAS;EACT;EACA;EACA,WAAW,EAAM;EACjB,gBAAgB,EAAS;EACzB,aAAa,EAAM;EACnB,gBAAgB,EAAM,kBAAkB;EACxC,UAAU,EAAM,YAAY;EAC5B,WAAW,EAAM,aAAa;EAC9B;CACF,CAAC;CAGD,IAFA,EAAsB,GACtB,EAAS,cAAc,GACnB,EAAS,QAAQ,UAAU,EAAS,QAAQ,MAC9C,MAAU,MAAM,uEAAuE;CAEzF,OAAO,EAAS;AAClB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useTr as e } from "../../shared/hooks/useTr.js";
|
|
2
2
|
import { useState as t } from "react";
|
|
3
3
|
import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { AlertDialog as a, AlertDialogAction as o, AlertDialogCancel as s, AlertDialogContent as c, AlertDialogDescription as l, AlertDialogFooter as u, AlertDialogHeader as d, AlertDialogTitle as f, DropdownMenu as p, DropdownMenuContent as m, DropdownMenuItem as h, DropdownMenuSeparator as g, DropdownMenuTrigger as _, buttonVariants as v } from "@burdenoff/fe-libs/ui";
|
|
5
|
+
import { Eye as y, MoreVertical as b, Pencil as x, Trash2 as S } from "lucide-react";
|
|
6
6
|
//#region src/cosmicintersection/components/ActionMenu.tsx
|
|
7
7
|
var C = "text-status-error-text focus:text-status-error-text";
|
|
8
8
|
function w({ ariaLabel: w, onView: T, onEdit: E, onDelete: D, entityName: O, deleteLabel: k, extraItems: A = [], align: j = "end", trigger: M }) {
|
|
@@ -16,34 +16,34 @@ function w({ ariaLabel: w, onView: T, onEdit: E, onDelete: D, entityName: O, del
|
|
|
16
16
|
type: "button",
|
|
17
17
|
className: "inline-flex size-9 items-center justify-center rounded-button text-text-secondary transition-colors hover:bg-bg-sunken hover:text-text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus max-md:size-11",
|
|
18
18
|
"aria-label": w,
|
|
19
|
-
children: /* @__PURE__ */ r(
|
|
19
|
+
children: /* @__PURE__ */ r(b, {
|
|
20
20
|
className: "size-4",
|
|
21
21
|
"aria-hidden": "true"
|
|
22
22
|
})
|
|
23
23
|
});
|
|
24
|
-
return T || E || A.length > 0 || D ? /* @__PURE__ */ i(n, { children: [/* @__PURE__ */ i(
|
|
24
|
+
return T || E || A.length > 0 || D ? /* @__PURE__ */ i(n, { children: [/* @__PURE__ */ i(p, { children: [/* @__PURE__ */ r(_, {
|
|
25
25
|
asChild: !0,
|
|
26
26
|
onClick: (e) => e.stopPropagation(),
|
|
27
27
|
onKeyDown: (e) => e.stopPropagation(),
|
|
28
28
|
children: B
|
|
29
|
-
}), /* @__PURE__ */ i(
|
|
29
|
+
}), /* @__PURE__ */ i(m, {
|
|
30
30
|
align: j,
|
|
31
31
|
className: "min-w-44",
|
|
32
32
|
onClick: (e) => e.stopPropagation(),
|
|
33
33
|
onKeyDown: (e) => e.stopPropagation(),
|
|
34
34
|
children: [
|
|
35
|
-
T ? /* @__PURE__ */ i(
|
|
35
|
+
T ? /* @__PURE__ */ i(h, {
|
|
36
36
|
className: "cursor-pointer gap-2",
|
|
37
37
|
onSelect: () => T(),
|
|
38
|
-
children: [/* @__PURE__ */ r(
|
|
38
|
+
children: [/* @__PURE__ */ r(y, {
|
|
39
39
|
className: "size-4 shrink-0",
|
|
40
40
|
"aria-hidden": "true"
|
|
41
41
|
}), /* @__PURE__ */ r("span", { children: N("cosmicintersection.common.view", "View") })]
|
|
42
42
|
}) : null,
|
|
43
|
-
E ? /* @__PURE__ */ i(
|
|
43
|
+
E ? /* @__PURE__ */ i(h, {
|
|
44
44
|
className: "cursor-pointer gap-2",
|
|
45
45
|
onSelect: () => E(),
|
|
46
|
-
children: [/* @__PURE__ */ r(
|
|
46
|
+
children: [/* @__PURE__ */ r(x, {
|
|
47
47
|
className: "size-4 shrink-0",
|
|
48
48
|
"aria-hidden": "true"
|
|
49
49
|
}), /* @__PURE__ */ r("span", { children: N("cosmicintersection.common.edit", "Edit") })]
|
|
@@ -52,7 +52,7 @@ function w({ ariaLabel: w, onView: T, onEdit: E, onDelete: D, entityName: O, del
|
|
|
52
52
|
let t = e.icon;
|
|
53
53
|
return /* @__PURE__ */ i("div", {
|
|
54
54
|
className: "contents",
|
|
55
|
-
children: [e.separatorBefore ? /* @__PURE__ */ r(
|
|
55
|
+
children: [e.separatorBefore ? /* @__PURE__ */ r(g, {}) : null, /* @__PURE__ */ i(h, {
|
|
56
56
|
disabled: e.disabled,
|
|
57
57
|
onSelect: () => e.onSelect(),
|
|
58
58
|
className: `cursor-pointer gap-2 ${e.variant === "danger" ? C : ""}`,
|
|
@@ -68,30 +68,30 @@ function w({ ariaLabel: w, onView: T, onEdit: E, onDelete: D, entityName: O, del
|
|
|
68
68
|
}),
|
|
69
69
|
D ? /* @__PURE__ */ i("div", {
|
|
70
70
|
className: "contents",
|
|
71
|
-
children: [T || E || A.length > 0 ? /* @__PURE__ */ r(
|
|
71
|
+
children: [T || E || A.length > 0 ? /* @__PURE__ */ r(g, {}) : null, /* @__PURE__ */ i(h, {
|
|
72
72
|
className: `cursor-pointer gap-2 ${C}`,
|
|
73
73
|
onSelect: () => I(!0),
|
|
74
|
-
children: [/* @__PURE__ */ r(
|
|
74
|
+
children: [/* @__PURE__ */ r(S, {
|
|
75
75
|
className: "size-4 shrink-0",
|
|
76
76
|
"aria-hidden": "true"
|
|
77
77
|
}), /* @__PURE__ */ r("span", { children: P })]
|
|
78
78
|
})]
|
|
79
79
|
}) : null
|
|
80
80
|
]
|
|
81
|
-
})] }), D ? /* @__PURE__ */ r(
|
|
81
|
+
})] }), D ? /* @__PURE__ */ r(a, {
|
|
82
82
|
open: F,
|
|
83
83
|
onOpenChange: (e) => L ? void 0 : I(e),
|
|
84
|
-
children: /* @__PURE__ */ i(
|
|
84
|
+
children: /* @__PURE__ */ i(c, {
|
|
85
85
|
onClick: (e) => e.stopPropagation(),
|
|
86
|
-
children: [/* @__PURE__ */ i(
|
|
86
|
+
children: [/* @__PURE__ */ i(d, { children: [/* @__PURE__ */ i(f, { children: [P, O ? ` “${O}”?` : "?"] }), /* @__PURE__ */ r(l, { children: N("cosmicintersection.common.confirmDelete", "This action cannot be undone. This record will be permanently affected.") })] }), /* @__PURE__ */ i(u, { children: [/* @__PURE__ */ r(s, {
|
|
87
87
|
disabled: L,
|
|
88
88
|
children: N("cosmicintersection.common.cancel", "Cancel")
|
|
89
|
-
}), /* @__PURE__ */ r(
|
|
89
|
+
}), /* @__PURE__ */ r(o, {
|
|
90
90
|
onClick: (e) => {
|
|
91
91
|
e.preventDefault(), z();
|
|
92
92
|
},
|
|
93
93
|
disabled: L,
|
|
94
|
-
className:
|
|
94
|
+
className: v({ variant: "destructive" }),
|
|
95
95
|
children: L ? N("cosmicintersection.common.working", "Working…") : P
|
|
96
96
|
})] })]
|
|
97
97
|
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DocumentNode } from 'graphql';
|
|
2
|
+
type Request = <T>(document: DocumentNode, variables: Record<string, unknown>) => Promise<T>;
|
|
3
|
+
export default function DatabricksQueueForm({ request, runId, workspaceId, intentKey, onQueued, statusReady, canQueue, }: {
|
|
4
|
+
request: Request;
|
|
5
|
+
runId: string;
|
|
6
|
+
workspaceId: string;
|
|
7
|
+
intentKey: string;
|
|
8
|
+
onQueued(): Promise<void>;
|
|
9
|
+
statusReady: boolean;
|
|
10
|
+
canQueue: boolean;
|
|
11
|
+
}): import('react').JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=DatabricksQueueForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatabricksQueueForm.d.ts","sourceRoot":"","sources":["../../../src/cosmicintersection/components/DatabricksQueueForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG5C,KAAK,OAAO,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;AAE7F,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,EAC1C,OAAO,EACP,KAAK,EACL,WAAW,EACX,SAAS,EACT,QAAQ,EACR,WAAW,EACX,QAAQ,GACT,EAAE;IACD,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;CACnB,+BA2PA"}
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { useDatabricksQueueForm as e } from "../hooks/useDatabricksQueueForm.js";
|
|
2
|
+
import { Fragment as t, jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
3
|
+
import { Button as i, Input as a, Label as o, Textarea as s } from "@burdenoff/fe-libs/ui";
|
|
4
|
+
//#region src/cosmicintersection/components/DatabricksQueueForm.tsx
|
|
5
|
+
function c({ request: c, runId: l, workspaceId: u, intentKey: d, onQueued: f, statusReady: p, canQueue: m }) {
|
|
6
|
+
let { connections: h, datasets: g, connectionOffset: _, datasetOffset: v, moreConnections: y, moreDatasets: b, connectionId: x, jobId: S, name: C, parameters: w, maximum: T, inputs: E, outputs: D, confirmedCost: O, busy: k, error: A, intent: j, setConnectionId: M, setJobId: N, setName: P, setParameters: F, setMaximum: I, setInputs: L, setOutputs: R, setConfirmedCost: z, loadOptions: B, submit: V, checkSavedRequest: H, resolveSavedRequest: U, startAnotherJob: W } = e({
|
|
7
|
+
request: c,
|
|
8
|
+
runId: l,
|
|
9
|
+
workspaceId: u,
|
|
10
|
+
intentKey: d,
|
|
11
|
+
onQueued: f,
|
|
12
|
+
statusReady: p,
|
|
13
|
+
canQueue: m
|
|
14
|
+
});
|
|
15
|
+
return /* @__PURE__ */ r("form", {
|
|
16
|
+
onSubmit: (e) => void V(e),
|
|
17
|
+
className: "space-y-4",
|
|
18
|
+
"aria-label": "Queue existing Databricks job",
|
|
19
|
+
children: [
|
|
20
|
+
/* @__PURE__ */ n("p", {
|
|
21
|
+
className: "text-sm text-text-secondary",
|
|
22
|
+
children: "Create an existing Custom API Key connection in Integrations first, with your AWS Databricks workspace base URL and PAT. Credentials stay in Integrations; do not paste them into this form. This queues an existing job and does not create a cluster or job."
|
|
23
|
+
}),
|
|
24
|
+
/* @__PURE__ */ n("p", {
|
|
25
|
+
className: "text-sm text-text-secondary",
|
|
26
|
+
children: "Saved request identity belongs to this tab. Inspect existing jobs before creating another request or opening another tab. Recovery confirms an existing execution or withdraws a request that has not created one; it does not cancel an existing job."
|
|
27
|
+
}),
|
|
28
|
+
m ? /* @__PURE__ */ r(t, { children: [
|
|
29
|
+
/* @__PURE__ */ r("div", {
|
|
30
|
+
className: "flex flex-wrap gap-2",
|
|
31
|
+
children: [/* @__PURE__ */ n(i, {
|
|
32
|
+
type: "button",
|
|
33
|
+
variant: "outline",
|
|
34
|
+
disabled: k,
|
|
35
|
+
onClick: () => void B("connections"),
|
|
36
|
+
children: _ ? y ? "Load more connections" : "Reload connections" : "Load available connections"
|
|
37
|
+
}), /* @__PURE__ */ n(i, {
|
|
38
|
+
type: "button",
|
|
39
|
+
variant: "outline",
|
|
40
|
+
disabled: k,
|
|
41
|
+
onClick: () => void B("datasets"),
|
|
42
|
+
children: v ? b ? "Load more datasets" : "Reload datasets" : "Load lineage datasets"
|
|
43
|
+
})]
|
|
44
|
+
}),
|
|
45
|
+
/* @__PURE__ */ r("div", {
|
|
46
|
+
className: "space-y-2",
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ n(o, {
|
|
49
|
+
htmlFor: "databricks-connection",
|
|
50
|
+
children: "Existing Databricks connection"
|
|
51
|
+
}),
|
|
52
|
+
/* @__PURE__ */ r("select", {
|
|
53
|
+
id: "databricks-connection",
|
|
54
|
+
className: "w-full rounded-input border border-border-default bg-bg-primary p-2 text-text-primary",
|
|
55
|
+
value: x,
|
|
56
|
+
disabled: k,
|
|
57
|
+
onChange: (e) => M(e.target.value),
|
|
58
|
+
required: !0,
|
|
59
|
+
children: [/* @__PURE__ */ n("option", {
|
|
60
|
+
value: "",
|
|
61
|
+
children: "Choose an available connection"
|
|
62
|
+
}), h.map((e) => /* @__PURE__ */ n("option", {
|
|
63
|
+
value: e.id,
|
|
64
|
+
children: e.name
|
|
65
|
+
}, e.id))]
|
|
66
|
+
}),
|
|
67
|
+
/* @__PURE__ */ n("p", {
|
|
68
|
+
className: "text-xs text-text-secondary",
|
|
69
|
+
children: "Only active, usable Custom API Key connections in this workspace are listed. Their Databricks endpoint is validated by the service when queued."
|
|
70
|
+
})
|
|
71
|
+
]
|
|
72
|
+
}),
|
|
73
|
+
/* @__PURE__ */ r("div", {
|
|
74
|
+
className: "space-y-2",
|
|
75
|
+
children: [/* @__PURE__ */ n(o, {
|
|
76
|
+
htmlFor: "databricks-job",
|
|
77
|
+
children: "Existing job ID"
|
|
78
|
+
}), /* @__PURE__ */ n(a, {
|
|
79
|
+
id: "databricks-job",
|
|
80
|
+
inputMode: "numeric",
|
|
81
|
+
value: S,
|
|
82
|
+
disabled: k,
|
|
83
|
+
onChange: (e) => N(e.target.value),
|
|
84
|
+
required: !0
|
|
85
|
+
})]
|
|
86
|
+
}),
|
|
87
|
+
/* @__PURE__ */ r("div", {
|
|
88
|
+
className: "space-y-2",
|
|
89
|
+
children: [/* @__PURE__ */ n(o, {
|
|
90
|
+
htmlFor: "databricks-name",
|
|
91
|
+
children: "Step name"
|
|
92
|
+
}), /* @__PURE__ */ n(a, {
|
|
93
|
+
id: "databricks-name",
|
|
94
|
+
maxLength: 255,
|
|
95
|
+
value: C,
|
|
96
|
+
disabled: k,
|
|
97
|
+
onChange: (e) => P(e.target.value),
|
|
98
|
+
required: !0
|
|
99
|
+
})]
|
|
100
|
+
}),
|
|
101
|
+
/* @__PURE__ */ r("div", {
|
|
102
|
+
className: "space-y-2",
|
|
103
|
+
children: [/* @__PURE__ */ n(o, {
|
|
104
|
+
htmlFor: "databricks-parameters",
|
|
105
|
+
children: "Nonsecret job parameters (JSON string values)"
|
|
106
|
+
}), /* @__PURE__ */ n(s, {
|
|
107
|
+
id: "databricks-parameters",
|
|
108
|
+
value: w,
|
|
109
|
+
disabled: k,
|
|
110
|
+
onChange: (e) => F(e.target.value)
|
|
111
|
+
})]
|
|
112
|
+
}),
|
|
113
|
+
/* @__PURE__ */ r("div", {
|
|
114
|
+
className: "space-y-2",
|
|
115
|
+
children: [
|
|
116
|
+
/* @__PURE__ */ n(o, {
|
|
117
|
+
htmlFor: "databricks-deadline",
|
|
118
|
+
children: "Monitoring deadline (seconds)"
|
|
119
|
+
}),
|
|
120
|
+
/* @__PURE__ */ n(a, {
|
|
121
|
+
id: "databricks-deadline",
|
|
122
|
+
type: "number",
|
|
123
|
+
min: 60,
|
|
124
|
+
max: 86400,
|
|
125
|
+
step: 1,
|
|
126
|
+
value: T,
|
|
127
|
+
disabled: k,
|
|
128
|
+
onChange: (e) => I(e.target.value),
|
|
129
|
+
required: !0
|
|
130
|
+
}),
|
|
131
|
+
/* @__PURE__ */ n("p", {
|
|
132
|
+
className: "text-xs text-text-secondary",
|
|
133
|
+
children: "Expiry requests cancellation; it does not prove that external compute stopped."
|
|
134
|
+
})
|
|
135
|
+
]
|
|
136
|
+
}),
|
|
137
|
+
["inputs", "outputs"].map((e) => /* @__PURE__ */ r("div", {
|
|
138
|
+
className: "space-y-2",
|
|
139
|
+
children: [/* @__PURE__ */ n(o, {
|
|
140
|
+
htmlFor: `databricks-${e}`,
|
|
141
|
+
children: e === "inputs" ? "Input datasets" : "Declared output datasets"
|
|
142
|
+
}), /* @__PURE__ */ n("select", {
|
|
143
|
+
id: `databricks-${e}`,
|
|
144
|
+
multiple: !0,
|
|
145
|
+
className: "w-full rounded-input border border-border-default bg-bg-primary p-2 text-text-primary",
|
|
146
|
+
value: e === "inputs" ? E : D,
|
|
147
|
+
disabled: k,
|
|
148
|
+
onChange: (t) => {
|
|
149
|
+
let n = Array.from(t.target.selectedOptions, (e) => e.value);
|
|
150
|
+
e === "inputs" ? L(n) : R(n);
|
|
151
|
+
},
|
|
152
|
+
children: g.map((e) => /* @__PURE__ */ n("option", {
|
|
153
|
+
value: e.id,
|
|
154
|
+
children: e.name
|
|
155
|
+
}, e.id))
|
|
156
|
+
})]
|
|
157
|
+
}, e)),
|
|
158
|
+
/* @__PURE__ */ n("p", {
|
|
159
|
+
className: "text-xs text-text-secondary",
|
|
160
|
+
children: "Dataset links are your declared lineage. They do not prove Unity Catalog discovery or that a job produced output."
|
|
161
|
+
}),
|
|
162
|
+
/* @__PURE__ */ r("label", {
|
|
163
|
+
className: "flex items-start gap-2 text-sm",
|
|
164
|
+
children: [/* @__PURE__ */ n("input", {
|
|
165
|
+
type: "checkbox",
|
|
166
|
+
checked: O,
|
|
167
|
+
disabled: k,
|
|
168
|
+
onChange: (e) => z(e.target.checked)
|
|
169
|
+
}), "I understand this job may incur charges in my Databricks account."]
|
|
170
|
+
})
|
|
171
|
+
] }) : /* @__PURE__ */ n("p", {
|
|
172
|
+
className: "text-sm",
|
|
173
|
+
children: "Queuing requires a run in RUNNING state. Saved request recovery remains available."
|
|
174
|
+
}),
|
|
175
|
+
j ? /* @__PURE__ */ n("p", {
|
|
176
|
+
className: "text-sm",
|
|
177
|
+
children: j.confirmedExecutionId ? "The saved request has a confirmed execution." : "A request is saved. Identical-input retry keeps the same job intent; refresh status first if a response was lost."
|
|
178
|
+
}) : null,
|
|
179
|
+
A ? /* @__PURE__ */ n("p", {
|
|
180
|
+
role: "alert",
|
|
181
|
+
className: "text-sm text-status-error-text",
|
|
182
|
+
children: A
|
|
183
|
+
}) : null,
|
|
184
|
+
/* @__PURE__ */ r("div", {
|
|
185
|
+
className: "flex flex-wrap gap-2",
|
|
186
|
+
children: [
|
|
187
|
+
m ? /* @__PURE__ */ n(i, {
|
|
188
|
+
type: "submit",
|
|
189
|
+
disabled: k || !p || !O || !!j?.confirmedExecutionId,
|
|
190
|
+
children: k ? "Working…" : j ? "Retry same job request" : "Queue existing job"
|
|
191
|
+
}) : null,
|
|
192
|
+
/* @__PURE__ */ n(i, {
|
|
193
|
+
type: "button",
|
|
194
|
+
variant: "outline",
|
|
195
|
+
disabled: k,
|
|
196
|
+
onClick: H,
|
|
197
|
+
children: "Check saved request"
|
|
198
|
+
}),
|
|
199
|
+
j && !j.confirmedExecutionId ? /* @__PURE__ */ n(i, {
|
|
200
|
+
type: "button",
|
|
201
|
+
variant: "outline",
|
|
202
|
+
disabled: k,
|
|
203
|
+
onClick: () => void U(),
|
|
204
|
+
children: "Resolve saved request"
|
|
205
|
+
}) : null,
|
|
206
|
+
m && j?.confirmedExecutionId ? /* @__PURE__ */ n(i, {
|
|
207
|
+
type: "button",
|
|
208
|
+
variant: "outline",
|
|
209
|
+
disabled: k || !p,
|
|
210
|
+
onClick: W,
|
|
211
|
+
children: "Start another job"
|
|
212
|
+
}) : null
|
|
213
|
+
]
|
|
214
|
+
})
|
|
215
|
+
]
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
//#endregion
|
|
219
|
+
export { c as default };
|
|
220
|
+
|
|
221
|
+
//# sourceMappingURL=DatabricksQueueForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatabricksQueueForm.js","names":[],"sources":["../../../src/cosmicintersection/components/DatabricksQueueForm.tsx"],"sourcesContent":["import type { DocumentNode } from 'graphql';\nimport { Button, Input, Label, Textarea } from '@burdenoff/fe-libs/ui';\nimport { useDatabricksQueueForm } from '../hooks/useDatabricksQueueForm';\ntype Request = <T>(document: DocumentNode, variables: Record<string, unknown>) => Promise<T>;\n\nexport default function DatabricksQueueForm({\n request,\n runId,\n workspaceId,\n intentKey,\n onQueued,\n statusReady,\n canQueue,\n}: {\n request: Request;\n runId: string;\n workspaceId: string;\n intentKey: string;\n onQueued(): Promise<void>;\n statusReady: boolean;\n canQueue: boolean;\n}) {\n const {\n connections,\n datasets,\n connectionOffset,\n datasetOffset,\n moreConnections,\n moreDatasets,\n connectionId,\n jobId,\n name,\n parameters,\n maximum,\n inputs,\n outputs,\n confirmedCost,\n busy,\n error,\n intent,\n setConnectionId,\n setJobId,\n setName,\n setParameters,\n setMaximum,\n setInputs,\n setOutputs,\n setConfirmedCost,\n loadOptions,\n submit,\n checkSavedRequest,\n resolveSavedRequest,\n startAnotherJob,\n } = useDatabricksQueueForm({\n request,\n runId,\n workspaceId,\n intentKey,\n onQueued,\n statusReady,\n canQueue,\n });\n\n return (\n <form\n onSubmit={(event) => void submit(event)}\n className=\"space-y-4\"\n aria-label=\"Queue existing Databricks job\"\n >\n <p className=\"text-sm text-text-secondary\">\n Create an existing Custom API Key connection in Integrations first, with your AWS Databricks\n workspace base URL and PAT. Credentials stay in Integrations; do not paste them into this\n form. This queues an existing job and does not create a cluster or job.\n </p>\n <p className=\"text-sm text-text-secondary\">\n Saved request identity belongs to this tab. Inspect existing jobs before creating another\n request or opening another tab. Recovery confirms an existing execution or withdraws a\n request that has not created one; it does not cancel an existing job.\n </p>\n {canQueue ? (\n <>\n <div className=\"flex flex-wrap gap-2\">\n <Button\n type=\"button\"\n variant=\"outline\"\n disabled={busy}\n onClick={() => void loadOptions('connections')}\n >\n {connectionOffset\n ? moreConnections\n ? 'Load more connections'\n : 'Reload connections'\n : 'Load available connections'}\n </Button>\n <Button\n type=\"button\"\n variant=\"outline\"\n disabled={busy}\n onClick={() => void loadOptions('datasets')}\n >\n {datasetOffset\n ? moreDatasets\n ? 'Load more datasets'\n : 'Reload datasets'\n : 'Load lineage datasets'}\n </Button>\n </div>\n <div className=\"space-y-2\">\n <Label htmlFor=\"databricks-connection\">Existing Databricks connection</Label>\n <select\n id=\"databricks-connection\"\n className=\"w-full rounded-input border border-border-default bg-bg-primary p-2 text-text-primary\"\n value={connectionId}\n disabled={busy}\n onChange={(event) => setConnectionId(event.target.value)}\n required\n >\n <option value=\"\">Choose an available connection</option>\n {connections.map((item) => (\n <option key={item.id} value={item.id}>\n {item.name}\n </option>\n ))}\n </select>\n <p className=\"text-xs text-text-secondary\">\n Only active, usable Custom API Key connections in this workspace are listed. Their\n Databricks endpoint is validated by the service when queued.\n </p>\n </div>\n <div className=\"space-y-2\">\n <Label htmlFor=\"databricks-job\">Existing job ID</Label>\n <Input\n id=\"databricks-job\"\n inputMode=\"numeric\"\n value={jobId}\n disabled={busy}\n onChange={(event) => setJobId(event.target.value)}\n required\n />\n </div>\n <div className=\"space-y-2\">\n <Label htmlFor=\"databricks-name\">Step name</Label>\n <Input\n id=\"databricks-name\"\n maxLength={255}\n value={name}\n disabled={busy}\n onChange={(event) => setName(event.target.value)}\n required\n />\n </div>\n <div className=\"space-y-2\">\n <Label htmlFor=\"databricks-parameters\">\n Nonsecret job parameters (JSON string values)\n </Label>\n <Textarea\n id=\"databricks-parameters\"\n value={parameters}\n disabled={busy}\n onChange={(event) => setParameters(event.target.value)}\n />\n </div>\n <div className=\"space-y-2\">\n <Label htmlFor=\"databricks-deadline\">Monitoring deadline (seconds)</Label>\n <Input\n id=\"databricks-deadline\"\n type=\"number\"\n min={60}\n max={86400}\n step={1}\n value={maximum}\n disabled={busy}\n onChange={(event) => setMaximum(event.target.value)}\n required\n />\n <p className=\"text-xs text-text-secondary\">\n Expiry requests cancellation; it does not prove that external compute stopped.\n </p>\n </div>\n {(['inputs', 'outputs'] as const).map((kind) => (\n <div key={kind} className=\"space-y-2\">\n <Label htmlFor={`databricks-${kind}`}>\n {kind === 'inputs' ? 'Input datasets' : 'Declared output datasets'}\n </Label>\n <select\n id={`databricks-${kind}`}\n multiple\n className=\"w-full rounded-input border border-border-default bg-bg-primary p-2 text-text-primary\"\n value={kind === 'inputs' ? inputs : outputs}\n disabled={busy}\n onChange={(event) => {\n const ids = Array.from(event.target.selectedOptions, (option) => option.value);\n if (kind === 'inputs') setInputs(ids);\n else setOutputs(ids);\n }}\n >\n {datasets.map((item) => (\n <option key={item.id} value={item.id}>\n {item.name}\n </option>\n ))}\n </select>\n </div>\n ))}\n <p className=\"text-xs text-text-secondary\">\n Dataset links are your declared lineage. They do not prove Unity Catalog discovery or\n that a job produced output.\n </p>\n <label className=\"flex items-start gap-2 text-sm\">\n <input\n type=\"checkbox\"\n checked={confirmedCost}\n disabled={busy}\n onChange={(event) => setConfirmedCost(event.target.checked)}\n />\n I understand this job may incur charges in my Databricks account.\n </label>\n </>\n ) : (\n <p className=\"text-sm\">\n Queuing requires a run in RUNNING state. Saved request recovery remains available.\n </p>\n )}\n {intent ? (\n <p className=\"text-sm\">\n {intent.confirmedExecutionId\n ? 'The saved request has a confirmed execution.'\n : 'A request is saved. Identical-input retry keeps the same job intent; refresh status first if a response was lost.'}\n </p>\n ) : null}\n {error ? (\n <p role=\"alert\" className=\"text-sm text-status-error-text\">\n {error}\n </p>\n ) : null}\n <div className=\"flex flex-wrap gap-2\">\n {canQueue ? (\n <Button\n type=\"submit\"\n disabled={\n busy || !statusReady || !confirmedCost || Boolean(intent?.confirmedExecutionId)\n }\n >\n {busy ? 'Working…' : intent ? 'Retry same job request' : 'Queue existing job'}\n </Button>\n ) : null}\n <Button type=\"button\" variant=\"outline\" disabled={busy} onClick={checkSavedRequest}>\n Check saved request\n </Button>\n {intent && !intent.confirmedExecutionId ? (\n <Button\n type=\"button\"\n variant=\"outline\"\n disabled={busy}\n onClick={() => void resolveSavedRequest()}\n >\n Resolve saved request\n </Button>\n ) : null}\n {canQueue && intent?.confirmedExecutionId ? (\n <Button\n type=\"button\"\n variant=\"outline\"\n disabled={busy || !statusReady}\n onClick={startAnotherJob}\n >\n Start another job\n </Button>\n ) : null}\n </div>\n </form>\n );\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatabricksRunPanel.d.ts","sourceRoot":"","sources":["../../../src/cosmicintersection/components/DatabricksRunPanel.tsx"],"names":[],"mappings":"AAmKA,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EACzC,KAAK,EACL,QAAQ,EACR,YAAY,GACb,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/B,+BAgDA"}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { useCosmicIntersection as e } from "../context/CosmicIntersectionContext.js";
|
|
2
|
+
import { SafeLink as t } from "./SafeLink.js";
|
|
3
|
+
import { databricksIntentKey as n, safeLogsUrl as r } from "../lib/databricksPresentation.js";
|
|
4
|
+
import i from "./DatabricksQueueForm.js";
|
|
5
|
+
import { useDatabricksExecutions as a } from "../hooks/useDatabricksExecutions.js";
|
|
6
|
+
import { useEffect as o, useMemo as s, useState as c } from "react";
|
|
7
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
8
|
+
import { Button as d, Card as f, CardContent as p, CardHeader as m, CardTitle as h } from "@burdenoff/fe-libs/ui";
|
|
9
|
+
import { QueryClient as g, QueryClientProvider as _ } from "@tanstack/react-query";
|
|
10
|
+
//#region src/cosmicintersection/components/DatabricksRunPanel.tsx
|
|
11
|
+
var v = /* @__PURE__ */ new Set([
|
|
12
|
+
"QUEUED",
|
|
13
|
+
"SUBMITTING",
|
|
14
|
+
"RUNNING",
|
|
15
|
+
"REQUIRES_ATTENTION"
|
|
16
|
+
]);
|
|
17
|
+
function y({ scope: e, runId: t, canQueue: n, onRunChanged: r }) {
|
|
18
|
+
let { items: o, hasMore: s, loading: c, executions: g, error: _, actionId: v, offset: y, setOffset: b, setError: x, refresh: C, act: w, request: T, intentKey: E } = a({
|
|
19
|
+
scope: e,
|
|
20
|
+
runId: t,
|
|
21
|
+
onRunChanged: r
|
|
22
|
+
});
|
|
23
|
+
return /* @__PURE__ */ u(f, { children: [/* @__PURE__ */ l(m, { children: /* @__PURE__ */ l(h, { children: "Databricks jobs" }) }), /* @__PURE__ */ u(p, {
|
|
24
|
+
className: "space-y-4",
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ l("p", {
|
|
27
|
+
className: "text-sm text-text-secondary",
|
|
28
|
+
children: "Jobs run in your Databricks workspace. Databricks usage is billed by your account. Cancelling requests a stop; a job may continue until Databricks confirms it stopped."
|
|
29
|
+
}),
|
|
30
|
+
/* @__PURE__ */ l(d, {
|
|
31
|
+
variant: "outline",
|
|
32
|
+
disabled: c || v !== null,
|
|
33
|
+
onClick: () => {
|
|
34
|
+
x(null), C().catch(() => x("Could not confirm status. Retry the status read before taking another action."));
|
|
35
|
+
},
|
|
36
|
+
children: c ? "Refreshing…" : "Refresh job status"
|
|
37
|
+
}),
|
|
38
|
+
_ ? /* @__PURE__ */ l("p", {
|
|
39
|
+
role: "alert",
|
|
40
|
+
className: "text-sm text-status-error-text",
|
|
41
|
+
children: _
|
|
42
|
+
}) : null,
|
|
43
|
+
g.data?.intentRecoveryUnavailable ? /* @__PURE__ */ l("p", {
|
|
44
|
+
role: "alert",
|
|
45
|
+
className: "text-sm text-status-error-text",
|
|
46
|
+
children: "The saved request could not be recovered. Existing jobs remain available for inspection and cancellation. Do not submit another job until its request identity is recovered."
|
|
47
|
+
}) : null,
|
|
48
|
+
g.isError ? /* @__PURE__ */ l("p", {
|
|
49
|
+
role: "alert",
|
|
50
|
+
className: "text-sm text-status-error-text",
|
|
51
|
+
children: "Could not confirm Databricks status. Retry the status read before taking another action."
|
|
52
|
+
}) : null,
|
|
53
|
+
!c && !o.length && !_ && !g.isError ? /* @__PURE__ */ l("p", { children: "No Databricks jobs on this page." }) : null,
|
|
54
|
+
/* @__PURE__ */ l("ul", {
|
|
55
|
+
className: "space-y-3",
|
|
56
|
+
"aria-label": "Databricks executions",
|
|
57
|
+
children: o.map((e) => /* @__PURE__ */ l(S, {
|
|
58
|
+
item: e,
|
|
59
|
+
busy: v !== null,
|
|
60
|
+
onCancel: () => void w(e, !1),
|
|
61
|
+
onResume: () => void w(e, !0)
|
|
62
|
+
}, e.id))
|
|
63
|
+
}),
|
|
64
|
+
/* @__PURE__ */ u("div", {
|
|
65
|
+
className: "flex gap-2",
|
|
66
|
+
"aria-label": "Databricks execution pages",
|
|
67
|
+
children: [/* @__PURE__ */ l(d, {
|
|
68
|
+
variant: "outline",
|
|
69
|
+
disabled: !y || c || v !== null,
|
|
70
|
+
onClick: () => {
|
|
71
|
+
x(null), b(Math.max(0, y - 10));
|
|
72
|
+
},
|
|
73
|
+
children: "Previous jobs"
|
|
74
|
+
}), /* @__PURE__ */ l(d, {
|
|
75
|
+
variant: "outline",
|
|
76
|
+
disabled: !s || c || v !== null,
|
|
77
|
+
onClick: () => {
|
|
78
|
+
x(null), b(y + 10);
|
|
79
|
+
},
|
|
80
|
+
children: "Next jobs"
|
|
81
|
+
})]
|
|
82
|
+
}),
|
|
83
|
+
/* @__PURE__ */ l(i, {
|
|
84
|
+
canQueue: n,
|
|
85
|
+
request: T,
|
|
86
|
+
runId: t,
|
|
87
|
+
workspaceId: e.workspaceId,
|
|
88
|
+
intentKey: E,
|
|
89
|
+
onQueued: C,
|
|
90
|
+
statusReady: g.isSuccess && !c && !g.data.intentRecoveryUnavailable && _ === null
|
|
91
|
+
})
|
|
92
|
+
]
|
|
93
|
+
})] });
|
|
94
|
+
}
|
|
95
|
+
function b(e) {
|
|
96
|
+
let [t] = c(() => new g({ defaultOptions: { queries: {
|
|
97
|
+
retry: !1,
|
|
98
|
+
refetchOnWindowFocus: !1
|
|
99
|
+
} } }));
|
|
100
|
+
return o(() => () => {
|
|
101
|
+
t.cancelQueries(), t.clear();
|
|
102
|
+
}, [t]), /* @__PURE__ */ l(_, {
|
|
103
|
+
client: t,
|
|
104
|
+
children: /* @__PURE__ */ l(y, { ...e })
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
function x({ runId: t, canQueue: r, onRunChanged: i }) {
|
|
108
|
+
let a = e(), o = s(() => ({
|
|
109
|
+
apiGatewayUrl: a.apiGatewayUrl,
|
|
110
|
+
authToken: a.authToken,
|
|
111
|
+
actorId: a.currentUser?.id ?? "",
|
|
112
|
+
workspaceId: a.workspaceId ?? "",
|
|
113
|
+
tenantId: a.tenantId,
|
|
114
|
+
organizationId: a.organizationId,
|
|
115
|
+
projectId: a.projectId
|
|
116
|
+
}), [
|
|
117
|
+
a.apiGatewayUrl,
|
|
118
|
+
a.authToken,
|
|
119
|
+
a.currentUser?.id,
|
|
120
|
+
a.workspaceId,
|
|
121
|
+
a.tenantId,
|
|
122
|
+
a.organizationId,
|
|
123
|
+
a.projectId
|
|
124
|
+
]), c = s(() => {
|
|
125
|
+
try {
|
|
126
|
+
return n(o, t);
|
|
127
|
+
} catch {
|
|
128
|
+
return null;
|
|
129
|
+
}
|
|
130
|
+
}, [o, t]);
|
|
131
|
+
return !o.actorId || !o.authToken || !o.workspaceId || !o.apiGatewayUrl ? /* @__PURE__ */ l("p", {
|
|
132
|
+
role: "alert",
|
|
133
|
+
children: "Select a workspace and sign in before opening Databricks jobs."
|
|
134
|
+
}) : c === null ? /* @__PURE__ */ l("p", {
|
|
135
|
+
role: "alert",
|
|
136
|
+
children: "The Databricks gateway address is unsupported. Check the app configuration."
|
|
137
|
+
}) : /* @__PURE__ */ l(b, {
|
|
138
|
+
scope: o,
|
|
139
|
+
runId: t,
|
|
140
|
+
canQueue: r,
|
|
141
|
+
onRunChanged: i
|
|
142
|
+
}, c);
|
|
143
|
+
}
|
|
144
|
+
function S({ item: e, busy: n, onCancel: i, onResume: a }) {
|
|
145
|
+
let o = r(e.logsUrl);
|
|
146
|
+
return /* @__PURE__ */ u("li", {
|
|
147
|
+
className: "space-y-2 rounded-card border border-border-default p-4",
|
|
148
|
+
children: [
|
|
149
|
+
/* @__PURE__ */ u("p", {
|
|
150
|
+
className: "font-medium",
|
|
151
|
+
children: [
|
|
152
|
+
"Job ",
|
|
153
|
+
e.jobId,
|
|
154
|
+
" · ",
|
|
155
|
+
e.state.replaceAll("_", " ")
|
|
156
|
+
]
|
|
157
|
+
}),
|
|
158
|
+
e.state === "REQUIRES_ATTENTION" ? /* @__PURE__ */ l("p", {
|
|
159
|
+
className: "text-sm",
|
|
160
|
+
children: "Monitoring needs attention. This does not mean the external job stopped. Repair its existing connection, then resume monitoring."
|
|
161
|
+
}) : null,
|
|
162
|
+
e.cancelRequested ? /* @__PURE__ */ l("p", {
|
|
163
|
+
className: "text-sm",
|
|
164
|
+
children: "Cancellation requested; waiting for a confirmed terminal state."
|
|
165
|
+
}) : null,
|
|
166
|
+
/* @__PURE__ */ u("p", {
|
|
167
|
+
className: "text-sm text-text-secondary",
|
|
168
|
+
children: ["Deadline: ", new Date(e.deadlineAt).toLocaleString()]
|
|
169
|
+
}),
|
|
170
|
+
/* @__PURE__ */ u("p", {
|
|
171
|
+
className: "text-sm text-text-secondary",
|
|
172
|
+
children: [
|
|
173
|
+
"Declared lineage: ",
|
|
174
|
+
e.inputDatasetIds.length,
|
|
175
|
+
" input datasets,",
|
|
176
|
+
" ",
|
|
177
|
+
e.outputDatasetIds.length,
|
|
178
|
+
" output datasets."
|
|
179
|
+
]
|
|
180
|
+
}),
|
|
181
|
+
o ? /* @__PURE__ */ l(t, {
|
|
182
|
+
href: o,
|
|
183
|
+
className: "underline",
|
|
184
|
+
children: "Open authenticated Databricks logs"
|
|
185
|
+
}) : null,
|
|
186
|
+
/* @__PURE__ */ u("div", {
|
|
187
|
+
className: "flex flex-wrap gap-2",
|
|
188
|
+
children: [v.has(e.state) && !e.cancelRequested ? /* @__PURE__ */ l(d, {
|
|
189
|
+
variant: "outline",
|
|
190
|
+
disabled: n,
|
|
191
|
+
onClick: i,
|
|
192
|
+
children: "Request cancellation"
|
|
193
|
+
}) : null, e.state === "REQUIRES_ATTENTION" ? /* @__PURE__ */ l(d, {
|
|
194
|
+
variant: "outline",
|
|
195
|
+
disabled: n,
|
|
196
|
+
onClick: a,
|
|
197
|
+
children: "Resume monitoring"
|
|
198
|
+
}) : null]
|
|
199
|
+
})
|
|
200
|
+
]
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
//#endregion
|
|
204
|
+
export { x as default };
|
|
205
|
+
|
|
206
|
+
//# sourceMappingURL=DatabricksRunPanel.js.map
|