MT#61580 Review all the console in CSC repo

Review all instances of the console object (such as console.info, console.error, console.warn ...)
in the CSC repository

Change-Id: I360164516748cc7412c1fa2023db3445f01f53ac
mr13.3
nidrissi-zouggari 3 months ago
parent b6445fbf18
commit 61ffb5a1ed

@ -115,9 +115,6 @@ export default {
hDateset = kamailioDatesetToHuman(this.timeSet.times)
} catch (e) {
this.invalidDateset = true
// eslint-disable-next-line no-console
console.info(e)
return
}
if (hDateset.length === 0) {
this.selectedDate = null

@ -321,9 +321,6 @@ export default {
} catch (e) {
this.reset()
this.invalidTimeset = true
// eslint-disable-next-line no-console
console.info(e)
return
}
if (humanTimeRanges.length === 0) {

@ -186,7 +186,7 @@
"Enable regex matching for \\\"Received from IP\\\" and \\\"Destination\\\" fields.": "Enable regex matching for \\\"Received from IP\\\" and \\\"Destination\\\" fields.",
"Enable strict mode that requires all mail2fax emails to have the secret key as the very first line of the email + an empty line. The key is removed from the email once matched.": "Activez le mode strict qui exige que tous les e-mails de mail2fax aient la clé secrète comme toute première ligne de l'e-mail + une ligne vide. La clé est supprimée de l'e-mail une fois qu'elle a été trouvée.",
"End time": "Date de fin",
"English": "Français",
"English": "Anglais",
"Enter a number to dial": "Enter a number to dial",
"Entity belongs to admin": "Cette entité appartient à ladministrateur",
"Expires": "Expire",

@ -69,6 +69,7 @@
<script>
import useValidate from '@vuelidate/core'
import CscPageSticky from 'components/CscPageSticky'
import { showGlobalError } from 'src/helpers/ui'
import { mapWaitingActions } from 'vue-wait'
import { required } from 'vuelidate/lib/validators'
export default {
@ -144,8 +145,7 @@ export default {
this.numberError = true
this.numberErrorMessage = this.$t('This number is already in use.')
} else {
// eslint-disable-next-line no-console
console.error('An error occurred:', error)
showGlobalError(this.$t('An error occurred:', error.response.data.message))
}
}
}

@ -131,8 +131,6 @@ export default {
copyToClipboard(copyData).then(() => {
showToast(this.$t('Data is in the clipboard'))
}).catch(() => {
// eslint-disable-next-line no-console
console.error(copyData)
showGlobalError(this.$t('Unable to copy data to clipboard'))
})
}

@ -59,8 +59,7 @@ export default {
context.dispatch('end')
}
} catch (error) {
// eslint-disable-next-line no-console
console.error(error.message)
showGlobalError(error.message)
}
},
async toggleStateTransfer (context) {

@ -218,8 +218,6 @@ export default {
}).then(() => {
context.commit('callQueueCreationSucceeded')
}).catch((err) => {
// eslint-disable-next-line no-console
console.debug(err)
context.commit('callQueueCreationFailed', err.message)
})
},
@ -232,8 +230,6 @@ export default {
}).then(() => {
context.commit('callQueueRemovalSucceeded')
}).catch((err) => {
// eslint-disable-next-line no-console
console.debug(err)
context.commit('callQueueRemovalFailed', err.message)
})
},
@ -245,8 +241,6 @@ export default {
setCallQueueMaxLength(options).then((preferences) => {
context.commit('callQueueUpdateSucceeded', preferences)
}).catch((err) => {
// eslint-disable-next-line no-console
console.debug(err)
context.commit('callQueueUpdateFailed', err.message)
})
},
@ -258,8 +252,6 @@ export default {
setCallQueueWrapUpTime(options).then((preferences) => {
context.commit('callQueueUpdateSucceeded', preferences)
}).catch((err) => {
// eslint-disable-next-line no-console
console.debug(err)
context.commit('callQueueUpdateFailed', err.message)
})
},

