Add other rke2 configs safety check

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
This commit is contained in:
Francesco Torchia 2024-02-05 12:40:33 +01:00
parent 19dd7f6dce
commit c0bdc5b517
No known key found for this signature in database
GPG Key ID: E6D011B7415D4393
1 changed files with 3 additions and 3 deletions

View File

@ -194,7 +194,7 @@ export default {
* Check if current CIS profile is required and listed in the options
*/
isCisSupported() {
const cisProfile = this.serverConfig.profile || this.agentConfig.profile;
const cisProfile = this.serverConfig?.profile || this.agentConfig?.profile;
return !cisProfile || this.profileOptions.map((option) => option.value).includes(cisProfile);
},
@ -458,7 +458,7 @@ export default {
class="col span-6"
>
<LabeledSelect
v-if="serverArgs && serverArgs.profile"
v-if="serverArgs && serverArgs.profile && serverConfig"
v-model="serverConfig.profile"
:mode="mode"
:options="profileOptions"
@ -466,7 +466,7 @@ export default {
@input="$emit('cis-changed')"
/>
<LabeledSelect
v-else-if="agentArgs && agentArgs.profile"
v-else-if="agentArgs && agentArgs.profile && agentConfig"
v-model="agentConfig.profile"
data-testid="rke2-custom-edit-cis-agent"
:mode="mode"