@wssto2/vue-core 0.5.4 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +46 -0
- package/README.md +6 -1
- package/dist/{AccessGate.vue_vue_type_script_setup_true_lang-DZ9GcLC1.js → AccessGate.vue_vue_type_script_setup_true_lang-CkomzGrt.js} +1 -1
- package/dist/{AccountMenuItem.vue_vue_type_script_setup_true_lang-CPeNxh5K.js → AccountMenuItem.vue_vue_type_script_setup_true_lang-BIYgaihv.js} +1 -1
- package/dist/{ActionRow.vue_vue_type_script_setup_true_lang-Bv-APkGf.js → ActionRow.vue_vue_type_script_setup_true_lang-Cg1lhpcA.js} +2 -2
- package/dist/{Activity-DUjDaPfP.js → Activity-CW2TOQAY.js} +9 -9
- package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-GUTIXuNd.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-9Lt1XggN.js} +3 -3
- package/dist/{AlertDialog.vue_vue_type_script_setup_true_lang-whA4WLdl.js → AlertDialog.vue_vue_type_script_setup_true_lang-BvGc1Rfl.js} +1 -1
- package/dist/{AsyncSection.vue_vue_type_script_setup_true_lang-B0NfvG3B.js → AsyncSection.vue_vue_type_script_setup_true_lang-GxAsImnO.js} +4 -4
- package/dist/{Banner.vue_vue_type_script_setup_true_lang-DSStj_5z.js → Banner.vue_vue_type_script_setup_true_lang-sv0phngk.js} +1 -1
- package/dist/{Button.vue_vue_type_script_setup_true_lang-CL9Qh5yq.js → Button.vue_vue_type_script_setup_true_lang-DQq_0P0p.js} +1 -1
- package/dist/{Changes-B0tZO6BZ.js → Changes-BCaVkeZg.js} +8 -8
- package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-o_Pj-JcD.js → CollectionPage.vue_vue_type_script_setup_true_lang-BmXnfM5f.js} +17 -16
- package/dist/{DataTable.vue_vue_type_script_setup_true_lang-BEvz5zqo.js → DataTable.vue_vue_type_script_setup_true_lang-DRWrCRLr.js} +1 -1
- package/dist/{DateField.vue_vue_type_script_setup_true_lang-CDg31ZU7.js → DateField.vue_vue_type_script_setup_true_lang-DmYp54mq.js} +3 -3
- package/dist/{DeadLetters-IgVHao84.js → DeadLetters-DUM_bsL-.js} +8 -7
- package/dist/{DiscardChangesModal.vue_vue_type_script_setup_true_lang-D1arePCZ.js → DiscardChangesModal.vue_vue_type_script_setup_true_lang-DcihJfpk.js} +1 -1
- package/dist/{EmptyState.vue_vue_type_script_setup_true_lang-50p-Mp8I.js → EmptyState.vue_vue_type_script_setup_true_lang-DbZiO2RF.js} +1 -1
- package/dist/{FormErrors.vue_vue_type_script_setup_true_lang-D7edzNTL.js → FormErrors.vue_vue_type_script_setup_true_lang-DJiK8iqo.js} +1 -1
- package/dist/{FormGroup.vue_vue_type_script_setup_true_lang-CSgT4ITL.js → FormGroup.vue_vue_type_script_setup_true_lang-BTADNpwB.js} +2 -2
- package/dist/{FormView.vue_vue_type_script_setup_true_lang-D31Hk3pJ.js → FormView.vue_vue_type_script_setup_true_lang-Ncl9DmFB.js} +2 -2
- package/dist/{General-C40HxupS.js → General-Dsh0TJ5w.js} +8 -8
- package/dist/{HeaderAction.vue_vue_type_script_setup_true_lang-Cgji-Jrr.js → HeaderAction.vue_vue_type_script_setup_true_lang-Da59TLBh.js} +2 -2
- package/dist/{Icon.vue_vue_type_script_lang-D7oC-d-S.js → Icon.vue_vue_type_script_lang-BhhsFYwp.js} +45 -42
- package/dist/{IconTile.vue_vue_type_script_setup_true_lang-_FXvaj93.js → IconTile.vue_vue_type_script_setup_true_lang-BmxCuUZ9.js} +1 -1
- package/dist/IncidentRecord-C9zrjNrp.js +405 -0
- package/dist/IncidentsList-ClQOjd5c.js +140 -0
- package/dist/KeyValue.vue_vue_type_script_setup_true_lang-wcZcvnow.js +35 -0
- package/dist/{LeaveGuardRoot.vue_vue_type_script_setup_true_lang-Cv7KlA5y.js → LeaveGuardRoot.vue_vue_type_script_setup_true_lang-ChIsmnts.js} +1 -1
- package/dist/{Menu.vue_vue_type_script_setup_true_lang-DsFOeCVe.js → Menu.vue_vue_type_script_setup_true_lang-ldLdJ5Q-.js} +1 -1
- package/dist/{MenuButton.vue_vue_type_script_setup_true_lang-AGbN9r5q.js → MenuButton.vue_vue_type_script_setup_true_lang-C-XRr5f2.js} +1 -1
- package/dist/{Modal.vue_vue_type_script_setup_true_lang-DpBb8ans.js → Modal.vue_vue_type_script_setup_true_lang-4MsnTWyx.js} +2 -2
- package/dist/{NewRolePage-Bhy8KJO1.js → NewRolePage-Bw2_jXcQ.js} +9 -8
- package/dist/{NoAccess.vue_vue_type_script_setup_true_lang-DWxq-MTM.js → NoAccess.vue_vue_type_script_setup_true_lang-BHzZtZ50.js} +1 -1
- package/dist/{NumberField.vue_vue_type_script_setup_true_lang-BdS7BxuS.js → NumberField.vue_vue_type_script_setup_true_lang-C3nw944P.js} +1 -1
- package/dist/{PageBar.vue_vue_type_script_setup_true_lang-B7qdEeej.js → PageBar.vue_vue_type_script_setup_true_lang-DPpcZxuT.js} +1 -1
- package/dist/{Panel.vue_vue_type_script_setup_true_lang-BA0u_DtS.js → Panel.vue_vue_type_script_setup_true_lang-D_Wg42hu.js} +1 -1
- package/dist/PersonAccess.vue_vue_type_script_setup_true_lang-07pq4SrY.js +600 -0
- package/dist/{PhotoViewer.vue_vue_type_script_setup_true_lang-CY5EZiyK.js → PhotoViewer.vue_vue_type_script_setup_true_lang-Cj0hSMk9.js} +1 -1
- package/dist/{ProfilePage-Bf7dFzGd.js → ProfilePage-CJIztbx3.js} +19 -19
- package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-fmx0f8xi.js → RecordHeader.vue_vue_type_script_setup_true_lang-DPm9q1P_.js} +2 -2
- package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-BFBGvevP.js → ResourcePage.vue_vue_type_script_setup_true_lang-Cm3tx76N.js} +5 -5
- package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-C6oloGIh.js → RoleEditor.vue_vue_type_script_setup_true_lang-DuQR8hFf.js} +35 -34
- package/dist/{RolePage-BjbvciTg.js → RolePage-Yv6m6u7o.js} +43 -41
- package/dist/{RolesPage-DzVOgF4z.js → RolesPage-TibtzxzQ.js} +34 -32
- package/dist/{SectionList.vue_vue_type_script_setup_true_lang-wyW7n3Uq.js → SectionList.vue_vue_type_script_setup_true_lang-DAnZbfWA.js} +3 -3
- package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-Ci04hApd.js → SectionNavigator.vue_vue_type_script_setup_true_lang-ivdGWUeF.js} +5 -5
- package/dist/{SegmentedField.vue_vue_type_script_setup_true_lang-DXe_iOS8.js → SegmentedField.vue_vue_type_script_setup_true_lang-ChfDFAA2.js} +1 -1
- package/dist/{SelectField.vue_vue_type_script_setup_true_lang-BN4vzvV9.js → SelectField.vue_vue_type_script_setup_true_lang-iJm8qmjT.js} +7 -7
- package/dist/ServiceAccountDialog.vue_vue_type_script_setup_true_lang-D2Xj5mr7.js +126 -0
- package/dist/ServiceAccountRecord-Ct3TrSqZ.js +511 -0
- package/dist/ServiceAccountsList-CaXEp73j.js +137 -0
- package/dist/{SessionList.vue_vue_type_script_setup_true_lang-PuWIK-Wa.js → SessionList.vue_vue_type_script_setup_true_lang-BEKTaL0g.js} +4 -4
- package/dist/{Sessions-CRUObe5G.js → Sessions-Bg4Zk9Gf.js} +6 -6
- package/dist/{SettingsPage-C0qEC0uI.js → SettingsPage-Brq9U4tJ.js} +19 -19
- package/dist/{Sheet.vue_vue_type_script_setup_true_lang-DgOFV4fa.js → Sheet.vue_vue_type_script_setup_true_lang-sh9YD0Pm.js} +1 -1
- package/dist/{SignIn-Uy0Jujzz.js → SignIn-DB5LRNlB.js} +7 -7
- package/dist/{SignInPage-CpVZfrLZ.js → SignInPage-Ts-iTaC1.js} +6 -6
- package/dist/{SignIns-Cp5Gx2dk.js → SignIns-bCvvmCHF.js} +6 -6
- package/dist/{SwipeActions.vue_vue_type_script_setup_true_lang-BJIA2JfI.js → SwipeActions.vue_vue_type_script_setup_true_lang-D8SiC0G7.js} +1 -1
- package/dist/{SwitchField.vue_vue_type_script_setup_true_lang-Dj5Aq8QT.js → SwitchField.vue_vue_type_script_setup_true_lang-BMA2YXTZ.js} +1 -1
- package/dist/{Tabs.vue_vue_type_script_setup_true_lang-CcMcE38r.js → Tabs.vue_vue_type_script_setup_true_lang-tpkGp98F.js} +1 -1
- package/dist/{TextField.vue_vue_type_script_setup_true_lang-BwfNNQEz.js → TextField.vue_vue_type_script_setup_true_lang-7IAl4eAE.js} +3 -3
- package/dist/{TextareaField.vue_vue_type_script_setup_true_lang-aT1P8Xqr.js → TextareaField.vue_vue_type_script_setup_true_lang-Dyh4Hhyl.js} +1 -1
- package/dist/{TimeField.vue_vue_type_script_setup_true_lang-jPKPE1hc.js → TimeField.vue_vue_type_script_setup_true_lang-BwoE08jT.js} +3 -3
- package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-CutyQkJb.js → Timestamp.vue_vue_type_script_setup_true_lang-u53rHMFG.js} +1 -1
- package/dist/{UserRecord-DbSMnTbj.js → UserRecord-DgK9FsvV.js} +30 -30
- package/dist/{UsersList-9MicE2pG.js → UsersList-Due2ZkbO.js} +14 -14
- package/dist/{ViewTabs.vue_vue_type_script_setup_true_lang-BJIoZAlH.js → ViewTabs.vue_vue_type_script_setup_true_lang-BjdDXE3T.js} +1 -1
- package/dist/access/api.d.ts +7 -8
- package/dist/access/context.d.ts +2 -7
- package/dist/access/feature.d.ts +0 -8
- package/dist/access/index.js +47 -15
- package/dist/app/application.d.ts +2 -0
- package/dist/app/index.js +13 -427
- package/dist/application-D8Nm17zA.js +420 -0
- package/dist/button/index.js +1 -1
- package/dist/client/client.d.ts +7 -0
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +5 -4
- package/dist/client-CZgikXPG.js +151 -0
- package/dist/collection/index.js +55 -63
- package/dist/content/index.js +37 -66
- package/dist/{contributions-fx5q5n1u.js → contributions-BQ9dZoRw.js} +1 -1
- package/dist/controls/index.js +4 -4
- package/dist/datePresets-DB13HHHd.js +17 -0
- package/dist/definition-C7QuyV3i.js +54 -0
- package/dist/form/index.js +590 -615
- package/dist/{guards-D4mXf_2X.js → guards-BFCulig0.js} +1 -1
- package/dist/http-nz92KjdS.js +42 -0
- package/dist/i18n/index.js +36 -36
- package/dist/icon/core.d.ts +3 -0
- package/dist/icon/index.js +1 -1
- package/dist/identity/index.d.ts +7 -0
- package/dist/identity/index.js +19 -15
- package/dist/identity/serviceaccounts/ApiKeysPanel.vue.d.ts +17 -0
- package/dist/identity/serviceaccounts/CreatedApiKeyDialog.vue.d.ts +53 -0
- package/dist/identity/serviceaccounts/NewApiKeyDialog.vue.d.ts +24 -0
- package/dist/identity/serviceaccounts/ServiceAccountDialog.vue.d.ts +22 -0
- package/dist/identity/serviceaccounts/ServiceAccountRecord.vue.d.ts +2 -0
- package/dist/identity/serviceaccounts/ServiceAccountsList.vue.d.ts +2 -0
- package/dist/identity/serviceaccounts/access.d.ts +4 -0
- package/dist/identity/serviceaccounts/api.d.ts +27 -0
- package/dist/identity/serviceaccounts/context.d.ts +14 -0
- package/dist/identity/serviceaccounts/feature.d.ts +23 -0
- package/dist/identity/serviceaccounts/form.d.ts +4 -0
- package/dist/identity/serviceaccounts/messages.d.ts +11 -0
- package/dist/identity/serviceaccounts/routes.d.ts +22 -0
- package/dist/incidents/IncidentRecord.vue.d.ts +2 -0
- package/dist/incidents/IncidentsList.vue.d.ts +2 -0
- package/dist/incidents/Person.vue.d.ts +7 -0
- package/dist/incidents/ReportDialog.vue.d.ts +21 -0
- package/dist/incidents/ReportHost.vue.d.ts +2 -0
- package/dist/incidents/ReportMenuItem.vue.d.ts +2 -0
- package/dist/incidents/access.d.ts +6 -0
- package/dist/incidents/api.d.ts +27 -0
- package/dist/incidents/clientErrorReporter.d.ts +38 -0
- package/dist/incidents/context.d.ts +7 -0
- package/dist/incidents/feature.d.ts +20 -0
- package/dist/incidents/form.d.ts +16 -0
- package/dist/incidents/index.d.ts +9 -0
- package/dist/incidents/index.js +8 -0
- package/dist/incidents/look.d.ts +6 -0
- package/dist/incidents/routes.d.ts +21 -0
- package/dist/{index-Ok29ucE3.js → index-CXTJ_1NV.js} +191 -168
- package/dist/index-D5_GAqjA.js +340 -0
- package/dist/{index-C-oM_Mnf.js → index-i-cTTVxo.js} +10 -10
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/copyText.d.ts +5 -0
- package/dist/modal/index.js +5 -5
- package/dist/modules/incident/entities.d.ts +84 -0
- package/dist/modules/incident/routes.d.ts +54 -0
- package/dist/modules/incident/schemas.d.ts +48 -0
- package/dist/modules/serviceaccount/entities.d.ts +127 -0
- package/dist/modules/serviceaccount/routes.d.ts +58 -0
- package/dist/modules/serviceaccount/schemas.d.ts +49 -0
- package/dist/{navigation-Bc5EQ_Si.js → navigation-BSC9X7FM.js} +1 -1
- package/dist/{neighbors-Bv6vnWlW.js → neighbors-BKzihEGQ.js} +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/{options-Bu0XbEpN.js → options-QuOkMKVZ.js} +4 -4
- package/dist/overlay/index.js +4 -4
- package/dist/page/index.js +7 -7
- package/dist/phone/index.js +2 -2
- package/dist/platform/index.js +3 -3
- package/dist/{platform-Dx6STiwY.js → platform-Dr4iY3b8.js} +1 -1
- package/dist/refusals-COPr15XZ.js +135 -0
- package/dist/resource/index.js +1 -1
- package/dist/router/index.js +4 -4
- package/dist/routes-CVckt7Pj.js +19 -0
- package/dist/{rowLayout-BBFyLbOl.js → rowLayout-Cz-K7jeo.js} +5 -5
- package/dist/{sections-B0HxIOC2.js → sections-BXg4_ZhO.js} +1 -1
- package/dist/shell/index.js +9 -9
- package/dist/state/index.js +4 -4
- package/dist/state-ChVIjayU.js +102 -0
- package/dist/{status-C78NpXyB.js → status-DZ4eSnAS.js} +9 -8
- package/dist/styles.css +1 -1
- package/dist/{suggestions-ClyLexMO.js → suggestions-niXd1oOl.js} +1 -1
- package/dist/testing/index.js +1 -1
- package/dist/{useCommand-DyuPTosF.js → useCommand-BIZX1ReM.js} +4 -4
- package/dist/{useGroupSheet-C2NyqWRp.js → useGroupSheet-DxXzdKo3.js} +5 -5
- package/dist/useRecordDialog-BLVSz7g3.js +30 -0
- package/dist/{useResourceForm-CJfl8rj_.js → useResourceForm-DYuYT_on.js} +1 -1
- package/dist/{useTypedEntry-C7k7Dyl-.js → useTypedEntry-CKuGqWT8.js} +2 -2
- package/package.json +6 -2
- package/dist/client-BHPFfBj3.js +0 -147
- package/dist/http-CdQowFlW.js +0 -194
- package/dist/index-BdGnA1Jh.js +0 -765
|
@@ -0,0 +1,511 @@
|
|
|
1
|
+
import { defineComponent as P, useTemplateRef as F, ref as N, openBlock as r, createBlock as _, unref as e, withCtx as o, createElementBlock as E, createVNode as s, createElementVNode as D, toDisplayString as w, createTextVNode as R, createCommentVNode as L, mergeProps as Z, computed as K, Fragment as se, renderList as oe, createSlots as ne } from "vue";
|
|
2
|
+
import { useI18n as q } from "vue-i18n";
|
|
3
|
+
import { useRoute as re } from "vue-router";
|
|
4
|
+
import { u as le } from "./refusals-COPr15XZ.js";
|
|
5
|
+
import { a as ie } from "./PersonAccess.vue_vue_type_script_setup_true_lang-07pq4SrY.js";
|
|
6
|
+
import { _ as ee } from "./IconTile.vue_vue_type_script_setup_true_lang-BmxCuUZ9.js";
|
|
7
|
+
import { _ as ue } from "./Tabs.vue_vue_type_script_setup_true_lang-tpkGp98F.js";
|
|
8
|
+
import { _ as V } from "./FormGroup.vue_vue_type_script_setup_true_lang-BTADNpwB.js";
|
|
9
|
+
import { g as p } from "./options-QuOkMKVZ.js";
|
|
10
|
+
import { u as Q } from "./format-D8X4zsx6.js";
|
|
11
|
+
import { _ as te } from "./AlertDialog.vue_vue_type_script_setup_true_lang-BvGc1Rfl.js";
|
|
12
|
+
import { t as j } from "./toast-CqSDTWRX.js";
|
|
13
|
+
import { _ as de } from "./RecordHeader.vue_vue_type_script_setup_true_lang-DPm9q1P_.js";
|
|
14
|
+
import { u as ae } from "./platform-Dr4iY3b8.js";
|
|
15
|
+
import { u as me, a as ve } from "./routeResource-CcYA75T2.js";
|
|
16
|
+
import { a as fe } from "./ResourcePage.vue_vue_type_script_setup_true_lang-Cm3tx76N.js";
|
|
17
|
+
import { _ as O } from "./Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js";
|
|
18
|
+
import { M as ce, R as _e, f as pe, s as ye } from "./index-CXTJ_1NV.js";
|
|
19
|
+
import { u as W, a as X, _ as ke } from "./ServiceAccountDialog.vue_vue_type_script_setup_true_lang-D2Xj5mr7.js";
|
|
20
|
+
import { _ as J } from "./Button.vue_vue_type_script_setup_true_lang-DQq_0P0p.js";
|
|
21
|
+
import { _ as be } from "./AsyncSection.vue_vue_type_script_setup_true_lang-GxAsImnO.js";
|
|
22
|
+
import { _ as ge } from "./Modal.vue_vue_type_script_setup_true_lang-4MsnTWyx.js";
|
|
23
|
+
import { _ as xe } from "./Banner.vue_vue_type_script_setup_true_lang-sv0phngk.js";
|
|
24
|
+
import { _ as we } from "./DateField.vue_vue_type_script_setup_true_lang-DmYp54mq.js";
|
|
25
|
+
import { _ as $e } from "./TextField.vue_vue_type_script_setup_true_lang-7IAl4eAE.js";
|
|
26
|
+
import { u as he, _ as Ce } from "./useCommand-BIZX1ReM.js";
|
|
27
|
+
async function Se(u) {
|
|
28
|
+
try {
|
|
29
|
+
return await navigator.clipboard.writeText(u), !0;
|
|
30
|
+
} catch {
|
|
31
|
+
}
|
|
32
|
+
const t = document.createElement("textarea");
|
|
33
|
+
t.value = u, t.setAttribute("readonly", ""), t.style.position = "fixed", t.style.opacity = "0", document.body.append(t), t.select();
|
|
34
|
+
try {
|
|
35
|
+
return document.execCommand("copy");
|
|
36
|
+
} catch {
|
|
37
|
+
return !1;
|
|
38
|
+
} finally {
|
|
39
|
+
t.remove();
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
const Ae = {
|
|
43
|
+
key: 0,
|
|
44
|
+
class: "flex min-w-0 flex-col gap-group-gap",
|
|
45
|
+
"data-test": "created-api-key"
|
|
46
|
+
}, Ke = { class: "flex min-w-0 items-center gap-3" }, De = {
|
|
47
|
+
class: "min-w-0 flex-1 break-all rounded-control bg-fill px-3 py-2 font-mono text-body text-content-strong select-all",
|
|
48
|
+
"data-test": "api-key-secret"
|
|
49
|
+
}, Re = {
|
|
50
|
+
class: "contents",
|
|
51
|
+
"data-test": "copy-api-key"
|
|
52
|
+
}, Le = { "data-test": "api-key-once" }, Te = /* @__PURE__ */ P({
|
|
53
|
+
__name: "CreatedApiKeyDialog",
|
|
54
|
+
props: {
|
|
55
|
+
account: {}
|
|
56
|
+
},
|
|
57
|
+
emits: ["done"],
|
|
58
|
+
setup(u, { expose: t, emit: k }) {
|
|
59
|
+
const l = u, g = k, { t: c } = q(), $ = Q(), d = F("dialog"), m = N(null), i = N(!1);
|
|
60
|
+
function n(C) {
|
|
61
|
+
m.value = C, i.value = !1, d.value?.present();
|
|
62
|
+
}
|
|
63
|
+
async function v() {
|
|
64
|
+
m.value && await Se(m.value.secret) && j.success(c("core.serviceaccounts.keys.copied"));
|
|
65
|
+
}
|
|
66
|
+
function x() {
|
|
67
|
+
i.value = !0, d.value?.dismiss(), m.value = null, g("done");
|
|
68
|
+
}
|
|
69
|
+
const h = () => i.value;
|
|
70
|
+
return t({ show: n, done: x, copySecret: v, created: m }), (C, A) => (r(), _(e(ge), {
|
|
71
|
+
ref_key: "dialog",
|
|
72
|
+
ref: d,
|
|
73
|
+
title: e(c)("core.serviceaccounts.keys.created_title"),
|
|
74
|
+
subtitle: l.account.name,
|
|
75
|
+
size: "md",
|
|
76
|
+
grouped: "",
|
|
77
|
+
"before-dismiss": h,
|
|
78
|
+
"without-close-button": "",
|
|
79
|
+
"primary-label": e(c)("core.serviceaccounts.keys.saved_it"),
|
|
80
|
+
onPrimary: x
|
|
81
|
+
}, {
|
|
82
|
+
default: o(() => [
|
|
83
|
+
m.value ? (r(), E("div", Ae, [
|
|
84
|
+
s(e(V), null, {
|
|
85
|
+
default: o(() => [
|
|
86
|
+
s(e(p), { layout: "stacked" }, {
|
|
87
|
+
default: o(() => [
|
|
88
|
+
D("div", Ke, [
|
|
89
|
+
D("code", De, w(m.value.secret), 1),
|
|
90
|
+
D("span", Re, [
|
|
91
|
+
s(e(J), {
|
|
92
|
+
prominence: "secondary",
|
|
93
|
+
icon: "copy",
|
|
94
|
+
onClick: v
|
|
95
|
+
}, {
|
|
96
|
+
default: o(() => [
|
|
97
|
+
R(w(e(c)("core.serviceaccounts.keys.copy")), 1)
|
|
98
|
+
]),
|
|
99
|
+
_: 1
|
|
100
|
+
})
|
|
101
|
+
])
|
|
102
|
+
])
|
|
103
|
+
]),
|
|
104
|
+
_: 1
|
|
105
|
+
})
|
|
106
|
+
]),
|
|
107
|
+
_: 1
|
|
108
|
+
}),
|
|
109
|
+
D("div", Le, [
|
|
110
|
+
s(e(xe), {
|
|
111
|
+
tone: "warning",
|
|
112
|
+
icon: "alertTriangle"
|
|
113
|
+
}, {
|
|
114
|
+
default: o(() => [
|
|
115
|
+
R(w(e(c)("core.serviceaccounts.keys.once")), 1)
|
|
116
|
+
]),
|
|
117
|
+
_: 1
|
|
118
|
+
})
|
|
119
|
+
]),
|
|
120
|
+
s(e(V), null, {
|
|
121
|
+
default: o(() => [
|
|
122
|
+
s(e(p), {
|
|
123
|
+
layout: "setting",
|
|
124
|
+
label: e(c)("core.serviceaccounts.keys.fields.name"),
|
|
125
|
+
value: m.value.key.name
|
|
126
|
+
}, null, 8, ["label", "value"]),
|
|
127
|
+
s(e(p), {
|
|
128
|
+
layout: "setting",
|
|
129
|
+
label: e(c)("core.serviceaccounts.title"),
|
|
130
|
+
value: l.account.name
|
|
131
|
+
}, null, 8, ["label", "value"]),
|
|
132
|
+
s(e(p), {
|
|
133
|
+
layout: "setting",
|
|
134
|
+
label: e(c)("core.serviceaccounts.keys.fields.expires"),
|
|
135
|
+
value: m.value.key.expires_at ? e($).date(m.value.key.expires_at) : e(c)("core.serviceaccounts.keys.no_expiry")
|
|
136
|
+
}, null, 8, ["label", "value"])
|
|
137
|
+
]),
|
|
138
|
+
_: 1
|
|
139
|
+
})
|
|
140
|
+
])) : L("", !0)
|
|
141
|
+
]),
|
|
142
|
+
_: 1
|
|
143
|
+
}, 8, ["title", "subtitle", "primary-label"]));
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
function Fe(u) {
|
|
147
|
+
if (!u) return null;
|
|
148
|
+
const [t, k, l] = u.split("-").map(Number);
|
|
149
|
+
return !t || !k || !l ? null : new Date(t, k - 1, l, 23, 59, 59).toISOString();
|
|
150
|
+
}
|
|
151
|
+
function Ne(u = /* @__PURE__ */ new Date()) {
|
|
152
|
+
return `${u.getFullYear()}-${String(u.getMonth() + 1).padStart(2, "0")}-${String(u.getDate()).padStart(2, "0")}`;
|
|
153
|
+
}
|
|
154
|
+
const Ee = {
|
|
155
|
+
class: "flex min-w-0 flex-col gap-group-gap",
|
|
156
|
+
"data-test": "new-api-key"
|
|
157
|
+
}, Ve = /* @__PURE__ */ P({
|
|
158
|
+
__name: "NewApiKeyDialog",
|
|
159
|
+
props: {
|
|
160
|
+
account: {}
|
|
161
|
+
},
|
|
162
|
+
emits: ["created"],
|
|
163
|
+
setup(u, { expose: t, emit: k }) {
|
|
164
|
+
const l = u, g = k, { t: c } = q(), $ = W(), d = X(), i = he({
|
|
165
|
+
...d,
|
|
166
|
+
defaults: () => ({ name: "", expires: null }),
|
|
167
|
+
validator: {
|
|
168
|
+
safeParse(n) {
|
|
169
|
+
const { name: v, expires: x } = n;
|
|
170
|
+
return v.trim() === "" ? { success: !1, error: { issues: [{ path: ["name"], message: c("core.account.validation.required") }] } } : { success: !0, data: { name: v.trim(), expires_at: Fe(x) } };
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
// The server's complaint about `expires_at` belongs to the field called `expires`.
|
|
174
|
+
serverField: (n) => n === "expires_at" ? "expires" : n,
|
|
175
|
+
run: (n, { idempotencyKey: v }) => $.createKey(l.account.id, n, v),
|
|
176
|
+
done: (n) => g("created", n)
|
|
177
|
+
});
|
|
178
|
+
return t({ show: () => i.present(), form: i.form }), (n, v) => (r(), _(e(Ce), {
|
|
179
|
+
command: e(i),
|
|
180
|
+
size: "md",
|
|
181
|
+
title: e(c)("core.serviceaccounts.keys.new_title"),
|
|
182
|
+
subtitle: l.account.name,
|
|
183
|
+
"confirm-label": e(c)("core.serviceaccounts.keys.create")
|
|
184
|
+
}, {
|
|
185
|
+
default: o(() => [
|
|
186
|
+
D("div", Ee, [
|
|
187
|
+
s(e(V), {
|
|
188
|
+
footer: e(c)("core.serviceaccounts.keys.new_footer")
|
|
189
|
+
}, {
|
|
190
|
+
default: o(() => [
|
|
191
|
+
s(e($e), Z(e(i).form.bind("name"), {
|
|
192
|
+
label: e(c)("core.serviceaccounts.keys.fields.name"),
|
|
193
|
+
"max-length": 100,
|
|
194
|
+
required: "",
|
|
195
|
+
placeholder: e(c)("core.serviceaccounts.keys.fields.name_placeholder")
|
|
196
|
+
}), null, 16, ["label", "placeholder"]),
|
|
197
|
+
s(e(we), Z(e(i).form.bind("expires"), {
|
|
198
|
+
label: e(c)("core.serviceaccounts.keys.fields.expires"),
|
|
199
|
+
hint: e(c)("core.serviceaccounts.keys.fields.expires_hint"),
|
|
200
|
+
min: e(Ne)()
|
|
201
|
+
}), null, 16, ["label", "hint", "min"])
|
|
202
|
+
]),
|
|
203
|
+
_: 1
|
|
204
|
+
}, 8, ["footer"])
|
|
205
|
+
])
|
|
206
|
+
]),
|
|
207
|
+
_: 1
|
|
208
|
+
}, 8, ["command", "title", "subtitle", "confirm-label"]));
|
|
209
|
+
}
|
|
210
|
+
}), je = {
|
|
211
|
+
class: "flex min-w-0 flex-col gap-group-gap",
|
|
212
|
+
"data-test": "api-keys"
|
|
213
|
+
}, Me = ["data-test"], ze = {
|
|
214
|
+
class: "contents",
|
|
215
|
+
"data-test": "new-api-key-action"
|
|
216
|
+
}, Oe = /* @__PURE__ */ P({
|
|
217
|
+
__name: "ApiKeysPanel",
|
|
218
|
+
props: {
|
|
219
|
+
account: {}
|
|
220
|
+
},
|
|
221
|
+
emits: ["changed"],
|
|
222
|
+
setup(u, { expose: t, emit: k }) {
|
|
223
|
+
const l = u, g = k, { t: c } = q(), { access: $ } = ae(), d = Q(), m = W(), i = X(), n = me({ for: () => l.account.id, load: (a, { signal: f }) => m.keys(a, { signal: f }) }), v = () => n.reload(), x = F("newKey"), h = F("createdKey"), C = F("revokeConfirm"), A = N(null), M = K(() => !l.account.deactivated_at), B = K(() => $.can(ce)), z = K(() => $.can(_e)), T = (a) => a.expires_at !== null && new Date(a.expires_at).getTime() < Date.now();
|
|
224
|
+
function I(a) {
|
|
225
|
+
return [
|
|
226
|
+
`${a.prefix}…`,
|
|
227
|
+
c("core.serviceaccounts.keys.made_by", { name: a.created_by.name, date: d.date(a.created_at) }),
|
|
228
|
+
a.last_used_at ? c("core.serviceaccounts.keys.last_used", { at: d.dateTime(a.last_used_at) }) : c("core.serviceaccounts.keys.never_used"),
|
|
229
|
+
a.expires_at ? c("core.serviceaccounts.keys.expires", { date: d.date(a.expires_at) }) : c("core.serviceaccounts.keys.no_expiry")
|
|
230
|
+
].join(" · ");
|
|
231
|
+
}
|
|
232
|
+
async function U() {
|
|
233
|
+
await v(), g("changed");
|
|
234
|
+
}
|
|
235
|
+
function Y(a) {
|
|
236
|
+
A.value = a, C.value?.present();
|
|
237
|
+
}
|
|
238
|
+
async function G() {
|
|
239
|
+
const a = A.value;
|
|
240
|
+
a && (await m.revokeKey(l.account.id, a.id), j.success(c("core.serviceaccounts.keys.revoked_toast")), A.value = null, await v(), g("changed"));
|
|
241
|
+
}
|
|
242
|
+
const S = (a) => j.error(i.sentence(a, c("core.serviceaccounts.keys.errors.revoke"))), y = (a) => h.value?.show(a);
|
|
243
|
+
return t({ reload: v }), (a, f) => (r(), E("div", je, [
|
|
244
|
+
s(e(be), {
|
|
245
|
+
state: e(n).state.value,
|
|
246
|
+
"skeleton-rows": 3,
|
|
247
|
+
"is-empty": () => !1,
|
|
248
|
+
onRetry: f[1] || (f[1] = (H) => v())
|
|
249
|
+
}, {
|
|
250
|
+
default: o(({ value: H }) => [
|
|
251
|
+
s(e(V), {
|
|
252
|
+
header: e(c)("core.serviceaccounts.keys.title"),
|
|
253
|
+
footer: e(c)("core.serviceaccounts.keys.footer")
|
|
254
|
+
}, {
|
|
255
|
+
default: o(() => [
|
|
256
|
+
H.length === 0 ? (r(), _(e(p), {
|
|
257
|
+
key: 0,
|
|
258
|
+
layout: "setting",
|
|
259
|
+
label: e(c)("core.serviceaccounts.keys.empty_title"),
|
|
260
|
+
sub: e(c)("core.serviceaccounts.keys.empty_description")
|
|
261
|
+
}, null, 8, ["label", "sub"])) : L("", !0),
|
|
262
|
+
(r(!0), E(se, null, oe(H, (b) => (r(), _(e(p), {
|
|
263
|
+
key: b.id,
|
|
264
|
+
layout: "setting",
|
|
265
|
+
label: b.name,
|
|
266
|
+
sub: I(b)
|
|
267
|
+
}, ne({
|
|
268
|
+
leading: o(() => [
|
|
269
|
+
s(e(ee), {
|
|
270
|
+
tone: b.revoked_at ? "anchor" : "brand",
|
|
271
|
+
icon: "key2Line"
|
|
272
|
+
}, null, 8, ["tone"])
|
|
273
|
+
]),
|
|
274
|
+
default: o(() => [
|
|
275
|
+
b.revoked_at ? (r(), _(e(O), {
|
|
276
|
+
key: 0,
|
|
277
|
+
tone: "critical"
|
|
278
|
+
}, {
|
|
279
|
+
default: o(() => [
|
|
280
|
+
R(w(e(c)("core.serviceaccounts.keys.revoked", { date: e(d).date(b.revoked_at) })), 1)
|
|
281
|
+
]),
|
|
282
|
+
_: 2
|
|
283
|
+
}, 1024)) : T(b) ? (r(), _(e(O), {
|
|
284
|
+
key: 1,
|
|
285
|
+
tone: "warning"
|
|
286
|
+
}, {
|
|
287
|
+
default: o(() => [
|
|
288
|
+
R(w(e(c)("core.serviceaccounts.keys.expired")), 1)
|
|
289
|
+
]),
|
|
290
|
+
_: 1
|
|
291
|
+
})) : L("", !0)
|
|
292
|
+
]),
|
|
293
|
+
_: 2
|
|
294
|
+
}, [
|
|
295
|
+
z.value && !b.revoked_at ? {
|
|
296
|
+
name: "trailing",
|
|
297
|
+
fn: o(() => [
|
|
298
|
+
D("span", {
|
|
299
|
+
class: "contents",
|
|
300
|
+
"data-test": `revoke-key-${b.id}`
|
|
301
|
+
}, [
|
|
302
|
+
s(e(J), {
|
|
303
|
+
prominence: "plain",
|
|
304
|
+
tone: "critical",
|
|
305
|
+
size: "sm",
|
|
306
|
+
onClick: (Ie) => Y(b)
|
|
307
|
+
}, {
|
|
308
|
+
default: o(() => [
|
|
309
|
+
R(w(e(c)("core.serviceaccounts.keys.revoke")), 1)
|
|
310
|
+
]),
|
|
311
|
+
_: 1
|
|
312
|
+
}, 8, ["onClick"])
|
|
313
|
+
], 8, Me)
|
|
314
|
+
]),
|
|
315
|
+
key: "0"
|
|
316
|
+
} : void 0
|
|
317
|
+
]), 1032, ["label", "sub"]))), 128)),
|
|
318
|
+
B.value && M.value ? (r(), _(e(p), {
|
|
319
|
+
key: 1,
|
|
320
|
+
layout: "stacked"
|
|
321
|
+
}, {
|
|
322
|
+
default: o(() => [
|
|
323
|
+
D("span", ze, [
|
|
324
|
+
s(e(J), {
|
|
325
|
+
prominence: "secondary",
|
|
326
|
+
icon: "addLine",
|
|
327
|
+
onClick: f[0] || (f[0] = (b) => x.value?.show())
|
|
328
|
+
}, {
|
|
329
|
+
default: o(() => [
|
|
330
|
+
R(w(e(c)("core.serviceaccounts.keys.new")), 1)
|
|
331
|
+
]),
|
|
332
|
+
_: 1
|
|
333
|
+
})
|
|
334
|
+
])
|
|
335
|
+
]),
|
|
336
|
+
_: 1
|
|
337
|
+
})) : L("", !0)
|
|
338
|
+
]),
|
|
339
|
+
_: 2
|
|
340
|
+
}, 1032, ["header", "footer"])
|
|
341
|
+
]),
|
|
342
|
+
_: 1
|
|
343
|
+
}, 8, ["state"]),
|
|
344
|
+
s(Ve, {
|
|
345
|
+
ref_key: "newKey",
|
|
346
|
+
ref: x,
|
|
347
|
+
account: l.account,
|
|
348
|
+
onCreated: y
|
|
349
|
+
}, null, 8, ["account"]),
|
|
350
|
+
s(Te, {
|
|
351
|
+
ref_key: "createdKey",
|
|
352
|
+
ref: h,
|
|
353
|
+
account: l.account,
|
|
354
|
+
onDone: U
|
|
355
|
+
}, null, 8, ["account"]),
|
|
356
|
+
s(e(te), {
|
|
357
|
+
ref_key: "revokeConfirm",
|
|
358
|
+
ref: C,
|
|
359
|
+
title: e(c)("core.serviceaccounts.keys.revoke_title"),
|
|
360
|
+
message: e(c)("core.serviceaccounts.keys.revoke_body", { name: A.value?.name ?? "", account: l.account.name }),
|
|
361
|
+
"confirm-label": e(c)("core.serviceaccounts.keys.revoke"),
|
|
362
|
+
tone: "critical",
|
|
363
|
+
action: G,
|
|
364
|
+
onFailed: S
|
|
365
|
+
}, null, 8, ["title", "message", "confirm-label"])
|
|
366
|
+
]));
|
|
367
|
+
}
|
|
368
|
+
}), Pe = { key: 0 }, qe = { class: "flex min-w-0 flex-col gap-group-gap" }, Be = {
|
|
369
|
+
key: 0,
|
|
370
|
+
class: "flex min-w-0 flex-col gap-group-gap",
|
|
371
|
+
"data-test": "service-general"
|
|
372
|
+
}, yt = /* @__PURE__ */ P({
|
|
373
|
+
__name: "ServiceAccountRecord",
|
|
374
|
+
setup(u) {
|
|
375
|
+
const { t } = q(), k = re(), { access: l } = ae(), g = Q(), c = le(), $ = W(), { tenants: d } = pe(), m = X(), i = ve({ param: "id", load: (S, { signal: y }) => $.show(S, { signal: y }) }), n = i.data, v = ["general", "access", "keys"], x = typeof k.query.tab == "string" ? k.query.tab : "", h = N(v.includes(x) ? x : "general"), C = N(null), A = F("editDialog"), M = F("deactivateConfirm"), B = K(() => l.can(ce)), z = K(() => n.value !== null && !n.value.deactivated_at), T = K(() => n.value?.tenant?.name ?? c.levelLabel("organization")), I = K(() => [
|
|
376
|
+
{ value: "general", label: t("core.serviceaccounts.tabs.general"), icon: "settings3Line" },
|
|
377
|
+
{ value: "access", label: t("core.serviceaccounts.tabs.access"), icon: "shieldStarFill", ...C.value !== null ? { badge: C.value } : {} },
|
|
378
|
+
{ value: "keys", label: t("core.serviceaccounts.tabs.keys"), icon: "key2Line", badge: n.value?.active_keys ?? 0 }
|
|
379
|
+
]), U = K(() => {
|
|
380
|
+
const S = n.value;
|
|
381
|
+
return !S || !B.value || !z.value ? [] : [
|
|
382
|
+
{ id: "edit", label: t("core.serviceaccounts.actions.edit"), icon: "edit", placement: "secondary", onClick: () => A.value?.show(S) },
|
|
383
|
+
{ id: "deactivate", label: t("core.serviceaccounts.actions.deactivate"), icon: "lockLine", placement: "overflow", tone: "critical", onClick: () => M.value?.present() }
|
|
384
|
+
];
|
|
385
|
+
});
|
|
386
|
+
async function Y() {
|
|
387
|
+
n.value && (i.update(await $.deactivate(n.value.id)), j.success(t("core.serviceaccounts.toasts.deactivated")));
|
|
388
|
+
}
|
|
389
|
+
const G = (S) => j.error(m.sentence(S, t("core.serviceaccounts.errors.deactivate")));
|
|
390
|
+
return (S, y) => (r(), _(e(fe), {
|
|
391
|
+
resource: e(i),
|
|
392
|
+
title: e(n)?.name || e(t)("core.serviceaccounts.title"),
|
|
393
|
+
back: { label: e(t)("core.serviceaccounts.title_plural"), to: e(ye).index },
|
|
394
|
+
actions: U.value,
|
|
395
|
+
width: "content"
|
|
396
|
+
}, {
|
|
397
|
+
header: o(({ record: a }) => [
|
|
398
|
+
s(e(de), {
|
|
399
|
+
title: a.name,
|
|
400
|
+
subtitle: e(d) ? T.value : void 0
|
|
401
|
+
}, {
|
|
402
|
+
leading: o(() => [
|
|
403
|
+
s(e(ee), {
|
|
404
|
+
tone: "anchor",
|
|
405
|
+
icon: "key2Line",
|
|
406
|
+
size: "lg"
|
|
407
|
+
})
|
|
408
|
+
]),
|
|
409
|
+
meta: o(() => [
|
|
410
|
+
s(e(O), { tone: "context" }, {
|
|
411
|
+
default: o(() => [
|
|
412
|
+
R(w(e(t)("core.serviceaccounts.title")), 1)
|
|
413
|
+
]),
|
|
414
|
+
_: 1
|
|
415
|
+
}),
|
|
416
|
+
e(d) ? (r(), E("span", Pe, w(T.value), 1)) : L("", !0),
|
|
417
|
+
z.value ? L("", !0) : (r(), _(e(O), {
|
|
418
|
+
key: 1,
|
|
419
|
+
tone: "neutral"
|
|
420
|
+
}, {
|
|
421
|
+
default: o(() => [
|
|
422
|
+
R(w(e(t)("core.serviceaccounts.deactivated")), 1)
|
|
423
|
+
]),
|
|
424
|
+
_: 1
|
|
425
|
+
}))
|
|
426
|
+
]),
|
|
427
|
+
_: 1
|
|
428
|
+
}, 8, ["title", "subtitle"])
|
|
429
|
+
]),
|
|
430
|
+
default: o(({ record: a }) => [
|
|
431
|
+
D("div", qe, [
|
|
432
|
+
s(e(ue), {
|
|
433
|
+
modelValue: h.value,
|
|
434
|
+
"onUpdate:modelValue": y[0] || (y[0] = (f) => h.value = f),
|
|
435
|
+
tabs: I.value
|
|
436
|
+
}, null, 8, ["modelValue", "tabs"]),
|
|
437
|
+
h.value === "general" ? (r(), E("div", Be, [
|
|
438
|
+
s(e(V), {
|
|
439
|
+
footer: e(t)("core.serviceaccounts.no_password")
|
|
440
|
+
}, {
|
|
441
|
+
default: o(() => [
|
|
442
|
+
s(e(p), {
|
|
443
|
+
layout: "value",
|
|
444
|
+
label: e(t)("core.serviceaccounts.fields.owner"),
|
|
445
|
+
value: a.owner.name
|
|
446
|
+
}, null, 8, ["label", "value"]),
|
|
447
|
+
e(d) ? (r(), _(e(p), {
|
|
448
|
+
key: 0,
|
|
449
|
+
layout: "value",
|
|
450
|
+
label: e(t)(e(d).labelKey),
|
|
451
|
+
value: T.value
|
|
452
|
+
}, null, 8, ["label", "value"])) : L("", !0),
|
|
453
|
+
a.description ? (r(), _(e(p), {
|
|
454
|
+
key: 1,
|
|
455
|
+
layout: "value",
|
|
456
|
+
label: e(t)("core.serviceaccounts.fields.description"),
|
|
457
|
+
value: a.description
|
|
458
|
+
}, null, 8, ["label", "value"])) : L("", !0),
|
|
459
|
+
s(e(p), {
|
|
460
|
+
layout: "value",
|
|
461
|
+
label: e(t)("core.serviceaccounts.made_by"),
|
|
462
|
+
value: `${a.created_by.name}, ${e(g).date(a.created_at)}`
|
|
463
|
+
}, null, 8, ["label", "value"]),
|
|
464
|
+
s(e(p), {
|
|
465
|
+
layout: "value",
|
|
466
|
+
label: e(t)("core.serviceaccounts.last_call_label"),
|
|
467
|
+
value: a.last_used_at ? e(g).dateTime(a.last_used_at) : e(t)("core.serviceaccounts.never_used")
|
|
468
|
+
}, null, 8, ["label", "value"]),
|
|
469
|
+
s(e(p), {
|
|
470
|
+
layout: "value",
|
|
471
|
+
label: e(t)("core.serviceaccounts.status"),
|
|
472
|
+
value: a.deactivated_at ? e(t)("core.serviceaccounts.deactivated_on", { date: e(g).date(a.deactivated_at) }) : e(t)("core.serviceaccounts.active")
|
|
473
|
+
}, null, 8, ["label", "value"])
|
|
474
|
+
]),
|
|
475
|
+
_: 2
|
|
476
|
+
}, 1032, ["footer"])
|
|
477
|
+
])) : h.value === "access" ? (r(), _(e(ie), {
|
|
478
|
+
key: 1,
|
|
479
|
+
subject: { kind: "service", id: a.id },
|
|
480
|
+
name: a.name,
|
|
481
|
+
"subject-label": e(d) ? `${a.name} · ${T.value}` : a.name,
|
|
482
|
+
onLoaded: y[1] || (y[1] = (f) => C.value = f)
|
|
483
|
+
}, null, 8, ["subject", "name", "subject-label"])) : (r(), _(Oe, {
|
|
484
|
+
key: 2,
|
|
485
|
+
account: a,
|
|
486
|
+
onChanged: y[2] || (y[2] = (f) => e(i).reload())
|
|
487
|
+
}, null, 8, ["account"]))
|
|
488
|
+
]),
|
|
489
|
+
s(ke, {
|
|
490
|
+
ref_key: "editDialog",
|
|
491
|
+
ref: A,
|
|
492
|
+
onSaved: y[3] || (y[3] = (f) => e(i).update(f))
|
|
493
|
+
}, null, 512),
|
|
494
|
+
s(e(te), {
|
|
495
|
+
ref_key: "deactivateConfirm",
|
|
496
|
+
ref: M,
|
|
497
|
+
title: e(t)("core.serviceaccounts.deactivate_title"),
|
|
498
|
+
message: e(t)("core.serviceaccounts.deactivate_body", { name: a.name }),
|
|
499
|
+
"confirm-label": e(t)("core.serviceaccounts.actions.deactivate"),
|
|
500
|
+
tone: "critical",
|
|
501
|
+
action: Y,
|
|
502
|
+
onFailed: G
|
|
503
|
+
}, null, 8, ["title", "message", "confirm-label"])
|
|
504
|
+
]),
|
|
505
|
+
_: 1
|
|
506
|
+
}, 8, ["resource", "title", "back", "actions"]));
|
|
507
|
+
}
|
|
508
|
+
});
|
|
509
|
+
export {
|
|
510
|
+
yt as default
|
|
511
|
+
};
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { defineComponent as F, useTemplateRef as M, ref as w, computed as n, openBlock as c, createBlock as d, unref as t, withCtx as r, createElementVNode as p, createVNode as l, createElementBlock as _, toDisplayString as b, createCommentVNode as x, Fragment as O, renderList as j, createTextVNode as q } from "vue";
|
|
2
|
+
import { useI18n as z } from "vue-i18n";
|
|
3
|
+
import { useRouter as D } from "vue-router";
|
|
4
|
+
import { u as G } from "./refusals-COPr15XZ.js";
|
|
5
|
+
import { _ as I } from "./IconTile.vue_vue_type_script_setup_true_lang-BmxCuUZ9.js";
|
|
6
|
+
import { _ as K } from "./Tabs.vue_vue_type_script_setup_true_lang-tpkGp98F.js";
|
|
7
|
+
import { _ as P } from "./FormGroup.vue_vue_type_script_setup_true_lang-BTADNpwB.js";
|
|
8
|
+
import { g as H } from "./options-QuOkMKVZ.js";
|
|
9
|
+
import { _ as J } from "./TextField.vue_vue_type_script_setup_true_lang-7IAl4eAE.js";
|
|
10
|
+
import { u as Q } from "./format-D8X4zsx6.js";
|
|
11
|
+
import { a as W } from "./AdaptivePageShell.vue_vue_type_script_setup_true_lang-9Lt1XggN.js";
|
|
12
|
+
import { u as X } from "./platform-Dr4iY3b8.js";
|
|
13
|
+
import { _ as Y } from "./AsyncSection.vue_vue_type_script_setup_true_lang-GxAsImnO.js";
|
|
14
|
+
import { _ as Z } from "./Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js";
|
|
15
|
+
import { u as ee } from "./useLoad-W4tfxmm5.js";
|
|
16
|
+
import { f as te, M as $, s as A } from "./index-CXTJ_1NV.js";
|
|
17
|
+
import { u as ae, _ as se } from "./ServiceAccountDialog.vue_vue_type_script_setup_true_lang-D2Xj5mr7.js";
|
|
18
|
+
const oe = {
|
|
19
|
+
class: "flex min-w-0 flex-col gap-group-gap",
|
|
20
|
+
"data-test": "service-segment"
|
|
21
|
+
}, ce = { class: "flex flex-wrap items-center gap-3" }, re = { "data-test": "service-accounts" }, ne = {
|
|
22
|
+
key: 0,
|
|
23
|
+
class: "px-row-inset py-6 text-center text-body text-content-muted",
|
|
24
|
+
"data-test": "service-accounts-empty"
|
|
25
|
+
}, le = {
|
|
26
|
+
key: 1,
|
|
27
|
+
class: "min-w-[4.5rem] text-right text-footnote tabular-nums text-content-muted",
|
|
28
|
+
"data-test": "account-keys"
|
|
29
|
+
}, Ve = /* @__PURE__ */ F({
|
|
30
|
+
__name: "ServiceAccountsList",
|
|
31
|
+
setup(ie) {
|
|
32
|
+
const { t: a } = z(), L = D(), { access: y } = X(), V = Q(), C = G(), N = ae(), { tenants: S } = te(), g = M("dialog"), v = ee(({ signal: e }) => N.list({ signal: e })), i = w("active"), f = w(""), h = n(() => v.data.value ?? []), u = (e) => e.deactivated_at === null, B = (e) => e.tenant?.name ?? C.levelLabel("organization"), m = n(() => {
|
|
33
|
+
const e = f.value.trim().toLowerCase();
|
|
34
|
+
return h.value.filter((o) => e === "" || `${o.name} ${o.description} ${o.owner.name}`.toLowerCase().includes(e));
|
|
35
|
+
}), k = n(() => m.value.filter((e) => i.value === "all" || i.value === "active" === u(e))), R = n(() => [
|
|
36
|
+
{ value: "active", label: a("core.serviceaccounts.views.active"), badge: m.value.filter(u).length },
|
|
37
|
+
{ value: "inactive", label: a("core.serviceaccounts.views.inactive"), badge: m.value.filter((e) => !u(e)).length },
|
|
38
|
+
{ value: "all", label: a("core.serviceaccounts.views.all"), badge: m.value.length }
|
|
39
|
+
]), T = n(
|
|
40
|
+
() => y.can($) ? [{ id: "create", label: a("core.serviceaccounts.create"), icon: "addLine", placement: "primary", compact: "icon", keyboardShortcut: { key: "N", ctrlKey: !0 }, onClick: () => g.value?.show() }] : []
|
|
41
|
+
);
|
|
42
|
+
function E(e) {
|
|
43
|
+
return [
|
|
44
|
+
e.description,
|
|
45
|
+
...S ? [B(e)] : [],
|
|
46
|
+
e.owner.name,
|
|
47
|
+
e.last_used_at ? a("core.serviceaccounts.last_call", { at: V.dateTime(e.last_used_at) }) : a("core.serviceaccounts.never_used")
|
|
48
|
+
].filter(Boolean).join(" · ");
|
|
49
|
+
}
|
|
50
|
+
const U = (e) => void L.push({ ...A.record({ id: e.id }), query: { tab: "access" } });
|
|
51
|
+
return (e, o) => (c(), d(t(W), {
|
|
52
|
+
title: t(a)("core.serviceaccounts.title_plural"),
|
|
53
|
+
description: t(a)("core.serviceaccounts.description"),
|
|
54
|
+
icon: "key2Line",
|
|
55
|
+
count: h.value.length || null,
|
|
56
|
+
actions: T.value
|
|
57
|
+
}, {
|
|
58
|
+
default: r(() => [
|
|
59
|
+
p("div", oe, [
|
|
60
|
+
p("div", ce, [
|
|
61
|
+
l(t(K), {
|
|
62
|
+
modelValue: i.value,
|
|
63
|
+
"onUpdate:modelValue": o[0] || (o[0] = (s) => i.value = s),
|
|
64
|
+
tabs: R.value,
|
|
65
|
+
presentation: "scope"
|
|
66
|
+
}, null, 8, ["modelValue", "tabs"]),
|
|
67
|
+
l(t(J), {
|
|
68
|
+
modelValue: f.value,
|
|
69
|
+
"onUpdate:modelValue": o[1] || (o[1] = (s) => f.value = s),
|
|
70
|
+
class: "min-w-[14rem] flex-1",
|
|
71
|
+
label: t(a)("core.serviceaccounts.search"),
|
|
72
|
+
"label-hidden": "",
|
|
73
|
+
placeholder: t(a)("core.serviceaccounts.search")
|
|
74
|
+
}, null, 8, ["modelValue", "label", "placeholder"])
|
|
75
|
+
]),
|
|
76
|
+
l(t(Y), {
|
|
77
|
+
state: t(v).state.value,
|
|
78
|
+
"skeleton-rows": 4,
|
|
79
|
+
"is-empty": () => !1,
|
|
80
|
+
onRetry: o[2] || (o[2] = (s) => t(v).reload())
|
|
81
|
+
}, {
|
|
82
|
+
default: r(() => [
|
|
83
|
+
p("div", re, [
|
|
84
|
+
l(t(P), {
|
|
85
|
+
footer: t(a)("core.serviceaccounts.no_password")
|
|
86
|
+
}, {
|
|
87
|
+
default: r(() => [
|
|
88
|
+
k.value.length === 0 ? (c(), _("p", ne, b(t(a)("core.serviceaccounts.empty")), 1)) : x("", !0),
|
|
89
|
+
(c(!0), _(O, null, j(k.value, (s) => (c(), d(t(H), {
|
|
90
|
+
key: s.id,
|
|
91
|
+
layout: "setting",
|
|
92
|
+
label: s.name,
|
|
93
|
+
sub: E(s),
|
|
94
|
+
to: t(A).record({ id: s.id }),
|
|
95
|
+
"data-service-account": s.id
|
|
96
|
+
}, {
|
|
97
|
+
leading: r(() => [
|
|
98
|
+
l(t(I), {
|
|
99
|
+
tone: "anchor",
|
|
100
|
+
icon: "key2Line"
|
|
101
|
+
})
|
|
102
|
+
]),
|
|
103
|
+
default: r(() => [
|
|
104
|
+
u(s) ? (c(), _("span", le, b(t(a)("core.serviceaccounts.active_keys", { count: s.active_keys })), 1)) : (c(), d(t(Z), {
|
|
105
|
+
key: 0,
|
|
106
|
+
tone: "neutral"
|
|
107
|
+
}, {
|
|
108
|
+
default: r(() => [
|
|
109
|
+
q(b(t(a)("core.serviceaccounts.deactivated")), 1)
|
|
110
|
+
]),
|
|
111
|
+
_: 1
|
|
112
|
+
}))
|
|
113
|
+
]),
|
|
114
|
+
_: 2
|
|
115
|
+
}, 1032, ["label", "sub", "to", "data-service-account"]))), 128))
|
|
116
|
+
]),
|
|
117
|
+
_: 1
|
|
118
|
+
}, 8, ["footer"])
|
|
119
|
+
])
|
|
120
|
+
]),
|
|
121
|
+
_: 1
|
|
122
|
+
}, 8, ["state"])
|
|
123
|
+
]),
|
|
124
|
+
t(y).can(t($)) ? (c(), d(se, {
|
|
125
|
+
key: 0,
|
|
126
|
+
ref_key: "dialog",
|
|
127
|
+
ref: g,
|
|
128
|
+
onSaved: U
|
|
129
|
+
}, null, 512)) : x("", !0)
|
|
130
|
+
]),
|
|
131
|
+
_: 1
|
|
132
|
+
}, 8, ["title", "description", "count", "actions"]));
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
export {
|
|
136
|
+
Ve as default
|
|
137
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent as v, openBlock as t, createBlock as c, unref as n, withCtx as o, createCommentVNode as s, createElementBlock as d, Fragment as w, renderList as C, createSlots as $, createElementVNode as l, toDisplayString as r, createTextVNode as m, createVNode as f } from "vue";
|
|
2
2
|
import { useI18n as E } from "vue-i18n";
|
|
3
|
-
import { _ as y } from "./Button.vue_vue_type_script_setup_true_lang-
|
|
4
|
-
import { _ as B } from "./IconTile.vue_vue_type_script_setup_true_lang-
|
|
3
|
+
import { _ as y } from "./Button.vue_vue_type_script_setup_true_lang-DQq_0P0p.js";
|
|
4
|
+
import { _ as B } from "./IconTile.vue_vue_type_script_setup_true_lang-BmxCuUZ9.js";
|
|
5
5
|
import { u as N } from "./format-D8X4zsx6.js";
|
|
6
|
-
import { _ as V } from "./FormGroup.vue_vue_type_script_setup_true_lang-
|
|
7
|
-
import { g as h } from "./options-
|
|
6
|
+
import { _ as V } from "./FormGroup.vue_vue_type_script_setup_true_lang-BTADNpwB.js";
|
|
7
|
+
import { g as h } from "./options-QuOkMKVZ.js";
|
|
8
8
|
import { _ as k } from "./Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js";
|
|
9
9
|
const L = {
|
|
10
10
|
class: "flex flex-col gap-y-0.5 md:flex-row md:flex-wrap md:items-center md:gap-x-1.5",
|