jackson/pages/_app.tsx

89 lines
2.2 KiB
TypeScript
Raw Normal View History

import type { AppProps } from 'next/app';
import type { Session } from 'next-auth';
import type { NextPage } from 'next';
import { SessionProvider } from 'next-auth/react';
import { useRouter } from 'next/router';
import { Toaster } from '@components/Toaster';
import { appWithTranslation } from 'next-i18next';
import { ReactElement, ReactNode } from 'react';
Setup Link Feature (#628) * Share setup link related changes 1. Setup link creation for saml connection 2. Setup link creation for Directory sync 3. Regeneration of Setup link 4. Ability to open setup link without login 5. Setup link opens up SAML connection page 6. Saml Connection page hides Tenant & Product fields * Saving SAML and OIDC configuration * showing the connection list on setup page * Connections CRUD * UI changes for Setup layout * semantics changes connection -> sso-connection * directory sync support for share link * showing only current tenant product directories * fixes mentioned in commnets by Aswin * prettier formatting * fixed route * minor fixes * Fix the layout rendering for the /setup routes * minor fixes * review changes * package lock changes * package json and lock changes * removed xmlbuilder * package lock changes * removed api call from ConnectionList component * Back button link fix * intermediate changes for Setup link list feature * setup link list related changes * UI fixes and actions * removed unwanted import * setup link list action hooked with correct functions * path rewrites, styling changes, toast regenerate & delete setup links * fixes for mutate * minor tweaks to clipboard icon * updated package-lock * formatting changes * removed console log * Added cusor pointer for action for LinkList component Removed unused variable & validation of empty token Removed redundent validation code linting fixes * Auto redirect in setup link page for sso-connection create form Delete icon on setup link list page on hover red color & tooltips * removed redirect and used isValidating * fixes for router replace * toast for setup links * fixes for dsync apis * redirect related change * removing redirect for sso-connection * fallback to error.message Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com> Co-authored-by: Kiran <kiran@boxyhq.com>
2022-12-13 21:41:27 +00:00
import micromatch from 'micromatch';
import nextI18NextConfig from '../next-i18next.config.js';
import { AccountLayout, SetupLinkLayout } from '@components/layouts';
import '@boxyhq/react-ui/dist/style.css';
Admin interface for Jackson (#71) * NextAuth + users providers * Add a temporary fix for verification token - don't use it in production * Admin ui files * Admin controller * getAll db apis * IdP provider page and api route * Fix padding * Style fixes * middleware to check session * Loading state handling * fetcher better response handling * Add new provider form and api route * Tab panel in client add form * Tab switching plus new fields * Flowbite config * darkMode with flowbite * Save config * Update route path to saml * Reusable component for add/edit * cleanup * Set Secret in NextAuth options * Prettier lint changes * Support for delete operation * Link update * PopUp Modal reusable component * Popup confirm before delete * disable SWR revalidation on focus * Display IdP metadata, clientID,secret * Header fixed positioning and style fixes * Filter raw XML in edit mode * Add name field to config * - Edit/New form delta - Split by newline - Route back after POST * Remove flowbite * Remove flowbite [cleanup] * Add description field * updateConfig implementation * Route PATCH to updateConfig * Naming change * Naming Client -> Connection * AddEdit component updates * Omit provider, returns full config * Destructure session first * Change to domain ACL * Delete unused component * Support glob and list of emails for ACL * Delete unused CSS * Update package lock * Remove flowbite from content source * Redirect to admin route * Check session in Layout and redirect to login * Logout in dropdown * vertical alignment * Show status message on save (edit) * Consolidate fields to one long vertical column * GetAll function for SQL and Add CreationDate and Modification Date for Mongo and SQL * Add name as header * Styling and opacity transition for status * Configure button style fix * overflow for smaller viewports and rounded border * Fallback to default behavior of useSession * Store, use and dispose (after signIn) verification token in db * Remove unused class * Rename Connections ➡ Configurations * Handle getAll and getConfig using slug * Better naming * Update fetch paths * Refactor getAllConfig ➡ getConfig (By Id) * Better naming * Rename saml ➡ samlconf * Use light theme by not defaulting to system theme * Path update /samlconf ➡ /saml/config * Fix path * Revert manual changes * getall funcationality and migration script * message * Updating migration file formating * message * Pull and fix package.json and lock file * correcting the migration script formatting * remove file * add new migration files * e2e with playwright * Better naming * Remove comment * Make headless * Run npm install from root * Add e2e steps in workflow * try with separate npm installs * Move higher in the pipeline to test * Fix quote * Rely on npx * fixed migration script formatting * spelling correction * headless for CI but false for local * Use secret * Type fixes for mongo * [skip ci] Swagger annotation for getConfig * Adding migration scriptis for all db's * added migration script to prettierignore * unformat migration script * removing postgress migration files * generate new migration files * remove wrong migration files * Add new migration files for mysql and mariadb * [skip ci] Swagger annotation for updateConfig * Return empty for update op * Update swagger spec * Fix type * Wait for mongo to start * Fix db_engine * Test with pg * Test with POSTGRES_DB env to auto create db * Swap install-deps with install * Use prod build * enable @ts-ignore * Test some fixes * Can be omitted in next-auth v4, uses secret * Move env to playwright config * authDbSeed script needs the db and other secrets * Typo * Bad typo day 😅 * Again typo * Set NEXTAUTH_URL * Use prod build in CI * Prefix the env for seeding * Try with inline * tidying up migration scripts * fixed migration scripts * Set env in actions yml * Remove comma * Target chromium * Prefix the env * Try inline in playwright * print env * Move build to action step * Remove console log * Let env sit on the job level * Add ACL * Fix attribute check * Add name field * add name in metadata preload config * Use postgres * Remove unneeded secret * Remove env/options from mongo service * Fix swagger * Update swagger spec * [skip ci] Fix eslint warning * Add updateConfig test * Add description to preloaded config * [skip ci] cleanup * minor fix * Update comment * Expose PATCH in config api * Added missing validation for clientSecret * Update swagger spec * updated example postgres url, updated deps * Redirect to saml config route * Remove unused pages/routes * Update in package lock * Add primary and secondary colors to tailwind * Swap icon * Remove text-color and apply default theme * Use the primary color from theme * Reusable custom class for btn-primary * Add link-primary reusable class * Use primary secondary colors for main logo * Show error status & color align with primary color * Show product if name is absent * Simplify required attribute setting, 'description' is not required * Make description optional * Fix placeholder text * Swagger updates * Add validation for description * Swagger - add missing status codes & descriptions * Update swagger artifact * Fix styling for status message * revalidate config on successful save * style text highlight globally * Fix cancel button style * Set the main height to 100%-headerHeight, add overflow * removed default ACL, if someone forgets to change it then we might have Tony Stark logging into everyones instances :) * print the arch/platform * Collect platform info * Disable swc and remove platform query steps * Try with custom babel config to disable swc * Add next.js build cache * Refactor step * trying swc * Make name parameter optional * Update form state from backend after save * port 5000 -> 5225 * Handle empty value case for ACL * bumped up version Co-authored-by: Kiran <kiran@boxyhq.com> Co-authored-by: Vishal Lodha <vishal@boxyhq.com> Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com> Co-authored-by: Utkarsh Mehta <ukrocks.mehta@gmail.com>
2022-02-22 19:03:21 +00:00
import '../styles/globals.css';
Add `@boxyhq/internal-ui` (#2305) * add WellKnownURLs * Fix translation keys * Update dependencies and add IdP Configuration * Update common.json with new translations * wip * Update @boxyhq/internal-ui version to 0.0.5 * add internal ui folder * Fix imports and build * Refactor internal-ui package structure * wip shared UI * Fix the build * Add new components and hooks for directory sync * lint fix * updated swr * users * Refactor shared components and fix API endpoints*** ***Update directory user page and add new federated SAML app * Fix lint * wip * Add new files and update existing files * Refactor DirectoryGroups and DirectoryInfo components * Update localization strings for directory UI * Update Google Auth URL description in common.json * Refactor directory tab and add delete functionality to webhook logs * Delete unused files and update dependencies * Fix column declaration * Add internal-ui/dist to .gitignore * Update page limit and add new dependencies * wip * Refactor directory search in user API endpoint * wip * Refactor directory retrieval logic in user and group API handlers * Add API endpoints for retrieving webhook events * Add query parameters to API URLs in DirectoryGroups * Add Google authorization status badge and handle pagination in FederatedSAMLApps * Add router prop to AppsList component and update page header titles * UI changes * Add new files and export functions * Remove unused router prop * Add PencilIcon to FederatedSAMLApps * Refactor FederatedSAMLApps and NewFederatedSAMLApp components * lint fix * add jose npm to dev dep * added missing strings * locale strings fix * locale strings cleanup * update package-lock * Add prepublish step * Build and publish npm and internal ui * Refactor install step * Run npm install (for local) inside internal ui automatically using prepare * Remove eslint setup for internal-ui * Add `--legacy-peer-deps` to prevent installing peer dependencies * Fix the types import path * wip * wip * Fix the types * Format * Update package-lock * Cleanup * Try adding jose library version 5.2.2 * COPY internal-ui before npm install * COPY internal-ui in builder stage * fixed sort order for jose --------- Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com> Co-authored-by: Aswin V <vaswin91@gmail.com>
2024-02-27 22:12:39 +00:00
import { BUIProvider } from '@boxyhq/internal-ui';
const unauthenticatedRoutes = [
'/',
'/admin/auth/login',
'/admin/auth/idp-login',
'/well-known/saml-configuration',
'/well-known/oidc-configuration',
'/well-known/idp-configuration',
'/oauth/jwks',
'/idp/select',
'/error',
'/well-known',
];
Setup Link Feature (#628) * Share setup link related changes 1. Setup link creation for saml connection 2. Setup link creation for Directory sync 3. Regeneration of Setup link 4. Ability to open setup link without login 5. Setup link opens up SAML connection page 6. Saml Connection page hides Tenant & Product fields * Saving SAML and OIDC configuration * showing the connection list on setup page * Connections CRUD * UI changes for Setup layout * semantics changes connection -> sso-connection * directory sync support for share link * showing only current tenant product directories * fixes mentioned in commnets by Aswin * prettier formatting * fixed route * minor fixes * Fix the layout rendering for the /setup routes * minor fixes * review changes * package lock changes * package json and lock changes * removed xmlbuilder * package lock changes * removed api call from ConnectionList component * Back button link fix * intermediate changes for Setup link list feature * setup link list related changes * UI fixes and actions * removed unwanted import * setup link list action hooked with correct functions * path rewrites, styling changes, toast regenerate & delete setup links * fixes for mutate * minor tweaks to clipboard icon * updated package-lock * formatting changes * removed console log * Added cusor pointer for action for LinkList component Removed unused variable & validation of empty token Removed redundent validation code linting fixes * Auto redirect in setup link page for sso-connection create form Delete icon on setup link list page on hover red color & tooltips * removed redirect and used isValidating * fixes for router replace * toast for setup links * fixes for dsync apis * redirect related change * removing redirect for sso-connection * fallback to error.message Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com> Co-authored-by: Kiran <kiran@boxyhq.com>
2022-12-13 21:41:27 +00:00
const isUnauthenticatedRoute = (pathname: string) => {
return micromatch.isMatch(pathname, unauthenticatedRoutes);
};
function MyApp({ Component, pageProps }: AppPropsWithLayout) {
Add `@boxyhq/internal-ui` (#2305) * add WellKnownURLs * Fix translation keys * Update dependencies and add IdP Configuration * Update common.json with new translations * wip * Update @boxyhq/internal-ui version to 0.0.5 * add internal ui folder * Fix imports and build * Refactor internal-ui package structure * wip shared UI * Fix the build * Add new components and hooks for directory sync * lint fix * updated swr * users * Refactor shared components and fix API endpoints*** ***Update directory user page and add new federated SAML app * Fix lint * wip * Add new files and update existing files * Refactor DirectoryGroups and DirectoryInfo components * Update localization strings for directory UI * Update Google Auth URL description in common.json * Refactor directory tab and add delete functionality to webhook logs * Delete unused files and update dependencies * Fix column declaration * Add internal-ui/dist to .gitignore * Update page limit and add new dependencies * wip * Refactor directory search in user API endpoint * wip * Refactor directory retrieval logic in user and group API handlers * Add API endpoints for retrieving webhook events * Add query parameters to API URLs in DirectoryGroups * Add Google authorization status badge and handle pagination in FederatedSAMLApps * Add router prop to AppsList component and update page header titles * UI changes * Add new files and export functions * Remove unused router prop * Add PencilIcon to FederatedSAMLApps * Refactor FederatedSAMLApps and NewFederatedSAMLApp components * lint fix * add jose npm to dev dep * added missing strings * locale strings fix * locale strings cleanup * update package-lock * Add prepublish step * Build and publish npm and internal ui * Refactor install step * Run npm install (for local) inside internal ui automatically using prepare * Remove eslint setup for internal-ui * Add `--legacy-peer-deps` to prevent installing peer dependencies * Fix the types import path * wip * wip * Fix the types * Format * Update package-lock * Cleanup * Try adding jose library version 5.2.2 * COPY internal-ui before npm install * COPY internal-ui in builder stage * fixed sort order for jose --------- Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com> Co-authored-by: Aswin V <vaswin91@gmail.com>
2024-02-27 22:12:39 +00:00
const router = useRouter();
const { pathname } = router;
const { session, ...props } = pageProps;
const getLayout = Component.getLayout;
// If a page level layout exists, use it
if (getLayout) {
return (
<>
{getLayout(<Component {...props} />)}
<Toaster />
</>
);
}
Setup Link Feature (#628) * Share setup link related changes 1. Setup link creation for saml connection 2. Setup link creation for Directory sync 3. Regeneration of Setup link 4. Ability to open setup link without login 5. Setup link opens up SAML connection page 6. Saml Connection page hides Tenant & Product fields * Saving SAML and OIDC configuration * showing the connection list on setup page * Connections CRUD * UI changes for Setup layout * semantics changes connection -> sso-connection * directory sync support for share link * showing only current tenant product directories * fixes mentioned in commnets by Aswin * prettier formatting * fixed route * minor fixes * Fix the layout rendering for the /setup routes * minor fixes * review changes * package lock changes * package json and lock changes * removed xmlbuilder * package lock changes * removed api call from ConnectionList component * Back button link fix * intermediate changes for Setup link list feature * setup link list related changes * UI fixes and actions * removed unwanted import * setup link list action hooked with correct functions * path rewrites, styling changes, toast regenerate & delete setup links * fixes for mutate * minor tweaks to clipboard icon * updated package-lock * formatting changes * removed console log * Added cusor pointer for action for LinkList component Removed unused variable & validation of empty token Removed redundent validation code linting fixes * Auto redirect in setup link page for sso-connection create form Delete icon on setup link list page on hover red color & tooltips * removed redirect and used isValidating * fixes for router replace * toast for setup links * fixes for dsync apis * redirect related change * removing redirect for sso-connection * fallback to error.message Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com> Co-authored-by: Kiran <kiran@boxyhq.com>
2022-12-13 21:41:27 +00:00
if (pathname.startsWith('/setup/')) {
return (
<SetupLinkLayout>
Setup Link Feature (#628) * Share setup link related changes 1. Setup link creation for saml connection 2. Setup link creation for Directory sync 3. Regeneration of Setup link 4. Ability to open setup link without login 5. Setup link opens up SAML connection page 6. Saml Connection page hides Tenant & Product fields * Saving SAML and OIDC configuration * showing the connection list on setup page * Connections CRUD * UI changes for Setup layout * semantics changes connection -> sso-connection * directory sync support for share link * showing only current tenant product directories * fixes mentioned in commnets by Aswin * prettier formatting * fixed route * minor fixes * Fix the layout rendering for the /setup routes * minor fixes * review changes * package lock changes * package json and lock changes * removed xmlbuilder * package lock changes * removed api call from ConnectionList component * Back button link fix * intermediate changes for Setup link list feature * setup link list related changes * UI fixes and actions * removed unwanted import * setup link list action hooked with correct functions * path rewrites, styling changes, toast regenerate & delete setup links * fixes for mutate * minor tweaks to clipboard icon * updated package-lock * formatting changes * removed console log * Added cusor pointer for action for LinkList component Removed unused variable & validation of empty token Removed redundent validation code linting fixes * Auto redirect in setup link page for sso-connection create form Delete icon on setup link list page on hover red color & tooltips * removed redirect and used isValidating * fixes for router replace * toast for setup links * fixes for dsync apis * redirect related change * removing redirect for sso-connection * fallback to error.message Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com> Co-authored-by: Kiran <kiran@boxyhq.com>
2022-12-13 21:41:27 +00:00
<Component {...props} />
<Toaster />
</SetupLinkLayout>
Setup Link Feature (#628) * Share setup link related changes 1. Setup link creation for saml connection 2. Setup link creation for Directory sync 3. Regeneration of Setup link 4. Ability to open setup link without login 5. Setup link opens up SAML connection page 6. Saml Connection page hides Tenant & Product fields * Saving SAML and OIDC configuration * showing the connection list on setup page * Connections CRUD * UI changes for Setup layout * semantics changes connection -> sso-connection * directory sync support for share link * showing only current tenant product directories * fixes mentioned in commnets by Aswin * prettier formatting * fixed route * minor fixes * Fix the layout rendering for the /setup routes * minor fixes * review changes * package lock changes * package json and lock changes * removed xmlbuilder * package lock changes * removed api call from ConnectionList component * Back button link fix * intermediate changes for Setup link list feature * setup link list related changes * UI fixes and actions * removed unwanted import * setup link list action hooked with correct functions * path rewrites, styling changes, toast regenerate & delete setup links * fixes for mutate * minor tweaks to clipboard icon * updated package-lock * formatting changes * removed console log * Added cusor pointer for action for LinkList component Removed unused variable & validation of empty token Removed redundent validation code linting fixes * Auto redirect in setup link page for sso-connection create form Delete icon on setup link list page on hover red color & tooltips * removed redirect and used isValidating * fixes for router replace * toast for setup links * fixes for dsync apis * redirect related change * removing redirect for sso-connection * fallback to error.message Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com> Co-authored-by: Kiran <kiran@boxyhq.com>
2022-12-13 21:41:27 +00:00
);
}
if (isUnauthenticatedRoute(pathname)) {
return <Component {...props} />;
}
Admin interface for Jackson (#71) * NextAuth + users providers * Add a temporary fix for verification token - don't use it in production * Admin ui files * Admin controller * getAll db apis * IdP provider page and api route * Fix padding * Style fixes * middleware to check session * Loading state handling * fetcher better response handling * Add new provider form and api route * Tab panel in client add form * Tab switching plus new fields * Flowbite config * darkMode with flowbite * Save config * Update route path to saml * Reusable component for add/edit * cleanup * Set Secret in NextAuth options * Prettier lint changes * Support for delete operation * Link update * PopUp Modal reusable component * Popup confirm before delete * disable SWR revalidation on focus * Display IdP metadata, clientID,secret * Header fixed positioning and style fixes * Filter raw XML in edit mode * Add name field to config * - Edit/New form delta - Split by newline - Route back after POST * Remove flowbite * Remove flowbite [cleanup] * Add description field * updateConfig implementation * Route PATCH to updateConfig * Naming change * Naming Client -> Connection * AddEdit component updates * Omit provider, returns full config * Destructure session first * Change to domain ACL * Delete unused component * Support glob and list of emails for ACL * Delete unused CSS * Update package lock * Remove flowbite from content source * Redirect to admin route * Check session in Layout and redirect to login * Logout in dropdown * vertical alignment * Show status message on save (edit) * Consolidate fields to one long vertical column * GetAll function for SQL and Add CreationDate and Modification Date for Mongo and SQL * Add name as header * Styling and opacity transition for status * Configure button style fix * overflow for smaller viewports and rounded border * Fallback to default behavior of useSession * Store, use and dispose (after signIn) verification token in db * Remove unused class * Rename Connections ➡ Configurations * Handle getAll and getConfig using slug * Better naming * Update fetch paths * Refactor getAllConfig ➡ getConfig (By Id) * Better naming * Rename saml ➡ samlconf * Use light theme by not defaulting to system theme * Path update /samlconf ➡ /saml/config * Fix path * Revert manual changes * getall funcationality and migration script * message * Updating migration file formating * message * Pull and fix package.json and lock file * correcting the migration script formatting * remove file * add new migration files * e2e with playwright * Better naming * Remove comment * Make headless * Run npm install from root * Add e2e steps in workflow * try with separate npm installs * Move higher in the pipeline to test * Fix quote * Rely on npx * fixed migration script formatting * spelling correction * headless for CI but false for local * Use secret * Type fixes for mongo * [skip ci] Swagger annotation for getConfig * Adding migration scriptis for all db's * added migration script to prettierignore * unformat migration script * removing postgress migration files * generate new migration files * remove wrong migration files * Add new migration files for mysql and mariadb * [skip ci] Swagger annotation for updateConfig * Return empty for update op * Update swagger spec * Fix type * Wait for mongo to start * Fix db_engine * Test with pg * Test with POSTGRES_DB env to auto create db * Swap install-deps with install * Use prod build * enable @ts-ignore * Test some fixes * Can be omitted in next-auth v4, uses secret * Move env to playwright config * authDbSeed script needs the db and other secrets * Typo * Bad typo day 😅 * Again typo * Set NEXTAUTH_URL * Use prod build in CI * Prefix the env for seeding * Try with inline * tidying up migration scripts * fixed migration scripts * Set env in actions yml * Remove comma * Target chromium * Prefix the env * Try inline in playwright * print env * Move build to action step * Remove console log * Let env sit on the job level * Add ACL * Fix attribute check * Add name field * add name in metadata preload config * Use postgres * Remove unneeded secret * Remove env/options from mongo service * Fix swagger * Update swagger spec * [skip ci] Fix eslint warning * Add updateConfig test * Add description to preloaded config * [skip ci] cleanup * minor fix * Update comment * Expose PATCH in config api * Added missing validation for clientSecret * Update swagger spec * updated example postgres url, updated deps * Redirect to saml config route * Remove unused pages/routes * Update in package lock * Add primary and secondary colors to tailwind * Swap icon * Remove text-color and apply default theme * Use the primary color from theme * Reusable custom class for btn-primary * Add link-primary reusable class * Use primary secondary colors for main logo * Show error status & color align with primary color * Show product if name is absent * Simplify required attribute setting, 'description' is not required * Make description optional * Fix placeholder text * Swagger updates * Add validation for description * Swagger - add missing status codes & descriptions * Update swagger artifact * Fix styling for status message * revalidate config on successful save * style text highlight globally * Fix cancel button style * Set the main height to 100%-headerHeight, add overflow * removed default ACL, if someone forgets to change it then we might have Tony Stark logging into everyones instances :) * print the arch/platform * Collect platform info * Disable swc and remove platform query steps * Try with custom babel config to disable swc * Add next.js build cache * Refactor step * trying swc * Make name parameter optional * Update form state from backend after save * port 5000 -> 5225 * Handle empty value case for ACL * bumped up version Co-authored-by: Kiran <kiran@boxyhq.com> Co-authored-by: Vishal Lodha <vishal@boxyhq.com> Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com> Co-authored-by: Utkarsh Mehta <ukrocks.mehta@gmail.com>
2022-02-22 19:03:21 +00:00
return (
Add `@boxyhq/internal-ui` (#2305) * add WellKnownURLs * Fix translation keys * Update dependencies and add IdP Configuration * Update common.json with new translations * wip * Update @boxyhq/internal-ui version to 0.0.5 * add internal ui folder * Fix imports and build * Refactor internal-ui package structure * wip shared UI * Fix the build * Add new components and hooks for directory sync * lint fix * updated swr * users * Refactor shared components and fix API endpoints*** ***Update directory user page and add new federated SAML app * Fix lint * wip * Add new files and update existing files * Refactor DirectoryGroups and DirectoryInfo components * Update localization strings for directory UI * Update Google Auth URL description in common.json * Refactor directory tab and add delete functionality to webhook logs * Delete unused files and update dependencies * Fix column declaration * Add internal-ui/dist to .gitignore * Update page limit and add new dependencies * wip * Refactor directory search in user API endpoint * wip * Refactor directory retrieval logic in user and group API handlers * Add API endpoints for retrieving webhook events * Add query parameters to API URLs in DirectoryGroups * Add Google authorization status badge and handle pagination in FederatedSAMLApps * Add router prop to AppsList component and update page header titles * UI changes * Add new files and export functions * Remove unused router prop * Add PencilIcon to FederatedSAMLApps * Refactor FederatedSAMLApps and NewFederatedSAMLApp components * lint fix * add jose npm to dev dep * added missing strings * locale strings fix * locale strings cleanup * update package-lock * Add prepublish step * Build and publish npm and internal ui * Refactor install step * Run npm install (for local) inside internal ui automatically using prepare * Remove eslint setup for internal-ui * Add `--legacy-peer-deps` to prevent installing peer dependencies * Fix the types import path * wip * wip * Fix the types * Format * Update package-lock * Cleanup * Try adding jose library version 5.2.2 * COPY internal-ui before npm install * COPY internal-ui in builder stage * fixed sort order for jose --------- Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com> Co-authored-by: Aswin V <vaswin91@gmail.com>
2024-02-27 22:12:39 +00:00
<BUIProvider value={{ router }}>
<SessionProvider session={session}>
<AccountLayout>
<Component {...props} />
<Toaster />
</AccountLayout>
</SessionProvider>
</BUIProvider>
Admin interface for Jackson (#71) * NextAuth + users providers * Add a temporary fix for verification token - don't use it in production * Admin ui files * Admin controller * getAll db apis * IdP provider page and api route * Fix padding * Style fixes * middleware to check session * Loading state handling * fetcher better response handling * Add new provider form and api route * Tab panel in client add form * Tab switching plus new fields * Flowbite config * darkMode with flowbite * Save config * Update route path to saml * Reusable component for add/edit * cleanup * Set Secret in NextAuth options * Prettier lint changes * Support for delete operation * Link update * PopUp Modal reusable component * Popup confirm before delete * disable SWR revalidation on focus * Display IdP metadata, clientID,secret * Header fixed positioning and style fixes * Filter raw XML in edit mode * Add name field to config * - Edit/New form delta - Split by newline - Route back after POST * Remove flowbite * Remove flowbite [cleanup] * Add description field * updateConfig implementation * Route PATCH to updateConfig * Naming change * Naming Client -> Connection * AddEdit component updates * Omit provider, returns full config * Destructure session first * Change to domain ACL * Delete unused component * Support glob and list of emails for ACL * Delete unused CSS * Update package lock * Remove flowbite from content source * Redirect to admin route * Check session in Layout and redirect to login * Logout in dropdown * vertical alignment * Show status message on save (edit) * Consolidate fields to one long vertical column * GetAll function for SQL and Add CreationDate and Modification Date for Mongo and SQL * Add name as header * Styling and opacity transition for status * Configure button style fix * overflow for smaller viewports and rounded border * Fallback to default behavior of useSession * Store, use and dispose (after signIn) verification token in db * Remove unused class * Rename Connections ➡ Configurations * Handle getAll and getConfig using slug * Better naming * Update fetch paths * Refactor getAllConfig ➡ getConfig (By Id) * Better naming * Rename saml ➡ samlconf * Use light theme by not defaulting to system theme * Path update /samlconf ➡ /saml/config * Fix path * Revert manual changes * getall funcationality and migration script * message * Updating migration file formating * message * Pull and fix package.json and lock file * correcting the migration script formatting * remove file * add new migration files * e2e with playwright * Better naming * Remove comment * Make headless * Run npm install from root * Add e2e steps in workflow * try with separate npm installs * Move higher in the pipeline to test * Fix quote * Rely on npx * fixed migration script formatting * spelling correction * headless for CI but false for local * Use secret * Type fixes for mongo * [skip ci] Swagger annotation for getConfig * Adding migration scriptis for all db's * added migration script to prettierignore * unformat migration script * removing postgress migration files * generate new migration files * remove wrong migration files * Add new migration files for mysql and mariadb * [skip ci] Swagger annotation for updateConfig * Return empty for update op * Update swagger spec * Fix type * Wait for mongo to start * Fix db_engine * Test with pg * Test with POSTGRES_DB env to auto create db * Swap install-deps with install * Use prod build * enable @ts-ignore * Test some fixes * Can be omitted in next-auth v4, uses secret * Move env to playwright config * authDbSeed script needs the db and other secrets * Typo * Bad typo day 😅 * Again typo * Set NEXTAUTH_URL * Use prod build in CI * Prefix the env for seeding * Try with inline * tidying up migration scripts * fixed migration scripts * Set env in actions yml * Remove comma * Target chromium * Prefix the env * Try inline in playwright * print env * Move build to action step * Remove console log * Let env sit on the job level * Add ACL * Fix attribute check * Add name field * add name in metadata preload config * Use postgres * Remove unneeded secret * Remove env/options from mongo service * Fix swagger * Update swagger spec * [skip ci] Fix eslint warning * Add updateConfig test * Add description to preloaded config * [skip ci] cleanup * minor fix * Update comment * Expose PATCH in config api * Added missing validation for clientSecret * Update swagger spec * updated example postgres url, updated deps * Redirect to saml config route * Remove unused pages/routes * Update in package lock * Add primary and secondary colors to tailwind * Swap icon * Remove text-color and apply default theme * Use the primary color from theme * Reusable custom class for btn-primary * Add link-primary reusable class * Use primary secondary colors for main logo * Show error status & color align with primary color * Show product if name is absent * Simplify required attribute setting, 'description' is not required * Make description optional * Fix placeholder text * Swagger updates * Add validation for description * Swagger - add missing status codes & descriptions * Update swagger artifact * Fix styling for status message * revalidate config on successful save * style text highlight globally * Fix cancel button style * Set the main height to 100%-headerHeight, add overflow * removed default ACL, if someone forgets to change it then we might have Tony Stark logging into everyones instances :) * print the arch/platform * Collect platform info * Disable swc and remove platform query steps * Try with custom babel config to disable swc * Add next.js build cache * Refactor step * trying swc * Make name parameter optional * Update form state from backend after save * port 5000 -> 5225 * Handle empty value case for ACL * bumped up version Co-authored-by: Kiran <kiran@boxyhq.com> Co-authored-by: Vishal Lodha <vishal@boxyhq.com> Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com> Co-authored-by: Utkarsh Mehta <ukrocks.mehta@gmail.com>
2022-02-22 19:03:21 +00:00
);
}
export default appWithTranslation<never>(MyApp, nextI18NextConfig);
export type AppPropsWithLayout = AppProps & {
Component: NextPageWithLayout;
pageProps: {
session?: Session;
};
};
export type NextPageWithLayout<P = Record<string, unknown>> = NextPage<P> & {
getLayout?: (page: ReactElement) => ReactNode;
};