@cobaltcore-dev/aurora 0.1.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.
Files changed (142) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +141 -0
  3. package/dist/client/AuroraApp.d.ts +7 -0
  4. package/dist/client/AuthProvider-D-5Jpa6F.mjs +100 -0
  5. package/dist/client/AuthProvider-D-5Jpa6F.mjs.map +1 -0
  6. package/dist/client/ContentHeader-H8KGY3Wd.mjs +81 -0
  7. package/dist/client/ContentHeader-H8KGY3Wd.mjs.map +1 -0
  8. package/dist/client/DeleteFlavorModal-B98oiHWx.mjs +629 -0
  9. package/dist/client/DeleteFlavorModal-B98oiHWx.mjs.map +1 -0
  10. package/dist/client/EditSecurityGroupModal-wQVNIVg1.mjs +137 -0
  11. package/dist/client/EditSecurityGroupModal-wQVNIVg1.mjs.map +1 -0
  12. package/dist/client/FloatingIpActionModals-qu1NMI5a.mjs +417 -0
  13. package/dist/client/FloatingIpActionModals-qu1NMI5a.mjs.map +1 -0
  14. package/dist/client/ImageToastNotifications-wsQDNEh7.mjs +1267 -0
  15. package/dist/client/ImageToastNotifications-wsQDNEh7.mjs.map +1 -0
  16. package/dist/client/ListToolbar-CHlkZrpl.mjs +223 -0
  17. package/dist/client/ListToolbar-CHlkZrpl.mjs.map +1 -0
  18. package/dist/client/RouteError-BwgDIwJE.mjs +25 -0
  19. package/dist/client/RouteError-BwgDIwJE.mjs.map +1 -0
  20. package/dist/client/_auth-CsliQdkJ.mjs +11 -0
  21. package/dist/client/_auth-CsliQdkJ.mjs.map +1 -0
  22. package/dist/client/_flavorId-D_A53VYa.mjs +56 -0
  23. package/dist/client/_flavorId-D_A53VYa.mjs.map +1 -0
  24. package/dist/client/_flavorId-DbhYLFxY.mjs +190 -0
  25. package/dist/client/_flavorId-DbhYLFxY.mjs.map +1 -0
  26. package/dist/client/_floatingIpId-BGgftRBQ.mjs +21 -0
  27. package/dist/client/_floatingIpId-BGgftRBQ.mjs.map +1 -0
  28. package/dist/client/_floatingIpId-D5myuLFz.mjs +228 -0
  29. package/dist/client/_floatingIpId-D5myuLFz.mjs.map +1 -0
  30. package/dist/client/_imageId-BoHX155h.mjs +27 -0
  31. package/dist/client/_imageId-BoHX155h.mjs.map +1 -0
  32. package/dist/client/_imageId-CTa0c3Av.mjs +530 -0
  33. package/dist/client/_imageId-CTa0c3Av.mjs.map +1 -0
  34. package/dist/client/_pcaId-C7Lrv1H_.mjs +242 -0
  35. package/dist/client/_pcaId-C7Lrv1H_.mjs.map +1 -0
  36. package/dist/client/_pcaId-DBgz5V_9.mjs +21 -0
  37. package/dist/client/_pcaId-DBgz5V_9.mjs.map +1 -0
  38. package/dist/client/_projectId-B9fln31N.mjs +8 -0
  39. package/dist/client/_projectId-B9fln31N.mjs.map +1 -0
  40. package/dist/client/_projectId-Be1Erj68.mjs +300 -0
  41. package/dist/client/_projectId-Be1Erj68.mjs.map +1 -0
  42. package/dist/client/_projectId-C-E4NNgo.mjs +84 -0
  43. package/dist/client/_projectId-C-E4NNgo.mjs.map +1 -0
  44. package/dist/client/_projectId-INhedXor.mjs +26 -0
  45. package/dist/client/_projectId-INhedXor.mjs.map +1 -0
  46. package/dist/client/_securityGroupId-DQoRQ-yA.mjs +1647 -0
  47. package/dist/client/_securityGroupId-DQoRQ-yA.mjs.map +1 -0
  48. package/dist/client/_securityGroupId-ihjy8Lcd.mjs +21 -0
  49. package/dist/client/_securityGroupId-ihjy8Lcd.mjs.map +1 -0
  50. package/dist/client/about-oT6ccz8T.mjs +92 -0
  51. package/dist/client/about-oT6ccz8T.mjs.map +1 -0
  52. package/dist/client/aurora-D_NPTbo-.mjs +19 -0
  53. package/dist/client/aurora-D_NPTbo-.mjs.map +1 -0
  54. package/dist/client/build-eu9eg0zF.mjs +14619 -0
  55. package/dist/client/build-eu9eg0zF.mjs.map +1 -0
  56. package/dist/client/buildFilterParams-BDOIRDeD.mjs +15 -0
  57. package/dist/client/buildFilterParams-BDOIRDeD.mjs.map +1 -0
  58. package/dist/client/cn-C3laVXMm.mjs +10 -0
  59. package/dist/client/cn-C3laVXMm.mjs.map +1 -0
  60. package/dist/client/constants-ByHCdNsI.mjs +128 -0
  61. package/dist/client/constants-ByHCdNsI.mjs.map +1 -0
  62. package/dist/client/containers-B_ozmVlx.mjs +74 -0
  63. package/dist/client/containers-B_ozmVlx.mjs.map +1 -0
  64. package/dist/client/containers-Dx7TYruP.mjs +7 -0
  65. package/dist/client/containers-Dx7TYruP.mjs.map +1 -0
  66. package/dist/client/containers-rn_ntCJu.mjs +3029 -0
  67. package/dist/client/containers-rn_ntCJu.mjs.map +1 -0
  68. package/dist/client/flavors-CT4auvLO.mjs +565 -0
  69. package/dist/client/flavors-CT4auvLO.mjs.map +1 -0
  70. package/dist/client/flavors-DRZb9LJP.mjs +8 -0
  71. package/dist/client/flavors-DRZb9LJP.mjs.map +1 -0
  72. package/dist/client/flavors-DtgMd0Ii.mjs +12 -0
  73. package/dist/client/flavors-DtgMd0Ii.mjs.map +1 -0
  74. package/dist/client/floatingips-DG5cFJSZ.mjs +12 -0
  75. package/dist/client/floatingips-DG5cFJSZ.mjs.map +1 -0
  76. package/dist/client/floatingips-iCMR0ZiL.mjs +436 -0
  77. package/dist/client/floatingips-iCMR0ZiL.mjs.map +1 -0
  78. package/dist/client/formatBytes-GYujK0dP.mjs +38 -0
  79. package/dist/client/formatBytes-GYujK0dP.mjs.map +1 -0
  80. package/dist/client/helpers--JWXi40U.mjs +6 -0
  81. package/dist/client/helpers--JWXi40U.mjs.map +1 -0
  82. package/dist/client/hooks-s-I8vWww.mjs +2 -0
  83. package/dist/client/images-BTqRflJv2.mjs +1794 -0
  84. package/dist/client/images-BTqRflJv2.mjs.map +1 -0
  85. package/dist/client/images-DRTfx8k2.mjs +8 -0
  86. package/dist/client/images-DRTfx8k2.mjs.map +1 -0
  87. package/dist/client/images-xBfsjxkX.mjs +12 -0
  88. package/dist/client/images-xBfsjxkX.mjs.map +1 -0
  89. package/dist/client/index.d.ts +1 -0
  90. package/dist/client/index.js +1033 -0
  91. package/dist/client/index.js.map +1 -0
  92. package/dist/client/md-CI9FmfYv.mjs +390 -0
  93. package/dist/client/md-CI9FmfYv.mjs.map +1 -0
  94. package/dist/client/network-DFVVVNS5.mjs +8 -0
  95. package/dist/client/network-DFVVVNS5.mjs.map +1 -0
  96. package/dist/client/objects-CKk6cST_.mjs +4762 -0
  97. package/dist/client/objects-CKk6cST_.mjs.map +1 -0
  98. package/dist/client/objects-DkDKVSmQ.mjs +8 -0
  99. package/dist/client/objects-DkDKVSmQ.mjs.map +1 -0
  100. package/dist/client/objects-r_Vl31oj.mjs +80 -0
  101. package/dist/client/objects-r_Vl31oj.mjs.map +1 -0
  102. package/dist/client/overview-B7pXx6bt.mjs +173 -0
  103. package/dist/client/overview-B7pXx6bt.mjs.map +1 -0
  104. package/dist/client/overview-CKGLIu6W.mjs +12 -0
  105. package/dist/client/overview-CKGLIu6W.mjs.map +1 -0
  106. package/dist/client/overview-Ca8r3SAz.mjs +16 -0
  107. package/dist/client/overview-Ca8r3SAz.mjs.map +1 -0
  108. package/dist/client/overview-DkPM0Od5.mjs +12 -0
  109. package/dist/client/overview-DkPM0Od5.mjs.map +1 -0
  110. package/dist/client/overview-Dxm7Ef3X.mjs +12 -0
  111. package/dist/client/overview-Dxm7Ef3X.mjs.map +1 -0
  112. package/dist/client/overview-ag4Envez.mjs +16 -0
  113. package/dist/client/overview-ag4Envez.mjs.map +1 -0
  114. package/dist/client/pca-BGv7Mprl.mjs +12 -0
  115. package/dist/client/pca-BGv7Mprl.mjs.map +1 -0
  116. package/dist/client/pca-DpULpMu5.mjs +167 -0
  117. package/dist/client/pca-DpULpMu5.mjs.map +1 -0
  118. package/dist/client/projects-BuN69cxO.mjs +144 -0
  119. package/dist/client/projects-BuN69cxO.mjs.map +1 -0
  120. package/dist/client/projects-D1pP0XdA.mjs +12 -0
  121. package/dist/client/projects-D1pP0XdA.mjs.map +1 -0
  122. package/dist/client/projects-MbS1USl2.mjs +7 -0
  123. package/dist/client/projects-MbS1USl2.mjs.map +1 -0
  124. package/dist/client/projects-_Dfn6eQT.mjs +22 -0
  125. package/dist/client/projects-_Dfn6eQT.mjs.map +1 -0
  126. package/dist/client/securitygroups-DURjFfYK.mjs +12 -0
  127. package/dist/client/securitygroups-DURjFfYK.mjs.map +1 -0
  128. package/dist/client/securitygroups-KC2qvmH8.mjs +442 -0
  129. package/dist/client/securitygroups-KC2qvmH8.mjs.map +1 -0
  130. package/dist/client/trpcClient-BxguzNYF.mjs +57 -0
  131. package/dist/client/trpcClient-BxguzNYF.mjs.map +1 -0
  132. package/dist/client/useErrorTranslation-TZVwIAzq.mjs +83 -0
  133. package/dist/client/useErrorTranslation-TZVwIAzq.mjs.map +1 -0
  134. package/dist/client/useListWithFiltering-mMX_EfyI.mjs +32 -0
  135. package/dist/client/useListWithFiltering-mMX_EfyI.mjs.map +1 -0
  136. package/dist/client/useModal-Dg4CBeqL.mjs +12 -0
  137. package/dist/client/useModal-Dg4CBeqL.mjs.map +1 -0
  138. package/dist/client/useProjectId-BWaeJZOy.mjs +11 -0
  139. package/dist/client/useProjectId-BWaeJZOy.mjs.map +1 -0
  140. package/dist/server/index.d.ts +35 -0
  141. package/dist/server/index.js +36514 -0
  142. package/package.json +129 -0
