Lint fixes

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
This commit is contained in:
Francesco Torchia
2024-11-12 11:50:20 +01:00
parent 19b11aac2c
commit 4626d56acd
214 changed files with 3162 additions and 1298 deletions
+8 -8
View File
@@ -67,7 +67,7 @@ export default {
const inStore = this.$store.getters['currentProduct'].inStore;
const sshs = this.$store.getters[`${ inStore }/all`](HCI.SSH) || [];
return sshs.find( O => O.id === id)?.spec?.publicKey || undefined;
return sshs.find( (O) => O.id === id)?.spec?.publicKey || undefined;
},
getOsType(vm) {
@@ -80,7 +80,7 @@ export default {
OS.forEach((O) => {
if (O.match) {
hasCustomQGA = O.match.find(type => type === osType);
hasCustomQGA = O.match.find((type) => type === osType);
}
});
@@ -117,7 +117,7 @@ export default {
return oldValue;
}
return dataFormat?.packages?.includes('qemu-guest-agent') && !!dataFormat?.runcmd?.find( S => Array.isArray(S) && S.join('-') === _QGA_JSON.runcmd[0].join('-'));
return dataFormat?.packages?.includes('qemu-guest-agent') && !!dataFormat?.runcmd?.find( (S) => Array.isArray(S) && S.join('-') === _QGA_JSON.runcmd[0].join('-'));
},
isInstallUSBTablet(spec) {
@@ -180,7 +180,7 @@ export default {
const secretName = cloudInitNoCloud?.secretRef?.name || cloudInitNoCloud?.networkDataSecretRef?.name;
const secret = secrets.find(s => s.metadata.name === secretName);
const secret = secrets.find((s) => s.metadata.name === secretName);
return secret;
},
@@ -194,7 +194,7 @@ export default {
return credentials.map((c) => {
const source = !!c.userPassword ? 'userPassword' : 'sshPublicKey';
const secretName = c[source]?.source?.secret?.secretName;
const secretRef = secrets.find(s => s.metadata.name === secretName);
const secretRef = secrets.find((s) => s.metadata.name === secretName);
const out = {
source, username: '', newPassword: '', users: [], sshkeys: [], secretName, secretRef
};
@@ -267,7 +267,7 @@ export default {
const allSSHs = this.$store.getters[`${ inStore }/all`](HCI.SSH) || [];
out = (keys || []).map((id) => {
const hasSSHResource = allSSHs.find(ssh => ssh.id === id);
const hasSSHResource = allSSHs.find((ssh) => ssh.id === id);
if (hasSSHResource) {
return {
@@ -287,9 +287,9 @@ export default {
const _userDataSSH = this.getSSHFromUserData(userData);
_userDataSSH.map( (sshValue) => {
const hasSSHResource = allSSHs.find(ssh => this.compareSSHValue(sshValue, ssh.spec?.publicKey));
const hasSSHResource = allSSHs.find((ssh) => this.compareSSHValue(sshValue, ssh.spec?.publicKey));
if (hasSSHResource && !out.find(O => O.id === hasSSHResource.id)) {
if (hasSSHResource && !out.find((O) => O.id === hasSSHResource.id)) {
out.push({
id: hasSSHResource.id,
data: hasSSHResource,