-
Notifications
You must be signed in to change notification settings - Fork 593
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for dynamic forms in helm install and upgrade
- Loading branch information
1 parent
91ba110
commit 6c21ed9
Showing
7 changed files
with
199 additions
and
56 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
41 changes: 41 additions & 0 deletions
41
frontend/packages/dev-console/src/components/helm/form/HelmChartMetaDescription.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,41 @@ | ||
import * as React from 'react'; | ||
import * as _ from 'lodash'; | ||
import { HelmChart } from '../helm-types'; | ||
import { getImageForIconClass } from '@console/internal/components/catalog/catalog-item-icon'; | ||
|
||
type HelmChartMetaDescriptionProps = { | ||
chart: HelmChart; | ||
}; | ||
|
||
const HelmChartMetaDescription: React.FC<HelmChartMetaDescriptionProps> = ({ chart }) => { | ||
const chartVersion = chart?.metadata?.version; | ||
const displayName = _.startCase(chart?.metadata?.name); | ||
const imgSrc = chart?.metadata?.icon || getImageForIconClass('icon-helm'); | ||
const provider = chart?.metadata?.maintainers?.[0]?.name; | ||
return ( | ||
<div style={{ marginBottom: '30px' }}> | ||
<div className="co-clusterserviceversion-logo"> | ||
<div className="co-clusterserviceversion-logo__icon"> | ||
<img | ||
className="co-catalog-item-icon__img co-catalog-item-icon__img--large" | ||
src={imgSrc} | ||
alt="" | ||
/> | ||
</div> | ||
<div className="co-clusterserviceversion-logo__name"> | ||
<h1 className="co-clusterserviceversion-logo__name__clusterserviceversion"> | ||
{displayName} | ||
</h1> | ||
{provider && ( | ||
<span className="co-clusterserviceversion-logo__name__provider text-muted"> | ||
{`${chartVersion || ''} provided by ${provider}`} | ||
</span> | ||
)} | ||
</div> | ||
</div> | ||
{chart?.metadata?.description} | ||
</div> | ||
); | ||
}; | ||
|
||
export default HelmChartMetaDescription; |
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
Oops, something went wrong.