@burdenoff/microfe-assethandler 2026.826.13 → 2026.826.14
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/assethandler/pages/CmdbBrowserPage.d.ts.map +1 -1
- package/dist/assethandler/pages/CmdbBrowserPage.js +107 -82
- package/dist/assethandler/pages/CmdbBrowserPage.js.map +1 -1
- package/dist/assethandler/pages/SamLicensesPage.d.ts.map +1 -1
- package/dist/assethandler/pages/SamLicensesPage.js +179 -158
- package/dist/assethandler/pages/SamLicensesPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -8,13 +8,13 @@ import { StatTile as s } from "../components/StatTile.js";
|
|
|
8
8
|
import { ChartCard as c } from "../components/ChartCard.js";
|
|
9
9
|
import "../components/index.js";
|
|
10
10
|
import { useMemo as l, useState as u } from "react";
|
|
11
|
-
import { KeyRound as d, Layers as f, Pencil as p, Plus as m, Search as h, ShieldCheck as g,
|
|
12
|
-
import { gql as
|
|
13
|
-
import { useMutation as
|
|
14
|
-
import { jsx as
|
|
15
|
-
import { Button as
|
|
11
|
+
import { KeyRound as d, Layers as f, Pencil as p, Plus as m, Search as h, ShieldCheck as g, Trash2 as _, UserCheck as v, UserPlus as y } from "lucide-react";
|
|
12
|
+
import { gql as b } from "@apollo/client";
|
|
13
|
+
import { useMutation as x, useQuery as S } from "@apollo/client/react";
|
|
14
|
+
import { jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
15
|
+
import { Button as T, GlassCard as E, GradientText as ee, IllustratedEmptyState as D, Input as O, Label as k, PagePurpose as te, ResponsiveDialog as A, ResponsiveDialogContent as j, ResponsiveDialogDescription as M, ResponsiveDialogFooter as N, ResponsiveDialogHeader as P, ResponsiveDialogTitle as F, Select as I, SelectContent as L, SelectItem as R, SelectTrigger as z, SelectValue as B } from "@burdenoff/fe-libs/ui";
|
|
16
16
|
//#region src/assethandler/pages/SamLicensesPage.tsx
|
|
17
|
-
var
|
|
17
|
+
var V = b`
|
|
18
18
|
query AssetHandlerSoftwareAssets {
|
|
19
19
|
softwareAssets {
|
|
20
20
|
id
|
|
@@ -27,90 +27,94 @@ var H = y`
|
|
|
27
27
|
compliancePercent
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
`,
|
|
30
|
+
`, H = b`
|
|
31
31
|
mutation AssetHandlerUpsertSoftwareAsset($input: UpsertSoftwareAssetInput!) {
|
|
32
32
|
upsertSoftwareAsset(input: $input) {
|
|
33
33
|
id
|
|
34
34
|
name
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
`,
|
|
37
|
+
`, ne = b`
|
|
38
|
+
mutation AssetHandlerDeleteSoftwareAsset($id: ID!) {
|
|
39
|
+
deleteSoftwareAsset(id: $id)
|
|
40
|
+
}
|
|
41
|
+
`, U = [
|
|
38
42
|
"PERPETUAL",
|
|
39
43
|
"SUBSCRIPTION",
|
|
40
44
|
"CONCURRENT",
|
|
41
45
|
"NAMED_USER",
|
|
42
46
|
"OPEN_SOURCE"
|
|
43
|
-
],
|
|
44
|
-
function
|
|
47
|
+
], W = (e) => e.toLowerCase().replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase());
|
|
48
|
+
function re({ open: e, onOpenChange: n, onSaved: r, editing: i }) {
|
|
45
49
|
let [a, o] = u(""), [s, c] = u(""), [l, d] = u(""), [f, p] = u("SUBSCRIPTION"), [m, h] = u(""), [g, _] = u(""), [v, y] = u(null);
|
|
46
|
-
e && i && v !== i.id && (y(i.id), o(i.name), c(i.vendor), d(i.version), p(
|
|
47
|
-
let
|
|
50
|
+
e && i && v !== i.id && (y(i.id), o(i.name), c(i.vendor), d(i.version), p(U.includes(i.licenseType) ? i.licenseType : "SUBSCRIPTION"), h(i.seatsPurchased == null ? "" : String(i.seatsPurchased)), _(i.seatsUsed == null ? "" : String(i.seatsUsed))), e && !i && v !== null && y(null);
|
|
51
|
+
let b = () => {
|
|
48
52
|
o(""), c(""), d(""), p("SUBSCRIPTION"), h(""), _(""), y(null);
|
|
49
|
-
}, [
|
|
53
|
+
}, [S, { loading: E }] = x(H, {
|
|
50
54
|
onCompleted: (e) => {
|
|
51
|
-
t.success("Software asset saved", `${e.upsertSoftwareAsset.name} is now tracked.`),
|
|
55
|
+
t.success("Software asset saved", `${e.upsertSoftwareAsset.name} is now tracked.`), b(), n(!1), r();
|
|
52
56
|
},
|
|
53
57
|
onError: (e) => t.error("Could not save software asset", e.message)
|
|
54
58
|
});
|
|
55
|
-
return /* @__PURE__ */
|
|
59
|
+
return /* @__PURE__ */ C(A, {
|
|
56
60
|
open: e,
|
|
57
61
|
onOpenChange: n,
|
|
58
|
-
children: /* @__PURE__ */
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
/* @__PURE__ */
|
|
62
|
+
children: /* @__PURE__ */ w(j, { children: [
|
|
63
|
+
/* @__PURE__ */ w(P, { children: [/* @__PURE__ */ C(F, { children: i ? "Edit Software Asset" : "New Software Asset" }), /* @__PURE__ */ C(M, { children: i ? "Update this software entitlement and its seat allocation." : "Register a software entitlement to track license compliance." })] }),
|
|
64
|
+
/* @__PURE__ */ w("div", {
|
|
61
65
|
className: "space-y-4",
|
|
62
66
|
children: [
|
|
63
|
-
/* @__PURE__ */
|
|
67
|
+
/* @__PURE__ */ w("div", {
|
|
64
68
|
className: "grid gap-4 md:grid-cols-2",
|
|
65
|
-
children: [/* @__PURE__ */
|
|
69
|
+
children: [/* @__PURE__ */ w("div", {
|
|
66
70
|
className: "space-y-2",
|
|
67
|
-
children: [/* @__PURE__ */
|
|
71
|
+
children: [/* @__PURE__ */ C(k, { children: "Name *" }), /* @__PURE__ */ C(O, {
|
|
68
72
|
value: a,
|
|
69
73
|
onChange: (e) => o(e.target.value)
|
|
70
74
|
})]
|
|
71
|
-
}), /* @__PURE__ */
|
|
75
|
+
}), /* @__PURE__ */ w("div", {
|
|
72
76
|
className: "space-y-2",
|
|
73
|
-
children: [/* @__PURE__ */
|
|
77
|
+
children: [/* @__PURE__ */ C(k, { children: "Vendor *" }), /* @__PURE__ */ C(O, {
|
|
74
78
|
value: s,
|
|
75
79
|
onChange: (e) => c(e.target.value)
|
|
76
80
|
})]
|
|
77
81
|
})]
|
|
78
82
|
}),
|
|
79
|
-
/* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ w("div", {
|
|
80
84
|
className: "grid gap-4 md:grid-cols-2",
|
|
81
|
-
children: [/* @__PURE__ */
|
|
85
|
+
children: [/* @__PURE__ */ w("div", {
|
|
82
86
|
className: "space-y-2",
|
|
83
|
-
children: [/* @__PURE__ */
|
|
87
|
+
children: [/* @__PURE__ */ C(k, { children: "Version *" }), /* @__PURE__ */ C(O, {
|
|
84
88
|
placeholder: "e.g., 2026.1",
|
|
85
89
|
value: l,
|
|
86
90
|
onChange: (e) => d(e.target.value)
|
|
87
91
|
})]
|
|
88
|
-
}), /* @__PURE__ */
|
|
92
|
+
}), /* @__PURE__ */ w("div", {
|
|
89
93
|
className: "space-y-2",
|
|
90
|
-
children: [/* @__PURE__ */
|
|
94
|
+
children: [/* @__PURE__ */ C(k, { children: "License Type" }), /* @__PURE__ */ w(I, {
|
|
91
95
|
value: f,
|
|
92
96
|
onValueChange: (e) => p(e),
|
|
93
|
-
children: [/* @__PURE__ */
|
|
97
|
+
children: [/* @__PURE__ */ C(z, { children: /* @__PURE__ */ C(B, {}) }), /* @__PURE__ */ C(L, { children: U.map((e) => /* @__PURE__ */ C(R, {
|
|
94
98
|
value: e,
|
|
95
|
-
children:
|
|
99
|
+
children: W(e)
|
|
96
100
|
}, e)) })]
|
|
97
101
|
})]
|
|
98
102
|
})]
|
|
99
103
|
}),
|
|
100
|
-
/* @__PURE__ */
|
|
104
|
+
/* @__PURE__ */ w("div", {
|
|
101
105
|
className: "grid gap-4 md:grid-cols-2",
|
|
102
|
-
children: [/* @__PURE__ */
|
|
106
|
+
children: [/* @__PURE__ */ w("div", {
|
|
103
107
|
className: "space-y-2",
|
|
104
|
-
children: [/* @__PURE__ */
|
|
108
|
+
children: [/* @__PURE__ */ C(k, { children: "Seats Purchased" }), /* @__PURE__ */ C(O, {
|
|
105
109
|
type: "number",
|
|
106
110
|
min: "0",
|
|
107
111
|
step: "1",
|
|
108
112
|
value: m,
|
|
109
113
|
onChange: (e) => h(e.target.value)
|
|
110
114
|
})]
|
|
111
|
-
}), /* @__PURE__ */
|
|
115
|
+
}), /* @__PURE__ */ w("div", {
|
|
112
116
|
className: "space-y-2",
|
|
113
|
-
children: [/* @__PURE__ */
|
|
117
|
+
children: [/* @__PURE__ */ C(k, { children: "Seats Used" }), /* @__PURE__ */ C(O, {
|
|
114
118
|
type: "number",
|
|
115
119
|
min: "0",
|
|
116
120
|
step: "1",
|
|
@@ -121,12 +125,12 @@ function K({ open: e, onOpenChange: n, onSaved: r, editing: i }) {
|
|
|
121
125
|
})
|
|
122
126
|
]
|
|
123
127
|
}),
|
|
124
|
-
/* @__PURE__ */
|
|
128
|
+
/* @__PURE__ */ w(N, { children: [/* @__PURE__ */ C(T, {
|
|
125
129
|
variant: "outline",
|
|
126
130
|
onClick: () => n(!1),
|
|
127
131
|
disabled: E,
|
|
128
132
|
children: "Cancel"
|
|
129
|
-
}), /* @__PURE__ */
|
|
133
|
+
}), /* @__PURE__ */ C(T, {
|
|
130
134
|
onClick: () => {
|
|
131
135
|
if (!a.trim() || !s.trim() || !l.trim()) {
|
|
132
136
|
t.warning("Missing details", "Name, vendor and version are required.");
|
|
@@ -138,7 +142,7 @@ function K({ open: e, onOpenChange: n, onSaved: r, editing: i }) {
|
|
|
138
142
|
let n = Number(t);
|
|
139
143
|
return Number.isInteger(n) ? n : null;
|
|
140
144
|
};
|
|
141
|
-
|
|
145
|
+
S({ variables: { input: {
|
|
142
146
|
...i ? { id: i.id } : {},
|
|
143
147
|
name: a.trim(),
|
|
144
148
|
vendor: s.trim(),
|
|
@@ -154,17 +158,17 @@ function K({ open: e, onOpenChange: n, onSaved: r, editing: i }) {
|
|
|
154
158
|
] })
|
|
155
159
|
});
|
|
156
160
|
}
|
|
157
|
-
function
|
|
161
|
+
function G({ asset: t }) {
|
|
158
162
|
let n = t.seatsPurchased ?? 0, r = t.seatsUsed ?? 0, a = n > 0 && r > n;
|
|
159
|
-
return /* @__PURE__ */
|
|
163
|
+
return /* @__PURE__ */ w("div", {
|
|
160
164
|
className: "min-w-[140px]",
|
|
161
|
-
children: [/* @__PURE__ */
|
|
165
|
+
children: [/* @__PURE__ */ C(i, {
|
|
162
166
|
value: Math.min(100, Math.max(0, t.compliancePercent)),
|
|
163
167
|
max: 100,
|
|
164
168
|
higherIsWorse: !1,
|
|
165
169
|
size: "sm",
|
|
166
170
|
showValue: !1
|
|
167
|
-
}), /* @__PURE__ */
|
|
171
|
+
}), /* @__PURE__ */ w("p", {
|
|
168
172
|
className: e("mt-1 text-xs font-medium tabular-nums", a ? "text-status-error-text" : "text-text-secondary"),
|
|
169
173
|
children: [
|
|
170
174
|
t.compliancePercent.toFixed(1),
|
|
@@ -174,8 +178,13 @@ function q({ asset: t }) {
|
|
|
174
178
|
})]
|
|
175
179
|
});
|
|
176
180
|
}
|
|
177
|
-
function
|
|
178
|
-
let [e,
|
|
181
|
+
function K() {
|
|
182
|
+
let [e, i] = u(!1), [b, k] = u(null), [A, j] = u(""), [M, N] = u("all"), [P, F] = u("compliance-asc"), { data: H, loading: K, refetch: q } = S(V, { fetchPolicy: "cache-and-network" }), [ie, { loading: ae }] = x(ne, {
|
|
183
|
+
onCompleted: () => {
|
|
184
|
+
t.success("Software asset deleted"), q();
|
|
185
|
+
},
|
|
186
|
+
onError: (e) => t.error("Could not delete software asset", e.message)
|
|
187
|
+
}), J = l(() => H?.softwareAssets ?? [], [H]), Y = l(() => {
|
|
179
188
|
let e = 0, t = 0;
|
|
180
189
|
for (let n of J) e += n.seatsPurchased ?? 0, t += n.seatsUsed ?? 0;
|
|
181
190
|
let n = Math.max(0, e - t), r = J.reduce((e, t) => e + (t.seatsPurchased ?? 0), 0), i = r > 0 ? J.reduce((e, t) => e + t.compliancePercent * (t.seatsPurchased ?? 0), 0) / r : J.length > 0 ? J.reduce((e, t) => e + t.compliancePercent, 0) / J.length : 0;
|
|
@@ -185,20 +194,20 @@ function J() {
|
|
|
185
194
|
available: n,
|
|
186
195
|
compliance: i
|
|
187
196
|
};
|
|
188
|
-
}, [J]),
|
|
197
|
+
}, [J]), oe = l(() => {
|
|
189
198
|
let e = /* @__PURE__ */ new Map();
|
|
190
199
|
for (let t of J) e.set(t.licenseType, (e.get(t.licenseType) ?? 0) + 1);
|
|
191
200
|
return [...e.entries()].map(([e, t]) => ({
|
|
192
|
-
name:
|
|
201
|
+
name: W(e),
|
|
193
202
|
value: t
|
|
194
203
|
}));
|
|
195
|
-
}, [J]),
|
|
204
|
+
}, [J]), se = l(() => [...J].sort((e, t) => (t.seatsPurchased ?? 0) - (e.seatsPurchased ?? 0)).slice(0, 6).map((e) => ({
|
|
196
205
|
name: e.name.length > 18 ? e.name.slice(0, 17) + "…" : e.name,
|
|
197
206
|
purchased: e.seatsPurchased ?? 0,
|
|
198
207
|
used: e.seatsUsed ?? 0
|
|
199
208
|
})), [J]), X = l(() => {
|
|
200
|
-
let e =
|
|
201
|
-
switch (
|
|
209
|
+
let e = A.trim().toLowerCase(), t = [...J.filter((t) => M !== "all" && t.licenseType !== M ? !1 : e ? t.name.toLowerCase().includes(e) || t.vendor.toLowerCase().includes(e) : !0)];
|
|
210
|
+
switch (P) {
|
|
202
211
|
case "compliance-asc":
|
|
203
212
|
t.sort((e, t) => e.compliancePercent - t.compliancePercent);
|
|
204
213
|
break;
|
|
@@ -216,72 +225,74 @@ function J() {
|
|
|
216
225
|
return t;
|
|
217
226
|
}, [
|
|
218
227
|
J,
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
228
|
+
A,
|
|
229
|
+
M,
|
|
230
|
+
P
|
|
222
231
|
]), Z = o(X, {
|
|
223
232
|
pageSize: 12,
|
|
224
|
-
resetKey: `${
|
|
233
|
+
resetKey: `${A}|${M}|${P}`
|
|
225
234
|
}), Q = () => {
|
|
226
|
-
|
|
235
|
+
k(null), i(!0);
|
|
227
236
|
}, $ = (e) => {
|
|
228
|
-
|
|
229
|
-
},
|
|
230
|
-
|
|
237
|
+
k(e), i(!0);
|
|
238
|
+
}, ce = (e) => {
|
|
239
|
+
window.confirm(`Delete ${e.name}?`) && ie({ variables: { id: e.id } });
|
|
240
|
+
}, le = J.length > 0;
|
|
241
|
+
return /* @__PURE__ */ w("div", {
|
|
231
242
|
className: "space-y-6 p-4 sm:p-6",
|
|
232
243
|
children: [
|
|
233
|
-
/* @__PURE__ */
|
|
244
|
+
/* @__PURE__ */ w("div", {
|
|
234
245
|
className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
|
|
235
|
-
children: [/* @__PURE__ */
|
|
236
|
-
/* @__PURE__ */
|
|
246
|
+
children: [/* @__PURE__ */ w("div", { children: [
|
|
247
|
+
/* @__PURE__ */ C("p", {
|
|
237
248
|
className: "text-xs font-semibold uppercase tracking-wider text-text-muted",
|
|
238
249
|
children: "Software Asset Management (SAM / licenses)"
|
|
239
250
|
}),
|
|
240
|
-
/* @__PURE__ */
|
|
251
|
+
/* @__PURE__ */ w("h1", {
|
|
241
252
|
className: "flex items-center gap-2 text-2xl font-semibold",
|
|
242
253
|
children: [
|
|
243
|
-
/* @__PURE__ */
|
|
254
|
+
/* @__PURE__ */ C(d, { className: "h-6 w-6" }),
|
|
244
255
|
" ",
|
|
245
|
-
/* @__PURE__ */
|
|
256
|
+
/* @__PURE__ */ C(ee, { children: "Software Asset Management" })
|
|
246
257
|
]
|
|
247
258
|
}),
|
|
248
|
-
/* @__PURE__ */
|
|
259
|
+
/* @__PURE__ */ C("p", {
|
|
249
260
|
className: "text-sm text-text-secondary",
|
|
250
|
-
children: "Track
|
|
261
|
+
children: "Track purchased seats against self-reported usage."
|
|
251
262
|
})
|
|
252
|
-
] }), /* @__PURE__ */
|
|
263
|
+
] }), /* @__PURE__ */ w(T, {
|
|
253
264
|
className: "w-full sm:w-auto",
|
|
254
265
|
onClick: Q,
|
|
255
|
-
children: [/* @__PURE__ */
|
|
266
|
+
children: [/* @__PURE__ */ C(m, { className: "mr-2 h-4 w-4" }), "Add Software"]
|
|
256
267
|
})]
|
|
257
268
|
}),
|
|
258
|
-
/* @__PURE__ */
|
|
259
|
-
/* @__PURE__ */
|
|
269
|
+
/* @__PURE__ */ C(te, { children: "Track purchased seats against the usage your team enters and review the resulting compliance percentage. Usage is self-reported; it is not installation- or discovery-verified yet." }),
|
|
270
|
+
/* @__PURE__ */ C(re, {
|
|
260
271
|
open: e,
|
|
261
|
-
onOpenChange:
|
|
262
|
-
onSaved: () => void
|
|
263
|
-
editing:
|
|
272
|
+
onOpenChange: i,
|
|
273
|
+
onSaved: () => void q(),
|
|
274
|
+
editing: b
|
|
264
275
|
}),
|
|
265
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ w("div", {
|
|
266
277
|
className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
|
|
267
278
|
children: [
|
|
268
|
-
/* @__PURE__ */
|
|
279
|
+
/* @__PURE__ */ C(s, {
|
|
269
280
|
label: "Total Licenses",
|
|
270
281
|
value: Y.purchased,
|
|
271
282
|
icon: f,
|
|
272
283
|
hero: !0
|
|
273
284
|
}),
|
|
274
|
-
/* @__PURE__ */
|
|
285
|
+
/* @__PURE__ */ C(s, {
|
|
275
286
|
label: "Seats Used",
|
|
276
287
|
value: Y.used,
|
|
277
|
-
icon:
|
|
288
|
+
icon: v
|
|
278
289
|
}),
|
|
279
|
-
/* @__PURE__ */
|
|
290
|
+
/* @__PURE__ */ C(s, {
|
|
280
291
|
label: "Seats Available",
|
|
281
292
|
value: Y.available,
|
|
282
|
-
icon:
|
|
293
|
+
icon: y
|
|
283
294
|
}),
|
|
284
|
-
/* @__PURE__ */
|
|
295
|
+
/* @__PURE__ */ C(s, {
|
|
285
296
|
label: "Compliance",
|
|
286
297
|
value: Y.compliance,
|
|
287
298
|
format: (e) => `${e.toFixed(1)}%`,
|
|
@@ -290,24 +301,24 @@ function J() {
|
|
|
290
301
|
})
|
|
291
302
|
]
|
|
292
303
|
}),
|
|
293
|
-
|
|
304
|
+
le ? /* @__PURE__ */ w("div", {
|
|
294
305
|
className: "grid gap-4 lg:grid-cols-2",
|
|
295
|
-
children: [/* @__PURE__ */
|
|
306
|
+
children: [/* @__PURE__ */ C(c, {
|
|
296
307
|
title: "Licenses by type",
|
|
297
308
|
subtitle: "Entitlement mix",
|
|
298
309
|
icon: d,
|
|
299
|
-
children: /* @__PURE__ */
|
|
300
|
-
data:
|
|
310
|
+
children: /* @__PURE__ */ C(r, {
|
|
311
|
+
data: oe,
|
|
301
312
|
height: 240,
|
|
302
313
|
centerLabel: "products",
|
|
303
314
|
centerValue: J.length,
|
|
304
315
|
ariaLabel: "Software assets by license type"
|
|
305
316
|
})
|
|
306
|
-
}), /* @__PURE__ */
|
|
317
|
+
}), /* @__PURE__ */ C(c, {
|
|
307
318
|
title: "Seats: purchased vs used",
|
|
308
319
|
subtitle: "Top products by entitlement",
|
|
309
|
-
children: /* @__PURE__ */
|
|
310
|
-
data:
|
|
320
|
+
children: /* @__PURE__ */ C(n, {
|
|
321
|
+
data: se,
|
|
311
322
|
xKey: "name",
|
|
312
323
|
orientation: "horizontal",
|
|
313
324
|
categoryWidth: 120,
|
|
@@ -323,55 +334,55 @@ function J() {
|
|
|
323
334
|
})
|
|
324
335
|
})]
|
|
325
336
|
}) : null,
|
|
326
|
-
J.length > 0 ? /* @__PURE__ */
|
|
337
|
+
J.length > 0 ? /* @__PURE__ */ C(E, {
|
|
327
338
|
treatment: "glass",
|
|
328
339
|
className: "border-border-seam",
|
|
329
|
-
children: /* @__PURE__ */
|
|
340
|
+
children: /* @__PURE__ */ w("div", {
|
|
330
341
|
className: "flex flex-col gap-3 p-4 sm:flex-row sm:items-center",
|
|
331
342
|
children: [
|
|
332
|
-
/* @__PURE__ */
|
|
343
|
+
/* @__PURE__ */ w("div", {
|
|
333
344
|
className: "relative flex-1",
|
|
334
|
-
children: [/* @__PURE__ */
|
|
345
|
+
children: [/* @__PURE__ */ C(h, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-muted" }), /* @__PURE__ */ C(O, {
|
|
335
346
|
className: "pl-9",
|
|
336
347
|
placeholder: "Search software or vendor…",
|
|
337
|
-
value:
|
|
338
|
-
onChange: (e) =>
|
|
348
|
+
value: A,
|
|
349
|
+
onChange: (e) => j(e.target.value)
|
|
339
350
|
})]
|
|
340
351
|
}),
|
|
341
|
-
/* @__PURE__ */
|
|
342
|
-
value:
|
|
343
|
-
onValueChange:
|
|
344
|
-
children: [/* @__PURE__ */
|
|
352
|
+
/* @__PURE__ */ w(I, {
|
|
353
|
+
value: M,
|
|
354
|
+
onValueChange: N,
|
|
355
|
+
children: [/* @__PURE__ */ C(z, {
|
|
345
356
|
className: "w-full sm:w-[170px]",
|
|
346
|
-
children: /* @__PURE__ */
|
|
347
|
-
}), /* @__PURE__ */
|
|
357
|
+
children: /* @__PURE__ */ C(B, { placeholder: "License type" })
|
|
358
|
+
}), /* @__PURE__ */ w(L, { children: [/* @__PURE__ */ C(R, {
|
|
348
359
|
value: "all",
|
|
349
360
|
children: "All license types"
|
|
350
|
-
}),
|
|
361
|
+
}), U.map((e) => /* @__PURE__ */ C(R, {
|
|
351
362
|
value: e,
|
|
352
|
-
children:
|
|
363
|
+
children: W(e)
|
|
353
364
|
}, e))] })]
|
|
354
365
|
}),
|
|
355
|
-
/* @__PURE__ */
|
|
356
|
-
value:
|
|
357
|
-
onValueChange:
|
|
358
|
-
children: [/* @__PURE__ */
|
|
366
|
+
/* @__PURE__ */ w(I, {
|
|
367
|
+
value: P,
|
|
368
|
+
onValueChange: F,
|
|
369
|
+
children: [/* @__PURE__ */ C(z, {
|
|
359
370
|
className: "w-full sm:w-[190px]",
|
|
360
|
-
children: /* @__PURE__ */
|
|
361
|
-
}), /* @__PURE__ */
|
|
362
|
-
/* @__PURE__ */
|
|
371
|
+
children: /* @__PURE__ */ C(B, { placeholder: "Sort" })
|
|
372
|
+
}), /* @__PURE__ */ w(L, { children: [
|
|
373
|
+
/* @__PURE__ */ C(R, {
|
|
363
374
|
value: "compliance-asc",
|
|
364
375
|
children: "Compliance: low → high"
|
|
365
376
|
}),
|
|
366
|
-
/* @__PURE__ */
|
|
377
|
+
/* @__PURE__ */ C(R, {
|
|
367
378
|
value: "compliance-desc",
|
|
368
379
|
children: "Compliance: high → low"
|
|
369
380
|
}),
|
|
370
|
-
/* @__PURE__ */
|
|
381
|
+
/* @__PURE__ */ C(R, {
|
|
371
382
|
value: "seats-desc",
|
|
372
383
|
children: "Most seats"
|
|
373
384
|
}),
|
|
374
|
-
/* @__PURE__ */
|
|
385
|
+
/* @__PURE__ */ C(R, {
|
|
375
386
|
value: "name-asc",
|
|
376
387
|
children: "Name A–Z"
|
|
377
388
|
})
|
|
@@ -380,138 +391,148 @@ function J() {
|
|
|
380
391
|
]
|
|
381
392
|
})
|
|
382
393
|
}) : null,
|
|
383
|
-
|
|
394
|
+
K && J.length === 0 ? /* @__PURE__ */ C(E, {
|
|
384
395
|
treatment: "glass",
|
|
385
396
|
className: "border-border-seam",
|
|
386
|
-
children: /* @__PURE__ */
|
|
397
|
+
children: /* @__PURE__ */ C("div", {
|
|
387
398
|
className: "space-y-2 p-4",
|
|
388
|
-
children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */
|
|
399
|
+
children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ C("div", { className: "h-8 rounded-md bg-bg-sunken motion-safe:animate-vc-shimmer" }, t))
|
|
389
400
|
})
|
|
390
401
|
}) : null,
|
|
391
|
-
!
|
|
402
|
+
!K && J.length === 0 ? /* @__PURE__ */ C(D, {
|
|
392
403
|
illustration: "empty-data",
|
|
393
404
|
title: "No software assets found",
|
|
394
405
|
description: "Register a software asset to start tracking license compliance.",
|
|
395
|
-
action: /* @__PURE__ */
|
|
406
|
+
action: /* @__PURE__ */ w(T, {
|
|
396
407
|
onClick: Q,
|
|
397
|
-
children: [/* @__PURE__ */
|
|
408
|
+
children: [/* @__PURE__ */ C(m, { className: "mr-2 h-4 w-4" }), "Add Software"]
|
|
398
409
|
})
|
|
399
410
|
}) : null,
|
|
400
|
-
J.length > 0 && X.length === 0 ? /* @__PURE__ */
|
|
411
|
+
J.length > 0 && X.length === 0 ? /* @__PURE__ */ C(D, {
|
|
401
412
|
illustration: "empty-search",
|
|
402
413
|
title: "No matching software",
|
|
403
414
|
description: "Adjust your search or filters to see software assets."
|
|
404
415
|
}) : null,
|
|
405
|
-
X.length > 0 ? /* @__PURE__ */
|
|
416
|
+
X.length > 0 ? /* @__PURE__ */ w(E, {
|
|
406
417
|
treatment: "glass",
|
|
407
418
|
className: "border-border-seam",
|
|
408
419
|
children: [
|
|
409
|
-
/* @__PURE__ */
|
|
420
|
+
/* @__PURE__ */ C("div", {
|
|
410
421
|
className: "hidden overflow-x-auto md:block",
|
|
411
|
-
children: /* @__PURE__ */
|
|
422
|
+
children: /* @__PURE__ */ w("table", {
|
|
412
423
|
className: "w-full text-sm",
|
|
413
|
-
children: [/* @__PURE__ */
|
|
424
|
+
children: [/* @__PURE__ */ C("thead", { children: /* @__PURE__ */ w("tr", {
|
|
414
425
|
className: "border-b border-border-seam bg-bg-sunken/50 text-xs uppercase tracking-wide text-text-secondary",
|
|
415
426
|
children: [
|
|
416
|
-
/* @__PURE__ */
|
|
427
|
+
/* @__PURE__ */ C("th", {
|
|
417
428
|
className: "p-3 text-left font-semibold",
|
|
418
429
|
children: "Software"
|
|
419
430
|
}),
|
|
420
|
-
/* @__PURE__ */
|
|
431
|
+
/* @__PURE__ */ C("th", {
|
|
421
432
|
className: "p-3 text-left font-semibold",
|
|
422
433
|
children: "Vendor"
|
|
423
434
|
}),
|
|
424
|
-
/* @__PURE__ */
|
|
435
|
+
/* @__PURE__ */ C("th", {
|
|
425
436
|
className: "p-3 text-left font-semibold",
|
|
426
437
|
children: "Version"
|
|
427
438
|
}),
|
|
428
|
-
/* @__PURE__ */
|
|
439
|
+
/* @__PURE__ */ C("th", {
|
|
429
440
|
className: "p-3 text-left font-semibold",
|
|
430
441
|
children: "License Type"
|
|
431
442
|
}),
|
|
432
|
-
/* @__PURE__ */
|
|
443
|
+
/* @__PURE__ */ C("th", {
|
|
433
444
|
className: "p-3 text-right font-semibold",
|
|
434
445
|
children: "Seats Purchased"
|
|
435
446
|
}),
|
|
436
|
-
/* @__PURE__ */
|
|
447
|
+
/* @__PURE__ */ C("th", {
|
|
437
448
|
className: "p-3 text-right font-semibold",
|
|
438
449
|
children: "Seats Used"
|
|
439
450
|
}),
|
|
440
|
-
/* @__PURE__ */
|
|
451
|
+
/* @__PURE__ */ C("th", {
|
|
441
452
|
className: "p-3 text-left font-semibold",
|
|
442
453
|
children: "Compliance"
|
|
443
454
|
}),
|
|
444
|
-
/* @__PURE__ */
|
|
455
|
+
/* @__PURE__ */ C("th", {
|
|
445
456
|
className: "p-3 text-right font-semibold",
|
|
446
457
|
children: "Actions"
|
|
447
458
|
})
|
|
448
459
|
]
|
|
449
|
-
}) }), /* @__PURE__ */
|
|
460
|
+
}) }), /* @__PURE__ */ C("tbody", { children: Z.pageItems.map((e) => /* @__PURE__ */ w("tr", {
|
|
450
461
|
className: "cursor-pointer border-b border-border-seam hover:bg-bg-sunken/50",
|
|
451
462
|
onClick: () => $(e),
|
|
452
463
|
children: [
|
|
453
|
-
/* @__PURE__ */
|
|
464
|
+
/* @__PURE__ */ C("td", {
|
|
454
465
|
className: "max-w-[220px] truncate p-3 font-medium",
|
|
455
466
|
title: e.name,
|
|
456
467
|
children: e.name
|
|
457
468
|
}),
|
|
458
|
-
/* @__PURE__ */
|
|
469
|
+
/* @__PURE__ */ C("td", {
|
|
459
470
|
className: "p-3 text-text-secondary",
|
|
460
471
|
children: e.vendor
|
|
461
472
|
}),
|
|
462
|
-
/* @__PURE__ */
|
|
473
|
+
/* @__PURE__ */ C("td", {
|
|
463
474
|
className: "p-3 text-text-secondary",
|
|
464
475
|
children: e.version
|
|
465
476
|
}),
|
|
466
|
-
/* @__PURE__ */
|
|
477
|
+
/* @__PURE__ */ C("td", {
|
|
467
478
|
className: "p-3",
|
|
468
|
-
children: /* @__PURE__ */
|
|
479
|
+
children: /* @__PURE__ */ C("span", {
|
|
469
480
|
className: "inline-flex items-center rounded-full bg-status-neutral-bg-subtle px-2.5 py-0.5 text-xs font-medium text-status-neutral-text",
|
|
470
|
-
children:
|
|
481
|
+
children: W(e.licenseType)
|
|
471
482
|
})
|
|
472
483
|
}),
|
|
473
|
-
/* @__PURE__ */
|
|
484
|
+
/* @__PURE__ */ C("td", {
|
|
474
485
|
className: "p-3 text-right tabular-nums",
|
|
475
486
|
children: e.seatsPurchased ?? "—"
|
|
476
487
|
}),
|
|
477
|
-
/* @__PURE__ */
|
|
488
|
+
/* @__PURE__ */ C("td", {
|
|
478
489
|
className: "p-3 text-right tabular-nums",
|
|
479
490
|
children: e.seatsUsed ?? "—"
|
|
480
491
|
}),
|
|
481
|
-
/* @__PURE__ */
|
|
492
|
+
/* @__PURE__ */ C("td", {
|
|
482
493
|
className: "p-3",
|
|
483
|
-
children: /* @__PURE__ */
|
|
494
|
+
children: /* @__PURE__ */ C(G, { asset: e })
|
|
484
495
|
}),
|
|
485
|
-
/* @__PURE__ */
|
|
496
|
+
/* @__PURE__ */ w("td", {
|
|
486
497
|
className: "p-3 text-right",
|
|
487
|
-
children: /* @__PURE__ */
|
|
498
|
+
children: [/* @__PURE__ */ w(T, {
|
|
488
499
|
size: "sm",
|
|
489
500
|
variant: "outline",
|
|
490
501
|
onClick: (t) => {
|
|
491
502
|
t.stopPropagation(), $(e);
|
|
492
503
|
},
|
|
493
|
-
children: [/* @__PURE__ */
|
|
494
|
-
})
|
|
504
|
+
children: [/* @__PURE__ */ C(p, { className: "mr-1 h-3.5 w-3.5" }), "Edit"]
|
|
505
|
+
}), /* @__PURE__ */ C(T, {
|
|
506
|
+
className: "ml-2",
|
|
507
|
+
size: "sm",
|
|
508
|
+
variant: "outline",
|
|
509
|
+
disabled: ae,
|
|
510
|
+
onClick: (t) => {
|
|
511
|
+
t.stopPropagation(), ce(e);
|
|
512
|
+
},
|
|
513
|
+
"aria-label": `Delete ${e.name}`,
|
|
514
|
+
children: /* @__PURE__ */ C(_, { className: "h-3.5 w-3.5" })
|
|
515
|
+
})]
|
|
495
516
|
})
|
|
496
517
|
]
|
|
497
518
|
}, e.id)) })]
|
|
498
519
|
})
|
|
499
520
|
}),
|
|
500
|
-
/* @__PURE__ */
|
|
521
|
+
/* @__PURE__ */ C("div", {
|
|
501
522
|
className: "divide-y divide-border-seam md:hidden",
|
|
502
|
-
children: Z.pageItems.map((e) => /* @__PURE__ */
|
|
523
|
+
children: Z.pageItems.map((e) => /* @__PURE__ */ w("div", {
|
|
503
524
|
className: "cursor-pointer space-y-2 p-4",
|
|
504
525
|
onClick: () => $(e),
|
|
505
526
|
children: [
|
|
506
|
-
/* @__PURE__ */
|
|
527
|
+
/* @__PURE__ */ w("div", {
|
|
507
528
|
className: "flex items-start justify-between gap-2",
|
|
508
|
-
children: [/* @__PURE__ */
|
|
529
|
+
children: [/* @__PURE__ */ w("div", {
|
|
509
530
|
className: "min-w-0",
|
|
510
|
-
children: [/* @__PURE__ */
|
|
531
|
+
children: [/* @__PURE__ */ C("p", {
|
|
511
532
|
className: "truncate font-medium",
|
|
512
533
|
title: e.name,
|
|
513
534
|
children: e.name
|
|
514
|
-
}), /* @__PURE__ */
|
|
535
|
+
}), /* @__PURE__ */ w("p", {
|
|
515
536
|
className: "text-xs text-text-secondary",
|
|
516
537
|
children: [
|
|
517
538
|
e.vendor,
|
|
@@ -519,14 +540,14 @@ function J() {
|
|
|
519
540
|
e.version
|
|
520
541
|
]
|
|
521
542
|
})]
|
|
522
|
-
}), /* @__PURE__ */
|
|
543
|
+
}), /* @__PURE__ */ C("span", {
|
|
523
544
|
className: "shrink-0 rounded-full bg-status-neutral-bg-subtle px-2.5 py-0.5 text-xs font-medium text-status-neutral-text",
|
|
524
|
-
children:
|
|
545
|
+
children: W(e.licenseType)
|
|
525
546
|
})]
|
|
526
547
|
}),
|
|
527
|
-
/* @__PURE__ */
|
|
548
|
+
/* @__PURE__ */ C("div", {
|
|
528
549
|
className: "flex items-center justify-between gap-3 text-xs text-text-secondary",
|
|
529
|
-
children: /* @__PURE__ */
|
|
550
|
+
children: /* @__PURE__ */ w("span", {
|
|
530
551
|
className: "tabular-nums",
|
|
531
552
|
children: [
|
|
532
553
|
e.seatsUsed ?? 0,
|
|
@@ -536,13 +557,13 @@ function J() {
|
|
|
536
557
|
]
|
|
537
558
|
})
|
|
538
559
|
}),
|
|
539
|
-
/* @__PURE__ */
|
|
560
|
+
/* @__PURE__ */ C(G, { asset: e })
|
|
540
561
|
]
|
|
541
562
|
}, e.id))
|
|
542
563
|
}),
|
|
543
|
-
/* @__PURE__ */
|
|
564
|
+
/* @__PURE__ */ C("div", {
|
|
544
565
|
className: "px-3",
|
|
545
|
-
children: /* @__PURE__ */
|
|
566
|
+
children: /* @__PURE__ */ C(a, {
|
|
546
567
|
page: Z.page,
|
|
547
568
|
pageCount: Z.pageCount,
|
|
548
569
|
rangeStart: Z.rangeStart,
|
|
@@ -561,6 +582,6 @@ function J() {
|
|
|
561
582
|
});
|
|
562
583
|
}
|
|
563
584
|
//#endregion
|
|
564
|
-
export {
|
|
585
|
+
export { K as SamLicensesPage };
|
|
565
586
|
|
|
566
587
|
//# sourceMappingURL=SamLicensesPage.js.map
|