From d9c055872da4ce88f1cf97c3520209d9738889bc Mon Sep 17 00:00:00 2001 From: Vladyslav Matsiiako Date: Sun, 26 Feb 2023 17:51:26 -0800 Subject: [PATCH] Fixed minor bugs everywhere --- README.md | 2 +- docs/getting-started/dashboard/audit-logs.mdx | 6 +++--- docs/getting-started/features.mdx | 2 +- frontend/public/locales/en/activity.json | 2 +- frontend/public/locales/en/common.json | 4 ++-- frontend/src/components/basic/Layout.tsx | 2 +- .../src/components/dashboard/DropZone.tsx | 13 ++++++++++++ .../components/v2/EmptyState/EmptyState.tsx | 2 +- frontend/src/components/v2/Tag/Tag.tsx | 2 +- frontend/src/layouts/AppLayout/AppLayout.tsx | 2 +- frontend/src/pages/activity/[id].tsx | 8 +++++++- frontend/src/pages/settings/billing/[id].tsx | 5 ++--- .../OrgMembersTable/OrgMembersTable.tsx | 20 +++++++++++++++---- i18n/README.en.md | 2 +- 14 files changed, 51 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 7d2c806f2..413c4b50e 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ - **[Integrations](https://infisical.com/docs/integrations/overview)** with CI/CD and production infrastructure - **[Infisical API](https://infisical.com/docs/api-reference/overview/introduction)** - manage secrets via HTTPS requests to the platform - **[Secret Versioning](https://infisical.com/docs/getting-started/dashboard/versioning)** to view the change history for any secret -- **[Activity Logs](https://infisical.com/docs/getting-started/dashboard/audit-logs)** to record every action taken in a project +- **[Audit Logs](https://infisical.com/docs/getting-started/dashboard/audit-logs)** to record every action taken in a project - **[Point-in-time Secrets Recovery](https://infisical.com/docs/getting-started/dashboard/pit-recovery)** for rolling back to any snapshot of your secrets - **Role-based Access Controls** per environment - **2FA** (more options coming soon) diff --git a/docs/getting-started/dashboard/audit-logs.mdx b/docs/getting-started/dashboard/audit-logs.mdx index 6a48d98ff..4ec221f0c 100644 --- a/docs/getting-started/dashboard/audit-logs.mdx +++ b/docs/getting-started/dashboard/audit-logs.mdx @@ -1,12 +1,12 @@ --- -title: "Activity Logs" +title: "Audit Logs" description: "See which events are triggered within your Infisical project." --- -Activity logs record all actions going through Infisical including who performed which CRUD operations on environment variables and from what IP address. They help answer questions like: +Audit logs record all actions going through Infisical including who performed which CRUD operations on environment variables and from what IP address. They help answer questions like: - Who added or updated environment variables recently? - Did Bob read environment variables last week (if at all)? - What IP address was used for that action? -![Activity logs](../../images/activity-logs.png) +![Audit logs](../../images/activity-logs.png) diff --git a/docs/getting-started/features.mdx b/docs/getting-started/features.mdx index 7eaf6f267..c1a36a1ed 100644 --- a/docs/getting-started/features.mdx +++ b/docs/getting-started/features.mdx @@ -12,7 +12,7 @@ This is a non-exhaustive list of features that Infisical offers: - Sync secrets to platforms via integrations to platforms like GitHub, Vercel, and Netlify. - Rollback secrets to any point in time. - Rollback each secrets to any version. -- Track actions through activity logs. +- Track actions through audit logs. ## CLI diff --git a/frontend/public/locales/en/activity.json b/frontend/public/locales/en/activity.json index 648e4d42c..4db29f274 100644 --- a/frontend/public/locales/en/activity.json +++ b/frontend/public/locales/en/activity.json @@ -1,5 +1,5 @@ { - "title": "Activity Logs", + "title": "Audit Logs", "subtitle": "Event history for this Infisical project.", "event": { "readSecrets": "Secrets Viewed", diff --git a/frontend/public/locales/en/common.json b/frontend/public/locales/en/common.json index 3d840c663..4c966f09c 100644 --- a/frontend/public/locales/en/common.json +++ b/frontend/public/locales/en/common.json @@ -13,8 +13,8 @@ "project-id": "Project ID", "save-changes": "Save Changes", "saved": "Saved", - "drop-zone": "Drag and drop a .env or .yml file here.", - "drop-zone-keys": "Drag and drop a .env or .yml file here to add more secrets.", + "drop-zone": "Drag and drop a .env, .json, or .yml file here.", + "drop-zone-keys": "Drag and drop a .env, .json, or .yml file here to add more secrets.", "role": "Role", "role_admin": "admin", "display-name": "Display Name", diff --git a/frontend/src/components/basic/Layout.tsx b/frontend/src/components/basic/Layout.tsx index a6632b556..e76b99cc3 100644 --- a/frontend/src/components/basic/Layout.tsx +++ b/frontend/src/components/basic/Layout.tsx @@ -162,7 +162,7 @@ const Layout = ({ children }: LayoutProps) => { }, { href: `/activity/${workspaceMapping[workspaceSelected as any]}`, - title: 'Activity Logs', + title: 'Audit Logs', emoji: }, { diff --git a/frontend/src/components/dashboard/DropZone.tsx b/frontend/src/components/dashboard/DropZone.tsx index 2fddfcf9c..192c91a30 100644 --- a/frontend/src/components/dashboard/DropZone.tsx +++ b/frontend/src/components/dashboard/DropZone.tsx @@ -71,6 +71,19 @@ const DropZone = ({ })); break; } + case 'json': { + const keyPairs = JSON.parse(String(file)); + secrets = Object.keys(keyPairs).map((key, index) => ({ + id: guidGenerator(), + pos: numCurrentRows + index, + key, + value: keyPairs[key as keyof typeof keyPairs], + comment: '', + type: 'shared', + tags: [] + })); + break; + } case 'yml': { const parsedFile = parseDocument(file.toString()); const keyPairs = parsedFile.contents!.toJSON(); diff --git a/frontend/src/components/v2/EmptyState/EmptyState.tsx b/frontend/src/components/v2/EmptyState/EmptyState.tsx index be2333723..5122d9c1e 100644 --- a/frontend/src/components/v2/EmptyState/EmptyState.tsx +++ b/frontend/src/components/v2/EmptyState/EmptyState.tsx @@ -11,7 +11,7 @@ type Props = { }; export const EmptyState = ({ title, className, children, icon = faCubesStacked }: Props) => ( -
+
{title}
diff --git a/frontend/src/components/v2/Tag/Tag.tsx b/frontend/src/components/v2/Tag/Tag.tsx index 32c62c165..4f3021e18 100644 --- a/frontend/src/components/v2/Tag/Tag.tsx +++ b/frontend/src/components/v2/Tag/Tag.tsx @@ -14,7 +14,7 @@ const tagVariants = cva('inline-flex whitespace-nowrap text-sm rounded-sm mr-1.5 red: 'bg-red/80 text-bunker-100' }, size: { - sm: 'px-1 py-0.5' + sm: 'px-1.5 py-0.5' } } }); diff --git a/frontend/src/layouts/AppLayout/AppLayout.tsx b/frontend/src/layouts/AppLayout/AppLayout.tsx index 5ce7085f6..46b339287 100644 --- a/frontend/src/layouts/AppLayout/AppLayout.tsx +++ b/frontend/src/layouts/AppLayout/AppLayout.tsx @@ -308,7 +308,7 @@ export const AppLayout = ({ children }: LayoutProps) => { isSelected={router.asPath === `/activity/${currentWorkspace?._id}`} icon={} > - Activity Logs + Audit Logs diff --git a/frontend/src/pages/activity/[id].tsx b/frontend/src/pages/activity/[id].tsx index 181efb4b2..8e16fccd7 100644 --- a/frontend/src/pages/activity/[id].tsx +++ b/frontend/src/pages/activity/[id].tsx @@ -1,4 +1,5 @@ import React, { useEffect, useState } from 'react'; +import Head from 'next/head'; import { useRouter } from 'next/router'; import { useTranslation } from 'next-i18next'; @@ -125,7 +126,12 @@ export default function Activity() { return (
- + + Audit Logs + + + + {currentSidebarAction && ( )} diff --git a/frontend/src/pages/settings/billing/[id].tsx b/frontend/src/pages/settings/billing/[id].tsx index e1c021a99..5c06af466 100644 --- a/frontend/src/pages/settings/billing/[id].tsx +++ b/frontend/src/pages/settings/billing/[id].tsx @@ -77,13 +77,13 @@ export default function SettingsBilling() { }, []); return ( -
+
{t('common:head-title', { title: t('billing:title') })}
-
+
@@ -93,7 +93,6 @@ export default function SettingsBilling() {

{t('billing:subscription')}

-
If you are looking to get an annual plan, please reach out to team@infisical.com
{plans.map((plan) => ( diff --git a/frontend/src/views/Settings/OrgSettingsPage/components/OrgMembersTable/OrgMembersTable.tsx b/frontend/src/views/Settings/OrgSettingsPage/components/OrgMembersTable/OrgMembersTable.tsx index 020eae963..ed451a9ee 100644 --- a/frontend/src/views/Settings/OrgSettingsPage/components/OrgMembersTable/OrgMembersTable.tsx +++ b/frontend/src/views/Settings/OrgSettingsPage/components/OrgMembersTable/OrgMembersTable.tsx @@ -1,5 +1,6 @@ import { useMemo, useState } from 'react'; import { Controller, useForm } from 'react-hook-form'; +import { useRouter } from 'next/router'; import { faMagnifyingGlass, faPlus, faTrash, faUsers } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { yupResolver } from '@hookform/resolvers/yup'; @@ -61,6 +62,7 @@ export const OrgMembersTable = ({ userId, isLoading }: Props) => { + const router = useRouter(); const [searchMemberFilter, setSearchMemberFilter] = useState(''); const { handlePopUpToggle, popUp, handlePopUpOpen, handlePopUpClose } = usePopUp([ 'addMember', @@ -159,7 +161,7 @@ export const OrgMembersTable = ({ )} {(status === 'invited' || status === 'verified') && ( - )} {status === 'completed' && ( @@ -193,7 +195,17 @@ export const OrgMembersTable = ({ )) ) : ( - This user isn't part of any projects yet +
+ This user isn't part of any projects yet + +
)} diff --git a/i18n/README.en.md b/i18n/README.en.md index 92f2388bf..78bf3af09 100644 --- a/i18n/README.en.md +++ b/i18n/README.en.md @@ -54,7 +54,7 @@ - **[Integrations](https://infisical.com/docs/integrations/overview)** with CI/CD and production infrastructure - **[Infisical API](https://infisical.com/docs/api-reference/overview/introduction)** - manage secrets via HTTPS requests to the platform - **[Secret Versioning](https://infisical.com/docs/getting-started/dashboard/versioning)** to view the change history for any secret -- **[Activity Logs](https://infisical.com/docs/getting-started/dashboard/audit-logs)** to record every action taken in a project +- **[Audit Logs](https://infisical.com/docs/getting-started/dashboard/audit-logs)** to record every action taken in a project - **[Point-in-time Secrets Recovery](https://infisical.com/docs/getting-started/dashboard/pit-recovery)** for rolling back to any snapshot of your secrets - **Role-based Access Controls** per environment - **2FA** (more options coming soon)