mirror of
https://github.com/portainer/portainer.git
synced 2025-08-04 13:25:26 +02:00
fix(configs): fix error with binary file (#3937)
This commit is contained in:
parent
60c5ab3eec
commit
8204d32538
1 changed files with 12 additions and 8 deletions
|
@ -1,14 +1,18 @@
|
||||||
import { ResourceControlViewModel } from 'Portainer/models/resourceControl/resourceControl';
|
import { ResourceControlViewModel } from 'Portainer/models/resourceControl/resourceControl';
|
||||||
|
|
||||||
function b64DecodeUnicode(str) {
|
function b64DecodeUnicode(str) {
|
||||||
return decodeURIComponent(
|
try {
|
||||||
atob(str)
|
return decodeURIComponent(
|
||||||
.split('')
|
atob(str)
|
||||||
.map(function (c) {
|
.split('')
|
||||||
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
|
.map(function (c) {
|
||||||
})
|
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
|
||||||
.join('')
|
})
|
||||||
);
|
.join('')
|
||||||
|
);
|
||||||
|
} catch (err) {
|
||||||
|
return atob(str);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function ConfigViewModel(data) {
|
export function ConfigViewModel(data) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue