CreateImageWizard: Change valid prefixes to match composer

Adds all valid prefixes defined in composer, removes invalid ones, and
disables the TextInput for the root partition. This makes customized
filesystems less error prone.

https://bugzilla.redhat.com/show_bug.cgi?id=2070761
This commit is contained in:
Sanne Raymaekers 2022-04-01 11:08:13 +02:00
parent 760a4366e9
commit d12bdb1075

View file

@ -13,7 +13,7 @@ import path from 'path';
const MountPoint = ({ ...props }) => {
// check '/' last!
const validPrefixes = [ '/home', '/opt', '/srv', '/usr/local', '/var', '/boot', '/' ];
const validPrefixes = [ '/home', '/opt', '/srv', '/usr', '/usr/local', '/var', '/app', '/data', '/' ];
const [ isOpen, setIsOpen ] = useState(false);
const [ prefix, setPrefix ] = useState('/');
const [ suffix, setSuffix ] = useState('');
@ -66,12 +66,14 @@ const MountPoint = ({ ...props }) => {
})
}
</Select>
<TextInput
className="pf-u-w-50"
type="text"
value={ suffix }
aria-label="Mount point suffix text input"
onChange={ v => setSuffix(v) } />
{ prefix !== '/' &&
<TextInput
className="pf-u-w-50"
type="text"
value={ suffix }
aria-label="Mount point suffix text input"
onChange={ v => setSuffix(v) } />
}
</>
);
};