@@ -0,0 +1,8 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { Trans as t } from "@lingui/react";
3
+ //#region src/client/routes/_auth/projects/$projectId/storage/$provider/containers/$containerName/objects/index.tsx?tsr-split=notFoundComponent
4
+ var n = () => /* @__PURE__ */ e("p", { children: /* @__PURE__ */ e(t, { id: "FRtmJJ" }) });
5
+ //#endregion
6
+ export { n as notFoundComponent };
7
+
8
+ //# sourceMappingURL=objects-DkDKVSmQ.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objects-DkDKVSmQ.mjs","names":["Trans","SplitNotFoundComponent","notFoundComponent"],"sources":["../../src/client/routes/_auth/projects/$projectId/storage/$provider/containers/$containerName/objects/index.tsx?tsr-split=notFoundComponent"],"sourcesContent":["import { createFileRoute, redirect, useParams } from \"@tanstack/react-router\"\nimport { useEffect } from \"react\"\nimport { getServiceIndex } from \"@/server/Authentication/helpers\"\nimport { ErrorBoundary } from \"react-error-boundary\"\nimport { Trans } from \"@lingui/react/macro\"\nimport { SwiftObjects } from \"../../../../-components/Swift/Objects\"\nimport { ObjectBrowserView } from \"../../../../-components/Ceph/Objects\"\nimport { z } from \"zod\"\nimport type { RouteInfo } from \"@/client/routes/routeInfo\"\n\nexport const checkServiceAvailability = (\n availableServices: {\n type: string\n name: string\n }[],\n params: {\n projectId: string\n provider: string\n containerName: string\n }\n) => {\n const { provider, projectId, containerName } = params\n\n const serviceIndex = getServiceIndex(availableServices)\n\n // Redirect to the \"Projects Overview\" page if no storage services available\n if (!serviceIndex[\"object-store\"]) {\n throw redirect({\n to: \"/projects/$projectId/compute/overview\",\n params: { projectId },\n })\n }\n\n // Check provider availability\n const hasSwift = Boolean(serviceIndex[\"object-store\"][\"swift\"])\n const hasCeph = Boolean(serviceIndex[\"object-store\"][\"ceph\"])\n\n // TEMPORARY: Allow Ceph access even if not in catalog (relies on env config)\n // TODO: Properly register Ceph in OpenStack service catalog\n const cephFallbackEnabled = true // Set to false once Ceph is in catalog\n\n // Effective availability includes fallback flag for Ceph\n const hasEffectiveCeph = hasCeph || cephFallbackEnabled\n const fallbackProvider = hasSwift ? \"swift\" : hasEffectiveCeph ? \"ceph\" : null\n\n if (provider !== \"swift\" && provider !== \"ceph\") {\n if (!fallbackProvider) {\n throw redirect({\n to: \"/projects/$projectId/compute/overview\",\n params: { projectId },\n })\n }\n throw redirect({\n to: \"/projects/$projectId/storage/$provider/containers/$containerName/objects\",\n params: { projectId, provider: fallbackProvider, containerName },\n })\n }\n\n if (provider === \"swift\" && !hasSwift) {\n if (!hasEffectiveCeph) {\n throw redirect({\n to: \"/projects/$projectId/compute/overview\",\n params: { projectId },\n })\n }\n\n throw redirect({\n to: \"/projects/$projectId/storage/$provider/containers/$containerName/objects\",\n params: { projectId, provider: \"ceph\", containerName },\n })\n }\n\n if (provider === \"ceph\" && !hasEffectiveCeph) {\n if (!hasSwift) {\n throw redirect({\n to: \"/projects/$projectId/compute/overview\",\n params: { projectId },\n })\n }\n\n throw redirect({\n to: \"/projects/$projectId/storage/$provider/containers/$containerName/objects\",\n params: { projectId, provider: \"swift\", containerName },\n })\n }\n}\n\n// Search params schema\n// - prefix: base64-encoded current folder path, safe to carry \"/\" chars in the URL\n// - sortBy: active sort column key — persisted so deep links and back navigation restore sort state\n// Accepts both Swift keys (last_modified, bytes) and Ceph keys (lastModified, size) for compatibility\n// - sortDirection: \"asc\" | \"desc\" — persisted alongside sortBy\nconst objectsSearchSchema = z.object({\n prefix: z.string().optional(),\n sortBy: z.enum([\"name\", \"last_modified\", \"bytes\", \"lastModified\", \"size\"]).optional(),\n sortDirection: z.enum([\"asc\", \"desc\"]).optional(),\n search: z.string().optional(),\n})\n\nexport const Route = createFileRoute(\"/_auth/projects/$projectId/storage/$provider/containers/$containerName/objects/\")(\n {\n staticData: { section: \"storage\", service: \"containers\", isDetail: true } satisfies RouteInfo,\n validateSearch: objectsSearchSchema,\n component: () => {\n return <ObjectsDashboard />\n },\n notFoundComponent: () => {\n return (\n <p>\n <Trans>Storage container not found</Trans>\n </p>\n )\n },\n loader: async ({ context }) => {\n const { trpcClient } = context\n const availableServices = await trpcClient?.auth.getAvailableServices.query()\n\n return {\n client: trpcClient,\n availableServices,\n }\n },\n beforeLoad: async ({ context, params }) => {\n const { trpcClient } = context\n const availableServices = await trpcClient?.auth.getAvailableServices.query()\n checkServiceAvailability(availableServices!, params)\n },\n }\n)\n\nfunction ObjectsDashboard() {\n const { project, provider, containerName } = useParams({\n from: \"/_auth/projects/$projectId/storage/$provider/containers/$containerName/objects/\",\n select: (params) => ({\n project: params.projectId,\n provider: params.provider,\n containerName: params.containerName,\n }),\n })\n\n // Extract prefix and sort params so the ErrorBoundary can reset when the user\n // navigates to a different folder — without this, a thrown error stays visible until reload.\n const { prefix, sortBy, sortDirection, search } = Route.useSearch()\n\n const { setPageTitle } = Route.useRouteContext()\n const pageTitle = containerName\n\n useEffect(() => {\n setPageTitle(pageTitle)\n }, [pageTitle, setPageTitle])\n\n return (\n <div>\n {project ? (\n <ErrorBoundary\n resetKeys={[project, provider, containerName, prefix, sortBy, sortDirection, search]}\n fallback={\n <div className=\"p-4 text-center\">\n <Trans>Error loading component</Trans>\n </div>\n }\n >\n {(() => {\n switch (provider) {\n case \"swift\":\n return <SwiftObjects />\n case \"ceph\":\n return <ObjectBrowserView bucketName={containerName} />\n default:\n return (\n <div className=\"p-4\">\n <Trans>Objects — {containerName}</Trans>\n </div>\n )\n }\n })()}\n </ErrorBoundary>\n ) : (\n <div className=\"p-4 text-center\">\n <Trans>No project selected</Trans>\n </div>\n )}\n </div>\n )\n}\n"],"mappings":";;;AA2FA,IAAAC,UAiBQ,kBAAC,KAAA,EAAA,UACC,kBAAA,GAAA,EAAA,IAAA,UAAA,CAAA,EAAA,CAAA"}
@@ -0,0 +1,80 @@
1
+ import { t as e } from "./helpers--JWXi40U.mjs";
2
+ import { createFileRoute as t, lazyRouteComponent as n, redirect as r } from "@tanstack/react-router";
3
+ import { z as i } from "zod";
4
+ //#region src/client/routes/_auth/projects/$projectId/storage/$provider/containers/$containerName/objects/index.tsx
5
+ var a = () => import("./objects-DkDKVSmQ.mjs"), o = () => import("./objects-CKk6cST_.mjs"), s = (t, n) => {
6
+ let { provider: i, projectId: a, containerName: o } = n, s = e(t);
7
+ if (!s["object-store"]) throw r({
8
+ to: "/projects/$projectId/compute/overview",
9
+ params: { projectId: a }
10
+ });
11
+ let c = !!s["object-store"].swift, l = !!s["object-store"].ceph || !0, u = c ? "swift" : l ? "ceph" : null;
12
+ if (i !== "swift" && i !== "ceph") throw r(u ? {
13
+ to: "/projects/$projectId/storage/$provider/containers/$containerName/objects",
14
+ params: {
15
+ projectId: a,
16
+ provider: u,
17
+ containerName: o
18
+ }
19
+ } : {
20
+ to: "/projects/$projectId/compute/overview",
21
+ params: { projectId: a }
22
+ });
23
+ if (i === "swift" && !c) throw r(l ? {
24
+ to: "/projects/$projectId/storage/$provider/containers/$containerName/objects",
25
+ params: {
26
+ projectId: a,
27
+ provider: "ceph",
28
+ containerName: o
29
+ }
30
+ } : {
31
+ to: "/projects/$projectId/compute/overview",
32
+ params: { projectId: a }
33
+ });
34
+ if (i === "ceph" && !l) throw r(c ? {
35
+ to: "/projects/$projectId/storage/$provider/containers/$containerName/objects",
36
+ params: {
37
+ projectId: a,
38
+ provider: "swift",
39
+ containerName: o
40
+ }
41
+ } : {
42
+ to: "/projects/$projectId/compute/overview",
43
+ params: { projectId: a }
44
+ });
45
+ }, c = i.object({
46
+ prefix: i.string().optional(),
47
+ sortBy: i.enum([
48
+ "name",
49
+ "last_modified",
50
+ "bytes",
51
+ "lastModified",
52
+ "size"
53
+ ]).optional(),
54
+ sortDirection: i.enum(["asc", "desc"]).optional(),
55
+ search: i.string().optional()
56
+ }), l = t("/_auth/projects/$projectId/storage/$provider/containers/$containerName/objects/")({
57
+ staticData: {
58
+ section: "storage",
59
+ service: "containers",
60
+ isDetail: !0
61
+ },
62
+ validateSearch: c,
63
+ component: n(o, "component"),
64
+ notFoundComponent: n(a, "notFoundComponent"),
65
+ loader: async ({ context: e }) => {
66
+ let { trpcClient: t } = e;
67
+ return {
68
+ client: t,
69
+ availableServices: await t?.auth.getAvailableServices.query()
70
+ };
71
+ },
72
+ beforeLoad: async ({ context: e, params: t }) => {
73
+ let { trpcClient: n } = e;
74
+ s(await n?.auth.getAvailableServices.query(), t);
75
+ }
76
+ });
77
+ //#endregion
78
+ export { l as t };
79
+
80
+ //# sourceMappingURL=objects-r_Vl31oj.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objects-r_Vl31oj.mjs","names":["createFileRoute","redirect","getServiceIndex","z","checkServiceAvailability","availableServices","type","name","params","projectId","provider","containerName","serviceIndex","to","hasSwift","Boolean","hasCeph","cephFallbackEnabled","hasEffectiveCeph","fallbackProvider","objectsSearchSchema","object","prefix","string","optional","sortBy","enum","sortDirection","search","Route","staticData","section","service","isDetail","RouteInfo","validateSearch","component","lazyRouteComponent","$$splitComponentImporter","notFoundComponent","$$splitNotFoundComponentImporter","loader","context","trpcClient","auth","getAvailableServices","query","client","beforeLoad"],"sources":["../../src/client/routes/_auth/projects/$projectId/storage/$provider/containers/$containerName/objects/index.tsx"],"sourcesContent":["import { createFileRoute, redirect, useParams } from \"@tanstack/react-router\"\nimport { useEffect } from \"react\"\nimport { getServiceIndex } from \"@/server/Authentication/helpers\"\nimport { ErrorBoundary } from \"react-error-boundary\"\nimport { Trans } from \"@lingui/react/macro\"\nimport { SwiftObjects } from \"../../../../-components/Swift/Objects\"\nimport { ObjectBrowserView } from \"../../../../-components/Ceph/Objects\"\nimport { z } from \"zod\"\nimport type { RouteInfo } from \"@/client/routes/routeInfo\"\n\nexport const checkServiceAvailability = (\n availableServices: {\n type: string\n name: string\n }[],\n params: {\n projectId: string\n provider: string\n containerName: string\n }\n) => {\n const { provider, projectId, containerName } = params\n\n const serviceIndex = getServiceIndex(availableServices)\n\n // Redirect to the \"Projects Overview\" page if no storage services available\n if (!serviceIndex[\"object-store\"]) {\n throw redirect({\n to: \"/projects/$projectId/compute/overview\",\n params: { projectId },\n })\n }\n\n // Check provider availability\n const hasSwift = Boolean(serviceIndex[\"object-store\"][\"swift\"])\n const hasCeph = Boolean(serviceIndex[\"object-store\"][\"ceph\"])\n\n // TEMPORARY: Allow Ceph access even if not in catalog (relies on env config)\n // TODO: Properly register Ceph in OpenStack service catalog\n const cephFallbackEnabled = true // Set to false once Ceph is in catalog\n\n // Effective availability includes fallback flag for Ceph\n const hasEffectiveCeph = hasCeph || cephFallbackEnabled\n const fallbackProvider = hasSwift ? \"swift\" : hasEffectiveCeph ? \"ceph\" : null\n\n if (provider !== \"swift\" && provider !== \"ceph\") {\n if (!fallbackProvider) {\n throw redirect({\n to: \"/projects/$projectId/compute/overview\",\n params: { projectId },\n })\n }\n throw redirect({\n to: \"/projects/$projectId/storage/$provider/containers/$containerName/objects\",\n params: { projectId, provider: fallbackProvider, containerName },\n })\n }\n\n if (provider === \"swift\" && !hasSwift) {\n if (!hasEffectiveCeph) {\n throw redirect({\n to: \"/projects/$projectId/compute/overview\",\n params: { projectId },\n })\n }\n\n throw redirect({\n to: \"/projects/$projectId/storage/$provider/containers/$containerName/objects\",\n params: { projectId, provider: \"ceph\", containerName },\n })\n }\n\n if (provider === \"ceph\" && !hasEffectiveCeph) {\n if (!hasSwift) {\n throw redirect({\n to: \"/projects/$projectId/compute/overview\",\n params: { projectId },\n })\n }\n\n throw redirect({\n to: \"/projects/$projectId/storage/$provider/containers/$containerName/objects\",\n params: { projectId, provider: \"swift\", containerName },\n })\n }\n}\n\n// Search params schema\n// - prefix: base64-encoded current folder path, safe to carry \"/\" chars in the URL\n// - sortBy: active sort column key — persisted so deep links and back navigation restore sort state\n// Accepts both Swift keys (last_modified, bytes) and Ceph keys (lastModified, size) for compatibility\n// - sortDirection: \"asc\" | \"desc\" — persisted alongside sortBy\nconst objectsSearchSchema = z.object({\n prefix: z.string().optional(),\n sortBy: z.enum([\"name\", \"last_modified\", \"bytes\", \"lastModified\", \"size\"]).optional(),\n sortDirection: z.enum([\"asc\", \"desc\"]).optional(),\n search: z.string().optional(),\n})\n\nexport const Route = createFileRoute(\"/_auth/projects/$projectId/storage/$provider/containers/$containerName/objects/\")(\n {\n staticData: { section: \"storage\", service: \"containers\", isDetail: true } satisfies RouteInfo,\n validateSearch: objectsSearchSchema,\n component: () => {\n return <ObjectsDashboard />\n },\n notFoundComponent: () => {\n return (\n <p>\n <Trans>Storage container not found</Trans>\n </p>\n )\n },\n loader: async ({ context }) => {\n const { trpcClient } = context\n const availableServices = await trpcClient?.auth.getAvailableServices.query()\n\n return {\n client: trpcClient,\n availableServices,\n }\n },\n beforeLoad: async ({ context, params }) => {\n const { trpcClient } = context\n const availableServices = await trpcClient?.auth.getAvailableServices.query()\n checkServiceAvailability(availableServices!, params)\n },\n }\n)\n\nfunction ObjectsDashboard() {\n const { project, provider, containerName } = useParams({\n from: \"/_auth/projects/$projectId/storage/$provider/containers/$containerName/objects/\",\n select: (params) => ({\n project: params.projectId,\n provider: params.provider,\n containerName: params.containerName,\n }),\n })\n\n // Extract prefix and sort params so the ErrorBoundary can reset when the user\n // navigates to a different folder — without this, a thrown error stays visible until reload.\n const { prefix, sortBy, sortDirection, search } = Route.useSearch()\n\n const { setPageTitle } = Route.useRouteContext()\n const pageTitle = containerName\n\n useEffect(() => {\n setPageTitle(pageTitle)\n }, [pageTitle, setPageTitle])\n\n return (\n <div>\n {project ? (\n <ErrorBoundary\n resetKeys={[project, provider, containerName, prefix, sortBy, sortDirection, search]}\n fallback={\n <div className=\"p-4 text-center\">\n <Trans>Error loading component</Trans>\n </div>\n }\n >\n {(() => {\n switch (provider) {\n case \"swift\":\n return <SwiftObjects />\n case \"ceph\":\n return <ObjectBrowserView bucketName={containerName} />\n default:\n return (\n <div className=\"p-4\">\n <Trans>Objects — {containerName}</Trans>\n </div>\n )\n }\n })()}\n </ErrorBoundary>\n ) : (\n <div className=\"p-4 text-center\">\n <Trans>No project selected</Trans>\n </div>\n )}\n </div>\n )\n}\n"],"mappings":";;;;4FAUaI,KACXC,GAIAG,MAAAA;CAMA,IAAM,EAAEE,aAAUD,cAAWE,qBAAkBH,GAEzCI,IAAeV,EAAgBG,EAAAA;AAGrC,KAAI,CAACO,EAAa,gBAChB,OAAMX,EAAS;EACbY,IAAI;EACJL,QAAQ,EAAEC,cAAU;EACtB,CAAA;CAIF,IAAMK,IAAWC,EAAQH,EAAa,gBAAgB,OAQhDM,IAPUH,EAAQH,EAAa,gBAAgB,QAIzB,IAItBO,IAAmBL,IAAW,UAAUI,IAAmB,SAAS;AAE1E,KAAIR,MAAa,WAAWA,MAAa,OAOvC,OAAMT,EANDkB,IAMU;EACbN,IAAI;EACJL,QAAQ;GAAEC;GAAWC,UAAUS;GAAkBR;GAAc;EACjE,GARiB;EACbE,IAAI;EACJL,QAAQ,EAAEC,cAAU;EACtB,CAAA;AAQJ,KAAIC,MAAa,WAAW,CAACI,EAQ3B,OAAMb,EAPDiB,IAOU;EACbL,IAAI;EACJL,QAAQ;GAAEC;GAAWC,UAAU;GAAQC;GAAc;EACvD,GATiB;EACbE,IAAI;EACJL,QAAQ,EAAEC,cAAU;EACtB,CAAA;AASJ,KAAIC,MAAa,UAAU,CAACQ,EAQ1B,OAAMjB,EAPDa,IAOU;EACbD,IAAI;EACJL,QAAQ;GAAEC;GAAWC,UAAU;GAASC;GAAc;EACxD,GATiB;EACbE,IAAI;EACJL,QAAQ,EAAEC,cAAU;EACtB,CAAA;GAeAW,IAAsBjB,EAAEkB,OAAO;CACnCC,QAAQnB,EAAEoB,QAAM,CAAGC,UAAQ;CAC3BC,QAAQtB,EAAEuB,KAAK;EAAC;EAAQ;EAAiB;EAAS;EAAgB;EAAO,CAAA,CAAEF,UAAQ;CACnFG,eAAexB,EAAEuB,KAAK,CAAC,OAAO,OAAO,CAAA,CAAEF,UAAQ;CAC/CI,QAAQzB,EAAEoB,QAAM,CAAGC,UAAQ;CAC7B,CAAA,EAEaK,IAAQ7B,EAAgB,kFAAA,CACnC;CACE8B,YAAY;EAAEC,SAAS;EAAWC,SAAS;EAAcC,UAAU;EAAK;CACxEE,gBAAgBf;CAChBgB,WAASC,EAAAC,GAAA,YAAA;CAGTC,mBAAiBF,EAAAG,GAAA,oBAAA;CAOjBC,QAAQ,OAAO,EAAEC,iBAAS;EACxB,IAAM,EAAEC,kBAAeD;AAGvB,SAAO;GACLK,QAAQJ;GACRtC,mBAJwB,MAAMsC,GAAYC,KAAKC,qBAAqBC,OAAAA;GAKtE;;CAEFE,YAAY,OAAO,EAAEN,YAASlC,gBAAQ;EACpC,IAAM,EAAEmC,kBAAeD;AAEvBtC,IAD0B,MAAMuC,GAAYC,KAAKC,qBAAqBC,OAAAA,EACzBtC,EAAAA;;CAEjD,CAAA"}
@@ -0,0 +1,173 @@
1
+ import { q as e, w as t } from "./build-eu9eg0zF.mjs";
2
+ import { t as n } from "./overview-Dxm7Ef3X.mjs";
3
+ import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
4
+ import { Suspense as o, use as s } from "react";
5
+ import { Trans as c, useLingui as l } from "@lingui/react";
6
+ //#region src/client/routes/_auth/projects/$projectId/compute/-components/ActivitySummary.tsx
7
+ var u = ({ progress: e, color: t, size: n = 100, strokeWidth: r = 8, label: o, value: s }) => {
8
+ let c = n / 2, l = c - r / 2, u = l * 2 * Math.PI, d = u - e / 100 * u;
9
+ return /* @__PURE__ */ a("div", {
10
+ className: "flex flex-col items-center justify-center",
11
+ children: [/* @__PURE__ */ a("div", {
12
+ style: {
13
+ position: "relative",
14
+ width: n,
15
+ height: n
16
+ },
17
+ children: [/* @__PURE__ */ a("svg", {
18
+ height: n,
19
+ width: n,
20
+ style: { transform: "rotate(-90deg)" },
21
+ children: [/* @__PURE__ */ i("circle", {
22
+ stroke: `${t}33`,
23
+ fill: "transparent",
24
+ strokeWidth: r,
25
+ r: l,
26
+ cx: c,
27
+ cy: c
28
+ }), /* @__PURE__ */ i("circle", {
29
+ stroke: t,
30
+ fill: "transparent",
31
+ strokeWidth: r,
32
+ strokeDasharray: u + " " + u,
33
+ style: { strokeDashoffset: d },
34
+ r: l,
35
+ cx: c,
36
+ cy: c,
37
+ strokeLinecap: "round"
38
+ })]
39
+ }), /* @__PURE__ */ i("div", {
40
+ style: {
41
+ position: "absolute",
42
+ top: "50%",
43
+ left: "50%",
44
+ transform: "translate(-50%, -50%)",
45
+ textAlign: "center"
46
+ },
47
+ children: /* @__PURE__ */ i("div", {
48
+ className: "text-xl font-bold text-gray-200",
49
+ children: s
50
+ })
51
+ })]
52
+ }), /* @__PURE__ */ i("div", {
53
+ className: "mt-2 text-sm text-gray-300",
54
+ children: o
55
+ })]
56
+ });
57
+ };
58
+ function d({ activityData: n }) {
59
+ return /* @__PURE__ */ a(e, {
60
+ distribution: "center",
61
+ alignment: "center",
62
+ direction: "vertical",
63
+ children: [/* @__PURE__ */ i(t, {
64
+ className: "my-6 text-xl font-semibold",
65
+ children: "Activity Summary"
66
+ }), /* @__PURE__ */ a("div", {
67
+ className: "flex flex-wrap justify-start gap-16",
68
+ children: [
69
+ /* @__PURE__ */ i(u, {
70
+ progress: n.instances.current / n.instances.quota * 100,
71
+ color: n.instances.color,
72
+ label: "Instances",
73
+ value: `${n.instances.current}/${n.instances.total}`,
74
+ size: 120
75
+ }),
76
+ /* @__PURE__ */ i(u, {
77
+ progress: n.cpu.percentage,
78
+ color: n.cpu.color,
79
+ label: "CPU",
80
+ value: `${n.cpu.percentage}%`,
81
+ size: 120
82
+ }),
83
+ /* @__PURE__ */ i(u, {
84
+ progress: n.memory.percentage,
85
+ color: n.memory.color,
86
+ label: "Memory",
87
+ value: `${n.memory.percentage}%`,
88
+ size: 120
89
+ }),
90
+ /* @__PURE__ */ i(u, {
91
+ progress: n.storage.percentage,
92
+ color: n.storage.color,
93
+ label: "Storage",
94
+ value: `${n.storage.percentage}%`,
95
+ size: 120
96
+ })
97
+ ]
98
+ })]
99
+ });
100
+ }
101
+ //#endregion
102
+ //#region src/client/routes/_auth/projects/$projectId/compute/-components/Overview.tsx
103
+ var f = ({ getDataPromise: e }) => {
104
+ let [t, n] = s(e), r = n.images;
105
+ if (!t && !r) return /* @__PURE__ */ i("div", {
106
+ className: "p-4 text-center",
107
+ children: "No data found"
108
+ });
109
+ let a = t?.filter((e) => e.status === "ACTIVE")?.length || 0, o = t?.length || 0, c = Math.max(10, Math.ceil(o * 1.5)), l = 0, u = 0, f = 0;
110
+ t?.forEach((e) => {
111
+ if (e.flavor && e.flavor.vcpus) l += e.flavor.vcpus;
112
+ else {
113
+ let t = e.name?.includes("small") || e.name?.includes("micro");
114
+ l += t ? 1 : 2;
115
+ }
116
+ e.flavor && e.flavor.ram ? u += e.flavor.ram : u += 1024, e.flavor && e.flavor.disk ? f += e.flavor.disk : f += 20;
117
+ });
118
+ let p = r?.filter((e) => e.status === "active")?.length || 0, m = r?.length || 0, h = Math.min(100, Math.round(l / 32 * 100)), g = Math.min(100, Math.round(u / 131072 * 100)), _ = Math.min(100, Math.round(f / 1024 * 100));
119
+ return /* @__PURE__ */ i("div", {
120
+ className: "h-full",
121
+ children: /* @__PURE__ */ i(d, { activityData: {
122
+ instances: {
123
+ current: a,
124
+ total: o,
125
+ quota: c,
126
+ color: "#FF5733"
127
+ },
128
+ cpu: {
129
+ percentage: h,
130
+ cores: l,
131
+ color: "#33A1FD"
132
+ },
133
+ memory: {
134
+ percentage: g,
135
+ usedMB: u,
136
+ color: "#9B59B6"
137
+ },
138
+ storage: {
139
+ percentage: _,
140
+ sizeGB: f,
141
+ color: "#4CAF50"
142
+ },
143
+ images: {
144
+ active: p,
145
+ total: m,
146
+ color: "#F1C40F"
147
+ }
148
+ } })
149
+ });
150
+ };
151
+ function p({ client: e, project: t }) {
152
+ let n = Promise.all([e.compute.getServersByProjectId.query({ project_id: t }), e.compute.listImagesWithSearch.query({ project_id: t })]);
153
+ return /* @__PURE__ */ i(o, {
154
+ fallback: /* @__PURE__ */ i("div", {
155
+ className: "p-4 text-center",
156
+ children: /* @__PURE__ */ i(c, { id: "Z3FXyt" })
157
+ }),
158
+ children: /* @__PURE__ */ i(f, { getDataPromise: n })
159
+ });
160
+ }
161
+ //#endregion
162
+ //#region src/client/routes/_auth/projects/$projectId/compute/overview.tsx?tsr-split=component
163
+ function m() {
164
+ let { i18n: e, _: o } = l(), { projectId: s } = n.useParams(), { trpcClient: c, setPageTitle: u } = n.useRouteContext();
165
+ return u(e._({ id: "grs4+e" })), /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ i(t, { children: e._({ id: "grs4+e" }) }), /* @__PURE__ */ i(p, {
166
+ project: s,
167
+ client: c
168
+ })] });
169
+ }
170
+ //#endregion
171
+ export { m as component };
172
+
173
+ //# sourceMappingURL=overview-B7pXx6bt.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"overview-B7pXx6bt.mjs","names":["ContentHeading","Stack","React","ActivityRing","progress","color","size","strokeWidth","label","value","radius","normalizedRadius","circumference","Math","PI","strokeDashoffset","div","className","style","position","width","height","svg","transform","circle","stroke","fill","r","cx","cy","strokeDasharray","strokeLinecap","top","left","textAlign","ActivitySummary","activityData","distribution","alignment","direction","instances","current","quota","total","cpu","percentage","memory","storage","ActivitySummary","Suspense","use","OverviewContainer","getDataPromise","servers","imagesResponse","images","div","className","activeServers","filter","server","status","length","totalServers","estimatedServerQuota","Math","max","ceil","totalCores","usedMemoryMB","totalDiskGB","forEach","flavor","vcpus","smallestSize","name","includes","ram","disk","activeImages","image","totalImages","cpuPercentage","min","round","memoryPercentage","storagePercentage","activityData","instances","current","total","quota","color","cpu","percentage","cores","memory","usedMB","storage","sizeGB","active","Overview","client","project","Promise","all","compute","getServersByProjectId","query","project_id","listImagesWithSearch","fallback","useLingui","Overview","ContentHeading","Route","RouteComponent","t","projectId","useParams","trpcClient","setPageTitle","useRouteContext","component"],"sources":["../../src/client/routes/_auth/projects/$projectId/compute/-components/ActivitySummary.tsx","../../src/client/routes/_auth/projects/$projectId/compute/-components/Overview.tsx","../../src/client/routes/_auth/projects/$projectId/compute/overview.tsx?tsr-split=component"],"sourcesContent":["import { ContentHeading, Stack } from \"@cloudoperators/juno-ui-components/index\"\nimport React from \"react\"\n\ninterface ActivityRingProps {\n progress: number // Progress percentage (0-100)\n color: string // Color of the ring\n size?: number // Size of the ring (default: 100)\n strokeWidth?: number // Width of the stroke (default: 8)\n label: string // Label for the ring\n value: string // Value to display inside the ring\n}\n// Activity ring component inspired by Apple's activity rings\nconst ActivityRing = ({ progress, color, size = 100, strokeWidth = 8, label, value }: ActivityRingProps) => {\n const radius = size / 2\n const normalizedRadius = radius - strokeWidth / 2\n const circumference = normalizedRadius * 2 * Math.PI\n const strokeDashoffset = circumference - (progress / 100) * circumference\n\n return (\n <div className=\"flex flex-col items-center justify-center\">\n <div style={{ position: \"relative\", width: size, height: size }}>\n <svg height={size} width={size} style={{ transform: \"rotate(-90deg)\" }}>\n {/* Background circle */}\n <circle\n stroke={`${color}33`}\n fill=\"transparent\"\n strokeWidth={strokeWidth}\n r={normalizedRadius}\n cx={radius}\n cy={radius}\n />\n {/* Progress circle */}\n <circle\n stroke={color}\n fill=\"transparent\"\n strokeWidth={strokeWidth}\n strokeDasharray={circumference + \" \" + circumference}\n style={{ strokeDashoffset }}\n r={normalizedRadius}\n cx={radius}\n cy={radius}\n strokeLinecap=\"round\"\n />\n </svg>\n <div\n style={{\n position: \"absolute\",\n top: \"50%\",\n left: \"50%\",\n transform: \"translate(-50%, -50%)\",\n textAlign: \"center\",\n }}\n >\n <div className=\"text-xl font-bold text-gray-200\">{value}</div>\n </div>\n </div>\n <div className=\"mt-2 text-sm text-gray-300\">{label}</div>\n </div>\n )\n}\n\n// Interface for activity data props\ninterface ActivityData {\n instances: {\n current: number\n total: number\n quota: number\n color: string\n }\n cpu: {\n percentage: number\n cores: number\n color: string\n }\n memory: {\n percentage: number\n usedMB: number\n color: string\n }\n storage: {\n percentage: number\n sizeGB: number\n color: string\n }\n images: {\n active: number\n total: number\n color: string\n }\n}\n\nexport function ActivitySummary({ activityData }: { activityData: ActivityData }) {\n return (\n <Stack distribution=\"center\" alignment=\"center\" direction=\"vertical\">\n <ContentHeading className=\"my-6 text-xl font-semibold\">Activity Summary</ContentHeading>\n <div className=\"flex flex-wrap justify-start gap-16\">\n <ActivityRing\n progress={(activityData.instances.current / activityData.instances.quota) * 100}\n color={activityData.instances.color}\n label=\"Instances\"\n value={`${activityData.instances.current}/${activityData.instances.total}`}\n size={120}\n />\n <ActivityRing\n progress={activityData.cpu.percentage}\n color={activityData.cpu.color}\n label=\"CPU\"\n value={`${activityData.cpu.percentage}%`}\n size={120}\n />\n <ActivityRing\n progress={activityData.memory.percentage}\n color={activityData.memory.color}\n label=\"Memory\"\n value={`${activityData.memory.percentage}%`}\n size={120}\n />\n <ActivityRing\n progress={activityData.storage.percentage}\n color={activityData.storage.color}\n label=\"Storage\"\n value={`${activityData.storage.percentage}%`}\n size={120}\n />\n </div>\n </Stack>\n )\n}\n","import { ActivitySummary } from \"./ActivitySummary\"\nimport { Suspense, use } from \"react\"\nimport { Server } from \"@/server/Compute/types/server\"\nimport { ImagesPaginatedResponse } from \"@/server/Compute/types/image\"\nimport { TrpcClient } from \"@/client/trpcClient\"\nimport { Trans } from \"@lingui/react/macro\"\n\ninterface OverviewContainerProps {\n getDataPromise: Promise<[Server[] | undefined, ImagesPaginatedResponse]>\n}\nconst OverviewContainer = ({ getDataPromise }: OverviewContainerProps) => {\n const [servers, imagesResponse] = use(getDataPromise)\n const images = imagesResponse.images\n if (!servers && !images) return <div className=\"p-4 text-center\">No data found</div>\n\n // Calculate server statistics\n const activeServers = servers?.filter((server) => server.status === \"ACTIVE\")?.length || 0\n const totalServers = servers?.length || 0\n const estimatedServerQuota = Math.max(10, Math.ceil(totalServers * 1.5))\n\n // Calculate resource usage based on server flavors\n let totalCores = 0\n let usedMemoryMB = 0\n let totalDiskGB = 0\n\n // Process server data to extract resource usage\n servers?.forEach((server) => {\n // Extract core count from flavor if available\n if (server.flavor && server.flavor.vcpus) {\n totalCores += server.flavor.vcpus\n } else {\n // Fallback estimate based on server name or other heuristics\n const smallestSize = server.name?.includes(\"small\") || server.name?.includes(\"micro\")\n totalCores += smallestSize ? 1 : 2\n }\n\n // Extract memory usage from flavor if available\n if (server.flavor && server.flavor.ram) {\n usedMemoryMB += server.flavor.ram\n } else {\n // Fallback estimate\n usedMemoryMB += 1024 // Assume 1GB per instance as fallback\n }\n\n // Extract disk usage from flavor if available\n if (server.flavor && server.flavor.disk) {\n totalDiskGB += server.flavor.disk\n } else {\n // Fallback estimate\n totalDiskGB += 20 // Assume 20GB per instance as fallback\n }\n })\n\n // Calculate image statistics\n const activeImages = images?.filter((image) => image.status === \"active\")?.length || 0\n const totalImages = images?.length || 0\n\n // Calculate resource percentage utilizations\n const cpuPercentage = Math.min(100, Math.round((totalCores / 32) * 100))\n const memoryPercentage = Math.min(100, Math.round((usedMemoryMB / 131072) * 100))\n const storagePercentage = Math.min(100, Math.round((totalDiskGB / 1024) * 100))\n\n // Prepare data to pass to ActivitySummary\n const activityData = {\n instances: {\n current: activeServers,\n total: totalServers,\n quota: estimatedServerQuota,\n color: \"#FF5733\",\n },\n cpu: {\n percentage: cpuPercentage,\n cores: totalCores,\n color: \"#33A1FD\",\n },\n memory: {\n percentage: memoryPercentage,\n usedMB: usedMemoryMB,\n color: \"#9B59B6\", // Purple color for memory\n },\n storage: {\n percentage: storagePercentage,\n sizeGB: totalDiskGB,\n color: \"#4CAF50\",\n },\n images: {\n active: activeImages,\n total: totalImages,\n color: \"#F1C40F\", // Yellow color for images if you want to use it\n },\n }\n\n return (\n <div className=\"h-full\">\n <ActivitySummary activityData={activityData} />\n </div>\n )\n}\n\ninterface OverviewProps {\n client: TrpcClient\n project: string\n}\n\nexport function Overview({ client, project }: OverviewProps) {\n const getDataPromise = Promise.all([\n client.compute.getServersByProjectId.query({ project_id: project }),\n client.compute.listImagesWithSearch.query({ project_id: project }),\n ])\n\n return (\n <Suspense\n fallback={\n <div className=\"p-4 text-center\">\n <Trans>Loading...</Trans>\n </div>\n }\n >\n <OverviewContainer getDataPromise={getDataPromise} />\n </Suspense>\n )\n}\n","import { createFileRoute } from \"@tanstack/react-router\"\nimport { useLingui } from \"@lingui/react/macro\"\nimport { Overview } from \"./-components/Overview\"\nimport type { RouteInfo } from \"@/client/routes/routeInfo\"\nimport { ContentHeading } from \"@cloudoperators/juno-ui-components\"\n\nexport const Route = createFileRoute(\"/_auth/projects/$projectId/compute/overview\")({\n staticData: { section: \"compute\", service: \"overview\" } satisfies RouteInfo,\n component: RouteComponent,\n})\n\nfunction RouteComponent() {\n const { t } = useLingui()\n const { projectId } = Route.useParams()\n const { trpcClient, setPageTitle } = Route.useRouteContext()\n setPageTitle(t`Compute Overview`)\n return (\n <>\n <ContentHeading>{t`Compute Overview`}</ContentHeading>\n <Overview project={projectId} client={trpcClient!} />\n </>\n )\n}\n"],"mappings":"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"}
@@ -0,0 +1,12 @@
1
+ import { createFileRoute as e, lazyRouteComponent as t } from "@tanstack/react-router";
2
+ var n = e("/_auth/projects/$projectId/network/overview")({
3
+ staticData: {
4
+ section: "network",
5
+ service: "overview"
6
+ },
7
+ component: t(() => import("./overview-Ca8r3SAz.mjs"), "component")
8
+ });
9
+ //#endregion
10
+ export { n as t };
11
+
12
+ //# sourceMappingURL=overview-CKGLIu6W.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"overview-CKGLIu6W.mjs","names":["createFileRoute","Route","staticData","section","service","RouteInfo","component","lazyRouteComponent","$$splitComponentImporter"],"sources":["../../src/client/routes/_auth/projects/$projectId/network/overview.tsx"],"sourcesContent":["import { createFileRoute } from \"@tanstack/react-router\"\nimport { useLingui, Trans } from \"@lingui/react/macro\"\nimport type { RouteInfo } from \"@/client/routes/routeInfo\"\nimport { ContentHeading } from \"@cloudoperators/juno-ui-components\"\n\nexport const Route = createFileRoute(\"/_auth/projects/$projectId/network/overview\")({\n staticData: { section: \"network\", service: \"overview\" } satisfies RouteInfo,\n component: RouteComponent,\n})\n\nfunction RouteComponent() {\n const { t } = useLingui()\n const { setPageTitle } = Route.useRouteContext()\n setPageTitle(t`Network Overview`)\n return (\n <>\n <ContentHeading>{t`Network Overview`}</ContentHeading>\n <div className=\"p-4 text-center\">\n <Trans>Network Overview</Trans>\n </div>\n </>\n )\n}\n"],"mappings":";AAKA,IAAaC,IAAQD,EAAgB,8CAAA,CAA+C;CAClFE,YAAY;EAAEC,SAAS;EAAWC,SAAS;EAAW;CACtDE,WAASC,2CAAA,YAAA;CACX,CAAA"}
@@ -0,0 +1,16 @@
1
+ import { w as e } from "./build-eu9eg0zF.mjs";
2
+ import { t } from "./overview-CKGLIu6W.mjs";
3
+ import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
4
+ import { Trans as a, useLingui as o } from "@lingui/react";
5
+ //#region src/client/routes/_auth/projects/$projectId/network/overview.tsx?tsr-split=component
6
+ function s() {
7
+ let { i18n: s, _: c } = o(), { setPageTitle: l } = t.useRouteContext();
8
+ return l(s._({ id: "vcXmqy" })), /* @__PURE__ */ i(n, { children: [/* @__PURE__ */ r(e, { children: s._({ id: "vcXmqy" }) }), /* @__PURE__ */ r("div", {
9
+ className: "p-4 text-center",
10
+ children: /* @__PURE__ */ r(a, { id: "vcXmqy" })
11
+ })] });
12
+ }
13
+ //#endregion
14
+ export { s as component };
15
+
16
+ //# sourceMappingURL=overview-Ca8r3SAz.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"overview-Ca8r3SAz.mjs","names":["useLingui","Trans","ContentHeading","Route","RouteComponent","t","setPageTitle","useRouteContext","component"],"sources":["../../src/client/routes/_auth/projects/$projectId/network/overview.tsx?tsr-split=component"],"sourcesContent":["import { createFileRoute } from \"@tanstack/react-router\"\nimport { useLingui, Trans } from \"@lingui/react/macro\"\nimport type { RouteInfo } from \"@/client/routes/routeInfo\"\nimport { ContentHeading } from \"@cloudoperators/juno-ui-components\"\n\nexport const Route = createFileRoute(\"/_auth/projects/$projectId/network/overview\")({\n staticData: { section: \"network\", service: \"overview\" } satisfies RouteInfo,\n component: RouteComponent,\n})\n\nfunction RouteComponent() {\n const { t } = useLingui()\n const { setPageTitle } = Route.useRouteContext()\n setPageTitle(t`Network Overview`)\n return (\n <>\n <ContentHeading>{t`Network Overview`}</ContentHeading>\n <div className=\"p-4 text-center\">\n <Trans>Network Overview</Trans>\n </div>\n </>\n )\n}\n"],"mappings":";;;;;AAUA,SAASI,IAAAA;CACP,IAAM,EAAA,MAAA,GAAA,GAAA,MAAQJ,GAAAA,EACR,EAAEM,oBAAiBH,EAAMI,iBAAe;AAE9C,QADAD,EAAaD,EAAAA,EAAC,EAAA,IAAA,UAAA,CAAA,CAAA,EAEZ,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,GAAA,EAAA,UAAgBA,EAAAA,EAAC,EAAA,IAAA,UAAA,CAAA,EAAA,CAAA,EAClB,kBAAC,OAAA;EAAI,WAAU;YACb,kBAAA,GAAA,EAAA,IAAA,UAAA,CAAA"}
@@ -0,0 +1,12 @@
1
+ import { createFileRoute as e, lazyRouteComponent as t } from "@tanstack/react-router";
2
+ var n = e("/_auth/projects/$projectId/services/overview")({
3
+ staticData: {
4
+ section: "services",
5
+ service: "overview"
6
+ },
7
+ component: t(() => import("./overview-ag4Envez.mjs"), "component")
8
+ });
9
+ //#endregion
10
+ export { n as t };
11
+
12
+ //# sourceMappingURL=overview-DkPM0Od5.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"overview-DkPM0Od5.mjs","names":["createFileRoute","RouteInfo","Route","staticData","section","service","component","lazyRouteComponent","$$splitComponentImporter"],"sources":["../../src/client/routes/_auth/projects/$projectId/services/overview.tsx"],"sourcesContent":["import { createFileRoute } from \"@tanstack/react-router\"\nimport { useLingui, Trans } from \"@lingui/react/macro\"\nimport { ContentHeading } from \"@cloudoperators/juno-ui-components\"\nimport { RouteInfo } from \"@/client/routes/routeInfo\"\n\nexport const Route = createFileRoute(\"/_auth/projects/$projectId/services/overview\")({\n staticData: { section: \"services\", service: \"overview\" } satisfies RouteInfo,\n component: RouteComponent,\n})\n\nfunction RouteComponent() {\n const { t } = useLingui()\n const { setPageTitle } = Route.useRouteContext()\n setPageTitle(t`Services Overview`)\n return (\n <>\n <ContentHeading>{t`Services Overview`}</ContentHeading>\n <div className=\"p-4 text-center\">\n <Trans>Services Overview</Trans>\n </div>\n </>\n )\n}\n"],"mappings":";AAKA,IAAaE,IAAQF,EAAgB,+CAAA,CAAgD;CACnFG,YAAY;EAAEC,SAAS;EAAYC,SAAS;EAAW;CACvDC,WAASC,2CAAA,YAAA;CACX,CAAA"}
@@ -0,0 +1,12 @@
1
+ import { createFileRoute as e, lazyRouteComponent as t } from "@tanstack/react-router";
2
+ var n = e("/_auth/projects/$projectId/compute/overview")({
3
+ staticData: {
4
+ section: "compute",
5
+ service: "overview"
6
+ },
7
+ component: t(() => import("./overview-B7pXx6bt.mjs"), "component")
8
+ });
9
+ //#endregion
10
+ export { n as t };
11
+
12
+ //# sourceMappingURL=overview-Dxm7Ef3X.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"overview-Dxm7Ef3X.mjs","names":["createFileRoute","Route","staticData","section","service","RouteInfo","component","lazyRouteComponent","$$splitComponentImporter"],"sources":["../../src/client/routes/_auth/projects/$projectId/compute/overview.tsx"],"sourcesContent":["import { createFileRoute } from \"@tanstack/react-router\"\nimport { useLingui } from \"@lingui/react/macro\"\nimport { Overview } from \"./-components/Overview\"\nimport type { RouteInfo } from \"@/client/routes/routeInfo\"\nimport { ContentHeading } from \"@cloudoperators/juno-ui-components\"\n\nexport const Route = createFileRoute(\"/_auth/projects/$projectId/compute/overview\")({\n staticData: { section: \"compute\", service: \"overview\" } satisfies RouteInfo,\n component: RouteComponent,\n})\n\nfunction RouteComponent() {\n const { t } = useLingui()\n const { projectId } = Route.useParams()\n const { trpcClient, setPageTitle } = Route.useRouteContext()\n setPageTitle(t`Compute Overview`)\n return (\n <>\n <ContentHeading>{t`Compute Overview`}</ContentHeading>\n <Overview project={projectId} client={trpcClient!} />\n </>\n )\n}\n"],"mappings":";AAMA,IAAaC,IAAQD,EAAgB,8CAAA,CAA+C;CAClFE,YAAY;EAAEC,SAAS;EAAWC,SAAS;EAAW;CACtDE,WAASC,2CAAA,YAAA;CACX,CAAA"}
@@ -0,0 +1,16 @@
1
+ import { w as e } from "./build-eu9eg0zF.mjs";
2
+ import { t } from "./overview-DkPM0Od5.mjs";
3
+ import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
4
+ import { Trans as a, useLingui as o } from "@lingui/react";
5
+ //#region src/client/routes/_auth/projects/$projectId/services/overview.tsx?tsr-split=component
6
+ function s() {
7
+ let { i18n: s, _: c } = o(), { setPageTitle: l } = t.useRouteContext();
8
+ return l(s._({ id: "rvT6l1" })), /* @__PURE__ */ i(n, { children: [/* @__PURE__ */ r(e, { children: s._({ id: "rvT6l1" }) }), /* @__PURE__ */ r("div", {
9
+ className: "p-4 text-center",
10
+ children: /* @__PURE__ */ r(a, { id: "rvT6l1" })
11
+ })] });
12
+ }
13
+ //#endregion
14
+ export { s as component };
15
+
16
+ //# sourceMappingURL=overview-ag4Envez.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"overview-ag4Envez.mjs","names":["useLingui","Trans","ContentHeading","Route","RouteComponent","t","setPageTitle","useRouteContext","component"],"sources":["../../src/client/routes/_auth/projects/$projectId/services/overview.tsx?tsr-split=component"],"sourcesContent":["import { createFileRoute } from \"@tanstack/react-router\"\nimport { useLingui, Trans } from \"@lingui/react/macro\"\nimport { ContentHeading } from \"@cloudoperators/juno-ui-components\"\nimport { RouteInfo } from \"@/client/routes/routeInfo\"\n\nexport const Route = createFileRoute(\"/_auth/projects/$projectId/services/overview\")({\n staticData: { section: \"services\", service: \"overview\" } satisfies RouteInfo,\n component: RouteComponent,\n})\n\nfunction RouteComponent() {\n const { t } = useLingui()\n const { setPageTitle } = Route.useRouteContext()\n setPageTitle(t`Services Overview`)\n return (\n <>\n <ContentHeading>{t`Services Overview`}</ContentHeading>\n <div className=\"p-4 text-center\">\n <Trans>Services Overview</Trans>\n </div>\n </>\n )\n}\n"],"mappings":";;;;;AAUA,SAASI,IAAAA;CACP,IAAM,EAAA,MAAA,GAAA,GAAA,MAAQJ,GAAAA,EACR,EAAEM,oBAAiBH,EAAMI,iBAAe;AAE9C,QADAD,EAAaD,EAAAA,EAAC,EAAA,IAAA,UAAA,CAAA,CAAA,EAEZ,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,GAAA,EAAA,UAAgBA,EAAAA,EAAC,EAAA,IAAA,UAAA,CAAA,EAAA,CAAA,EAClB,kBAAC,OAAA;EAAI,WAAU;YACb,kBAAA,GAAA,EAAA,IAAA,UAAA,CAAA"}
@@ -0,0 +1,12 @@
1
+ import { createFileRoute as e, lazyRouteComponent as t } from "@tanstack/react-router";
2
+ var n = e("/_auth/projects/$projectId/services/pca/")({
3
+ staticData: {
4
+ section: "services",
5
+ service: "pca"
6
+ },
7
+ component: t(() => import("./pca-DpULpMu5.mjs"), "component")
8
+ });
9
+ //#endregion
10
+ export { n as t };
11
+
12
+ //# sourceMappingURL=pca-BGv7Mprl.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pca-BGv7Mprl.mjs","names":["createFileRoute","Route","staticData","section","service","RouteInfo","component","lazyRouteComponent","$$splitComponentImporter"],"sources":["../../src/client/routes/_auth/projects/$projectId/services/pca/index.tsx"],"sourcesContent":["import { createFileRoute } from \"@tanstack/react-router\"\nimport { useLingui } from \"@lingui/react/macro\"\nimport type { RouteInfo } from \"@/client/routes/routeInfo\"\nimport { ContentHeader } from \"@/client/components/ContentHeader/ContentHeader\"\nimport { PcaListContainer } from \"./-components/PcaListContainer\"\n\nexport const Route = createFileRoute(\"/_auth/projects/$projectId/services/pca/\")({\n staticData: { section: \"services\", service: \"pca\" } satisfies RouteInfo,\n component: RouteComponent,\n})\n\nfunction RouteComponent() {\n const { t } = useLingui()\n const { projectId } = Route.useParams()\n const { setPageTitle } = Route.useRouteContext()\n\n setPageTitle(t`PCA`)\n\n return (\n <>\n <ContentHeader title={t`PCA`} projectId={projectId} />\n <PcaListContainer />\n </>\n )\n}\n"],"mappings":";AAMA,IAAaC,IAAQD,EAAgB,2CAAA,CAA4C;CAC/EE,YAAY;EAAEC,SAAS;EAAYC,SAAS;EAAM;CAClDE,WAASC,sCAAA,YAAA;CACX,CAAA"}
@@ -0,0 +1,167 @@
1
+ import { $ as e, D as t, I as n, K as r, N as i, W as a, b as o, g as s, i as c, it as l, k as u, n as d, q as f, rt as p, s as m, w as h } from "./build-eu9eg0zF.mjs";
2
+ import { r as g } from "./trpcClient-BxguzNYF.mjs";
3
+ import { t as _ } from "./pca-BGv7Mprl.mjs";
4
+ import { t as v } from "./useModal-Dg4CBeqL.mjs";
5
+ import { t as y } from "./ContentHeader-H8KGY3Wd.mjs";
6
+ import { t as b } from "./useProjectId-BWaeJZOy.mjs";
7
+ import "./hooks-s-I8vWww.mjs";
8
+ import { n as x, r as S, t as C } from "./constants-ByHCdNsI.mjs";
9
+ import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
10
+ import { useNavigate as D } from "@tanstack/react-router";
11
+ import { Trans as O, useLingui as k } from "@lingui/react";
12
+ import { z as A } from "zod";
13
+ import { useForm as j } from "@tanstack/react-form";
14
+ //#region src/client/routes/_auth/projects/$projectId/services/pca/-components/-table/PcaTableRow.tsx
15
+ var M = ({ pca: e }) => {
16
+ let { i18n: t, _: a } = k(), o = D(), s = b(), [c, l] = v(!1);
17
+ return /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ E(n, {
18
+ "data-testid": `pca-row-${e.id}`,
19
+ onClick: () => o({
20
+ to: "/projects/$projectId/services/pca/$pcaId",
21
+ params: {
22
+ projectId: s,
23
+ pcaId: e.id
24
+ }
25
+ }),
26
+ children: [
27
+ /* @__PURE__ */ T(i, { children: /* @__PURE__ */ E("div", {
28
+ className: "flex items-center gap-2",
29
+ children: [C[e.state].icon, C[e.state].text]
30
+ }) }),
31
+ /* @__PURE__ */ T(i, { children: e.id }),
32
+ /* @__PURE__ */ T(i, { children: e.configuration?.subject?.common_name || "—" }),
33
+ /* @__PURE__ */ T(i, {
34
+ onClick: (e) => e.stopPropagation(),
35
+ className: "items-end pr-0",
36
+ children: /* @__PURE__ */ T(d, { children: /* @__PURE__ */ T(p, { children: /* @__PURE__ */ T(r, {
37
+ label: t._({ id: "nzFJqC" }),
38
+ onClick: l
39
+ }) }) })
40
+ })
41
+ ]
42
+ }, e.id), c && /* @__PURE__ */ T(S, {
43
+ pca: e,
44
+ open: c,
45
+ onClose: l
46
+ })] });
47
+ }, N = /^(?=.{1,253}$)(?:\*\.)?(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?\.)+[A-Za-z]{2,63}$/, P = (e) => N.test(e), F = ({ open: n, onClose: r }) => {
48
+ let { i18n: i, _: s } = k(), l = b(), u = g.useUtils(), { isPending: d, ...f } = g.services.pca.create.useMutation({ onSettled: () => u.services.pca.list.invalidate() }), p = j({
49
+ defaultValues: { common_name: "" },
50
+ validators: { onSubmit: A.object({ common_name: A.string().trim().min(1, i._({ id: "qhDo93" })).refine((e) => P(e), { message: i._({ id: "gy6L1u" }) }) }) },
51
+ onSubmit: async ({ value: e }) => {
52
+ d || (await f.mutateAsync({
53
+ project_id: l,
54
+ configuration: { subject: { common_name: e.common_name } }
55
+ }), h());
56
+ }
57
+ }), h = () => {
58
+ d || (p.reset(), f.reset(), r());
59
+ };
60
+ return /* @__PURE__ */ E(m, {
61
+ open: n,
62
+ size: "large",
63
+ title: i._({ id: "WidMsn" }),
64
+ onCancel: h,
65
+ cancelButtonLabel: i._({ id: "dEgA5A" }),
66
+ confirmButtonLabel: i._({ id: "tfDRzk" }),
67
+ onConfirm: p.handleSubmit,
68
+ disableConfirmButton: d,
69
+ children: [
70
+ f.error?.message && /* @__PURE__ */ T(o, {
71
+ dismissible: !1,
72
+ variant: "error",
73
+ className: "mb-4",
74
+ children: f.error.message
75
+ }),
76
+ d && /* @__PURE__ */ E("div", {
77
+ className: "mb-4 flex items-center justify-center gap-2",
78
+ children: [/* @__PURE__ */ T(a, { variant: "primary" }), /* @__PURE__ */ T("span", {
79
+ className: "text-theme-high text-sm",
80
+ children: /* @__PURE__ */ T(O, { id: "wdUvGT" })
81
+ })]
82
+ }),
83
+ !d && /* @__PURE__ */ T(t, {
84
+ className: "mb-0",
85
+ id: "create-certificate-authority-form",
86
+ onSubmit: (e) => {
87
+ e.preventDefault(), p.handleSubmit();
88
+ },
89
+ children: /* @__PURE__ */ T(c, {
90
+ className: "mb-4",
91
+ children: /* @__PURE__ */ T(p.Field, {
92
+ name: "common_name",
93
+ children: (t) => /* @__PURE__ */ T(e, {
94
+ id: t.name,
95
+ name: t.name,
96
+ value: t.state.value,
97
+ onBlur: t.handleBlur,
98
+ onChange: (e) => t.handleChange(e.target.value),
99
+ label: i._({ id: "DHrCY6" }),
100
+ placeholder: i._({ id: "RWQ6BN" }),
101
+ helptext: i._({ id: "jVjr9h" }),
102
+ errortext: t.state.meta.errors.map((e) => e?.message).join(", "),
103
+ disabled: d
104
+ })
105
+ })
106
+ })
107
+ })
108
+ ]
109
+ });
110
+ }, I = () => {
111
+ let { i18n: e, _: t } = k(), r = b(), o = x(), [c, d] = v(!1), { data: p = [], isLoading: m, isError: _, error: y } = g.services.pca.list.useQuery({ project_id: r });
112
+ return m ? /* @__PURE__ */ E(f, {
113
+ className: "py-8",
114
+ distribution: "center",
115
+ alignment: "center",
116
+ direction: "vertical",
117
+ children: [/* @__PURE__ */ T(a, {
118
+ variant: "primary",
119
+ size: "large",
120
+ className: "mb-2"
121
+ }), /* @__PURE__ */ T(O, { id: "Z3FXyt" })]
122
+ }) : _ ? /* @__PURE__ */ T(f, {
123
+ className: "py-8",
124
+ distribution: "center",
125
+ alignment: "center",
126
+ direction: "vertical",
127
+ children: y?.message ?? e._({ id: "Sf3Gvg" })
128
+ }) : p.length === 0 ? /* @__PURE__ */ T(u, {
129
+ columns: o.length,
130
+ className: "pca",
131
+ "data-testid": "no-pcas",
132
+ children: /* @__PURE__ */ T(n, { children: /* @__PURE__ */ E(i, {
133
+ colSpan: o.length,
134
+ children: [/* @__PURE__ */ T(h, { children: /* @__PURE__ */ T(O, { id: "8S2nDL" }) }), /* @__PURE__ */ T("p", { children: /* @__PURE__ */ T(O, { id: "ng+PCh" }) })]
135
+ }) })
136
+ }) : /* @__PURE__ */ E("div", {
137
+ className: "relative",
138
+ children: [
139
+ /* @__PURE__ */ T(s, {
140
+ variant: "primary",
141
+ label: e._({ id: "WidMsn" }),
142
+ onClick: d
143
+ }),
144
+ /* @__PURE__ */ E(u, {
145
+ columns: o.length,
146
+ children: [/* @__PURE__ */ T(n, { children: o.map((e) => /* @__PURE__ */ T(l, { children: e }, e)) }), p.map((e) => /* @__PURE__ */ T(M, { pca: e }, e.id))]
147
+ }),
148
+ c && /* @__PURE__ */ T(F, {
149
+ open: c,
150
+ onClose: d
151
+ })
152
+ ]
153
+ });
154
+ };
155
+ //#endregion
156
+ //#region src/client/routes/_auth/projects/$projectId/services/pca/index.tsx?tsr-split=component
157
+ function L() {
158
+ let { i18n: e, _: t } = k(), { projectId: n } = _.useParams(), { setPageTitle: r } = _.useRouteContext();
159
+ return r(e._({ id: "ffw//c" })), /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(y, {
160
+ title: e._({ id: "ffw//c" }),
161
+ projectId: n
162
+ }), /* @__PURE__ */ T(I, {})] });
163
+ }
164
+ //#endregion
165
+ export { L as component };
166
+
167
+ //# sourceMappingURL=pca-DpULpMu5.mjs.map