@kong-ui-public/entities-vaults 3.18.2 → 3.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as ce, computed as S, ref as K, watch as ke, onBeforeMount as we, resolveComponent as Z, openBlock as C, createElementBlock as G, createVNode as d, unref as e, createSlots as Te, withCtx as v, createBlock as W, Teleport as Ke, createElementVNode as E, createCommentVNode as z, createTextVNode as ve, toDisplayString as T, reactive as he, resolveDynamicComponent as Pe, TransitionGroup as
|
|
1
|
+
import { defineComponent as ce, computed as S, ref as K, watch as ke, onBeforeMount as we, resolveComponent as Z, openBlock as C, createElementBlock as G, createVNode as d, unref as e, createSlots as Te, withCtx as v, createBlock as W, Teleport as Ke, createElementVNode as E, createCommentVNode as z, createTextVNode as ve, toDisplayString as T, reactive as he, resolveDynamicComponent as Pe, TransitionGroup as Qe, Fragment as Xe, mergeProps as Oe, normalizeClass as Ye, nextTick as et } from "vue";
|
|
2
2
|
import { useRouter as Ee } from "vue-router";
|
|
3
|
-
import { BookIcon as Me, AddIcon as
|
|
4
|
-
import { useAxios as ye, useTableState as
|
|
5
|
-
import { createI18n as
|
|
6
|
-
const
|
|
3
|
+
import { BookIcon as Me, AddIcon as qe, SecurityIcon as tt, ConjourIcon as lt, AzureIcon as ot, HashicorpIcon as at, GoogleCloudIcon as rt, AwsIcon as it, CodeIcon as nt, KongIcon as st } from "@kong/icons";
|
|
4
|
+
import { useAxios as ye, useTableState as ct, useFetcher as De, useDeleteUrlBuilder as We, FetcherStatus as je, EntityBaseTable as Be, EntityFilter as Le, PermissionsWrapper as ge, TableTags as dt, EntityEmptyState as ut, EntityDeleteModal as ze, EntityTypes as Ge, useErrors as Ze, EntityBaseFormType as Ve, useGatewayFeatureSupported as ft, EntityBaseForm as Je, SupportedEntityType as Re, EntityFormSection as xe, ConfigurationSchemaSection as Ne, ConfigurationSchemaType as pt, EntityBaseConfigCard as mt, useDebouncedFilter as Fe } from "@kong-ui-public/entities-shared";
|
|
5
|
+
import { createI18n as vt, i18nTComponent as gt } from "@kong-ui-public/i18n";
|
|
6
|
+
const bt = {
|
|
7
7
|
create: "New vault",
|
|
8
8
|
copy_id: "Copy ID",
|
|
9
9
|
copy_json: "Copy JSON",
|
|
@@ -11,18 +11,18 @@ const gt = {
|
|
|
11
11
|
delete: "Delete",
|
|
12
12
|
view: "View Details",
|
|
13
13
|
loading: "Loading..."
|
|
14
|
-
},
|
|
14
|
+
}, yt = {
|
|
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
|
+
}, _t = {
|
|
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
|
+
}, ht = {
|
|
26
26
|
title: "Vaults",
|
|
27
27
|
list: {
|
|
28
28
|
toolbar_actions: {
|
|
@@ -46,7 +46,7 @@ const gt = {
|
|
|
46
46
|
create_cta: "New vault"
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
},
|
|
49
|
+
}, Vt = {
|
|
50
50
|
title: "Secrets",
|
|
51
51
|
list: {
|
|
52
52
|
toolbar_actions: {
|
|
@@ -78,12 +78,12 @@ const gt = {
|
|
|
78
78
|
},
|
|
79
79
|
hint: "Once saved, the secret value will not be visible"
|
|
80
80
|
}
|
|
81
|
-
},
|
|
81
|
+
}, kt = {
|
|
82
82
|
success: "Copied {val} to clipboard",
|
|
83
83
|
success_brief: "Successfully copied to clipboard"
|
|
84
|
-
}, kt = {
|
|
85
|
-
vault_type: "Vault Type"
|
|
86
84
|
}, Ct = {
|
|
85
|
+
vault_type: "Vault Type"
|
|
86
|
+
}, wt = {
|
|
87
87
|
sections: {
|
|
88
88
|
general: {
|
|
89
89
|
title: "General Information",
|
|
@@ -331,8 +331,11 @@ const gt = {
|
|
|
331
331
|
login: {
|
|
332
332
|
label: "Login"
|
|
333
333
|
},
|
|
334
|
-
|
|
335
|
-
label: "API
|
|
334
|
+
api_key: {
|
|
335
|
+
label: "API Key"
|
|
336
|
+
},
|
|
337
|
+
account: {
|
|
338
|
+
label: "Account"
|
|
336
339
|
}
|
|
337
340
|
}
|
|
338
341
|
},
|
|
@@ -353,7 +356,7 @@ const gt = {
|
|
|
353
356
|
}
|
|
354
357
|
},
|
|
355
358
|
unavailable: "This vault provider is available on Enterprise."
|
|
356
|
-
},
|
|
359
|
+
}, St = {
|
|
357
360
|
title: "Look up Key in Vault",
|
|
358
361
|
vault: {
|
|
359
362
|
label: "Vault",
|
|
@@ -382,37 +385,37 @@ const gt = {
|
|
|
382
385
|
complete_action: "Look up {cta}",
|
|
383
386
|
cta: "Key in Vault"
|
|
384
387
|
}
|
|
385
|
-
},
|
|
386
|
-
actions:
|
|
388
|
+
}, It = {
|
|
389
|
+
actions: bt,
|
|
387
390
|
delete: {
|
|
388
391
|
title: "Delete a Vault",
|
|
389
392
|
title_for_secret: "Delete a Secret",
|
|
390
393
|
description: "This action cannot be reversed."
|
|
391
394
|
},
|
|
392
|
-
errors:
|
|
393
|
-
search:
|
|
394
|
-
vaults:
|
|
395
|
-
secrets:
|
|
396
|
-
copy:
|
|
397
|
-
labels:
|
|
398
|
-
form:
|
|
399
|
-
vault_secret_picker:
|
|
395
|
+
errors: yt,
|
|
396
|
+
search: _t,
|
|
397
|
+
vaults: ht,
|
|
398
|
+
secrets: Vt,
|
|
399
|
+
copy: kt,
|
|
400
|
+
labels: Ct,
|
|
401
|
+
form: wt,
|
|
402
|
+
vault_secret_picker: St
|
|
400
403
|
};
|
|
401
|
-
function
|
|
402
|
-
const l =
|
|
404
|
+
function xt() {
|
|
405
|
+
const l = vt("en-us", It);
|
|
403
406
|
return {
|
|
404
407
|
i18n: l,
|
|
405
|
-
i18nT:
|
|
408
|
+
i18nT: gt(l)
|
|
406
409
|
// Translation component <i18n-t>
|
|
407
410
|
};
|
|
408
411
|
}
|
|
409
412
|
const _e = {
|
|
410
|
-
useI18n:
|
|
411
|
-
}, Se = "/v2/control-planes/{controlPlaneId}/core-entities",
|
|
413
|
+
useI18n: xt
|
|
414
|
+
}, Se = "/v2/control-planes/{controlPlaneId}/core-entities", He = "/v2/control-planes/{controlPlaneId}/config-stores", Ie = "/{workspace}", ue = {
|
|
412
415
|
list: {
|
|
413
416
|
konnect: {
|
|
414
417
|
getAll: `${Se}/vaults`,
|
|
415
|
-
deleteConfigStore: `${
|
|
418
|
+
deleteConfigStore: `${He}/{id}?force=true`
|
|
416
419
|
},
|
|
417
420
|
kongManager: {
|
|
418
421
|
getAll: `${Ie}/vaults`
|
|
@@ -421,7 +424,7 @@ const _e = {
|
|
|
421
424
|
form: {
|
|
422
425
|
konnect: {
|
|
423
426
|
create: `${Se}/vaults`,
|
|
424
|
-
createConfigStore:
|
|
427
|
+
createConfigStore: He,
|
|
425
428
|
edit: `${Se}/vaults/{id}`
|
|
426
429
|
},
|
|
427
430
|
kongManager: {
|
|
@@ -429,7 +432,7 @@ const _e = {
|
|
|
429
432
|
edit: `${Ie}/vaults/{id}`
|
|
430
433
|
}
|
|
431
434
|
}
|
|
432
|
-
},
|
|
435
|
+
}, Et = "#00abd2", Rt = "24px", At = { class: "kong-ui-entities-vaults-list" }, Ut = { class: "button-row" }, $t = { class: "empty-state-icon-gateway" }, Tt = { class: "table-content-overflow-wrapper" }, Kt = { class: "table-content-overflow-wrapper" }, Pt = /* @__PURE__ */ ce({
|
|
433
436
|
__name: "VaultList",
|
|
434
437
|
props: {
|
|
435
438
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -484,7 +487,7 @@ const _e = {
|
|
|
484
487
|
emits: ["error", "click:learn-more", "copy:success", "copy:error", "delete:success"],
|
|
485
488
|
setup(l, { emit: I }) {
|
|
486
489
|
var de;
|
|
487
|
-
const c = I, s = l, { i18n: { t: p } } = _e.useI18n(), o = Ee(), { axiosInstance: x } = ye((de = s.config) == null ? void 0 : de.axiosRequestConfig), { hasRecords: w, handleStateChange: y } =
|
|
490
|
+
const c = I, s = l, { i18n: { t: p } } = _e.useI18n(), o = Ee(), { axiosInstance: x } = ye((de = s.config) == null ? void 0 : de.axiosRequestConfig), { hasRecords: w, handleStateChange: y } = ct(() => F.value), u = S(() => w.value && s.config.app === "konnect"), k = S(() => !s.enableV2EmptyStates && s.config.app === "konnect"), f = S(() => s.config.app !== "kongManager" || !!s.config.disableSorting), j = {
|
|
488
491
|
// the Prefix column is non-hidable
|
|
489
492
|
prefix: { label: p("vaults.list.table_headers.prefix"), searchable: !0, sortable: !0, hidable: !1 },
|
|
490
493
|
// it's "Vault Type" on display, but we still use "name" to fit API schema
|
|
@@ -495,7 +498,7 @@ const _e = {
|
|
|
495
498
|
var R, $;
|
|
496
499
|
let h = `${s.config.apiBaseUrl}${ue.list[s.config.app].getAll}`;
|
|
497
500
|
return s.config.app === "konnect" ? h = h.replace(/{controlPlaneId}/gi, ((R = s.config) == null ? void 0 : R.controlPlaneId) || "") : s.config.app === "kongManager" && (h = h.replace(/\/{workspace}/gi, ($ = s.config) != null && $.workspace ? `/${s.config.workspace}` : "")), h;
|
|
498
|
-
}),
|
|
501
|
+
}), F = K(""), O = S(() => {
|
|
499
502
|
if (s.config.app === "konnect" || s.config.isExactMatch)
|
|
500
503
|
return {
|
|
501
504
|
isExactMatch: !0,
|
|
@@ -509,13 +512,13 @@ const _e = {
|
|
|
509
512
|
};
|
|
510
513
|
}), {
|
|
511
514
|
fetcher: a,
|
|
512
|
-
fetcherState:
|
|
515
|
+
fetcherState: re,
|
|
513
516
|
fetcherCacheKey: B
|
|
514
|
-
} =
|
|
515
|
-
|
|
517
|
+
} = De(S(() => ({ ...s.config, cacheIdentifier: s.cacheIdentifier })), ae), X = () => {
|
|
518
|
+
F.value = "";
|
|
516
519
|
}, ee = () => {
|
|
517
520
|
B.value++;
|
|
518
|
-
}, g = K(null),
|
|
521
|
+
}, g = K(null), N = async (h, R) => {
|
|
519
522
|
const $ = h.id;
|
|
520
523
|
if (!await R($)) {
|
|
521
524
|
c("copy:error", {
|
|
@@ -543,7 +546,7 @@ const _e = {
|
|
|
543
546
|
entity: h,
|
|
544
547
|
message: p("copy.success_brief")
|
|
545
548
|
});
|
|
546
|
-
},
|
|
549
|
+
}, ie = async (h) => {
|
|
547
550
|
var $;
|
|
548
551
|
await (($ = s.canRetrieve) == null ? void 0 : $.call(s, h)) && o.push(s.config.getViewRoute(h.id));
|
|
549
552
|
}, te = (h) => ({
|
|
@@ -552,14 +555,14 @@ const _e = {
|
|
|
552
555
|
}), le = (h) => ({
|
|
553
556
|
label: p("actions.edit"),
|
|
554
557
|
to: s.config.getEditRoute(h)
|
|
555
|
-
}), J = K(void 0), U = K(!1), L = K(!1), Q = K(""), b =
|
|
558
|
+
}), J = K(void 0), U = K(!1), L = K(!1), Q = K(""), b = We(s.config, ae.value), m = (h) => {
|
|
556
559
|
J.value = h, U.value = !0;
|
|
557
560
|
}, P = () => {
|
|
558
561
|
U.value = !1;
|
|
559
562
|
}, M = async (h) => {
|
|
560
|
-
const { apiBaseUrl: R, app: $, controlPlaneId: n } = s.config,
|
|
563
|
+
const { apiBaseUrl: R, app: $, controlPlaneId: n } = s.config, r = `${R}${ue.list[$].deleteConfigStore}`.replace(/{controlPlaneId}/gi, n || "").replace(/{id}/gi, h);
|
|
561
564
|
try {
|
|
562
|
-
await x.delete(
|
|
565
|
+
await x.delete(r);
|
|
563
566
|
} catch {
|
|
564
567
|
}
|
|
565
568
|
}, ne = async () => {
|
|
@@ -568,8 +571,8 @@ const _e = {
|
|
|
568
571
|
L.value = !0;
|
|
569
572
|
try {
|
|
570
573
|
await x.delete(b(J.value.id)), s.config.app === "konnect" && ((R = J.value.config) != null && R.config_store_id) && M(J.value.config.config_store_id), L.value = !1, U.value = !1, B.value++, c("delete:success", J.value);
|
|
571
|
-
} catch (
|
|
572
|
-
Q.value = ((n = ($ =
|
|
574
|
+
} catch (r) {
|
|
575
|
+
Q.value = ((n = ($ = r.response) == null ? void 0 : $.data) == null ? void 0 : n.message) || r.message || p("errors.delete"), c("error", r);
|
|
573
576
|
} finally {
|
|
574
577
|
L.value = !1;
|
|
575
578
|
}
|
|
@@ -577,9 +580,9 @@ const _e = {
|
|
|
577
580
|
}, q = () => {
|
|
578
581
|
o.push(s.config.createRoute);
|
|
579
582
|
};
|
|
580
|
-
ke(
|
|
583
|
+
ke(re, (h) => {
|
|
581
584
|
var R, $, n;
|
|
582
|
-
if (h.status ===
|
|
585
|
+
if (h.status === je.Error) {
|
|
583
586
|
g.value = {
|
|
584
587
|
title: p("errors.general")
|
|
585
588
|
}, (n = ($ = (R = h.error) == null ? void 0 : R.response) == null ? void 0 : $.data) != null && n.message && (g.value.message = h.error.response.data.message), c("error", h.error);
|
|
@@ -596,9 +599,9 @@ const _e = {
|
|
|
596
599
|
return we(async () => {
|
|
597
600
|
await s.canCreate() && (A.value.title = p("vaults.list.empty_state.title"), A.value.ctaText = p("actions.create"));
|
|
598
601
|
}), (h, R) => {
|
|
599
|
-
const $ = Z("KButton"), n = Z("KDropdownItem"),
|
|
600
|
-
return C(), G("div",
|
|
601
|
-
d(e(
|
|
602
|
+
const $ = Z("KButton"), n = Z("KDropdownItem"), r = Z("KClipboardProvider");
|
|
603
|
+
return C(), G("div", At, [
|
|
604
|
+
d(e(Be), {
|
|
602
605
|
"cache-identifier": l.cacheIdentifier,
|
|
603
606
|
"disable-sorting": f.value,
|
|
604
607
|
"empty-state-options": A.value,
|
|
@@ -608,17 +611,17 @@ const _e = {
|
|
|
608
611
|
"fetcher-cache-key": e(B),
|
|
609
612
|
"pagination-type": "offset",
|
|
610
613
|
"preferences-storage-key": "kong-ui-entities-vaults-list",
|
|
611
|
-
query:
|
|
614
|
+
query: F.value,
|
|
612
615
|
"table-headers": e(Y),
|
|
613
616
|
onClearSearchInput: X,
|
|
614
|
-
"onClick:row": R[4] || (R[4] = (_) =>
|
|
617
|
+
"onClick:row": R[4] || (R[4] = (_) => ie(_)),
|
|
615
618
|
onSort: ee,
|
|
616
619
|
onState: e(y)
|
|
617
620
|
}, Te({
|
|
618
621
|
"toolbar-filter": v(() => [
|
|
619
|
-
d(e(
|
|
620
|
-
modelValue:
|
|
621
|
-
"onUpdate:modelValue": R[0] || (R[0] = (_) =>
|
|
622
|
+
d(e(Le), {
|
|
623
|
+
modelValue: F.value,
|
|
624
|
+
"onUpdate:modelValue": R[0] || (R[0] = (_) => F.value = _),
|
|
622
625
|
config: O.value
|
|
623
626
|
}, null, 8, ["modelValue", "config"])
|
|
624
627
|
]),
|
|
@@ -627,7 +630,7 @@ const _e = {
|
|
|
627
630
|
disabled: !l.useActionOutside,
|
|
628
631
|
to: "#kong-ui-app-page-header-action-button"
|
|
629
632
|
}, [
|
|
630
|
-
E("div",
|
|
633
|
+
E("div", Ut, [
|
|
631
634
|
u.value ? (C(), W($, {
|
|
632
635
|
key: 0,
|
|
633
636
|
appearance: "secondary",
|
|
@@ -652,7 +655,7 @@ const _e = {
|
|
|
652
655
|
to: l.config.createRoute
|
|
653
656
|
}, {
|
|
654
657
|
default: v(() => [
|
|
655
|
-
d(e(
|
|
658
|
+
d(e(qe)),
|
|
656
659
|
ve(" " + T(e(p)("vaults.list.toolbar_actions.new_vault")), 1)
|
|
657
660
|
]),
|
|
658
661
|
_: 1
|
|
@@ -664,7 +667,7 @@ const _e = {
|
|
|
664
667
|
], 8, ["disabled"]))
|
|
665
668
|
]),
|
|
666
669
|
prefix: v(({ rowValue: _ }) => [
|
|
667
|
-
E("div",
|
|
670
|
+
E("div", Tt, [
|
|
668
671
|
E("b", null, T(_ ?? "-"), 1)
|
|
669
672
|
])
|
|
670
673
|
]),
|
|
@@ -672,17 +675,17 @@ const _e = {
|
|
|
672
675
|
E("b", null, T(_ ?? "-"), 1)
|
|
673
676
|
]),
|
|
674
677
|
description: v(({ rowValue: _ }) => [
|
|
675
|
-
E("div",
|
|
678
|
+
E("div", Kt, T(_ ?? "-"), 1)
|
|
676
679
|
]),
|
|
677
680
|
tags: v(({ rowValue: _ }) => [
|
|
678
|
-
d(e(
|
|
681
|
+
d(e(dt), { tags: _ }, null, 8, ["tags"])
|
|
679
682
|
]),
|
|
680
683
|
actions: v(({ row: _ }) => [
|
|
681
|
-
d(
|
|
684
|
+
d(r, null, {
|
|
682
685
|
default: v(({ copyToClipboard: H }) => [
|
|
683
686
|
d(n, {
|
|
684
687
|
"data-testid": "action-entity-copy-id",
|
|
685
|
-
onClick: (
|
|
688
|
+
onClick: (V) => N(_, H)
|
|
686
689
|
}, {
|
|
687
690
|
default: v(() => [
|
|
688
691
|
ve(T(e(p)("actions.copy_id")), 1)
|
|
@@ -692,11 +695,11 @@ const _e = {
|
|
|
692
695
|
]),
|
|
693
696
|
_: 2
|
|
694
697
|
}, 1024),
|
|
695
|
-
d(
|
|
698
|
+
d(r, null, {
|
|
696
699
|
default: v(({ copyToClipboard: H }) => [
|
|
697
700
|
d(n, {
|
|
698
701
|
"data-testid": "action-entity-copy-json",
|
|
699
|
-
onClick: (
|
|
702
|
+
onClick: (V) => oe(_, H)
|
|
700
703
|
}, {
|
|
701
704
|
default: v(() => [
|
|
702
705
|
ve(T(e(p)("actions.copy_json")), 1)
|
|
@@ -750,7 +753,7 @@ const _e = {
|
|
|
750
753
|
]),
|
|
751
754
|
_: 2
|
|
752
755
|
}, [
|
|
753
|
-
!e(w) &&
|
|
756
|
+
!e(w) && k.value ? {
|
|
754
757
|
name: "outside-actions",
|
|
755
758
|
fn: v(() => [
|
|
756
759
|
(C(), W(Ke, {
|
|
@@ -773,12 +776,12 @@ const _e = {
|
|
|
773
776
|
]),
|
|
774
777
|
key: "0"
|
|
775
778
|
} : void 0,
|
|
776
|
-
!
|
|
779
|
+
!F.value && l.enableV2EmptyStates && l.config.app === "konnect" ? {
|
|
777
780
|
name: "empty-state",
|
|
778
781
|
fn: v(() => {
|
|
779
782
|
var _;
|
|
780
783
|
return [
|
|
781
|
-
d(e(
|
|
784
|
+
d(e(ut), {
|
|
782
785
|
"action-button-text": e(p)("vaults.list.toolbar_actions.new_vault"),
|
|
783
786
|
appearance: "secondary",
|
|
784
787
|
"can-create": () => l.canCreate(),
|
|
@@ -790,10 +793,10 @@ const _e = {
|
|
|
790
793
|
"onClick:learnMore": R[3] || (R[3] = (H) => h.$emit("click:learn-more"))
|
|
791
794
|
}, Te({
|
|
792
795
|
image: v(() => [
|
|
793
|
-
E("div",
|
|
794
|
-
d(e(
|
|
795
|
-
color: e(
|
|
796
|
-
size: e(
|
|
796
|
+
E("div", $t, [
|
|
797
|
+
d(e(tt), {
|
|
798
|
+
color: e(Et),
|
|
799
|
+
size: e(Rt)
|
|
797
800
|
}, null, 8, ["color", "size"])
|
|
798
801
|
])
|
|
799
802
|
]),
|
|
@@ -812,11 +815,11 @@ const _e = {
|
|
|
812
815
|
key: "1"
|
|
813
816
|
} : void 0
|
|
814
817
|
]), 1032, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers", "onState"]),
|
|
815
|
-
d(e(
|
|
818
|
+
d(e(ze), {
|
|
816
819
|
"action-pending": L.value,
|
|
817
820
|
description: e(p)("delete.description"),
|
|
818
821
|
"entity-name": J.value && (J.value.prefix || J.value.id),
|
|
819
|
-
"entity-type": e(
|
|
822
|
+
"entity-type": e(Ge).Vault,
|
|
820
823
|
error: Q.value,
|
|
821
824
|
title: e(p)("delete.title"),
|
|
822
825
|
visible: U.value,
|
|
@@ -831,21 +834,21 @@ const _e = {
|
|
|
831
834
|
for (const [s, p] of I)
|
|
832
835
|
c[s] = p;
|
|
833
836
|
return c;
|
|
834
|
-
},
|
|
837
|
+
}, xl = /* @__PURE__ */ fe(Pt, [["__scopeId", "data-v-77e50046"]]);
|
|
835
838
|
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 || {}), D = /* @__PURE__ */ ((l) => (l.TOKEN = "token", l.K8S = "kubernetes", l.APP_ROLE = "approle", l))(D || {});
|
|
836
|
-
const
|
|
839
|
+
const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-provider-cards-container" }, Ft = ["data-testid"], Ht = { class: "provider-item-title-container" }, Ot = { class: "provider-item-title" }, qt = { class: "provider-item-description" }, Dt = {
|
|
837
840
|
key: "kong-vault-config-fields",
|
|
838
841
|
class: "vault-form-config-fields-container"
|
|
839
|
-
},
|
|
842
|
+
}, Wt = {
|
|
840
843
|
key: 0,
|
|
841
844
|
class: "vault-form-config-auth-method-container"
|
|
842
|
-
},
|
|
845
|
+
}, jt = {
|
|
843
846
|
key: 1,
|
|
844
847
|
class: "vault-form-config-auth-method-container"
|
|
845
|
-
},
|
|
848
|
+
}, Bt = {
|
|
846
849
|
key: 2,
|
|
847
850
|
class: "vault-form-config-auth-method-container"
|
|
848
|
-
},
|
|
851
|
+
}, Lt = { key: 6 }, zt = { class: "wrapper" }, Gt = { class: "item-50" }, Zt = { class: "item-50" }, Jt = { class: "wrapper" }, Qt = { class: "item-100" }, Xt = /* @__PURE__ */ ce({
|
|
849
852
|
__name: "VaultForm",
|
|
850
853
|
props: {
|
|
851
854
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -864,7 +867,7 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
864
867
|
emits: ["update", "error", "loading"],
|
|
865
868
|
setup(l, { emit: I }) {
|
|
866
869
|
var $;
|
|
867
|
-
const c = l, s = I, { i18nT: p, i18n: { t: o } } = _e.useI18n(), x = Ee(), { axiosInstance: w } = ye(($ = c.config) == null ? void 0 : $.axiosRequestConfig), { getMessageFromError: y } =
|
|
870
|
+
const c = l, s = I, { i18nT: p, i18n: { t: o } } = _e.useI18n(), x = Ee(), { axiosInstance: w } = ye(($ = c.config) == null ? void 0 : $.axiosRequestConfig), { getMessageFromError: y } = Ze(), u = he({
|
|
868
871
|
fields: {
|
|
869
872
|
prefix: "",
|
|
870
873
|
description: "",
|
|
@@ -872,11 +875,11 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
872
875
|
},
|
|
873
876
|
isReadonly: !1,
|
|
874
877
|
errorMessage: ""
|
|
875
|
-
}),
|
|
878
|
+
}), k = he({
|
|
876
879
|
prefix: "",
|
|
877
880
|
description: "",
|
|
878
881
|
tags: ""
|
|
879
|
-
}), f = K(c.config.konnectConfigStoreAvailable ? t.KONNECT : t.ENV), j = K(null), Y = K(), ae = S(() => [t.AWS, t.GCP, t.HCV, t.AZURE, t.CONJUR].includes(f.value)),
|
|
882
|
+
}), f = K(c.config.konnectConfigStoreAvailable ? t.KONNECT : t.ENV), j = K(null), Y = K(), ae = S(() => [t.AWS, t.GCP, t.HCV, t.AZURE, t.CONJUR].includes(f.value)), F = S(() => [
|
|
880
883
|
...c.config.konnectConfigStoreAvailable ? [{
|
|
881
884
|
label: o("form.config.konnect.label"),
|
|
882
885
|
value: t.KONNECT
|
|
@@ -955,8 +958,11 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
955
958
|
tenant_id: "",
|
|
956
959
|
...O
|
|
957
960
|
},
|
|
958
|
-
[t.CONJUR]: {
|
|
959
|
-
|
|
961
|
+
[t.CONJUR]: {
|
|
962
|
+
endpoint_url: "",
|
|
963
|
+
auth_method: "default"
|
|
964
|
+
}
|
|
965
|
+
}), re = he({
|
|
960
966
|
[t.KONNECT]: {},
|
|
961
967
|
[t.ENV]: {
|
|
962
968
|
prefix: "",
|
|
@@ -1001,7 +1007,10 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
1001
1007
|
tenant_id: "",
|
|
1002
1008
|
...O
|
|
1003
1009
|
},
|
|
1004
|
-
[t.CONJUR]: {
|
|
1010
|
+
[t.CONJUR]: {
|
|
1011
|
+
endpoint_url: "",
|
|
1012
|
+
auth_method: "default"
|
|
1013
|
+
}
|
|
1005
1014
|
}), B = [
|
|
1006
1015
|
{ label: `${o("form.config.aws.fields.region.locations.us-east-1.location")} (us-east-1)`, value: "us-east-1" },
|
|
1007
1016
|
{ label: `${o("form.config.aws.fields.region.locations.us-east-2.location")} (us-east-2)`, value: "us-east-2" },
|
|
@@ -1027,10 +1036,10 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
1027
1036
|
{ label: `${o("form.config.aws.fields.region.locations.sa-east-1.location")} (sa-east-1)`, value: "sa-east-1" },
|
|
1028
1037
|
{ label: `${o("form.config.aws.fields.region.locations.us-gov-east-1.location")} (us-gov-east-1)`, value: "us-gov-east-1" },
|
|
1029
1038
|
{ label: `${o("form.config.aws.fields.region.locations.us-gov-west-1.location")} (us-gov-west-1)`, value: "us-gov-west-1" }
|
|
1030
|
-
], X = [{ label: "secrets", value: "secrets" }], ee = [{ label: "http", value: "http" }, { label: "https", value: "https" }], g = [{ label: "v1", value: "v1" }, { label: "v2", value: "v2" }],
|
|
1031
|
-
var n,
|
|
1032
|
-
return (
|
|
1033
|
-
}),
|
|
1039
|
+
], X = [{ label: "secrets", value: "secrets" }], ee = [{ label: "http", value: "http" }, { label: "https", value: "https" }], g = [{ label: "v1", value: "v1" }, { label: "v2", value: "v2" }], N = S(() => c.vaultId ? Ve.Edit : Ve.Create), oe = S(() => {
|
|
1040
|
+
var n, r;
|
|
1041
|
+
return (r = ue.form[(n = c.config) == null ? void 0 : n.app]) == null ? void 0 : r.edit;
|
|
1042
|
+
}), ie = S(() => N.value === Ve.Edit && c.config.app === "kongManager"), te = S(() => c.config.app === "konnect" || ft({
|
|
1034
1043
|
gatewayInfo: c.config.gatewayInfo,
|
|
1035
1044
|
// vault name can only be `env` in Gateway Community Edition
|
|
1036
1045
|
supportedRange: {
|
|
@@ -1046,19 +1055,19 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
1046
1055
|
}, L = (n) => {
|
|
1047
1056
|
switch (n) {
|
|
1048
1057
|
case t.KONNECT:
|
|
1049
|
-
return
|
|
1058
|
+
return st;
|
|
1050
1059
|
case t.ENV:
|
|
1051
1060
|
return nt;
|
|
1052
1061
|
case t.AWS:
|
|
1053
|
-
return rt;
|
|
1054
|
-
case t.GCP:
|
|
1055
1062
|
return it;
|
|
1063
|
+
case t.GCP:
|
|
1064
|
+
return rt;
|
|
1056
1065
|
case t.HCV:
|
|
1057
1066
|
return at;
|
|
1058
1067
|
case t.AZURE:
|
|
1059
1068
|
return ot;
|
|
1060
1069
|
case t.CONJUR:
|
|
1061
|
-
return
|
|
1070
|
+
return lt;
|
|
1062
1071
|
}
|
|
1063
1072
|
}, Q = (n) => {
|
|
1064
1073
|
switch (n) {
|
|
@@ -1078,12 +1087,12 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
1078
1087
|
return o("form.config.conjur.description");
|
|
1079
1088
|
}
|
|
1080
1089
|
}, b = (n) => {
|
|
1081
|
-
var H,
|
|
1082
|
-
u.fields.prefix = ((H = n == null ? void 0 : n.item) == null ? void 0 : H.prefix) || (n == null ? void 0 : n.prefix) || "", u.fields.description = ((
|
|
1083
|
-
const
|
|
1084
|
-
u.fields.tags = (
|
|
1090
|
+
var H, V, se, pe, me, i;
|
|
1091
|
+
u.fields.prefix = ((H = n == null ? void 0 : n.item) == null ? void 0 : H.prefix) || (n == null ? void 0 : n.prefix) || "", u.fields.description = ((V = n == null ? void 0 : n.item) == null ? void 0 : V.description) || (n == null ? void 0 : n.description) || "";
|
|
1092
|
+
const r = ((se = n == null ? void 0 : n.item) == null ? void 0 : se.tags) || (n == null ? void 0 : n.tags) || [];
|
|
1093
|
+
u.fields.tags = (r == null ? void 0 : r.join(", ")) || "", Object.assign(k, u.fields);
|
|
1085
1094
|
const _ = ((pe = n == null ? void 0 : n.item) == null ? void 0 : pe.config) || (n == null ? void 0 : n.config) || null;
|
|
1086
|
-
_ && (Object.keys(_).length || (n == null ? void 0 : n.name) === t.KONNECT) ? (f.value = ((me = n == null ? void 0 : n.item) == null ? void 0 : me.name) || (n == null ? void 0 : n.name) || "", j.value = f.value, Y.value = ((
|
|
1095
|
+
_ && (Object.keys(_).length || (n == null ? void 0 : n.name) === t.KONNECT) ? (f.value = ((me = n == null ? void 0 : n.item) == null ? void 0 : me.name) || (n == null ? void 0 : n.name) || "", j.value = f.value, Y.value = ((i = n == null ? void 0 : n.config) == null ? void 0 : i.config_store_id) || void 0, Object.assign(a[f.value], _), Object.assign(re[f.value], _)) : u.errorMessage = "Error loading vault config";
|
|
1087
1096
|
}, m = (n) => n === "" || n == null, P = S(() => f.value === t.HCV ? !Object.keys(a[t.HCV]).filter((n) => [
|
|
1088
1097
|
"namespace",
|
|
1089
1098
|
"ttl",
|
|
@@ -1093,10 +1102,10 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
1093
1102
|
"approle_auth_path",
|
|
1094
1103
|
"approle_secret_id",
|
|
1095
1104
|
"approle_secret_id_file"
|
|
1096
|
-
].includes(n) || a[t.HCV].auth_method !== D.K8S && (n === "kube_role" || n === "kube_api_token_file") || a[t.HCV].auth_method !== D.TOKEN && n === "token" || a[t.HCV].auth_method !== D.APP_ROLE && (n === "approle_role_id" || n === "approle_response_wrapping") || a[t.HCV].auth_method === D.APP_ROLE && n === "approle_response_wrapping" && typeof a[f.value][n] == "boolean" ? !1 : m(a[f.value][n])).length : f.value === t.AZURE ? !Object.keys(a[t.AZURE]).filter((n) => ["client_id", "tenant_id", "ttl", "neg_ttl", "resurrect_ttl"].includes(n) ? !1 : m(a[f.value][n])).length : f.value === t.AWS ? !Object.keys(a[t.AWS]).filter((n) => ["endpoint_url", "assume_role_arn", "ttl", "neg_ttl", "resurrect_ttl", "sts_endpoint_url"].includes(n) ? !1 : m(a[f.value][n])).length : !Object.keys(a[f.value]).filter((n) => ["ttl", "neg_ttl", "resurrect_ttl"].includes(n) ? !1 : m(a[f.value][n])).length), M = S(() => !!u.fields.prefix && P.value), ne = S(() => JSON.stringify(u.fields) !== JSON.stringify(
|
|
1097
|
-
var
|
|
1098
|
-
let n = `${c.config.apiBaseUrl}${ue.form[c.config.app][
|
|
1099
|
-
return c.config.app === "konnect" ? n = n.replace(/{controlPlaneId}/gi, ((
|
|
1105
|
+
].includes(n) || a[t.HCV].auth_method !== D.K8S && (n === "kube_role" || n === "kube_api_token_file") || a[t.HCV].auth_method !== D.TOKEN && n === "token" || a[t.HCV].auth_method !== D.APP_ROLE && (n === "approle_role_id" || n === "approle_response_wrapping") || a[t.HCV].auth_method === D.APP_ROLE && n === "approle_response_wrapping" && typeof a[f.value][n] == "boolean" ? !1 : m(a[f.value][n])).length : f.value === t.AZURE ? !Object.keys(a[t.AZURE]).filter((n) => ["client_id", "tenant_id", "ttl", "neg_ttl", "resurrect_ttl"].includes(n) ? !1 : m(a[f.value][n])).length : f.value === t.AWS ? !Object.keys(a[t.AWS]).filter((n) => ["endpoint_url", "assume_role_arn", "ttl", "neg_ttl", "resurrect_ttl", "sts_endpoint_url"].includes(n) ? !1 : m(a[f.value][n])).length : !Object.keys(a[f.value]).filter((n) => ["ttl", "neg_ttl", "resurrect_ttl"].includes(n) ? !1 : m(a[f.value][n])).length), M = S(() => !!u.fields.prefix && P.value), ne = S(() => JSON.stringify(u.fields) !== JSON.stringify(k) || f.value !== j.value || JSON.stringify(a[f.value]) !== JSON.stringify(re[f.value])), q = S(() => {
|
|
1106
|
+
var r, _;
|
|
1107
|
+
let n = `${c.config.apiBaseUrl}${ue.form[c.config.app][N.value]}`;
|
|
1108
|
+
return c.config.app === "konnect" ? n = n.replace(/{controlPlaneId}/gi, ((r = c.config) == null ? void 0 : r.controlPlaneId) || "") : c.config.app === "kongManager" && (n = n.replace(/\/{workspace}/gi, (_ = c.config) != null && _.workspace ? `/${c.config.workspace}` : "")), n = n.replace(/{id}/gi, c.vaultId), n;
|
|
1100
1109
|
}), A = S(() => {
|
|
1101
1110
|
var pe, me;
|
|
1102
1111
|
const n = {
|
|
@@ -1107,6 +1116,7 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
1107
1116
|
kv: a[t.HCV].kv,
|
|
1108
1117
|
namespace: a[t.HCV].namespace || null,
|
|
1109
1118
|
auth_method: a[t.HCV].auth_method,
|
|
1119
|
+
...c.config.base64FieldAvailable && { base64_decode: a[t.HCV].base64_decode },
|
|
1110
1120
|
...a[t.HCV].auth_method === D.TOKEN && { token: a[t.HCV].token },
|
|
1111
1121
|
// For Kong Admin API, when auth_method is kubernetes, token must be in the request body and its value has to be null
|
|
1112
1122
|
...a[t.HCV].auth_method === D.K8S && {
|
|
@@ -1122,7 +1132,7 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
1122
1132
|
approle_secret_id_file: a[t.HCV].approle_secret_id_file || void 0,
|
|
1123
1133
|
approle_response_wrapping: a[t.HCV].approle_response_wrapping ?? !1
|
|
1124
1134
|
}
|
|
1125
|
-
},
|
|
1135
|
+
}, r = {
|
|
1126
1136
|
...a[f.value],
|
|
1127
1137
|
client_id: a[f.value].client_id || null,
|
|
1128
1138
|
tenant_id: a[f.value].tenant_id || null
|
|
@@ -1133,11 +1143,11 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
1133
1143
|
...c.config.awsStsEndpointUrlAvailable ? { sts_endpoint_url: a[f.value].sts_endpoint_url || null } : {}
|
|
1134
1144
|
};
|
|
1135
1145
|
let H = a[f.value];
|
|
1136
|
-
f.value === t.HCV ? H = n : f.value === t.AZURE ? H =
|
|
1137
|
-
let
|
|
1146
|
+
f.value === t.HCV ? H = n : f.value === t.AZURE ? H = r : f.value === t.AWS && (H = _);
|
|
1147
|
+
let V = {};
|
|
1138
1148
|
if (![t.KONNECT, t.ENV].includes(f.value)) {
|
|
1139
|
-
const
|
|
1140
|
-
|
|
1149
|
+
const i = a[f.value], Ae = i.ttl, Ue = i.neg_ttl, $e = i.resurrect_ttl;
|
|
1150
|
+
V = {
|
|
1141
1151
|
ttl: Ae ? parseInt(Ae.toString(), 10) : null,
|
|
1142
1152
|
neg_ttl: Ue ? parseInt(Ue.toString(), 10) : null,
|
|
1143
1153
|
resurrect_ttl: $e ? parseInt($e.toString(), 10) : null
|
|
@@ -1146,11 +1156,11 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
1146
1156
|
return {
|
|
1147
1157
|
prefix: u.fields.prefix,
|
|
1148
1158
|
description: u.fields.description || null,
|
|
1149
|
-
tags: (me = (pe = u.fields.tags.split(",")) == null ? void 0 : pe.map((
|
|
1159
|
+
tags: (me = (pe = u.fields.tags.split(",")) == null ? void 0 : pe.map((i) => String(i || "").trim())) == null ? void 0 : me.filter((i) => i !== ""),
|
|
1150
1160
|
name: f.value,
|
|
1151
1161
|
config: {
|
|
1152
1162
|
...H,
|
|
1153
|
-
...
|
|
1163
|
+
...V
|
|
1154
1164
|
}
|
|
1155
1165
|
};
|
|
1156
1166
|
}), de = S(() => ({
|
|
@@ -1163,10 +1173,10 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
1163
1173
|
var n;
|
|
1164
1174
|
try {
|
|
1165
1175
|
u.isReadonly = !0;
|
|
1166
|
-
const
|
|
1176
|
+
const r = `${c.config.apiBaseUrl}${ue.form.konnect.createConfigStore}`.replace(/{controlPlaneId}/gi, ((n = c.config) == null ? void 0 : n.controlPlaneId) || ""), _ = await w.post(r);
|
|
1167
1177
|
return _ == null ? void 0 : _.data.id;
|
|
1168
|
-
} catch (
|
|
1169
|
-
u.errorMessage = y(
|
|
1178
|
+
} catch (r) {
|
|
1179
|
+
u.errorMessage = y(r), s("error", r);
|
|
1170
1180
|
} finally {
|
|
1171
1181
|
u.isReadonly = !1;
|
|
1172
1182
|
}
|
|
@@ -1174,18 +1184,18 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
1174
1184
|
var n;
|
|
1175
1185
|
try {
|
|
1176
1186
|
u.isReadonly = !0;
|
|
1177
|
-
let
|
|
1178
|
-
|
|
1179
|
-
} catch (
|
|
1180
|
-
u.errorMessage = y(
|
|
1187
|
+
let r;
|
|
1188
|
+
N.value === "create" ? f.value === t.KONNECT ? (Y.value = await h(), r = await w.post(q.value, de.value)) : r = await w.post(q.value, A.value) : N.value === "edit" && (f.value === t.KONNECT && !Y.value ? (Y.value = await h(), r = await w.put(q.value, de.value)) : r = ((n = c.config) == null ? void 0 : n.app) === "konnect" ? await w.put(q.value, de.value) : await w.patch(q.value, A.value)), b(r == null ? void 0 : r.data), s("update", r == null ? void 0 : r.data);
|
|
1189
|
+
} catch (r) {
|
|
1190
|
+
u.errorMessage = y(r), s("error", r);
|
|
1181
1191
|
} finally {
|
|
1182
1192
|
u.isReadonly = !1;
|
|
1183
1193
|
}
|
|
1184
1194
|
};
|
|
1185
|
-
return (n,
|
|
1186
|
-
const _ = Z("KTooltip"), H = Z("KSelect"),
|
|
1187
|
-
return C(), G("div",
|
|
1188
|
-
d(e(
|
|
1195
|
+
return (n, r) => {
|
|
1196
|
+
const _ = Z("KTooltip"), H = Z("KSelect"), V = Z("KInput"), se = Z("KCheckbox"), pe = Z("KCollapse"), me = Z("KTextArea");
|
|
1197
|
+
return C(), G("div", Mt, [
|
|
1198
|
+
d(e(Je), {
|
|
1189
1199
|
"can-submit": M.value && ne.value,
|
|
1190
1200
|
config: l.config,
|
|
1191
1201
|
"edit-id": l.vaultId,
|
|
@@ -1206,33 +1216,34 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
1206
1216
|
title: e(o)("form.sections.config.title")
|
|
1207
1217
|
}, {
|
|
1208
1218
|
default: v(() => [
|
|
1209
|
-
E("div",
|
|
1219
|
+
E("div", Nt, [
|
|
1210
1220
|
d(H, {
|
|
1211
1221
|
modelValue: f.value,
|
|
1212
|
-
"onUpdate:modelValue":
|
|
1222
|
+
"onUpdate:modelValue": r[0] || (r[0] = (i) => f.value = i),
|
|
1213
1223
|
"data-testid": "provider-select",
|
|
1214
|
-
disabled:
|
|
1224
|
+
disabled: ie.value,
|
|
1215
1225
|
"dropdown-max-height": "500",
|
|
1216
|
-
items:
|
|
1226
|
+
items: F.value,
|
|
1227
|
+
readonly: u.isReadonly
|
|
1217
1228
|
}, {
|
|
1218
|
-
"selected-item-template": v(({ item:
|
|
1219
|
-
(C(), W(Pe(L(
|
|
1220
|
-
E("span", null, T(
|
|
1229
|
+
"selected-item-template": v(({ item: i }) => [
|
|
1230
|
+
(C(), W(Pe(L(i.value)))),
|
|
1231
|
+
E("span", null, T(i == null ? void 0 : i.label), 1)
|
|
1221
1232
|
]),
|
|
1222
|
-
"item-template": v(({ item:
|
|
1233
|
+
"item-template": v(({ item: i }) => [
|
|
1223
1234
|
d(_, {
|
|
1224
1235
|
placement: "top",
|
|
1225
|
-
text:
|
|
1236
|
+
text: i.disabled ? e(o)("form.unavailable") : ""
|
|
1226
1237
|
}, {
|
|
1227
1238
|
default: v(() => [
|
|
1228
1239
|
E("div", {
|
|
1229
1240
|
class: "provider-item",
|
|
1230
|
-
"data-testid": `vault-form-provider-${
|
|
1241
|
+
"data-testid": `vault-form-provider-${i.value}`
|
|
1231
1242
|
}, [
|
|
1232
|
-
(C(), W(Pe(L(
|
|
1233
|
-
E("div",
|
|
1234
|
-
E("span",
|
|
1235
|
-
E("span",
|
|
1243
|
+
(C(), W(Pe(L(i.value)))),
|
|
1244
|
+
E("div", Ht, [
|
|
1245
|
+
E("span", Ot, T(i == null ? void 0 : i.label), 1),
|
|
1246
|
+
E("span", qt, T(Q(i.value)), 1)
|
|
1236
1247
|
])
|
|
1237
1248
|
], 8, Ft)
|
|
1238
1249
|
]),
|
|
@@ -1240,39 +1251,39 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
1240
1251
|
}, 1032, ["text"])
|
|
1241
1252
|
]),
|
|
1242
1253
|
_: 1
|
|
1243
|
-
}, 8, ["modelValue", "disabled", "items"])
|
|
1254
|
+
}, 8, ["modelValue", "disabled", "items", "readonly"])
|
|
1244
1255
|
]),
|
|
1245
|
-
d(
|
|
1256
|
+
d(Qe, { name: "appear" }, {
|
|
1246
1257
|
default: v(() => [
|
|
1247
|
-
f.value === e(t).ENV ? (C(), G("div",
|
|
1248
|
-
d(
|
|
1258
|
+
f.value === e(t).ENV ? (C(), G("div", Dt, [
|
|
1259
|
+
d(V, {
|
|
1249
1260
|
modelValue: a[e(t).ENV].prefix,
|
|
1250
|
-
"onUpdate:modelValue":
|
|
1261
|
+
"onUpdate:modelValue": r[1] || (r[1] = (i) => a[e(t).ENV].prefix = i),
|
|
1251
1262
|
modelModifiers: { trim: !0 },
|
|
1252
1263
|
autocomplete: "off",
|
|
1253
1264
|
"data-testid": "vault-form-config-kong-prefix",
|
|
1254
|
-
"is-readonly": u.isReadonly,
|
|
1255
1265
|
label: e(o)("form.config.env.fields.prefix.label"),
|
|
1256
1266
|
"label-attributes": {
|
|
1257
1267
|
info: e(o)("form.config.env.fields.prefix.tooltip"),
|
|
1258
1268
|
tooltipAttributes: { maxWidth: "400" }
|
|
1259
1269
|
},
|
|
1260
1270
|
placeholder: e(o)("form.config.env.fields.prefix.placeholder"),
|
|
1271
|
+
readonly: u.isReadonly,
|
|
1261
1272
|
required: "",
|
|
1262
1273
|
type: "text"
|
|
1263
|
-
}, null, 8, ["modelValue", "
|
|
1274
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder", "readonly"]),
|
|
1264
1275
|
l.config.base64FieldAvailable ? (C(), W(se, {
|
|
1265
1276
|
key: 0,
|
|
1266
1277
|
modelValue: a[e(t).ENV].base64_decode,
|
|
1267
|
-
"onUpdate:modelValue":
|
|
1278
|
+
"onUpdate:modelValue": r[2] || (r[2] = (i) => a[e(t).ENV].base64_decode = i),
|
|
1268
1279
|
"data-testid": "vault-form-config-env-base64_decode",
|
|
1269
|
-
"is-readonly": u.isReadonly,
|
|
1270
1280
|
label: e(o)("form.config.commonFields.base64_decode.label"),
|
|
1271
1281
|
"label-attributes": {
|
|
1272
1282
|
info: e(o)("form.config.commonFields.base64_decode.tooltip"),
|
|
1273
1283
|
tooltipAttributes: { maxWidth: "400" }
|
|
1274
|
-
}
|
|
1275
|
-
|
|
1284
|
+
},
|
|
1285
|
+
readonly: u.isReadonly
|
|
1286
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) : z("", !0)
|
|
1276
1287
|
])) : z("", !0),
|
|
1277
1288
|
f.value === e(t).AWS ? (C(), G("div", {
|
|
1278
1289
|
key: `${e(t).AWS}-vault-config-fields`,
|
|
@@ -1280,7 +1291,7 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
1280
1291
|
}, [
|
|
1281
1292
|
d(H, {
|
|
1282
1293
|
modelValue: a[e(t).AWS].region,
|
|
1283
|
-
"onUpdate:modelValue":
|
|
1294
|
+
"onUpdate:modelValue": r[3] || (r[3] = (i) => a[e(t).AWS].region = i),
|
|
1284
1295
|
"data-testid": "vault-form-config-aws-region",
|
|
1285
1296
|
items: B,
|
|
1286
1297
|
label: e(o)("form.config.aws.fields.region.label"),
|
|
@@ -1290,90 +1301,90 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
1290
1301
|
required: "",
|
|
1291
1302
|
width: "100%"
|
|
1292
1303
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder", "readonly"]),
|
|
1293
|
-
d(
|
|
1304
|
+
d(V, {
|
|
1294
1305
|
modelValue: a[e(t).AWS].endpoint_url,
|
|
1295
|
-
"onUpdate:modelValue":
|
|
1306
|
+
"onUpdate:modelValue": r[4] || (r[4] = (i) => a[e(t).AWS].endpoint_url = i),
|
|
1296
1307
|
modelModifiers: { trim: !0 },
|
|
1297
1308
|
autocomplete: "off",
|
|
1298
1309
|
"data-testid": "vault-form-config-aws-endpoint_url",
|
|
1299
|
-
"is-readonly": u.isReadonly,
|
|
1300
1310
|
label: e(o)("form.config.aws.fields.endpoint_url.label"),
|
|
1301
1311
|
"label-attributes": {
|
|
1302
1312
|
info: e(o)("form.config.aws.fields.endpoint_url.tooltip"),
|
|
1303
1313
|
tooltipAttributes: { maxWidth: "400" }
|
|
1304
1314
|
},
|
|
1315
|
+
readonly: u.isReadonly,
|
|
1305
1316
|
type: "text"
|
|
1306
|
-
}, null, 8, ["modelValue", "
|
|
1307
|
-
d(
|
|
1317
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
1318
|
+
d(V, {
|
|
1308
1319
|
modelValue: a[e(t).AWS].assume_role_arn,
|
|
1309
|
-
"onUpdate:modelValue":
|
|
1320
|
+
"onUpdate:modelValue": r[5] || (r[5] = (i) => a[e(t).AWS].assume_role_arn = i),
|
|
1310
1321
|
modelModifiers: { trim: !0 },
|
|
1311
1322
|
autocomplete: "off",
|
|
1312
1323
|
"data-testid": "vault-form-config-aws-assume_role_arn",
|
|
1313
|
-
"is-readonly": u.isReadonly,
|
|
1314
1324
|
label: e(o)("form.config.aws.fields.assume_role_arn.label"),
|
|
1315
1325
|
"label-attributes": {
|
|
1316
1326
|
info: e(o)("form.config.aws.fields.assume_role_arn.tooltip"),
|
|
1317
1327
|
tooltipAttributes: { maxWidth: "400" }
|
|
1318
1328
|
},
|
|
1329
|
+
readonly: u.isReadonly,
|
|
1319
1330
|
type: "text"
|
|
1320
|
-
}, null, 8, ["modelValue", "
|
|
1321
|
-
d(
|
|
1331
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
1332
|
+
d(V, {
|
|
1322
1333
|
modelValue: a[e(t).AWS].role_session_name,
|
|
1323
|
-
"onUpdate:modelValue":
|
|
1334
|
+
"onUpdate:modelValue": r[6] || (r[6] = (i) => a[e(t).AWS].role_session_name = i),
|
|
1324
1335
|
modelModifiers: { trim: !0 },
|
|
1325
1336
|
autocomplete: "off",
|
|
1326
1337
|
"data-testid": "vault-form-config-aws-role_session_name",
|
|
1327
|
-
"is-readonly": u.isReadonly,
|
|
1328
1338
|
label: e(o)("form.config.aws.fields.role_session_name.label"),
|
|
1329
1339
|
"label-attributes": {
|
|
1330
1340
|
info: e(o)("form.config.aws.fields.role_session_name.tooltip"),
|
|
1331
1341
|
tooltipAttributes: { maxWidth: "400" }
|
|
1332
1342
|
},
|
|
1343
|
+
readonly: u.isReadonly,
|
|
1333
1344
|
required: "",
|
|
1334
1345
|
type: "text"
|
|
1335
|
-
}, null, 8, ["modelValue", "
|
|
1336
|
-
l.config.awsStsEndpointUrlAvailable ? (C(), W(
|
|
1346
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
1347
|
+
l.config.awsStsEndpointUrlAvailable ? (C(), W(V, {
|
|
1337
1348
|
key: 0,
|
|
1338
1349
|
modelValue: a[e(t).AWS].sts_endpoint_url,
|
|
1339
|
-
"onUpdate:modelValue":
|
|
1350
|
+
"onUpdate:modelValue": r[7] || (r[7] = (i) => a[e(t).AWS].sts_endpoint_url = i),
|
|
1340
1351
|
modelModifiers: { trim: !0 },
|
|
1341
1352
|
autocomplete: "off",
|
|
1342
1353
|
"data-testid": "vault-form-config-aws-sts_endpoint_url",
|
|
1343
|
-
"is-readonly": u.isReadonly,
|
|
1344
1354
|
label: e(o)("form.config.aws.fields.sts_endpoint_url.label"),
|
|
1345
1355
|
"label-attributes": {
|
|
1346
1356
|
info: e(o)("form.config.aws.fields.sts_endpoint_url.tooltip"),
|
|
1347
1357
|
tooltipAttributes: { maxWidth: "400" }
|
|
1348
1358
|
},
|
|
1359
|
+
readonly: u.isReadonly,
|
|
1349
1360
|
type: "text"
|
|
1350
|
-
}, null, 8, ["modelValue", "
|
|
1361
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) : z("", !0),
|
|
1351
1362
|
l.config.base64FieldAvailable ? (C(), W(se, {
|
|
1352
1363
|
key: 1,
|
|
1353
1364
|
modelValue: a[e(t).AWS].base64_decode,
|
|
1354
|
-
"onUpdate:modelValue":
|
|
1365
|
+
"onUpdate:modelValue": r[8] || (r[8] = (i) => a[e(t).AWS].base64_decode = i),
|
|
1355
1366
|
"data-testid": "vault-form-config-aws-base64_decode",
|
|
1356
|
-
"is-readonly": u.isReadonly,
|
|
1357
1367
|
label: e(o)("form.config.commonFields.base64_decode.label"),
|
|
1358
1368
|
"label-attributes": {
|
|
1359
1369
|
info: e(o)("form.config.commonFields.base64_decode.tooltip"),
|
|
1360
1370
|
tooltipAttributes: { maxWidth: "400" }
|
|
1361
|
-
}
|
|
1362
|
-
|
|
1371
|
+
},
|
|
1372
|
+
readonly: u.isReadonly
|
|
1373
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) : z("", !0)
|
|
1363
1374
|
])) : z("", !0),
|
|
1364
1375
|
f.value === e(t).GCP ? (C(), G("div", {
|
|
1365
1376
|
key: `${e(t).GCP}-vault-config-fields`,
|
|
1366
1377
|
class: "vault-form-config-fields-container"
|
|
1367
1378
|
}, [
|
|
1368
|
-
d(
|
|
1379
|
+
d(V, {
|
|
1369
1380
|
modelValue: a[e(t).GCP].project_id,
|
|
1370
|
-
"onUpdate:modelValue":
|
|
1381
|
+
"onUpdate:modelValue": r[9] || (r[9] = (i) => a[e(t).GCP].project_id = i),
|
|
1371
1382
|
modelModifiers: { trim: !0 },
|
|
1372
1383
|
autocomplete: "off",
|
|
1373
1384
|
"data-testid": "vault-form-config-gcp-project-id",
|
|
1374
|
-
"is-readonly": u.isReadonly,
|
|
1375
1385
|
label: e(o)("form.config.gcp.fields.project_id.label"),
|
|
1376
1386
|
placeholder: e(o)("form.config.gcp.fields.project_id.placeholder"),
|
|
1387
|
+
readonly: u.isReadonly,
|
|
1377
1388
|
required: "",
|
|
1378
1389
|
type: "text"
|
|
1379
1390
|
}, {
|
|
@@ -1389,19 +1400,19 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
1389
1400
|
})
|
|
1390
1401
|
]),
|
|
1391
1402
|
_: 1
|
|
1392
|
-
}, 8, ["modelValue", "
|
|
1403
|
+
}, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
1393
1404
|
l.config.base64FieldAvailable ? (C(), W(se, {
|
|
1394
1405
|
key: 0,
|
|
1395
1406
|
modelValue: a[e(t).GCP].base64_decode,
|
|
1396
|
-
"onUpdate:modelValue":
|
|
1407
|
+
"onUpdate:modelValue": r[10] || (r[10] = (i) => a[e(t).GCP].base64_decode = i),
|
|
1397
1408
|
"data-testid": "vault-form-config-gcp-base64_decode",
|
|
1398
|
-
"is-readonly": u.isReadonly,
|
|
1399
1409
|
label: e(o)("form.config.commonFields.base64_decode.label"),
|
|
1400
1410
|
"label-attributes": {
|
|
1401
1411
|
info: e(o)("form.config.commonFields.base64_decode.tooltip"),
|
|
1402
1412
|
tooltipAttributes: { maxWidth: "400" }
|
|
1403
|
-
}
|
|
1404
|
-
|
|
1413
|
+
},
|
|
1414
|
+
readonly: u.isReadonly
|
|
1415
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) : z("", !0)
|
|
1405
1416
|
])) : z("", !0),
|
|
1406
1417
|
f.value === e(t).HCV ? (C(), G("div", {
|
|
1407
1418
|
key: `${e(t).HCV}-vault-config-fields`,
|
|
@@ -1409,7 +1420,7 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
1409
1420
|
}, [
|
|
1410
1421
|
d(H, {
|
|
1411
1422
|
modelValue: a[e(t).HCV].protocol,
|
|
1412
|
-
"onUpdate:modelValue":
|
|
1423
|
+
"onUpdate:modelValue": r[11] || (r[11] = (i) => a[e(t).HCV].protocol = i),
|
|
1413
1424
|
"data-testid": "vault-form-config-hcv-protocol",
|
|
1414
1425
|
items: ee,
|
|
1415
1426
|
label: e(o)("form.config.hcv.fields.protocol.label"),
|
|
@@ -1417,42 +1428,42 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
1417
1428
|
required: "",
|
|
1418
1429
|
width: "100%"
|
|
1419
1430
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1420
|
-
d(
|
|
1431
|
+
d(V, {
|
|
1421
1432
|
modelValue: a[e(t).HCV].host,
|
|
1422
|
-
"onUpdate:modelValue":
|
|
1433
|
+
"onUpdate:modelValue": r[12] || (r[12] = (i) => a[e(t).HCV].host = i),
|
|
1423
1434
|
modelModifiers: { trim: !0 },
|
|
1424
1435
|
autocomplete: "off",
|
|
1425
1436
|
"data-testid": "vault-form-config-hcv-host",
|
|
1426
|
-
"is-readonly": u.isReadonly,
|
|
1427
1437
|
label: e(o)("form.config.hcv.fields.host.label"),
|
|
1438
|
+
readonly: u.isReadonly,
|
|
1428
1439
|
required: "",
|
|
1429
1440
|
type: "text"
|
|
1430
|
-
}, null, 8, ["modelValue", "
|
|
1431
|
-
d(
|
|
1441
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1442
|
+
d(V, {
|
|
1432
1443
|
modelValue: a[e(t).HCV].port,
|
|
1433
|
-
"onUpdate:modelValue":
|
|
1444
|
+
"onUpdate:modelValue": r[13] || (r[13] = (i) => a[e(t).HCV].port = i),
|
|
1434
1445
|
autocomplete: "off",
|
|
1435
1446
|
"data-testid": "vault-form-config-hcv-port",
|
|
1436
|
-
"is-readonly": u.isReadonly,
|
|
1437
1447
|
label: e(o)("form.config.hcv.fields.port.label"),
|
|
1438
1448
|
min: "0",
|
|
1449
|
+
readonly: u.isReadonly,
|
|
1439
1450
|
required: "",
|
|
1440
1451
|
type: "number"
|
|
1441
|
-
}, null, 8, ["modelValue", "
|
|
1442
|
-
d(
|
|
1452
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1453
|
+
d(V, {
|
|
1443
1454
|
modelValue: a[e(t).HCV].mount,
|
|
1444
|
-
"onUpdate:modelValue":
|
|
1455
|
+
"onUpdate:modelValue": r[14] || (r[14] = (i) => a[e(t).HCV].mount = i),
|
|
1445
1456
|
modelModifiers: { trim: !0 },
|
|
1446
1457
|
autocomplete: "off",
|
|
1447
1458
|
"data-testid": "vault-form-config-hcv-mount",
|
|
1448
|
-
"is-readonly": u.isReadonly,
|
|
1449
1459
|
label: e(o)("form.config.hcv.fields.mount.label"),
|
|
1460
|
+
readonly: u.isReadonly,
|
|
1450
1461
|
required: "",
|
|
1451
1462
|
type: "text"
|
|
1452
|
-
}, null, 8, ["modelValue", "
|
|
1463
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1453
1464
|
d(H, {
|
|
1454
1465
|
modelValue: a[e(t).HCV].kv,
|
|
1455
|
-
"onUpdate:modelValue":
|
|
1466
|
+
"onUpdate:modelValue": r[15] || (r[15] = (i) => a[e(t).HCV].kv = i),
|
|
1456
1467
|
"data-testid": "vault-form-config-hcv-kv",
|
|
1457
1468
|
items: g,
|
|
1458
1469
|
label: e(o)("form.config.hcv.fields.kv.label"),
|
|
@@ -1460,19 +1471,19 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
1460
1471
|
required: "",
|
|
1461
1472
|
width: "100%"
|
|
1462
1473
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1463
|
-
d(
|
|
1474
|
+
d(V, {
|
|
1464
1475
|
modelValue: a[e(t).HCV].namespace,
|
|
1465
|
-
"onUpdate:modelValue":
|
|
1476
|
+
"onUpdate:modelValue": r[16] || (r[16] = (i) => a[e(t).HCV].namespace = i),
|
|
1466
1477
|
modelModifiers: { trim: !0 },
|
|
1467
1478
|
autocomplete: "off",
|
|
1468
1479
|
"data-testid": "vault-form-config-hcv-namespace",
|
|
1469
|
-
"is-readonly": u.isReadonly,
|
|
1470
1480
|
label: e(o)("form.config.hcv.fields.namespace.label"),
|
|
1481
|
+
readonly: u.isReadonly,
|
|
1471
1482
|
type: "text"
|
|
1472
|
-
}, null, 8, ["modelValue", "
|
|
1483
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1473
1484
|
d(H, {
|
|
1474
1485
|
modelValue: a[e(t).HCV].auth_method,
|
|
1475
|
-
"onUpdate:modelValue":
|
|
1486
|
+
"onUpdate:modelValue": r[17] || (r[17] = (i) => a[e(t).HCV].auth_method = i),
|
|
1476
1487
|
"data-testid": "vault-form-config-hcv-auth_method",
|
|
1477
1488
|
items: [
|
|
1478
1489
|
{ label: e(D).TOKEN, value: e(D).TOKEN },
|
|
@@ -1484,96 +1495,96 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
1484
1495
|
required: "",
|
|
1485
1496
|
width: "100%"
|
|
1486
1497
|
}, null, 8, ["modelValue", "items", "label", "readonly"]),
|
|
1487
|
-
a[e(t).HCV].auth_method === e(D).TOKEN ? (C(), G("div",
|
|
1488
|
-
d(
|
|
1498
|
+
a[e(t).HCV].auth_method === e(D).TOKEN ? (C(), G("div", Wt, [
|
|
1499
|
+
d(V, {
|
|
1489
1500
|
modelValue: a[e(t).HCV].token,
|
|
1490
|
-
"onUpdate:modelValue":
|
|
1501
|
+
"onUpdate:modelValue": r[18] || (r[18] = (i) => a[e(t).HCV].token = i),
|
|
1491
1502
|
modelModifiers: { trim: !0 },
|
|
1492
1503
|
autocomplete: "off",
|
|
1493
1504
|
"data-testid": "vault-form-config-hcv-token",
|
|
1494
|
-
"is-readonly": u.isReadonly,
|
|
1495
1505
|
label: e(o)("form.config.hcv.fields.token.label"),
|
|
1506
|
+
readonly: u.isReadonly,
|
|
1496
1507
|
required: "",
|
|
1497
1508
|
type: "text"
|
|
1498
|
-
}, null, 8, ["modelValue", "
|
|
1499
|
-
])) : a[e(t).HCV].auth_method === e(D).K8S ? (C(), G("div",
|
|
1500
|
-
d(
|
|
1509
|
+
}, null, 8, ["modelValue", "label", "readonly"])
|
|
1510
|
+
])) : a[e(t).HCV].auth_method === e(D).K8S ? (C(), G("div", jt, [
|
|
1511
|
+
d(V, {
|
|
1501
1512
|
modelValue: a[e(t).HCV].kube_role,
|
|
1502
|
-
"onUpdate:modelValue":
|
|
1513
|
+
"onUpdate:modelValue": r[19] || (r[19] = (i) => a[e(t).HCV].kube_role = i),
|
|
1503
1514
|
modelModifiers: { trim: !0 },
|
|
1504
1515
|
autocomplete: "off",
|
|
1505
1516
|
"data-testid": "vault-form-config-hcv-kube_role",
|
|
1506
|
-
"is-readonly": u.isReadonly,
|
|
1507
1517
|
label: e(o)("form.config.hcv.fields.kube_role.label"),
|
|
1518
|
+
readonly: u.isReadonly,
|
|
1508
1519
|
required: "",
|
|
1509
1520
|
type: "text"
|
|
1510
|
-
}, null, 8, ["modelValue", "
|
|
1511
|
-
d(
|
|
1521
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1522
|
+
d(V, {
|
|
1512
1523
|
modelValue: a[e(t).HCV].kube_auth_path,
|
|
1513
|
-
"onUpdate:modelValue":
|
|
1524
|
+
"onUpdate:modelValue": r[20] || (r[20] = (i) => a[e(t).HCV].kube_auth_path = i),
|
|
1514
1525
|
modelModifiers: { trim: !0 },
|
|
1515
1526
|
autocomplete: "off",
|
|
1516
1527
|
"data-testid": "vault-form-config-hcv-kube_auth_path",
|
|
1517
|
-
"is-readonly": u.isReadonly,
|
|
1518
1528
|
label: e(o)("form.config.hcv.fields.kube_auth_path.label"),
|
|
1529
|
+
readonly: u.isReadonly,
|
|
1519
1530
|
type: "text"
|
|
1520
|
-
}, null, 8, ["modelValue", "
|
|
1521
|
-
d(
|
|
1531
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1532
|
+
d(V, {
|
|
1522
1533
|
modelValue: a[e(t).HCV].kube_api_token_file,
|
|
1523
|
-
"onUpdate:modelValue":
|
|
1534
|
+
"onUpdate:modelValue": r[21] || (r[21] = (i) => a[e(t).HCV].kube_api_token_file = i),
|
|
1524
1535
|
modelModifiers: { trim: !0 },
|
|
1525
1536
|
autocomplete: "off",
|
|
1526
1537
|
"data-testid": "vault-form-config-hcv-kube_api_token_file",
|
|
1527
|
-
"is-readonly": u.isReadonly,
|
|
1528
1538
|
label: e(o)("form.config.hcv.fields.kube_api_token_file.label"),
|
|
1539
|
+
readonly: u.isReadonly,
|
|
1529
1540
|
required: "",
|
|
1530
1541
|
type: "text"
|
|
1531
|
-
}, null, 8, ["modelValue", "
|
|
1532
|
-
])) : a[e(t).HCV].auth_method === e(D).APP_ROLE ? (C(), G("div",
|
|
1533
|
-
d(
|
|
1542
|
+
}, null, 8, ["modelValue", "label", "readonly"])
|
|
1543
|
+
])) : a[e(t).HCV].auth_method === e(D).APP_ROLE ? (C(), G("div", Bt, [
|
|
1544
|
+
d(V, {
|
|
1534
1545
|
modelValue: a[e(t).HCV].approle_auth_path,
|
|
1535
|
-
"onUpdate:modelValue":
|
|
1546
|
+
"onUpdate:modelValue": r[22] || (r[22] = (i) => a[e(t).HCV].approle_auth_path = i),
|
|
1536
1547
|
modelModifiers: { trim: !0 },
|
|
1537
1548
|
autocomplete: "off",
|
|
1538
1549
|
"data-testid": "vault-form-config-hcv-approle_auth_path",
|
|
1539
|
-
"is-readonly": u.isReadonly,
|
|
1540
1550
|
label: e(o)("form.config.hcv.fields.approle_auth_path.label"),
|
|
1551
|
+
readonly: u.isReadonly,
|
|
1541
1552
|
type: "text"
|
|
1542
|
-
}, null, 8, ["modelValue", "
|
|
1543
|
-
d(
|
|
1553
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1554
|
+
d(V, {
|
|
1544
1555
|
modelValue: a[e(t).HCV].approle_role_id,
|
|
1545
|
-
"onUpdate:modelValue":
|
|
1556
|
+
"onUpdate:modelValue": r[23] || (r[23] = (i) => a[e(t).HCV].approle_role_id = i),
|
|
1546
1557
|
modelModifiers: { trim: !0 },
|
|
1547
1558
|
autocomplete: "off",
|
|
1548
1559
|
"data-testid": "vault-form-config-hcv-approle_role_id",
|
|
1549
|
-
"is-readonly": u.isReadonly,
|
|
1550
1560
|
label: e(o)("form.config.hcv.fields.approle_role_id.label"),
|
|
1561
|
+
readonly: u.isReadonly,
|
|
1551
1562
|
required: "",
|
|
1552
1563
|
type: "text"
|
|
1553
|
-
}, null, 8, ["modelValue", "
|
|
1554
|
-
d(
|
|
1564
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1565
|
+
d(V, {
|
|
1555
1566
|
modelValue: a[e(t).HCV].approle_secret_id,
|
|
1556
|
-
"onUpdate:modelValue":
|
|
1567
|
+
"onUpdate:modelValue": r[24] || (r[24] = (i) => a[e(t).HCV].approle_secret_id = i),
|
|
1557
1568
|
modelModifiers: { trim: !0 },
|
|
1558
1569
|
autocomplete: "off",
|
|
1559
1570
|
"data-testid": "vault-form-config-hcv-approle_secret_id",
|
|
1560
|
-
"is-readonly": u.isReadonly,
|
|
1561
1571
|
label: e(o)("form.config.hcv.fields.approle_secret_id.label"),
|
|
1572
|
+
readonly: u.isReadonly,
|
|
1562
1573
|
type: "text"
|
|
1563
|
-
}, null, 8, ["modelValue", "
|
|
1564
|
-
d(
|
|
1574
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1575
|
+
d(V, {
|
|
1565
1576
|
modelValue: a[e(t).HCV].approle_secret_id_file,
|
|
1566
|
-
"onUpdate:modelValue":
|
|
1577
|
+
"onUpdate:modelValue": r[25] || (r[25] = (i) => a[e(t).HCV].approle_secret_id_file = i),
|
|
1567
1578
|
modelModifiers: { trim: !0 },
|
|
1568
1579
|
autocomplete: "off",
|
|
1569
1580
|
"data-testid": "vault-form-config-hcv-approle_secret_id_file",
|
|
1570
|
-
"is-readonly": u.isReadonly,
|
|
1571
1581
|
label: e(o)("form.config.hcv.fields.approle_secret_id_file.label"),
|
|
1582
|
+
readonly: u.isReadonly,
|
|
1572
1583
|
type: "text"
|
|
1573
|
-
}, null, 8, ["modelValue", "
|
|
1584
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1574
1585
|
d(se, {
|
|
1575
1586
|
modelValue: a[e(t).HCV].approle_response_wrapping,
|
|
1576
|
-
"onUpdate:modelValue":
|
|
1587
|
+
"onUpdate:modelValue": r[26] || (r[26] = (i) => a[e(t).HCV].approle_response_wrapping = i),
|
|
1577
1588
|
"data-testid": "vault-form-config-hcv-approle_response_wrapping",
|
|
1578
1589
|
label: e(o)("form.config.hcv.fields.approle_response_wrapping.label")
|
|
1579
1590
|
}, null, 8, ["modelValue", "label"])
|
|
@@ -1581,56 +1592,56 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
1581
1592
|
l.config.base64FieldAvailable ? (C(), W(se, {
|
|
1582
1593
|
key: 3,
|
|
1583
1594
|
modelValue: a[e(t).HCV].base64_decode,
|
|
1584
|
-
"onUpdate:modelValue":
|
|
1595
|
+
"onUpdate:modelValue": r[27] || (r[27] = (i) => a[e(t).HCV].base64_decode = i),
|
|
1585
1596
|
"data-testid": "vault-form-config-hcv-base64_decode",
|
|
1586
|
-
"is-readonly": u.isReadonly,
|
|
1587
1597
|
label: e(o)("form.config.commonFields.base64_decode.label"),
|
|
1588
1598
|
"label-attributes": {
|
|
1589
1599
|
info: e(o)("form.config.commonFields.base64_decode.tooltip"),
|
|
1590
1600
|
tooltipAttributes: { maxWidth: "400" }
|
|
1591
|
-
}
|
|
1592
|
-
|
|
1601
|
+
},
|
|
1602
|
+
readonly: u.isReadonly
|
|
1603
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) : z("", !0)
|
|
1593
1604
|
])) : z("", !0),
|
|
1594
1605
|
f.value === e(t).AZURE ? (C(), G("div", {
|
|
1595
1606
|
key: `${e(t).AZURE}-vault-config-fields`,
|
|
1596
1607
|
class: "vault-form-config-fields-container"
|
|
1597
1608
|
}, [
|
|
1598
|
-
d(
|
|
1609
|
+
d(V, {
|
|
1599
1610
|
modelValue: a[e(t).AZURE].location,
|
|
1600
|
-
"onUpdate:modelValue":
|
|
1611
|
+
"onUpdate:modelValue": r[28] || (r[28] = (i) => a[e(t).AZURE].location = i),
|
|
1601
1612
|
modelModifiers: { trim: !0 },
|
|
1602
1613
|
autocomplete: "off",
|
|
1603
1614
|
"data-testid": "vault-form-config-azure-location",
|
|
1604
|
-
"is-readonly": u.isReadonly,
|
|
1605
1615
|
label: e(o)("form.config.azure.fields.location.label"),
|
|
1616
|
+
readonly: u.isReadonly,
|
|
1606
1617
|
required: "",
|
|
1607
1618
|
type: "text"
|
|
1608
|
-
}, null, 8, ["modelValue", "
|
|
1609
|
-
d(
|
|
1619
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1620
|
+
d(V, {
|
|
1610
1621
|
modelValue: a[e(t).AZURE].vault_uri,
|
|
1611
|
-
"onUpdate:modelValue":
|
|
1622
|
+
"onUpdate:modelValue": r[29] || (r[29] = (i) => a[e(t).AZURE].vault_uri = i),
|
|
1612
1623
|
modelModifiers: { trim: !0 },
|
|
1613
1624
|
autocomplete: "off",
|
|
1614
1625
|
"data-testid": "vault-form-config-azure-uri",
|
|
1615
|
-
"is-readonly": u.isReadonly,
|
|
1616
1626
|
label: e(o)("form.config.azure.fields.vault_uri.label"),
|
|
1627
|
+
readonly: u.isReadonly,
|
|
1617
1628
|
required: "",
|
|
1618
1629
|
type: "text"
|
|
1619
|
-
}, null, 8, ["modelValue", "
|
|
1620
|
-
d(
|
|
1630
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1631
|
+
d(V, {
|
|
1621
1632
|
modelValue: a[e(t).AZURE].credentials_prefix,
|
|
1622
|
-
"onUpdate:modelValue":
|
|
1633
|
+
"onUpdate:modelValue": r[30] || (r[30] = (i) => a[e(t).AZURE].credentials_prefix = i),
|
|
1623
1634
|
modelModifiers: { trim: !0 },
|
|
1624
1635
|
autocomplete: "off",
|
|
1625
1636
|
"data-testid": "vault-form-config-azure-prefix",
|
|
1626
|
-
"is-readonly": u.isReadonly,
|
|
1627
1637
|
label: e(o)("form.config.azure.fields.credential_prefix.label"),
|
|
1638
|
+
readonly: u.isReadonly,
|
|
1628
1639
|
required: "",
|
|
1629
1640
|
type: "text"
|
|
1630
|
-
}, null, 8, ["modelValue", "
|
|
1641
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1631
1642
|
d(H, {
|
|
1632
1643
|
modelValue: a[e(t).AZURE].type,
|
|
1633
|
-
"onUpdate:modelValue":
|
|
1644
|
+
"onUpdate:modelValue": r[31] || (r[31] = (i) => a[e(t).AZURE].type = i),
|
|
1634
1645
|
"data-testid": "vault-form-config-azure-type",
|
|
1635
1646
|
items: X,
|
|
1636
1647
|
label: e(o)("form.config.azure.fields.type.label"),
|
|
@@ -1639,75 +1650,90 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
1639
1650
|
required: "",
|
|
1640
1651
|
width: "100%"
|
|
1641
1652
|
}, null, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
1642
|
-
d(
|
|
1653
|
+
d(V, {
|
|
1643
1654
|
modelValue: a[e(t).AZURE].client_id,
|
|
1644
|
-
"onUpdate:modelValue":
|
|
1655
|
+
"onUpdate:modelValue": r[32] || (r[32] = (i) => a[e(t).AZURE].client_id = i),
|
|
1645
1656
|
modelModifiers: { trim: !0 },
|
|
1646
1657
|
autocomplete: "off",
|
|
1647
1658
|
"data-testid": "vault-form-config-azure-client-id",
|
|
1648
|
-
"is-readonly": u.isReadonly,
|
|
1649
1659
|
label: e(o)("form.config.azure.fields.client_id.label"),
|
|
1660
|
+
readonly: u.isReadonly,
|
|
1650
1661
|
type: "text"
|
|
1651
|
-
}, null, 8, ["modelValue", "
|
|
1652
|
-
d(
|
|
1662
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1663
|
+
d(V, {
|
|
1653
1664
|
modelValue: a[e(t).AZURE].tenant_id,
|
|
1654
|
-
"onUpdate:modelValue":
|
|
1665
|
+
"onUpdate:modelValue": r[33] || (r[33] = (i) => a[e(t).AZURE].tenant_id = i),
|
|
1655
1666
|
modelModifiers: { trim: !0 },
|
|
1656
1667
|
autocomplete: "off",
|
|
1657
1668
|
"data-testid": "vault-form-config-azure-tenant-id",
|
|
1658
|
-
"is-readonly": u.isReadonly,
|
|
1659
1669
|
label: e(o)("form.config.azure.fields.tenant_id.label"),
|
|
1670
|
+
readonly: u.isReadonly,
|
|
1660
1671
|
type: "text"
|
|
1661
|
-
}, null, 8, ["modelValue", "
|
|
1672
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1662
1673
|
l.config.base64FieldAvailable ? (C(), W(se, {
|
|
1663
1674
|
key: 0,
|
|
1664
1675
|
modelValue: a[e(t).AZURE].base64_decode,
|
|
1665
|
-
"onUpdate:modelValue":
|
|
1676
|
+
"onUpdate:modelValue": r[34] || (r[34] = (i) => a[e(t).AZURE].base64_decode = i),
|
|
1666
1677
|
"data-testid": "vault-form-config-azure-base64_decode",
|
|
1667
|
-
"is-readonly": u.isReadonly,
|
|
1668
1678
|
label: e(o)("form.config.commonFields.base64_decode.label"),
|
|
1669
1679
|
"label-attributes": {
|
|
1670
1680
|
info: e(o)("form.config.commonFields.base64_decode.tooltip"),
|
|
1671
1681
|
tooltipAttributes: { maxWidth: "400" }
|
|
1672
|
-
}
|
|
1673
|
-
|
|
1682
|
+
},
|
|
1683
|
+
readonly: u.isReadonly
|
|
1684
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) : z("", !0)
|
|
1674
1685
|
])) : z("", !0),
|
|
1675
1686
|
f.value === e(t).CONJUR ? (C(), G("div", {
|
|
1676
1687
|
key: `${e(t).CONJUR}-vault-config-fields`,
|
|
1677
1688
|
class: "vault-form-config-fields-container"
|
|
1678
1689
|
}, [
|
|
1679
|
-
d(
|
|
1690
|
+
d(V, {
|
|
1680
1691
|
modelValue: a[e(t).CONJUR].endpoint_url,
|
|
1681
|
-
"onUpdate:modelValue":
|
|
1692
|
+
"onUpdate:modelValue": r[35] || (r[35] = (i) => a[e(t).CONJUR].endpoint_url = i),
|
|
1682
1693
|
modelModifiers: { trim: !0 },
|
|
1683
1694
|
autocomplete: "off",
|
|
1684
1695
|
"data-testid": "vault-form-config-conjur-endpoint_url",
|
|
1685
|
-
"is-readonly": u.isReadonly,
|
|
1686
1696
|
label: e(o)("form.config.conjur.fields.endpoint_url.label"),
|
|
1697
|
+
readonly: u.isReadonly,
|
|
1698
|
+
required: "",
|
|
1687
1699
|
type: "text"
|
|
1688
|
-
}, null, 8, ["modelValue", "
|
|
1689
|
-
d(
|
|
1700
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1701
|
+
d(V, {
|
|
1690
1702
|
modelValue: a[e(t).CONJUR].login,
|
|
1691
|
-
"onUpdate:modelValue":
|
|
1703
|
+
"onUpdate:modelValue": r[36] || (r[36] = (i) => a[e(t).CONJUR].login = i),
|
|
1692
1704
|
modelModifiers: { trim: !0 },
|
|
1693
1705
|
autocomplete: "off",
|
|
1694
1706
|
"data-testid": "vault-form-config-conjur-login",
|
|
1695
|
-
"is-readonly": u.isReadonly,
|
|
1696
1707
|
label: e(o)("form.config.conjur.fields.login.label"),
|
|
1708
|
+
readonly: u.isReadonly,
|
|
1709
|
+
required: "",
|
|
1697
1710
|
type: "text"
|
|
1698
|
-
}, null, 8, ["modelValue", "
|
|
1699
|
-
d(
|
|
1700
|
-
modelValue: a[e(t).CONJUR].
|
|
1701
|
-
"onUpdate:modelValue":
|
|
1711
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1712
|
+
d(V, {
|
|
1713
|
+
modelValue: a[e(t).CONJUR].account,
|
|
1714
|
+
"onUpdate:modelValue": r[37] || (r[37] = (i) => a[e(t).CONJUR].account = i),
|
|
1702
1715
|
modelModifiers: { trim: !0 },
|
|
1703
1716
|
autocomplete: "off",
|
|
1704
|
-
"data-testid": "vault-form-config-conjur-
|
|
1705
|
-
|
|
1706
|
-
|
|
1717
|
+
"data-testid": "vault-form-config-conjur-account",
|
|
1718
|
+
label: e(o)("form.config.conjur.fields.account.label"),
|
|
1719
|
+
readonly: u.isReadonly,
|
|
1720
|
+
required: "",
|
|
1707
1721
|
type: "text"
|
|
1708
|
-
}, null, 8, ["modelValue", "
|
|
1722
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1723
|
+
d(V, {
|
|
1724
|
+
modelValue: a[e(t).CONJUR].api_key,
|
|
1725
|
+
"onUpdate:modelValue": r[38] || (r[38] = (i) => a[e(t).CONJUR].api_key = i),
|
|
1726
|
+
modelModifiers: { trim: !0 },
|
|
1727
|
+
autocomplete: "off",
|
|
1728
|
+
"data-testid": "vault-form-config-conjur-api_key",
|
|
1729
|
+
label: e(o)("form.config.conjur.fields.api_key.label"),
|
|
1730
|
+
readonly: u.isReadonly,
|
|
1731
|
+
required: "",
|
|
1732
|
+
"show-password-mask-toggle": "",
|
|
1733
|
+
type: "password"
|
|
1734
|
+
}, null, 8, ["modelValue", "label", "readonly"])
|
|
1709
1735
|
])) : z("", !0),
|
|
1710
|
-
l.config.ttl ? (C(), G("div",
|
|
1736
|
+
l.config.ttl ? (C(), G("div", Lt, [
|
|
1711
1737
|
ae.value ? (C(), W(pe, {
|
|
1712
1738
|
key: 0,
|
|
1713
1739
|
class: "advanced-fields-collapse",
|
|
@@ -1716,11 +1742,11 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
1716
1742
|
"trigger-label": e(o)("form.config.advancedFields.title")
|
|
1717
1743
|
}, {
|
|
1718
1744
|
default: v(() => [
|
|
1719
|
-
E("div",
|
|
1720
|
-
E("div",
|
|
1721
|
-
d(
|
|
1745
|
+
E("div", zt, [
|
|
1746
|
+
E("div", Gt, [
|
|
1747
|
+
d(V, {
|
|
1722
1748
|
modelValue: a[f.value].ttl,
|
|
1723
|
-
"onUpdate:modelValue":
|
|
1749
|
+
"onUpdate:modelValue": r[39] || (r[39] = (i) => a[f.value].ttl = i),
|
|
1724
1750
|
"data-testid": "vault-ttl-input",
|
|
1725
1751
|
label: e(o)("form.config.advancedFields.ttl"),
|
|
1726
1752
|
"label-attributes": {
|
|
@@ -1730,10 +1756,10 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
1730
1756
|
type: "number"
|
|
1731
1757
|
}, null, 8, ["modelValue", "label", "label-attributes"])
|
|
1732
1758
|
]),
|
|
1733
|
-
E("div",
|
|
1734
|
-
d(
|
|
1759
|
+
E("div", Zt, [
|
|
1760
|
+
d(V, {
|
|
1735
1761
|
modelValue: a[f.value].neg_ttl,
|
|
1736
|
-
"onUpdate:modelValue":
|
|
1762
|
+
"onUpdate:modelValue": r[40] || (r[40] = (i) => a[f.value].neg_ttl = i),
|
|
1737
1763
|
"data-testid": "vault-neg-ttl-input",
|
|
1738
1764
|
label: e(o)("form.config.advancedFields.negTtl"),
|
|
1739
1765
|
"label-attributes": {
|
|
@@ -1744,11 +1770,11 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
1744
1770
|
}, null, 8, ["modelValue", "label", "label-attributes"])
|
|
1745
1771
|
])
|
|
1746
1772
|
]),
|
|
1747
|
-
E("div",
|
|
1748
|
-
E("div",
|
|
1749
|
-
d(
|
|
1773
|
+
E("div", Jt, [
|
|
1774
|
+
E("div", Qt, [
|
|
1775
|
+
d(V, {
|
|
1750
1776
|
modelValue: a[f.value].resurrect_ttl,
|
|
1751
|
-
"onUpdate:modelValue":
|
|
1777
|
+
"onUpdate:modelValue": r[41] || (r[41] = (i) => a[f.value].resurrect_ttl = i),
|
|
1752
1778
|
"data-testid": "vault-resurrect-ttl-input",
|
|
1753
1779
|
label: e(o)("form.config.advancedFields.resurrectTtl"),
|
|
1754
1780
|
"label-attributes": {
|
|
@@ -1774,26 +1800,26 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
1774
1800
|
title: e(o)("form.sections.general.title")
|
|
1775
1801
|
}, {
|
|
1776
1802
|
default: v(() => [
|
|
1777
|
-
d(
|
|
1803
|
+
d(V, {
|
|
1778
1804
|
modelValue: u.fields.prefix,
|
|
1779
|
-
"onUpdate:modelValue":
|
|
1805
|
+
"onUpdate:modelValue": r[42] || (r[42] = (i) => u.fields.prefix = i),
|
|
1780
1806
|
modelModifiers: { trim: !0 },
|
|
1781
1807
|
autocomplete: "off",
|
|
1782
1808
|
"data-testid": "vault-form-prefix",
|
|
1783
1809
|
help: e(o)("form.fields.prefix.help"),
|
|
1784
|
-
"is-readonly": u.isReadonly,
|
|
1785
1810
|
label: e(o)("form.fields.prefix.label"),
|
|
1786
1811
|
"label-attributes": {
|
|
1787
1812
|
info: e(o)("form.fields.prefix.tooltip"),
|
|
1788
1813
|
tooltipAttributes: { maxWidth: "400" }
|
|
1789
1814
|
},
|
|
1790
1815
|
placeholder: e(o)("form.fields.prefix.placeholder"),
|
|
1816
|
+
readonly: u.isReadonly,
|
|
1791
1817
|
required: "",
|
|
1792
1818
|
type: "text"
|
|
1793
|
-
}, null, 8, ["modelValue", "help", "
|
|
1819
|
+
}, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"]),
|
|
1794
1820
|
d(me, {
|
|
1795
1821
|
modelValue: u.fields.description,
|
|
1796
|
-
"onUpdate:modelValue":
|
|
1822
|
+
"onUpdate:modelValue": r[43] || (r[43] = (i) => u.fields.description = i),
|
|
1797
1823
|
modelModifiers: { trim: !0 },
|
|
1798
1824
|
"character-limit": 1e3,
|
|
1799
1825
|
class: "vault-form-textarea",
|
|
@@ -1802,18 +1828,18 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
1802
1828
|
placeholder: e(o)("form.fields.description.placeholder"),
|
|
1803
1829
|
readonly: u.isReadonly
|
|
1804
1830
|
}, null, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
1805
|
-
d(
|
|
1831
|
+
d(V, {
|
|
1806
1832
|
modelValue: u.fields.tags,
|
|
1807
|
-
"onUpdate:modelValue":
|
|
1833
|
+
"onUpdate:modelValue": r[44] || (r[44] = (i) => u.fields.tags = i),
|
|
1808
1834
|
modelModifiers: { trim: !0 },
|
|
1809
1835
|
autocomplete: "off",
|
|
1810
1836
|
"data-testid": "vault-form-tags",
|
|
1811
1837
|
help: e(o)("form.fields.tags.help"),
|
|
1812
|
-
"is-readonly": u.isReadonly,
|
|
1813
1838
|
label: e(o)("form.fields.tags.label"),
|
|
1814
1839
|
placeholder: e(o)("form.fields.tags.placeholder"),
|
|
1840
|
+
readonly: u.isReadonly,
|
|
1815
1841
|
type: "text"
|
|
1816
|
-
}, null, 8, ["modelValue", "help", "
|
|
1842
|
+
}, null, 8, ["modelValue", "help", "label", "placeholder", "readonly"])
|
|
1817
1843
|
]),
|
|
1818
1844
|
_: 1
|
|
1819
1845
|
}, 8, ["description", "title"])
|
|
@@ -1823,7 +1849,7 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
1823
1849
|
]);
|
|
1824
1850
|
};
|
|
1825
1851
|
}
|
|
1826
|
-
}),
|
|
1852
|
+
}), El = /* @__PURE__ */ fe(Xt, [["__scopeId", "data-v-e4d00b01"]]), Yt = { class: "kong-ui-vault-entity-config-card" }, Rl = /* @__PURE__ */ ce({
|
|
1827
1853
|
__name: "VaultConfigCard",
|
|
1828
1854
|
props: {
|
|
1829
1855
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -1873,11 +1899,11 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
1873
1899
|
},
|
|
1874
1900
|
config: {
|
|
1875
1901
|
order: 8,
|
|
1876
|
-
type:
|
|
1902
|
+
type: pt.Json
|
|
1877
1903
|
}
|
|
1878
1904
|
});
|
|
1879
|
-
return (o, x) => (C(), G("div",
|
|
1880
|
-
d(e(
|
|
1905
|
+
return (o, x) => (C(), G("div", Yt, [
|
|
1906
|
+
d(e(mt), {
|
|
1881
1907
|
config: l.config,
|
|
1882
1908
|
"config-card-doc": l.configCardDoc,
|
|
1883
1909
|
"config-schema": p.value,
|
|
@@ -1903,7 +1929,7 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
1903
1929
|
edit: `${Ce}/config-stores/{id}/secrets/{secretId}`
|
|
1904
1930
|
}
|
|
1905
1931
|
}
|
|
1906
|
-
},
|
|
1932
|
+
}, el = { class: "table-content-overflow-wrapper" }, tl = /* @__PURE__ */ ce({
|
|
1907
1933
|
inheritAttrs: !1,
|
|
1908
1934
|
__name: "SecretListInner",
|
|
1909
1935
|
props: {
|
|
@@ -1951,7 +1977,7 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
1951
1977
|
updated_at: { label: p("secrets.list.table_headers.updated_at"), sortable: !1 }
|
|
1952
1978
|
}, u = (U) => ({
|
|
1953
1979
|
"data-testid": U.key
|
|
1954
|
-
}),
|
|
1980
|
+
}), k = S(() => {
|
|
1955
1981
|
var U;
|
|
1956
1982
|
return `${s.config.apiBaseUrl}${be.list[s.config.app]}`.replace(/{controlPlaneId}/gi, ((U = s.config) == null ? void 0 : U.controlPlaneId) || "").replace(/{id}/gi, s.configStoreId || "");
|
|
1957
1983
|
}), f = K(""), j = {
|
|
@@ -1960,22 +1986,22 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
1960
1986
|
}, {
|
|
1961
1987
|
fetcher: Y,
|
|
1962
1988
|
fetcherState: ae,
|
|
1963
|
-
fetcherCacheKey:
|
|
1964
|
-
} =
|
|
1989
|
+
fetcherCacheKey: F
|
|
1990
|
+
} = De(S(() => ({ ...s.config, cacheIdentifier: s.cacheIdentifier })), k), O = () => {
|
|
1965
1991
|
f.value = "";
|
|
1966
|
-
}, a = K(null),
|
|
1992
|
+
}, a = K(null), re = (U) => ({
|
|
1967
1993
|
label: p("actions.edit"),
|
|
1968
1994
|
to: s.config.getEditRoute(U)
|
|
1969
|
-
}), B = K(void 0), X = K(!1), ee = K(!1), g = K(""),
|
|
1995
|
+
}), B = K(void 0), X = K(!1), ee = K(!1), g = K(""), N = We(s.config, k.value), oe = (U) => {
|
|
1970
1996
|
B.value = U, X.value = !0;
|
|
1971
|
-
},
|
|
1997
|
+
}, ie = () => {
|
|
1972
1998
|
X.value = !1;
|
|
1973
1999
|
}, te = async () => {
|
|
1974
2000
|
var U, L, Q;
|
|
1975
2001
|
if ((U = B.value) != null && U.key) {
|
|
1976
2002
|
ee.value = !0;
|
|
1977
2003
|
try {
|
|
1978
|
-
await x.delete(
|
|
2004
|
+
await x.delete(N(B.value.key)), ee.value = !1, X.value = !1, F.value++, c("delete:success", B.value);
|
|
1979
2005
|
} catch (b) {
|
|
1980
2006
|
g.value = ((Q = (L = b.response) == null ? void 0 : L.data) == null ? void 0 : Q.message) || b.message || p("errors.delete"), c("error", b);
|
|
1981
2007
|
} finally {
|
|
@@ -1985,7 +2011,7 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
1985
2011
|
};
|
|
1986
2012
|
ke(ae, (U) => {
|
|
1987
2013
|
var L, Q, b;
|
|
1988
|
-
if (U.status ===
|
|
2014
|
+
if (U.status === je.Error) {
|
|
1989
2015
|
a.value = {
|
|
1990
2016
|
title: p("errors.general")
|
|
1991
2017
|
}, (b = (Q = (L = U.error) == null ? void 0 : L.response) == null ? void 0 : Q.data) != null && b.message && (a.value.message = U.error.response.data.message), c("error", U.error);
|
|
@@ -2003,15 +2029,15 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
2003
2029
|
await s.canCreate() && (le.value.title = p("secrets.list.empty_state.title"), le.value.ctaText = p("secrets.list.toolbar_actions.new_secret"));
|
|
2004
2030
|
}), (U, L) => {
|
|
2005
2031
|
const Q = Z("KButton"), b = Z("KDropdownItem");
|
|
2006
|
-
return C(), G(
|
|
2007
|
-
d(e(
|
|
2032
|
+
return C(), G(Xe, null, [
|
|
2033
|
+
d(e(Be), {
|
|
2008
2034
|
"cache-identifier": l.cacheIdentifier,
|
|
2009
2035
|
"disable-sorting": "",
|
|
2010
2036
|
"empty-state-options": le.value,
|
|
2011
2037
|
"enable-entity-actions": "",
|
|
2012
2038
|
"error-message": a.value,
|
|
2013
2039
|
fetcher: e(Y),
|
|
2014
|
-
"fetcher-cache-key": e(
|
|
2040
|
+
"fetcher-cache-key": e(F),
|
|
2015
2041
|
"pagination-type": "offset",
|
|
2016
2042
|
"preferences-storage-key": "kong-ui-entities-secrets-list",
|
|
2017
2043
|
query: f.value,
|
|
@@ -2020,7 +2046,7 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
2020
2046
|
onClearSearchInput: O
|
|
2021
2047
|
}, {
|
|
2022
2048
|
"toolbar-filter": v(() => [
|
|
2023
|
-
d(e(
|
|
2049
|
+
d(e(Le), {
|
|
2024
2050
|
modelValue: f.value,
|
|
2025
2051
|
"onUpdate:modelValue": L[0] || (L[0] = (m) => f.value = m),
|
|
2026
2052
|
config: j
|
|
@@ -2038,7 +2064,7 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
2038
2064
|
to: l.config.createRoute
|
|
2039
2065
|
}, {
|
|
2040
2066
|
default: v(() => [
|
|
2041
|
-
d(e(
|
|
2067
|
+
d(e(qe)),
|
|
2042
2068
|
ve(" " + T(e(p)("secrets.list.toolbar_actions.new_secret")), 1)
|
|
2043
2069
|
]),
|
|
2044
2070
|
_: 1
|
|
@@ -2048,7 +2074,7 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
2048
2074
|
}, 8, ["auth-function"])
|
|
2049
2075
|
]),
|
|
2050
2076
|
key: v(({ rowValue: m }) => [
|
|
2051
|
-
E("div",
|
|
2077
|
+
E("div", el, [
|
|
2052
2078
|
E("b", null, T(m ?? "-"), 1)
|
|
2053
2079
|
])
|
|
2054
2080
|
]),
|
|
@@ -2062,7 +2088,7 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
2062
2088
|
default: v(() => [
|
|
2063
2089
|
d(b, {
|
|
2064
2090
|
"data-testid": "action-entity-edit",
|
|
2065
|
-
item:
|
|
2091
|
+
item: re(m.key)
|
|
2066
2092
|
}, null, 8, ["item"])
|
|
2067
2093
|
]),
|
|
2068
2094
|
_: 2
|
|
@@ -2088,21 +2114,21 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
2088
2114
|
]),
|
|
2089
2115
|
_: 1
|
|
2090
2116
|
}, 8, ["cache-identifier", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers"]),
|
|
2091
|
-
d(e(
|
|
2117
|
+
d(e(ze), {
|
|
2092
2118
|
"action-pending": ee.value,
|
|
2093
2119
|
description: e(p)("delete.description"),
|
|
2094
2120
|
"entity-name": B.value && B.value.key,
|
|
2095
|
-
"entity-type": e(
|
|
2121
|
+
"entity-type": e(Ge).Secret,
|
|
2096
2122
|
error: g.value,
|
|
2097
2123
|
title: e(p)("delete.title_for_secret"),
|
|
2098
2124
|
visible: X.value,
|
|
2099
|
-
onCancel:
|
|
2125
|
+
onCancel: ie,
|
|
2100
2126
|
onProceed: te
|
|
2101
2127
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
|
|
2102
2128
|
], 64);
|
|
2103
2129
|
};
|
|
2104
2130
|
}
|
|
2105
|
-
}),
|
|
2131
|
+
}), ll = /* @__PURE__ */ fe(tl, [["__scopeId", "data-v-904390fc"]]), ol = { class: "kong-ui-entities-secrets-list" }, al = /* @__PURE__ */ ce({
|
|
2106
2132
|
__name: "SecretList",
|
|
2107
2133
|
props: {
|
|
2108
2134
|
/** The base konnect config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2143,31 +2169,31 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
2143
2169
|
emits: ["error", "delete:success"],
|
|
2144
2170
|
setup(l, { emit: I }) {
|
|
2145
2171
|
var u;
|
|
2146
|
-
const c = I, s = l, p = (
|
|
2147
|
-
c("error",
|
|
2148
|
-
}, o = (
|
|
2149
|
-
c("delete:success",
|
|
2172
|
+
const c = I, s = l, p = (k) => {
|
|
2173
|
+
c("error", k);
|
|
2174
|
+
}, o = (k) => {
|
|
2175
|
+
c("delete:success", k);
|
|
2150
2176
|
}, { axiosInstance: x } = ye((u = s.config) == null ? void 0 : u.axiosRequestConfig), w = K(""), y = S(() => {
|
|
2151
|
-
var
|
|
2152
|
-
return `${s.config.apiBaseUrl}${be.getVault[s.config.app]}`.replace(/{controlPlaneId}/gi, ((
|
|
2177
|
+
var k;
|
|
2178
|
+
return `${s.config.apiBaseUrl}${be.getVault[s.config.app]}`.replace(/{controlPlaneId}/gi, ((k = s.config) == null ? void 0 : k.controlPlaneId) || "").replace(/{id}/gi, s.vaultId);
|
|
2153
2179
|
});
|
|
2154
2180
|
return we(async () => {
|
|
2155
|
-
var
|
|
2181
|
+
var k;
|
|
2156
2182
|
try {
|
|
2157
2183
|
const { data: f } = await x.get(y.value);
|
|
2158
|
-
w.value = (
|
|
2184
|
+
w.value = (k = f == null ? void 0 : f.config) == null ? void 0 : k.config_store_id;
|
|
2159
2185
|
} catch (f) {
|
|
2160
2186
|
c("error", f);
|
|
2161
2187
|
}
|
|
2162
|
-
}), (
|
|
2163
|
-
w.value ? (C(), W(
|
|
2188
|
+
}), (k, f) => (C(), G("div", ol, [
|
|
2189
|
+
w.value ? (C(), W(ll, Oe({ key: 0 }, s, {
|
|
2164
2190
|
"config-store-id": w.value,
|
|
2165
2191
|
"onDelete:success": o,
|
|
2166
2192
|
onError: p
|
|
2167
2193
|
}), null, 16, ["config-store-id"])) : z("", !0)
|
|
2168
2194
|
]));
|
|
2169
2195
|
}
|
|
2170
|
-
}),
|
|
2196
|
+
}), Al = /* @__PURE__ */ fe(al, [["__scopeId", "data-v-f5aa5636"]]), rl = /* @__PURE__ */ ce({
|
|
2171
2197
|
inheritAttrs: !1,
|
|
2172
2198
|
__name: "SecretFormInner",
|
|
2173
2199
|
props: {
|
|
@@ -2192,7 +2218,7 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
2192
2218
|
emits: ["update", "error", "loading"],
|
|
2193
2219
|
setup(l, { emit: I }) {
|
|
2194
2220
|
var ee;
|
|
2195
|
-
const c = l, s = I, { i18n: { t: p } } = _e.useI18n(), o = Ee(), { axiosInstance: x } = ye((ee = c.config) == null ? void 0 : ee.axiosRequestConfig), { getMessageFromError: w } =
|
|
2221
|
+
const c = l, s = I, { i18n: { t: p } } = _e.useI18n(), o = Ee(), { axiosInstance: x } = ye((ee = c.config) == null ? void 0 : ee.axiosRequestConfig), { getMessageFromError: w } = Ze(), y = he({
|
|
2196
2222
|
fields: {
|
|
2197
2223
|
key: "",
|
|
2198
2224
|
value: ""
|
|
@@ -2202,10 +2228,10 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
2202
2228
|
}), u = he({
|
|
2203
2229
|
key: "",
|
|
2204
2230
|
value: ""
|
|
2205
|
-
}),
|
|
2231
|
+
}), k = S(
|
|
2206
2232
|
() => {
|
|
2207
|
-
var g,
|
|
2208
|
-
return (
|
|
2233
|
+
var g, N;
|
|
2234
|
+
return (N = be.form[(g = c.config) == null ? void 0 : g.app]) == null ? void 0 : N.edit.replace(/{id}/gi, c.configStoreId).replace(/{secretId}/gi, c.secretId);
|
|
2209
2235
|
}
|
|
2210
2236
|
), f = () => {
|
|
2211
2237
|
var g;
|
|
@@ -2215,34 +2241,34 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
2215
2241
|
}, Y = (g) => {
|
|
2216
2242
|
s("error", g);
|
|
2217
2243
|
}, ae = (g) => {
|
|
2218
|
-
var
|
|
2219
|
-
y.fields.key = ((
|
|
2220
|
-
},
|
|
2244
|
+
var N, oe;
|
|
2245
|
+
y.fields.key = ((N = g == null ? void 0 : g.item) == null ? void 0 : N.key) || (g == null ? void 0 : g.key) || "", y.fields.value = ((oe = g == null ? void 0 : g.item) == null ? void 0 : oe.value) || (g == null ? void 0 : g.value) || "", Object.assign(u, y.fields);
|
|
2246
|
+
}, F = S(() => c.secretId ? Ve.Edit : Ve.Create), O = S(() => {
|
|
2221
2247
|
var g;
|
|
2222
|
-
return `${c.config.apiBaseUrl}${be.form[c.config.app][
|
|
2223
|
-
}), a = S(() => !!y.fields.key && !!y.fields.value),
|
|
2248
|
+
return `${c.config.apiBaseUrl}${be.form[c.config.app][F.value]}`.replace(/{controlPlaneId}/gi, ((g = c.config) == null ? void 0 : g.controlPlaneId) || "").replace(/{id}/gi, c.configStoreId).replace(/{secretId}/gi, c.secretId);
|
|
2249
|
+
}), a = S(() => !!y.fields.key && !!y.fields.value), re = S(() => JSON.stringify(y.fields) !== JSON.stringify(u)), B = S(() => ({
|
|
2224
2250
|
key: y.fields.key,
|
|
2225
2251
|
value: y.fields.value
|
|
2226
2252
|
})), X = async () => {
|
|
2227
2253
|
try {
|
|
2228
2254
|
y.readonly = !0;
|
|
2229
2255
|
let g;
|
|
2230
|
-
|
|
2256
|
+
F.value === "create" ? g = await x.post(O.value, B.value) : F.value === "edit" && (g = await x.put(O.value, B.value)), ae(g == null ? void 0 : g.data), s("update", g == null ? void 0 : g.data);
|
|
2231
2257
|
} catch (g) {
|
|
2232
2258
|
y.errorMessage = w(g), s("error", g);
|
|
2233
2259
|
} finally {
|
|
2234
2260
|
y.readonly = !1;
|
|
2235
2261
|
}
|
|
2236
2262
|
};
|
|
2237
|
-
return (g,
|
|
2238
|
-
const oe = Z("KInput"),
|
|
2239
|
-
return C(), W(e(
|
|
2240
|
-
"can-submit": a.value &&
|
|
2263
|
+
return (g, N) => {
|
|
2264
|
+
const oe = Z("KInput"), ie = Z("KTextArea"), te = Z("KAlert");
|
|
2265
|
+
return C(), W(e(Je), {
|
|
2266
|
+
"can-submit": a.value && re.value,
|
|
2241
2267
|
config: l.config,
|
|
2242
2268
|
"edit-id": l.secretId,
|
|
2243
2269
|
"entity-type": e(Re).Other,
|
|
2244
2270
|
"error-message": y.errorMessage,
|
|
2245
|
-
"fetch-url":
|
|
2271
|
+
"fetch-url": k.value,
|
|
2246
2272
|
"form-fields": B.value,
|
|
2247
2273
|
"is-readonly": y.readonly,
|
|
2248
2274
|
onCancel: f,
|
|
@@ -2261,21 +2287,21 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
2261
2287
|
default: v(() => [
|
|
2262
2288
|
d(oe, {
|
|
2263
2289
|
modelValue: y.fields.key,
|
|
2264
|
-
"onUpdate:modelValue":
|
|
2290
|
+
"onUpdate:modelValue": N[0] || (N[0] = (le) => y.fields.key = le),
|
|
2265
2291
|
modelModifiers: { trim: !0 },
|
|
2266
2292
|
autocomplete: "off",
|
|
2267
2293
|
class: "key-field",
|
|
2268
2294
|
"data-testid": "secret-form-key",
|
|
2269
|
-
disabled:
|
|
2295
|
+
disabled: F.value === e(Ve).Edit,
|
|
2270
2296
|
label: e(p)("secrets.form.fields.key.label"),
|
|
2271
2297
|
placeholder: e(p)("secrets.form.fields.key.placeholder"),
|
|
2272
2298
|
readonly: y.readonly,
|
|
2273
2299
|
required: "",
|
|
2274
2300
|
type: "text"
|
|
2275
2301
|
}, null, 8, ["modelValue", "disabled", "label", "placeholder", "readonly"]),
|
|
2276
|
-
d(
|
|
2302
|
+
d(ie, {
|
|
2277
2303
|
modelValue: y.fields.value,
|
|
2278
|
-
"onUpdate:modelValue":
|
|
2304
|
+
"onUpdate:modelValue": N[1] || (N[1] = (le) => y.fields.value = le),
|
|
2279
2305
|
modelModifiers: { trim: !0 },
|
|
2280
2306
|
autocomplete: "off",
|
|
2281
2307
|
"data-testid": "secret-form-value",
|
|
@@ -2299,7 +2325,7 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
2299
2325
|
}, 8, ["can-submit", "config", "edit-id", "entity-type", "error-message", "fetch-url", "form-fields", "is-readonly"]);
|
|
2300
2326
|
};
|
|
2301
2327
|
}
|
|
2302
|
-
}), il = /* @__PURE__ */ fe(
|
|
2328
|
+
}), il = /* @__PURE__ */ fe(rl, [["__scopeId", "data-v-5ee165bf"]]), nl = { class: "kong-ui-entities-secret-form" }, sl = /* @__PURE__ */ ce({
|
|
2303
2329
|
__name: "SecretForm",
|
|
2304
2330
|
props: {
|
|
2305
2331
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2322,14 +2348,14 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
2322
2348
|
},
|
|
2323
2349
|
emits: ["update", "error", "loading"],
|
|
2324
2350
|
setup(l, { emit: I }) {
|
|
2325
|
-
var
|
|
2351
|
+
var k;
|
|
2326
2352
|
const c = l, s = I, p = (f) => {
|
|
2327
2353
|
s("update", f);
|
|
2328
2354
|
}, o = (f) => {
|
|
2329
2355
|
s("error", f);
|
|
2330
2356
|
}, x = (f) => {
|
|
2331
2357
|
s("loading", f);
|
|
2332
|
-
}, { axiosInstance: w } = ye((
|
|
2358
|
+
}, { axiosInstance: w } = ye((k = c.config) == null ? void 0 : k.axiosRequestConfig), y = K(""), u = S(() => {
|
|
2333
2359
|
var f;
|
|
2334
2360
|
return `${c.config.apiBaseUrl}${be.getVault[c.config.app]}`.replace(/{controlPlaneId}/gi, ((f = c.config) == null ? void 0 : f.controlPlaneId) || "").replace(/{id}/gi, c.vaultId);
|
|
2335
2361
|
});
|
|
@@ -2341,8 +2367,8 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
2341
2367
|
} catch (j) {
|
|
2342
2368
|
s("error", j);
|
|
2343
2369
|
}
|
|
2344
|
-
}), (f, j) => (C(), G("div",
|
|
2345
|
-
y.value ? (C(), W(il,
|
|
2370
|
+
}), (f, j) => (C(), G("div", nl, [
|
|
2371
|
+
y.value ? (C(), W(il, Oe({ key: 0 }, c, {
|
|
2346
2372
|
"config-store-id": y.value,
|
|
2347
2373
|
onError: o,
|
|
2348
2374
|
onLoading: x,
|
|
@@ -2350,9 +2376,9 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
2350
2376
|
}), null, 16, ["config-store-id"])) : z("", !0)
|
|
2351
2377
|
]));
|
|
2352
2378
|
}
|
|
2353
|
-
}),
|
|
2379
|
+
}), Ul = /* @__PURE__ */ fe(sl, [["__scopeId", "data-v-754ddb2f"]]), cl = {
|
|
2354
2380
|
class: "vault-secret-picker-provider"
|
|
2355
|
-
},
|
|
2381
|
+
}, dl = /* @__PURE__ */ ce({
|
|
2356
2382
|
__name: "VaultSecretPickerProvider",
|
|
2357
2383
|
props: {
|
|
2358
2384
|
value: {},
|
|
@@ -2373,12 +2399,12 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
2373
2399
|
},
|
|
2374
2400
|
i18nT: o
|
|
2375
2401
|
} = _e.useI18n();
|
|
2376
|
-
return (x, w) => (C(), G("div",
|
|
2402
|
+
return (x, w) => (C(), G("div", cl, [d(e(o), {
|
|
2377
2403
|
keypath: "vault_secret_picker.provider.complete_action",
|
|
2378
2404
|
scope: "global"
|
|
2379
2405
|
}, {
|
|
2380
2406
|
cta: v(() => [E("span", {
|
|
2381
|
-
class:
|
|
2407
|
+
class: Ye({
|
|
2382
2408
|
"vault-secret-picker-provider-action": !0,
|
|
2383
2409
|
disabled: c.disabled
|
|
2384
2410
|
}),
|
|
@@ -2387,7 +2413,7 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
2387
2413
|
_: 1
|
|
2388
2414
|
})]));
|
|
2389
2415
|
}
|
|
2390
|
-
}),
|
|
2416
|
+
}), $l = /* @__PURE__ */ fe(dl, [["__scopeId", "data-v-66a1e406"]]), ul = (l) => {
|
|
2391
2417
|
let I = l.trim();
|
|
2392
2418
|
if (!I.startsWith("{") || !I.endsWith("}"))
|
|
2393
2419
|
throw new Error("Invalid secret reference: must be enclosed in curly braces");
|
|
@@ -2406,15 +2432,15 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
2406
2432
|
optionalSecretKey: o == null ? void 0 : o.join("/")
|
|
2407
2433
|
// Non-empty string or undefined
|
|
2408
2434
|
};
|
|
2409
|
-
},
|
|
2435
|
+
}, fl = (l) => {
|
|
2410
2436
|
if (!l.vaultPrefix)
|
|
2411
2437
|
throw new Error("Invalid secret reference: must have a vault prefix");
|
|
2412
2438
|
let I = `vault://${l.vaultPrefix}`;
|
|
2413
2439
|
return l.secretId && (I = `${I}/${l.secretId}`), l.optionalSecretKey && (I = `${I}/${l.optionalSecretKey}`), `{${I}}`;
|
|
2414
|
-
},
|
|
2440
|
+
}, pl = {
|
|
2415
2441
|
key: 1,
|
|
2416
2442
|
class: "inputs-wrapper"
|
|
2417
|
-
},
|
|
2443
|
+
}, ml = { "data-testid": "no-search-results" }, vl = { class: "k-select-selected-item-label" }, gl = { class: "vault-secret-picker-vault-dropdown-item" }, bl = { class: "select-item-label" }, yl = { class: "select-item-description" }, _l = { class: "select-item-description" }, hl = { "data-testid": "no-search-results" }, Vl = /* @__PURE__ */ ce({
|
|
2418
2444
|
__name: "VaultSecretPicker",
|
|
2419
2445
|
props: {
|
|
2420
2446
|
config: {
|
|
@@ -2436,53 +2462,53 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
2436
2462
|
validateStatus: (b) => b === 404 || b >= 200 && b < 300,
|
|
2437
2463
|
// Spread the passed-in config later to allow overriding
|
|
2438
2464
|
...(Q = s.config) == null ? void 0 : Q.axiosRequestConfig
|
|
2439
|
-
}), x = K(!1), w = K(""), y = K(""), u = K(""),
|
|
2465
|
+
}), x = K(!1), w = K(""), y = K(""), u = K(""), k = K(), f = S(() => {
|
|
2440
2466
|
var b, m;
|
|
2441
|
-
return s.config.app === "konnect" ? be.list[s.config.app].replace(/{id}/gi, ((m = (b =
|
|
2467
|
+
return s.config.app === "konnect" ? be.list[s.config.app].replace(/{id}/gi, ((m = (b = k.value) == null ? void 0 : b.config) == null ? void 0 : m.config_store_id) ?? "") : "<not_applicable>";
|
|
2442
2468
|
}), j = S(() => {
|
|
2443
|
-
if (
|
|
2469
|
+
if (F && X)
|
|
2444
2470
|
return c("vault_secret_picker.fetch_error.vaults_and_secrets");
|
|
2445
|
-
if (
|
|
2471
|
+
if (F)
|
|
2446
2472
|
return c("vault_secret_picker.fetch_error.vaults");
|
|
2447
2473
|
if (X)
|
|
2448
2474
|
return c("vault_secret_picker.fetch_error.secrets");
|
|
2449
2475
|
}), {
|
|
2450
2476
|
debouncedQueryChange: Y,
|
|
2451
2477
|
loading: ae,
|
|
2452
|
-
error:
|
|
2478
|
+
error: F,
|
|
2453
2479
|
loadItems: O,
|
|
2454
2480
|
results: a
|
|
2455
|
-
} =
|
|
2481
|
+
} = Fe(s.config, ue.list[s.config.app].getAll, void 0, {
|
|
2456
2482
|
fetchedItemsKey: "data",
|
|
2457
2483
|
searchKeys: ["prefix"]
|
|
2458
2484
|
}), {
|
|
2459
|
-
debouncedQueryChange:
|
|
2485
|
+
debouncedQueryChange: re,
|
|
2460
2486
|
loading: B,
|
|
2461
2487
|
error: X,
|
|
2462
2488
|
loadItems: ee,
|
|
2463
2489
|
results: g
|
|
2464
|
-
} =
|
|
2490
|
+
} = Fe(s.config, f, void 0, {
|
|
2465
2491
|
fetchedItemsKey: "data",
|
|
2466
2492
|
searchKeys: ["key"],
|
|
2467
2493
|
exactMatchKey: "key"
|
|
2468
|
-
}),
|
|
2494
|
+
}), N = S(() => {
|
|
2469
2495
|
var P;
|
|
2470
2496
|
let b = !1;
|
|
2471
2497
|
const m = ((P = a.value) == null ? void 0 : P.map((M) => (M.prefix === w.value && (b = !0), { label: M.prefix, value: M.prefix, vault: M }))) ?? [];
|
|
2472
|
-
return !b &&
|
|
2473
|
-
label:
|
|
2474
|
-
value:
|
|
2475
|
-
vault:
|
|
2498
|
+
return !b && k.value && m.push({
|
|
2499
|
+
label: k.value.prefix,
|
|
2500
|
+
value: k.value.prefix,
|
|
2501
|
+
vault: k.value
|
|
2476
2502
|
}), m;
|
|
2477
2503
|
}), oe = S(() => {
|
|
2478
2504
|
var P;
|
|
2479
2505
|
let b = !1;
|
|
2480
2506
|
const m = ((P = g.value) == null ? void 0 : P.map((M) => (M.key === y.value && (b = !0), { label: M.key, value: M.key }))) ?? [];
|
|
2481
2507
|
return !b && y.value && m.push({ label: y.value, value: y.value }), m;
|
|
2482
|
-
}),
|
|
2508
|
+
}), ie = S(() => {
|
|
2483
2509
|
var b;
|
|
2484
|
-
return ((b =
|
|
2485
|
-
}), te = S(() => !!
|
|
2510
|
+
return ((b = k == null ? void 0 : k.value) == null ? void 0 : b.name) === "konnect";
|
|
2511
|
+
}), te = S(() => !!k.value && !!y.value), le = (b) => b.label ? `${b.label} - (${b.vault.name} - ${b.vault.id})` : b.value, J = (b) => {
|
|
2486
2512
|
var P, M;
|
|
2487
2513
|
let m = `${s.config.apiBaseUrl}${ue.form[s.config.app].edit}`;
|
|
2488
2514
|
return s.config.app === "konnect" ? m = m.replace(/{controlPlaneId}/gi, ((P = s.config) == null ? void 0 : P.controlPlaneId) || "") : s.config.app === "kongManager" && (m = m.replace(/\/{workspace}/gi, (M = s.config) != null && M.workspace ? `/${s.config.workspace}` : "")), m.replace(/{id}/gi, b);
|
|
@@ -2490,7 +2516,7 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
2490
2516
|
var P;
|
|
2491
2517
|
return s.config.app !== "konnect" ? "<not_applicable>" : `${s.config.apiBaseUrl}${be.form[s.config.app].edit}`.replace(/{controlPlaneId}/gi, ((P = s.config) == null ? void 0 : P.controlPlaneId) || "").replace(/{id}/gi, m).replace(/{secretId}/gi, b);
|
|
2492
2518
|
}, L = () => {
|
|
2493
|
-
p("proceed",
|
|
2519
|
+
p("proceed", fl({
|
|
2494
2520
|
vaultPrefix: w.value,
|
|
2495
2521
|
secretId: y.value || void 0,
|
|
2496
2522
|
// Either a non-empty string or undefined
|
|
@@ -2500,10 +2526,10 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
2500
2526
|
};
|
|
2501
2527
|
return ke(() => s.setup, async (b) => {
|
|
2502
2528
|
if (b !== !1) {
|
|
2503
|
-
if (x.value = !0, w.value = "",
|
|
2529
|
+
if (x.value = !0, w.value = "", k.value = void 0, y.value = "", u.value = "", typeof b == "string" && b.trim().length > 0)
|
|
2504
2530
|
try {
|
|
2505
2531
|
let m, P = "", M = "", ne = "";
|
|
2506
|
-
const q =
|
|
2532
|
+
const q = ul(b), { data: A } = await o.get(J(q.vaultPrefix));
|
|
2507
2533
|
if (A != null && A.name)
|
|
2508
2534
|
if (m = A, P = q.vaultPrefix, m.name === "konnect") {
|
|
2509
2535
|
if (q.secretId) {
|
|
@@ -2512,8 +2538,8 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
2512
2538
|
}
|
|
2513
2539
|
} else
|
|
2514
2540
|
M = q.secretId ?? "", ne = q.optionalSecretKey ?? "";
|
|
2515
|
-
await
|
|
2516
|
-
w.value = P,
|
|
2541
|
+
await et(() => {
|
|
2542
|
+
w.value = P, k.value = m, y.value = M, u.value = ne;
|
|
2517
2543
|
});
|
|
2518
2544
|
} catch (m) {
|
|
2519
2545
|
console.debug(m);
|
|
@@ -2522,9 +2548,9 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
2522
2548
|
}
|
|
2523
2549
|
}, { immediate: !0 }), ke(w, async (b, m) => {
|
|
2524
2550
|
var P;
|
|
2525
|
-
x.value || b === m || (
|
|
2551
|
+
x.value || b === m || (k.value = (P = N.value.find((M) => M.value === b)) == null ? void 0 : P.vault, y.value = "", u.value = "");
|
|
2526
2552
|
}), ke(f, async () => {
|
|
2527
|
-
|
|
2553
|
+
ie.value && await ee();
|
|
2528
2554
|
}, { immediate: !0 }), (b, m) => {
|
|
2529
2555
|
const P = Z("KEmptyState"), M = Z("KSelect"), ne = Z("KInput"), q = Z("KModal");
|
|
2530
2556
|
return C(), W(q, {
|
|
@@ -2538,12 +2564,12 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
2538
2564
|
onProceed: L
|
|
2539
2565
|
}, {
|
|
2540
2566
|
default: v(() => [
|
|
2541
|
-
e(
|
|
2567
|
+
e(F) || e(X) ? (C(), W(P, {
|
|
2542
2568
|
key: 0,
|
|
2543
2569
|
"data-testid": "vault-secret-picker-fetch-error",
|
|
2544
2570
|
"icon-variant": "error",
|
|
2545
2571
|
message: j.value
|
|
2546
|
-
}, null, 8, ["message"])) : (C(), G("div",
|
|
2572
|
+
}, null, 8, ["message"])) : (C(), G("div", pl, [
|
|
2547
2573
|
d(M, {
|
|
2548
2574
|
modelValue: w.value,
|
|
2549
2575
|
"onUpdate:modelValue": m[0] || (m[0] = (A) => w.value = A),
|
|
@@ -2552,7 +2578,7 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
2552
2578
|
disabled: x.value,
|
|
2553
2579
|
"enable-filtering": "",
|
|
2554
2580
|
"filter-function": () => !0,
|
|
2555
|
-
items:
|
|
2581
|
+
items: N.value,
|
|
2556
2582
|
"kpop-attributes": { "data-testid": "vault-secret-picker-vault-popover" },
|
|
2557
2583
|
label: e(c)("vault_secret_picker.vault.label"),
|
|
2558
2584
|
loading: e(ae),
|
|
@@ -2566,27 +2592,27 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
2566
2592
|
E("div", null, T(e(c)("actions.loading")), 1)
|
|
2567
2593
|
]),
|
|
2568
2594
|
empty: v(() => [
|
|
2569
|
-
E("div",
|
|
2595
|
+
E("div", ml, T(e(c)("vault_secret_picker.no_results")), 1)
|
|
2570
2596
|
]),
|
|
2571
2597
|
"selected-item-template": v(({ item: A }) => [
|
|
2572
|
-
E("span",
|
|
2598
|
+
E("span", vl, T(le(A)), 1)
|
|
2573
2599
|
]),
|
|
2574
2600
|
"item-template": v(({ item: A }) => [
|
|
2575
|
-
E("div",
|
|
2576
|
-
E("span",
|
|
2577
|
-
E("span",
|
|
2578
|
-
E("span",
|
|
2601
|
+
E("div", gl, [
|
|
2602
|
+
E("span", bl, T(A.label), 1),
|
|
2603
|
+
E("span", yl, T(A.vault.name), 1),
|
|
2604
|
+
E("span", _l, T(A.vault.id), 1)
|
|
2579
2605
|
])
|
|
2580
2606
|
]),
|
|
2581
2607
|
_: 1
|
|
2582
2608
|
}, 8, ["modelValue", "disabled", "items", "label", "loading", "placeholder", "onQueryChange"]),
|
|
2583
|
-
|
|
2609
|
+
ie.value ? (C(), W(M, {
|
|
2584
2610
|
key: 0,
|
|
2585
2611
|
modelValue: y.value,
|
|
2586
2612
|
"onUpdate:modelValue": m[1] || (m[1] = (A) => y.value = A),
|
|
2587
2613
|
clearable: "",
|
|
2588
2614
|
"data-testid": "vault-secret-picker-secret-id-select",
|
|
2589
|
-
disabled: x.value || !
|
|
2615
|
+
disabled: x.value || !k.value,
|
|
2590
2616
|
"enable-filtering": "",
|
|
2591
2617
|
"filter-function": () => !0,
|
|
2592
2618
|
items: oe.value,
|
|
@@ -2597,13 +2623,13 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
2597
2623
|
required: "",
|
|
2598
2624
|
"reuse-item-template": "",
|
|
2599
2625
|
width: "100%",
|
|
2600
|
-
onQueryChange: e(
|
|
2626
|
+
onQueryChange: e(re)
|
|
2601
2627
|
}, {
|
|
2602
2628
|
loading: v(() => [
|
|
2603
2629
|
E("div", null, T(e(c)("actions.loading")), 1)
|
|
2604
2630
|
]),
|
|
2605
2631
|
empty: v(() => [
|
|
2606
|
-
E("div",
|
|
2632
|
+
E("div", hl, T(e(c)("vault_secret_picker.no_results")), 1)
|
|
2607
2633
|
]),
|
|
2608
2634
|
_: 1
|
|
2609
2635
|
}, 8, ["modelValue", "disabled", "items", "label", "loading", "placeholder", "onQueryChange"])) : (C(), W(ne, {
|
|
@@ -2613,7 +2639,7 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
2613
2639
|
modelModifiers: { trim: !0 },
|
|
2614
2640
|
autocomplete: "off",
|
|
2615
2641
|
"data-testid": "vault-secret-picker-secret-id-input",
|
|
2616
|
-
disabled: x.value || !
|
|
2642
|
+
disabled: x.value || !k.value,
|
|
2617
2643
|
label: e(c)("vault_secret_picker.secret_id.label"),
|
|
2618
2644
|
placeholder: e(c)("vault_secret_picker.secret_id.input_placeholder"),
|
|
2619
2645
|
required: "",
|
|
@@ -2625,7 +2651,7 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
2625
2651
|
modelModifiers: { trim: !0 },
|
|
2626
2652
|
autocomplete: "off",
|
|
2627
2653
|
"data-testid": "vault-secret-picker-secret-key-input",
|
|
2628
|
-
disabled: x.value || !
|
|
2654
|
+
disabled: x.value || !k.value,
|
|
2629
2655
|
help: e(c)("vault_secret_picker.optional_secret_key.help"),
|
|
2630
2656
|
label: e(c)("vault_secret_picker.optional_secret_key.label"),
|
|
2631
2657
|
placeholder: e(c)("vault_secret_picker.optional_secret_key.placeholder"),
|
|
@@ -2637,17 +2663,17 @@ const Pt = { class: "kong-ui-entities-vault-form" }, Mt = { class: "vault-form-p
|
|
|
2637
2663
|
}, 8, ["action-button-disabled", "action-button-text", "title", "visible"]);
|
|
2638
2664
|
};
|
|
2639
2665
|
}
|
|
2640
|
-
}),
|
|
2666
|
+
}), Tl = /* @__PURE__ */ fe(Vl, [["__scopeId", "data-v-df8552cc"]]);
|
|
2641
2667
|
export {
|
|
2642
|
-
|
|
2643
|
-
|
|
2668
|
+
Ul as SecretForm,
|
|
2669
|
+
Al as SecretList,
|
|
2644
2670
|
D as VaultAuthMethods,
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2671
|
+
Rl as VaultConfigCard,
|
|
2672
|
+
El as VaultForm,
|
|
2673
|
+
xl as VaultList,
|
|
2648
2674
|
t as VaultProviders,
|
|
2649
|
-
|
|
2650
|
-
|
|
2675
|
+
Tl as VaultSecretPicker,
|
|
2676
|
+
$l as VaultSecretPickerProvider,
|
|
2651
2677
|
be as secretsEndpoints,
|
|
2652
2678
|
ue as vaultsEndpoints
|
|
2653
2679
|
};
|