diff --git a/src/containers/panel/PanelRoutes.tsx b/src/containers/panel/PanelRoutes.tsx index a1293fab..55843d79 100644 --- a/src/containers/panel/PanelRoutes.tsx +++ b/src/containers/panel/PanelRoutes.tsx @@ -1,7 +1,7 @@ import { lazy } from 'react' import { Navigate, Route, Routes } from 'react-router-dom' import { panelUI } from 'src/shared/constants' -import { AccountCheckGuard, BenchmarkCheckGuard, SubscriptionCheckGuard } from 'src/shared/layouts/panel-layout' +import { AccountCheckGuard, BenchmarkCheckGuard, PermissionCheckGuard, SubscriptionCheckGuard } from 'src/shared/layouts/panel-layout' const SecurityPage = lazy( () => @@ -19,11 +19,11 @@ const SetupCloudPage = lazy( ), ) -const AccountsPage = lazy( +const WorkspaceSettingsAccountsPage = lazy( () => import( /* webpackChunkName: "accounts" */ - 'src/pages/panel/accounts/AccountsPage' + 'src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsPage' ), ) @@ -91,18 +91,24 @@ export function PanelRoutes() { } /> - - } /> + }> + + } /> + } /> - - } /> - } /> - } /> - } /> - - } /> + }> + + } /> + } /> + }> + } /> + + } /> + + } /> + } /> diff --git a/src/core/auth/AuthGuard.tsx b/src/core/auth/AuthGuard.tsx index a8adacd1..0ac3483f 100644 --- a/src/core/auth/AuthGuard.tsx +++ b/src/core/auth/AuthGuard.tsx @@ -7,11 +7,11 @@ import { GetWorkspaceResponse } from 'src/shared/types/server' import { axiosWithAuth, defaultAxiosConfig, setAxiosWithAuth } from 'src/shared/utils/axios' import { clearAllCookies, isAuthenticated as isCookieAuthenticated } from 'src/shared/utils/cookie' import { jsonToStr } from 'src/shared/utils/jsonToStr' -import { getAuthData, setAuthData } from 'src/shared/utils/localstorage' +import { getAuthData as getPersistedAuthData, setAuthData as setPersistedAuthData } from 'src/shared/utils/localstorage' import { TrackJS } from 'trackjs' -import { UserContext, UserContextRealValues } from './UserContext' +import { UserContext, UserContextRealValues, UserContextValue } from './UserContext' import { getCurrentUserQuery } from './getCurrentUser.query' -import { getPermissions, maxPermissionNumber } from './getPermissions' +import { Permissions, getPermissions, maxPermissionNumber } from './getPermissions' import { getWorkspacesQuery } from './getWorkspaces.query' import { logoutMutation } from './logout.mutation' @@ -21,7 +21,7 @@ export function AuthGuard({ children }: PropsWithChildren) { const [auth, setAuth] = useState(() => { const isAuthenticated = isCookieAuthenticated() const selectedWorkspaceId = isAuthenticated - ? window.location.hash?.substring(1) || getAuthData()?.selectedWorkspaceId || undefined + ? window.location.hash?.substring(1) || getPersistedAuthData()?.selectedWorkspaceId || undefined : undefined return { ...defaultAuth, @@ -47,9 +47,9 @@ export function AuthGuard({ children }: PropsWithChildren) { const handleInternalSetAuth = useCallback((value: SetStateAction) => { setAuth((prev) => { const newAuth = typeof value === 'function' ? value(prev) : value - setAuthData({ + setPersistedAuthData({ isAuthenticated: newAuth.isAuthenticated, - selectedWorkspaceId: newAuth.selectedWorkspace?.id, + selectedWorkspaceId: newAuth.selectedWorkspace?.id ?? prev.selectedWorkspace?.id, }) return newAuth }) @@ -148,7 +148,7 @@ export function AuthGuard({ children }: PropsWithChildren) { } const { message, name, stack = 'unknown' } = error ?? {} const authorized = isCookieAuthenticated() - const workspaceId = getAuthData()?.selectedWorkspaceId || 'unknown' + const workspaceId = getPersistedAuthData()?.selectedWorkspaceId || 'unknown' sendToGTM({ event: GTMEventNames.Error, message: jsonToStr(message), @@ -173,7 +173,7 @@ export function AuthGuard({ children }: PropsWithChildren) { const { response, name, message, cause, status, stack, config, code } = error const request = error.request as unknown const authorized = isCookieAuthenticated() - const workspaceId = getAuthData()?.selectedWorkspaceId || 'unknown' + const workspaceId = getPersistedAuthData()?.selectedWorkspaceId || 'unknown' sendToGTM({ event: GTMEventNames.NetworkError, api: response?.config.url || 'unknown', @@ -211,6 +211,18 @@ export function AuthGuard({ children }: PropsWithChildren) { } }, [auth, navigate]) + const handleCheckPermission = useCallback( + (permission: Permissions) => { + return auth.selectedWorkspace?.permissions.includes(permission) ?? false + }, + [auth.selectedWorkspace?.permissions], + ) + + const handleCheckPermissions = useCallback( + (...permission: Permissions[]) => permission.map((permission) => handleCheckPermission(permission)), + [handleCheckPermission], + ) + return ( {children} diff --git a/src/core/auth/UserContext.ts b/src/core/auth/UserContext.ts index 52758aee..fd4b4b8a 100644 --- a/src/core/auth/UserContext.ts +++ b/src/core/auth/UserContext.ts @@ -16,6 +16,10 @@ export interface UserContextValue extends Partial { logout: (noWorkspace?: boolean) => Promise refreshWorkspaces: () => Promise selectWorkspace: (id: string) => Promise + checkPermission: (permission: Permissions) => boolean + checkPermissions: ( + ...permission: PermissionsToCheck + ) => { [Key in keyof PermissionsToCheck]: boolean } } export const UserContext = createContext(null) diff --git a/src/locales/de-DE/messages.po b/src/locales/de-DE/messages.po index 1601c29c..555c2a2e 100644 --- a/src/locales/de-DE/messages.po +++ b/src/locales/de-DE/messages.po @@ -120,19 +120,19 @@ msgstr "<0>Schritt 1: Scannen Sie den QR-Code<1>Zuerst, sehen Sie diesen QR- msgid "<0>This search is complex.The combo boxes below may not display all filter details but can help narrow your results. For full control, please use the Advanced tab." msgstr "" -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsEmailService.tsx:81 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsEmailService.tsx:93 msgid "<0>To ensure you receive timely alerts and notifications directly to your email, we require your email address.<1/>Please note that it is possible to define multiple email addresses." msgstr "<0>Um sicherzustellen, dass Sie zeitnahe Benachrichtigungen und Benachrichtigungen direkt an Ihre E-Mail-Adresse erhalten, benötigen wir Ihre E-Mail-Adresse.<1/>Bitte beachten Sie, dass es möglich ist, mehrere E-Mail-Adressen zu definieren." -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsPagerdutyService.tsx:70 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsPagerdutyService.tsx:80 msgid "<0>We use the Events API V2 for notifications through PagerDuty.<1/>To create an integration, please follow these steps:<2><3>Log in to PagerDuty with your account credentials.<4>Navigate to the dashboard and select \"Services\".<5>Choose the service you wish to integrate, go to the \"Integrations\" tab, and then click \"Add Integration\".<6>For the integration type, select \"PagerDuty Events API V2\" and click \"Add\".<7>Provide a name for the integration for easy reference and copy the \"Integration Key\".For more information please visit <8>PagerDuty Services and Integrations" msgstr "<0>Wir verwenden die Events API V2 für Benachrichtigungen über PagerDuty.<1/>Um eine Integration zu erstellen, befolgen Sie bitte diese Schritte:<2><3>Melden Sie sich mit Ihren Kontoanmeldeinformationen bei PagerDuty an.<4> Navigieren Sie zum Dashboard und wählen Sie „Dienste“ aus.<5>Wählen Sie den Dienst aus, den Sie integrieren möchten, gehen Sie zur Registerkarte „Integrationen“ und klicken Sie dann auf „Integration hinzufügen“.<6>Wählen Sie als Integrationstyp „PagerDuty Events API V2“ aus und klicken Sie auf „Hinzufügen“.<7>Geben Sie einen Namen für die Integration ein, damit Sie sie leichter nachschlagen können, und kopieren Sie den „Integrationsschlüssel“.Weitere Informationen finden Sie unter <8>PagerDuty-Dienste und Integrationen" -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsTeamsService.tsx:81 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsTeamsService.tsx:91 msgid "<0>We utilize incoming webhooks to deliver notifications to your Microsoft Teams channels.<1/>To manually add a webhook:<2><3>In Microsoft Teams, click on More options (⋯) next to the channel name and then select Connectors.<4>Browse through the list of Connectors to find Incoming Webhook, and click Add.<5>Provide a name for the webhook, upload an image to represent data from the webhook, and click Create.<6>Copy the webhook URL to your clipboard and keep it safe. This URL is necessary for TrackJS to send notifications.<7>Click Done.<8>In the text box provided below, paste the Webhook URL you copied and enter the name of the channel.More from <9>Microsoft Teams Documentation" msgstr "<0>Wir nutzen eingehende Webhooks, um Benachrichtigungen an Ihre Microsoft Teams-Kanäle zu übermitteln.<1/>So fügen Sie manuell einen Webhook hinzu:<2><3>Klicken Sie in Microsoft Teams auf Weitere Optionen (⋯) neben dem Kanalnamen und dann Wählen Sie Connectors aus.<4>Durchsuchen Sie die Liste der Connectors, um den eingehenden Webhook zu finden, und klicken Sie auf Hinzufügen.<5>Geben Sie einen Namen für den Webhook ein, laden Sie ein Bild hoch, um die Daten vom Webhook darzustellen, und Klicken Sie auf „Erstellen“.<6>Kopieren Sie die Webhook-URL in Ihre Zwischenablage und bewahren Sie sie sicher auf. Diese URL ist erforderlich, damit TrackJS Benachrichtigungen senden kann.<7>Klicken Sie auf „Fertig“.<8>Fügen Sie in das unten bereitgestellte Textfeld die Webhook-URL ein, die Sie kopiert haben, und geben Sie den Namen des Kanals ein.Mehr aus der <9>Microsoft Teams-Dokumentation" -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsOpsgenieService.tsx:69 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsOpsgenieService.tsx:79 msgid "<0>We utilize the OpsGenie API integration for notifications and alerts.<1/>To set up this Integration, please follow these instructions:<2><3><4>Navigate to the Dashboard: Find and click on the “Teams” section from the sidebar once logged in.<5><6>Select Your Team: Choose the team you want to integrate with. Within the team dashboard, go to the “Integrations” tab.<7><8>Add Integration: Click on the “+ New Integration” button. Select “API” as the integration type, give it the name “Fix,” and press Continue.<9><10>Turn Integration on: When the Integration has been created, it is disabled by default - click “Turn on Integration”.<11><12>Copy API Key: Find and copy the API Key in the integration settings." msgstr "<0>Wir nutzen die OpsGenie-API-Integration für Benachrichtigungen und Warnungen.<1/>Um diese Integration einzurichten, folgen Sie bitte diesen Anweisungen:<2><3><4>Navigieren Sie zum Dashboard: Suchen und klicken Sie Klicken Sie nach der Anmeldung auf den Abschnitt „Teams“ in der Seitenleiste.<5><6>Wählen Sie Ihr Team aus: Wählen Sie das Team aus, in das Sie sich integrieren möchten. Gehen Sie im Team-Dashboard zur Registerkarte „Integrationen“.<7><8>Integration hinzufügen: Klicken Sie auf die Schaltfläche „+ Neue Integration“. Wählen Sie „API“ als Integrationstyp, geben Sie ihm den Namen „Fix“ und klicken Sie auf „Weiter“.<9><10>Integration aktivieren: Wenn die Integration erstellt wurde, wird sie deaktiviert Standardmäßig – klicken Sie auf „Integration aktivieren“.<11><12>API-Schlüssel kopieren: Suchen und kopieren Sie den API-Schlüssel in den Integrationseinstellungen." @@ -164,8 +164,8 @@ msgstr "In wenigen Minuten bis zum ersten Ergebnis" msgid "Abandoned" msgstr "Verlassen" -#: src/pages/panel/accounts/AccountRow.tsx:237 -#: src/pages/panel/accounts/AccountRow.tsx:355 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:238 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:364 msgid "Access to your account is broken" msgstr "Der Zugriff auf Ihr Konto ist unterbrochen" @@ -183,7 +183,7 @@ msgstr "Konto: {0}" #: src/pages/panel/inventory/InventoryTable.error.tsx:73 #: src/pages/panel/workspace-settings/WorkspaceSettingsPage.tsx:42 #: src/shared/language-button/LanguageButton.stories.tsx:20 -#: src/shared/layouts/panel-layout/menuList.tsx:68 +#: src/shared/layouts/panel-layout/menuList.tsx:71 #: src/shared/layouts/panel-layout/PanelBreadcrumbs.tsx:12 msgid "Accounts" msgstr "Konten" @@ -196,8 +196,8 @@ msgstr "Zusammenfassung der Konten" msgid "Action" msgstr "Aktion" -#: src/pages/panel/accounts/AccountsTableItem.tsx:66 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:69 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:80 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:74 msgid "Actions" msgstr "Aktionen" @@ -233,7 +233,7 @@ msgstr "" msgid "Add Manually" msgstr "Manuell hinzufügen" -#: src/pages/panel/accounts/AccountsTable.tsx:26 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTable.tsx:30 msgid "Added accounts" msgstr "Konten hinzugefügt" @@ -297,7 +297,7 @@ 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/ConfirmChangePaymentModal.tsx:34 -#: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:31 +#: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:32 msgid "An error occurred, please try again later." msgstr "Ein Fehler ist aufgetreten. Bitte versuchen Sie es später erneut." @@ -309,7 +309,7 @@ msgstr "und" msgid "API access" msgstr "API-Zugriff" -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsOpsgenieService.tsx:133 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsOpsgenieService.tsx:143 msgid "API Key" msgstr "API-Schlüssel" @@ -325,9 +325,9 @@ 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/accounts/AccountRow.tsx:373 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:81 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:102 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:382 +#: 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?" @@ -357,7 +357,7 @@ msgid "Because the data is over {0} Only first {1} items will be downloaded" msgstr "Da die Daten über {0} liegen, werden nur die ersten {1} Elemente heruntergeladen" #: src/pages/panel/user-settings/UserSettingsNotification.tsx:46 -#: src/pages/panel/workspace-settings/workspace-alerting-settings/WorkspaceAlertingSettings.tsx:154 +#: src/pages/panel/workspace-settings/workspace-alerting-settings/WorkspaceAlertingSettings.tsx:164 msgid "Benchmark" msgstr "Benchmark" @@ -370,9 +370,9 @@ msgstr "Benchmark: {0}" msgid "Benchmarks" msgstr "Benchmarks" -#: src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx:50 +#: src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx:49 #: src/pages/panel/workspace-settings/WorkspaceSettingsPage.tsx:48 -#: src/shared/layouts/panel-layout/menuList.tsx:78 +#: src/shared/layouts/panel-layout/menuList.tsx:81 #: src/shared/layouts/panel-layout/PanelBreadcrumbs.tsx:20 msgid "Billing" msgstr "Abrechnung" @@ -382,7 +382,7 @@ msgstr "Abrechnung" msgid "Billing Admin" msgstr "Abrechnungsadmin" -#: src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx:106 +#: src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx:109 msgid "Billing cycle" msgstr "" @@ -394,23 +394,23 @@ msgstr "" msgid "Business" msgstr "Business" -#: src/pages/panel/accounts/AccountRow.tsx:283 -#: src/pages/panel/accounts/AccountRow.tsx:287 -#: src/pages/panel/accounts/AccountRow.tsx:288 -#: src/pages/panel/accounts/AccountRow.tsx:392 #: 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:284 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:288 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:289 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:401 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:92 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx:150 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx:154 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx:151 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx:155 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:113 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx:156 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:118 #: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsDisconnectServiceModal.tsx:57 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsEmailService.tsx:93 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsOpsgenieService.tsx:101 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsPagerdutyService.tsx:99 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsTeamsService.tsx:111 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsEmailService.tsx:105 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsOpsgenieService.tsx:111 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsPagerdutyService.tsx:109 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsTeamsService.tsx:123 #: src/pages/subscription/choose-workspace/ChooseWorkspacePage.tsx:118 msgid "Cancel" msgstr "Stornieren" @@ -455,12 +455,12 @@ msgstr "" msgid "Close" msgstr "Schließen" -#: src/pages/panel/accounts/AccountRow.tsx:412 -#: src/pages/panel/accounts/AccountsTableItem.tsx:41 #: src/pages/panel/inventory/inventory-form/InventoryFormCloudValues.tsx:43 #: src/pages/panel/inventory/inventory-form/InventoryFormMore.tsx:89 #: src/pages/panel/inventory/resource-detail/ResourceDetail.tsx:222 #: src/pages/panel/security/AccountCard.tsx:37 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:421 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:50 msgid "Cloud" msgstr "Cloud" @@ -497,10 +497,10 @@ msgstr "Compliance" msgid "Configuration changed" msgstr "Konfiguration geändert" -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsEmailService.tsx:73 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsOpsgenieService.tsx:61 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsPagerdutyService.tsx:62 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsTeamsService.tsx:74 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsEmailService.tsx:85 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsOpsgenieService.tsx:71 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsPagerdutyService.tsx:72 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsTeamsService.tsx:84 msgid "Configure" msgstr "Konfigurieren" @@ -513,28 +513,28 @@ msgid "Congratulations on your subscription" msgstr "Herzlichen Glückwunsch zu Ihrem Abonnement" #: src/pages/panel/user-settings/UserSettingsSocialNetwork.tsx:17 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsDiscordService.tsx:40 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsEmailService.tsx:73 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsEmailService.tsx:104 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsOpsgenieService.tsx:61 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsOpsgenieService.tsx:112 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsPagerdutyService.tsx:62 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsPagerdutyService.tsx:110 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsSlackService.tsx:40 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsTeamsService.tsx:74 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsTeamsService.tsx:122 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsDiscordService.tsx:50 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsEmailService.tsx:85 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsEmailService.tsx:116 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsOpsgenieService.tsx:71 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsOpsgenieService.tsx:122 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsPagerdutyService.tsx:72 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsPagerdutyService.tsx:120 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsSlackService.tsx:50 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsTeamsService.tsx:84 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsTeamsService.tsx:134 msgid "Connect" msgstr "Verbinden" -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsOpsgenieService.tsx:67 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsOpsgenieService.tsx:77 msgid "Connect Opsgenie" msgstr "Verbinden Sie Opsgenie" -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsPagerdutyService.tsx:68 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsPagerdutyService.tsx:78 msgid "Connect PagerDuty" msgstr "Verbinden Sie PagerDuty" -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsTeamsService.tsx:79 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsTeamsService.tsx:89 msgid "Connect Teams" msgstr "Verbinden Sie Teams" @@ -587,7 +587,7 @@ msgstr "Kritisch" msgid "Current Product Tier" msgstr "" -#: src/pages/panel/workspace-settings/workspace-alerting-settings/WorkspaceAlertingSettings.tsx:282 +#: src/pages/panel/workspace-settings/workspace-alerting-settings/WorkspaceAlertingSettings.tsx:300 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." @@ -631,19 +631,19 @@ msgstr "Standardrolle" msgid "Delayed Effect" msgstr "Verzögerte Wirkung" -#: src/pages/panel/accounts/AccountRow.tsx:343 -#: src/pages/panel/accounts/AccountRow.tsx:347 -#: src/pages/panel/accounts/AccountRow.tsx:348 -#: src/pages/panel/accounts/AccountRow.tsx:403 #: src/pages/panel/user-settings/UserSettingsSocialNetworkDeleteButton.tsx:79 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:69 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:351 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:355 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:356 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:412 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:73 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:74 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:77 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:78 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:103 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:90 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:94 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:95 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:124 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:99 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:100 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:129 msgid "Delete" msgstr "Löschen" @@ -651,9 +651,9 @@ msgstr "Löschen" msgid "Delete Provider" msgstr "Anbieter löschen" -#: src/pages/panel/accounts/AccountRow.tsx:360 #: 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:369 msgid "Deploy Stack" msgstr "Deploy Stack" @@ -683,7 +683,7 @@ msgstr "Trennen" msgid "Disconnect Service" msgstr "Dienst trennen" -#: src/pages/panel/accounts/AccountsTable.tsx:33 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTable.tsx:38 msgid "Discovered but unconfigured accounts" msgstr "Erkannte, aber nicht konfigurierte Konten" @@ -691,19 +691,19 @@ msgstr "Erkannte, aber nicht konfigurierte Konten" msgid "Do not show me again" msgstr "Zeig es mir nicht noch einmal" -#: src/pages/panel/accounts/AccountRow.tsx:376 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:385 msgid "Do you want to delete this account?" msgstr "Möchten Sie dieses Konto löschen?" -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:84 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:86 msgid "Do you want to delete this invitation?" msgstr "Möchten Sie diese Einladung löschen?" -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:105 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:110 msgid "Do you want to delete this user?" msgstr "Möchten Sie diesen Benutzer löschen?" -#: src/pages/auth/login/LoginPage.tsx:231 +#: src/pages/auth/login/LoginPage.tsx:232 msgid "Don't have an account? Click here to Sign up." msgstr "Sie haben noch kein Konto? Klicken Sie hier, um sich anzumelden." @@ -717,25 +717,25 @@ msgstr "Downgrade" msgid "Download CSV" msgstr "CSV herunterladen" -#: src/pages/panel/accounts/AccountRow.tsx:299 -#: src/pages/panel/accounts/AccountRow.tsx:300 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx:166 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx:167 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:300 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:301 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx:172 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx:173 msgid "Edit" msgstr "Edit" #: src/pages/auth/forgot-password/ForgotPasswordPage.tsx:62 -#: src/pages/auth/login/LoginPage.tsx:115 +#: src/pages/auth/login/LoginPage.tsx:116 #: src/pages/auth/register/RegisterPage.tsx:89 #: src/pages/panel/user-settings/UserSettingsFormEmail.tsx:49 #: src/pages/panel/user-settings/UserSettingsFormEmail.tsx:69 -#: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:83 -#: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:87 +#: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:86 +#: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:90 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:109 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationsTable.tsx:44 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:130 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:57 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsEmailService.tsx:131 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationsTable.tsx:45 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:135 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:59 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsEmailService.tsx:143 msgid "Email" msgstr "Email" @@ -752,8 +752,8 @@ msgstr "Aktivieren" msgid "Enable all" msgstr "Alle aktivieren" -#: src/pages/panel/accounts/AccountsTableItem.tsx:58 #: src/pages/panel/user-settings/UserSettingsNotification.tsx:49 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:69 msgid "Enabled" msgstr "Ermöglicht" @@ -786,7 +786,7 @@ msgid "Example searches" msgstr "Beispielsuchen" #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:112 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationsTable.tsx:47 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationsTable.tsx:48 msgid "Expires" msgstr "Läuft ab" @@ -797,7 +797,7 @@ msgid "External Directories" msgstr "Externe Verzeichnisse" #: src/pages/panel/setup-cloud/SetupCloudPage.tsx:128 -#: src/pages/panel/workspace-settings/WorkspaceSettingsForm.tsx:55 +#: src/pages/panel/workspace-settings/WorkspaceSettingsForm.tsx:56 msgid "External Id" msgstr "External Id" @@ -857,7 +857,7 @@ msgstr "Für wachsende Teams, die sicher bleiben möchten, während sie die Infr msgid "For solo software engineers who want to secure a single cloud account." msgstr "Für Solo-Softwareentwickler, die sich ein einziges Cloud-Konto sichern möchten." -#: src/pages/auth/login/LoginPage.tsx:236 +#: src/pages/auth/login/LoginPage.tsx:237 msgid "Forget your password? Click here to reset your password." msgstr "Passwort vergessen? Klicken Sie hier, um Ihr Passwort zurückzusetzen." @@ -875,7 +875,7 @@ msgstr "" msgid "Free" msgstr "Free" -#: src/pages/panel/inventory/inventory-form/InventoryFormFullTextSearchValue.tsx:48 +#: src/pages/panel/inventory/inventory-form/InventoryFormFullTextSearchValue.tsx:42 msgid "Full-text search" msgstr "" @@ -887,7 +887,7 @@ msgstr "Erhalten Sie Ihre fünf wichtigsten Empfehlungen zur Verbesserung Ihrer msgid "High" msgstr "Hoch" -#: src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx:113 +#: src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx:116 msgid "Highest product tier this billing cycle" msgstr "" @@ -904,10 +904,10 @@ msgstr "Stündliche" msgid "How to fix" msgstr "Wie repariert man" -#: src/pages/panel/accounts/AccountRow.tsx:409 -#: src/pages/panel/accounts/AccountsTableItem.tsx:44 #: src/pages/panel/inventory/resource-detail/ResourceDetail.tsx:219 #: src/pages/panel/security/AccountCard.tsx:34 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:418 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:53 #: src/shared/charts/NetworkDiagram.tsx:406 msgid "ID" msgstr "ID" @@ -985,7 +985,7 @@ msgstr "Instanz wird beendet" msgid "Integration advice for your specific cloud environment via video call" msgstr "Integrationsberatung für Ihre spezifische Cloud-Umgebung per Videoanruf" -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsPagerdutyService.tsx:131 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsPagerdutyService.tsx:141 msgid "Integration Key" msgstr "Integrationsschlüssel" @@ -994,7 +994,7 @@ msgstr "Integrationsschlüssel" msgid "Invalid Value" msgstr "Ungültiger Wert" -#: src/shared/layouts/panel-layout/menuList.tsx:39 +#: src/shared/layouts/panel-layout/menuList.tsx:40 msgid "Inventory" msgstr "Inventar" @@ -1002,17 +1002,17 @@ msgstr "Inventar" msgid "Inventory search" msgstr "Inventarsuche" -#: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:51 +#: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:54 msgid "Invite" msgstr "Einladen" #: src/pages/panel/workspace-settings-external-directory/AddExternalDirectory.tsx:36 -#: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:51 -#: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:67 +#: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:54 +#: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:70 msgid "Invite External User" msgstr "Externen Benutzer einladen" -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:66 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:70 msgid "Invites" msgstr "Lädt ein" @@ -1029,7 +1029,7 @@ msgstr "Art" msgid "Kinds" msgstr "Arten" -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:63 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:67 msgid "Last login" msgstr "Letzte Anmeldung" @@ -1037,8 +1037,8 @@ msgstr "Letzte Anmeldung" msgid "Load Balancers with no backends" msgstr "Load Balancer ohne Backends" -#: src/pages/auth/login/LoginPage.tsx:106 -#: src/pages/auth/login/LoginPage.tsx:226 +#: src/pages/auth/login/LoginPage.tsx:107 +#: src/pages/auth/login/LoginPage.tsx:227 msgid "Log in" msgstr "Anmeldung" @@ -1066,11 +1066,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:145 +#: src/pages/panel/workspace-settings-billing/ChangeProductTier.tsx:150 msgid "Manage AWS Market place payment method" msgstr "" -#: src/pages/panel/workspace-settings-billing/ChangeProductTier.tsx:164 +#: src/pages/panel/workspace-settings-billing/ChangeProductTier.tsx:169 msgid "Manage Card Details" msgstr "" @@ -1088,7 +1088,7 @@ msgid "Member" msgstr "Mitglied" #: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:19 -#: src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx:108 +#: src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx:111 msgid "Monthly" msgstr "Monatliche" @@ -1112,20 +1112,20 @@ msgstr "Am meisten verbesserte Ressourcen" msgid "Most Non-Compliant Accounts" msgstr "Die meisten nicht konformen Konten" -#: src/pages/panel/accounts/AccountRow.tsx:415 -#: src/pages/panel/accounts/AccountsTableItem.tsx:47 #: src/pages/panel/inventory/resource-detail/ResourceDetail.tsx:220 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:424 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:56 #: 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:73 -#: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:77 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:133 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:54 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsEmailService.tsx:114 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsOpsgenieService.tsx:122 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsPagerdutyService.tsx:120 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsTeamsService.tsx:132 +#: 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:56 +#: 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 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsTeamsService.tsx:144 #: src/shared/charts/NetworkDiagram.tsx:407 msgid "Name" msgstr "Name" @@ -1164,11 +1164,11 @@ msgstr "" msgid "New security issues detected" msgstr "Neue Sicherheitsprobleme entdeckt" -#: src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx:121 +#: src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx:124 msgid "Next invoice will be available" msgstr "" -#: src/pages/panel/accounts/AccountsTableItem.tsx:55 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:64 msgid "Next scan" msgstr "Nächster Scan" @@ -1206,7 +1206,7 @@ msgstr "" msgid "Node Vulnerable" msgstr "" -#: src/pages/panel/accounts/AccountRow.tsx:379 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:388 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." @@ -1227,11 +1227,11 @@ msgstr "Benachrichtigung" msgid "Number Of Account Charged" msgstr "Anzahl der belasteten Konten" -#: src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx:108 +#: src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx:111 msgid "One time" msgstr "Einmal" -#: src/pages/auth/login/LoginPage.tsx:26 +#: src/pages/auth/login/LoginPage.tsx:27 msgid "Oops, the username or password doesn't seem to match our records. Please try again." msgstr "Hoppla, der Benutzername oder das Passwort scheinen nicht mit unseren Aufzeichnungen übereinzustimmen. Bitte versuche es erneut." @@ -1263,8 +1263,8 @@ msgstr "Geöffnet um" msgid "Optional professional services" msgstr "Optionale professionelle Dienstleistungen" -#: src/pages/auth/login/LoginPage.tsx:164 -#: src/pages/auth/login/LoginPage.tsx:241 +#: src/pages/auth/login/LoginPage.tsx:165 +#: src/pages/auth/login/LoginPage.tsx:242 #: src/pages/auth/register/RegisterPage.tsx:136 #: src/pages/panel/user-settings/UserSettingsTotpDeactivationModal.tsx:87 msgid "Or" @@ -1286,7 +1286,7 @@ msgstr "Verwaiste Volumes" msgid "Other Workspace Settings" msgstr "Andere Arbeitsbereichseinstellungen" -#: src/pages/auth/login/LoginPage.tsx:147 +#: src/pages/auth/login/LoginPage.tsx:148 #: src/pages/panel/user-settings/UserSettingsTotpActivationModal.tsx:204 #: src/pages/panel/user-settings/UserSettingsTotpDeactivationModal.tsx:73 msgid "OTP Code" @@ -1297,7 +1297,7 @@ msgstr "OTP-Code" msgid "Owner" msgstr "Eigentümer" -#: src/pages/auth/login/LoginPage.tsx:130 +#: src/pages/auth/login/LoginPage.tsx:131 #: src/pages/auth/register/RegisterPage.tsx:103 #: src/pages/auth/reset-password/ResetPasswordPage.tsx:96 msgid "Password" @@ -1308,7 +1308,7 @@ msgid "Payment is required for your workspace, Please contact the workspace owne msgstr "" #: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:131 -#: src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx:74 +#: src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx:73 msgid "Payment method" msgstr "" @@ -1325,9 +1325,9 @@ msgstr "Zahlungsmethode erforderlich" msgid "Payment method to add" msgstr "" -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationsTable.tsx:24 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationsTable.tsx:40 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:29 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationsTable.tsx:25 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationsTable.tsx:41 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:31 #: src/shared/layouts/panel-layout/PanelBreadcrumbs.tsx:18 msgid "Pending Invitations" msgstr "Ausstehende Einladungen" @@ -1340,7 +1340,7 @@ msgstr "Wählen Sie eine der Empfehlungen rechts aus und verbessern Sie Ihre Sic msgid "Please add a payment method to switch your workspace's product tier" msgstr "" -#: src/pages/auth/login/LoginPage.tsx:191 +#: src/pages/auth/login/LoginPage.tsx:192 msgid "Please enter your One-Time-Password or one of your Recovery code." msgstr "Bitte geben Sie Ihr One-Time-Passwort oder einen Ihrer Wiederherstellungscodes ein." @@ -1364,7 +1364,7 @@ msgstr "Drucken oder kopieren Sie die folgenden Wiederherstellungscodes" msgid "Privileged" msgstr "Privilegiert" -#: src/pages/panel/accounts/AccountRow.tsx:232 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:233 msgid "Privileged account" msgstr "Privilegiertes Konto" @@ -1416,11 +1416,11 @@ msgstr "Erneut authentifizieren" msgid "Receipts" msgstr "Quittungen" -#: src/pages/panel/accounts/AccountsTable.tsx:22 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTable.tsx:22 msgid "Recently added accounts" msgstr "Kürzlich hinzugefügte Konten" -#: src/pages/auth/login/LoginPage.tsx:173 +#: src/pages/auth/login/LoginPage.tsx:174 #: src/pages/panel/user-settings/UserSettingsTotpDeactivationModal.tsx:105 msgid "Recovery Code" msgstr "Wiederherstellungscode" @@ -1429,7 +1429,7 @@ msgstr "Wiederherstellungscode" msgid "Recovery codes" msgstr "Wiederherstellungscodes" -#: src/pages/panel/workspace-settings/WorkspaceSettingsForm.tsx:56 +#: src/pages/panel/workspace-settings/WorkspaceSettingsForm.tsx:57 msgid "Regenerate" msgstr "Regenerieren" @@ -1452,7 +1452,7 @@ msgstr "Registrieren" msgid "Remediation recommendations" msgstr "Empfehlungen zur Fehlerbehebung" -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationsTable.tsx:50 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationsTable.tsx:52 msgid "Remove" msgstr "Entfernen" @@ -1473,7 +1473,7 @@ msgstr "Ressource erstellt" msgid "Resource deleted" msgstr "Ressource gelöscht" -#: src/pages/panel/accounts/AccountsTableItem.tsx:50 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:59 msgid "Resources" msgstr "Ressourcen" @@ -1485,10 +1485,10 @@ msgstr "Ressourcen mit der Zeichenfolge \"delete\"" msgid "Risk" msgstr "Risiko" -#: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:93 -#: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:104 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:144 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:60 +#: 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:63 msgid "Roles" msgstr "Rollen" @@ -1505,7 +1505,7 @@ msgid "Secure read-only access" msgstr "Sicherer Lesezugriff" #: src/pages/panel/inventory/InventoryTemplateBoxes.tsx:25 -#: src/shared/layouts/panel-layout/menuList.tsx:54 +#: src/shared/layouts/panel-layout/menuList.tsx:56 msgid "Security" msgstr "Sicherheit" @@ -1521,7 +1521,7 @@ msgstr "Sicherheitsprobleme" msgid "Security posture improved" msgstr "Die Sicherheitslage wurde verbessert" -#: src/pages/panel/accounts/AccountsTableItem.tsx:61 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:72 msgid "Security Scan" msgstr "Sicherheitsscan" @@ -1539,11 +1539,11 @@ msgstr "Sehen Sie sich diese Ressource in der AWS-Konsole an" msgid "Select Language" msgstr "Sprache auswählen" -#: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:64 +#: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:67 msgid "Send Invite" msgstr "Sende Einladung" -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsEmailService.tsx:79 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsEmailService.tsx:91 msgid "Setting Up Email Notifications" msgstr "E-Mail-Benachrichtigungen einrichten" @@ -1554,8 +1554,8 @@ msgstr "" #: src/pages/panel/inventory/inventory-form/InventoryFormSeverity.tsx:50 #: src/pages/panel/inventory/inventory-form/utils/getAutoCompleteFromKey.tsx:150 -#: src/pages/panel/workspace-settings/workspace-alerting-settings/WorkspaceAlertingSettings.tsx:157 -#: src/pages/panel/workspace-settings/workspace-alerting-settings/WorkspaceAlertingSettings.tsx:205 +#: src/pages/panel/workspace-settings/workspace-alerting-settings/WorkspaceAlertingSettings.tsx:167 +#: src/pages/panel/workspace-settings/workspace-alerting-settings/WorkspaceAlertingSettings.tsx:216 msgid "Severity" msgstr "Schwere" @@ -1592,16 +1592,16 @@ msgstr "Einige Prüfungen wurden für diese Ressource deaktiviert" 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:137 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:51 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:142 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:53 msgid "Sources" msgstr "Quellen" -#: src/pages/panel/accounts/AccountRow.tsx:272 -#: src/pages/panel/accounts/AccountRow.tsx:273 -#: src/pages/panel/accounts/AccountRow.tsx:278 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx:143 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:273 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:274 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:279 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx:144 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx:145 msgid "Submit" msgstr "Einreichen" @@ -1609,7 +1609,7 @@ msgstr "Einreichen" msgid "Subscription successfully added to {0}" msgstr "Abonnement erfolgreich zu {0} hinzugefügt" -#: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:28 +#: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:29 msgid "Successfully invited {email}" msgstr "{email} erfolgreich eingeladen" @@ -1631,7 +1631,7 @@ msgstr "Prüfen" msgid "The change will be active from the next security scan onwards. Until the next scan, the resource will still show the failing check." msgstr "Die Änderung wird ab dem nächsten Sicherheitsscan aktiv. Bis zum nächsten Scan zeigt die Ressource weiterhin die fehlgeschlagene Prüfung an." -#: src/pages/auth/login/LoginPage.tsx:30 +#: src/pages/auth/login/LoginPage.tsx:31 msgid "The OTP or recovery code you entered is incorrect or the OTP has expired. Please try entering it again." msgstr "Das von Ihnen eingegebene OTP oder Wiederherstellungscode ist falsch oder das OTP ist abgelaufen. Bitte versuchen Sie es erneut einzugeben." @@ -1651,7 +1651,7 @@ msgstr "Das von Ihnen gesendete Token ist ungültig oder abgelaufen. Bitte versu msgid "There's no account configured for this workspace." msgstr "Für diesen Arbeitsbereich ist kein Konto konfiguriert." -#: src/pages/panel/accounts/AccountRow.tsx:365 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:374 msgid "This account is currently in a degraded state possibly due to a misconfiguration. Fix was unable to access the account. To resume security scans, please log into account {accountName} ({0}) and re-deploy the CloudFormation stack that establishes the IAM role trust." msgstr "Dieses Konto befindet sich derzeit in einem nicht-funktionalen Zustand, möglicherweise aufgrund einer Fehlkonfiguration. Fix konnte nicht auf das Konto zugreifen. Um die Sicherheitsscans fortzusetzen, loggen Sie sich bitte in das Konto {accountName} ({0}) ein und erzeugen Sie den CloudFormation-Stacks, der die IAM Vertrauensstellung herstellt, erneut." @@ -1772,7 +1772,7 @@ msgstr "Benachrichtigung über Benutzereinstellungen" #: src/pages/panel/workspace-settings-external-directory/WorkspaceSettingsExternalDirectoryPage.tsx:27 #: src/pages/panel/workspace-settings/WorkspaceSettingsPage.tsx:45 -#: src/shared/layouts/panel-layout/menuList.tsx:73 +#: src/shared/layouts/panel-layout/menuList.tsx:76 #: src/shared/layouts/panel-layout/PanelBreadcrumbs.tsx:16 msgid "Users" msgstr "Benutzer" @@ -1786,7 +1786,7 @@ msgstr "Wert" msgid "Warning" msgstr "Warnung" -#: src/pages/auth/login/LoginPage.tsx:198 +#: src/pages/auth/login/LoginPage.tsx:199 msgid "We have sent an email with a confirmation link to your email address. Please follow the link to activate your account." msgstr "Wir haben eine E-Mail mit einem Bestätigungslink an Ihre E-Mail-Adresse gesendet. Bitte folgen Sie dem Link, um Ihr Konto zu aktivieren." @@ -1798,7 +1798,7 @@ msgstr "Es tut uns leid, dass Sie herunterstufen, aber wir sind dankbar, Sie wei msgid "We're sorry for the inconvenience. Our team has been notified, and the issue is being looked into. Please try again in a few minutes. If the problem persists, feel free to contact us <0>on Discord. Thanks for your patience!" msgstr "Wir entschuldigen uns für die Unannehmlichkeiten. Unser Team wurde benachrichtigt und das Problem wird untersucht. Bitte versuchen Sie es in ein paar Minuten noch einmal. Wenn das Problem weiterhin besteht, können Sie uns gerne <0>auf Discord kontaktieren. Danke für Ihre Geduld!" -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsTeamsService.tsx:143 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsTeamsService.tsx:155 msgid "Webhook URL" msgstr "Webhook-URL" @@ -1814,7 +1814,7 @@ msgstr "Wöchentlicher Report" msgid "Within a billing cycle you will be charged for the highest product tier that was active." msgstr "" -#: src/pages/panel/workspace-settings/workspace-alerting-settings/WorkspaceAlertingSettings.tsx:150 +#: src/pages/panel/workspace-settings/workspace-alerting-settings/WorkspaceAlertingSettings.tsx:160 msgid "Workspace Alerting Settings" msgstr "Workspace-Benachrichtigungseinstellungen" @@ -1832,13 +1832,13 @@ msgid "Workspace Name" msgstr "Arbeitsbereichsname" #: src/pages/panel/workspace-settings/WorkspaceSettingsPage.tsx:17 -#: src/shared/layouts/panel-layout/menuList.tsx:62 +#: src/shared/layouts/panel-layout/menuList.tsx:64 #: src/shared/layouts/panel-layout/PanelBreadcrumbs.tsx:10 msgid "Workspace Settings" msgstr "Arbeitsbereichseinstellungen" -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:25 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:47 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:27 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:49 msgid "Workspace Users" msgstr "Workspace-Benutzer" @@ -1857,7 +1857,7 @@ msgstr "" msgid "You are about to change workspace's product tier" msgstr "" -#: src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx:56 +#: src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx:55 msgid "You are currently in your trial period, which will end in {0} days.<0/>During your trial period, you have access to all features of the product." msgstr "Sie befinden sich derzeit in Ihrer Testphase, die in {0} Tagen endet.<0/>In dieser Zeit haben Sie Zugang zu allen Funktionen des Produkts." @@ -1873,15 +1873,23 @@ msgstr "Sie können TOTP über den Wiederherstellungscode deaktivieren" msgid "You don't have access to this workspace" msgstr "" +#: src/shared/disabled-with-permission/DisabledWithPermission.tsx:20 +msgid "You don't have the permission to access this, contact the workspace owner for more information." +msgstr "" + +#: src/shared/disabled-with-permission/DisabledWithPermission.tsx:21 +msgid "You don't have the permission to change this, contact the workspace owner for more information." +msgstr "" + #: src/shared/layouts/panel-layout/UserProfileButton.tsx:147 msgid "You don't have the permission to view this workspace, contact the workspace owner for more information." msgstr "" -#: src/pages/auth/login/LoginPage.tsx:211 +#: src/pages/auth/login/LoginPage.tsx:212 msgid "You have successfully reset your password." msgstr "Sie haben Ihr Passwort erfolgreich zurückgesetzt." -#: src/pages/auth/login/LoginPage.tsx:204 +#: src/pages/auth/login/LoginPage.tsx:205 msgid "You have successfully verified your account." msgstr "Sie haben Ihr Konto erfolgreich verifiziert." @@ -1894,7 +1902,7 @@ msgstr "" msgid "You've chosen to ignore this security check for the resource. Please note:" msgstr "Sie haben sich entschieden, diese Sicherheitsüberprüfung für die Ressource zu ignorieren. Bitte beachten Sie:" -#: src/pages/auth/login/LoginPage.tsx:28 +#: src/pages/auth/login/LoginPage.tsx:29 msgid "Your email address isn't verified yet. Please check your inbox and click on the 'Verify' button to complete the process. Can't find the email? It might be in your spam folder." msgstr "Ihre E-Mail-Adresse ist noch nicht verifiziert. Bitte überprüfen Sie Ihren Posteingang und klicken Sie auf den 'Verifizieren'-Button, um den Prozess abzuschließen. Sie können die E-Mail nicht finden? Möglicherweise befindet sie sich in Ihrem Spam-Ordner." diff --git a/src/locales/en-US/messages.po b/src/locales/en-US/messages.po index 6e4ed47a..5bc2112a 100644 --- a/src/locales/en-US/messages.po +++ b/src/locales/en-US/messages.po @@ -120,19 +120,19 @@ msgstr "<0>Step 1: Scan the QR Code<1>First up, see this QR code on your scr msgid "<0>This search is complex.The combo boxes below may not display all filter details but can help narrow your results. For full control, please use the Advanced tab." msgstr "<0>This search is complex.The combo boxes below may not display all filter details but can help narrow your results. For full control, please use the Advanced tab." -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsEmailService.tsx:81 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsEmailService.tsx:93 msgid "<0>To ensure you receive timely alerts and notifications directly to your email, we require your email address.<1/>Please note that it is possible to define multiple email addresses." msgstr "<0>To ensure you receive timely alerts and notifications directly to your email, we require your email address.<1/>Please note that it is possible to define multiple email addresses." -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsPagerdutyService.tsx:70 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsPagerdutyService.tsx:80 msgid "<0>We use the Events API V2 for notifications through PagerDuty.<1/>To create an integration, please follow these steps:<2><3>Log in to PagerDuty with your account credentials.<4>Navigate to the dashboard and select \"Services\".<5>Choose the service you wish to integrate, go to the \"Integrations\" tab, and then click \"Add Integration\".<6>For the integration type, select \"PagerDuty Events API V2\" and click \"Add\".<7>Provide a name for the integration for easy reference and copy the \"Integration Key\".For more information please visit <8>PagerDuty Services and Integrations" msgstr "<0>We use the Events API V2 for notifications through PagerDuty.<1/>To create an integration, please follow these steps:<2><3>Log in to PagerDuty with your account credentials.<4>Navigate to the dashboard and select \"Services\".<5>Choose the service you wish to integrate, go to the \"Integrations\" tab, and then click \"Add Integration\".<6>For the integration type, select \"PagerDuty Events API V2\" and click \"Add\".<7>Provide a name for the integration for easy reference and copy the \"Integration Key\".For more information please visit <8>PagerDuty Services and Integrations" -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsTeamsService.tsx:81 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsTeamsService.tsx:91 msgid "<0>We utilize incoming webhooks to deliver notifications to your Microsoft Teams channels.<1/>To manually add a webhook:<2><3>In Microsoft Teams, click on More options (⋯) next to the channel name and then select Connectors.<4>Browse through the list of Connectors to find Incoming Webhook, and click Add.<5>Provide a name for the webhook, upload an image to represent data from the webhook, and click Create.<6>Copy the webhook URL to your clipboard and keep it safe. This URL is necessary for TrackJS to send notifications.<7>Click Done.<8>In the text box provided below, paste the Webhook URL you copied and enter the name of the channel.More from <9>Microsoft Teams Documentation" msgstr "<0>We utilize incoming webhooks to deliver notifications to your Microsoft Teams channels.<1/>To manually add a webhook:<2><3>In Microsoft Teams, click on More options (⋯) next to the channel name and then select Connectors.<4>Browse through the list of Connectors to find Incoming Webhook, and click Add.<5>Provide a name for the webhook, upload an image to represent data from the webhook, and click Create.<6>Copy the webhook URL to your clipboard and keep it safe. This URL is necessary for TrackJS to send notifications.<7>Click Done.<8>In the text box provided below, paste the Webhook URL you copied and enter the name of the channel.More from <9>Microsoft Teams Documentation" -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsOpsgenieService.tsx:69 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsOpsgenieService.tsx:79 msgid "<0>We utilize the OpsGenie API integration for notifications and alerts.<1/>To set up this Integration, please follow these instructions:<2><3><4>Navigate to the Dashboard: Find and click on the “Teams” section from the sidebar once logged in.<5><6>Select Your Team: Choose the team you want to integrate with. Within the team dashboard, go to the “Integrations” tab.<7><8>Add Integration: Click on the “+ New Integration” button. Select “API” as the integration type, give it the name “Fix,” and press Continue.<9><10>Turn Integration on: When the Integration has been created, it is disabled by default - click “Turn on Integration”.<11><12>Copy API Key: Find and copy the API Key in the integration settings." msgstr "<0>We utilize the OpsGenie API integration for notifications and alerts.<1/>To set up this Integration, please follow these instructions:<2><3><4>Navigate to the Dashboard: Find and click on the “Teams” section from the sidebar once logged in.<5><6>Select Your Team: Choose the team you want to integrate with. Within the team dashboard, go to the “Integrations” tab.<7><8>Add Integration: Click on the “+ New Integration” button. Select “API” as the integration type, give it the name “Fix,” and press Continue.<9><10>Turn Integration on: When the Integration has been created, it is disabled by default - click “Turn on Integration”.<11><12>Copy API Key: Find and copy the API Key in the integration settings." @@ -164,8 +164,8 @@ msgstr "A few minutes to first results" msgid "Abandoned" msgstr "Abandoned" -#: src/pages/panel/accounts/AccountRow.tsx:237 -#: src/pages/panel/accounts/AccountRow.tsx:355 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:238 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:364 msgid "Access to your account is broken" msgstr "Access to your account is broken" @@ -183,7 +183,7 @@ msgstr "Account: {0}" #: src/pages/panel/inventory/InventoryTable.error.tsx:73 #: src/pages/panel/workspace-settings/WorkspaceSettingsPage.tsx:42 #: src/shared/language-button/LanguageButton.stories.tsx:20 -#: src/shared/layouts/panel-layout/menuList.tsx:68 +#: src/shared/layouts/panel-layout/menuList.tsx:71 #: src/shared/layouts/panel-layout/PanelBreadcrumbs.tsx:12 msgid "Accounts" msgstr "Accounts" @@ -196,8 +196,8 @@ msgstr "Accounts Summary" msgid "Action" msgstr "Action" -#: src/pages/panel/accounts/AccountsTableItem.tsx:66 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:69 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:80 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:74 msgid "Actions" msgstr "Actions" @@ -233,7 +233,7 @@ msgstr "Add Filter" msgid "Add Manually" msgstr "Add Manually" -#: src/pages/panel/accounts/AccountsTable.tsx:26 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTable.tsx:30 msgid "Added accounts" msgstr "Added accounts" @@ -297,7 +297,7 @@ 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/ConfirmChangePaymentModal.tsx:34 -#: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:31 +#: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:32 msgid "An error occurred, please try again later." msgstr "An error occurred, please try again later." @@ -309,7 +309,7 @@ msgstr "and" msgid "API access" msgstr "API access" -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsOpsgenieService.tsx:133 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsOpsgenieService.tsx:143 msgid "API Key" msgstr "API Key" @@ -325,9 +325,9 @@ 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/accounts/AccountRow.tsx:373 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:81 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:102 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:382 +#: 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?" @@ -357,7 +357,7 @@ msgid "Because the data is over {0} Only first {1} items will be downloaded" msgstr "Because the data is over {0} Only first {1} items will be downloaded" #: src/pages/panel/user-settings/UserSettingsNotification.tsx:46 -#: src/pages/panel/workspace-settings/workspace-alerting-settings/WorkspaceAlertingSettings.tsx:154 +#: src/pages/panel/workspace-settings/workspace-alerting-settings/WorkspaceAlertingSettings.tsx:164 msgid "Benchmark" msgstr "Benchmark" @@ -370,9 +370,9 @@ msgstr "Benchmark: {0}" msgid "Benchmarks" msgstr "Benchmarks" -#: src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx:50 +#: src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx:49 #: src/pages/panel/workspace-settings/WorkspaceSettingsPage.tsx:48 -#: src/shared/layouts/panel-layout/menuList.tsx:78 +#: src/shared/layouts/panel-layout/menuList.tsx:81 #: src/shared/layouts/panel-layout/PanelBreadcrumbs.tsx:20 msgid "Billing" msgstr "Billing" @@ -382,7 +382,7 @@ msgstr "Billing" msgid "Billing Admin" msgstr "Billing Admin" -#: src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx:106 +#: src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx:109 msgid "Billing cycle" msgstr "Billing cycle" @@ -394,23 +394,23 @@ msgstr "Billing history" msgid "Business" msgstr "Business" -#: src/pages/panel/accounts/AccountRow.tsx:283 -#: src/pages/panel/accounts/AccountRow.tsx:287 -#: src/pages/panel/accounts/AccountRow.tsx:288 -#: src/pages/panel/accounts/AccountRow.tsx:392 #: 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:284 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:288 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:289 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:401 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:92 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx:150 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx:154 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx:151 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx:155 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:113 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx:156 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:118 #: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsDisconnectServiceModal.tsx:57 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsEmailService.tsx:93 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsOpsgenieService.tsx:101 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsPagerdutyService.tsx:99 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsTeamsService.tsx:111 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsEmailService.tsx:105 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsOpsgenieService.tsx:111 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsPagerdutyService.tsx:109 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsTeamsService.tsx:123 #: src/pages/subscription/choose-workspace/ChooseWorkspacePage.tsx:118 msgid "Cancel" msgstr "Cancel" @@ -455,12 +455,12 @@ msgstr "Clear the search" msgid "Close" msgstr "Close" -#: src/pages/panel/accounts/AccountRow.tsx:412 -#: src/pages/panel/accounts/AccountsTableItem.tsx:41 #: src/pages/panel/inventory/inventory-form/InventoryFormCloudValues.tsx:43 #: src/pages/panel/inventory/inventory-form/InventoryFormMore.tsx:89 #: src/pages/panel/inventory/resource-detail/ResourceDetail.tsx:222 #: src/pages/panel/security/AccountCard.tsx:37 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:421 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:50 msgid "Cloud" msgstr "Cloud" @@ -497,10 +497,10 @@ msgstr "Compliance" msgid "Configuration changed" msgstr "Configuration changed" -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsEmailService.tsx:73 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsOpsgenieService.tsx:61 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsPagerdutyService.tsx:62 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsTeamsService.tsx:74 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsEmailService.tsx:85 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsOpsgenieService.tsx:71 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsPagerdutyService.tsx:72 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsTeamsService.tsx:84 msgid "Configure" msgstr "Configure" @@ -513,28 +513,28 @@ msgid "Congratulations on your subscription" msgstr "Congratulations on your subscription" #: src/pages/panel/user-settings/UserSettingsSocialNetwork.tsx:17 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsDiscordService.tsx:40 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsEmailService.tsx:73 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsEmailService.tsx:104 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsOpsgenieService.tsx:61 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsOpsgenieService.tsx:112 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsPagerdutyService.tsx:62 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsPagerdutyService.tsx:110 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsSlackService.tsx:40 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsTeamsService.tsx:74 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsTeamsService.tsx:122 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsDiscordService.tsx:50 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsEmailService.tsx:85 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsEmailService.tsx:116 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsOpsgenieService.tsx:71 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsOpsgenieService.tsx:122 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsPagerdutyService.tsx:72 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsPagerdutyService.tsx:120 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsSlackService.tsx:50 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsTeamsService.tsx:84 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsTeamsService.tsx:134 msgid "Connect" msgstr "Connect" -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsOpsgenieService.tsx:67 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsOpsgenieService.tsx:77 msgid "Connect Opsgenie" msgstr "Connect Opsgenie" -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsPagerdutyService.tsx:68 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsPagerdutyService.tsx:78 msgid "Connect PagerDuty" msgstr "Connect PagerDuty" -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsTeamsService.tsx:79 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsTeamsService.tsx:89 msgid "Connect Teams" msgstr "Connect Teams" @@ -587,7 +587,7 @@ msgstr "Critical" msgid "Current Product Tier" msgstr "Current Product Tier" -#: src/pages/panel/workspace-settings/workspace-alerting-settings/WorkspaceAlertingSettings.tsx:282 +#: src/pages/panel/workspace-settings/workspace-alerting-settings/WorkspaceAlertingSettings.tsx:300 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." @@ -631,19 +631,19 @@ msgstr "Default Role" msgid "Delayed Effect" msgstr "Delayed Effect" -#: src/pages/panel/accounts/AccountRow.tsx:343 -#: src/pages/panel/accounts/AccountRow.tsx:347 -#: src/pages/panel/accounts/AccountRow.tsx:348 -#: src/pages/panel/accounts/AccountRow.tsx:403 #: src/pages/panel/user-settings/UserSettingsSocialNetworkDeleteButton.tsx:79 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:69 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:351 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:355 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:356 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:412 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:73 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:74 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:77 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:78 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:103 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:90 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:94 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:95 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:124 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:99 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:100 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:129 msgid "Delete" msgstr "Delete" @@ -651,9 +651,9 @@ msgstr "Delete" msgid "Delete Provider" msgstr "Delete Provider" -#: src/pages/panel/accounts/AccountRow.tsx:360 #: 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:369 msgid "Deploy Stack" msgstr "Deploy Stack" @@ -683,7 +683,7 @@ msgstr "Disconnect" msgid "Disconnect Service" msgstr "Disconnect Service" -#: src/pages/panel/accounts/AccountsTable.tsx:33 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTable.tsx:38 msgid "Discovered but unconfigured accounts" msgstr "Discovered but unconfigured accounts" @@ -691,19 +691,19 @@ msgstr "Discovered but unconfigured accounts" msgid "Do not show me again" msgstr "Do not show me again" -#: src/pages/panel/accounts/AccountRow.tsx:376 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:385 msgid "Do you want to delete this account?" msgstr "Do you want to delete this account?" -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:84 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:86 msgid "Do you want to delete this invitation?" msgstr "Do you want to delete this invitation?" -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:105 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:110 msgid "Do you want to delete this user?" msgstr "Do you want to delete this user?" -#: src/pages/auth/login/LoginPage.tsx:231 +#: src/pages/auth/login/LoginPage.tsx:232 msgid "Don't have an account? Click here to Sign up." msgstr "Don't have an account? Click here to Sign up." @@ -717,25 +717,25 @@ msgstr "Downgrade" msgid "Download CSV" msgstr "Download CSV" -#: src/pages/panel/accounts/AccountRow.tsx:299 -#: src/pages/panel/accounts/AccountRow.tsx:300 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx:166 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx:167 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:300 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:301 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx:172 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx:173 msgid "Edit" msgstr "Edit" #: src/pages/auth/forgot-password/ForgotPasswordPage.tsx:62 -#: src/pages/auth/login/LoginPage.tsx:115 +#: src/pages/auth/login/LoginPage.tsx:116 #: src/pages/auth/register/RegisterPage.tsx:89 #: src/pages/panel/user-settings/UserSettingsFormEmail.tsx:49 #: src/pages/panel/user-settings/UserSettingsFormEmail.tsx:69 -#: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:83 -#: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:87 +#: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:86 +#: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:90 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:109 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationsTable.tsx:44 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:130 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:57 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsEmailService.tsx:131 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationsTable.tsx:45 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:135 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:59 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsEmailService.tsx:143 msgid "Email" msgstr "Email" @@ -752,8 +752,8 @@ msgstr "Enable" msgid "Enable all" msgstr "Enable all" -#: src/pages/panel/accounts/AccountsTableItem.tsx:58 #: src/pages/panel/user-settings/UserSettingsNotification.tsx:49 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:69 msgid "Enabled" msgstr "Enabled" @@ -786,7 +786,7 @@ msgid "Example searches" msgstr "Example searches" #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:112 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationsTable.tsx:47 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationsTable.tsx:48 msgid "Expires" msgstr "Expires" @@ -797,7 +797,7 @@ msgid "External Directories" msgstr "External Directories" #: src/pages/panel/setup-cloud/SetupCloudPage.tsx:128 -#: src/pages/panel/workspace-settings/WorkspaceSettingsForm.tsx:55 +#: src/pages/panel/workspace-settings/WorkspaceSettingsForm.tsx:56 msgid "External Id" msgstr "External Id" @@ -857,7 +857,7 @@ msgstr "For growing teams looking to stay secure as they build out infrastructur msgid "For solo software engineers who want to secure a single cloud account." msgstr "For solo software engineers who want to secure a single cloud account." -#: src/pages/auth/login/LoginPage.tsx:236 +#: src/pages/auth/login/LoginPage.tsx:237 msgid "Forget your password? Click here to reset your password." msgstr "Forget your password? Click here to reset your password." @@ -875,7 +875,7 @@ msgstr "Form" msgid "Free" msgstr "Free" -#: src/pages/panel/inventory/inventory-form/InventoryFormFullTextSearchValue.tsx:48 +#: src/pages/panel/inventory/inventory-form/InventoryFormFullTextSearchValue.tsx:42 msgid "Full-text search" msgstr "Full-text search" @@ -887,7 +887,7 @@ msgstr "Get your top 5 recommendations to improve your security once the first s msgid "High" msgstr "High" -#: src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx:113 +#: src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx:116 msgid "Highest product tier this billing cycle" msgstr "Highest product tier this billing cycle" @@ -904,10 +904,10 @@ msgstr "Hourly" msgid "How to fix" msgstr "How to fix" -#: src/pages/panel/accounts/AccountRow.tsx:409 -#: src/pages/panel/accounts/AccountsTableItem.tsx:44 #: src/pages/panel/inventory/resource-detail/ResourceDetail.tsx:219 #: src/pages/panel/security/AccountCard.tsx:34 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:418 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:53 #: src/shared/charts/NetworkDiagram.tsx:406 msgid "ID" msgstr "ID" @@ -985,7 +985,7 @@ msgstr "Instance is terminated" msgid "Integration advice for your specific cloud environment via video call" msgstr "Integration advice for your specific cloud environment via video call" -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsPagerdutyService.tsx:131 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsPagerdutyService.tsx:141 msgid "Integration Key" msgstr "Integration Key" @@ -994,7 +994,7 @@ msgstr "Integration Key" msgid "Invalid Value" msgstr "Invalid Value" -#: src/shared/layouts/panel-layout/menuList.tsx:39 +#: src/shared/layouts/panel-layout/menuList.tsx:40 msgid "Inventory" msgstr "Inventory" @@ -1002,17 +1002,17 @@ msgstr "Inventory" msgid "Inventory search" msgstr "Inventory search" -#: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:51 +#: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:54 msgid "Invite" msgstr "Invite" #: src/pages/panel/workspace-settings-external-directory/AddExternalDirectory.tsx:36 -#: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:51 -#: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:67 +#: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:54 +#: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:70 msgid "Invite External User" msgstr "Invite External User" -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:66 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:70 msgid "Invites" msgstr "Invites" @@ -1029,7 +1029,7 @@ msgstr "Kind" msgid "Kinds" msgstr "Kinds" -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:63 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:67 msgid "Last login" msgstr "Last login" @@ -1037,8 +1037,8 @@ msgstr "Last login" msgid "Load Balancers with no backends" msgstr "Load Balancers with no backends" -#: src/pages/auth/login/LoginPage.tsx:106 -#: src/pages/auth/login/LoginPage.tsx:226 +#: src/pages/auth/login/LoginPage.tsx:107 +#: src/pages/auth/login/LoginPage.tsx:227 msgid "Log in" msgstr "Log in" @@ -1066,11 +1066,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:145 +#: src/pages/panel/workspace-settings-billing/ChangeProductTier.tsx:150 msgid "Manage AWS Market place payment method" msgstr "Manage AWS Market place payment method" -#: src/pages/panel/workspace-settings-billing/ChangeProductTier.tsx:164 +#: src/pages/panel/workspace-settings-billing/ChangeProductTier.tsx:169 msgid "Manage Card Details" msgstr "Manage Card Details" @@ -1088,7 +1088,7 @@ msgid "Member" msgstr "Member" #: src/pages/panel/workspace-settings-billing/utils/productTierToDescription.ts:19 -#: src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx:108 +#: src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx:111 msgid "Monthly" msgstr "Monthly" @@ -1112,20 +1112,20 @@ msgstr "Most Improved Resources" msgid "Most Non-Compliant Accounts" msgstr "Most Non-Compliant Accounts" -#: src/pages/panel/accounts/AccountRow.tsx:415 -#: src/pages/panel/accounts/AccountsTableItem.tsx:47 #: src/pages/panel/inventory/resource-detail/ResourceDetail.tsx:220 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:424 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:56 #: 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:73 -#: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:77 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:133 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:54 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsEmailService.tsx:114 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsOpsgenieService.tsx:122 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsPagerdutyService.tsx:120 -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsTeamsService.tsx:132 +#: 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:56 +#: 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 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsTeamsService.tsx:144 #: src/shared/charts/NetworkDiagram.tsx:407 msgid "Name" msgstr "Name" @@ -1164,11 +1164,11 @@ msgstr "New Product Tier" msgid "New security issues detected" msgstr "New security issues detected" -#: src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx:121 +#: src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx:124 msgid "Next invoice will be available" msgstr "Next invoice will be available" -#: src/pages/panel/accounts/AccountsTableItem.tsx:55 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:64 msgid "Next scan" msgstr "Next scan" @@ -1206,7 +1206,7 @@ msgstr "Node Updated" msgid "Node Vulnerable" msgstr "Node Vulnerable" -#: src/pages/panel/accounts/AccountRow.tsx:379 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:388 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." @@ -1227,11 +1227,11 @@ msgstr "Notification" msgid "Number Of Account Charged" msgstr "Number Of Account Charged" -#: src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx:108 +#: src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx:111 msgid "One time" msgstr "One time" -#: src/pages/auth/login/LoginPage.tsx:26 +#: src/pages/auth/login/LoginPage.tsx:27 msgid "Oops, the username or password doesn't seem to match our records. Please try again." msgstr "Oops, the username or password doesn't seem to match our records. Please try again." @@ -1263,8 +1263,8 @@ msgstr "Opened at" msgid "Optional professional services" msgstr "Optional professional services" -#: src/pages/auth/login/LoginPage.tsx:164 -#: src/pages/auth/login/LoginPage.tsx:241 +#: src/pages/auth/login/LoginPage.tsx:165 +#: src/pages/auth/login/LoginPage.tsx:242 #: src/pages/auth/register/RegisterPage.tsx:136 #: src/pages/panel/user-settings/UserSettingsTotpDeactivationModal.tsx:87 msgid "Or" @@ -1286,7 +1286,7 @@ msgstr "Orphaned Volumes" msgid "Other Workspace Settings" msgstr "Other Workspace Settings" -#: src/pages/auth/login/LoginPage.tsx:147 +#: src/pages/auth/login/LoginPage.tsx:148 #: src/pages/panel/user-settings/UserSettingsTotpActivationModal.tsx:204 #: src/pages/panel/user-settings/UserSettingsTotpDeactivationModal.tsx:73 msgid "OTP Code" @@ -1297,7 +1297,7 @@ msgstr "OTP Code" msgid "Owner" msgstr "Owner" -#: src/pages/auth/login/LoginPage.tsx:130 +#: src/pages/auth/login/LoginPage.tsx:131 #: src/pages/auth/register/RegisterPage.tsx:103 #: src/pages/auth/reset-password/ResetPasswordPage.tsx:96 msgid "Password" @@ -1308,7 +1308,7 @@ msgid "Payment is required for your workspace, Please contact the workspace owne msgstr "Payment is required for your workspace, Please contact the workspace owner" #: src/pages/panel/workspace-settings-billing/ChangeProductTierModal.tsx:131 -#: src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx:74 +#: src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx:73 msgid "Payment method" msgstr "Payment method" @@ -1325,9 +1325,9 @@ msgstr "Payment Method Required" msgid "Payment method to add" msgstr "Payment method to add" -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationsTable.tsx:24 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationsTable.tsx:40 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:29 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationsTable.tsx:25 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationsTable.tsx:41 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:31 #: src/shared/layouts/panel-layout/PanelBreadcrumbs.tsx:18 msgid "Pending Invitations" msgstr "Pending Invitations" @@ -1340,7 +1340,7 @@ msgstr "Pick one of the recommendations to the right and improve your security" msgid "Please add a payment method to switch your workspace's product tier" msgstr "Please add a payment method to switch your workspace's product tier" -#: src/pages/auth/login/LoginPage.tsx:191 +#: src/pages/auth/login/LoginPage.tsx:192 msgid "Please enter your One-Time-Password or one of your Recovery code." msgstr "Please enter your One-Time-Password or one of your Recovery code." @@ -1364,7 +1364,7 @@ msgstr "Print or copy the following recovery codes" msgid "Privileged" msgstr "Privileged" -#: src/pages/panel/accounts/AccountRow.tsx:232 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:233 msgid "Privileged account" msgstr "Privileged account" @@ -1416,11 +1416,11 @@ msgstr "Re-Authenticate" msgid "Receipts" msgstr "Receipts" -#: src/pages/panel/accounts/AccountsTable.tsx:22 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTable.tsx:22 msgid "Recently added accounts" msgstr "Recently added accounts" -#: src/pages/auth/login/LoginPage.tsx:173 +#: src/pages/auth/login/LoginPage.tsx:174 #: src/pages/panel/user-settings/UserSettingsTotpDeactivationModal.tsx:105 msgid "Recovery Code" msgstr "Recovery Code" @@ -1429,7 +1429,7 @@ msgstr "Recovery Code" msgid "Recovery codes" msgstr "Recovery codes" -#: src/pages/panel/workspace-settings/WorkspaceSettingsForm.tsx:56 +#: src/pages/panel/workspace-settings/WorkspaceSettingsForm.tsx:57 msgid "Regenerate" msgstr "Regenerate" @@ -1452,7 +1452,7 @@ msgstr "Register" msgid "Remediation recommendations" msgstr "Remediation recommendations" -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationsTable.tsx:50 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationsTable.tsx:52 msgid "Remove" msgstr "Remove" @@ -1473,7 +1473,7 @@ msgstr "Resource created" msgid "Resource deleted" msgstr "Resource deleted" -#: src/pages/panel/accounts/AccountsTableItem.tsx:50 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:59 msgid "Resources" msgstr "Resources" @@ -1485,10 +1485,10 @@ msgstr "Resources with the string \"delete\"" msgid "Risk" msgstr "Risk" -#: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:93 -#: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:104 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:144 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:60 +#: 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:63 msgid "Roles" msgstr "Roles" @@ -1505,7 +1505,7 @@ msgid "Secure read-only access" msgstr "Secure read-only access" #: src/pages/panel/inventory/InventoryTemplateBoxes.tsx:25 -#: src/shared/layouts/panel-layout/menuList.tsx:54 +#: src/shared/layouts/panel-layout/menuList.tsx:56 msgid "Security" msgstr "Security" @@ -1521,7 +1521,7 @@ msgstr "Security Issues" msgid "Security posture improved" msgstr "Security posture improved" -#: src/pages/panel/accounts/AccountsTableItem.tsx:61 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:72 msgid "Security Scan" msgstr "Security Scan" @@ -1539,11 +1539,11 @@ msgstr "See this Resource in AWS Console" msgid "Select Language" msgstr "Select Language" -#: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:64 +#: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:67 msgid "Send Invite" msgstr "Send Invite" -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsEmailService.tsx:79 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsEmailService.tsx:91 msgid "Setting Up Email Notifications" msgstr "Setting Up Email Notifications" @@ -1554,8 +1554,8 @@ msgstr "Severities" #: src/pages/panel/inventory/inventory-form/InventoryFormSeverity.tsx:50 #: src/pages/panel/inventory/inventory-form/utils/getAutoCompleteFromKey.tsx:150 -#: src/pages/panel/workspace-settings/workspace-alerting-settings/WorkspaceAlertingSettings.tsx:157 -#: src/pages/panel/workspace-settings/workspace-alerting-settings/WorkspaceAlertingSettings.tsx:205 +#: src/pages/panel/workspace-settings/workspace-alerting-settings/WorkspaceAlertingSettings.tsx:167 +#: src/pages/panel/workspace-settings/workspace-alerting-settings/WorkspaceAlertingSettings.tsx:216 msgid "Severity" msgstr "Severity" @@ -1592,16 +1592,16 @@ msgstr "Some checks have been disabled for this resource" msgid "Something went wrong please try again later." msgstr "Something went wrong please try again later." -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:137 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:51 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:142 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:53 msgid "Sources" msgstr "Sources" -#: src/pages/panel/accounts/AccountRow.tsx:272 -#: src/pages/panel/accounts/AccountRow.tsx:273 -#: src/pages/panel/accounts/AccountRow.tsx:278 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx:143 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:273 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:274 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:279 #: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx:144 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx:145 msgid "Submit" msgstr "Submit" @@ -1609,7 +1609,7 @@ msgstr "Submit" msgid "Subscription successfully added to {0}" msgstr "Subscription successfully added to {0}" -#: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:28 +#: src/pages/panel/workspace-settings-users/InviteExternalUser.tsx:29 msgid "Successfully invited {email}" msgstr "Successfully invited {email}" @@ -1631,7 +1631,7 @@ msgstr "Test" msgid "The change will be active from the next security scan onwards. Until the next scan, the resource will still show the failing check." msgstr "The change will be active from the next security scan onwards. Until the next scan, the resource will still show the failing check." -#: src/pages/auth/login/LoginPage.tsx:30 +#: src/pages/auth/login/LoginPage.tsx:31 msgid "The OTP or recovery code you entered is incorrect or the OTP has expired. Please try entering it again." msgstr "The OTP or recovery code you entered is incorrect or the OTP has expired. Please try entering it again." @@ -1651,7 +1651,7 @@ msgstr "The token that you sent is invalid or have been expired please try again msgid "There's no account configured for this workspace." msgstr "There's no account configured for this workspace." -#: src/pages/panel/accounts/AccountRow.tsx:365 +#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:374 msgid "This account is currently in a degraded state possibly due to a misconfiguration. Fix was unable to access the account. To resume security scans, please log into account {accountName} ({0}) and re-deploy the CloudFormation stack that establishes the IAM role trust." msgstr "This account is currently in a degraded state possibly due to a misconfiguration. Fix was unable to access the account. To resume security scans, please log into account {accountName} ({0}) and re-deploy the CloudFormation stack that establishes the IAM role trust." @@ -1772,7 +1772,7 @@ msgstr "User Settings Notification" #: src/pages/panel/workspace-settings-external-directory/WorkspaceSettingsExternalDirectoryPage.tsx:27 #: src/pages/panel/workspace-settings/WorkspaceSettingsPage.tsx:45 -#: src/shared/layouts/panel-layout/menuList.tsx:73 +#: src/shared/layouts/panel-layout/menuList.tsx:76 #: src/shared/layouts/panel-layout/PanelBreadcrumbs.tsx:16 msgid "Users" msgstr "Users" @@ -1786,7 +1786,7 @@ msgstr "Value" msgid "Warning" msgstr "Warning" -#: src/pages/auth/login/LoginPage.tsx:198 +#: src/pages/auth/login/LoginPage.tsx:199 msgid "We have sent an email with a confirmation link to your email address. Please follow the link to activate your account." msgstr "We have sent an email with a confirmation link to your email address. Please follow the link to activate your account." @@ -1798,7 +1798,7 @@ msgstr "We're sad to see you downgrade, but we're grateful to still have you wit msgid "We're sorry for the inconvenience. Our team has been notified, and the issue is being looked into. Please try again in a few minutes. If the problem persists, feel free to contact us <0>on Discord. Thanks for your patience!" msgstr "We're sorry for the inconvenience. Our team has been notified, and the issue is being looked into. Please try again in a few minutes. If the problem persists, feel free to contact us <0>on Discord. Thanks for your patience!" -#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsTeamsService.tsx:143 +#: src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsTeamsService.tsx:155 msgid "Webhook URL" msgstr "Webhook URL" @@ -1814,7 +1814,7 @@ msgstr "Weekly Report" 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." -#: src/pages/panel/workspace-settings/workspace-alerting-settings/WorkspaceAlertingSettings.tsx:150 +#: src/pages/panel/workspace-settings/workspace-alerting-settings/WorkspaceAlertingSettings.tsx:160 msgid "Workspace Alerting Settings" msgstr "Workspace Alerting Settings" @@ -1832,13 +1832,13 @@ msgid "Workspace Name" msgstr "Workspace Name" #: src/pages/panel/workspace-settings/WorkspaceSettingsPage.tsx:17 -#: src/shared/layouts/panel-layout/menuList.tsx:62 +#: src/shared/layouts/panel-layout/menuList.tsx:64 #: src/shared/layouts/panel-layout/PanelBreadcrumbs.tsx:10 msgid "Workspace Settings" msgstr "Workspace Settings" -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:25 -#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:47 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:27 +#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx:49 msgid "Workspace Users" msgstr "Workspace Users" @@ -1857,7 +1857,7 @@ msgstr "You are about to change workspace's payment method" msgid "You are about to change workspace's product tier" msgstr "You are about to change workspace's product tier" -#: src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx:56 +#: src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx:55 msgid "You are currently in your trial period, which will end in {0} days.<0/>During your trial period, you have access to all features of the product." msgstr "You are currently in your trial period, which will end in {0} days.<0/>During your trial period, you have access to all features of the product." @@ -1873,15 +1873,23 @@ msgstr "You can deactivate TOTP via recovery code" msgid "You don't have access to this workspace" msgstr "You don't have access to this workspace" +#: src/shared/disabled-with-permission/DisabledWithPermission.tsx:20 +msgid "You don't have the permission to access this, contact the workspace owner for more information." +msgstr "You don't have the permission to access this, contact the workspace owner for more information." + +#: src/shared/disabled-with-permission/DisabledWithPermission.tsx:21 +msgid "You don't have the permission to change this, contact the workspace owner for more information." +msgstr "You don't have the permission to change this, contact the workspace owner for more information." + #: src/shared/layouts/panel-layout/UserProfileButton.tsx:147 msgid "You don't have the permission to view this workspace, contact the workspace owner for more information." msgstr "You don't have the permission to view this workspace, contact the workspace owner for more information." -#: src/pages/auth/login/LoginPage.tsx:211 +#: src/pages/auth/login/LoginPage.tsx:212 msgid "You have successfully reset your password." msgstr "You have successfully reset your password." -#: src/pages/auth/login/LoginPage.tsx:204 +#: src/pages/auth/login/LoginPage.tsx:205 msgid "You have successfully verified your account." msgstr "You have successfully verified your account." @@ -1894,7 +1902,7 @@ msgstr "You need a payment method to change your product tier" msgid "You've chosen to ignore this security check for the resource. Please note:" msgstr "You've chosen to ignore this security check for the resource. Please note:" -#: src/pages/auth/login/LoginPage.tsx:28 +#: src/pages/auth/login/LoginPage.tsx:29 msgid "Your email address isn't verified yet. Please check your inbox and click on the 'Verify' button to complete the process. Can't find the email? It might be in your spam folder." msgstr "Your email address isn't verified yet. Please check your inbox and click on the 'Verify' button to complete the process. Can't find the email? It might be in your spam folder." diff --git a/src/pages/auth/login/LoginPage.tsx b/src/pages/auth/login/LoginPage.tsx index 0aba02f8..9399dc34 100644 --- a/src/pages/auth/login/LoginPage.tsx +++ b/src/pages/auth/login/LoginPage.tsx @@ -12,6 +12,7 @@ import { ErrorBoundaryFallback, NetworkErrorBoundary } from 'src/shared/error-bo import { LoginSocialMedia } from 'src/shared/login-social-media' import { PasswordTextField } from 'src/shared/password-text-field' import { SocialMediaButtonSkeleton } from 'src/shared/social-media-button' +import { getAuthData } from 'src/shared/utils/localstorage' import { loginMutation } from './login.mutation' const LOGIN_SUSPENSE_NUMBER_OF_SOCIAL_MEDIA_BUTTON = 2 @@ -61,7 +62,7 @@ export default function LoginPage() { isAuthenticated: true, workspaces: [], selectedWorkspace: { - id: returnUrl.split('#')[1], + id: returnUrl.split('#')[1] || (getAuthData()?.selectedWorkspaceId as string), members: [], name: '', owners: [], diff --git a/src/pages/panel/inventory/InventoryTable.tsx b/src/pages/panel/inventory/InventoryTable.tsx index 3b238786..7d8d44b4 100644 --- a/src/pages/panel/inventory/InventoryTable.tsx +++ b/src/pages/panel/inventory/InventoryTable.tsx @@ -149,7 +149,7 @@ export const InventoryTable = ({ searchCrit, history }: InventoryTableProps) => - {value.colDef.headerName ?? value.colDef.field} + {value.colDef?.headerName ?? value.colDef?.field ?? ''} } > @@ -163,7 +163,7 @@ export const InventoryTable = ({ searchCrit, history }: InventoryTableProps) => spacing={1} height={16} > - {(value.colDef.headerName ?? value.colDef.field) + {(value.colDef?.headerName ?? value.colDef?.field ?? '') .split(' ➞ ') .reverse() .map((chunk, i) => ( diff --git a/src/pages/panel/inventory/inventory-form/InventoryForm.tsx b/src/pages/panel/inventory/inventory-form/InventoryForm.tsx index ba8d5e0a..c3e7f76e 100644 --- a/src/pages/panel/inventory/inventory-form/InventoryForm.tsx +++ b/src/pages/panel/inventory/inventory-form/InventoryForm.tsx @@ -169,7 +169,7 @@ export const InventoryForm = () => { [processedStartData, selectedClouds, numberOfCloudFilterSelected, numberOfCloudSelected], ) return ( - + diff --git a/src/pages/panel/inventory/inventory-form/InventoryFormChangesValue.tsx b/src/pages/panel/inventory/inventory-form/InventoryFormChangesValue.tsx index a8940d36..320d8bdb 100644 --- a/src/pages/panel/inventory/inventory-form/InventoryFormChangesValue.tsx +++ b/src/pages/panel/inventory/inventory-form/InventoryFormChangesValue.tsx @@ -41,7 +41,7 @@ export const InventoryFormChangeValue = ({ }: InventoryFormChangeValueProps) => { const options = getOptions() return ( - + Change Type diff --git a/src/pages/panel/inventory/inventory-form/InventoryFormField.tsx b/src/pages/panel/inventory/inventory-form/InventoryFormField.tsx index 527d78c2..7fa699b5 100644 --- a/src/pages/panel/inventory/inventory-form/InventoryFormField.tsx +++ b/src/pages/panel/inventory/inventory-form/InventoryFormField.tsx @@ -25,7 +25,7 @@ export const InventoryFormField = ({ const hasValue = !!(valueStr && valueStr.length) return ( - + - + {label} {hasValue ? ':' : ''} diff --git a/src/pages/panel/inventory/inventory-form/InventoryFormFullTextSearchValue.tsx b/src/pages/panel/inventory/inventory-form/InventoryFormFullTextSearchValue.tsx index 10fb0bfa..ea23d879 100644 --- a/src/pages/panel/inventory/inventory-form/InventoryFormFullTextSearchValue.tsx +++ b/src/pages/panel/inventory/inventory-form/InventoryFormFullTextSearchValue.tsx @@ -29,13 +29,7 @@ export const InventoryFormFullTextSearchValue = ({ onChange, fullTextSearch }: I }, [debouncedValue, onChange]) return ( - create('width') }} - > + create('width') }}> - + setOpen(e.currentTarget)} component={Stack} boxShadow={4} size="small"> diff --git a/src/pages/panel/inventory/inventory-form/InventoryFormReset.tsx b/src/pages/panel/inventory/inventory-form/InventoryFormReset.tsx index 9090b967..df768d60 100644 --- a/src/pages/panel/inventory/inventory-form/InventoryFormReset.tsx +++ b/src/pages/panel/inventory/inventory-form/InventoryFormReset.tsx @@ -6,7 +6,7 @@ import { useFixQueryParser } from 'src/shared/fix-query-parser' export const InventoryFormReset = () => { const { q, reset } = useFixQueryParser() return q && q !== 'all' ? ( - + diff --git a/src/pages/panel/inventory/inventory-form/InventoryFormValue.tsx b/src/pages/panel/inventory/inventory-form/InventoryFormValue.tsx index bcd4b8cc..c543df28 100644 --- a/src/pages/panel/inventory/inventory-form/InventoryFormValue.tsx +++ b/src/pages/panel/inventory/inventory-form/InventoryFormValue.tsx @@ -1,7 +1,6 @@ // import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown' // import ArrowDropUpIcon from '@mui/icons-material/ArrowDropUp' import { - Box, ButtonBase, Chip, Divider, @@ -78,7 +77,7 @@ const InventoryFormValueOp = ({ onChange, op, defaultOp, fqn }: InventoryFormVal return ( <> setOpen(e.currentTarget)} direction="row"> - + {value} {/* {open ? : } */} @@ -106,7 +105,6 @@ const InventoryFormValueOp = ({ onChange, op, defaultOp, fqn }: InventoryFormVal component={Stack} direction="row" justifyContent="space-between" - spacing={1} > {op.toUpperCase()} @@ -146,23 +144,21 @@ const InventoryFormValueValue = ({ return ( <> - setOpen(e.currentTarget)} direction="row" sx={{ pl: 0.5 }}> + setOpen(e.currentTarget)} direction="row" gap={0.5}> {valueStr !== undefined ? ( typeof valueStr === 'string' ? ( - + ) : !valueStr.length ? ( - + [] ) : ( - + <> {valueStr.slice(0, 2).map((item, i) => ( - + ))} - {valueStr.length > 2 ? ( - - ) : null} - + {valueStr.length > 2 ? : null} + ) ) : null} {/* {open ? : } */} @@ -234,7 +230,7 @@ export const InventoryFormValue = ({ }) return ( - + { return ( - - {withChange ? : null} - - - - - - - + + {withChange ? : null} + + + + + + + ) } diff --git a/src/pages/panel/inventory/resource-detail/utils/ResourceDetailChangeLogSelectedHistoryAccordion.tsx b/src/pages/panel/inventory/resource-detail/utils/ResourceDetailChangeLogSelectedHistoryAccordion.tsx index f5737c69..f9a87ada 100644 --- a/src/pages/panel/inventory/resource-detail/utils/ResourceDetailChangeLogSelectedHistoryAccordion.tsx +++ b/src/pages/panel/inventory/resource-detail/utils/ResourceDetailChangeLogSelectedHistoryAccordion.tsx @@ -53,7 +53,7 @@ export const ResourceDetailChangeLogSelectedHistoryAccordion = ({ Benchmarks: - + {(benchmarks ?? data.benchmarks).map((benchmark, i) => ( ))} diff --git a/src/pages/panel/accounts/AccountRow.tsx b/src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx similarity index 86% rename from src/pages/panel/accounts/AccountRow.tsx rename to src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx index 380297ed..5cdd6d21 100644 --- a/src/pages/panel/accounts/AccountRow.tsx +++ b/src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx @@ -34,18 +34,19 @@ import { patchAccountScanDisableMutation } from './patchAccountScanDisable.mutat import { patchAccountScanEnableMutation } from './patchAccountScanEnable.mutation' import { replaceRowByAccount } from './replaceRowByAccount' -interface AccountRowProps { +interface WorkspaceSettingsAccountRowProps { account: Account isNotConfigured?: boolean } -export const AccountRow = ({ account, isNotConfigured }: AccountRowProps) => { +export const WorkspaceSettingsAccountRow = ({ account, isNotConfigured }: WorkspaceSettingsAccountRowProps) => { const inputRef = useRef() const { i18n: { locale }, } = useLingui() const showDeleteModalRef = useRef<(show?: boolean) => void>() const showDegradedModalRef = useRef<(show?: boolean) => void>() - const { selectedWorkspace } = useUserProfile() + const { selectedWorkspace, checkPermission } = useUserProfile() + const hasPermission = checkPermission('updateCloudAccounts') const queryClient = useQueryClient() const { mutate: renameAccount, isPending: renameAccountIsPending } = useMutation({ @@ -245,7 +246,7 @@ export const AccountRow = ({ account, isNotConfigured }: AccountRowProps) => { {account.account_id} - {isEdit ? ( + {isEdit && hasPermission ? ( { )} - ) : ( + ) : hasPermission ? ( setIsEdit(true)} sx={{ cursor: 'pointer' }}> {accountName ?? '-'} @@ -302,55 +303,63 @@ export const AccountRow = ({ account, isNotConfigured }: AccountRowProps) => { + ) : ( + {accountName ?? '-'} )} {account.resources ?? '-'} {isNotConfigured ? null : ( <> {nextScanStr ?? '-'} - - {enableAccountIsPending || disableAccountIsPending ? ( - - - - ) : ( - - )} - - - {enableScanAccountIsPending || disableScanAccountIsPending ? ( - - - - ) : ( - - )} - + {hasPermission ? ( + <> + + {enableAccountIsPending || disableAccountIsPending ? ( + + + + ) : ( + + )} + + + {enableScanAccountIsPending || disableScanAccountIsPending ? ( + + + + ) : ( + + )} + + + ) : null} )} - - {deleteAccountIsPending ? ( - - - - ) : ( - Delete}> - + {hasPermission ? ( + + {deleteAccountIsPending ? ( + - - )} - + ) : ( + Delete}> + + + + + )} + + ) : null} Access to your account is broken} width={550} diff --git a/src/pages/panel/accounts/AccountTableTitle.tsx b/src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountTableTitle.tsx similarity index 77% rename from src/pages/panel/accounts/AccountTableTitle.tsx rename to src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountTableTitle.tsx index 4ae5efa5..f0176c3c 100644 --- a/src/pages/panel/accounts/AccountTableTitle.tsx +++ b/src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountTableTitle.tsx @@ -2,11 +2,11 @@ import { Box, Stack, Typography } from '@mui/material' import { PropsWithChildren } from 'react' import { AddAccountButton } from 'src/shared/add-account-button' -interface AccountTableTitleProps extends PropsWithChildren { +interface WorkspaceSettingsAccountTableTitleProps extends PropsWithChildren { isTop: boolean } -export const AccountTableTitle = ({ isTop, children }: AccountTableTitleProps) => +export const WorkspaceSettingsAccountTableTitle = ({ isTop, children }: WorkspaceSettingsAccountTableTitleProps) => isTop ? ( }> - + ) diff --git a/src/pages/panel/accounts/AccountsTable.tsx b/src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTable.tsx similarity index 70% rename from src/pages/panel/accounts/AccountsTable.tsx rename to src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTable.tsx index 0ad62934..4f1af955 100644 --- a/src/pages/panel/accounts/AccountsTable.tsx +++ b/src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTable.tsx @@ -2,9 +2,9 @@ import { t } from '@lingui/macro' import { useSuspenseQuery } from '@tanstack/react-query' import { useUserProfile } from 'src/core/auth' import { getWorkspaceCloudAccountsQuery } from 'src/pages/panel/shared/queries' -import { AccountsTableItem } from './AccountsTableItem' +import { WorkspaceSettingsAccountsTableItem } from './WorkspaceSettingsAccountsTableItem' -export const AccountsTable = () => { +export const WorkspaceSettingsAccountsTable = () => { const { selectedWorkspace } = useUserProfile() const { data } = useSuspenseQuery({ queryKey: ['workspace-cloud-accounts', selectedWorkspace?.id, false], @@ -15,7 +15,7 @@ export const AccountsTable = () => { typeof data !== 'string' && ( <> {data?.recent.length ? ( - { /> ) : null} {data?.added.length ? ( - + ) : null} {data?.discovered.length ? ( - { +export const WorkspaceSettingsAccountsTableItem = ({ + data, + title, + isTop, + isBottom, + isNotConfigured, +}: WorkspaceSettingsAccountsTableItemProps) => { + const { checkPermission } = useUserProfile() + const hasPermission = checkPermission('updateCloudAccounts') const [page, setPage] = useState(0) const [rowsPerPage, setRowsPerPage] = usePersistState(settingsStorageKeys.AccountsTableItem.rowsPerPage, 5) return ( - {title} + {title} Next scan - - Enabled - - - Security Scan - + {hasPermission ? ( + <> + + Enabled + + + Security Scan + + + ) : null} )} - - Actions - + {hasPermission ? ( + + Actions + + ) : null} {data ?.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage) - .map((account, i) => )} + .map((account, i) => ( + + ))} diff --git a/src/pages/panel/accounts/deleteAccount.mutation.ts b/src/pages/panel/workspace-settings-accounts/deleteAccount.mutation.ts similarity index 100% rename from src/pages/panel/accounts/deleteAccount.mutation.ts rename to src/pages/panel/workspace-settings-accounts/deleteAccount.mutation.ts diff --git a/src/pages/panel/accounts/patchAccount.mutation.ts b/src/pages/panel/workspace-settings-accounts/patchAccount.mutation.ts similarity index 100% rename from src/pages/panel/accounts/patchAccount.mutation.ts rename to src/pages/panel/workspace-settings-accounts/patchAccount.mutation.ts diff --git a/src/pages/panel/accounts/patchAccountDisable.mutation.ts b/src/pages/panel/workspace-settings-accounts/patchAccountDisable.mutation.ts similarity index 100% rename from src/pages/panel/accounts/patchAccountDisable.mutation.ts rename to src/pages/panel/workspace-settings-accounts/patchAccountDisable.mutation.ts diff --git a/src/pages/panel/accounts/patchAccountEnable.mutation.ts b/src/pages/panel/workspace-settings-accounts/patchAccountEnable.mutation.ts similarity index 100% rename from src/pages/panel/accounts/patchAccountEnable.mutation.ts rename to src/pages/panel/workspace-settings-accounts/patchAccountEnable.mutation.ts diff --git a/src/pages/panel/accounts/patchAccountScanDisable.mutation.ts b/src/pages/panel/workspace-settings-accounts/patchAccountScanDisable.mutation.ts similarity index 100% rename from src/pages/panel/accounts/patchAccountScanDisable.mutation.ts rename to src/pages/panel/workspace-settings-accounts/patchAccountScanDisable.mutation.ts diff --git a/src/pages/panel/accounts/patchAccountScanEnable.mutation.ts b/src/pages/panel/workspace-settings-accounts/patchAccountScanEnable.mutation.ts similarity index 100% rename from src/pages/panel/accounts/patchAccountScanEnable.mutation.ts rename to src/pages/panel/workspace-settings-accounts/patchAccountScanEnable.mutation.ts diff --git a/src/pages/panel/accounts/replaceRowByAccount.tsx b/src/pages/panel/workspace-settings-accounts/replaceRowByAccount.tsx similarity index 100% rename from src/pages/panel/accounts/replaceRowByAccount.tsx rename to src/pages/panel/workspace-settings-accounts/replaceRowByAccount.tsx diff --git a/src/pages/panel/workspace-settings-billing/ChangeProductTier.tsx b/src/pages/panel/workspace-settings-billing/ChangeProductTier.tsx index 00358049..2a3bc6b3 100644 --- a/src/pages/panel/workspace-settings-billing/ChangeProductTier.tsx +++ b/src/pages/panel/workspace-settings-billing/ChangeProductTier.tsx @@ -29,7 +29,8 @@ export const ChangeProductTier = ({ workspacePaymentMethods, nextBillingCycle, }: ChangeProductTierProps) => { - const { selectedWorkspace } = useUserProfile() + const { selectedWorkspace, checkPermission } = useUserProfile() + const hasPermission = checkPermission('updateBilling') const tierFromSearchParams = useGetProductTierFromSearchParams() const showModalRef = useRef<(show?: boolean | undefined) => void>() const showNoMethodModalRef = useRef<(show?: boolean | undefined) => void>() @@ -58,7 +59,7 @@ export const ChangeProductTier = ({ return ( {i ? : null} - {selectedProductTier ? ( + {selectedProductTier || !hasPermission ? ( alpha(main, 0.15), + bgcolor: selectedProductTier + ? ({ + palette: { + primary: { main }, + }, + }) => alpha(main, 0.15) + : undefined, borderRadius: 2, - boxShadow: 12, + boxShadow: selectedProductTier ? 12 : undefined, transition: (theme) => theme.transitions.create(['box-shadow', 'background-color']), }} > @@ -90,7 +93,7 @@ export const ChangeProductTier = ({ borderRadius: 2, transition: (theme) => theme.transitions.create(['box-shadow', 'background-color']), }} - onClick={() => setProductTier(curProductTier)} + onClick={hasPermission ? () => setProductTier(curProductTier) : undefined} > @@ -99,78 +102,82 @@ export const ChangeProductTier = ({ ) })} - {isUpgrade !== null ? ( - productTier === 'Free' ? ( - setProductTier(defaultProductTier)} - productTier={defaultProductTier} - showModalRef={showModalRef} - defaultOpen={true} - /> - ) : noWorkspaceMethod ? ( - setProductTier(defaultProductTier)} - /> - ) : ( - setProductTier(defaultProductTier)} - isUpgrade={isUpgrade} - productTier={defaultProductTier} - selectedProductTier={productTier} - selectedWorkspacePaymentMethod={selectedWorkspacePaymentMethod} - showModalRef={showModalRef} - defaultOpen={true} - /> - ) - ) : ( - - {noWorkspaceMethod ? null : ( - <> - - {awsMarketPlacePaymentMethod ? ( - - } - endIcon={null} - loadingPosition="start" - variant="outlined" - href={`${env.aws_marketplace_url}`} - > - - Manage AWS Market place payment method - - + {hasPermission ? ( + <> + {isUpgrade !== null ? ( + productTier === 'Free' ? ( + setProductTier(defaultProductTier)} + productTier={defaultProductTier} + showModalRef={showModalRef} + defaultOpen={true} + /> + ) : noWorkspaceMethod ? ( + setProductTier(defaultProductTier)} + /> + ) : ( + setProductTier(defaultProductTier)} + isUpgrade={isUpgrade} + productTier={defaultProductTier} + selectedProductTier={productTier} + selectedWorkspacePaymentMethod={selectedWorkspacePaymentMethod} + showModalRef={showModalRef} + defaultOpen={true} + /> + ) + ) : ( + + {noWorkspaceMethod ? null : ( + <> + + {awsMarketPlacePaymentMethod ? ( + + } + endIcon={null} + loadingPosition="start" + variant="outlined" + href={`${env.aws_marketplace_url}`} + > + + Manage AWS Market place payment method + + + + ) : null} + {stripePaymentMethod ? ( + + } + endIcon={null} + loadingPosition="start" + sx={{ + maxWidth: '100%', + width: 580, + }} + variant="outlined" + href={`${env.apiUrl}/${endPoints.workspaces.workspace(selectedWorkspace?.id ?? '').subscription.stripe}`} + > + + Manage Card Details + + + + ) : null} - ) : null} - {stripePaymentMethod ? ( - - } - endIcon={null} - loadingPosition="start" - sx={{ - maxWidth: '100%', - width: 580, - }} - variant="outlined" - href={`${env.apiUrl}/${endPoints.workspaces.workspace(selectedWorkspace?.id ?? '').subscription.stripe}`} - > - - Manage Card Details - - - - ) : null} - - + + )} + )} - - )} + + ) : null} ) diff --git a/src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx b/src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx index 8f4c53d5..e16fa6c3 100644 --- a/src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx +++ b/src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx @@ -4,7 +4,6 @@ import { Alert, Divider, MenuItem, Select, SelectChangeEvent, Stack, Typography import { useSuspenseQuery } from '@tanstack/react-query' import { useRef } from 'react' import { useUserProfile } from 'src/core/auth' -import { useHasBillingPermissionCheck } from 'src/shared/layouts/panel-layout' import { PaymentMethodWithoutNone } from 'src/shared/types/server' import { ChangeProductTier } from './ChangeProductTier' import { ConfirmChangePaymentModal } from './ConfirmChangePaymentModal' @@ -16,13 +15,13 @@ export default function WorkspaceSettingsBillingPage() { const { i18n: { locale }, } = useLingui() - const { selectedWorkspace } = useUserProfile() - const hasBillingPermission = useHasBillingPermissionCheck() + const { selectedWorkspace, checkPermission } = useUserProfile() + const hasPermission = checkPermission('updateBilling') const { data: { product_tier, workspace_payment_method, available_payment_methods }, } = useSuspenseQuery({ queryFn: getWorkspaceBillingQuery, - queryKey: ['workspace-billing', hasBillingPermission ? selectedWorkspace?.id : undefined], + queryKey: ['workspace-billing', selectedWorkspace?.id], }) const paymentModalShowRef = useRef<(paymentMethod: PaymentMethodWithoutNone) => void>() const handleOnPaymentMethodChange = (event: SelectChangeEvent<'aws_marketplace' | 'stripe'>) => { @@ -74,30 +73,34 @@ export default function WorkspaceSettingsBillingPage() { Payment method :{' '} - + }} + > + {paymentMethods.map((paymentMethod) => ( + + {paymentMethodToLabel(paymentMethod)} + + ))} + + ) : ( + paymentMethodToLabel(workspace_payment_method.method) + )} ) : null} diff --git a/src/pages/panel/workspace-settings-users/InviteExternalUser.tsx b/src/pages/panel/workspace-settings-users/InviteExternalUser.tsx index b19bdd1c..fe91b4d2 100644 --- a/src/pages/panel/workspace-settings-users/InviteExternalUser.tsx +++ b/src/pages/panel/workspace-settings-users/InviteExternalUser.tsx @@ -15,7 +15,8 @@ interface InviteExternalUserProps { } export const InviteExternalUser = ({ preInvite }: InviteExternalUserProps) => { - const { selectedWorkspace } = useUserProfile() + const { selectedWorkspace, checkPermission } = useUserProfile() + const hasInvitePermission = checkPermission('inviteTo') const queryClient = useQueryClient() const { showSnackbar } = useSnackbar() const [name, setName] = useState(preInvite?.name ?? '') @@ -39,9 +40,11 @@ export const InviteExternalUser = ({ preInvite }: InviteExternalUserProps) => { }) const handleAction = () => { - postWorkspaceInvite({ email, name, roles, workspaceId: selectedWorkspace?.id ?? '' }) + if (hasInvitePermission) { + postWorkspaceInvite({ email, name, roles, workspaceId: selectedWorkspace?.id ?? '' }) + } } - return ( + return hasInvitePermission ? ( <> + {hasDeletePermission ? ( + <> + + {deleteWorkspaceUserIsPending ? ( + + + + ) : ( + Delete}> + + + + )} - } - loading={deleteWorkspaceUserIsPending} - color="error" - variant="outlined" - onClick={handleDelete} - > - Delete - - - } - > - - Email: {workspaceInvite.user_email} - - - Expires: {workspaceInvite.expires_at ? new Date(workspaceInvite.expires_at).toLocaleString(locale) : '-'} - - + + Are you sure?} + description={Do you want to delete this invitation?} + openRef={showDeleteModalRef} + actions={ + <> + {deleteWorkspaceUserIsPending ? null : ( + + )} + } + loading={deleteWorkspaceUserIsPending} + color="error" + variant="outlined" + onClick={handleDelete} + > + Delete + + + } + > + + Email: {workspaceInvite.user_email} + + + Expires: {workspaceInvite.expires_at ? new Date(workspaceInvite.expires_at).toLocaleString(locale) : '-'} + + + + ) : null} ) } diff --git a/src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationsTable.tsx b/src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationsTable.tsx index 662d7f77..c13f85ef 100644 --- a/src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationsTable.tsx +++ b/src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationsTable.tsx @@ -10,7 +10,8 @@ import { WorkspaceSettingsUserInvitationRow } from './WorkspaceSettingsUserInvit import { getWorkspaceInvitesQuery } from './getWorkspaceInvites.query' export const WorkspaceSettingsUserInvitationsTable = () => { - const { selectedWorkspace } = useUserProfile() + const { selectedWorkspace, checkPermission } = useUserProfile() + const hasDeleteInvitePermission = checkPermission('update') const { data } = useSuspenseQuery({ queryKey: ['workspace-invites', selectedWorkspace?.id], queryFn: getWorkspaceInvitesQuery, @@ -46,9 +47,11 @@ export const WorkspaceSettingsUserInvitationsTable = () => { Expires - - Remove - + {hasDeleteInvitePermission ? ( + + Remove + + ) : null} diff --git a/src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx b/src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx index fb47134d..d179ea95 100644 --- a/src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx +++ b/src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx @@ -70,7 +70,8 @@ interface WorkspaceSettingsUserRolesProps { } export const WorkspaceSettingsUserRoles = ({ role, userId }: WorkspaceSettingsUserRolesProps) => { - const { selectedWorkspace } = useUserProfile() + const { selectedWorkspace, checkPermission } = useUserProfile() + const hasUpdateRolesPermission = checkPermission('updateRoles') const [rolesValues, setValues] = useState(userRolesToAutocompleteOptions(role)) const [isEdit, setIsEdit] = useState(false) const queryClient = useQueryClient() @@ -108,7 +109,7 @@ export const WorkspaceSettingsUserRoles = ({ role, userId }: WorkspaceSettingsUs setValues(userRolesToAutocompleteOptions(role)) } - return isEdit ? ( + return isEdit && hasUpdateRolesPermission ? ( ) : ( - + {workspaceSettingsUserRoleToString(role)} - Edit}> - - - - + {hasUpdateRolesPermission ? ( + Edit}> + + + + + ) : undefined} ) } diff --git a/src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx b/src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx index 8caaabfc..7fb95402 100644 --- a/src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx +++ b/src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx @@ -22,7 +22,8 @@ export const WorkspaceSettingsUserRow = ({ workspaceUser }: WorkspaceSettingsUse const { i18n: { locale }, } = useLingui() - const { selectedWorkspace } = useUserProfile() + const { selectedWorkspace, checkPermissions } = useUserProfile() + const [hasRemoveUserPermission, hasReadRolesPermission] = checkPermissions('removeFrom', 'readRoles') const queryClient = useQueryClient() const { mutate: deleteWorkspaceUser, isPending: deleteWorkspaceUserIsPending } = useMutation({ @@ -30,13 +31,13 @@ export const WorkspaceSettingsUserRow = ({ workspaceUser }: WorkspaceSettingsUse }) const handleDeleteModal = () => { - if (showDeleteModalRef.current) { + if (showDeleteModalRef.current && hasRemoveUserPermission) { showDeleteModalRef.current() } } const handleDelete = () => { - if (selectedWorkspace?.id) { + if (selectedWorkspace?.id && hasRemoveUserPermission) { deleteWorkspaceUser( { workspaceId: selectedWorkspace.id, userId: workspaceUser.id }, { @@ -80,70 +81,76 @@ export const WorkspaceSettingsUserRow = ({ workspaceUser }: WorkspaceSettingsUse {workspaceUser.name || '-'} {workspaceUser.email || '-'} - - - + {hasReadRolesPermission ? ( + + + + ) : null} {workspaceUser.last_login ? new Date(workspaceUser.last_login).toLocaleString(locale) : '-'} - - - {deleteWorkspaceUserIsPending ? ( - - - - ) : ( - Delete}> - - - - - )} - - Are you sure?} - description={ - <> - Do you want to delete this user? - - } - openRef={showDeleteModalRef} - actions={ - <> - {deleteWorkspaceUserIsPending ? null : ( - + {hasRemoveUserPermission ? ( + <> + + {deleteWorkspaceUserIsPending ? ( + + + + ) : ( + Delete}> + + + + )} - } - loading={deleteWorkspaceUserIsPending} - color="error" - variant="outlined" - onClick={handleDelete} - > - Delete - - - } - > - - Email: {workspaceUser.email} - - - Name: {workspaceUser.name} - - - - Sources:{' '} - - {workspaceUser.sources.map(({ source }, i) => ( - - ))} - - - Roles: {workspaceSettingsUserRoleToString(workspaceUser.roles)} - - + + Are you sure?} + description={ + <> + Do you want to delete this user? + + } + openRef={showDeleteModalRef} + actions={ + <> + {deleteWorkspaceUserIsPending ? null : ( + + )} + } + loading={deleteWorkspaceUserIsPending} + color="error" + variant="outlined" + onClick={handleDelete} + > + Delete + + + } + > + + Email: {workspaceUser.email} + + + Name: {workspaceUser.name} + + + + Sources:{' '} + + {workspaceUser.sources.map(({ source }, i) => ( + + ))} + + + Roles: {workspaceSettingsUserRoleToString(workspaceUser.roles)} + + + + ) : null} ) } diff --git a/src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx b/src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx index 6ba4d284..c70fd757 100644 --- a/src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx +++ b/src/pages/panel/workspace-settings-users/WorkspaceSettingsUsersTable.tsx @@ -5,13 +5,15 @@ import { useState } from 'react' import { useUserProfile } from 'src/core/auth' import { panelUI, settingsStorageKeys } from 'src/shared/constants' import { TableView } from 'src/shared/layouts/panel-layout' +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 } = useUserProfile() + const { selectedWorkspace, checkPermissions } = useUserProfile() + const [hasInvitePermission, hasRemoveUserPermission, hasReadRolesPermission] = checkPermissions('inviteTo', 'removeFrom', 'readRoles') const { data } = useSuspenseQuery({ queryKey: ['workspace-users', selectedWorkspace?.id], queryFn: getWorkspaceUsersQuery, @@ -25,10 +27,10 @@ export const WorkspaceSettingsUsersTable = () => { Workspace Users - - + {hasInvitePermission ? : null} { Email - - Roles - + {hasReadRolesPermission ? ( + + Roles + + ) : null} Last login Invites - - Actions - + {hasRemoveUserPermission ? ( + + Actions + + ) : null} diff --git a/src/pages/panel/workspace-settings/WorkspaceSettingsForm.tsx b/src/pages/panel/workspace-settings/WorkspaceSettingsForm.tsx index abba6acb..857b0746 100644 --- a/src/pages/panel/workspace-settings/WorkspaceSettingsForm.tsx +++ b/src/pages/panel/workspace-settings/WorkspaceSettingsForm.tsx @@ -50,6 +50,7 @@ export const WorkspaceSettingsForm = () => { onSubmit={(id) => void copyString(id)} readonly value={data?.id ?? ''} + noDisabledPermission /> External Id} diff --git a/src/pages/panel/workspace-settings/WorkspaceSettingsFormItem.tsx b/src/pages/panel/workspace-settings/WorkspaceSettingsFormItem.tsx index 89fdb098..ecc24295 100644 --- a/src/pages/panel/workspace-settings/WorkspaceSettingsFormItem.tsx +++ b/src/pages/panel/workspace-settings/WorkspaceSettingsFormItem.tsx @@ -1,6 +1,8 @@ import { LoadingButton } from '@mui/lab' import { Button, Skeleton, Stack, TextField, Typography } from '@mui/material' import { FormEvent, MutableRefObject, ReactNode, useEffect, useRef, useState } from 'react' +import { useUserProfile } from 'src/core/auth' +import { DisabledWithPermission } from 'src/shared/disabled-with-permission' interface WorkspaceSettingsFormItemProps { label: ReactNode @@ -12,6 +14,7 @@ interface WorkspaceSettingsFormItemProps { readonly?: boolean hide?: boolean focusedRef?: MutableRefObject<((focused: boolean) => void) | undefined> + noDisabledPermission?: boolean } export const WorkspaceSettingsFormItem = ({ @@ -24,7 +27,10 @@ export const WorkspaceSettingsFormItem = ({ buttonName, hide, focusedRef, + noDisabledPermission, }: WorkspaceSettingsFormItemProps) => { + const { checkPermission } = useUserProfile() + const hasUpdateSettingsPermission = checkPermission('updateSettings') const [inputValue, setInputValue] = useState(value) const [focused, setFocused] = useState(false) @@ -88,7 +94,7 @@ export const WorkspaceSettingsFormItem = ({ > {label} - {readonly ? ( + {readonly || !hasUpdateSettingsPermission ? ( )} - onSubmit(inputValue) : undefined} - disabled={!readonly && inputValue === value} - loading={isPending} - > - {buttonName} - + {noDisabledPermission ? ( + onSubmit(inputValue) : undefined} + disabled={(!noDisabledPermission && !hasUpdateSettingsPermission) || (!readonly && inputValue === value)} + loading={isPending} + > + {buttonName} + + ) : ( + + onSubmit(inputValue) : undefined} + disabled={!hasUpdateSettingsPermission || (!readonly && inputValue === value)} + loading={isPending} + > + {buttonName} + + + )} ) } diff --git a/src/pages/panel/workspace-settings/workspace-alerting-settings/WorkspaceAlertingSettings.tsx b/src/pages/panel/workspace-settings/workspace-alerting-settings/WorkspaceAlertingSettings.tsx index 8324fa52..62584c49 100644 --- a/src/pages/panel/workspace-settings/workspace-alerting-settings/WorkspaceAlertingSettings.tsx +++ b/src/pages/panel/workspace-settings/workspace-alerting-settings/WorkspaceAlertingSettings.tsx @@ -22,6 +22,7 @@ import { useEffect, useRef } from 'react' import { useUserProfile } from 'src/core/auth' import { getWorkspaceNotificationsQuery } from 'src/pages/panel/shared/queries' import { getColorBySeverity } from 'src/pages/panel/shared/utils' +import { DisabledWithPermission } from 'src/shared/disabled-with-permission' import { LoadingSuspenseFallback } from 'src/shared/loading' import { NotificationChannel, SeverityType } from 'src/shared/types/server' import { snakeCaseWordsToUFStr } from 'src/shared/utils/snakeCaseToUFStr' @@ -42,20 +43,29 @@ interface WorkspaceAlertingSettingsCheckboxProps { isPending: boolean name: NotificationChannel onChange: (benchmark: string, name: NotificationChannel, checked: boolean) => void + disabled: boolean } -const WorkspaceAlertingSettingsCheckbox = ({ benchmark, checked, isPending, name, onChange }: WorkspaceAlertingSettingsCheckboxProps) => { +const WorkspaceAlertingSettingsCheckbox = ({ + benchmark, + checked, + isPending, + name, + onChange, + disabled, +}: WorkspaceAlertingSettingsCheckboxProps) => { return isPending ? ( ) : ( - onChange(benchmark, name, e.target.checked)} /> + onChange(benchmark, name, e.target.checked)} disabled={disabled} /> ) } export const WorkspaceAlertingSettings = () => { - const { selectedWorkspace } = useUserProfile() + const { selectedWorkspace, checkPermission } = useUserProfile() + const hasPermission = checkPermission('updateSettings') const [ { data: reportInfo, isLoading: isReportInfoLoading }, { data: alertingSettings, isLoading: isAlertingSettingsLoading }, @@ -169,41 +179,43 @@ export const WorkspaceAlertingSettings = () => { {snakeCaseWordsToUFStr(benchmark)} - - option ? ( - + + option ? ( + - {option.label} - - ) : ( - '' - ) - } - isOptionEqualToValue={(option, value) => option.value === value.value} - disablePortal - disableClearable - fullWidth - onChange={(_, severity) => handleSelectedSeverity(severity.value, benchmark)} - defaultValue={severityOptions.find((i) => i.value === alertingSettings?.[benchmark]?.severity) ?? severityOptions[3]} - renderInput={(params) => Severity} />} - > + }} + > + {option.label} + + ) : ( + '' + ) + } + isOptionEqualToValue={(option, value) => option.value === value.value} + disablePortal + disableClearable + fullWidth + onChange={(_, severity) => handleSelectedSeverity(severity.value, benchmark)} + defaultValue={severityOptions.find((i) => i.value === alertingSettings?.[benchmark]?.severity) ?? severityOptions[3]} + renderInput={(params) => Severity} />} + /> + {notifications?.email ? ( @@ -213,6 +225,7 @@ export const WorkspaceAlertingSettings = () => { isPending={isPending} name="email" onChange={handleCheckboxChange} + disabled={!hasPermission} /> ) : undefined} @@ -224,6 +237,7 @@ export const WorkspaceAlertingSettings = () => { isPending={isPending} name="slack" onChange={handleCheckboxChange} + disabled={!hasPermission} /> ) : undefined} @@ -235,6 +249,7 @@ export const WorkspaceAlertingSettings = () => { isPending={isPending} name="teams" onChange={handleCheckboxChange} + disabled={!hasPermission} /> ) : undefined} @@ -246,6 +261,7 @@ export const WorkspaceAlertingSettings = () => { isPending={isPending} name="discord" onChange={handleCheckboxChange} + disabled={!hasPermission} /> ) : undefined} @@ -257,6 +273,7 @@ export const WorkspaceAlertingSettings = () => { isPending={isPending} name="pagerduty" onChange={handleCheckboxChange} + disabled={!hasPermission} /> ) : undefined} @@ -268,6 +285,7 @@ export const WorkspaceAlertingSettings = () => { isPending={isPending} name="opsgenie" onChange={handleCheckboxChange} + disabled={!hasPermission} /> ) : undefined} diff --git a/src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsDiscordService.tsx b/src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsDiscordService.tsx index 2bbeace3..f77af830 100644 --- a/src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsDiscordService.tsx +++ b/src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsDiscordService.tsx @@ -14,32 +14,43 @@ interface WorkspaceSettingsDiscordServiceProps { } export const WorkspaceSettingsDiscordService = ({ isConnected, isLoading }: WorkspaceSettingsDiscordServiceProps) => { - const { selectedWorkspace } = useUserProfile() + const { selectedWorkspace, checkPermission } = useUserProfile() + const hasPermission = checkPermission('updateSettings') + const theme = useTheme() - return ( - + return hasPermission || isConnected ? ( + - {isConnected ? ( - <> - - - - ) : ( - } - href={endPoints.workspaces.workspace(selectedWorkspace?.id ?? '').notification.add('discord')} - loading={isLoading} - variant="contained" - color="primary" - sx={{ flexShrink: 0 }} - disabled={!selectedWorkspace?.id} - > - Connect - - )} + {hasPermission ? ( + isConnected ? ( + <> + + + + ) : ( + } + href={endPoints.workspaces.workspace(selectedWorkspace?.id ?? '').notification.add('discord')} + loading={isLoading} + variant="contained" + color="primary" + sx={{ flexShrink: 0 }} + disabled={!selectedWorkspace?.id} + > + Connect + + ) + ) : null} - ) + ) : null } diff --git a/src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsEmailService.tsx b/src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsEmailService.tsx index b307bc35..d0484400 100644 --- a/src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsEmailService.tsx +++ b/src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsEmailService.tsx @@ -25,7 +25,8 @@ export const WorkspaceSettingsEmailService = ({ defaultName, isLoading, }: WorkspaceSettingsEmailServiceProps) => { - const { selectedWorkspace } = useUserProfile() + const { selectedWorkspace, checkPermission } = useUserProfile() + const hasPermission = checkPermission('updateSettings') const { mutate, isPending } = useMutation({ mutationFn: putWorkspaceNotificationAddMutation }) const [typedEmail, setTypedEmail] = useState('') const [email, setEmail] = useState(defaultEmail ?? []) @@ -53,92 +54,105 @@ export const WorkspaceSettingsEmailService = ({ }, ) } - return ( - + return hasPermission || isConnected ? ( + - + - Email + + Email + - {isConnected ? : null} - : } - loading={isLoading} - variant="contained" - sx={{ flexShrink: 0 }} - onClick={() => modalRef.current?.(true)} - > - {isConnected ? Configure : Connect} - - {isConnected ? : null} - Setting Up Email Notifications} - description={ - - - To ensure you receive timely alerts and notifications directly to your email, we require your email address. -
- Please note that it is possible to define multiple email addresses. -
-
- } - actions={ - <> - {isPending ? null : ( - - )} - } - loading={isPending} - variant="contained" - type="submit" - disabled={!name || !email.length} - > - Connect - - - } - > - - setName(e.target.value ?? '')} - /> - ( + {hasPermission ? ( + <> + {isConnected ? : null} + : } + loading={isLoading} + variant="contained" + sx={{ flexShrink: 0 }} + onClick={() => modalRef.current?.(true)} + > + {isConnected ? Configure : Connect} + + {isConnected ? : null} + Setting Up Email Notifications} + description={ + + + To ensure you receive timely alerts and notifications directly to your email, we require your email address. +
+ Please note that it is possible to define multiple email addresses. +
+
+ } + actions={ + <> + {isPending ? null : ( + + )} + } + loading={isPending} + variant="contained" + type="submit" + disabled={!name || !email.length} + > + Connect + + + } + > + setTypedEmail(e.target.value)} + fullWidth + type="text" + value={name} + onChange={(e) => setName(e.target.value ?? '')} /> - )} - onChange={(_, values) => setEmail(values)} - /> - -
+ ( + setTypedEmail(e.target.value)} + /> + )} + onChange={(_, values) => setEmail(values)} + /> +
+
+ + ) : null}
- ) + ) : null } diff --git a/src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsOpsgenieService.tsx b/src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsOpsgenieService.tsx index 3f36bb61..c53ff815 100644 --- a/src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsOpsgenieService.tsx +++ b/src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsOpsgenieService.tsx @@ -20,7 +20,8 @@ interface WorkspaceSettingsOpsgenieServiceProps { export const WorkspaceSettingsOpsgenieService = ({ isConnected, defaultName, isLoading }: WorkspaceSettingsOpsgenieServiceProps) => { const theme = useTheme() - const { selectedWorkspace } = useUserProfile() + const { selectedWorkspace, checkPermission } = useUserProfile() + const hasPermission = checkPermission('updateSettings') const { mutate, isPending } = useMutation({ mutationFn: putWorkspaceNotificationAddMutation }) const [apiKey, setApiKey] = useState('') const [name, setName] = useState(defaultName ?? 'Opsgenie Integration') @@ -44,102 +45,113 @@ export const WorkspaceSettingsOpsgenieService = ({ isConnected, defaultName, isL }, ) } - return ( - + return hasPermission || isConnected ? ( + - {isConnected ? : null} - : } - loading={isLoading} - variant="contained" - sx={{ flexShrink: 0 }} - onClick={() => modalRef.current?.(true)} - > - {isConnected ? Configure : Connect} - - {isConnected ? : null} - Connect Opsgenie} - description={ - - - We utilize the OpsGenie API integration for notifications and alerts. -
- To set up this Integration, please follow these instructions: -
    -
  1. - Navigate to the Dashboard: Find and click on the “Teams” section from the sidebar once logged in. -
  2. -
  3. - Select Your Team: Choose the team you want to integrate with. Within the team dashboard, go to the - “Integrations” tab. -
  4. -
  5. - Add Integration: Click on the “+ New Integration” button. Select “API” as the integration type, give it - the name “Fix,” and press Continue. -
  6. -
  7. - Turn Integration on: When the Integration has been created, it is disabled by default - click “Turn on - Integration”. -
  8. -
  9. - Copy API Key: Find and copy the API Key in the integration settings. -
  10. -
-
-
- } - actions={ - <> - {isPending ? null : ( - - )} - } - loading={isPending} - variant="contained" - type="submit" - disabled={!name || !apiKey} - > - Connect - - - } - > - - setName(e.target.value ?? '')} - /> - setApiKey(e.target.value ?? '')} - autoFocus - /> - -
+ {hasPermission ? ( + <> + {isConnected ? : null} + : } + loading={isLoading} + variant="contained" + sx={{ flexShrink: 0 }} + onClick={() => modalRef.current?.(true)} + > + {isConnected ? Configure : Connect} + + {isConnected ? : null} + Connect Opsgenie} + description={ + + + We utilize the OpsGenie API integration for notifications and alerts. +
+ To set up this Integration, please follow these instructions: +
    +
  1. + Navigate to the Dashboard: Find and click on the “Teams” section from the sidebar once logged in. +
  2. +
  3. + Select Your Team: Choose the team you want to integrate with. Within the team dashboard, go to the + “Integrations” tab. +
  4. +
  5. + Add Integration: Click on the “+ New Integration” button. Select “API” as the integration type, give + it the name “Fix,” and press Continue. +
  6. +
  7. + Turn Integration on: When the Integration has been created, it is disabled by default - click “Turn + on Integration”. +
  8. +
  9. + Copy API Key: Find and copy the API Key in the integration settings. +
  10. +
+
+
+ } + actions={ + <> + {isPending ? null : ( + + )} + } + loading={isPending} + variant="contained" + type="submit" + disabled={!name || !apiKey} + > + Connect + + + } + > + + setName(e.target.value ?? '')} + /> + setApiKey(e.target.value ?? '')} + autoFocus + /> + +
+ + ) : null}
- ) + ) : null } diff --git a/src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsPagerdutyService.tsx b/src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsPagerdutyService.tsx index 7023c315..ad827ec6 100644 --- a/src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsPagerdutyService.tsx +++ b/src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsPagerdutyService.tsx @@ -21,7 +21,8 @@ interface WorkspaceSettingsPagerdutyServiceProps { export const WorkspaceSettingsPagerdutyService = ({ isConnected, defaultName, isLoading }: WorkspaceSettingsPagerdutyServiceProps) => { const theme = useTheme() - const { selectedWorkspace } = useUserProfile() + const { selectedWorkspace, checkPermission } = useUserProfile() + const hasPermission = checkPermission('updateSettings') const { mutate, isPending } = useMutation({ mutationFn: putWorkspaceNotificationAddMutation }) const [integrationKey, setIntegrationKey] = useState('') const [name, setName] = useState(defaultName ?? 'Pagerduty Integration') @@ -45,98 +46,109 @@ export const WorkspaceSettingsPagerdutyService = ({ isConnected, defaultName, is }, ) } - return ( - + return hasPermission || isConnected ? ( + - {isConnected ? : null} - : } - loading={isLoading} - variant="contained" - sx={{ flexShrink: 0 }} - onClick={() => modalRef.current?.(true)} - > - {isConnected ? Configure : Connect} - - {isConnected ? : null} - Connect PagerDuty} - description={ - - - We use the Events API V2 for notifications through PagerDuty. -
- To create an integration, please follow these steps: -
    -
  1. Log in to PagerDuty with your account credentials.
  2. -
  3. Navigate to the dashboard and select "Services".
  4. -
  5. Choose the service you wish to integrate, go to the "Integrations" tab, and then click "Add Integration".
  6. -
  7. For the integration type, select "PagerDuty Events API V2" and click "Add".
  8. -
  9. Provide a name for the integration for easy reference and copy the "Integration Key".
  10. -
- For more information please visit{' '} - -
-
- } - actions={ - <> - {isPending ? null : ( - - )} - } - loading={isPending} - variant="contained" - type="submit" - disabled={!name || !integrationKey} - > - Connect - - - } - > - - setName(e.target.value ?? '')} - /> - setIntegrationKey(e.target.value ?? '')} - /> - -
+ {hasPermission ? ( + <> + {isConnected ? : null} + : } + loading={isLoading} + variant="contained" + sx={{ flexShrink: 0 }} + onClick={() => modalRef.current?.(true)} + > + {isConnected ? Configure : Connect} + + {isConnected ? : null} + Connect PagerDuty} + description={ + + + We use the Events API V2 for notifications through PagerDuty. +
+ To create an integration, please follow these steps: +
    +
  1. Log in to PagerDuty with your account credentials.
  2. +
  3. Navigate to the dashboard and select "Services".
  4. +
  5. Choose the service you wish to integrate, go to the "Integrations" tab, and then click "Add Integration".
  6. +
  7. For the integration type, select "PagerDuty Events API V2" and click "Add".
  8. +
  9. Provide a name for the integration for easy reference and copy the "Integration Key".
  10. +
+ For more information please visit{' '} + +
+
+ } + actions={ + <> + {isPending ? null : ( + + )} + } + loading={isPending} + variant="contained" + type="submit" + disabled={!name || !integrationKey} + > + Connect + + + } + > + + setName(e.target.value ?? '')} + /> + setIntegrationKey(e.target.value ?? '')} + /> + +
+ + ) : null}
- ) + ) : null } diff --git a/src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsSlackService.tsx b/src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsSlackService.tsx index ba10f38f..5e7af3db 100644 --- a/src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsSlackService.tsx +++ b/src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsSlackService.tsx @@ -14,32 +14,43 @@ interface WorkspaceSettingsSlackServiceProps { } export const WorkspaceSettingsSlackService = ({ isConnected, isLoading }: WorkspaceSettingsSlackServiceProps) => { - const { selectedWorkspace } = useUserProfile() + const { selectedWorkspace, checkPermission } = useUserProfile() + const hasPermission = checkPermission('updateSettings') + const theme = useTheme() - return ( - + return hasPermission || isConnected ? ( + - {isConnected ? ( - <> - - - - ) : ( - } - href={endPoints.workspaces.workspace(selectedWorkspace?.id ?? '').notification.add('slack')} - loading={isLoading} - variant="contained" - color="primary" - sx={{ flexShrink: 0 }} - disabled={!selectedWorkspace?.id} - > - Connect - - )} + {hasPermission ? ( + isConnected ? ( + <> + + + + ) : ( + } + href={endPoints.workspaces.workspace(selectedWorkspace?.id ?? '').notification.add('slack')} + loading={isLoading} + variant="contained" + color="primary" + sx={{ flexShrink: 0 }} + disabled={!selectedWorkspace?.id} + > + Connect + + ) + ) : null} - ) + ) : null } diff --git a/src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsTeamsService.tsx b/src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsTeamsService.tsx index 74fb7e65..b1db3117 100644 --- a/src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsTeamsService.tsx +++ b/src/pages/panel/workspace-settings/workspace-settings-services/WorkspaceSettingsTeamsService.tsx @@ -25,7 +25,8 @@ export const WorkspaceSettingsTeamsService = ({ isConnected, defaultName, isLoad const { i18n: { locale }, } = useLingui() - const { selectedWorkspace } = useUserProfile() + const { selectedWorkspace, checkPermission } = useUserProfile() + const hasPermission = checkPermission('updateSettings') const { mutate, isPending } = useMutation({ mutationFn: putWorkspaceNotificationAddMutation }) const [webhookUrl, setWebhookUrl] = useState('') const [name, setName] = useState(defaultName ?? 'Teams Integration') @@ -49,106 +50,119 @@ export const WorkspaceSettingsTeamsService = ({ isConnected, defaultName, isLoad }, ) } - return ( - + return hasPermission || isConnected ? ( + Teams - {isConnected ? ( + {hasPermission ? ( <> - - + {isConnected ? ( + <> + + + + ) : null} + : } + loading={isLoading} + variant="contained" + sx={{ flexShrink: 0 }} + onClick={() => modalRef.current?.(true)} + > + {isConnected ? Configure : Connect} + + Connect Teams} + description={ + + + We utilize incoming webhooks to deliver notifications to your Microsoft Teams channels. +
+ To manually add a webhook: +
    +
  1. In Microsoft Teams, click on More options (⋯) next to the channel name and then select Connectors.
  2. +
  3. Browse through the list of Connectors to find Incoming Webhook, and click Add.
  4. +
  5. Provide a name for the webhook, upload an image to represent data from the webhook, and click Create.
  6. +
  7. + Copy the webhook URL to your clipboard and keep it safe. This URL is necessary for TrackJS to send notifications. +
  8. +
  9. Click Done.
  10. +
  11. In the text box provided below, paste the Webhook URL you copied and enter the name of the channel.
  12. +
+ More from{' '} + +
+
+ } + actions={ + <> + {isPending ? null : ( + + )} + } + loading={isPending} + variant="contained" + type="submit" + disabled={!name || !webhookUrl} + > + Connect + + + } + > + + setName(e.target.value ?? '')} + /> + setWebhookUrl(e.target.value ?? '')} + /> + +
) : null} - : } - loading={isLoading} - variant="contained" - sx={{ flexShrink: 0 }} - onClick={() => modalRef.current?.(true)} - > - {isConnected ? Configure : Connect} - - Connect Teams} - description={ - - - We utilize incoming webhooks to deliver notifications to your Microsoft Teams channels. -
- To manually add a webhook: -
    -
  1. In Microsoft Teams, click on More options (⋯) next to the channel name and then select Connectors.
  2. -
  3. Browse through the list of Connectors to find Incoming Webhook, and click Add.
  4. -
  5. Provide a name for the webhook, upload an image to represent data from the webhook, and click Create.
  6. -
  7. Copy the webhook URL to your clipboard and keep it safe. This URL is necessary for TrackJS to send notifications.
  8. -
  9. Click Done.
  10. -
  11. In the text box provided below, paste the Webhook URL you copied and enter the name of the channel.
  12. -
- More from{' '} - -
-
- } - actions={ - <> - {isPending ? null : ( - - )} - } - loading={isPending} - variant="contained" - type="submit" - disabled={!name || !webhookUrl} - > - Connect - - - } - > - - setName(e.target.value ?? '')} - /> - setWebhookUrl(e.target.value ?? '')} - /> - -
- ) + ) : null } diff --git a/src/shared/disabled-with-permission/DisabledWithPermission.tsx b/src/shared/disabled-with-permission/DisabledWithPermission.tsx new file mode 100644 index 00000000..1e693d20 --- /dev/null +++ b/src/shared/disabled-with-permission/DisabledWithPermission.tsx @@ -0,0 +1,34 @@ +import { t } from '@lingui/macro' +import WarningIcon from '@mui/icons-material/Warning' +import { Badge, BadgeProps, Tooltip, TooltipProps } from '@mui/material' +import { PropsWithChildren, ReactNode } from 'react' + +interface DisabledWithPermissionProps extends PropsWithChildren> { + title?: ReactNode + access?: boolean + hasPermission: boolean + badgeProps?: BadgeProps +} + +export const DisabledWithPermission = ({ hasPermission, access, title, children, badgeProps, ...props }: DisabledWithPermissionProps) => { + return hasPermission ? ( + children + ) : children ? ( + + } + anchorOrigin={{ horizontal: 'left', vertical: 'top' }} + {...badgeProps} + > + {children} + + + ) : null +} diff --git a/src/shared/disabled-with-permission/index.ts b/src/shared/disabled-with-permission/index.ts new file mode 100644 index 00000000..4402123d --- /dev/null +++ b/src/shared/disabled-with-permission/index.ts @@ -0,0 +1 @@ +export { DisabledWithPermission } from './DisabledWithPermission' diff --git a/src/shared/layouts/panel-layout/DrawerMenu.tsx b/src/shared/layouts/panel-layout/DrawerMenu.tsx index e7d07bc5..7fb55ba1 100644 --- a/src/shared/layouts/panel-layout/DrawerMenu.tsx +++ b/src/shared/layouts/panel-layout/DrawerMenu.tsx @@ -13,12 +13,14 @@ import { ListItemText, Modal, Tooltip, + badgeClasses, } from '@mui/material' import { MouseEvent as ReactMouseEvent, useEffect, useState } from 'react' import { ErrorBoundary } from 'react-error-boundary' import { useMatch, useSearchParams } from 'react-router-dom' import { useAbsoluteNavigate } from 'src/shared/absolute-navigate' import { panelUI } from 'src/shared/constants' +import { DisabledWithPermission } from 'src/shared/disabled-with-permission' import { getInitiated } from 'src/shared/utils/localstorage' import { MenuListItem, MenuModalListItem, bottomMenuList, menuList } from './menuList' @@ -49,6 +51,7 @@ const DrawerMenuItem = ({ routeSearch, notRouteSearchMatch, useGuard, + hideOnGuard, children, }: DrawerMenuItemProps) => { const match = useMatch({ path: route + (children?.length ? '/*' : '') }) @@ -75,8 +78,15 @@ const DrawerMenuItem = ({ useEffect(() => { setCollapse(hasMatch) }, [hasMatch]) - return show ? ( - <> + return show || !hideOnGuard ? ( + @@ -115,7 +126,7 @@ const DrawerMenuItem = ({ {children?.length ? ( {children.map((item, index) => menuListMap({ open, onClose }, item, index))} ) : null} - + ) : null } diff --git a/src/shared/layouts/panel-layout/PermissionCheckGuard.tsx b/src/shared/layouts/panel-layout/PermissionCheckGuard.tsx new file mode 100644 index 00000000..1ec8a305 --- /dev/null +++ b/src/shared/layouts/panel-layout/PermissionCheckGuard.tsx @@ -0,0 +1,14 @@ +import { Navigate, Outlet } from 'react-router-dom' +import { Permissions } from 'src/core/auth' +import { panelUI } from 'src/shared/constants' +import { usePermissionCheck } from './check-hooks' + +export const PermissionCheckGuard = ({ permissionToCheck }: { permissionToCheck: Permissions }) => { + const hasPermission = usePermissionCheck(permissionToCheck) + + return hasPermission ? ( + + ) : ( + + ) +} diff --git a/src/shared/layouts/panel-layout/check-hooks/index.ts b/src/shared/layouts/panel-layout/check-hooks/index.ts index 80012904..c7f9b807 100644 --- a/src/shared/layouts/panel-layout/check-hooks/index.ts +++ b/src/shared/layouts/panel-layout/check-hooks/index.ts @@ -1,2 +1,2 @@ export { useHasBenchmarkCheck } from './useHasBenchmarkCheck' -export { useHasBillingPermissionCheck } from './useHasBillingPermissionCheck' +export { usePermissionCheck } from './usePermissionCheck' diff --git a/src/shared/layouts/panel-layout/check-hooks/useHasBillingPermissionCheck.tsx b/src/shared/layouts/panel-layout/check-hooks/useHasBillingPermissionCheck.tsx deleted file mode 100644 index 13326a29..00000000 --- a/src/shared/layouts/panel-layout/check-hooks/useHasBillingPermissionCheck.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import { useUserProfile } from 'src/core/auth' - -export const useHasBillingPermissionCheck = () => { - const { selectedWorkspace } = useUserProfile() - - return selectedWorkspace?.permissions.includes('readBilling') ?? false -} diff --git a/src/shared/layouts/panel-layout/check-hooks/usePermissionCheck.tsx b/src/shared/layouts/panel-layout/check-hooks/usePermissionCheck.tsx new file mode 100644 index 00000000..360a9493 --- /dev/null +++ b/src/shared/layouts/panel-layout/check-hooks/usePermissionCheck.tsx @@ -0,0 +1,7 @@ +import { Permissions, useUserProfile } from 'src/core/auth' + +export const usePermissionCheck = (permissionToCheck: Permissions) => { + const { checkPermission } = useUserProfile() + + return checkPermission(permissionToCheck) +} diff --git a/src/shared/layouts/panel-layout/index.ts b/src/shared/layouts/panel-layout/index.ts index c57bf922..a3285147 100644 --- a/src/shared/layouts/panel-layout/index.ts +++ b/src/shared/layouts/panel-layout/index.ts @@ -1,6 +1,7 @@ export { AccountCheckGuard } from './AccountCheckGuard' export { BenchmarkCheckGuard } from './BenchmarkCheckGuard' export { BottomRegion, ContentRegion, LogoRegion, PanelLayout } from './PanelLayout' +export { PermissionCheckGuard } from './PermissionCheckGuard' export { SubscriptionCheckGuard } from './SubscriptionCheckGuard' -export { useHasBenchmarkCheck, useHasBillingPermissionCheck } from './check-hooks' +export { useHasBenchmarkCheck, usePermissionCheck } from './check-hooks' export { AdvancedTableView, TablePagination, TableView } from './table-view-page' diff --git a/src/shared/layouts/panel-layout/menuList.tsx b/src/shared/layouts/panel-layout/menuList.tsx index 38991baf..4be4279c 100644 --- a/src/shared/layouts/panel-layout/menuList.tsx +++ b/src/shared/layouts/panel-layout/menuList.tsx @@ -9,7 +9,7 @@ import ReceiptIcon from '@mui/icons-material/Receipt' import RoomPreferencesIcon from '@mui/icons-material/RoomPreferences' import SecurityIcon from '@mui/icons-material/Security' import { ComponentType, ReactNode } from 'react' -import { useHasBillingPermissionCheck } from './check-hooks' +import { usePermissionCheck } from './check-hooks' import { useHasBenchmarkCheck } from './check-hooks/useHasBenchmarkCheck' export interface MenuListItem { @@ -19,6 +19,7 @@ export interface MenuListItem { notRouteSearchMatch?: boolean Icon: SvgIconComponent useGuard?: () => boolean + hideOnGuard?: boolean children?: MenuListItem[] } @@ -41,6 +42,7 @@ export const menuList: MenuListItem[] = [ // routeSearch: 'changes=true', // notRouteSearchMatch: true, Icon: InventoryIcon, + hideOnGuard: true, useGuard: useHasBenchmarkCheck, }, // { @@ -62,6 +64,7 @@ export const bottomMenuList: MenuListItem[] = [ name: Workspace Settings, route: '/workspace-settings', Icon: RoomPreferencesIcon, + useGuard: () => usePermissionCheck('readSettings'), children: [ { Icon: CloudIcon, @@ -77,7 +80,7 @@ export const bottomMenuList: MenuListItem[] = [ Icon: ReceiptIcon, name: Billing, route: '/workspace-settings/billing-receipts', - useGuard: useHasBillingPermissionCheck, + useGuard: () => usePermissionCheck('readBilling'), }, // { // Icon: FolderCopyIcon, diff --git a/src/shared/utils/handleScrollIntoViewClickEvent.ts b/src/shared/utils/handleScrollIntoViewClickEvent.ts new file mode 100644 index 00000000..032447ad --- /dev/null +++ b/src/shared/utils/handleScrollIntoViewClickEvent.ts @@ -0,0 +1,9 @@ +import { MouseEvent as ReactMouseEvent } from 'react' + +export const handleScrollIntoViewClickEvent = (e: ReactMouseEvent) => { + e.preventDefault() + const href = e.currentTarget.getAttribute('href') + if (href) { + window.document.querySelector(href)?.scrollIntoView({ behavior: 'smooth' }) + } +}