Skip to content

Commit

Permalink
[fix] inventory form errors with invalid values and fix property with…
Browse files Browse the repository at this point in the history
… dictionary (#52)
  • Loading branch information
sijav authored Dec 6, 2023
1 parent f9a6625 commit de2cdb3
Show file tree
Hide file tree
Showing 13 changed files with 835 additions and 682 deletions.
60 changes: 30 additions & 30 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,83 +31,83 @@
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@fontsource-variable/nunito-sans": "^5.0.9",
"@lingui/react": "^4.5.0",
"@lingui/react": "^4.6.0",
"@mui/icons-material": "^5.14.19",
"@mui/lab": "^5.0.0-alpha.154",
"@mui/material": "^5.14.19",
"@mui/system": "^5.14.19",
"@mui/x-data-grid": "^6.18.2",
"@mui/x-date-pickers": "^6.18.2",
"@mui/lab": "^5.0.0-alpha.155",
"@mui/material": "^5.14.20",
"@mui/system": "^5.14.20",
"@mui/x-data-grid": "^6.18.3",
"@mui/x-date-pickers": "^6.18.3",
"@mui/x-tree-view": "^6.17.0",
"@tanstack/react-query": "^5.10.0",
"@tanstack/react-query": "^5.12.2",
"@uidotdev/usehooks": "^2.4.1",
"axios": "^1.6.2",
"d3": "^7.8.5",
"dayjs": "^1.11.10",
"flag-icons": "^7.0.2",
"flag-icons": "^7.0.3",
"hast-util-to-jsx-runtime": "^2.3.0",
"highlight.js": "^11.9.0",
"lorem-ipsum": "^2.0.8",
"lowlight": "^3.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-error-boundary": "^4.0.11",
"react-router-dom": "^6.20.0",
"react-router-dom": "^6.20.1",
"react-transition-group": "^4.4.5",
"react-window": "^1.8.10",
"recharts": "^2.10.3",
"yaml": "^2.3.4"
},
"devDependencies": {
"@lingui/cli": "^4.5.0",
"@lingui/macro": "^4.5.0",
"@lingui/cli": "^4.6.0",
"@lingui/macro": "^4.6.0",
"@lingui/swc-plugin": "^4.0.4",
"@lingui/vite-plugin": "^4.5.0",
"@storybook/addon-essentials": "7.6.2",
"@storybook/addon-interactions": "7.6.2",
"@storybook/addon-links": "7.6.2",
"@storybook/addon-onboarding": "1.0.8",
"@storybook/blocks": "7.6.2",
"@storybook/react": "7.6.2",
"@storybook/react-vite": "7.6.2",
"@lingui/vite-plugin": "^4.6.0",
"@storybook/addon-essentials": "7.6.3",
"@storybook/addon-interactions": "7.6.3",
"@storybook/addon-links": "7.6.3",
"@storybook/addon-onboarding": "1.0.9",
"@storybook/blocks": "7.6.3",
"@storybook/react": "7.6.3",
"@storybook/react-vite": "7.6.3",
"@storybook/testing-library": "0.2.2",
"@testing-library/dom": "^9.3.3",
"@testing-library/jest-dom": "^6.1.5",
"@testing-library/react": "^14.1.2",
"@testing-library/user-event": "^14.5.1",
"@types/d3": "^7.4.3",
"@types/react": "^18.2.39",
"@types/react": "^18.2.42",
"@types/react-dom": "^18.2.17",
"@types/react-window": "^1.8.8",
"@typescript-eslint/eslint-plugin": "^6.13.1",
"@typescript-eslint/parser": "^6.13.1",
"@typescript-eslint/eslint-plugin": "^6.13.2",
"@typescript-eslint/parser": "^6.13.2",
"@vitejs/plugin-react-swc": "^3.5.0",
"@vitest/ui": "^0.34.6",
"@vitest/ui": "^1.0.1",
"babel-plugin-macros": "3.1.0",
"esbuild": "^0.19.8",
"eslint": "^8.54.0",
"eslint": "^8.55.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.4",
"eslint-plugin-react-refresh": "^0.4.5",
"eslint-plugin-storybook": "^0.6.15",
"husky": "^8.0.3",
"jsdom": "^23.0.1",
"lint-staged": "^15.1.0",
"lint-staged": "^15.2.0",
"mockjs": "^1.1.0",
"patch-package": "^8.0.0",
"prettier": "^3.1.0",
"prettier-plugin-organize-imports": "^3.2.4",
"prop-types": "15",
"react-refresh": "^0.14.0",
"storybook": "7.6.2",
"storybook": "7.6.3",
"tsc-files": "^1.1.4",
"type-fest": "^4.8.2",
"type-fest": "^4.8.3",
"typescript": "^5.3.2",
"unique-names-generator": "^4.7.1",
"vite": "^5.0.4",
"vite": "^5.0.6",
"vite-plugin-mock": "^3.0.0",
"vite-plugin-svgr": "^4.2.0",
"vitest": "^0.34.6",
"vitest": "^1.0.1",
"web-vitals": "^3.5.0"
},
"browserslist": {
Expand Down
2 changes: 1 addition & 1 deletion src/core/theme/Theme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export function Theme({ children }: ThemeProps) {
},
},
},
...(langs.find((i) => i.locale === locale)?.muiLocale ?? []),
...(langs[locale as keyof typeof langs]?.muiLocale ?? []),
)

