add cluster icon migration code (#673)

Signed-off-by: Sebastian Malton <smalton@mirantis.com>
This commit is contained in:
Sebastian Malton authored and GitHub committed 2020-08-25 16:42:30 +03:00
1 parent b75cac4546
commit a12aa8a04f
8 files changed
+143 -34

No files matched your search

@@ -28,7 +28,7 @@ export class ClusterIconSetting extends React.Component<Props> {
try {
if (file) {
const buf = Buffer.from(await file.arrayBuffer());
cluster.preferences.icon = `data:image/jpeg;base64, ${buf.toString('base64')}`;
cluster.preferences.icon = `data:${file.type};base64, ${buf.toString('base64')}`;
} else {
// this has to be done as a seperate branch (and not always) because `cluster`
// is observable and triggers an update loop.