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 #5254 from rohitkrai03/helm-redirects
Bug 1830046: Helm redirects based on the origin of the action
- Loading branch information
Showing
8 changed files
with
98 additions
and
32 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
7 changes: 3 additions & 4 deletions
7
frontend/packages/dev-console/src/components/topology/actions/helmReleaseActions.ts
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 |
---|---|---|
@@ -1,21 +1,20 @@ | ||
import { KebabOption } from '@console/internal/components/utils/kebab'; | ||
import { Node } from '@console/topology'; | ||
import { regroupActions } from './regroupActions'; | ||
import { | ||
deleteHelmRelease, | ||
upgradeHelmRelease, | ||
rollbackHelmRelease, | ||
} from '../../../actions/modify-helm-release'; | ||
import { HelmActionOrigins } from '../../helm/helm-types'; | ||
|
||
export const helmReleaseActions = (helmRelease: Node): KebabOption[] => { | ||
const name = helmRelease.getLabel(); | ||
const { namespace } = helmRelease.getData().groupResources[0].resources.obj.metadata; | ||
return name && namespace | ||
? [ | ||
rollbackHelmRelease(name, namespace), | ||
upgradeHelmRelease(name, namespace), | ||
upgradeHelmRelease(name, namespace, HelmActionOrigins.topology), | ||
rollbackHelmRelease(name, namespace, HelmActionOrigins.topology), | ||
deleteHelmRelease(name, namespace), | ||
...regroupActions(helmRelease), | ||
] | ||
: []; | ||
}; |