return (
Expand Down
25 changes: 13 additions & 12 deletions src/locales/de-DE/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,6 @@ msgid "Cloud account degraded, id: {0}"
msgstr "Cloud-Konto beeinträchtigt, ID: {0}"

#: src/shared/event-button/EventButton.tsx:70
msgid "Cloud account deleted, id: {0}"
msgstr "Cloud-Konto gelöscht, ID: {0}"

#: src/shared/event-button/EventButton.tsx:77
msgid "Cloud account discovered, id: {0}"
msgstr "Cloud-Konto entdeckt, ID: {0}"

Expand Down Expand Up @@ -184,11 +180,11 @@ msgstr "Kritisch"
msgid "Dashboard"
msgstr "Dashboard"

#: src/pages/panel/inventory/InventoryFormFilterRowValues.tsx:115
#: src/pages/panel/inventory/InventoryFormFilterRowValues.tsx:116
msgid "Date Picker"
msgstr "Datumsauswahl"

#: src/pages/panel/inventory/InventoryFormFilterRowValues.tsx:107
#: src/pages/panel/inventory/InventoryFormFilterRowValues.tsx:108
msgid "Date Time Picker"
msgstr "Datum-/Uhrzeitauswahl"

Expand Down Expand Up @@ -230,7 +226,7 @@ msgstr "Email"
msgid "Enabled"
msgstr "Ermöglicht"

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

Expand All @@ -242,7 +238,7 @@ msgstr "External Id"
#~ msgid "Failed Checks"
#~ msgstr "Fehlgeschlagene Prüfungen"

#: src/pages/panel/inventory/InventoryFormFilterRowValues.tsx:99
#: src/pages/panel/inventory/InventoryFormFilterRowValues.tsx:100
msgid "False"
msgstr "FALSCH"

Expand Down Expand Up @@ -287,6 +283,11 @@ msgstr "Verbessert"
msgid "In the next step we are going to set up the trust between FIX and your AWS cloud account."
msgstr "Im nächsten Schritt richten wir einen Trust zwischen FIX und Ihrem AWS Konto ein."

#: src/pages/panel/inventory/InventoryFormFilterRowProperty.tsx:282
#: src/pages/panel/inventory/InventoryFormFilterRowStringValue.tsx:159
msgid "Invalid Value"
msgstr "Ungültiger Wert"

#: src/shared/layouts/panel-layout/menuList.tsx:35
msgid "Inventory"
msgstr "Inventar"
Expand Down Expand Up @@ -367,7 +368,7 @@ msgstr "Sie löschen gerade ein Management- oder delegiertes Admin-Konto. Beacht
msgid "Nothing to show yet"
msgstr "Noch nichts zu zeigen"

#: src/pages/panel/inventory/InventoryFormFilterRowValues.tsx:93
#: src/pages/panel/inventory/InventoryFormFilterRowValues.tsx:94
msgid "Null"
msgstr "Null"

Expand Down Expand Up @@ -417,7 +418,7 @@ msgstr "Privilegiert"
msgid "Profile"
msgstr "Profil"

#: src/pages/panel/inventory/InventoryFormFilterRowProperty.tsx:240
#: src/pages/panel/inventory/InventoryFormFilterRowProperty.tsx:300
msgid "Property"
msgstr "Eigentum"

Expand Down Expand Up @@ -523,15 +524,15 @@ msgstr "Die fünf wichtigsten Sicherheitsverbesserungen"
msgid "Top Non-Compliant Resources"
msgstr "Top Ressourcen mit Compliance-Verstößen"

#: src/pages/panel/inventory/InventoryFormFilterRowValues.tsx:96
#: src/pages/panel/inventory/InventoryFormFilterRowValues.tsx:97
msgid "True"
msgstr "WAHR"

#: src/shared/error-boundary-fallback/ErrorBoundaryFallback.tsx:73
msgid "Try again"
msgstr "Versuchen Sie es erneut"

#: src/pages/panel/inventory/InventoryFormFilterRowValues.tsx:128
#: src/pages/panel/inventory/InventoryFormFilterRowValues.tsx:129
#: src/pages/panel/inventory/utils/getAutoCompleteFromKey.tsx:118
msgid "Value"
msgstr "Wert"
Expand Down
25 changes: 13 additions & 12 deletions src/locales/en-US/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,6 @@ msgid "Cloud account degraded, id: {0}"
msgstr "Cloud account degraded, id: {0}"

#: src/shared/event-button/EventButton.tsx:70
msgid "Cloud account deleted, id: {0}"
msgstr "Cloud account deleted, id: {0}"

#: src/shared/event-button/EventButton.tsx:77
msgid "Cloud account discovered, id: {0}"
msgstr "Cloud account discovered, id: {0}"

Expand Down Expand Up @@ -184,11 +180,11 @@ msgstr "Critical"
msgid "Dashboard"
msgstr "Dashboard"

#: src/pages/panel/inventory/InventoryFormFilterRowValues.tsx:115
#: src/pages/panel/inventory/InventoryFormFilterRowValues.tsx:116
msgid "Date Picker"
msgstr "Date Picker"

#: src/pages/panel/inventory/InventoryFormFilterRowValues.tsx:107
#: src/pages/panel/inventory/InventoryFormFilterRowValues.tsx:108
msgid "Date Time Picker"
msgstr "Date Time Picker"

Expand Down Expand Up @@ -230,7 +226,7 @@ msgstr "Email"
msgid "Enabled"
msgstr "Enabled"

#: src/shared/event-button/EventButton.tsx:111
#: src/shared/event-button/EventButton.tsx:104
msgid "Events"
msgstr "Events"

Expand All @@ -242,7 +238,7 @@ msgstr "External Id"
#~ msgid "Failed Checks"
#~ msgstr "Failed Checks"

#: src/pages/panel/inventory/InventoryFormFilterRowValues.tsx:99
#: src/pages/panel/inventory/InventoryFormFilterRowValues.tsx:100
msgid "False"
msgstr "False"

Expand Down Expand Up @@ -287,6 +283,11 @@ msgstr "Improved"
msgid "In the next step we are going to set up the trust between FIX and your AWS cloud account."
msgstr "In the next step we are going to set up the trust between FIX and your AWS cloud account."

#: src/pages/panel/inventory/InventoryFormFilterRowProperty.tsx:282
#: src/pages/panel/inventory/InventoryFormFilterRowStringValue.tsx:159
msgid "Invalid Value"
msgstr "Invalid Value"

#: src/shared/layouts/panel-layout/menuList.tsx:35
msgid "Inventory"
msgstr "Inventory"
Expand Down Expand Up @@ -367,7 +368,7 @@ msgstr "Note: You are about to delete a management or delegated admin account. P
msgid "Nothing to show yet"
msgstr "Nothing to show yet"

#: src/pages/panel/inventory/InventoryFormFilterRowValues.tsx:93
#: src/pages/panel/inventory/InventoryFormFilterRowValues.tsx:94
msgid "Null"
msgstr "Null"

Expand Down Expand Up @@ -417,7 +418,7 @@ msgstr "Privileged"
msgid "Profile"
msgstr "Profile"

#: src/pages/panel/inventory/InventoryFormFilterRowProperty.tsx:240
#: src/pages/panel/inventory/InventoryFormFilterRowProperty.tsx:300
msgid "Property"
msgstr "Property"

Expand Down Expand Up @@ -523,15 +524,15 @@ msgstr "Top 5 Security Enhancements"
msgid "Top Non-Compliant Resources"
msgstr "Top Non-Compliant Resources"

#: src/pages/panel/inventory/InventoryFormFilterRowValues.tsx:96
#: src/pages/panel/inventory/InventoryFormFilterRowValues.tsx:97
msgid "True"
msgstr "True"

#: src/shared/error-boundary-fallback/ErrorBoundaryFallback.tsx:73
msgid "Try again"
msgstr "Try again"

#: src/pages/panel/inventory/InventoryFormFilterRowValues.tsx:128
#: src/pages/panel/inventory/InventoryFormFilterRowValues.tsx:129
#: src/pages/panel/inventory/utils/getAutoCompleteFromKey.tsx:118
msgid "Value"
msgstr "Value"
Expand Down
6 changes: 3 additions & 3 deletions src/pages/panel/inventory/InventoryFormFilterRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ export const InventoryFormFilterRow = ({
size="small"
value={item.op && (currentOpTypes as readonly string[]).includes(item.op) ? item.op : ''}
onChange={(e) => handleChange({ op: e.target.value as OPType })}
autoFocus={!item.op}
autoFocus
inputProps={{
autoFocus: !item.op,
autoFocus: true,
}}
>
{currentOpTypes.map((op, i) => (
Expand All @@ -146,7 +146,7 @@ export const InventoryFormFilterRow = ({
) : null}
</>
) : null}
<Stack direction="row" alignSelf="center" justifyContent="end" spacing={1}>
<Stack direction="row" alignSelf="start" justifyContent="end" spacing={1}>
<IconButton onClick={handleAdd}>
<AddIcon color="success" />
</IconButton>
Expand Down
Loading

0 comments on commit de2cdb3

Please sign in to comment.