-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1733 from devtron-labs/feat/bulk-restart-workload
feat: App Group Restart Workload modal
- Loading branch information
Showing
12 changed files
with
1,128 additions
and
10 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/components/ApplicationGroup/Details/EnvironmentOverview/AllExpandableDropdown.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React from 'react' | ||
import { AllExpandableDropdownTypes } from '../../AppGroup.types' | ||
|
||
export const AllExpandableDropdown = ({ | ||
expandedAppIds, | ||
setExpandedAppIds, | ||
bulkRotatePodsMap, | ||
SvgImage, | ||
iconClassName, | ||
dropdownLabel = '', | ||
isExpandableButtonClicked, | ||
setExpandableButtonClicked, | ||
}: AllExpandableDropdownTypes) => { | ||
const handleAllExpand = () => { | ||
if (expandedAppIds.length === Object.keys(bulkRotatePodsMap).length) { | ||
setExpandedAppIds([]) | ||
setExpandableButtonClicked(false) | ||
} else { | ||
setExpandedAppIds(Object.keys(bulkRotatePodsMap).map((appId) => +appId)) | ||
setExpandableButtonClicked(!isExpandableButtonClicked) | ||
} | ||
} | ||
|
||
return ( | ||
<div className="flex dc__gap-4 cursor" onClick={handleAllExpand}> | ||
{dropdownLabel} | ||
<SvgImage className={`rotate fcn-9 flex ${iconClassName}`} onClick={handleAllExpand} /> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.