diff --git a/package-lock.json b/package-lock.json index de97d1a0e..61070e1ea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@devtron-labs/devtron-fe-common-lib", - "version": "1.22.0-pre-0", + "version": "1.22.5-beta-0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@devtron-labs/devtron-fe-common-lib", - "version": "1.22.0-pre-0", + "version": "1.22.5-beta-0", "hasInstallScript": true, "license": "ISC", "dependencies": { diff --git a/package.json b/package.json index c18a3d755..9fd76a160 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@devtron-labs/devtron-fe-common-lib", - "version": "1.22.0-pre-0", + "version": "1.22.5-beta-0", "description": "Supporting common component library", "type": "module", "main": "dist/index.js", diff --git a/src/Assets/IconV2/ic-bell.svg b/src/Assets/IconV2/ic-bell.svg new file mode 100644 index 000000000..a67b2859b --- /dev/null +++ b/src/Assets/IconV2/ic-bell.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/Assets/IconV2/ic-bulb.svg b/src/Assets/IconV2/ic-bulb.svg new file mode 100644 index 000000000..a167e3b3a --- /dev/null +++ b/src/Assets/IconV2/ic-bulb.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/Assets/IconV2/ic-close-circle.svg b/src/Assets/IconV2/ic-close-circle.svg new file mode 100644 index 000000000..5c48b3451 --- /dev/null +++ b/src/Assets/IconV2/ic-close-circle.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/Assets/IconV2/ic-comment.svg b/src/Assets/IconV2/ic-comment.svg new file mode 100644 index 000000000..096533e21 --- /dev/null +++ b/src/Assets/IconV2/ic-comment.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/Assets/IconV2/ic-curved-arrow.svg b/src/Assets/IconV2/ic-curved-arrow.svg new file mode 100644 index 000000000..04b4044dd --- /dev/null +++ b/src/Assets/IconV2/ic-curved-arrow.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/Assets/IconV2/ic-dot-circle.svg b/src/Assets/IconV2/ic-dot-circle.svg new file mode 100644 index 000000000..149c94bab --- /dev/null +++ b/src/Assets/IconV2/ic-dot-circle.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/Assets/IconV2/ic-nav-cursor.svg b/src/Assets/IconV2/ic-nav-cursor.svg new file mode 100644 index 000000000..295732275 --- /dev/null +++ b/src/Assets/IconV2/ic-nav-cursor.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/src/Assets/IconV2/ic-new-chat.svg b/src/Assets/IconV2/ic-new-chat.svg new file mode 100644 index 000000000..a5d366419 --- /dev/null +++ b/src/Assets/IconV2/ic-new-chat.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/Assets/IconV2/ic-piggybank.svg b/src/Assets/IconV2/ic-piggybank.svg new file mode 100644 index 000000000..44619eebe --- /dev/null +++ b/src/Assets/IconV2/ic-piggybank.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/Assets/IconV2/ic-priority-high-fill.svg b/src/Assets/IconV2/ic-priority-high-fill.svg new file mode 100644 index 000000000..9e084e5ee --- /dev/null +++ b/src/Assets/IconV2/ic-priority-high-fill.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/Assets/IconV2/ic-priority-low-fill.svg b/src/Assets/IconV2/ic-priority-low-fill.svg new file mode 100644 index 000000000..0b7c7a735 --- /dev/null +++ b/src/Assets/IconV2/ic-priority-low-fill.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/Assets/IconV2/ic-priority-urgent-fill.svg b/src/Assets/IconV2/ic-priority-urgent-fill.svg new file mode 100644 index 000000000..ec8140320 --- /dev/null +++ b/src/Assets/IconV2/ic-priority-urgent-fill.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/Assets/IconV2/ic-red-bulb.svg b/src/Assets/IconV2/ic-red-bulb.svg new file mode 100644 index 000000000..f6d6482af --- /dev/null +++ b/src/Assets/IconV2/ic-red-bulb.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/Assets/Illustration/cmd-bar-visual.webp b/src/Assets/Illustration/cmd-bar-visual.webp new file mode 100644 index 000000000..2ca70968f Binary files /dev/null and b/src/Assets/Illustration/cmd-bar-visual.webp differ diff --git a/src/Assets/Illustration/img-celebration.svg b/src/Assets/Illustration/img-celebration.svg new file mode 100644 index 000000000..1982add63 --- /dev/null +++ b/src/Assets/Illustration/img-celebration.svg @@ -0,0 +1,149 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Assets/Illustration/img-install-freemium-saas.svg b/src/Assets/Illustration/img-install-freemium-saas.svg new file mode 100644 index 000000000..3ee2d147b --- /dev/null +++ b/src/Assets/Illustration/img-install-freemium-saas.svg @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Assets/Illustration/img-install-via-aws-marketplace.svg b/src/Assets/Illustration/img-install-via-aws-marketplace.svg new file mode 100644 index 000000000..e98457714 --- /dev/null +++ b/src/Assets/Illustration/img-install-via-aws-marketplace.svg @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Assets/Illustration/img-installing-devtron.svg b/src/Assets/Illustration/img-installing-devtron.svg new file mode 100644 index 000000000..672175a5e --- /dev/null +++ b/src/Assets/Illustration/img-installing-devtron.svg @@ -0,0 +1,160 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Assets/Illustration/img-page-not-found.svg b/src/Assets/Illustration/img-page-not-found.svg new file mode 100644 index 000000000..b0de197a2 --- /dev/null +++ b/src/Assets/Illustration/img-page-not-found.svg @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Common/API/CoreAPI.ts b/src/Common/API/CoreAPI.ts index c5056e8d9..0cb8f0165 100644 --- a/src/Common/API/CoreAPI.ts +++ b/src/Common/API/CoreAPI.ts @@ -55,6 +55,13 @@ class CoreAPI { method: type, signal, body: data ? JSON.stringify(data) : undefined, + ...(data && !isMultipartRequest + ? { + headers: { + 'Content-Type': 'application/json', + }, + } + : {}), } // eslint-disable-next-line dot-notation options['credentials'] = 'include' as RequestCredentials diff --git a/src/Common/API/reactQueryHooks.ts b/src/Common/API/reactQueryHooks.ts index 4b1ceed8d..18866134b 100644 --- a/src/Common/API/reactQueryHooks.ts +++ b/src/Common/API/reactQueryHooks.ts @@ -16,6 +16,9 @@ import { QueryKey, + useInfiniteQuery as rqUseInfiniteQuery, + UseInfiniteQueryOptions, + UseInfiniteQueryResult, useMutation as rqUseMutation, UseMutationOptions, UseMutationResult, @@ -46,4 +49,19 @@ export const useMutation = , ServerErrors, TVariables, TContext>, ): UseMutationResult, ServerErrors, TVariables, TContext> => rqUseMutation(options) +export const useInfiniteQuery = < + TQueryFnData = unknown, + TData = TQueryFnData, + TQueryKey extends QueryKey = QueryKey, + WrapWithResponseType extends boolean = true, +>( + options: UseInfiniteQueryOptions< + WrapWithResponseType extends true ? ResponseType : TQueryFnData, + ServerErrors, + TData, + WrapWithResponseType extends true ? ResponseType : TQueryFnData, + TQueryKey + >, +): UseInfiniteQueryResult => rqUseInfiniteQuery(options) + export { useQueryClient } diff --git a/src/Common/API/utils.ts b/src/Common/API/utils.ts index 7d30db314..48a9451e6 100644 --- a/src/Common/API/utils.ts +++ b/src/Common/API/utils.ts @@ -17,6 +17,7 @@ import { MutableRefObject } from 'react' import { URLS } from '@Common/Constants' +import { getUrlWithSearchParams } from '@Common/Helper' import { ServerErrors } from '@Common/ServerError' import { RESPONSE_MESSAGES } from './constants' @@ -62,7 +63,9 @@ export const getIsRequestAborted = (error) => export const handleDashboardLogout = () => { const continueParam = `${window.location.pathname.replace(window.__BASE_URL__, '')}${window.location.search}` - window.location.href = `${window.location.origin}${window.__BASE_URL__}${URLS.LOGIN_SSO}?continue=${continueParam}` + window.location.href = getUrlWithSearchParams(`${window.location.origin}${window.__BASE_URL__}${URLS.LOGIN_SSO}`, { + continue: continueParam, + }) } export const handleRedirectToLicenseActivation = () => { diff --git a/src/Common/Constants.ts b/src/Common/Constants.ts index 9d8c58914..eaa25b7c3 100644 --- a/src/Common/Constants.ts +++ b/src/Common/Constants.ts @@ -80,6 +80,8 @@ export const URLS = { APP_DEPLOYMNENT_HISTORY: 'deployments', APP_DETAILS: 'details', APP_DETAILS_K8: 'k8s-resources', // for V2 + EXTERNAL_ARGO_APP: 'eaa', + EXTERNAL_FLUX_APP: 'external-flux', DETAILS: '/details', CD_DETAILS: 'cd-details', APP_TRIGGER: 'trigger', @@ -157,6 +159,7 @@ export const URLS = { export const ROUTES = { APP: 'app', + ATHENA: 'athena', APP_ARTIFACT_PROMOTE_MATERIAL: 'app/artifact/promotion-request/material', APP_TEMPLATE_DATA: 'app/template/data', ENVIRONMENT_CATEGORIES: 'env/categories', diff --git a/src/Common/Drawer/Drawer.tsx b/src/Common/Drawer/Drawer.tsx index ca496f290..1ce2fb110 100644 --- a/src/Common/Drawer/Drawer.tsx +++ b/src/Common/Drawer/Drawer.tsx @@ -19,7 +19,7 @@ import { VisibleModal } from '../Modals/VisibleModal' import './Drawer.scss' import { DTFocusTrapType } from '@Shared/Components/DTFocusTrap' -export interface DrawerProps extends Pick { +export interface DrawerProps extends Pick { position: 'left' | 'right' | 'bottom' | 'top' children?: any backdrop?: boolean @@ -45,6 +45,7 @@ export const Drawer = ({ onClose, disableTransition, initialFocus = undefined, + avoidFocusTrap = false, }: DrawerProps) => { const drawerRef = useRef(null) useEffect(() => { @@ -69,6 +70,7 @@ export const Drawer = ({ onEscape={onEscape} close={onClose} initialFocus={initialFocus} + avoidFocusTrap={avoidFocusTrap} >