fix(frontend): cannnot access configuration details view containing binary data (#4503) (#4561)

Co-authored-by: Simon Meng <simon.meng@portainer.io>
pull/3937/head
cong meng 4 years ago committed by GitHub
parent 9136ba30eb
commit aa5277de2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -24,8 +24,11 @@ class KubernetesConfigMapService {
try {
const params = new KubernetesCommonParams();
params.id = name;
const [raw, yaml] = await Promise.all([this.KubernetesConfigMaps(namespace).get(params).$promise, this.KubernetesConfigMaps(namespace).getYaml(params).$promise]);
const configMap = KubernetesConfigMapConverter.apiToConfigMap(raw, yaml);
const [rawPromise, yamlPromise] = await Promise.allSettled([
this.KubernetesConfigMaps(namespace).get(params).$promise,
this.KubernetesConfigMaps(namespace).getYaml(params).$promise,
]);
const configMap = KubernetesConfigMapConverter.apiToConfigMap(rawPromise.value, yamlPromise.value);
return configMap;
} catch (err) {
if (err.status === 404) {

Loading…
Cancel
Save