@cobaltcore-dev/aurora 0.6.0 → 0.8.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/README.md +160 -20
- package/dist/client/AuroraApp.d.ts +38 -0
- package/dist/client/{ContentHeader-kx1Th5Sq.mjs → ContentHeader-DqsGNvtD.mjs} +17 -17
- package/dist/client/{ContentHeader-kx1Th5Sq.mjs.map → ContentHeader-DqsGNvtD.mjs.map} +1 -1
- package/dist/client/{DeleteFlavorModal-C3cb7YiJ.mjs → DeleteFlavorModal-C3m7bQJu.mjs} +163 -163
- package/dist/client/{DeleteFlavorModal-C3cb7YiJ.mjs.map → DeleteFlavorModal-C3m7bQJu.mjs.map} +1 -1
- package/dist/client/{EditSecurityGroupModal-CpP54WIK.mjs → EditSecurityGroupModal-DKusxfta.mjs} +18 -18
- package/dist/client/{EditSecurityGroupModal-CpP54WIK.mjs.map → EditSecurityGroupModal-DKusxfta.mjs.map} +1 -1
- package/dist/client/{FiltersInput-DxcyR6Bp.mjs → FiltersInput-GzR4D0q6.mjs} +21 -21
- package/dist/client/{FiltersInput-DxcyR6Bp.mjs.map → FiltersInput-GzR4D0q6.mjs.map} +1 -1
- package/dist/client/{FloatingIpActionModals-BP8RWHbu.mjs → FloatingIpActionModals-CRvROJ3H.mjs} +51 -51
- package/dist/client/{FloatingIpActionModals-BP8RWHbu.mjs.map → FloatingIpActionModals-CRvROJ3H.mjs.map} +1 -1
- package/dist/client/{ImageToastNotifications-TZ3EfQg-.mjs → ImageToastNotifications-BuDXpTkl.mjs} +344 -344
- package/dist/client/{ImageToastNotifications-TZ3EfQg-.mjs.map → ImageToastNotifications-BuDXpTkl.mjs.map} +1 -1
- package/dist/client/{RouteError-QSV7qOoJ.mjs → RouteError-DVAiT0mT.mjs} +2 -2
- package/dist/client/{RouteError-QSV7qOoJ.mjs.map → RouteError-DVAiT0mT.mjs.map} +1 -1
- package/dist/client/{SortInput-CYv2_Pur.mjs → SortInput-VK7IYqQv.mjs} +6 -6
- package/dist/client/{SortInput-CYv2_Pur.mjs.map → SortInput-VK7IYqQv.mjs.map} +1 -1
- package/dist/client/_auth-DXJkv9QO.mjs.map +1 -1
- package/dist/client/{_flavorId-C2x43-6S.mjs → _flavorId-B9Vqkraj.mjs} +8 -8
- package/dist/client/{_flavorId-C2x43-6S.mjs.map → _flavorId-B9Vqkraj.mjs.map} +1 -1
- package/dist/client/{_flavorId-CR8ZUI-P.mjs → _flavorId-CFpNGz52.mjs} +62 -62
- package/dist/client/{_flavorId-CR8ZUI-P.mjs.map → _flavorId-CFpNGz52.mjs.map} +1 -1
- package/dist/client/{_floatingIpId-BCk41_Lb.mjs → _floatingIpId-B5GMSLeQ.mjs} +2 -2
- package/dist/client/{_floatingIpId-BCk41_Lb.mjs.map → _floatingIpId-B5GMSLeQ.mjs.map} +1 -1
- package/dist/client/{_floatingIpId-BGrOAmPT.mjs → _floatingIpId-C2-BeRmF.mjs} +27 -27
- package/dist/client/{_floatingIpId-BGrOAmPT.mjs.map → _floatingIpId-C2-BeRmF.mjs.map} +1 -1
- package/dist/client/_imageId-9NZytfNs.mjs +534 -0
- package/dist/client/{_imageId-CvfD832b.mjs.map → _imageId-9NZytfNs.mjs.map} +1 -1
- package/dist/client/_pcaId-BwTvJJgh.mjs +479 -0
- package/dist/client/_pcaId-BwTvJJgh.mjs.map +1 -0
- package/dist/client/{_pcaId-DOHycvCf.mjs → _pcaId-DUHQd0rB.mjs} +2 -2
- package/dist/client/{_pcaId-DOHycvCf.mjs.map → _pcaId-DUHQd0rB.mjs.map} +1 -1
- package/dist/client/{_projectId-DOgwFiqD.mjs → _projectId-B_2sZKk-.mjs} +2 -2
- package/dist/client/{_projectId-DOgwFiqD.mjs.map → _projectId-B_2sZKk-.mjs.map} +1 -1
- package/dist/client/{_projectId-MxcHrXW4.mjs → _projectId-CLgClx24.mjs} +3 -3
- package/dist/client/{_projectId-MxcHrXW4.mjs.map → _projectId-CLgClx24.mjs.map} +1 -1
- package/dist/client/_projectId-cW9aQ4Ag.mjs +271 -0
- package/dist/client/_projectId-cW9aQ4Ag.mjs.map +1 -0
- package/dist/client/{_securityGroupId-KKw4RPdH.mjs → _securityGroupId-DYxmXUOP.mjs} +319 -319
- package/dist/client/{_securityGroupId-KKw4RPdH.mjs.map → _securityGroupId-DYxmXUOP.mjs.map} +1 -1
- package/dist/client/{_securityGroupId-CJJanWiY.mjs → _securityGroupId-fhK1CuZh.mjs} +2 -2
- package/dist/client/{_securityGroupId-CJJanWiY.mjs.map → _securityGroupId-fhK1CuZh.mjs.map} +1 -1
- package/dist/client/{_storageType-DYjo-6ej.mjs → _storageType-2_fau4B5.mjs} +698 -698
- package/dist/client/{_storageType-DYjo-6ej.mjs.map → _storageType-2_fau4B5.mjs.map} +1 -1
- package/dist/client/{_storageType-4wSxI__0.mjs → _storageType-dRTFMKG3.mjs} +2 -2
- package/dist/client/{_storageType-4wSxI__0.mjs.map → _storageType-dRTFMKG3.mjs.map} +1 -1
- package/dist/client/{about-Bo9vxGHy.mjs → about-Nsxkyh9U.mjs} +2 -2
- package/dist/client/{about-Bo9vxGHy.mjs.map → about-Nsxkyh9U.mjs.map} +1 -1
- package/dist/client/{build-DeJcDjPi.mjs → build-BdRRmNf5.mjs} +3290 -3274
- package/dist/client/{build-DeJcDjPi.mjs.map → build-BdRRmNf5.mjs.map} +1 -1
- package/dist/client/{constants-BmcGYeR-.mjs → constants-J5nm9hbP.mjs} +15 -15
- package/dist/client/{constants-BmcGYeR-.mjs.map → constants-J5nm9hbP.mjs.map} +1 -1
- package/dist/client/{flavors-BxFVqgnb.mjs → flavors-_P7R-CeT.mjs} +2 -2
- package/dist/client/{flavors-BxFVqgnb.mjs.map → flavors-_P7R-CeT.mjs.map} +1 -1
- package/dist/client/{flavors-CfdgjsZY.mjs → flavors-m1qDHzeS.mjs} +238 -221
- package/dist/client/flavors-m1qDHzeS.mjs.map +1 -0
- package/dist/client/{floatingips-ByRb82wS.mjs → floatingips-Dq4DXQYb.mjs} +90 -90
- package/dist/client/{floatingips-ByRb82wS.mjs.map → floatingips-Dq4DXQYb.mjs.map} +1 -1
- package/dist/client/{images-CenluYV8.mjs → images-CpM-T_jM.mjs} +2 -2
- package/dist/client/{images-CenluYV8.mjs.map → images-CpM-T_jM.mjs.map} +1 -1
- package/dist/client/images-DHmVgQAh2.mjs +1890 -0
- package/dist/client/images-DHmVgQAh2.mjs.map +1 -0
- package/dist/client/{images-C_dX7nY6.mjs → images-Dbjo4yKn.mjs} +2 -2
- package/dist/client/{images-C_dX7nY6.mjs.map → images-Dbjo4yKn.mjs.map} +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +390 -356
- package/dist/client/index.js.map +1 -1
- package/dist/client/{objects-gxSjvbvF.mjs → objects-DKWp9RtR.mjs} +2 -2
- package/dist/client/{objects-gxSjvbvF.mjs.map → objects-DKWp9RtR.mjs.map} +1 -1
- package/dist/client/{objects-BJM6YeuF.mjs → objects-DaCuy_CB.mjs} +1156 -1156
- package/dist/client/{objects-BJM6YeuF.mjs.map → objects-DaCuy_CB.mjs.map} +1 -1
- package/dist/client/{pca-Bl8NmoVZ.mjs → pca-C8zWTSSt.mjs} +2 -2
- package/dist/client/{pca-Bl8NmoVZ.mjs.map → pca-C8zWTSSt.mjs.map} +1 -1
- package/dist/client/pca-CK5-j7Kk.mjs +202 -0
- package/dist/client/pca-CK5-j7Kk.mjs.map +1 -0
- package/dist/client/{projects-pe2_dCnV.mjs → projects-CHYn7L5e.mjs} +2 -2
- package/dist/client/{projects-pe2_dCnV.mjs.map → projects-CHYn7L5e.mjs.map} +1 -1
- package/dist/client/{projects-D2iewAzu.mjs → projects-CeLhtLvf.mjs} +2 -2
- package/dist/client/{projects-D2iewAzu.mjs.map → projects-CeLhtLvf.mjs.map} +1 -1
- package/dist/client/{projects-CgclWI16.mjs → projects-ClViaUuv.mjs} +11 -11
- package/dist/client/{projects-CgclWI16.mjs.map → projects-ClViaUuv.mjs.map} +1 -1
- package/dist/client/{_projectId-BDSWnMGj.mjs → routeInfo-DlDJZnpg.mjs} +34 -8
- package/dist/client/routeInfo-DlDJZnpg.mjs.map +1 -0
- package/dist/client/{securitygroups-DahZkVYQ.mjs → securitygroups-CNFLu9zS.mjs} +112 -112
- package/dist/client/{securitygroups-DahZkVYQ.mjs.map → securitygroups-CNFLu9zS.mjs.map} +1 -1
- package/dist/client/{useListWithFiltering-DaYcu5AB.mjs → useListWithFiltering-v2A0-SZb.mjs} +9 -9
- package/dist/client/{useListWithFiltering-DaYcu5AB.mjs.map → useListWithFiltering-v2A0-SZb.mjs.map} +1 -1
- package/dist/server/index.d.ts +576 -2
- package/dist/server/index.js +59 -217
- package/package.json +4 -5
- package/dist/client/_imageId-CvfD832b.mjs +0 -534
- package/dist/client/_pcaId-BxBt5DXi.mjs +0 -459
- package/dist/client/_pcaId-BxBt5DXi.mjs.map +0 -1
- package/dist/client/_projectId-BDSWnMGj.mjs.map +0 -1
- package/dist/client/_projectId-DS4nR59B.mjs +0 -299
- package/dist/client/_projectId-DS4nR59B.mjs.map +0 -1
- package/dist/client/flavors-CfdgjsZY.mjs.map +0 -1
- package/dist/client/images-CKqIXUq52.mjs +0 -1873
- package/dist/client/images-CKqIXUq52.mjs.map +0 -1
- package/dist/client/pca-RSiWpJs9.mjs +0 -182
- package/dist/client/pca-RSiWpJs9.mjs.map +0 -1
|
@@ -1,146 +1,163 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { D as e, E as t, G as n, H as r, J as i, L as a, N as o, Q as s, S as c, V as l, Y as u, _ as d, ct as f, et as p, it as m, k as h, m as g, ot as _, p as v, rt as y, x as b } from "./build-BdRRmNf5.mjs";
|
|
2
2
|
import { t as x } from "./useErrorTranslation-Dc0eE8Zt.mjs";
|
|
3
|
-
import { t as S } from "./flavors-
|
|
4
|
-
import { t as C } from "./ContentHeader-
|
|
5
|
-
import { n as w, r as T, t as E } from "./DeleteFlavorModal-
|
|
6
|
-
import { t as D } from "./SortInput-
|
|
3
|
+
import { t as S } from "./flavors-_P7R-CeT.mjs";
|
|
4
|
+
import { t as C } from "./ContentHeader-DqsGNvtD.mjs";
|
|
5
|
+
import { n as w, r as T, t as E } from "./DeleteFlavorModal-C3m7bQJu.mjs";
|
|
6
|
+
import { t as D } from "./SortInput-VK7IYqQv.mjs";
|
|
7
7
|
import { Fragment as O, jsx as k, jsxs as A } from "react/jsx-runtime";
|
|
8
8
|
import { Suspense as j, startTransition as M, use as N, useCallback as P, useEffect as F, useRef as I, useState as L } from "react";
|
|
9
|
-
import { useNavigate as R, useParams as
|
|
10
|
-
import { TRPCClientError as
|
|
11
|
-
import { Trans as
|
|
12
|
-
import { ErrorBoundary as
|
|
9
|
+
import { useNavigate as R, useParams as ee, useSearch as z } from "@tanstack/react-router";
|
|
10
|
+
import { TRPCClientError as B } from "@trpc/client";
|
|
11
|
+
import { Trans as V, useLingui as H } from "@lingui/react";
|
|
12
|
+
import { ErrorBoundary as U } from "react-error-boundary";
|
|
13
13
|
//#region src/client/routes/_auth/projects/$projectId/compute/-components/Flavors/-components/FlavorListContainer.tsx
|
|
14
|
-
var
|
|
15
|
-
let { i18n: C, _: D } =
|
|
14
|
+
var W = ({ flavors: i, isLoading: c, client: l, project: d, onFlavorDeleted: f, canDeleteFlavor: m, canMangageAccess: g, canManageSpecs: v, canListSpecs: y, currentPage: b = 1, totalPages: x = 1, onPageChange: S }) => {
|
|
15
|
+
let { i18n: C, _: D } = H(), j = R(), [M, N] = L(!1), [P, I] = L(!1), [z, B] = L(!1), [U, W] = L(null), [G, K] = L(b.toString());
|
|
16
|
+
F(() => {
|
|
17
|
+
K(b.toString());
|
|
18
|
+
}, [b]);
|
|
19
|
+
let { projectId: q } = ee({ from: "/_auth/projects/$projectId/compute/flavors/" }), J = (e) => {
|
|
16
20
|
W(e), N(!0);
|
|
17
|
-
},
|
|
18
|
-
W(e),
|
|
19
|
-
},
|
|
21
|
+
}, Y = (e) => {
|
|
22
|
+
W(e), I(!0);
|
|
23
|
+
}, X = (e) => {
|
|
20
24
|
W(e), B(!0);
|
|
21
|
-
},
|
|
25
|
+
}, Z = () => {
|
|
22
26
|
N(!1), W(null);
|
|
27
|
+
}, Q = () => {
|
|
28
|
+
U && f && f(U.name || ""), Z();
|
|
29
|
+
}, $ = (e) => {
|
|
30
|
+
e >= 1 && e <= x && (S?.(e), K(e.toString()));
|
|
23
31
|
};
|
|
24
|
-
return
|
|
32
|
+
return c ? /*#__PURE__*/ k("div", {
|
|
25
33
|
"data-testid": "loading",
|
|
26
34
|
children: /*#__PURE__*/ k("div", {
|
|
27
35
|
"data-testid": "loading",
|
|
28
|
-
children: /*#__PURE__*/ k(
|
|
36
|
+
children: /*#__PURE__*/ k(o, { children: /*#__PURE__*/ k(n, {
|
|
29
37
|
colSpan: 3,
|
|
30
|
-
children: /*#__PURE__*/ A(
|
|
38
|
+
children: /*#__PURE__*/ A(u, {
|
|
31
39
|
distribution: "center",
|
|
32
40
|
alignment: "center",
|
|
33
|
-
children: [/*#__PURE__*/ k(
|
|
41
|
+
children: [/*#__PURE__*/ k(r, { variant: "primary" }), /*#__PURE__*/ k(V, { id: "Z3FXyt" })]
|
|
34
42
|
})
|
|
35
43
|
}) })
|
|
36
44
|
})
|
|
37
|
-
}) : !
|
|
45
|
+
}) : !i || i.length === 0 ? /*#__PURE__*/ k(p, {
|
|
38
46
|
columns: 7,
|
|
39
47
|
className: "flavors",
|
|
40
48
|
"data-testid": "no-flavors",
|
|
41
|
-
children: /*#__PURE__*/ k(
|
|
49
|
+
children: /*#__PURE__*/ k(o, { children: /*#__PURE__*/ A(n, {
|
|
42
50
|
colSpan: 7,
|
|
43
|
-
children: [/*#__PURE__*/ k(
|
|
51
|
+
children: [/*#__PURE__*/ k(s, { children: /*#__PURE__*/ k(V, { id: "PiyQJ/" }) }), /*#__PURE__*/ k("p", { children: /*#__PURE__*/ k(V, { id: "KSW/GC" }) })]
|
|
44
52
|
}) })
|
|
45
53
|
}) : /*#__PURE__*/ A(O, { children: [
|
|
46
|
-
/*#__PURE__*/ A(
|
|
54
|
+
/*#__PURE__*/ A(p, {
|
|
47
55
|
columns: 7,
|
|
48
56
|
minContentColumns: [6],
|
|
49
57
|
className: "flavors",
|
|
50
58
|
"data-testid": "flavors-table",
|
|
51
|
-
children: [/*#__PURE__*/ A(
|
|
52
|
-
/*#__PURE__*/ k(
|
|
53
|
-
/*#__PURE__*/ k(
|
|
54
|
-
/*#__PURE__*/ k(
|
|
55
|
-
/*#__PURE__*/ k(
|
|
56
|
-
/*#__PURE__*/ k(
|
|
57
|
-
/*#__PURE__*/ k(
|
|
58
|
-
/*#__PURE__*/ k(
|
|
59
|
-
] }),
|
|
60
|
-
"data-testid": `flavor-row-${
|
|
59
|
+
children: [/*#__PURE__*/ A(o, { children: [
|
|
60
|
+
/*#__PURE__*/ k(a, { children: /*#__PURE__*/ k(V, { id: "6YtxFj" }) }),
|
|
61
|
+
/*#__PURE__*/ k(a, { children: /*#__PURE__*/ k(V, { id: "k5nYwm" }) }),
|
|
62
|
+
/*#__PURE__*/ k(a, { children: /*#__PURE__*/ k(V, { id: "K+e/0e" }) }),
|
|
63
|
+
/*#__PURE__*/ k(a, { children: /*#__PURE__*/ k(V, { id: "n0ZttO" }) }),
|
|
64
|
+
/*#__PURE__*/ k(a, { children: /*#__PURE__*/ k(V, { id: "p4nMut" }) }),
|
|
65
|
+
/*#__PURE__*/ k(a, { children: /*#__PURE__*/ k(V, { id: "HyyJ83" }) }),
|
|
66
|
+
/*#__PURE__*/ k(a, {})
|
|
67
|
+
] }), i.map((t) => /*#__PURE__*/ A(o, {
|
|
68
|
+
"data-testid": `flavor-row-${t.id}`,
|
|
61
69
|
onClick: () => j({
|
|
62
70
|
to: "/projects/$projectId/compute/flavors/$flavorId",
|
|
63
71
|
params: {
|
|
64
|
-
projectId:
|
|
65
|
-
flavorId:
|
|
72
|
+
projectId: q,
|
|
73
|
+
flavorId: t.id
|
|
66
74
|
}
|
|
67
75
|
}),
|
|
68
76
|
children: [
|
|
69
|
-
/*#__PURE__*/ k(n, { children:
|
|
70
|
-
/*#__PURE__*/ k(n, { children:
|
|
71
|
-
/*#__PURE__*/ k(n, { children:
|
|
72
|
-
/*#__PURE__*/ k(n, { children:
|
|
73
|
-
/*#__PURE__*/ k(n, { children:
|
|
74
|
-
/*#__PURE__*/ k(n, { children:
|
|
77
|
+
/*#__PURE__*/ k(n, { children: t.name || t.id }),
|
|
78
|
+
/*#__PURE__*/ k(n, { children: t.vcpus || "–" }),
|
|
79
|
+
/*#__PURE__*/ k(n, { children: t.ram || "–" }),
|
|
80
|
+
/*#__PURE__*/ k(n, { children: t.disk || "–" }),
|
|
81
|
+
/*#__PURE__*/ k(n, { children: t.swap || "–" }),
|
|
82
|
+
/*#__PURE__*/ k(n, { children: t["os-flavor-access:is_public"] === !1 ? C._({ id: "zwBp5t" }) : C._({ id: "7d1a0d" }) }),
|
|
75
83
|
/*#__PURE__*/ k(n, {
|
|
76
84
|
onClick: (e) => e.stopPropagation(),
|
|
77
|
-
children: /*#__PURE__*/ k(
|
|
78
|
-
/*#__PURE__*/ k(
|
|
85
|
+
children: /*#__PURE__*/ k(e, { children: /*#__PURE__*/ A(_, { children: [
|
|
86
|
+
/*#__PURE__*/ k(h, {
|
|
79
87
|
label: C._({ id: "URmyfc" }),
|
|
80
88
|
onClick: () => j({
|
|
81
89
|
to: "/projects/$projectId/compute/flavors/$flavorId",
|
|
82
90
|
params: {
|
|
83
|
-
projectId:
|
|
84
|
-
flavorId:
|
|
91
|
+
projectId: q,
|
|
92
|
+
flavorId: t.id
|
|
85
93
|
}
|
|
86
94
|
})
|
|
87
95
|
}),
|
|
88
|
-
(
|
|
89
|
-
label:
|
|
90
|
-
onClick: () =>
|
|
96
|
+
(v || y) && /*#__PURE__*/ k(h, {
|
|
97
|
+
label: v ? C._({ id: "SIfYq6" }) : C._({ id: "6GBt0m" }),
|
|
98
|
+
onClick: () => Y(t)
|
|
91
99
|
}),
|
|
92
|
-
|
|
100
|
+
g && /*#__PURE__*/ k(h, {
|
|
93
101
|
label: C._({ id: "cWbW6w" }),
|
|
94
|
-
onClick: () =>
|
|
95
|
-
disabled:
|
|
102
|
+
onClick: () => X(t),
|
|
103
|
+
disabled: t["os-flavor-access:is_public"] !== !1
|
|
96
104
|
}),
|
|
97
|
-
|
|
105
|
+
m && /*#__PURE__*/ k(h, {
|
|
98
106
|
label: C._({ id: "JT3I1g" }),
|
|
99
|
-
onClick: () =>
|
|
107
|
+
onClick: () => J(t)
|
|
100
108
|
})
|
|
101
109
|
] }) })
|
|
102
110
|
})
|
|
103
111
|
]
|
|
104
|
-
},
|
|
112
|
+
}, t.id))]
|
|
105
113
|
}),
|
|
106
114
|
x > 1 && /*#__PURE__*/ k("div", {
|
|
107
115
|
className: "flex justify-center py-4",
|
|
108
|
-
children: /*#__PURE__*/ k(
|
|
116
|
+
children: /*#__PURE__*/ k(t, {
|
|
109
117
|
variant: "input",
|
|
110
|
-
currentPage:
|
|
118
|
+
currentPage: b,
|
|
111
119
|
pages: x,
|
|
112
|
-
onPressPrevious: () =>
|
|
113
|
-
onPressNext: () =>
|
|
114
|
-
onSelectChange: (e) =>
|
|
120
|
+
onPressPrevious: () => $(Math.max(b - 1, 1)),
|
|
121
|
+
onPressNext: () => $(Math.min(b + 1, x)),
|
|
122
|
+
onSelectChange: (e) => {
|
|
123
|
+
$(e);
|
|
124
|
+
},
|
|
125
|
+
onInputChange: (e) => {
|
|
126
|
+
K(e === void 0 ? "" : String(e));
|
|
127
|
+
},
|
|
128
|
+
onKeyDown: (e) => {
|
|
129
|
+
if (e.key === "Enter" && G !== "") {
|
|
130
|
+
let e = parseInt(G, 10);
|
|
131
|
+
!isNaN(e) && e >= 1 && e <= x && $(e);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
115
134
|
})
|
|
116
135
|
}),
|
|
117
136
|
/*#__PURE__*/ k(E, {
|
|
118
|
-
client:
|
|
137
|
+
client: l,
|
|
119
138
|
isOpen: M,
|
|
120
|
-
onClose:
|
|
121
|
-
project:
|
|
122
|
-
flavor:
|
|
123
|
-
onSuccess:
|
|
124
|
-
V && l && l(V.name || ""), Y();
|
|
125
|
-
}
|
|
139
|
+
onClose: Z,
|
|
140
|
+
project: d,
|
|
141
|
+
flavor: U,
|
|
142
|
+
onSuccess: Q
|
|
126
143
|
}),
|
|
127
144
|
/*#__PURE__*/ k(T, {
|
|
128
|
-
client:
|
|
145
|
+
client: l,
|
|
129
146
|
isOpen: P,
|
|
130
|
-
onClose: () =>
|
|
131
|
-
project:
|
|
132
|
-
flavor:
|
|
133
|
-
canEdit:
|
|
147
|
+
onClose: () => I(!1),
|
|
148
|
+
project: d,
|
|
149
|
+
flavor: U,
|
|
150
|
+
canEdit: v
|
|
134
151
|
}),
|
|
135
152
|
/*#__PURE__*/ k(w, {
|
|
136
|
-
client:
|
|
137
|
-
isOpen:
|
|
153
|
+
client: l,
|
|
154
|
+
isOpen: z,
|
|
138
155
|
onClose: () => B(!1),
|
|
139
|
-
project:
|
|
140
|
-
flavor:
|
|
156
|
+
project: d,
|
|
157
|
+
flavor: U
|
|
141
158
|
})
|
|
142
159
|
] });
|
|
143
|
-
},
|
|
160
|
+
}, G = (e, t, n) => {
|
|
144
161
|
switch (e) {
|
|
145
162
|
case "id":
|
|
146
163
|
if (!t) return;
|
|
@@ -182,7 +199,7 @@ var G = ({ flavors: e, isLoading: r, client: s, project: c, onFlavorDeleted: l,
|
|
|
182
199
|
case "os-flavor-access:is_public": return t == null || typeof t == "boolean" || typeof t == "string" && (t === "true" || t === "false") ? void 0 : n({ id: "MmtQVF" });
|
|
183
200
|
default: return;
|
|
184
201
|
}
|
|
185
|
-
},
|
|
202
|
+
}, K = (e) => {
|
|
186
203
|
let t = {
|
|
187
204
|
name: String(e.name),
|
|
188
205
|
vcpus: Number(e.vcpus),
|
|
@@ -190,26 +207,26 @@ var G = ({ flavors: e, isLoading: r, client: s, project: c, onFlavorDeleted: l,
|
|
|
190
207
|
disk: Number(e.disk)
|
|
191
208
|
}, n = (e) => e != null && e !== "" && String(e).trim() !== "", r = (e) => e != null && e !== "" && String(e).trim() !== "" && !isNaN(Number(e));
|
|
192
209
|
return n(e.id) && (t.id = String(e.id).trim()), n(e.description) && (t.description = String(e.description).trim()), r(e.swap) && (t.swap = Number(e.swap)), r(e.rxtx_factor) && (t.rxtx_factor = Number(e.rxtx_factor)), r(e["OS-FLV-EXT-DATA:ephemeral"]) && (t["OS-FLV-EXT-DATA:ephemeral"] = Number(e["OS-FLV-EXT-DATA:ephemeral"])), e["os-flavor-access:is_public"] !== void 0 && (t["os-flavor-access:is_public"] = !!e["os-flavor-access:is_public"]), t;
|
|
193
|
-
},
|
|
194
|
-
let { i18n:
|
|
210
|
+
}, q = ({ client: e, isOpen: t, onClose: n, project: a, onSuccess: o }) => {
|
|
211
|
+
let { i18n: s, _: l } = H(), { translateError: d } = x(), [p, h] = L({ "os-flavor-access:is_public": !0 }), [_, y] = L({}), [S, C] = L(!1), [w, T] = L(null), E = (e) => {
|
|
195
212
|
let { name: t, value: n, type: r, checked: i } = e.target;
|
|
196
|
-
|
|
213
|
+
h((e) => ({
|
|
197
214
|
...e,
|
|
198
215
|
[t]: r === "checkbox" ? i : n
|
|
199
216
|
})), w && T(null);
|
|
200
217
|
}, D = (e, t) => {
|
|
201
|
-
|
|
218
|
+
h((n) => ({
|
|
202
219
|
...n,
|
|
203
220
|
[e]: t
|
|
204
221
|
})), w && T(null);
|
|
205
222
|
}, O = (e) => {
|
|
206
|
-
let { name: t, value: n } = e.target, r =
|
|
207
|
-
|
|
223
|
+
let { name: t, value: n } = e.target, r = G(t, n, l);
|
|
224
|
+
y((e) => ({
|
|
208
225
|
...e,
|
|
209
226
|
[t]: r
|
|
210
227
|
}));
|
|
211
|
-
}, j = async (
|
|
212
|
-
|
|
228
|
+
}, j = async (t) => {
|
|
229
|
+
t.preventDefault(), T(null);
|
|
213
230
|
let n = {};
|
|
214
231
|
if ([
|
|
215
232
|
"name",
|
|
@@ -217,7 +234,7 @@ var G = ({ flavors: e, isLoading: r, client: s, project: c, onFlavorDeleted: l,
|
|
|
217
234
|
"ram",
|
|
218
235
|
"disk"
|
|
219
236
|
].forEach((e) => {
|
|
220
|
-
let t =
|
|
237
|
+
let t = G(e, p[e], l);
|
|
221
238
|
t && (n[e] = t);
|
|
222
239
|
}), [
|
|
223
240
|
"id",
|
|
@@ -227,151 +244,151 @@ var G = ({ flavors: e, isLoading: r, client: s, project: c, onFlavorDeleted: l,
|
|
|
227
244
|
"description",
|
|
228
245
|
"os-flavor-access:is_public"
|
|
229
246
|
].forEach((e) => {
|
|
230
|
-
let t =
|
|
247
|
+
let t = p[e];
|
|
231
248
|
if (t !== void 0 && t !== "" && t !== null) {
|
|
232
|
-
let r =
|
|
249
|
+
let r = G(e, t, l);
|
|
233
250
|
r && (n[e] = r);
|
|
234
251
|
}
|
|
235
252
|
}), Object.keys(n).length > 0) {
|
|
236
|
-
|
|
253
|
+
y(n), T(s._({ id: "CBFSfX" }));
|
|
237
254
|
return;
|
|
238
255
|
}
|
|
239
256
|
try {
|
|
240
257
|
C(!0);
|
|
241
|
-
let
|
|
242
|
-
await
|
|
243
|
-
project_id:
|
|
244
|
-
flavor:
|
|
245
|
-
}),
|
|
258
|
+
let t = K(p);
|
|
259
|
+
await e.compute.createFlavor.mutate({
|
|
260
|
+
project_id: a,
|
|
261
|
+
flavor: t
|
|
262
|
+
}), o(t.name), M();
|
|
246
263
|
} catch (e) {
|
|
247
|
-
T(e?.message ?
|
|
264
|
+
T(e?.message ? d(e.message) : s._({ id: "OxDN2m" }));
|
|
248
265
|
} finally {
|
|
249
266
|
C(!1);
|
|
250
267
|
}
|
|
251
268
|
}, M = () => {
|
|
252
|
-
|
|
269
|
+
h({ "os-flavor-access:is_public": !0 }), y({}), T(null), n();
|
|
253
270
|
};
|
|
254
|
-
return /*#__PURE__*/ A(
|
|
271
|
+
return /*#__PURE__*/ A(f, {
|
|
255
272
|
onCancel: M,
|
|
256
273
|
size: "large",
|
|
257
|
-
title:
|
|
258
|
-
open:
|
|
274
|
+
title: s._({ id: "Rlp5zj" }),
|
|
275
|
+
open: t,
|
|
259
276
|
onConfirm: j,
|
|
260
|
-
cancelButtonLabel:
|
|
261
|
-
confirmButtonLabel:
|
|
262
|
-
children: [S && /*#__PURE__*/ k(
|
|
277
|
+
cancelButtonLabel: s._({ id: "dEgA5A" }),
|
|
278
|
+
confirmButtonLabel: s._({ id: "wEfZld" }),
|
|
279
|
+
children: [S && /*#__PURE__*/ k(u, {
|
|
263
280
|
distribution: "center",
|
|
264
281
|
alignment: "center",
|
|
265
|
-
children: /*#__PURE__*/ k(
|
|
266
|
-
}), !S && /*#__PURE__*/ A(
|
|
282
|
+
children: /*#__PURE__*/ k(r, { variant: "primary" })
|
|
283
|
+
}), !S && /*#__PURE__*/ A(b, { children: [w && /*#__PURE__*/ k(c, { children: /*#__PURE__*/ k(i, {
|
|
267
284
|
onDismiss: () => {
|
|
268
285
|
T(null);
|
|
269
286
|
},
|
|
270
287
|
text: w,
|
|
271
288
|
variant: "error"
|
|
272
|
-
}) }), /*#__PURE__*/ A(
|
|
273
|
-
/*#__PURE__*/ k(
|
|
289
|
+
}) }), /*#__PURE__*/ A(v, { children: [
|
|
290
|
+
/*#__PURE__*/ k(c, { children: /*#__PURE__*/ k(g, {
|
|
274
291
|
id: "id",
|
|
275
292
|
name: "id",
|
|
276
|
-
label:
|
|
277
|
-
value:
|
|
293
|
+
label: s._({ id: "s2ubkU" }),
|
|
294
|
+
value: p.id || "",
|
|
278
295
|
onChange: E,
|
|
279
296
|
onBlur: O,
|
|
280
|
-
errortext:
|
|
297
|
+
errortext: _.id
|
|
281
298
|
}) }),
|
|
282
|
-
/*#__PURE__*/ k(
|
|
299
|
+
/*#__PURE__*/ k(c, { children: /*#__PURE__*/ k(g, {
|
|
283
300
|
id: "name",
|
|
284
301
|
name: "name",
|
|
285
|
-
label:
|
|
286
|
-
value:
|
|
302
|
+
label: s._({ id: "lWxDDh" }),
|
|
303
|
+
value: p.name || "",
|
|
287
304
|
onChange: E,
|
|
288
305
|
onBlur: O,
|
|
289
|
-
errortext:
|
|
306
|
+
errortext: _.name,
|
|
290
307
|
required: !0
|
|
291
308
|
}) }),
|
|
292
|
-
/*#__PURE__*/ k(
|
|
309
|
+
/*#__PURE__*/ k(c, { children: /*#__PURE__*/ k(g, {
|
|
293
310
|
id: "description",
|
|
294
311
|
name: "description",
|
|
295
|
-
label:
|
|
296
|
-
value:
|
|
312
|
+
label: s._({ id: "Nu4oKW" }),
|
|
313
|
+
value: p.description || "",
|
|
297
314
|
onChange: E,
|
|
298
315
|
onBlur: O,
|
|
299
|
-
errortext:
|
|
316
|
+
errortext: _.description
|
|
300
317
|
}) }),
|
|
301
|
-
/*#__PURE__*/ k(
|
|
318
|
+
/*#__PURE__*/ k(c, { children: /*#__PURE__*/ k(g, {
|
|
302
319
|
id: "vcpus",
|
|
303
320
|
name: "vcpus",
|
|
304
|
-
label:
|
|
305
|
-
value: String(
|
|
321
|
+
label: s._({ id: "MZGbkp" }),
|
|
322
|
+
value: String(p.vcpus || ""),
|
|
306
323
|
onChange: (e) => D("vcpus", Number(e.target.value)),
|
|
307
324
|
onBlur: O,
|
|
308
|
-
errortext:
|
|
325
|
+
errortext: _.vcpus,
|
|
309
326
|
type: "number",
|
|
310
327
|
required: !0
|
|
311
328
|
}) }),
|
|
312
|
-
/*#__PURE__*/ k(
|
|
329
|
+
/*#__PURE__*/ k(c, { children: /*#__PURE__*/ k(g, {
|
|
313
330
|
id: "ram",
|
|
314
331
|
name: "ram",
|
|
315
|
-
label:
|
|
316
|
-
value: String(
|
|
332
|
+
label: s._({ id: "K+e/0e" }),
|
|
333
|
+
value: String(p.ram || ""),
|
|
317
334
|
onChange: (e) => D("ram", Number(e.target.value)),
|
|
318
335
|
onBlur: O,
|
|
319
|
-
errortext:
|
|
336
|
+
errortext: _.ram,
|
|
320
337
|
type: "number",
|
|
321
338
|
required: !0
|
|
322
339
|
}) }),
|
|
323
|
-
/*#__PURE__*/ k(
|
|
340
|
+
/*#__PURE__*/ k(c, { children: /*#__PURE__*/ k(g, {
|
|
324
341
|
id: "disk",
|
|
325
342
|
name: "disk",
|
|
326
|
-
label:
|
|
327
|
-
value: String(
|
|
343
|
+
label: s._({ id: "AxZkIr" }),
|
|
344
|
+
value: String(p.disk || ""),
|
|
328
345
|
onChange: (e) => D("disk", Number(e.target.value)),
|
|
329
346
|
onBlur: O,
|
|
330
|
-
errortext:
|
|
347
|
+
errortext: _.disk,
|
|
331
348
|
type: "number",
|
|
332
349
|
required: !0
|
|
333
350
|
}) }),
|
|
334
|
-
/*#__PURE__*/ k(
|
|
351
|
+
/*#__PURE__*/ k(c, { children: /*#__PURE__*/ k(g, {
|
|
335
352
|
id: "OS-FLV-EXT-DATA:ephemeral",
|
|
336
353
|
name: "OS-FLV-EXT-DATA:ephemeral",
|
|
337
|
-
label:
|
|
338
|
-
value: String(
|
|
354
|
+
label: s._({ id: "X2OnDx" }),
|
|
355
|
+
value: String(p["OS-FLV-EXT-DATA:ephemeral"] || ""),
|
|
339
356
|
onChange: (e) => D("OS-FLV-EXT-DATA:ephemeral", Number(e.target.value)),
|
|
340
357
|
onBlur: O,
|
|
341
|
-
errortext:
|
|
358
|
+
errortext: _["OS-FLV-EXT-DATA:ephemeral"],
|
|
342
359
|
type: "number"
|
|
343
360
|
}) }),
|
|
344
|
-
/*#__PURE__*/ k(
|
|
361
|
+
/*#__PURE__*/ k(c, { children: /*#__PURE__*/ k(g, {
|
|
345
362
|
id: "swap",
|
|
346
363
|
name: "swap",
|
|
347
|
-
label:
|
|
348
|
-
value: String(
|
|
364
|
+
label: s._({ id: "p4nMut" }),
|
|
365
|
+
value: String(p.swap || ""),
|
|
349
366
|
onChange: (e) => D("swap", e.target.value ? Number(e.target.value) : void 0),
|
|
350
367
|
onBlur: O,
|
|
351
|
-
errortext:
|
|
368
|
+
errortext: _.swap,
|
|
352
369
|
type: "number"
|
|
353
370
|
}) }),
|
|
354
|
-
/*#__PURE__*/ k(
|
|
371
|
+
/*#__PURE__*/ k(c, { children: /*#__PURE__*/ k(g, {
|
|
355
372
|
id: "rxtx_factor",
|
|
356
373
|
name: "rxtx_factor",
|
|
357
|
-
label:
|
|
374
|
+
label: s._({ id: "u5HztT" }),
|
|
358
375
|
defaultValue: 1,
|
|
359
|
-
value: String(
|
|
376
|
+
value: String(p.rxtx_factor || ""),
|
|
360
377
|
onChange: (e) => D("rxtx_factor", Number(e.target.value)),
|
|
361
378
|
onBlur: O,
|
|
362
|
-
errortext:
|
|
379
|
+
errortext: _.rxtx_factor,
|
|
363
380
|
type: "number"
|
|
364
381
|
}) }),
|
|
365
|
-
/*#__PURE__*/ k(
|
|
382
|
+
/*#__PURE__*/ k(c, { children: /*#__PURE__*/ k(m, {
|
|
366
383
|
name: "os-flavor-access:is_public",
|
|
367
|
-
label:
|
|
368
|
-
helptext:
|
|
369
|
-
checked: !!
|
|
384
|
+
label: s._({ id: "vbajgL" }),
|
|
385
|
+
helptext: s._({ id: "3nh/7E" }),
|
|
386
|
+
checked: !!p["os-flavor-access:is_public"],
|
|
370
387
|
onChange: E
|
|
371
388
|
}) })
|
|
372
389
|
] })] })]
|
|
373
390
|
});
|
|
374
|
-
},
|
|
391
|
+
}, J = 50, Y = (e, t, n, r, i) => e.compute.getFlavorsByProjectId.query({
|
|
375
392
|
project_id: t,
|
|
376
393
|
sortBy: n,
|
|
377
394
|
sortDirection: r,
|
|
@@ -380,13 +397,13 @@ var G = ({ flavors: e, isLoading: r, client: s, project: c, onFlavorDeleted: l,
|
|
|
380
397
|
...e,
|
|
381
398
|
listError: void 0
|
|
382
399
|
})).catch((e) => {
|
|
383
|
-
if (e instanceof
|
|
400
|
+
if (e instanceof B && e.data?.code === "FORBIDDEN") return {
|
|
384
401
|
flavors: [],
|
|
385
402
|
privateFlavorError: void 0,
|
|
386
403
|
listError: e.message
|
|
387
404
|
};
|
|
388
405
|
throw e;
|
|
389
|
-
}),
|
|
406
|
+
}), X = (e, t) => e.compute.canUser.query({
|
|
390
407
|
project_id: t,
|
|
391
408
|
permission: [
|
|
392
409
|
"flavors:create",
|
|
@@ -403,124 +420,124 @@ var G = ({ flavors: e, isLoading: r, client: s, project: c, onFlavorDeleted: l,
|
|
|
403
420
|
canManageSpecs: r || i,
|
|
404
421
|
canListSpecs: a
|
|
405
422
|
}));
|
|
406
|
-
function
|
|
407
|
-
let { i18n:
|
|
423
|
+
function Z({ flavorsPromise: e, permissionsPromise: t, client: n, project: r, onFlavorDeleted: a, onFlavorCreated: o, searchTerm: s, setSearchTerm: c, sortSettings: f, handleSortChange: p, createModalOpen: m, setCreateModalOpen: h, currentPage: g, onPageChange: _ }) {
|
|
424
|
+
let { i18n: v, _: b } = H(), { flavors: x, privateFlavorError: S, listError: C } = N(e), w = N(t), [T, E] = L(s), j = I(void 0);
|
|
408
425
|
if (F(() => () => clearTimeout(j.current), []), C) return /*#__PURE__*/ k("p", { children: C });
|
|
409
|
-
let M = Math.max(1, Math.ceil(x.length /
|
|
426
|
+
let M = Math.max(1, Math.ceil(x.length / J)), P = Math.min(g, M), R = x.slice((P - 1) * J, P * J);
|
|
410
427
|
return F(() => {
|
|
411
|
-
|
|
428
|
+
g > M && _(1);
|
|
412
429
|
}, [
|
|
413
430
|
M,
|
|
414
|
-
|
|
415
|
-
|
|
431
|
+
g,
|
|
432
|
+
_
|
|
416
433
|
]), /*#__PURE__*/ A(O, { children: [
|
|
417
|
-
/*#__PURE__*/ k(
|
|
418
|
-
client:
|
|
419
|
-
isOpen:
|
|
420
|
-
project:
|
|
421
|
-
onClose: () =>
|
|
422
|
-
onSuccess:
|
|
434
|
+
/*#__PURE__*/ k(q, {
|
|
435
|
+
client: n,
|
|
436
|
+
isOpen: m,
|
|
437
|
+
project: r,
|
|
438
|
+
onClose: () => h(!1),
|
|
439
|
+
onSuccess: o
|
|
423
440
|
}),
|
|
424
|
-
S && /*#__PURE__*/ k(
|
|
441
|
+
S && /*#__PURE__*/ k(i, {
|
|
425
442
|
className: "mb-4",
|
|
426
|
-
text:
|
|
443
|
+
text: v._({ id: "3oc18/" }),
|
|
427
444
|
variant: "warning"
|
|
428
445
|
}),
|
|
429
|
-
/*#__PURE__*/ A(
|
|
446
|
+
/*#__PURE__*/ A(u, {
|
|
430
447
|
distribution: "end",
|
|
431
448
|
alignment: "center",
|
|
432
449
|
gap: "2",
|
|
433
450
|
className: "pb-2",
|
|
434
|
-
children: [/*#__PURE__*/ k(
|
|
451
|
+
children: [/*#__PURE__*/ k(u, {
|
|
435
452
|
gap: "0.5",
|
|
436
453
|
children: /*#__PURE__*/ k(D, {
|
|
437
454
|
options: f.options,
|
|
438
455
|
sortBy: f.sortBy,
|
|
439
456
|
sortDirection: f.sortDirection ?? "asc",
|
|
440
|
-
onSortByChange: (e) =>
|
|
457
|
+
onSortByChange: (e) => p({
|
|
441
458
|
...f,
|
|
442
459
|
sortBy: e,
|
|
443
460
|
sortDirection: f.sortDirection
|
|
444
461
|
}),
|
|
445
|
-
onSortDirectionChange: (e) =>
|
|
462
|
+
onSortDirectionChange: (e) => p({
|
|
446
463
|
...f,
|
|
447
464
|
sortDirection: e
|
|
448
465
|
})
|
|
449
466
|
})
|
|
450
|
-
}), w.canCreate && /*#__PURE__*/ k(
|
|
467
|
+
}), w.canCreate && /*#__PURE__*/ k(d, {
|
|
451
468
|
variant: "primary",
|
|
452
|
-
label:
|
|
453
|
-
onClick: () =>
|
|
469
|
+
label: v._({ id: "Rlp5zj" }),
|
|
470
|
+
onClick: () => h(!0)
|
|
454
471
|
})]
|
|
455
472
|
}),
|
|
456
|
-
/*#__PURE__*/ k(
|
|
473
|
+
/*#__PURE__*/ k(y, { children: /*#__PURE__*/ k(u, {
|
|
457
474
|
distribution: "end",
|
|
458
475
|
alignment: "center",
|
|
459
|
-
children: /*#__PURE__*/ k(
|
|
460
|
-
placeholder:
|
|
476
|
+
children: /*#__PURE__*/ k(l, {
|
|
477
|
+
placeholder: v._({ id: "U0sPCo" }),
|
|
461
478
|
"data-testid": "searchbar",
|
|
462
479
|
value: T,
|
|
463
480
|
onInput: (e) => {
|
|
464
481
|
let t = e.currentTarget.value;
|
|
465
|
-
E(t), clearTimeout(j.current), j.current = window.setTimeout(() =>
|
|
482
|
+
E(t), clearTimeout(j.current), j.current = window.setTimeout(() => c(t), 500);
|
|
466
483
|
},
|
|
467
484
|
onSearch: (e) => {
|
|
468
|
-
clearTimeout(j.current),
|
|
485
|
+
clearTimeout(j.current), c(typeof e == "string" ? e : "");
|
|
469
486
|
},
|
|
470
487
|
onClear: () => {
|
|
471
|
-
clearTimeout(j.current), E(""),
|
|
488
|
+
clearTimeout(j.current), E(""), c("");
|
|
472
489
|
}
|
|
473
490
|
})
|
|
474
491
|
}) }),
|
|
475
|
-
/*#__PURE__*/ k(
|
|
492
|
+
/*#__PURE__*/ k(W, {
|
|
476
493
|
flavors: R,
|
|
477
494
|
isLoading: !1,
|
|
478
|
-
client:
|
|
479
|
-
project:
|
|
480
|
-
onFlavorDeleted:
|
|
495
|
+
client: n,
|
|
496
|
+
project: r,
|
|
497
|
+
onFlavorDeleted: a,
|
|
481
498
|
canDeleteFlavor: w.canDelete,
|
|
482
499
|
canMangageAccess: w.canManageAccess,
|
|
483
500
|
canManageSpecs: w.canManageSpecs,
|
|
484
501
|
canListSpecs: w.canListSpecs,
|
|
485
502
|
currentPage: P,
|
|
486
503
|
totalPages: M,
|
|
487
|
-
onPageChange:
|
|
504
|
+
onPageChange: _
|
|
488
505
|
})
|
|
489
506
|
] });
|
|
490
507
|
}
|
|
491
|
-
var
|
|
492
|
-
let { i18n:
|
|
508
|
+
var Q = ({ client: e, project: t }) => {
|
|
509
|
+
let { i18n: n, _: a } = H(), o = R(), s = z({ strict: !1 }), [c, l] = L({
|
|
493
510
|
options: [
|
|
494
511
|
{
|
|
495
|
-
label:
|
|
512
|
+
label: n._({ id: "6YtxFj" }),
|
|
496
513
|
value: "name"
|
|
497
514
|
},
|
|
498
515
|
{
|
|
499
|
-
label:
|
|
516
|
+
label: n._({ id: "MZGbkp" }),
|
|
500
517
|
value: "vcpus"
|
|
501
518
|
},
|
|
502
519
|
{
|
|
503
|
-
label:
|
|
520
|
+
label: n._({ id: "RGhYAo" }),
|
|
504
521
|
value: "ram"
|
|
505
522
|
},
|
|
506
523
|
{
|
|
507
|
-
label:
|
|
524
|
+
label: n._({ id: "cJDQIO" }),
|
|
508
525
|
value: "disk"
|
|
509
526
|
},
|
|
510
527
|
{
|
|
511
|
-
label:
|
|
528
|
+
label: n._({ id: "vH2C/2" }),
|
|
512
529
|
value: "swap"
|
|
513
530
|
}
|
|
514
531
|
],
|
|
515
|
-
sortBy:
|
|
516
|
-
sortDirection:
|
|
517
|
-
}), [d, f] = L(
|
|
532
|
+
sortBy: s.sortBy || "name",
|
|
533
|
+
sortDirection: s.sortDirection || "asc"
|
|
534
|
+
}), [d, f] = L(s.search || ""), p = s.page ?? 1, [m, h] = L(), [g, _] = L(!1), [v, y] = L(() => Y(e, t, c.sortBy, c.sortDirection, d)), [b] = L(() => X(e, t)), x = () => {
|
|
518
535
|
M(() => {
|
|
519
|
-
y(
|
|
536
|
+
y(Y(e, t, c.sortBy, c.sortDirection, d));
|
|
520
537
|
});
|
|
521
538
|
}, S = (e) => {
|
|
522
539
|
h({
|
|
523
|
-
message:
|
|
540
|
+
message: n._({
|
|
524
541
|
id: "20Kpaw",
|
|
525
542
|
values: { flavorName: e }
|
|
526
543
|
}),
|
|
@@ -528,19 +545,19 @@ var $ = ({ client: t, project: n }) => {
|
|
|
528
545
|
}), setTimeout(() => h(void 0), 5e3), x();
|
|
529
546
|
}, C = (e) => {
|
|
530
547
|
h({
|
|
531
|
-
message:
|
|
548
|
+
message: n._({
|
|
532
549
|
id: "eChIh7",
|
|
533
550
|
values: { flavorName: e }
|
|
534
551
|
}),
|
|
535
552
|
timestamp: Date.now()
|
|
536
553
|
}), setTimeout(() => h(void 0), 5e3), x();
|
|
537
|
-
}, w = (
|
|
554
|
+
}, w = (n) => {
|
|
538
555
|
let r = {
|
|
539
|
-
options:
|
|
540
|
-
sortBy:
|
|
541
|
-
sortDirection:
|
|
556
|
+
options: n.options,
|
|
557
|
+
sortBy: n.sortBy?.toString() || "name",
|
|
558
|
+
sortDirection: n.sortDirection || "asc"
|
|
542
559
|
};
|
|
543
|
-
|
|
560
|
+
l(r), o({
|
|
544
561
|
search: (e) => ({
|
|
545
562
|
...e,
|
|
546
563
|
sortBy: r.sortBy,
|
|
@@ -549,11 +566,11 @@ var $ = ({ client: t, project: n }) => {
|
|
|
549
566
|
}),
|
|
550
567
|
replace: !0
|
|
551
568
|
}), M(() => {
|
|
552
|
-
y(
|
|
569
|
+
y(Y(e, t, r.sortBy, r.sortDirection, d));
|
|
553
570
|
});
|
|
554
|
-
}, T = (
|
|
555
|
-
let r = typeof
|
|
556
|
-
f(r),
|
|
571
|
+
}, T = (n) => {
|
|
572
|
+
let r = typeof n == "string" ? n : "";
|
|
573
|
+
f(r), o({
|
|
557
574
|
search: (e) => ({
|
|
558
575
|
...e,
|
|
559
576
|
search: r || void 0,
|
|
@@ -561,49 +578,49 @@ var $ = ({ client: t, project: n }) => {
|
|
|
561
578
|
}),
|
|
562
579
|
replace: !0
|
|
563
580
|
}), M(() => {
|
|
564
|
-
y(
|
|
581
|
+
y(Y(e, t, c.sortBy, c.sortDirection, r));
|
|
565
582
|
});
|
|
566
583
|
}, E = P((e) => {
|
|
567
|
-
|
|
584
|
+
o({ search: (t) => ({
|
|
568
585
|
...t,
|
|
569
586
|
page: e === 1 ? void 0 : e
|
|
570
587
|
}) });
|
|
571
|
-
}, [
|
|
588
|
+
}, [o]);
|
|
572
589
|
return /*#__PURE__*/ A("div", {
|
|
573
590
|
className: "relative",
|
|
574
|
-
children: [m && /*#__PURE__*/ k(
|
|
591
|
+
children: [m && /*#__PURE__*/ k(i, {
|
|
575
592
|
className: "absolute -top-14 right-0 left-0 z-50",
|
|
576
593
|
text: m.message,
|
|
577
594
|
variant: "info",
|
|
578
595
|
onDismiss: () => h(void 0),
|
|
579
596
|
dismissible: !0
|
|
580
|
-
}), /*#__PURE__*/ k(
|
|
581
|
-
fallbackRender: ({ error:
|
|
597
|
+
}), /*#__PURE__*/ k(U, {
|
|
598
|
+
fallbackRender: ({ error: e }) => /*#__PURE__*/ k(i, {
|
|
582
599
|
variant: "error",
|
|
583
|
-
text:
|
|
600
|
+
text: e instanceof Error ? e.message : n._({ id: "W5A0Ly" })
|
|
584
601
|
}),
|
|
585
602
|
children: /*#__PURE__*/ k(j, {
|
|
586
|
-
fallback: /*#__PURE__*/ A(
|
|
603
|
+
fallback: /*#__PURE__*/ A(u, {
|
|
587
604
|
className: "fixed inset-0",
|
|
588
605
|
distribution: "center",
|
|
589
606
|
alignment: "center",
|
|
590
607
|
direction: "vertical",
|
|
591
|
-
children: [/*#__PURE__*/ k(
|
|
608
|
+
children: [/*#__PURE__*/ k(r, {
|
|
592
609
|
variant: "primary",
|
|
593
610
|
size: "large",
|
|
594
611
|
className: "mb-2"
|
|
595
|
-
}), /*#__PURE__*/ k(
|
|
612
|
+
}), /*#__PURE__*/ k(V, { id: "EqSPkP" })]
|
|
596
613
|
}),
|
|
597
|
-
children: /*#__PURE__*/ k(
|
|
614
|
+
children: /*#__PURE__*/ k(Z, {
|
|
598
615
|
flavorsPromise: v,
|
|
599
616
|
permissionsPromise: b,
|
|
600
|
-
client:
|
|
601
|
-
project:
|
|
617
|
+
client: e,
|
|
618
|
+
project: t,
|
|
602
619
|
onFlavorDeleted: S,
|
|
603
620
|
onFlavorCreated: C,
|
|
604
621
|
searchTerm: d,
|
|
605
622
|
setSearchTerm: T,
|
|
606
|
-
sortSettings:
|
|
623
|
+
sortSettings: c,
|
|
607
624
|
handleSortChange: w,
|
|
608
625
|
createModalOpen: g,
|
|
609
626
|
setCreateModalOpen: _,
|
|
@@ -616,17 +633,17 @@ var $ = ({ client: t, project: n }) => {
|
|
|
616
633
|
};
|
|
617
634
|
//#endregion
|
|
618
635
|
//#region src/client/routes/_auth/projects/$projectId/compute/flavors/index.tsx?tsr-split=component
|
|
619
|
-
function
|
|
620
|
-
let { i18n: e, _: t } =
|
|
636
|
+
function $() {
|
|
637
|
+
let { i18n: e, _: t } = H(), { projectId: n } = S.useParams(), { trpcClient: r } = S.useRouteContext();
|
|
621
638
|
return /*#__PURE__*/ A(O, { children: [/*#__PURE__*/ k(C, {
|
|
622
639
|
title: e._({ id: "neiJm0" }),
|
|
623
640
|
projectId: n
|
|
624
|
-
}), /*#__PURE__*/ k(
|
|
641
|
+
}), /*#__PURE__*/ k(Q, {
|
|
625
642
|
project: n,
|
|
626
643
|
client: r
|
|
627
644
|
})] });
|
|
628
645
|
}
|
|
629
646
|
//#endregion
|
|
630
|
-
export {
|
|
647
|
+
export { $ as component };
|
|
631
648
|
|
|
632
|
-
//# sourceMappingURL=flavors-
|
|
649
|
+
//# sourceMappingURL=flavors-m1qDHzeS.mjs.map
|