mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +02:00
refactor(edge): move edge deploy script to react [EE-2689] (#6747)
This commit is contained in:
parent
328ce2f995
commit
85a7b7e0fc
38 changed files with 1079 additions and 342 deletions
45
app/edge/components/EdgeScriptForm/OsSelector.tsx
Normal file
45
app/edge/components/EdgeScriptForm/OsSelector.tsx
Normal file
|
@ -0,0 +1,45 @@
|
|||
import { ButtonSelector } from '@/portainer/components/form-components/ButtonSelector/ButtonSelector';
|
||||
|
||||
import { OS } from './types';
|
||||
|
||||
interface Props {
|
||||
value: OS;
|
||||
onChange(value: OS): void;
|
||||
}
|
||||
|
||||
export function OsSelector({ onChange, value }: Props) {
|
||||
return (
|
||||
<div className="form-group">
|
||||
<div className="col-sm-12">
|
||||
<ButtonSelector
|
||||
size="small"
|
||||
value={value}
|
||||
onChange={(os: OS) => onChange(os)}
|
||||
options={[
|
||||
{
|
||||
value: 'linux',
|
||||
label: (
|
||||
<>
|
||||
<i className="fab fa-linux space-right" aria-hidden="true" />
|
||||
Linux
|
||||
</>
|
||||
),
|
||||
},
|
||||
{
|
||||
value: 'win',
|
||||
label: (
|
||||
<>
|
||||
<i
|
||||
className="fab fa-windows space-right"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
Windows
|
||||
</>
|
||||
),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue