diff --git a/src/app/get-started/get-started-tab/get-started-tab.controller.ts b/src/app/get-started/get-started-tab/get-started-tab.controller.ts index f88f3d274..1f9ddfff6 100644 --- a/src/app/get-started/get-started-tab/get-started-tab.controller.ts +++ b/src/app/get-started/get-started-tab/get-started-tab.controller.ts @@ -17,8 +17,7 @@ import { DevfileRegistry, IDevfileMetaData } from '../../../components/api/devfi import { CheNotification } from '../../../components/notification/che-notification.factory'; import { IChePfButtonProperties } from '../../../components/che-pf-widget/button/che-pf-button'; import { IGetStartedToolbarBindingProperties } from './toolbar/get-started-toolbar.component'; -import { CheBranding } from '../../../components/branding/che-branding'; -import { STORAGE_TYPE } from '../../../components/api/storage-type'; +import { StorageType } from '../../../components/api/storage-type'; /** @@ -34,7 +33,6 @@ export class GetStartedTabController { '$log', 'cheNotification', 'cheWorkspace', - 'cheBranding', 'createWorkspaceSvc', 'devfileRegistry' ]; @@ -46,7 +44,6 @@ export class GetStartedTabController { // injected services private $log: ng.ILogService; private cheNotification: CheNotification; - private cheBranding: CheBranding; private createWorkspaceSvc: CreateWorkspaceSvc; private devfileRegistry: DevfileRegistry; @@ -55,7 +52,6 @@ export class GetStartedTabController { private devfileRegistryUrl: string; private ephemeralMode: boolean; private storageType: string; - private storageDescription: string; /** * Default constructor that is using resource @@ -64,13 +60,11 @@ export class GetStartedTabController { $log: ng.ILogService, cheNotification: CheNotification, cheWorkspace: CheWorkspace, - cheBranding: CheBranding, createWorkspaceSvc: CreateWorkspaceSvc, devfileRegistry: DevfileRegistry ) { this.$log = $log; this.cheNotification = cheNotification; - this.cheBranding = cheBranding; this.createWorkspaceSvc = createWorkspaceSvc; this.devfileRegistry = devfileRegistry; @@ -87,9 +81,9 @@ export class GetStartedTabController { this.devfileRegistryUrl = workspaceSettings && workspaceSettings.cheWorkspaceDevfileRegistryUrl; this.ephemeralMode = workspaceSettings['che.workspace.persist_volumes.default'] === 'false'; if (this.ephemeralMode) { - this.storageType = STORAGE_TYPE.EPHEMERAL.label; + this.storageType = StorageType.EPHEMERAL; } else { - this.storageType = STORAGE_TYPE.PERSISTENT.label; + this.storageType = StorageType.PERSISTENT; } this.toolbarProps.ephemeralMode = this.ephemeralMode; return this.init(); @@ -112,7 +106,6 @@ export class GetStartedTabController { onStorageTypeChange(type: string): void { this.storageType = type; - this.storageDescription = type; } createWorkspace(devfileMetaData: IDevfileMetaData): void { @@ -130,16 +123,13 @@ export class GetStartedTabController { this.devfileRegistry.fetchDevfile(this.devfileRegistryUrl, selfLink) .then(() => { const devfile = this.devfileRegistry.getDevfile(this.devfileRegistryUrl, selfLink); - console.log('=======>>>>' + this.storageType); - if (this.storageType === STORAGE_TYPE.EPHEMERAL.label) { - console.log('=======>>>> 0000' + this.storageType); + if (this.storageType === StorageType.EPHEMERAL) { if (!devfile.attributes) { devfile.attributes = {}; } devfile.attributes.persistVolumes = 'false'; } - if (this.storageType === STORAGE_TYPE.ASYNCHRONOUS.label) { - console.log('=======>>>> 1111' + this.storageType); + if (this.storageType === StorageType.ASYNCHRONOUS) { if (!devfile.attributes) { devfile.attributes = {}; } diff --git a/src/app/index.module.ts b/src/app/index.module.ts index fd93fcfba..450653edf 100755 --- a/src/app/index.module.ts +++ b/src/app/index.module.ts @@ -304,7 +304,7 @@ initModule.config(['$routeProvider', ($routeProvider: che.route.IRouteProvider) }]); -const DEV = true; +const DEV = false; // configs initModule.config(['$routeProvider', ($routeProvider: che.route.IRouteProvider) => { diff --git a/src/components/typings/che.d.ts b/src/components/typings/che.d.ts index b0fb592ea..d4a474230 100755 --- a/src/components/typings/che.d.ts +++ b/src/components/typings/che.d.ts @@ -209,7 +209,7 @@ declare namespace che { } export interface IRoute extends ng.route.IRoute { - title?: string | {(...args: any[]) : string}; + title?: string | { (...args: any[]): string }; } export interface IRouteProvider extends ng.route.IRouteProvider { @@ -336,14 +336,14 @@ declare namespace che { environments: { [envName: string]: any; }; - projects?: Array ; - commands?: Array ; + projects?: Array; + commands?: Array; attributes?: IWorkspaceConfigAttributes; } export interface IWorkspaceConfigAttributes { persistVolumes?: 'false' | 'true'; // explicitly indicates turning the ephemeral mode on - asyncPersist?:'false' | 'true'; // explicitly indicates turning the asynchronus storage mode on + asyncPersist?: 'false' | 'true'; // explicitly indicates turning the asynchronous storage mode on editor?: string; plugins?: string; } @@ -351,8 +351,8 @@ declare namespace che { export interface IWorkspaceDevfile { apiVersion: string; components?: Array; - projects?: Array ; - commands?: Array ; + projects?: Array; + commands?: Array; attributes?: che.IWorkspaceConfigAttributes; metadata: { name?: string; @@ -452,9 +452,9 @@ declare namespace che { } export interface IProfileAttributes { - firstName?: string; - lastName?: string; - [propName: string]: string | number; + firstName?: string; + lastName?: string; + [propName: string]: string | number; } export interface IProfile extends ng.resource.IResource {