Skip to content

Commit 71bebf0

Browse files
authored
Merge pull request #3091 from devtron-labs/fix/helm-hibernate-error
fix: helm app hibernate
2 parents 9b49760 + 0d23f73 commit 71bebf0

5 files changed

Lines changed: 7 additions & 33 deletions

File tree

.eslintignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,12 @@ src/components/ClusterNodes/ClusterEvents.tsx
4040
src/components/ClusterNodes/ClusterManifest.tsx
4141
src/components/ClusterNodes/ClusterNodeEmptyStates.tsx
4242
src/components/ClusterNodes/NodeDetails.tsx
43-
src/components/Hotjar/Hotjar.tsx
4443
src/components/Jobs/ExpandedRow/ExpandedRow.tsx
4544
src/components/Jobs/JobDetails/JobDetails.tsx
4645
src/components/Jobs/JobsEmptyState.tsx
4746
src/components/Jobs/Service.ts
4847
src/components/Jobs/Utils.ts
4948
src/components/LogViewer/LogViewer.tsx
50-
src/components/__mocks__/xterm-webfont.js
5149
src/components/app/LogFilter.ts
5250
src/components/app/Overview/EnvironmentList.tsx
5351
src/components/app/Overview/Overview.tsx

src/components/__mocks__/xterm-webfont.js

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/components/v2/appDetails/sourceInfo/EnvironmentSelector.component.tsx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -287,10 +287,7 @@ const EnvironmentSelectorComponent = ({
287287
isExternalFlux ||
288288
isExternalArgo
289289
) && (
290-
<div
291-
data-testid="dot-button-app-details"
292-
className="ml-8"
293-
>
290+
<div data-testid="dot-button-app-details" className="ml-8">
294291
<ActionMenu
295292
id="cluster-action-menu"
296293
onClick={handleActionMenuClick}
@@ -360,11 +357,7 @@ const EnvironmentSelectorComponent = ({
360357
/>
361358
)}
362359
{showWorkloadsModal && (
363-
<ScaleWorkloadsModal
364-
appId={appIdentifier}
365-
onClose={() => setShowWorkloadsModal(false)}
366-
history={history}
367-
/>
360+
<ScaleWorkloadsModal appId={appIdentifier} onClose={() => setShowWorkloadsModal(false)} />
368361
)}
369362
</div>
370363
)

src/components/v2/appDetails/sourceInfo/scaleWorkloads/ScaleWorkloadsModal.component.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,11 @@ import { useSharedState } from '../../../utils/useSharedState'
4444
import IndexStore from '../../index.store'
4545
import { AppType } from '../../appDetails.type'
4646
import { getInstalledChartDetailWithResourceTree } from '../../appDetails.api'
47+
import { useLocation, useNavigate } from 'react-router-dom'
4748

48-
export default function ScaleWorkloadsModal({ appId, onClose, history }: ScaleWorkloadsModalProps) {
49+
export default function ScaleWorkloadsModal({ appId, onClose }: ScaleWorkloadsModalProps) {
50+
const navigate = useNavigate()
51+
const { pathname } = useLocation()
4952
const [nameSelection, setNameSelection] = useState<Record<string, WorkloadCheckType>>({
5053
scaleDown: {
5154
isChecked: false,
@@ -331,7 +334,7 @@ export default function ScaleWorkloadsModal({ appId, onClose, history }: ScaleWo
331334

332335
setFetchingLatestDetails(true)
333336
_setWorkloadsList(_workloadsList)
334-
history.push(`${history.location.pathname}?refetchData=true`)
337+
navigate(`${pathname}?refetchData=true`)
335338
}
336339
await _getAndSetAppDetail()
337340
} catch (e) {

src/components/v2/appDetails/sourceInfo/scaleWorkloads/scaleWorkloadsModal.type.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export interface ScaleWorkloadsType extends HibernateTargetObject, WorkloadCheck
2828
export interface ScaleWorkloadsModalProps {
2929
appId: string
3030
onClose: () => void
31-
history: any
3231
}
3332

3433
export interface HibernateTargetObject {

0 commit comments

Comments
 (0)