diff --git a/dashboard/src/app/workspaces/create-workspace/project-source-selector/edit-project/project-metadata/project-metadata.service.ts b/dashboard/src/app/workspaces/create-workspace/project-source-selector/edit-project/project-metadata/project-metadata.service.ts index 0be489e9005..4b8254dbfc6 100644 --- a/dashboard/src/app/workspaces/create-workspace/project-source-selector/edit-project/project-metadata/project-metadata.service.ts +++ b/dashboard/src/app/workspaces/create-workspace/project-source-selector/edit-project/project-metadata/project-metadata.service.ts @@ -73,8 +73,6 @@ export class ProjectMetadataService implements IEditingProgress { * @return {che.IProjectTemplate} */ getProjectTemplate(): che.IProjectTemplate { - this.projectTemplate.path = '/' + this.projectTemplate.name.replace(/[^\w-_]/g, '_'); - return this.projectTemplate; } diff --git a/dashboard/src/app/workspaces/create-workspace/project-source-selector/project-source-selector.service.ts b/dashboard/src/app/workspaces/create-workspace/project-source-selector/project-source-selector.service.ts index cd42bd49036..0f6ace758c7 100644 --- a/dashboard/src/app/workspaces/create-workspace/project-source-selector/project-source-selector.service.ts +++ b/dashboard/src/app/workspaces/create-workspace/project-source-selector/project-source-selector.service.ts @@ -92,7 +92,6 @@ export class ProjectSourceSelectorService { // update name and path const newName = this.getUniqueName(origName); projectTemplate.name = newName; - projectTemplate.path = '/' + newName.replace(/[^\w-_]/g, '_'); } this.projectTemplates.push(projectTemplate); diff --git a/dashboard/src/app/workspaces/workspace-details/workspace-projects/workspace-details-projects.controller.ts b/dashboard/src/app/workspaces/workspace-details/workspace-projects/workspace-details-projects.controller.ts index 88f2b003b78..573b2ab95a3 100644 --- a/dashboard/src/app/workspaces/workspace-details/workspace-projects/workspace-details-projects.controller.ts +++ b/dashboard/src/app/workspaces/workspace-details/workspace-projects/workspace-details-projects.controller.ts @@ -170,12 +170,10 @@ export class WorkspaceDetailsProjectsCtrl { projectTemplates.forEach((projectTemplate: che.IProjectTemplate) => { const origName = projectTemplate.name; - if (this.isProjectNameUnique(origName) === false) { // update name, displayName and path const newName = this.getUniqueName(origName); projectTemplate.name = newName; - projectTemplate.path = '/' + newName.replace(/[^\w-_]/g, '_'); } if (!projectTemplate.type && projectTemplate.projectType) { diff --git a/dashboard/src/components/api/workspace/workspace-data-manager.ts b/dashboard/src/components/api/workspace/workspace-data-manager.ts index 8881c252a46..0acaa6ad545 100644 --- a/dashboard/src/components/api/workspace/workspace-data-manager.ts +++ b/dashboard/src/components/api/workspace/workspace-data-manager.ts @@ -124,7 +124,7 @@ export class WorkspaceDataManager { workspace.config.projects.push(projectTemplate); } else if (workspace.devfile) { let project = { - name: projectTemplate.displayName, + name: projectTemplate.name, source: { type: projectTemplate.source.type, location: projectTemplate.source.location diff --git a/dashboard/src/components/github/github-service.ts b/dashboard/src/components/github/github-service.ts index 6e3a8d57d0c..913995c6ac0 100644 --- a/dashboard/src/components/github/github-service.ts +++ b/dashboard/src/components/github/github-service.ts @@ -124,10 +124,10 @@ export class GitHubService { .factory('gitHubTokenStore', function () { return { setToken: function (token: string) { - sessionStorage.githubToken = token; + sessionStorage.setItem('githubToken', token); }, getToken: function () { - return sessionStorage.githubToken; + return sessionStorage.getItem('githubToken'); } }; }).factory('gitHubApiUtils', ['gitHubApiUrlRoot', function (gitHubApiUrlRoot: string) {