@kong-ui-public/entities-vaults 3.26.1 → 3.26.2
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.
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as ue, ref as
|
|
2
|
-
import { useRouter as
|
|
3
|
-
import { BookIcon as
|
|
4
|
-
import { useAxios as _e, useTableState as
|
|
5
|
-
import { createI18n as
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as ue, ref as $, computed as w, watch as ke, onBeforeMount as we, resolveComponent as B, createElementBlock as W, openBlock as V, createVNode as u, unref as e, createSlots as Ke, withCtx as v, createTextVNode as de, toDisplayString as T, createElementVNode as I, createBlock as j, Teleport as Ye, createCommentVNode as D, reactive as he, resolveDynamicComponent as He, TransitionGroup as Xe, Fragment as qe, renderList as et, mergeProps as je, normalizeClass as tt, nextTick as lt, renderSlot as ot } from "vue";
|
|
2
|
+
import { useRouter as Ae } from "vue-router";
|
|
3
|
+
import { BookIcon as Me, AddIcon as Re, SecurityIcon as at, ConjourIcon as rt, AzureIcon as it, HashicorpIcon as nt, GoogleCloudIcon as st, AwsIcon as ct, CodeIcon as dt, KongIcon as ut } from "@kong/icons";
|
|
4
|
+
import { useAxios as _e, useTableState as ft, useFetcher as De, useDeleteUrlBuilder as We, FetcherStatus as Be, EntityBaseTable as Le, PermissionsWrapper as ge, TableTags as pt, EntityFilter as ze, EntityDeleteModal as Ge, EntityTypes as Je, useErrors as Ze, EntityBaseFormType as Ve, useGatewayFeatureSupported as mt, EntityBaseForm as Qe, SupportedEntityType as Ue, EntityFormSection as Ee, useStringHelpers as vt, useHelpers as gt, ConfigurationSchemaType as Se, ConfigurationSchemaSection as Fe, EntityBaseConfigCard as bt, ConfigCardItem as _t, useDebouncedFilter as Ne } from "@kong-ui-public/entities-shared";
|
|
5
|
+
import { createI18n as yt, i18nTComponent as ht } from "@kong-ui-public/i18n";
|
|
6
|
+
const Vt = {
|
|
7
7
|
create: "New vault",
|
|
8
8
|
copy_id: "Copy ID",
|
|
9
9
|
copy_json: "Copy JSON",
|
|
@@ -11,18 +11,18 @@ const bt = {
|
|
|
11
11
|
delete: "Delete",
|
|
12
12
|
view: "View Details",
|
|
13
13
|
loading: "Loading..."
|
|
14
|
-
},
|
|
14
|
+
}, kt = {
|
|
15
15
|
general: "Vaults could not be retrieved",
|
|
16
16
|
delete: "The vault could not be deleted at this time.",
|
|
17
17
|
copy: "Failed to copy to clipboard"
|
|
18
|
-
},
|
|
18
|
+
}, Ct = {
|
|
19
19
|
placeholder_for_vaults: {
|
|
20
20
|
konnect: "Filter by exact prefix or ID"
|
|
21
21
|
},
|
|
22
22
|
placeholder_for_secrets: {
|
|
23
23
|
konnect: "Filter by exact key"
|
|
24
24
|
}
|
|
25
|
-
},
|
|
25
|
+
}, wt = {
|
|
26
26
|
title: "Vaults",
|
|
27
27
|
list: {
|
|
28
28
|
toolbar_actions: {
|
|
@@ -47,7 +47,7 @@ const bt = {
|
|
|
47
47
|
learn_more: "Learn more"
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
},
|
|
50
|
+
}, St = {
|
|
51
51
|
title: "Secrets",
|
|
52
52
|
list: {
|
|
53
53
|
toolbar_actions: {
|
|
@@ -79,12 +79,12 @@ const bt = {
|
|
|
79
79
|
},
|
|
80
80
|
hint: "Once saved, the secret value will not be visible"
|
|
81
81
|
}
|
|
82
|
-
},
|
|
82
|
+
}, It = {
|
|
83
83
|
success: "Copied {val} to clipboard",
|
|
84
84
|
success_brief: "Successfully copied to clipboard"
|
|
85
|
-
},
|
|
85
|
+
}, xt = {
|
|
86
86
|
vault_type: "Vault Type"
|
|
87
|
-
},
|
|
87
|
+
}, Rt = {
|
|
88
88
|
sections: {
|
|
89
89
|
general: {
|
|
90
90
|
title: "General Information",
|
|
@@ -370,7 +370,7 @@ const bt = {
|
|
|
370
370
|
}
|
|
371
371
|
},
|
|
372
372
|
unavailable: "This vault provider is available on Enterprise."
|
|
373
|
-
},
|
|
373
|
+
}, Et = {
|
|
374
374
|
title: "Look up Key in Vault",
|
|
375
375
|
vault: {
|
|
376
376
|
label: "Vault",
|
|
@@ -399,54 +399,54 @@ const bt = {
|
|
|
399
399
|
complete_action: "Look up {cta}",
|
|
400
400
|
cta: "key in vault"
|
|
401
401
|
}
|
|
402
|
-
},
|
|
403
|
-
actions:
|
|
402
|
+
}, At = {
|
|
403
|
+
actions: Vt,
|
|
404
404
|
delete: {
|
|
405
405
|
title: "Delete a Vault",
|
|
406
406
|
title_for_secret: "Delete a Secret",
|
|
407
407
|
description: "This action cannot be reversed."
|
|
408
408
|
},
|
|
409
|
-
errors:
|
|
410
|
-
search:
|
|
411
|
-
vaults:
|
|
412
|
-
secrets:
|
|
413
|
-
copy:
|
|
414
|
-
labels:
|
|
415
|
-
form:
|
|
416
|
-
vault_secret_picker:
|
|
409
|
+
errors: kt,
|
|
410
|
+
search: Ct,
|
|
411
|
+
vaults: wt,
|
|
412
|
+
secrets: St,
|
|
413
|
+
copy: It,
|
|
414
|
+
labels: xt,
|
|
415
|
+
form: Rt,
|
|
416
|
+
vault_secret_picker: Et
|
|
417
417
|
};
|
|
418
|
-
function
|
|
419
|
-
const l =
|
|
418
|
+
function Ut() {
|
|
419
|
+
const l = yt("en-us", At);
|
|
420
420
|
return {
|
|
421
421
|
i18n: l,
|
|
422
|
-
i18nT:
|
|
422
|
+
i18nT: ht(l)
|
|
423
423
|
// Translation component <i18n-t>
|
|
424
424
|
};
|
|
425
425
|
}
|
|
426
426
|
const ye = {
|
|
427
|
-
useI18n:
|
|
428
|
-
},
|
|
427
|
+
useI18n: Ut
|
|
428
|
+
}, Ie = "/v2/control-planes/{controlPlaneId}/core-entities", Oe = "/v2/control-planes/{controlPlaneId}/config-stores", xe = "/{workspace}", pe = {
|
|
429
429
|
list: {
|
|
430
430
|
konnect: {
|
|
431
|
-
getAll: `${
|
|
432
|
-
deleteConfigStore: `${
|
|
431
|
+
getAll: `${Ie}/vaults`,
|
|
432
|
+
deleteConfigStore: `${Oe}/{id}?force=true`
|
|
433
433
|
},
|
|
434
434
|
kongManager: {
|
|
435
|
-
getAll: `${
|
|
435
|
+
getAll: `${xe}/vaults`
|
|
436
436
|
}
|
|
437
437
|
},
|
|
438
438
|
form: {
|
|
439
439
|
konnect: {
|
|
440
|
-
create: `${Se}/vaults`,
|
|
441
|
-
createConfigStore: Ne,
|
|
442
|
-
edit: `${Se}/vaults/{id}`
|
|
443
|
-
},
|
|
444
|
-
kongManager: {
|
|
445
440
|
create: `${Ie}/vaults`,
|
|
441
|
+
createConfigStore: Oe,
|
|
446
442
|
edit: `${Ie}/vaults/{id}`
|
|
443
|
+
},
|
|
444
|
+
kongManager: {
|
|
445
|
+
create: `${xe}/vaults`,
|
|
446
|
+
edit: `${xe}/vaults/{id}`
|
|
447
447
|
}
|
|
448
448
|
}
|
|
449
|
-
},
|
|
449
|
+
}, Tt = { class: "kong-ui-entities-vaults-list" }, $t = { class: "button-row" }, Pt = { class: "table-content-overflow-wrapper" }, Kt = { class: "table-content-overflow-wrapper" }, Ht = /* @__PURE__ */ ue({
|
|
450
450
|
__name: "VaultList",
|
|
451
451
|
props: {
|
|
452
452
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -491,125 +491,125 @@ const ye = {
|
|
|
491
491
|
}
|
|
492
492
|
},
|
|
493
493
|
emits: ["error", "click:learn-more", "copy:success", "copy:error", "delete:success"],
|
|
494
|
-
setup(l, { emit:
|
|
494
|
+
setup(l, { emit: S }) {
|
|
495
495
|
var fe;
|
|
496
|
-
const
|
|
496
|
+
const d = S, c = l, { i18n: { t: p } } = ye.useI18n(), a = Ae(), { axiosInstance: P } = _e((fe = c.config) == null ? void 0 : fe.axiosRequestConfig), { hasRecords: x, handleStateChange: m } = ft(() => Q.value), n = w(() => x.value && c.config.app === "konnect"), b = w(() => c.config.app !== "kongManager" || !!c.config.disableSorting), f = {
|
|
497
497
|
// the Prefix column is non-hidable
|
|
498
498
|
prefix: { label: p("vaults.list.table_headers.prefix"), searchable: !0, sortable: !0, hidable: !1 },
|
|
499
499
|
// it's "Vault Type" on display, but we still use "name" to fit API schema
|
|
500
500
|
name: { label: p("vaults.list.table_headers.name"), searchable: !0, sortable: !0 },
|
|
501
501
|
description: { label: p("vaults.list.table_headers.description"), sortable: !1 },
|
|
502
502
|
tags: { label: p("vaults.list.table_headers.tags"), sortable: !1 }
|
|
503
|
-
}, z = f, X =
|
|
504
|
-
var
|
|
505
|
-
let
|
|
506
|
-
return
|
|
507
|
-
}), Q =
|
|
508
|
-
if (
|
|
503
|
+
}, z = f, X = w(() => {
|
|
504
|
+
var E, A;
|
|
505
|
+
let k = `${c.config.apiBaseUrl}${pe.list[c.config.app].getAll}`;
|
|
506
|
+
return c.config.app === "konnect" ? k = k.replace(/{controlPlaneId}/gi, ((E = c.config) == null ? void 0 : E.controlPlaneId) || "") : c.config.app === "kongManager" && (k = k.replace(/\/{workspace}/gi, (A = c.config) != null && A.workspace ? `/${c.config.workspace}` : "")), k;
|
|
507
|
+
}), Q = $(""), Y = w(() => {
|
|
508
|
+
if (c.config.app === "konnect" || c.config.isExactMatch)
|
|
509
509
|
return {
|
|
510
510
|
isExactMatch: !0,
|
|
511
511
|
placeholder: p("search.placeholder_for_vaults.konnect")
|
|
512
512
|
};
|
|
513
|
-
const { prefix:
|
|
513
|
+
const { prefix: E, name: A } = f;
|
|
514
514
|
return {
|
|
515
515
|
isExactMatch: !1,
|
|
516
|
-
fields: { name:
|
|
517
|
-
schema:
|
|
516
|
+
fields: { name: A, prefix: E },
|
|
517
|
+
schema: c.config.filterSchema
|
|
518
518
|
};
|
|
519
519
|
}), {
|
|
520
520
|
fetcher: N,
|
|
521
521
|
fetcherState: o,
|
|
522
522
|
fetcherCacheKey: ae
|
|
523
|
-
} =
|
|
523
|
+
} = De(w(() => ({ ...c.config, cacheIdentifier: c.cacheIdentifier })), X), G = () => {
|
|
524
524
|
Q.value = "";
|
|
525
525
|
}, ee = () => {
|
|
526
526
|
ae.value++;
|
|
527
|
-
}, J =
|
|
528
|
-
const
|
|
529
|
-
if (!await A
|
|
530
|
-
|
|
531
|
-
entity:
|
|
527
|
+
}, J = $(null), y = async (k, E) => {
|
|
528
|
+
const A = k.id;
|
|
529
|
+
if (!await E(A)) {
|
|
530
|
+
d("copy:error", {
|
|
531
|
+
entity: k,
|
|
532
532
|
field: "id",
|
|
533
533
|
message: p("errors.copy")
|
|
534
534
|
});
|
|
535
535
|
return;
|
|
536
536
|
}
|
|
537
|
-
|
|
538
|
-
entity:
|
|
537
|
+
d("copy:success", {
|
|
538
|
+
entity: k,
|
|
539
539
|
field: "id",
|
|
540
|
-
message: p("copy.success", { val:
|
|
540
|
+
message: p("copy.success", { val: A })
|
|
541
541
|
});
|
|
542
|
-
}, F = async (
|
|
543
|
-
const
|
|
544
|
-
if (!await A
|
|
545
|
-
|
|
546
|
-
entity:
|
|
542
|
+
}, F = async (k, E) => {
|
|
543
|
+
const A = JSON.stringify(k);
|
|
544
|
+
if (!await E(A)) {
|
|
545
|
+
d("copy:error", {
|
|
546
|
+
entity: k,
|
|
547
547
|
message: p("errors.copy")
|
|
548
548
|
});
|
|
549
549
|
return;
|
|
550
550
|
}
|
|
551
|
-
|
|
552
|
-
entity:
|
|
551
|
+
d("copy:success", {
|
|
552
|
+
entity: k,
|
|
553
553
|
message: p("copy.success_brief")
|
|
554
554
|
});
|
|
555
|
-
}, re = async (
|
|
556
|
-
var
|
|
557
|
-
await ((
|
|
558
|
-
}, ne = (
|
|
555
|
+
}, re = async (k) => {
|
|
556
|
+
var A;
|
|
557
|
+
await ((A = c.canRetrieve) == null ? void 0 : A.call(c, k)) && a.push(c.config.getViewRoute(k.id));
|
|
558
|
+
}, ne = (k) => ({
|
|
559
559
|
label: p("actions.view"),
|
|
560
|
-
to:
|
|
561
|
-
}), le = (
|
|
560
|
+
to: c.config.getViewRoute(k)
|
|
561
|
+
}), le = (k) => ({
|
|
562
562
|
label: p("actions.edit"),
|
|
563
|
-
to:
|
|
564
|
-
}), O =
|
|
565
|
-
O.value =
|
|
566
|
-
},
|
|
563
|
+
to: c.config.getEditRoute(k)
|
|
564
|
+
}), O = $(void 0), ie = $(!1), U = $(!1), Z = $(""), te = We(c.config, X.value), _ = (k) => {
|
|
565
|
+
O.value = k, ie.value = !0;
|
|
566
|
+
}, g = () => {
|
|
567
567
|
ie.value = !1;
|
|
568
|
-
},
|
|
569
|
-
const { apiBaseUrl:
|
|
568
|
+
}, K = async (k) => {
|
|
569
|
+
const { apiBaseUrl: E, app: A, controlPlaneId: s } = c.config, r = `${E}${pe.list[A].deleteConfigStore}`.replace(/{controlPlaneId}/gi, s || "").replace(/{id}/gi, k);
|
|
570
570
|
try {
|
|
571
|
-
await
|
|
571
|
+
await P.delete(r);
|
|
572
572
|
} catch {
|
|
573
573
|
}
|
|
574
574
|
}, H = async () => {
|
|
575
|
-
var
|
|
576
|
-
if ((
|
|
577
|
-
|
|
575
|
+
var k, E, A, s;
|
|
576
|
+
if ((k = O.value) != null && k.id) {
|
|
577
|
+
U.value = !0;
|
|
578
578
|
try {
|
|
579
|
-
await
|
|
579
|
+
await P.delete(te(O.value.id)), c.config.app === "konnect" && ((E = O.value.config) != null && E.config_store_id) && K(O.value.config.config_store_id), U.value = !1, ie.value = !1, ae.value++, d("delete:success", O.value);
|
|
580
580
|
} catch (r) {
|
|
581
|
-
Z.value = ((
|
|
581
|
+
Z.value = ((s = (A = r.response) == null ? void 0 : A.data) == null ? void 0 : s.message) || r.message || p("errors.delete"), d("error", r);
|
|
582
582
|
} finally {
|
|
583
|
-
|
|
583
|
+
U.value = !1;
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
586
|
}, se = () => {
|
|
587
|
-
a.push(
|
|
587
|
+
a.push(c.config.createRoute);
|
|
588
588
|
};
|
|
589
|
-
ke(o, (
|
|
590
|
-
var
|
|
591
|
-
if (
|
|
589
|
+
ke(o, (k) => {
|
|
590
|
+
var E, A, s;
|
|
591
|
+
if (k.status === Be.Error) {
|
|
592
592
|
J.value = {
|
|
593
593
|
title: p("errors.general")
|
|
594
|
-
}, (
|
|
594
|
+
}, (s = (A = (E = k.error) == null ? void 0 : E.response) == null ? void 0 : A.data) != null && s.message && (J.value.message = k.error.response.data.message), d("error", k.error);
|
|
595
595
|
return;
|
|
596
596
|
}
|
|
597
597
|
J.value = null;
|
|
598
598
|
});
|
|
599
|
-
const q =
|
|
600
|
-
ctaPath:
|
|
599
|
+
const q = $({
|
|
600
|
+
ctaPath: c.config.createRoute,
|
|
601
601
|
ctaText: void 0,
|
|
602
|
-
message: `${p("vaults.list.empty_state.description")}${
|
|
602
|
+
message: `${p("vaults.list.empty_state.description")}${c.config.additionMessageForEmptyState ? ` ${c.config.additionMessageForEmptyState}` : ""}`,
|
|
603
603
|
title: p("vaults.title")
|
|
604
|
-
}),
|
|
604
|
+
}), R = $(!1);
|
|
605
605
|
return we(async () => {
|
|
606
|
-
|
|
607
|
-
}), (
|
|
608
|
-
const
|
|
609
|
-
return
|
|
610
|
-
|
|
606
|
+
R.value = await c.canCreate(), R.value && (q.value.title = p("vaults.list.empty_state.title"), q.value.ctaText = p("actions.create"));
|
|
607
|
+
}), (k, E) => {
|
|
608
|
+
const A = B("KButton"), s = B("KEmptyState"), r = B("KDropdownItem"), L = B("KClipboardProvider");
|
|
609
|
+
return V(), W("div", Tt, [
|
|
610
|
+
u(e(Le), {
|
|
611
611
|
"cache-identifier": l.cacheIdentifier,
|
|
612
|
-
"disable-sorting":
|
|
612
|
+
"disable-sorting": b.value,
|
|
613
613
|
"empty-state-options": q.value,
|
|
614
614
|
"enable-entity-actions": "",
|
|
615
615
|
"error-message": J.value,
|
|
@@ -620,49 +620,49 @@ const ye = {
|
|
|
620
620
|
query: Q.value,
|
|
621
621
|
"table-headers": e(z),
|
|
622
622
|
onClearSearchInput: G,
|
|
623
|
-
"onClick:row":
|
|
623
|
+
"onClick:row": E[3] || (E[3] = (C) => re(C)),
|
|
624
624
|
onSort: ee,
|
|
625
|
-
onState: e(
|
|
625
|
+
onState: e(m)
|
|
626
626
|
}, Ke({
|
|
627
627
|
"toolbar-filter": v(() => [
|
|
628
|
-
|
|
628
|
+
u(e(ze), {
|
|
629
629
|
modelValue: Q.value,
|
|
630
|
-
"onUpdate:modelValue":
|
|
630
|
+
"onUpdate:modelValue": E[0] || (E[0] = (C) => Q.value = C),
|
|
631
631
|
config: Y.value
|
|
632
632
|
}, null, 8, ["modelValue", "config"])
|
|
633
633
|
]),
|
|
634
634
|
"toolbar-button": v(() => [
|
|
635
|
-
(
|
|
635
|
+
(V(), j(Ye, {
|
|
636
636
|
disabled: !l.useActionOutside,
|
|
637
637
|
to: "#kong-ui-app-page-header-action-button"
|
|
638
638
|
}, [
|
|
639
|
-
|
|
640
|
-
|
|
639
|
+
I("div", $t, [
|
|
640
|
+
n.value ? (V(), j(A, {
|
|
641
641
|
key: 0,
|
|
642
642
|
appearance: "secondary",
|
|
643
643
|
class: "open-learning-hub",
|
|
644
644
|
"data-testid": "vault-learn-more-button",
|
|
645
645
|
icon: "",
|
|
646
|
-
onClick:
|
|
646
|
+
onClick: E[1] || (E[1] = (C) => k.$emit("click:learn-more"))
|
|
647
647
|
}, {
|
|
648
648
|
default: v(() => [
|
|
649
|
-
|
|
649
|
+
u(e(Me), { decorative: "" })
|
|
650
650
|
]),
|
|
651
651
|
_: 1
|
|
652
652
|
})) : D("", !0),
|
|
653
|
-
|
|
653
|
+
u(e(ge), {
|
|
654
654
|
"auth-function": () => l.canCreate()
|
|
655
655
|
}, {
|
|
656
656
|
default: v(() => [
|
|
657
|
-
|
|
657
|
+
u(A, {
|
|
658
658
|
appearance: "primary",
|
|
659
659
|
"data-testid": "toolbar-add-vault",
|
|
660
660
|
size: l.useActionOutside ? "medium" : "large",
|
|
661
661
|
to: l.config.createRoute
|
|
662
662
|
}, {
|
|
663
663
|
default: v(() => [
|
|
664
|
-
|
|
665
|
-
de(" " +
|
|
664
|
+
u(e(Re)),
|
|
665
|
+
de(" " + T(e(p)("vaults.list.toolbar_actions.new_vault")), 1)
|
|
666
666
|
]),
|
|
667
667
|
_: 1
|
|
668
668
|
}, 8, ["size", "to"])
|
|
@@ -672,84 +672,84 @@ const ye = {
|
|
|
672
672
|
])
|
|
673
673
|
], 8, ["disabled"]))
|
|
674
674
|
]),
|
|
675
|
-
prefix: v(({ rowValue:
|
|
676
|
-
|
|
677
|
-
|
|
675
|
+
prefix: v(({ rowValue: C }) => [
|
|
676
|
+
I("div", Pt, [
|
|
677
|
+
I("b", null, T(C ?? "-"), 1)
|
|
678
678
|
])
|
|
679
679
|
]),
|
|
680
|
-
name: v(({ rowValue:
|
|
681
|
-
|
|
680
|
+
name: v(({ rowValue: C }) => [
|
|
681
|
+
I("b", null, T(C ?? "-"), 1)
|
|
682
682
|
]),
|
|
683
|
-
description: v(({ rowValue:
|
|
684
|
-
|
|
683
|
+
description: v(({ rowValue: C }) => [
|
|
684
|
+
I("div", Kt, T(C ?? "-"), 1)
|
|
685
685
|
]),
|
|
686
|
-
tags: v(({ rowValue:
|
|
687
|
-
|
|
686
|
+
tags: v(({ rowValue: C }) => [
|
|
687
|
+
u(e(pt), { tags: C }, null, 8, ["tags"])
|
|
688
688
|
]),
|
|
689
|
-
actions: v(({ row:
|
|
690
|
-
|
|
691
|
-
default: v(({ copyToClipboard:
|
|
692
|
-
|
|
689
|
+
actions: v(({ row: C }) => [
|
|
690
|
+
u(L, null, {
|
|
691
|
+
default: v(({ copyToClipboard: h }) => [
|
|
692
|
+
u(r, {
|
|
693
693
|
"data-testid": "action-entity-copy-id",
|
|
694
|
-
onClick: (oe) =>
|
|
694
|
+
onClick: (oe) => y(C, h)
|
|
695
695
|
}, {
|
|
696
696
|
default: v(() => [
|
|
697
|
-
de(
|
|
697
|
+
de(T(e(p)("actions.copy_id")), 1)
|
|
698
698
|
]),
|
|
699
699
|
_: 2
|
|
700
700
|
}, 1032, ["onClick"])
|
|
701
701
|
]),
|
|
702
702
|
_: 2
|
|
703
703
|
}, 1024),
|
|
704
|
-
|
|
705
|
-
default: v(({ copyToClipboard:
|
|
706
|
-
|
|
704
|
+
u(L, null, {
|
|
705
|
+
default: v(({ copyToClipboard: h }) => [
|
|
706
|
+
u(r, {
|
|
707
707
|
"data-testid": "action-entity-copy-json",
|
|
708
|
-
onClick: (oe) => F(
|
|
708
|
+
onClick: (oe) => F(C, h)
|
|
709
709
|
}, {
|
|
710
710
|
default: v(() => [
|
|
711
|
-
de(
|
|
711
|
+
de(T(e(p)("actions.copy_json")), 1)
|
|
712
712
|
]),
|
|
713
713
|
_: 2
|
|
714
714
|
}, 1032, ["onClick"])
|
|
715
715
|
]),
|
|
716
716
|
_: 2
|
|
717
717
|
}, 1024),
|
|
718
|
-
|
|
719
|
-
"auth-function": () => l.canRetrieve(
|
|
718
|
+
u(e(ge), {
|
|
719
|
+
"auth-function": () => l.canRetrieve(C)
|
|
720
720
|
}, {
|
|
721
721
|
default: v(() => [
|
|
722
|
-
|
|
722
|
+
u(r, {
|
|
723
723
|
"data-testid": "action-entity-view",
|
|
724
724
|
"has-divider": "",
|
|
725
|
-
item: ne(
|
|
725
|
+
item: ne(C.id)
|
|
726
726
|
}, null, 8, ["item"])
|
|
727
727
|
]),
|
|
728
728
|
_: 2
|
|
729
729
|
}, 1032, ["auth-function"]),
|
|
730
|
-
|
|
731
|
-
"auth-function": () => l.canEdit(
|
|
730
|
+
u(e(ge), {
|
|
731
|
+
"auth-function": () => l.canEdit(C)
|
|
732
732
|
}, {
|
|
733
733
|
default: v(() => [
|
|
734
|
-
|
|
734
|
+
u(r, {
|
|
735
735
|
"data-testid": "action-entity-edit",
|
|
736
|
-
item: le(
|
|
736
|
+
item: le(C.id)
|
|
737
737
|
}, null, 8, ["item"])
|
|
738
738
|
]),
|
|
739
739
|
_: 2
|
|
740
740
|
}, 1032, ["auth-function"]),
|
|
741
|
-
|
|
742
|
-
"auth-function": () => l.canDelete(
|
|
741
|
+
u(e(ge), {
|
|
742
|
+
"auth-function": () => l.canDelete(C)
|
|
743
743
|
}, {
|
|
744
744
|
default: v(() => [
|
|
745
|
-
|
|
745
|
+
u(r, {
|
|
746
746
|
danger: "",
|
|
747
747
|
"data-testid": "action-entity-delete",
|
|
748
748
|
"has-divider": "",
|
|
749
|
-
onClick: (
|
|
749
|
+
onClick: (h) => _(C)
|
|
750
750
|
}, {
|
|
751
751
|
default: v(() => [
|
|
752
|
-
de(
|
|
752
|
+
de(T(e(p)("actions.delete")), 1)
|
|
753
753
|
]),
|
|
754
754
|
_: 2
|
|
755
755
|
}, 1032, ["onClick"])
|
|
@@ -762,47 +762,47 @@ const ye = {
|
|
|
762
762
|
!Q.value && l.config.app === "konnect" ? {
|
|
763
763
|
name: "empty-state",
|
|
764
764
|
fn: v(() => {
|
|
765
|
-
var
|
|
765
|
+
var C;
|
|
766
766
|
return [
|
|
767
|
-
|
|
767
|
+
u(s, {
|
|
768
768
|
"data-testid": "vaults-entity-empty-state",
|
|
769
769
|
"icon-background": "",
|
|
770
770
|
message: e(p)("vaults.list.empty_state_v2.description"),
|
|
771
771
|
title: e(p)("vaults.list.empty_state_v2.title")
|
|
772
772
|
}, Ke({
|
|
773
773
|
icon: v(() => [
|
|
774
|
-
|
|
774
|
+
u(e(at), { decorative: "" })
|
|
775
775
|
]),
|
|
776
776
|
action: v(() => [
|
|
777
|
-
|
|
777
|
+
R.value ? (V(), j(A, {
|
|
778
778
|
key: 0,
|
|
779
779
|
"data-testid": "entity-create-button",
|
|
780
780
|
onClick: se
|
|
781
781
|
}, {
|
|
782
782
|
default: v(() => [
|
|
783
|
-
|
|
784
|
-
de(" " +
|
|
783
|
+
u(e(Re), { decorative: "" }),
|
|
784
|
+
de(" " + T(e(p)("vaults.list.empty_state_v2.create_cta")), 1)
|
|
785
785
|
]),
|
|
786
786
|
_: 1
|
|
787
787
|
})) : D("", !0),
|
|
788
|
-
|
|
788
|
+
u(A, {
|
|
789
789
|
appearance: "secondary",
|
|
790
790
|
"data-testid": "entity-learn-more-button",
|
|
791
|
-
onClick:
|
|
791
|
+
onClick: E[2] || (E[2] = (h) => k.$emit("click:learn-more"))
|
|
792
792
|
}, {
|
|
793
793
|
default: v(() => [
|
|
794
|
-
|
|
795
|
-
de(" " +
|
|
794
|
+
u(e(Me), { decorative: "" }),
|
|
795
|
+
de(" " + T(e(p)("vaults.list.empty_state_v2.learn_more")), 1)
|
|
796
796
|
]),
|
|
797
797
|
_: 1
|
|
798
798
|
})
|
|
799
799
|
]),
|
|
800
800
|
_: 2
|
|
801
801
|
}, [
|
|
802
|
-
(
|
|
802
|
+
(C = l.config) != null && C.isControlPlaneGroup ? {
|
|
803
803
|
name: "default",
|
|
804
804
|
fn: v(() => [
|
|
805
|
-
de(
|
|
805
|
+
de(T(e(p)("vaults.list.empty_state_v2.group")), 1)
|
|
806
806
|
]),
|
|
807
807
|
key: "0"
|
|
808
808
|
} : void 0
|
|
@@ -812,43 +812,43 @@ const ye = {
|
|
|
812
812
|
key: "0"
|
|
813
813
|
} : void 0
|
|
814
814
|
]), 1032, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers", "onState"]),
|
|
815
|
-
|
|
816
|
-
"action-pending":
|
|
815
|
+
u(e(Ge), {
|
|
816
|
+
"action-pending": U.value,
|
|
817
817
|
description: e(p)("delete.description"),
|
|
818
818
|
"entity-name": O.value && (O.value.prefix || O.value.id),
|
|
819
|
-
"entity-type": e(
|
|
819
|
+
"entity-type": e(Je).Vault,
|
|
820
820
|
error: Z.value,
|
|
821
821
|
title: e(p)("delete.title"),
|
|
822
822
|
visible: ie.value,
|
|
823
|
-
onCancel:
|
|
823
|
+
onCancel: g,
|
|
824
824
|
onProceed: H
|
|
825
825
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
|
|
826
826
|
]);
|
|
827
827
|
};
|
|
828
828
|
}
|
|
829
|
-
}), me = (l,
|
|
830
|
-
const
|
|
831
|
-
for (const [
|
|
832
|
-
c
|
|
833
|
-
return
|
|
834
|
-
},
|
|
829
|
+
}), me = (l, S) => {
|
|
830
|
+
const d = l.__vccOpts || l;
|
|
831
|
+
for (const [c, p] of S)
|
|
832
|
+
d[c] = p;
|
|
833
|
+
return d;
|
|
834
|
+
}, El = /* @__PURE__ */ me(Ht, [["__scopeId", "data-v-0f7e9fff"]]);
|
|
835
835
|
var t = /* @__PURE__ */ ((l) => (l.AWS = "aws", l.GCP = "gcp", l.HCV = "hcv", l.ENV = "env", l.AZURE = "azure", l.KONNECT = "konnect", l.CONJUR = "conjur", l))(t || {}), M = /* @__PURE__ */ ((l) => (l.TOKEN = "token", l.K8S = "kubernetes", l.APP_ROLE = "approle", l.CERT = "cert", l))(M || {});
|
|
836
|
-
const
|
|
836
|
+
const Mt = { class: "kong-ui-entities-vault-form" }, Ft = { class: "vault-form-provider-cards-container" }, Nt = ["data-testid"], Ot = { class: "provider-item-title-container" }, qt = { class: "provider-item-title" }, jt = { class: "provider-item-description" }, Dt = {
|
|
837
837
|
key: "kong-vault-config-fields",
|
|
838
838
|
class: "vault-form-config-fields-container"
|
|
839
|
-
},
|
|
839
|
+
}, Wt = {
|
|
840
840
|
key: 0,
|
|
841
841
|
class: "vault-form-config-auth-method-container"
|
|
842
|
-
},
|
|
842
|
+
}, Bt = {
|
|
843
843
|
key: 1,
|
|
844
844
|
class: "vault-form-config-auth-method-container"
|
|
845
|
-
},
|
|
845
|
+
}, Lt = {
|
|
846
846
|
key: 2,
|
|
847
847
|
class: "vault-form-config-auth-method-container"
|
|
848
|
-
},
|
|
848
|
+
}, zt = {
|
|
849
849
|
key: 3,
|
|
850
850
|
class: "vault-form-config-auth-method-container"
|
|
851
|
-
},
|
|
851
|
+
}, Gt = { key: 6 }, Jt = { class: "wrapper" }, Zt = { class: "item-50" }, Qt = { class: "item-50" }, Yt = { class: "wrapper" }, Xt = { class: "item-100" }, el = /* @__PURE__ */ ue({
|
|
852
852
|
__name: "VaultForm",
|
|
853
853
|
props: {
|
|
854
854
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -865,9 +865,9 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
865
865
|
}
|
|
866
866
|
},
|
|
867
867
|
emits: ["update", "error", "loading"],
|
|
868
|
-
setup(l, { emit:
|
|
869
|
-
var
|
|
870
|
-
const
|
|
868
|
+
setup(l, { emit: S }) {
|
|
869
|
+
var A;
|
|
870
|
+
const d = l, c = S, { i18nT: p, i18n: { t: a } } = ye.useI18n(), P = Ae(), { axiosInstance: x } = _e((A = d.config) == null ? void 0 : A.axiosRequestConfig), { getMessageFromError: m } = Ze(), n = he({
|
|
871
871
|
fields: {
|
|
872
872
|
prefix: "",
|
|
873
873
|
description: "",
|
|
@@ -875,12 +875,12 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
875
875
|
},
|
|
876
876
|
isReadonly: !1,
|
|
877
877
|
errorMessage: ""
|
|
878
|
-
}),
|
|
878
|
+
}), b = he({
|
|
879
879
|
prefix: "",
|
|
880
880
|
description: "",
|
|
881
881
|
tags: ""
|
|
882
|
-
}), f =
|
|
883
|
-
...
|
|
882
|
+
}), f = $(d.config.konnectConfigStoreAvailable ? t.KONNECT : t.ENV), z = $(null), X = $(), Q = w(() => [t.AWS, t.GCP, t.HCV, t.AZURE, t.CONJUR].includes(f.value)), Y = w(() => [
|
|
883
|
+
...d.config.konnectConfigStoreAvailable ? [{
|
|
884
884
|
label: a("form.config.konnect.label"),
|
|
885
885
|
value: t.KONNECT
|
|
886
886
|
}] : [],
|
|
@@ -903,17 +903,17 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
903
903
|
value: t.HCV,
|
|
904
904
|
disabled: !le.value
|
|
905
905
|
},
|
|
906
|
-
...
|
|
906
|
+
...d.config.azureVaultProviderAvailable ? [{
|
|
907
907
|
label: a("form.config.azure.label"),
|
|
908
908
|
value: t.AZURE,
|
|
909
909
|
disabled: !le.value
|
|
910
910
|
}] : [],
|
|
911
|
-
...
|
|
911
|
+
...d.config.conjurVaultProviderAvailable ? [{
|
|
912
912
|
label: a("form.config.conjur.label"),
|
|
913
913
|
value: t.CONJUR,
|
|
914
914
|
disabled: !le.value
|
|
915
915
|
}] : []
|
|
916
|
-
]), N =
|
|
916
|
+
]), N = d.config.base64FieldAvailable ? { base64_decode: !1 } : {}, o = he({
|
|
917
917
|
[t.KONNECT]: {},
|
|
918
918
|
[t.ENV]: {
|
|
919
919
|
prefix: "",
|
|
@@ -1041,41 +1041,41 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
1041
1041
|
{ label: `${a("form.config.aws.fields.region.locations.sa-east-1.location")} (sa-east-1)`, value: "sa-east-1" },
|
|
1042
1042
|
{ label: `${a("form.config.aws.fields.region.locations.us-gov-east-1.location")} (us-gov-east-1)`, value: "us-gov-east-1" },
|
|
1043
1043
|
{ label: `${a("form.config.aws.fields.region.locations.us-gov-west-1.location")} (us-gov-west-1)`, value: "us-gov-west-1" }
|
|
1044
|
-
], ee = [{ label: "secrets", value: "secrets" }], J = [{ label: "http", value: "http" }, { label: "https", value: "https" }],
|
|
1045
|
-
var
|
|
1046
|
-
return (r = pe.form[(
|
|
1047
|
-
}), ne =
|
|
1048
|
-
gatewayInfo:
|
|
1044
|
+
], ee = [{ label: "secrets", value: "secrets" }], J = [{ label: "http", value: "http" }, { label: "https", value: "https" }], y = [{ label: "v1", value: "v1" }, { label: "v2", value: "v2" }], F = w(() => d.vaultId ? Ve.Edit : Ve.Create), re = w(() => {
|
|
1045
|
+
var s, r;
|
|
1046
|
+
return (r = pe.form[(s = d.config) == null ? void 0 : s.app]) == null ? void 0 : r.edit;
|
|
1047
|
+
}), ne = w(() => F.value === Ve.Edit && d.config.app === "kongManager"), le = w(() => d.config.app === "konnect" || mt({
|
|
1048
|
+
gatewayInfo: d.config.gatewayInfo,
|
|
1049
1049
|
// vault name can only be `env` in Gateway Community Edition
|
|
1050
1050
|
supportedRange: {
|
|
1051
1051
|
enterprise: []
|
|
1052
1052
|
}
|
|
1053
1053
|
})), O = () => {
|
|
1054
|
-
var
|
|
1055
|
-
|
|
1056
|
-
}, ie = (
|
|
1057
|
-
|
|
1058
|
-
},
|
|
1059
|
-
|
|
1060
|
-
}, Z = (
|
|
1061
|
-
switch (
|
|
1054
|
+
var s;
|
|
1055
|
+
P.push(((s = d.config) == null ? void 0 : s.cancelRoute) || { name: "vault-list" });
|
|
1056
|
+
}, ie = (s) => {
|
|
1057
|
+
c("loading", s);
|
|
1058
|
+
}, U = (s) => {
|
|
1059
|
+
c("error", s);
|
|
1060
|
+
}, Z = (s) => {
|
|
1061
|
+
switch (s) {
|
|
1062
1062
|
case t.KONNECT:
|
|
1063
|
-
return
|
|
1063
|
+
return ut;
|
|
1064
1064
|
case t.ENV:
|
|
1065
|
-
return
|
|
1065
|
+
return dt;
|
|
1066
1066
|
case t.AWS:
|
|
1067
|
-
return
|
|
1067
|
+
return ct;
|
|
1068
1068
|
case t.GCP:
|
|
1069
|
-
return
|
|
1069
|
+
return st;
|
|
1070
1070
|
case t.HCV:
|
|
1071
|
-
return
|
|
1071
|
+
return nt;
|
|
1072
1072
|
case t.AZURE:
|
|
1073
|
-
return
|
|
1073
|
+
return it;
|
|
1074
1074
|
case t.CONJUR:
|
|
1075
|
-
return
|
|
1075
|
+
return rt;
|
|
1076
1076
|
}
|
|
1077
|
-
}, te = (
|
|
1078
|
-
switch (
|
|
1077
|
+
}, te = (s) => {
|
|
1078
|
+
switch (s) {
|
|
1079
1079
|
case t.KONNECT:
|
|
1080
1080
|
return a("form.config.konnect.description");
|
|
1081
1081
|
case t.ENV:
|
|
@@ -1091,14 +1091,14 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
1091
1091
|
case t.CONJUR:
|
|
1092
1092
|
return a("form.config.conjur.description");
|
|
1093
1093
|
}
|
|
1094
|
-
},
|
|
1095
|
-
var
|
|
1096
|
-
|
|
1097
|
-
const r = ((oe =
|
|
1098
|
-
|
|
1099
|
-
const L = ((ce =
|
|
1100
|
-
L && (Object.keys(L).length || (
|
|
1101
|
-
},
|
|
1094
|
+
}, _ = (s) => {
|
|
1095
|
+
var C, h, oe, ce, ve, i;
|
|
1096
|
+
n.fields.prefix = ((C = s == null ? void 0 : s.item) == null ? void 0 : C.prefix) || (s == null ? void 0 : s.prefix) || "", n.fields.description = ((h = s == null ? void 0 : s.item) == null ? void 0 : h.description) || (s == null ? void 0 : s.description) || "";
|
|
1097
|
+
const r = ((oe = s == null ? void 0 : s.item) == null ? void 0 : oe.tags) || (s == null ? void 0 : s.tags) || [];
|
|
1098
|
+
n.fields.tags = (r == null ? void 0 : r.join(", ")) || "", Object.assign(b, n.fields);
|
|
1099
|
+
const L = ((ce = s == null ? void 0 : s.item) == null ? void 0 : ce.config) || (s == null ? void 0 : s.config) || null;
|
|
1100
|
+
L && (Object.keys(L).length || (s == null ? void 0 : s.name) === t.KONNECT) ? (f.value = ((ve = s == null ? void 0 : s.item) == null ? void 0 : ve.name) || (s == null ? void 0 : s.name) || "", z.value = f.value, X.value = ((i = s == null ? void 0 : s.config) == null ? void 0 : i.config_store_id) || void 0, Object.assign(o[f.value], L), Object.assign(ae[f.value], L)) : n.errorMessage = "Error loading vault config";
|
|
1101
|
+
}, g = (s) => s === "" || s == null, K = w(() => f.value === t.HCV ? !Object.keys(o[t.HCV]).filter((s) => [
|
|
1102
1102
|
"namespace",
|
|
1103
1103
|
"ttl",
|
|
1104
1104
|
"neg_ttl",
|
|
@@ -1107,13 +1107,13 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
1107
1107
|
"approle_auth_path",
|
|
1108
1108
|
"approle_secret_id",
|
|
1109
1109
|
"approle_secret_id_file"
|
|
1110
|
-
].includes(
|
|
1110
|
+
].includes(s) || o[t.HCV].auth_method !== M.K8S && (s === "kube_role" || s === "kube_api_token_file") || o[t.HCV].auth_method !== M.TOKEN && s === "token" || o[t.HCV].auth_method !== M.APP_ROLE && (s === "approle_role_id" || s === "approle_response_wrapping") || o[t.HCV].auth_method === M.APP_ROLE && s === "approle_response_wrapping" && typeof o[f.value][s] == "boolean" || o[t.HCV].auth_method !== M.CERT && ["cert_auth_role_name", "cert_auth_cert", "cert_auth_cert_key"].includes(s) ? !1 : g(o[f.value][s])).length : f.value === t.AZURE ? !Object.keys(o[t.AZURE]).filter((s) => ["client_id", "tenant_id", "ttl", "neg_ttl", "resurrect_ttl"].includes(s) ? !1 : g(o[f.value][s])).length : f.value === t.AWS ? !Object.keys(o[t.AWS]).filter((s) => ["endpoint_url", "assume_role_arn", "ttl", "neg_ttl", "resurrect_ttl", "sts_endpoint_url"].includes(s) ? !1 : g(o[f.value][s])).length : !Object.keys(o[f.value]).filter((s) => ["ttl", "neg_ttl", "resurrect_ttl"].includes(s) ? !1 : g(o[f.value][s])).length), H = w(() => !!n.fields.prefix && K.value), se = w(() => JSON.stringify(n.fields) !== JSON.stringify(b) || f.value !== z.value || JSON.stringify(o[f.value]) !== JSON.stringify(ae[f.value])), q = w(() => {
|
|
1111
1111
|
var r, L;
|
|
1112
|
-
let
|
|
1113
|
-
return
|
|
1114
|
-
}),
|
|
1112
|
+
let s = `${d.config.apiBaseUrl}${pe.form[d.config.app][F.value]}`;
|
|
1113
|
+
return d.config.app === "konnect" ? s = s.replace(/{controlPlaneId}/gi, ((r = d.config) == null ? void 0 : r.controlPlaneId) || "") : d.config.app === "kongManager" && (s = s.replace(/\/{workspace}/gi, (L = d.config) != null && L.workspace ? `/${d.config.workspace}` : "")), s = s.replace(/{id}/gi, d.vaultId), s;
|
|
1114
|
+
}), R = w(() => {
|
|
1115
1115
|
var ce, ve;
|
|
1116
|
-
const
|
|
1116
|
+
const s = {
|
|
1117
1117
|
protocol: o[t.HCV].protocol,
|
|
1118
1118
|
host: o[t.HCV].host,
|
|
1119
1119
|
port: parseInt(o[t.HCV].port.toString()),
|
|
@@ -1121,7 +1121,7 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
1121
1121
|
kv: o[t.HCV].kv,
|
|
1122
1122
|
namespace: o[t.HCV].namespace || null,
|
|
1123
1123
|
auth_method: o[t.HCV].auth_method,
|
|
1124
|
-
...
|
|
1124
|
+
...d.config.base64FieldAvailable && { base64_decode: o[t.HCV].base64_decode },
|
|
1125
1125
|
...o[t.HCV].auth_method === M.TOKEN && { token: o[t.HCV].token },
|
|
1126
1126
|
// For Kong Admin API, when auth_method is kubernetes, token must be in the request body and its value has to be null
|
|
1127
1127
|
...o[t.HCV].auth_method === M.K8S && {
|
|
@@ -1150,112 +1150,112 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
1150
1150
|
...o[f.value],
|
|
1151
1151
|
endpoint_url: o[f.value].endpoint_url || null,
|
|
1152
1152
|
assume_role_arn: o[f.value].assume_role_arn || null,
|
|
1153
|
-
...
|
|
1153
|
+
...d.config.awsStsEndpointUrlAvailable ? { sts_endpoint_url: o[f.value].sts_endpoint_url || null } : {}
|
|
1154
1154
|
};
|
|
1155
|
-
let
|
|
1156
|
-
f.value === t.HCV ?
|
|
1157
|
-
let
|
|
1155
|
+
let C = o[f.value];
|
|
1156
|
+
f.value === t.HCV ? C = s : f.value === t.AZURE ? C = r : f.value === t.AWS && (C = L);
|
|
1157
|
+
let h = {};
|
|
1158
1158
|
if (![t.KONNECT, t.ENV].includes(f.value)) {
|
|
1159
|
-
const i = o[f.value],
|
|
1160
|
-
|
|
1161
|
-
ttl:
|
|
1162
|
-
neg_ttl:
|
|
1163
|
-
resurrect_ttl:
|
|
1159
|
+
const i = o[f.value], Te = i.ttl, $e = i.neg_ttl, Pe = i.resurrect_ttl;
|
|
1160
|
+
h = {
|
|
1161
|
+
ttl: Te ? parseInt(Te.toString(), 10) : null,
|
|
1162
|
+
neg_ttl: $e ? parseInt($e.toString(), 10) : null,
|
|
1163
|
+
resurrect_ttl: Pe ? parseInt(Pe.toString(), 10) : null
|
|
1164
1164
|
};
|
|
1165
1165
|
}
|
|
1166
1166
|
return {
|
|
1167
|
-
prefix:
|
|
1168
|
-
description:
|
|
1169
|
-
tags: (ve = (ce =
|
|
1167
|
+
prefix: n.fields.prefix,
|
|
1168
|
+
description: n.fields.description || null,
|
|
1169
|
+
tags: (ve = (ce = n.fields.tags.split(",")) == null ? void 0 : ce.map((i) => String(i || "").trim())) == null ? void 0 : ve.filter((i) => i !== ""),
|
|
1170
1170
|
name: f.value,
|
|
1171
1171
|
config: {
|
|
1172
|
-
...
|
|
1173
|
-
...
|
|
1172
|
+
...C,
|
|
1173
|
+
...h
|
|
1174
1174
|
}
|
|
1175
1175
|
};
|
|
1176
|
-
}), fe =
|
|
1177
|
-
...
|
|
1176
|
+
}), fe = w(() => ({
|
|
1177
|
+
...R.value,
|
|
1178
1178
|
config: {
|
|
1179
|
-
...
|
|
1179
|
+
...R.value.config,
|
|
1180
1180
|
config_store_id: X.value
|
|
1181
1181
|
}
|
|
1182
|
-
})),
|
|
1183
|
-
var
|
|
1182
|
+
})), k = async () => {
|
|
1183
|
+
var s;
|
|
1184
1184
|
try {
|
|
1185
|
-
|
|
1186
|
-
const r = `${
|
|
1185
|
+
n.isReadonly = !0;
|
|
1186
|
+
const r = `${d.config.apiBaseUrl}${pe.form.konnect.createConfigStore}`.replace(/{controlPlaneId}/gi, ((s = d.config) == null ? void 0 : s.controlPlaneId) || ""), L = await x.post(r);
|
|
1187
1187
|
return L == null ? void 0 : L.data.id;
|
|
1188
1188
|
} catch (r) {
|
|
1189
|
-
|
|
1189
|
+
n.errorMessage = m(r), c("error", r);
|
|
1190
1190
|
} finally {
|
|
1191
|
-
|
|
1191
|
+
n.isReadonly = !1;
|
|
1192
1192
|
}
|
|
1193
|
-
},
|
|
1194
|
-
var
|
|
1193
|
+
}, E = async () => {
|
|
1194
|
+
var s;
|
|
1195
1195
|
try {
|
|
1196
|
-
|
|
1196
|
+
n.isReadonly = !0;
|
|
1197
1197
|
let r;
|
|
1198
|
-
F.value === "create" ? f.value === t.KONNECT ? (X.value = await
|
|
1198
|
+
F.value === "create" ? f.value === t.KONNECT ? (X.value = await k(), r = await x.post(q.value, fe.value)) : r = await x.post(q.value, R.value) : F.value === "edit" && (f.value === t.KONNECT && !X.value ? (X.value = await k(), r = await x.put(q.value, fe.value)) : r = ((s = d.config) == null ? void 0 : s.app) === "konnect" ? await x.put(q.value, fe.value) : await x.patch(q.value, R.value)), _(r == null ? void 0 : r.data), c("update", r == null ? void 0 : r.data);
|
|
1199
1199
|
} catch (r) {
|
|
1200
|
-
|
|
1200
|
+
n.errorMessage = m(r), c("error", r);
|
|
1201
1201
|
} finally {
|
|
1202
|
-
|
|
1202
|
+
n.isReadonly = !1;
|
|
1203
1203
|
}
|
|
1204
1204
|
};
|
|
1205
|
-
return (
|
|
1206
|
-
const L = B("KTooltip"),
|
|
1207
|
-
return
|
|
1208
|
-
|
|
1205
|
+
return (s, r) => {
|
|
1206
|
+
const L = B("KTooltip"), C = B("KSelect"), h = B("KInput"), oe = B("KCheckbox"), ce = B("KTextArea"), ve = B("KCollapse");
|
|
1207
|
+
return V(), W("div", Mt, [
|
|
1208
|
+
u(e(Qe), {
|
|
1209
1209
|
"can-submit": H.value && se.value,
|
|
1210
1210
|
config: l.config,
|
|
1211
1211
|
"edit-id": l.vaultId,
|
|
1212
|
-
"entity-type": e(
|
|
1213
|
-
"error-message":
|
|
1212
|
+
"entity-type": e(Ue).Vault,
|
|
1213
|
+
"error-message": n.errorMessage,
|
|
1214
1214
|
"fetch-url": re.value,
|
|
1215
|
-
"form-fields":
|
|
1216
|
-
"is-readonly":
|
|
1215
|
+
"form-fields": R.value,
|
|
1216
|
+
"is-readonly": n.isReadonly,
|
|
1217
1217
|
onCancel: O,
|
|
1218
|
-
"onFetch:error":
|
|
1219
|
-
"onFetch:success":
|
|
1218
|
+
"onFetch:error": U,
|
|
1219
|
+
"onFetch:success": _,
|
|
1220
1220
|
onLoading: ie,
|
|
1221
|
-
onSubmit:
|
|
1221
|
+
onSubmit: E
|
|
1222
1222
|
}, {
|
|
1223
1223
|
default: v(() => [
|
|
1224
|
-
|
|
1224
|
+
u(e(Ee), {
|
|
1225
1225
|
description: e(a)("form.sections.config.description"),
|
|
1226
1226
|
title: e(a)("form.sections.config.title")
|
|
1227
1227
|
}, {
|
|
1228
1228
|
default: v(() => [
|
|
1229
|
-
|
|
1230
|
-
|
|
1229
|
+
I("div", Ft, [
|
|
1230
|
+
u(C, {
|
|
1231
1231
|
modelValue: f.value,
|
|
1232
1232
|
"onUpdate:modelValue": r[0] || (r[0] = (i) => f.value = i),
|
|
1233
1233
|
"data-testid": "provider-select",
|
|
1234
1234
|
disabled: ne.value,
|
|
1235
1235
|
"dropdown-max-height": "500",
|
|
1236
1236
|
items: Y.value,
|
|
1237
|
-
readonly:
|
|
1237
|
+
readonly: n.isReadonly
|
|
1238
1238
|
}, {
|
|
1239
1239
|
"selected-item-template": v(({ item: i }) => [
|
|
1240
|
-
(
|
|
1241
|
-
|
|
1240
|
+
(V(), j(He(Z(i.value)))),
|
|
1241
|
+
I("span", null, T(i == null ? void 0 : i.label), 1)
|
|
1242
1242
|
]),
|
|
1243
1243
|
"item-template": v(({ item: i }) => [
|
|
1244
|
-
|
|
1244
|
+
u(L, {
|
|
1245
1245
|
placement: "top",
|
|
1246
1246
|
text: i.disabled ? e(a)("form.unavailable") : ""
|
|
1247
1247
|
}, {
|
|
1248
1248
|
default: v(() => [
|
|
1249
|
-
|
|
1249
|
+
I("div", {
|
|
1250
1250
|
class: "provider-item",
|
|
1251
1251
|
"data-testid": `vault-form-provider-${i.value}`
|
|
1252
1252
|
}, [
|
|
1253
|
-
(
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1253
|
+
(V(), j(He(Z(i.value)))),
|
|
1254
|
+
I("div", Ot, [
|
|
1255
|
+
I("span", qt, T(i == null ? void 0 : i.label), 1),
|
|
1256
|
+
I("span", jt, T(te(i.value)), 1)
|
|
1257
1257
|
])
|
|
1258
|
-
], 8,
|
|
1258
|
+
], 8, Nt)
|
|
1259
1259
|
]),
|
|
1260
1260
|
_: 2
|
|
1261
1261
|
}, 1032, ["text"])
|
|
@@ -1263,10 +1263,10 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
1263
1263
|
_: 1
|
|
1264
1264
|
}, 8, ["modelValue", "disabled", "items", "readonly"])
|
|
1265
1265
|
]),
|
|
1266
|
-
|
|
1266
|
+
u(Xe, { name: "appear" }, {
|
|
1267
1267
|
default: v(() => [
|
|
1268
|
-
f.value === e(t).ENV ? (
|
|
1269
|
-
|
|
1268
|
+
f.value === e(t).ENV ? (V(), W("div", Dt, [
|
|
1269
|
+
u(h, {
|
|
1270
1270
|
modelValue: o[e(t).ENV].prefix,
|
|
1271
1271
|
"onUpdate:modelValue": r[1] || (r[1] = (i) => o[e(t).ENV].prefix = i),
|
|
1272
1272
|
modelModifiers: { trim: !0 },
|
|
@@ -1278,11 +1278,11 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
1278
1278
|
tooltipAttributes: { maxWidth: "400" }
|
|
1279
1279
|
},
|
|
1280
1280
|
placeholder: e(a)("form.config.env.fields.prefix.placeholder"),
|
|
1281
|
-
readonly:
|
|
1281
|
+
readonly: n.isReadonly,
|
|
1282
1282
|
required: "",
|
|
1283
1283
|
type: "text"
|
|
1284
1284
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder", "readonly"]),
|
|
1285
|
-
l.config.base64FieldAvailable ? (
|
|
1285
|
+
l.config.base64FieldAvailable ? (V(), j(oe, {
|
|
1286
1286
|
key: 0,
|
|
1287
1287
|
modelValue: o[e(t).ENV].base64_decode,
|
|
1288
1288
|
"onUpdate:modelValue": r[2] || (r[2] = (i) => o[e(t).ENV].base64_decode = i),
|
|
@@ -1292,14 +1292,14 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
1292
1292
|
info: e(a)("form.config.commonFields.base64_decode.tooltip"),
|
|
1293
1293
|
tooltipAttributes: { maxWidth: "400" }
|
|
1294
1294
|
},
|
|
1295
|
-
readonly:
|
|
1295
|
+
readonly: n.isReadonly
|
|
1296
1296
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) : D("", !0)
|
|
1297
1297
|
])) : D("", !0),
|
|
1298
|
-
f.value === e(t).AWS ? (
|
|
1298
|
+
f.value === e(t).AWS ? (V(), W("div", {
|
|
1299
1299
|
key: `${e(t).AWS}-vault-config-fields`,
|
|
1300
1300
|
class: "vault-form-config-fields-container"
|
|
1301
1301
|
}, [
|
|
1302
|
-
|
|
1302
|
+
u(C, {
|
|
1303
1303
|
modelValue: o[e(t).AWS].region,
|
|
1304
1304
|
"onUpdate:modelValue": r[3] || (r[3] = (i) => o[e(t).AWS].region = i),
|
|
1305
1305
|
"data-testid": "vault-form-config-aws-region",
|
|
@@ -1307,11 +1307,11 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
1307
1307
|
label: e(a)("form.config.aws.fields.region.label"),
|
|
1308
1308
|
"label-attributes": { info: e(a)("form.config.aws.fields.region.tooltip") },
|
|
1309
1309
|
placeholder: e(a)("form.config.aws.fields.region.placeholder"),
|
|
1310
|
-
readonly:
|
|
1310
|
+
readonly: n.isReadonly,
|
|
1311
1311
|
required: "",
|
|
1312
1312
|
width: "100%"
|
|
1313
1313
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder", "readonly"]),
|
|
1314
|
-
|
|
1314
|
+
u(h, {
|
|
1315
1315
|
modelValue: o[e(t).AWS].endpoint_url,
|
|
1316
1316
|
"onUpdate:modelValue": r[4] || (r[4] = (i) => o[e(t).AWS].endpoint_url = i),
|
|
1317
1317
|
modelModifiers: { trim: !0 },
|
|
@@ -1322,10 +1322,10 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
1322
1322
|
info: e(a)("form.config.aws.fields.endpoint_url.tooltip"),
|
|
1323
1323
|
tooltipAttributes: { maxWidth: "400" }
|
|
1324
1324
|
},
|
|
1325
|
-
readonly:
|
|
1325
|
+
readonly: n.isReadonly,
|
|
1326
1326
|
type: "text"
|
|
1327
1327
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
1328
|
-
|
|
1328
|
+
u(h, {
|
|
1329
1329
|
modelValue: o[e(t).AWS].assume_role_arn,
|
|
1330
1330
|
"onUpdate:modelValue": r[5] || (r[5] = (i) => o[e(t).AWS].assume_role_arn = i),
|
|
1331
1331
|
modelModifiers: { trim: !0 },
|
|
@@ -1336,10 +1336,10 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
1336
1336
|
info: e(a)("form.config.aws.fields.assume_role_arn.tooltip"),
|
|
1337
1337
|
tooltipAttributes: { maxWidth: "400" }
|
|
1338
1338
|
},
|
|
1339
|
-
readonly:
|
|
1339
|
+
readonly: n.isReadonly,
|
|
1340
1340
|
type: "text"
|
|
1341
1341
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
1342
|
-
|
|
1342
|
+
u(h, {
|
|
1343
1343
|
modelValue: o[e(t).AWS].role_session_name,
|
|
1344
1344
|
"onUpdate:modelValue": r[6] || (r[6] = (i) => o[e(t).AWS].role_session_name = i),
|
|
1345
1345
|
modelModifiers: { trim: !0 },
|
|
@@ -1350,11 +1350,11 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
1350
1350
|
info: e(a)("form.config.aws.fields.role_session_name.tooltip"),
|
|
1351
1351
|
tooltipAttributes: { maxWidth: "400" }
|
|
1352
1352
|
},
|
|
1353
|
-
readonly:
|
|
1353
|
+
readonly: n.isReadonly,
|
|
1354
1354
|
required: "",
|
|
1355
1355
|
type: "text"
|
|
1356
1356
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
1357
|
-
l.config.awsStsEndpointUrlAvailable ? (
|
|
1357
|
+
l.config.awsStsEndpointUrlAvailable ? (V(), j(h, {
|
|
1358
1358
|
key: 0,
|
|
1359
1359
|
modelValue: o[e(t).AWS].sts_endpoint_url,
|
|
1360
1360
|
"onUpdate:modelValue": r[7] || (r[7] = (i) => o[e(t).AWS].sts_endpoint_url = i),
|
|
@@ -1366,10 +1366,10 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
1366
1366
|
info: e(a)("form.config.aws.fields.sts_endpoint_url.tooltip"),
|
|
1367
1367
|
tooltipAttributes: { maxWidth: "400" }
|
|
1368
1368
|
},
|
|
1369
|
-
readonly:
|
|
1369
|
+
readonly: n.isReadonly,
|
|
1370
1370
|
type: "text"
|
|
1371
1371
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) : D("", !0),
|
|
1372
|
-
l.config.base64FieldAvailable ? (
|
|
1372
|
+
l.config.base64FieldAvailable ? (V(), j(oe, {
|
|
1373
1373
|
key: 1,
|
|
1374
1374
|
modelValue: o[e(t).AWS].base64_decode,
|
|
1375
1375
|
"onUpdate:modelValue": r[8] || (r[8] = (i) => o[e(t).AWS].base64_decode = i),
|
|
@@ -1379,14 +1379,14 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
1379
1379
|
info: e(a)("form.config.commonFields.base64_decode.tooltip"),
|
|
1380
1380
|
tooltipAttributes: { maxWidth: "400" }
|
|
1381
1381
|
},
|
|
1382
|
-
readonly:
|
|
1382
|
+
readonly: n.isReadonly
|
|
1383
1383
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) : D("", !0)
|
|
1384
1384
|
])) : D("", !0),
|
|
1385
|
-
f.value === e(t).GCP ? (
|
|
1385
|
+
f.value === e(t).GCP ? (V(), W("div", {
|
|
1386
1386
|
key: `${e(t).GCP}-vault-config-fields`,
|
|
1387
1387
|
class: "vault-form-config-fields-container"
|
|
1388
1388
|
}, [
|
|
1389
|
-
|
|
1389
|
+
u(h, {
|
|
1390
1390
|
modelValue: o[e(t).GCP].project_id,
|
|
1391
1391
|
"onUpdate:modelValue": r[9] || (r[9] = (i) => o[e(t).GCP].project_id = i),
|
|
1392
1392
|
modelModifiers: { trim: !0 },
|
|
@@ -1394,24 +1394,24 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
1394
1394
|
"data-testid": "vault-form-config-gcp-project-id",
|
|
1395
1395
|
label: e(a)("form.config.gcp.fields.project_id.label"),
|
|
1396
1396
|
placeholder: e(a)("form.config.gcp.fields.project_id.placeholder"),
|
|
1397
|
-
readonly:
|
|
1397
|
+
readonly: n.isReadonly,
|
|
1398
1398
|
required: "",
|
|
1399
1399
|
type: "text"
|
|
1400
1400
|
}, {
|
|
1401
1401
|
"label-tooltip": v(() => [
|
|
1402
|
-
|
|
1402
|
+
u(e(p), {
|
|
1403
1403
|
keypath: "form.config.gcp.fields.project_id.tooltip.text",
|
|
1404
1404
|
scope: "global"
|
|
1405
1405
|
}, {
|
|
1406
1406
|
"italic-text": v(() => [
|
|
1407
|
-
|
|
1407
|
+
I("em", null, T(e(a)("form.config.gcp.fields.project_id.tooltip.italicText")), 1)
|
|
1408
1408
|
]),
|
|
1409
1409
|
_: 1
|
|
1410
1410
|
})
|
|
1411
1411
|
]),
|
|
1412
1412
|
_: 1
|
|
1413
1413
|
}, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
1414
|
-
l.config.base64FieldAvailable ? (
|
|
1414
|
+
l.config.base64FieldAvailable ? (V(), j(oe, {
|
|
1415
1415
|
key: 0,
|
|
1416
1416
|
modelValue: o[e(t).GCP].base64_decode,
|
|
1417
1417
|
"onUpdate:modelValue": r[10] || (r[10] = (i) => o[e(t).GCP].base64_decode = i),
|
|
@@ -1421,77 +1421,77 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
1421
1421
|
info: e(a)("form.config.commonFields.base64_decode.tooltip"),
|
|
1422
1422
|
tooltipAttributes: { maxWidth: "400" }
|
|
1423
1423
|
},
|
|
1424
|
-
readonly:
|
|
1424
|
+
readonly: n.isReadonly
|
|
1425
1425
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) : D("", !0)
|
|
1426
1426
|
])) : D("", !0),
|
|
1427
|
-
f.value === e(t).HCV ? (
|
|
1427
|
+
f.value === e(t).HCV ? (V(), W("div", {
|
|
1428
1428
|
key: `${e(t).HCV}-vault-config-fields`,
|
|
1429
1429
|
class: "vault-form-config-fields-container"
|
|
1430
1430
|
}, [
|
|
1431
|
-
|
|
1431
|
+
u(C, {
|
|
1432
1432
|
modelValue: o[e(t).HCV].protocol,
|
|
1433
1433
|
"onUpdate:modelValue": r[11] || (r[11] = (i) => o[e(t).HCV].protocol = i),
|
|
1434
1434
|
"data-testid": "vault-form-config-hcv-protocol",
|
|
1435
1435
|
items: J,
|
|
1436
1436
|
label: e(a)("form.config.hcv.fields.protocol.label"),
|
|
1437
|
-
readonly:
|
|
1437
|
+
readonly: n.isReadonly,
|
|
1438
1438
|
required: "",
|
|
1439
1439
|
width: "100%"
|
|
1440
1440
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1441
|
-
|
|
1441
|
+
u(h, {
|
|
1442
1442
|
modelValue: o[e(t).HCV].host,
|
|
1443
1443
|
"onUpdate:modelValue": r[12] || (r[12] = (i) => o[e(t).HCV].host = i),
|
|
1444
1444
|
modelModifiers: { trim: !0 },
|
|
1445
1445
|
autocomplete: "off",
|
|
1446
1446
|
"data-testid": "vault-form-config-hcv-host",
|
|
1447
1447
|
label: e(a)("form.config.hcv.fields.host.label"),
|
|
1448
|
-
readonly:
|
|
1448
|
+
readonly: n.isReadonly,
|
|
1449
1449
|
required: "",
|
|
1450
1450
|
type: "text"
|
|
1451
1451
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1452
|
-
|
|
1452
|
+
u(h, {
|
|
1453
1453
|
modelValue: o[e(t).HCV].port,
|
|
1454
1454
|
"onUpdate:modelValue": r[13] || (r[13] = (i) => o[e(t).HCV].port = i),
|
|
1455
1455
|
autocomplete: "off",
|
|
1456
1456
|
"data-testid": "vault-form-config-hcv-port",
|
|
1457
1457
|
label: e(a)("form.config.hcv.fields.port.label"),
|
|
1458
1458
|
min: "0",
|
|
1459
|
-
readonly:
|
|
1459
|
+
readonly: n.isReadonly,
|
|
1460
1460
|
required: "",
|
|
1461
1461
|
type: "number"
|
|
1462
1462
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1463
|
-
|
|
1463
|
+
u(h, {
|
|
1464
1464
|
modelValue: o[e(t).HCV].mount,
|
|
1465
1465
|
"onUpdate:modelValue": r[14] || (r[14] = (i) => o[e(t).HCV].mount = i),
|
|
1466
1466
|
modelModifiers: { trim: !0 },
|
|
1467
1467
|
autocomplete: "off",
|
|
1468
1468
|
"data-testid": "vault-form-config-hcv-mount",
|
|
1469
1469
|
label: e(a)("form.config.hcv.fields.mount.label"),
|
|
1470
|
-
readonly:
|
|
1470
|
+
readonly: n.isReadonly,
|
|
1471
1471
|
required: "",
|
|
1472
1472
|
type: "text"
|
|
1473
1473
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1474
|
-
|
|
1474
|
+
u(C, {
|
|
1475
1475
|
modelValue: o[e(t).HCV].kv,
|
|
1476
1476
|
"onUpdate:modelValue": r[15] || (r[15] = (i) => o[e(t).HCV].kv = i),
|
|
1477
1477
|
"data-testid": "vault-form-config-hcv-kv",
|
|
1478
|
-
items:
|
|
1478
|
+
items: y,
|
|
1479
1479
|
label: e(a)("form.config.hcv.fields.kv.label"),
|
|
1480
|
-
readonly:
|
|
1480
|
+
readonly: n.isReadonly,
|
|
1481
1481
|
required: "",
|
|
1482
1482
|
width: "100%"
|
|
1483
1483
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1484
|
-
|
|
1484
|
+
u(h, {
|
|
1485
1485
|
modelValue: o[e(t).HCV].namespace,
|
|
1486
1486
|
"onUpdate:modelValue": r[16] || (r[16] = (i) => o[e(t).HCV].namespace = i),
|
|
1487
1487
|
modelModifiers: { trim: !0 },
|
|
1488
1488
|
autocomplete: "off",
|
|
1489
1489
|
"data-testid": "vault-form-config-hcv-namespace",
|
|
1490
1490
|
label: e(a)("form.config.hcv.fields.namespace.label"),
|
|
1491
|
-
readonly:
|
|
1491
|
+
readonly: n.isReadonly,
|
|
1492
1492
|
type: "text"
|
|
1493
1493
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1494
|
-
|
|
1494
|
+
u(C, {
|
|
1495
1495
|
modelValue: o[e(t).HCV].auth_method,
|
|
1496
1496
|
"onUpdate:modelValue": r[17] || (r[17] = (i) => o[e(t).HCV].auth_method = i),
|
|
1497
1497
|
"data-testid": "vault-form-config-hcv-auth_method",
|
|
@@ -1502,138 +1502,138 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
1502
1502
|
...l.config.hcvCertMethodAvailable ? [{ label: e(M).CERT, value: e(M).CERT }] : []
|
|
1503
1503
|
],
|
|
1504
1504
|
label: e(a)("form.config.hcv.fields.auth_method.label"),
|
|
1505
|
-
readonly:
|
|
1505
|
+
readonly: n.isReadonly,
|
|
1506
1506
|
required: "",
|
|
1507
1507
|
width: "100%"
|
|
1508
1508
|
}, null, 8, ["modelValue", "items", "label", "readonly"]),
|
|
1509
|
-
o[e(t).HCV].auth_method === e(M).TOKEN ? (
|
|
1510
|
-
|
|
1509
|
+
o[e(t).HCV].auth_method === e(M).TOKEN ? (V(), W("div", Wt, [
|
|
1510
|
+
u(h, {
|
|
1511
1511
|
modelValue: o[e(t).HCV].token,
|
|
1512
1512
|
"onUpdate:modelValue": r[18] || (r[18] = (i) => o[e(t).HCV].token = i),
|
|
1513
1513
|
modelModifiers: { trim: !0 },
|
|
1514
1514
|
autocomplete: "off",
|
|
1515
1515
|
"data-testid": "vault-form-config-hcv-token",
|
|
1516
1516
|
label: e(a)("form.config.hcv.fields.token.label"),
|
|
1517
|
-
readonly:
|
|
1517
|
+
readonly: n.isReadonly,
|
|
1518
1518
|
required: "",
|
|
1519
1519
|
"show-password-mask-toggle": "",
|
|
1520
1520
|
type: "password"
|
|
1521
1521
|
}, null, 8, ["modelValue", "label", "readonly"])
|
|
1522
|
-
])) : o[e(t).HCV].auth_method === e(M).K8S ? (
|
|
1523
|
-
|
|
1522
|
+
])) : o[e(t).HCV].auth_method === e(M).K8S ? (V(), W("div", Bt, [
|
|
1523
|
+
u(h, {
|
|
1524
1524
|
modelValue: o[e(t).HCV].kube_role,
|
|
1525
1525
|
"onUpdate:modelValue": r[19] || (r[19] = (i) => o[e(t).HCV].kube_role = i),
|
|
1526
1526
|
modelModifiers: { trim: !0 },
|
|
1527
1527
|
autocomplete: "off",
|
|
1528
1528
|
"data-testid": "vault-form-config-hcv-kube_role",
|
|
1529
1529
|
label: e(a)("form.config.hcv.fields.kube_role.label"),
|
|
1530
|
-
readonly:
|
|
1530
|
+
readonly: n.isReadonly,
|
|
1531
1531
|
required: "",
|
|
1532
1532
|
type: "text"
|
|
1533
1533
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1534
|
-
|
|
1534
|
+
u(h, {
|
|
1535
1535
|
modelValue: o[e(t).HCV].kube_auth_path,
|
|
1536
1536
|
"onUpdate:modelValue": r[20] || (r[20] = (i) => o[e(t).HCV].kube_auth_path = i),
|
|
1537
1537
|
modelModifiers: { trim: !0 },
|
|
1538
1538
|
autocomplete: "off",
|
|
1539
1539
|
"data-testid": "vault-form-config-hcv-kube_auth_path",
|
|
1540
1540
|
label: e(a)("form.config.hcv.fields.kube_auth_path.label"),
|
|
1541
|
-
readonly:
|
|
1541
|
+
readonly: n.isReadonly,
|
|
1542
1542
|
type: "text"
|
|
1543
1543
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1544
|
-
|
|
1544
|
+
u(h, {
|
|
1545
1545
|
modelValue: o[e(t).HCV].kube_api_token_file,
|
|
1546
1546
|
"onUpdate:modelValue": r[21] || (r[21] = (i) => o[e(t).HCV].kube_api_token_file = i),
|
|
1547
1547
|
modelModifiers: { trim: !0 },
|
|
1548
1548
|
autocomplete: "off",
|
|
1549
1549
|
"data-testid": "vault-form-config-hcv-kube_api_token_file",
|
|
1550
1550
|
label: e(a)("form.config.hcv.fields.kube_api_token_file.label"),
|
|
1551
|
-
readonly:
|
|
1551
|
+
readonly: n.isReadonly,
|
|
1552
1552
|
required: "",
|
|
1553
1553
|
type: "text"
|
|
1554
1554
|
}, null, 8, ["modelValue", "label", "readonly"])
|
|
1555
|
-
])) : o[e(t).HCV].auth_method === e(M).APP_ROLE ? (
|
|
1556
|
-
|
|
1555
|
+
])) : o[e(t).HCV].auth_method === e(M).APP_ROLE ? (V(), W("div", Lt, [
|
|
1556
|
+
u(h, {
|
|
1557
1557
|
modelValue: o[e(t).HCV].approle_auth_path,
|
|
1558
1558
|
"onUpdate:modelValue": r[22] || (r[22] = (i) => o[e(t).HCV].approle_auth_path = i),
|
|
1559
1559
|
modelModifiers: { trim: !0 },
|
|
1560
1560
|
autocomplete: "off",
|
|
1561
1561
|
"data-testid": "vault-form-config-hcv-approle_auth_path",
|
|
1562
1562
|
label: e(a)("form.config.hcv.fields.approle_auth_path.label"),
|
|
1563
|
-
readonly:
|
|
1563
|
+
readonly: n.isReadonly,
|
|
1564
1564
|
type: "text"
|
|
1565
1565
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1566
|
-
|
|
1566
|
+
u(h, {
|
|
1567
1567
|
modelValue: o[e(t).HCV].approle_role_id,
|
|
1568
1568
|
"onUpdate:modelValue": r[23] || (r[23] = (i) => o[e(t).HCV].approle_role_id = i),
|
|
1569
1569
|
modelModifiers: { trim: !0 },
|
|
1570
1570
|
autocomplete: "off",
|
|
1571
1571
|
"data-testid": "vault-form-config-hcv-approle_role_id",
|
|
1572
1572
|
label: e(a)("form.config.hcv.fields.approle_role_id.label"),
|
|
1573
|
-
readonly:
|
|
1573
|
+
readonly: n.isReadonly,
|
|
1574
1574
|
required: "",
|
|
1575
1575
|
type: "text"
|
|
1576
1576
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1577
|
-
|
|
1577
|
+
u(h, {
|
|
1578
1578
|
modelValue: o[e(t).HCV].approle_secret_id,
|
|
1579
1579
|
"onUpdate:modelValue": r[24] || (r[24] = (i) => o[e(t).HCV].approle_secret_id = i),
|
|
1580
1580
|
modelModifiers: { trim: !0 },
|
|
1581
1581
|
autocomplete: "off",
|
|
1582
1582
|
"data-testid": "vault-form-config-hcv-approle_secret_id",
|
|
1583
1583
|
label: e(a)("form.config.hcv.fields.approle_secret_id.label"),
|
|
1584
|
-
readonly:
|
|
1584
|
+
readonly: n.isReadonly,
|
|
1585
1585
|
"show-password-mask-toggle": "",
|
|
1586
1586
|
type: "password"
|
|
1587
1587
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1588
|
-
|
|
1588
|
+
u(h, {
|
|
1589
1589
|
modelValue: o[e(t).HCV].approle_secret_id_file,
|
|
1590
1590
|
"onUpdate:modelValue": r[25] || (r[25] = (i) => o[e(t).HCV].approle_secret_id_file = i),
|
|
1591
1591
|
modelModifiers: { trim: !0 },
|
|
1592
1592
|
autocomplete: "off",
|
|
1593
1593
|
"data-testid": "vault-form-config-hcv-approle_secret_id_file",
|
|
1594
1594
|
label: e(a)("form.config.hcv.fields.approle_secret_id_file.label"),
|
|
1595
|
-
readonly:
|
|
1595
|
+
readonly: n.isReadonly,
|
|
1596
1596
|
type: "text"
|
|
1597
1597
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1598
|
-
|
|
1598
|
+
u(oe, {
|
|
1599
1599
|
modelValue: o[e(t).HCV].approle_response_wrapping,
|
|
1600
1600
|
"onUpdate:modelValue": r[26] || (r[26] = (i) => o[e(t).HCV].approle_response_wrapping = i),
|
|
1601
1601
|
"data-testid": "vault-form-config-hcv-approle_response_wrapping",
|
|
1602
1602
|
label: e(a)("form.config.hcv.fields.approle_response_wrapping.label")
|
|
1603
1603
|
}, null, 8, ["modelValue", "label"])
|
|
1604
|
-
])) : o[e(t).HCV].auth_method === e(M).CERT ? (
|
|
1605
|
-
|
|
1604
|
+
])) : o[e(t).HCV].auth_method === e(M).CERT ? (V(), W("div", zt, [
|
|
1605
|
+
u(h, {
|
|
1606
1606
|
modelValue: o[e(t).HCV].cert_auth_role_name,
|
|
1607
1607
|
"onUpdate:modelValue": r[27] || (r[27] = (i) => o[e(t).HCV].cert_auth_role_name = i),
|
|
1608
1608
|
modelModifiers: { trim: !0 },
|
|
1609
1609
|
autocomplete: "off",
|
|
1610
1610
|
"data-testid": "vault-form-config-hcv-cert_auth_role_name",
|
|
1611
1611
|
label: e(a)("form.config.hcv.fields.cert_auth_role_name.label"),
|
|
1612
|
-
readonly:
|
|
1612
|
+
readonly: n.isReadonly,
|
|
1613
1613
|
required: ""
|
|
1614
1614
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1615
|
-
|
|
1615
|
+
u(ce, {
|
|
1616
1616
|
modelValue: o[e(t).HCV].cert_auth_cert,
|
|
1617
1617
|
"onUpdate:modelValue": r[28] || (r[28] = (i) => o[e(t).HCV].cert_auth_cert = i),
|
|
1618
1618
|
modelModifiers: { trim: !0 },
|
|
1619
1619
|
autocomplete: "off",
|
|
1620
1620
|
"data-testid": "vault-form-config-hcv-cert_auth_cert",
|
|
1621
1621
|
label: e(a)("form.config.hcv.fields.cert_auth_cert.label"),
|
|
1622
|
-
readonly:
|
|
1622
|
+
readonly: n.isReadonly,
|
|
1623
1623
|
required: ""
|
|
1624
1624
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1625
|
-
|
|
1625
|
+
u(ce, {
|
|
1626
1626
|
modelValue: o[e(t).HCV].cert_auth_cert_key,
|
|
1627
1627
|
"onUpdate:modelValue": r[29] || (r[29] = (i) => o[e(t).HCV].cert_auth_cert_key = i),
|
|
1628
1628
|
modelModifiers: { trim: !0 },
|
|
1629
1629
|
autocomplete: "off",
|
|
1630
1630
|
"data-testid": "vault-form-config-hcv-cert_auth_cert_key",
|
|
1631
1631
|
label: e(a)("form.config.hcv.fields.cert_auth_cert_key.label"),
|
|
1632
|
-
readonly:
|
|
1632
|
+
readonly: n.isReadonly,
|
|
1633
1633
|
required: ""
|
|
1634
1634
|
}, null, 8, ["modelValue", "label", "readonly"])
|
|
1635
1635
|
])) : D("", !0),
|
|
1636
|
-
l.config.base64FieldAvailable ? (
|
|
1636
|
+
l.config.base64FieldAvailable ? (V(), j(oe, {
|
|
1637
1637
|
key: 4,
|
|
1638
1638
|
modelValue: o[e(t).HCV].base64_decode,
|
|
1639
1639
|
"onUpdate:modelValue": r[30] || (r[30] = (i) => o[e(t).HCV].base64_decode = i),
|
|
@@ -1643,78 +1643,78 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
1643
1643
|
info: e(a)("form.config.commonFields.base64_decode.tooltip"),
|
|
1644
1644
|
tooltipAttributes: { maxWidth: "400" }
|
|
1645
1645
|
},
|
|
1646
|
-
readonly:
|
|
1646
|
+
readonly: n.isReadonly
|
|
1647
1647
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) : D("", !0)
|
|
1648
1648
|
])) : D("", !0),
|
|
1649
|
-
f.value === e(t).AZURE ? (
|
|
1649
|
+
f.value === e(t).AZURE ? (V(), W("div", {
|
|
1650
1650
|
key: `${e(t).AZURE}-vault-config-fields`,
|
|
1651
1651
|
class: "vault-form-config-fields-container"
|
|
1652
1652
|
}, [
|
|
1653
|
-
|
|
1653
|
+
u(h, {
|
|
1654
1654
|
modelValue: o[e(t).AZURE].location,
|
|
1655
1655
|
"onUpdate:modelValue": r[31] || (r[31] = (i) => o[e(t).AZURE].location = i),
|
|
1656
1656
|
modelModifiers: { trim: !0 },
|
|
1657
1657
|
autocomplete: "off",
|
|
1658
1658
|
"data-testid": "vault-form-config-azure-location",
|
|
1659
1659
|
label: e(a)("form.config.azure.fields.location.label"),
|
|
1660
|
-
readonly:
|
|
1660
|
+
readonly: n.isReadonly,
|
|
1661
1661
|
required: "",
|
|
1662
1662
|
type: "text"
|
|
1663
1663
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1664
|
-
|
|
1664
|
+
u(h, {
|
|
1665
1665
|
modelValue: o[e(t).AZURE].vault_uri,
|
|
1666
1666
|
"onUpdate:modelValue": r[32] || (r[32] = (i) => o[e(t).AZURE].vault_uri = i),
|
|
1667
1667
|
modelModifiers: { trim: !0 },
|
|
1668
1668
|
autocomplete: "off",
|
|
1669
1669
|
"data-testid": "vault-form-config-azure-uri",
|
|
1670
1670
|
label: e(a)("form.config.azure.fields.vault_uri.label"),
|
|
1671
|
-
readonly:
|
|
1671
|
+
readonly: n.isReadonly,
|
|
1672
1672
|
required: "",
|
|
1673
1673
|
type: "text"
|
|
1674
1674
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1675
|
-
|
|
1675
|
+
u(h, {
|
|
1676
1676
|
modelValue: o[e(t).AZURE].credentials_prefix,
|
|
1677
1677
|
"onUpdate:modelValue": r[33] || (r[33] = (i) => o[e(t).AZURE].credentials_prefix = i),
|
|
1678
1678
|
modelModifiers: { trim: !0 },
|
|
1679
1679
|
autocomplete: "off",
|
|
1680
1680
|
"data-testid": "vault-form-config-azure-prefix",
|
|
1681
1681
|
label: e(a)("form.config.azure.fields.credential_prefix.label"),
|
|
1682
|
-
readonly:
|
|
1682
|
+
readonly: n.isReadonly,
|
|
1683
1683
|
required: "",
|
|
1684
1684
|
type: "text"
|
|
1685
1685
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1686
|
-
|
|
1686
|
+
u(C, {
|
|
1687
1687
|
modelValue: o[e(t).AZURE].type,
|
|
1688
1688
|
"onUpdate:modelValue": r[34] || (r[34] = (i) => o[e(t).AZURE].type = i),
|
|
1689
1689
|
"data-testid": "vault-form-config-azure-type",
|
|
1690
1690
|
items: ee,
|
|
1691
1691
|
label: e(a)("form.config.azure.fields.type.label"),
|
|
1692
1692
|
placeholder: e(a)("form.config.azure.fields.type.placeholder"),
|
|
1693
|
-
readonly:
|
|
1693
|
+
readonly: n.isReadonly,
|
|
1694
1694
|
required: "",
|
|
1695
1695
|
width: "100%"
|
|
1696
1696
|
}, null, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
1697
|
-
|
|
1697
|
+
u(h, {
|
|
1698
1698
|
modelValue: o[e(t).AZURE].client_id,
|
|
1699
1699
|
"onUpdate:modelValue": r[35] || (r[35] = (i) => o[e(t).AZURE].client_id = i),
|
|
1700
1700
|
modelModifiers: { trim: !0 },
|
|
1701
1701
|
autocomplete: "off",
|
|
1702
1702
|
"data-testid": "vault-form-config-azure-client-id",
|
|
1703
1703
|
label: e(a)("form.config.azure.fields.client_id.label"),
|
|
1704
|
-
readonly:
|
|
1704
|
+
readonly: n.isReadonly,
|
|
1705
1705
|
type: "text"
|
|
1706
1706
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1707
|
-
|
|
1707
|
+
u(h, {
|
|
1708
1708
|
modelValue: o[e(t).AZURE].tenant_id,
|
|
1709
1709
|
"onUpdate:modelValue": r[36] || (r[36] = (i) => o[e(t).AZURE].tenant_id = i),
|
|
1710
1710
|
modelModifiers: { trim: !0 },
|
|
1711
1711
|
autocomplete: "off",
|
|
1712
1712
|
"data-testid": "vault-form-config-azure-tenant-id",
|
|
1713
1713
|
label: e(a)("form.config.azure.fields.tenant_id.label"),
|
|
1714
|
-
readonly:
|
|
1714
|
+
readonly: n.isReadonly,
|
|
1715
1715
|
type: "text"
|
|
1716
1716
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1717
|
-
l.config.base64FieldAvailable ? (
|
|
1717
|
+
l.config.base64FieldAvailable ? (V(), j(oe, {
|
|
1718
1718
|
key: 0,
|
|
1719
1719
|
modelValue: o[e(t).AZURE].base64_decode,
|
|
1720
1720
|
"onUpdate:modelValue": r[37] || (r[37] = (i) => o[e(t).AZURE].base64_decode = i),
|
|
@@ -1724,14 +1724,14 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
1724
1724
|
info: e(a)("form.config.commonFields.base64_decode.tooltip"),
|
|
1725
1725
|
tooltipAttributes: { maxWidth: "400" }
|
|
1726
1726
|
},
|
|
1727
|
-
readonly:
|
|
1727
|
+
readonly: n.isReadonly
|
|
1728
1728
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) : D("", !0)
|
|
1729
1729
|
])) : D("", !0),
|
|
1730
|
-
f.value === e(t).CONJUR ? (
|
|
1730
|
+
f.value === e(t).CONJUR ? (V(), W("div", {
|
|
1731
1731
|
key: `${e(t).CONJUR}-vault-config-fields`,
|
|
1732
1732
|
class: "vault-form-config-fields-container"
|
|
1733
1733
|
}, [
|
|
1734
|
-
|
|
1734
|
+
u(h, {
|
|
1735
1735
|
modelValue: o[e(t).CONJUR].endpoint_url,
|
|
1736
1736
|
"onUpdate:modelValue": r[38] || (r[38] = (i) => o[e(t).CONJUR].endpoint_url = i),
|
|
1737
1737
|
modelModifiers: { trim: !0 },
|
|
@@ -1742,11 +1742,11 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
1742
1742
|
info: e(a)("form.config.conjur.fields.endpoint_url.tooltip"),
|
|
1743
1743
|
tooltipAttributes: { maxWidth: "400" }
|
|
1744
1744
|
},
|
|
1745
|
-
readonly:
|
|
1745
|
+
readonly: n.isReadonly,
|
|
1746
1746
|
required: "",
|
|
1747
1747
|
type: "text"
|
|
1748
1748
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
1749
|
-
|
|
1749
|
+
u(h, {
|
|
1750
1750
|
modelValue: o[e(t).CONJUR].login,
|
|
1751
1751
|
"onUpdate:modelValue": r[39] || (r[39] = (i) => o[e(t).CONJUR].login = i),
|
|
1752
1752
|
modelModifiers: { trim: !0 },
|
|
@@ -1757,11 +1757,11 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
1757
1757
|
info: e(a)("form.config.conjur.fields.login.tooltip"),
|
|
1758
1758
|
tooltipAttributes: { maxWidth: "400" }
|
|
1759
1759
|
},
|
|
1760
|
-
readonly:
|
|
1760
|
+
readonly: n.isReadonly,
|
|
1761
1761
|
required: "",
|
|
1762
1762
|
type: "text"
|
|
1763
1763
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
1764
|
-
|
|
1764
|
+
u(h, {
|
|
1765
1765
|
modelValue: o[e(t).CONJUR].account,
|
|
1766
1766
|
"onUpdate:modelValue": r[40] || (r[40] = (i) => o[e(t).CONJUR].account = i),
|
|
1767
1767
|
modelModifiers: { trim: !0 },
|
|
@@ -1772,11 +1772,11 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
1772
1772
|
info: e(a)("form.config.conjur.fields.account.tooltip"),
|
|
1773
1773
|
tooltipAttributes: { maxWidth: "400" }
|
|
1774
1774
|
},
|
|
1775
|
-
readonly:
|
|
1775
|
+
readonly: n.isReadonly,
|
|
1776
1776
|
required: "",
|
|
1777
1777
|
type: "text"
|
|
1778
1778
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
1779
|
-
|
|
1779
|
+
u(h, {
|
|
1780
1780
|
modelValue: o[e(t).CONJUR].api_key,
|
|
1781
1781
|
"onUpdate:modelValue": r[41] || (r[41] = (i) => o[e(t).CONJUR].api_key = i),
|
|
1782
1782
|
modelModifiers: { trim: !0 },
|
|
@@ -1787,12 +1787,12 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
1787
1787
|
info: e(a)("form.config.conjur.fields.api_key.tooltip"),
|
|
1788
1788
|
tooltipAttributes: { maxWidth: "400" }
|
|
1789
1789
|
},
|
|
1790
|
-
readonly:
|
|
1790
|
+
readonly: n.isReadonly,
|
|
1791
1791
|
required: "",
|
|
1792
1792
|
"show-password-mask-toggle": "",
|
|
1793
1793
|
type: "password"
|
|
1794
1794
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
1795
|
-
l.config.base64FieldAvailable ? (
|
|
1795
|
+
l.config.base64FieldAvailable ? (V(), j(oe, {
|
|
1796
1796
|
key: 0,
|
|
1797
1797
|
modelValue: o[e(t).CONJUR].base64_decode,
|
|
1798
1798
|
"onUpdate:modelValue": r[42] || (r[42] = (i) => o[e(t).CONJUR].base64_decode = i),
|
|
@@ -1802,11 +1802,11 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
1802
1802
|
info: e(a)("form.config.commonFields.base64_decode.tooltip"),
|
|
1803
1803
|
tooltipAttributes: { maxWidth: "400" }
|
|
1804
1804
|
},
|
|
1805
|
-
readonly:
|
|
1805
|
+
readonly: n.isReadonly
|
|
1806
1806
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) : D("", !0)
|
|
1807
1807
|
])) : D("", !0),
|
|
1808
|
-
l.config.ttl ? (
|
|
1809
|
-
Q.value ? (
|
|
1808
|
+
l.config.ttl ? (V(), W("div", Gt, [
|
|
1809
|
+
Q.value ? (V(), j(ve, {
|
|
1810
1810
|
key: 0,
|
|
1811
1811
|
class: "advanced-fields-collapse",
|
|
1812
1812
|
"data-testid": "advanced-fields-collapse",
|
|
@@ -1814,9 +1814,9 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
1814
1814
|
"trigger-label": e(a)("form.config.advancedFields.title")
|
|
1815
1815
|
}, {
|
|
1816
1816
|
default: v(() => [
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1817
|
+
I("div", Jt, [
|
|
1818
|
+
I("div", Zt, [
|
|
1819
|
+
u(h, {
|
|
1820
1820
|
modelValue: o[f.value].ttl,
|
|
1821
1821
|
"onUpdate:modelValue": r[43] || (r[43] = (i) => o[f.value].ttl = i),
|
|
1822
1822
|
"data-testid": "vault-ttl-input",
|
|
@@ -1828,8 +1828,8 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
1828
1828
|
type: "number"
|
|
1829
1829
|
}, null, 8, ["modelValue", "label", "label-attributes"])
|
|
1830
1830
|
]),
|
|
1831
|
-
|
|
1832
|
-
|
|
1831
|
+
I("div", Qt, [
|
|
1832
|
+
u(h, {
|
|
1833
1833
|
modelValue: o[f.value].neg_ttl,
|
|
1834
1834
|
"onUpdate:modelValue": r[44] || (r[44] = (i) => o[f.value].neg_ttl = i),
|
|
1835
1835
|
"data-testid": "vault-neg-ttl-input",
|
|
@@ -1842,9 +1842,9 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
1842
1842
|
}, null, 8, ["modelValue", "label", "label-attributes"])
|
|
1843
1843
|
])
|
|
1844
1844
|
]),
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1845
|
+
I("div", Yt, [
|
|
1846
|
+
I("div", Xt, [
|
|
1847
|
+
u(h, {
|
|
1848
1848
|
modelValue: o[f.value].resurrect_ttl,
|
|
1849
1849
|
"onUpdate:modelValue": r[45] || (r[45] = (i) => o[f.value].resurrect_ttl = i),
|
|
1850
1850
|
"data-testid": "vault-resurrect-ttl-input",
|
|
@@ -1867,14 +1867,14 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
1867
1867
|
]),
|
|
1868
1868
|
_: 1
|
|
1869
1869
|
}, 8, ["description", "title"]),
|
|
1870
|
-
|
|
1870
|
+
u(e(Ee), {
|
|
1871
1871
|
description: e(a)("form.sections.general.description"),
|
|
1872
1872
|
title: e(a)("form.sections.general.title")
|
|
1873
1873
|
}, {
|
|
1874
1874
|
default: v(() => [
|
|
1875
|
-
|
|
1876
|
-
modelValue:
|
|
1877
|
-
"onUpdate:modelValue": r[46] || (r[46] = (i) =>
|
|
1875
|
+
u(h, {
|
|
1876
|
+
modelValue: n.fields.prefix,
|
|
1877
|
+
"onUpdate:modelValue": r[46] || (r[46] = (i) => n.fields.prefix = i),
|
|
1878
1878
|
modelModifiers: { trim: !0 },
|
|
1879
1879
|
autocomplete: "off",
|
|
1880
1880
|
"data-testid": "vault-form-prefix",
|
|
@@ -1885,31 +1885,31 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
1885
1885
|
tooltipAttributes: { maxWidth: "400" }
|
|
1886
1886
|
},
|
|
1887
1887
|
placeholder: e(a)("form.fields.prefix.placeholder"),
|
|
1888
|
-
readonly:
|
|
1888
|
+
readonly: n.isReadonly,
|
|
1889
1889
|
required: "",
|
|
1890
1890
|
type: "text"
|
|
1891
1891
|
}, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"]),
|
|
1892
|
-
|
|
1893
|
-
modelValue:
|
|
1894
|
-
"onUpdate:modelValue": r[47] || (r[47] = (i) =>
|
|
1892
|
+
u(ce, {
|
|
1893
|
+
modelValue: n.fields.description,
|
|
1894
|
+
"onUpdate:modelValue": r[47] || (r[47] = (i) => n.fields.description = i),
|
|
1895
1895
|
modelModifiers: { trim: !0 },
|
|
1896
1896
|
"character-limit": 1e3,
|
|
1897
1897
|
class: "vault-form-textarea",
|
|
1898
1898
|
"data-testid": "vault-form-description",
|
|
1899
1899
|
label: e(a)("form.fields.description.label"),
|
|
1900
1900
|
placeholder: e(a)("form.fields.description.placeholder"),
|
|
1901
|
-
readonly:
|
|
1901
|
+
readonly: n.isReadonly
|
|
1902
1902
|
}, null, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
1903
|
-
|
|
1904
|
-
modelValue:
|
|
1905
|
-
"onUpdate:modelValue": r[48] || (r[48] = (i) =>
|
|
1903
|
+
u(h, {
|
|
1904
|
+
modelValue: n.fields.tags,
|
|
1905
|
+
"onUpdate:modelValue": r[48] || (r[48] = (i) => n.fields.tags = i),
|
|
1906
1906
|
modelModifiers: { trim: !0 },
|
|
1907
1907
|
autocomplete: "off",
|
|
1908
1908
|
"data-testid": "vault-form-tags",
|
|
1909
1909
|
help: e(a)("form.fields.tags.help"),
|
|
1910
1910
|
label: e(a)("form.fields.tags.label"),
|
|
1911
1911
|
placeholder: e(a)("form.fields.tags.placeholder"),
|
|
1912
|
-
readonly:
|
|
1912
|
+
readonly: n.isReadonly,
|
|
1913
1913
|
type: "text"
|
|
1914
1914
|
}, null, 8, ["modelValue", "help", "label", "placeholder", "readonly"])
|
|
1915
1915
|
]),
|
|
@@ -1921,7 +1921,7 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
1921
1921
|
]);
|
|
1922
1922
|
};
|
|
1923
1923
|
}
|
|
1924
|
-
}),
|
|
1924
|
+
}), Al = /* @__PURE__ */ me(el, [["__scopeId", "data-v-af887604"]]), tl = { class: "kong-ui-vault-entity-config-card" }, Ul = /* @__PURE__ */ ue({
|
|
1925
1925
|
__name: "VaultConfigCard",
|
|
1926
1926
|
props: {
|
|
1927
1927
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -1948,44 +1948,60 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
1948
1948
|
},
|
|
1949
1949
|
emits: ["loading", "fetch:error", "fetch:success"],
|
|
1950
1950
|
setup(l) {
|
|
1951
|
-
const
|
|
1952
|
-
var
|
|
1953
|
-
return (
|
|
1954
|
-
}), { i18n: { t:
|
|
1951
|
+
const S = l, d = w(() => {
|
|
1952
|
+
var m, n;
|
|
1953
|
+
return (n = pe.form[(m = S.config) == null ? void 0 : m.app]) == null ? void 0 : n.edit;
|
|
1954
|
+
}), { i18n: { t: c } } = ye.useI18n(), { convertKeyToTitle: p } = vt(), { getPropValue: a } = gt(), P = $({
|
|
1955
1955
|
id: {},
|
|
1956
1956
|
name: {
|
|
1957
|
-
label:
|
|
1957
|
+
label: c("labels.vault_type")
|
|
1958
1958
|
},
|
|
1959
1959
|
updated_at: {},
|
|
1960
1960
|
created_at: {},
|
|
1961
1961
|
prefix: {
|
|
1962
1962
|
order: 5,
|
|
1963
|
-
section:
|
|
1963
|
+
section: Fe.Basic
|
|
1964
1964
|
},
|
|
1965
1965
|
description: {
|
|
1966
1966
|
order: 6,
|
|
1967
|
-
section:
|
|
1967
|
+
section: Fe.Basic
|
|
1968
1968
|
},
|
|
1969
1969
|
tags: {
|
|
1970
1970
|
order: 7
|
|
1971
1971
|
},
|
|
1972
1972
|
config: {
|
|
1973
1973
|
order: 8,
|
|
1974
|
-
type:
|
|
1974
|
+
type: Se.Json
|
|
1975
1975
|
}
|
|
1976
|
-
})
|
|
1977
|
-
|
|
1978
|
-
|
|
1976
|
+
}), x = (m) => {
|
|
1977
|
+
var n, b;
|
|
1978
|
+
return ((b = (n = P.value) == null ? void 0 : n[m]) == null ? void 0 : b.label) || p(m);
|
|
1979
|
+
};
|
|
1980
|
+
return (m, n) => (V(), W("div", tl, [
|
|
1981
|
+
u(e(bt), {
|
|
1979
1982
|
config: l.config,
|
|
1980
1983
|
"config-card-doc": l.configCardDoc,
|
|
1981
|
-
"config-schema":
|
|
1982
|
-
"entity-type": e(
|
|
1983
|
-
"fetch-url":
|
|
1984
|
+
"config-schema": P.value,
|
|
1985
|
+
"entity-type": e(Ue).Vault,
|
|
1986
|
+
"fetch-url": d.value,
|
|
1984
1987
|
"hide-title": l.hideTitle,
|
|
1985
|
-
"onFetch:error":
|
|
1986
|
-
"onFetch:success":
|
|
1987
|
-
onLoading:
|
|
1988
|
-
},
|
|
1988
|
+
"onFetch:error": n[0] || (n[0] = (b) => m.$emit("fetch:error", b)),
|
|
1989
|
+
"onFetch:success": n[1] || (n[1] = (b) => m.$emit("fetch:success", b)),
|
|
1990
|
+
onLoading: n[2] || (n[2] = (b) => m.$emit("loading", b))
|
|
1991
|
+
}, {
|
|
1992
|
+
config: v(({ rowValue: b }) => [
|
|
1993
|
+
(V(!0), W(qe, null, et(Object.keys(b), (f) => (V(), j(e(_t), {
|
|
1994
|
+
key: f,
|
|
1995
|
+
item: {
|
|
1996
|
+
key: f,
|
|
1997
|
+
value: e(a)(f, b),
|
|
1998
|
+
label: x(f),
|
|
1999
|
+
type: f === "token" || f === "approle_secret_id" ? e(Se).Redacted : e(Se).Text
|
|
2000
|
+
}
|
|
2001
|
+
}, null, 8, ["item"]))), 128))
|
|
2002
|
+
]),
|
|
2003
|
+
_: 1
|
|
2004
|
+
}, 8, ["config", "config-card-doc", "config-schema", "entity-type", "fetch-url", "hide-title"])
|
|
1989
2005
|
]));
|
|
1990
2006
|
}
|
|
1991
2007
|
}), Ce = "/v2/control-planes/{controlPlaneId}", be = {
|
|
@@ -2001,7 +2017,7 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
2001
2017
|
edit: `${Ce}/config-stores/{id}/secrets/{secretId}`
|
|
2002
2018
|
}
|
|
2003
2019
|
}
|
|
2004
|
-
},
|
|
2020
|
+
}, ll = { class: "table-content-overflow-wrapper" }, ol = /* @__PURE__ */ ue({
|
|
2005
2021
|
inheritAttrs: !1,
|
|
2006
2022
|
__name: "SecretListInner",
|
|
2007
2023
|
props: {
|
|
@@ -2041,68 +2057,68 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
2041
2057
|
}
|
|
2042
2058
|
},
|
|
2043
2059
|
emits: ["error", "delete:success"],
|
|
2044
|
-
setup(l, { emit:
|
|
2060
|
+
setup(l, { emit: S }) {
|
|
2045
2061
|
var ie;
|
|
2046
|
-
const
|
|
2062
|
+
const d = S, c = l, { i18n: { t: p, formatUnixTimeStamp: a } } = ye.useI18n(), { axiosInstance: P } = _e((ie = c.config) == null ? void 0 : ie.axiosRequestConfig), m = {
|
|
2047
2063
|
// the Secret Key column is non-hidable
|
|
2048
2064
|
key: { label: p("secrets.list.table_headers.key"), sortable: !1, hidable: !1 },
|
|
2049
2065
|
updated_at: { label: p("secrets.list.table_headers.updated_at"), sortable: !1 }
|
|
2050
|
-
},
|
|
2051
|
-
"data-testid":
|
|
2052
|
-
}),
|
|
2053
|
-
var
|
|
2054
|
-
return `${
|
|
2055
|
-
}), f =
|
|
2066
|
+
}, n = (U) => ({
|
|
2067
|
+
"data-testid": U.key
|
|
2068
|
+
}), b = w(() => {
|
|
2069
|
+
var U;
|
|
2070
|
+
return `${c.config.apiBaseUrl}${be.list[c.config.app]}`.replace(/{controlPlaneId}/gi, ((U = c.config) == null ? void 0 : U.controlPlaneId) || "").replace(/{id}/gi, c.configStoreId || "");
|
|
2071
|
+
}), f = $(""), z = {
|
|
2056
2072
|
isExactMatch: !0,
|
|
2057
2073
|
placeholder: p("search.placeholder_for_secrets.konnect")
|
|
2058
2074
|
}, {
|
|
2059
2075
|
fetcher: X,
|
|
2060
2076
|
fetcherState: Q,
|
|
2061
2077
|
fetcherCacheKey: Y
|
|
2062
|
-
} =
|
|
2078
|
+
} = De(w(() => ({ ...c.config, cacheIdentifier: c.cacheIdentifier })), b), N = () => {
|
|
2063
2079
|
f.value = "";
|
|
2064
|
-
}, o =
|
|
2080
|
+
}, o = $(null), ae = (U) => ({
|
|
2065
2081
|
label: p("actions.edit"),
|
|
2066
|
-
to:
|
|
2067
|
-
}), G =
|
|
2068
|
-
G.value =
|
|
2082
|
+
to: c.config.getEditRoute(U)
|
|
2083
|
+
}), G = $(void 0), ee = $(!1), J = $(!1), y = $(""), F = We(c.config, b.value), re = (U) => {
|
|
2084
|
+
G.value = U, ee.value = !0;
|
|
2069
2085
|
}, ne = () => {
|
|
2070
2086
|
ee.value = !1;
|
|
2071
2087
|
}, le = async () => {
|
|
2072
|
-
var
|
|
2073
|
-
if ((
|
|
2088
|
+
var U, Z, te;
|
|
2089
|
+
if ((U = G.value) != null && U.key) {
|
|
2074
2090
|
J.value = !0;
|
|
2075
2091
|
try {
|
|
2076
|
-
await
|
|
2077
|
-
} catch (
|
|
2078
|
-
|
|
2092
|
+
await P.delete(F(G.value.key)), J.value = !1, ee.value = !1, Y.value++, d("delete:success", G.value);
|
|
2093
|
+
} catch (_) {
|
|
2094
|
+
y.value = ((te = (Z = _.response) == null ? void 0 : Z.data) == null ? void 0 : te.message) || _.message || p("errors.delete"), d("error", _);
|
|
2079
2095
|
} finally {
|
|
2080
2096
|
J.value = !1;
|
|
2081
2097
|
}
|
|
2082
2098
|
}
|
|
2083
2099
|
};
|
|
2084
|
-
ke(Q, (
|
|
2085
|
-
var Z, te,
|
|
2086
|
-
if (
|
|
2100
|
+
ke(Q, (U) => {
|
|
2101
|
+
var Z, te, _;
|
|
2102
|
+
if (U.status === Be.Error) {
|
|
2087
2103
|
o.value = {
|
|
2088
2104
|
title: p("errors.general")
|
|
2089
|
-
}, (
|
|
2105
|
+
}, (_ = (te = (Z = U.error) == null ? void 0 : Z.response) == null ? void 0 : te.data) != null && _.message && (o.value.message = U.error.response.data.message), d("error", U.error);
|
|
2090
2106
|
return;
|
|
2091
2107
|
}
|
|
2092
2108
|
o.value = null;
|
|
2093
2109
|
});
|
|
2094
|
-
const O =
|
|
2095
|
-
ctaPath:
|
|
2110
|
+
const O = $({
|
|
2111
|
+
ctaPath: c.config.createRoute,
|
|
2096
2112
|
ctaText: void 0,
|
|
2097
|
-
message: `${p("secrets.list.empty_state.description")}${
|
|
2113
|
+
message: `${p("secrets.list.empty_state.description")}${c.config.additionMessageForEmptyState ? ` ${c.config.additionMessageForEmptyState}` : ""}`,
|
|
2098
2114
|
title: p("secrets.title")
|
|
2099
2115
|
});
|
|
2100
2116
|
return we(async () => {
|
|
2101
|
-
await
|
|
2102
|
-
}), (
|
|
2103
|
-
const te = B("KButton"),
|
|
2104
|
-
return
|
|
2105
|
-
|
|
2117
|
+
await c.canCreate() && (O.value.title = p("secrets.list.empty_state.title"), O.value.ctaText = p("secrets.list.toolbar_actions.new_secret"));
|
|
2118
|
+
}), (U, Z) => {
|
|
2119
|
+
const te = B("KButton"), _ = B("KDropdownItem");
|
|
2120
|
+
return V(), W(qe, null, [
|
|
2121
|
+
u(e(Le), {
|
|
2106
2122
|
"cache-identifier": l.cacheIdentifier,
|
|
2107
2123
|
"disable-sorting": "",
|
|
2108
2124
|
"empty-state-options": O.value,
|
|
@@ -2113,31 +2129,31 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
2113
2129
|
"pagination-type": "offset",
|
|
2114
2130
|
"preferences-storage-key": "kong-ui-entities-secrets-list",
|
|
2115
2131
|
query: f.value,
|
|
2116
|
-
"row-attributes":
|
|
2117
|
-
"table-headers": e(
|
|
2132
|
+
"row-attributes": n,
|
|
2133
|
+
"table-headers": e(m),
|
|
2118
2134
|
onClearSearchInput: N
|
|
2119
2135
|
}, {
|
|
2120
2136
|
"toolbar-filter": v(() => [
|
|
2121
|
-
|
|
2137
|
+
u(e(ze), {
|
|
2122
2138
|
modelValue: f.value,
|
|
2123
|
-
"onUpdate:modelValue": Z[0] || (Z[0] = (
|
|
2139
|
+
"onUpdate:modelValue": Z[0] || (Z[0] = (g) => f.value = g),
|
|
2124
2140
|
config: z
|
|
2125
2141
|
}, null, 8, ["modelValue"])
|
|
2126
2142
|
]),
|
|
2127
2143
|
"toolbar-button": v(() => [
|
|
2128
|
-
|
|
2144
|
+
u(e(ge), {
|
|
2129
2145
|
"auth-function": () => l.canCreate()
|
|
2130
2146
|
}, {
|
|
2131
2147
|
default: v(() => [
|
|
2132
|
-
|
|
2148
|
+
u(te, {
|
|
2133
2149
|
appearance: "primary",
|
|
2134
2150
|
"data-testid": "toolbar-add-secret",
|
|
2135
2151
|
size: "large",
|
|
2136
2152
|
to: l.config.createRoute
|
|
2137
2153
|
}, {
|
|
2138
2154
|
default: v(() => [
|
|
2139
|
-
|
|
2140
|
-
de(" " +
|
|
2155
|
+
u(e(Re)),
|
|
2156
|
+
de(" " + T(e(p)("secrets.list.toolbar_actions.new_secret")), 1)
|
|
2141
2157
|
]),
|
|
2142
2158
|
_: 1
|
|
2143
2159
|
}, 8, ["to"])
|
|
@@ -2145,38 +2161,38 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
2145
2161
|
_: 1
|
|
2146
2162
|
}, 8, ["auth-function"])
|
|
2147
2163
|
]),
|
|
2148
|
-
key: v(({ rowValue:
|
|
2149
|
-
|
|
2150
|
-
|
|
2164
|
+
key: v(({ rowValue: g }) => [
|
|
2165
|
+
I("div", ll, [
|
|
2166
|
+
I("b", null, T(g ?? "-"), 1)
|
|
2151
2167
|
])
|
|
2152
2168
|
]),
|
|
2153
|
-
updated_at: v(({ rowValue:
|
|
2154
|
-
|
|
2169
|
+
updated_at: v(({ rowValue: g }) => [
|
|
2170
|
+
I("span", null, T(g ? e(a)(new Date(g).getTime() / 1e3) : "-"), 1)
|
|
2155
2171
|
]),
|
|
2156
|
-
actions: v(({ row:
|
|
2157
|
-
|
|
2158
|
-
"auth-function": () => l.canEdit(
|
|
2172
|
+
actions: v(({ row: g }) => [
|
|
2173
|
+
u(e(ge), {
|
|
2174
|
+
"auth-function": () => l.canEdit(g)
|
|
2159
2175
|
}, {
|
|
2160
2176
|
default: v(() => [
|
|
2161
|
-
|
|
2177
|
+
u(_, {
|
|
2162
2178
|
"data-testid": "action-entity-edit",
|
|
2163
|
-
item: ae(
|
|
2179
|
+
item: ae(g.key)
|
|
2164
2180
|
}, null, 8, ["item"])
|
|
2165
2181
|
]),
|
|
2166
2182
|
_: 2
|
|
2167
2183
|
}, 1032, ["auth-function"]),
|
|
2168
|
-
|
|
2169
|
-
"auth-function": () => l.canDelete(
|
|
2184
|
+
u(e(ge), {
|
|
2185
|
+
"auth-function": () => l.canDelete(g)
|
|
2170
2186
|
}, {
|
|
2171
2187
|
default: v(() => [
|
|
2172
|
-
|
|
2188
|
+
u(_, {
|
|
2173
2189
|
danger: "",
|
|
2174
2190
|
"data-testid": "action-entity-delete",
|
|
2175
2191
|
"has-divider": "",
|
|
2176
|
-
onClick: (
|
|
2192
|
+
onClick: (K) => re(g)
|
|
2177
2193
|
}, {
|
|
2178
2194
|
default: v(() => [
|
|
2179
|
-
de(
|
|
2195
|
+
de(T(e(p)("actions.delete")), 1)
|
|
2180
2196
|
]),
|
|
2181
2197
|
_: 2
|
|
2182
2198
|
}, 1032, ["onClick"])
|
|
@@ -2186,12 +2202,12 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
2186
2202
|
]),
|
|
2187
2203
|
_: 1
|
|
2188
2204
|
}, 8, ["cache-identifier", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers"]),
|
|
2189
|
-
|
|
2205
|
+
u(e(Ge), {
|
|
2190
2206
|
"action-pending": J.value,
|
|
2191
2207
|
description: e(p)("delete.description"),
|
|
2192
2208
|
"entity-name": G.value && G.value.key,
|
|
2193
|
-
"entity-type": e(
|
|
2194
|
-
error:
|
|
2209
|
+
"entity-type": e(Je).Secret,
|
|
2210
|
+
error: y.value,
|
|
2195
2211
|
title: e(p)("delete.title_for_secret"),
|
|
2196
2212
|
visible: ee.value,
|
|
2197
2213
|
onCancel: ne,
|
|
@@ -2200,7 +2216,7 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
2200
2216
|
], 64);
|
|
2201
2217
|
};
|
|
2202
2218
|
}
|
|
2203
|
-
}),
|
|
2219
|
+
}), al = /* @__PURE__ */ me(ol, [["__scopeId", "data-v-904390fc"]]), rl = { class: "kong-ui-entities-secrets-list" }, il = /* @__PURE__ */ ue({
|
|
2204
2220
|
__name: "SecretList",
|
|
2205
2221
|
props: {
|
|
2206
2222
|
/** The base konnect config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2239,33 +2255,33 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
2239
2255
|
}
|
|
2240
2256
|
},
|
|
2241
2257
|
emits: ["error", "delete:success"],
|
|
2242
|
-
setup(l, { emit:
|
|
2243
|
-
var
|
|
2244
|
-
const
|
|
2245
|
-
|
|
2246
|
-
}, a = (
|
|
2247
|
-
|
|
2248
|
-
}, { axiosInstance:
|
|
2249
|
-
var
|
|
2250
|
-
return `${
|
|
2258
|
+
setup(l, { emit: S }) {
|
|
2259
|
+
var n;
|
|
2260
|
+
const d = S, c = l, p = (b) => {
|
|
2261
|
+
d("error", b);
|
|
2262
|
+
}, a = (b) => {
|
|
2263
|
+
d("delete:success", b);
|
|
2264
|
+
}, { axiosInstance: P } = _e((n = c.config) == null ? void 0 : n.axiosRequestConfig), x = $(""), m = w(() => {
|
|
2265
|
+
var b;
|
|
2266
|
+
return `${c.config.apiBaseUrl}${be.getVault[c.config.app]}`.replace(/{controlPlaneId}/gi, ((b = c.config) == null ? void 0 : b.controlPlaneId) || "").replace(/{id}/gi, c.vaultId);
|
|
2251
2267
|
});
|
|
2252
2268
|
return we(async () => {
|
|
2253
|
-
var
|
|
2269
|
+
var b;
|
|
2254
2270
|
try {
|
|
2255
|
-
const { data: f } = await
|
|
2256
|
-
|
|
2271
|
+
const { data: f } = await P.get(m.value);
|
|
2272
|
+
x.value = (b = f == null ? void 0 : f.config) == null ? void 0 : b.config_store_id;
|
|
2257
2273
|
} catch (f) {
|
|
2258
|
-
|
|
2274
|
+
d("error", f);
|
|
2259
2275
|
}
|
|
2260
|
-
}), (
|
|
2261
|
-
|
|
2262
|
-
"config-store-id":
|
|
2276
|
+
}), (b, f) => (V(), W("div", rl, [
|
|
2277
|
+
x.value ? (V(), j(al, je({ key: 0 }, c, {
|
|
2278
|
+
"config-store-id": x.value,
|
|
2263
2279
|
"onDelete:success": a,
|
|
2264
2280
|
onError: p
|
|
2265
2281
|
}), null, 16, ["config-store-id"])) : D("", !0)
|
|
2266
2282
|
]));
|
|
2267
2283
|
}
|
|
2268
|
-
}),
|
|
2284
|
+
}), Tl = /* @__PURE__ */ me(il, [["__scopeId", "data-v-f5aa5636"]]), nl = /* @__PURE__ */ ue({
|
|
2269
2285
|
inheritAttrs: !1,
|
|
2270
2286
|
__name: "SecretFormInner",
|
|
2271
2287
|
props: {
|
|
@@ -2288,61 +2304,61 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
2288
2304
|
}
|
|
2289
2305
|
},
|
|
2290
2306
|
emits: ["update", "error", "loading"],
|
|
2291
|
-
setup(l, { emit:
|
|
2307
|
+
setup(l, { emit: S }) {
|
|
2292
2308
|
var J;
|
|
2293
|
-
const
|
|
2309
|
+
const d = l, c = S, { i18n: { t: p } } = ye.useI18n(), a = Ae(), { axiosInstance: P } = _e((J = d.config) == null ? void 0 : J.axiosRequestConfig), { getMessageFromError: x } = Ze(), m = he({
|
|
2294
2310
|
fields: {
|
|
2295
2311
|
key: "",
|
|
2296
2312
|
value: ""
|
|
2297
2313
|
},
|
|
2298
2314
|
readonly: !1,
|
|
2299
2315
|
errorMessage: ""
|
|
2300
|
-
}),
|
|
2316
|
+
}), n = he({
|
|
2301
2317
|
key: "",
|
|
2302
2318
|
value: ""
|
|
2303
|
-
}),
|
|
2319
|
+
}), b = w(
|
|
2304
2320
|
() => {
|
|
2305
|
-
var
|
|
2306
|
-
return (F = be.form[(
|
|
2321
|
+
var y, F;
|
|
2322
|
+
return (F = be.form[(y = d.config) == null ? void 0 : y.app]) == null ? void 0 : F.edit.replace(/{id}/gi, d.configStoreId).replace(/{secretId}/gi, d.secretId);
|
|
2307
2323
|
}
|
|
2308
2324
|
), f = () => {
|
|
2309
|
-
var
|
|
2310
|
-
a.push(((
|
|
2311
|
-
}, z = (
|
|
2312
|
-
|
|
2313
|
-
}, X = (
|
|
2314
|
-
|
|
2315
|
-
}, Q = (
|
|
2325
|
+
var y;
|
|
2326
|
+
a.push(((y = d.config) == null ? void 0 : y.cancelRoute) || { name: "secret-list" });
|
|
2327
|
+
}, z = (y) => {
|
|
2328
|
+
c("loading", y);
|
|
2329
|
+
}, X = (y) => {
|
|
2330
|
+
c("error", y);
|
|
2331
|
+
}, Q = (y) => {
|
|
2316
2332
|
var F, re;
|
|
2317
|
-
|
|
2318
|
-
}, Y =
|
|
2319
|
-
var
|
|
2320
|
-
return `${
|
|
2321
|
-
}), o =
|
|
2322
|
-
key:
|
|
2323
|
-
value:
|
|
2333
|
+
m.fields.key = ((F = y == null ? void 0 : y.item) == null ? void 0 : F.key) || (y == null ? void 0 : y.key) || "", m.fields.value = ((re = y == null ? void 0 : y.item) == null ? void 0 : re.value) || (y == null ? void 0 : y.value) || "", Object.assign(n, m.fields);
|
|
2334
|
+
}, Y = w(() => d.secretId ? Ve.Edit : Ve.Create), N = w(() => {
|
|
2335
|
+
var y;
|
|
2336
|
+
return `${d.config.apiBaseUrl}${be.form[d.config.app][Y.value]}`.replace(/{controlPlaneId}/gi, ((y = d.config) == null ? void 0 : y.controlPlaneId) || "").replace(/{id}/gi, d.configStoreId).replace(/{secretId}/gi, d.secretId);
|
|
2337
|
+
}), o = w(() => !!m.fields.key && !!m.fields.value), ae = w(() => JSON.stringify(m.fields) !== JSON.stringify(n)), G = w(() => ({
|
|
2338
|
+
key: m.fields.key,
|
|
2339
|
+
value: m.fields.value
|
|
2324
2340
|
})), ee = async () => {
|
|
2325
2341
|
try {
|
|
2326
|
-
|
|
2327
|
-
let
|
|
2328
|
-
Y.value === "create" ?
|
|
2329
|
-
} catch (
|
|
2330
|
-
|
|
2342
|
+
m.readonly = !0;
|
|
2343
|
+
let y;
|
|
2344
|
+
Y.value === "create" ? y = await P.post(N.value, G.value) : Y.value === "edit" && (y = await P.put(N.value, G.value)), Q(y == null ? void 0 : y.data), c("update", y == null ? void 0 : y.data);
|
|
2345
|
+
} catch (y) {
|
|
2346
|
+
m.errorMessage = x(y), c("error", y);
|
|
2331
2347
|
} finally {
|
|
2332
|
-
|
|
2348
|
+
m.readonly = !1;
|
|
2333
2349
|
}
|
|
2334
2350
|
};
|
|
2335
|
-
return (
|
|
2351
|
+
return (y, F) => {
|
|
2336
2352
|
const re = B("KInput"), ne = B("KTextArea"), le = B("KAlert");
|
|
2337
|
-
return
|
|
2353
|
+
return V(), j(e(Qe), {
|
|
2338
2354
|
"can-submit": o.value && ae.value,
|
|
2339
2355
|
config: l.config,
|
|
2340
2356
|
"edit-id": l.secretId,
|
|
2341
|
-
"entity-type": e(
|
|
2342
|
-
"error-message":
|
|
2343
|
-
"fetch-url":
|
|
2357
|
+
"entity-type": e(Ue).Other,
|
|
2358
|
+
"error-message": m.errorMessage,
|
|
2359
|
+
"fetch-url": b.value,
|
|
2344
2360
|
"form-fields": G.value,
|
|
2345
|
-
"is-readonly":
|
|
2361
|
+
"is-readonly": m.readonly,
|
|
2346
2362
|
onCancel: f,
|
|
2347
2363
|
"onFetch:error": X,
|
|
2348
2364
|
"onFetch:success": Q,
|
|
@@ -2350,16 +2366,16 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
2350
2366
|
onSubmit: ee
|
|
2351
2367
|
}, {
|
|
2352
2368
|
default: v(() => [
|
|
2353
|
-
|
|
2354
|
-
|
|
2369
|
+
I("div", null, [
|
|
2370
|
+
u(e(Ee), {
|
|
2355
2371
|
description: e(p)("secrets.form.info.description"),
|
|
2356
2372
|
"has-divider": "",
|
|
2357
2373
|
title: e(p)("secrets.form.info.title")
|
|
2358
2374
|
}, {
|
|
2359
2375
|
default: v(() => [
|
|
2360
|
-
|
|
2361
|
-
modelValue:
|
|
2362
|
-
"onUpdate:modelValue": F[0] || (F[0] = (O) =>
|
|
2376
|
+
u(re, {
|
|
2377
|
+
modelValue: m.fields.key,
|
|
2378
|
+
"onUpdate:modelValue": F[0] || (F[0] = (O) => m.fields.key = O),
|
|
2363
2379
|
modelModifiers: { trim: !0 },
|
|
2364
2380
|
autocomplete: "off",
|
|
2365
2381
|
class: "key-field",
|
|
@@ -2367,24 +2383,24 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
2367
2383
|
disabled: Y.value === e(Ve).Edit,
|
|
2368
2384
|
label: e(p)("secrets.form.fields.key.label"),
|
|
2369
2385
|
placeholder: e(p)("secrets.form.fields.key.placeholder"),
|
|
2370
|
-
readonly:
|
|
2386
|
+
readonly: m.readonly,
|
|
2371
2387
|
required: "",
|
|
2372
2388
|
type: "text"
|
|
2373
2389
|
}, null, 8, ["modelValue", "disabled", "label", "placeholder", "readonly"]),
|
|
2374
|
-
|
|
2375
|
-
modelValue:
|
|
2376
|
-
"onUpdate:modelValue": F[1] || (F[1] = (O) =>
|
|
2390
|
+
u(ne, {
|
|
2391
|
+
modelValue: m.fields.value,
|
|
2392
|
+
"onUpdate:modelValue": F[1] || (F[1] = (O) => m.fields.value = O),
|
|
2377
2393
|
modelModifiers: { trim: !0 },
|
|
2378
2394
|
autocomplete: "off",
|
|
2379
2395
|
"data-testid": "secret-form-value",
|
|
2380
2396
|
label: e(p)("secrets.form.fields.value.label"),
|
|
2381
2397
|
placeholder: e(p)("secrets.form.fields.value.placeholder"),
|
|
2382
|
-
readonly:
|
|
2398
|
+
readonly: m.readonly,
|
|
2383
2399
|
required: "",
|
|
2384
2400
|
resizable: "",
|
|
2385
2401
|
type: "text"
|
|
2386
2402
|
}, null, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
2387
|
-
|
|
2403
|
+
u(le, {
|
|
2388
2404
|
appearance: "warning",
|
|
2389
2405
|
message: e(p)("secrets.form.hint")
|
|
2390
2406
|
}, null, 8, ["message"])
|
|
@@ -2397,7 +2413,7 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
2397
2413
|
}, 8, ["can-submit", "config", "edit-id", "entity-type", "error-message", "fetch-url", "form-fields", "is-readonly"]);
|
|
2398
2414
|
};
|
|
2399
2415
|
}
|
|
2400
|
-
}),
|
|
2416
|
+
}), sl = /* @__PURE__ */ me(nl, [["__scopeId", "data-v-5ee165bf"]]), cl = { class: "kong-ui-entities-secret-form" }, dl = /* @__PURE__ */ ue({
|
|
2401
2417
|
__name: "SecretForm",
|
|
2402
2418
|
props: {
|
|
2403
2419
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2419,38 +2435,38 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
2419
2435
|
}
|
|
2420
2436
|
},
|
|
2421
2437
|
emits: ["update", "error", "loading"],
|
|
2422
|
-
setup(l, { emit:
|
|
2423
|
-
var
|
|
2424
|
-
const
|
|
2425
|
-
|
|
2438
|
+
setup(l, { emit: S }) {
|
|
2439
|
+
var b;
|
|
2440
|
+
const d = l, c = S, p = (f) => {
|
|
2441
|
+
c("update", f);
|
|
2426
2442
|
}, a = (f) => {
|
|
2427
|
-
|
|
2428
|
-
},
|
|
2429
|
-
|
|
2430
|
-
}, { axiosInstance:
|
|
2443
|
+
c("error", f);
|
|
2444
|
+
}, P = (f) => {
|
|
2445
|
+
c("loading", f);
|
|
2446
|
+
}, { axiosInstance: x } = _e((b = d.config) == null ? void 0 : b.axiosRequestConfig), m = $(""), n = w(() => {
|
|
2431
2447
|
var f;
|
|
2432
|
-
return `${
|
|
2448
|
+
return `${d.config.apiBaseUrl}${be.getVault[d.config.app]}`.replace(/{controlPlaneId}/gi, ((f = d.config) == null ? void 0 : f.controlPlaneId) || "").replace(/{id}/gi, d.vaultId);
|
|
2433
2449
|
});
|
|
2434
2450
|
return we(async () => {
|
|
2435
2451
|
var f;
|
|
2436
2452
|
try {
|
|
2437
|
-
const { data: z } = await
|
|
2438
|
-
|
|
2453
|
+
const { data: z } = await x.get(n.value);
|
|
2454
|
+
m.value = (f = z == null ? void 0 : z.config) == null ? void 0 : f.config_store_id;
|
|
2439
2455
|
} catch (z) {
|
|
2440
|
-
|
|
2456
|
+
c("error", z);
|
|
2441
2457
|
}
|
|
2442
|
-
}), (f, z) => (
|
|
2443
|
-
|
|
2444
|
-
"config-store-id":
|
|
2458
|
+
}), (f, z) => (V(), W("div", cl, [
|
|
2459
|
+
m.value ? (V(), j(sl, je({ key: 0 }, d, {
|
|
2460
|
+
"config-store-id": m.value,
|
|
2445
2461
|
onError: a,
|
|
2446
|
-
onLoading:
|
|
2462
|
+
onLoading: P,
|
|
2447
2463
|
onUpdate: p
|
|
2448
2464
|
}), null, 16, ["config-store-id"])) : D("", !0)
|
|
2449
2465
|
]));
|
|
2450
2466
|
}
|
|
2451
|
-
}),
|
|
2467
|
+
}), $l = /* @__PURE__ */ me(dl, [["__scopeId", "data-v-754ddb2f"]]), ul = {
|
|
2452
2468
|
class: "vault-secret-picker-provider"
|
|
2453
|
-
},
|
|
2469
|
+
}, fl = /* @__PURE__ */ ue({
|
|
2454
2470
|
__name: "VaultSecretPickerProvider",
|
|
2455
2471
|
props: {
|
|
2456
2472
|
value: {},
|
|
@@ -2463,56 +2479,56 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
2463
2479
|
},
|
|
2464
2480
|
emits: ["open"],
|
|
2465
2481
|
setup(l, {
|
|
2466
|
-
emit:
|
|
2482
|
+
emit: S
|
|
2467
2483
|
}) {
|
|
2468
|
-
const
|
|
2484
|
+
const d = l, c = S, {
|
|
2469
2485
|
i18n: {
|
|
2470
2486
|
t: p
|
|
2471
2487
|
},
|
|
2472
2488
|
i18nT: a
|
|
2473
2489
|
} = ye.useI18n();
|
|
2474
|
-
return (
|
|
2490
|
+
return (P, x) => (V(), W("div", ul, [u(e(a), {
|
|
2475
2491
|
keypath: "vault_secret_picker.provider.complete_action",
|
|
2476
2492
|
scope: "global"
|
|
2477
2493
|
}, {
|
|
2478
|
-
cta: v(() => [
|
|
2479
|
-
class:
|
|
2494
|
+
cta: v(() => [I("span", {
|
|
2495
|
+
class: tt({
|
|
2480
2496
|
"vault-secret-picker-provider-action": !0,
|
|
2481
|
-
disabled:
|
|
2497
|
+
disabled: d.disabled
|
|
2482
2498
|
}),
|
|
2483
|
-
onClick:
|
|
2484
|
-
},
|
|
2499
|
+
onClick: x[0] || (x[0] = () => !d.disabled && c("open", d.value, d.update))
|
|
2500
|
+
}, T(e(p)("vault_secret_picker.provider.cta")), 3)]),
|
|
2485
2501
|
_: 1
|
|
2486
2502
|
})]));
|
|
2487
2503
|
}
|
|
2488
|
-
}),
|
|
2489
|
-
let
|
|
2490
|
-
if (!
|
|
2504
|
+
}), Pl = /* @__PURE__ */ me(fl, [["__scopeId", "data-v-66a1e406"]]), pl = (l) => {
|
|
2505
|
+
let S = l.trim();
|
|
2506
|
+
if (!S.startsWith("{") || !S.endsWith("}"))
|
|
2491
2507
|
throw new Error("Invalid secret reference: must be enclosed in curly braces");
|
|
2492
|
-
if (
|
|
2508
|
+
if (S = S.substring(1, S.length - 1).trim(), !S.startsWith("vault://"))
|
|
2493
2509
|
throw new Error("Invalid secret reference: must start with vault://");
|
|
2494
|
-
const
|
|
2495
|
-
if (!
|
|
2510
|
+
const d = new URL(`http://${S.substring(8)}`);
|
|
2511
|
+
if (!d)
|
|
2496
2512
|
throw new Error("Invalid secret reference: must have a vault prefix");
|
|
2497
|
-
const
|
|
2498
|
-
if (!
|
|
2513
|
+
const c = d.host, [, p, ...a] = d.pathname.split("/");
|
|
2514
|
+
if (!c)
|
|
2499
2515
|
throw new Error("Invalid secret reference: must have a vault prefix");
|
|
2500
2516
|
return {
|
|
2501
|
-
vaultPrefix:
|
|
2517
|
+
vaultPrefix: c,
|
|
2502
2518
|
secretId: p || void 0,
|
|
2503
2519
|
// Non-empty string or undefined
|
|
2504
2520
|
optionalSecretKey: a == null ? void 0 : a.join("/")
|
|
2505
2521
|
// Non-empty string or undefined
|
|
2506
2522
|
};
|
|
2507
|
-
},
|
|
2523
|
+
}, ml = (l) => {
|
|
2508
2524
|
if (!l.vaultPrefix)
|
|
2509
2525
|
throw new Error("Invalid secret reference: must have a vault prefix");
|
|
2510
|
-
let
|
|
2511
|
-
return l.secretId && (
|
|
2512
|
-
},
|
|
2526
|
+
let S = `vault://${l.vaultPrefix}`;
|
|
2527
|
+
return l.secretId && (S = `${S}/${l.secretId}`), l.optionalSecretKey && (S = `${S}/${l.optionalSecretKey}`), `{${S}}`;
|
|
2528
|
+
}, vl = {
|
|
2513
2529
|
key: 1,
|
|
2514
2530
|
class: "inputs-wrapper"
|
|
2515
|
-
},
|
|
2531
|
+
}, gl = { "data-testid": "no-search-results" }, bl = { class: "k-select-selected-item-label" }, _l = { class: "vault-secret-picker-vault-dropdown-item" }, yl = { class: "select-item-label" }, hl = { class: "select-item-description" }, Vl = { class: "select-item-description" }, kl = { "data-testid": "no-search-results" }, Cl = /* @__PURE__ */ ue({
|
|
2516
2532
|
__name: "VaultSecretPicker",
|
|
2517
2533
|
props: {
|
|
2518
2534
|
config: {
|
|
@@ -2542,30 +2558,30 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
2542
2558
|
}
|
|
2543
2559
|
},
|
|
2544
2560
|
emits: ["proceed", "cancel"],
|
|
2545
|
-
setup(l, { emit:
|
|
2561
|
+
setup(l, { emit: S }) {
|
|
2546
2562
|
var te;
|
|
2547
|
-
const { i18n: { t:
|
|
2563
|
+
const { i18n: { t: d } } = ye.useI18n(), c = l, p = S, { axiosInstance: a } = _e({
|
|
2548
2564
|
// 404 errors are allowed in this components
|
|
2549
|
-
validateStatus: (
|
|
2565
|
+
validateStatus: (_) => _ === 404 || _ >= 200 && _ < 300,
|
|
2550
2566
|
// Spread the passed-in config later to allow overriding
|
|
2551
|
-
...(te =
|
|
2552
|
-
}),
|
|
2553
|
-
var
|
|
2554
|
-
return
|
|
2555
|
-
}), z =
|
|
2567
|
+
...(te = c.config) == null ? void 0 : te.axiosRequestConfig
|
|
2568
|
+
}), P = $(!1), x = $(""), m = $(""), n = $(""), b = $(), f = w(() => {
|
|
2569
|
+
var _, g;
|
|
2570
|
+
return c.config.app === "konnect" ? be.list[c.config.app].replace(/{id}/gi, ((g = (_ = b.value) == null ? void 0 : _.config) == null ? void 0 : g.config_store_id) ?? "") : "<not_applicable>";
|
|
2571
|
+
}), z = w(() => {
|
|
2556
2572
|
if (Y && ee)
|
|
2557
|
-
return
|
|
2573
|
+
return d("vault_secret_picker.fetch_error.vaults_and_secrets");
|
|
2558
2574
|
if (Y)
|
|
2559
|
-
return
|
|
2575
|
+
return d("vault_secret_picker.fetch_error.vaults");
|
|
2560
2576
|
if (ee)
|
|
2561
|
-
return
|
|
2577
|
+
return d("vault_secret_picker.fetch_error.secrets");
|
|
2562
2578
|
}), {
|
|
2563
2579
|
debouncedQueryChange: X,
|
|
2564
2580
|
loading: Q,
|
|
2565
2581
|
error: Y,
|
|
2566
2582
|
loadItems: N,
|
|
2567
2583
|
results: o
|
|
2568
|
-
} =
|
|
2584
|
+
} = Ne(c.config, pe.list[c.config.app].getAll, void 0, {
|
|
2569
2585
|
fetchedItemsKey: "data",
|
|
2570
2586
|
searchKeys: ["prefix"]
|
|
2571
2587
|
}), {
|
|
@@ -2573,176 +2589,176 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
2573
2589
|
loading: G,
|
|
2574
2590
|
error: ee,
|
|
2575
2591
|
loadItems: J,
|
|
2576
|
-
results:
|
|
2577
|
-
} =
|
|
2592
|
+
results: y
|
|
2593
|
+
} = Ne(c.config, f, void 0, {
|
|
2578
2594
|
fetchedItemsKey: "data",
|
|
2579
2595
|
searchKeys: ["key"],
|
|
2580
2596
|
exactMatchKey: "key"
|
|
2581
|
-
}), F =
|
|
2582
|
-
var
|
|
2583
|
-
let
|
|
2584
|
-
const
|
|
2585
|
-
return !
|
|
2586
|
-
label:
|
|
2587
|
-
value:
|
|
2588
|
-
vault:
|
|
2589
|
-
}),
|
|
2590
|
-
}), re =
|
|
2591
|
-
var
|
|
2592
|
-
let
|
|
2593
|
-
const
|
|
2594
|
-
return !
|
|
2595
|
-
}), ne =
|
|
2596
|
-
var
|
|
2597
|
-
return ((
|
|
2598
|
-
}), le =
|
|
2599
|
-
var
|
|
2600
|
-
let
|
|
2601
|
-
return
|
|
2602
|
-
},
|
|
2603
|
-
var
|
|
2604
|
-
return
|
|
2597
|
+
}), F = w(() => {
|
|
2598
|
+
var K;
|
|
2599
|
+
let _ = !1;
|
|
2600
|
+
const g = ((K = o.value) == null ? void 0 : K.map((H) => (H.prefix === x.value && (_ = !0), { label: H.prefix, value: H.prefix, vault: H }))) ?? [];
|
|
2601
|
+
return !_ && b.value && g.push({
|
|
2602
|
+
label: b.value.prefix,
|
|
2603
|
+
value: b.value.prefix,
|
|
2604
|
+
vault: b.value
|
|
2605
|
+
}), g;
|
|
2606
|
+
}), re = w(() => {
|
|
2607
|
+
var K;
|
|
2608
|
+
let _ = !1;
|
|
2609
|
+
const g = ((K = y.value) == null ? void 0 : K.map((H) => (H.key === m.value && (_ = !0), { label: H.key, value: H.key }))) ?? [];
|
|
2610
|
+
return !_ && m.value && g.push({ label: m.value, value: m.value }), g;
|
|
2611
|
+
}), ne = w(() => {
|
|
2612
|
+
var _;
|
|
2613
|
+
return ((_ = b == null ? void 0 : b.value) == null ? void 0 : _.name) === "konnect";
|
|
2614
|
+
}), le = w(() => !!b.value && !!m.value && !c.additionalDisabled), O = (_) => _.label ? `${_.label} - (${_.vault.name} - ${_.vault.id})` : _.value, ie = (_) => {
|
|
2615
|
+
var K, H;
|
|
2616
|
+
let g = `${c.config.apiBaseUrl}${pe.form[c.config.app].edit}`;
|
|
2617
|
+
return c.config.app === "konnect" ? g = g.replace(/{controlPlaneId}/gi, ((K = c.config) == null ? void 0 : K.controlPlaneId) || "") : c.config.app === "kongManager" && (g = g.replace(/\/{workspace}/gi, (H = c.config) != null && H.workspace ? `/${c.config.workspace}` : "")), g.replace(/{id}/gi, _);
|
|
2618
|
+
}, U = (_, g) => {
|
|
2619
|
+
var K;
|
|
2620
|
+
return c.config.app !== "konnect" ? "<not_applicable>" : `${c.config.apiBaseUrl}${be.form[c.config.app].edit}`.replace(/{controlPlaneId}/gi, ((K = c.config) == null ? void 0 : K.controlPlaneId) || "").replace(/{id}/gi, g).replace(/{secretId}/gi, _);
|
|
2605
2621
|
}, Z = () => {
|
|
2606
|
-
p("proceed",
|
|
2607
|
-
vaultPrefix:
|
|
2608
|
-
secretId:
|
|
2622
|
+
p("proceed", ml({
|
|
2623
|
+
vaultPrefix: x.value,
|
|
2624
|
+
secretId: m.value || void 0,
|
|
2609
2625
|
// Either a non-empty string or undefined
|
|
2610
|
-
optionalSecretKey:
|
|
2626
|
+
optionalSecretKey: n.value || void 0
|
|
2611
2627
|
// Either a non-empty string or undefined
|
|
2612
2628
|
}));
|
|
2613
2629
|
};
|
|
2614
|
-
return ke(() =>
|
|
2615
|
-
if (
|
|
2616
|
-
if (
|
|
2630
|
+
return ke(() => c.setup, async (_) => {
|
|
2631
|
+
if (_ !== !1) {
|
|
2632
|
+
if (P.value = !0, x.value = "", b.value = void 0, m.value = "", n.value = "", typeof _ == "string" && _.trim().length > 0)
|
|
2617
2633
|
try {
|
|
2618
|
-
let
|
|
2619
|
-
const q =
|
|
2620
|
-
if (
|
|
2621
|
-
if (
|
|
2634
|
+
let g, K = "", H = "", se = "";
|
|
2635
|
+
const q = pl(_), { data: R } = await a.get(ie(q.vaultPrefix));
|
|
2636
|
+
if (R != null && R.name)
|
|
2637
|
+
if (g = R, K = q.vaultPrefix, g.name === "konnect") {
|
|
2622
2638
|
if (q.secretId) {
|
|
2623
|
-
const { data: fe } = await a.get(
|
|
2639
|
+
const { data: fe } = await a.get(U(q.secretId, R.config.config_store_id));
|
|
2624
2640
|
fe.key === q.secretId && (H = q.secretId, se = q.optionalSecretKey ?? "");
|
|
2625
2641
|
}
|
|
2626
2642
|
} else
|
|
2627
2643
|
H = q.secretId ?? "", se = q.optionalSecretKey ?? "";
|
|
2628
|
-
await
|
|
2629
|
-
|
|
2644
|
+
await lt(() => {
|
|
2645
|
+
x.value = K, b.value = g, m.value = H, n.value = se;
|
|
2630
2646
|
});
|
|
2631
|
-
} catch (
|
|
2632
|
-
console.debug(
|
|
2647
|
+
} catch (g) {
|
|
2648
|
+
console.debug(g);
|
|
2633
2649
|
}
|
|
2634
|
-
|
|
2650
|
+
P.value = !1, await N();
|
|
2635
2651
|
}
|
|
2636
|
-
}, { immediate: !0 }), ke(
|
|
2637
|
-
var
|
|
2638
|
-
|
|
2652
|
+
}, { immediate: !0 }), ke(x, async (_, g) => {
|
|
2653
|
+
var K;
|
|
2654
|
+
P.value || _ === g || (b.value = (K = F.value.find((H) => H.value === _)) == null ? void 0 : K.vault, m.value = "", n.value = "");
|
|
2639
2655
|
}), ke(f, async () => {
|
|
2640
2656
|
ne.value && await J();
|
|
2641
|
-
}, { immediate: !0 }), (
|
|
2642
|
-
const
|
|
2643
|
-
return
|
|
2657
|
+
}, { immediate: !0 }), (_, g) => {
|
|
2658
|
+
const K = B("KEmptyState"), H = B("KSelect"), se = B("KInput"), q = B("KModal");
|
|
2659
|
+
return V(), j(q, {
|
|
2644
2660
|
"action-button-disabled": !le.value,
|
|
2645
|
-
"action-button-text": l.proceedButtonText || e(
|
|
2661
|
+
"action-button-text": l.proceedButtonText || e(d)("vault_secret_picker.actions.use_key"),
|
|
2646
2662
|
class: "vault-secret-picker",
|
|
2647
2663
|
"data-testid": "vault-secret-picker-modal",
|
|
2648
|
-
title: l.title || e(
|
|
2649
|
-
visible:
|
|
2650
|
-
onCancel:
|
|
2664
|
+
title: l.title || e(d)("vault_secret_picker.title"),
|
|
2665
|
+
visible: c.setup !== !1,
|
|
2666
|
+
onCancel: g[4] || (g[4] = () => p("cancel")),
|
|
2651
2667
|
onProceed: Z
|
|
2652
2668
|
}, {
|
|
2653
2669
|
default: v(() => [
|
|
2654
|
-
e(Y) || e(ee) ? (
|
|
2670
|
+
e(Y) || e(ee) ? (V(), j(K, {
|
|
2655
2671
|
key: 0,
|
|
2656
2672
|
"data-testid": "vault-secret-picker-fetch-error",
|
|
2657
2673
|
"icon-variant": "error",
|
|
2658
2674
|
message: z.value
|
|
2659
|
-
}, null, 8, ["message"])) : (
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
modelValue:
|
|
2663
|
-
"onUpdate:modelValue":
|
|
2675
|
+
}, null, 8, ["message"])) : (V(), W("div", vl, [
|
|
2676
|
+
ot(_.$slots, "form-prefix", {}, void 0, !0),
|
|
2677
|
+
u(H, {
|
|
2678
|
+
modelValue: x.value,
|
|
2679
|
+
"onUpdate:modelValue": g[0] || (g[0] = (R) => x.value = R),
|
|
2664
2680
|
clearable: "",
|
|
2665
2681
|
"data-testid": "vault-secret-picker-vault-select",
|
|
2666
|
-
disabled:
|
|
2682
|
+
disabled: P.value,
|
|
2667
2683
|
"enable-filtering": "",
|
|
2668
2684
|
"filter-function": () => !0,
|
|
2669
2685
|
items: F.value,
|
|
2670
2686
|
"kpop-attributes": { "data-testid": "vault-secret-picker-vault-popover" },
|
|
2671
|
-
label: e(
|
|
2687
|
+
label: e(d)("vault_secret_picker.vault.label"),
|
|
2672
2688
|
loading: e(Q),
|
|
2673
|
-
placeholder: e(
|
|
2689
|
+
placeholder: e(d)("vault_secret_picker.vault.placeholder"),
|
|
2674
2690
|
required: "",
|
|
2675
2691
|
"reuse-item-template": "",
|
|
2676
2692
|
width: "100%",
|
|
2677
2693
|
onQueryChange: e(X)
|
|
2678
2694
|
}, {
|
|
2679
2695
|
loading: v(() => [
|
|
2680
|
-
|
|
2696
|
+
I("div", null, T(e(d)("actions.loading")), 1)
|
|
2681
2697
|
]),
|
|
2682
2698
|
empty: v(() => [
|
|
2683
|
-
|
|
2699
|
+
I("div", gl, T(e(d)("vault_secret_picker.no_results")), 1)
|
|
2684
2700
|
]),
|
|
2685
|
-
"selected-item-template": v(({ item:
|
|
2686
|
-
|
|
2701
|
+
"selected-item-template": v(({ item: R }) => [
|
|
2702
|
+
I("span", bl, T(O(R)), 1)
|
|
2687
2703
|
]),
|
|
2688
|
-
"item-template": v(({ item:
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2704
|
+
"item-template": v(({ item: R }) => [
|
|
2705
|
+
I("div", _l, [
|
|
2706
|
+
I("span", yl, T(R.label), 1),
|
|
2707
|
+
I("span", hl, T(R.vault.name), 1),
|
|
2708
|
+
I("span", Vl, T(R.vault.id), 1)
|
|
2693
2709
|
])
|
|
2694
2710
|
]),
|
|
2695
2711
|
_: 1
|
|
2696
2712
|
}, 8, ["modelValue", "disabled", "items", "label", "loading", "placeholder", "onQueryChange"]),
|
|
2697
|
-
ne.value ? (
|
|
2713
|
+
ne.value ? (V(), j(H, {
|
|
2698
2714
|
key: 0,
|
|
2699
|
-
modelValue:
|
|
2700
|
-
"onUpdate:modelValue":
|
|
2715
|
+
modelValue: m.value,
|
|
2716
|
+
"onUpdate:modelValue": g[1] || (g[1] = (R) => m.value = R),
|
|
2701
2717
|
clearable: "",
|
|
2702
2718
|
"data-testid": "vault-secret-picker-secret-id-select",
|
|
2703
|
-
disabled:
|
|
2719
|
+
disabled: P.value || !b.value,
|
|
2704
2720
|
"enable-filtering": "",
|
|
2705
2721
|
"filter-function": () => !0,
|
|
2706
2722
|
items: re.value,
|
|
2707
2723
|
"kpop-attributes": { "data-testid": "vault-secret-picker-secret-id-popover" },
|
|
2708
|
-
label: e(
|
|
2724
|
+
label: e(d)("vault_secret_picker.secret_id.label"),
|
|
2709
2725
|
loading: e(G),
|
|
2710
|
-
placeholder: e(
|
|
2726
|
+
placeholder: e(d)("vault_secret_picker.secret_id.select_placeholder"),
|
|
2711
2727
|
required: "",
|
|
2712
2728
|
"reuse-item-template": "",
|
|
2713
2729
|
width: "100%",
|
|
2714
2730
|
onQueryChange: e(ae)
|
|
2715
2731
|
}, {
|
|
2716
2732
|
loading: v(() => [
|
|
2717
|
-
|
|
2733
|
+
I("div", null, T(e(d)("actions.loading")), 1)
|
|
2718
2734
|
]),
|
|
2719
2735
|
empty: v(() => [
|
|
2720
|
-
|
|
2736
|
+
I("div", kl, T(e(d)("vault_secret_picker.no_results")), 1)
|
|
2721
2737
|
]),
|
|
2722
2738
|
_: 1
|
|
2723
|
-
}, 8, ["modelValue", "disabled", "items", "label", "loading", "placeholder", "onQueryChange"])) : (
|
|
2739
|
+
}, 8, ["modelValue", "disabled", "items", "label", "loading", "placeholder", "onQueryChange"])) : (V(), j(se, {
|
|
2724
2740
|
key: 1,
|
|
2725
|
-
modelValue:
|
|
2726
|
-
"onUpdate:modelValue":
|
|
2741
|
+
modelValue: m.value,
|
|
2742
|
+
"onUpdate:modelValue": g[2] || (g[2] = (R) => m.value = R),
|
|
2727
2743
|
modelModifiers: { trim: !0 },
|
|
2728
2744
|
autocomplete: "off",
|
|
2729
2745
|
"data-testid": "vault-secret-picker-secret-id-input",
|
|
2730
|
-
disabled:
|
|
2731
|
-
label: e(
|
|
2732
|
-
placeholder: e(
|
|
2746
|
+
disabled: P.value || !b.value,
|
|
2747
|
+
label: e(d)("vault_secret_picker.secret_id.label"),
|
|
2748
|
+
placeholder: e(d)("vault_secret_picker.secret_id.input_placeholder"),
|
|
2733
2749
|
required: "",
|
|
2734
2750
|
type: "text"
|
|
2735
2751
|
}, null, 8, ["modelValue", "disabled", "label", "placeholder"])),
|
|
2736
|
-
|
|
2737
|
-
modelValue:
|
|
2738
|
-
"onUpdate:modelValue":
|
|
2752
|
+
u(se, {
|
|
2753
|
+
modelValue: n.value,
|
|
2754
|
+
"onUpdate:modelValue": g[3] || (g[3] = (R) => n.value = R),
|
|
2739
2755
|
modelModifiers: { trim: !0 },
|
|
2740
2756
|
autocomplete: "off",
|
|
2741
2757
|
"data-testid": "vault-secret-picker-secret-key-input",
|
|
2742
|
-
disabled:
|
|
2743
|
-
help: e(
|
|
2744
|
-
label: e(
|
|
2745
|
-
placeholder: e(
|
|
2758
|
+
disabled: P.value || !b.value,
|
|
2759
|
+
help: e(d)("vault_secret_picker.optional_secret_key.help"),
|
|
2760
|
+
label: e(d)("vault_secret_picker.optional_secret_key.label"),
|
|
2761
|
+
placeholder: e(d)("vault_secret_picker.optional_secret_key.placeholder"),
|
|
2746
2762
|
type: "text"
|
|
2747
2763
|
}, null, 8, ["modelValue", "disabled", "help", "label", "placeholder"])
|
|
2748
2764
|
]))
|
|
@@ -2751,17 +2767,17 @@ const $t = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-p
|
|
|
2751
2767
|
}, 8, ["action-button-disabled", "action-button-text", "title", "visible"]);
|
|
2752
2768
|
};
|
|
2753
2769
|
}
|
|
2754
|
-
}),
|
|
2770
|
+
}), Kl = /* @__PURE__ */ me(Cl, [["__scopeId", "data-v-9ee12676"]]);
|
|
2755
2771
|
export {
|
|
2756
|
-
|
|
2757
|
-
|
|
2772
|
+
$l as SecretForm,
|
|
2773
|
+
Tl as SecretList,
|
|
2758
2774
|
M as VaultAuthMethods,
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2775
|
+
Ul as VaultConfigCard,
|
|
2776
|
+
Al as VaultForm,
|
|
2777
|
+
El as VaultList,
|
|
2762
2778
|
t as VaultProviders,
|
|
2763
|
-
|
|
2764
|
-
|
|
2779
|
+
Kl as VaultSecretPicker,
|
|
2780
|
+
Pl as VaultSecretPickerProvider,
|
|
2765
2781
|
be as secretsEndpoints,
|
|
2766
2782
|
pe as vaultsEndpoints
|
|
2767
2783
|
};
|