Skip to content

Commit

Permalink
Merge upstream changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sync Fork committed Mar 1, 2024
1 parent 7fc4f1e commit eab1e6d
Show file tree
Hide file tree
Showing 63 changed files with 816 additions and 347 deletions.
19 changes: 19 additions & 0 deletions dashboard/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# @nhost/dashboard

## 1.9.0

### Minor Changes

- d86e5c9: feat: add support for filtering the logs using a RegExp

## 1.8.3

### Patch Changes

- @nhost/react-apollo@9.0.3
- @nhost/nextjs@2.1.5

## 1.8.2

### Patch Changes

- 6df4f02: fix: use custom error toast and show correct message when sending an invite

## 1.8.1

### Patch Changes
Expand Down
6 changes: 0 additions & 6 deletions dashboard/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ const cspHeader = `
form-action 'self';
frame-ancestors 'none';
frame-src 'self' js.stripe.com;
block-all-mixed-content;
upgrade-insecure-requests;
`;

module.exports = withBundleAnalyzer({
Expand All @@ -42,10 +40,6 @@ module.exports = withBundleAnalyzer({
key: 'X-Frame-Options',
value: 'SAMEORIGIN',
},
{
key: 'Content-Security-Policy',
value: cspHeader.replace(/\n/g, ''),
},
],
},
];
Expand Down
4 changes: 2 additions & 2 deletions dashboard/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nhost/dashboard",
"version": "1.8.1",
"version": "1.9.0",
"private": true,
"scripts": {
"preinstall": "npx only-allow pnpm",
Expand Down Expand Up @@ -44,7 +44,7 @@
"@tailwindcss/forms": "^0.5.7",
"@tanstack/react-query": "^4.36.1",
"@tanstack/react-table": "^8.11.7",
"@tanstack/react-virtual": "^3.0.2",
"@tanstack/react-virtual": "^3.1.2",
"@uiw/codemirror-theme-github": "^4.21.21",
"@uiw/react-codemirror": "^4.21.21",
"analytics-node": "^6.2.0",
Expand Down
13 changes: 7 additions & 6 deletions dashboard/src/components/ui/v2/ErrorToast/ErrorToast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { XIcon } from '@/components/ui/v2/icons/XIcon';
import { useCurrentWorkspaceAndProject } from '@/features/projects/common/hooks/useCurrentWorkspaceAndProject';
import { getToastBackgroundColor } from '@/utils/constants/settings';
import { copy } from '@/utils/copy';
import { ApolloError } from '@apollo/client';
import type { ApolloError } from '@apollo/client';
import { useUserData } from '@nhost/nextjs';
import { AnimatePresence, motion } from 'framer-motion';
import { useRouter } from 'next/router';
Expand All @@ -27,10 +27,11 @@ const getInternalErrorMessage = (
return null;
}

if (error instanceof ApolloError) {
const internalError = error.graphQLErrors?.[0]?.extensions?.internal as
| { error: { message: string } }
| undefined;
if (error.name === 'ApolloError') {
// @ts-ignore
const internalError = error.graphQLErrors?.[0]?.extensions?.internal as {
error: { message: string };
};
return internalError?.error?.message || null;
}

Expand All @@ -42,7 +43,7 @@ const getInternalErrorMessage = (
};

const errorToObject = (error: ApolloError | Error) => {
if (error instanceof ApolloError) {
if (error.name === 'ApolloError') {
return error;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export default function LogsBody({ logsData, loading, error }: LogsBodyProps) {
count: rows.length,
getScrollElement: () => tableRef.current,
estimateSize: () => 63,
overscan: 5,
overscan: 50,
});

if (loading && !error) {
Expand Down Expand Up @@ -214,7 +214,7 @@ export default function LogsBody({ logsData, loading, error }: LogsBodyProps) {
<TableCell
key={cell.id}
component="td"
className="break-words py-2.5 px-2 align-top text-xs- font-normal tracking-tight"
className="break-words px-2 py-2.5 align-top text-xs- font-normal tracking-tight"
style={{
width: cell.column.getSize() || 'auto',
minWidth: !cell.column.getSize() ? 300 : 'initial',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function LogsDatePicker({
<Text
htmlFor={label}
component="label"
className="self-center text-sm+ font-normal"
className="min-w-14 self-center text-sm+ font-normal"
color="secondary"
>
{label}
Expand Down
Loading

0 comments on commit eab1e6d

Please sign in to comment.