ui: fixes errors in the Console.vue (#6741)

This PR for fixes errors in the Console.vue
This commit is contained in:
Hoang Nguyen 2022-09-15 18:14:31 +07:00 committed by GitHub
parent bf4e9059dd
commit e39b7ac0d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 9 deletions

View File

@ -28,7 +28,6 @@
<script>
import { SERVER_MANAGER } from '@/store/mutation-types'
import { api } from '@/api'
import TooltipLabel from '@/components/widgets/TooltipLabel'
import { uuid } from 'vue-uuid'
export default {
@ -49,19 +48,13 @@ export default {
tokenValidationEnabled: false
}
},
components: {
TooltipLabel
},
beforeCreate () {
this.form = this.$form.createForm(this)
},
mounted () {
created () {
this.verifyExtraValidationEnabled()
},
methods: {
verifyExtraValidationEnabled () {
api('listConfigurations', { name: 'consoleproxy.extra.security.validation.enabled' }).then(json => {
this.tokenValidationEnabled = json.listconfigurationsresponse.configuration !== null && json.listconfigurationsresponse.configuration[0].value === 'true'
this.tokenValidationEnabled = json?.listconfigurationsresponse?.configuration && json?.listconfigurationsresponse?.configuration[0]?.value === 'true'
})
},
consoleUrl () {