@ -215,8 +215,6 @@ export default {
}).then(() => {
context.commit('msConfigCreationSucceeded')
}).catch((err) => {
// eslint-disable-next-line no-console
console.debug(err)
context.commit('msConfigCreationFailed', err.message)
})
},
@ -229,8 +227,6 @@ export default {
}).then(() => {
context.commit('msConfigRemovalSucceeded')
}).catch((err) => {
// eslint-disable-next-line no-console
console.debug(err)
context.commit('msConfigRemovalFailed', err.message)
})
},
@ -242,8 +238,6 @@ export default {
setSecretaryNumber(options).then((preferences) => {
context.commit('msConfigUpdateSucceeded', preferences)
}).catch((err) => {
// eslint-disable-next-line no-console
console.debug(err)
context.commit('msConfigUpdateFailed', err.message)
})
},

@ -374,9 +374,7 @@ export default {
page
})
resolve()
}).catch((err) => {
// eslint-disable-next-line no-console
console.debug(err)
}).catch(() => {
context.commit('soundSetListSucceeded', {
soundSets: []
})
@ -458,9 +456,7 @@ export default {
context.commit('soundHandlesRequesting')
getAllSoundHandles().then((soundHandles) => {
context.commit('soundHandlesSucceeded', soundHandles)
}).catch((err) => {
// eslint-disable-next-line no-console
console.debug(err)
}).catch(() => {
context.commit('soundHandlesSucceeded', {
items: []
})
@ -473,9 +469,7 @@ export default {
soundSetId,
soundFiles
})
}).catch((err) => {
// eslint-disable-next-line no-console
console.debug(err)
}).catch(() => {
context.commit('soundFilesSucceeded', {
soundSetId,
soundFiles: {
@ -496,9 +490,7 @@ export default {
soundFile,
soundFileUrl
})
}).catch((err) => {
// eslint-disable-next-line no-console
console.debug(err)
}).catch(() => {
context.commit('soundFileFailed', {
soundFile
})
@ -530,9 +522,7 @@ export default {
}
}).then((res) => {
context.commit('soundFileUploadSucceeded', res)
}).catch((err) => {
// eslint-disable-next-line no-console
console.debug(err)
}).catch(() => {
context.commit('soundFileUploadAborted', {
soundFileId: toFileId({
soundSetId: options.soundSetId,
@ -545,9 +535,7 @@ export default {
context.commit('soundFileUpdateRequesting', options)
setLoopPlay(options).then((soundFile) => {
context.commit('soundFileUpdateSucceeded', soundFile)
}).catch((err) => {
// eslint-disable-next-line no-console
console.debug(err)
}).catch(() => {
context.commit('soundFileUpdateFailed', options)
})
},
@ -555,9 +543,7 @@ export default {
context.commit('soundFileUpdateRequesting', options)
setUseParent(options).then((soundFile) => {
context.commit('soundFileUpdateSucceeded', soundFile)
}).catch((err) => {
// eslint-disable-next-line no-console
console.debug(err)
}).catch(() => {
context.commit('soundFileUpdateFailed', options)
})
},
@ -565,9 +551,7 @@ export default {
context.commit('soundFileRemoveRequesting', options)
removeSoundFile(options.soundFileId).then(() => {
context.commit('soundFileRemoveSucceeded', options)
}).catch((err) => {
// eslint-disable-next-line no-console
console.debug(err)
}).catch(() => {
context.commit('soundFileRemoveFailed', options)
})
}

@ -347,9 +347,7 @@ export default {
all: true
}).then((subscribers) => {
context.commit('subscribersSucceeded', subscribers)
}).catch((err) => {
// eslint-disable-next-line no-console
console.debug(err)
}).catch(() => {
context.commit('subscribersSucceeded', {
items: []
})
@ -364,9 +362,7 @@ export default {
all: true
}).then((numbers) => {
context.commit('numbersSucceeded', numbers)
}).catch((err) => {
// eslint-disable-next-line no-console
console.debug(err)
}).catch(() => {
context.commit('numbersSucceeded', {
items: []
})

@ -383,9 +383,8 @@ export default {
})
}
} catch (err) {
// eslint-disable-next-line no-console
console.debug(err)
await context.dispatch('logout')
throw err
}
}
},

Loading…
Cancel
Save