import React, { useState } from 'react'; import { Trans } from '@lingui/macro'; import { isPath } from '../input/input_validators'; import { Checkbox } from '../checkbox'; import { Input } from '../input'; import { SubTitle } from '../layout/sub-title'; import { UserPreferences, userStore } from '../../../common/user-store'; import { observer } from 'mobx-react'; import { Kubectl } from '../../../main/kubectl'; import { SelectOption, Select } from '../select'; export const KubectlBinaries = observer(({ preferences }: { preferences: UserPreferences }) => { const [downloadPath, setDownloadPath] = useState(preferences.downloadBinariesPath || ""); const [binariesPath, setBinariesPath] = useState(preferences.kubectlBinariesPath || ""); const downloadMirrorOptions: SelectOption[] = [ { value: "default", label: "Default (Google)" }, { value: "china", label: "China (Azure)" }, ] const save = () => { preferences.downloadBinariesPath = downloadPath; preferences.kubectlBinariesPath = binariesPath; } return ( <>

Kubectl Binary

Download kubectl binaries} value={preferences.downloadKubectlBinaries} onChange={downloadKubectlBinaries => preferences.downloadKubectlBinaries = downloadKubectlBinaries} /> Download kubectl binaries matching to Kubernetes cluster version. The directory to download binaries into. The path to the kubectl binary on the system. ); });