Skip to content
This repository has been archived by the owner on Feb 1, 2021. It is now read-only.

Commit

Permalink
Remove async from updateJsonRpcMasterApi so that the page will load c…
Browse files Browse the repository at this point in the history
…orrectly when websockets are unavailable

Signed-off-by: Josh Pinkney <joshpinkney@gmail.com>
  • Loading branch information
JPinkney committed Jan 11, 2021
1 parent 7f0263f commit 5e19a95
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/services/bootstrap/PreloadData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class PreloadData {
await this.updateBranding();

this.updateRestApiClient();
await this.updateJsonRpcMasterApi();
this.updateJsonRpcMasterApi();

this.updateWorkspaces();
this.updateInfrastructureNamespaces();
Expand Down
6 changes: 4 additions & 2 deletions src/services/storageTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
* Red Hat, Inc. - initial API and implementation
*/

const DEFAULT_AVAILABLE_TYPES = '';

export enum StorageTypeTitle {
async = 'Asynchronous',
ephemeral = 'Ephemeral',
Expand Down Expand Up @@ -37,7 +39,7 @@ export function fromTitle(title: string): che.WorkspaceStorageType {
}

export function getAvailable(settings: che.WorkspaceSettings): che.WorkspaceStorageType[] {
const availableTypes = settings['che.workspace.storage.available_types'];
const availableTypes = settings['che.workspace.storage.available_types'] || DEFAULT_AVAILABLE_TYPES;
return availableTypes.split(',') as che.WorkspaceStorageType[];
}

Expand All @@ -62,7 +64,7 @@ export function typeToAttributes(type: che.WorkspaceStorageType): che.WorkspaceC
}

export function attributesToType(attrs: che.WorkspaceConfigAttributes | undefined): che.WorkspaceStorageType {
if ( attrs?.persistVolumes === 'false') {
if (attrs?.persistVolumes === 'false') {
if (attrs.asyncPersist === 'true') {
return 'async';
}
Expand Down

0 comments on commit 5e19a95

Please sign in to comment.