@cobaltcore-dev/aurora 1.2.0 → 1.3.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/dist/client/FloatingIpActionModals-Ch8uozH9.mjs +466 -0
- package/dist/client/FloatingIpActionModals-Ch8uozH9.mjs.map +1 -0
- package/dist/client/{TwoColumnDescriptionList-NvgvErua.mjs → TwoColumnDescriptionList-DKS42RKa.mjs} +9 -3
- package/dist/client/TwoColumnDescriptionList-DKS42RKa.mjs.map +1 -0
- package/dist/client/{_flavorId-a9Gu66R1.mjs → _flavorId-Dg7MS0Af.mjs} +2 -2
- package/dist/client/{_flavorId-a9Gu66R1.mjs.map → _flavorId-Dg7MS0Af.mjs.map} +1 -1
- package/dist/client/{_flavorId-9PcBBW52.mjs → _flavorId-kHl-b8rI.mjs} +20 -19
- package/dist/client/{_flavorId-9PcBBW52.mjs.map → _flavorId-kHl-b8rI.mjs.map} +1 -1
- package/dist/client/{_floatingIpId-AZ11Ksmu.mjs → _floatingIpId-C9xfRWot.mjs} +2 -2
- package/dist/client/_floatingIpId-C9xfRWot.mjs.map +1 -0
- package/dist/client/_floatingIpId-DNn6ABCB.mjs +196 -0
- package/dist/client/_floatingIpId-DNn6ABCB.mjs.map +1 -0
- package/dist/client/{_imageId-D76BxvFY.mjs → _imageId-8JIbFmGB.mjs} +2 -2
- package/dist/client/_imageId-8JIbFmGB.mjs.map +1 -0
- package/dist/client/{_imageId-BtAql2Kr.mjs → _imageId-BBAlRioC.mjs} +147 -143
- package/dist/client/_imageId-BBAlRioC.mjs.map +1 -0
- package/dist/client/{_securityGroupId-D85mSigA.mjs → _securityGroupId-C6eHmrx_.mjs} +2 -2
- package/dist/client/{_securityGroupId-D85mSigA.mjs.map → _securityGroupId-C6eHmrx_.mjs.map} +1 -1
- package/dist/client/{_securityGroupId-C5huJNfO.mjs → _securityGroupId-DmplhDgt.mjs} +3 -3
- package/dist/client/{_securityGroupId-C5huJNfO.mjs.map → _securityGroupId-DmplhDgt.mjs.map} +1 -1
- package/dist/client/{_storageType-Dy9uCVXr.mjs → _storageType-C5gS9eut.mjs} +2 -2
- package/dist/client/{_storageType-Dy9uCVXr.mjs.map → _storageType-C5gS9eut.mjs.map} +1 -1
- package/dist/client/{flavors-B0rbqffG.mjs → flavors-B1SDOPDu.mjs} +2 -2
- package/dist/client/{flavors-B0rbqffG.mjs.map → flavors-B1SDOPDu.mjs.map} +1 -1
- package/dist/client/{flavors-Rl20bxVU.mjs → flavors-D8_PzQUB.mjs} +3 -3
- package/dist/client/{flavors-Rl20bxVU.mjs.map → flavors-D8_PzQUB.mjs.map} +1 -1
- package/dist/client/floatingips-DrCvtXtT.mjs +551 -0
- package/dist/client/floatingips-DrCvtXtT.mjs.map +1 -0
- package/dist/client/index.js +9 -9
- package/dist/client/index.js.map +1 -1
- package/dist/client/{objects-D9Luf9KB.mjs → objects-AERkhfiM.mjs} +2 -2
- package/dist/client/{objects-D9Luf9KB.mjs.map → objects-AERkhfiM.mjs.map} +1 -1
- package/dist/client/{objects-BE_u5yRt.mjs → objects-BR3eeSNH.mjs} +6 -6
- package/dist/client/{objects-BE_u5yRt.mjs.map → objects-BR3eeSNH.mjs.map} +1 -1
- package/dist/client/{objects-BN-59Th0.mjs → objects-DVccbrL1.mjs} +2 -2
- package/dist/client/{objects-BN-59Th0.mjs.map → objects-DVccbrL1.mjs.map} +1 -1
- package/package.json +1 -1
- package/dist/client/FloatingIpActionModals-CwEC5GR-.mjs +0 -460
- package/dist/client/FloatingIpActionModals-CwEC5GR-.mjs.map +0 -1
- package/dist/client/TwoColumnDescriptionList-NvgvErua.mjs.map +0 -1
- package/dist/client/_floatingIpId-AE9Fu8l6.mjs +0 -210
- package/dist/client/_floatingIpId-AE9Fu8l6.mjs.map +0 -1
- package/dist/client/_floatingIpId-AZ11Ksmu.mjs.map +0 -1
- package/dist/client/_imageId-BtAql2Kr.mjs.map +0 -1
- package/dist/client/_imageId-D76BxvFY.mjs.map +0 -1
- package/dist/client/floatingips-xbO_mu4f.mjs +0 -576
- package/dist/client/floatingips-xbO_mu4f.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_securityGroupId-
|
|
1
|
+
{"version":3,"file":"_securityGroupId-C6eHmrx_.mjs","names":["createFileRoute","redirect","getServiceIndex","Route","staticData","section","service","analytics","name","RouteInfo","loader","context","params","sg","trpcClient","network","securityGroup","getById","query","project_id","projectId","securityGroupId","sgTitle","id","head","loaderData","meta","title","component","lazyRouteComponent","$$splitComponentImporter","beforeLoad","availableServices","auth","getAvailableServices","serviceIndex","to"],"sources":["../../src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/index.tsx"],"sourcesContent":["import { Button, Stack, Status } from \"@cloudoperators/juno-ui-components/index\"\nimport { createFileRoute, redirect, useNavigate } from \"@tanstack/react-router\"\nimport { useMemo } from \"react\"\nimport { Trans, useLingui } from \"@lingui/react/macro\"\nimport { getServiceIndex } from \"@/server/Authentication/helpers\"\nimport { useProjectId } from \"@/client/hooks\"\nimport type { RouteInfo } from \"@/client/routes/routeInfo\"\nimport { ContentHeader } from \"@/client/components/ContentHeader/ContentHeader\"\nimport { useListWithFiltering } from \"@/client/utils/useListWithFiltering\"\nimport { trpcReact } from \"@/client/trpcClient\"\nimport { SecurityGroupDetailsView } from \"./-components/SecurityGroupDetailsView\"\nimport { EditSecurityGroupModal } from \"../-components/-modals/EditSecurityGroupModal\"\nimport { useSecurityGroupDetails } from \"./-hooks/useSecurityGroupDetails\"\nimport { useSecurityGroupPermissions } from \"../-hooks/useSecurityGroupPermissions\"\nimport { useSetBreadcrumb } from \"@/client/hooks/useSetBreadcrumb\"\n\nexport const Route = createFileRoute(\"/_auth/projects/$projectId/network/securitygroups/$securityGroupId/\")({\n staticData: {\n section: \"network\",\n service: \"securitygroups\",\n analytics: {\n name: \"network.securitygroups.detail\",\n },\n } satisfies RouteInfo,\n loader: async ({ context, params }) => {\n const sg = await context.trpcClient?.network.securityGroup.getById.query({\n project_id: params.projectId,\n securityGroupId: params.securityGroupId,\n })\n return { sgTitle: sg?.name || sg?.id || null }\n },\n head: ({ loaderData }) => ({\n meta: [{ title: loaderData?.sgTitle ?? \"Security Group\" }],\n }),\n component: RouteComponent,\n beforeLoad: async ({ context, params }) => {\n const { trpcClient } = context\n\n const availableServices = (await trpcClient?.auth.getAvailableServices.query()) || []\n\n const serviceIndex = getServiceIndex(availableServices)\n\n // Redirect to the \"Projects Overview\" page if network service not available\n if (!serviceIndex[\"network\"]) {\n throw redirect({\n to: \"/projects/$projectId/network/securitygroups\",\n params: { projectId: params.projectId },\n })\n }\n\n if (!serviceIndex[\"network\"][\"neutron\"]) {\n // Redirect to the \"Network Services Overview\" page if the \"Neutron\" service is not available\n throw redirect({\n to: \"/projects/$projectId/network/securitygroups\",\n params: { projectId: params.projectId },\n })\n }\n },\n})\n\nfunction RouteComponent() {\n const { securityGroupId } = Route.useParams()\n const { trpcClient } = Route.useRouteContext()\n const projectId = useProjectId()\n const navigate = useNavigate()\n const { t } = useLingui()\n\n if (!trpcClient) {\n throw new Error(\"trpcClient is not available in route context\")\n }\n\n const {\n permissions,\n isLoading: isLoadingPermissions,\n isError: isPermissionsError,\n } = useSecurityGroupPermissions(projectId)\n\n // Rules filtering using the same pattern as List page\n const {\n searchTerm: rulesSearchTerm,\n sortSettings,\n filterSettings,\n handleSearchChange,\n handleSortChange,\n handleFilterChange,\n } = useListWithFiltering<\"direction\" | \"protocol\" | \"description\">({\n defaultSortKey: \"direction\",\n defaultSortDir: \"asc\",\n sortOptions: [\n { label: t`Direction`, value: \"direction\" },\n { label: t`Protocol`, value: \"protocol\" },\n { label: t`Description`, value: \"description\" },\n ],\n filterSettings: {\n filters: [\n {\n displayName: t`Direction`,\n filterName: \"direction\",\n values: [\"ingress\", \"egress\"],\n supportsMultiValue: false,\n },\n {\n displayName: t`Ethertype`,\n filterName: \"ethertype\",\n values: [\"IPv4\", \"IPv6\"],\n supportsMultiValue: false,\n },\n {\n displayName: t`Protocol`,\n filterName: \"protocol\",\n values: [\"tcp\", \"udp\", \"icmp\", \"ipv6-icmp\"],\n supportsMultiValue: false,\n },\n ],\n },\n })\n\n // Group filter controls for the hook\n const filterControls = {\n searchTerm: rulesSearchTerm,\n onSearchChange: handleSearchChange,\n sortSettings,\n onSortChange: handleSortChange,\n filterSettings,\n onFilterChange: handleFilterChange,\n }\n\n // Use custom hook for logic (now includes filtering/sorting)\n const {\n securityGroup,\n filteredAndSortedRules,\n isLoading,\n isError,\n error,\n isUpdating,\n updateError,\n isDeletingRule,\n deleteRuleError,\n isCreatingRule,\n createRuleError,\n editModalOpen,\n handleEdit,\n handleCloseEditModal,\n handleUpdate,\n handleDeleteRule,\n handleCreateRule,\n } = useSecurityGroupDetails({\n securityGroupId,\n filterControls,\n })\n\n useSetBreadcrumb(Route.id, securityGroup?.name ?? undefined)\n\n // Fetch available security groups for the Add Rule dropdown\n const { data: securityGroups } = trpcReact.network.securityGroup.list.useQuery({ project_id: projectId })\n const availableSecurityGroups = useMemo(() => {\n return (securityGroups || [])\n .filter((sg) => sg.id !== securityGroupId) // Exclude current group\n .map((sg) => ({\n id: sg.id,\n name: sg.name || sg.id,\n }))\n }, [securityGroups, securityGroupId])\n\n const handleBack = () => {\n navigate({\n to: \"/projects/$projectId/network/securitygroups\",\n params: { projectId },\n })\n }\n\n // Handle loading permissions\n if (isLoadingPermissions) {\n return <Status status=\"progress\" title={t`Loading Permissions...`} />\n }\n\n // Handle permissions error - default to no permissions\n const safePermissions = isPermissionsError\n ? {\n canView: false,\n canCreate: false,\n canUpdate: false,\n canDelete: false,\n canCreateRule: false,\n canDeleteRule: false,\n canManageAccess: false,\n canViewRBAC: false,\n }\n : permissions!\n\n // Handle loading state\n if (isLoading) {\n return <Status status=\"progress\" title={t`Loading Security Group Details...`} />\n }\n\n // Handle error state\n if (isError) {\n const errorMessage = error?.message || \"Unknown error\"\n\n return (\n <Stack className=\"fixed inset-0\" distribution=\"center\" alignment=\"center\" direction=\"vertical\" gap=\"5\">\n <p className=\"text-theme-error font-semibold\">\n <Trans>Error loading security group</Trans>\n </p>\n <p className=\"text-theme-highest\">{errorMessage}</p>\n <Button onClick={handleBack} variant=\"primary\">\n <Trans>Back to Security Groups</Trans>\n </Button>\n </Stack>\n )\n }\n\n // Handle no data state\n if (!securityGroup) {\n return (\n <Stack className=\"fixed inset-0\" distribution=\"center\" alignment=\"center\" direction=\"vertical\" gap=\"5\">\n <p className=\"text-theme-secondary\">\n <Trans>Security group not found</Trans>\n </p>\n <Button onClick={handleBack} variant=\"primary\">\n <Trans>Back to Security Groups</Trans>\n </Button>\n </Stack>\n )\n }\n\n // Render success state\n return (\n <Stack direction=\"vertical\">\n <ContentHeader\n title={securityGroup.name || securityGroup.id}\n projectId={projectId}\n description={t`Configure the ingress and egress rules that control which traffic is allowed for this security group.`}\n />\n\n <SecurityGroupDetailsView\n securityGroup={securityGroup}\n filteredAndSortedRules={filteredAndSortedRules}\n onEdit={handleEdit}\n onDeleteRule={handleDeleteRule}\n isDeletingRule={isDeletingRule}\n deleteRuleError={deleteRuleError}\n filterControls={filterControls}\n onCreateRule={handleCreateRule}\n isCreatingRule={isCreatingRule}\n createRuleError={createRuleError}\n availableSecurityGroups={availableSecurityGroups}\n currentProjectId={projectId}\n permissions={safePermissions}\n />\n\n <EditSecurityGroupModal\n securityGroup={securityGroup}\n open={editModalOpen}\n onClose={handleCloseEditModal}\n onUpdate={handleUpdate}\n isLoading={isUpdating}\n error={updateError}\n />\n </Stack>\n )\n}\n"],"mappings":";;AAgBA,IAAaG,IAAQH,EAAgB,qEAAA,CAAA,CAAuE;CAC1GI,YAAY;EACVC,SAAS;EACTC,SAAS;EACTC,WAAW,EACTC,MAAM,gCACR;CACF;CACAE,QAAQ,OAAO,EAAEC,YAASC,gBAAQ;EAChC,IAAMC,IAAK,MAAMF,EAAQG,YAAYC,QAAQC,cAAcC,QAAQC,MAAM;GACvEC,YAAYP,EAAOQ;GACnBC,iBAAiBT,EAAOS;EAC1B,CAAA;EACA,OAAO,EAAEC,SAAST,GAAIL,QAAQK,GAAIU,MAAM,KAAK;CAC/C;CACAC,OAAO,EAAEC,qBAAkB,EACzBC,MAAM,CAAC,EAAEC,OAAOF,GAAYH,WAAW,iBAAiB,CAAC,EAC3D;CACAM,WAASC,mDAAA,WAAA;CACTE,YAAY,OAAO,EAAEpB,YAASC,gBAAQ;EACpC,IAAM,EAAEE,kBAAeH,GAEjBqB,IAAoB,MAAOlB,GAAYmB,KAAKC,qBAAqBhB,MAAAA,KAAY,CAAA,GAE7EiB,IAAejC,EAAgB8B,CAAAA;EAUrC,IAPI,CAACG,EAAa,WAOd,CAACA,EAAa,QAAW,SAE3B,MAAMlC,EAAS;GACbmC,IAAI;GACJxB,QAAQ,EAAEQ,WAAWR,EAAOQ,UAAU;EACxC,CAAA;CAEJ;AACF,CAAA"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { A as e, C as t, D as n, E as r, K as i, L as a, M as o, P as s, Q as c, R as l, S as u, T as d, X as f, et as p, ft as m, g as h, h as g, i as _, it as v, l as y, lt as b, m as x, n as S, o as C, ot as w, p as T, rt as E, s as D, t as O, v as k, x as A } from "./build-WuxXRAqf.mjs";
|
|
2
2
|
import { a as j } from "./trpcClient-D7gpR7YG.mjs";
|
|
3
|
-
import { t as M } from "./_securityGroupId-
|
|
3
|
+
import { t as M } from "./_securityGroupId-C6eHmrx_.mjs";
|
|
4
4
|
import { t as N } from "./useProjectId-DBc5lpoU.mjs";
|
|
5
5
|
import { t as ee } from "./SortInput-4g7nSTHW.mjs";
|
|
6
6
|
import { t as P } from "./useModalTracking-BcOKTYRN.mjs";
|
|
7
7
|
import { t as F } from "./ContentHeader-CPJbgYWn.mjs";
|
|
8
8
|
import { t as I } from "./useSetBreadcrumb-tn7lBaQV.mjs";
|
|
9
9
|
import "./hooks-D0yKIumu.mjs";
|
|
10
|
-
import { t as L } from "./TwoColumnDescriptionList-
|
|
10
|
+
import { t as L } from "./TwoColumnDescriptionList-DKS42RKa.mjs";
|
|
11
11
|
import { t as R } from "./useModal-DCs1OJh7.mjs";
|
|
12
12
|
import { n as te, t as ne } from "./FiltersInput-CKI6zWnm.mjs";
|
|
13
13
|
import { a as re, d as z, f as B, i as ie, l as V, m as H, n as ae, o as oe, p as se, r as ce, t as le, u as ue } from "./useSecurityGroupPermissions-BOyLQLdC.mjs";
|
|
@@ -1807,4 +1807,4 @@ function qe() {
|
|
|
1807
1807
|
//#endregion
|
|
1808
1808
|
export { qe as component };
|
|
1809
1809
|
|
|
1810
|
-
//# sourceMappingURL=_securityGroupId-
|
|
1810
|
+
//# sourceMappingURL=_securityGroupId-DmplhDgt.mjs.map
|