Skip to content

Commit

Permalink
feat(panel-accounts-page): add panel accounts page (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
sijav authored Nov 2, 2023
1 parent 2aa663e commit a6ef3d0
Show file tree
Hide file tree
Showing 24 changed files with 691 additions and 32 deletions.
17 changes: 13 additions & 4 deletions src/containers/panel/PanelRoutes.tsx
Original file line number Diff line number Diff line change
@@ -1,27 +1,36 @@
import { lazy } from 'react'
import { Navigate, Route, Routes } from 'react-router-dom'

const HomePage = lazy(
const PanelHomePage = lazy(
() =>
import(
/* webpackChunkName: "home" */
/* webpackChunkName: "panel-home" */
'src/pages/panel/panel-home/PanelHomePage'
),
)

const PanelSetupCloudPage = lazy(
() =>
import(
/* webpackChunkName: "PanelSetupCloud" */
/* webpackChunkName: "panel-setup-cloud" */
'src/pages/panel/panel-setup-cloud/PanelSetupCloudPage'
),
)

const PanelAccountsPage = lazy(
() =>
import(
/* webpackChunkName: "panel-accounts" */
'src/pages/panel/panel-accounts/PanelAccountsPage'
),
)

export function PanelRoutes() {
return (
<Routes>
<Route path="/">
<Route index element={<HomePage />} />
<Route index element={<PanelHomePage />} />
<Route path="accounts" element={<PanelAccountsPage />} />
<Route path="setup-cloud" element={<PanelSetupCloudPage />} />
</Route>
<Route path="*" element={<Navigate to="/" />} />
Expand Down
2 changes: 1 addition & 1 deletion src/core/auth/getWorkspaces.mutation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ import { endPoints } from 'src/shared/constants'
import { GetWorkspacesResponse } from 'src/shared/types/server'

export const getWorkspacesMutation = async (axios: AxiosInstance) => {
return axios.get<GetWorkspacesResponse>(endPoints.workspaces.get).then((res) => res.data)
return axios.get<GetWorkspacesResponse>(endPoints.workspaces.self).then((res) => res.data)
}
2 changes: 1 addition & 1 deletion src/core/auth/logout.mutation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { simpleAxios } from 'src/shared/utils/axios'

export const logoutMutation = async () => {
return simpleAxios
.post<undefined>(endPoints.auth.jwt.logout, {
.post<undefined>(endPoints.auth.jwt.logout, null, {
withCredentials: true,
})
.catch(() => {})
Expand Down
78 changes: 73 additions & 5 deletions src/locales/de_DE/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,23 @@ msgstr ""
msgid "© 2023 Some Engineering Inc. All rights reserved."
msgstr "© 2023 Some Engineering Services GMBH. Alle Rechte vorbehalten."

#: src/shared/layouts/panel-layout/menuList.tsx:35
#: src/shared/layouts/panel-layout/menuList.tsx:41
msgid "Account Setup"
msgstr "Account Setup"

#: src/pages/panel/panel-accounts/PanelAccountsPage.tsx:322
#: src/shared/layouts/panel-layout/menuList.tsx:33
msgid "Accounts"
msgstr "Konten"

#: src/pages/panel/panel-home/PanelHomePage.tsx:172
msgid "Accounts Summary"
msgstr "Zusammenfassung der Konten"

#: src/pages/panel/panel-accounts/PanelAccountsPage.tsx:347
msgid "Actions"
msgstr "Aktionen"

#: src/pages/auth/register/RegisterPage.tsx:127
msgid "Already have an account? Click here to Log in."
msgstr "Sie haben bereits ein Konto? Klicken Sie hier, um sich einzuloggen."
Expand All @@ -41,6 +50,10 @@ msgstr "Wenn Sie den Stack alternativ manuell bereitstellen möchten, können Si
msgid "Alternatively: Manual Cloud Setup"
msgstr "Alternativ: Manuelles Cloud Setup"

#: src/pages/panel/panel-accounts/PanelAccountsPage.tsx:236
msgid "Are you sure?"
msgstr "Bist du sicher?"

#: src/pages/panel/panel-setup-cloud/PanelSetupCloudPage.tsx:33
msgid "Automatic Cloud Setup"
msgstr "Automatisches Cloud Setup"
Expand All @@ -54,7 +67,16 @@ msgstr "AWS Marketplace wurde erfolgreich abonniert"
msgid "Benchmarks"
msgstr "Benchmarks"

#: src/pages/panel/panel-home/AccountCard.tsx:34
#: src/pages/panel/panel-accounts/PanelAccountsPage.tsx:184
#: src/pages/panel/panel-accounts/PanelAccountsPage.tsx:188
#: src/pages/panel/panel-accounts/PanelAccountsPage.tsx:189
#: src/pages/panel/panel-accounts/PanelAccountsPage.tsx:243
msgid "Cancel"
msgstr "Stornieren"

#: src/pages/panel/panel-accounts/PanelAccountsPage.tsx:263
#: src/pages/panel/panel-accounts/PanelAccountsPage.tsx:326
#: src/pages/panel/panel-home/AccountCard.tsx:33
msgid "Cloud"
msgstr "Cloud"

Expand All @@ -66,6 +88,10 @@ msgstr "Cloud-Konto hinzugefügt, ID: {0}"
msgid "Compliance"
msgstr "Compliance"

#: src/pages/panel/panel-accounts/PanelAccountsPage.tsx:335
msgid "Configured"
msgstr "Konfiguriert"

#: src/pages/panel/panel-setup-cloud/ExternalId.tsx:33
#: src/pages/panel/panel-setup-cloud/TenantId.tsx:14
msgid "Copied to Clipboard!"
Expand All @@ -80,25 +106,45 @@ msgstr "Kopieren"
msgid "Critical"
msgstr "Kritisch"

#: src/shared/layouts/panel-layout/menuList.tsx:27
#: src/shared/layouts/panel-layout/menuList.tsx:28
msgid "Dashboard"
msgstr "Dashboard"

#: src/pages/panel/panel-accounts/PanelAccountsPage.tsx:224
#: src/pages/panel/panel-accounts/PanelAccountsPage.tsx:228
#: src/pages/panel/panel-accounts/PanelAccountsPage.tsx:229
#: src/pages/panel/panel-accounts/PanelAccountsPage.tsx:254
msgid "Delete"
msgstr "Löschen"

#: src/pages/panel/panel-setup-cloud/PanelSetupCloudPage.tsx:47
#: src/pages/panel/panel-setup-cloud/SetupCloudButton.tsx:16
msgid "Deploy Stack"
msgstr "Deploy Stack"

#: src/pages/panel/panel-accounts/PanelAccountsPage.tsx:237
msgid "Do you want to delete this account?"
msgstr "Möchten Sie dieses Konto löschen?"

#: src/pages/auth/login/LoginPage.tsx:145
msgid "Don't have an account? Click here to Sign up."
msgstr "Sie haben noch kein Konto? Klicken Sie hier, um sich anzumelden."

#: src/pages/panel/panel-accounts/PanelAccountsPage.tsx:200
#: src/pages/panel/panel-accounts/PanelAccountsPage.tsx:201
msgid "Edit"
msgstr "Edit"

#: src/pages/auth/login/LoginPage.tsx:89
#: src/pages/auth/register/RegisterPage.tsx:86
msgid "Email"
msgstr "Email"

#: src/shared/event-button/EventButton.tsx:76
#: src/pages/panel/panel-accounts/PanelAccountsPage.tsx:344
msgid "Enabled"
msgstr "Ermöglicht"

#: src/shared/event-button/EventButton.tsx:78
msgid "Events"
msgstr "Veranstaltungen"

Expand All @@ -123,7 +169,9 @@ msgstr "Hoch"
msgid "How to fix"
msgstr "Wie repariert man"

#: src/pages/panel/panel-home/AccountCard.tsx:31
#: src/pages/panel/panel-accounts/PanelAccountsPage.tsx:260
#: src/pages/panel/panel-accounts/PanelAccountsPage.tsx:329
#: src/pages/panel/panel-home/AccountCard.tsx:30
msgid "ID"
msgstr "ID"

Expand Down Expand Up @@ -172,6 +220,15 @@ msgstr "Am meisten verbesserte Konten"
msgid "Most Improved Resources"
msgstr "Am meisten verbesserte Ressourcen"

#: src/pages/panel/panel-accounts/PanelAccountsPage.tsx:266
#: src/pages/panel/panel-accounts/PanelAccountsPage.tsx:332
msgid "Name"
msgstr "Name"

#: src/pages/panel/panel-accounts/PanelAccountsPage.tsx:341
msgid "Next scan"
msgstr "Nächster Scan"

#: src/pages/panel/panel-home/OverallCard.tsx:76
msgid "No changes"
msgstr "Keine Änderungen"
Expand Down Expand Up @@ -207,6 +264,7 @@ msgstr "Passwort"
msgid "Pick one of the recommendations to the right and improve your security"
msgstr "Wählen Sie eine der Empfehlungen rechts aus und verbessern Sie Ihre Sicherheit"

#: src/pages/panel/panel-accounts/PanelAccountsPage.tsx:309
#: src/pages/panel/panel-home/PanelHomePage.tsx:83
msgid "Please go to <0>Setup Accounts</0> page to setup your account first"
msgstr "Bitte gehen Sie zur Seite <0>Setup Accounts</0>, um zunächst Ihr Konto einzurichten"
Expand All @@ -219,6 +277,10 @@ msgstr "Profil"
msgid "Register"
msgstr "Registrieren"

#: src/pages/panel/panel-accounts/PanelAccountsPage.tsx:338
msgid "Resources"
msgstr "Ressourcen"

#: src/pages/panel/panel-home/TopFiveChecksCard.tsx:30
msgid "Risk"
msgstr "Risiko"
Expand Down Expand Up @@ -250,6 +312,11 @@ msgstr "Einfacher und erschwinglicher Einblick in die Sicherheitslage Ihrer Clou
msgid "Since {since}"
msgstr "Seit {since}"

#: src/pages/panel/panel-accounts/PanelAccountsPage.tsx:177
#: src/pages/panel/panel-accounts/PanelAccountsPage.tsx:178
msgid "Submit"
msgstr "Einreichen"

#: src/shared/event-button/EventButton.tsx:41
#~ msgid "Task \"{0}\" with workflow \"{1}\" failed: {2}"
#~ msgstr "Aufgabe \"{0}\" mit Workflow \"{1}\" ist fehlgeschlagen: {2}"
Expand All @@ -262,6 +329,7 @@ msgstr "Tenant Id"
msgid "The Stack requires the following parameters"
msgstr "Der Stack erfordert die folgenden Parameter"

#: src/pages/panel/panel-accounts/PanelAccountsPage.tsx:306
#: src/pages/panel/panel-home/PanelHomePage.tsx:80
msgid "There's no account configured for this workspace."
msgstr "Für diesen Arbeitsbereich ist kein Konto konfiguriert."
Expand Down
Loading

0 comments on commit a6ef3d0

Please sign in to comment.