We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 60ab494 commit 87f218cCopy full SHA for 87f218c
ui/src/views/compute/EditVM.vue
@@ -283,14 +283,18 @@ export default {
283
this.$notifyError(error)
284
}).finally(() => { this.groups.loading = false })
285
},
286
+ decodeUserData (userdata) {
287
+ const decodedData = Buffer.from(userdata, 'base64')
288
+ return decodedData.toString('utf-8')
289
+ },
290
fetchUserData () {
291
const params = {
292
id: this.resource.id,
293
userdata: true
294
}
295
296
api('listVirtualMachines', params).then(json => {
- this.form.userdata = atob(json.listvirtualmachinesresponse.virtualmachine[0].userdata || '')
297
+ this.form.userdata = this.decodeUserData(json.listvirtualmachinesresponse.virtualmachine[0].userdata || '')
298
})
299
300
handleSubmit () {
0 commit comments