From 4d78f830b712bc8173b1d2a8d798925936e4b6f9 Mon Sep 17 00:00:00 2001 From: Arpit Date: Wed, 18 Jan 2023 14:14:45 +0530 Subject: [PATCH 1/4] fixes: mobile toggle was hidden (#5353) --- frontend/src/_styles/theme.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/_styles/theme.scss b/frontend/src/_styles/theme.scss index 3586bb94ef..26c30642bc 100644 --- a/frontend/src/_styles/theme.scss +++ b/frontend/src/_styles/theme.scss @@ -348,7 +348,7 @@ button { } .editor-sidebar { - height: 100%; + height: calc(100% - 45px); position: fixed; right: 0; overflow-x: hidden; From c81ae3492fbb0c55361a56d83c0eadd631beebde Mon Sep 17 00:00:00 2001 From: Midhun G S Date: Wed, 18 Jan 2023 14:17:35 +0530 Subject: [PATCH 2/4] fix for variables in graphql (#5347) --- plugins/packages/graphql/lib/index.ts | 2 +- plugins/packages/graphql/lib/types.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/packages/graphql/lib/index.ts b/plugins/packages/graphql/lib/index.ts index 731cef01cc..aca655c603 100644 --- a/plugins/packages/graphql/lib/index.ts +++ b/plugins/packages/graphql/lib/index.ts @@ -17,7 +17,7 @@ export default class GraphqlQueryService implements QueryService { const json = { query, - variables: variables || {}, + variables: variables ? JSON.parse(variables) : {}, }; try { diff --git a/plugins/packages/graphql/lib/types.ts b/plugins/packages/graphql/lib/types.ts index e8ef35fa04..ccddbed145 100644 --- a/plugins/packages/graphql/lib/types.ts +++ b/plugins/packages/graphql/lib/types.ts @@ -2,5 +2,5 @@ export type SourceOptions = { url: string; headers: any; url_params: any }; export type QueryOptions = { operation: string; query: string; - variables?: object; + variables?: string; }; From 1230551988c82de77fc25f674de9660e61c39415 Mon Sep 17 00:00:00 2001 From: Muhsin Shah C P Date: Thu, 19 Jan 2023 20:56:34 +0530 Subject: [PATCH 3/4] [bug-fix] Public app is redirecting to login page [Subpath] (#5338) * fix: sub path issue * fix: preview app login issue --- frontend/src/_services/authentication.service.js | 5 ++++- server/src/modules/auth/query-auth.guard.ts | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/src/_services/authentication.service.js b/frontend/src/_services/authentication.service.js index 3c45c03a65..e9a09af656 100644 --- a/frontend/src/_services/authentication.service.js +++ b/frontend/src/_services/authentication.service.js @@ -206,7 +206,10 @@ function resetPassword(params) { function logout() { clearUser(); const loginPath = (window.public_config?.SUB_PATH || '/') + 'login'; - window.location.href = loginPath + `?redirectTo=${window.location.pathname}`; + const pathname = window.public_config?.SUB_PATH + ? window.location.pathname.replace(window.public_config?.SUB_PATH, '') + : window.location.pathname; + window.location.href = loginPath + `?redirectTo=${!(pathname.indexOf('/') === 0) ? '/' : ''}${pathname}`; } function clearUser() { diff --git a/server/src/modules/auth/query-auth.guard.ts b/server/src/modules/auth/query-auth.guard.ts index ee12df069a..4b8adea79b 100644 --- a/server/src/modules/auth/query-auth.guard.ts +++ b/server/src/modules/auth/query-auth.guard.ts @@ -1,6 +1,7 @@ import { ExecutionContext, Injectable } from '@nestjs/common'; import { AuthGuard } from '@nestjs/passport'; import { DataQueriesService } from '@services/data_queries.service'; +import { maybeSetSubPath } from 'src/helpers/utils.helper'; @Injectable() export class QueryAuthGuard extends AuthGuard('jwt') { @@ -12,7 +13,8 @@ export class QueryAuthGuard extends AuthGuard('jwt') { const request = context.switchToHttp().getRequest(); // unauthenticated users should be able to to run queries of public apps - if (request.route.path === '/api/data_queries/:id/run') { + const apiUrl = maybeSetSubPath('/api/data_queries/:id/run'); + if (request.route.path === apiUrl) { const dataQuery = await this.dataQueriesService.findOne(request.params.id); const app = dataQuery.dataSource.app; From 2274ac0f31b8319db5a8b218f0941a3bf5954de3 Mon Sep 17 00:00:00 2001 From: Midhun G S Date: Thu, 19 Jan 2023 21:08:53 +0530 Subject: [PATCH 4/4] Bump version (#5381) --- .version | 2 +- server/.version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.version b/.version index 50ffc5aa7f..2165f8f9b6 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -2.0.3 +2.0.4 diff --git a/server/.version b/server/.version index 50ffc5aa7f..2165f8f9b6 100644 --- a/server/.version +++ b/server/.version @@ -1 +1 @@ -2.0.3 +2.0.4