-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dashboard: improve a workspace creation flow (#8338)
* add che-button-dropdown2 directive and unit tests Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com> * replace "Create" button with dropdown button in top of Create WS page Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com> * add after-creation-dialog component, show it on 'Create' button is clicked Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com> * replace unused dropdown component with new one - remove che-button-dropdown - rename che-button-dropdown2 => che-button-dropdown Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com> * fix aligning Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
- Loading branch information
Showing
16 changed files
with
648 additions
and
208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
...app/workspaces/create-workspace/after-creation-dialog/after-creation-dialog.controller.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* Copyright (c) 2015-2018 Red Hat, Inc. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Red Hat, Inc. - initial API and implementation | ||
*/ | ||
'use strict'; | ||
|
||
export class AfterCreationDialogController { | ||
|
||
/** | ||
* Service for displaying dialogs. | ||
*/ | ||
private $mdDialog: ng.material.IDialogService; | ||
|
||
/** | ||
* Default constructor that is using resource | ||
* @ngInject for Dependency injection | ||
*/ | ||
constructor($mdDialog: ng.material.IDialogService) { | ||
this.$mdDialog = $mdDialog; | ||
} | ||
|
||
/** | ||
* It will hide the dialog box. | ||
*/ | ||
close(): void { | ||
this.$mdDialog.cancel(); | ||
} | ||
|
||
/** | ||
* Opens a workspace in IDE. | ||
*/ | ||
openWorkspace(): any { | ||
return this.$mdDialog.hide(); | ||
} | ||
|
||
/** | ||
* Opens the Workspace Details page. | ||
*/ | ||
editWorkspace(): void { | ||
this.$mdDialog.cancel(); | ||
} | ||
|
||
} |
34 changes: 34 additions & 0 deletions
34
src/app/workspaces/create-workspace/after-creation-dialog/after-creation-dialog.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<!-- | ||
Copyright (c) 2015-2018 Red Hat, Inc. | ||
All rights reserved. This program and the accompanying materials | ||
are made available under the terms of the Eclipse Public License v1.0 | ||
which accompanies this distribution, and is available at | ||
http://www.eclipse.org/legal/epl-v10.html | ||
Contributors: | ||
Red Hat, Inc. - initial API and implementation | ||
--> | ||
<che-popup title="Workspace Is Created" | ||
on-close="afterCreationDialogController.close()"> | ||
<div class="after-creation-dialog"> | ||
|
||
<div class="after-creation-dialog-content"> | ||
<p>Workspace was successfully created.</p> | ||
<p>You may continue editing workspace or open it in IDE.</p> | ||
</div> | ||
|
||
<div flex | ||
layout="row" | ||
layout-align="end center"> | ||
<che-button-primary che-button-title="Edit" | ||
ng-click="afterCreationDialogController.editWorkspace()"> | ||
</che-button-primary> | ||
<che-button-default che-button-title="Open In IDE" | ||
ng-click="afterCreationDialogController.openWorkspace()"> | ||
</che-button-default> | ||
</div> | ||
|
||
</div> | ||
</che-popup> |
5 changes: 5 additions & 0 deletions
5
src/app/workspaces/create-workspace/after-creation-dialog/after-creation-dialog.styl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.after-creation-dialog | ||
width 100% | ||
|
||
.after-creation-dialog-content | ||
margin 20px 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.