CODENVY-933: remove snapshot stuff from dashboard

Signed-off-by: Ann Shumilova <ashumilova@codenvy.com>
6.19.x
Ann Shumilova 2016-10-11 10:59:32 +03:00
parent 8bc8beb2d8
commit 0beddbd90e
4 changed files with 1 additions and 43 deletions

View File

@ -40,12 +40,6 @@ export class NavbarRecentWorkspacesController {
icon: 'fa fa-stop',
_onclick: (workspaceId) => { this.stopRecentWorkspace(workspaceId) }
},
{
name: 'Snapshot',
scope: 'RUNNING',
icon: 'fa fa-clock-o',
_onclick: (workspaceId) => { this.createSnapshotRecentWorkspace(workspaceId) }
},
// stopped
{
name: 'Run',
@ -185,16 +179,6 @@ export class NavbarRecentWorkspacesController {
});
}
/**
* Creates snapshot of specified workspace
* @param workspaceId {String} workspace id
*/
createSnapshotRecentWorkspace(workspaceId) {
this.cheWorkspace.createSnapshot(workspaceId).then(() => {}, (error) => {
this.$log.error(error);
});
}
/**
* Emit event to move workspace immediately
* to top of the recent workspaces list

View File

@ -484,16 +484,6 @@ export class WorkspaceDetailsController {
});
}
/**
* Creates snapshot of workspace
*/
createSnapshotWorkspace(): void {
this.cheWorkspace.createSnapshot(this.workspaceId).then(() => {}, (error: any) => {
this.cheNotification.showError(error.data.message !== null ? error.data.message : 'Creating snapshot failed.');
this.$log.error(error);
});
}
/**
* Register forms
*

View File

@ -81,11 +81,6 @@
che-button-title="Stop" name="stopButton"
ng-click="workspaceDetailsController.stopWorkspace()"></che-button-default>
</div>
<div>
<che-button-primary-flat ng-disabled="(workspaceDetailsController.getWorkspaceStatus() !== 'RUNNING')"
che-button-title="Snapshot" name="snapshotButton"
ng-click="workspaceDetailsController.createSnapshotWorkspace()"></che-button-primary-flat>
</div>
</div>
</div>
</che-label-container>

View File

@ -61,8 +61,7 @@ export class CheWorkspace {
deleteProject: {method: 'DELETE', url : '/api/workspace/:workspaceId/project/:path'},
stopWorkspace: {method: 'DELETE', url : '/api/workspace/:workspaceId/runtime'},
startWorkspace: {method: 'POST', url : '/api/workspace/:workspaceId/runtime?environment=:envName'},
addCommand: {method: 'POST', url: '/api/workspace/:workspaceId/command'},
createSnapshot: {method: 'POST', url: '/api/workspace/:workspaceId/snapshot'}
addCommand: {method: 'POST', url: '/api/workspace/:workspaceId/command'}
}
);
@ -496,14 +495,4 @@ export class CheWorkspace {
});
}
}
/**
* Create snapshot of workspace
* @param workspaceId {String} workspace id
* @returns {*}
*/
createSnapshot(workspaceId) {
return this.remoteWorkspaceAPI.createSnapshot({workspaceId : workspaceId}, {}).$promise;
}
}