Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@devtron-labs/devtron-fe-common-lib",
"version": "1.20.2",
"version": "1.20.3",
"description": "Supporting common component library",
"type": "module",
"main": "dist/index.js",
Expand Down
4 changes: 4 additions & 0 deletions src/Common/API/CoreAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,10 @@ class CoreAPI {

trash = <T = any, K = object>(url: string, data?: K, options?: APIOptions): Promise<ResponseType<T>> =>
this.fetchInTime<K>({ url, type: 'DELETE', data, options })

setGlobalAPITimeout = (timeout: number) => {
this.timeout = timeout || FALLBACK_REQUEST_TIMEOUT
}
}

export default CoreAPI
2 changes: 1 addition & 1 deletion src/Common/API/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const dashboardAPI = new CoreAPI({
handleRedirectToLicenseActivation,
})

export const { post, put, patch, get, trash } = dashboardAPI
export const { post, put, patch, get, trash, setGlobalAPITimeout } = dashboardAPI
export { default as CoreAPI } from './CoreAPI'
export { QueryClientProvider } from './QueryClientProvider'
export * from './reactQueryHooks'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export const ForceDeleteConfirmationModal = ({
subtitle,
onDelete,
closeConfirmationModal,
isDeleting,
}: ForceDeleteConfirmationProps) => {
const renderSubtitle = () => (
<>
Expand All @@ -43,6 +44,7 @@ export const ForceDeleteConfirmationModal = ({
primaryButtonConfig: {
text: 'Force Delete',
onClick: onDelete,
isLoading: isDeleting,
},
}}
handleClose={closeConfirmationModal}
Expand Down
2 changes: 1 addition & 1 deletion src/Shared/Components/ConfirmationModal/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export interface CannotDeleteModalProps
* and `ConfirmationModalProps` to configure the force delete confirmation modal.
*/
export interface ForceDeleteConfirmationProps
extends Partial<Pick<DeleteConfirmationModalProps, 'onDelete' | 'closeConfirmationModal'>>,
extends Partial<Pick<DeleteConfirmationModalProps, 'onDelete' | 'closeConfirmationModal' | 'isDeleting'>>,
Partial<Pick<ConfirmationModalProps, 'title' | 'subtitle'>> {}

export interface ConfirmationModalContextType {
Expand Down
Loading