diff --git a/CK-CHANGELOG.md b/CK-CHANGELOG.md new file mode 100644 index 0000000000..dacc3467b9 --- /dev/null +++ b/CK-CHANGELOG.md @@ -0,0 +1,14 @@ + +## 0.5.0 (Unreleased) + +**BREAKING CHANGES & MIGRATIONS**: + +FEATURES: + +ENHANCEMENTS: +* Removed console.log() client code (https://cloudkubed.atlassian.net/browse/IATP-84) + +BUG FIXES: + +COMPONENTS: + diff --git a/ui/app/src/components/shared/ResourceContextMenu.tsx b/ui/app/src/components/shared/ResourceContextMenu.tsx index c1ab237d2e..acf86775cf 100644 --- a/ui/app/src/components/shared/ResourceContextMenu.tsx +++ b/ui/app/src/components/shared/ResourceContextMenu.tsx @@ -20,6 +20,7 @@ import { AppRolesContext } from '../../contexts/AppRolesContext'; import { useAppDispatch } from '../../hooks/customReduxHooks'; import { addUpdateOperation } from '../shared/notifications/operationsSlice'; import { ConfirmUpgradeResource } from './ConfirmUpgradeResource'; +import config from '../../config.json'; interface ResourceContextMenuProps { resource: Resource, @@ -137,7 +138,9 @@ export const ResourceContextMenu: React.FunctionComponent currentUserRoles.includes(role)); } diff --git a/ui/app/src/components/shared/airlock/AirlockViewRequest.tsx b/ui/app/src/components/shared/airlock/AirlockViewRequest.tsx index e4074610db..346b3c990d 100644 --- a/ui/app/src/components/shared/airlock/AirlockViewRequest.tsx +++ b/ui/app/src/components/shared/airlock/AirlockViewRequest.tsx @@ -11,6 +11,7 @@ import { destructiveButtonStyles } from "../../../styles"; import { ExceptionLayout } from "../ExceptionLayout"; import { AirlockRequestFilesSection } from "./AirlockRequestFilesSection"; import { AirlockReviewRequest } from "./AirlockReviewRequest"; +import config from '../../../config.json'; interface AirlockViewRequestProps { requests: AirlockRequest[]; @@ -48,7 +49,9 @@ export const AirlockViewRequest: React.FunctionComponent navigate('../'), [navigate]); diff --git a/ui/app/src/components/shared/create-update-resource/ResourceForm.tsx b/ui/app/src/components/shared/create-update-resource/ResourceForm.tsx index a649142ac5..9daf3851a0 100644 --- a/ui/app/src/components/shared/create-update-resource/ResourceForm.tsx +++ b/ui/app/src/components/shared/create-update-resource/ResourceForm.tsx @@ -9,6 +9,7 @@ import { ResourceType } from "../../../models/resourceType"; import { APIError } from "../../../models/exceptions"; import { ExceptionLayout } from "../ExceptionLayout"; import { ResourceTemplate, sanitiseTemplateForRJSF } from "../../../models/resourceTemplate"; +import config from '../../../config.json'; interface ResourceFormProps { templateName: string, @@ -87,7 +88,11 @@ export const ResourceForm: React.FunctionComponent = (props: const createUpdateResource = async (formData: any) => { const data = removeReadOnlyProps(formData, template); - // console.log("parsed payload to send", data); + + if (config.debug === true) { + config.debug && console.log("parsed payload to send", data); // Added this line, removed the commented line. + } + setSendingData(true); let response; diff --git a/ui/app/src/components/workspaces/WorkspaceProvider.tsx b/ui/app/src/components/workspaces/WorkspaceProvider.tsx index e26da5a58d..cf197c226a 100644 --- a/ui/app/src/components/workspaces/WorkspaceProvider.tsx +++ b/ui/app/src/components/workspaces/WorkspaceProvider.tsx @@ -20,6 +20,7 @@ import { LoadingState } from '../../models/loadingState'; import { ExceptionLayout } from '../shared/ExceptionLayout'; import { AppRolesContext } from '../../contexts/AppRolesContext'; import { RoleName, WorkspaceRoleName } from '../../models/roleNames'; +import config from '../../config.json'; export const WorkspaceProvider: React.FunctionComponent = () => { const apiCall = useAuthApiCall(); @@ -62,7 +63,10 @@ export const WorkspaceProvider: React.FunctionComponent = () => { workspaceCtx.current.setWorkspace(ws); workspaceCtx.current.setRoles(wsRoles); setWSRoles(wsRoles); - console.info(wsRoles) + + + config.debug && console.info(wsRoles); // Added this line, removed the commented line. + // get workspace services to pass to nav + ws services page const workspaceServices = await apiCall(`${ApiEndpoint.Workspaces}/${ws.id}/${ApiEndpoint.WorkspaceServices}`,