mirror of
https://github.com/portainer/portainer.git
synced 2025-08-04 21:35:23 +02:00
feat(helm): update helm view [r8s-256] (#582)
Co-authored-by: Cara Ryan <cara.ryan@portainer.io> Co-authored-by: James Player <james.player@portainer.io> Co-authored-by: stevensbkang <skan070@gmail.com>
This commit is contained in:
parent
46eddbe7b9
commit
0ca9321db1
57 changed files with 2635 additions and 222 deletions
|
@ -0,0 +1,44 @@
|
|||
import { Checkbox } from '@@/form-components/Checkbox';
|
||||
import { CodeEditor } from '@@/CodeEditor';
|
||||
|
||||
import { Values } from '../../types';
|
||||
|
||||
interface Props {
|
||||
values?: Values;
|
||||
isUserSupplied: boolean;
|
||||
setIsUserSupplied: (isUserSupplied: boolean) => void;
|
||||
}
|
||||
|
||||
const noValuesMessage = 'No values found';
|
||||
|
||||
export function ValuesDetails({
|
||||
values,
|
||||
isUserSupplied,
|
||||
setIsUserSupplied,
|
||||
}: Props) {
|
||||
return (
|
||||
<div className="relative">
|
||||
{/* bring in line with the code editor copy button */}
|
||||
<div className="absolute top-1 left-0">
|
||||
<Checkbox
|
||||
label="User defined only"
|
||||
id="values-details-user-supplied"
|
||||
checked={isUserSupplied}
|
||||
onChange={() => setIsUserSupplied(!isUserSupplied)}
|
||||
data-cy="values-details-user-supplied"
|
||||
/>
|
||||
</div>
|
||||
<CodeEditor
|
||||
type="yaml"
|
||||
id="values-details-code-editor"
|
||||
data-cy="values-details-code-editor"
|
||||
value={
|
||||
isUserSupplied
|
||||
? values?.userSuppliedValues ?? noValuesMessage
|
||||
: values?.computedValues ?? noValuesMessage
|
||||
}
|
||||
readonly
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue