Skip to content

Commit

Permalink
CHE-4061 Adapt dashboard to work with workspace key in new format
Browse files Browse the repository at this point in the history
According to new workspace key format changes URL to
dashboard workspace details team looks like
{HOST}/dashboard/#/workspace/namespace/namespace_part_2/workspaceName
  • Loading branch information
Sergii Leschenko committed Feb 9, 2017
1 parent d3830b6 commit 0929620
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dashboard/src/app/ide/ide-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class IdeConfig {
// config routes
register.app.config(function ($routeProvider) {
$routeProvider.accessWhen('/ide', ideProvider)
.accessWhen('/ide/:namespace/:workspaceName', ideProvider);
.accessWhen('/ide/:namespace*/:workspaceName', ideProvider);

});
}
Expand Down
2 changes: 1 addition & 1 deletion dashboard/src/app/projects/projects-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export class ProjectsConfig {

// config routes
register.app.config(function ($routeProvider) {
$routeProvider.accessWhen('/project/:namespace/:workspaceName/:projectName', {
$routeProvider.accessWhen('/project/:namespace*/:workspaceName/:projectName', {
title: (params) => {return params.workspaceName + ' | ' + params.projectName},
templateUrl: 'app/projects/project-details/project-details.html',
controller: 'ProjectDetailsController',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ export class WorkspaceDetailsController {
if (this.cheWorkspace.getWorkspaceByName(this.namespace, this.workspaceName)) {
defer.resolve();
} else {
this.cheWorkspace.fetchWorkspaceDetails(this.namespace + ':' + this.workspaceName).then(() => {
this.cheWorkspace.fetchWorkspaceDetails(this.namespace + '/' + this.workspaceName).then(() => {
defer.resolve();
}, (error: any) => {
if (error.status === 304) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export class WorkspaceDetailsProjectsCtrl {

this.namespace = $route.current.params.namespace;
this.workspaceName = $route.current.params.workspaceName;
this.workspaceKey = this.namespace + ':' + this.workspaceName;
this.workspaceKey = this.namespace + '/' + this.workspaceName;

let preferences = cheAPI.getPreferences().getPreferences();

Expand Down
4 changes: 2 additions & 2 deletions dashboard/src/app/workspaces/workspaces-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ export class WorkspacesConfig {
controller: 'ListWorkspacesCtrl',
controllerAs: 'listWorkspacesCtrl'
})
.accessWhen('/workspace/:namespace/:workspaceName', locationProvider)
.accessWhen('/workspace/:namespace/:workspaceName/:page', locationProvider)
.accessWhen('/workspace/:namespace*/:workspaceName', locationProvider)
.accessWhen('/workspace/:namespace*/:workspaceName/:page', locationProvider)
.accessWhen('/create-workspace', {
title: 'New Workspace',
templateUrl: 'app/workspaces/workspace-details/workspace-details.html',
Expand Down

0 comments on commit 0929620

Please sign in to comment.