@burdenoff/fe-libs 2026.1114.1 → 2026.1114.3
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/admin-overview/AdminOverviewList.d.ts +8 -0
- package/dist/admin-overview/AdminOverviewList.js +217 -0
- package/dist/admin-overview/AdminOverviewPage.d.ts +7 -0
- package/dist/admin-overview/AdminOverviewPage.js +286 -199
- package/dist/admin-overview/adminOverviewModel.d.ts +44 -0
- package/dist/admin-overview/adminOverviewModel.js +48 -0
- package/dist/admin-overview/nodes/ProjectNode.js +30 -29
- package/dist/admin-overview/nodes/TenantNode.js +33 -32
- package/dist/admin-overview/operations.d.ts +10 -0
- package/dist/admin-overview/operations.js +41 -2
- package/dist/node_modules/web-vitals/dist/web-vitals.js +280 -191
- package/package.json +5 -5
|
@@ -1,35 +1,39 @@
|
|
|
1
|
-
import { GET_ADMIN_OVERVIEW_CONTEXT as e,
|
|
2
|
-
import { buildHierarchyGraph as
|
|
3
|
-
import { useShellNavigate as
|
|
4
|
-
import { AdminOverviewActionsProvider as
|
|
5
|
-
import { OrganizationNode as
|
|
6
|
-
import { WorkspaceNode as
|
|
7
|
-
import { TenantNode as
|
|
8
|
-
import { ProjectNode as
|
|
1
|
+
import { GET_ADMIN_OVERVIEW_CONTEXT as e, GET_ADMIN_OVERVIEW_CONTEXT_WITH_COUNTS as t, GET_MY_PROJECTS_DOC as n } from "./operations.js";
|
|
2
|
+
import { buildHierarchyGraph as r } from "./buildHierarchyGraph.js";
|
|
3
|
+
import { useShellNavigate as i } from "../shared/utils/appHelpers.js";
|
|
4
|
+
import { AdminOverviewActionsProvider as a } from "./AdminOverviewActionsContext.js";
|
|
5
|
+
import { OrganizationNode as o } from "./nodes/OrganizationNode.js";
|
|
6
|
+
import { WorkspaceNode as s } from "./nodes/WorkspaceNode.js";
|
|
7
|
+
import { TenantNode as c } from "./nodes/TenantNode.js";
|
|
8
|
+
import { ProjectNode as l } from "./nodes/ProjectNode.js";
|
|
9
|
+
import { AdminOverviewList as u } from "./AdminOverviewList.js";
|
|
10
|
+
import { summarizeOverview as ee, technicalDetailsText as te } from "./adminOverviewModel.js";
|
|
11
|
+
import { PageTabs as d } from "../ui/page-tabs.js";
|
|
9
12
|
import "../shared-utils.js";
|
|
10
|
-
import { graphqlFetch as
|
|
11
|
-
import { useI18n as
|
|
12
|
-
import { impactFeedback as
|
|
13
|
-
import { showNativeToast as
|
|
13
|
+
import { graphqlFetch as f } from "../shared/graphql/fetch.js";
|
|
14
|
+
import { useI18n as p } from "../shared/providers/shell/I18nProvider.js";
|
|
15
|
+
import { impactFeedback as m, notificationFeedback as ne, selectionFeedback as re } from "../shell-native/feedback.js";
|
|
16
|
+
import { showNativeToast as ie } from "../shell-native/toast.js";
|
|
14
17
|
import "../shell-native.js";
|
|
15
|
-
import { useCallback as
|
|
16
|
-
import { AlertCircle as
|
|
17
|
-
import { Fragment as
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
18
|
+
import { useCallback as h, useEffect as g, useMemo as _, useReducer as ae, useRef as oe, useState as v } from "react";
|
|
19
|
+
import { AlertCircle as y, Building as b, Building2 as x, Download as se, Layers as S, LayoutGrid as C, Network as w, Package as T, RefreshCcw as E } from "lucide-react";
|
|
20
|
+
import { Fragment as ce, jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
21
|
+
import { useLocation as k } from "react-router";
|
|
22
|
+
import { useQuery as le } from "@apollo/client/react";
|
|
23
|
+
import { Background as A, BackgroundVariant as j, Controls as M, MiniMap as N, Panel as P, ReactFlow as F, ReactFlowProvider as I, applyEdgeChanges as ue, applyNodeChanges as de, useReactFlow as fe } from "@xyflow/react";
|
|
20
24
|
import "@xyflow/react/dist/style.css";
|
|
21
25
|
// src/admin-overview/AdminOverviewPage.tsx
|
|
22
|
-
var R = {
|
|
23
|
-
organization:
|
|
24
|
-
workspace:
|
|
25
|
-
tenant:
|
|
26
|
-
project:
|
|
27
|
-
},
|
|
26
|
+
var L = "graph", R = {
|
|
27
|
+
organization: o,
|
|
28
|
+
workspace: s,
|
|
29
|
+
tenant: c,
|
|
30
|
+
project: l
|
|
31
|
+
}, pe = {
|
|
28
32
|
byWorkspace: {},
|
|
29
33
|
loadingFor: /* @__PURE__ */ new Set(),
|
|
30
34
|
error: null
|
|
31
35
|
};
|
|
32
|
-
function
|
|
36
|
+
function me(e, t) {
|
|
33
37
|
switch (t.type) {
|
|
34
38
|
case "loadStart": {
|
|
35
39
|
let n = new Set(e.loadingFor);
|
|
@@ -66,124 +70,124 @@ function B(e, t) {
|
|
|
66
70
|
default: return e;
|
|
67
71
|
}
|
|
68
72
|
}
|
|
69
|
-
function
|
|
70
|
-
return /* @__PURE__ */
|
|
73
|
+
function z(e) {
|
|
74
|
+
return /* @__PURE__ */ D(I, { children: /* @__PURE__ */ D(B, { ...e }) });
|
|
71
75
|
}
|
|
72
|
-
function
|
|
73
|
-
let
|
|
74
|
-
let n =
|
|
76
|
+
function B({ authToken: a, variant: o = "default" }) {
|
|
77
|
+
let s = o === "fluidgrids", c = i(), { fitView: l } = fe(), { t: d } = p(), y = h((e, t) => {
|
|
78
|
+
let n = d(e);
|
|
75
79
|
return n === e ? t : n;
|
|
76
|
-
}, [
|
|
80
|
+
}, [d]), b = le(s ? t : e, {
|
|
77
81
|
variables: {
|
|
78
82
|
limit: 100,
|
|
79
83
|
offset: 0
|
|
80
84
|
},
|
|
81
85
|
fetchPolicy: "cache-and-network"
|
|
82
|
-
}),
|
|
83
|
-
|
|
86
|
+
}), x = _(() => !!(b.data?.myOrganizations?.hasMore || b.data?.myWorkspaces?.hasMore || b.data?.myTenants?.hasMore), [b.data]), [se, S] = ae(me, pe), { byWorkspace: C, loadingFor: w, error: T } = se, [E, k] = v(null), A = _(() => b.data?.myOrganizations?.items ?? [], [b.data]), j = _(() => b.data?.myWorkspaces?.items ?? [], [b.data]), M = _(() => b.data?.myTenants?.items ?? [], [b.data]), N = oe({}), P = h(async (e) => {
|
|
87
|
+
S({
|
|
84
88
|
type: "loadStart",
|
|
85
89
|
workspaceId: e
|
|
86
90
|
});
|
|
87
91
|
try {
|
|
88
|
-
let
|
|
89
|
-
if (!
|
|
90
|
-
let r =
|
|
92
|
+
let t = j.find((t) => t.id === e);
|
|
93
|
+
if (!t) throw Error("Workspace not found in current context");
|
|
94
|
+
let r = t.organizationId ?? t.tenantId;
|
|
91
95
|
if (!r) throw Error("Workspace is missing organization/tenant context and cannot be scoped");
|
|
92
|
-
let
|
|
93
|
-
if (!
|
|
94
|
-
let t = await
|
|
96
|
+
let i = N.current[e];
|
|
97
|
+
if (!i) {
|
|
98
|
+
let t = await f({
|
|
95
99
|
gateway: "workspace",
|
|
96
100
|
query: "mutation AdminOverviewIssueWorkspaceToken($input: IssueWorkspaceTokenInput!) {\n issueWorkspaceToken(input: $input) { success token }\n }",
|
|
97
101
|
variables: { input: {
|
|
98
102
|
organizationId: r,
|
|
99
103
|
workspaceId: e
|
|
100
104
|
} },
|
|
101
|
-
authToken:
|
|
105
|
+
authToken: a
|
|
102
106
|
});
|
|
103
107
|
if (t.errors && t.errors.length > 0) throw Error(`Token issue failed: ${t.errors.map((e) => e.message).join("; ")}`);
|
|
104
108
|
let n = t.data?.issueWorkspaceToken;
|
|
105
109
|
if (!n?.success || !n.token) throw Error("Could not issue workspace token");
|
|
106
|
-
|
|
110
|
+
i = n.token, N.current[e] = i;
|
|
107
111
|
}
|
|
108
|
-
let o = await
|
|
112
|
+
let o = await f({
|
|
109
113
|
gateway: "workspace",
|
|
110
|
-
query:
|
|
114
|
+
query: n,
|
|
111
115
|
variables: { pagination: { limit: 100 } },
|
|
112
|
-
authToken:
|
|
113
|
-
workspaceToken:
|
|
116
|
+
authToken: a,
|
|
117
|
+
workspaceToken: i,
|
|
114
118
|
workspaceId: e,
|
|
115
119
|
organizationId: r
|
|
116
120
|
});
|
|
117
|
-
if (o.errors && o.errors.length > 0) throw o.errors.some((e) => e.extensions?.code === "TOKEN_EXPIRED") && delete
|
|
121
|
+
if (o.errors && o.errors.length > 0) throw o.errors.some((e) => e.extensions?.code === "TOKEN_EXPIRED") && delete N.current[e], Error(o.errors.map((e) => e.message).join("; "));
|
|
118
122
|
let s = o.data?.myProjects?.items ?? [];
|
|
119
|
-
|
|
123
|
+
S({
|
|
120
124
|
type: "loadSuccess",
|
|
121
125
|
workspaceId: e,
|
|
122
126
|
projects: s
|
|
123
127
|
});
|
|
124
128
|
} catch (t) {
|
|
125
129
|
let n = t instanceof Error ? t.message : String(t);
|
|
126
|
-
|
|
130
|
+
S({
|
|
127
131
|
type: "loadFailure",
|
|
128
132
|
workspaceId: e,
|
|
129
133
|
error: `Failed to load projects: ${n}`
|
|
130
|
-
}),
|
|
134
|
+
}), ne("error"), ie(y("adminOverviewPage.errorLoadProjects", "Failed to load projects"), "long");
|
|
131
135
|
}
|
|
132
136
|
}, [
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
]),
|
|
137
|
-
|
|
138
|
-
}, [
|
|
139
|
-
|
|
140
|
-
}, [
|
|
141
|
-
|
|
142
|
-
!
|
|
137
|
+
a,
|
|
138
|
+
j,
|
|
139
|
+
y
|
|
140
|
+
]), F = h((e) => {
|
|
141
|
+
m("light"), c(`/workspaces/${e}`);
|
|
142
|
+
}, [c]), I = h(() => {
|
|
143
|
+
m("light"), b.refetch(), S({ type: "reset" }), k(null), N.current = {};
|
|
144
|
+
}, [b]), L = h(() => {
|
|
145
|
+
m("medium"), j.forEach((e) => {
|
|
146
|
+
!C[e.id] && !w.has(e.id) && P(e.id);
|
|
143
147
|
});
|
|
144
148
|
}, [
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
]),
|
|
150
|
-
|
|
151
|
-
}, []), { nodes:
|
|
152
|
-
organizations:
|
|
153
|
-
workspaces:
|
|
154
|
-
tenants:
|
|
155
|
-
projectsByWorkspace:
|
|
156
|
-
loadingProjectsFor:
|
|
157
|
-
selectedId:
|
|
149
|
+
j,
|
|
150
|
+
C,
|
|
151
|
+
w,
|
|
152
|
+
P
|
|
153
|
+
]), R = h((e, t) => {
|
|
154
|
+
re(), k(t.id);
|
|
155
|
+
}, []), { nodes: z, edges: B } = _(() => r({
|
|
156
|
+
organizations: A,
|
|
157
|
+
workspaces: j,
|
|
158
|
+
tenants: M,
|
|
159
|
+
projectsByWorkspace: C,
|
|
160
|
+
loadingProjectsFor: w,
|
|
161
|
+
selectedId: E
|
|
158
162
|
}), [
|
|
159
|
-
O,
|
|
160
|
-
k,
|
|
161
163
|
A,
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
C
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
queueMicrotask(() =>
|
|
173
|
-
}, [
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
164
|
+
j,
|
|
165
|
+
M,
|
|
166
|
+
C,
|
|
167
|
+
w,
|
|
168
|
+
E
|
|
169
|
+
]), W = _(() => ({
|
|
170
|
+
onLoadProjects: P,
|
|
171
|
+
onManageWorkspace: F
|
|
172
|
+
}), [P, F]), [G, K] = v(z), [q, Y] = v(B);
|
|
173
|
+
g(() => {
|
|
174
|
+
queueMicrotask(() => K(z));
|
|
175
|
+
}, [z]), g(() => {
|
|
176
|
+
queueMicrotask(() => Y(B));
|
|
177
|
+
}, [B]);
|
|
178
|
+
let ge = h((e) => K((t) => de(e, t)), []), _e = h((e) => Y((t) => ue(e, t)), []), ve = Object.keys(C).length, X = z.length;
|
|
179
|
+
g(() => {
|
|
180
|
+
if (X === 0) return;
|
|
177
181
|
let e = 0, t = window.requestAnimationFrame(() => {
|
|
178
182
|
e = window.requestAnimationFrame(() => {
|
|
179
|
-
|
|
183
|
+
l({
|
|
180
184
|
padding: .2,
|
|
181
185
|
duration: 500,
|
|
182
186
|
includeHiddenNodes: !1
|
|
183
187
|
});
|
|
184
188
|
});
|
|
185
189
|
}), n = window.setTimeout(() => {
|
|
186
|
-
|
|
190
|
+
l({
|
|
187
191
|
padding: .2,
|
|
188
192
|
duration: 500,
|
|
189
193
|
includeHiddenNodes: !1
|
|
@@ -193,89 +197,132 @@ function H({ authToken: i }) {
|
|
|
193
197
|
window.cancelAnimationFrame(t), e && window.cancelAnimationFrame(e), window.clearTimeout(n);
|
|
194
198
|
};
|
|
195
199
|
}, [
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
200
|
+
l,
|
|
201
|
+
X,
|
|
202
|
+
ve
|
|
203
|
+
]);
|
|
204
|
+
let Z = b.loading && !b.data, Q = b.error?.message || T, ye = _(() => Object.values(C).reduce((e, t) => e + (t?.length ?? 0), 0), [C]), $ = !Z && A.length === 0 && j.length === 0 && M.length === 0, be = h(() => k(null), []), xe = _(() => ee(A, j), [A, j]), Se = _(() => te(M, A, j), [
|
|
205
|
+
M,
|
|
206
|
+
A,
|
|
207
|
+
j
|
|
199
208
|
]);
|
|
200
|
-
|
|
201
|
-
|
|
209
|
+
return s ? /* @__PURE__ */ D(he, {
|
|
210
|
+
tr: y,
|
|
211
|
+
isInitialLoading: Z,
|
|
212
|
+
isEmpty: $,
|
|
213
|
+
list: /* @__PURE__ */ D(u, {
|
|
214
|
+
summary: xe,
|
|
215
|
+
technicalDetails: Se,
|
|
216
|
+
tr: y
|
|
217
|
+
}),
|
|
218
|
+
banners: /* @__PURE__ */ O(ce, { children: [Q ? /* @__PURE__ */ D(H, { message: Q }) : null, x ? /* @__PURE__ */ D(H, { message: y("adminOverviewPage.truncatedWarning", "Some lists are truncated (more than 100 items). Not all organizations, workspaces or tenants are shown.") }) : null] }),
|
|
219
|
+
graph: /* @__PURE__ */ O("div", {
|
|
220
|
+
className: "flex flex-col overflow-hidden rounded-card border border-border-subtle",
|
|
221
|
+
style: { height: "clamp(560px, calc(100dvh - 16rem), 900px)" },
|
|
222
|
+
"data-testid": "admin-overview-page",
|
|
223
|
+
children: [/* @__PURE__ */ D(V, {
|
|
224
|
+
organizationsCount: A.length,
|
|
225
|
+
workspacesCount: j.length,
|
|
226
|
+
tenantsCount: M.length,
|
|
227
|
+
totalProjects: ye,
|
|
228
|
+
onLoadAllProjects: L,
|
|
229
|
+
onRefresh: I,
|
|
230
|
+
headingLevel: 2
|
|
231
|
+
}), /* @__PURE__ */ D(U, {
|
|
232
|
+
nodes: G,
|
|
233
|
+
edges: q,
|
|
234
|
+
onNodesChange: ge,
|
|
235
|
+
onEdgesChange: _e,
|
|
236
|
+
onNodeClick: R,
|
|
237
|
+
onPaneClick: be,
|
|
238
|
+
selectedId: E,
|
|
239
|
+
actions: W,
|
|
240
|
+
isInitialLoading: Z,
|
|
241
|
+
isEmpty: $
|
|
242
|
+
})]
|
|
243
|
+
})
|
|
244
|
+
}) : /* @__PURE__ */ D("div", {
|
|
202
245
|
className: "flex flex-col",
|
|
203
246
|
style: {
|
|
204
247
|
height: "clamp(640px, calc(100dvh - 11rem), 980px)",
|
|
205
248
|
background: "var(--color-bg-page, var(--color-bg-surface))"
|
|
206
249
|
},
|
|
207
250
|
"data-testid": "admin-overview-page",
|
|
208
|
-
children:
|
|
251
|
+
children: Z ? /* @__PURE__ */ D("div", {
|
|
209
252
|
className: "flex flex-1 items-center justify-center",
|
|
210
|
-
children: /* @__PURE__ */
|
|
211
|
-
}) : /* @__PURE__ */
|
|
212
|
-
/* @__PURE__ */
|
|
213
|
-
organizationsCount:
|
|
214
|
-
workspacesCount:
|
|
215
|
-
tenantsCount:
|
|
216
|
-
totalProjects:
|
|
217
|
-
onLoadAllProjects:
|
|
218
|
-
onRefresh:
|
|
253
|
+
children: /* @__PURE__ */ D(J, {})
|
|
254
|
+
}) : /* @__PURE__ */ O(ce, { children: [
|
|
255
|
+
/* @__PURE__ */ D(V, {
|
|
256
|
+
organizationsCount: A.length,
|
|
257
|
+
workspacesCount: j.length,
|
|
258
|
+
tenantsCount: M.length,
|
|
259
|
+
totalProjects: ye,
|
|
260
|
+
onLoadAllProjects: L,
|
|
261
|
+
onRefresh: I
|
|
219
262
|
}),
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
/* @__PURE__ */
|
|
223
|
-
nodes:
|
|
224
|
-
edges:
|
|
225
|
-
onNodesChange:
|
|
226
|
-
onEdgesChange:
|
|
227
|
-
onNodeClick:
|
|
228
|
-
onPaneClick:
|
|
229
|
-
selectedId:
|
|
230
|
-
actions:
|
|
231
|
-
isInitialLoading:
|
|
232
|
-
isEmpty:
|
|
263
|
+
Q ? /* @__PURE__ */ D(H, { message: Q }) : null,
|
|
264
|
+
x ? /* @__PURE__ */ D(H, { message: y("adminOverviewPage.truncatedWarning", "Some lists are truncated (more than 100 items). Not all organizations, workspaces or tenants are shown.") }) : null,
|
|
265
|
+
/* @__PURE__ */ D(U, {
|
|
266
|
+
nodes: G,
|
|
267
|
+
edges: q,
|
|
268
|
+
onNodesChange: ge,
|
|
269
|
+
onEdgesChange: _e,
|
|
270
|
+
onNodeClick: R,
|
|
271
|
+
onPaneClick: be,
|
|
272
|
+
selectedId: E,
|
|
273
|
+
actions: W,
|
|
274
|
+
isInitialLoading: Z,
|
|
275
|
+
isEmpty: $
|
|
233
276
|
})
|
|
234
277
|
] })
|
|
235
278
|
});
|
|
236
279
|
}
|
|
237
|
-
function
|
|
238
|
-
let { t:
|
|
239
|
-
let n =
|
|
280
|
+
function V({ headingLevel: e = 1, organizationsCount: t, workspacesCount: n, tenantsCount: r, totalProjects: i, onLoadAllProjects: a, onRefresh: o }) {
|
|
281
|
+
let { t: s } = p(), c = (e, t) => {
|
|
282
|
+
let n = s(e);
|
|
240
283
|
return n === e ? t : n;
|
|
241
284
|
};
|
|
242
|
-
return /* @__PURE__ */
|
|
243
|
-
className: "flex items-center justify-between px-6 py-4 border-b shrink-0",
|
|
285
|
+
return /* @__PURE__ */ O("header", {
|
|
286
|
+
className: e === 1 ? "flex items-center justify-between px-6 py-4 border-b shrink-0" : "flex flex-wrap items-center justify-between gap-3 px-4 py-3 border-b shrink-0",
|
|
244
287
|
style: {
|
|
245
288
|
borderColor: "var(--color-border-default)",
|
|
246
289
|
background: "var(--color-bg-surface)"
|
|
247
290
|
},
|
|
248
|
-
children: [/* @__PURE__ */
|
|
291
|
+
children: [/* @__PURE__ */ O("div", {
|
|
249
292
|
className: "flex items-center gap-3",
|
|
250
|
-
children: [/* @__PURE__ */
|
|
293
|
+
children: [/* @__PURE__ */ D("div", {
|
|
251
294
|
className: "p-2 rounded-lg",
|
|
252
295
|
style: {
|
|
253
296
|
background: "var(--color-bg-subtle, var(--color-bg-surface))",
|
|
254
297
|
color: "var(--color-action-primary-bg)"
|
|
255
298
|
},
|
|
256
|
-
children: /* @__PURE__ */
|
|
257
|
-
}), /* @__PURE__ */
|
|
299
|
+
children: /* @__PURE__ */ D(w, { size: 20 })
|
|
300
|
+
}), /* @__PURE__ */ O("div", { children: [e === 1 ? /* @__PURE__ */ D("h1", {
|
|
301
|
+
className: "text-lg font-semibold",
|
|
302
|
+
style: { color: "var(--color-text-primary)" },
|
|
303
|
+
children: c("adminOverviewPage.title", "Administration Overview")
|
|
304
|
+
}) : /* @__PURE__ */ D("h2", {
|
|
258
305
|
className: "text-lg font-semibold",
|
|
259
306
|
style: { color: "var(--color-text-primary)" },
|
|
260
|
-
children:
|
|
261
|
-
}), /* @__PURE__ */
|
|
307
|
+
children: c("adminOverviewPage.graphTitle", "Organization graph")
|
|
308
|
+
}), /* @__PURE__ */ D("p", {
|
|
262
309
|
className: "text-xs",
|
|
263
310
|
style: { color: "var(--color-text-secondary)" },
|
|
264
|
-
children:
|
|
311
|
+
children: c("adminOverviewPage.subtitle", "Organization → Workspace → Project hierarchy, with tenant placement")
|
|
265
312
|
})] })]
|
|
266
|
-
}), /* @__PURE__ */
|
|
267
|
-
className: "flex items-center gap-4",
|
|
313
|
+
}), /* @__PURE__ */ O("div", {
|
|
314
|
+
className: e === 1 ? "flex items-center gap-4" : "flex flex-wrap items-center gap-2",
|
|
268
315
|
children: [
|
|
269
|
-
/* @__PURE__ */
|
|
270
|
-
organizations:
|
|
271
|
-
workspaces:
|
|
272
|
-
tenants:
|
|
273
|
-
projects:
|
|
316
|
+
/* @__PURE__ */ D(W, {
|
|
317
|
+
organizations: t,
|
|
318
|
+
workspaces: n,
|
|
319
|
+
tenants: r,
|
|
320
|
+
projects: i
|
|
274
321
|
}),
|
|
275
|
-
/* @__PURE__ */
|
|
322
|
+
/* @__PURE__ */ O("button", {
|
|
276
323
|
type: "button",
|
|
277
|
-
onClick:
|
|
278
|
-
disabled:
|
|
324
|
+
onClick: a,
|
|
325
|
+
disabled: n === 0,
|
|
279
326
|
className: "inline-flex items-center gap-1.5 px-3 py-1.5 rounded-md border text-sm cursor-pointer transition-all duration-150 hover:bg-[color:var(--color-action-primary-bg)]/10 disabled:opacity-50 disabled:cursor-not-allowed whitespace-nowrap",
|
|
280
327
|
style: {
|
|
281
328
|
borderColor: "var(--color-action-primary-bg)",
|
|
@@ -283,12 +330,12 @@ function oe({ organizationsCount: e, workspacesCount: t, tenantsCount: n, totalP
|
|
|
283
330
|
background: "transparent"
|
|
284
331
|
},
|
|
285
332
|
"data-testid": "admin-overview-load-all-projects",
|
|
286
|
-
title:
|
|
287
|
-
children: [/* @__PURE__ */
|
|
333
|
+
title: c("adminOverviewPage.loadAllProjectsTooltip", "Load projects for every workspace"),
|
|
334
|
+
children: [/* @__PURE__ */ D(se, { size: 14 }), c("adminOverviewPage.loadAllProjects", "Load all projects")]
|
|
288
335
|
}),
|
|
289
|
-
/* @__PURE__ */
|
|
336
|
+
/* @__PURE__ */ O("button", {
|
|
290
337
|
type: "button",
|
|
291
|
-
onClick:
|
|
338
|
+
onClick: o,
|
|
292
339
|
className: "inline-flex items-center gap-1.5 px-3 py-1.5 rounded-md border text-sm cursor-pointer transition-all duration-150 hover:bg-action-ghost-bgHover whitespace-nowrap",
|
|
293
340
|
style: {
|
|
294
341
|
borderColor: "var(--color-border-default)",
|
|
@@ -296,14 +343,14 @@ function oe({ organizationsCount: e, workspacesCount: t, tenantsCount: n, totalP
|
|
|
296
343
|
background: "var(--color-bg-surface)"
|
|
297
344
|
},
|
|
298
345
|
"data-testid": "admin-overview-refresh",
|
|
299
|
-
children: [/* @__PURE__ */
|
|
346
|
+
children: [/* @__PURE__ */ D(E, { size: 14 }), c("adminOverviewPage.refresh", "Refresh")]
|
|
300
347
|
})
|
|
301
348
|
]
|
|
302
349
|
})]
|
|
303
350
|
});
|
|
304
351
|
}
|
|
305
|
-
function
|
|
306
|
-
return /* @__PURE__ */
|
|
352
|
+
function H({ message: e }) {
|
|
353
|
+
return /* @__PURE__ */ O("div", {
|
|
307
354
|
className: "flex items-center gap-2 px-6 py-2 border-b text-sm",
|
|
308
355
|
style: {
|
|
309
356
|
borderColor: "var(--color-border-default)",
|
|
@@ -311,15 +358,15 @@ function U({ message: e }) {
|
|
|
311
358
|
color: "var(--color-status-error-text)"
|
|
312
359
|
},
|
|
313
360
|
"data-testid": "admin-overview-error",
|
|
314
|
-
children: [/* @__PURE__ */
|
|
361
|
+
children: [/* @__PURE__ */ D(y, { size: 14 }), /* @__PURE__ */ D("span", { children: e })]
|
|
315
362
|
});
|
|
316
363
|
}
|
|
317
|
-
function
|
|
318
|
-
return /* @__PURE__ */
|
|
364
|
+
function U({ nodes: e, edges: t, onNodesChange: n, onEdgesChange: r, onNodeClick: i, onPaneClick: o, selectedId: s, actions: c, isInitialLoading: l, isEmpty: u }) {
|
|
365
|
+
return /* @__PURE__ */ O("div", {
|
|
319
366
|
className: "flex-1 min-h-0 relative",
|
|
320
|
-
children: [l ? /* @__PURE__ */
|
|
367
|
+
children: [l ? /* @__PURE__ */ D(J, {}) : u ? /* @__PURE__ */ D(Y, {}) : null, /* @__PURE__ */ D(a, {
|
|
321
368
|
actions: c,
|
|
322
|
-
children: /* @__PURE__ */
|
|
369
|
+
children: /* @__PURE__ */ O(F, {
|
|
323
370
|
nodes: e,
|
|
324
371
|
edges: t,
|
|
325
372
|
onNodesChange: n,
|
|
@@ -329,24 +376,24 @@ function se({ nodes: e, edges: t, onNodesChange: n, onEdgesChange: r, onNodeClic
|
|
|
329
376
|
fitViewOptions: { padding: .25 },
|
|
330
377
|
minZoom: .15,
|
|
331
378
|
maxZoom: 1.5,
|
|
332
|
-
onNodeClick:
|
|
379
|
+
onNodeClick: i,
|
|
333
380
|
onPaneClick: o,
|
|
334
381
|
proOptions: { hideAttribution: !0 },
|
|
335
382
|
defaultEdgeOptions: { type: "smoothstep" },
|
|
336
383
|
children: [
|
|
337
|
-
/* @__PURE__ */
|
|
338
|
-
variant:
|
|
384
|
+
/* @__PURE__ */ D(A, {
|
|
385
|
+
variant: j.Dots,
|
|
339
386
|
gap: 20,
|
|
340
387
|
size: 1,
|
|
341
388
|
color: "var(--color-border-default)"
|
|
342
389
|
}),
|
|
343
|
-
/* @__PURE__ */
|
|
390
|
+
/* @__PURE__ */ D(M, { style: {
|
|
344
391
|
background: "var(--color-bg-surface)",
|
|
345
392
|
border: "1px solid var(--color-border-default)",
|
|
346
393
|
borderRadius: 8,
|
|
347
394
|
overflow: "hidden"
|
|
348
395
|
} }),
|
|
349
|
-
/* @__PURE__ */
|
|
396
|
+
/* @__PURE__ */ D(N, {
|
|
350
397
|
pannable: !0,
|
|
351
398
|
zoomable: !0,
|
|
352
399
|
style: {
|
|
@@ -364,13 +411,13 @@ function se({ nodes: e, edges: t, onNodesChange: n, onEdgesChange: r, onNodeClic
|
|
|
364
411
|
}
|
|
365
412
|
}
|
|
366
413
|
}),
|
|
367
|
-
/* @__PURE__ */
|
|
414
|
+
/* @__PURE__ */ D(P, {
|
|
368
415
|
position: "top-left",
|
|
369
|
-
children: /* @__PURE__ */
|
|
416
|
+
children: /* @__PURE__ */ D(K, {})
|
|
370
417
|
}),
|
|
371
|
-
s ? /* @__PURE__ */
|
|
418
|
+
s ? /* @__PURE__ */ D(P, {
|
|
372
419
|
position: "bottom-center",
|
|
373
|
-
children: /* @__PURE__ */
|
|
420
|
+
children: /* @__PURE__ */ D("div", {
|
|
374
421
|
className: "px-3 py-1.5 rounded-full border text-xs shadow-sm",
|
|
375
422
|
style: {
|
|
376
423
|
background: "var(--color-bg-surface)",
|
|
@@ -386,34 +433,34 @@ function se({ nodes: e, edges: t, onNodesChange: n, onEdgesChange: r, onNodeClic
|
|
|
386
433
|
});
|
|
387
434
|
}
|
|
388
435
|
function W({ organizations: e, workspaces: t, tenants: n, projects: r }) {
|
|
389
|
-
let { t: i } =
|
|
436
|
+
let { t: i } = p(), a = (e, t) => {
|
|
390
437
|
let n = i(e);
|
|
391
438
|
return n === e ? t : n;
|
|
392
439
|
};
|
|
393
|
-
return /* @__PURE__ */
|
|
440
|
+
return /* @__PURE__ */ O("div", {
|
|
394
441
|
className: "flex items-center gap-2 text-xs",
|
|
395
442
|
children: [
|
|
396
|
-
/* @__PURE__ */
|
|
397
|
-
icon: /* @__PURE__ */
|
|
443
|
+
/* @__PURE__ */ D(G, {
|
|
444
|
+
icon: /* @__PURE__ */ D(b, { size: 12 }),
|
|
398
445
|
label: `${e} ${a("adminOverviewPage.statsOrgs", "orgs")}`
|
|
399
446
|
}),
|
|
400
|
-
/* @__PURE__ */
|
|
401
|
-
icon: /* @__PURE__ */
|
|
447
|
+
/* @__PURE__ */ D(G, {
|
|
448
|
+
icon: /* @__PURE__ */ D(C, { size: 12 }),
|
|
402
449
|
label: `${t} ${a("adminOverviewPage.statsWorkspaces", "workspaces")}`
|
|
403
450
|
}),
|
|
404
|
-
/* @__PURE__ */
|
|
405
|
-
icon: /* @__PURE__ */
|
|
451
|
+
/* @__PURE__ */ D(G, {
|
|
452
|
+
icon: /* @__PURE__ */ D(x, { size: 12 }),
|
|
406
453
|
label: `${n} ${a("adminOverviewPage.statsTenants", "tenants")}`
|
|
407
454
|
}),
|
|
408
|
-
r > 0 ? /* @__PURE__ */
|
|
409
|
-
icon: /* @__PURE__ */ T
|
|
455
|
+
r > 0 ? /* @__PURE__ */ D(G, {
|
|
456
|
+
icon: /* @__PURE__ */ D(T, { size: 12 }),
|
|
410
457
|
label: `${r} ${a("adminOverviewPage.statsProjects", "projects")}`
|
|
411
458
|
}) : null
|
|
412
459
|
]
|
|
413
460
|
});
|
|
414
461
|
}
|
|
415
462
|
function G({ icon: e, label: t }) {
|
|
416
|
-
return /* @__PURE__ */
|
|
463
|
+
return /* @__PURE__ */ O("span", {
|
|
417
464
|
className: "inline-flex items-center gap-1 px-2 py-1 rounded-md border whitespace-nowrap",
|
|
418
465
|
style: {
|
|
419
466
|
borderColor: "var(--color-border-default)",
|
|
@@ -424,11 +471,11 @@ function G({ icon: e, label: t }) {
|
|
|
424
471
|
});
|
|
425
472
|
}
|
|
426
473
|
function K() {
|
|
427
|
-
let { t: e } =
|
|
474
|
+
let { t: e } = p(), t = (t, n) => {
|
|
428
475
|
let r = e(t);
|
|
429
476
|
return r === t ? n : r;
|
|
430
477
|
};
|
|
431
|
-
return /* @__PURE__ */
|
|
478
|
+
return /* @__PURE__ */ O("div", {
|
|
432
479
|
className: "p-3 rounded-lg border shadow-sm text-xs",
|
|
433
480
|
style: {
|
|
434
481
|
background: "var(--color-bg-surface)",
|
|
@@ -437,31 +484,31 @@ function K() {
|
|
|
437
484
|
},
|
|
438
485
|
"data-testid": "admin-overview-legend",
|
|
439
486
|
children: [
|
|
440
|
-
/* @__PURE__ */
|
|
487
|
+
/* @__PURE__ */ O("div", {
|
|
441
488
|
className: "flex items-center gap-1.5 mb-2",
|
|
442
489
|
style: { color: "var(--color-text-primary)" },
|
|
443
|
-
children: [/* @__PURE__ */
|
|
490
|
+
children: [/* @__PURE__ */ D(S, { size: 12 }), /* @__PURE__ */ D("span", {
|
|
444
491
|
className: "font-semibold",
|
|
445
492
|
children: t("adminOverviewPage.legend", "Legend")
|
|
446
493
|
})]
|
|
447
494
|
}),
|
|
448
|
-
/* @__PURE__ */
|
|
449
|
-
icon: /* @__PURE__ */
|
|
495
|
+
/* @__PURE__ */ D(q, {
|
|
496
|
+
icon: /* @__PURE__ */ D(b, { size: 11 }),
|
|
450
497
|
label: t("adminOverviewPage.legendOrganization", "Organization")
|
|
451
498
|
}),
|
|
452
|
-
/* @__PURE__ */
|
|
453
|
-
icon: /* @__PURE__ */
|
|
499
|
+
/* @__PURE__ */ D(q, {
|
|
500
|
+
icon: /* @__PURE__ */ D(C, { size: 11 }),
|
|
454
501
|
label: t("adminOverviewPage.legendWorkspace", "Workspace")
|
|
455
502
|
}),
|
|
456
|
-
/* @__PURE__ */
|
|
457
|
-
icon: /* @__PURE__ */ T
|
|
503
|
+
/* @__PURE__ */ D(q, {
|
|
504
|
+
icon: /* @__PURE__ */ D(T, { size: 11 }),
|
|
458
505
|
label: t("adminOverviewPage.legendProject", "Project")
|
|
459
506
|
}),
|
|
460
|
-
/* @__PURE__ */
|
|
461
|
-
icon: /* @__PURE__ */
|
|
507
|
+
/* @__PURE__ */ D(q, {
|
|
508
|
+
icon: /* @__PURE__ */ D(x, { size: 11 }),
|
|
462
509
|
label: t("adminOverviewPage.legendTenant", "Tenant (dashed link)")
|
|
463
510
|
}),
|
|
464
|
-
/* @__PURE__ */
|
|
511
|
+
/* @__PURE__ */ D("div", {
|
|
465
512
|
className: "mt-2 pt-2 border-t text-[10px] leading-tight",
|
|
466
513
|
style: { borderColor: "var(--color-border-default)" },
|
|
467
514
|
children: t("adminOverviewPage.legendHint", "Click any node to highlight its connections.")
|
|
@@ -470,22 +517,22 @@ function K() {
|
|
|
470
517
|
});
|
|
471
518
|
}
|
|
472
519
|
function q({ icon: e, label: t }) {
|
|
473
|
-
return /* @__PURE__ */
|
|
520
|
+
return /* @__PURE__ */ O("div", {
|
|
474
521
|
className: "flex items-center gap-1.5 py-0.5",
|
|
475
|
-
children: [/* @__PURE__ */
|
|
522
|
+
children: [/* @__PURE__ */ D("span", {
|
|
476
523
|
style: { color: "var(--color-action-primary-bg)" },
|
|
477
524
|
children: e
|
|
478
|
-
}), /* @__PURE__ */
|
|
525
|
+
}), /* @__PURE__ */ D("span", { children: t })]
|
|
479
526
|
});
|
|
480
527
|
}
|
|
481
528
|
function J() {
|
|
482
|
-
let { t: e } =
|
|
483
|
-
return /* @__PURE__ */
|
|
529
|
+
let { t: e } = p();
|
|
530
|
+
return /* @__PURE__ */ D("div", {
|
|
484
531
|
className: "absolute inset-0 flex items-center justify-center text-sm pointer-events-none z-10",
|
|
485
532
|
style: { color: "var(--color-text-secondary)" },
|
|
486
|
-
children: /* @__PURE__ */
|
|
533
|
+
children: /* @__PURE__ */ O("div", {
|
|
487
534
|
className: "flex items-center gap-2",
|
|
488
|
-
children: [/* @__PURE__ */
|
|
535
|
+
children: [/* @__PURE__ */ D("div", {
|
|
489
536
|
className: "animate-spin rounded-full size-4 border-2 border-t-transparent",
|
|
490
537
|
style: {
|
|
491
538
|
borderColor: "var(--color-action-primary-bg)",
|
|
@@ -499,22 +546,22 @@ function J() {
|
|
|
499
546
|
});
|
|
500
547
|
}
|
|
501
548
|
function Y() {
|
|
502
|
-
let { t: e } =
|
|
549
|
+
let { t: e } = p(), t = (t, n) => {
|
|
503
550
|
let r = e(t);
|
|
504
551
|
return r === t ? n : r;
|
|
505
552
|
};
|
|
506
|
-
return /* @__PURE__ */
|
|
553
|
+
return /* @__PURE__ */ D("div", {
|
|
507
554
|
className: "absolute inset-0 flex items-center justify-center pointer-events-none z-10",
|
|
508
555
|
style: { color: "var(--color-text-secondary)" },
|
|
509
|
-
children: /* @__PURE__ */
|
|
556
|
+
children: /* @__PURE__ */ O("div", {
|
|
510
557
|
className: "flex flex-col items-center gap-2 text-center max-w-sm",
|
|
511
558
|
children: [
|
|
512
|
-
/* @__PURE__ */
|
|
513
|
-
/* @__PURE__ */
|
|
559
|
+
/* @__PURE__ */ D(w, { size: 32 }),
|
|
560
|
+
/* @__PURE__ */ D("div", {
|
|
514
561
|
className: "text-base font-medium",
|
|
515
562
|
children: t("adminOverviewPage.emptyTitle", "No resources found")
|
|
516
563
|
}),
|
|
517
|
-
/* @__PURE__ */
|
|
564
|
+
/* @__PURE__ */ D("div", {
|
|
518
565
|
className: "text-xs",
|
|
519
566
|
children: t("adminOverviewPage.emptyDescription", "You don't have access to any organizations, workspaces, or tenants yet.")
|
|
520
567
|
})
|
|
@@ -522,4 +569,44 @@ function Y() {
|
|
|
522
569
|
})
|
|
523
570
|
});
|
|
524
571
|
}
|
|
525
|
-
|
|
572
|
+
function he({ tr: e, isInitialLoading: t, isEmpty: n, banners: r, list: i, graph: a }) {
|
|
573
|
+
let o = k(), s = new URLSearchParams(o.search).get("view") === L, c = [{
|
|
574
|
+
id: "list",
|
|
575
|
+
label: e("adminOverviewPage.tabList", "List"),
|
|
576
|
+
href: o.pathname
|
|
577
|
+
}, {
|
|
578
|
+
id: "graph",
|
|
579
|
+
label: e("adminOverviewPage.tabGraph", "Graph"),
|
|
580
|
+
href: `${o.pathname}?view=${L}`
|
|
581
|
+
}];
|
|
582
|
+
return /* @__PURE__ */ O("div", {
|
|
583
|
+
className: "mx-auto flex w-full max-w-5xl flex-col gap-4 px-4 py-6 sm:px-6",
|
|
584
|
+
"data-testid": "admin-overview-fluidgrids",
|
|
585
|
+
children: [
|
|
586
|
+
/* @__PURE__ */ O("header", {
|
|
587
|
+
className: "flex flex-col gap-1",
|
|
588
|
+
children: [/* @__PURE__ */ D("h1", {
|
|
589
|
+
className: "text-2xl font-semibold text-text-primary",
|
|
590
|
+
children: e("adminOverviewPage.headingFluidGrids", "Administration")
|
|
591
|
+
}), /* @__PURE__ */ D("p", {
|
|
592
|
+
className: "text-sm text-text-secondary",
|
|
593
|
+
children: e("adminOverviewPage.helpLine", "Organization → Workspace → Project: an organization holds your workspaces, and each workspace holds its projects.")
|
|
594
|
+
})]
|
|
595
|
+
}),
|
|
596
|
+
/* @__PURE__ */ D(d, {
|
|
597
|
+
tabs: c,
|
|
598
|
+
activeId: s ? "graph" : "list",
|
|
599
|
+
ariaLabel: e("adminOverviewPage.tabsLabel", "Administration views")
|
|
600
|
+
}),
|
|
601
|
+
r,
|
|
602
|
+
s ? a : t ? /* @__PURE__ */ D("div", {
|
|
603
|
+
className: "relative min-h-[200px]",
|
|
604
|
+
children: /* @__PURE__ */ D(J, {})
|
|
605
|
+
}) : n ? /* @__PURE__ */ D("div", {
|
|
606
|
+
className: "relative min-h-[200px]",
|
|
607
|
+
children: /* @__PURE__ */ D(Y, {})
|
|
608
|
+
}) : i
|
|
609
|
+
]
|
|
610
|
+
});
|
|
611
|
+
}
|
|
612
|
+
export { z as AdminOverviewPage };
|