-
Notifications
You must be signed in to change notification settings - Fork 55
feat: add flux in deployment types #2770
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP 404).\n |
Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP 404).\n |
import { repoType } from '../../../../config' | ||
import UserGitRepo from '../../../gitOps/UserGitRepo' | ||
import { getChartValuesFiltered } from '@Components/charts/charts.helper' | ||
import { ChartValuesType } from '@Components/charts/charts.types' | ||
import { ConfigureGitopsInfoBlock } from '@Components/workflowEditor/ConfigureGitopsInfoBlock' | ||
import DeploymentTypeIcon, { | ||
DEPLOYMENT_TYPE_TO_TEXT_MAP, | ||
} from '@Components/common/DeploymentTypeIcon/DeploymentTypeIcon' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can use barrel import
<Helm className="icon-dim-24 ml-6" /> | ||
)} | ||
<span className="fs-13 fw-6 cn-9 md-6" data-testid="deployment-type"> | ||
{DEPLOYMENT_TYPE_TO_TEXT_MAP[commonState.installedConfig.deploymentAppType as DeploymentAppTypes] ?? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
null check not required if correct type is given to DEPLOYMENT_TYPE_TO_TEXT_MAP
since records expect all enums and undefined will also not render anything [but in this case then span should not be rendered as well]
<RadioGroupItem | ||
dataTestId="flux-deployment" | ||
value={DeploymentAppTypes.FLUX} | ||
disabled={allowedDeploymentTypes.indexOf(DeploymentAppTypes.FLUX) === -1} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
allowedDeploymentTypes.indexOf(DeploymentAppTypes.FLUX) === -1
is happening twice same for all blocks
import { importComponentFromFELibrary } from '../helpers/Helpers' | ||
|
||
export const DEPLOYMENT_TYPE_TO_TEXT_MAP = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pls add type can use exclude
const className = `icon-dim-${iconSize}` | ||
switch (deploymentAppType) { | ||
case DeploymentAppTypes.GITOPS: | ||
return <ArgoCD data-testid="argo-cd-app-logo" className={className} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If possible lets try make const maps since they break on addition of type if vaue is not present
Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP 404).\n |
Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP 404).\n |
Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP 404).\n |
Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP 404).\n |
|
… feat/flux-deployment
Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP 404).\n |
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist: