From 09c9cf8b46c37139fafa7f90e85d0ad3983a69a8 Mon Sep 17 00:00:00 2001 From: Nicolas Beaussart Date: Wed, 25 Jan 2023 21:53:48 +0100 Subject: [PATCH] frontend: apply prettier PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7668 GitOrigin-RevId: 0ed901780092994ae40c2c57557c5854812a91b2 --- .git-blame-ignore-revs | 1 + frontend/.gitignore | 3 + frontend/.prettierignore | 4 + frontend/.vscode/settings.json | 1 - frontend/README.md | 3 +- frontend/apps/console-ce-e2e/README.md | 1 + .../src/e2e/_onboarding/snapshots.js | 4 +- .../src/e2e/actions/query/snapshots.js | 4 +- .../requests/waitForPostCreationRequests.ts | 134 +- .../e2e/actions/withTransform/snapshots.js | 227 +- .../src/e2e/api-explorer/graphql/snapshots.js | 4 +- .../src/e2e/data/404/snapshots.js | 4 +- .../src/e2e/data/computed-fields/snapshots.js | 4 +- .../src/e2e/data/create-table/snapshots.js | 4 +- .../src/e2e/data/create-table/spec.ts | 4 +- .../e2e/data/custom-functions/snapshots.js | 4 +- .../src/e2e/data/functions/snapshots.js | 4 +- .../src/e2e/data/insert-browse/snapshots.js | 4 +- .../src/e2e/data/manage-database/snapshots.js | 4 +- .../e2e/data/materialized-views/snapshots.js | 4 +- .../src/e2e/data/migration-mode/snapshots.js | 4 +- .../src/e2e/data/migration-mode/utils.ts | 8 +- .../src/e2e/data/modify/snapshots.js | 4 +- .../src/e2e/data/modify/spec.ts | 4 +- .../src/e2e/data/permissions/snapshots.js | 4 +- .../src/e2e/data/permissions/spec.ts | 13 +- .../src/e2e/data/raw-sql/snapshots.js | 4 +- .../src/e2e/data/relationships/snapshots.js | 4 +- .../e2e/data/template-gallery/snapshots.js | 4 +- .../src/e2e/data/views/snapshots.js | 4 +- .../src/e2e/db-compatibility/snapshots.js | 4 +- .../e2e/events/create-trigger/snapshots.js | 4 +- .../e2e/events/one-off-trigger/snapshots.js | 4 +- .../create-remote-schema/snapshots.js | 4 +- .../create-remote-schema/spec.ts | 112 +- .../remote-schemas/edit-schema/snapshots.js | 4 +- .../remote-schema-relationships/snapshots.js | 4 +- .../rs-to-db-relationships/snapshots.js | 4 +- .../rs-to-rs-relationships/snapshots.js | 4 +- .../metadata/insecure-domain/snapshots.js | 4 +- .../src/e2e/settings/metadata/snapshots.js | 4 +- .../fixtures/initialRequests/config.ts | 2 +- .../src/e2e/tracing/api-graphiql/snapshots.js | 4 +- .../apps/console-ce-e2e/src/helpers/common.ts | 2 +- .../src/helpers/remoteSchemaHelpers.ts | 3 +- .../src/helpers/webhookTransformHelpers.ts | 7 +- .../contractIntercept/helpers/snapshots.js | 4 +- frontend/apps/console-ce/project.json | 4 +- frontend/apps/console-ce/src/index.html | 48 +- frontend/apps/console-ee/project.json | 4 +- frontend/apps/console-ee/src/index.html | 4 +- .../libs/console/legacy-ce/.eslintrc.json | 5 +- .../legacy-ce/.storybook/preview-body.html | 3 +- .../console/legacy-ce/.storybook/preview.js | 8 +- .../src/lib/components/App/App.module.scss | 2 +- .../lib/components/Common/Common.module.scss | 2 +- .../ConfigureTransformation.tsx | 394 +- .../CustomInputAutoSuggest.tsx | 5 +- .../CustomInputTypes/CustomInput.module.scss | 4 +- .../Common/Dropdown/Dropdown.module.scss | 10 +- .../FilterQuery/FilterQuery.module.scss | 7 +- .../Common/Headers/Headers.module.scss | 4 +- .../ExpandableEditor/Editor.module.scss | 4 +- .../LeftSubSidebar/LeftSubSidebar.module.scss | 3 +- .../Layout/ReusableHeader/Header.module.scss | 2 +- .../ReusableTabs/ReusableTabs.module.scss | 2 +- .../RightContainer/RightContainer.module.scss | 7 +- .../QueryBuilderJson.module.scss | 5 +- .../TextAreaWithCopy.module.scss | 63 +- .../Common/Tooltip/Tooltip.module.scss | 4 +- .../WarningSymbol/WarningSymbol.module.scss | 4 +- .../lib/components/Common/utils/jsUtils.tsx | 2 +- .../Services/Actions/Actions.module.scss | 30 +- .../Services/Actions/Types/Styles.scss | 2 +- .../Services/ApiExplorer/Rest/utils.ts | 4 +- .../Security/Introspection/index.tsx | 43 +- .../Services/Common/Landing/Popup.module.scss | 15 +- .../Notification/Notification.module.scss | 2 +- .../FrequentlyUsedColumnSelector.tsx | 77 +- .../parts/CumulativeMaxConnections.tsx | 87 +- .../GraphQLFieldCustomization.stories.tsx | 5 +- .../GraphQLFieldCustomizationContainer.tsx | 59 +- .../Data/Migrations/Migrations.module.scss | 2 +- .../TemplateGallery.module.scss | 7 +- .../TableTrackingCustomizationContainer.tsx | 134 +- .../TableTrackingCustomizationForm.tsx | 219 +- .../TableTrackingCustomizationModal.tsx | 73 +- .../PermissionBuilder.module.scss | 8 +- .../TablePermissions/Permissions.module.scss | 18 +- .../lib/components/Services/Data/custom.css | 2 +- .../TableCommon/EventTable.module.scss | 16 +- .../Events/__tests__/fixtures/events.json | 2 +- .../__tests__/fixtures/invocations.json | 442 +- .../__tests__/fixtures/schema3.json | 2122 +++-- .../RemoteSchema/RemoteSchema.module.scss | 2 +- .../InheritedRoles/InheritedRolesEditor.tsx | 2 +- .../Services/Settings/Sidebar.stories.tsx | 26 +- .../legacy-ce/src/lib/dataSources/index.ts | 2 +- .../OASGenerator/OASGeneratorMoreInfo.tsx | 65 +- .../AllowListSidebarSearchForm.tsx | 53 +- .../QueryCollectionCreateDialog.tsx | 131 +- .../AllowListSidebar/QueryCollectionItem.tsx | 43 +- .../components/Analytics.stories.tsx | 23 +- .../parts/ReactTableWrapper.stories.tsx | 102 +- .../ControlPlane/generatedGraphQLTypes.ts | 10 +- .../LocalRelationshipWidget.stories.tsx | 10 +- .../RemoteDBRelationshipWidget.stories.tsx | 24 +- .../RenderWidget/RenderWidget.stories.tsx | 23 +- .../src/lib/features/MetadataAPI/types.ts | 2 +- .../stories/ObjectInput.stories.tsx | 264 +- .../components/CollapsibleFieldWrapper.tsx | 55 +- .../components/Header/Badge/Badge.stories.tsx | 15 +- .../components/Header/Hero/Hero.stories.tsx | 10 +- .../Permissions/PermissionsForm/api/utils.ts | 2 +- .../components/ClonePermissions.tsx | 143 +- .../components/ColumnPermissions.tsx | 279 +- .../RootFieldPermissions.tsx | 276 +- .../components/RowPermissions.tsx | 61 +- .../RowPermissionBuilder.stories.tsx | 10 +- .../components/Builder.tsx | 39 +- .../hooks/submitHooks/useBulkDelete.tsx | 2 +- .../PermissionsTable/PermissionsTable.tsx | 2 +- .../PermissionsTable/hooks/usePermissions.tsx | 2 +- .../lib/features/Permissions/utils/index.ts | 2 +- .../QueryCollectionHeader.tsx | 97 +- .../QueryCollectionHeaderMenu.tsx | 237 +- .../QueryCollectionRenameDialog.tsx | 132 +- .../QueryCollectionOperationDialog.tsx | 23 +- .../QueryCollectionOperations.tsx | 285 +- .../QueryCollectionOperationsHeader.tsx | 337 +- .../QueryCollectionOperationsSearchForm.tsx | 25 +- .../RemoteSchemaToDBForm.stories.tsx | 5 +- ...RemoteSchemaToRemoteSchemaForm.stories.tsx | 10 +- .../components/RemoteSchemaTree/index.css | 1075 +-- .../RemoteSchemaWidget.stories.tsx | 5 +- .../hooks/familiaritySurveyOptionDetails.tsx | 2 +- .../useNonTrackableFunctions.stories.tsx | 9 +- .../legacy-ce/src/lib/metadata/queryUtils.ts | 2 +- .../Collapsible/Collapsible.stories.tsx | 13 +- .../Form/AdvancedSelectField.stories.tsx | 238 +- .../Form/CheckboxesField.stories.tsx | 326 +- .../Form/CodeEditorField.stories.tsx | 181 +- .../Form/FieldWrapper.stories.tsx | 42 +- .../Tooltip/IconTooltip.stories.tsx | 5 +- .../legacy-ce/src/lib/theme/variables.scss | 6 +- .../components/AccessDenied/AccessDenied.js | 5 +- .../lib/components/Login/Login.module.scss | 105 +- .../src/lib/components/Login/utils.js | 5 +- .../src/lib/components/Main/Actions.js | 270 +- .../src/lib/components/Main/HeaderNavItem.js | 22 +- .../legacy-ee/src/lib/components/Main/Main.js | 105 +- .../src/lib/components/Main/State.js | 7 +- .../components/OAuthCallback/LoadingScreen.js | 17 +- .../OAuthCallback/OAuthCallback.module.scss | 6 +- .../components/OAuthCallback/loader-logo.json | 422 +- .../components/Services/Metrics/Actions.js | 5 +- .../Services/Metrics/AllowLists/Actions.js | 122 +- .../AllowLists/AddOperationsToAllowList.js | 7 +- .../DeleteOperationsFromAllowList.js | 18 +- .../Services/Metrics/Common/ActionsPanel.js | 4 +- .../Metrics/Common/DeleteOperations.js | 4 +- .../Metrics/Common/LoadingSpinner.scss | 2 +- .../Services/Metrics/Metrics.module.scss | 16 +- .../Services/Metrics/MetricsV1.module.scss | 8 +- .../Services/Metrics/Operations/BrowseRows.js | 9 +- .../Metrics/Operations/LoadInspector.js | 10 +- .../Services/Metrics/Operations/utils.js | 2 +- .../Services/Metrics/Overview/ActionsItem.js | 5 +- .../Metrics/Overview/DataSourceItem.js | 5 +- .../Services/Metrics/Overview/SourceHealth.js | 22 +- .../Services/Metrics/Overview/TopRequests.js | 20 +- .../Services/Metrics/Overview/index.js | 4 +- .../RegressionTests/BrowseAllOperations.js | 1 - .../RegressionTests/BrowseTestRunPreview.js | 12 +- .../Metrics/RegressionTests/BrowseTests.js | 5 +- .../RegressionTests/ContentWithTestSuite.js | 5 +- .../RegressionTests/RegressionTests.js | 20 +- .../Metrics/RegressionTests/RunTests.js | 14 +- .../RegressionTests/RunTestsWrapper.js | 12 +- .../Metrics/RegressionTests/TestRunDetails.js | 8 +- .../components/Services/Metrics/RightPanel.js | 9 +- .../Services/Metrics/StatsPanel/CheckBox.js | 7 +- .../StatsPanel/Filter/DropdownComponent.js | 2 +- .../Services/Metrics/StatsPanel/StatsPanel.js | 3 +- .../Metrics/SubscriptionWorkers/BrowseRows.js | 15 +- .../SubscriptionWorkers/LoadInspector.js | 4 +- .../Metrics/SubscriptionWorkers/Modal.js | 1 - .../SubscriptionWorkersOverTime.js | 12 +- .../Metrics/SubscriptionWorkers/constants.js | 2 +- .../SubscriptionWorkers/graphql.queries.js | 8 +- .../Metrics/SubscriptionWorkers/utils.js | 10 +- .../legacy-ee/src/lib/helpers/versionUtils.js | 1 - .../src/lib/theme/legacy-boostrap.css | 7263 +++++++++-------- .../legacy-ee/src/lib/theme/tailwind.css | 4 +- .../legacy-ee/src/lib/theme/variables.scss | 6 +- .../legacy-ee/src/lib/utils/appCues.js | 1 - .../legacy-ee/src/lib/utils/computeAccess.js | 1 - .../console/legacy-ee/src/lib/utils/data.js | 67 +- .../legacy-ee/src/lib/utils/preLoginHook.js | 13 +- .../legacy-ee/src/lib/utils/upsertToLS.js | 6 +- .../console/legacy-ee/src/lib/utils/utils.js | 1 - .../legacy-ee/src/lib/utils/validateLogin.js | 17 +- .../libs/nx/internal-plugin/generators.json | 3 +- .../static/images/favicon/site.webmanifest | 24 +- frontend/static/mockServiceWorker.js | 172 +- 205 files changed, 9502 insertions(+), 8807 deletions(-) diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 2fd7efe262b1f..c921b1e3a2a41 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -1,2 +1,3 @@ 11a454c2d69bb05c3471be0d04d2282cc93a557e # reformat with Ormolu 342391f39dd68dd7922ef29215e150dca7811975 # reformat with Ormolu v0.5.0.1 +fb19d80e16092186c6aa61bf90b3d1a55644a5a7 # Prettier reformat \ No newline at end of file diff --git a/frontend/.gitignore b/frontend/.gitignore index 85c0bdce380d5..2a8186aade250 100644 --- a/frontend/.gitignore +++ b/frontend/.gitignore @@ -42,3 +42,6 @@ Thumbs.db # Env .env + +# This is a snapshot generated during npm install, but not needed +/snapshots.js diff --git a/frontend/.prettierignore b/frontend/.prettierignore index 7c17225cbf0d8..5dd38d52af90e 100644 --- a/frontend/.prettierignore +++ b/frontend/.prettierignore @@ -3,3 +3,7 @@ /dist /coverage /docs +/apps/console-ce/src/assets/ +/apps/console-ee/src/assets/ +/apps/console-ce-e2e/**/snapshots.js +/snapshots.js diff --git a/frontend/.vscode/settings.json b/frontend/.vscode/settings.json index 78f75ff407979..76000a4633639 100644 --- a/frontend/.vscode/settings.json +++ b/frontend/.vscode/settings.json @@ -2,7 +2,6 @@ "eslint.validate": ["json"], "cSpell.words": ["clsx"], "tailwindCSS.experimental.classRegex": [ - "tw\\w+ ?= ?`([^`]*)`", "tw\\w+: ?`([^`]*)`" ], diff --git a/frontend/README.md b/frontend/README.md index 0015b6333c804..e5bf462100124 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -6,8 +6,7 @@ Visit the [Nx Documentation](https://nx.dev) to learn more about it. This `frontend` monorepo contains the Hasura Console, in all the possible modes. - -*Last import [2023-01-12](https://github.com/hasura/graphql-engine-mono/tree/a8cbb297437e4c2d9ba4cab5da1e464d4eac43e4)* +_Last import [2023-01-12](https://github.com/hasura/graphql-engine-mono/tree/a8cbb297437e4c2d9ba4cab5da1e464d4eac43e4)_ ## Nx Console diff --git a/frontend/apps/console-ce-e2e/README.md b/frontend/apps/console-ce-e2e/README.md index cad00a317c719..9119e4a171550 100644 --- a/frontend/apps/console-ce-e2e/README.md +++ b/frontend/apps/console-ce-e2e/README.md @@ -1,6 +1,7 @@ # Test ## Useful resources + - [Cypress Dashboard for the Console project](https://dashboard.cypress.io/projects/5yiuic) ## Running all tests to generate coverage diff --git a/frontend/apps/console-ce-e2e/src/e2e/_onboarding/snapshots.js b/frontend/apps/console-ce-e2e/src/e2e/_onboarding/snapshots.js index 8da2139bc8871..7aa8db71f5271 100644 --- a/frontend/apps/console-ce-e2e/src/e2e/_onboarding/snapshots.js +++ b/frontend/apps/console-ce-e2e/src/e2e/_onboarding/snapshots.js @@ -1,3 +1,3 @@ module.exports = { - "__version": "10.4.0" -} + __version: '10.4.0', +}; diff --git a/frontend/apps/console-ce-e2e/src/e2e/actions/query/snapshots.js b/frontend/apps/console-ce-e2e/src/e2e/actions/query/snapshots.js index 8da2139bc8871..7aa8db71f5271 100644 --- a/frontend/apps/console-ce-e2e/src/e2e/actions/query/snapshots.js +++ b/frontend/apps/console-ce-e2e/src/e2e/actions/query/snapshots.js @@ -1,3 +1,3 @@ module.exports = { - "__version": "10.4.0" -} + __version: '10.4.0', +}; diff --git a/frontend/apps/console-ce-e2e/src/e2e/actions/query/utils/requests/waitForPostCreationRequests.ts b/frontend/apps/console-ce-e2e/src/e2e/actions/query/utils/requests/waitForPostCreationRequests.ts index 3309d57afd4fe..277804831fec5 100644 --- a/frontend/apps/console-ce-e2e/src/e2e/actions/query/utils/requests/waitForPostCreationRequests.ts +++ b/frontend/apps/console-ce-e2e/src/e2e/actions/query/utils/requests/waitForPostCreationRequests.ts @@ -37,71 +37,71 @@ * @see https://github.com/bahmutov/cypress-network-idle */ - import 'cypress-wait-until'; - - export function waitForPostCreationRequests() { - let waitCompleted = false; - - cy.log('*--- All requests must be settled*'); - - const pendingRequests = new Map(); - cy.intercept('POST', 'http://localhost:8080/v1/metadata', req => { - if (waitCompleted) return; - - Cypress.log({ message: '*--- Request pending*' }); - - pendingRequests.set(req, true); - - req.continue(() => { - Cypress.log({ message: '*--- Request settled*' }); - - pendingRequests.delete(req); - }); - }); - - Cypress.log({ message: '*--- Waiting for the first request to start*' }); - - // Check if at least one request has been caught. This check must protect from the following case - // - // check requests start test failure, the requests got the UI re-rendered - // | | | - // |--🚦🔴----⚠️---🚦🟢-------1-2-3-4-5-6-7-1----------💥 - // - // where checking that "there are no pending requests" falls in the false positive case where - // there are no pending requests because no one started at all. - // - // The check runs every millisecond to be 100% sure that no request can escape (ex. because of a - // super fast server). A false-negative case represented here - // - // requests start requests end check check test failure, no first request caught - // | | | | | | | - // |--🚦🔴--1-2-3-4-5-6-7-1-2-3-4-5-6-7--⚠️------------------⚠️------------------💥 - cy.waitUntil(() => pendingRequests.size > 0, { - timeout: 5000, // 5 seconds is the default Cypress wait for a request to start - interval: 1, - errorMsg: 'No first request caught', - }); - - Cypress.log({ message: '*--- Waiting for all the requests to start*' }); - - // Let pass some time to collect all the requests. Otherwise, it could detect that the first - // request complete and go on with the test, even if another one will be performed in a while. - // - // This fixed wait protects from the following timeline - // - // 1st request start first request end other requests start test failure, the requests got the UI re-rendered - // | | | | - // |--🚦🔴---1---------------------1----🚦🟢----------------2-3-4-5-6-7-1----------💥 - // - // Obviously, it is an empiric waiting, that also slows down the test. - cy.wait(500); - - Cypress.log({ message: '*--- Waiting for all the requests to be settled*' }); - - cy.waitUntil(() => pendingRequests.size === 0, { - timeout: 30000, // 30 seconds is the default Cypress wait for the request to complete - errorMsg: 'Some requests are not settled yet', - }).then(() => { - waitCompleted = true; +import 'cypress-wait-until'; + +export function waitForPostCreationRequests() { + let waitCompleted = false; + + cy.log('*--- All requests must be settled*'); + + const pendingRequests = new Map(); + cy.intercept('POST', 'http://localhost:8080/v1/metadata', req => { + if (waitCompleted) return; + + Cypress.log({ message: '*--- Request pending*' }); + + pendingRequests.set(req, true); + + req.continue(() => { + Cypress.log({ message: '*--- Request settled*' }); + + pendingRequests.delete(req); }); - } \ No newline at end of file + }); + + Cypress.log({ message: '*--- Waiting for the first request to start*' }); + + // Check if at least one request has been caught. This check must protect from the following case + // + // check requests start test failure, the requests got the UI re-rendered + // | | | + // |--🚦🔴----⚠️---🚦🟢-------1-2-3-4-5-6-7-1----------💥 + // + // where checking that "there are no pending requests" falls in the false positive case where + // there are no pending requests because no one started at all. + // + // The check runs every millisecond to be 100% sure that no request can escape (ex. because of a + // super fast server). A false-negative case represented here + // + // requests start requests end check check test failure, no first request caught + // | | | | | | | + // |--🚦🔴--1-2-3-4-5-6-7-1-2-3-4-5-6-7--⚠️------------------⚠️------------------💥 + cy.waitUntil(() => pendingRequests.size > 0, { + timeout: 5000, // 5 seconds is the default Cypress wait for a request to start + interval: 1, + errorMsg: 'No first request caught', + }); + + Cypress.log({ message: '*--- Waiting for all the requests to start*' }); + + // Let pass some time to collect all the requests. Otherwise, it could detect that the first + // request complete and go on with the test, even if another one will be performed in a while. + // + // This fixed wait protects from the following timeline + // + // 1st request start first request end other requests start test failure, the requests got the UI re-rendered + // | | | | + // |--🚦🔴---1---------------------1----🚦🟢----------------2-3-4-5-6-7-1----------💥 + // + // Obviously, it is an empiric waiting, that also slows down the test. + cy.wait(500); + + Cypress.log({ message: '*--- Waiting for all the requests to be settled*' }); + + cy.waitUntil(() => pendingRequests.size === 0, { + timeout: 30000, // 30 seconds is the default Cypress wait for the request to complete + errorMsg: 'Some requests are not settled yet', + }).then(() => { + waitCompleted = true; + }); +} diff --git a/frontend/apps/console-ce-e2e/src/e2e/actions/withTransform/snapshots.js b/frontend/apps/console-ce-e2e/src/e2e/actions/withTransform/snapshots.js index ce6010fa0e537..bb40077f36bf8 100644 --- a/frontend/apps/console-ce-e2e/src/e2e/actions/withTransform/snapshots.js +++ b/frontend/apps/console-ce-e2e/src/e2e/actions/withTransform/snapshots.js @@ -1,123 +1,128 @@ module.exports = { - "__version": "10.4.0", - "Actions with Transform": { - "When the users create, and delete a Action with Transform, everything should work": { - "Action payload": { - "bodyToSnapshot": [ - { - "type": "set_custom_types", - "args": { - "scalars": [], - "input_objects": [], - "objects": [ - { - "name": "LoginResponse", - "description": null, - "fields": [ - { - "name": "accessToken", - "type": "String!", - "description": null - } - ] - } - ], - "enums": [] - } - }, - { - "type": "create_action", - "args": { - "name": "login", - "definition": { - "arguments": [ + __version: '10.4.0', + 'Actions with Transform': { + 'When the users create, and delete a Action with Transform, everything should work': + { + 'Action payload': { + bodyToSnapshot: [ + { + type: 'set_custom_types', + args: { + scalars: [], + input_objects: [], + objects: [ { - "name": "username", - "type": "String!", - "description": null + name: 'LoginResponse', + description: null, + fields: [ + { + name: 'accessToken', + type: 'String!', + description: null, + }, + ], }, - { - "name": "password", - "type": "String!", - "description": null - } ], - "kind": "synchronous", - "output_type": "LoginResponse", - "handler": "https://hasura-actions-demo.glitch.me", - "type": "mutation", - "headers": [], - "forward_client_headers": false, - "timeout": null, - "request_transform": { - "version": 2, - "template_engine": "Kriti", - "method": "POST", - "url": "{{$base_url}}/{{$body.action.name}}", - "query_params": { - "id": "5", - "name": "{{$body.action.name}}" + enums: [], + }, + }, + { + type: 'create_action', + args: { + name: 'login', + definition: { + arguments: [ + { + name: 'username', + type: 'String!', + description: null, + }, + { + name: 'password', + type: 'String!', + description: null, + }, + ], + kind: 'synchronous', + output_type: 'LoginResponse', + handler: 'https://hasura-actions-demo.glitch.me', + type: 'mutation', + headers: [], + forward_client_headers: false, + timeout: null, + request_transform: { + version: 2, + template_engine: 'Kriti', + method: 'POST', + url: '{{$base_url}}/{{$body.action.name}}', + query_params: { + id: '5', + name: '{{$body.action.name}}', + }, + body: { + action: 'transform', + template: + '{\n "userInfo": {\n "name": {{$body.input.username}},\n "password": {{$body.input.password}},\n "type": {{$body.action.name}}\n \n }\n}', + }, }, - "body": { - "action": "transform", - "template": "{\n \"userInfo\": {\n \"name\": {{$body.input.username}},\n \"password\": {{$body.input.password}},\n \"type\": {{$body.action.name}}\n \n }\n}" - } - }, - "response_transform": { - "version": 2, - "body": { - "action": "transform", - "template": "{\n \"userInfo\": {\n \"name\": {{$body.input.username}},\n \"password\": {{$body.input.password}},\n \"type\": {{$body.action.name}}\n \n }\n}" + response_transform: { + version: 2, + body: { + action: 'transform', + template: + '{\n "userInfo": {\n "name": {{$body.input.username}},\n "password": {{$body.input.password}},\n "type": {{$body.action.name}}\n \n }\n}', + }, + template_engine: 'Kriti', }, - "template_engine": "Kriti" - } + }, + comment: null, }, - "comment": null - } - } - ] - }, - "Action metadata": { - "name": "login", - "definition": { - "handler": "https://hasura-actions-demo.glitch.me", - "output_type": "LoginResponse", - "arguments": [ - { - "name": "username", - "type": "String!" }, - { - "name": "password", - "type": "String!" - } ], - "request_transform": { - "body": { - "action": "transform", - "template": "{\n \"userInfo\": {\n \"name\": {{$body.input.username}},\n \"password\": {{$body.input.password}},\n \"type\": {{$body.action.name}}\n \n }\n}" - }, - "method": "POST", - "query_params": { - "id": "5", - "name": "{{$body.action.name}}" + }, + 'Action metadata': { + name: 'login', + definition: { + handler: 'https://hasura-actions-demo.glitch.me', + output_type: 'LoginResponse', + arguments: [ + { + name: 'username', + type: 'String!', + }, + { + name: 'password', + type: 'String!', + }, + ], + request_transform: { + body: { + action: 'transform', + template: + '{\n "userInfo": {\n "name": {{$body.input.username}},\n "password": {{$body.input.password}},\n "type": {{$body.action.name}}\n \n }\n}', + }, + method: 'POST', + query_params: { + id: '5', + name: '{{$body.action.name}}', + }, + template_engine: 'Kriti', + url: '{{$base_url}}/{{$body.action.name}}', + version: 2, }, - "template_engine": "Kriti", - "url": "{{$base_url}}/{{$body.action.name}}", - "version": 2 - }, - "response_transform": { - "body": { - "action": "transform", - "template": "{\n \"userInfo\": {\n \"name\": {{$body.input.username}},\n \"password\": {{$body.input.password}},\n \"type\": {{$body.action.name}}\n \n }\n}" + response_transform: { + body: { + action: 'transform', + template: + '{\n "userInfo": {\n "name": {{$body.input.username}},\n "password": {{$body.input.password}},\n "type": {{$body.action.name}}\n \n }\n}', + }, + template_engine: 'Kriti', + version: 2, }, - "template_engine": "Kriti", - "version": 2 + type: 'mutation', + kind: 'synchronous', }, - "type": "mutation", - "kind": "synchronous" - } - } - } - } -} + }, + }, + }, +}; diff --git a/frontend/apps/console-ce-e2e/src/e2e/api-explorer/graphql/snapshots.js b/frontend/apps/console-ce-e2e/src/e2e/api-explorer/graphql/snapshots.js index 8da2139bc8871..7aa8db71f5271 100644 --- a/frontend/apps/console-ce-e2e/src/e2e/api-explorer/graphql/snapshots.js +++ b/frontend/apps/console-ce-e2e/src/e2e/api-explorer/graphql/snapshots.js @@ -1,3 +1,3 @@ module.exports = { - "__version": "10.4.0" -} + __version: '10.4.0', +}; diff --git a/frontend/apps/console-ce-e2e/src/e2e/data/404/snapshots.js b/frontend/apps/console-ce-e2e/src/e2e/data/404/snapshots.js index 8da2139bc8871..7aa8db71f5271 100644 --- a/frontend/apps/console-ce-e2e/src/e2e/data/404/snapshots.js +++ b/frontend/apps/console-ce-e2e/src/e2e/data/404/snapshots.js @@ -1,3 +1,3 @@ module.exports = { - "__version": "10.4.0" -} + __version: '10.4.0', +}; diff --git a/frontend/apps/console-ce-e2e/src/e2e/data/computed-fields/snapshots.js b/frontend/apps/console-ce-e2e/src/e2e/data/computed-fields/snapshots.js index 8da2139bc8871..7aa8db71f5271 100644 --- a/frontend/apps/console-ce-e2e/src/e2e/data/computed-fields/snapshots.js +++ b/frontend/apps/console-ce-e2e/src/e2e/data/computed-fields/snapshots.js @@ -1,3 +1,3 @@ module.exports = { - "__version": "10.4.0" -} + __version: '10.4.0', +}; diff --git a/frontend/apps/console-ce-e2e/src/e2e/data/create-table/snapshots.js b/frontend/apps/console-ce-e2e/src/e2e/data/create-table/snapshots.js index 8da2139bc8871..7aa8db71f5271 100644 --- a/frontend/apps/console-ce-e2e/src/e2e/data/create-table/snapshots.js +++ b/frontend/apps/console-ce-e2e/src/e2e/data/create-table/snapshots.js @@ -1,3 +1,3 @@ module.exports = { - "__version": "10.4.0" -} + __version: '10.4.0', +}; diff --git a/frontend/apps/console-ce-e2e/src/e2e/data/create-table/spec.ts b/frontend/apps/console-ce-e2e/src/e2e/data/create-table/spec.ts index 1e621d975a904..01b89b6611b4c 100644 --- a/frontend/apps/console-ce-e2e/src/e2e/data/create-table/spec.ts +++ b/frontend/apps/console-ce-e2e/src/e2e/data/create-table/spec.ts @@ -92,7 +92,9 @@ export const failCTWrongDefaultValue = () => { }; export const passCT = () => { - cy.get(getElementFromAlias('frequently-used-columns')).first().should('exist'); + cy.get(getElementFromAlias('frequently-used-columns')) + .first() + .should('exist'); // Set second column cy.get(getElementFromAlias('column-1')).clear().type(getColName(1)); tableColumnTypeSelector('col-type-1'); diff --git a/frontend/apps/console-ce-e2e/src/e2e/data/custom-functions/snapshots.js b/frontend/apps/console-ce-e2e/src/e2e/data/custom-functions/snapshots.js index 8da2139bc8871..7aa8db71f5271 100644 --- a/frontend/apps/console-ce-e2e/src/e2e/data/custom-functions/snapshots.js +++ b/frontend/apps/console-ce-e2e/src/e2e/data/custom-functions/snapshots.js @@ -1,3 +1,3 @@ module.exports = { - "__version": "10.4.0" -} + __version: '10.4.0', +}; diff --git a/frontend/apps/console-ce-e2e/src/e2e/data/functions/snapshots.js b/frontend/apps/console-ce-e2e/src/e2e/data/functions/snapshots.js index 8da2139bc8871..7aa8db71f5271 100644 --- a/frontend/apps/console-ce-e2e/src/e2e/data/functions/snapshots.js +++ b/frontend/apps/console-ce-e2e/src/e2e/data/functions/snapshots.js @@ -1,3 +1,3 @@ module.exports = { - "__version": "10.4.0" -} + __version: '10.4.0', +}; diff --git a/frontend/apps/console-ce-e2e/src/e2e/data/insert-browse/snapshots.js b/frontend/apps/console-ce-e2e/src/e2e/data/insert-browse/snapshots.js index 8da2139bc8871..7aa8db71f5271 100644 --- a/frontend/apps/console-ce-e2e/src/e2e/data/insert-browse/snapshots.js +++ b/frontend/apps/console-ce-e2e/src/e2e/data/insert-browse/snapshots.js @@ -1,3 +1,3 @@ module.exports = { - "__version": "10.4.0" -} + __version: '10.4.0', +}; diff --git a/frontend/apps/console-ce-e2e/src/e2e/data/manage-database/snapshots.js b/frontend/apps/console-ce-e2e/src/e2e/data/manage-database/snapshots.js index 8da2139bc8871..7aa8db71f5271 100644 --- a/frontend/apps/console-ce-e2e/src/e2e/data/manage-database/snapshots.js +++ b/frontend/apps/console-ce-e2e/src/e2e/data/manage-database/snapshots.js @@ -1,3 +1,3 @@ module.exports = { - "__version": "10.4.0" -} + __version: '10.4.0', +}; diff --git a/frontend/apps/console-ce-e2e/src/e2e/data/materialized-views/snapshots.js b/frontend/apps/console-ce-e2e/src/e2e/data/materialized-views/snapshots.js index 8da2139bc8871..7aa8db71f5271 100644 --- a/frontend/apps/console-ce-e2e/src/e2e/data/materialized-views/snapshots.js +++ b/frontend/apps/console-ce-e2e/src/e2e/data/materialized-views/snapshots.js @@ -1,3 +1,3 @@ module.exports = { - "__version": "10.4.0" -} + __version: '10.4.0', +}; diff --git a/frontend/apps/console-ce-e2e/src/e2e/data/migration-mode/snapshots.js b/frontend/apps/console-ce-e2e/src/e2e/data/migration-mode/snapshots.js index 8da2139bc8871..7aa8db71f5271 100644 --- a/frontend/apps/console-ce-e2e/src/e2e/data/migration-mode/snapshots.js +++ b/frontend/apps/console-ce-e2e/src/e2e/data/migration-mode/snapshots.js @@ -1,3 +1,3 @@ module.exports = { - "__version": "10.4.0" -} + __version: '10.4.0', +}; diff --git a/frontend/apps/console-ce-e2e/src/e2e/data/migration-mode/utils.ts b/frontend/apps/console-ce-e2e/src/e2e/data/migration-mode/utils.ts index 83596bd4d5a7d..b771f7e0fcf2d 100644 --- a/frontend/apps/console-ce-e2e/src/e2e/data/migration-mode/utils.ts +++ b/frontend/apps/console-ce-e2e/src/e2e/data/migration-mode/utils.ts @@ -7,9 +7,7 @@ export const toggleOnMigrationMode = () => { }).then(response => { if (response.body.migration_mode === 'false') { // Go to migrations section - cy.get('a') - .contains('Migrations') - .click(); + cy.get('a').contains('Migrations').click(); cy.wait(3000); // Toggle Migration mode cy.get('[class=react-toggle-track]').click(); @@ -25,9 +23,7 @@ export const toggleOffMigrationMode = () => { }).then(response => { if (response.body.migration_mode === 'true') { // Go to migrations section - cy.get('a') - .contains('Migrations') - .click(); + cy.get('a').contains('Migrations').click(); cy.wait(3000); // Toggle Migration mode cy.get('[class=react-toggle-track]').click(); diff --git a/frontend/apps/console-ce-e2e/src/e2e/data/modify/snapshots.js b/frontend/apps/console-ce-e2e/src/e2e/data/modify/snapshots.js index 8da2139bc8871..7aa8db71f5271 100644 --- a/frontend/apps/console-ce-e2e/src/e2e/data/modify/snapshots.js +++ b/frontend/apps/console-ce-e2e/src/e2e/data/modify/snapshots.js @@ -1,3 +1,3 @@ module.exports = { - "__version": "10.4.0" -} + __version: '10.4.0', +}; diff --git a/frontend/apps/console-ce-e2e/src/e2e/data/modify/spec.ts b/frontend/apps/console-ce-e2e/src/e2e/data/modify/spec.ts index a6b37c7f193ee..0ee4d61d557f1 100644 --- a/frontend/apps/console-ce-e2e/src/e2e/data/modify/spec.ts +++ b/frontend/apps/console-ce-e2e/src/e2e/data/modify/spec.ts @@ -208,7 +208,9 @@ export const Addcolumnname = (name: string) => { }; export const passMTAddColumn = () => { - cy.get(getElementFromAlias('frequently-used-columns')).first().should('exist'); + cy.get(getElementFromAlias('frequently-used-columns')) + .first() + .should('exist'); cy.get(getElementFromAlias('column-name')).type('{selectall}{del}'); cy.get(getElementFromAlias('column-name')).type(getColName(0)); tableColumnTypeSelector('col-type-0'); diff --git a/frontend/apps/console-ce-e2e/src/e2e/data/permissions/snapshots.js b/frontend/apps/console-ce-e2e/src/e2e/data/permissions/snapshots.js index 8da2139bc8871..7aa8db71f5271 100644 --- a/frontend/apps/console-ce-e2e/src/e2e/data/permissions/snapshots.js +++ b/frontend/apps/console-ce-e2e/src/e2e/data/permissions/snapshots.js @@ -1,3 +1,3 @@ module.exports = { - "__version": "10.4.0" -} + __version: '10.4.0', +}; diff --git a/frontend/apps/console-ce-e2e/src/e2e/data/permissions/spec.ts b/frontend/apps/console-ce-e2e/src/e2e/data/permissions/spec.ts index dad834356833e..783e8202b9622 100644 --- a/frontend/apps/console-ce-e2e/src/e2e/data/permissions/spec.ts +++ b/frontend/apps/console-ce-e2e/src/e2e/data/permissions/spec.ts @@ -47,7 +47,10 @@ export const passPTCreateTable = () => { cy.wait(7000); cy.url().should( 'eq', - `${baseUrl}/data/default/schema/public/tables/${getTableName(0, testName)}/modify` + `${baseUrl}/data/default/schema/public/tables/${getTableName( + 0, + testName + )}/modify` ); }; @@ -107,9 +110,7 @@ export const passPVDeleteView = () => { // Delete view setPromptValue(getTableName(1, testName)); cy.get(getElementFromAlias('delete-view')).click(); - cy.window() - .its('prompt') - .should('be.called'); + cy.window().its('prompt').should('be.called'); cy.wait(7000); }; @@ -122,9 +123,7 @@ export const passPTDeleteTable = () => { // Delete table setPromptValue(getTableName(0, testName)); cy.get(getElementFromAlias('delete-table')).click(); - cy.window() - .its('prompt') - .should('be.called'); + cy.window().its('prompt').should('be.called'); cy.wait(7000); }; diff --git a/frontend/apps/console-ce-e2e/src/e2e/data/raw-sql/snapshots.js b/frontend/apps/console-ce-e2e/src/e2e/data/raw-sql/snapshots.js index 8da2139bc8871..7aa8db71f5271 100644 --- a/frontend/apps/console-ce-e2e/src/e2e/data/raw-sql/snapshots.js +++ b/frontend/apps/console-ce-e2e/src/e2e/data/raw-sql/snapshots.js @@ -1,3 +1,3 @@ module.exports = { - "__version": "10.4.0" -} + __version: '10.4.0', +}; diff --git a/frontend/apps/console-ce-e2e/src/e2e/data/relationships/snapshots.js b/frontend/apps/console-ce-e2e/src/e2e/data/relationships/snapshots.js index 8da2139bc8871..7aa8db71f5271 100644 --- a/frontend/apps/console-ce-e2e/src/e2e/data/relationships/snapshots.js +++ b/frontend/apps/console-ce-e2e/src/e2e/data/relationships/snapshots.js @@ -1,3 +1,3 @@ module.exports = { - "__version": "10.4.0" -} + __version: '10.4.0', +}; diff --git a/frontend/apps/console-ce-e2e/src/e2e/data/template-gallery/snapshots.js b/frontend/apps/console-ce-e2e/src/e2e/data/template-gallery/snapshots.js index 8da2139bc8871..7aa8db71f5271 100644 --- a/frontend/apps/console-ce-e2e/src/e2e/data/template-gallery/snapshots.js +++ b/frontend/apps/console-ce-e2e/src/e2e/data/template-gallery/snapshots.js @@ -1,3 +1,3 @@ module.exports = { - "__version": "10.4.0" -} + __version: '10.4.0', +}; diff --git a/frontend/apps/console-ce-e2e/src/e2e/data/views/snapshots.js b/frontend/apps/console-ce-e2e/src/e2e/data/views/snapshots.js index 8da2139bc8871..7aa8db71f5271 100644 --- a/frontend/apps/console-ce-e2e/src/e2e/data/views/snapshots.js +++ b/frontend/apps/console-ce-e2e/src/e2e/data/views/snapshots.js @@ -1,3 +1,3 @@ module.exports = { - "__version": "10.4.0" -} + __version: '10.4.0', +}; diff --git a/frontend/apps/console-ce-e2e/src/e2e/db-compatibility/snapshots.js b/frontend/apps/console-ce-e2e/src/e2e/db-compatibility/snapshots.js index 8da2139bc8871..7aa8db71f5271 100644 --- a/frontend/apps/console-ce-e2e/src/e2e/db-compatibility/snapshots.js +++ b/frontend/apps/console-ce-e2e/src/e2e/db-compatibility/snapshots.js @@ -1,3 +1,3 @@ module.exports = { - "__version": "10.4.0" -} + __version: '10.4.0', +}; diff --git a/frontend/apps/console-ce-e2e/src/e2e/events/create-trigger/snapshots.js b/frontend/apps/console-ce-e2e/src/e2e/events/create-trigger/snapshots.js index 8da2139bc8871..7aa8db71f5271 100644 --- a/frontend/apps/console-ce-e2e/src/e2e/events/create-trigger/snapshots.js +++ b/frontend/apps/console-ce-e2e/src/e2e/events/create-trigger/snapshots.js @@ -1,3 +1,3 @@ module.exports = { - "__version": "10.4.0" -} + __version: '10.4.0', +}; diff --git a/frontend/apps/console-ce-e2e/src/e2e/events/one-off-trigger/snapshots.js b/frontend/apps/console-ce-e2e/src/e2e/events/one-off-trigger/snapshots.js index 8da2139bc8871..7aa8db71f5271 100644 --- a/frontend/apps/console-ce-e2e/src/e2e/events/one-off-trigger/snapshots.js +++ b/frontend/apps/console-ce-e2e/src/e2e/events/one-off-trigger/snapshots.js @@ -1,3 +1,3 @@ module.exports = { - "__version": "10.4.0" -} + __version: '10.4.0', +}; diff --git a/frontend/apps/console-ce-e2e/src/e2e/remote-schemas/create-remote-schema/snapshots.js b/frontend/apps/console-ce-e2e/src/e2e/remote-schemas/create-remote-schema/snapshots.js index 8da2139bc8871..7aa8db71f5271 100644 --- a/frontend/apps/console-ce-e2e/src/e2e/remote-schemas/create-remote-schema/snapshots.js +++ b/frontend/apps/console-ce-e2e/src/e2e/remote-schemas/create-remote-schema/snapshots.js @@ -1,3 +1,3 @@ module.exports = { - "__version": "10.4.0" -} + __version: '10.4.0', +}; diff --git a/frontend/apps/console-ce-e2e/src/e2e/remote-schemas/create-remote-schema/spec.ts b/frontend/apps/console-ce-e2e/src/e2e/remote-schemas/create-remote-schema/spec.ts index b10d9e212df68..59d4c7f1f03bb 100644 --- a/frontend/apps/console-ce-e2e/src/e2e/remote-schemas/create-remote-schema/spec.ts +++ b/frontend/apps/console-ce-e2e/src/e2e/remote-schemas/create-remote-schema/spec.ts @@ -25,26 +25,16 @@ export const checkCreateRemoteSchemaRoute = () => { }; export const failRSWithInvalidRemoteUrl = () => { + cy.get('[data-testid=name]').type(getRemoteSchemaName(0, testName)); + cy.get('[data-testid=url]').type(getInvalidRemoteSchemaUrl()); - cy.get('[data-testid=name]').type( - getRemoteSchemaName(0, testName) - ); - cy.get('[data-testid=url]').type( - getInvalidRemoteSchemaUrl() - ); - cy.get('[data-testid=submit]').click(); cy.get('.notifications-wrapper').contains('Error'); - }; export const createSimpleRemoteSchema = () => { - cy.get('[data-testid=name]') - .clear() - .type(getRemoteSchemaName(1, testName)); - cy.get('[data-testid=url]') - .clear() - .type(getRemoteGraphQLURL()); + cy.get('[data-testid=name]').clear().type(getRemoteSchemaName(1, testName)); + cy.get('[data-testid=url]').clear().type(getRemoteGraphQLURL()); cy.get('[data-testid=submit]').click(); cy.get('.notifications-wrapper').contains('Success'); validateRS(getRemoteSchemaName(1, testName), ResultType.SUCCESS); @@ -59,12 +49,8 @@ export const createSimpleRemoteSchema = () => { export const failRSDuplicateSchemaName = () => { cy.visit('remote-schemas/manage/add'); - cy.get('[data-testid=name]') - .clear() - .type(getRemoteSchemaName(1, testName)); - cy.get('[data-testid=url]') - .clear() - .type(getRemoteGraphQLURL()); + cy.get('[data-testid=name]').clear().type(getRemoteSchemaName(1, testName)); + cy.get('[data-testid=url]').clear().type(getRemoteGraphQLURL()); cy.get('[data-testid=submit]').click(); cy.get('.notifications-wrapper').contains('Error'); cy.url().should('eq', `${baseUrl}/remote-schemas/manage/add`); @@ -72,12 +58,8 @@ export const failRSDuplicateSchemaName = () => { export const failRSDuplicateSchemaNodes = () => { cy.visit('remote-schemas/manage/add'); - cy.get('[data-testid=name]') - .clear() - .type(getRemoteSchemaName(2, testName)); - cy.get('[data-testid=url]') - .clear() - .type(getRemoteGraphQLURL()); + cy.get('[data-testid=name]').clear().type(getRemoteSchemaName(2, testName)); + cy.get('[data-testid=url]').clear().type(getRemoteGraphQLURL()); cy.get('[data-testid=submit]').click(); cy.get('.notifications-wrapper').contains('Error'); cy.url().should('eq', `${baseUrl}/remote-schemas/manage/add`); @@ -112,15 +94,9 @@ export const deleteSimpleRemoteSchema = () => { export const failWithRemoteSchemaEnvUrl = () => { cy.visit('remote-schemas/manage/add'); - cy.get('[data-testid=name]') - .clear() - .type(getRemoteSchemaName(3, testName)); - cy.get( - '[name="url.type"]' - ).select('from_env'); - cy.get('[data-testid=url]') - .clear() - .type(getRemoteGraphQLURLFromEnv()); + cy.get('[data-testid=name]').clear().type(getRemoteSchemaName(3, testName)); + cy.get('[name="url.type"]').select('from_env'); + cy.get('[data-testid=url]').clear().type(getRemoteGraphQLURLFromEnv()); cy.get('[data-testid=submit]').click(); cy.get('.notifications-wrapper').contains('Error'); cy.url().should('eq', `${baseUrl}/remote-schemas/manage/add`); @@ -128,38 +104,22 @@ export const failWithRemoteSchemaEnvUrl = () => { export const failWithRemoteSchemaEnvHeader = () => { cy.visit('remote-schemas/manage/add'); - cy.get('[data-testid=name]') - .clear() - .type(getRemoteSchemaName(3, testName)); - cy.get('[data-testid=url]') - .clear() - .type(getRemoteGraphQLURL()); + cy.get('[data-testid=name]').clear().type(getRemoteSchemaName(3, testName)); + cy.get('[data-testid=url]').clear().type(getRemoteGraphQLURL()); - cy.get('[data-testid="add-header') - .click() + cy.get('[data-testid="add-header').click(); - cy.get('[name="headers[0].name"]') - .clear() - .type('sampleHeader1'); + cy.get('[name="headers[0].name"]').clear().type('sampleHeader1'); - cy.get('[name="headers[0].value"]') - .clear() - .type('sampleHeaderValue1'); + cy.get('[name="headers[0].value"]').clear().type('sampleHeaderValue1'); - cy.get('[data-testid="add-header') - .click() + cy.get('[data-testid="add-header').click(); - cy.get('[name="headers[1].name"]') - .clear() - .type('sampleHeader2'); + cy.get('[name="headers[1].name"]').clear().type('sampleHeader2'); - cy.get( - '[name="headers[1].type"]' - ).select("from_env"); + cy.get('[name="headers[1].type"]').select('from_env'); - cy.get('[name="headers[1].value"]') - .clear() - .type('SAMPLE_ENV_HEADER'); + cy.get('[name="headers[1].value"]').clear().type('SAMPLE_ENV_HEADER'); cy.get('[data-testid=submit]').click(); cy.get('.notifications-wrapper').contains('Error'); @@ -168,34 +128,20 @@ export const failWithRemoteSchemaEnvHeader = () => { export const passWithRemoteSchemaHeader = () => { cy.visit('remote-schemas/manage/add'); - cy.get('[data-testid=name]') - .clear() - .type(getRemoteSchemaName(3, testName)); - cy.get('[data-testid=url]') - .clear() - .type(getRemoteGraphQLURL()); + cy.get('[data-testid=name]').clear().type(getRemoteSchemaName(3, testName)); + cy.get('[data-testid=url]').clear().type(getRemoteGraphQLURL()); - cy.get('[data-testid="add-header') - .click() + cy.get('[data-testid="add-header').click(); - cy.get('[name="headers[0].name"]') - .clear() - .type('sampleHeader1'); + cy.get('[name="headers[0].name"]').clear().type('sampleHeader1'); - cy.get('[name="headers[0].value"]') - .clear() - .type('sampleHeaderValue1'); + cy.get('[name="headers[0].value"]').clear().type('sampleHeaderValue1'); - cy.get('[data-testid="add-header') - .click() + cy.get('[data-testid="add-header').click(); - cy.get('[name="headers[1].name"]') - .clear() - .type('sampleHeader2'); + cy.get('[name="headers[1].name"]').clear().type('sampleHeader2'); - cy.get('[name="headers[1].value"]') - .clear() - .type('sampleHeaderValue2'); + cy.get('[name="headers[1].value"]').clear().type('sampleHeaderValue2'); cy.get('[data-testid=submit]').click(); cy.get('.notifications-wrapper').contains('Success'); @@ -240,7 +186,7 @@ export const createSimpleRemoteSchemaPermission = () => { cy.get(getElementFromAlias('save-remote-schema-permissions')).click({ force: true, }); - cy.get('.notifications-wrapper').contains('saved') + cy.get('.notifications-wrapper').contains('saved'); cy.url().should( 'eq', `${baseUrl}/remote-schemas/manage/${getRemoteSchemaName( diff --git a/frontend/apps/console-ce-e2e/src/e2e/remote-schemas/edit-schema/snapshots.js b/frontend/apps/console-ce-e2e/src/e2e/remote-schemas/edit-schema/snapshots.js index 8da2139bc8871..7aa8db71f5271 100644 --- a/frontend/apps/console-ce-e2e/src/e2e/remote-schemas/edit-schema/snapshots.js +++ b/frontend/apps/console-ce-e2e/src/e2e/remote-schemas/edit-schema/snapshots.js @@ -1,3 +1,3 @@ module.exports = { - "__version": "10.4.0" -} + __version: '10.4.0', +}; diff --git a/frontend/apps/console-ce-e2e/src/e2e/remote-schemas/remote-schema-relationships/snapshots.js b/frontend/apps/console-ce-e2e/src/e2e/remote-schemas/remote-schema-relationships/snapshots.js index 8da2139bc8871..7aa8db71f5271 100644 --- a/frontend/apps/console-ce-e2e/src/e2e/remote-schemas/remote-schema-relationships/snapshots.js +++ b/frontend/apps/console-ce-e2e/src/e2e/remote-schemas/remote-schema-relationships/snapshots.js @@ -1,3 +1,3 @@ module.exports = { - "__version": "10.4.0" -} + __version: '10.4.0', +}; diff --git a/frontend/apps/console-ce-e2e/src/e2e/remote-schemas/rs-to-db-relationships/snapshots.js b/frontend/apps/console-ce-e2e/src/e2e/remote-schemas/rs-to-db-relationships/snapshots.js index 8da2139bc8871..7aa8db71f5271 100644 --- a/frontend/apps/console-ce-e2e/src/e2e/remote-schemas/rs-to-db-relationships/snapshots.js +++ b/frontend/apps/console-ce-e2e/src/e2e/remote-schemas/rs-to-db-relationships/snapshots.js @@ -1,3 +1,3 @@ module.exports = { - "__version": "10.4.0" -} + __version: '10.4.0', +}; diff --git a/frontend/apps/console-ce-e2e/src/e2e/remote-schemas/rs-to-rs-relationships/snapshots.js b/frontend/apps/console-ce-e2e/src/e2e/remote-schemas/rs-to-rs-relationships/snapshots.js index 8da2139bc8871..7aa8db71f5271 100644 --- a/frontend/apps/console-ce-e2e/src/e2e/remote-schemas/rs-to-rs-relationships/snapshots.js +++ b/frontend/apps/console-ce-e2e/src/e2e/remote-schemas/rs-to-rs-relationships/snapshots.js @@ -1,3 +1,3 @@ module.exports = { - "__version": "10.4.0" -} + __version: '10.4.0', +}; diff --git a/frontend/apps/console-ce-e2e/src/e2e/settings/metadata/insecure-domain/snapshots.js b/frontend/apps/console-ce-e2e/src/e2e/settings/metadata/insecure-domain/snapshots.js index 8da2139bc8871..7aa8db71f5271 100644 --- a/frontend/apps/console-ce-e2e/src/e2e/settings/metadata/insecure-domain/snapshots.js +++ b/frontend/apps/console-ce-e2e/src/e2e/settings/metadata/insecure-domain/snapshots.js @@ -1,3 +1,3 @@ module.exports = { - "__version": "10.4.0" -} + __version: '10.4.0', +}; diff --git a/frontend/apps/console-ce-e2e/src/e2e/settings/metadata/snapshots.js b/frontend/apps/console-ce-e2e/src/e2e/settings/metadata/snapshots.js index 8da2139bc8871..7aa8db71f5271 100644 --- a/frontend/apps/console-ce-e2e/src/e2e/settings/metadata/snapshots.js +++ b/frontend/apps/console-ce-e2e/src/e2e/settings/metadata/snapshots.js @@ -1,3 +1,3 @@ module.exports = { - "__version": "10.4.0" -} + __version: '10.4.0', +}; diff --git a/frontend/apps/console-ce-e2e/src/e2e/tracing/api-graphiql/fixtures/initialRequests/config.ts b/frontend/apps/console-ce-e2e/src/e2e/tracing/api-graphiql/fixtures/initialRequests/config.ts index e3efac62bf135..dfe9e070a719c 100644 --- a/frontend/apps/console-ce-e2e/src/e2e/tracing/api-graphiql/fixtures/initialRequests/config.ts +++ b/frontend/apps/console-ce-e2e/src/e2e/tracing/api-graphiql/fixtures/initialRequests/config.ts @@ -14,5 +14,5 @@ export const config: ServerConfig = { claims_namespace: '', claims_format: '', }, - is_prometheus_metrics_enabled: false + is_prometheus_metrics_enabled: false, }; diff --git a/frontend/apps/console-ce-e2e/src/e2e/tracing/api-graphiql/snapshots.js b/frontend/apps/console-ce-e2e/src/e2e/tracing/api-graphiql/snapshots.js index 8da2139bc8871..7aa8db71f5271 100644 --- a/frontend/apps/console-ce-e2e/src/e2e/tracing/api-graphiql/snapshots.js +++ b/frontend/apps/console-ce-e2e/src/e2e/tracing/api-graphiql/snapshots.js @@ -1,3 +1,3 @@ module.exports = { - "__version": "10.4.0" -} + __version: '10.4.0', +}; diff --git a/frontend/apps/console-ce-e2e/src/helpers/common.ts b/frontend/apps/console-ce-e2e/src/helpers/common.ts index f898f2284001d..8997b69b51a47 100644 --- a/frontend/apps/console-ce-e2e/src/helpers/common.ts +++ b/frontend/apps/console-ce-e2e/src/helpers/common.ts @@ -18,7 +18,7 @@ export const setPromptValue = (value: string | null) => { }; // This is works as setPromptValue with no unnecessary waiting -export const setPromptWithCb = (value: string | null, cb: () => void) => { +export const setPromptWithCb = (value: string | null, cb: () => void) => { cy.window().then(win => { cy.stub(win, 'prompt').returns(value); cb(); diff --git a/frontend/apps/console-ce-e2e/src/helpers/remoteSchemaHelpers.ts b/frontend/apps/console-ce-e2e/src/helpers/remoteSchemaHelpers.ts index e3670665e5b50..b1d0931f33561 100644 --- a/frontend/apps/console-ce-e2e/src/helpers/remoteSchemaHelpers.ts +++ b/frontend/apps/console-ce-e2e/src/helpers/remoteSchemaHelpers.ts @@ -5,8 +5,7 @@ export const baseUrl = Cypress.config('baseUrl'); export const getRemoteSchemaName = (i: number, schemaName: string) => `test-remote-schema-${schemaName}-${i}`; -export const getRemoteGraphQLURL = () => - 'https://graphql-pokemon2.vercel.app/'; +export const getRemoteGraphQLURL = () => 'https://graphql-pokemon2.vercel.app/'; export const getRemoteGraphQLURLFromEnv = () => 'GRAPHQL_URL'; diff --git a/frontend/apps/console-ce-e2e/src/helpers/webhookTransformHelpers.ts b/frontend/apps/console-ce-e2e/src/helpers/webhookTransformHelpers.ts index 040e793a5d841..d9eced94637a3 100644 --- a/frontend/apps/console-ce-e2e/src/helpers/webhookTransformHelpers.ts +++ b/frontend/apps/console-ce-e2e/src/helpers/webhookTransformHelpers.ts @@ -13,9 +13,10 @@ export const toggleRequestTransformSection = () => { }; export const clearRequestUrl = () => { - cy.get( - getElementFromAlias('transform-requestUrl') - ).type('{selectall}{backspace}', { force: true }); + cy.get(getElementFromAlias('transform-requestUrl')).type( + '{selectall}{backspace}', + { force: true } + ); }; export const typeIntoRequestUrl = (content: string) => { diff --git a/frontend/apps/console-ce-e2e/src/support/contractIntercept/helpers/snapshots.js b/frontend/apps/console-ce-e2e/src/support/contractIntercept/helpers/snapshots.js index 8da2139bc8871..7aa8db71f5271 100644 --- a/frontend/apps/console-ce-e2e/src/support/contractIntercept/helpers/snapshots.js +++ b/frontend/apps/console-ce-e2e/src/support/contractIntercept/helpers/snapshots.js @@ -1,3 +1,3 @@ module.exports = { - "__version": "10.4.0" -} + __version: '10.4.0', +}; diff --git a/frontend/apps/console-ce/project.json b/frontend/apps/console-ce/project.json index 47695f575bcd1..303d743f3bec0 100644 --- a/frontend/apps/console-ce/project.json +++ b/frontend/apps/console-ce/project.json @@ -29,9 +29,7 @@ "output": "common" } ], - "styles": [ - "apps/console-ce/src/css/tailwind.css" - ], + "styles": ["apps/console-ce/src/css/tailwind.css"], "scripts": [], "webpackConfig": "custom-webpack.config.js", "postcssConfig": "apps/console-ce/postcss.config.js" diff --git a/frontend/apps/console-ce/src/index.html b/frontend/apps/console-ce/src/index.html index 8b28ca78a61b9..e12ec46bf9e63 100644 --- a/frontend/apps/console-ce/src/index.html +++ b/frontend/apps/console-ce/src/index.html @@ -8,10 +8,9 @@ - -
-
+
+ > Loading... +
-
-
+
diff --git a/frontend/apps/console-ee/project.json b/frontend/apps/console-ee/project.json index 93b3039abb95c..f5a82cc07590c 100644 --- a/frontend/apps/console-ee/project.json +++ b/frontend/apps/console-ee/project.json @@ -28,9 +28,7 @@ "output": "common" } ], - "styles": [ - "apps/console-ee/src/css/tailwind.css" - ], + "styles": ["apps/console-ee/src/css/tailwind.css"], "scripts": [], "webpackConfig": "custom-webpack.config.js", "postcssConfig": "apps/console-ee/postcss.config.js" diff --git a/frontend/apps/console-ee/src/index.html b/frontend/apps/console-ee/src/index.html index b7404c5db3477..afe2939ef3b6c 100644 --- a/frontend/apps/console-ee/src/index.html +++ b/frontend/apps/console-ee/src/index.html @@ -10,8 +10,8 @@ - diff --git a/frontend/libs/console/legacy-ce/.storybook/preview.js b/frontend/libs/console/legacy-ce/.storybook/preview.js index 89df6b2ad9bc3..6afbab9819d40 100644 --- a/frontend/libs/console/legacy-ce/.storybook/preview.js +++ b/frontend/libs/console/legacy-ce/.storybook/preview.js @@ -13,7 +13,7 @@ import '../src/lib/components/Common/Common.module.scss'; const channel = addons.getChannel(); initialize(); -const DocsContainerElement = (props) => { +const DocsContainerElement = props => { // Sync Docs dark mode with Storybook Manager const [isDark, setDark] = React.useState(); @@ -28,8 +28,8 @@ const DocsContainerElement = (props) => { {...props} context={{ ...props.context, - storyById: (id) => { - return produce(props.context.storyById(id), (draft) => { + storyById: id => { + return produce(props.context.storyById(id), draft => { draft.parameters.docs.theme = isDark ? theme.dark : theme.light; }); }, @@ -67,7 +67,7 @@ export const parameters = { export const decorators = [ (fn, c) => {fn(c)}, mswDecorator, - (Story) => { + Story => { document.body.classList.add('hasura-tailwind-on'); return
{Story()}
; }, diff --git a/frontend/libs/console/legacy-ce/src/lib/components/App/App.module.scss b/frontend/libs/console/legacy-ce/src/lib/components/App/App.module.scss index 0313c71ce4295..1e3356bcbb2b0 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/App/App.module.scss +++ b/frontend/libs/console/legacy-ce/src/lib/components/App/App.module.scss @@ -1,4 +1,4 @@ -@import "../Common/Common.module"; +@import '../Common/Common.module'; :global { @keyframes react-progress-spinner { diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Common/Common.module.scss b/frontend/libs/console/legacy-ce/src/lib/components/Common/Common.module.scss index 9992cbff0748b..0b16bec1aa85f 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Common/Common.module.scss +++ b/frontend/libs/console/legacy-ce/src/lib/components/Common/Common.module.scss @@ -1565,7 +1565,7 @@ code { margin-bottom: 2px; align-self: flex-end; padding-top: 8px; - border-color:rgba(0, 0, 0, 0.1); + border-color: rgba(0, 0, 0, 0.1); border-top-width: 1px; position: sticky; bottom: 0; diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Common/ConfigureTransformation/ConfigureTransformation.tsx b/frontend/libs/console/legacy-ce/src/lib/components/Common/ConfigureTransformation/ConfigureTransformation.tsx index ea39f72c65db6..e0e98ba8e8ad1 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Common/ConfigureTransformation/ConfigureTransformation.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/components/Common/ConfigureTransformation/ConfigureTransformation.tsx @@ -42,234 +42,234 @@ type ConfigureTransformationProps = { responseBodyOnChange?: (responseBody: ResponseTransformStateBody) => void; }; -const ConfigureTransformation: React.FC = - props => { - const { - transformationType, - requestTransfromState, - responseTransformState, - resetSampleInput, - envVarsOnChange, - sessionVarsOnChange, - requestMethodOnChange, - requestUrlOnChange, - requestQueryParamsOnChange, - requestAddHeadersOnChange, - requestBodyOnChange, - requestSampleInputOnChange, - requestUrlTransformOnChange, - requestPayloadTransformOnChange, - responsePayloadTransformOnChange, - responseBodyOnChange, - } = props; - const { - envVars, - sessionVars, - requestMethod, - requestUrl, - requestUrlError, - requestUrlPreview, - requestQueryParams, - requestAddHeaders, - requestBody, - requestBodyError, - requestSampleInput, - requestTransformedBody, - isRequestUrlTransform, - isRequestPayloadTransform, - } = requestTransfromState; - const [isContextAreaActive, toggleContextArea] = useState(false); +const ConfigureTransformation: React.FC< + ConfigureTransformationProps +> = props => { + const { + transformationType, + requestTransfromState, + responseTransformState, + resetSampleInput, + envVarsOnChange, + sessionVarsOnChange, + requestMethodOnChange, + requestUrlOnChange, + requestQueryParamsOnChange, + requestAddHeadersOnChange, + requestBodyOnChange, + requestSampleInputOnChange, + requestUrlTransformOnChange, + requestPayloadTransformOnChange, + responsePayloadTransformOnChange, + responseBodyOnChange, + } = props; + const { + envVars, + sessionVars, + requestMethod, + requestUrl, + requestUrlError, + requestUrlPreview, + requestQueryParams, + requestAddHeaders, + requestBody, + requestBodyError, + requestSampleInput, + requestTransformedBody, + isRequestUrlTransform, + isRequestPayloadTransform, + } = requestTransfromState; + const [isContextAreaActive, toggleContextArea] = useState(false); - const contextAreaText = isContextAreaActive - ? `Hide Sample Context` - : `Show Sample Context`; + const contextAreaText = isContextAreaActive + ? `Hide Sample Context` + : `Show Sample Context`; - const requestUrlTransformText = isRequestUrlTransform - ? `Remove Request Options Transform` - : `Add Request Options Transform`; - const requestPayloadTransformText = isRequestPayloadTransform - ? `Remove Payload Transform` - : `Add Payload Transform`; + const requestUrlTransformText = isRequestUrlTransform + ? `Remove Request Options Transform` + : `Add Request Options Transform`; + const requestPayloadTransformText = isRequestPayloadTransform + ? `Remove Payload Transform` + : `Add Payload Transform`; - const responsePayloadTransformText = - responseTransformState?.isResponsePayloadTransform - ? `Remove Response Transform` - : `Add Response Transform`; - return ( - <> -

- Configure REST Connectors -

+ const responsePayloadTransformText = + responseTransformState?.isResponsePayloadTransform + ? `Remove Response Transform` + : `Add Response Transform`; + return ( + <> +

+ Configure REST Connectors +

-
- -

- Add sample env vars and session vars for testing the connector -

- + +

+ Add sample env vars and session vars for testing the connector +

+ + - + {!isContextAreaActive ? : null} + {contextAreaText} + +
- {isContextAreaActive ? ( - - ) : null} -
+ {isContextAreaActive ? ( + + ) : null} + -
- -

- Change the method and URL to adapt to your API's expected - format. -

- + +

+ Change the method and URL to adapt to your API's expected format. +

+ + - - {isRequestUrlTransform ? ( - - ) : null} -
+ {requestUrlTransformText} + + + {isRequestUrlTransform ? ( + + ) : null} + +
+ +

+ Change the payload to adapt to your API's expected format. +

+ + + + {isRequestPayloadTransform ? ( + + ) : null} +
+ {responseTransformState && responsePayloadTransformOnChange && (

- Change the payload to adapt to your API's expected format. + Change the incoming response to adapt to your declared types.

- {isRequestPayloadTransform ? ( - ) : null}
- {responseTransformState && responsePayloadTransformOnChange && ( -
- -

- Change the incoming response to adapt to your declared types. -

- - - - {responseTransformState.isResponsePayloadTransform && - responseBodyOnChange ? ( - - ) : null} -
- )} - - ); - }; + )} + + ); +}; export default ConfigureTransformation; diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Common/CustomInputAutoSuggest/CustomInputAutoSuggest.tsx b/frontend/libs/console/legacy-ce/src/lib/components/Common/CustomInputAutoSuggest/CustomInputAutoSuggest.tsx index e22a9b33f3b74..8e47f85a7ed41 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Common/CustomInputAutoSuggest/CustomInputAutoSuggest.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/components/Common/CustomInputAutoSuggest/CustomInputAutoSuggest.tsx @@ -55,8 +55,9 @@ const CustomInputAutoSuggest: React.FC = ({ setSuggestions(getSuggestions(value)); }; - const getSuggestionValue: GetSuggestionValue = - suggestion => suggestion.value; + const getSuggestionValue: GetSuggestionValue< + AutoSuggestOption + > = suggestion => suggestion.value; const onSuggestionsClearRequested = () => { setSuggestions([]); diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Common/CustomInputTypes/CustomInput.module.scss b/frontend/libs/console/legacy-ce/src/lib/components/Common/CustomInputTypes/CustomInput.module.scss index 15f125f870106..067d8dd29c417 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Common/CustomInputTypes/CustomInput.module.scss +++ b/frontend/libs/console/legacy-ce/src/lib/components/Common/CustomInputTypes/CustomInput.module.scss @@ -9,7 +9,7 @@ z-index: 100; opacity: 0.3; &:hover { - opacity: 1.0; + opacity: 1; } } @@ -19,4 +19,4 @@ right: 28px; z-index: 100; font-style: italic; -} \ No newline at end of file +} diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Common/Dropdown/Dropdown.module.scss b/frontend/libs/console/legacy-ce/src/lib/components/Common/Dropdown/Dropdown.module.scss index a503d6c872343..8f22cf5e6c6d8 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Common/Dropdown/Dropdown.module.scss +++ b/frontend/libs/console/legacy-ce/src/lib/components/Common/Dropdown/Dropdown.module.scss @@ -1,4 +1,4 @@ -@import "../Common.module"; +@import '../Common.module'; .data_dropdown_wrapper { display: inline-block; @@ -31,7 +31,7 @@ text-align: left; margin-right: 5px; } - + // &:hover { // background-color: #eee; // } @@ -54,9 +54,9 @@ .dropdownRight:before, .dropdownBottom:before { - content: ""; - position: absolute; - border: solid 5px transparent; + content: ''; + position: absolute; + border: solid 5px transparent; z-index: 10000; } diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Common/FilterQuery/FilterQuery.module.scss b/frontend/libs/console/legacy-ce/src/lib/components/Common/FilterQuery/FilterQuery.module.scss index 4469f6f38ffed..c8438a6ba4267 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Common/FilterQuery/FilterQuery.module.scss +++ b/frontend/libs/console/legacy-ce/src/lib/components/Common/FilterQuery/FilterQuery.module.scss @@ -1,4 +1,4 @@ -@import "../Common.module"; +@import '../Common.module'; .queryBox { box-sizing: border-box; @@ -8,7 +8,7 @@ .inputRow { margin: 20px 0; - div[class^=col-xs-] { + div[class^='col-xs-'] { padding-left: 0; padding-right: 2.5px; } @@ -19,7 +19,8 @@ } :global(.form-control):focus { - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 0px rgba(102, 175, 233, 0.6); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), + 0 0 0px rgba(102, 175, 233, 0.6); } :global(.fa) { diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Common/Headers/Headers.module.scss b/frontend/libs/console/legacy-ce/src/lib/components/Common/Headers/Headers.module.scss index b129a2c0da5f1..51c9af333a877 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Common/Headers/Headers.module.scss +++ b/frontend/libs/console/legacy-ce/src/lib/components/Common/Headers/Headers.module.scss @@ -1,5 +1,5 @@ -@import "../Common.module"; +@import '../Common.module'; .headerInputWidth { - width: 300px + width: 300px; } diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Common/Layout/ExpandableEditor/Editor.module.scss b/frontend/libs/console/legacy-ce/src/lib/components/Common/Layout/ExpandableEditor/Editor.module.scss index d3a4b2da96a53..9b0c4e8475630 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Common/Layout/ExpandableEditor/Editor.module.scss +++ b/frontend/libs/console/legacy-ce/src/lib/components/Common/Layout/ExpandableEditor/Editor.module.scss @@ -1,4 +1,4 @@ -@import "../../Common.module"; +@import '../../Common.module'; .editorExpanded { margin: 10px 0; @@ -15,4 +15,4 @@ .editorContent { padding: 10px 15px; -} \ No newline at end of file +} diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Common/Layout/LeftSubSidebar/LeftSubSidebar.module.scss b/frontend/libs/console/legacy-ce/src/lib/components/Common/Layout/LeftSubSidebar/LeftSubSidebar.module.scss index 1e2782940f1f7..24ee636fb88e7 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Common/Layout/LeftSubSidebar/LeftSubSidebar.module.scss +++ b/frontend/libs/console/legacy-ce/src/lib/components/Common/Layout/LeftSubSidebar/LeftSubSidebar.module.scss @@ -1,4 +1,3 @@ - @import '../../Common.module'; .displayFlexContainer { @@ -273,4 +272,4 @@ height: 17px; width: 17px; margin-left: 5px; -} \ No newline at end of file +} diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Common/Layout/ReusableHeader/Header.module.scss b/frontend/libs/console/legacy-ce/src/lib/components/Common/Layout/ReusableHeader/Header.module.scss index 021ee9b8c3f17..047b8ca679e61 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Common/Layout/ReusableHeader/Header.module.scss +++ b/frontend/libs/console/legacy-ce/src/lib/components/Common/Layout/ReusableHeader/Header.module.scss @@ -1,4 +1,4 @@ -@import "../../Common.module"; +@import '../../Common.module'; .common_header_wrapper { .defaultWidth { diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Common/Layout/ReusableTabs/ReusableTabs.module.scss b/frontend/libs/console/legacy-ce/src/lib/components/Common/Layout/ReusableTabs/ReusableTabs.module.scss index de379f977654a..481efaaa9474c 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Common/Layout/ReusableTabs/ReusableTabs.module.scss +++ b/frontend/libs/console/legacy-ce/src/lib/components/Common/Layout/ReusableTabs/ReusableTabs.module.scss @@ -1,4 +1,4 @@ -@import "../../Common.module"; +@import '../../Common.module'; .loader_ml { margin-left: 3px; diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Common/Layout/RightContainer/RightContainer.module.scss b/frontend/libs/console/legacy-ce/src/lib/components/Common/Layout/RightContainer/RightContainer.module.scss index eca27c610e890..d99b242da2e28 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Common/Layout/RightContainer/RightContainer.module.scss +++ b/frontend/libs/console/legacy-ce/src/lib/components/Common/Layout/RightContainer/RightContainer.module.scss @@ -1,4 +1,4 @@ -@import "../../Common.module"; +@import '../../Common.module'; .container { } @@ -42,7 +42,8 @@ padding: 7px 0; transition: color 0.5s; - a,a:visited { + a, + a:visited { /* Taken from boostrap navbar-inverse-link-color variables */ color: lighten(lighten(#000, 46.7%), 15%); } @@ -61,7 +62,7 @@ transition: color 0.5s; pointer: cursor; } - } + } } .main { diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Common/QueryBuilderJson/QueryBuilderJson.module.scss b/frontend/libs/console/legacy-ce/src/lib/components/Common/QueryBuilderJson/QueryBuilderJson.module.scss index 952a7f39fe175..dd8d25a0d3b7e 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Common/QueryBuilderJson/QueryBuilderJson.module.scss +++ b/frontend/libs/console/legacy-ce/src/lib/components/Common/QueryBuilderJson/QueryBuilderJson.module.scss @@ -1,4 +1,4 @@ -@import "../Common.module"; +@import '../Common.module'; .qb_nested { margin-top: 5px; @@ -23,11 +23,10 @@ color: #999; select option { - color: #555 + color: #555; } } .qb_unselected_key { color: #999; } - diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Common/TextAreaWithCopy/TextAreaWithCopy.module.scss b/frontend/libs/console/legacy-ce/src/lib/components/Common/TextAreaWithCopy/TextAreaWithCopy.module.scss index 830c4d1607c21..2c284ab9e1edb 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Common/TextAreaWithCopy/TextAreaWithCopy.module.scss +++ b/frontend/libs/console/legacy-ce/src/lib/components/Common/TextAreaWithCopy/TextAreaWithCopy.module.scss @@ -57,22 +57,25 @@ z-index: 100; } -.copyGenerated img, .copyExecution img { +.copyGenerated img, +.copyExecution img { width: 20px; - opacity: .6; + opacity: 0.6; } -.copyGenerated img:hover, .copyExecution img:hover { +.copyGenerated img:hover, +.copyExecution img:hover { opacity: 1; } -.copyGenerated:focus, .copyExecution:focus { +.copyGenerated:focus, +.copyExecution:focus { outline: none; } .copyTooltip { - position: relative; - display: inline-block; + position: relative; + display: inline-block; } .copyTooltip i { @@ -80,36 +83,36 @@ } .copyTooltip .tooltiptext { - background-color: #555; - color: #fff; - text-align: center; - border-radius: 6px; - padding: 4px 0px; - font-size: 14px; - position: absolute; - z-index: 1000000000; - right: -21px; - bottom: 30px; - opacity: 0; - -webkit-transition: opacity 0.3s; - transition: opacity 0.3s; + background-color: #555; + color: #fff; + text-align: center; + border-radius: 6px; + padding: 4px 0px; + font-size: 14px; + position: absolute; + z-index: 1000000000; + right: -21px; + bottom: 30px; + opacity: 0; + -webkit-transition: opacity 0.3s; + transition: opacity 0.3s; display: none; width: 57px; } .copyTooltip .tooltiptext::after { - content: ""; - position: absolute; - top: 26px; - right: 22px; - margin-left: -5px; - border-width: 5px; - border-style: solid; - border-color: #555 transparent transparent transparent; + content: ''; + position: absolute; + top: 26px; + right: 22px; + margin-left: -5px; + border-width: 5px; + border-style: solid; + border-color: #555 transparent transparent transparent; } .copyTooltip:hover .tooltiptext { - visibility: visible; - opacity: 1; - display: block; + visibility: visible; + opacity: 1; + display: block; } diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Common/Tooltip/Tooltip.module.scss b/frontend/libs/console/legacy-ce/src/lib/components/Common/Tooltip/Tooltip.module.scss index 1ff56f0d696db..3500248cceb4b 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Common/Tooltip/Tooltip.module.scss +++ b/frontend/libs/console/legacy-ce/src/lib/components/Common/Tooltip/Tooltip.module.scss @@ -1,3 +1,3 @@ -.tooltipIcon{ +.tooltipIcon { margin-left: 5px; -} \ No newline at end of file +} diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Common/WarningSymbol/WarningSymbol.module.scss b/frontend/libs/console/legacy-ce/src/lib/components/Common/WarningSymbol/WarningSymbol.module.scss index 67ed45a49842e..ba0d3f370dd0a 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Common/WarningSymbol/WarningSymbol.module.scss +++ b/frontend/libs/console/legacy-ce/src/lib/components/Common/WarningSymbol/WarningSymbol.module.scss @@ -1,5 +1,5 @@ -@import "../Common.module"; +@import '../Common.module'; .warningSymbol { color: #d9534f; -} \ No newline at end of file +} diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Common/utils/jsUtils.tsx b/frontend/libs/console/legacy-ce/src/lib/components/Common/utils/jsUtils.tsx index b02351c5cba81..a3f74bad50370 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Common/utils/jsUtils.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/components/Common/utils/jsUtils.tsx @@ -192,7 +192,7 @@ export function getAllJsonPaths( const handleSubJson = (subJson: any, newPrefix: string) => { const subPaths = getAllJsonPaths(subJson, leafKeys, newPrefix); - subPaths.forEach((subPath: typeof subPaths[0]) => { + subPaths.forEach((subPath: (typeof subPaths)[0]) => { paths.push(subPath); }); diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Services/Actions/Actions.module.scss b/frontend/libs/console/legacy-ce/src/lib/components/Services/Actions/Actions.module.scss index b37bf4d6201a9..e8a0de666a4eb 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Services/Actions/Actions.module.scss +++ b/frontend/libs/console/legacy-ce/src/lib/components/Services/Actions/Actions.module.scss @@ -1,4 +1,4 @@ -@import "../../Common/Common.module"; +@import '../../Common/Common.module'; .addPaddCommom { padding: 10px 0; @@ -52,7 +52,7 @@ .commonBtn { text-align: center; padding: 20px 0; - padding-bottom: 10px + padding-bottom: 10px; } .readMore { @@ -61,7 +61,7 @@ } } -.iconWrapper{ +.iconWrapper { padding: 20px 0; .icon { @@ -119,7 +119,8 @@ .inputLabel { margin-left: 0; - input, select { + input, + select { width: 300px; } } @@ -140,7 +141,7 @@ } .red_button { - color: #FFF; + color: #fff; } a { @@ -166,7 +167,6 @@ .set_line_height { line-height: 26px; } - } .actionsImg { @@ -193,7 +193,7 @@ display: flex; align-items: center; - a{ + a { color: #909090; } @@ -260,24 +260,24 @@ display: inline-block; } - .instructionsWrapper, .instructionsWrapperPos { + .instructionsWrapper, + .instructionsWrapperPos { margin-top: 20px; - border-top: 1px solid #DEDEDE; + border-top: 1px solid #dedede; .instructions { padding: 12px 0; } } - .instructionsWrapper - { + .instructionsWrapper { position: relative; } - .instructionsWrapperPos - { + .instructionsWrapperPos { position: static; } - .instructionsWrapper:hover, .instructionsWrapperPos:hover { + .instructionsWrapper:hover, + .instructionsWrapperPos:hover { .instructions { - color: #505050 + color: #505050; } .rightArrow { diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Services/Actions/Types/Styles.scss b/frontend/libs/console/legacy-ce/src/lib/components/Services/Actions/Types/Styles.scss index e2ace32653600..bdf49b6f6b479 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Services/Actions/Types/Styles.scss +++ b/frontend/libs/console/legacy-ce/src/lib/components/Services/Actions/Types/Styles.scss @@ -1 +1 @@ -@import '../../../Common/Common.module'; \ No newline at end of file +@import '../../../Common/Common.module'; diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Services/ApiExplorer/Rest/utils.ts b/frontend/libs/console/legacy-ce/src/lib/components/Services/ApiExplorer/Rest/utils.ts index 66dbf508e56ec..151199266a5a1 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Services/ApiExplorer/Rest/utils.ts +++ b/frontend/libs/console/legacy-ce/src/lib/components/Services/ApiExplorer/Rest/utils.ts @@ -86,8 +86,8 @@ const acceptedGQLTypes = [ 'Double', ] as const; export type VariableData = { - kind: typeof acceptedTypeKind[number] | 'Unsupported'; - type: typeof acceptedGQLTypes[number]; + kind: (typeof acceptedTypeKind)[number] | 'Unsupported'; + type: (typeof acceptedGQLTypes)[number]; name: string; }; diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Services/ApiExplorer/Security/Introspection/index.tsx b/frontend/libs/console/legacy-ce/src/lib/components/Services/ApiExplorer/Security/Introspection/index.tsx index dffacdca882e2..1958ab4863750 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Services/ApiExplorer/Security/Introspection/index.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/components/Services/ApiExplorer/Security/Introspection/index.tsx @@ -10,27 +10,28 @@ import IntrospectionTable from './IntrospectionTable'; interface IntrospectionOptionsComponentProps extends InjectedProps {} -const IntrospectionOptionsComponent: React.FC = - ({ metadata, allRoles, dispatch }) => { - // Fire on component load, so that pro console doesn't crash on undefined metadata - useEffect(() => { - dispatch(exportMetadata()); - }, []); - - const disabledRoles = - metadata?.graphql_schema_introspection?.disabled_for_roles ?? []; - - const tableData = allRoles.map(role => ({ - roleName: role, - instrospectionIsDisabled: disabledRoles.includes(role), - })); - - return ( - - - - ); - }; +const IntrospectionOptionsComponent: React.FC< + IntrospectionOptionsComponentProps +> = ({ metadata, allRoles, dispatch }) => { + // Fire on component load, so that pro console doesn't crash on undefined metadata + useEffect(() => { + dispatch(exportMetadata()); + }, []); + + const disabledRoles = + metadata?.graphql_schema_introspection?.disabled_for_roles ?? []; + + const tableData = allRoles.map(role => ({ + roleName: role, + instrospectionIsDisabled: disabledRoles.includes(role), + })); + + return ( + + + + ); +}; const mapDispatchToProps = (dispatch: Dispatch) => ({ dispatch, diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Services/Common/Landing/Popup.module.scss b/frontend/libs/console/legacy-ce/src/lib/components/Services/Common/Landing/Popup.module.scss index 7707a92951c19..b13523846fef8 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Services/Common/Landing/Popup.module.scss +++ b/frontend/libs/console/legacy-ce/src/lib/components/Services/Common/Landing/Popup.module.scss @@ -1,5 +1,5 @@ -@import "../../../Common/Common.module"; -@import "../../../Common/TextAreaWithCopy/TextAreaWithCopy.module"; +@import '../../../Common/Common.module'; +@import '../../../Common/TextAreaWithCopy/TextAreaWithCopy.module'; .wd100 { width: 100%; @@ -11,7 +11,7 @@ height: 0; border-top: 8px solid transparent; border-bottom: 8px solid transparent; - border-right:8px solid #fff; + border-right: 8px solid #fff; position: absolute; left: 0; bottom: 20px; @@ -32,7 +32,7 @@ } .commonBorBottom { - border-bottom: 1px solid #DEDEDE; + border-bottom: 1px solid #dedede; } .addPaddLeft { @@ -59,12 +59,12 @@ top: 60px; left: 524px; } -.popupWrapper -{ +.popupWrapper { bottom: 0px; left: 244px; } -.popupWrapper, .popupWrapperPos { +.popupWrapper, +.popupWrapperPos { box-shadow: 0 0 14px 0 rgba(0, 0, 0, 0.16); background-color: #ffffff; position: absolute; @@ -90,7 +90,6 @@ } .copyGenerated { - } .copyTooltip .tooltiptext::after { diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Services/Common/Notification/Notification.module.scss b/frontend/libs/console/legacy-ce/src/lib/components/Services/Common/Notification/Notification.module.scss index 93cddc339ee6e..bdf49b6f6b479 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Services/Common/Notification/Notification.module.scss +++ b/frontend/libs/console/legacy-ce/src/lib/components/Services/Common/Notification/Notification.module.scss @@ -1 +1 @@ -@import "../../../Common/Common.module"; +@import '../../../Common/Common.module'; diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/Common/Components/FrequentlyUsedColumnSelector.tsx b/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/Common/Components/FrequentlyUsedColumnSelector.tsx index 95a539a55aad1..6923f2935726f 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/Common/Components/FrequentlyUsedColumnSelector.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/Common/Components/FrequentlyUsedColumnSelector.tsx @@ -33,46 +33,47 @@ interface FrequentlyUsedColumnSelectorProps { dispatch?: Dispatch | null; } -const FrequentlyUsedColumnSelector: React.VFC = - ({ onSelect, postgresVersion, action = null, dispatch = null }) => { - const frequentlyUsedColumnsOptions = frequentlyUsedColumns - .filter(fuc => !action || fuc.validFor.includes(action)) - .filter(col => - postgresVersion && col.minPGVersion - ? parseFloat(postgresVersion) >= col.minPGVersion - : true - ) - .map(fuc => { - const { title, subTitle } = getFreqUsedColDisplayInfo(fuc); - return { - content: ( +const FrequentlyUsedColumnSelector: React.VFC< + FrequentlyUsedColumnSelectorProps +> = ({ onSelect, postgresVersion, action = null, dispatch = null }) => { + const frequentlyUsedColumnsOptions = frequentlyUsedColumns + .filter(fuc => !action || fuc.validFor.includes(action)) + .filter(col => + postgresVersion && col.minPGVersion + ? parseFloat(postgresVersion) >= col.minPGVersion + : true + ) + .map(fuc => { + const { title, subTitle } = getFreqUsedColDisplayInfo(fuc); + return { + content: ( +
-
- {title} -
-
{subTitle}
+ {title}
- ), - onClick: () => (dispatch ? dispatch(onSelect(fuc)) : onSelect(fuc)), - }; - }); +
{subTitle}
+
+ ), + onClick: () => (dispatch ? dispatch(onSelect(fuc)) : onSelect(fuc)), + }; + }); - return ( - - {({ onClick }) => ( - - )} - - ); - }; + return ( + + {({ onClick }) => ( + + )} + + ); +}; export default FrequentlyUsedColumnSelector; diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/DataSources/ConnectionSettings/parts/CumulativeMaxConnections.tsx b/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/DataSources/ConnectionSettings/parts/CumulativeMaxConnections.tsx index fad6493d98280..a066f1f7946d3 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/DataSources/ConnectionSettings/parts/CumulativeMaxConnections.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/DataSources/ConnectionSettings/parts/CumulativeMaxConnections.tsx @@ -5,46 +5,47 @@ import { IndicatorCard } from '@/new-components/IndicatorCard'; import { FaExclamationTriangle } from 'react-icons/fa'; import styles from '../../DataSources.module.scss'; -export const CumulativeMaxConnections: React.VFC = - ({ connectionDBState, connectionDBStateDispatch }) => ( - <> -
- - connectionDBStateDispatch({ - type: 'UPDATE_TOTAL_MAX_CONNECTIONS', - data: e.target.value, - }) - } - min="0" - boldlabel - data-test="max-connections" - icon={ - connectionDBState?.connectionSettings?.max_connections !== undefined - } - /> -
- {connectionDBState?.connectionSettings?.max_connections && ( - -

- - Set Total Max Connections -

-

- You have set Max Connections Per Instance which is not - recommended for Hasura Cloud. Use Total Max Connections{' '} - instead. -

-
- )} - - ); +export const CumulativeMaxConnections: React.VFC< + ConnectionSettingsFormProps +> = ({ connectionDBState, connectionDBStateDispatch }) => ( + <> +
+ + connectionDBStateDispatch({ + type: 'UPDATE_TOTAL_MAX_CONNECTIONS', + data: e.target.value, + }) + } + min="0" + boldlabel + data-test="max-connections" + icon={ + connectionDBState?.connectionSettings?.max_connections !== undefined + } + /> +
+ {connectionDBState?.connectionSettings?.max_connections && ( + +

+ + Set Total Max Connections +

+

+ You have set Max Connections Per Instance which is not + recommended for Hasura Cloud. Use Total Max Connections{' '} + instead. +

+
+ )} + +); diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/DataSources/GraphQLFieldCustomization/GraphQLFieldCustomization.stories.tsx b/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/DataSources/GraphQLFieldCustomization/GraphQLFieldCustomization.stories.tsx index 9353a852fa582..87950946d77ad 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/DataSources/GraphQLFieldCustomization/GraphQLFieldCustomization.stories.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/DataSources/GraphQLFieldCustomization/GraphQLFieldCustomization.stories.tsx @@ -9,8 +9,9 @@ export default { argTypes: { onChange: { action: 'change' } }, } as ComponentMeta; -export const Playground: ComponentStory = - args => ; +export const Playground: ComponentStory< + typeof GraphQLFieldCustomization +> = args => ; Playground.args = { rootFields: { diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/DataSources/GraphQLFieldCustomization/GraphQLFieldCustomizationContainer.tsx b/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/DataSources/GraphQLFieldCustomization/GraphQLFieldCustomizationContainer.tsx index 2ecbfbf9d5f6d..bc7ba223f4bed 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/DataSources/GraphQLFieldCustomization/GraphQLFieldCustomizationContainer.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/DataSources/GraphQLFieldCustomization/GraphQLFieldCustomizationContainer.tsx @@ -30,33 +30,34 @@ export const getActionType = ( ): ConnectDBActions['type'] | null => CustomizationFieldNameToActionTypeMap[fieldName] || null; -export const GraphQLFieldCustomizationContainer: React.FC = - ({ - rootFields, - typeNames, - namingConvention, - connectionDBStateDispatch, - connectionDBState, - }) => { - const onChange = ( - fieldName: CustomizationFieldName, - fieldValue: string | null | undefined - ) => { - const actionType = getActionType(fieldName); - if (actionType) { - connectionDBStateDispatch({ - type: actionType, - data: fieldValue, - } as ConnectDBActions); - } - }; - return ( - - ); +export const GraphQLFieldCustomizationContainer: React.FC< + GraphQLFieldCustomizationContainerProps +> = ({ + rootFields, + typeNames, + namingConvention, + connectionDBStateDispatch, + connectionDBState, +}) => { + const onChange = ( + fieldName: CustomizationFieldName, + fieldValue: string | null | undefined + ) => { + const actionType = getActionType(fieldName); + if (actionType) { + connectionDBStateDispatch({ + type: actionType, + data: fieldValue, + } as ConnectDBActions); + } }; + return ( + + ); +}; diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/Migrations/Migrations.module.scss b/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/Migrations/Migrations.module.scss index b36c570ab8153..eed4e70c3a878 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/Migrations/Migrations.module.scss +++ b/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/Migrations/Migrations.module.scss @@ -1,4 +1,4 @@ -@import "../../../Common/Common.module"; +@import '../../../Common/Common.module'; .migration_mode { display: inline-block; diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/Schema/TemplateGallery/TemplateGallery.module.scss b/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/Schema/TemplateGallery/TemplateGallery.module.scss index bad999a62bc1b..855b5fdd5f38f 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/Schema/TemplateGallery/TemplateGallery.module.scss +++ b/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/Schema/TemplateGallery/TemplateGallery.module.scss @@ -1,4 +1,3 @@ - .table { width: 100%; background-color: white; @@ -75,7 +74,7 @@ .ace_custom_style { border: 1px solid #dddddd; - margin: .5em 0; + margin: 0.5em 0; background-color: #f8fafb; border-radius: 4px; } @@ -85,7 +84,7 @@ padding: 4px 8px; font-weight: 600; border-radius: 16px; - color: #6B7280; + color: #6b7280; border: 1px solid #d1d5db; } @@ -116,7 +115,7 @@ opacity: 0; } -tr:hover .schema_gallery_button{ +tr:hover .schema_gallery_button { opacity: 1; } diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/Schema/tableTrackCustomization/TableTrackingCustomizationContainer.tsx b/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/Schema/tableTrackCustomization/TableTrackingCustomizationContainer.tsx index e34da8a101100..4a16ef950eca0 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/Schema/tableTrackCustomization/TableTrackingCustomizationContainer.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/Schema/tableTrackCustomization/TableTrackingCustomizationContainer.tsx @@ -28,77 +28,77 @@ type TableTrackingCustomizationModalContainerProps = Omit< 'onSubmit' > & { dataSource: string; driver: Driver; schema: string }; -export const TableTrackingCustomizationModalContainer: React.FC = - ({ onClose, tableName, schema, dataSource, driver }) => { - const { fireNotification } = useFireNotification(); - const dispatch: ThunkDispatch = - useDispatch(); - const mutation = useMetadataMigration({ - onSuccess: () => { - dispatch({ type: REQUEST_SUCCESS }); - dispatch(updateSchemaInfo()).then(() => { - const nextRoute = - driver !== 'bigquery' - ? getTableModifyRoute(schema, dataSource, tableName, true) - : getTableBrowseRoute(schema, dataSource, tableName, true); - dispatch(_push(nextRoute)); - dispatch(setSidebarLoading(false)); - fireNotification({ - title: 'Success!', - message: 'Existing table/view added', - type: 'success', - }); - if (onClose) onClose(); - }); - }, - onError: (error: Error) => { +export const TableTrackingCustomizationModalContainer: React.FC< + TableTrackingCustomizationModalContainerProps +> = ({ onClose, tableName, schema, dataSource, driver }) => { + const { fireNotification } = useFireNotification(); + const dispatch: ThunkDispatch = useDispatch(); + const mutation = useMetadataMigration({ + onSuccess: () => { + dispatch({ type: REQUEST_SUCCESS }); + dispatch(updateSchemaInfo()).then(() => { + const nextRoute = + driver !== 'bigquery' + ? getTableModifyRoute(schema, dataSource, tableName, true) + : getTableBrowseRoute(schema, dataSource, tableName, true); + dispatch(_push(nextRoute)); + dispatch(setSidebarLoading(false)); fireNotification({ - title: 'Error', - message: error?.message ?? 'Error while adding table/view', - type: 'error', + title: 'Success!', + message: 'Existing table/view added', + type: 'success', }); - }, - }); + if (onClose) onClose(); + }); + }, + onError: (error: Error) => { + fireNotification({ + title: 'Error', + message: error?.message ?? 'Error while adding table/view', + type: 'error', + }); + }, + }); - const onCustomizationFormSubmit = (values: FormValues) => { - const requestBody = { - type: getTrackTableType(driver) as allowedMetadataTypes, - args: { - source: dataSource, - table: getQualifiedTable({ - driver, - tableName, - schema, - }), - configuration: { - custom_name: values.custom_name, - custom_root_fields: { - select: values.select, - select_by_pk: values.select_by_pk, - select_aggregate: values.select_aggregate, - select_stream: values.select_stream, - insert: values.insert, - insert_one: values.insert_one, - update: values.update, - update_by_pk: values.update_by_pk, - delete: values.delete, - delete_by_pk: values.delete_by_pk, - update_many: values.update_many, - }, + const onCustomizationFormSubmit = (values: FormValues) => { + const requestBody = { + type: getTrackTableType(driver) as allowedMetadataTypes, + args: { + source: dataSource, + table: getQualifiedTable({ + driver, + tableName, + schema, + }), + configuration: { + custom_name: values.custom_name, + custom_root_fields: { + select: values.select, + select_by_pk: values.select_by_pk, + select_aggregate: values.select_aggregate, + select_stream: values.select_stream, + insert: values.insert, + insert_one: values.insert_one, + update: values.update, + update_by_pk: values.update_by_pk, + delete: values.delete, + delete_by_pk: values.delete_by_pk, + update_many: values.update_many, }, }, - }; - mutation.mutate({ - query: requestBody, - }); + }, }; - - return ( - - ); + mutation.mutate({ + query: requestBody, + }); }; + + return ( + + ); +}; diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/Schema/tableTrackCustomization/TableTrackingCustomizationForm.tsx b/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/Schema/tableTrackCustomization/TableTrackingCustomizationForm.tsx index 69b2d4afd3aa2..73567f61b166c 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/Schema/tableTrackCustomization/TableTrackingCustomizationForm.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/Schema/tableTrackCustomization/TableTrackingCustomizationForm.tsx @@ -21,125 +21,126 @@ export type TableTrackingCustomizationFormProps = { onClose: () => void; }; -export const TableTrackingCustomizationForm: React.VFC = - props => { - const { onClose } = props; +export const TableTrackingCustomizationForm: React.VFC< + TableTrackingCustomizationFormProps +> = props => { + const { onClose } = props; - const { - errors, - formMethods, - handleSubmit, - hasValues, - isMutateOpen, - isQueryOpen, - placeholders, - reset, - setCustomTableName, - } = useGqlCustomizationForm(props); + const { + errors, + formMethods, + handleSubmit, + hasValues, + isMutateOpen, + isQueryOpen, + placeholders, + reset, + setCustomTableName, + } = useGqlCustomizationForm(props); - return ( - -
-
-
- -
- -
+ return ( + + +
+
+ +
+ +
-
- { - setCustomTableName(''); - }} - onChange={value => { - setCustomTableName(value); - }} - /> -
- {errors.custom_name?.type === 'required' && ( -
-
-
-
- - - This field is required! - -
+
+ { + setCustomTableName(''); + }} + onChange={value => { + setCustomTableName(value); + }} + /> +
+ {errors.custom_name?.type === 'required' && ( +
+
+
+
+ + + This field is required! +
- )} +
+ )} -
-
- - -
-
- {query_field_props.map(name => ( - - ))} -
+
+
+ + +
+
+ {query_field_props.map(name => ( + + ))}
- - -
+
+ +
+
-
-
- - -
-
- {mutation_field_props.map(name => ( - - ))} -
+
+
+ + +
+
+ {mutation_field_props.map(name => ( + + ))}
- - -
+
+ +
- -
- - - ); - }; + + +
+ + + ); +}; diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/Schema/tableTrackCustomization/TableTrackingCustomizationModal.tsx b/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/Schema/tableTrackCustomization/TableTrackingCustomizationModal.tsx index 4f165a2676c87..88add56db4523 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/Schema/tableTrackCustomization/TableTrackingCustomizationModal.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/Schema/tableTrackCustomization/TableTrackingCustomizationModal.tsx @@ -22,41 +22,42 @@ export type TableTrackingCustomizationModalProps = { currentConfiguration?: MetadataTableConfig; }; -export const TableTrackingCustomizationModal: React.FC = - ({ - tableName, - onSubmit, - onClose, - show = true, - currentConfiguration, - dialogDescription, - }) => { - return ( - <> - {show && ( - = ({ + tableName, + onSubmit, + onClose, + show = true, + currentConfiguration, + dialogDescription, +}) => { + return ( + <> + {show && ( + + - - - - - )} - - ); - }; + onSubmit={onSubmit} + /> + + + )} + + ); +}; diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/TablePermissions/PermissionBuilder/PermissionBuilder.module.scss b/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/TablePermissions/PermissionBuilder/PermissionBuilder.module.scss index 37f54942ec2cb..a0540bb02e707 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/TablePermissions/PermissionBuilder/PermissionBuilder.module.scss +++ b/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/TablePermissions/PermissionBuilder/PermissionBuilder.module.scss @@ -1,6 +1,7 @@ -@import "../../../../Common/Common.module"; +@import '../../../../Common/Common.module'; -.qb_select, .qb_input { +.qb_select, +.qb_input { border: none; background-color: transparent; border-bottom: 2px dotted; @@ -12,7 +13,8 @@ cursor: pointer; } -.qb_select:focus, .qb_input:focus { +.qb_select:focus, +.qb_input:focus { outline: none; } diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/TablePermissions/Permissions.module.scss b/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/TablePermissions/Permissions.module.scss index 335761e264fe2..ed71feb61f5a4 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/TablePermissions/Permissions.module.scss +++ b/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/TablePermissions/Permissions.module.scss @@ -1,9 +1,10 @@ -@import "../TableModify/ModifyTable.module"; +@import '../TableModify/ModifyTable.module'; .permissionsTable { width: 85%; - td, th { + td, + th { text-align: center; vertical-align: middle !important; position: relative; @@ -13,12 +14,14 @@ font-weight: bold; } - td:last-child, th:last-child { + td:last-child, + th:last-child { border-left: 4px double #ddd; width: 10%; } - td:first-child, th:first-child { + td:first-child, + th:first-child { overflow: auto; border-right: 4px double #ddd; max-width: 250px; @@ -56,9 +59,10 @@ } } - .currEdit, .currEdit:hover { - background-color: #FFF3D5; - color: #FD9540; + .currEdit, + .currEdit:hover { + background-color: #fff3d5; + color: #fd9540; .editPermsIcon { display: inline-block; diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/custom.css b/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/custom.css index 55066db08ff53..060ed811ed6ba 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/custom.css +++ b/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/custom.css @@ -14,4 +14,4 @@ .ant-tree { color: grey; -} \ No newline at end of file +} diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Services/Events/EventTriggers/TableCommon/EventTable.module.scss b/frontend/libs/console/legacy-ce/src/lib/components/Services/Events/EventTriggers/TableCommon/EventTable.module.scss index 63b00c9a6aecd..36e1251f21193 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Services/Events/EventTriggers/TableCommon/EventTable.module.scss +++ b/frontend/libs/console/legacy-ce/src/lib/components/Services/Events/EventTriggers/TableCommon/EventTable.module.scss @@ -1,4 +1,4 @@ -@import "../../../../Common/TableCommon/Table.module"; +@import '../../../../Common/TableCommon/Table.module'; .dropdown_wrapper { width: 300px; @@ -28,15 +28,13 @@ display: flex; align-items: center; } -.tabletdCenter -{ +.tabletdCenter { height: 21px; display: flex; align-items: center; justify-content: center; } -.tableArrowCenter -{ +.tableArrowCenter { height: 100%; display: flex; align-items: center; @@ -56,7 +54,7 @@ } .invocationSuccess { - color: #28a745 + color: #28a745; } .invocationFailure { color: red; @@ -107,7 +105,7 @@ display: flex; align-items: center; justify-content: center; - background-color: #FFF3D5; + background-color: #fff3d5; padding: 5px; min-height: 41px; } @@ -116,7 +114,7 @@ display: flex; align-items: center; justify-content: center; - background-color: #FFF3D5; + background-color: #fff3d5; padding: 5px; min-height: 41px; position: relative; @@ -176,7 +174,7 @@ } i:hover { - color: #4D4D4D ; + color: #4d4d4d; } } diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Services/Events/__tests__/fixtures/events.json b/frontend/libs/console/legacy-ce/src/lib/components/Services/Events/__tests__/fixtures/events.json index 9a2dceaa447a7..5757a877708cf 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Services/Events/__tests__/fixtures/events.json +++ b/frontend/libs/console/legacy-ce/src/lib/components/Services/Events/__tests__/fixtures/events.json @@ -83,4 +83,4 @@ "2021-05-18 07:14:19.196511", "f" ] -] \ No newline at end of file +] diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Services/Events/__tests__/fixtures/invocations.json b/frontend/libs/console/legacy-ce/src/lib/components/Services/Events/__tests__/fixtures/invocations.json index dd5af7cdef34f..1fa614bd5f690 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Services/Events/__tests__/fixtures/invocations.json +++ b/frontend/libs/console/legacy-ce/src/lib/components/Services/Events/__tests__/fixtures/invocations.json @@ -1,222 +1,222 @@ [ - [ - "id", - "event_id", - "status", - "request", - "response", - "created_at", - "id", - "schema_name", - "table_name", - "trigger_name", - "payload", - "delivered", - "error", - "tries", - "created_at", - "locked", - "next_retry_at", - "archived" - ], - [ - "31b4c28c-954d-4871-ba95-a6d7da8d6988", - "7bc7b398-f1cd-4761-839d-44971e01be48", - "1000", - "{\"payload\":{\"event\":{\"session_variables\":{\"x-hasura-role\":\"admin\"},\"op\":\"INSERT\",\"data\":{\"old\":null,\"new\":{\"name\":\"safs\",\"id\":8}},\"trace_context\":{\"trace_id\":\"04415c5c0870f8f6\",\"span_id\":\"455d47a2c5d8f40e\"}},\"created_at\":\"2021-05-18T07:39:50.658771Z\",\"id\":\"7bc7b398-f1cd-4761-839d-44971e01be48\",\"delivery_info\":{\"max_retries\":4,\"current_retry\":4},\"trigger\":{\"name\":\"new_user\"},\"table\":{\"schema\":\"public\",\"name\":\"users\"}},\"headers\":[{\"value\":\"application/json\",\"name\":\"Content-Type\"},{\"value\":\"hasura-graphql-engine/v2.0.0-alpha.9\",\"name\":\"User-Agent\"}],\"version\":\"2\"}", - "{\"data\":{\"message\":\"\\\"HttpExceptionRequest Request {\\\\n host = \\\\\\\"httsssp.org\\\\\\\"\\\\n port = 80\\\\n secure = False\\\\n requestHeaders = [(\\\\\\\"X-B3-TraceId\\\\\\\",\\\\\\\"04415c5c0870f8f6\\\\\\\"),(\\\\\\\"X-B3-SpanId\\\\\\\",\\\\\\\"d1260fcdfe50945e\\\\\\\"),(\\\\\\\"X-B3-ParentSpanId\\\\\\\",\\\\\\\"de05cf247e935b7a\\\\\\\"),(\\\\\\\"Content-Type\\\\\\\",\\\\\\\"application/json\\\\\\\"),(\\\\\\\"User-Agent\\\\\\\",\\\\\\\"hasura-graphql-engine/v2.0.0-alpha.9\\\\\\\")]\\\\n path = \\\\\\\"/post\\\\\\\"\\\\n queryString = \\\\\\\"\\\\\\\"\\\\n method = \\\\\\\"POST\\\\\\\"\\\\n proxy = Nothing\\\\n rawBody = False\\\\n redirectCount = 10\\\\n responseTimeout = ResponseTimeoutMicro 60000000\\\\n requestVersion = HTTP/1.1\\\\n proxySecureMode = ProxySecureWithConnect\\\\n}\\\\n (ConnectionFailure Network.Socket.getAddrInfo (called with preferred socket type/protocol: AddrInfo {addrFlags = [], addrFamily = AF_UNSPEC, addrSocketType = Stream, addrProtocol = 0, addrAddress = 0.0.0.0:0, addrCanonName = Nothing}, host name: Just \\\\\\\"httsssp.org\\\\\\\", service name: Just \\\\\\\"80\\\\\\\"): does not exist (Name or service not known))\\\"\"},\"version\":\"2\",\"type\":\"client_error\"}", - "2021-05-18 07:40:32.81592", - "7bc7b398-f1cd-4761-839d-44971e01be48", - "public", - "users", - "new_user", - "{\"op\": \"INSERT\", \"data\": {\"new\": {\"id\": 8, \"name\": \"safs\"}, \"old\": null}, \"trace_context\": {\"span_id\": \"455d47a2c5d8f40e\", \"trace_id\": \"04415c5c0870f8f6\"}, \"session_variables\": {\"x-hasura-role\": \"admin\"}}", - "f", - "t", - "5", - "2021-05-18 07:39:50.658771", - "NULL", - "NULL", - "f" - ], - [ - "bf1760ee-c628-4b94-b535-1d5453675958", - "c3ac48be-a569-4d87-8c52-cb84309002ed", - "1000", - "{\"payload\":{\"event\":{\"session_variables\":{\"x-hasura-role\":\"admin\"},\"op\":\"INSERT\",\"data\":{\"old\":null,\"new\":{\"name\":\"safs\",\"id\":6}},\"trace_context\":{\"trace_id\":\"ecba73bac1b4601a\",\"span_id\":\"5a75ae38fccf4473\"}},\"created_at\":\"2021-05-18T07:39:50.332379Z\",\"id\":\"c3ac48be-a569-4d87-8c52-cb84309002ed\",\"delivery_info\":{\"max_retries\":4,\"current_retry\":4},\"trigger\":{\"name\":\"new_user\"},\"table\":{\"schema\":\"public\",\"name\":\"users\"}},\"headers\":[{\"value\":\"application/json\",\"name\":\"Content-Type\"},{\"value\":\"hasura-graphql-engine/v2.0.0-alpha.9\",\"name\":\"User-Agent\"}],\"version\":\"2\"}", - "{\"data\":{\"message\":\"\\\"HttpExceptionRequest Request {\\\\n host = \\\\\\\"httsssp.org\\\\\\\"\\\\n port = 80\\\\n secure = False\\\\n requestHeaders = [(\\\\\\\"X-B3-TraceId\\\\\\\",\\\\\\\"ecba73bac1b4601a\\\\\\\"),(\\\\\\\"X-B3-SpanId\\\\\\\",\\\\\\\"1c3c460b36da4a0e\\\\\\\"),(\\\\\\\"X-B3-ParentSpanId\\\\\\\",\\\\\\\"f309dbf4632da6a5\\\\\\\"),(\\\\\\\"Content-Type\\\\\\\",\\\\\\\"application/json\\\\\\\"),(\\\\\\\"User-Agent\\\\\\\",\\\\\\\"hasura-graphql-engine/v2.0.0-alpha.9\\\\\\\")]\\\\n path = \\\\\\\"/post\\\\\\\"\\\\n queryString = \\\\\\\"\\\\\\\"\\\\n method = \\\\\\\"POST\\\\\\\"\\\\n proxy = Nothing\\\\n rawBody = False\\\\n redirectCount = 10\\\\n responseTimeout = ResponseTimeoutMicro 60000000\\\\n requestVersion = HTTP/1.1\\\\n proxySecureMode = ProxySecureWithConnect\\\\n}\\\\n (ConnectionFailure Network.Socket.getAddrInfo (called with preferred socket type/protocol: AddrInfo {addrFlags = [], addrFamily = AF_UNSPEC, addrSocketType = Stream, addrProtocol = 0, addrAddress = 0.0.0.0:0, addrCanonName = Nothing}, host name: Just \\\\\\\"httsssp.org\\\\\\\", service name: Just \\\\\\\"80\\\\\\\"): does not exist (Name or service not known))\\\"\"},\"version\":\"2\",\"type\":\"client_error\"}", - "2021-05-18 07:40:32.815484", - "c3ac48be-a569-4d87-8c52-cb84309002ed", - "public", - "users", - "new_user", - "{\"op\": \"INSERT\", \"data\": {\"new\": {\"id\": 6, \"name\": \"safs\"}, \"old\": null}, \"trace_context\": {\"span_id\": \"5a75ae38fccf4473\", \"trace_id\": \"ecba73bac1b4601a\"}, \"session_variables\": {\"x-hasura-role\": \"admin\"}}", - "f", - "t", - "5", - "2021-05-18 07:39:50.332379", - "NULL", - "NULL", - "f" - ], - [ - "5836823f-9104-489e-b339-946b45e266a9", - "338eec2d-0c1f-4358-ae12-05d3f73a85c6", - "1000", - "{\"payload\":{\"event\":{\"session_variables\":{\"x-hasura-role\":\"admin\"},\"op\":\"INSERT\",\"data\":{\"old\":null,\"new\":{\"name\":\"safs\",\"id\":9}},\"trace_context\":{\"trace_id\":\"ea970ad818f358cf\",\"span_id\":\"77150de9d725e5df\"}},\"created_at\":\"2021-05-18T07:39:50.831182Z\",\"id\":\"338eec2d-0c1f-4358-ae12-05d3f73a85c6\",\"delivery_info\":{\"max_retries\":4,\"current_retry\":4},\"trigger\":{\"name\":\"new_user\"},\"table\":{\"schema\":\"public\",\"name\":\"users\"}},\"headers\":[{\"value\":\"application/json\",\"name\":\"Content-Type\"},{\"value\":\"hasura-graphql-engine/v2.0.0-alpha.9\",\"name\":\"User-Agent\"}],\"version\":\"2\"}", - "{\"data\":{\"message\":\"\\\"HttpExceptionRequest Request {\\\\n host = \\\\\\\"httsssp.org\\\\\\\"\\\\n port = 80\\\\n secure = False\\\\n requestHeaders = [(\\\\\\\"X-B3-TraceId\\\\\\\",\\\\\\\"ea970ad818f358cf\\\\\\\"),(\\\\\\\"X-B3-SpanId\\\\\\\",\\\\\\\"332c2f49df1cb4d2\\\\\\\"),(\\\\\\\"X-B3-ParentSpanId\\\\\\\",\\\\\\\"3668323420f67bb1\\\\\\\"),(\\\\\\\"Content-Type\\\\\\\",\\\\\\\"application/json\\\\\\\"),(\\\\\\\"User-Agent\\\\\\\",\\\\\\\"hasura-graphql-engine/v2.0.0-alpha.9\\\\\\\")]\\\\n path = \\\\\\\"/post\\\\\\\"\\\\n queryString = \\\\\\\"\\\\\\\"\\\\n method = \\\\\\\"POST\\\\\\\"\\\\n proxy = Nothing\\\\n rawBody = False\\\\n redirectCount = 10\\\\n responseTimeout = ResponseTimeoutMicro 60000000\\\\n requestVersion = HTTP/1.1\\\\n proxySecureMode = ProxySecureWithConnect\\\\n}\\\\n (ConnectionFailure Network.Socket.getAddrInfo (called with preferred socket type/protocol: AddrInfo {addrFlags = [], addrFamily = AF_UNSPEC, addrSocketType = Stream, addrProtocol = 0, addrAddress = 0.0.0.0:0, addrCanonName = Nothing}, host name: Just \\\\\\\"httsssp.org\\\\\\\", service name: Just \\\\\\\"80\\\\\\\"): does not exist (Name or service not known))\\\"\"},\"version\":\"2\",\"type\":\"client_error\"}", - "2021-05-18 07:40:32.81517", - "338eec2d-0c1f-4358-ae12-05d3f73a85c6", - "public", - "users", - "new_user", - "{\"op\": \"INSERT\", \"data\": {\"new\": {\"id\": 9, \"name\": \"safs\"}, \"old\": null}, \"trace_context\": {\"span_id\": \"77150de9d725e5df\", \"trace_id\": \"ea970ad818f358cf\"}, \"session_variables\": {\"x-hasura-role\": \"admin\"}}", - "f", - "t", - "5", - "2021-05-18 07:39:50.831182", - "NULL", - "NULL", - "f" - ], - [ - "7b314fa3-fa10-4d1d-9c7b-0799e2a2345c", - "423e5a24-d4e0-493a-83df-ecff0eca2398", - "1000", - "{\"payload\":{\"event\":{\"session_variables\":{\"x-hasura-role\":\"admin\"},\"op\":\"INSERT\",\"data\":{\"old\":null,\"new\":{\"name\":\"safs\",\"id\":7}},\"trace_context\":{\"trace_id\":\"da0635bf4fb444b1\",\"span_id\":\"5e088982a14f9bdd\"}},\"created_at\":\"2021-05-18T07:39:50.490999Z\",\"id\":\"423e5a24-d4e0-493a-83df-ecff0eca2398\",\"delivery_info\":{\"max_retries\":4,\"current_retry\":4},\"trigger\":{\"name\":\"new_user\"},\"table\":{\"schema\":\"public\",\"name\":\"users\"}},\"headers\":[{\"value\":\"application/json\",\"name\":\"Content-Type\"},{\"value\":\"hasura-graphql-engine/v2.0.0-alpha.9\",\"name\":\"User-Agent\"}],\"version\":\"2\"}", - "{\"data\":{\"message\":\"\\\"HttpExceptionRequest Request {\\\\n host = \\\\\\\"httsssp.org\\\\\\\"\\\\n port = 80\\\\n secure = False\\\\n requestHeaders = [(\\\\\\\"X-B3-TraceId\\\\\\\",\\\\\\\"da0635bf4fb444b1\\\\\\\"),(\\\\\\\"X-B3-SpanId\\\\\\\",\\\\\\\"f92c4fac3a66595a\\\\\\\"),(\\\\\\\"X-B3-ParentSpanId\\\\\\\",\\\\\\\"b3a34f8a72e89980\\\\\\\"),(\\\\\\\"Content-Type\\\\\\\",\\\\\\\"application/json\\\\\\\"),(\\\\\\\"User-Agent\\\\\\\",\\\\\\\"hasura-graphql-engine/v2.0.0-alpha.9\\\\\\\")]\\\\n path = \\\\\\\"/post\\\\\\\"\\\\n queryString = \\\\\\\"\\\\\\\"\\\\n method = \\\\\\\"POST\\\\\\\"\\\\n proxy = Nothing\\\\n rawBody = False\\\\n redirectCount = 10\\\\n responseTimeout = ResponseTimeoutMicro 60000000\\\\n requestVersion = HTTP/1.1\\\\n proxySecureMode = ProxySecureWithConnect\\\\n}\\\\n (ConnectionFailure Network.Socket.getAddrInfo (called with preferred socket type/protocol: AddrInfo {addrFlags = [], addrFamily = AF_UNSPEC, addrSocketType = Stream, addrProtocol = 0, addrAddress = 0.0.0.0:0, addrCanonName = Nothing}, host name: Just \\\\\\\"httsssp.org\\\\\\\", service name: Just \\\\\\\"80\\\\\\\"): does not exist (Name or service not known))\\\"\"},\"version\":\"2\",\"type\":\"client_error\"}", - "2021-05-18 07:40:32.815118", - "423e5a24-d4e0-493a-83df-ecff0eca2398", - "public", - "users", - "new_user", - "{\"op\": \"INSERT\", \"data\": {\"new\": {\"id\": 7, \"name\": \"safs\"}, \"old\": null}, \"trace_context\": {\"span_id\": \"5e088982a14f9bdd\", \"trace_id\": \"da0635bf4fb444b1\"}, \"session_variables\": {\"x-hasura-role\": \"admin\"}}", - "f", - "t", - "5", - "2021-05-18 07:39:50.490999", - "NULL", - "NULL", - "f" - ], - [ - "c6ec4304-3848-4c4c-a188-ff91ebe61ea0", - "7bc7b398-f1cd-4761-839d-44971e01be48", - "1000", - "{\"payload\":{\"event\":{\"session_variables\":{\"x-hasura-role\":\"admin\"},\"op\":\"INSERT\",\"data\":{\"old\":null,\"new\":{\"name\":\"safs\",\"id\":8}},\"trace_context\":{\"trace_id\":\"04415c5c0870f8f6\",\"span_id\":\"455d47a2c5d8f40e\"}},\"created_at\":\"2021-05-18T07:39:50.658771Z\",\"id\":\"7bc7b398-f1cd-4761-839d-44971e01be48\",\"delivery_info\":{\"max_retries\":4,\"current_retry\":3},\"trigger\":{\"name\":\"new_user\"},\"table\":{\"schema\":\"public\",\"name\":\"users\"}},\"headers\":[{\"value\":\"application/json\",\"name\":\"Content-Type\"},{\"value\":\"hasura-graphql-engine/v2.0.0-alpha.9\",\"name\":\"User-Agent\"}],\"version\":\"2\"}", - "{\"data\":{\"message\":\"\\\"HttpExceptionRequest Request {\\\\n host = \\\\\\\"httsssp.org\\\\\\\"\\\\n port = 80\\\\n secure = False\\\\n requestHeaders = [(\\\\\\\"X-B3-TraceId\\\\\\\",\\\\\\\"04415c5c0870f8f6\\\\\\\"),(\\\\\\\"X-B3-SpanId\\\\\\\",\\\\\\\"f520ea1624695587\\\\\\\"),(\\\\\\\"X-B3-ParentSpanId\\\\\\\",\\\\\\\"2dc1b4d86426e316\\\\\\\"),(\\\\\\\"Content-Type\\\\\\\",\\\\\\\"application/json\\\\\\\"),(\\\\\\\"User-Agent\\\\\\\",\\\\\\\"hasura-graphql-engine/v2.0.0-alpha.9\\\\\\\")]\\\\n path = \\\\\\\"/post\\\\\\\"\\\\n queryString = \\\\\\\"\\\\\\\"\\\\n method = \\\\\\\"POST\\\\\\\"\\\\n proxy = Nothing\\\\n rawBody = False\\\\n redirectCount = 10\\\\n responseTimeout = ResponseTimeoutMicro 60000000\\\\n requestVersion = HTTP/1.1\\\\n proxySecureMode = ProxySecureWithConnect\\\\n}\\\\n (ConnectionFailure Network.Socket.getAddrInfo (called with preferred socket type/protocol: AddrInfo {addrFlags = [], addrFamily = AF_UNSPEC, addrSocketType = Stream, addrProtocol = 0, addrAddress = 0.0.0.0:0, addrCanonName = Nothing}, host name: Just \\\\\\\"httsssp.org\\\\\\\", service name: Just \\\\\\\"80\\\\\\\"): does not exist (Name or service not known))\\\"\"},\"version\":\"2\",\"type\":\"client_error\"}", - "2021-05-18 07:40:22.736277", - "7bc7b398-f1cd-4761-839d-44971e01be48", - "public", - "users", - "new_user", - "{\"op\": \"INSERT\", \"data\": {\"new\": {\"id\": 8, \"name\": \"safs\"}, \"old\": null}, \"trace_context\": {\"span_id\": \"455d47a2c5d8f40e\", \"trace_id\": \"04415c5c0870f8f6\"}, \"session_variables\": {\"x-hasura-role\": \"admin\"}}", - "f", - "t", - "5", - "2021-05-18 07:39:50.658771", - "NULL", - "NULL", - "f" - ], - [ - "8c88c745-29eb-4637-ad2d-85f3d6ba82c4", - "423e5a24-d4e0-493a-83df-ecff0eca2398", - "1000", - "{\"payload\":{\"event\":{\"session_variables\":{\"x-hasura-role\":\"admin\"},\"op\":\"INSERT\",\"data\":{\"old\":null,\"new\":{\"name\":\"safs\",\"id\":7}},\"trace_context\":{\"trace_id\":\"da0635bf4fb444b1\",\"span_id\":\"5e088982a14f9bdd\"}},\"created_at\":\"2021-05-18T07:39:50.490999Z\",\"id\":\"423e5a24-d4e0-493a-83df-ecff0eca2398\",\"delivery_info\":{\"max_retries\":4,\"current_retry\":3},\"trigger\":{\"name\":\"new_user\"},\"table\":{\"schema\":\"public\",\"name\":\"users\"}},\"headers\":[{\"value\":\"application/json\",\"name\":\"Content-Type\"},{\"value\":\"hasura-graphql-engine/v2.0.0-alpha.9\",\"name\":\"User-Agent\"}],\"version\":\"2\"}", - "{\"data\":{\"message\":\"\\\"HttpExceptionRequest Request {\\\\n host = \\\\\\\"httsssp.org\\\\\\\"\\\\n port = 80\\\\n secure = False\\\\n requestHeaders = [(\\\\\\\"X-B3-TraceId\\\\\\\",\\\\\\\"da0635bf4fb444b1\\\\\\\"),(\\\\\\\"X-B3-SpanId\\\\\\\",\\\\\\\"d6bdb95ec116b8ff\\\\\\\"),(\\\\\\\"X-B3-ParentSpanId\\\\\\\",\\\\\\\"01b61664322a458b\\\\\\\"),(\\\\\\\"Content-Type\\\\\\\",\\\\\\\"application/json\\\\\\\"),(\\\\\\\"User-Agent\\\\\\\",\\\\\\\"hasura-graphql-engine/v2.0.0-alpha.9\\\\\\\")]\\\\n path = \\\\\\\"/post\\\\\\\"\\\\n queryString = \\\\\\\"\\\\\\\"\\\\n method = \\\\\\\"POST\\\\\\\"\\\\n proxy = Nothing\\\\n rawBody = False\\\\n redirectCount = 10\\\\n responseTimeout = ResponseTimeoutMicro 60000000\\\\n requestVersion = HTTP/1.1\\\\n proxySecureMode = ProxySecureWithConnect\\\\n}\\\\n (ConnectionFailure Network.Socket.getAddrInfo (called with preferred socket type/protocol: AddrInfo {addrFlags = [], addrFamily = AF_UNSPEC, addrSocketType = Stream, addrProtocol = 0, addrAddress = 0.0.0.0:0, addrCanonName = Nothing}, host name: Just \\\\\\\"httsssp.org\\\\\\\", service name: Just \\\\\\\"80\\\\\\\"): does not exist (Name or service not known))\\\"\"},\"version\":\"2\",\"type\":\"client_error\"}", - "2021-05-18 07:40:22.736095", - "423e5a24-d4e0-493a-83df-ecff0eca2398", - "public", - "users", - "new_user", - "{\"op\": \"INSERT\", \"data\": {\"new\": {\"id\": 7, \"name\": \"safs\"}, \"old\": null}, \"trace_context\": {\"span_id\": \"5e088982a14f9bdd\", \"trace_id\": \"da0635bf4fb444b1\"}, \"session_variables\": {\"x-hasura-role\": \"admin\"}}", - "f", - "t", - "5", - "2021-05-18 07:39:50.490999", - "NULL", - "NULL", - "f" - ], - [ - "48532d4d-ee73-4245-a8f6-378b034eb4f0", - "338eec2d-0c1f-4358-ae12-05d3f73a85c6", - "1000", - "{\"payload\":{\"event\":{\"session_variables\":{\"x-hasura-role\":\"admin\"},\"op\":\"INSERT\",\"data\":{\"old\":null,\"new\":{\"name\":\"safs\",\"id\":9}},\"trace_context\":{\"trace_id\":\"ea970ad818f358cf\",\"span_id\":\"77150de9d725e5df\"}},\"created_at\":\"2021-05-18T07:39:50.831182Z\",\"id\":\"338eec2d-0c1f-4358-ae12-05d3f73a85c6\",\"delivery_info\":{\"max_retries\":4,\"current_retry\":3},\"trigger\":{\"name\":\"new_user\"},\"table\":{\"schema\":\"public\",\"name\":\"users\"}},\"headers\":[{\"value\":\"application/json\",\"name\":\"Content-Type\"},{\"value\":\"hasura-graphql-engine/v2.0.0-alpha.9\",\"name\":\"User-Agent\"}],\"version\":\"2\"}", - "{\"data\":{\"message\":\"\\\"HttpExceptionRequest Request {\\\\n host = \\\\\\\"httsssp.org\\\\\\\"\\\\n port = 80\\\\n secure = False\\\\n requestHeaders = [(\\\\\\\"X-B3-TraceId\\\\\\\",\\\\\\\"ea970ad818f358cf\\\\\\\"),(\\\\\\\"X-B3-SpanId\\\\\\\",\\\\\\\"4d8d92209b40eab3\\\\\\\"),(\\\\\\\"X-B3-ParentSpanId\\\\\\\",\\\\\\\"876f35924d13168e\\\\\\\"),(\\\\\\\"Content-Type\\\\\\\",\\\\\\\"application/json\\\\\\\"),(\\\\\\\"User-Agent\\\\\\\",\\\\\\\"hasura-graphql-engine/v2.0.0-alpha.9\\\\\\\")]\\\\n path = \\\\\\\"/post\\\\\\\"\\\\n queryString = \\\\\\\"\\\\\\\"\\\\n method = \\\\\\\"POST\\\\\\\"\\\\n proxy = Nothing\\\\n rawBody = False\\\\n redirectCount = 10\\\\n responseTimeout = ResponseTimeoutMicro 60000000\\\\n requestVersion = HTTP/1.1\\\\n proxySecureMode = ProxySecureWithConnect\\\\n}\\\\n (ConnectionFailure Network.Socket.getAddrInfo (called with preferred socket type/protocol: AddrInfo {addrFlags = [], addrFamily = AF_UNSPEC, addrSocketType = Stream, addrProtocol = 0, addrAddress = 0.0.0.0:0, addrCanonName = Nothing}, host name: Just \\\\\\\"httsssp.org\\\\\\\", service name: Just \\\\\\\"80\\\\\\\"): does not exist (Name or service not known))\\\"\"},\"version\":\"2\",\"type\":\"client_error\"}", - "2021-05-18 07:40:22.736039", - "338eec2d-0c1f-4358-ae12-05d3f73a85c6", - "public", - "users", - "new_user", - "{\"op\": \"INSERT\", \"data\": {\"new\": {\"id\": 9, \"name\": \"safs\"}, \"old\": null}, \"trace_context\": {\"span_id\": \"77150de9d725e5df\", \"trace_id\": \"ea970ad818f358cf\"}, \"session_variables\": {\"x-hasura-role\": \"admin\"}}", - "f", - "t", - "5", - "2021-05-18 07:39:50.831182", - "NULL", - "NULL", - "f" - ], - [ - "33105396-99dc-446c-ac7f-d93c38ceb686", - "c3ac48be-a569-4d87-8c52-cb84309002ed", - "1000", - "{\"payload\":{\"event\":{\"session_variables\":{\"x-hasura-role\":\"admin\"},\"op\":\"INSERT\",\"data\":{\"old\":null,\"new\":{\"name\":\"safs\",\"id\":6}},\"trace_context\":{\"trace_id\":\"ecba73bac1b4601a\",\"span_id\":\"5a75ae38fccf4473\"}},\"created_at\":\"2021-05-18T07:39:50.332379Z\",\"id\":\"c3ac48be-a569-4d87-8c52-cb84309002ed\",\"delivery_info\":{\"max_retries\":4,\"current_retry\":3},\"trigger\":{\"name\":\"new_user\"},\"table\":{\"schema\":\"public\",\"name\":\"users\"}},\"headers\":[{\"value\":\"application/json\",\"name\":\"Content-Type\"},{\"value\":\"hasura-graphql-engine/v2.0.0-alpha.9\",\"name\":\"User-Agent\"}],\"version\":\"2\"}", - "{\"data\":{\"message\":\"\\\"HttpExceptionRequest Request {\\\\n host = \\\\\\\"httsssp.org\\\\\\\"\\\\n port = 80\\\\n secure = False\\\\n requestHeaders = [(\\\\\\\"X-B3-TraceId\\\\\\\",\\\\\\\"ecba73bac1b4601a\\\\\\\"),(\\\\\\\"X-B3-SpanId\\\\\\\",\\\\\\\"4fa95afd2b803b9c\\\\\\\"),(\\\\\\\"X-B3-ParentSpanId\\\\\\\",\\\\\\\"de923514252481ca\\\\\\\"),(\\\\\\\"Content-Type\\\\\\\",\\\\\\\"application/json\\\\\\\"),(\\\\\\\"User-Agent\\\\\\\",\\\\\\\"hasura-graphql-engine/v2.0.0-alpha.9\\\\\\\")]\\\\n path = \\\\\\\"/post\\\\\\\"\\\\n queryString = \\\\\\\"\\\\\\\"\\\\n method = \\\\\\\"POST\\\\\\\"\\\\n proxy = Nothing\\\\n rawBody = False\\\\n redirectCount = 10\\\\n responseTimeout = ResponseTimeoutMicro 60000000\\\\n requestVersion = HTTP/1.1\\\\n proxySecureMode = ProxySecureWithConnect\\\\n}\\\\n (ConnectionFailure Network.Socket.getAddrInfo (called with preferred socket type/protocol: AddrInfo {addrFlags = [], addrFamily = AF_UNSPEC, addrSocketType = Stream, addrProtocol = 0, addrAddress = 0.0.0.0:0, addrCanonName = Nothing}, host name: Just \\\\\\\"httsssp.org\\\\\\\", service name: Just \\\\\\\"80\\\\\\\"): does not exist (Name or service not known))\\\"\"},\"version\":\"2\",\"type\":\"client_error\"}", - "2021-05-18 07:40:22.735757", - "c3ac48be-a569-4d87-8c52-cb84309002ed", - "public", - "users", - "new_user", - "{\"op\": \"INSERT\", \"data\": {\"new\": {\"id\": 6, \"name\": \"safs\"}, \"old\": null}, \"trace_context\": {\"span_id\": \"5a75ae38fccf4473\", \"trace_id\": \"ecba73bac1b4601a\"}, \"session_variables\": {\"x-hasura-role\": \"admin\"}}", - "f", - "t", - "5", - "2021-05-18 07:39:50.332379", - "NULL", - "NULL", - "f" - ], - [ - "f7980cf5-7520-489a-87f1-f658773f9e60", - "423e5a24-d4e0-493a-83df-ecff0eca2398", - "1000", - "{\"payload\":{\"event\":{\"session_variables\":{\"x-hasura-role\":\"admin\"},\"op\":\"INSERT\",\"data\":{\"old\":null,\"new\":{\"name\":\"safs\",\"id\":7}},\"trace_context\":{\"trace_id\":\"da0635bf4fb444b1\",\"span_id\":\"5e088982a14f9bdd\"}},\"created_at\":\"2021-05-18T07:39:50.490999Z\",\"id\":\"423e5a24-d4e0-493a-83df-ecff0eca2398\",\"delivery_info\":{\"max_retries\":4,\"current_retry\":2},\"trigger\":{\"name\":\"new_user\"},\"table\":{\"schema\":\"public\",\"name\":\"users\"}},\"headers\":[{\"value\":\"application/json\",\"name\":\"Content-Type\"},{\"value\":\"hasura-graphql-engine/v2.0.0-alpha.9\",\"name\":\"User-Agent\"}],\"version\":\"2\"}", - "{\"data\":{\"message\":\"\\\"HttpExceptionRequest Request {\\\\n host = \\\\\\\"httsssp.org\\\\\\\"\\\\n port = 80\\\\n secure = False\\\\n requestHeaders = [(\\\\\\\"X-B3-TraceId\\\\\\\",\\\\\\\"da0635bf4fb444b1\\\\\\\"),(\\\\\\\"X-B3-SpanId\\\\\\\",\\\\\\\"2fbf0361df48ccc7\\\\\\\"),(\\\\\\\"X-B3-ParentSpanId\\\\\\\",\\\\\\\"ebc5dd9ef22f9543\\\\\\\"),(\\\\\\\"Content-Type\\\\\\\",\\\\\\\"application/json\\\\\\\"),(\\\\\\\"User-Agent\\\\\\\",\\\\\\\"hasura-graphql-engine/v2.0.0-alpha.9\\\\\\\")]\\\\n path = \\\\\\\"/post\\\\\\\"\\\\n queryString = \\\\\\\"\\\\\\\"\\\\n method = \\\\\\\"POST\\\\\\\"\\\\n proxy = Nothing\\\\n rawBody = False\\\\n redirectCount = 10\\\\n responseTimeout = ResponseTimeoutMicro 60000000\\\\n requestVersion = HTTP/1.1\\\\n proxySecureMode = ProxySecureWithConnect\\\\n}\\\\n (ConnectionFailure Network.Socket.getAddrInfo (called with preferred socket type/protocol: AddrInfo {addrFlags = [], addrFamily = AF_UNSPEC, addrSocketType = Stream, addrProtocol = 0, addrAddress = 0.0.0.0:0, addrCanonName = Nothing}, host name: Just \\\\\\\"httsssp.org\\\\\\\", service name: Just \\\\\\\"80\\\\\\\"): does not exist (Name or service not known))\\\"\"},\"version\":\"2\",\"type\":\"client_error\"}", - "2021-05-18 07:40:11.704173", - "423e5a24-d4e0-493a-83df-ecff0eca2398", - "public", - "users", - "new_user", - "{\"op\": \"INSERT\", \"data\": {\"new\": {\"id\": 7, \"name\": \"safs\"}, \"old\": null}, \"trace_context\": {\"span_id\": \"5e088982a14f9bdd\", \"trace_id\": \"da0635bf4fb444b1\"}, \"session_variables\": {\"x-hasura-role\": \"admin\"}}", - "f", - "t", - "5", - "2021-05-18 07:39:50.490999", - "NULL", - "NULL", - "f" - ], - [ - "18e6a7de-c38d-4f56-90f5-d0cc1298ea97", - "338eec2d-0c1f-4358-ae12-05d3f73a85c6", - "1000", - "{\"payload\":{\"event\":{\"session_variables\":{\"x-hasura-role\":\"admin\"},\"op\":\"INSERT\",\"data\":{\"old\":null,\"new\":{\"name\":\"safs\",\"id\":9}},\"trace_context\":{\"trace_id\":\"ea970ad818f358cf\",\"span_id\":\"77150de9d725e5df\"}},\"created_at\":\"2021-05-18T07:39:50.831182Z\",\"id\":\"338eec2d-0c1f-4358-ae12-05d3f73a85c6\",\"delivery_info\":{\"max_retries\":4,\"current_retry\":2},\"trigger\":{\"name\":\"new_user\"},\"table\":{\"schema\":\"public\",\"name\":\"users\"}},\"headers\":[{\"value\":\"application/json\",\"name\":\"Content-Type\"},{\"value\":\"hasura-graphql-engine/v2.0.0-alpha.9\",\"name\":\"User-Agent\"}],\"version\":\"2\"}", - "{\"data\":{\"message\":\"\\\"HttpExceptionRequest Request {\\\\n host = \\\\\\\"httsssp.org\\\\\\\"\\\\n port = 80\\\\n secure = False\\\\n requestHeaders = [(\\\\\\\"X-B3-TraceId\\\\\\\",\\\\\\\"ea970ad818f358cf\\\\\\\"),(\\\\\\\"X-B3-SpanId\\\\\\\",\\\\\\\"18ac4aa73874b52d\\\\\\\"),(\\\\\\\"X-B3-ParentSpanId\\\\\\\",\\\\\\\"705e55f29e621be4\\\\\\\"),(\\\\\\\"Content-Type\\\\\\\",\\\\\\\"application/json\\\\\\\"),(\\\\\\\"User-Agent\\\\\\\",\\\\\\\"hasura-graphql-engine/v2.0.0-alpha.9\\\\\\\")]\\\\n path = \\\\\\\"/post\\\\\\\"\\\\n queryString = \\\\\\\"\\\\\\\"\\\\n method = \\\\\\\"POST\\\\\\\"\\\\n proxy = Nothing\\\\n rawBody = False\\\\n redirectCount = 10\\\\n responseTimeout = ResponseTimeoutMicro 60000000\\\\n requestVersion = HTTP/1.1\\\\n proxySecureMode = ProxySecureWithConnect\\\\n}\\\\n (ConnectionFailure Network.Socket.getAddrInfo (called with preferred socket type/protocol: AddrInfo {addrFlags = [], addrFamily = AF_UNSPEC, addrSocketType = Stream, addrProtocol = 0, addrAddress = 0.0.0.0:0, addrCanonName = Nothing}, host name: Just \\\\\\\"httsssp.org\\\\\\\", service name: Just \\\\\\\"80\\\\\\\"): does not exist (Name or service not known))\\\"\"},\"version\":\"2\",\"type\":\"client_error\"}", - "2021-05-18 07:40:11.704093", - "338eec2d-0c1f-4358-ae12-05d3f73a85c6", - "public", - "users", - "new_user", - "{\"op\": \"INSERT\", \"data\": {\"new\": {\"id\": 9, \"name\": \"safs\"}, \"old\": null}, \"trace_context\": {\"span_id\": \"77150de9d725e5df\", \"trace_id\": \"ea970ad818f358cf\"}, \"session_variables\": {\"x-hasura-role\": \"admin\"}}", - "f", - "t", - "5", - "2021-05-18 07:39:50.831182", - "NULL", - "NULL", - "f" - ] -] \ No newline at end of file + [ + "id", + "event_id", + "status", + "request", + "response", + "created_at", + "id", + "schema_name", + "table_name", + "trigger_name", + "payload", + "delivered", + "error", + "tries", + "created_at", + "locked", + "next_retry_at", + "archived" + ], + [ + "31b4c28c-954d-4871-ba95-a6d7da8d6988", + "7bc7b398-f1cd-4761-839d-44971e01be48", + "1000", + "{\"payload\":{\"event\":{\"session_variables\":{\"x-hasura-role\":\"admin\"},\"op\":\"INSERT\",\"data\":{\"old\":null,\"new\":{\"name\":\"safs\",\"id\":8}},\"trace_context\":{\"trace_id\":\"04415c5c0870f8f6\",\"span_id\":\"455d47a2c5d8f40e\"}},\"created_at\":\"2021-05-18T07:39:50.658771Z\",\"id\":\"7bc7b398-f1cd-4761-839d-44971e01be48\",\"delivery_info\":{\"max_retries\":4,\"current_retry\":4},\"trigger\":{\"name\":\"new_user\"},\"table\":{\"schema\":\"public\",\"name\":\"users\"}},\"headers\":[{\"value\":\"application/json\",\"name\":\"Content-Type\"},{\"value\":\"hasura-graphql-engine/v2.0.0-alpha.9\",\"name\":\"User-Agent\"}],\"version\":\"2\"}", + "{\"data\":{\"message\":\"\\\"HttpExceptionRequest Request {\\\\n host = \\\\\\\"httsssp.org\\\\\\\"\\\\n port = 80\\\\n secure = False\\\\n requestHeaders = [(\\\\\\\"X-B3-TraceId\\\\\\\",\\\\\\\"04415c5c0870f8f6\\\\\\\"),(\\\\\\\"X-B3-SpanId\\\\\\\",\\\\\\\"d1260fcdfe50945e\\\\\\\"),(\\\\\\\"X-B3-ParentSpanId\\\\\\\",\\\\\\\"de05cf247e935b7a\\\\\\\"),(\\\\\\\"Content-Type\\\\\\\",\\\\\\\"application/json\\\\\\\"),(\\\\\\\"User-Agent\\\\\\\",\\\\\\\"hasura-graphql-engine/v2.0.0-alpha.9\\\\\\\")]\\\\n path = \\\\\\\"/post\\\\\\\"\\\\n queryString = \\\\\\\"\\\\\\\"\\\\n method = \\\\\\\"POST\\\\\\\"\\\\n proxy = Nothing\\\\n rawBody = False\\\\n redirectCount = 10\\\\n responseTimeout = ResponseTimeoutMicro 60000000\\\\n requestVersion = HTTP/1.1\\\\n proxySecureMode = ProxySecureWithConnect\\\\n}\\\\n (ConnectionFailure Network.Socket.getAddrInfo (called with preferred socket type/protocol: AddrInfo {addrFlags = [], addrFamily = AF_UNSPEC, addrSocketType = Stream, addrProtocol = 0, addrAddress = 0.0.0.0:0, addrCanonName = Nothing}, host name: Just \\\\\\\"httsssp.org\\\\\\\", service name: Just \\\\\\\"80\\\\\\\"): does not exist (Name or service not known))\\\"\"},\"version\":\"2\",\"type\":\"client_error\"}", + "2021-05-18 07:40:32.81592", + "7bc7b398-f1cd-4761-839d-44971e01be48", + "public", + "users", + "new_user", + "{\"op\": \"INSERT\", \"data\": {\"new\": {\"id\": 8, \"name\": \"safs\"}, \"old\": null}, \"trace_context\": {\"span_id\": \"455d47a2c5d8f40e\", \"trace_id\": \"04415c5c0870f8f6\"}, \"session_variables\": {\"x-hasura-role\": \"admin\"}}", + "f", + "t", + "5", + "2021-05-18 07:39:50.658771", + "NULL", + "NULL", + "f" + ], + [ + "bf1760ee-c628-4b94-b535-1d5453675958", + "c3ac48be-a569-4d87-8c52-cb84309002ed", + "1000", + "{\"payload\":{\"event\":{\"session_variables\":{\"x-hasura-role\":\"admin\"},\"op\":\"INSERT\",\"data\":{\"old\":null,\"new\":{\"name\":\"safs\",\"id\":6}},\"trace_context\":{\"trace_id\":\"ecba73bac1b4601a\",\"span_id\":\"5a75ae38fccf4473\"}},\"created_at\":\"2021-05-18T07:39:50.332379Z\",\"id\":\"c3ac48be-a569-4d87-8c52-cb84309002ed\",\"delivery_info\":{\"max_retries\":4,\"current_retry\":4},\"trigger\":{\"name\":\"new_user\"},\"table\":{\"schema\":\"public\",\"name\":\"users\"}},\"headers\":[{\"value\":\"application/json\",\"name\":\"Content-Type\"},{\"value\":\"hasura-graphql-engine/v2.0.0-alpha.9\",\"name\":\"User-Agent\"}],\"version\":\"2\"}", + "{\"data\":{\"message\":\"\\\"HttpExceptionRequest Request {\\\\n host = \\\\\\\"httsssp.org\\\\\\\"\\\\n port = 80\\\\n secure = False\\\\n requestHeaders = [(\\\\\\\"X-B3-TraceId\\\\\\\",\\\\\\\"ecba73bac1b4601a\\\\\\\"),(\\\\\\\"X-B3-SpanId\\\\\\\",\\\\\\\"1c3c460b36da4a0e\\\\\\\"),(\\\\\\\"X-B3-ParentSpanId\\\\\\\",\\\\\\\"f309dbf4632da6a5\\\\\\\"),(\\\\\\\"Content-Type\\\\\\\",\\\\\\\"application/json\\\\\\\"),(\\\\\\\"User-Agent\\\\\\\",\\\\\\\"hasura-graphql-engine/v2.0.0-alpha.9\\\\\\\")]\\\\n path = \\\\\\\"/post\\\\\\\"\\\\n queryString = \\\\\\\"\\\\\\\"\\\\n method = \\\\\\\"POST\\\\\\\"\\\\n proxy = Nothing\\\\n rawBody = False\\\\n redirectCount = 10\\\\n responseTimeout = ResponseTimeoutMicro 60000000\\\\n requestVersion = HTTP/1.1\\\\n proxySecureMode = ProxySecureWithConnect\\\\n}\\\\n (ConnectionFailure Network.Socket.getAddrInfo (called with preferred socket type/protocol: AddrInfo {addrFlags = [], addrFamily = AF_UNSPEC, addrSocketType = Stream, addrProtocol = 0, addrAddress = 0.0.0.0:0, addrCanonName = Nothing}, host name: Just \\\\\\\"httsssp.org\\\\\\\", service name: Just \\\\\\\"80\\\\\\\"): does not exist (Name or service not known))\\\"\"},\"version\":\"2\",\"type\":\"client_error\"}", + "2021-05-18 07:40:32.815484", + "c3ac48be-a569-4d87-8c52-cb84309002ed", + "public", + "users", + "new_user", + "{\"op\": \"INSERT\", \"data\": {\"new\": {\"id\": 6, \"name\": \"safs\"}, \"old\": null}, \"trace_context\": {\"span_id\": \"5a75ae38fccf4473\", \"trace_id\": \"ecba73bac1b4601a\"}, \"session_variables\": {\"x-hasura-role\": \"admin\"}}", + "f", + "t", + "5", + "2021-05-18 07:39:50.332379", + "NULL", + "NULL", + "f" + ], + [ + "5836823f-9104-489e-b339-946b45e266a9", + "338eec2d-0c1f-4358-ae12-05d3f73a85c6", + "1000", + "{\"payload\":{\"event\":{\"session_variables\":{\"x-hasura-role\":\"admin\"},\"op\":\"INSERT\",\"data\":{\"old\":null,\"new\":{\"name\":\"safs\",\"id\":9}},\"trace_context\":{\"trace_id\":\"ea970ad818f358cf\",\"span_id\":\"77150de9d725e5df\"}},\"created_at\":\"2021-05-18T07:39:50.831182Z\",\"id\":\"338eec2d-0c1f-4358-ae12-05d3f73a85c6\",\"delivery_info\":{\"max_retries\":4,\"current_retry\":4},\"trigger\":{\"name\":\"new_user\"},\"table\":{\"schema\":\"public\",\"name\":\"users\"}},\"headers\":[{\"value\":\"application/json\",\"name\":\"Content-Type\"},{\"value\":\"hasura-graphql-engine/v2.0.0-alpha.9\",\"name\":\"User-Agent\"}],\"version\":\"2\"}", + "{\"data\":{\"message\":\"\\\"HttpExceptionRequest Request {\\\\n host = \\\\\\\"httsssp.org\\\\\\\"\\\\n port = 80\\\\n secure = False\\\\n requestHeaders = [(\\\\\\\"X-B3-TraceId\\\\\\\",\\\\\\\"ea970ad818f358cf\\\\\\\"),(\\\\\\\"X-B3-SpanId\\\\\\\",\\\\\\\"332c2f49df1cb4d2\\\\\\\"),(\\\\\\\"X-B3-ParentSpanId\\\\\\\",\\\\\\\"3668323420f67bb1\\\\\\\"),(\\\\\\\"Content-Type\\\\\\\",\\\\\\\"application/json\\\\\\\"),(\\\\\\\"User-Agent\\\\\\\",\\\\\\\"hasura-graphql-engine/v2.0.0-alpha.9\\\\\\\")]\\\\n path = \\\\\\\"/post\\\\\\\"\\\\n queryString = \\\\\\\"\\\\\\\"\\\\n method = \\\\\\\"POST\\\\\\\"\\\\n proxy = Nothing\\\\n rawBody = False\\\\n redirectCount = 10\\\\n responseTimeout = ResponseTimeoutMicro 60000000\\\\n requestVersion = HTTP/1.1\\\\n proxySecureMode = ProxySecureWithConnect\\\\n}\\\\n (ConnectionFailure Network.Socket.getAddrInfo (called with preferred socket type/protocol: AddrInfo {addrFlags = [], addrFamily = AF_UNSPEC, addrSocketType = Stream, addrProtocol = 0, addrAddress = 0.0.0.0:0, addrCanonName = Nothing}, host name: Just \\\\\\\"httsssp.org\\\\\\\", service name: Just \\\\\\\"80\\\\\\\"): does not exist (Name or service not known))\\\"\"},\"version\":\"2\",\"type\":\"client_error\"}", + "2021-05-18 07:40:32.81517", + "338eec2d-0c1f-4358-ae12-05d3f73a85c6", + "public", + "users", + "new_user", + "{\"op\": \"INSERT\", \"data\": {\"new\": {\"id\": 9, \"name\": \"safs\"}, \"old\": null}, \"trace_context\": {\"span_id\": \"77150de9d725e5df\", \"trace_id\": \"ea970ad818f358cf\"}, \"session_variables\": {\"x-hasura-role\": \"admin\"}}", + "f", + "t", + "5", + "2021-05-18 07:39:50.831182", + "NULL", + "NULL", + "f" + ], + [ + "7b314fa3-fa10-4d1d-9c7b-0799e2a2345c", + "423e5a24-d4e0-493a-83df-ecff0eca2398", + "1000", + "{\"payload\":{\"event\":{\"session_variables\":{\"x-hasura-role\":\"admin\"},\"op\":\"INSERT\",\"data\":{\"old\":null,\"new\":{\"name\":\"safs\",\"id\":7}},\"trace_context\":{\"trace_id\":\"da0635bf4fb444b1\",\"span_id\":\"5e088982a14f9bdd\"}},\"created_at\":\"2021-05-18T07:39:50.490999Z\",\"id\":\"423e5a24-d4e0-493a-83df-ecff0eca2398\",\"delivery_info\":{\"max_retries\":4,\"current_retry\":4},\"trigger\":{\"name\":\"new_user\"},\"table\":{\"schema\":\"public\",\"name\":\"users\"}},\"headers\":[{\"value\":\"application/json\",\"name\":\"Content-Type\"},{\"value\":\"hasura-graphql-engine/v2.0.0-alpha.9\",\"name\":\"User-Agent\"}],\"version\":\"2\"}", + "{\"data\":{\"message\":\"\\\"HttpExceptionRequest Request {\\\\n host = \\\\\\\"httsssp.org\\\\\\\"\\\\n port = 80\\\\n secure = False\\\\n requestHeaders = [(\\\\\\\"X-B3-TraceId\\\\\\\",\\\\\\\"da0635bf4fb444b1\\\\\\\"),(\\\\\\\"X-B3-SpanId\\\\\\\",\\\\\\\"f92c4fac3a66595a\\\\\\\"),(\\\\\\\"X-B3-ParentSpanId\\\\\\\",\\\\\\\"b3a34f8a72e89980\\\\\\\"),(\\\\\\\"Content-Type\\\\\\\",\\\\\\\"application/json\\\\\\\"),(\\\\\\\"User-Agent\\\\\\\",\\\\\\\"hasura-graphql-engine/v2.0.0-alpha.9\\\\\\\")]\\\\n path = \\\\\\\"/post\\\\\\\"\\\\n queryString = \\\\\\\"\\\\\\\"\\\\n method = \\\\\\\"POST\\\\\\\"\\\\n proxy = Nothing\\\\n rawBody = False\\\\n redirectCount = 10\\\\n responseTimeout = ResponseTimeoutMicro 60000000\\\\n requestVersion = HTTP/1.1\\\\n proxySecureMode = ProxySecureWithConnect\\\\n}\\\\n (ConnectionFailure Network.Socket.getAddrInfo (called with preferred socket type/protocol: AddrInfo {addrFlags = [], addrFamily = AF_UNSPEC, addrSocketType = Stream, addrProtocol = 0, addrAddress = 0.0.0.0:0, addrCanonName = Nothing}, host name: Just \\\\\\\"httsssp.org\\\\\\\", service name: Just \\\\\\\"80\\\\\\\"): does not exist (Name or service not known))\\\"\"},\"version\":\"2\",\"type\":\"client_error\"}", + "2021-05-18 07:40:32.815118", + "423e5a24-d4e0-493a-83df-ecff0eca2398", + "public", + "users", + "new_user", + "{\"op\": \"INSERT\", \"data\": {\"new\": {\"id\": 7, \"name\": \"safs\"}, \"old\": null}, \"trace_context\": {\"span_id\": \"5e088982a14f9bdd\", \"trace_id\": \"da0635bf4fb444b1\"}, \"session_variables\": {\"x-hasura-role\": \"admin\"}}", + "f", + "t", + "5", + "2021-05-18 07:39:50.490999", + "NULL", + "NULL", + "f" + ], + [ + "c6ec4304-3848-4c4c-a188-ff91ebe61ea0", + "7bc7b398-f1cd-4761-839d-44971e01be48", + "1000", + "{\"payload\":{\"event\":{\"session_variables\":{\"x-hasura-role\":\"admin\"},\"op\":\"INSERT\",\"data\":{\"old\":null,\"new\":{\"name\":\"safs\",\"id\":8}},\"trace_context\":{\"trace_id\":\"04415c5c0870f8f6\",\"span_id\":\"455d47a2c5d8f40e\"}},\"created_at\":\"2021-05-18T07:39:50.658771Z\",\"id\":\"7bc7b398-f1cd-4761-839d-44971e01be48\",\"delivery_info\":{\"max_retries\":4,\"current_retry\":3},\"trigger\":{\"name\":\"new_user\"},\"table\":{\"schema\":\"public\",\"name\":\"users\"}},\"headers\":[{\"value\":\"application/json\",\"name\":\"Content-Type\"},{\"value\":\"hasura-graphql-engine/v2.0.0-alpha.9\",\"name\":\"User-Agent\"}],\"version\":\"2\"}", + "{\"data\":{\"message\":\"\\\"HttpExceptionRequest Request {\\\\n host = \\\\\\\"httsssp.org\\\\\\\"\\\\n port = 80\\\\n secure = False\\\\n requestHeaders = [(\\\\\\\"X-B3-TraceId\\\\\\\",\\\\\\\"04415c5c0870f8f6\\\\\\\"),(\\\\\\\"X-B3-SpanId\\\\\\\",\\\\\\\"f520ea1624695587\\\\\\\"),(\\\\\\\"X-B3-ParentSpanId\\\\\\\",\\\\\\\"2dc1b4d86426e316\\\\\\\"),(\\\\\\\"Content-Type\\\\\\\",\\\\\\\"application/json\\\\\\\"),(\\\\\\\"User-Agent\\\\\\\",\\\\\\\"hasura-graphql-engine/v2.0.0-alpha.9\\\\\\\")]\\\\n path = \\\\\\\"/post\\\\\\\"\\\\n queryString = \\\\\\\"\\\\\\\"\\\\n method = \\\\\\\"POST\\\\\\\"\\\\n proxy = Nothing\\\\n rawBody = False\\\\n redirectCount = 10\\\\n responseTimeout = ResponseTimeoutMicro 60000000\\\\n requestVersion = HTTP/1.1\\\\n proxySecureMode = ProxySecureWithConnect\\\\n}\\\\n (ConnectionFailure Network.Socket.getAddrInfo (called with preferred socket type/protocol: AddrInfo {addrFlags = [], addrFamily = AF_UNSPEC, addrSocketType = Stream, addrProtocol = 0, addrAddress = 0.0.0.0:0, addrCanonName = Nothing}, host name: Just \\\\\\\"httsssp.org\\\\\\\", service name: Just \\\\\\\"80\\\\\\\"): does not exist (Name or service not known))\\\"\"},\"version\":\"2\",\"type\":\"client_error\"}", + "2021-05-18 07:40:22.736277", + "7bc7b398-f1cd-4761-839d-44971e01be48", + "public", + "users", + "new_user", + "{\"op\": \"INSERT\", \"data\": {\"new\": {\"id\": 8, \"name\": \"safs\"}, \"old\": null}, \"trace_context\": {\"span_id\": \"455d47a2c5d8f40e\", \"trace_id\": \"04415c5c0870f8f6\"}, \"session_variables\": {\"x-hasura-role\": \"admin\"}}", + "f", + "t", + "5", + "2021-05-18 07:39:50.658771", + "NULL", + "NULL", + "f" + ], + [ + "8c88c745-29eb-4637-ad2d-85f3d6ba82c4", + "423e5a24-d4e0-493a-83df-ecff0eca2398", + "1000", + "{\"payload\":{\"event\":{\"session_variables\":{\"x-hasura-role\":\"admin\"},\"op\":\"INSERT\",\"data\":{\"old\":null,\"new\":{\"name\":\"safs\",\"id\":7}},\"trace_context\":{\"trace_id\":\"da0635bf4fb444b1\",\"span_id\":\"5e088982a14f9bdd\"}},\"created_at\":\"2021-05-18T07:39:50.490999Z\",\"id\":\"423e5a24-d4e0-493a-83df-ecff0eca2398\",\"delivery_info\":{\"max_retries\":4,\"current_retry\":3},\"trigger\":{\"name\":\"new_user\"},\"table\":{\"schema\":\"public\",\"name\":\"users\"}},\"headers\":[{\"value\":\"application/json\",\"name\":\"Content-Type\"},{\"value\":\"hasura-graphql-engine/v2.0.0-alpha.9\",\"name\":\"User-Agent\"}],\"version\":\"2\"}", + "{\"data\":{\"message\":\"\\\"HttpExceptionRequest Request {\\\\n host = \\\\\\\"httsssp.org\\\\\\\"\\\\n port = 80\\\\n secure = False\\\\n requestHeaders = [(\\\\\\\"X-B3-TraceId\\\\\\\",\\\\\\\"da0635bf4fb444b1\\\\\\\"),(\\\\\\\"X-B3-SpanId\\\\\\\",\\\\\\\"d6bdb95ec116b8ff\\\\\\\"),(\\\\\\\"X-B3-ParentSpanId\\\\\\\",\\\\\\\"01b61664322a458b\\\\\\\"),(\\\\\\\"Content-Type\\\\\\\",\\\\\\\"application/json\\\\\\\"),(\\\\\\\"User-Agent\\\\\\\",\\\\\\\"hasura-graphql-engine/v2.0.0-alpha.9\\\\\\\")]\\\\n path = \\\\\\\"/post\\\\\\\"\\\\n queryString = \\\\\\\"\\\\\\\"\\\\n method = \\\\\\\"POST\\\\\\\"\\\\n proxy = Nothing\\\\n rawBody = False\\\\n redirectCount = 10\\\\n responseTimeout = ResponseTimeoutMicro 60000000\\\\n requestVersion = HTTP/1.1\\\\n proxySecureMode = ProxySecureWithConnect\\\\n}\\\\n (ConnectionFailure Network.Socket.getAddrInfo (called with preferred socket type/protocol: AddrInfo {addrFlags = [], addrFamily = AF_UNSPEC, addrSocketType = Stream, addrProtocol = 0, addrAddress = 0.0.0.0:0, addrCanonName = Nothing}, host name: Just \\\\\\\"httsssp.org\\\\\\\", service name: Just \\\\\\\"80\\\\\\\"): does not exist (Name or service not known))\\\"\"},\"version\":\"2\",\"type\":\"client_error\"}", + "2021-05-18 07:40:22.736095", + "423e5a24-d4e0-493a-83df-ecff0eca2398", + "public", + "users", + "new_user", + "{\"op\": \"INSERT\", \"data\": {\"new\": {\"id\": 7, \"name\": \"safs\"}, \"old\": null}, \"trace_context\": {\"span_id\": \"5e088982a14f9bdd\", \"trace_id\": \"da0635bf4fb444b1\"}, \"session_variables\": {\"x-hasura-role\": \"admin\"}}", + "f", + "t", + "5", + "2021-05-18 07:39:50.490999", + "NULL", + "NULL", + "f" + ], + [ + "48532d4d-ee73-4245-a8f6-378b034eb4f0", + "338eec2d-0c1f-4358-ae12-05d3f73a85c6", + "1000", + "{\"payload\":{\"event\":{\"session_variables\":{\"x-hasura-role\":\"admin\"},\"op\":\"INSERT\",\"data\":{\"old\":null,\"new\":{\"name\":\"safs\",\"id\":9}},\"trace_context\":{\"trace_id\":\"ea970ad818f358cf\",\"span_id\":\"77150de9d725e5df\"}},\"created_at\":\"2021-05-18T07:39:50.831182Z\",\"id\":\"338eec2d-0c1f-4358-ae12-05d3f73a85c6\",\"delivery_info\":{\"max_retries\":4,\"current_retry\":3},\"trigger\":{\"name\":\"new_user\"},\"table\":{\"schema\":\"public\",\"name\":\"users\"}},\"headers\":[{\"value\":\"application/json\",\"name\":\"Content-Type\"},{\"value\":\"hasura-graphql-engine/v2.0.0-alpha.9\",\"name\":\"User-Agent\"}],\"version\":\"2\"}", + "{\"data\":{\"message\":\"\\\"HttpExceptionRequest Request {\\\\n host = \\\\\\\"httsssp.org\\\\\\\"\\\\n port = 80\\\\n secure = False\\\\n requestHeaders = [(\\\\\\\"X-B3-TraceId\\\\\\\",\\\\\\\"ea970ad818f358cf\\\\\\\"),(\\\\\\\"X-B3-SpanId\\\\\\\",\\\\\\\"4d8d92209b40eab3\\\\\\\"),(\\\\\\\"X-B3-ParentSpanId\\\\\\\",\\\\\\\"876f35924d13168e\\\\\\\"),(\\\\\\\"Content-Type\\\\\\\",\\\\\\\"application/json\\\\\\\"),(\\\\\\\"User-Agent\\\\\\\",\\\\\\\"hasura-graphql-engine/v2.0.0-alpha.9\\\\\\\")]\\\\n path = \\\\\\\"/post\\\\\\\"\\\\n queryString = \\\\\\\"\\\\\\\"\\\\n method = \\\\\\\"POST\\\\\\\"\\\\n proxy = Nothing\\\\n rawBody = False\\\\n redirectCount = 10\\\\n responseTimeout = ResponseTimeoutMicro 60000000\\\\n requestVersion = HTTP/1.1\\\\n proxySecureMode = ProxySecureWithConnect\\\\n}\\\\n (ConnectionFailure Network.Socket.getAddrInfo (called with preferred socket type/protocol: AddrInfo {addrFlags = [], addrFamily = AF_UNSPEC, addrSocketType = Stream, addrProtocol = 0, addrAddress = 0.0.0.0:0, addrCanonName = Nothing}, host name: Just \\\\\\\"httsssp.org\\\\\\\", service name: Just \\\\\\\"80\\\\\\\"): does not exist (Name or service not known))\\\"\"},\"version\":\"2\",\"type\":\"client_error\"}", + "2021-05-18 07:40:22.736039", + "338eec2d-0c1f-4358-ae12-05d3f73a85c6", + "public", + "users", + "new_user", + "{\"op\": \"INSERT\", \"data\": {\"new\": {\"id\": 9, \"name\": \"safs\"}, \"old\": null}, \"trace_context\": {\"span_id\": \"77150de9d725e5df\", \"trace_id\": \"ea970ad818f358cf\"}, \"session_variables\": {\"x-hasura-role\": \"admin\"}}", + "f", + "t", + "5", + "2021-05-18 07:39:50.831182", + "NULL", + "NULL", + "f" + ], + [ + "33105396-99dc-446c-ac7f-d93c38ceb686", + "c3ac48be-a569-4d87-8c52-cb84309002ed", + "1000", + "{\"payload\":{\"event\":{\"session_variables\":{\"x-hasura-role\":\"admin\"},\"op\":\"INSERT\",\"data\":{\"old\":null,\"new\":{\"name\":\"safs\",\"id\":6}},\"trace_context\":{\"trace_id\":\"ecba73bac1b4601a\",\"span_id\":\"5a75ae38fccf4473\"}},\"created_at\":\"2021-05-18T07:39:50.332379Z\",\"id\":\"c3ac48be-a569-4d87-8c52-cb84309002ed\",\"delivery_info\":{\"max_retries\":4,\"current_retry\":3},\"trigger\":{\"name\":\"new_user\"},\"table\":{\"schema\":\"public\",\"name\":\"users\"}},\"headers\":[{\"value\":\"application/json\",\"name\":\"Content-Type\"},{\"value\":\"hasura-graphql-engine/v2.0.0-alpha.9\",\"name\":\"User-Agent\"}],\"version\":\"2\"}", + "{\"data\":{\"message\":\"\\\"HttpExceptionRequest Request {\\\\n host = \\\\\\\"httsssp.org\\\\\\\"\\\\n port = 80\\\\n secure = False\\\\n requestHeaders = [(\\\\\\\"X-B3-TraceId\\\\\\\",\\\\\\\"ecba73bac1b4601a\\\\\\\"),(\\\\\\\"X-B3-SpanId\\\\\\\",\\\\\\\"4fa95afd2b803b9c\\\\\\\"),(\\\\\\\"X-B3-ParentSpanId\\\\\\\",\\\\\\\"de923514252481ca\\\\\\\"),(\\\\\\\"Content-Type\\\\\\\",\\\\\\\"application/json\\\\\\\"),(\\\\\\\"User-Agent\\\\\\\",\\\\\\\"hasura-graphql-engine/v2.0.0-alpha.9\\\\\\\")]\\\\n path = \\\\\\\"/post\\\\\\\"\\\\n queryString = \\\\\\\"\\\\\\\"\\\\n method = \\\\\\\"POST\\\\\\\"\\\\n proxy = Nothing\\\\n rawBody = False\\\\n redirectCount = 10\\\\n responseTimeout = ResponseTimeoutMicro 60000000\\\\n requestVersion = HTTP/1.1\\\\n proxySecureMode = ProxySecureWithConnect\\\\n}\\\\n (ConnectionFailure Network.Socket.getAddrInfo (called with preferred socket type/protocol: AddrInfo {addrFlags = [], addrFamily = AF_UNSPEC, addrSocketType = Stream, addrProtocol = 0, addrAddress = 0.0.0.0:0, addrCanonName = Nothing}, host name: Just \\\\\\\"httsssp.org\\\\\\\", service name: Just \\\\\\\"80\\\\\\\"): does not exist (Name or service not known))\\\"\"},\"version\":\"2\",\"type\":\"client_error\"}", + "2021-05-18 07:40:22.735757", + "c3ac48be-a569-4d87-8c52-cb84309002ed", + "public", + "users", + "new_user", + "{\"op\": \"INSERT\", \"data\": {\"new\": {\"id\": 6, \"name\": \"safs\"}, \"old\": null}, \"trace_context\": {\"span_id\": \"5a75ae38fccf4473\", \"trace_id\": \"ecba73bac1b4601a\"}, \"session_variables\": {\"x-hasura-role\": \"admin\"}}", + "f", + "t", + "5", + "2021-05-18 07:39:50.332379", + "NULL", + "NULL", + "f" + ], + [ + "f7980cf5-7520-489a-87f1-f658773f9e60", + "423e5a24-d4e0-493a-83df-ecff0eca2398", + "1000", + "{\"payload\":{\"event\":{\"session_variables\":{\"x-hasura-role\":\"admin\"},\"op\":\"INSERT\",\"data\":{\"old\":null,\"new\":{\"name\":\"safs\",\"id\":7}},\"trace_context\":{\"trace_id\":\"da0635bf4fb444b1\",\"span_id\":\"5e088982a14f9bdd\"}},\"created_at\":\"2021-05-18T07:39:50.490999Z\",\"id\":\"423e5a24-d4e0-493a-83df-ecff0eca2398\",\"delivery_info\":{\"max_retries\":4,\"current_retry\":2},\"trigger\":{\"name\":\"new_user\"},\"table\":{\"schema\":\"public\",\"name\":\"users\"}},\"headers\":[{\"value\":\"application/json\",\"name\":\"Content-Type\"},{\"value\":\"hasura-graphql-engine/v2.0.0-alpha.9\",\"name\":\"User-Agent\"}],\"version\":\"2\"}", + "{\"data\":{\"message\":\"\\\"HttpExceptionRequest Request {\\\\n host = \\\\\\\"httsssp.org\\\\\\\"\\\\n port = 80\\\\n secure = False\\\\n requestHeaders = [(\\\\\\\"X-B3-TraceId\\\\\\\",\\\\\\\"da0635bf4fb444b1\\\\\\\"),(\\\\\\\"X-B3-SpanId\\\\\\\",\\\\\\\"2fbf0361df48ccc7\\\\\\\"),(\\\\\\\"X-B3-ParentSpanId\\\\\\\",\\\\\\\"ebc5dd9ef22f9543\\\\\\\"),(\\\\\\\"Content-Type\\\\\\\",\\\\\\\"application/json\\\\\\\"),(\\\\\\\"User-Agent\\\\\\\",\\\\\\\"hasura-graphql-engine/v2.0.0-alpha.9\\\\\\\")]\\\\n path = \\\\\\\"/post\\\\\\\"\\\\n queryString = \\\\\\\"\\\\\\\"\\\\n method = \\\\\\\"POST\\\\\\\"\\\\n proxy = Nothing\\\\n rawBody = False\\\\n redirectCount = 10\\\\n responseTimeout = ResponseTimeoutMicro 60000000\\\\n requestVersion = HTTP/1.1\\\\n proxySecureMode = ProxySecureWithConnect\\\\n}\\\\n (ConnectionFailure Network.Socket.getAddrInfo (called with preferred socket type/protocol: AddrInfo {addrFlags = [], addrFamily = AF_UNSPEC, addrSocketType = Stream, addrProtocol = 0, addrAddress = 0.0.0.0:0, addrCanonName = Nothing}, host name: Just \\\\\\\"httsssp.org\\\\\\\", service name: Just \\\\\\\"80\\\\\\\"): does not exist (Name or service not known))\\\"\"},\"version\":\"2\",\"type\":\"client_error\"}", + "2021-05-18 07:40:11.704173", + "423e5a24-d4e0-493a-83df-ecff0eca2398", + "public", + "users", + "new_user", + "{\"op\": \"INSERT\", \"data\": {\"new\": {\"id\": 7, \"name\": \"safs\"}, \"old\": null}, \"trace_context\": {\"span_id\": \"5e088982a14f9bdd\", \"trace_id\": \"da0635bf4fb444b1\"}, \"session_variables\": {\"x-hasura-role\": \"admin\"}}", + "f", + "t", + "5", + "2021-05-18 07:39:50.490999", + "NULL", + "NULL", + "f" + ], + [ + "18e6a7de-c38d-4f56-90f5-d0cc1298ea97", + "338eec2d-0c1f-4358-ae12-05d3f73a85c6", + "1000", + "{\"payload\":{\"event\":{\"session_variables\":{\"x-hasura-role\":\"admin\"},\"op\":\"INSERT\",\"data\":{\"old\":null,\"new\":{\"name\":\"safs\",\"id\":9}},\"trace_context\":{\"trace_id\":\"ea970ad818f358cf\",\"span_id\":\"77150de9d725e5df\"}},\"created_at\":\"2021-05-18T07:39:50.831182Z\",\"id\":\"338eec2d-0c1f-4358-ae12-05d3f73a85c6\",\"delivery_info\":{\"max_retries\":4,\"current_retry\":2},\"trigger\":{\"name\":\"new_user\"},\"table\":{\"schema\":\"public\",\"name\":\"users\"}},\"headers\":[{\"value\":\"application/json\",\"name\":\"Content-Type\"},{\"value\":\"hasura-graphql-engine/v2.0.0-alpha.9\",\"name\":\"User-Agent\"}],\"version\":\"2\"}", + "{\"data\":{\"message\":\"\\\"HttpExceptionRequest Request {\\\\n host = \\\\\\\"httsssp.org\\\\\\\"\\\\n port = 80\\\\n secure = False\\\\n requestHeaders = [(\\\\\\\"X-B3-TraceId\\\\\\\",\\\\\\\"ea970ad818f358cf\\\\\\\"),(\\\\\\\"X-B3-SpanId\\\\\\\",\\\\\\\"18ac4aa73874b52d\\\\\\\"),(\\\\\\\"X-B3-ParentSpanId\\\\\\\",\\\\\\\"705e55f29e621be4\\\\\\\"),(\\\\\\\"Content-Type\\\\\\\",\\\\\\\"application/json\\\\\\\"),(\\\\\\\"User-Agent\\\\\\\",\\\\\\\"hasura-graphql-engine/v2.0.0-alpha.9\\\\\\\")]\\\\n path = \\\\\\\"/post\\\\\\\"\\\\n queryString = \\\\\\\"\\\\\\\"\\\\n method = \\\\\\\"POST\\\\\\\"\\\\n proxy = Nothing\\\\n rawBody = False\\\\n redirectCount = 10\\\\n responseTimeout = ResponseTimeoutMicro 60000000\\\\n requestVersion = HTTP/1.1\\\\n proxySecureMode = ProxySecureWithConnect\\\\n}\\\\n (ConnectionFailure Network.Socket.getAddrInfo (called with preferred socket type/protocol: AddrInfo {addrFlags = [], addrFamily = AF_UNSPEC, addrSocketType = Stream, addrProtocol = 0, addrAddress = 0.0.0.0:0, addrCanonName = Nothing}, host name: Just \\\\\\\"httsssp.org\\\\\\\", service name: Just \\\\\\\"80\\\\\\\"): does not exist (Name or service not known))\\\"\"},\"version\":\"2\",\"type\":\"client_error\"}", + "2021-05-18 07:40:11.704093", + "338eec2d-0c1f-4358-ae12-05d3f73a85c6", + "public", + "users", + "new_user", + "{\"op\": \"INSERT\", \"data\": {\"new\": {\"id\": 9, \"name\": \"safs\"}, \"old\": null}, \"trace_context\": {\"span_id\": \"77150de9d725e5df\", \"trace_id\": \"ea970ad818f358cf\"}, \"session_variables\": {\"x-hasura-role\": \"admin\"}}", + "f", + "t", + "5", + "2021-05-18 07:39:50.831182", + "NULL", + "NULL", + "f" + ] +] diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Services/RemoteSchema/Permissions/__tests__/fixtures/schema3.json b/frontend/libs/console/legacy-ce/src/lib/components/Services/RemoteSchema/Permissions/__tests__/fixtures/schema3.json index 54b0ea8bfcd8c..80b672cd0d310 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Services/RemoteSchema/Permissions/__tests__/fixtures/schema3.json +++ b/frontend/libs/console/legacy-ce/src/lib/components/Services/RemoteSchema/Permissions/__tests__/fixtures/schema3.json @@ -1,426 +1,227 @@ { - "__schema": { - "queryType": { - "name": "Query" - }, - "mutationType": null, - "subscriptionType": null, - "types": [ - { - "kind": "OBJECT", - "name": "Query", - "description": null, - "fields": [ - { - "name": "workout", - "description": null, - "args": [ - { - "name": "where", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - }, - "defaultValue": null - }, - { - "name": "stage", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "Stage", - "ofType": null - } - }, - "defaultValue": "DRAFT" + "__schema": { + "queryType": { + "name": "Query" + }, + "mutationType": null, + "subscriptionType": null, + "types": [ + { + "kind": "OBJECT", + "name": "Query", + "description": null, + "fields": [ + { + "name": "workout", + "description": null, + "args": [ + { + "name": "where", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } }, - { - "name": "locales", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "Locale", - "ofType": null - } - }, - "defaultValue": "en" - } - ], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "WorkoutType", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "SCALAR", - "name": "ID", - "description": "The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"4\"`) or integer (such as `4`) input value will be accepted as an ID.", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "WorkoutType", - "description": null, - "fields": [ - { - "name": "id", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } + "defaultValue": null }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "description", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "SCALAR", - "name": "String", - "description": "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "ENUM", - "name": "Stage", - "description": null, - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "DRAFT", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "PUBLISHED", - "description": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "possibleTypes": null - }, - { - "kind": "ENUM", - "name": "Locale", - "description": null, - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "en", - "description": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "possibleTypes": null - }, - { - "kind": "SCALAR", - "name": "Boolean", - "description": "The `Boolean` scalar type represents `true` or `false`.", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "__Schema", - "description": "A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.", - "fields": [ - { - "name": "description", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "types", - "description": "A list of all types supported by this server.", - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", + { + "name": "stage", + "description": null, + "type": { + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } + "kind": "ENUM", + "name": "Stage", + "ofType": null } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "queryType", - "description": "The type that query operations will be rooted at.", - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "mutationType", - "description": "If this server supports mutation, the type that mutation operations will be rooted at.", - "args": [], - "type": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "subscriptionType", - "description": "If this server support subscription, the type that subscription operations will be rooted at.", - "args": [], - "type": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null + }, + "defaultValue": "DRAFT" }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "directives", - "description": "A list of all directives supported by this server.", - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", + { + "name": "locales", + "description": null, + "type": { + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Directive", - "ofType": null - } + "kind": "ENUM", + "name": "Locale", + "ofType": null } - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "__Type", - "description": "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.", - "fields": [ - { - "name": "kind", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "__TypeKind", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", + }, + "defaultValue": "en" + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "WorkoutType", "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null + } }, - { - "name": "description", - "description": null, - "args": [], - "type": { + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "ID", + "description": "The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"4\"`) or integer (such as `4`) input value will be accepted as an ID.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "WorkoutType", + "description": null, + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { "kind": "SCALAR", - "name": "String", + "name": "ID", "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null + } }, - { - "name": "specifiedByURL", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null }, - { - "name": "fields", - "description": null, - "args": [ - { - "name": "includeDeprecated", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": "false" - } - ], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Field", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null }, - { - "name": "interfaces", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "String", + "description": "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "Stage", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "DRAFT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PUBLISHED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "Locale", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "en", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "Boolean", + "description": "The `Boolean` scalar type represents `true` or `false`.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "__Schema", + "description": "A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.", + "fields": [ + { + "name": "description", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null }, - { - "name": "possibleTypes", - "description": null, - "args": [], - "type": { + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "types", + "description": "A list of all types supported by this server.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { "kind": "LIST", "name": null, "ofType": { @@ -432,57 +233,59 @@ "ofType": null } } - }, - "isDeprecated": false, - "deprecationReason": null + } }, - { - "name": "enumValues", - "description": null, - "args": [ - { - "name": "includeDeprecated", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": "false" - } - ], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__EnumValue", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "queryType", + "description": "The type that query operations will be rooted at.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__Type", + "ofType": null + } }, - { - "name": "inputFields", - "description": null, - "args": [ - { - "name": "includeDeprecated", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": "false" - } - ], - "type": { + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "mutationType", + "description": "If this server supports mutation, the type that mutation operations will be rooted at.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "__Type", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subscriptionType", + "description": "If this server support subscription, the type that subscription operations will be rooted at.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "__Type", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "directives", + "description": "A list of all directives supported by this server.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { "kind": "LIST", "name": null, "ofType": { @@ -490,247 +293,137 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "__InputValue", + "name": "__Directive", "ofType": null } } - }, - "isDeprecated": false, - "deprecationReason": null + } }, - { - "name": "ofType", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "__Type", + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "__Type", + "description": "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.", + "fields": [ + { + "name": "kind", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "__TypeKind", "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "ENUM", - "name": "__TypeKind", - "description": "An enum describing what kind of type a given `__Type` is.", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "SCALAR", - "description": "Indicates this type is a scalar.", - "isDeprecated": false, - "deprecationReason": null + } }, - { - "name": "OBJECT", - "description": "Indicates this type is an object. `fields` and `interfaces` are valid fields.", - "isDeprecated": false, - "deprecationReason": null + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null }, - { - "name": "INTERFACE", - "description": "Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields.", - "isDeprecated": false, - "deprecationReason": null + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null }, - { - "name": "UNION", - "description": "Indicates this type is a union. `possibleTypes` is a valid field.", - "isDeprecated": false, - "deprecationReason": null + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "specifiedByURL", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null }, - { - "name": "ENUM", - "description": "Indicates this type is an enum. `enumValues` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INPUT_OBJECT", - "description": "Indicates this type is an input object. `inputFields` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "LIST", - "description": "Indicates this type is a list. `ofType` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "NON_NULL", - "description": "Indicates this type is a non-null. `ofType` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - } - ], - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "__Field", - "description": "Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.", - "fields": [ - { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "fields", + "description": null, + "args": [ + { + "name": "includeDeprecated", + "description": null, + "type": { "kind": "SCALAR", - "name": "String", + "name": "Boolean", "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "description", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "args", - "description": null, - "args": [ - { - "name": "includeDeprecated", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": "false" - } - ], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__InputValue", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "type", - "description": null, - "args": [], - "type": { + }, + "defaultValue": "false" + } + ], + "type": { + "kind": "LIST", + "name": null, + "ofType": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "isDeprecated", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", + "name": "__Field", "ofType": null } - }, - "isDeprecated": false, - "deprecationReason": null + } }, - { - "name": "deprecationReason", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "__InputValue", - "description": "Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.", - "fields": [ - { - "name": "name", - "description": null, - "args": [], - "type": { + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "interfaces", + "description": null, + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", + "kind": "OBJECT", + "name": "__Type", "ofType": null } - }, - "isDeprecated": false, - "deprecationReason": null + } }, - { - "name": "description", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "type", - "description": null, - "args": [], - "type": { + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "possibleTypes", + "description": null, + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { "kind": "NON_NULL", "name": null, "ofType": { @@ -738,459 +431,756 @@ "name": "__Type", "ofType": null } - }, - "isDeprecated": false, - "deprecationReason": null + } }, - { - "name": "defaultValue", - "description": "A GraphQL-formatted string representing the default value for this input value.", - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "isDeprecated", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "enumValues", + "description": null, + "args": [ + { + "name": "includeDeprecated", + "description": null, + "type": { "kind": "SCALAR", "name": "Boolean", "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "deprecationReason", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "__EnumValue", - "description": "One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.", - "fields": [ - { - "name": "name", - "description": null, - "args": [], - "type": { + }, + "defaultValue": "false" + } + ], + "type": { + "kind": "LIST", + "name": null, + "ofType": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", + "kind": "OBJECT", + "name": "__EnumValue", "ofType": null } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "description", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null + } }, - { - "name": "isDeprecated", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "inputFields", + "description": null, + "args": [ + { + "name": "includeDeprecated", + "description": null, + "type": { "kind": "SCALAR", "name": "Boolean", "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "deprecationReason", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "__Directive", - "description": "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.", - "fields": [ - { - "name": "name", - "description": null, - "args": [], - "type": { + }, + "defaultValue": "false" + } + ], + "type": { + "kind": "LIST", + "name": null, + "ofType": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", + "kind": "OBJECT", + "name": "__InputValue", "ofType": null } - }, - "isDeprecated": false, - "deprecationReason": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ofType", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "__Type", + "ofType": null }, - { - "name": "description", - "description": null, - "args": [], - "type": { + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "__TypeKind", + "description": "An enum describing what kind of type a given `__Type` is.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "SCALAR", + "description": "Indicates this type is a scalar.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OBJECT", + "description": "Indicates this type is an object. `fields` and `interfaces` are valid fields.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INTERFACE", + "description": "Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNION", + "description": "Indicates this type is a union. `possibleTypes` is a valid field.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ENUM", + "description": "Indicates this type is an enum. `enumValues` is a valid field.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INPUT_OBJECT", + "description": "Indicates this type is an input object. `inputFields` is a valid field.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LIST", + "description": "Indicates this type is a list. `ofType` is a valid field.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NON_NULL", + "description": "Indicates this type is a non-null. `ofType` is a valid field.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "__Field", + "description": "Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.", + "fields": [ + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { "kind": "SCALAR", "name": "String", "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null + } }, - { - "name": "isRepeatable", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "args", + "description": null, + "args": [ + { + "name": "includeDeprecated", + "description": null, + "type": { "kind": "SCALAR", "name": "Boolean", "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "locations", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", + }, + "defaultValue": "false" + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", "name": null, "ofType": { - "kind": "LIST", + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "__DirectiveLocation", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "args", - "description": null, - "args": [ - { - "name": "includeDeprecated", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", + "kind": "OBJECT", + "name": "__InputValue", "ofType": null - }, - "defaultValue": "false" - } - ], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__InputValue", - "ofType": null - } } } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "ENUM", - "name": "__DirectiveLocation", - "description": "A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "QUERY", - "description": "Location adjacent to a query operation.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "MUTATION", - "description": "Location adjacent to a mutation operation.", - "isDeprecated": false, - "deprecationReason": null + } }, - { - "name": "SUBSCRIPTION", - "description": "Location adjacent to a subscription operation.", - "isDeprecated": false, - "deprecationReason": null + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "type", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__Type", + "ofType": null + } }, - { - "name": "FIELD", - "description": "Location adjacent to a field.", - "isDeprecated": false, - "deprecationReason": null + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isDeprecated", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } }, - { - "name": "FRAGMENT_DEFINITION", - "description": "Location adjacent to a fragment definition.", - "isDeprecated": false, - "deprecationReason": null + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "deprecationReason", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null }, - { - "name": "FRAGMENT_SPREAD", - "description": "Location adjacent to a fragment spread.", - "isDeprecated": false, - "deprecationReason": null + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "__InputValue", + "description": "Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.", + "fields": [ + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, - { - "name": "INLINE_FRAGMENT", - "description": "Location adjacent to an inline fragment.", - "isDeprecated": false, - "deprecationReason": null + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null }, - { - "name": "VARIABLE_DEFINITION", - "description": "Location adjacent to a variable definition.", - "isDeprecated": false, - "deprecationReason": null + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "type", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__Type", + "ofType": null + } }, - { - "name": "SCHEMA", - "description": "Location adjacent to a schema definition.", - "isDeprecated": false, - "deprecationReason": null + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "defaultValue", + "description": "A GraphQL-formatted string representing the default value for this input value.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null }, - { - "name": "SCALAR", - "description": "Location adjacent to a scalar definition.", - "isDeprecated": false, - "deprecationReason": null + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isDeprecated", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } }, - { - "name": "OBJECT", - "description": "Location adjacent to an object type definition.", - "isDeprecated": false, - "deprecationReason": null + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "deprecationReason", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null }, - { - "name": "FIELD_DEFINITION", - "description": "Location adjacent to a field definition.", - "isDeprecated": false, - "deprecationReason": null + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "__EnumValue", + "description": "One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.", + "fields": [ + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, - { - "name": "ARGUMENT_DEFINITION", - "description": "Location adjacent to an argument definition.", - "isDeprecated": false, - "deprecationReason": null + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null }, - { - "name": "INTERFACE", - "description": "Location adjacent to an interface definition.", - "isDeprecated": false, - "deprecationReason": null + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isDeprecated", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } }, - { - "name": "UNION", - "description": "Location adjacent to a union definition.", - "isDeprecated": false, - "deprecationReason": null + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "deprecationReason", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null }, - { - "name": "ENUM", - "description": "Location adjacent to an enum definition.", - "isDeprecated": false, - "deprecationReason": null + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "__Directive", + "description": "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.", + "fields": [ + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, - { - "name": "ENUM_VALUE", - "description": "Location adjacent to an enum value definition.", - "isDeprecated": false, - "deprecationReason": null + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null }, - { - "name": "INPUT_OBJECT", - "description": "Location adjacent to an input object type definition.", - "isDeprecated": false, - "deprecationReason": null + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isRepeatable", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } }, - { - "name": "INPUT_FIELD_DEFINITION", - "description": "Location adjacent to an input object field definition.", - "isDeprecated": false, - "deprecationReason": null - } - ], - "possibleTypes": null - } - ], - "directives": [ - { - "name": "include", - "description": "Directs the executor to include this field or fragment only when the `if` argument is true.", - "locations": [ - "FIELD", - "FRAGMENT_SPREAD", - "INLINE_FRAGMENT" - ], - "args": [ - { - "name": "if", - "description": "Included when true.", - "type": { - "kind": "NON_NULL", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "locations", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", "name": null, "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "__DirectiveLocation", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "args", + "description": null, + "args": [ + { + "name": "includeDeprecated", + "description": null, + "type": { "kind": "SCALAR", "name": "Boolean", "ofType": null - } - }, - "defaultValue": null - } - ] - }, - { - "name": "skip", - "description": "Directs the executor to skip this field or fragment when the `if` argument is true.", - "locations": [ - "FIELD", - "FRAGMENT_SPREAD", - "INLINE_FRAGMENT" - ], - "args": [ - { - "name": "if", - "description": "Skipped when true.", - "type": { - "kind": "NON_NULL", + }, + "defaultValue": "false" + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__InputValue", + "ofType": null + } } - }, - "defaultValue": null - } - ] - }, - { - "name": "deprecated", - "description": "Marks an element of a GraphQL schema as no longer supported.", - "locations": [ - "FIELD_DEFINITION", - "ARGUMENT_DEFINITION", - "INPUT_FIELD_DEFINITION", - "ENUM_VALUE" - ], - "args": [ - { - "name": "reason", - "description": "Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).", - "type": { + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "__DirectiveLocation", + "description": "A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "QUERY", + "description": "Location adjacent to a query operation.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MUTATION", + "description": "Location adjacent to a mutation operation.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SUBSCRIPTION", + "description": "Location adjacent to a subscription operation.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FIELD", + "description": "Location adjacent to a field.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FRAGMENT_DEFINITION", + "description": "Location adjacent to a fragment definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FRAGMENT_SPREAD", + "description": "Location adjacent to a fragment spread.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INLINE_FRAGMENT", + "description": "Location adjacent to an inline fragment.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VARIABLE_DEFINITION", + "description": "Location adjacent to a variable definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SCHEMA", + "description": "Location adjacent to a schema definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SCALAR", + "description": "Location adjacent to a scalar definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OBJECT", + "description": "Location adjacent to an object type definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FIELD_DEFINITION", + "description": "Location adjacent to a field definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ARGUMENT_DEFINITION", + "description": "Location adjacent to an argument definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INTERFACE", + "description": "Location adjacent to an interface definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNION", + "description": "Location adjacent to a union definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ENUM", + "description": "Location adjacent to an enum definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ENUM_VALUE", + "description": "Location adjacent to an enum value definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INPUT_OBJECT", + "description": "Location adjacent to an input object type definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INPUT_FIELD_DEFINITION", + "description": "Location adjacent to an input object field definition.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + } + ], + "directives": [ + { + "name": "include", + "description": "Directs the executor to include this field or fragment only when the `if` argument is true.", + "locations": ["FIELD", "FRAGMENT_SPREAD", "INLINE_FRAGMENT"], + "args": [ + { + "name": "if", + "description": "Included when true.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "defaultValue": null + } + ] + }, + { + "name": "skip", + "description": "Directs the executor to skip this field or fragment when the `if` argument is true.", + "locations": ["FIELD", "FRAGMENT_SPREAD", "INLINE_FRAGMENT"], + "args": [ + { + "name": "if", + "description": "Skipped when true.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "defaultValue": null + } + ] + }, + { + "name": "deprecated", + "description": "Marks an element of a GraphQL schema as no longer supported.", + "locations": [ + "FIELD_DEFINITION", + "ARGUMENT_DEFINITION", + "INPUT_FIELD_DEFINITION", + "ENUM_VALUE" + ], + "args": [ + { + "name": "reason", + "description": "Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": "\"No longer supported\"" + } + ] + }, + { + "name": "specifiedBy", + "description": "Exposes a URL that specifies the behaviour of this scalar.", + "locations": ["SCALAR"], + "args": [ + { + "name": "url", + "description": "The URL that specifies the behaviour of this scalar.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { "kind": "SCALAR", "name": "String", "ofType": null - }, - "defaultValue": "\"No longer supported\"" - } - ] - }, - { - "name": "specifiedBy", - "description": "Exposes a URL that specifies the behaviour of this scalar.", - "locations": [ - "SCALAR" - ], - "args": [ - { - "name": "url", - "description": "The URL that specifies the behaviour of this scalar.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null - } - ] - } - ] - } - } \ No newline at end of file + } + }, + "defaultValue": null + } + ] + } + ] + } +} diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Services/RemoteSchema/RemoteSchema.module.scss b/frontend/libs/console/legacy-ce/src/lib/components/Services/RemoteSchema/RemoteSchema.module.scss index 8a801bc1ca3c5..e5c18d764471a 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Services/RemoteSchema/RemoteSchema.module.scss +++ b/frontend/libs/console/legacy-ce/src/lib/components/Services/RemoteSchema/RemoteSchema.module.scss @@ -332,4 +332,4 @@ width: 15px; min-width: 15px; cursor: pointer; -} \ No newline at end of file +} diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Services/Settings/InheritedRoles/InheritedRolesEditor.tsx b/frontend/libs/console/legacy-ce/src/lib/components/Services/Settings/InheritedRoles/InheritedRolesEditor.tsx index 784d6f169a5f4..57acc79fe5f55 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Services/Settings/InheritedRoles/InheritedRolesEditor.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/components/Services/Settings/InheritedRoles/InheritedRolesEditor.tsx @@ -35,7 +35,7 @@ const InheritedRolesEditor: React.FC = ({ const [isCollapsed, setIsCollapsed] = useState(props.isCollapsed); type Option = { - value: typeof allRoles[number]; + value: (typeof allRoles)[number]; isChecked: true | false; }; diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Services/Settings/Sidebar.stories.tsx b/frontend/libs/console/legacy-ce/src/lib/components/Services/Settings/Sidebar.stories.tsx index 6ca8cb04e56c0..cbf24ce8253de 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Services/Settings/Sidebar.stories.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/components/Services/Settings/Sidebar.stories.tsx @@ -150,24 +150,26 @@ CloudMetadataKo.parameters = { msw: mockHandlers({}), }; -export const ProLitePrometheusEnabled: ComponentStory = - args => { - // eslint-disable-next-line no-underscore-dangle - window.__env.consoleType = 'pro-lite'; - return ; - }; +export const ProLitePrometheusEnabled: ComponentStory< + typeof Sidebar +> = args => { + // eslint-disable-next-line no-underscore-dangle + window.__env.consoleType = 'pro-lite'; + return ; +}; ProLitePrometheusEnabled.storyName = '💠 Demo Pro Lite Prometheus Enabled'; ProLitePrometheusEnabled.args = generateArgs(); ProLitePrometheusEnabled.parameters = { msw: mockHandlers({ prometheusEnabled: true }), }; -export const ProLitePrometheusDisabled: ComponentStory = - args => { - // eslint-disable-next-line no-underscore-dangle - window.__env.consoleType = 'pro-lite'; - return ; - }; +export const ProLitePrometheusDisabled: ComponentStory< + typeof Sidebar +> = args => { + // eslint-disable-next-line no-underscore-dangle + window.__env.consoleType = 'pro-lite'; + return ; +}; ProLitePrometheusDisabled.storyName = '💠 Demo Pro Lite Prometheus Disabled'; ProLitePrometheusDisabled.args = generateArgs(); ProLitePrometheusDisabled.parameters = { diff --git a/frontend/libs/console/legacy-ce/src/lib/dataSources/index.ts b/frontend/libs/console/legacy-ce/src/lib/dataSources/index.ts index 097f84e811294..26cea4ac7405d 100644 --- a/frontend/libs/console/legacy-ce/src/lib/dataSources/index.ts +++ b/frontend/libs/console/legacy-ce/src/lib/dataSources/index.ts @@ -46,7 +46,7 @@ export const drivers = [ 'cockroach', 'alloy', ] as const; -export type Driver = typeof drivers[number]; +export type Driver = (typeof drivers)[number]; export const driverToLabel: Record = { postgres: 'PostgreSQL', diff --git a/frontend/libs/console/legacy-ce/src/lib/features/Actions/components/OASGenerator/OASGeneratorMoreInfo.tsx b/frontend/libs/console/legacy-ce/src/lib/features/Actions/components/OASGenerator/OASGeneratorMoreInfo.tsx index 74cabf171f483..6a08496a9231d 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/Actions/components/OASGenerator/OASGeneratorMoreInfo.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/features/Actions/components/OASGenerator/OASGeneratorMoreInfo.tsx @@ -7,37 +7,38 @@ export interface OasGeneratorMoreInfoProps { operation: Operation; } -export const OasGeneratorMoreInfo: React.FC = - props => { - const { operation } = props; - const [isExpanded, setExpanded] = React.useState(false); - return ( -
-
setExpanded(!isExpanded)} - > -
{operation.path}
-
- More info{' '} - -
-
-
- {operation.description.trim() ?? - 'No description available for this endpoint'} +export const OasGeneratorMoreInfo: React.FC< + OasGeneratorMoreInfoProps +> = props => { + const { operation } = props; + const [isExpanded, setExpanded] = React.useState(false); + return ( +
+
setExpanded(!isExpanded)} + > +
{operation.path}
+
+ More info{' '} +
- ); - }; +
+ {operation.description.trim() ?? + 'No description available for this endpoint'} +
+
+ ); +}; diff --git a/frontend/libs/console/legacy-ce/src/lib/features/AllowLists/components/AllowListSidebar/AllowListSidebarSearchForm.tsx b/frontend/libs/console/legacy-ce/src/lib/features/AllowLists/components/AllowListSidebar/AllowListSidebarSearchForm.tsx index 272da047c9059..c56ff52ce476c 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/AllowLists/components/AllowListSidebar/AllowListSidebarSearchForm.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/features/AllowLists/components/AllowListSidebar/AllowListSidebarSearchForm.tsx @@ -7,33 +7,34 @@ interface AllowListSidebarSearchFormProps { setSearch: (search: string) => void; } -export const AllowListSidebarSearchForm: React.FC = - ({ setSearch }) => { - const schema = z.object({ - search: z.string(), - }); +export const AllowListSidebarSearchForm: React.FC< + AllowListSidebarSearchFormProps +> = ({ setSearch }) => { + const schema = z.object({ + search: z.string(), + }); - const { - methods: { watch }, - Form, - } = useConsoleForm({ - schema, - }); + const { + methods: { watch }, + Form, + } = useConsoleForm({ + schema, + }); - const search = watch('search'); + const search = watch('search'); - useEffect(() => { - setSearch(search); - }, [search]); + useEffect(() => { + setSearch(search); + }, [search]); - return ( -
{}} className="pl-0 pr-0 !p-0 bg-transparent"> - } - name="search" - /> - - ); - }; + return ( +
{}} className="pl-0 pr-0 !p-0 bg-transparent"> + } + name="search" + /> + + ); +}; diff --git a/frontend/libs/console/legacy-ce/src/lib/features/AllowLists/components/AllowListSidebar/QueryCollectionCreateDialog.tsx b/frontend/libs/console/legacy-ce/src/lib/features/AllowLists/components/AllowListSidebar/QueryCollectionCreateDialog.tsx index f935ecbf092f6..a63788168f242 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/AllowLists/components/AllowListSidebar/QueryCollectionCreateDialog.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/features/AllowLists/components/AllowListSidebar/QueryCollectionCreateDialog.tsx @@ -14,70 +14,71 @@ interface QueryCollectionCreateDialogProps { const schema = z.object({ name: z.string().min(1, 'Name is required'), }); -export const QueryCollectionCreateDialog: React.FC = - props => { - const { onClose, onCreate } = props; - const { createQueryCollection, isLoading } = useCreateQueryCollection(); - const { fireNotification } = useFireNotification(); +export const QueryCollectionCreateDialog: React.FC< + QueryCollectionCreateDialogProps +> = props => { + const { onClose, onCreate } = props; + const { createQueryCollection, isLoading } = useCreateQueryCollection(); + const { fireNotification } = useFireNotification(); - const { - methods: { trigger, watch, setError }, - Form, - } = useConsoleForm({ - schema, - }); - const name = watch('name'); + const { + methods: { trigger, watch, setError }, + Form, + } = useConsoleForm({ + schema, + }); + const name = watch('name'); - return ( -
{}}> - - <> - -
- -
-
- { - if (await trigger()) { - // TODO: remove as when proper form types will be available - createQueryCollection(name as string, { - addToAllowList: true, - onSuccess: () => { - onClose(); - onCreate(name as string); - fireNotification({ - type: 'success', - title: 'Collection created', - message: `Collection ${name} was created successfully`, - }); - }, - onError: error => { - setError('name', { - type: 'manual', - message: (error as Error).message, - }); - fireNotification({ - type: 'error', - title: 'Collection creation failed', - message: (error as Error).message, - }); - }, - }); - } - }} - isLoading={isLoading} - /> - -
-
- ); - }; + return ( +
{}}> + + <> + +
+ +
+
+ { + if (await trigger()) { + // TODO: remove as when proper form types will be available + createQueryCollection(name as string, { + addToAllowList: true, + onSuccess: () => { + onClose(); + onCreate(name as string); + fireNotification({ + type: 'success', + title: 'Collection created', + message: `Collection ${name} was created successfully`, + }); + }, + onError: error => { + setError('name', { + type: 'manual', + message: (error as Error).message, + }); + fireNotification({ + type: 'error', + title: 'Collection creation failed', + message: (error as Error).message, + }); + }, + }); + } + }} + isLoading={isLoading} + /> + +
+
+ ); +}; diff --git a/frontend/libs/console/legacy-ce/src/lib/features/AllowLists/components/AllowListSidebar/QueryCollectionItem.tsx b/frontend/libs/console/legacy-ce/src/lib/features/AllowLists/components/AllowListSidebar/QueryCollectionItem.tsx index ff9fd2057783b..118d64636d5b2 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/AllowLists/components/AllowListSidebar/QueryCollectionItem.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/features/AllowLists/components/AllowListSidebar/QueryCollectionItem.tsx @@ -7,24 +7,25 @@ interface QueryCollectionItemProps extends React.ComponentProps<'a'> { selected: boolean; } -export const QueryCollectionItem: React.FC = - props => { - const { name, selected, className, ...rest } = props; - const Icon = selected ? FaFolderOpen : FaFolder; - const textClassName = selected - ? 'text-amber-500 hover:text-amber-600 focus:text-amber-600' - : 'text-muted hover:bg-gray-100 hover:text-gray-900'; - return ( - - - {name} - - ); - }; +export const QueryCollectionItem: React.FC< + QueryCollectionItemProps +> = props => { + const { name, selected, className, ...rest } = props; + const Icon = selected ? FaFolderOpen : FaFolder; + const textClassName = selected + ? 'text-amber-500 hover:text-amber-600 focus:text-amber-600' + : 'text-muted hover:bg-gray-100 hover:text-gray-900'; + return ( + + + {name} + + ); +}; diff --git a/frontend/libs/console/legacy-ce/src/lib/features/Analytics/components/Analytics.stories.tsx b/frontend/libs/console/legacy-ce/src/lib/features/Analytics/components/Analytics.stories.tsx index d9e56ffd95b92..526a3c07775d4 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/Analytics/components/Analytics.stories.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/features/Analytics/components/Analytics.stories.tsx @@ -205,17 +205,18 @@ function ComponentThatAcceptHtmlAttributes(props: Record) { // STORY DEFINITION // -------------------------------------------------- -export const PassingButtonComponent: ComponentStory = - args => { - return ( - - - - ); - }; +export const PassingButtonComponent: ComponentStory< + typeof Analytics +> = args => { + return ( + + + + ); +}; PassingButtonComponent.storyName = '⚙️ Passing the Button component'; // -------------------------------------------------- diff --git a/frontend/libs/console/legacy-ce/src/lib/features/BrowseRows/components/DataGrid/parts/ReactTableWrapper.stories.tsx b/frontend/libs/console/legacy-ce/src/lib/features/BrowseRows/components/DataGrid/parts/ReactTableWrapper.stories.tsx index 35efda8aecda5..e911de580b554 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/BrowseRows/components/DataGrid/parts/ReactTableWrapper.stories.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/features/BrowseRows/components/DataGrid/parts/ReactTableWrapper.stories.tsx @@ -53,16 +53,17 @@ export const Basic: ComponentStory = () => { ); }; -export const SelectionDisabled: ComponentStory = - () => { - return ( - - ); - }; +export const SelectionDisabled: ComponentStory< + typeof ReactTableWrapper +> = () => { + return ( + + ); +}; Basic.storyName = '🧪 Test - Basic data with columns'; @@ -88,50 +89,51 @@ Basic.play = async ({ canvasElement }) => { ); }; -export const WithRelationships: ComponentStory = - () => { - const relationships: Relationship[] = [ - { - name: 'Artist', - fromSource: 'sqlite_test', - fromTable: ['Album'], - relationshipType: 'Object', - type: 'localRelationship', - definition: { - toTable: ['Artist'], - mapping: { - ArtistId: 'ArtistId', - }, +export const WithRelationships: ComponentStory< + typeof ReactTableWrapper +> = () => { + const relationships: Relationship[] = [ + { + name: 'Artist', + fromSource: 'sqlite_test', + fromTable: ['Album'], + relationshipType: 'Object', + type: 'localRelationship', + definition: { + toTable: ['Artist'], + mapping: { + ArtistId: 'ArtistId', }, }, - { - name: 'Tracks', - fromSource: 'sqlite_test', - fromTable: ['Album'], - relationshipType: 'Object', - type: 'localRelationship', - definition: { - toTable: ['Track'], - mapping: { - AlbumId: 'AlbumId', - }, + }, + { + name: 'Tracks', + fromSource: 'sqlite_test', + fromTable: ['Album'], + relationshipType: 'Object', + type: 'localRelationship', + definition: { + toTable: ['Track'], + mapping: { + AlbumId: 'AlbumId', }, }, - ]; - - return ( - {}, - onClose: () => {}, - }} - isRowsSelectionEnabled - onRowsSelect={action('onRowsSelect')} - /> - ); - }; + }, + ]; + + return ( + {}, + onClose: () => {}, + }} + isRowsSelectionEnabled + onRowsSelect={action('onRowsSelect')} + /> + ); +}; WithRelationships.storyName = '🧪 Test - Data with Relationships'; diff --git a/frontend/libs/console/legacy-ce/src/lib/features/ControlPlane/generatedGraphQLTypes.ts b/frontend/libs/console/legacy-ce/src/lib/features/ControlPlane/generatedGraphQLTypes.ts index c0b8cb979a8b1..475437b7e3cfc 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/ControlPlane/generatedGraphQLTypes.ts +++ b/frontend/libs/console/legacy-ce/src/lib/features/ControlPlane/generatedGraphQLTypes.ts @@ -2,10 +2,12 @@ export type Maybe = T | null; export type Exact = { [K in keyof T]: T[K]; }; -export type MakeOptional = Omit & - { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & - { [SubKey in K]: Maybe }; +export type MakeOptional = Omit & { + [SubKey in K]?: Maybe; +}; +export type MakeMaybe = Omit & { + [SubKey in K]: Maybe; +}; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { ID: string; diff --git a/frontend/libs/console/legacy-ce/src/lib/features/DataRelationships/components/LocalDBRelationshipWidget/LocalRelationshipWidget.stories.tsx b/frontend/libs/console/legacy-ce/src/lib/features/DataRelationships/components/LocalDBRelationshipWidget/LocalRelationshipWidget.stories.tsx index ba46bee964719..2be3365706240 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/DataRelationships/components/LocalDBRelationshipWidget/LocalRelationshipWidget.stories.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/features/DataRelationships/components/LocalDBRelationshipWidget/LocalRelationshipWidget.stories.tsx @@ -30,15 +30,17 @@ Primary.args = { }, }; -export const WithExistingObjectRelationship: Story = - args => ; +export const WithExistingObjectRelationship: Story< + LocalRelationshipWidgetProps +> = args => ; WithExistingObjectRelationship.args = { ...Primary.args, existingRelationshipName: 'relt1obj', }; -export const WithExistingArrayRelationship: Story = - args => ; +export const WithExistingArrayRelationship: Story< + LocalRelationshipWidgetProps +> = args => ; WithExistingArrayRelationship.args = { ...Primary.args, existingRelationshipName: 'relt1array', diff --git a/frontend/libs/console/legacy-ce/src/lib/features/DataRelationships/components/RemoteDBRelationshipWidget/RemoteDBRelationshipWidget.stories.tsx b/frontend/libs/console/legacy-ce/src/lib/features/DataRelationships/components/RemoteDBRelationshipWidget/RemoteDBRelationshipWidget.stories.tsx index 75fe08fee9be7..6d43f79b39ae2 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/DataRelationships/components/RemoteDBRelationshipWidget/RemoteDBRelationshipWidget.stories.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/features/DataRelationships/components/RemoteDBRelationshipWidget/RemoteDBRelationshipWidget.stories.tsx @@ -30,8 +30,9 @@ Primary.args = { }, }; -export const WithExistingRelationship: Story = - args => ; +export const WithExistingRelationship: Story< + RemoteDBRelationshipWidgetProps +> = args => ; WithExistingRelationship.args = { ...Primary.args, existingRelationshipName: 'AlbumToResident', @@ -102,15 +103,16 @@ PrimaryWithTest.play = async ({ canvasElement }) => { let callbackResponseExistingRelationshipWithTest = {}; -export const ExistingRelationshipWithTest: Story = - args => ( - { - callbackResponseExistingRelationshipWithTest = d; - }} - /> - ); +export const ExistingRelationshipWithTest: Story< + RemoteDBRelationshipWidgetProps +> = args => ( + { + callbackResponseExistingRelationshipWithTest = d; + }} + /> +); ExistingRelationshipWithTest.args = { ...Primary.args, existingRelationshipName: 'AlbumToResident', diff --git a/frontend/libs/console/legacy-ce/src/lib/features/DatabaseRelationships/components/RenderWidget/RenderWidget.stories.tsx b/frontend/libs/console/legacy-ce/src/lib/features/DatabaseRelationships/components/RenderWidget/RenderWidget.stories.tsx index a6ee317c70ee7..0db16c12d93c6 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/DatabaseRelationships/components/RenderWidget/RenderWidget.stories.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/features/DatabaseRelationships/components/RenderWidget/RenderWidget.stories.tsx @@ -17,14 +17,15 @@ export default { decorators: [ReactQueryDecorator()], } as ComponentMeta; -export const WithManualConfiguration: ComponentStory = - () => ( - {}} - onSuccess={() => {}} - onError={() => {}} - /> - ); +export const WithManualConfiguration: ComponentStory< + typeof RenderWidget +> = () => ( + {}} + onSuccess={() => {}} + onError={() => {}} + /> +); diff --git a/frontend/libs/console/legacy-ce/src/lib/features/MetadataAPI/types.ts b/frontend/libs/console/legacy-ce/src/lib/features/MetadataAPI/types.ts index 3863e2c6006ec..8a0080fb11aaa 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/MetadataAPI/types.ts +++ b/frontend/libs/console/legacy-ce/src/lib/features/MetadataAPI/types.ts @@ -91,7 +91,7 @@ export type AllMetadataQueries = // TODO: these could be more strongly typed export type allowedMetadataTypes = - | typeof allowedMetadataTypesArr[number] + | (typeof allowedMetadataTypesArr)[number] | AllMetadataQueries | MetadataQueryType | OpenTelemetryQueries; diff --git a/frontend/libs/console/legacy-ce/src/lib/features/OpenApi3Form/stories/ObjectInput.stories.tsx b/frontend/libs/console/legacy-ce/src/lib/features/OpenApi3Form/stories/ObjectInput.stories.tsx index 491ba98c0570e..0f84b9752b186 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/OpenApi3Form/stories/ObjectInput.stories.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/features/OpenApi3Form/stories/ObjectInput.stories.tsx @@ -23,156 +23,158 @@ export default { ], } as ComponentMeta; -export const ObjectInputWithFields: ComponentStory = - () => { - return ( - [ - { - nullable: false, - properties: { - jdbc_url: { +export const ObjectInputWithFields: ComponentStory< + typeof RenderOpenApi3Form +> = () => { + return ( + [ + { + nullable: false, + properties: { + jdbc_url: { + nullable: false, + type: 'string', + }, + primary_keys: { + items: { nullable: false, - type: 'string', - }, - primary_keys: { - items: { - nullable: false, - properties: { - columns: { - items: { - nullable: false, - type: 'string', - }, + properties: { + columns: { + items: { nullable: false, - type: 'array', + type: 'string', }, - table: { - items: { - nullable: false, - type: 'string', - }, + nullable: false, + type: 'array', + }, + table: { + items: { nullable: false, - type: 'array', + type: 'string', }, + nullable: false, + type: 'array', }, - type: 'object', }, + type: 'object', + }, + nullable: true, + type: 'array', + }, + schema: { + nullable: true, + type: 'string', + }, + tables: { + items: { + nullable: false, + type: 'string', + }, + nullable: true, + type: 'array', + }, + }, + type: 'object', + }, + {}, + ]} + defaultValues={{ + ObjectProperty: { + jdbc_url: 'asdasd', + primary_keys: [ + { + columns: ['test'], + table: ['test'], + }, + { + columns: ['test'], + table: ['test'], + }, + ], + schema: 'asdasd', + tables: ['asd', ' value'], + }, + }} + name="ObjectProperty" + /> + ); +}; + +export const ObjectInputArrayInput: ComponentStory< + typeof RenderOpenApi3Form +> = () => { + return ( + [ + { + title: 'Available Connections', + type: 'array', + nullable: true, + items: { + $ref: '#/otherSchemas/ConnectionParams', + }, + }, + { + ConnectionParams: { + title: 'Connection Parameters', + type: 'object', + nullable: true, + properties: { + username: { + title: 'Username', + type: 'string', nullable: true, - type: 'array', }, - schema: { + database: { + title: 'Database', + type: 'string', nullable: true, + }, + host: { + title: 'Host', type: 'string', + // nullable: true, }, - tables: { - items: { - nullable: false, - type: 'string', - }, + port: { + title: 'Port', + type: 'number', nullable: true, - type: 'array', }, - }, - type: 'object', - }, - {}, - ]} - defaultValues={{ - ObjectProperty: { - jdbc_url: 'asdasd', - primary_keys: [ - { - columns: ['test'], - table: ['test'], + socket: { + title: 'Socket', + type: 'number', + nullable: true, }, - { - columns: ['test'], - table: ['test'], + uuid: { + title: 'UUID', + type: 'number', + nullable: true, }, - ], - schema: 'asdasd', - tables: ['asd', ' value'], - }, - }} - name="ObjectProperty" - /> - ); - }; - -export const ObjectInputArrayInput: ComponentStory = - () => { - return ( - [ - { - title: 'Available Connections', - type: 'array', - nullable: true, - items: { - $ref: '#/otherSchemas/ConnectionParams', - }, - }, - { - ConnectionParams: { - title: 'Connection Parameters', - type: 'object', - nullable: true, - properties: { - username: { - title: 'Username', - type: 'string', - nullable: true, - }, - database: { - title: 'Database', - type: 'string', - nullable: true, - }, - host: { - title: 'Host', - type: 'string', - // nullable: true, - }, - port: { - title: 'Port', - type: 'number', - nullable: true, - }, - socket: { - title: 'Socket', - type: 'number', - nullable: true, - }, - uuid: { - title: 'UUID', - type: 'number', - nullable: true, - }, - disable_telemetry: { - title: 'Telemetry', - type: 'boolean', - nullable: true, - }, - disable_auto_update: { - title: 'Auto updates', - type: 'boolean', - nullable: true, - }, - enable_log: { - title: 'Logging', - type: 'boolean', - nullable: true, - }, + disable_telemetry: { + title: 'Telemetry', + type: 'boolean', + nullable: true, + }, + disable_auto_update: { + title: 'Auto updates', + type: 'boolean', + nullable: true, + }, + enable_log: { + title: 'Logging', + type: 'boolean', + nullable: true, }, }, }, - ]} - defaultValues={{}} - name="ObjectProperty" - /> - ); - }; + }, + ]} + defaultValues={{}} + name="ObjectProperty" + /> + ); +}; export const Test: ComponentStory = () => ( = - props => { - const { inputFieldName, label, tooltip, children, loading } = props; +export const CollapsibleFieldWrapper: React.FC< + CollapsibleFieldWrapperProps +> = props => { + const { inputFieldName, label, tooltip, children, loading } = props; - if (loading) return ; + if (loading) return ; - return ( - <> - - - - } - > - {children} - - - ); - }; + return ( + <> + + + + } + > + {children} + + + ); +}; diff --git a/frontend/libs/console/legacy-ce/src/lib/features/OpenTelemetryConfig/OpenTelemetryConfig/components/Header/Badge/Badge.stories.tsx b/frontend/libs/console/legacy-ce/src/lib/features/OpenTelemetryConfig/OpenTelemetryConfig/components/Header/Badge/Badge.stories.tsx index efb469a31ffcc..6b18473fe8c31 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/OpenTelemetryConfig/OpenTelemetryConfig/components/Header/Badge/Badge.stories.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/features/OpenTelemetryConfig/OpenTelemetryConfig/components/Header/Badge/Badge.stories.tsx @@ -12,9 +12,12 @@ export default { // -------------------------------------------------- // STORY DEFINITION // -------------------------------------------------- -export const BadgeEnabled: ComponentStory = - () => ; -export const BadgeDisabled: ComponentStory = - () => ; -export const BadgeSkeleton: ComponentStory = - () => ; +export const BadgeEnabled: ComponentStory< + typeof BadgeEnabledComponent +> = () => ; +export const BadgeDisabled: ComponentStory< + typeof BadgeDisabledComponent +> = () => ; +export const BadgeSkeleton: ComponentStory< + typeof BadgeSkeletonComponent +> = () => ; diff --git a/frontend/libs/console/legacy-ce/src/lib/features/OpenTelemetryConfig/OpenTelemetryConfig/components/Header/Hero/Hero.stories.tsx b/frontend/libs/console/legacy-ce/src/lib/features/OpenTelemetryConfig/OpenTelemetryConfig/components/Header/Hero/Hero.stories.tsx index 714dbfbbcd33c..4fc5447f4caa4 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/OpenTelemetryConfig/OpenTelemetryConfig/components/Header/Hero/Hero.stories.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/features/OpenTelemetryConfig/OpenTelemetryConfig/components/Header/Hero/Hero.stories.tsx @@ -15,7 +15,9 @@ export default { export const HeroEnabled: ComponentStory = () => ( ); -export const HeroDisabled: ComponentStory = - () => ; -export const HeroSkeleton: ComponentStory = - () => ; +export const HeroDisabled: ComponentStory< + typeof HeroDisabledComponent +> = () => ; +export const HeroSkeleton: ComponentStory< + typeof HeroSkeletonComponent +> = () => ; diff --git a/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsForm/api/utils.ts b/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsForm/api/utils.ts index 2bb827436ce20..42aa2c5c64c58 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsForm/api/utils.ts +++ b/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsForm/api/utils.ts @@ -141,7 +141,7 @@ export const createInsertArgs = ({ role, source: dataSourceName, }, - } as typeof initialArgs[0]); + } as (typeof initialArgs)[0]); } // this has been commented out as cloned permissions is not currently used diff --git a/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsForm/components/ClonePermissions.tsx b/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsForm/components/ClonePermissions.tsx index ac40de79085f5..629f52268572e 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsForm/components/ClonePermissions.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsForm/components/ClonePermissions.tsx @@ -119,76 +119,77 @@ export interface ClonePermission { roleName: string; } -export const ClonePermissionsSection: React.FC = - ({ queryType, tables, supportedQueryTypes, roles, defaultOpen }) => { - const { control, watch } = useFormContext(); - - const disabled = useIsDisabled(queryType as QueryType); - - const { fields, append, remove } = useFieldArray({ - control, - name: 'clonePermissions', - }); - - const watched: ClonePermission[] = watch('clonePermissions'); - const controlledFields = fields.map((field, index) => { - return { - ...field, - ...watched[index], - }; - }); - - React.useEffect(() => { - const finalRow = controlledFields[controlledFields.length - 1]; - - const finalRowIsNotEmpty = - finalRow?.tableName !== '' && - finalRow?.queryType !== '' && - finalRow?.roleName !== ''; - - if (finalRowIsNotEmpty) { - append({ - tableName: '', - queryType: '', - roleName: '', - } as ClonePermission); - } - }, [controlledFields, append]); - - return ( - - - -
-

Apply permissions for:

- - {controlledFields.map((field, index) => { - return ( - remove(index)} - /> - ); - })} -

- Note: While applying permissions for other - tables, the column permissions and presets will be ignored -

-
-
-
- ); - }; +export const ClonePermissionsSection: React.FC< + ClonePermissionsSectionProps +> = ({ queryType, tables, supportedQueryTypes, roles, defaultOpen }) => { + const { control, watch } = useFormContext(); + + const disabled = useIsDisabled(queryType as QueryType); + + const { fields, append, remove } = useFieldArray({ + control, + name: 'clonePermissions', + }); + + const watched: ClonePermission[] = watch('clonePermissions'); + const controlledFields = fields.map((field, index) => { + return { + ...field, + ...watched[index], + }; + }); + + React.useEffect(() => { + const finalRow = controlledFields[controlledFields.length - 1]; + + const finalRowIsNotEmpty = + finalRow?.tableName !== '' && + finalRow?.queryType !== '' && + finalRow?.roleName !== ''; + + if (finalRowIsNotEmpty) { + append({ + tableName: '', + queryType: '', + roleName: '', + } as ClonePermission); + } + }, [controlledFields, append]); + + return ( + + + +
+

Apply permissions for:

+ + {controlledFields.map((field, index) => { + return ( + remove(index)} + /> + ); + })} +

+ Note: While applying permissions for other tables, + the column permissions and presets will be ignored +

+
+
+
+ ); +}; export default ClonePermissionsSection; diff --git a/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsForm/components/ColumnPermissions.tsx b/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsForm/components/ColumnPermissions.tsx index 52ab52963a758..a1c2dc2dbb618 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsForm/components/ColumnPermissions.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsForm/components/ColumnPermissions.tsx @@ -87,153 +87,152 @@ const checkIfConfirmationIsNeeded = ( // @todo // this hasn't been fully implemented, it still needs computed columns adding -export const ColumnPermissionsSection: React.FC = - ({ roleName, queryType, columns, table, dataSourceName }) => { - const { setValue, watch } = useFormContext(); - const [showConfirmation, setShowConfirmationModal] = useState< - string | null - >(null); - const [selectedColumns, queryRootFields, subscriptionRootFields] = watch([ - 'columns', - 'query_root_fields', - 'subscription_root_fields', - ]); +export const ColumnPermissionsSection: React.FC< + ColumnPermissionsSectionProps +> = ({ roleName, queryType, columns, table, dataSourceName }) => { + const { setValue, watch } = useFormContext(); + const [showConfirmation, setShowConfirmationModal] = useState( + null + ); + const [selectedColumns, queryRootFields, subscriptionRootFields] = watch([ + 'columns', + 'query_root_fields', + 'subscription_root_fields', + ]); - // if no row permissions are selected selection should be disabled - const disabled = useIsDisabled(queryType); + // if no row permissions are selected selection should be disabled + const disabled = useIsDisabled(queryType); - const { data: status, isError } = useStatus(disabled); + const { data: status, isError } = useStatus(disabled); - const { columns: tableColumns } = useListAllTableColumns( - dataSourceName, - table - ); + const { columns: tableColumns } = useListAllTableColumns( + dataSourceName, + table + ); - const onClick = () => { - columns?.forEach(column => { - const toggleAllOn = status !== 'All columns'; - // if status is not all columns: toggle all on - // otherwise toggle all off - setValue(`columns.${column}`, toggleAllOn); - }); - }; - - if (isError) { - return
Error loading column permission data
; - } - - const handleUpdate = (fieldName: string) => { - setValue( - 'query_root_fields', - queryRootFields.filter((field: string) => field !== 'select_by_pk') - ); - setValue( - 'subscription_root_fields', - subscriptionRootFields.filter( - (field: string) => field !== 'select_by_pk' - ) - ); - setValue(`columns.${fieldName}`, !selectedColumns[fieldName]); - }; - - const permissionsModalTitle = getPermissionsModalTitle({ - scenario: 'pks', - role: roleName, - primaryKeyColumns: tableColumns - ?.filter(column => column.isPrimaryKey) - ?.map(column => column.name) - ?.join(','), + const onClick = () => { + columns?.forEach(column => { + const toggleAllOn = status !== 'All columns'; + // if status is not all columns: toggle all on + // otherwise toggle all off + setValue(`columns.${column}`, toggleAllOn); }); + }; - const permissionsModalDescription = getPermissionsModalDescription('pks'); - - return ( - <> - - - -
-
-

- Allow role {roleName}{' '} - {getAccessText(queryType)} -   - columns: -

-
- -
- {columns?.map(fieldName => ( - - ))} - -
-
- {/* {getExternalTablePermissionsMsg()} */} -
-
- {showConfirmation && ( - setShowConfirmationModal(null)} - onSubmit={() => { - handleUpdate(showConfirmation); - setShowConfirmationModal(null); - }} - /> - )} - + if (isError) { + return
Error loading column permission data
; + } + + const handleUpdate = (fieldName: string) => { + setValue( + 'query_root_fields', + queryRootFields.filter((field: string) => field !== 'select_by_pk') ); + setValue( + 'subscription_root_fields', + subscriptionRootFields.filter((field: string) => field !== 'select_by_pk') + ); + setValue(`columns.${fieldName}`, !selectedColumns[fieldName]); }; + const permissionsModalTitle = getPermissionsModalTitle({ + scenario: 'pks', + role: roleName, + primaryKeyColumns: tableColumns + ?.filter(column => column.isPrimaryKey) + ?.map(column => column.name) + ?.join(','), + }); + + const permissionsModalDescription = getPermissionsModalDescription('pks'); + + return ( + <> + + + +
+
+

+ Allow role {roleName}{' '} + {getAccessText(queryType)} +   + columns: +

+
+ +
+ {columns?.map(fieldName => ( + + ))} + +
+
+ {/* {getExternalTablePermissionsMsg()} */} +
+
+ {showConfirmation && ( + setShowConfirmationModal(null)} + onSubmit={() => { + handleUpdate(showConfirmation); + setShowConfirmationModal(null); + }} + /> + )} + + ); +}; + export default ColumnPermissionsSection; diff --git a/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsForm/components/RootFieldPermissions/RootFieldPermissions.tsx b/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsForm/components/RootFieldPermissions/RootFieldPermissions.tsx index 451a17af7934c..3e6847ff25912 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsForm/components/RootFieldPermissions/RootFieldPermissions.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsForm/components/RootFieldPermissions/RootFieldPermissions.tsx @@ -55,147 +55,145 @@ export interface ColumnPermissionsSectionProps { dataSourceName: string; } -export const ColumnRootFieldPermissions: React.FC = - ({ dataSourceName, table, filterType }) => { - const { watch, setValue } = useFormContext(); - - const [ - hasEnabledAggregations, - selectedColumns, - queryRootFields, - subscriptionRootFields, - ] = watch([ - 'aggregationEnabled', - 'columns', - 'query_root_fields', - 'subscription_root_fields', - ]); - console.log('table', table); - const disabled = filterType === 'none'; - const { columns: tableColumns } = useListAllTableColumns( - dataSourceName, - table - ); - - const hasSelectedPrimaryKeys = hasSelectedPrimaryKeyFinder( - selectedColumns, - tableColumns - ); - - const updateFormValues = ( - key: RootKeyValues, - value: PermissionRootTypes - ) => { - setValue(key, value); - }; - - const rootFieldPermissions = useRootFieldPermissions({ - queryRootFields, - subscriptionRootFields, - hasEnabledAggregations, - hasSelectedPrimaryKeys, - updateFormValues, - }); - - const { - isSubscriptionStreamingEnabled, - onEnableSectionSwitchChange, - onToggleAll, - isRootPermissionsSwitchedOn, - onUpdatePermission, - } = rootFieldPermissions; - - const supportsStreaming = useSourceSupportStreaming(dataSourceName); - const getFilteredSubscriptionRootPermissionFields = ( - fields: SubscriptionRootPermissionType[] - ) => { - if (!supportsStreaming) - return fields.filter(field => field !== 'select_stream'); - return fields; - }; - - const bodyTitle = disabled ? 'Set row permissions first' : ''; - - return ( - - - -
-
- -
- Enable GraphQL root field visibility customization. -
- - - By enabling this you can customize the root field - permissions. When this switch is turned off, all values are - enabled by default. - - } - > - +export const ColumnRootFieldPermissions: React.FC< + ColumnPermissionsSectionProps +> = ({ dataSourceName, table, filterType }) => { + const { watch, setValue } = useFormContext(); + + const [ + hasEnabledAggregations, + selectedColumns, + queryRootFields, + subscriptionRootFields, + ] = watch([ + 'aggregationEnabled', + 'columns', + 'query_root_fields', + 'subscription_root_fields', + ]); + console.log('table', table); + const disabled = filterType === 'none'; + const { columns: tableColumns } = useListAllTableColumns( + dataSourceName, + table + ); + + const hasSelectedPrimaryKeys = hasSelectedPrimaryKeyFinder( + selectedColumns, + tableColumns + ); + + const updateFormValues = (key: RootKeyValues, value: PermissionRootTypes) => { + setValue(key, value); + }; + + const rootFieldPermissions = useRootFieldPermissions({ + queryRootFields, + subscriptionRootFields, + hasEnabledAggregations, + hasSelectedPrimaryKeys, + updateFormValues, + }); + + const { + isSubscriptionStreamingEnabled, + onEnableSectionSwitchChange, + onToggleAll, + isRootPermissionsSwitchedOn, + onUpdatePermission, + } = rootFieldPermissions; + + const supportsStreaming = useSourceSupportStreaming(dataSourceName); + const getFilteredSubscriptionRootPermissionFields = ( + fields: SubscriptionRootPermissionType[] + ) => { + if (!supportsStreaming) + return fields.filter(field => field !== 'select_stream'); + return fields; + }; + + const bodyTitle = disabled ? 'Set row permissions first' : ''; + + return ( + + + +
+
+ +
+ Enable GraphQL root field visibility customization.
-
+ By enabling this you can customize the root field permissions. + When this switch is turned off, all values are enabled by + default. + + } > - } - hasEnabledAggregations={hasEnabledAggregations} - hasSelectedPrimaryKeys={hasSelectedPrimaryKeys} - isSubscriptionStreamingEnabled={isSubscriptionStreamingEnabled} - permissionFields={queryRootPermissionFields} - permissionType={QUERY_ROOT_VALUES} - onToggleAll={() => - onToggleAll(QUERY_ROOT_VALUES, queryRootFields) - } - onUpdate={onUpdatePermission} - /> - } - hasEnabledAggregations={hasEnabledAggregations} - hasSelectedPrimaryKeys={hasSelectedPrimaryKeys} - isSubscriptionStreamingEnabled={isSubscriptionStreamingEnabled} - permissionFields={getFilteredSubscriptionRootPermissionFields( - subscriptionRootPermissionFields - )} - permissionType={SUBSCRIPTION_ROOT_VALUES} - onToggleAll={() => - onToggleAll(SUBSCRIPTION_ROOT_VALUES, subscriptionRootFields) - } - onUpdate={onUpdatePermission} - /> -
+
- - - ); - }; +
+ } + hasEnabledAggregations={hasEnabledAggregations} + hasSelectedPrimaryKeys={hasSelectedPrimaryKeys} + isSubscriptionStreamingEnabled={isSubscriptionStreamingEnabled} + permissionFields={queryRootPermissionFields} + permissionType={QUERY_ROOT_VALUES} + onToggleAll={() => + onToggleAll(QUERY_ROOT_VALUES, queryRootFields) + } + onUpdate={onUpdatePermission} + /> + } + hasEnabledAggregations={hasEnabledAggregations} + hasSelectedPrimaryKeys={hasSelectedPrimaryKeys} + isSubscriptionStreamingEnabled={isSubscriptionStreamingEnabled} + permissionFields={getFilteredSubscriptionRootPermissionFields( + subscriptionRootPermissionFields + )} + permissionType={SUBSCRIPTION_ROOT_VALUES} + onToggleAll={() => + onToggleAll(SUBSCRIPTION_ROOT_VALUES, subscriptionRootFields) + } + onUpdate={onUpdatePermission} + /> +
+
+
+
+ ); +}; export default ColumnRootFieldPermissions; diff --git a/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsForm/components/RowPermissions.tsx b/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsForm/components/RowPermissions.tsx index f0aad14a01869..26a33a8c1d5f8 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsForm/components/RowPermissions.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsForm/components/RowPermissions.tsx @@ -284,35 +284,36 @@ const getStatus = (rowPermissions: string) => { return 'With custom checks'; }; -export const RowPermissionsSectionWrapper: React.FC = - ({ children, queryType, roleName, defaultOpen }) => { - const { watch } = useFormContext(); - - const rowPermissions = watch('rowPermissions'); - const status = React.useMemo( - () => getStatus(rowPermissions), - [rowPermissions] - ); - - return ( - - -
-

- Allow role {roleName} to {queryType}  - rows: -

-
- {children} -
-
- ); - }; +export const RowPermissionsSectionWrapper: React.FC< + RowPermissionsWrapperProps +> = ({ children, queryType, roleName, defaultOpen }) => { + const { watch } = useFormContext(); + + const rowPermissions = watch('rowPermissions'); + const status = React.useMemo( + () => getStatus(rowPermissions), + [rowPermissions] + ); + + return ( + + +
+

+ Allow role {roleName} to {queryType}  + rows: +

+
+ {children} +
+
+ ); +}; export default RowPermissionsSection; diff --git a/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsForm/components/RowPermissionsBuilder/RowPermissionBuilder.stories.tsx b/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsForm/components/RowPermissionsBuilder/RowPermissionBuilder.stories.tsx index e1e7170a34009..ab26e7e3cc7bf 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsForm/components/RowPermissionsBuilder/RowPermissionBuilder.stories.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsForm/components/RowPermissionsBuilder/RowPermissionBuilder.stories.tsx @@ -43,8 +43,9 @@ Primary.decorators = [ }, ]; -export const WithDefaults: ComponentStory = - args => ; +export const WithDefaults: ComponentStory< + typeof RowPermissionBuilder +> = args => ; WithDefaults.args = { tableName: 'Album', nesting: ['filter'], @@ -72,8 +73,9 @@ WithDefaults.decorators = [ }, ]; -export const WithDefaultsBool: ComponentStory = - args => ; +export const WithDefaultsBool: ComponentStory< + typeof RowPermissionBuilder +> = args => ; WithDefaultsBool.args = { tableName: 'user', diff --git a/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsForm/components/RowPermissionsBuilder/components/Builder.tsx b/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsForm/components/RowPermissionsBuilder/components/Builder.tsx index 4e451d815b1ac..8f6f4bc9040c9 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsForm/components/RowPermissionsBuilder/components/Builder.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsForm/components/RowPermissionsBuilder/components/Builder.tsx @@ -151,25 +151,26 @@ export const Builder = (props: Props) => { return []; }, [tableName, dropDownState, schema, tableConfig]); - const handleDropdownChange: React.ChangeEventHandler = - e => { - const value = e.target.value; - - // as the form is populated a json object is built up - // when the dropdown changes at a specific level - // everything below that level needs to be removed - // set value undefined is necessary to remove field arrays - if (dropDownState?.name === '_and' || dropDownState?.name === '_or') { - setValue(permissionsKey, undefined); - } - // when the dropdown changes both the permissions object - // and operators object need to be unregistered below this level - unregister(permissionsKey); - unregister(operatorsKey); - - const newValue = getNewValues({ value, data }); - return setValue(operatorsKey, newValue); - }; + const handleDropdownChange: React.ChangeEventHandler< + HTMLSelectElement + > = e => { + const value = e.target.value; + + // as the form is populated a json object is built up + // when the dropdown changes at a specific level + // everything below that level needs to be removed + // set value undefined is necessary to remove field arrays + if (dropDownState?.name === '_and' || dropDownState?.name === '_or') { + setValue(permissionsKey, undefined); + } + // when the dropdown changes both the permissions object + // and operators object need to be unregistered below this level + unregister(permissionsKey); + unregister(operatorsKey); + + const newValue = getNewValues({ value, data }); + return setValue(operatorsKey, newValue); + }; const handleColumnChange: React.ChangeEventHandler = e => { const target = e.target.value; diff --git a/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsForm/hooks/submitHooks/useBulkDelete.tsx b/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsForm/hooks/submitHooks/useBulkDelete.tsx index d979b0bfd63b0..37cf55dd4a93f 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsForm/hooks/submitHooks/useBulkDelete.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsForm/hooks/submitHooks/useBulkDelete.tsx @@ -66,7 +66,7 @@ const isPermission = (props: { key: string; value: any; }): props is { - key: typeof metadataPermissionKeys[number]; + key: (typeof metadataPermissionKeys)[number]; value: Permission[]; } => props.key in keyToPermission; diff --git a/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsTable/PermissionsTable.tsx b/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsTable/PermissionsTable.tsx index 80da088e0eef4..364a8e2bf469b 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsTable/PermissionsTable.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsTable/PermissionsTable.tsx @@ -8,7 +8,7 @@ import { EditableCell, InputCell } from './components/Cells'; import { TableMachine } from './hooks'; const queryType = ['insert', 'select', 'update', 'delete'] as const; -type QueryType = typeof queryType[number]; +type QueryType = (typeof queryType)[number]; interface ViewPermissionsNoteProps { viewsSupported: boolean; diff --git a/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsTable/hooks/usePermissions.tsx b/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsTable/hooks/usePermissions.tsx index 015f5e8828bb5..c44709d8d7d83 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsTable/hooks/usePermissions.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/features/Permissions/PermissionsTable/hooks/usePermissions.tsx @@ -116,7 +116,7 @@ const isPermission = (props: { key: string; value: any; }): props is { - key: typeof metadataPermissionKeys[number]; + key: (typeof metadataPermissionKeys)[number]; value: any[]; // value: Permission[]; } => props.key in keyToPermission; diff --git a/frontend/libs/console/legacy-ce/src/lib/features/Permissions/utils/index.ts b/frontend/libs/console/legacy-ce/src/lib/features/Permissions/utils/index.ts index 8038733d5dd0b..4570ae0edda41 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/Permissions/utils/index.ts +++ b/frontend/libs/console/legacy-ce/src/lib/features/Permissions/utils/index.ts @@ -25,6 +25,6 @@ export const isPermission = (props: { key: string; value: any; }): props is { - key: typeof metadataPermissionKeys[number]; + key: (typeof metadataPermissionKeys)[number]; value: Permission[]; } => props.key in keyToPermission; diff --git a/frontend/libs/console/legacy-ce/src/lib/features/QueryCollections/components/QueryCollectionHeader/QueryCollectionHeader.tsx b/frontend/libs/console/legacy-ce/src/lib/features/QueryCollections/components/QueryCollectionHeader/QueryCollectionHeader.tsx index d71c580deb63a..9c49a5d383040 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/QueryCollections/components/QueryCollectionHeader/QueryCollectionHeader.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/features/QueryCollections/components/QueryCollectionHeader/QueryCollectionHeader.tsx @@ -13,57 +13,58 @@ interface QueryCollectionHeaderProps { onDelete: (name: string) => void; onRename: (name: string, newName: string) => void; } -export const QueryCollectionHeader: React.FC = - props => { - const { queryCollection, onDelete, onRename } = props; +export const QueryCollectionHeader: React.FC< + QueryCollectionHeaderProps +> = props => { + const { queryCollection, onDelete, onRename } = props; - const [isRenameModalOpen, setIsRenameModalOpen] = useState(false); + const [isRenameModalOpen, setIsRenameModalOpen] = useState(false); - const [isAddModalOpen, setIsAddModalOpen] = useState(false); + const [isAddModalOpen, setIsAddModalOpen] = useState(false); - return ( - <> - {isRenameModalOpen && ( - { - setIsRenameModalOpen(false); - }} + return ( + <> + {isRenameModalOpen && ( + { + setIsRenameModalOpen(false); + }} + onRename={onRename} + /> + )} + {isAddModalOpen && ( + { + setIsAddModalOpen(false); + }} + /> + )} +
+
+

{queryCollection.name}

+

+ Add queries to the collection to create a safe list of operations + which can be run against your GraphQL API. +

+
+
+ - )} - {isAddModalOpen && ( - { - setIsAddModalOpen(false); - }} - /> - )} -
-
-

{queryCollection.name}

-

- Add queries to the collection to create a safe list of operations - which can be run against your GraphQL API. -

-
-
- -
-
- - ); - }; + +
+ + ); +}; diff --git a/frontend/libs/console/legacy-ce/src/lib/features/QueryCollections/components/QueryCollectionHeader/QueryCollectionHeaderMenu.tsx b/frontend/libs/console/legacy-ce/src/lib/features/QueryCollections/components/QueryCollectionHeader/QueryCollectionHeaderMenu.tsx index beed792b6a1ef..0718bb5928cb2 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/QueryCollections/components/QueryCollectionHeader/QueryCollectionHeaderMenu.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/features/QueryCollections/components/QueryCollectionHeader/QueryCollectionHeaderMenu.tsx @@ -19,134 +19,135 @@ interface QueryCollectionHeaderMenuProps { onRename: (name: string, newName: string) => void; setIsRenameModalOpen: (isRenameModalOpen: boolean) => void; } -export const QueryCollectionHeaderMenu: React.FC = - props => { - const { queryCollection, onDelete, setIsRenameModalOpen } = props; +export const QueryCollectionHeaderMenu: React.FC< + QueryCollectionHeaderMenuProps +> = props => { + const { queryCollection, onDelete, setIsRenameModalOpen } = props; - const { deleteQueryCollection, isLoading: deleteLoading } = - useDeleteQueryCollections(); - const { fireNotification } = useFireNotification(); + const { deleteQueryCollection, isLoading: deleteLoading } = + useDeleteQueryCollections(); + const { fireNotification } = useFireNotification(); - const { addToAllowList, isLoading: addLoading } = useAddToAllowList(); - const { removeFromAllowList, isLoading: removeLoding } = - useRemoveFromAllowList(); + const { addToAllowList, isLoading: addLoading } = useAddToAllowList(); + const { removeFromAllowList, isLoading: removeLoding } = + useRemoveFromAllowList(); - const { data: metadata } = useMetadata(); - return queryCollection.name !== 'allowed-queries' ? ( - { + // this is a workaround for a weird but caused by interaction of radix ui dialog and dropdown menu + setTimeout(() => { + setIsRenameModalOpen(true); + }, 0); + }} + > + Edit Collection Name +
, + metadata?.metadata.allowlist?.find( + entry => entry.collection === queryCollection.name + ) ? (
{ - // this is a workaround for a weird but caused by interaction of radix ui dialog and dropdown menu - setTimeout(() => { - setIsRenameModalOpen(true); - }, 0); + removeFromAllowList(queryCollection.name, { + onSuccess: () => { + fireNotification({ + type: 'success', + title: 'Success', + message: `Removed ${queryCollection.name} from allow list`, + }); + }, + onError: () => { + fireNotification({ + type: 'error', + title: 'Error', + message: `Failed to remove ${queryCollection.name} from allow list`, + }); + }, + }); }} > - Edit Collection Name -
, - metadata?.metadata.allowlist?.find( - entry => entry.collection === queryCollection.name - ) ? ( -
{ - removeFromAllowList(queryCollection.name, { - onSuccess: () => { - fireNotification({ - type: 'success', - title: 'Success', - message: `Removed ${queryCollection.name} from allow list`, - }); - }, - onError: () => { - fireNotification({ - type: 'error', - title: 'Error', - message: `Failed to remove ${queryCollection.name} from allow list`, - }); - }, - }); - }} - > - Remove from Allow List -
- ) : ( -
{ - addToAllowList(queryCollection.name, { - onSuccess: () => { - fireNotification({ - type: 'success', - title: 'Success', - message: `Added ${queryCollection.name} to allow list`, - }); - }, - onError: () => { - fireNotification({ - type: 'error', - title: 'Error', - message: `Failed to add ${queryCollection.name} to allow list`, - }); - }, - }); - }} - > - Add to Allow List -
- ), - ], - [ + Remove from Allow List +
+ ) : (
{ - const confirmMessage = `This will permanently delete the query collection "${queryCollection.name}"`; - const isOk = getConfirmation( - confirmMessage, - true, - queryCollection.name - ); - if (isOk) { - deleteQueryCollection(queryCollection.name, { - onSuccess: () => { - fireNotification({ - type: 'success', - title: 'Collection deleted', - message: `Query collection "${queryCollection.name}" deleted successfully`, - }); - onDelete(queryCollection.name); - }, - onError: () => { - fireNotification({ - type: 'error', - title: 'Error deleting collection', - message: `Error deleting query collection "${queryCollection.name}"`, - }); - }, - }); - } + addToAllowList(queryCollection.name, { + onSuccess: () => { + fireNotification({ + type: 'success', + title: 'Success', + message: `Added ${queryCollection.name} to allow list`, + }); + }, + onError: () => { + fireNotification({ + type: 'error', + title: 'Error', + message: `Failed to add ${queryCollection.name} to allow list`, + }); + }, + }); }} > - Delete Collection -
, - ], - ]} - > - - - ) : ( - { + const confirmMessage = `This will permanently delete the query collection "${queryCollection.name}"`; + const isOk = getConfirmation( + confirmMessage, + true, + queryCollection.name + ); + if (isOk) { + deleteQueryCollection(queryCollection.name, { + onSuccess: () => { + fireNotification({ + type: 'success', + title: 'Collection deleted', + message: `Query collection "${queryCollection.name}" deleted successfully`, + }); + onDelete(queryCollection.name); + }, + onError: () => { + fireNotification({ + type: 'error', + title: 'Error deleting collection', + message: `Error deleting query collection "${queryCollection.name}"`, + }); + }, + }); + } + }} + > + Delete Collection +
, + ], + ]} + > + + + ) : ( + - - - ); - }; + > + + + ); +}; diff --git a/frontend/libs/console/legacy-ce/src/lib/features/QueryCollections/components/QueryCollectionHeader/QueryCollectionRenameDialog.tsx b/frontend/libs/console/legacy-ce/src/lib/features/QueryCollections/components/QueryCollectionHeader/QueryCollectionRenameDialog.tsx index de2a9d49b5678..7d8e1a88992f4 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/QueryCollections/components/QueryCollectionHeader/QueryCollectionRenameDialog.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/features/QueryCollections/components/QueryCollectionHeader/QueryCollectionRenameDialog.tsx @@ -15,72 +15,70 @@ interface QueryCollectionCreateDialogProps { const schema = z.object({ name: z.string().min(1, 'Name is required'), }); -export const QueryCollectionRenameDialog: React.FC = - props => { - const { onClose, currentName, onRename } = props; - const { renameQueryCollection, isLoading } = useRenameQueryCollection(); - const { fireNotification } = useFireNotification(); +export const QueryCollectionRenameDialog: React.FC< + QueryCollectionCreateDialogProps +> = props => { + const { onClose, currentName, onRename } = props; + const { renameQueryCollection, isLoading } = useRenameQueryCollection(); + const { fireNotification } = useFireNotification(); - const { - methods: { watch, setError, trigger }, - Form, - } = useConsoleForm({ - schema, - }); - const name = watch('name'); + const { + methods: { watch, setError, trigger }, + Form, + } = useConsoleForm({ + schema, + }); + const name = watch('name'); - return ( -
{}}> - - <> - -
- -
-
- { - if (await trigger()) { - // TODO: remove as when proper form types will be available - renameQueryCollection(currentName, name as string, { - onSuccess: () => { - onClose(); - onRename(currentName, name as string); - fireNotification({ - type: 'success', - title: 'Collection renamed', - message: `Collection ${currentName} was renamed to ${name}`, - }); - }, - onError: error => { - setError('name', { - type: 'manual', - message: (error as Error).message, - }); - fireNotification({ - type: 'error', - title: 'Error renaming collection', - message: (error as Error).message, - }); - }, - }); - } - }} - isLoading={isLoading} - /> - -
-
- ); - }; + return ( +
{}}> + + <> + +
+ +
+
+ { + if (await trigger()) { + // TODO: remove as when proper form types will be available + renameQueryCollection(currentName, name as string, { + onSuccess: () => { + onClose(); + onRename(currentName, name as string); + fireNotification({ + type: 'success', + title: 'Collection renamed', + message: `Collection ${currentName} was renamed to ${name}`, + }); + }, + onError: error => { + setError('name', { + type: 'manual', + message: (error as Error).message, + }); + fireNotification({ + type: 'error', + title: 'Error renaming collection', + message: (error as Error).message, + }); + }, + }); + } + }} + isLoading={isLoading} + /> + +
+
+ ); +}; diff --git a/frontend/libs/console/legacy-ce/src/lib/features/QueryCollections/components/QueryCollectionOperationDialog/QueryCollectionOperationDialog.tsx b/frontend/libs/console/legacy-ce/src/lib/features/QueryCollections/components/QueryCollectionOperationDialog/QueryCollectionOperationDialog.tsx index 76b065a7e27e8..5615f9f495a46 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/QueryCollections/components/QueryCollectionOperationDialog/QueryCollectionOperationDialog.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/features/QueryCollections/components/QueryCollectionOperationDialog/QueryCollectionOperationDialog.tsx @@ -85,17 +85,18 @@ export const QueryCollectionOperationDialog = ( }, }); - const handleOnSubmit: SubmitHandler = - async values => { - const data = { ...values }; - if ((values as UploadedQueryPayload).gqlFile) { - const gqlFileValue = (values as UploadedQueryPayload).gqlFile; - (data as UploadedQueryPayload).gqlFile = parseQueryString( - await readFileAsync(gqlFileValue[0]) - ); - } - onSubmit(data); - }; + const handleOnSubmit: SubmitHandler< + QueryCollectionOperation + > = async values => { + const data = { ...values }; + if ((values as UploadedQueryPayload).gqlFile) { + const gqlFileValue = (values as UploadedQueryPayload).gqlFile; + (data as UploadedQueryPayload).gqlFile = parseQueryString( + await readFileAsync(gqlFileValue[0]) + ); + } + onSubmit(data); + }; return (
diff --git a/frontend/libs/console/legacy-ce/src/lib/features/QueryCollections/components/QueryCollectionOperations/QueryCollectionOperations.tsx b/frontend/libs/console/legacy-ce/src/lib/features/QueryCollections/components/QueryCollectionOperations/QueryCollectionOperations.tsx index 269c9a57bdd1c..79afb545fb8a0 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/QueryCollections/components/QueryCollectionOperations/QueryCollectionOperations.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/features/QueryCollections/components/QueryCollectionOperations/QueryCollectionOperations.tsx @@ -27,156 +27,153 @@ interface QueryCollectionsOperationsProps { collectionName: string; } -export const QueryCollectionsOperations: React.FC = - props => { - const { collectionName } = props; - - const { - data: operations, - isLoading, - isError, - } = useOperationsFromQueryCollection(collectionName); - - const { removeOperationsFromQueryCollection, isLoading: deleteLoading } = - useRemoveOperationsFromQueryCollection(); - - const { fireNotification } = useFireNotification(); - - const [search, setSearch] = React.useState(''); - - const [editingOperation, setEditingOperation] = - React.useState(null); - - const [selectedOperations, setSelectedOperations] = React.useState< - QueryCollection[] - >([]); - - if (isLoading) { - return ( -
- -
- ); - } - - if (isError) { - return ( - - Failed to load operations - - ); - } - - if (!operations || operations.length === 0) { - return ; - } - - const filteredOperations = (operations || []).filter(operation => - operation.name?.toLowerCase().includes(search?.toLowerCase()) +export const QueryCollectionsOperations: React.FC< + QueryCollectionsOperationsProps +> = props => { + const { collectionName } = props; + + const { + data: operations, + isLoading, + isError, + } = useOperationsFromQueryCollection(collectionName); + + const { removeOperationsFromQueryCollection, isLoading: deleteLoading } = + useRemoveOperationsFromQueryCollection(); + + const { fireNotification } = useFireNotification(); + + const [search, setSearch] = React.useState(''); + + const [editingOperation, setEditingOperation] = + React.useState(null); + + const [selectedOperations, setSelectedOperations] = React.useState< + QueryCollection[] + >([]); + + if (isLoading) { + return ( +
+ +
); + } - const data = filteredOperations?.map(operation => [ - Failed to load operations + ); + } + + if (!operations || operations.length === 0) { + return ; + } + + const filteredOperations = (operations || []).filter(operation => + operation.name?.toLowerCase().includes(search?.toLowerCase()) + ); + + const data = filteredOperations?.map(operation => [ + { + setSelectedOperations( + selectedOperations.includes(operation) + ? selectedOperations.filter(o => o !== operation) + : [...selectedOperations, operation] + ); + }} + />, + operation.name, + operation.query.toLowerCase().startsWith('mutation') ? 'Mutation' : 'Query', + +
+ + + - - +
, + ]); + + return ( +
+ {editingOperation && ( + { + setEditingOperation(null); + setSelectedOperations([]); }} - className="mr-1.5" - size="sm" - mode="destructive" - isLoading={deleteLoading} - > - Delete - -
, - ]); - - return ( + /> + )} +
- {editingOperation && ( - { - setEditingOperation(null); - setSelectedOperations([]); - }} + {search && filteredOperations.length === 0 ? ( +
No operations found
+ ) : ( + + selectedOperations.includes(operation) + )} + onClick={() => + setSelectedOperations( + selectedOperations.length === 0 ? filteredOperations : [] + ) + } + />, + 'Operation', + 'Type', + '', + ]} + data={data} /> )} - -
- {search && filteredOperations.length === 0 ? ( -
No operations found
- ) : ( - - selectedOperations.includes(operation) - )} - onClick={() => - setSelectedOperations( - selectedOperations.length === 0 ? filteredOperations : [] - ) - } - />, - 'Operation', - 'Type', - '', - ]} - data={data} - /> - )} -
- ); - }; +
+ ); +}; diff --git a/frontend/libs/console/legacy-ce/src/lib/features/QueryCollections/components/QueryCollectionOperations/QueryCollectionOperationsHeader.tsx b/frontend/libs/console/legacy-ce/src/lib/features/QueryCollections/components/QueryCollectionOperations/QueryCollectionOperationsHeader.tsx index 672ab1e1825d8..706dabad15360 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/QueryCollections/components/QueryCollectionOperations/QueryCollectionOperationsHeader.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/features/QueryCollections/components/QueryCollectionOperations/QueryCollectionOperationsHeader.tsx @@ -22,178 +22,179 @@ interface QueryCollectionsOperationsHeaderProps { onSearch: (search: string) => void; } -export const QueryCollectionsOperationsHeader: React.FC = - props => { - const { - collectionName, - selectedOperations, - onSearch, - setSelectedOperations, - } = props; - const { data: queryCollections } = useQueryCollections(); +export const QueryCollectionsOperationsHeader: React.FC< + QueryCollectionsOperationsHeaderProps +> = props => { + const { + collectionName, + selectedOperations, + onSearch, + setSelectedOperations, + } = props; + const { data: queryCollections } = useQueryCollections(); - const { addOperationToQueryCollection, isLoading: addLoading } = - useAddOperationsToQueryCollection(); - const { moveOperationToQueryCollection, isLoading: moveLoading } = - useMoveOperationsToQueryCollection(); - const { removeOperationsFromQueryCollection, isLoading: deleteLoading } = - useRemoveOperationsFromQueryCollection(); + const { addOperationToQueryCollection, isLoading: addLoading } = + useAddOperationsToQueryCollection(); + const { moveOperationToQueryCollection, isLoading: moveLoading } = + useMoveOperationsToQueryCollection(); + const { removeOperationsFromQueryCollection, isLoading: deleteLoading } = + useRemoveOperationsFromQueryCollection(); - const { fireNotification } = useFireNotification(); + const { fireNotification } = useFireNotification(); - const otherCollections = (queryCollections || []).filter( - c => c.name !== collectionName - ); + const otherCollections = (queryCollections || []).filter( + c => c.name !== collectionName + ); - return ( -
-
- {selectedOperations.length > 0 && ( -
- - {selectedOperations.length} Operations: - - {otherCollections?.length > 0 && ( - <> - ( -
- moveOperationToQueryCollection( - collectionName, - collection.name, - selectedOperations, - { - onError: e => { - fireNotification({ - type: 'error', - title: 'Failed to move operations', - message: `Failed to move operations to collection ${collection.name}: ${e.message}`, - }); - }, - onSuccess: () => { - fireNotification({ - type: 'success', - title: 'Operations moved', - message: `Successfully moved ${selectedOperations.length} operations to ${collection.name}`, - }); - setSelectedOperations([]); - }, - } - ) - } - > - {collection.name} -
- )), - ]} + return ( +
+
+ {selectedOperations.length > 0 && ( +
+ + {selectedOperations.length} Operations: + + {otherCollections?.length > 0 && ( + <> + ( +
+ moveOperationToQueryCollection( + collectionName, + collection.name, + selectedOperations, + { + onError: e => { + fireNotification({ + type: 'error', + title: 'Failed to move operations', + message: `Failed to move operations to collection ${collection.name}: ${e.message}`, + }); + }, + onSuccess: () => { + fireNotification({ + type: 'success', + title: 'Operations moved', + message: `Successfully moved ${selectedOperations.length} operations to ${collection.name}`, + }); + setSelectedOperations([]); + }, + } + ) + } + > + {collection.name} +
+ )), + ]} + > + -
- ( -
- addOperationToQueryCollection( - collection.name, - selectedOperations, - { - onError: e => { - fireNotification({ - type: 'error', - title: 'Failed to add operations', - message: `Failed to add operations to collection ${collection.name}: ${e.message}`, - }); - }, - onSuccess: () => { - fireNotification({ - type: 'success', - title: 'Operations added', - message: `Successfully added ${selectedOperations.length} operations to ${collection.name}`, - }); - }, - } - ) - } - > - {collection.name} -
- )), - ]} + Move + +
+ ( +
+ addOperationToQueryCollection( + collection.name, + selectedOperations, + { + onError: e => { + fireNotification({ + type: 'error', + title: 'Failed to add operations', + message: `Failed to add operations to collection ${collection.name}: ${e.message}`, + }); + }, + onSuccess: () => { + fireNotification({ + type: 'success', + title: 'Operations added', + message: `Successfully added ${selectedOperations.length} operations to ${collection.name}`, + }); + }, + } + ) + } + > + {collection.name} +
+ )), + ]} + > + -
- - )} - -
- )} -
-
- { - onSearch(searchString); - setSelectedOperations([]); - }} - /> -
+ Copy + + + + )} + +
+ )} +
+
+ { + onSearch(searchString); + setSelectedOperations([]); + }} + />
- ); - }; +
+ ); +}; diff --git a/frontend/libs/console/legacy-ce/src/lib/features/QueryCollections/components/QueryCollectionOperations/QueryCollectionOperationsSearchForm.tsx b/frontend/libs/console/legacy-ce/src/lib/features/QueryCollections/components/QueryCollectionOperations/QueryCollectionOperationsSearchForm.tsx index 5971cadf3e532..ef881dfef656d 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/QueryCollections/components/QueryCollectionOperations/QueryCollectionOperationsSearchForm.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/features/QueryCollections/components/QueryCollectionOperations/QueryCollectionOperationsSearchForm.tsx @@ -30,15 +30,16 @@ const SearchInput: React.FC = ({ ); }; -export const QueryCollectionsOperationsSearchForm: React.FC = - ({ setSearch }) => { - return ( - {}} - className="pr-0 pt-0 pb-0 relative top-2" - > - - - ); - }; +export const QueryCollectionsOperationsSearchForm: React.FC< + QueryCollectionsOperationsSearchFormProps +> = ({ setSearch }) => { + return ( + {}} + className="pr-0 pt-0 pb-0 relative top-2" + > + + + ); +}; diff --git a/frontend/libs/console/legacy-ce/src/lib/features/RemoteRelationships/RemoteSchemaRelationships/components/RemoteSchemaToDB/RemoteSchemaToDBForm.stories.tsx b/frontend/libs/console/legacy-ce/src/lib/features/RemoteRelationships/RemoteSchemaRelationships/components/RemoteSchemaToDB/RemoteSchemaToDBForm.stories.tsx index 0e8050d328d57..dc772cef8483e 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/RemoteRelationships/RemoteSchemaRelationships/components/RemoteSchemaToDB/RemoteSchemaToDBForm.stories.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/features/RemoteRelationships/RemoteSchemaRelationships/components/RemoteSchemaToDB/RemoteSchemaToDBForm.stories.tsx @@ -72,8 +72,9 @@ PrimaryWithTest.play = async ({ canvasElement }) => { userEvent.click(submitButton); }; -export const WithExistingRelationship: Story = - args => ; +export const WithExistingRelationship: Story< + RemoteSchemaToDbFormProps +> = args => ; WithExistingRelationship.args = { ...Primary.args, sourceRemoteSchema: 'with_default_values', diff --git a/frontend/libs/console/legacy-ce/src/lib/features/RemoteRelationships/RemoteSchemaRelationships/components/RemoteSchemaToRemoteSchemaForm/RemoteSchemaToRemoteSchemaForm.stories.tsx b/frontend/libs/console/legacy-ce/src/lib/features/RemoteRelationships/RemoteSchemaRelationships/components/RemoteSchemaToRemoteSchemaForm/RemoteSchemaToRemoteSchemaForm.stories.tsx index 8c307168b8b99..f48bd11eb9acf 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/RemoteRelationships/RemoteSchemaRelationships/components/RemoteSchemaToRemoteSchemaForm/RemoteSchemaToRemoteSchemaForm.stories.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/features/RemoteRelationships/RemoteSchemaRelationships/components/RemoteSchemaToRemoteSchemaForm/RemoteSchemaToRemoteSchemaForm.stories.tsx @@ -31,8 +31,9 @@ Primary.args = { closeHandler: () => {}, }; -export const PrimaryWithTest: Story = - args => ; +export const PrimaryWithTest: Story< + RemoteSchemaToRemoteSchemaFormProps +> = args => ; PrimaryWithTest.args = Primary.args; @@ -71,8 +72,9 @@ PrimaryWithTest.play = async ({ canvasElement }) => { userEvent.click(submitButton); }; -export const WithExistingRelationship: Story = - args => ; +export const WithExistingRelationship: Story< + RemoteSchemaToRemoteSchemaFormProps +> = args => ; WithExistingRelationship.args = { ...Primary.args, sourceRemoteSchema: 'with_default_values', diff --git a/frontend/libs/console/legacy-ce/src/lib/features/RemoteRelationships/RemoteSchemaRelationships/components/RemoteSchemaTree/index.css b/frontend/libs/console/legacy-ce/src/lib/features/RemoteRelationships/RemoteSchemaRelationships/components/RemoteSchemaTree/index.css index 2d87c53841f08..cef2da262a90c 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/RemoteRelationships/RemoteSchemaRelationships/components/RemoteSchemaTree/index.css +++ b/frontend/libs/console/legacy-ce/src/lib/features/RemoteRelationships/RemoteSchemaRelationships/components/RemoteSchemaTree/index.css @@ -3,545 +3,562 @@ /* stylelint-disable */ /* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ @-webkit-keyframes antCheckboxEffect { - 0% { - transform: scale(1); - opacity: 0.5; - } - 100% { - transform: scale(1.6); - opacity: 0; - } + 0% { + transform: scale(1); + opacity: 0.5; } - @keyframes antCheckboxEffect { - 0% { - transform: scale(1); - opacity: 0.5; - } - 100% { - transform: scale(1.6); - opacity: 0; - } - } - @-webkit-keyframes ant-tree-node-fx-do-not-use { - 0% { - opacity: 0; - } - 100% { - opacity: 1; - } - } - @keyframes ant-tree-node-fx-do-not-use { - 0% { - opacity: 0; - } - 100% { - opacity: 1; - } - } - .ant-tree.ant-tree-directory .ant-tree-treenode { - position: relative; - } - .ant-tree.ant-tree-directory .ant-tree-treenode::before { - position: absolute; - top: 0; - right: 0; - bottom: 4px; - left: 0; - transition: background-color 0.3s; - content: ''; - pointer-events: none; - } - .ant-tree.ant-tree-directory .ant-tree-treenode:hover::before { - background: #f5f5f5; - } - .ant-tree.ant-tree-directory .ant-tree-treenode > * { - z-index: 1; - } - .ant-tree.ant-tree-directory .ant-tree-treenode .ant-tree-switcher { - transition: color 0.3s; - } - .ant-tree.ant-tree-directory .ant-tree-treenode .ant-tree-node-content-wrapper { - border-radius: 0; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - } - .ant-tree.ant-tree-directory .ant-tree-treenode .ant-tree-node-content-wrapper:hover { - background: transparent; - } - .ant-tree.ant-tree-directory .ant-tree-treenode .ant-tree-node-content-wrapper.ant-tree-node-selected { - color: #fff; - background: transparent; - } - .ant-tree.ant-tree-directory .ant-tree-treenode-selected:hover::before, - .ant-tree.ant-tree-directory .ant-tree-treenode-selected::before { - background: #1890ff; - } - .ant-tree.ant-tree-directory .ant-tree-treenode-selected .ant-tree-switcher { - color: #fff; - } - .ant-tree.ant-tree-directory .ant-tree-treenode-selected .ant-tree-node-content-wrapper { - color: #fff; - background: transparent; - } - .ant-tree-checkbox { - box-sizing: border-box; - margin: 0; - padding: 0; - color: rgba(0, 0, 0, 0.85); - font-size: 14px; - font-variant: tabular-nums; - line-height: 1.5715; - list-style: none; - font-feature-settings: 'tnum'; - position: relative; - top: 0.2em; - line-height: 1; - white-space: nowrap; - outline: none; - cursor: pointer; - } - .ant-tree-checkbox-wrapper:hover .ant-tree-checkbox-inner, - .ant-tree-checkbox:hover .ant-tree-checkbox-inner, - .ant-tree-checkbox-input:focus + .ant-tree-checkbox-inner { - border-color: #1890ff; - } - .ant-tree-checkbox-checked::after { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - border: 1px solid #1890ff; - border-radius: 2px; - visibility: hidden; - -webkit-animation: antCheckboxEffect 0.36s ease-in-out; - animation: antCheckboxEffect 0.36s ease-in-out; - -webkit-animation-fill-mode: backwards; - animation-fill-mode: backwards; - content: ''; - } - .ant-tree-checkbox:hover::after, - .ant-tree-checkbox-wrapper:hover .ant-tree-checkbox::after { - visibility: visible; + 100% { + transform: scale(1.6); + opacity: 0; } - .ant-tree-checkbox-inner { - position: relative; - top: 0; - left: 0; - display: block; - width: 16px; - height: 16px; - direction: ltr; - background-color: #fff; - border: 1px solid #d9d9d9; - border-radius: 2px; - border-collapse: separate; - transition: all 0.3s; +} +@keyframes antCheckboxEffect { + 0% { + transform: scale(1); + opacity: 0.5; } - .ant-tree-checkbox-inner::after { - position: absolute; - top: 50%; - left: 21.5%; - display: table; - width: 5.71428571px; - height: 9.14285714px; - border: 2px solid #fff; - border-top: 0; - border-left: 0; - transform: rotate(45deg) scale(0) translate(-50%, -50%); + 100% { + transform: scale(1.6); opacity: 0; - transition: all 0.1s cubic-bezier(0.71, -0.46, 0.88, 0.6), opacity 0.1s; - content: ' '; } - .ant-tree-checkbox-input { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 1; - width: 100%; - height: 100%; - cursor: pointer; +} +@-webkit-keyframes ant-tree-node-fx-do-not-use { + 0% { opacity: 0; } - .ant-tree-checkbox-checked .ant-tree-checkbox-inner::after { - position: absolute; - display: table; - border: 2px solid #fff; - border-top: 0; - border-left: 0; - transform: rotate(45deg) scale(1) translate(-50%, -50%); - opacity: 1; - transition: all 0.2s cubic-bezier(0.12, 0.4, 0.29, 1.46) 0.1s; - content: ' '; - } - .ant-tree-checkbox-checked .ant-tree-checkbox-inner { - background-color: #1890ff; - border-color: #1890ff; - } - .ant-tree-checkbox-disabled { - cursor: not-allowed; - } - .ant-tree-checkbox-disabled.ant-tree-checkbox-checked .ant-tree-checkbox-inner::after { - border-color: rgba(0, 0, 0, 0.25); - -webkit-animation-name: none; - animation-name: none; - } - .ant-tree-checkbox-disabled .ant-tree-checkbox-input { - cursor: not-allowed; - pointer-events: none; - } - .ant-tree-checkbox-disabled .ant-tree-checkbox-inner { - background-color: #f5f5f5; - border-color: #d9d9d9 !important; - } - .ant-tree-checkbox-disabled .ant-tree-checkbox-inner::after { - border-color: #f5f5f5; - border-collapse: separate; - -webkit-animation-name: none; - animation-name: none; - } - .ant-tree-checkbox-disabled + span { - color: rgba(0, 0, 0, 0.25); - cursor: not-allowed; - } - .ant-tree-checkbox-disabled:hover::after, - .ant-tree-checkbox-wrapper:hover .ant-tree-checkbox-disabled::after { - visibility: hidden; - } - .ant-tree-checkbox-wrapper { - box-sizing: border-box; - margin: 0; - padding: 0; - color: rgba(0, 0, 0, 0.85); - font-size: 14px; - font-variant: tabular-nums; - line-height: 1.5715; - list-style: none; - font-feature-settings: 'tnum'; - display: inline-flex; - align-items: baseline; - line-height: unset; - cursor: pointer; - } - .ant-tree-checkbox-wrapper::after { - display: inline-block; - width: 0; - overflow: hidden; - content: '\a0'; - } - .ant-tree-checkbox-wrapper.ant-tree-checkbox-wrapper-disabled { - cursor: not-allowed; - } - .ant-tree-checkbox-wrapper + .ant-tree-checkbox-wrapper { - margin-left: 8px; - } - .ant-tree-checkbox + span { - padding-right: 8px; - padding-left: 8px; - } - .ant-tree-checkbox-group { - box-sizing: border-box; - margin: 0; - padding: 0; - color: rgba(0, 0, 0, 0.85); - font-size: 14px; - font-variant: tabular-nums; - line-height: 1.5715; - list-style: none; - font-feature-settings: 'tnum'; - display: inline-block; - } - .ant-tree-checkbox-group-item { - margin-right: 8px; - } - .ant-tree-checkbox-group-item:last-child { - margin-right: 0; - } - .ant-tree-checkbox-group-item + .ant-tree-checkbox-group-item { - margin-left: 0; - } - .ant-tree-checkbox-indeterminate .ant-tree-checkbox-inner { - background-color: #fff; - border-color: #d9d9d9; - } - .ant-tree-checkbox-indeterminate .ant-tree-checkbox-inner::after { - top: 50%; - left: 50%; - width: 8px; - height: 8px; - background-color: #1890ff; - border: 0; - transform: translate(-50%, -50%) scale(1); + 100% { opacity: 1; - content: ' '; - } - .ant-tree-checkbox-indeterminate.ant-tree-checkbox-disabled .ant-tree-checkbox-inner::after { - background-color: rgba(0, 0, 0, 0.25); - border-color: rgba(0, 0, 0, 0.25); - } - .ant-tree { - box-sizing: border-box; - margin: 0; - padding: 0; - color: rgba(0, 0, 0, 0.85); - font-size: 14px; - font-variant: tabular-nums; - line-height: 1.5715; - list-style: none; - font-feature-settings: 'tnum'; - background: #fff; - border-radius: 2px; - transition: background-color 0.3s; - } - .ant-tree-focused:not(:hover):not(.ant-tree-active-focused) { - background: #e6f7ff; - } - .ant-tree-list-holder-inner { - align-items: flex-start; - } - .ant-tree.ant-tree-block-node .ant-tree-list-holder-inner { - align-items: stretch; - } - .ant-tree.ant-tree-block-node .ant-tree-list-holder-inner .ant-tree-node-content-wrapper { - flex: auto; - } - .ant-tree.ant-tree-block-node .ant-tree-list-holder-inner .ant-tree-treenode.dragging { - position: relative; } - .ant-tree.ant-tree-block-node .ant-tree-list-holder-inner .ant-tree-treenode.dragging::after { - position: absolute; - top: 0; - right: 0; - bottom: 4px; - left: 0; - border: 1px solid #1890ff; +} +@keyframes ant-tree-node-fx-do-not-use { + 0% { opacity: 0; - -webkit-animation: ant-tree-node-fx-do-not-use 0.3s; - animation: ant-tree-node-fx-do-not-use 0.3s; - -webkit-animation-play-state: running; - animation-play-state: running; - -webkit-animation-fill-mode: forwards; - animation-fill-mode: forwards; - content: ''; - pointer-events: none; } - .ant-tree .ant-tree-treenode { - display: flex; - align-items: flex-start; - padding: 0 0 4px 0; - outline: none; - } - .ant-tree .ant-tree-treenode-disabled .ant-tree-node-content-wrapper { - color: rgba(0, 0, 0, 0.25); - cursor: not-allowed; - } - .ant-tree .ant-tree-treenode-disabled .ant-tree-node-content-wrapper:hover { - background: transparent; - } - .ant-tree .ant-tree-treenode-active .ant-tree-node-content-wrapper { - background: #f5f5f5; - } - .ant-tree .ant-tree-treenode:not(.ant-tree .ant-tree-treenode-disabled).filter-node .ant-tree-title { - color: inherit; - font-weight: 500; - } - .ant-tree-indent { - align-self: stretch; - white-space: nowrap; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - } - .ant-tree-indent-unit { - display: inline-block; - width: 24px; - } - .ant-tree-draggable-icon { - width: 24px; - line-height: 24px; - text-align: center; - opacity: 0.2; - transition: opacity 0.3s; - } - .ant-tree-treenode:hover .ant-tree-draggable-icon { - opacity: 0.45; - } - .ant-tree-switcher { - position: relative; - flex: none; - align-self: stretch; - width: 24px; - margin: 0; - line-height: 24px; - text-align: center; - cursor: pointer; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - } - .ant-tree-switcher .ant-tree-switcher-icon, - .ant-tree-switcher .ant-select-tree-switcher-icon { - display: inline-block; - font-size: 10px; - vertical-align: baseline; - } - .ant-tree-switcher .ant-tree-switcher-icon svg, - .ant-tree-switcher .ant-select-tree-switcher-icon svg { - transition: transform 0.3s; - } - .ant-tree-switcher-noop { - cursor: default; - } - .ant-tree-switcher_close .ant-tree-switcher-icon svg { - transform: rotate(-90deg); - } - .ant-tree-switcher-loading-icon { - color: #1890ff; - } - .ant-tree-switcher-leaf-line { - position: relative; - z-index: 1; - display: inline-block; - width: 100%; - height: 100%; - } - .ant-tree-switcher-leaf-line::before { - position: absolute; - top: 0; - right: 12px; - bottom: -4px; - margin-left: -1px; - border-right: 1px solid #d9d9d9; - content: ' '; - } - .ant-tree-switcher-leaf-line::after { - position: absolute; - width: 10px; - height: 14px; - border-bottom: 1px solid #d9d9d9; - content: ' '; - } - .ant-tree-checkbox { - top: initial; - margin: 4px 8px 0 0; - } - .ant-tree .ant-tree-node-content-wrapper { - position: relative; - z-index: auto; - min-height: 24px; - margin: 0; - padding: 0 4px; - color: inherit; - line-height: 24px; - background: transparent; - border-radius: 2px; - cursor: pointer; - transition: all 0.3s, border 0s, line-height 0s, box-shadow 0s; - } - .ant-tree .ant-tree-node-content-wrapper:hover { - background-color: #f5f5f5; - } - .ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected { - background-color: #bae7ff; - } - .ant-tree .ant-tree-node-content-wrapper .ant-tree-iconEle { - display: inline-block; - width: 24px; - height: 24px; - line-height: 24px; - text-align: center; - vertical-align: top; - } - .ant-tree .ant-tree-node-content-wrapper .ant-tree-iconEle:empty { - display: none; - } - .ant-tree-unselectable .ant-tree-node-content-wrapper:hover { - background-color: transparent; + 100% { + opacity: 1; } +} +.ant-tree.ant-tree-directory .ant-tree-treenode { + position: relative; +} +.ant-tree.ant-tree-directory .ant-tree-treenode::before { + position: absolute; + top: 0; + right: 0; + bottom: 4px; + left: 0; + transition: background-color 0.3s; + content: ''; + pointer-events: none; +} +.ant-tree.ant-tree-directory .ant-tree-treenode:hover::before { + background: #f5f5f5; +} +.ant-tree.ant-tree-directory .ant-tree-treenode > * { + z-index: 1; +} +.ant-tree.ant-tree-directory .ant-tree-treenode .ant-tree-switcher { + transition: color 0.3s; +} +.ant-tree.ant-tree-directory .ant-tree-treenode .ant-tree-node-content-wrapper { + border-radius: 0; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.ant-tree.ant-tree-directory + .ant-tree-treenode + .ant-tree-node-content-wrapper:hover { + background: transparent; +} +.ant-tree.ant-tree-directory + .ant-tree-treenode + .ant-tree-node-content-wrapper.ant-tree-node-selected { + color: #fff; + background: transparent; +} +.ant-tree.ant-tree-directory .ant-tree-treenode-selected:hover::before, +.ant-tree.ant-tree-directory .ant-tree-treenode-selected::before { + background: #1890ff; +} +.ant-tree.ant-tree-directory .ant-tree-treenode-selected .ant-tree-switcher { + color: #fff; +} +.ant-tree.ant-tree-directory + .ant-tree-treenode-selected .ant-tree-node-content-wrapper { - line-height: 24px; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - } - .ant-tree-node-content-wrapper .ant-tree-drop-indicator { - position: absolute; - z-index: 1; - height: 2px; - background-color: #1890ff; - border-radius: 1px; - pointer-events: none; - } - .ant-tree-node-content-wrapper .ant-tree-drop-indicator::after { - position: absolute; - top: -3px; - left: -6px; - width: 8px; - height: 8px; - background-color: transparent; - border: 2px solid #1890ff; - border-radius: 50%; - content: ''; - } - .ant-tree .ant-tree-treenode.drop-container > [draggable] { - box-shadow: 0 0 0 2px #1890ff; - } - .ant-tree-show-line .ant-tree-indent-unit { - position: relative; - height: 100%; - } - .ant-tree-show-line .ant-tree-indent-unit::before { - position: absolute; - top: 0; - right: 12px; - bottom: -4px; - border-right: 1px solid #d9d9d9; - content: ''; - } - .ant-tree-show-line .ant-tree-indent-unit-end::before { - display: none; - } - .ant-tree-show-line .ant-tree-switcher { - background: #fff; - } - .ant-tree-show-line .ant-tree-switcher-line-icon { - vertical-align: -0.15em; - } - .ant-tree .ant-tree-treenode-leaf-last .ant-tree-switcher-leaf-line::before { - top: auto !important; - bottom: auto !important; - height: 14px !important; - } - .ant-tree-rtl { - direction: rtl; - } - .ant-tree-rtl .ant-tree-node-content-wrapper[draggable='true'] .ant-tree-drop-indicator::after { - right: -6px; - left: unset; - } - .ant-tree .ant-tree-treenode-rtl { - direction: rtl; - } - .ant-tree-rtl .ant-tree-switcher_close .ant-tree-switcher-icon svg { - transform: rotate(90deg); - } - .ant-tree-rtl.ant-tree-show-line .ant-tree-indent-unit::before { - right: auto; - left: -13px; - border-right: none; - border-left: 1px solid #d9d9d9; - } - .ant-tree-rtl.ant-tree-checkbox { - margin: 4px 0 0 8px; - } - .ant-tree-select-dropdown-rtl .ant-select-tree-checkbox { - margin: 4px 0 0 8px; - } - \ No newline at end of file + color: #fff; + background: transparent; +} +.ant-tree-checkbox { + box-sizing: border-box; + margin: 0; + padding: 0; + color: rgba(0, 0, 0, 0.85); + font-size: 14px; + font-variant: tabular-nums; + line-height: 1.5715; + list-style: none; + font-feature-settings: 'tnum'; + position: relative; + top: 0.2em; + line-height: 1; + white-space: nowrap; + outline: none; + cursor: pointer; +} +.ant-tree-checkbox-wrapper:hover .ant-tree-checkbox-inner, +.ant-tree-checkbox:hover .ant-tree-checkbox-inner, +.ant-tree-checkbox-input:focus + .ant-tree-checkbox-inner { + border-color: #1890ff; +} +.ant-tree-checkbox-checked::after { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + border: 1px solid #1890ff; + border-radius: 2px; + visibility: hidden; + -webkit-animation: antCheckboxEffect 0.36s ease-in-out; + animation: antCheckboxEffect 0.36s ease-in-out; + -webkit-animation-fill-mode: backwards; + animation-fill-mode: backwards; + content: ''; +} +.ant-tree-checkbox:hover::after, +.ant-tree-checkbox-wrapper:hover .ant-tree-checkbox::after { + visibility: visible; +} +.ant-tree-checkbox-inner { + position: relative; + top: 0; + left: 0; + display: block; + width: 16px; + height: 16px; + direction: ltr; + background-color: #fff; + border: 1px solid #d9d9d9; + border-radius: 2px; + border-collapse: separate; + transition: all 0.3s; +} +.ant-tree-checkbox-inner::after { + position: absolute; + top: 50%; + left: 21.5%; + display: table; + width: 5.71428571px; + height: 9.14285714px; + border: 2px solid #fff; + border-top: 0; + border-left: 0; + transform: rotate(45deg) scale(0) translate(-50%, -50%); + opacity: 0; + transition: all 0.1s cubic-bezier(0.71, -0.46, 0.88, 0.6), opacity 0.1s; + content: ' '; +} +.ant-tree-checkbox-input { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1; + width: 100%; + height: 100%; + cursor: pointer; + opacity: 0; +} +.ant-tree-checkbox-checked .ant-tree-checkbox-inner::after { + position: absolute; + display: table; + border: 2px solid #fff; + border-top: 0; + border-left: 0; + transform: rotate(45deg) scale(1) translate(-50%, -50%); + opacity: 1; + transition: all 0.2s cubic-bezier(0.12, 0.4, 0.29, 1.46) 0.1s; + content: ' '; +} +.ant-tree-checkbox-checked .ant-tree-checkbox-inner { + background-color: #1890ff; + border-color: #1890ff; +} +.ant-tree-checkbox-disabled { + cursor: not-allowed; +} +.ant-tree-checkbox-disabled.ant-tree-checkbox-checked + .ant-tree-checkbox-inner::after { + border-color: rgba(0, 0, 0, 0.25); + -webkit-animation-name: none; + animation-name: none; +} +.ant-tree-checkbox-disabled .ant-tree-checkbox-input { + cursor: not-allowed; + pointer-events: none; +} +.ant-tree-checkbox-disabled .ant-tree-checkbox-inner { + background-color: #f5f5f5; + border-color: #d9d9d9 !important; +} +.ant-tree-checkbox-disabled .ant-tree-checkbox-inner::after { + border-color: #f5f5f5; + border-collapse: separate; + -webkit-animation-name: none; + animation-name: none; +} +.ant-tree-checkbox-disabled + span { + color: rgba(0, 0, 0, 0.25); + cursor: not-allowed; +} +.ant-tree-checkbox-disabled:hover::after, +.ant-tree-checkbox-wrapper:hover .ant-tree-checkbox-disabled::after { + visibility: hidden; +} +.ant-tree-checkbox-wrapper { + box-sizing: border-box; + margin: 0; + padding: 0; + color: rgba(0, 0, 0, 0.85); + font-size: 14px; + font-variant: tabular-nums; + line-height: 1.5715; + list-style: none; + font-feature-settings: 'tnum'; + display: inline-flex; + align-items: baseline; + line-height: unset; + cursor: pointer; +} +.ant-tree-checkbox-wrapper::after { + display: inline-block; + width: 0; + overflow: hidden; + content: '\a0'; +} +.ant-tree-checkbox-wrapper.ant-tree-checkbox-wrapper-disabled { + cursor: not-allowed; +} +.ant-tree-checkbox-wrapper + .ant-tree-checkbox-wrapper { + margin-left: 8px; +} +.ant-tree-checkbox + span { + padding-right: 8px; + padding-left: 8px; +} +.ant-tree-checkbox-group { + box-sizing: border-box; + margin: 0; + padding: 0; + color: rgba(0, 0, 0, 0.85); + font-size: 14px; + font-variant: tabular-nums; + line-height: 1.5715; + list-style: none; + font-feature-settings: 'tnum'; + display: inline-block; +} +.ant-tree-checkbox-group-item { + margin-right: 8px; +} +.ant-tree-checkbox-group-item:last-child { + margin-right: 0; +} +.ant-tree-checkbox-group-item + .ant-tree-checkbox-group-item { + margin-left: 0; +} +.ant-tree-checkbox-indeterminate .ant-tree-checkbox-inner { + background-color: #fff; + border-color: #d9d9d9; +} +.ant-tree-checkbox-indeterminate .ant-tree-checkbox-inner::after { + top: 50%; + left: 50%; + width: 8px; + height: 8px; + background-color: #1890ff; + border: 0; + transform: translate(-50%, -50%) scale(1); + opacity: 1; + content: ' '; +} +.ant-tree-checkbox-indeterminate.ant-tree-checkbox-disabled + .ant-tree-checkbox-inner::after { + background-color: rgba(0, 0, 0, 0.25); + border-color: rgba(0, 0, 0, 0.25); +} +.ant-tree { + box-sizing: border-box; + margin: 0; + padding: 0; + color: rgba(0, 0, 0, 0.85); + font-size: 14px; + font-variant: tabular-nums; + line-height: 1.5715; + list-style: none; + font-feature-settings: 'tnum'; + background: #fff; + border-radius: 2px; + transition: background-color 0.3s; +} +.ant-tree-focused:not(:hover):not(.ant-tree-active-focused) { + background: #e6f7ff; +} +.ant-tree-list-holder-inner { + align-items: flex-start; +} +.ant-tree.ant-tree-block-node .ant-tree-list-holder-inner { + align-items: stretch; +} +.ant-tree.ant-tree-block-node + .ant-tree-list-holder-inner + .ant-tree-node-content-wrapper { + flex: auto; +} +.ant-tree.ant-tree-block-node + .ant-tree-list-holder-inner + .ant-tree-treenode.dragging { + position: relative; +} +.ant-tree.ant-tree-block-node + .ant-tree-list-holder-inner + .ant-tree-treenode.dragging::after { + position: absolute; + top: 0; + right: 0; + bottom: 4px; + left: 0; + border: 1px solid #1890ff; + opacity: 0; + -webkit-animation: ant-tree-node-fx-do-not-use 0.3s; + animation: ant-tree-node-fx-do-not-use 0.3s; + -webkit-animation-play-state: running; + animation-play-state: running; + -webkit-animation-fill-mode: forwards; + animation-fill-mode: forwards; + content: ''; + pointer-events: none; +} +.ant-tree .ant-tree-treenode { + display: flex; + align-items: flex-start; + padding: 0 0 4px 0; + outline: none; +} +.ant-tree .ant-tree-treenode-disabled .ant-tree-node-content-wrapper { + color: rgba(0, 0, 0, 0.25); + cursor: not-allowed; +} +.ant-tree .ant-tree-treenode-disabled .ant-tree-node-content-wrapper:hover { + background: transparent; +} +.ant-tree .ant-tree-treenode-active .ant-tree-node-content-wrapper { + background: #f5f5f5; +} +.ant-tree + .ant-tree-treenode:not(.ant-tree .ant-tree-treenode-disabled).filter-node + .ant-tree-title { + color: inherit; + font-weight: 500; +} +.ant-tree-indent { + align-self: stretch; + white-space: nowrap; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.ant-tree-indent-unit { + display: inline-block; + width: 24px; +} +.ant-tree-draggable-icon { + width: 24px; + line-height: 24px; + text-align: center; + opacity: 0.2; + transition: opacity 0.3s; +} +.ant-tree-treenode:hover .ant-tree-draggable-icon { + opacity: 0.45; +} +.ant-tree-switcher { + position: relative; + flex: none; + align-self: stretch; + width: 24px; + margin: 0; + line-height: 24px; + text-align: center; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.ant-tree-switcher .ant-tree-switcher-icon, +.ant-tree-switcher .ant-select-tree-switcher-icon { + display: inline-block; + font-size: 10px; + vertical-align: baseline; +} +.ant-tree-switcher .ant-tree-switcher-icon svg, +.ant-tree-switcher .ant-select-tree-switcher-icon svg { + transition: transform 0.3s; +} +.ant-tree-switcher-noop { + cursor: default; +} +.ant-tree-switcher_close .ant-tree-switcher-icon svg { + transform: rotate(-90deg); +} +.ant-tree-switcher-loading-icon { + color: #1890ff; +} +.ant-tree-switcher-leaf-line { + position: relative; + z-index: 1; + display: inline-block; + width: 100%; + height: 100%; +} +.ant-tree-switcher-leaf-line::before { + position: absolute; + top: 0; + right: 12px; + bottom: -4px; + margin-left: -1px; + border-right: 1px solid #d9d9d9; + content: ' '; +} +.ant-tree-switcher-leaf-line::after { + position: absolute; + width: 10px; + height: 14px; + border-bottom: 1px solid #d9d9d9; + content: ' '; +} +.ant-tree-checkbox { + top: initial; + margin: 4px 8px 0 0; +} +.ant-tree .ant-tree-node-content-wrapper { + position: relative; + z-index: auto; + min-height: 24px; + margin: 0; + padding: 0 4px; + color: inherit; + line-height: 24px; + background: transparent; + border-radius: 2px; + cursor: pointer; + transition: all 0.3s, border 0s, line-height 0s, box-shadow 0s; +} +.ant-tree .ant-tree-node-content-wrapper:hover { + background-color: #f5f5f5; +} +.ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected { + background-color: #bae7ff; +} +.ant-tree .ant-tree-node-content-wrapper .ant-tree-iconEle { + display: inline-block; + width: 24px; + height: 24px; + line-height: 24px; + text-align: center; + vertical-align: top; +} +.ant-tree .ant-tree-node-content-wrapper .ant-tree-iconEle:empty { + display: none; +} +.ant-tree-unselectable .ant-tree-node-content-wrapper:hover { + background-color: transparent; +} +.ant-tree-node-content-wrapper { + line-height: 24px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.ant-tree-node-content-wrapper .ant-tree-drop-indicator { + position: absolute; + z-index: 1; + height: 2px; + background-color: #1890ff; + border-radius: 1px; + pointer-events: none; +} +.ant-tree-node-content-wrapper .ant-tree-drop-indicator::after { + position: absolute; + top: -3px; + left: -6px; + width: 8px; + height: 8px; + background-color: transparent; + border: 2px solid #1890ff; + border-radius: 50%; + content: ''; +} +.ant-tree .ant-tree-treenode.drop-container > [draggable] { + box-shadow: 0 0 0 2px #1890ff; +} +.ant-tree-show-line .ant-tree-indent-unit { + position: relative; + height: 100%; +} +.ant-tree-show-line .ant-tree-indent-unit::before { + position: absolute; + top: 0; + right: 12px; + bottom: -4px; + border-right: 1px solid #d9d9d9; + content: ''; +} +.ant-tree-show-line .ant-tree-indent-unit-end::before { + display: none; +} +.ant-tree-show-line .ant-tree-switcher { + background: #fff; +} +.ant-tree-show-line .ant-tree-switcher-line-icon { + vertical-align: -0.15em; +} +.ant-tree .ant-tree-treenode-leaf-last .ant-tree-switcher-leaf-line::before { + top: auto !important; + bottom: auto !important; + height: 14px !important; +} +.ant-tree-rtl { + direction: rtl; +} +.ant-tree-rtl + .ant-tree-node-content-wrapper[draggable='true'] + .ant-tree-drop-indicator::after { + right: -6px; + left: unset; +} +.ant-tree .ant-tree-treenode-rtl { + direction: rtl; +} +.ant-tree-rtl .ant-tree-switcher_close .ant-tree-switcher-icon svg { + transform: rotate(90deg); +} +.ant-tree-rtl.ant-tree-show-line .ant-tree-indent-unit::before { + right: auto; + left: -13px; + border-right: none; + border-left: 1px solid #d9d9d9; +} +.ant-tree-rtl.ant-tree-checkbox { + margin: 4px 0 0 8px; +} +.ant-tree-select-dropdown-rtl .ant-select-tree-checkbox { + margin: 4px 0 0 8px; +} diff --git a/frontend/libs/console/legacy-ce/src/lib/features/RemoteRelationships/RemoteSchemaRelationships/components/RemoteSchemaWidget/RemoteSchemaWidget.stories.tsx b/frontend/libs/console/legacy-ce/src/lib/features/RemoteRelationships/RemoteSchemaRelationships/components/RemoteSchemaWidget/RemoteSchemaWidget.stories.tsx index f8df25aae3fab..ccdea8118ea27 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/RemoteRelationships/RemoteSchemaRelationships/components/RemoteSchemaWidget/RemoteSchemaWidget.stories.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/features/RemoteRelationships/RemoteSchemaRelationships/components/RemoteSchemaWidget/RemoteSchemaWidget.stories.tsx @@ -60,8 +60,9 @@ Primary.parameters = { chromatic: { disableSnapshot: true }, }; -export const RemoteSchemaWidgetWithExistingRelationship: Story = - args => ; +export const RemoteSchemaWidgetWithExistingRelationship: Story< + RemoteSchemaWidgetProps +> = args => ; RemoteSchemaWidgetWithExistingRelationship.args = { schemaName: 'remoteSchema1', fields: customer_columns, diff --git a/frontend/libs/console/legacy-ce/src/lib/features/Surveys/HasuraFamiliaritySurvey/hooks/familiaritySurveyOptionDetails.tsx b/frontend/libs/console/legacy-ce/src/lib/features/Surveys/HasuraFamiliaritySurvey/hooks/familiaritySurveyOptionDetails.tsx index 42631021daf70..70ef4afd2675d 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/Surveys/HasuraFamiliaritySurvey/hooks/familiaritySurveyOptionDetails.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/features/Surveys/HasuraFamiliaritySurvey/hooks/familiaritySurveyOptionDetails.tsx @@ -10,7 +10,7 @@ export const familiaritySurveyOptionCode = [ ] as const; export type FamiliaritySurveyOptionCode = - typeof familiaritySurveyOptionCode[number]; + (typeof familiaritySurveyOptionCode)[number]; const familiaritySurveyOptionDetails: Record< FamiliaritySurveyOptionCode, diff --git a/frontend/libs/console/legacy-ce/src/lib/hooks/stories/useNonTrackableFunctions.stories.tsx b/frontend/libs/console/legacy-ce/src/lib/hooks/stories/useNonTrackableFunctions.stories.tsx index c353cd402f992..7e489a7573cb0 100644 --- a/frontend/libs/console/legacy-ce/src/lib/hooks/stories/useNonTrackableFunctions.stories.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/hooks/stories/useNonTrackableFunctions.stories.tsx @@ -12,10 +12,11 @@ export default { ], } as ComponentMeta; -export const Playground: ComponentStory = - args => { - return ; - }; +export const Playground: ComponentStory< + typeof NonTrackableFunctions +> = args => { + return ; +}; Playground.args = { currentDatasource: 'default', diff --git a/frontend/libs/console/legacy-ce/src/lib/metadata/queryUtils.ts b/frontend/libs/console/legacy-ce/src/lib/metadata/queryUtils.ts index a629704e65873..0c57213617c73 100644 --- a/frontend/libs/console/legacy-ce/src/lib/metadata/queryUtils.ts +++ b/frontend/libs/console/legacy-ce/src/lib/metadata/queryUtils.ts @@ -104,7 +104,7 @@ export const metadataQueryTypes = [ 'dc_delete_agent', ] as const; -export type MetadataQueryType = typeof metadataQueryTypes[number]; +export type MetadataQueryType = (typeof metadataQueryTypes)[number]; export type MetadataQueries = Record>; diff --git a/frontend/libs/console/legacy-ce/src/lib/new-components/Collapsible/Collapsible.stories.tsx b/frontend/libs/console/legacy-ce/src/lib/new-components/Collapsible/Collapsible.stories.tsx index a58a08ae90ac2..8779a1336389c 100644 --- a/frontend/libs/console/legacy-ce/src/lib/new-components/Collapsible/Collapsible.stories.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/new-components/Collapsible/Collapsible.stories.tsx @@ -85,12 +85,13 @@ StateOpen.parameters = { }, }; -export const TestingClickedInteraction: ComponentStory = - () => ( - }> - - - ); +export const TestingClickedInteraction: ComponentStory< + typeof Collapsible +> = () => ( + }> + + +); TestingClickedInteraction.storyName = '🧪 Testing - Clicked interaction'; TestingClickedInteraction.play = async ({ canvasElement }) => { const canvas = within(canvasElement); diff --git a/frontend/libs/console/legacy-ce/src/lib/new-components/Form/AdvancedSelectField.stories.tsx b/frontend/libs/console/legacy-ce/src/lib/new-components/Form/AdvancedSelectField.stories.tsx index 6e756d0f3b97e..7c252f126b4c4 100644 --- a/frontend/libs/console/legacy-ce/src/lib/new-components/Form/AdvancedSelectField.stories.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/new-components/Form/AdvancedSelectField.stories.tsx @@ -80,27 +80,28 @@ VariantWithDescription.play = async ({ canvasElement }) => { expect(canvas.getByText('Select description')).toBeInTheDocument(); }; -export const VariantWithTooltip: ComponentStory = - () => { - const options = [ - { value: 'value0', label: 'Value 0' }, - { value: 'value1', label: 'Value 1', disabled: true }, - { value: 'value2', label: 'Value 2' }, - ]; - - const validationSchema = z.object({}); - - return ( - - - - ); - }; +export const VariantWithTooltip: ComponentStory< + typeof AdvancedSelectField +> = () => { + const options = [ + { value: 'value0', label: 'Value 0' }, + { value: 'value1', label: 'Value 1', disabled: true }, + { value: 'value2', label: 'Value 2' }, + ]; + + const validationSchema = z.object({}); + + return ( + + + + ); +}; VariantWithTooltip.storyName = '🎭 Variant - With tooltip'; VariantWithTooltip.parameters = { docs: { @@ -117,34 +118,35 @@ VariantWithTooltip.play = async ({ canvasElement }) => { expect(await screen.findByRole('tooltip')).toBeInTheDocument(); }; -export const StateWithDefaultValue: ComponentStory = - () => { - const options = [ - { value: { name: 'value0' }, label: 'Value 0' }, - { value: { name: 'value1' }, label: 'Value 1', disabled: true }, - { value: { name: 'value2' }, label: 'Value 2' }, - ]; - - const defaultValues = { - selectNames: [{ value: { name: 'value2' }, label: 'Value 2' }], - }; - - const validationSchema = z.object({}); - - return ( - - - - ); +export const StateWithDefaultValue: ComponentStory< + typeof AdvancedSelectField +> = () => { + const options = [ + { value: { name: 'value0' }, label: 'Value 0' }, + { value: { name: 'value1' }, label: 'Value 1', disabled: true }, + { value: { name: 'value2' }, label: 'Value 2' }, + ]; + + const defaultValues = { + selectNames: [{ value: { name: 'value2' }, label: 'Value 2' }], }; + + const validationSchema = z.object({}); + + return ( + + + + ); +}; StateWithDefaultValue.storyName = '🔁 State - With default value'; StateWithDefaultValue.parameters = { docs: { @@ -223,48 +225,49 @@ StateDisabled.play = async ({ canvasElement }) => { expect(disabledSelect).toHaveStyle('pointer-events: none'); }; -export const StateWithErrorMessage: ComponentStory = - () => { - const options = [ - { value: 'value0', label: 'Value 0' }, - { value: 'value1', label: 'Value 1', disabled: true }, - { value: 'value2', label: 'Value 2' }, - ]; - - const schema = z.object({ - selectNames: z - .array( - z.object({ - value: z.enum(['value0', 'value2']), - label: z.string(), - disabled: z.boolean().optional(), - }) - ) - .min(1), - }); - - const { - methods: { trigger }, - Form, - } = useConsoleForm({ - schema, - }); - - React.useEffect(() => { - // Use useEffect hook to wait for the form to be rendered before triggering validation - trigger('selectNames'); - }, []); - - return ( - - - - ); - }; +export const StateWithErrorMessage: ComponentStory< + typeof AdvancedSelectField +> = () => { + const options = [ + { value: 'value0', label: 'Value 0' }, + { value: 'value1', label: 'Value 1', disabled: true }, + { value: 'value2', label: 'Value 2' }, + ]; + + const schema = z.object({ + selectNames: z + .array( + z.object({ + value: z.enum(['value0', 'value2']), + label: z.string(), + disabled: z.boolean().optional(), + }) + ) + .min(1), + }); + + const { + methods: { trigger }, + Form, + } = useConsoleForm({ + schema, + }); + + React.useEffect(() => { + // Use useEffect hook to wait for the form to be rendered before triggering validation + trigger('selectNames'); + }, []); + + return ( +
+ + + ); +}; StateWithErrorMessage.storyName = '🔁 State - With error message'; StateWithErrorMessage.parameters = { docs: { @@ -281,33 +284,34 @@ StateWithErrorMessage.play = async ({ canvasElement }) => { expect(await canvas.findByText('Required')).toBeInTheDocument(); }; -export const TestingScalability: ComponentStory = - () => { - const options = [ - { value: 'value0', label: 'Value 0' }, - { value: 'value1', label: 'Value 1', disabled: true }, - { value: 'value2', label: 'Value 2' }, - { - value: 'value3', - label: - 'Value 4 - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.', - }, - ]; - - const validationSchema = z.object({}); - - return ( - - - - ); - }; +export const TestingScalability: ComponentStory< + typeof AdvancedSelectField +> = () => { + const options = [ + { value: 'value0', label: 'Value 0' }, + { value: 'value1', label: 'Value 1', disabled: true }, + { value: 'value2', label: 'Value 2' }, + { + value: 'value3', + label: + 'Value 4 - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.', + }, + ]; + + const validationSchema = z.object({}); + + return ( + + + + ); +}; TestingScalability.storyName = '🧪 Testing - Scalability'; TestingScalability.parameters = { docs: { diff --git a/frontend/libs/console/legacy-ce/src/lib/new-components/Form/CheckboxesField.stories.tsx b/frontend/libs/console/legacy-ce/src/lib/new-components/Form/CheckboxesField.stories.tsx index 0940d7c5d7499..e919b718e1b02 100644 --- a/frontend/libs/console/legacy-ce/src/lib/new-components/Form/CheckboxesField.stories.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/new-components/Form/CheckboxesField.stories.tsx @@ -75,36 +75,37 @@ Basic.parameters = { }, }; -export const VariantOrientation: ComponentStory = - () => { - const options = [ - { value: 'value0', label: 'Value 0' }, - { value: 'value1', label: 'Value 1', disabled: true }, - { value: 'value2', label: 'Value 2' }, - ]; +export const VariantOrientation: ComponentStory< + typeof CheckboxesField +> = () => { + const options = [ + { value: 'value0', label: 'Value 0' }, + { value: 'value1', label: 'Value 1', disabled: true }, + { value: 'value2', label: 'Value 2' }, + ]; - const validationSchema = z.object({ - checkboxNames: z.enum(['value0', 'value1', 'value2']), - }); + const validationSchema = z.object({ + checkboxNames: z.enum(['value0', 'value1', 'value2']), + }); - return ( - - <> - - - - - ); - }; + return ( + + <> + + + + + ); +}; VariantOrientation.storyName = '🎭 Variant - Orientation'; VariantOrientation.parameters = { docs: { @@ -112,29 +113,30 @@ VariantOrientation.parameters = { }, }; -export const VariantWithDescription: ComponentStory = - () => { - const options = [ - { value: 'value0', label: 'Value 0' }, - { value: 'value1', label: 'Value 1', disabled: true }, - { value: 'value2', label: 'Value 2' }, - ]; +export const VariantWithDescription: ComponentStory< + typeof CheckboxesField +> = () => { + const options = [ + { value: 'value0', label: 'Value 0' }, + { value: 'value1', label: 'Value 1', disabled: true }, + { value: 'value2', label: 'Value 2' }, + ]; - const validationSchema = z.object({ - checkboxNames: z.enum(['value0', 'value1', 'value2']), - }); + const validationSchema = z.object({ + checkboxNames: z.enum(['value0', 'value1', 'value2']), + }); - return ( - - - - ); - }; + return ( + + + + ); +}; VariantWithDescription.storyName = '🎭 Variant - With description'; VariantWithDescription.parameters = { docs: { @@ -142,29 +144,30 @@ VariantWithDescription.parameters = { }, }; -export const VariantWithTooltip: ComponentStory = - () => { - const options = [ - { value: 'value0', label: 'Value 0' }, - { value: 'value1', label: 'Value 1', disabled: true }, - { value: 'value2', label: 'Value 2' }, - ]; +export const VariantWithTooltip: ComponentStory< + typeof CheckboxesField +> = () => { + const options = [ + { value: 'value0', label: 'Value 0' }, + { value: 'value1', label: 'Value 1', disabled: true }, + { value: 'value2', label: 'Value 2' }, + ]; - const validationSchema = z.object({ - checkboxNames: z.enum(['value0', 'value1', 'value2']), - }); + const validationSchema = z.object({ + checkboxNames: z.enum(['value0', 'value1', 'value2']), + }); - return ( - - - - ); - }; + return ( + + + + ); +}; VariantWithTooltip.storyName = '🎭 Variant - With tooltip'; VariantWithTooltip.parameters = { docs: { @@ -172,40 +175,41 @@ VariantWithTooltip.parameters = { }, }; -export const StateWithDefaultValue: ComponentStory = - () => { - const options: Array<{ - value: 'value0' | 'value1' | 'value2'; - label: string; - disabled?: boolean; - }> = [ - { value: 'value0', label: 'Value 0' }, - { value: 'value1', label: 'Value 1', disabled: true }, - { value: 'value2', label: 'Value 2' }, - ]; - - const validationSchema = z.object({ - checkboxNames: z.enum(['value0', 'value1', 'value2']).array(), - }); +export const StateWithDefaultValue: ComponentStory< + typeof CheckboxesField +> = () => { + const options: Array<{ + value: 'value0' | 'value1' | 'value2'; + label: string; + disabled?: boolean; + }> = [ + { value: 'value0', label: 'Value 0' }, + { value: 'value1', label: 'Value 1', disabled: true }, + { value: 'value2', label: 'Value 2' }, + ]; - const defaultValues: z.infer = { - checkboxNames: ['value2'], - }; + const validationSchema = z.object({ + checkboxNames: z.enum(['value0', 'value1', 'value2']).array(), + }); - return ( - - - - ); + const defaultValues: z.infer = { + checkboxNames: ['value2'], }; + + return ( + + + + ); +}; StateWithDefaultValue.storyName = '🔁 State - With default value'; StateWithDefaultValue.parameters = { docs: { @@ -240,42 +244,43 @@ export const StateDisabled: ComponentStory = () => { }; StateDisabled.storyName = '🔁 State - Disabled'; -export const StateWithErrorMessage: ComponentStory = - () => { - const options = [ - { value: 'value0', label: 'Value 0' }, - { value: 'value1', label: 'Value 1', disabled: true }, - { value: 'value2', label: 'Value 2' }, - ]; +export const StateWithErrorMessage: ComponentStory< + typeof CheckboxesField +> = () => { + const options = [ + { value: 'value0', label: 'Value 0' }, + { value: 'value1', label: 'Value 1', disabled: true }, + { value: 'value2', label: 'Value 2' }, + ]; + + const validationSchema = z.object({ + checkboxNames: z.enum(['value0', 'value1']), + }); - const validationSchema = z.object({ - checkboxNames: z.enum(['value0', 'value1']), - }); + const { + methods: { trigger }, + Form, + } = useConsoleForm({ + schema: validationSchema, + }); - const { - methods: { trigger }, - Form, - } = useConsoleForm({ - schema: validationSchema, + React.useEffect(() => { + act(() => { + // Use useEffect hook to wait for the form to be rendered before triggering validation + trigger(); }); + }, [trigger]); - React.useEffect(() => { - act(() => { - // Use useEffect hook to wait for the form to be rendered before triggering validation - trigger(); - }); - }, [trigger]); - - return ( -
- - - ); - }; + return ( +
+ + + ); +}; StateWithErrorMessage.storyName = '🔁 State - With error message'; StateWithErrorMessage.parameters = { docs: { @@ -286,35 +291,36 @@ StateWithErrorMessage.parameters = { }, }; -export const TestingScalability: ComponentStory = - () => { - const options = [ - { value: 'value0', label: 'Value 0' }, - { value: 'value1', label: 'Value 1', disabled: true }, - { value: 'value2', label: 'Value 2' }, - { - value: 'value3', - label: - 'Value 4 - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.', - }, - ]; +export const TestingScalability: ComponentStory< + typeof CheckboxesField +> = () => { + const options = [ + { value: 'value0', label: 'Value 0' }, + { value: 'value1', label: 'Value 1', disabled: true }, + { value: 'value2', label: 'Value 2' }, + { + value: 'value3', + label: + 'Value 4 - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.', + }, + ]; - const validationSchema = z.object({ - checkboxNames: z.enum(['value0', 'value1', 'value2']), - }); + const validationSchema = z.object({ + checkboxNames: z.enum(['value0', 'value1', 'value2']), + }); - return ( - - - - ); - }; + return ( + + + + ); +}; TestingScalability.storyName = '🧪 Testing - Scalability'; TestingScalability.parameters = { docs: { diff --git a/frontend/libs/console/legacy-ce/src/lib/new-components/Form/CodeEditorField.stories.tsx b/frontend/libs/console/legacy-ce/src/lib/new-components/Form/CodeEditorField.stories.tsx index 46a6a36e3b76e..a189b9221dc5a 100644 --- a/frontend/libs/console/legacy-ce/src/lib/new-components/Form/CodeEditorField.stories.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/new-components/Form/CodeEditorField.stories.tsx @@ -59,21 +59,22 @@ Basic.parameters = { }, }; -export const VariantWithDescription: ComponentStory = - () => { - const validationSchema = z.object({}); +export const VariantWithDescription: ComponentStory< + typeof CodeEditorField +> = () => { + const validationSchema = z.object({}); - return ( - - - - ); - }; + return ( + + + + ); +}; VariantWithDescription.storyName = '🎭 Variant - With description'; VariantWithDescription.parameters = { docs: { @@ -81,21 +82,22 @@ VariantWithDescription.parameters = { }, }; -export const VariantWithTooltip: ComponentStory = - () => { - const validationSchema = z.object({}); +export const VariantWithTooltip: ComponentStory< + typeof CodeEditorField +> = () => { + const validationSchema = z.object({}); - return ( - - - - ); - }; + return ( + + + + ); +}; VariantWithTooltip.storyName = '🎭 Variant - With tooltip'; VariantWithTooltip.parameters = { docs: { @@ -144,26 +146,27 @@ VariantSizeMedium.parameters = { }, }; -export const StateWithDefaultValue: ComponentStory = - () => { - const defaultValues = { codeEditorFieldName: '{ "prop": "value"}' }; +export const StateWithDefaultValue: ComponentStory< + typeof CodeEditorField +> = () => { + const defaultValues = { codeEditorFieldName: '{ "prop": "value"}' }; - const validationSchema = z.object({}); + const validationSchema = z.object({}); - return ( - - - - ); - }; + return ( + + + + ); +}; StateWithDefaultValue.storyName = '🔁 State - With default value'; StateWithDefaultValue.parameters = { docs: { @@ -228,36 +231,37 @@ StateDisabled.parameters = { }, }; -export const StateWithErrorMessage: ComponentStory = - () => { - const schema = z.object({ - codeEditorFieldName: z.enum(['value0', 'value1']), - }); +export const StateWithErrorMessage: ComponentStory< + typeof CodeEditorField +> = () => { + const schema = z.object({ + codeEditorFieldName: z.enum(['value0', 'value1']), + }); - const { - methods: { trigger }, - Form, - } = useConsoleForm({ - schema, - }); + const { + methods: { trigger }, + Form, + } = useConsoleForm({ + schema, + }); - React.useEffect(() => { - act(() => { - // Use useEffect hook to wait for the form to be rendered before triggering validation - trigger(); - }); - }, [trigger]); + React.useEffect(() => { + act(() => { + // Use useEffect hook to wait for the form to be rendered before triggering validation + trigger(); + }); + }, [trigger]); - return ( -
- - - ); - }; + return ( +
+ + + ); +}; StateWithErrorMessage.storyName = '🔁 State - With error message'; StateWithErrorMessage.parameters = { docs: { @@ -268,22 +272,23 @@ StateWithErrorMessage.parameters = { }, }; -export const TestingScalability: ComponentStory = - () => { - const validationSchema = z.object({}); +export const TestingScalability: ComponentStory< + typeof CodeEditorField +> = () => { + const validationSchema = z.object({}); - return ( - - - - ); - }; + return ( + + + + ); +}; TestingScalability.storyName = '🧪 Testing - Scalability'; TestingScalability.parameters = { docs: { diff --git a/frontend/libs/console/legacy-ce/src/lib/new-components/Form/FieldWrapper.stories.tsx b/frontend/libs/console/legacy-ce/src/lib/new-components/Form/FieldWrapper.stories.tsx index 6513d82f70120..5f367aabdaf2e 100644 --- a/frontend/libs/console/legacy-ce/src/lib/new-components/Form/FieldWrapper.stories.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/new-components/Form/FieldWrapper.stories.tsx @@ -54,15 +54,16 @@ Basic.parameters = { }, }; -export const VariantWithDescription: ComponentStory = - () => ( - - - - ); +export const VariantWithDescription: ComponentStory< + typeof FieldWrapper +> = () => ( + + + +); VariantWithDescription.storyName = '🎭 Variant - With description'; VariantWithDescription.parameters = { docs: { @@ -121,17 +122,18 @@ StateLoading.parameters = { }, }; -export const StateWithErrorMessage: ComponentStory = - () => ( - - - - ); +export const StateWithErrorMessage: ComponentStory< + typeof FieldWrapper +> = () => ( + + + +); StateWithErrorMessage.storyName = '🔁 State - With error message'; StateWithErrorMessage.parameters = { docs: { diff --git a/frontend/libs/console/legacy-ce/src/lib/new-components/Tooltip/IconTooltip.stories.tsx b/frontend/libs/console/legacy-ce/src/lib/new-components/Tooltip/IconTooltip.stories.tsx index 9034742821720..3b3061ff533d0 100644 --- a/frontend/libs/console/legacy-ce/src/lib/new-components/Tooltip/IconTooltip.stories.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/new-components/Tooltip/IconTooltip.stories.tsx @@ -65,8 +65,9 @@ TestingHoveredStyle.parameters = { }, }; -export const TestingHoveredInteraction: ComponentStory = - () => ; +export const TestingHoveredInteraction: ComponentStory< + typeof IconTooltip +> = () => ; TestingHoveredInteraction.storyName = '🧪 Testing - Hovered interaction'; TestingHoveredInteraction.play = async ({ canvasElement }) => { const canvas = within(canvasElement); diff --git a/frontend/libs/console/legacy-ce/src/lib/theme/variables.scss b/frontend/libs/console/legacy-ce/src/lib/theme/variables.scss index 0d12504d0b6fd..5074480f7223e 100644 --- a/frontend/libs/console/legacy-ce/src/lib/theme/variables.scss +++ b/frontend/libs/console/legacy-ce/src/lib/theme/variables.scss @@ -23,7 +23,7 @@ $brand-info: #5bc0de; $text-color: #333; $font-size-base: 14px; -$font-family-sans-serif: "Helvetica Neue", Helvetica, sans-serif; +$font-family-sans-serif: 'Helvetica Neue', Helvetica, sans-serif; -$table-bg-hover: #EBF7DE !default; -$table-bg-active: $table-bg-hover !default; +$table-bg-hover: #ebf7de !default; +$table-bg-active: $table-bg-hover !default; diff --git a/frontend/libs/console/legacy-ee/src/lib/components/AccessDenied/AccessDenied.js b/frontend/libs/console/legacy-ee/src/lib/components/AccessDenied/AccessDenied.js index f89409a6ebd27..1f0460c8c7129 100644 --- a/frontend/libs/console/legacy-ee/src/lib/components/AccessDenied/AccessDenied.js +++ b/frontend/libs/console/legacy-ee/src/lib/components/AccessDenied/AccessDenied.js @@ -5,7 +5,10 @@ const AccessDenied = ({ alignCenter = true }) => { return (

You don't have enough permissions to view this section. Ask the project diff --git a/frontend/libs/console/legacy-ee/src/lib/components/Login/Login.module.scss b/frontend/libs/console/legacy-ee/src/lib/components/Login/Login.module.scss index 2ae207154356e..dcd1684c99fd6 100644 --- a/frontend/libs/console/legacy-ee/src/lib/components/Login/Login.module.scss +++ b/frontend/libs/console/legacy-ee/src/lib/components/Login/Login.module.scss @@ -1,4 +1,4 @@ -@import "../../components/Common/Common.module"; +@import '../../components/Common/Common.module'; .container { display: flex; @@ -12,7 +12,6 @@ text-align: center; } - .formContainer { margin-top: -200px; } @@ -32,7 +31,7 @@ } .mainWrapper { - background-color: #F8FAFB; + background-color: #f8fafb; } .input_addon_group { margin-bottom: 10px; @@ -44,8 +43,7 @@ cursor: pointer; font-size: 20px; } - .loginIcon - { + .loginIcon { width: 20px; cursor: pointer; } @@ -58,8 +56,7 @@ border: 0; cursor: pointer; } - .input_addon_group - { + .input_addon_group { cursor: pointer; } input:focus { @@ -78,57 +75,57 @@ } .signin_btn { - padding: 0 15px; - padding-bottom: 15px; - padding-top: 10px; + padding: 0 15px; + padding-bottom: 15px; + padding-top: 10px; - button { - width: 100%; - padding: 0 0; - background-color: #3D4C7E; - border: 0 solid #3D4C7E; - color: #fff; + button { + width: 100%; + padding: 0 0; + background-color: #3d4c7e; + border: 0 solid #3d4c7e; + color: #fff; + height: 44px; + position: relative; + border-radius: 5px; + font-size: 14px; + font-family: 'Gudea'; + letter-spacing: 0.5px; + font-weight: 600; + display: flex; + align-items: center; + .signin_btn_img { + background-color: rgba(0, 0, 0, 0.3); + width: 50px; height: 44px; - position: relative; - border-radius: 5px; - font-size: 14px; - font-family: 'Gudea'; - letter-spacing: 0.5px; - font-weight: 600; - display: flex; + display: inline-block; + // position: absolute; + // left: 0; + // top: 0; + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; align-items: center; - .signin_btn_img { - background-color: rgba(0,0,0,.3); - width: 50px; - height: 44px; - display: inline-block; - // position: absolute; - // left: 0; - // top: 0; - border-top-left-radius: 4px; - border-bottom-left-radius: 4px; - align-items: center; - justify-content: center; - display: flex; - img - { - width: 20px; - display: inline-block; - } - } - .signin_btn_content { + justify-content: center; + display: flex; + img { + width: 20px; display: inline-block; - font-size: 14px; - color: #fff; - width: calc(100% - 50px); } - } - button:hover { - background-color: #2C3965; - } - button:focus, button:active { - background-color: #2C3965 !important; - } + } + .signin_btn_content { + display: inline-block; + font-size: 14px; + color: #fff; + width: calc(100% - 50px); + } + } + button:hover { + background-color: #2c3965; + } + button:focus, + button:active { + background-color: #2c3965 !important; + } } .loginHeading { @@ -163,4 +160,4 @@ .adminSecretLink { cursor: pointer; padding-left: 15px; -} \ No newline at end of file +} diff --git a/frontend/libs/console/legacy-ee/src/lib/components/Login/utils.js b/frontend/libs/console/legacy-ee/src/lib/components/Login/utils.js index 28aeabe22b6ac..ecb4433d16db6 100644 --- a/frontend/libs/console/legacy-ee/src/lib/components/Login/utils.js +++ b/frontend/libs/console/legacy-ee/src/lib/components/Login/utils.js @@ -48,10 +48,7 @@ const base64URLEncode = str => { }; const sha256 = buffer => { - return crypto - .createHash('sha256') - .update(buffer) - .digest(); + return crypto.createHash('sha256').update(buffer).digest(); }; const generateCodeVerifier = () => { diff --git a/frontend/libs/console/legacy-ee/src/lib/components/Main/Actions.js b/frontend/libs/console/legacy-ee/src/lib/components/Main/Actions.js index 2ce4f6cd75166..3c91930091195 100644 --- a/frontend/libs/console/legacy-ee/src/lib/components/Main/Actions.js +++ b/frontend/libs/console/legacy-ee/src/lib/components/Main/Actions.js @@ -140,21 +140,22 @@ export const getMetricConfigPayload = ({ return payload; }; -export const setMetricConfigAction = ( - analyze_query_variables, - analyze_response_body -) => (dispatch, getState) => { - const url = Endpoints.metadata; - const options = { - method: 'POST', - credentials: globalCookiePolicy, - headers: getState().tables.dataHeaders, - body: JSON.stringify( - getMetricConfigPayload({ analyze_query_variables, analyze_response_body }) - ), +export const setMetricConfigAction = + (analyze_query_variables, analyze_response_body) => (dispatch, getState) => { + const url = Endpoints.metadata; + const options = { + method: 'POST', + credentials: globalCookiePolicy, + headers: getState().tables.dataHeaders, + body: JSON.stringify( + getMetricConfigPayload({ + analyze_query_variables, + analyze_response_body, + }) + ), + }; + return dispatch(requestAction(url, options)); }; - return dispatch(requestAction(url, options)); -}; const setApiLimits = payload => (dispatch, getState) => { const url = Endpoints.metadata; @@ -251,7 +252,7 @@ const loadLatestServerVersion = () => (dispatch, getState) => { }; const getHeaders = (header, token, defaultValue = null) => { - let headers = {} + let headers = {}; switch (header) { case 'pat': const personalAccessToken = loadPATState(); @@ -426,124 +427,125 @@ const clearCollaboratorSignInState = () => { }; }; -const idTokenReceived = (data, shouldRedirect = true) => ( - dispatch, - getState -) => { - // set localstorage - const { id_token: idToken } = data; - const bearerToken = `IDToken ${idToken}`; - const updatedDataHeaders = getHeaders('collabToken', bearerToken); - /* Remove admin-secret if applicable and add new data headers into the LS */ - /* Implement some sort of a timeout which refetches the token - * from refresh token - * */ - const { expires_in: expiresIn } = data; - if (expiresIn > 0) { - const timeDiff = getTimeDifference(expiresIn); - const expiryDate = getExpiryDate(timeDiff); - console.info('Token will be refreshed at', expiryDate); - const pollId = handleSystemSuspendWakeUp(dispatch, expiryDate); - setTimeout(() => { - // This variable should be used to determine whether to redirect the user in the case of fresh OAuthCallback flow - // Clear the interval before invoking the function again - clearInterval(pollId); - dispatch(retrieveByRefreshToken(data.refresh_token)) - .then(resp => { - dispatch(idTokenReceived(resp, false)); - }) - .catch(err => { - console.error(err); - const { routing } = getState(); - const { locationBeforeTransitions } = routing; - const { pathname, search } = locationBeforeTransitions; - const redirectUrl = constructRedirectUrl(pathname, search); - if (redirectUrl) { - dispatch( - push({ - pathname: '/login', - search: `?redirect_url=${window.encodeURIComponent( - redirectUrl - )}`, - }) - ); +const idTokenReceived = + (data, shouldRedirect = true) => + (dispatch, getState) => { + // set localstorage + const { id_token: idToken } = data; + const bearerToken = `IDToken ${idToken}`; + const updatedDataHeaders = getHeaders('collabToken', bearerToken); + /* Remove admin-secret if applicable and add new data headers into the LS */ + /* Implement some sort of a timeout which refetches the token + * from refresh token + * */ + const { expires_in: expiresIn } = data; + if (expiresIn > 0) { + const timeDiff = getTimeDifference(expiresIn); + const expiryDate = getExpiryDate(timeDiff); + console.info('Token will be refreshed at', expiryDate); + const pollId = handleSystemSuspendWakeUp(dispatch, expiryDate); + setTimeout(() => { + // This variable should be used to determine whether to redirect the user in the case of fresh OAuthCallback flow + // Clear the interval before invoking the function again + clearInterval(pollId); + dispatch(retrieveByRefreshToken(data.refresh_token)) + .then(resp => { + dispatch(idTokenReceived(resp, false)); + }) + .catch(err => { + console.error(err); + const { routing } = getState(); + const { locationBeforeTransitions } = routing; + const { pathname, search } = locationBeforeTransitions; + const redirectUrl = constructRedirectUrl(pathname, search); + if (redirectUrl) { + dispatch( + push({ + pathname: '/login', + search: `?redirect_url=${window.encodeURIComponent( + redirectUrl + )}`, + }) + ); + return; + } + dispatch(push(`${globals.urlPrefix}/login`)); return; - } - dispatch(push(`${globals.urlPrefix}/login`)); - return; - }); - }, timeDiff); - } else { - console.error('Unexpected error'); - dispatch(push('/')); - } - - const decodedToken = decodeToken(idToken) || {}; - const currentHeaders = getState().apiexplorer.displayedApi.request.headers; - let collabIndex = 1; - if (currentHeaders) { - const index = currentHeaders.findIndex(f => f.key === globals.collabLabel); - if (index !== -1) { - collabIndex = index; - } - } - - Promise.all([ - dispatch({ type: UPDATE_DATA_HEADERS, data: updatedDataHeaders }), - ...(globals.isAdminSecretSet - ? [ - dispatch( - changeRequestHeader(collabIndex, 'key', globals.collabLabel, true) - ), - dispatch( - changeRequestHeader(collabIndex, 'value', bearerToken, true) - ), - ] - : []), - dispatch({ - type: UPDATE_HASURA_DOT_COM_ACCESS, - data: { ...data, tokenInfo: { ...decodedToken } }, - }), - // dispatch(push('/')) - ]).then(() => { - const project = decodedToken.payload?.project; - dispatch({ - type: FETCHED_LUX_PROJECT_INFO, - data: { - id: project.id, - name: project.name, - privileges: decodedToken.payload.collaborator_privileges || [], - metricsFQDN: decodedToken.payload.metrics_fqdn, - plan_name: project?.plan_name, - is_enterprise_user: project?.enterprise_users?.is_active - }, - }); - /* Flush to the local storage */ - if (globals.isAdminSecretSet) { - upsertToLS(globals.collabLabel, bearerToken); + }); + }, timeDiff); } else { - // Set the client name header if doesn't exist - upsertToLS(CLIENT_NAME_HEADER, CLIENT_NAME_HEADER_VALUE); - // Remove collaborator token header if exists - removeHeaderFromLS(globals.collabLabel); + console.error('Unexpected error'); + dispatch(push('/')); } - let redirectFromLS = ''; - if (shouldRedirect) { - try { - redirectFromLS = getKeyFromLS('redirectUrl'); - } catch (e) { - redirectFromLS = ''; + + const decodedToken = decodeToken(idToken) || {}; + const currentHeaders = getState().apiexplorer.displayedApi.request.headers; + let collabIndex = 1; + if (currentHeaders) { + const index = currentHeaders.findIndex( + f => f.key === globals.collabLabel + ); + if (index !== -1) { + collabIndex = index; } - if (redirectFromLS) { - dispatch(push(`${globals.urlPrefix}${redirectFromLS}`)); + } + + Promise.all([ + dispatch({ type: UPDATE_DATA_HEADERS, data: updatedDataHeaders }), + ...(globals.isAdminSecretSet + ? [ + dispatch( + changeRequestHeader(collabIndex, 'key', globals.collabLabel, true) + ), + dispatch( + changeRequestHeader(collabIndex, 'value', bearerToken, true) + ), + ] + : []), + dispatch({ + type: UPDATE_HASURA_DOT_COM_ACCESS, + data: { ...data, tokenInfo: { ...decodedToken } }, + }), + // dispatch(push('/')) + ]).then(() => { + const project = decodedToken.payload?.project; + dispatch({ + type: FETCHED_LUX_PROJECT_INFO, + data: { + id: project.id, + name: project.name, + privileges: decodedToken.payload.collaborator_privileges || [], + metricsFQDN: decodedToken.payload.metrics_fqdn, + plan_name: project?.plan_name, + is_enterprise_user: project?.enterprise_users?.is_active, + }, + }); + /* Flush to the local storage */ + if (globals.isAdminSecretSet) { + upsertToLS(globals.collabLabel, bearerToken); } else { - dispatch(push(globals.urlPrefix)); + // Set the client name header if doesn't exist + upsertToLS(CLIENT_NAME_HEADER, CLIENT_NAME_HEADER_VALUE); + // Remove collaborator token header if exists + removeHeaderFromLS(globals.collabLabel); } - // Not required as the OAUTH key received is assumed to be valid - // dispatch(validateLogin(false)); - } - }); -}; + let redirectFromLS = ''; + if (shouldRedirect) { + try { + redirectFromLS = getKeyFromLS('redirectUrl'); + } catch (e) { + redirectFromLS = ''; + } + if (redirectFromLS) { + dispatch(push(`${globals.urlPrefix}${redirectFromLS}`)); + } else { + dispatch(push(globals.urlPrefix)); + } + // Not required as the OAUTH key received is assumed to be valid + // dispatch(validateLogin(false)); + } + }); + }; const loginClicked = () => (dispatch, getState) => { // set localstorage @@ -585,11 +587,11 @@ const patLoginClicked = () => (dispatch, getState) => { dispatch({ type: UPDATE_DATA_HEADERS, data: updatedDataHeaders }), ...(globals.isAdminSecretSet ? [ - dispatch(changeRequestHeader(1, 'key', globals.patLabel, true)), - dispatch( - changeRequestHeader(1, 'value', `pat ${personalAccessToken}`, true) - ), - ] + dispatch(changeRequestHeader(1, 'key', globals.patLabel, true)), + dispatch( + changeRequestHeader(1, 'value', `pat ${personalAccessToken}`, true) + ), + ] : []), // dispatch(push('/')) ]).then(() => { @@ -688,10 +690,10 @@ export const loadLuxProjectInfo = () => (dispatch, getState) => { : ( project.collaborators.find(c => c.collaborator.id === user.id) ?.project_collaborator_privileges || [] - ).map(p => p.privilege_slug), + ).map(p => p.privilege_slug), metricsFQDN: project.tenant?.region_info?.metrics_fqdn || '', plan_name: project?.plan_name, - is_enterprise_user: project?.enterprise_users?.is_active + is_enterprise_user: project?.enterprise_users?.is_active, }; dispatch({ diff --git a/frontend/libs/console/legacy-ee/src/lib/components/Main/HeaderNavItem.js b/frontend/libs/console/legacy-ee/src/lib/components/Main/HeaderNavItem.js index 1fdcc900b6a68..68def7316812d 100644 --- a/frontend/libs/console/legacy-ee/src/lib/components/Main/HeaderNavItem.js +++ b/frontend/libs/console/legacy-ee/src/lib/components/Main/HeaderNavItem.js @@ -1,11 +1,8 @@ -import styles from "./Main.module.scss"; -import {Link} from "react-router"; -import React from "react"; - -import { - Tooltip, -} from '@hasura/console-oss'; +import styles from './Main.module.scss'; +import { Link } from 'react-router'; +import React from 'react'; +import { Tooltip } from '@hasura/console-oss'; const HeaderNavItem = ({ title, @@ -15,9 +12,12 @@ const HeaderNavItem = ({ linkPath, appPrefix, currentActiveBlock, - isDefault = false + isDefault = false, }) => { - const className = currentActiveBlock === itemPath || (isDefault && currentActiveBlock === '') ? styles.navSideBarActive : ''; + const className = + currentActiveBlock === itemPath || (isDefault && currentActiveBlock === '') + ? styles.navSideBarActive + : ''; return (
  • @@ -39,6 +39,6 @@ const HeaderNavItem = ({
  • ); -} +}; -export default HeaderNavItem; \ No newline at end of file +export default HeaderNavItem; diff --git a/frontend/libs/console/legacy-ee/src/lib/components/Main/Main.js b/frontend/libs/console/legacy-ee/src/lib/components/Main/Main.js index 6da1dc0749201..7a6e1dff13fb3 100644 --- a/frontend/libs/console/legacy-ee/src/lib/components/Main/Main.js +++ b/frontend/libs/console/legacy-ee/src/lib/components/Main/Main.js @@ -180,12 +180,10 @@ class Main extends React.Component { } } componentWillReceiveProps(nextProps) { - const { - [FT_JWT_ANALYZER]: currJwtAnalyzerCompatibility, - } = this.props.featuresCompatibility; - const { - [FT_JWT_ANALYZER]: nextJwtAnalyzerCompatibility, - } = nextProps.featuresCompatibility; + const { [FT_JWT_ANALYZER]: currJwtAnalyzerCompatibility } = + this.props.featuresCompatibility; + const { [FT_JWT_ANALYZER]: nextJwtAnalyzerCompatibility } = + nextProps.featuresCompatibility; const { accessState } = nextProps; @@ -279,10 +277,12 @@ class Main extends React.Component { * created by a Hasura enterprise user */ isEnterpriseProject() { - return (this.props?.project?.is_enterprise_user && - this.props?.project?.plan_name !== 'cloud_free' - ) || globals.consoleType === 'pro-lite' - }; + return ( + (this.props?.project?.is_enterprise_user && + this.props?.project?.plan_name !== 'cloud_free') || + globals.consoleType === 'pro-lite' + ); + } render() { const { @@ -393,20 +393,21 @@ class Main extends React.Component { accessState.hasMetricAccess && isMonitoringTabSupportedEnvironment(globals) ) { - return