@burdenoff/microfe-adaptercloud 2026.706.2 → 2026.706.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/adaptercloud/AdapterCloudRoot.js +52 -44
- package/dist/adaptercloud/AdapterCloudRoot.js.map +1 -1
- package/dist/adaptercloud/AdapterCloudRoutes.js +18 -14
- package/dist/adaptercloud/AdapterCloudRoutes.js.map +1 -1
- package/dist/adaptercloud/components/ConfirmDialog.js.map +1 -1
- package/dist/adaptercloud/components/viz/BarChart.js +32 -0
- package/dist/adaptercloud/components/viz/BarChart.js.map +1 -0
- package/dist/adaptercloud/components/viz/Sparkline.js +50 -0
- package/dist/adaptercloud/components/viz/Sparkline.js.map +1 -0
- package/dist/adaptercloud/components/viz/StackedBar.js +1 -0
- package/dist/adaptercloud/components/viz/TopologyGraph.js +96 -0
- package/dist/adaptercloud/components/viz/TopologyGraph.js.map +1 -0
- package/dist/adaptercloud/components/viz/index.js +4 -0
- package/dist/adaptercloud/hooks/useAdapterCloudApi.js +22 -4
- package/dist/adaptercloud/hooks/useAdapterCloudApi.js.map +1 -1
- package/dist/adaptercloud/pages/OverviewPage.js.map +1 -1
- package/dist/adaptercloud/pages/adapters/AdapterDetailPage.js +176 -123
- package/dist/adaptercloud/pages/adapters/AdapterDetailPage.js.map +1 -1
- package/dist/adaptercloud/pages/adapters/AdapterFormPage.js +261 -179
- package/dist/adaptercloud/pages/adapters/AdapterFormPage.js.map +1 -1
- package/dist/adaptercloud/pages/adapters/AdaptersListPage.js.map +1 -1
- package/dist/adaptercloud/pages/connections/ConnectionsListPage.js +158 -94
- package/dist/adaptercloud/pages/connections/ConnectionsListPage.js.map +1 -1
- package/dist/adaptercloud/pages/costs/CostsPage.js +160 -111
- package/dist/adaptercloud/pages/costs/CostsPage.js.map +1 -1
- package/dist/adaptercloud/pages/drift/DriftListPage.js +163 -84
- package/dist/adaptercloud/pages/drift/DriftListPage.js.map +1 -1
- package/dist/adaptercloud/pages/policies/PoliciesListPage.js +177 -96
- package/dist/adaptercloud/pages/policies/PoliciesListPage.js.map +1 -1
- package/dist/adaptercloud/pages/resources/ResourceDetailPage.js +145 -131
- package/dist/adaptercloud/pages/resources/ResourceDetailPage.js.map +1 -1
- package/dist/adaptercloud/pages/resources/ResourcesListPage.js +10 -1
- package/dist/adaptercloud/pages/resources/ResourcesListPage.js.map +1 -1
- package/dist/adaptercloud/pages/sync-runs/SyncRunsListPage.js +226 -165
- package/dist/adaptercloud/pages/sync-runs/SyncRunsListPage.js.map +1 -1
- package/dist/adaptercloud/pages/topology/TopologyPage.js +397 -0
- package/dist/adaptercloud/pages/topology/TopologyPage.js.map +1 -0
- package/dist/adaptercloud/pages/violations/ViolationsListPage.js +184 -131
- package/dist/adaptercloud/pages/violations/ViolationsListPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -5,12 +5,12 @@ import { DataState as i } from "../../components/DataState.js";
|
|
|
5
5
|
import { useAdapter as a, useCreateAdapter as o, useUpdateAdapter as s } from "../../hooks/useAdapterCloudApi.js";
|
|
6
6
|
import { useCallback as c, useEffect as l, useState as u } from "react";
|
|
7
7
|
import { useI18n as d } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
8
|
-
import { ArrowLeft as f, Loader2 as p, Save as m } from "lucide-react";
|
|
9
|
-
import { useParams as
|
|
10
|
-
import { jsx as
|
|
11
|
-
import { GlassCard as
|
|
8
|
+
import { ArrowLeft as f, Loader2 as p, Save as m, X as h } from "lucide-react";
|
|
9
|
+
import { useParams as g } from "react-router-dom";
|
|
10
|
+
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
11
|
+
import { GlassCard as y } from "@burdenoff/fe-libs/ui";
|
|
12
12
|
//#region src/adaptercloud/pages/adapters/AdapterFormPage.tsx
|
|
13
|
-
var
|
|
13
|
+
var b = (e) => e.toLowerCase().trim().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, ""), x = {
|
|
14
14
|
name: "",
|
|
15
15
|
slug: "",
|
|
16
16
|
kind: "CUSTOM",
|
|
@@ -18,14 +18,61 @@ var y = (e) => e.toLowerCase().trim().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-
|
|
|
18
18
|
vendor: "",
|
|
19
19
|
version: "1.0.0",
|
|
20
20
|
description: "",
|
|
21
|
-
capabilities:
|
|
22
|
-
tags:
|
|
21
|
+
capabilities: [],
|
|
22
|
+
tags: [],
|
|
23
|
+
configSchema: ""
|
|
23
24
|
};
|
|
24
|
-
function S() {
|
|
25
|
-
let
|
|
25
|
+
function S({ id: e, label: t, values: n, onChange: r, placeholder: i, chipClass: a }) {
|
|
26
|
+
let [o, s] = u(""), l = c((e) => {
|
|
27
|
+
let t = e.trim();
|
|
28
|
+
!t || n.includes(t) || r([...n, t]);
|
|
29
|
+
}, [n, r]), d = c(() => {
|
|
30
|
+
o.trim() && (l(o), s(""));
|
|
31
|
+
}, [o, l]), f = c((e) => {
|
|
32
|
+
if (e.includes(",")) {
|
|
33
|
+
let t = e.split(",");
|
|
34
|
+
t.slice(0, -1).forEach((e) => l(e)), s(t[t.length - 1] ?? "");
|
|
35
|
+
} else s(e);
|
|
36
|
+
}, [l]), p = c((e) => {
|
|
37
|
+
e.key === "Enter" || e.key === "," ? (e.preventDefault(), d()) : e.key === "Backspace" && !o && n.length > 0 && r(n.slice(0, -1));
|
|
38
|
+
}, [
|
|
39
|
+
d,
|
|
40
|
+
o,
|
|
41
|
+
n,
|
|
42
|
+
r
|
|
43
|
+
]);
|
|
44
|
+
return /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
45
|
+
htmlFor: e,
|
|
46
|
+
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
47
|
+
children: t
|
|
48
|
+
}), /* @__PURE__ */ v("div", {
|
|
49
|
+
className: "flex w-full flex-wrap items-center gap-1.5 rounded-lg border border-border-subtle bg-bg-surface px-2 py-1.5 focus-within:ring-2 focus-within:ring-[var(--color-focus-ring)]",
|
|
50
|
+
children: [n.map((e) => /* @__PURE__ */ v("span", {
|
|
51
|
+
className: `inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-medium ${a}`,
|
|
52
|
+
children: [e, /* @__PURE__ */ _("button", {
|
|
53
|
+
type: "button",
|
|
54
|
+
onClick: () => r(n.filter((t) => t !== e)),
|
|
55
|
+
className: "rounded-full p-0.5 transition-opacity hover:opacity-70 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
|
|
56
|
+
"aria-label": `Remove ${e}`,
|
|
57
|
+
children: /* @__PURE__ */ _(h, { className: "h-3 w-3" })
|
|
58
|
+
})]
|
|
59
|
+
}, e)), /* @__PURE__ */ _("input", {
|
|
60
|
+
id: e,
|
|
61
|
+
type: "text",
|
|
62
|
+
value: o,
|
|
63
|
+
onChange: (e) => f(e.target.value),
|
|
64
|
+
onKeyDown: p,
|
|
65
|
+
onBlur: d,
|
|
66
|
+
className: "min-w-[8rem] flex-1 bg-transparent px-1 py-1 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none",
|
|
67
|
+
placeholder: n.length === 0 ? i : ""
|
|
68
|
+
})]
|
|
69
|
+
})] });
|
|
70
|
+
}
|
|
71
|
+
function C() {
|
|
72
|
+
let { id: h } = g(), C = !!h, { navigateTo: w } = e(), { t: T } = d(), E = c((e, t) => {
|
|
26
73
|
let n = T(e);
|
|
27
74
|
return n === e ? t : n;
|
|
28
|
-
}, [T]), D = a(C ?
|
|
75
|
+
}, [T]), D = a(C ? h : void 0), O = o(), k = s(), [A, j] = u(x), [M, N] = u(!1), [P, F] = u(null), [I, L] = u(null);
|
|
29
76
|
l(() => {
|
|
30
77
|
let e = D.data;
|
|
31
78
|
C && e && (j({
|
|
@@ -36,22 +83,34 @@ function S() {
|
|
|
36
83
|
vendor: e.vendor ?? "",
|
|
37
84
|
version: e.version,
|
|
38
85
|
description: e.description ?? "",
|
|
39
|
-
capabilities: e.capabilities
|
|
40
|
-
tags: e.tags
|
|
86
|
+
capabilities: e.capabilities,
|
|
87
|
+
tags: e.tags,
|
|
88
|
+
configSchema: e.configSchema == null ? "" : JSON.stringify(e.configSchema, null, 2)
|
|
41
89
|
}), N(!0));
|
|
42
90
|
}, [C, D.data]);
|
|
43
|
-
let
|
|
91
|
+
let R = c((e, t) => {
|
|
44
92
|
j((n) => ({
|
|
45
93
|
...n,
|
|
46
94
|
[e]: t
|
|
47
95
|
}));
|
|
48
|
-
}, []),
|
|
96
|
+
}, []), z = c((e) => {
|
|
49
97
|
j((t) => ({
|
|
50
98
|
...t,
|
|
51
99
|
name: e,
|
|
52
|
-
slug: M ? t.slug :
|
|
100
|
+
slug: M ? t.slug : b(e)
|
|
53
101
|
}));
|
|
54
|
-
}, [M]),
|
|
102
|
+
}, [M]), B = c(() => {
|
|
103
|
+
let e = A.configSchema.trim();
|
|
104
|
+
if (!e) {
|
|
105
|
+
L(null);
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
try {
|
|
109
|
+
JSON.parse(e), L(null);
|
|
110
|
+
} catch {
|
|
111
|
+
L(E("adaptercloud.adapters.form.configSchemaInvalid", "Config schema must be valid JSON."));
|
|
112
|
+
}
|
|
113
|
+
}, [A.configSchema, E]), V = O.isPending || k.isPending, H = c((e) => {
|
|
55
114
|
if (e.preventDefault(), F(null), !A.name.trim()) {
|
|
56
115
|
F(E("adaptercloud.adapters.form.nameRequired", "Name is required."));
|
|
57
116
|
return;
|
|
@@ -60,212 +119,235 @@ function S() {
|
|
|
60
119
|
F(E("adaptercloud.adapters.form.slugRequired", "Slug is required."));
|
|
61
120
|
return;
|
|
62
121
|
}
|
|
63
|
-
let t =
|
|
122
|
+
let t = A.configSchema.trim(), n;
|
|
123
|
+
if (t) try {
|
|
124
|
+
n = JSON.parse(t);
|
|
125
|
+
} catch {
|
|
126
|
+
let e = E("adaptercloud.adapters.form.configSchemaInvalid", "Config schema must be valid JSON.");
|
|
127
|
+
L(e), F(e);
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
L(null);
|
|
131
|
+
let r = {
|
|
64
132
|
name: A.name.trim(),
|
|
65
133
|
kind: A.kind,
|
|
66
134
|
status: A.status,
|
|
67
135
|
vendor: A.vendor.trim() || void 0,
|
|
68
136
|
version: A.version.trim() || void 0,
|
|
69
137
|
description: A.description.trim() || void 0,
|
|
70
|
-
capabilities:
|
|
71
|
-
tags:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
138
|
+
capabilities: A.capabilities,
|
|
139
|
+
tags: A.tags,
|
|
140
|
+
configSchema: t ? n : void 0
|
|
141
|
+
}, i = (e) => F(e instanceof Error ? e.message : "Failed to save adapter.");
|
|
142
|
+
C && h ? k.mutate({
|
|
143
|
+
id: h,
|
|
144
|
+
input: r
|
|
76
145
|
}, {
|
|
77
146
|
onSuccess: (e) => w(`/adapters/${e.id}`),
|
|
78
|
-
onError:
|
|
147
|
+
onError: i
|
|
79
148
|
}) : O.mutate({
|
|
80
|
-
...
|
|
149
|
+
...r,
|
|
81
150
|
slug: A.slug.trim()
|
|
82
151
|
}, {
|
|
83
152
|
onSuccess: (e) => w(`/adapters/${e.id}`),
|
|
84
|
-
onError:
|
|
153
|
+
onError: i
|
|
85
154
|
});
|
|
86
155
|
}, [
|
|
87
156
|
O,
|
|
88
157
|
k,
|
|
89
158
|
A,
|
|
90
|
-
|
|
159
|
+
h,
|
|
91
160
|
C,
|
|
92
161
|
w,
|
|
93
162
|
E
|
|
94
|
-
]),
|
|
95
|
-
return /* @__PURE__ */
|
|
163
|
+
]), U = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", W = "mb-1.5 block text-sm font-medium text-text-primary";
|
|
164
|
+
return /* @__PURE__ */ _(t, {
|
|
96
165
|
title: C ? E("adaptercloud.adapters.editTitle", "Edit Adapter") : E("adaptercloud.adapters.newTitle", "New Adapter"),
|
|
97
166
|
description: E("adaptercloud.adapters.formSubtitle", "Define how AdapterCloud connects to a class of system."),
|
|
98
|
-
actions: /* @__PURE__ */
|
|
167
|
+
actions: /* @__PURE__ */ v("button", {
|
|
99
168
|
type: "button",
|
|
100
|
-
onClick: () => w(C &&
|
|
169
|
+
onClick: () => w(C && h ? `/adapters/${h}` : "/adapters"),
|
|
101
170
|
className: "inline-flex items-center gap-2 rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-accent",
|
|
102
|
-
children: [/* @__PURE__ */
|
|
171
|
+
children: [/* @__PURE__ */ _(f, { className: "h-4 w-4" }), E("adaptercloud.common.cancel", "Cancel")]
|
|
103
172
|
}),
|
|
104
|
-
children: /* @__PURE__ */
|
|
173
|
+
children: /* @__PURE__ */ _(i, {
|
|
105
174
|
isLoading: C && D.isLoading,
|
|
106
175
|
isError: C && D.isError,
|
|
107
176
|
isEmpty: C && !D.isLoading && !D.data,
|
|
108
177
|
error: D.error,
|
|
109
178
|
onRetry: () => void D.refetch(),
|
|
110
179
|
emptyTitle: E("adaptercloud.adapters.notFound", "Adapter not found"),
|
|
111
|
-
children: /* @__PURE__ */
|
|
112
|
-
onSubmit:
|
|
113
|
-
className: "max-w-
|
|
114
|
-
children: /* @__PURE__ */
|
|
180
|
+
children: /* @__PURE__ */ _("form", {
|
|
181
|
+
onSubmit: H,
|
|
182
|
+
className: "max-w-5xl",
|
|
183
|
+
children: /* @__PURE__ */ v(y, {
|
|
115
184
|
className: "space-y-5 p-6",
|
|
116
185
|
children: [
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
className: "grid grid-cols-1 gap-
|
|
119
|
-
children: [/* @__PURE__ */
|
|
120
|
-
|
|
121
|
-
className: V,
|
|
122
|
-
children: [E("adaptercloud.adapters.form.name", "Name"), " *"]
|
|
123
|
-
}), /* @__PURE__ */ g("input", {
|
|
124
|
-
id: "ada-name",
|
|
125
|
-
type: "text",
|
|
126
|
-
value: A.name,
|
|
127
|
-
onChange: (e) => L(e.target.value),
|
|
128
|
-
className: B,
|
|
129
|
-
placeholder: "AWS Production"
|
|
130
|
-
})] }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("label", {
|
|
131
|
-
htmlFor: "ada-slug",
|
|
132
|
-
className: V,
|
|
186
|
+
/* @__PURE__ */ v("div", {
|
|
187
|
+
className: "grid grid-cols-1 gap-6 lg:grid-cols-2",
|
|
188
|
+
children: [/* @__PURE__ */ v("div", {
|
|
189
|
+
className: "space-y-5",
|
|
133
190
|
children: [
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
191
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ v("label", {
|
|
192
|
+
htmlFor: "ada-name",
|
|
193
|
+
className: W,
|
|
194
|
+
children: [E("adaptercloud.adapters.form.name", "Name"), " *"]
|
|
195
|
+
}), /* @__PURE__ */ _("input", {
|
|
196
|
+
id: "ada-name",
|
|
197
|
+
type: "text",
|
|
198
|
+
value: A.name,
|
|
199
|
+
onChange: (e) => z(e.target.value),
|
|
200
|
+
className: U,
|
|
201
|
+
placeholder: "AWS Production"
|
|
202
|
+
})] }),
|
|
203
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ v("label", {
|
|
204
|
+
htmlFor: "ada-slug",
|
|
205
|
+
className: W,
|
|
206
|
+
children: [
|
|
207
|
+
E("adaptercloud.adapters.form.slug", "Slug"),
|
|
208
|
+
" ",
|
|
209
|
+
C ? "" : "*"
|
|
210
|
+
]
|
|
211
|
+
}), /* @__PURE__ */ _("input", {
|
|
212
|
+
id: "ada-slug",
|
|
213
|
+
type: "text",
|
|
214
|
+
value: A.slug,
|
|
215
|
+
disabled: C,
|
|
216
|
+
onChange: (e) => {
|
|
217
|
+
N(!0), R("slug", b(e.target.value));
|
|
218
|
+
},
|
|
219
|
+
className: `${U} disabled:cursor-not-allowed disabled:opacity-60`,
|
|
220
|
+
placeholder: "aws-production"
|
|
221
|
+
})] }),
|
|
222
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
223
|
+
htmlFor: "ada-vendor",
|
|
224
|
+
className: W,
|
|
225
|
+
children: E("adaptercloud.adapters.form.vendor", "Vendor")
|
|
226
|
+
}), /* @__PURE__ */ _("input", {
|
|
227
|
+
id: "ada-vendor",
|
|
228
|
+
type: "text",
|
|
229
|
+
value: A.vendor,
|
|
230
|
+
onChange: (e) => R("vendor", e.target.value),
|
|
231
|
+
className: U,
|
|
232
|
+
placeholder: "Amazon Web Services"
|
|
233
|
+
})] }),
|
|
234
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
235
|
+
htmlFor: "ada-version",
|
|
236
|
+
className: W,
|
|
237
|
+
children: E("adaptercloud.adapters.form.version", "Version")
|
|
238
|
+
}), /* @__PURE__ */ _("input", {
|
|
239
|
+
id: "ada-version",
|
|
240
|
+
type: "text",
|
|
241
|
+
value: A.version,
|
|
242
|
+
onChange: (e) => R("version", e.target.value),
|
|
243
|
+
className: U,
|
|
244
|
+
placeholder: "1.0.0"
|
|
245
|
+
})] }),
|
|
246
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
247
|
+
htmlFor: "ada-description",
|
|
248
|
+
className: W,
|
|
249
|
+
children: E("adaptercloud.adapters.form.description", "Description")
|
|
250
|
+
}), /* @__PURE__ */ _("textarea", {
|
|
251
|
+
id: "ada-description",
|
|
252
|
+
value: A.description,
|
|
253
|
+
onChange: (e) => R("description", e.target.value),
|
|
254
|
+
rows: 3,
|
|
255
|
+
className: U,
|
|
256
|
+
placeholder: E("adaptercloud.adapters.form.descriptionPlaceholder", "What this adapter connects to and how.")
|
|
257
|
+
})] }),
|
|
258
|
+
/* @__PURE__ */ v("div", { children: [
|
|
259
|
+
/* @__PURE__ */ _("label", {
|
|
260
|
+
htmlFor: "ada-config-schema",
|
|
261
|
+
className: W,
|
|
262
|
+
children: E("adaptercloud.adapters.form.configSchema", "Config schema")
|
|
263
|
+
}),
|
|
264
|
+
/* @__PURE__ */ _("textarea", {
|
|
265
|
+
id: "ada-config-schema",
|
|
266
|
+
value: A.configSchema,
|
|
267
|
+
onChange: (e) => {
|
|
268
|
+
R("configSchema", e.target.value), I && L(null);
|
|
269
|
+
},
|
|
270
|
+
onBlur: B,
|
|
271
|
+
rows: 10,
|
|
272
|
+
spellCheck: !1,
|
|
273
|
+
"aria-invalid": I ? !0 : void 0,
|
|
274
|
+
className: "w-full rounded-lg border border-border-subtle bg-bg-sunken px-3 py-2 font-mono text-xs leading-relaxed text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
275
|
+
placeholder: "{\n \"type\": \"object\",\n \"properties\": {}\n}"
|
|
276
|
+
}),
|
|
277
|
+
I ? /* @__PURE__ */ _("p", {
|
|
278
|
+
role: "alert",
|
|
279
|
+
"aria-live": "polite",
|
|
280
|
+
className: "mt-1 text-xs text-status-error-text",
|
|
281
|
+
children: I
|
|
282
|
+
}) : /* @__PURE__ */ _("p", {
|
|
283
|
+
className: "mt-1 text-xs text-text-secondary",
|
|
284
|
+
children: E("adaptercloud.adapters.form.configSchemaHint", "Optional JSON schema describing this adapter’s configuration.")
|
|
285
|
+
})
|
|
286
|
+
] })
|
|
137
287
|
]
|
|
138
|
-
}), /* @__PURE__ */
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
})
|
|
187
|
-
id: "ada-vendor",
|
|
188
|
-
type: "text",
|
|
189
|
-
value: A.vendor,
|
|
190
|
-
onChange: (e) => I("vendor", e.target.value),
|
|
191
|
-
className: B,
|
|
192
|
-
placeholder: "Amazon Web Services"
|
|
193
|
-
})] }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
194
|
-
htmlFor: "ada-version",
|
|
195
|
-
className: V,
|
|
196
|
-
children: E("adaptercloud.adapters.form.version", "Version")
|
|
197
|
-
}), /* @__PURE__ */ g("input", {
|
|
198
|
-
id: "ada-version",
|
|
199
|
-
type: "text",
|
|
200
|
-
value: A.version,
|
|
201
|
-
onChange: (e) => I("version", e.target.value),
|
|
202
|
-
className: B,
|
|
203
|
-
placeholder: "1.0.0"
|
|
204
|
-
})] })]
|
|
288
|
+
}), /* @__PURE__ */ v("div", {
|
|
289
|
+
className: "space-y-5",
|
|
290
|
+
children: [
|
|
291
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
292
|
+
htmlFor: "ada-kind",
|
|
293
|
+
className: W,
|
|
294
|
+
children: E("adaptercloud.adapters.form.kind", "Kind")
|
|
295
|
+
}), /* @__PURE__ */ _("select", {
|
|
296
|
+
id: "ada-kind",
|
|
297
|
+
value: A.kind,
|
|
298
|
+
onChange: (e) => R("kind", e.target.value),
|
|
299
|
+
className: U,
|
|
300
|
+
children: Object.keys(n).map((e) => /* @__PURE__ */ _("option", {
|
|
301
|
+
value: e,
|
|
302
|
+
children: n[e]
|
|
303
|
+
}, e))
|
|
304
|
+
})] }),
|
|
305
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
306
|
+
htmlFor: "ada-status",
|
|
307
|
+
className: W,
|
|
308
|
+
children: E("adaptercloud.adapters.form.status", "Status")
|
|
309
|
+
}), /* @__PURE__ */ _("select", {
|
|
310
|
+
id: "ada-status",
|
|
311
|
+
value: A.status,
|
|
312
|
+
onChange: (e) => R("status", e.target.value),
|
|
313
|
+
className: U,
|
|
314
|
+
children: Object.keys(r).map((e) => /* @__PURE__ */ _("option", {
|
|
315
|
+
value: e,
|
|
316
|
+
children: r[e]
|
|
317
|
+
}, e))
|
|
318
|
+
})] }),
|
|
319
|
+
/* @__PURE__ */ _(S, {
|
|
320
|
+
id: "ada-capabilities",
|
|
321
|
+
label: E("adaptercloud.adapters.form.capabilities", "Capabilities"),
|
|
322
|
+
values: A.capabilities,
|
|
323
|
+
onChange: (e) => R("capabilities", e),
|
|
324
|
+
placeholder: E("adaptercloud.adapters.form.capabilitiesPlaceholder", "Add a capability and press Enter"),
|
|
325
|
+
chipClass: "bg-accent-blue-subtle text-accent-blue"
|
|
326
|
+
}),
|
|
327
|
+
/* @__PURE__ */ _(S, {
|
|
328
|
+
id: "ada-tags",
|
|
329
|
+
label: E("adaptercloud.common.tags", "Tags"),
|
|
330
|
+
values: A.tags,
|
|
331
|
+
onChange: (e) => R("tags", e),
|
|
332
|
+
placeholder: E("adaptercloud.adapters.form.tagsPlaceholder", "Add a tag and press Enter"),
|
|
333
|
+
chipClass: "bg-bg-sunken text-text-secondary"
|
|
334
|
+
})
|
|
335
|
+
]
|
|
336
|
+
})]
|
|
205
337
|
}),
|
|
206
|
-
|
|
207
|
-
htmlFor: "ada-description",
|
|
208
|
-
className: V,
|
|
209
|
-
children: E("adaptercloud.adapters.form.description", "Description")
|
|
210
|
-
}), /* @__PURE__ */ g("textarea", {
|
|
211
|
-
id: "ada-description",
|
|
212
|
-
value: A.description,
|
|
213
|
-
onChange: (e) => I("description", e.target.value),
|
|
214
|
-
rows: 3,
|
|
215
|
-
className: B,
|
|
216
|
-
placeholder: E("adaptercloud.adapters.form.descriptionPlaceholder", "What this adapter connects to and how.")
|
|
217
|
-
})] }),
|
|
218
|
-
/* @__PURE__ */ _("div", { children: [
|
|
219
|
-
/* @__PURE__ */ g("label", {
|
|
220
|
-
htmlFor: "ada-capabilities",
|
|
221
|
-
className: V,
|
|
222
|
-
children: E("adaptercloud.adapters.form.capabilities", "Capabilities")
|
|
223
|
-
}),
|
|
224
|
-
/* @__PURE__ */ g("input", {
|
|
225
|
-
id: "ada-capabilities",
|
|
226
|
-
type: "text",
|
|
227
|
-
value: A.capabilities,
|
|
228
|
-
onChange: (e) => I("capabilities", e.target.value),
|
|
229
|
-
className: B,
|
|
230
|
-
placeholder: "discovery, cost, reconcile"
|
|
231
|
-
}),
|
|
232
|
-
/* @__PURE__ */ g("p", {
|
|
233
|
-
className: "mt-1 text-xs text-text-secondary",
|
|
234
|
-
children: E("adaptercloud.common.commaSeparated", "Comma-separated.")
|
|
235
|
-
})
|
|
236
|
-
] }),
|
|
237
|
-
/* @__PURE__ */ _("div", { children: [
|
|
238
|
-
/* @__PURE__ */ g("label", {
|
|
239
|
-
htmlFor: "ada-tags",
|
|
240
|
-
className: V,
|
|
241
|
-
children: E("adaptercloud.common.tags", "Tags")
|
|
242
|
-
}),
|
|
243
|
-
/* @__PURE__ */ g("input", {
|
|
244
|
-
id: "ada-tags",
|
|
245
|
-
type: "text",
|
|
246
|
-
value: A.tags,
|
|
247
|
-
onChange: (e) => I("tags", e.target.value),
|
|
248
|
-
className: B,
|
|
249
|
-
placeholder: "production, cloud"
|
|
250
|
-
}),
|
|
251
|
-
/* @__PURE__ */ g("p", {
|
|
252
|
-
className: "mt-1 text-xs text-text-secondary",
|
|
253
|
-
children: E("adaptercloud.common.commaSeparated", "Comma-separated.")
|
|
254
|
-
})
|
|
255
|
-
] }),
|
|
256
|
-
P && /* @__PURE__ */ g("p", {
|
|
338
|
+
P && /* @__PURE__ */ _("p", {
|
|
257
339
|
role: "alert",
|
|
258
340
|
"aria-live": "polite",
|
|
259
341
|
className: "rounded-lg bg-status-error-bg-subtle px-3 py-2 text-sm text-status-error-text",
|
|
260
342
|
children: P
|
|
261
343
|
}),
|
|
262
|
-
/* @__PURE__ */
|
|
344
|
+
/* @__PURE__ */ _("div", {
|
|
263
345
|
className: "flex justify-end gap-3 pt-2",
|
|
264
|
-
children: /* @__PURE__ */
|
|
346
|
+
children: /* @__PURE__ */ v("button", {
|
|
265
347
|
type: "submit",
|
|
266
|
-
disabled:
|
|
348
|
+
disabled: V,
|
|
267
349
|
className: "inline-flex items-center gap-2 rounded-lg bg-action-primary-bg px-5 py-2 text-sm font-medium text-action-primary-text transition-colors hover:opacity-90 disabled:opacity-50",
|
|
268
|
-
children: [
|
|
350
|
+
children: [V ? /* @__PURE__ */ _(p, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ _(m, { className: "h-4 w-4" }), C ? E("adaptercloud.common.saveChanges", "Save changes") : E("adaptercloud.adapters.create", "Create adapter")]
|
|
269
351
|
})
|
|
270
352
|
})
|
|
271
353
|
]
|
|
@@ -275,6 +357,6 @@ function S() {
|
|
|
275
357
|
});
|
|
276
358
|
}
|
|
277
359
|
//#endregion
|
|
278
|
-
export {
|
|
360
|
+
export { C as AdapterFormPage };
|
|
279
361
|
|
|
280
362
|
//# sourceMappingURL=AdapterFormPage.js.map
|