From 0a7dfc4214c0cf896f420e3e524138d5edf99939 Mon Sep 17 00:00:00 2001 From: Sina Date: Tue, 9 Jul 2024 13:54:01 +0200 Subject: [PATCH] [fix] Add product-tier limitation to the panel (#264) --- src/locales/de-DE/messages.po | 314 ++++++++++-------- src/locales/en-US/messages.po | 314 ++++++++++-------- .../queries/getWorkspaceProductTiers.query.ts | 15 + .../queries}/getWorkspaceUsers.query.ts | 0 src/pages/panel/shared/queries/index.ts | 2 + ...orkspaceSettingsAccountsSetupCloudPage.tsx | 19 +- .../WorkspaceSettingsAccountRow.tsx | 55 ++- .../WorkspaceSettingsAccountTableTitle.tsx | 5 +- .../WorkspaceSettingsAccountsTable.tsx | 63 +++- .../WorkspaceSettingsAccountsTableItem.tsx | 18 +- .../ChangeProductTier.tsx | 41 ++- .../ChangeProductTierModal.tsx | 80 ++++- .../ChangeProductTierToFreeModal.tsx | 86 ++++- .../ProductTierComp.tsx | 54 ++- .../utils/productTierToDescription.ts | 21 +- .../WorkspaceSettingsUsersTable.tsx | 25 +- src/shared/constants/endPoints.ts | 1 + src/shared/link-button/InternalLink.tsx | 34 ++ src/shared/link-button/index.ts | 1 + .../responses/GetWorkspaceProductTiers.ts | 13 + src/shared/types/server/responses/index.ts | 1 + src/shared/utils/parseDuration.test.ts | 2 +- src/shared/utils/parseDuration.ts | 2 +- 23 files changed, 802 insertions(+), 364 deletions(-) create mode 100644 src/pages/panel/shared/queries/getWorkspaceProductTiers.query.ts rename src/pages/panel/{workspace-settings-users => shared/queries}/getWorkspaceUsers.query.ts (100%) create mode 100644 src/shared/link-button/InternalLink.tsx create mode 100644 src/shared/types/server/responses/GetWorkspaceProductTiers.ts diff --git a/src/locales/de-DE/messages.po b/src/locales/de-DE/messages.po index 552d204b..788f0359 100644 --- a/src/locales/de-DE/messages.po +++ b/src/locales/de-DE/messages.po @@ -13,18 +13,27 @@ msgstr "" "Language-Team: \n" "Plural-Forms: \n" -#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:96 +#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:112 msgid "({0} max)" msgstr "({0} max)" -#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:82 +#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:98 msgid "(${0} / month per additional account)" msgstr "(${0} / Monat pro zusätzlichem Konto)" +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTable.tsx:48 +msgid "{0, plural, one {# cloud account} other {# cloud accounts}}" +msgstr "" + #: src/shared/utils/parseDuration.ts:171 msgid "{0, plural, one {# Day} other {# Days}}" msgstr "{0, plural, one {# Tag} other {# Tage}}" +#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:238 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:148 +msgid "{0, plural, one {# enabled cloud account} other {# enabled cloud accounts}}" +msgstr "" + #: src/shared/utils/parseDuration.ts:179 msgid "{0, plural, one {# Hour} other {# Hours}}" msgstr "{0, plural, one {# Stunde} other {# Stunden}}" @@ -41,6 +50,11 @@ msgstr "{0, plural, one {# Monat} other {# Monate}}" msgid "{0, plural, one {# Second} other {# Seconds}}" msgstr "{0, plural, one {# Sekunde} other {# Sekunden}}" +#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:257 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:167 +msgid "{0, plural, one {# user} other {# users}}" +msgstr "" + #: src/shared/utils/parseDuration.ts:163 msgid "{0, plural, one {# Week} other {# Weeks}}" msgstr "{0, plural, one {# Woche} other {# Wochen}}" @@ -74,7 +88,7 @@ msgstr "{0} Cloud-Konto beeinträchtigt, ID: {1}" msgid "{0} Cloud account discovered, id: {1}" msgstr "{0} Cloud-Konto entdeckt, ID: {1}" -#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:69 +#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:85 msgid "{0} cloud accounts included" msgstr "{0} Cloud-Konten enthalten" @@ -86,27 +100,40 @@ msgstr "{0} wurde verbunden" msgid "{0} Milliseconds" msgstr "{0} Millisekunden" -#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:91 -msgid "{0} scans" -msgstr "{0} Scans" +#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:31 +msgid "{0} per" +msgstr "" -#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:99 +#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:115 msgid "{0} seat max" msgstr "{0} Sitzplatz max" -#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:95 +#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:111 msgid "{0} seats included {1}" msgstr "{0} Sitzplätze inbegriffen {1}" +#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:32 +msgid "{0}-month history" +msgstr "{0}-monatige Historie" + #: src/pages/panel/security/OverallScore.tsx:59 #: src/pages/panel/shared/utils/createPieDataFromNonCompliance.ts:26 msgid "{0}: We've identified {1} non-compliant resources out of {2}." msgstr "{0}: Wir haben {1} nicht konforme Ressourcen von insgesamt {2}." +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTable.tsx:43 +msgid "{accountLength, plural, one {# enabled cloud account} other {# enabled cloud accounts}}" +msgstr "" + #: src/pages/panel/resource-detail/utils/nodeChange.tsx:47 msgid "{added} configuration lines added and {removed} lines deleted." msgstr "{added} Konfigurationszeilen hinzugefügt und {removed} Zeilen gelöscht." +#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:233 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:143 +msgid "{cloudAccountsLength, plural, one {# enabled cloud account} other {# enabled cloud accounts}}" +msgstr "" + #: src/pages/panel/workspace-settings-accounts-setup-cloud-azure/WorkspaceSettingsAccountsSetupCloudAzureSubmitCredentialsInput.tsx:32 msgid "{label} is not valid" msgstr "" @@ -115,7 +142,16 @@ msgstr "" msgid "{label} is required" msgstr "" -#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:47 +#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:107 +msgid "{scanIntervalStr} scans" +msgstr "{scanIntervalStr} Scans" + +#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:252 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:162 +msgid "{usersLength, plural, one {# user} other {# users}}" +msgstr "" + +#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:63 msgid "/ month" msgstr "/ Monat" @@ -180,22 +216,6 @@ msgstr "" msgid "<0>Your cloud account has been successfully added!<1>Thank you for deploying the CloudFormation stack in your AWS account.<2>Here’s what’s happening behind the scenes:<3><4>Initial Trust Establishment (5-15 minutes): After deployment, a cross-account trust for the role included in the stack is established between your and Fix's AWS accounts. Due to AWS's distributed infrastructure, this step can take anywhere from 5 to 15 minutes as we wait for the trust to become active across their network. During this time, our backend continuously probes to confirm when the trust is operational.<5>First Security Scan (2-10 minutes): Once the trust is established, we proceed with the initial security scan of your environment. Depending on the size and complexity of your cloud account, this scan can take anywhere from 2 to 10 minutes.<6>Email Notification: You won't have to wait in front of your browser to know when we're done. After the first security scan is completed, we'll notify you by email.<7>What to Expect Next:<8><9>Dashboard Availability: Your dashboard and inventory will be available shortly after the completion of the initial security scan. This gives you a comprehensive view of your security posture and any findings we have identified.<10>Subsequent Scans: After the initial scan, subsequent security scans will also take 2 to 10 minutes each, without the initial delay, since the trust has to be established only once.<11>We appreciate your patience during this setup process. If you have any questions or need assistance, please do not hesitate to contact us directly <12>on our Discord server<13/>." msgstr "<0>Ihr Cloud-Konto wurde erfolgreich hinzugefügt!<1>Vielen Dank, dass Sie den CloudFormation-Stack in Ihrem AWS-Konto bereitgestellt haben.<2>Hier ist, was im Hintergrund geschieht:<3><4>Erstmalige Vertrauensstellung (5-15 Minuten): Nach der Bereitstellung wird zwischen Ihrem und Fix's AWS-Konten ein Cross-Account-Vertrauen für die im Stack enthaltene Rolle hergestellt. Aufgrund der verteilten Infrastruktur von AWS kann dieser Schritt zwischen 5 und 15 Minuten dauern, da wir darauf warten, dass die Vertrauensstellung im gesamten Netzwerk aktiv wird. Während dieser Zeit überprüft unser Backend kontinuierlich, wann der Zugriff funktionsfähig ist.<5>Erster Sicherheitsscan (2-10 Minuten): Sobald die Vertrauensstellung hergestellt ist, führen wir den ersten Sicherheitsscan Ihrer Umgebung durch. Abhängig von der Größe und Komplexität Ihres Cloud-Kontos kann dieser Scan zwischen 2 und 10 Minuten dauern.<6>E-Mail-Benachrichtigung: Sie müssen nicht vor Ihrem Browser warten, um zu wissen, wann wir fertig sind. Nachdem der erste Sicherheitsscan abgeschlossen ist, werden wir Sie per E-Mail benachrichtigen.<7>Was Sie als Nächstes erwarten können:<8><9>Dashboard-Verfügbarkeit: Ihr Dashboard und Inventar werden kurz nach Abschluss des ersten Sicherheitsscans verfügbar sein. Dies gibt Ihnen einen umfassenden Überblick über Ihre Sicherheitslage.<10>Nachfolgende Scans: Nach dem ersten Scan werden auch nachfolgende Sicherheitsscans jeweils 2 bis 10 Minuten dauern, ohne die anfängliche Verzögerung, da die Vertrauensstellung nur einmal hergestellt werden muss.<11>Wir danken Ihnen für Ihre Geduld während dieses Einrichtungsprozesses. Wenn Sie Fragen haben oder Hilfe benötigen, zögern Sie bitte nicht, uns direkt auf <12>unserem Discord-Server<13/>zu kontaktieren." -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:22 -msgid "1-month history" -msgstr "1-monatige Historie" - -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:78 -msgid "18-month history" -msgstr "18-monatige Geschichte" - -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:44 -msgid "3-month history" -msgstr "3-monatige Historie" - -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:59 -msgid "6-month history" -msgstr "6-monatige Historie" - #: src/containers/auth/AuthContainer.tsx:61 msgid "A few minutes to first results" msgstr "In wenigen Minuten bis zum ersten Ergebnis" @@ -224,8 +244,8 @@ msgstr "Akzeptieren" msgid "Access Control (IAM)" msgstr "" -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:241 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:367 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:259 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:385 msgid "Access to your account is broken" msgstr "Der Zugriff auf Ihr Konto ist unterbrochen" @@ -257,8 +277,8 @@ msgstr "Zusammenfassung der Konten" msgid "Action" msgstr "Aktion" -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:83 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:78 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:89 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:91 msgid "Actions" msgstr "Aktionen" @@ -273,7 +293,7 @@ msgid "Add a client secret" msgstr "" #: src/pages/panel/workspace-settings-billing/ChangePaymentNoMethodModal.tsx:60 -#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:102 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:135 #: src/pages/panel/workspace-settings-billing/ConfirmChangePaymentModal.tsx:83 msgid "Add a New Credit or Debit Card" msgstr "" @@ -314,7 +334,7 @@ msgstr "" msgid "Add the Role assignment to the App" msgstr "" -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTable.tsx:30 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTable.tsx:77 msgid "Added accounts" msgstr "Konten hinzugefügt" @@ -341,7 +361,7 @@ msgstr "" msgid "Age" msgstr "Alter" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:61 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:47 msgid "Alerting integrations (PD, Slack, Discord, Teams)" msgstr "Alarmierungsintegrationen (PD, Slack, Discord, Teams)" @@ -389,8 +409,8 @@ msgstr "Eine E-Mail wurde mit einem 'Passwort zurücksetzen'-Button an Ihren Pos msgid "An error occurred while connecting to {0}" msgstr "Beim Herstellen der Verbindung zu {0} ist ein Fehler aufgetreten." -#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:56 -#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:34 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:88 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:71 #: src/pages/panel/workspace-settings-billing/ConfirmChangePaymentModal.tsx:34 #: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:32 msgid "An error occurred, please try again later." @@ -404,7 +424,7 @@ msgstr "" msgid "and" msgstr "und" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:79 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:60 msgid "API access" msgstr "API-Zugriff" @@ -429,13 +449,13 @@ msgstr "Möchten Sie die Verbindung zu {name} wirklich trennen?" msgid "Are you sure you want to remove the {name} account {0}?" msgstr "Sind Sie sicher, dass Sie das {name}-Konto {0} entfernen möchten?" -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:436 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:454 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:85 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:107 msgid "Are you sure?" msgstr "Bist du sicher?" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:23 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:18 msgid "Asset inventory" msgstr "Cloud-Asset-Inventar" @@ -524,10 +544,10 @@ msgstr "Business" #: src/pages/panel/user-settings/UserSettingsSocialNetworkDeleteButton.tsx:68 #: src/pages/panel/user-settings/UserSettingsTotpActivationModal.tsx:121 #: src/pages/panel/user-settings/UserSettingsTotpDeactivationModal.tsx:49 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:287 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:291 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:292 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:455 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:305 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:309 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:310 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:473 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:92 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx:154 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx:158 @@ -542,6 +562,10 @@ msgstr "Business" msgid "Cancel" msgstr "Stornieren" +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:500 +msgid "Cannot enable this account" +msgstr "" + #: src/pages/panel/inventory/inventory-form/InventoryFormDefaultValue.tsx:211 #: src/pages/panel/inventory/inventory-form/InventoryFormMoreValue.tsx:125 #: src/pages/panel/inventory/inventory-form/InventoryFormTagsValue.tsx:115 @@ -556,8 +580,8 @@ msgstr "" msgid "Change Payment method" msgstr "" -#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:126 -#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:81 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:160 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:119 msgid "Change Product Tier" msgstr "Produktstufe ändern" @@ -636,7 +660,7 @@ msgid "Client secret" msgstr "" #: src/pages/panel/user-settings/UserSettingsTotpRecoveryCodesModal.tsx:36 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:373 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:391 msgid "Close" msgstr "Schließen" @@ -645,8 +669,8 @@ msgstr "Schließen" #: src/pages/panel/inventory/inventory-form/InventoryFormMore.tsx:96 #: src/pages/panel/resource-detail/ResourceDetailView.tsx:235 #: src/pages/panel/security/AccountCard.tsx:37 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:475 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:53 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:493 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:59 msgid "Cloud" msgstr "Cloud" @@ -659,7 +683,7 @@ msgstr "Cloud Setup" msgid "Clouds" msgstr "Clouds" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:31 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:26 msgid "Community support" msgstr "Gemeinschaftliche Unterstützung" @@ -678,7 +702,7 @@ msgstr "Konfiguration geändert" msgid "Configure" msgstr "Konfigurieren" -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:385 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:403 msgid "Configure Service Principal" msgstr "" @@ -704,7 +728,7 @@ msgstr "Herzlichen Glückwunsch zu Ihrem Abonnement" msgid "Connect" msgstr "Verbinden" -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:383 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:401 msgid "Connect GCP Service Account" msgstr "" @@ -753,7 +777,7 @@ msgstr "Kopieren" msgid "Copy the Secret Value of the created secret and paste it in the Secret Value field {0}, but don't press the submit button yet." msgstr "" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:29 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:24 msgid "Core CSPM scanning capabilities" msgstr "Kern-CSPM-Scanfunktionen" @@ -785,8 +809,8 @@ msgstr "" msgid "Critical" msgstr "Kritisch" -#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:168 -#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:86 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:202 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:124 msgid "Current Product Tier" msgstr "" @@ -794,19 +818,19 @@ msgstr "" msgid "Currently, there are no connected services available for configuration. Please be informed that connecting at least one service is necessary to configure alerting settings." msgstr "Derzeit stehen keine verbundenen Dienste zur Konfiguration zur Verfügung. Bitte beachten Sie, dass zum Konfigurieren der Alarmeinstellungen die Verbindung mindestens eines Dienstes erforderlich ist." -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:80 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:61 msgid "Custom alerting webhooks" msgstr "Benutzerdefinierte Benachrichtigungs-Webhooks" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:60 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:46 msgid "Custom policies (coming soon!)" msgstr "Benutzerdefinierte Richtlinien (in Kürze verfügbar!)" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:42 +#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:28 msgid "Daily" msgstr "Tägliche" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:44 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:35 msgid "Data export (CSV, JSON, PDF)" msgstr "Datenexport (CSV, JSON, PDF)" @@ -839,10 +863,10 @@ msgid "Delayed Effect" msgstr "Verzögerte Wirkung" #: src/pages/panel/user-settings/UserSettingsSocialNetworkDeleteButton.tsx:79 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:354 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:358 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:359 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:466 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:372 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:376 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:377 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:484 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:73 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:77 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:78 @@ -860,7 +884,7 @@ msgstr "Anbieter löschen" #: src/pages/panel/shared/setup-cloud-button/SetupCloudButton.tsx:13 #: src/pages/panel/shared/setup-cloud-button/SetupCloudButton.tsx:29 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:381 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:399 msgid "Deploy Stack" msgstr "Deploy Stack" @@ -894,7 +918,7 @@ msgstr "Trennen" msgid "Disconnect Service" msgstr "Dienst trennen" -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTable.tsx:38 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTable.tsx:87 msgid "Discovered but unconfigured accounts" msgstr "Erkannte, aber nicht konfigurierte Konten" @@ -910,7 +934,7 @@ msgstr "Zeig es mir nicht noch einmal" msgid "Do not show this message again." msgstr "" -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:439 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:457 msgid "Do you want to delete this account?" msgstr "Möchten Sie dieses Konto löschen?" @@ -931,8 +955,8 @@ msgstr "Sie haben noch kein Konto? Klicken Sie hier, um sich anzumelden." msgid "Done! We will now import your Azure accounts, this usually takes a couple of minutes." msgstr "" -#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:121 -#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:77 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:155 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:115 msgid "Downgrade" msgstr "Downgrade" @@ -945,8 +969,8 @@ msgstr "CSV herunterladen" msgid "Drop Service Account Key File" msgstr "" -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:303 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:304 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:321 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:322 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx:175 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx:176 msgid "Edit" @@ -962,7 +986,7 @@ msgstr "Edit" #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:109 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationsTable.tsx:49 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:135 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:63 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:76 #: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsEmailService.tsx:143 msgid "Email" msgstr "Email" @@ -971,7 +995,7 @@ msgstr "Email" msgid "Email Address" msgstr "" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:44 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:35 msgid "Email alerts" msgstr "E-Mail-Alarmierungen" @@ -985,7 +1009,7 @@ msgid "Enable all" msgstr "Alle aktivieren" #: src/pages/panel/user-settings/UserSettingsNotification.tsx:49 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:72 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:78 msgid "Enabled" msgstr "Ermöglicht" @@ -1005,15 +1029,15 @@ msgstr "Unternehmen" msgid "Events" msgstr "Veranstaltungen" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:76 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:58 msgid "Everything in Business, and" msgstr "Alles im Geschäft, und" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:43 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:34 msgid "Everything in Free, and" msgstr "Alles in Free, und" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:57 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:44 msgid "Everything in Plus, and" msgstr "Alles in Plus, und" @@ -1054,7 +1078,7 @@ msgstr "Fehler bei der Überprüfung des Zeitplans" msgid "Failing Resources" msgstr "" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:20 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:16 msgid "Features" msgstr "Funktionen" @@ -1082,15 +1106,15 @@ msgstr "Fix scannt Ihre Infrastruktur- und Ressourcenkonfigurationen mithilfe de msgid "Fixed issues" msgstr "Behobene Probleme" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:69 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:55 msgid "For dedicated security teams looking to build an integrated security toolchain." msgstr "Für engagierte Sicherheitsteams, die eine integrierte Sicherheits-Toolchain aufbauen möchten." -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:50 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:41 msgid "For engineering teams looking to automate their cloud infrastructure security." msgstr "Für Engineering-Teams, die die Sicherheit ihrer Cloud-Infrastruktur automatisieren möchten." -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:36 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:31 msgid "For growing teams looking to stay secure as they build out infrastructure.\\n" msgstr "Für wachsende Teams, die sicher bleiben möchten, während sie die Infrastruktur aufbauen.\\n" @@ -1164,8 +1188,7 @@ msgstr "" msgid "Homepage" msgstr "Startseite" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:56 -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:75 +#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:30 msgid "Hourly" msgstr "Stündliche" @@ -1184,8 +1207,8 @@ msgstr "" #: src/pages/panel/resource-detail/ResourceDetailView.tsx:232 #: src/pages/panel/security/AccountCard.tsx:34 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:472 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:56 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:490 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:62 #: src/shared/charts/NetworkDiagram.tsx:407 msgid "ID" msgstr "ID" @@ -1267,7 +1290,7 @@ msgstr "Inaktivitätserinnerung" msgid "Info" msgstr "Info" -#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:178 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:212 msgid "Info: Changes to your product tier will become active immediately and be applied for the current billing cycle. {0}<0/>Your next billing cycle starts: {1} UTC" msgstr "" @@ -1279,7 +1302,7 @@ msgstr "" msgid "Instance is terminated" msgstr "Instanz wird beendet" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:87 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:68 msgid "Integration advice for your specific cloud environment via video call" msgstr "Integrationsberatung für Ihre spezifische Cloud-Umgebung per Videoanruf" @@ -1300,7 +1323,7 @@ msgstr "Ungültiger Wert" msgid "Inventory" msgstr "Inventar" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:24 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:19 msgid "Inventory search" msgstr "Inventarsuche" @@ -1314,7 +1337,7 @@ msgstr "Einladen" msgid "Invite External User" msgstr "Externen Benutzer einladen" -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:74 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:87 msgid "Invites" msgstr "Lädt ein" @@ -1332,7 +1355,7 @@ msgstr "Art" msgid "Kinds" msgstr "Arten" -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:71 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:84 msgid "Last login" msgstr "Letzte Anmeldung" @@ -1374,11 +1397,11 @@ msgstr "Recheninstanzen und Datenbanken mit geringer Auslastung" msgid "Make sure that you are already logged into the correct AWS account, before pressing the DEPLOY STACK button." msgstr "Stellen Sie sicher, dass Sie bereits beim richtigen AWS Konto angemeldet sind, bevor Sie auf die Schaltfläche DEPLOY STACK klicken." -#: src/pages/panel/workspace-settings-billing/ChangeProductTier.tsx:156 +#: src/pages/panel/workspace-settings-billing/ChangeProductTier.tsx:185 msgid "Manage AWS Market place payment method" msgstr "" -#: src/pages/panel/workspace-settings-billing/ChangeProductTier.tsx:175 +#: src/pages/panel/workspace-settings-billing/ChangeProductTier.tsx:204 msgid "Manage Card Details" msgstr "" @@ -1386,7 +1409,7 @@ msgstr "" msgid "Manual" msgstr "" -#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:59 +#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:75 msgid "maximum of {0} cloud accounts" msgstr "maximal {0} Cloud-Konten" @@ -1403,12 +1426,12 @@ msgstr "Mitglied" msgid "MFA already enabled" msgstr "" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:19 +#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:26 #: src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx:127 msgid "Monthly" msgstr "Monatliche" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:27 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:22 msgid "Monthly email report" msgstr "Monatlicher E-Mail-Bericht" @@ -1430,15 +1453,15 @@ msgstr "Die meisten nicht konformen Konten" #: src/pages/panel/benchmark-detail/BenchmarkDetailCheckDetail.tsx:177 #: src/pages/panel/resource-detail/ResourceDetailView.tsx:233 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:478 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:59 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:496 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:65 #: src/pages/panel/workspace-settings-external-directory/AddExternalDirectory.tsx:42 #: src/pages/panel/workspace-settings-external-directory/AddExternalDirectory.tsx:46 #: src/pages/panel/workspace-settings-external-directory/WorkspaceSettingsExternalDirectoryPage.tsx:18 #: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:76 #: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:80 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:138 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:60 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:73 #: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsEmailService.tsx:126 #: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsOpsgenieService.tsx:132 #: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsPagerdutyService.tsx:130 @@ -1447,7 +1470,7 @@ msgstr "Die meisten nicht konformen Konten" msgid "Name" msgstr "Name" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:25 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:20 msgid "Neighborhood view" msgstr "Nachbarschaftsansicht" @@ -1476,8 +1499,8 @@ msgstr "neue nicht konforme Ressourcen in der Vergangenheit {since}" msgid "New Password" msgstr "Neues Kennwort" -#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:171 -#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:89 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:205 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:127 msgid "New Product Tier" msgstr "" @@ -1493,7 +1516,7 @@ msgstr "Neue Sicherheitsprobleme entdeckt" msgid "Next invoice will be available" msgstr "" -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:67 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:73 msgid "Next scan" msgstr "Nächster Scan" @@ -1539,7 +1562,7 @@ msgstr "" msgid "Non-Compliant Resources" msgstr "" -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:442 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:460 msgid "Note: You are about to delete a management or delegated admin account. Please be aware that once deleted, we will no longer have the capability to retrieve any account names, requiring you to edit them manually." msgstr "Sie löschen gerade ein Management- oder delegiertes Admin-Konto. Beachten Sie bitte, dass wir nach der Löschung nicht mehr in der Lage sein werden, Kontonamen abzurufen, wodurch Sie diese manuell bearbeiten müssen." @@ -1569,6 +1592,7 @@ msgid "Number Of Account Charged" msgstr "Anzahl der belasteten Konten" #: src/core/auth/WorkspaceGuard.tsx:94 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:504 msgid "Ok" msgstr "" @@ -1637,7 +1661,7 @@ msgstr "" msgid "Opened at" msgstr "Geöffnet um" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:88 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:69 msgid "Optional professional services" msgstr "Optionale professionelle Dienstleistungen" @@ -1689,7 +1713,7 @@ msgstr "Passwort" msgid "Payment is required for your workspace, Please contact the workspace owner" msgstr "" -#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:132 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:166 #: src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx:89 msgid "Payment method" msgstr "" @@ -1709,7 +1733,7 @@ msgstr "" #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationsTable.tsx:29 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationsTable.tsx:45 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:35 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:48 #: src/shared/layouts/panel-layout/useBreadcrumbs.ts:21 msgid "Pending Invitations" msgstr "Ausstehende Einladungen" @@ -1758,27 +1782,27 @@ msgstr "Drucken oder kopieren Sie die folgenden Wiederherstellungscodes" msgid "Privileged" msgstr "Privilegiert" -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:236 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:254 msgid "Privileged account" msgstr "Privilegiertes Konto" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:45 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:36 msgid "Product support via email" msgstr "Produktsupport per E-Mail" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:64 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:50 msgid "Product support via email and live chat" msgstr "Produktsupport per E-Mail und Live-Chat" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:86 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:67 msgid "Product support via email, live chat, and video call" msgstr "Produktsupport per E-Mail, Live-Chat und Videoanruf" -#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:52 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:84 msgid "Product tier changed to {selectedProductTier}" msgstr "" -#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:30 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:67 msgid "Product tier changed to Free" msgstr "" @@ -1810,7 +1834,7 @@ msgstr "Erneut authentifizieren" msgid "Receipts" msgstr "Quittungen" -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTable.tsx:22 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTable.tsx:67 msgid "Recently added accounts" msgstr "Kürzlich hinzugefügte Konten" @@ -1855,7 +1879,7 @@ msgstr "" msgid "Reject" msgstr "Ablehnen" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:28 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:23 msgid "Remediation recommendations" msgstr "Empfehlungen zur Fehlerbehebung" @@ -1880,7 +1904,7 @@ msgstr "Ressource erstellt" msgid "Resource deleted" msgstr "Ressource gelöscht" -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:62 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:68 msgid "Resources" msgstr "Ressourcen" @@ -1903,7 +1927,7 @@ msgstr "Risiko" #: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:96 #: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:107 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:149 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:67 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:80 msgid "Roles" msgstr "Rollen" @@ -1932,7 +1956,7 @@ msgstr "" msgid "Security" msgstr "Sicherheit" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:26 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:21 msgid "Security benchmarks" msgstr "Sicherheitsbenchmarks" @@ -1944,7 +1968,7 @@ msgstr "Sicherheitsprobleme" msgid "Security posture improved" msgstr "Die Sicherheitslage wurde verbessert" -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:75 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:81 msgid "Security Scan" msgstr "Sicherheitsscan" @@ -2014,7 +2038,7 @@ msgstr "" msgid "Setting Up Email Notifications" msgstr "E-Mail-Benachrichtigungen einrichten" -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:387 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:405 msgid "Setup cloud" msgstr "" @@ -2044,11 +2068,11 @@ msgstr "Melden Sie sich an" msgid "Sign up with {formattedName}" msgstr "Melden Sie sich mit {formattedName} an" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:81 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:62 msgid "Single Sign on (coming soon!)" msgstr "Single Sign-on (bald verfügbar!)" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:83 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:64 msgid "Snowflake data export (coming soon!)" msgstr "Snowflake-Datenexport (bald verfügbar!)" @@ -2066,14 +2090,14 @@ msgid "Something went wrong please try again later." msgstr "Es ist ein Fehler aufgetreten. Bitte versuchen Sie es später noch einmal." #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:142 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:57 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:70 msgid "Sources" msgstr "Quellen" #: src/pages/panel/workspace-settings-accounts-setup-cloud-azure/WorkspaceSettingsAccountsSetupCloudAzureSubmitCredentials.tsx:136 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:276 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:277 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:282 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:294 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:295 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:300 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx:147 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx:148 msgid "Submit" @@ -2096,7 +2120,7 @@ msgstr "{email} erfolgreich eingeladen" msgid "Tags" msgstr "Stichworte" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:62 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:48 msgid "Task management integrations (coming soon!)" msgstr "Integrationen zur Aufgabenverwaltung (bald verfügbar!)" @@ -2141,11 +2165,11 @@ msgstr "" msgid "There's no account configured for this workspace." msgstr "Für diesen Arbeitsbereich ist kein Konto konfiguriert." -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:427 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:445 msgid "This account is currently in a degraded state possibly due to a misconfiguration.<0/>Fix was unable to gather data from this account." msgstr "" -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:395 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:413 msgid "This account is currently in a degraded state.<0/>Fix was unable to gather data from this account.<1/><2/>To resume security scans, please log into the {accountName} account ({0}) and re-deploy the CloudFormation stack that establishes the IAM role trust." msgstr "" @@ -2153,7 +2177,7 @@ msgstr "" msgid "This email address is already registered. If this is your email, please try logging in or click on forgot password in login page to reset your password." msgstr "Diese Email-Adresse ist bereits registriert. Wenn dies Ihre E-Mail-Adresse ist, versuchen Sie bitte, sich anzumelden, oder klicken Sie auf der Anmeldeseite auf „Passwort vergessen“, um Ihr Passwort zurückzusetzen." -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:405 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:423 msgid "This project is currently in a degraded state.<0/>Fix was unable to gather data from this project.<1/><2/>To resume security scans, please ensure that the service account you configured is set up correctly.<3/>You may also recreate and upload the service account definition." msgstr "" @@ -2161,7 +2185,7 @@ msgstr "" msgid "This section does not contain any controls that can be automated.<0/>Manual checks or processes are required for compliance." msgstr "" -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:416 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:434 msgid "This subscription is currently in a degraded state.<0/>Fix was unable to gather data from this subscription.<1/><2/>To resume security scans, please ensure that the application permissions are set up correctly.<3/>You may also recreate and redefine the access credentials." msgstr "" @@ -2178,7 +2202,7 @@ msgid "To access this resource, please ensure that you are logged into the AWS a msgstr "Um auf diese Ressource zuzugreifen, stellen Sie bitte sicher, dass Sie beim AWS-Konto angemeldet sind: {account}" #: src/pages/panel/workspace-settings-billing/ChangePaymentNoMethodModal.tsx:58 -#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:100 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:133 #: src/pages/panel/workspace-settings-billing/ConfirmChangePaymentModal.tsx:81 msgid "To AWS Marketplace" msgstr "Zum AWS Marketplace" @@ -2263,7 +2287,7 @@ msgstr "E-Mail aktualisieren" msgid "Update Password" msgstr "Kennwort aktualisieren" -#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:121 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:155 msgid "Upgrade" msgstr "Aktualisierung" @@ -2316,7 +2340,7 @@ msgstr "Wir haben eine E-Mail mit einem Bestätigungslink an Ihre E-Mail-Adresse msgid "We use cookies and other tracking technologies to analyze site usage and assist in marketing efforts. For details, see our <0>cookie policy<1/>." msgstr "" -#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:93 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:131 msgid "We're sad to see you downgrade, but we're grateful to still have you with us on the free tier. If there's anything specific you're missing, please reach out to me personally at <0>lars@some.engineering. I'd love to hear from you and help in any way I can." msgstr "Es tut uns leid, dass Sie herunterstufen, aber wir sind dankbar, Sie weiterhin in unserer kostenlosen Stufe zu haben. Wenn Ihnen etwas Bestimmtes fehlt, wenden Sie sich bitte direkt an mich, <0>lars@some.engineering. Ich würde gerne von Ihnen hören und Ihnen so gut wie möglich helfen." @@ -2328,7 +2352,7 @@ msgstr "Wir entschuldigen uns für die Unannehmlichkeiten. Unser Team wurde bena msgid "Webhook URL" msgstr "Webhook-URL" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:44 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:35 msgid "Weekly email report" msgstr "Wöchentlicher E-Mail-Bericht" @@ -2341,7 +2365,7 @@ msgstr "Wöchentlicher Report" msgid "Why does it matter" msgstr "" -#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:180 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:214 msgid "Within a billing cycle you will be charged for the highest product tier that was active." msgstr "" @@ -2349,7 +2373,7 @@ msgstr "" msgid "Workspace Alerting Settings" msgstr "Workspace-Benachrichtigungseinstellungen" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:82 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:63 msgid "Workspace analytics (coming soon!)" msgstr "Arbeitsbereichsanalyse (bald verfügbar!)" @@ -2368,11 +2392,15 @@ msgstr "Arbeitsbereichsname" msgid "Workspace Settings" msgstr "Arbeitsbereichseinstellungen" -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:31 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:53 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:44 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:66 msgid "Workspace Users" msgstr "Workspace-Benutzer" +#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:24 +msgid "Yearly" +msgstr "" + #: src/pages/panel/inventory/inventory-form/InventoryFormFilterRowBooleanValue.tsx:39 #: src/pages/panel/inventory/inventory-form/InventoryFormFilterRowBooleanValue.tsx:65 #: src/pages/panel/inventory/InventoryTable.tsx:142 @@ -2383,8 +2411,8 @@ msgstr "" msgid "You are about to change workspace's payment method" msgstr "" -#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:127 -#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:82 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:161 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:120 msgid "You are about to change workspace's product tier" msgstr "" @@ -2404,6 +2432,20 @@ msgstr "Sie können TOTP über den OTP-Code deaktivieren" msgid "You can deactivate TOTP via recovery code" msgstr "Sie können TOTP über den Wiederherstellungscode deaktivieren" +#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:250 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:160 +msgid "You currently have {0} attached to this workspace. There must only be {1} in order to downgrade to the free tier." +msgstr "" + +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTable.tsx:41 +msgid "You currently have {0}. There must only be {1} enabled in {2} tier. To increase your cloud account limit, you can upgrade your product tier <0>here." +msgstr "" + +#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:231 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:141 +msgid "You currently have {0}. There must only be {1} in order to downgrade to the free tier." +msgstr "" + #: src/core/events/WebSocketEvents.tsx:137 msgid "You don't have access to this workspace" msgstr "" diff --git a/src/locales/en-US/messages.po b/src/locales/en-US/messages.po index ea57a684..15e93954 100644 --- a/src/locales/en-US/messages.po +++ b/src/locales/en-US/messages.po @@ -13,18 +13,27 @@ msgstr "" "Language-Team: \n" "Plural-Forms: \n" -#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:96 +#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:112 msgid "({0} max)" msgstr "({0} max)" -#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:82 +#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:98 msgid "(${0} / month per additional account)" msgstr "(${0} / month per additional account)" +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTable.tsx:48 +msgid "{0, plural, one {# cloud account} other {# cloud accounts}}" +msgstr "{0, plural, one {# cloud account} other {# cloud accounts}}" + #: src/shared/utils/parseDuration.ts:171 msgid "{0, plural, one {# Day} other {# Days}}" msgstr "{0, plural, one {# Day} other {# Days}}" +#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:238 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:148 +msgid "{0, plural, one {# enabled cloud account} other {# enabled cloud accounts}}" +msgstr "{0, plural, one {# enabled cloud account} other {# enabled cloud accounts}}" + #: src/shared/utils/parseDuration.ts:179 msgid "{0, plural, one {# Hour} other {# Hours}}" msgstr "{0, plural, one {# Hour} other {# Hours}}" @@ -41,6 +50,11 @@ msgstr "{0, plural, one {# Month} other {# Months}}" msgid "{0, plural, one {# Second} other {# Seconds}}" msgstr "{0, plural, one {# Second} other {# Seconds}}" +#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:257 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:167 +msgid "{0, plural, one {# user} other {# users}}" +msgstr "{0, plural, one {# user} other {# users}}" + #: src/shared/utils/parseDuration.ts:163 msgid "{0, plural, one {# Week} other {# Weeks}}" msgstr "{0, plural, one {# Week} other {# Weeks}}" @@ -74,7 +88,7 @@ msgstr "{0} Cloud account degraded, id: {1}" msgid "{0} Cloud account discovered, id: {1}" msgstr "{0} Cloud account discovered, id: {1}" -#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:69 +#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:85 msgid "{0} cloud accounts included" msgstr "{0} cloud accounts included" @@ -86,27 +100,40 @@ msgstr "{0} has been connected" msgid "{0} Milliseconds" msgstr "{0} Milliseconds" -#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:91 -msgid "{0} scans" -msgstr "{0} scans" +#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:31 +msgid "{0} per" +msgstr "{0} per" -#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:99 +#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:115 msgid "{0} seat max" msgstr "{0} seat max" -#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:95 +#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:111 msgid "{0} seats included {1}" msgstr "{0} seats included {1}" +#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:32 +msgid "{0}-month history" +msgstr "{0}-month history" + #: src/pages/panel/security/OverallScore.tsx:59 #: src/pages/panel/shared/utils/createPieDataFromNonCompliance.ts:26 msgid "{0}: We've identified {1} non-compliant resources out of {2}." msgstr "{0}: We've identified {1} non-compliant resources out of {2}." +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTable.tsx:43 +msgid "{accountLength, plural, one {# enabled cloud account} other {# enabled cloud accounts}}" +msgstr "{accountLength, plural, one {# enabled cloud account} other {# enabled cloud accounts}}" + #: src/pages/panel/resource-detail/utils/nodeChange.tsx:47 msgid "{added} configuration lines added and {removed} lines deleted." msgstr "{added} configuration lines added and {removed} lines deleted." +#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:233 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:143 +msgid "{cloudAccountsLength, plural, one {# enabled cloud account} other {# enabled cloud accounts}}" +msgstr "{cloudAccountsLength, plural, one {# enabled cloud account} other {# enabled cloud accounts}}" + #: src/pages/panel/workspace-settings-accounts-setup-cloud-azure/WorkspaceSettingsAccountsSetupCloudAzureSubmitCredentialsInput.tsx:32 msgid "{label} is not valid" msgstr "{label} is not valid" @@ -115,7 +142,16 @@ msgstr "{label} is not valid" msgid "{label} is required" msgstr "{label} is required" -#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:47 +#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:107 +msgid "{scanIntervalStr} scans" +msgstr "{scanIntervalStr} scans" + +#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:252 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:162 +msgid "{usersLength, plural, one {# user} other {# users}}" +msgstr "{usersLength, plural, one {# user} other {# users}}" + +#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:63 msgid "/ month" msgstr "/ month" @@ -180,22 +216,6 @@ msgstr "<0>You need to assign three roles for Fix Security to work:<1>{0}Your cloud account has been successfully added!<1>Thank you for deploying the CloudFormation stack in your AWS account.<2>Here’s what’s happening behind the scenes:<3><4>Initial Trust Establishment (5-15 minutes): After deployment, a cross-account trust for the role included in the stack is established between your and Fix's AWS accounts. Due to AWS's distributed infrastructure, this step can take anywhere from 5 to 15 minutes as we wait for the trust to become active across their network. During this time, our backend continuously probes to confirm when the trust is operational.<5>First Security Scan (2-10 minutes): Once the trust is established, we proceed with the initial security scan of your environment. Depending on the size and complexity of your cloud account, this scan can take anywhere from 2 to 10 minutes.<6>Email Notification: You won't have to wait in front of your browser to know when we're done. After the first security scan is completed, we'll notify you by email.<7>What to Expect Next:<8><9>Dashboard Availability: Your dashboard and inventory will be available shortly after the completion of the initial security scan. This gives you a comprehensive view of your security posture and any findings we have identified.<10>Subsequent Scans: After the initial scan, subsequent security scans will also take 2 to 10 minutes each, without the initial delay, since the trust has to be established only once.<11>We appreciate your patience during this setup process. If you have any questions or need assistance, please do not hesitate to contact us directly <12>on our Discord server<13/>." msgstr "<0>Your cloud account has been successfully added!<1>Thank you for deploying the CloudFormation stack in your AWS account.<2>Here’s what’s happening behind the scenes:<3><4>Initial Trust Establishment (5-15 minutes): After deployment, a cross-account trust for the role included in the stack is established between your and Fix's AWS accounts. Due to AWS's distributed infrastructure, this step can take anywhere from 5 to 15 minutes as we wait for the trust to become active across their network. During this time, our backend continuously probes to confirm when the trust is operational.<5>First Security Scan (2-10 minutes): Once the trust is established, we proceed with the initial security scan of your environment. Depending on the size and complexity of your cloud account, this scan can take anywhere from 2 to 10 minutes.<6>Email Notification: You won't have to wait in front of your browser to know when we're done. After the first security scan is completed, we'll notify you by email.<7>What to Expect Next:<8><9>Dashboard Availability: Your dashboard and inventory will be available shortly after the completion of the initial security scan. This gives you a comprehensive view of your security posture and any findings we have identified.<10>Subsequent Scans: After the initial scan, subsequent security scans will also take 2 to 10 minutes each, without the initial delay, since the trust has to be established only once.<11>We appreciate your patience during this setup process. If you have any questions or need assistance, please do not hesitate to contact us directly <12>on our Discord server<13/>." -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:22 -msgid "1-month history" -msgstr "1-month history" - -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:78 -msgid "18-month history" -msgstr "18-month history" - -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:44 -msgid "3-month history" -msgstr "3-month history" - -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:59 -msgid "6-month history" -msgstr "6-month history" - #: src/containers/auth/AuthContainer.tsx:61 msgid "A few minutes to first results" msgstr "A few minutes to first results" @@ -224,8 +244,8 @@ msgstr "Accept" msgid "Access Control (IAM)" msgstr "Access Control (IAM)" -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:241 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:367 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:259 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:385 msgid "Access to your account is broken" msgstr "Access to your account is broken" @@ -257,8 +277,8 @@ msgstr "Accounts Summary" msgid "Action" msgstr "Action" -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:83 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:78 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:89 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:91 msgid "Actions" msgstr "Actions" @@ -273,7 +293,7 @@ msgid "Add a client secret" msgstr "Add a client secret" #: src/pages/panel/workspace-settings-billing/ChangePaymentNoMethodModal.tsx:60 -#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:102 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:135 #: src/pages/panel/workspace-settings-billing/ConfirmChangePaymentModal.tsx:83 msgid "Add a New Credit or Debit Card" msgstr "Add a New Credit or Debit Card" @@ -314,7 +334,7 @@ msgstr "Add Role Assignment" msgid "Add the Role assignment to the App" msgstr "Add the Role assignment to the App" -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTable.tsx:30 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTable.tsx:77 msgid "Added accounts" msgstr "Added accounts" @@ -341,7 +361,7 @@ msgstr "Affected resources" msgid "Age" msgstr "Age" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:61 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:47 msgid "Alerting integrations (PD, Slack, Discord, Teams)" msgstr "Alerting integrations (PD, Slack, Discord, Teams)" @@ -389,8 +409,8 @@ msgstr "An email has been sent to your inbox with a 'Reset Password' button. Ple msgid "An error occurred while connecting to {0}" msgstr "An error occurred while connecting to {0}" -#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:56 -#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:34 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:88 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:71 #: src/pages/panel/workspace-settings-billing/ConfirmChangePaymentModal.tsx:34 #: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:32 msgid "An error occurred, please try again later." @@ -404,7 +424,7 @@ msgstr "An error occurred, please try again later.{0}" msgid "and" msgstr "and" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:79 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:60 msgid "API access" msgstr "API access" @@ -429,13 +449,13 @@ msgstr "Are you sure you want to disconnect {name}?" msgid "Are you sure you want to remove the {name} account {0}?" msgstr "Are you sure you want to remove the {name} account {0}?" -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:436 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:454 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:85 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:107 msgid "Are you sure?" msgstr "Are you sure?" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:23 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:18 msgid "Asset inventory" msgstr "Asset inventory" @@ -524,10 +544,10 @@ msgstr "Business" #: src/pages/panel/user-settings/UserSettingsSocialNetworkDeleteButton.tsx:68 #: src/pages/panel/user-settings/UserSettingsTotpActivationModal.tsx:121 #: src/pages/panel/user-settings/UserSettingsTotpDeactivationModal.tsx:49 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:287 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:291 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:292 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:455 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:305 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:309 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:310 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:473 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:92 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx:154 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx:158 @@ -542,6 +562,10 @@ msgstr "Business" msgid "Cancel" msgstr "Cancel" +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:500 +msgid "Cannot enable this account" +msgstr "Cannot enable this account" + #: src/pages/panel/inventory/inventory-form/InventoryFormDefaultValue.tsx:211 #: src/pages/panel/inventory/inventory-form/InventoryFormMoreValue.tsx:125 #: src/pages/panel/inventory/inventory-form/InventoryFormTagsValue.tsx:115 @@ -556,8 +580,8 @@ msgstr "Change payment" msgid "Change Payment method" msgstr "Change Payment method" -#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:126 -#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:81 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:160 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:119 msgid "Change Product Tier" msgstr "Change Product Tier" @@ -636,7 +660,7 @@ msgid "Client secret" msgstr "Client secret" #: src/pages/panel/user-settings/UserSettingsTotpRecoveryCodesModal.tsx:36 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:373 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:391 msgid "Close" msgstr "Close" @@ -645,8 +669,8 @@ msgstr "Close" #: src/pages/panel/inventory/inventory-form/InventoryFormMore.tsx:96 #: src/pages/panel/resource-detail/ResourceDetailView.tsx:235 #: src/pages/panel/security/AccountCard.tsx:37 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:475 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:53 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:493 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:59 msgid "Cloud" msgstr "Cloud" @@ -659,7 +683,7 @@ msgstr "Cloud Setup" msgid "Clouds" msgstr "Clouds" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:31 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:26 msgid "Community support" msgstr "Community support" @@ -678,7 +702,7 @@ msgstr "Configuration changed" msgid "Configure" msgstr "Configure" -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:385 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:403 msgid "Configure Service Principal" msgstr "Configure Service Principal" @@ -704,7 +728,7 @@ msgstr "Congratulations on your subscription" msgid "Connect" msgstr "Connect" -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:383 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:401 msgid "Connect GCP Service Account" msgstr "Connect GCP Service Account" @@ -753,7 +777,7 @@ msgstr "Copy" msgid "Copy the Secret Value of the created secret and paste it in the Secret Value field {0}, but don't press the submit button yet." msgstr "Copy the Secret Value of the created secret and paste it in the Secret Value field {0}, but don't press the submit button yet." -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:29 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:24 msgid "Core CSPM scanning capabilities" msgstr "Core CSPM scanning capabilities" @@ -785,8 +809,8 @@ msgstr "Credit/Debit Card has been successfully subscribed" msgid "Critical" msgstr "Critical" -#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:168 -#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:86 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:202 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:124 msgid "Current Product Tier" msgstr "Current Product Tier" @@ -794,19 +818,19 @@ msgstr "Current Product Tier" msgid "Currently, there are no connected services available for configuration. Please be informed that connecting at least one service is necessary to configure alerting settings." msgstr "Currently, there are no connected services available for configuration. Please be informed that connecting at least one service is necessary to configure alerting settings." -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:80 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:61 msgid "Custom alerting webhooks" msgstr "Custom alerting webhooks" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:60 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:46 msgid "Custom policies (coming soon!)" msgstr "Custom policies (coming soon!)" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:42 +#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:28 msgid "Daily" msgstr "Daily" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:44 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:35 msgid "Data export (CSV, JSON, PDF)" msgstr "Data export (CSV, JSON, PDF)" @@ -839,10 +863,10 @@ msgid "Delayed Effect" msgstr "Delayed Effect" #: src/pages/panel/user-settings/UserSettingsSocialNetworkDeleteButton.tsx:79 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:354 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:358 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:359 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:466 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:372 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:376 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:377 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:484 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:73 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:77 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:78 @@ -860,7 +884,7 @@ msgstr "Delete Provider" #: src/pages/panel/shared/setup-cloud-button/SetupCloudButton.tsx:13 #: src/pages/panel/shared/setup-cloud-button/SetupCloudButton.tsx:29 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:381 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:399 msgid "Deploy Stack" msgstr "Deploy Stack" @@ -894,7 +918,7 @@ msgstr "Disconnect" msgid "Disconnect Service" msgstr "Disconnect Service" -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTable.tsx:38 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTable.tsx:87 msgid "Discovered but unconfigured accounts" msgstr "Discovered but unconfigured accounts" @@ -910,7 +934,7 @@ msgstr "Do not show me again" msgid "Do not show this message again." msgstr "Do not show this message again." -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:439 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:457 msgid "Do you want to delete this account?" msgstr "Do you want to delete this account?" @@ -931,8 +955,8 @@ msgstr "Don't have an account? Click here to Sign up." msgid "Done! We will now import your Azure accounts, this usually takes a couple of minutes." msgstr "Done! We will now import your Azure accounts, this usually takes a couple of minutes." -#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:121 -#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:77 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:155 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:115 msgid "Downgrade" msgstr "Downgrade" @@ -945,8 +969,8 @@ msgstr "Download CSV" msgid "Drop Service Account Key File" msgstr "Drop Service Account Key File" -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:303 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:304 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:321 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:322 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx:175 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx:176 msgid "Edit" @@ -962,7 +986,7 @@ msgstr "Edit" #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:109 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationsTable.tsx:49 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:135 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:63 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:76 #: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsEmailService.tsx:143 msgid "Email" msgstr "Email" @@ -971,7 +995,7 @@ msgstr "Email" msgid "Email Address" msgstr "Email Address" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:44 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:35 msgid "Email alerts" msgstr "Email alerts" @@ -985,7 +1009,7 @@ msgid "Enable all" msgstr "Enable all" #: src/pages/panel/user-settings/UserSettingsNotification.tsx:49 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:72 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:78 msgid "Enabled" msgstr "Enabled" @@ -1005,15 +1029,15 @@ msgstr "Enterprise" msgid "Events" msgstr "Events" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:76 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:58 msgid "Everything in Business, and" msgstr "Everything in Business, and" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:43 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:34 msgid "Everything in Free, and" msgstr "Everything in Free, and" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:57 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:44 msgid "Everything in Plus, and" msgstr "Everything in Plus, and" @@ -1054,7 +1078,7 @@ msgstr "Failing Check Timeline" msgid "Failing Resources" msgstr "Failing Resources" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:20 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:16 msgid "Features" msgstr "Features" @@ -1082,15 +1106,15 @@ msgstr "Fix scans your infrastructure and resource configurations by using read- msgid "Fixed issues" msgstr "Fixed issues" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:69 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:55 msgid "For dedicated security teams looking to build an integrated security toolchain." msgstr "For dedicated security teams looking to build an integrated security toolchain." -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:50 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:41 msgid "For engineering teams looking to automate their cloud infrastructure security." msgstr "For engineering teams looking to automate their cloud infrastructure security." -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:36 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:31 msgid "For growing teams looking to stay secure as they build out infrastructure.\\n" msgstr "For growing teams looking to stay secure as they build out infrastructure.\\n" @@ -1164,8 +1188,7 @@ msgstr "Highest product tier this billing cycle" msgid "Homepage" msgstr "Homepage" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:56 -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:75 +#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:30 msgid "Hourly" msgstr "Hourly" @@ -1184,8 +1207,8 @@ msgstr "Id" #: src/pages/panel/resource-detail/ResourceDetailView.tsx:232 #: src/pages/panel/security/AccountCard.tsx:34 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:472 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:56 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:490 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:62 #: src/shared/charts/NetworkDiagram.tsx:407 msgid "ID" msgstr "ID" @@ -1267,7 +1290,7 @@ msgstr "Inactivity reminder" msgid "Info" msgstr "Info" -#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:178 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:212 msgid "Info: Changes to your product tier will become active immediately and be applied for the current billing cycle. {0}<0/>Your next billing cycle starts: {1} UTC" msgstr "Info: Changes to your product tier will become active immediately and be applied for the current billing cycle. {0}<0/>Your next billing cycle starts: {1} UTC" @@ -1279,7 +1302,7 @@ msgstr "Inspect Detection Search in Inventory" msgid "Instance is terminated" msgstr "Instance is terminated" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:87 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:68 msgid "Integration advice for your specific cloud environment via video call" msgstr "Integration advice for your specific cloud environment via video call" @@ -1300,7 +1323,7 @@ msgstr "Invalid Value" msgid "Inventory" msgstr "Inventory" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:24 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:19 msgid "Inventory search" msgstr "Inventory search" @@ -1314,7 +1337,7 @@ msgstr "Invite" msgid "Invite External User" msgstr "Invite External User" -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:74 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:87 msgid "Invites" msgstr "Invites" @@ -1332,7 +1355,7 @@ msgstr "Kind" msgid "Kinds" msgstr "Kinds" -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:71 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:84 msgid "Last login" msgstr "Last login" @@ -1374,11 +1397,11 @@ msgstr "Low Utilization Compute Instances and Databases" msgid "Make sure that you are already logged into the correct AWS account, before pressing the DEPLOY STACK button." msgstr "Make sure that you are already logged into the correct AWS account, before pressing the DEPLOY STACK button." -#: src/pages/panel/workspace-settings-billing/ChangeProductTier.tsx:156 +#: src/pages/panel/workspace-settings-billing/ChangeProductTier.tsx:185 msgid "Manage AWS Market place payment method" msgstr "Manage AWS Market place payment method" -#: src/pages/panel/workspace-settings-billing/ChangeProductTier.tsx:175 +#: src/pages/panel/workspace-settings-billing/ChangeProductTier.tsx:204 msgid "Manage Card Details" msgstr "Manage Card Details" @@ -1386,7 +1409,7 @@ msgstr "Manage Card Details" msgid "Manual" msgstr "Manual" -#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:59 +#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:75 msgid "maximum of {0} cloud accounts" msgstr "maximum of {0} cloud accounts" @@ -1403,12 +1426,12 @@ msgstr "Member" msgid "MFA already enabled" msgstr "MFA already enabled" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:19 +#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:26 #: src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx:127 msgid "Monthly" msgstr "Monthly" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:27 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:22 msgid "Monthly email report" msgstr "Monthly email report" @@ -1430,15 +1453,15 @@ msgstr "Most Non-Compliant Accounts" #: src/pages/panel/benchmark-detail/BenchmarkDetailCheckDetail.tsx:177 #: src/pages/panel/resource-detail/ResourceDetailView.tsx:233 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:478 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:59 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:496 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:65 #: src/pages/panel/workspace-settings-external-directory/AddExternalDirectory.tsx:42 #: src/pages/panel/workspace-settings-external-directory/AddExternalDirectory.tsx:46 #: src/pages/panel/workspace-settings-external-directory/WorkspaceSettingsExternalDirectoryPage.tsx:18 #: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:76 #: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:80 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:138 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:60 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:73 #: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsEmailService.tsx:126 #: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsOpsgenieService.tsx:132 #: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsPagerdutyService.tsx:130 @@ -1447,7 +1470,7 @@ msgstr "Most Non-Compliant Accounts" msgid "Name" msgstr "Name" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:25 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:20 msgid "Neighborhood view" msgstr "Neighborhood view" @@ -1476,8 +1499,8 @@ msgstr "new non compliant resources in the past {since}" msgid "New Password" msgstr "New Password" -#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:171 -#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:89 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:205 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:127 msgid "New Product Tier" msgstr "New Product Tier" @@ -1493,7 +1516,7 @@ msgstr "New security issues detected" msgid "Next invoice will be available" msgstr "Next invoice will be available" -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:67 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:73 msgid "Next scan" msgstr "Next scan" @@ -1539,7 +1562,7 @@ msgstr "Node Vulnerable" msgid "Non-Compliant Resources" msgstr "Non-Compliant Resources" -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:442 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:460 msgid "Note: You are about to delete a management or delegated admin account. Please be aware that once deleted, we will no longer have the capability to retrieve any account names, requiring you to edit them manually." msgstr "Note: You are about to delete a management or delegated admin account. Please be aware that once deleted, we will no longer have the capability to retrieve any account names, requiring you to edit them manually." @@ -1569,6 +1592,7 @@ msgid "Number Of Account Charged" msgstr "Number Of Account Charged" #: src/core/auth/WorkspaceGuard.tsx:94 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:504 msgid "Ok" msgstr "Ok" @@ -1637,7 +1661,7 @@ msgstr "Open the Manage section and go to the App permissions page:" msgid "Opened at" msgstr "Opened at" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:88 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:69 msgid "Optional professional services" msgstr "Optional professional services" @@ -1689,7 +1713,7 @@ msgstr "Password" msgid "Payment is required for your workspace, Please contact the workspace owner" msgstr "Payment is required for your workspace, Please contact the workspace owner" -#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:132 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:166 #: src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx:89 msgid "Payment method" msgstr "Payment method" @@ -1709,7 +1733,7 @@ msgstr "Payment method to add" #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationsTable.tsx:29 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationsTable.tsx:45 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:35 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:48 #: src/shared/layouts/panel-layout/useBreadcrumbs.ts:21 msgid "Pending Invitations" msgstr "Pending Invitations" @@ -1758,27 +1782,27 @@ msgstr "Print or copy the following recovery codes" msgid "Privileged" msgstr "Privileged" -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:236 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:254 msgid "Privileged account" msgstr "Privileged account" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:45 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:36 msgid "Product support via email" msgstr "Product support via email" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:64 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:50 msgid "Product support via email and live chat" msgstr "Product support via email and live chat" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:86 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:67 msgid "Product support via email, live chat, and video call" msgstr "Product support via email, live chat, and video call" -#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:52 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:84 msgid "Product tier changed to {selectedProductTier}" msgstr "Product tier changed to {selectedProductTier}" -#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:30 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:67 msgid "Product tier changed to Free" msgstr "Product tier changed to Free" @@ -1810,7 +1834,7 @@ msgstr "Re-Authenticate" msgid "Receipts" msgstr "Receipts" -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTable.tsx:22 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTable.tsx:67 msgid "Recently added accounts" msgstr "Recently added accounts" @@ -1855,7 +1879,7 @@ msgstr "Register an application" msgid "Reject" msgstr "Reject" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:28 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:23 msgid "Remediation recommendations" msgstr "Remediation recommendations" @@ -1880,7 +1904,7 @@ msgstr "Resource created" msgid "Resource deleted" msgstr "Resource deleted" -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:62 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:68 msgid "Resources" msgstr "Resources" @@ -1903,7 +1927,7 @@ msgstr "Risk" #: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:96 #: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:107 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:149 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:67 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:80 msgid "Roles" msgstr "Roles" @@ -1932,7 +1956,7 @@ msgstr "Secure Your Cloud, Elevate Your Peace of Mind" msgid "Security" msgstr "Security" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:26 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:21 msgid "Security benchmarks" msgstr "Security benchmarks" @@ -1944,7 +1968,7 @@ msgstr "Security Issues" msgid "Security posture improved" msgstr "Security posture improved" -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:75 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:81 msgid "Security Scan" msgstr "Security Scan" @@ -2014,7 +2038,7 @@ msgstr "Service Account Key" msgid "Setting Up Email Notifications" msgstr "Setting Up Email Notifications" -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:387 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:405 msgid "Setup cloud" msgstr "Setup cloud" @@ -2044,11 +2068,11 @@ msgstr "Sign up" msgid "Sign up with {formattedName}" msgstr "Sign up with {formattedName}" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:81 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:62 msgid "Single Sign on (coming soon!)" msgstr "Single Sign on (coming soon!)" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:83 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:64 msgid "Snowflake data export (coming soon!)" msgstr "Snowflake data export (coming soon!)" @@ -2066,14 +2090,14 @@ msgid "Something went wrong please try again later." msgstr "Something went wrong please try again later." #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:142 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:57 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:70 msgid "Sources" msgstr "Sources" #: src/pages/panel/workspace-settings-accounts-setup-cloud-azure/WorkspaceSettingsAccountsSetupCloudAzureSubmitCredentials.tsx:136 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:276 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:277 -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:282 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:294 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:295 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:300 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx:147 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx:148 msgid "Submit" @@ -2096,7 +2120,7 @@ msgstr "Successfully invited {email}" msgid "Tags" msgstr "Tags" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:62 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:48 msgid "Task management integrations (coming soon!)" msgstr "Task management integrations (coming soon!)" @@ -2141,11 +2165,11 @@ msgstr "The workspace you requested cannot be accessed. Please request access fr msgid "There's no account configured for this workspace." msgstr "There's no account configured for this workspace." -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:427 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:445 msgid "This account is currently in a degraded state possibly due to a misconfiguration.<0/>Fix was unable to gather data from this account." msgstr "This account is currently in a degraded state possibly due to a misconfiguration.<0/>Fix was unable to gather data from this account." -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:395 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:413 msgid "This account is currently in a degraded state.<0/>Fix was unable to gather data from this account.<1/><2/>To resume security scans, please log into the {accountName} account ({0}) and re-deploy the CloudFormation stack that establishes the IAM role trust." msgstr "This account is currently in a degraded state.<0/>Fix was unable to gather data from this account.<1/><2/>To resume security scans, please log into the {accountName} account ({0}) and re-deploy the CloudFormation stack that establishes the IAM role trust." @@ -2153,7 +2177,7 @@ msgstr "This account is currently in a degraded state.<0/>Fix was unable to gath msgid "This email address is already registered. If this is your email, please try logging in or click on forgot password in login page to reset your password." msgstr "This email address is already registered. If this is your email, please try logging in or click on forgot password in login page to reset your password." -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:405 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:423 msgid "This project is currently in a degraded state.<0/>Fix was unable to gather data from this project.<1/><2/>To resume security scans, please ensure that the service account you configured is set up correctly.<3/>You may also recreate and upload the service account definition." msgstr "This project is currently in a degraded state.<0/>Fix was unable to gather data from this project.<1/><2/>To resume security scans, please ensure that the service account you configured is set up correctly.<3/>You may also recreate and upload the service account definition." @@ -2161,7 +2185,7 @@ msgstr "This project is currently in a degraded state.<0/>Fix was unable to gath msgid "This section does not contain any controls that can be automated.<0/>Manual checks or processes are required for compliance." msgstr "This section does not contain any controls that can be automated.<0/>Manual checks or processes are required for compliance." -#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:416 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:434 msgid "This subscription is currently in a degraded state.<0/>Fix was unable to gather data from this subscription.<1/><2/>To resume security scans, please ensure that the application permissions are set up correctly.<3/>You may also recreate and redefine the access credentials." msgstr "This subscription is currently in a degraded state.<0/>Fix was unable to gather data from this subscription.<1/><2/>To resume security scans, please ensure that the application permissions are set up correctly.<3/>You may also recreate and redefine the access credentials." @@ -2178,7 +2202,7 @@ msgid "To access this resource, please ensure that you are logged into the AWS a msgstr "To access this resource, please ensure that you are logged into the AWS account: {account}" #: src/pages/panel/workspace-settings-billing/ChangePaymentNoMethodModal.tsx:58 -#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:100 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:133 #: src/pages/panel/workspace-settings-billing/ConfirmChangePaymentModal.tsx:81 msgid "To AWS Marketplace" msgstr "To AWS Marketplace" @@ -2263,7 +2287,7 @@ msgstr "Update Email" msgid "Update Password" msgstr "Update Password" -#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:121 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:155 msgid "Upgrade" msgstr "Upgrade" @@ -2316,7 +2340,7 @@ msgstr "We have sent an email with a confirmation link to your email address. Pl msgid "We use cookies and other tracking technologies to analyze site usage and assist in marketing efforts. For details, see our <0>cookie policy<1/>." msgstr "We use cookies and other tracking technologies to analyze site usage and assist in marketing efforts. For details, see our <0>cookie policy<1/>." -#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:93 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:131 msgid "We're sad to see you downgrade, but we're grateful to still have you with us on the free tier. If there's anything specific you're missing, please reach out to me personally at <0>lars@some.engineering. I'd love to hear from you and help in any way I can." msgstr "We're sad to see you downgrade, but we're grateful to still have you with us on the free tier. If there's anything specific you're missing, please reach out to me personally at <0>lars@some.engineering. I'd love to hear from you and help in any way I can." @@ -2328,7 +2352,7 @@ msgstr "We're sorry for the inconvenience. Our team has been notified, and the i msgid "Webhook URL" msgstr "Webhook URL" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:44 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:35 msgid "Weekly email report" msgstr "Weekly email report" @@ -2341,7 +2365,7 @@ msgstr "Weekly Report" msgid "Why does it matter" msgstr "Why does it matter" -#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:180 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:214 msgid "Within a billing cycle you will be charged for the highest product tier that was active." msgstr "Within a billing cycle you will be charged for the highest product tier that was active." @@ -2349,7 +2373,7 @@ msgstr "Within a billing cycle you will be charged for the highest product tier msgid "Workspace Alerting Settings" msgstr "Workspace Alerting Settings" -#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:82 +#: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:63 msgid "Workspace analytics (coming soon!)" msgstr "Workspace analytics (coming soon!)" @@ -2368,11 +2392,15 @@ msgstr "Workspace Name" msgid "Workspace Settings" msgstr "Workspace Settings" -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:31 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:53 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:44 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:66 msgid "Workspace Users" msgstr "Workspace Users" +#: src/pages/panel/workspace-settings-billing/ProductTierComp.tsx:24 +msgid "Yearly" +msgstr "Yearly" + #: src/pages/panel/inventory/inventory-form/InventoryFormFilterRowBooleanValue.tsx:39 #: src/pages/panel/inventory/inventory-form/InventoryFormFilterRowBooleanValue.tsx:65 #: src/pages/panel/inventory/InventoryTable.tsx:142 @@ -2383,8 +2411,8 @@ msgstr "Yes" msgid "You are about to change workspace's payment method" msgstr "You are about to change workspace's payment method" -#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:127 -#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:82 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:161 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:120 msgid "You are about to change workspace's product tier" msgstr "You are about to change workspace's product tier" @@ -2404,6 +2432,20 @@ msgstr "You can deactivate TOTP via otp code" msgid "You can deactivate TOTP via recovery code" msgstr "You can deactivate TOTP via recovery code" +#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:250 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:160 +msgid "You currently have {0} attached to this workspace. There must only be {1} in order to downgrade to the free tier." +msgstr "You currently have {0} attached to this workspace. There must only be {1} in order to downgrade to the free tier." + +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTable.tsx:41 +msgid "You currently have {0}. There must only be {1} enabled in {2} tier. To increase your cloud account limit, you can upgrade your product tier <0>here." +msgstr "You currently have {0}. There must only be {1} enabled in {2} tier. To increase your cloud account limit, you can upgrade your product tier <0>here." + +#: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:231 +#: src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx:141 +msgid "You currently have {0}. There must only be {1} in order to downgrade to the free tier." +msgstr "You currently have {0}. There must only be {1} in order to downgrade to the free tier." + #: src/core/events/WebSocketEvents.tsx:137 msgid "You don't have access to this workspace" msgstr "You don't have access to this workspace" diff --git a/src/pages/panel/shared/queries/getWorkspaceProductTiers.query.ts b/src/pages/panel/shared/queries/getWorkspaceProductTiers.query.ts new file mode 100644 index 00000000..ab519e4f --- /dev/null +++ b/src/pages/panel/shared/queries/getWorkspaceProductTiers.query.ts @@ -0,0 +1,15 @@ +import { QueryFunctionContext } from '@tanstack/react-query' +import { endPoints } from 'src/shared/constants' +import { GetWorkspaceProductTiersResponse } from 'src/shared/types/server' +import { axiosWithAuth } from 'src/shared/utils/axios' + +export const getWorkspaceProductTiersQuery = ({ + signal, + queryKey: [, workspaceId], +}: QueryFunctionContext<['workspace-product-tiers', string | undefined]>) => { + return workspaceId + ? axiosWithAuth + .get(endPoints.workspaces.workspace(workspaceId).productTiers, { signal }) + .then((res) => res.data) + : ({} as GetWorkspaceProductTiersResponse) +} diff --git a/src/pages/panel/workspace-settings-users/getWorkspaceUsers.query.ts b/src/pages/panel/shared/queries/getWorkspaceUsers.query.ts similarity index 100% rename from src/pages/panel/workspace-settings-users/getWorkspaceUsers.query.ts rename to src/pages/panel/shared/queries/getWorkspaceUsers.query.ts diff --git a/src/pages/panel/shared/queries/index.ts b/src/pages/panel/shared/queries/index.ts index be05679b..32f578ec 100644 --- a/src/pages/panel/shared/queries/index.ts +++ b/src/pages/panel/shared/queries/index.ts @@ -11,6 +11,8 @@ export { getWorkspaceInventoryReportChecksQuery } from './getWorkspaceInventoryR export { getWorkspaceInventoryReportSummaryQuery } from './getWorkspaceInventoryReportSummary.query' export { getWorkspaceInventorySearchStartQuery } from './getWorkspaceInventorySearchStart.query' export { getWorkspaceNotificationsQuery } from './getWorkspaceNotifications.query' +export { getWorkspaceProductTiersQuery } from './getWorkspaceProductTiers.query' +export { getWorkspaceUsersQuery } from './getWorkspaceUsers.query' export { patchWorkspaceInventoryNodeSecurityIgnoreQuery } from './patchWorkspaceInventoryNodeSecurityIgnore.query' export { postWorkspaceInventoryPropertyAttributesQuery } from './postWorkspaceInventoryPropertyAttributes.query' export { postWorkspaceInventoryPropertyPathCompleteQuery } from './postWorkspaceInventoryPropertyPathComplete.query' diff --git a/src/pages/panel/workspace-settings-accounts-setup-cloud/WorkspaceSettingsAccountsSetupCloudPage.tsx b/src/pages/panel/workspace-settings-accounts-setup-cloud/WorkspaceSettingsAccountsSetupCloudPage.tsx index 9f3b175c..604b3dbd 100644 --- a/src/pages/panel/workspace-settings-accounts-setup-cloud/WorkspaceSettingsAccountsSetupCloudPage.tsx +++ b/src/pages/panel/workspace-settings-accounts-setup-cloud/WorkspaceSettingsAccountsSetupCloudPage.tsx @@ -1,6 +1,6 @@ -import { Button, Stack, Typography } from '@mui/material' -import { Link } from 'react-router-dom' +import { Stack, Typography } from '@mui/material' import { AwsLogo, AzureLogo, GcpLogo } from 'src/assets/icons' +import { InternalLinkButton } from 'src/shared/link-button' import { useNonce } from 'src/shared/providers' export default function WorkspaceSettingsAccountsSetupCloudPage() { @@ -16,8 +16,7 @@ export default function WorkspaceSettingsAccountsSetupCloudPage() { > - + - + - + diff --git a/src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx b/src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx index d1770296..3c6895e2 100644 --- a/src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx +++ b/src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx @@ -19,7 +19,8 @@ import { Typography, } from '@mui/material' import { useMutation, useQueryClient } from '@tanstack/react-query' -import { FormEvent, useCallback, useEffect, useRef, useState } from 'react' +import { AxiosError } from 'axios' +import { FormEvent, ReactNode, useCallback, useEffect, useRef, useState } from 'react' import { useUserProfile } from 'src/core/auth' import { CloudAvatar } from 'src/shared/cloud-avatar' import { InternalLinkButton } from 'src/shared/link-button' @@ -38,13 +39,21 @@ import { replaceRowByAccount } from './replaceRowByAccount' interface WorkspaceSettingsAccountRowProps { account: Account + enableErrorModalContent?: ReactNode isNotConfigured?: boolean + canEnable?: boolean } -export const WorkspaceSettingsAccountRow = ({ account, isNotConfigured }: WorkspaceSettingsAccountRowProps) => { +export const WorkspaceSettingsAccountRow = ({ + account, + enableErrorModalContent, + isNotConfigured, + canEnable, +}: WorkspaceSettingsAccountRowProps) => { const inputRef = useRef() const { i18n: { locale }, } = useLingui() + const showCannotEnableModalRef = useRef<(show?: boolean) => void>() const showDeleteModalRef = useRef<(show?: boolean) => void>() const showDegradedModalRef = useRef<(show?: boolean) => void>() const { selectedWorkspace, checkPermission } = useUserProfile() @@ -120,18 +129,27 @@ export const WorkspaceSettingsAccountRow = ({ account, isNotConfigured }: Worksp } const handleEnableChange = (_: unknown, checked: boolean) => { - if (selectedWorkspace?.id) { - return (checked ? enableAccount : disableAccount)( - { workspaceId: selectedWorkspace.id, id: account.id }, - { - onSuccess: (data) => { - void queryClient.invalidateQueries({ - predicate: (query) => typeof query.queryKey[0] === 'string' && query.queryKey[0].startsWith('workspace-cloud-account'), - }) - replaceRowByAccount(queryClient, data, selectedWorkspace?.id) + if (canEnable || !checked) { + if (selectedWorkspace?.id) { + return (checked ? enableAccount : disableAccount)( + { workspaceId: selectedWorkspace.id, id: account.id }, + { + onSuccess: (data) => { + void queryClient.invalidateQueries({ + predicate: (query) => typeof query.queryKey[0] === 'string' && query.queryKey[0].startsWith('workspace-cloud-account'), + }) + replaceRowByAccount(queryClient, data, selectedWorkspace?.id) + }, + onError: (err) => { + if ((err as AxiosError)?.status === 403) { + showCannotEnableModalRef.current?.(true) + } + }, }, - }, - ) + ) + } + } else { + showCannotEnableModalRef.current?.(true) } } @@ -478,6 +496,17 @@ export const WorkspaceSettingsAccountRow = ({ account, isNotConfigured }: Worksp Name: {accountName} + Cannot enable this account} + openRef={showCannotEnableModalRef} + actions={ + + } + > + {enableErrorModalContent} + ) } diff --git a/src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountTableTitle.tsx b/src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountTableTitle.tsx index f0176c3c..722b7489 100644 --- a/src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountTableTitle.tsx +++ b/src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountTableTitle.tsx @@ -4,9 +4,10 @@ import { AddAccountButton } from 'src/shared/add-account-button' interface WorkspaceSettingsAccountTableTitleProps extends PropsWithChildren { isTop: boolean + withAddButton?: boolean } -export const WorkspaceSettingsAccountTableTitle = ({ isTop, children }: WorkspaceSettingsAccountTableTitleProps) => +export const WorkspaceSettingsAccountTableTitle = ({ isTop, withAddButton, children }: WorkspaceSettingsAccountTableTitleProps) => isTop ? ( {children} - + {withAddButton ? : null} ) : ( diff --git a/src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTable.tsx b/src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTable.tsx index 4f1af955..128d00a8 100644 --- a/src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTable.tsx +++ b/src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTable.tsx @@ -1,16 +1,61 @@ -import { t } from '@lingui/macro' -import { useSuspenseQuery } from '@tanstack/react-query' +import { plural, t, Trans } from '@lingui/macro' +import { Alert, Typography } from '@mui/material' +import { useSuspenseQueries } from '@tanstack/react-query' import { useUserProfile } from 'src/core/auth' -import { getWorkspaceCloudAccountsQuery } from 'src/pages/panel/shared/queries' +import { getWorkspaceCloudAccountsQuery, getWorkspaceProductTiersQuery } from 'src/pages/panel/shared/queries' +import { InternalLink } from 'src/shared/link-button' +import { GetWorkspaceProductTiersResponse } from 'src/shared/types/server' import { WorkspaceSettingsAccountsTableItem } from './WorkspaceSettingsAccountsTableItem' export const WorkspaceSettingsAccountsTable = () => { const { selectedWorkspace } = useUserProfile() - const { data } = useSuspenseQuery({ - queryKey: ['workspace-cloud-accounts', selectedWorkspace?.id, false], - queryFn: getWorkspaceCloudAccountsQuery, + const [{ data }, { data: currentTier }] = useSuspenseQueries({ + queries: [ + { + queryKey: ['workspace-cloud-accounts', selectedWorkspace?.id, false], + queryFn: getWorkspaceCloudAccountsQuery, + }, + { + queryFn: getWorkspaceProductTiersQuery, + queryKey: ['workspace-product-tiers', selectedWorkspace?.id], + select: (data: GetWorkspaceProductTiersResponse) => (selectedWorkspace?.tier ? data[selectedWorkspace.tier] : undefined), + }, + ], }) + const accountLength = + typeof data === 'object' + ? [ + ...new Set( + [...data.added, ...data.discovered, ...data.recent].filter((acc) => acc.enabled && acc.is_configured).map((acc) => acc.id), + ), + ].length + : 0 + const accountLimit = currentTier?.account_limit ?? Number.POSITIVE_INFINITY + + const canInviteBasedOnTier = accountLimit > accountLength + + const enableErrorModalContent = canInviteBasedOnTier ? null : ( + + + + You currently have{' '} + {plural(accountLength, { + one: '# enabled cloud account', + other: '# enabled cloud accounts', + })} + . There must only be{' '} + {plural(accountLimit ?? 1, { + one: '# cloud account', + other: '# cloud accounts', + })}{' '} + enabled in {selectedWorkspace?.tier} tier. To increase your cloud account limit, you can upgrade your product tier{' '} + here. + + + + ) + return ( typeof data !== 'string' && ( <> @@ -20,6 +65,8 @@ export const WorkspaceSettingsAccountsTable = () => { isTop isBottom={!data.discovered.length && !data.added.length} title={t`Recently added accounts`} + canInviteBasedOnTier={canInviteBasedOnTier} + enableErrorModalContent={enableErrorModalContent} /> ) : null} {data?.added.length ? ( @@ -28,6 +75,8 @@ export const WorkspaceSettingsAccountsTable = () => { isTop={!data.recent.length} isBottom={!data.discovered.length} title={t`Added accounts`} + canInviteBasedOnTier={canInviteBasedOnTier} + enableErrorModalContent={enableErrorModalContent} /> ) : null} {data?.discovered.length ? ( @@ -36,6 +85,8 @@ export const WorkspaceSettingsAccountsTable = () => { isTop={!data.recent.length && !data.added.length} isBottom title={t`Discovered but unconfigured accounts`} + canInviteBasedOnTier={canInviteBasedOnTier} + enableErrorModalContent={enableErrorModalContent} isNotConfigured /> ) : null} diff --git a/src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx b/src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx index 292fa26c..180d05f1 100644 --- a/src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx +++ b/src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx @@ -1,6 +1,6 @@ import { Trans } from '@lingui/macro' import { Box, Table, TableBody, TableCell, TableHead, TableRow } from '@mui/material' -import { useState } from 'react' +import { ReactNode, useState } from 'react' import { useUserProfile } from 'src/core/auth' import { panelUI } from 'src/shared/constants' import { TableView } from 'src/shared/layouts/panel-layout' @@ -15,6 +15,8 @@ interface WorkspaceSettingsAccountsTableItemProps { isTop: boolean isBottom: boolean isNotConfigured?: boolean + canInviteBasedOnTier?: boolean + enableErrorModalContent: ReactNode } export const WorkspaceSettingsAccountsTableItem = ({ @@ -23,6 +25,8 @@ export const WorkspaceSettingsAccountsTableItem = ({ isTop, isBottom, isNotConfigured, + canInviteBasedOnTier, + enableErrorModalContent, }: WorkspaceSettingsAccountsTableItemProps) => { const { checkPermission } = useUserProfile() const hasPermission = checkPermission('updateCloudAccounts') @@ -34,7 +38,9 @@ export const WorkspaceSettingsAccountsTableItem = ({ ) return ( - {title} + + {title} + ( - + ))} diff --git a/src/pages/panel/workspace-settings-billing/ChangeProductTier.tsx b/src/pages/panel/workspace-settings-billing/ChangeProductTier.tsx index 067c59c5..5e9e021b 100644 --- a/src/pages/panel/workspace-settings-billing/ChangeProductTier.tsx +++ b/src/pages/panel/workspace-settings-billing/ChangeProductTier.tsx @@ -1,11 +1,14 @@ import { Trans } from '@lingui/macro' import CreditCardIcon from '@mui/icons-material/CreditCard' import { Box, ButtonBase, Divider, Stack, Typography, alpha } from '@mui/material' +import { useQuery } from '@tanstack/react-query' import { Fragment, useRef, useState } from 'react' import { AwsLogo } from 'src/assets/icons' import { useUserProfile } from 'src/core/auth' +import { getWorkspaceProductTiersQuery } from 'src/pages/panel/shared/queries' import { endPoints, env } from 'src/shared/constants' import { ExternalLinkLoadingButton } from 'src/shared/link-button' +import { LoadingSuspenseFallback } from 'src/shared/loading' import { PaymentMethod, ProductTier } from 'src/shared/types/server-shared' import { ChangePaymentNoMethodModal } from './ChangePaymentNoMethodModal' import { ChangeProductTierModal } from './ChangeProductTierModal' @@ -32,6 +35,10 @@ export const ChangeProductTier = ({ nextBillingCycle, }: ChangeProductTierProps) => { const { selectedWorkspace, checkPermission } = useUserProfile() + const { data } = useQuery({ + queryFn: getWorkspaceProductTiersQuery, + queryKey: ['workspace-product-tiers', selectedWorkspace?.id], + }) const hasPermission = checkPermission('updateBilling') const tierFromSearchParams = useGetProductTierFromSearchParams() const showModalRef = useRef<(show?: boolean | undefined) => void>() @@ -53,12 +60,12 @@ export const ChangeProductTier = ({ ? null : allProductTiers.indexOf(productTier) > allProductTiers.indexOf(defaultProductTier) - return ( + return data ? ( <> {allProductTiers.map((curProductTier, i) => { const selectedProductTier = curProductTier === productTier || (productTier === 'Trial' && curProductTier === 'Free') - return ( + return data[curProductTier] ? ( {i ? : null} {selectedProductTier || !hasPermission ? ( @@ -81,7 +88,7 @@ export const ChangeProductTier = ({ transition: (theme) => theme.transitions.create(['box-shadow', 'background-color']), }} > - + ) : ( setProductTier(curProductTier) : undefined} > - + )} - ) + ) : null })} {hasPermission ? ( @@ -113,6 +120,17 @@ export const ChangeProductTier = ({ currentProductTier={currentProductTier} showModalRef={showModalRef} defaultOpen={true} + productTierData={ + data.Free ?? { + account_limit: 0, + accounts_included: 0, + price_per_account_cents: 0, + retention_period: 'P0s', + scan_interval: 'P0s', + seats_included: 0, + seats_max: 0, + } + } /> ) : noWorkspaceMethod ? ( ) ) : ( @@ -186,5 +215,7 @@ export const ChangeProductTier = ({ ) : null} + ) : ( + ) } diff --git a/src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx b/src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx index dcf46d38..91661205 100644 --- a/src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx +++ b/src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx @@ -1,16 +1,19 @@ -import { Trans, t } from '@lingui/macro' +import { Trans, plural, t } from '@lingui/macro' import { useLingui } from '@lingui/react' import InfoIcon from '@mui/icons-material/Info' +import WarningIcon from '@mui/icons-material/Warning' import { LoadingButton } from '@mui/lab' import { Alert, Button, MenuItem, Select, Stack, Typography } from '@mui/material' -import { useMutation, useQueryClient } from '@tanstack/react-query' +import { useMutation, useQueries, useQueryClient } from '@tanstack/react-query' import { AxiosError } from 'axios' import { MutableRefObject, useState } from 'react' import { useUserProfile } from 'src/core/auth' import { useSnackbar } from 'src/core/snackbar' +import { getWorkspaceCloudAccountsQuery, getWorkspaceUsersQuery } from 'src/pages/panel/shared/queries' import { endPoints, env } from 'src/shared/constants' import { ExternalLinkLoadingButton } from 'src/shared/link-button' import { Modal } from 'src/shared/modal' +import { GetWorkspaceCloudAccountsResponse, GetWorkspaceProductTier, GetWorkspaceUsersResponse } from 'src/shared/types/server' import { PaymentMethod, PaymentMethodWithoutNone, PaymentMethods, ProductTier } from 'src/shared/types/server-shared' import { putWorkspaceBillingMutation } from './putWorkspaceBilling.mutation' import { paymentMethodToLabel, paymentMethods, productTierToLabel } from './utils' @@ -24,6 +27,7 @@ export interface ChangeProductTierModalProps { isUpgrade: boolean defaultOpen?: boolean nextBillingCycle: Date + productTierData: GetWorkspaceProductTier onClose?: () => void } @@ -36,6 +40,7 @@ export const ChangeProductTierModal = ({ isUpgrade, defaultOpen, nextBillingCycle, + productTierData, onClose, }: ChangeProductTierModalProps) => { const { @@ -43,7 +48,34 @@ export const ChangeProductTierModal = ({ } = useLingui() const [paymentMethod, setPaymentMethod] = useState(selectedWorkspacePaymentMethod) const { showSnackbar } = useSnackbar() - const { selectedWorkspace } = useUserProfile() + const { selectedWorkspace, refreshWorkspaces } = useUserProfile() + const [{ data: cloudAccountsLength = 0 }, { data: usersLength = 0 }] = useQueries({ + queries: [ + { + queryFn: getWorkspaceCloudAccountsQuery, + queryKey: ['workspace-cloud-accounts', selectedWorkspace?.id, true], + select: (data?: string | GetWorkspaceCloudAccountsResponse) => + typeof data === 'object' + ? [ + ...new Set( + [...data.added, ...data.discovered, ...data.recent] + .filter((acc) => acc.enabled && acc.is_configured) + .map((acc) => acc.id), + ), + ].length + : 0, + }, + { + queryFn: getWorkspaceUsersQuery, + queryKey: ['workspace-users', selectedWorkspace?.id], + select: (data?: GetWorkspaceUsersResponse) => data?.length ?? 0, + }, + ], + }) + const hasNumberOfCloudAccountLimitation = cloudAccountsLength > (productTierData.account_limit || Number.POSITIVE_INFINITY) + const hasNumberOfUserLimitation = usersLength > (productTierData.seats_max || Number.POSITIVE_INFINITY) + + const hasLimitation = hasNumberOfCloudAccountLimitation || hasNumberOfUserLimitation const queryClient = useQueryClient() const { mutate: changeBilling, isPending: changeBillingIsPending } = useMutation({ @@ -63,6 +95,7 @@ export const ChangeProductTierModal = ({ void queryClient.invalidateQueries({ queryKey: ['workspace-billing'], }) + void refreshWorkspaces() showModalRef.current?.(false) }, }) @@ -80,7 +113,7 @@ export const ChangeProductTierModal = ({ onClose?.() showModalRef.current?.(false) }} - color="error" + color={isUpgrade ? 'error' : undefined} > Cancel @@ -117,6 +150,7 @@ export const ChangeProductTierModal = ({ }} size="large" sx={{ width: 180 }} + disabled={hasLimitation} > {isUpgrade ? Upgrade : Downgrade} @@ -191,6 +225,44 @@ export const ChangeProductTierModal = ({ + {hasNumberOfCloudAccountLimitation ? ( + }> + + + You currently have{' '} + {plural(cloudAccountsLength, { + one: '# enabled cloud account', + other: '# enabled cloud accounts', + })} + . There must only be{' '} + {plural(productTierData.account_limit ?? 1, { + one: '# enabled cloud account', + other: '# enabled cloud accounts', + })}{' '} + in order to downgrade to the free tier. + + + + ) : null} + {hasNumberOfUserLimitation ? ( + }> + + + You currently have{' '} + {plural(usersLength, { + one: '# user', + other: '# users', + })}{' '} + attached to this workspace. There must only be{' '} + {plural(productTierData.seats_max ?? 1, { + one: '# user', + other: '# users', + })}{' '} + in order to downgrade to the free tier. + + + + ) : null} ) diff --git a/src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx b/src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx index 2aff7306..21d4cd5c 100644 --- a/src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx +++ b/src/pages/panel/workspace-settings-billing/ChangeProductTierToFreeModal.tsx @@ -1,13 +1,16 @@ -import { Trans, t } from '@lingui/macro' +import { Trans, plural, t } from '@lingui/macro' import SentimentDissatisfiedIcon from '@mui/icons-material/SentimentDissatisfied' +import WarningIcon from '@mui/icons-material/Warning' import { LoadingButton } from '@mui/lab' import { Alert, Button, Link, Stack, Typography } from '@mui/material' -import { useMutation, useQueryClient } from '@tanstack/react-query' +import { useMutation, useQueries, useQueryClient } from '@tanstack/react-query' import { AxiosError } from 'axios' import { MutableRefObject } from 'react' import { useUserProfile } from 'src/core/auth' import { useSnackbar } from 'src/core/snackbar' +import { getWorkspaceCloudAccountsQuery, getWorkspaceUsersQuery } from 'src/pages/panel/shared/queries' import { Modal } from 'src/shared/modal' +import { GetWorkspaceCloudAccountsResponse, GetWorkspaceProductTier, GetWorkspaceUsersResponse } from 'src/shared/types/server' import { ProductTier } from 'src/shared/types/server-shared' import { putWorkspaceBillingMutation } from './putWorkspaceBilling.mutation' import { productTierToLabel } from './utils' @@ -16,12 +19,46 @@ export interface ChangeProductTierModalProps { currentProductTier: ProductTier showModalRef: MutableRefObject<((show?: boolean | undefined) => void) | undefined> defaultOpen?: boolean + productTierData: GetWorkspaceProductTier onClose?: () => void } -export const ChangeProductTierToFreeModal = ({ showModalRef, defaultOpen, currentProductTier, onClose }: ChangeProductTierModalProps) => { +export const ChangeProductTierToFreeModal = ({ + showModalRef, + defaultOpen, + currentProductTier, + onClose, + productTierData, +}: ChangeProductTierModalProps) => { const { showSnackbar } = useSnackbar() - const { selectedWorkspace } = useUserProfile() + const { selectedWorkspace, refreshWorkspaces } = useUserProfile() + const [{ data: cloudAccountsLength = 0 }, { data: usersLength = 0 }] = useQueries({ + queries: [ + { + queryFn: getWorkspaceCloudAccountsQuery, + queryKey: ['workspace-cloud-accounts', selectedWorkspace?.id, true], + select: (data?: string | GetWorkspaceCloudAccountsResponse) => + typeof data === 'object' + ? [ + ...new Set( + [...data.added, ...data.discovered, ...data.recent] + .filter((acc) => acc.enabled && acc.is_configured) + .map((acc) => acc.id), + ), + ].length + : 0, + }, + { + queryFn: getWorkspaceUsersQuery, + queryKey: ['workspace-users', selectedWorkspace?.id], + select: (data?: GetWorkspaceUsersResponse) => data?.length ?? 0, + }, + ], + }) + const hasNumberOfCloudAccountLimitation = cloudAccountsLength > (productTierData.account_limit || 0) + const hasNumberOfUserLimitation = usersLength > (productTierData.seats_max || 0) + + const hasLimitation = hasNumberOfCloudAccountLimitation || hasNumberOfUserLimitation const queryClient = useQueryClient() const { mutate: changeBilling, isPending: changeBillingIsPending } = useMutation({ @@ -39,6 +76,7 @@ export const ChangeProductTierToFreeModal = ({ showModalRef, defaultOpen, curren void queryClient.invalidateQueries({ queryKey: ['workspace-billing'], }) + void refreshWorkspaces() showModalRef.current?.(false) }, }) @@ -56,7 +94,6 @@ export const ChangeProductTierToFreeModal = ({ showModalRef, defaultOpen, curren onClose?.() showModalRef.current?.(false) }} - color="error" > Cancel @@ -73,6 +110,7 @@ export const ChangeProductTierToFreeModal = ({ showModalRef, defaultOpen, curren }} size="large" sx={{ width: 180 }} + disabled={hasLimitation} > Downgrade @@ -97,6 +135,44 @@ export const ChangeProductTierToFreeModal = ({ showModalRef, defaultOpen, curren + {hasNumberOfCloudAccountLimitation ? ( + }> + + + You currently have{' '} + {plural(cloudAccountsLength, { + one: '# enabled cloud account', + other: '# enabled cloud accounts', + })} + . There must only be{' '} + {plural(productTierData.account_limit ?? 1, { + one: '# enabled cloud account', + other: '# enabled cloud accounts', + })}{' '} + in order to downgrade to the free tier. + + + + ) : null} + {hasNumberOfUserLimitation ? ( + }> + + + You currently have{' '} + {plural(usersLength, { + one: '# user', + other: '# users', + })}{' '} + attached to this workspace. There must only be{' '} + {plural(productTierData.seats_max ?? 0, { + one: '# user', + other: '# users', + })}{' '} + in order to downgrade to the free tier. + + + + ) : null} ) diff --git a/src/pages/panel/workspace-settings-billing/ProductTierComp.tsx b/src/pages/panel/workspace-settings-billing/ProductTierComp.tsx index 98987916..0ae85b05 100644 --- a/src/pages/panel/workspace-settings-billing/ProductTierComp.tsx +++ b/src/pages/panel/workspace-settings-billing/ProductTierComp.tsx @@ -3,17 +3,33 @@ import { useLingui } from '@lingui/react' import DoneIcon from '@mui/icons-material/Done' import { Box, Divider, List, ListItem, ListItemIcon, ListItemText, Stack, Typography } from '@mui/material' import { Fragment } from 'react' +import { GetWorkspaceProductTier } from 'src/shared/types/server' import { ProductTier } from 'src/shared/types/server-shared' +import { getISO8601DurationFromTimestamp, iso8601DurationToString, parseISO8601Duration } from 'src/shared/utils/parseDuration' import { productTierToDescription, productTierToLabel } from './utils' export interface ProductTierCompProps { productTier: ProductTier + productTierData: GetWorkspaceProductTier } -export const ProductTierComp = ({ productTier }: ProductTierCompProps) => { +export const ProductTierComp = ({ productTier, productTierData }: ProductTierCompProps) => { const { i18n: { locale }, } = useLingui() + const scanInterval = getISO8601DurationFromTimestamp(parseISO8601Duration(productTierData.scan_interval).duration) + const historyMax = getISO8601DurationFromTimestamp(parseISO8601Duration(productTierData.retention_period).duration) + const scanIntervalStr = + scanInterval.years === 1 + ? t`Yearly` + : scanInterval.months === 1 + ? t`Monthly` + : scanInterval.days === 1 + ? t`Daily` + : scanInterval.hours === 1 + ? t`Hourly` + : t`${iso8601DurationToString(scanInterval, 2)} per` + const historyMaxStr = t`${historyMax.years * 12 + historyMax.months}-month history` const label = productTierToLabel(productTier) const desc = productTierToDescription(productTier) if (!desc) { @@ -40,7 +56,7 @@ export const ProductTierComp = ({ productTier }: ProductTierCompProps) => { - ${desc.price.toLocaleString(locale)} + ${((productTierData.price_per_account_cents / 100) * productTierData.accounts_included).toLocaleString(locale)} {desc.monthly ? ( @@ -48,7 +64,7 @@ export const ProductTierComp = ({ productTier }: ProductTierCompProps) => { ) : null} - {desc.cloudAccounts.maximum ? ( + {productTierData.account_limit !== null ? ( { fontWeight={400} color={({ palette }) => (palette.mode === 'dark' ? palette.grey[400] : palette.grey[700])} > - {t`maximum of ${desc.cloudAccounts.maximum} cloud accounts`} + {t`maximum of ${productTierData.account_limit} cloud accounts`} - ) : desc.cloudAccounts.included ? ( + ) : productTierData.accounts_included ? ( { fontWeight={400} color={({ palette }) => (palette.mode === 'dark' ? palette.grey[400] : palette.grey[700])} > - {t`${desc.cloudAccounts.included} cloud accounts included`} + {t`${productTierData.accounts_included} cloud accounts included`} ) : ( )} - {desc.cloudAccounts.additionalCost ? ( + {productTierData.price_per_account_cents ? ( { fontWeight={400} color={({ palette }) => (palette.mode === 'dark' ? palette.grey[400] : palette.grey[700])} > - {t`($${desc.cloudAccounts.additionalCost.toLocaleString(locale)} / month per additional account)`} + {t`($${(productTierData.price_per_account_cents / 100).toLocaleString(locale)} / month per additional account)`} ) : ( @@ -88,21 +104,29 @@ export const ProductTierComp = ({ productTier }: ProductTierCompProps) => { - {desc.scanFrequency} scans + {scanIntervalStr} scans - {desc.seats.included ? ( + {productTierData.seats_included > 1 ? ( - {desc.seats.included} seats included {desc.seats.maximum ? t`(${desc.seats.maximum} max)` : ''} + {productTierData.seats_included} seats included {productTierData.seats_max ? t`(${productTierData.seats_max} max)` : ''} - ) : ( - {desc.seats.maximum} seat max - )} + ) : productTierData.seats_max ? ( + {productTierData.seats_max} seat max + ) : null} {desc.featuresTitle}: + + + + + + {historyMaxStr} + + {desc.features.map((feature, i) => ( @@ -116,7 +140,7 @@ export const ProductTierComp = ({ productTier }: ProductTierCompProps) => { - + Support: {desc.support.map((support, i) => ( diff --git a/src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts b/src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts index 6ef288c0..b04b8c77 100644 --- a/src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts +++ b/src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts @@ -12,14 +12,9 @@ export const productTierToDescription = (productTier: ProductTier) => { return { description: t`For solo software engineers who want to secure a single cloud account.\n`, icon: AccessibilityNewIcon, - cloudAccounts: { maximum: 1 }, - seats: { maximum: 1 }, - price: 0, monthly: false, - scanFrequency: t`Monthly`, featuresTitle: t`Features`, features: [ - t`1-month history`, t`Asset inventory`, t`Inventory search`, t`Neighborhood view`, @@ -35,13 +30,9 @@ export const productTierToDescription = (productTier: ProductTier) => { return { description: t`For growing teams looking to stay secure as they build out infrastructure.\n`, icon: WarehouseIcon, - cloudAccounts: { included: 3, additionalCost: 30 }, - seats: { included: 2, maximum: 20 }, - price: 90, monthly: true, - scanFrequency: t`Daily`, featuresTitle: t`Everything in Free, and`, - features: [t`3-month history`, t`Email alerts`, t`Weekly email report`, t`Data export (CSV, JSON, PDF)`], + features: [t`Email alerts`, t`Weekly email report`, t`Data export (CSV, JSON, PDF)`], support: [t`Product support via email`], mostPopular: false, } @@ -49,14 +40,9 @@ export const productTierToDescription = (productTier: ProductTier) => { return { description: t`For engineering teams looking to automate their cloud infrastructure security.`, icon: ApartmentIcon, - cloudAccounts: { included: 10, additionalCost: 40 }, - seats: { included: 5, maximum: 50 }, - price: 400, monthly: true, - scanFrequency: t`Hourly`, featuresTitle: t`Everything in Plus, and`, features: [ - t`6-month history`, t`Custom policies (coming soon!)`, t`Alerting integrations (PD, Slack, Discord, Teams)`, t`Task management integrations (coming soon!)`, @@ -68,14 +54,9 @@ export const productTierToDescription = (productTier: ProductTier) => { return { description: t`For dedicated security teams looking to build an integrated security toolchain.`, icon: BusinessIcon, - cloudAccounts: { included: 25, additionalCost: 50 }, - seats: { included: 20 }, - price: 1250, monthly: true, - scanFrequency: t`Hourly`, featuresTitle: t`Everything in Business, and`, features: [ - t`18-month history`, t`API access`, t`Custom alerting webhooks`, t`Single Sign on (coming soon!)`, diff --git a/src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx b/src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx index 6864551d..36a7b977 100644 --- a/src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx +++ b/src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx @@ -1,23 +1,36 @@ import { Trans, t } from '@lingui/macro' import { Button, Stack, Table, TableBody, TableCell, TableHead, TableRow, Typography } from '@mui/material' -import { useSuspenseQuery } from '@tanstack/react-query' +import { useSuspenseQueries } from '@tanstack/react-query' import { useState } from 'react' import { useUserProfile } from 'src/core/auth' +import { getWorkspaceProductTiersQuery, getWorkspaceUsersQuery } from 'src/pages/panel/shared/queries' import { panelUI, settingsStorageKeys } from 'src/shared/constants' import { TableView } from 'src/shared/layouts/panel-layout' +import { GetWorkspaceProductTiersResponse } from 'src/shared/types/server' import { handleScrollIntoViewClickEvent } from 'src/shared/utils/handleScrollIntoViewClickEvent' import { usePersistState } from 'src/shared/utils/usePersistState' import { InviteExternalUser } from './InviteExternalUser' import { WorkspaceSettingsUserRow } from './WorkspaceSettingsUserRow' -import { getWorkspaceUsersQuery } from './getWorkspaceUsers.query' export const WorkspaceSettingsUsersTable = () => { const { selectedWorkspace, checkPermissions } = useUserProfile() const [hasInvitePermission, hasRemoveUserPermission, hasReadRolesPermission] = checkPermissions('inviteTo', 'removeFrom', 'readRoles') - const { data } = useSuspenseQuery({ - queryKey: ['workspace-users', selectedWorkspace?.id], - queryFn: getWorkspaceUsersQuery, + const [{ data }, { data: currentTier }] = useSuspenseQueries({ + queries: [ + { + queryKey: ['workspace-users', selectedWorkspace?.id], + queryFn: getWorkspaceUsersQuery, + }, + { + queryFn: getWorkspaceProductTiersQuery, + queryKey: ['workspace-product-tiers', selectedWorkspace?.id], + select: (data: GetWorkspaceProductTiersResponse) => (selectedWorkspace?.tier ? data[selectedWorkspace.tier] : undefined), + }, + ], }) + + const canInviteBasedOnTier = (currentTier?.seats_max ?? Number.POSITIVE_INFINITY) > data.length + const [page, setPage] = useState(0) const [rowsPerPage, setRowsPerPage] = usePersistState( settingsStorageKeys.WorkspaceSettingsUsersTable.rowsPerPage, @@ -34,7 +47,7 @@ export const WorkspaceSettingsUsersTable = () => { - {hasInvitePermission ? : null} + {hasInvitePermission && canInviteBasedOnTier ? : null} = LinkProps< + RootComponent, + AdditionalProps +> & { + to: To + options?: NavigateOptions +} + +export function InternalLink({ + to, + options, + ...props +}: InternalLinkProps) { + const navigate = useAbsoluteNavigate() + const handleClick = (e: ReactMouseEvent) => { + e.preventDefault() + if ('onClick' in props && typeof props.onClick === 'function') { + props.onClick(e) + } + navigate(to, options) + } + return ( + + ) +} diff --git a/src/shared/link-button/index.ts b/src/shared/link-button/index.ts index be6bbfbc..04e921ae 100644 --- a/src/shared/link-button/index.ts +++ b/src/shared/link-button/index.ts @@ -1,2 +1,3 @@ export { ExternalLinkLoadingButton } from './ExternalLinkLoadingButton' +export { InternalLink } from './InternalLink' export { InternalLinkButton } from './InternalLinkButton' diff --git a/src/shared/types/server/responses/GetWorkspaceProductTiers.ts b/src/shared/types/server/responses/GetWorkspaceProductTiers.ts new file mode 100644 index 00000000..e207d72f --- /dev/null +++ b/src/shared/types/server/responses/GetWorkspaceProductTiers.ts @@ -0,0 +1,13 @@ +import { ProductTier } from 'src/shared/types/server-shared' + +export interface GetWorkspaceProductTier { + retention_period: string + seats_included: number + seats_max: number | null + scan_interval: string + account_limit: number | null + accounts_included: number + price_per_account_cents: number +} + +export type GetWorkspaceProductTiersResponse = Record diff --git a/src/shared/types/server/responses/index.ts b/src/shared/types/server/responses/index.ts index 507143ca..802bff61 100644 --- a/src/shared/types/server/responses/index.ts +++ b/src/shared/types/server/responses/index.ts @@ -55,6 +55,7 @@ export type { } from './GetWorkspaceInventorySearchStart' export type { GetWorkspaceInvitesResponse, WorkspaceInvite } from './GetWorkspaceInvites' export type { GetWorkspaceNotificationsResponse } from './GetWorkspaceNotifications' +export type { GetWorkspaceProductTier, GetWorkspaceProductTiersResponse } from './GetWorkspaceProductTiers' export type { GetWorkspaceSettingsResponse } from './GetWorkspaceSettings' export type { GetWorkspaceUsersResponse, WorkspaceUser } from './GetWorkspaceUsers' export type { GetWorkspaceResponse, GetWorkspacesResponse } from './GetWorkspaces' diff --git a/src/shared/utils/parseDuration.test.ts b/src/shared/utils/parseDuration.test.ts index 6513f812..e8218771 100644 --- a/src/shared/utils/parseDuration.test.ts +++ b/src/shared/utils/parseDuration.test.ts @@ -144,7 +144,7 @@ describe('parseDuration', () => { hours: 1, minutes: 1, seconds: 1, - duration: -949366861000, + duration: -34822861000, }) }) test('splitCustomDuration should split duration string that comes from durationToCustomDurationString', () => { diff --git a/src/shared/utils/parseDuration.ts b/src/shared/utils/parseDuration.ts index 42a4a036..b4b8baa1 100644 --- a/src/shared/utils/parseDuration.ts +++ b/src/shared/utils/parseDuration.ts @@ -129,7 +129,7 @@ export const parseISO8601Duration = (iso8601Duration: string) => { parsedDuration.days * 60 * 60 * 24 + parsedDuration.weeks * 60 * 60 * 24 * 7 + parsedDuration.months * 60 * 60 * 24 * 30 + - parsedDuration.years * 60 * 60 * 24 * 30 * 365) * + parsedDuration.years * 60 * 60 * 24 * 365) * 1000 return parsedDuration