From 735469dad66483359dc34450f1125d7d7d4000dc Mon Sep 17 00:00:00 2001 From: Oleksii Kurinnyi Date: Fri, 6 May 2016 11:09:29 +0300 Subject: [PATCH] CHE-1095: add new UD/IDE navigation experience Goals: - revamp the left navbar - remove the mobile responsiveness - add ability to jump into recent workspace - improve the branding/consistency between UD/IDE Signed-off-by: Oleksii Kurinnyi --- .../src/app/colors/che-color.constant.js | 1 + dashboard/src/app/colors/che-colors.json | 1 + dashboard/src/app/colors/che-colors.styl | 2 +- .../src/app/dashboard/dashboard.controller.js | 7 +- dashboard/src/app/ide/ide-config.js | 16 -- .../ide-iframe-button-link.controller.js | 15 +- .../ide-iframe-button-link.html | 5 +- .../ide-iframe-button-link.styl | 12 +- .../ide/ide-iframe/ide-iframe.controller.js | 21 -- .../app/ide/ide-iframe/ide-iframe.service.js | 26 ++- .../src/app/ide/ide-iframe/ide-iframe.styl | 2 +- .../ide-list-item-navbar.controller.js | 45 ---- .../ide-list-item-navbar.html | 8 - .../ide-list-item-navbar.styl | 2 - .../ide/ide-loader/ide-loader.controller.js | 64 ------ .../ide/ide-loader/ide-loader.directive.js | 36 --- .../src/app/ide/ide-loader/ide-loader.html | 41 ---- .../app/ide/ide-loader/ide-loader.service.js | 49 ----- .../src/app/ide/ide-loader/ide-loader.styl | 61 ------ dashboard/src/app/ide/ide.controller.js | 29 +-- dashboard/src/app/ide/ide.html | 33 +-- dashboard/src/app/ide/ide.service.js | 153 ++++--------- dashboard/src/app/ide/ide.styl | 16 ++ dashboard/src/app/index.styl | 30 ++- dashboard/src/app/navbar/navbar-config.js | 11 + .../navbar-dropdown-menu.controller.js | 56 +++++ .../navbar-dropdown-menu.directive.js | 155 +++++++++++++ .../navbar-dropdown-menu.html | 14 ++ .../navbar-dropdown-menu.styl | 51 +++++ .../app/navbar/navbar-selected.directive.js | 36 +-- dashboard/src/app/navbar/navbar-selected.styl | 4 + dashboard/src/app/navbar/navbar-theme.styl | 13 ++ dashboard/src/app/navbar/navbar.controller.js | 25 ++- dashboard/src/app/navbar/navbar.html | 63 ++---- dashboard/src/app/navbar/navbar.styl | 131 ++++++++--- .../recent-workspaces.controller.js | 206 ++++++++++++++++++ .../recent-workspaces.directive.js} | 23 +- .../recent-workspaces/recent-workspaces.html | 39 ++++ .../recent-workspaces/recent-workspaces.styl | 39 ++++ .../create-project.controller.js | 22 +- .../list-projects/list-projects.controller.js | 4 +- .../create-workspace.controller.js | 19 +- .../list-workspaces.controller.js | 4 +- .../workspace-item/workspace-item.html | 2 +- .../workspace-details.controller.js | 4 +- .../workspace-details/workspace-details.html | 6 +- .../workspace-status-indicator.html | 16 -- .../workspace-status-indicator.directive.js | 56 +++++ .../workspace-status-indicator.styl | 20 +- .../workspace-status.directive.js} | 8 +- .../workspace-status/workspace-status.html | 4 + .../workspace-status/workspace-status.styl | 9 + .../src/app/workspaces/workspaces-config.js | 4 +- .../src/assets/branding/che-logo-text.svg | 27 +++ dashboard/src/assets/branding/product.json | 1 + dashboard/src/assets/fonts/che.eot | Bin 4640 -> 5052 bytes dashboard/src/assets/fonts/che.svg | 34 ++- dashboard/src/assets/fonts/che.ttf | Bin 4492 -> 4904 bytes dashboard/src/assets/fonts/che.woff | Bin 2956 -> 3180 bytes dashboard/src/assets/styles/che-font.css | 38 +++- dashboard/src/assets/svg/dashboard.svg | 25 +++ dashboard/src/assets/svg/factory.svg | 22 ++ dashboard/src/assets/svg/project.svg | 55 +++++ dashboard/src/assets/svg/workspace.svg | 24 ++ .../components/api/che-workspace.factory.js | 13 +- .../components/attribute/attribute-config.js | 6 +- .../click/che-on-right-click.directive.js | 52 +++++ .../touch/che-on-long-touch.directive.js | 64 ++++++ .../branding/che-branding.factory.js | 2 + .../components/widget/panel/che-panel.styl | 2 +- .../widget/toolbar/che-toolbar.directive.js | 6 - .../widget/toolbar/che-toolbar.styl | 5 - dashboard/src/index.html | 11 +- .../che/ide/CoreLocalizationConstant.java | 12 - .../RedirectToDashboardProjectsAction.java | 39 ---- .../RedirectToDashboardWorkspacesAction.java | 39 ---- .../che/ide/client/BootstrapController.java | 13 ++ .../core/StandardComponentInitializer.java | 14 +- .../ide/CoreLocalizationConstant.properties | 4 - .../che-plugin-ext-dashboard/pom.xml | 14 +- .../client/DashboardLocalizationConstant.java | 8 +- .../dashboard/client/DashboardResources.java | 8 +- .../client/RedirectToDashboardAction.java | 74 +++++-- .../ide/ext/dashboard/client/Dashboard.css | 85 +------- .../DashboardLocalizationConstant.properties | 3 +- .../icons/dashboardButtonBackground.svg | 32 --- .../client/icons/dashboardButtonIcon.svg | 28 --- 87 files changed, 1475 insertions(+), 1004 deletions(-) delete mode 100644 dashboard/src/app/ide/ide-list-item-navbar/ide-list-item-navbar.controller.js delete mode 100644 dashboard/src/app/ide/ide-list-item-navbar/ide-list-item-navbar.html delete mode 100644 dashboard/src/app/ide/ide-list-item-navbar/ide-list-item-navbar.styl delete mode 100644 dashboard/src/app/ide/ide-loader/ide-loader.controller.js delete mode 100644 dashboard/src/app/ide/ide-loader/ide-loader.directive.js delete mode 100644 dashboard/src/app/ide/ide-loader/ide-loader.html delete mode 100644 dashboard/src/app/ide/ide-loader/ide-loader.service.js delete mode 100644 dashboard/src/app/ide/ide-loader/ide-loader.styl create mode 100644 dashboard/src/app/navbar/navbar-dropdown-menu/navbar-dropdown-menu.controller.js create mode 100644 dashboard/src/app/navbar/navbar-dropdown-menu/navbar-dropdown-menu.directive.js create mode 100644 dashboard/src/app/navbar/navbar-dropdown-menu/navbar-dropdown-menu.html create mode 100644 dashboard/src/app/navbar/navbar-dropdown-menu/navbar-dropdown-menu.styl create mode 100644 dashboard/src/app/navbar/navbar-selected.styl create mode 100644 dashboard/src/app/navbar/navbar-theme.styl create mode 100644 dashboard/src/app/navbar/recent-workspaces/recent-workspaces.controller.js rename dashboard/src/app/{ide/ide-list-item-navbar/ide-list-item-navbar.directive.js => navbar/recent-workspaces/recent-workspaces.directive.js} (52%) create mode 100644 dashboard/src/app/navbar/recent-workspaces/recent-workspaces.html create mode 100644 dashboard/src/app/navbar/recent-workspaces/recent-workspaces.styl delete mode 100644 dashboard/src/app/workspaces/workspace-status-indicator/workspace-status-indicator.html create mode 100644 dashboard/src/app/workspaces/workspace-status/workspace-status-indicator.directive.js rename dashboard/src/app/workspaces/{workspace-status-indicator => workspace-status}/workspace-status-indicator.styl (53%) rename dashboard/src/app/workspaces/{workspace-status-indicator/workspace-status-indicator.directive.js => workspace-status/workspace-status.directive.js} (69%) create mode 100644 dashboard/src/app/workspaces/workspace-status/workspace-status.html create mode 100644 dashboard/src/app/workspaces/workspace-status/workspace-status.styl create mode 100644 dashboard/src/assets/branding/che-logo-text.svg create mode 100644 dashboard/src/assets/svg/dashboard.svg create mode 100644 dashboard/src/assets/svg/factory.svg create mode 100644 dashboard/src/assets/svg/project.svg create mode 100644 dashboard/src/assets/svg/workspace.svg create mode 100644 dashboard/src/components/attribute/click/che-on-right-click.directive.js create mode 100644 dashboard/src/components/attribute/touch/che-on-long-touch.directive.js delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/RedirectToDashboardProjectsAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/RedirectToDashboardWorkspacesAction.java delete mode 100644 plugins/plugin-dashboard/che-plugin-ext-dashboard/src/main/resources/org/eclipse/che/ide/ext/dashboard/client/icons/dashboardButtonBackground.svg delete mode 100644 plugins/plugin-dashboard/che-plugin-ext-dashboard/src/main/resources/org/eclipse/che/ide/ext/dashboard/client/icons/dashboardButtonIcon.svg diff --git a/dashboard/src/app/colors/che-color.constant.js b/dashboard/src/app/colors/che-color.constant.js index 525752a2ad8..0e348dc16ce 100644 --- a/dashboard/src/app/colors/che-color.constant.js +++ b/dashboard/src/app/colors/che-color.constant.js @@ -21,6 +21,7 @@ export class CheColorsConfig { '$che-green-color': '#60AB0A', '$che-purple-color': '#4E5A96', '$che-white-color' : '#FFFFFF', + '$che-black-color' : '#000000', '$che-ide-background-color' : '#292C2F ', '$che-logo-yellow-color' : '#FDB940', '$che-logo-blue-color' : '#525C86', diff --git a/dashboard/src/app/colors/che-colors.json b/dashboard/src/app/colors/che-colors.json index 94d3f643502..b3c3fbe85b2 100644 --- a/dashboard/src/app/colors/che-colors.json +++ b/dashboard/src/app/colors/che-colors.json @@ -5,6 +5,7 @@ "$che-green-color": "#60AB0A", "$che-purple-color": "#4E5A96", "$che-white-color" : "#FFFFFF", + "$che-black-color" : "#000000", "$che-ide-background-color" : "#292C2F ", "$che-logo-yellow-color" : "#FDB940", "$che-logo-blue-color" : "#525C86", diff --git a/dashboard/src/app/colors/che-colors.styl b/dashboard/src/app/colors/che-colors.styl index a8b2a62dd7b..f5e37494463 100644 --- a/dashboard/src/app/colors/che-colors.styl +++ b/dashboard/src/app/colors/che-colors.styl @@ -13,6 +13,7 @@ $error-color = $red-lipstick-color $list-separator-color = $cat-gray-color $form-element-border-color = $mouse-gray-color $white-color = $che-white-color +$black-color = $che-black-color $link-color = $che-medium-blue-color $frame-notlogged-color = $che-green-color $frame-notlogged-bg-color = alpha($che-green-color, 0.2) @@ -55,7 +56,6 @@ $che-loader-active-title-color = $che-navy-color $che-loader-background-color = darken($che-medium-blue-color, 75%) $che-loader-logs-background-color = darken($stroke-color,65%) - // box shadows box-shadow-simple() box-shadow 0 2px 1px 0 rgba(0, 0, 0, 0.15) diff --git a/dashboard/src/app/dashboard/dashboard.controller.js b/dashboard/src/app/dashboard/dashboard.controller.js index fa74335659a..d43c78e3332 100644 --- a/dashboard/src/app/dashboard/dashboard.controller.js +++ b/dashboard/src/app/dashboard/dashboard.controller.js @@ -23,9 +23,8 @@ export class DashboardController { * Default constructor * @ngInject for Dependency injection */ - constructor() { + constructor($rootScope) { + 'ngInject'; + $rootScope.showIDE = false; } - - } - diff --git a/dashboard/src/app/ide/ide-config.js b/dashboard/src/app/ide/ide-config.js index fdfbca122dd..89998509317 100644 --- a/dashboard/src/app/ide/ide-config.js +++ b/dashboard/src/app/ide/ide-config.js @@ -15,17 +15,10 @@ import IdeCtrl from './ide.controller'; import IdeSvc from './ide.service'; -import IdeLoaderCtrl from './ide-loader/ide-loader.controller'; -import IdeLoader from './ide-loader/ide-loader.directive'; -import IdeLoaderSvc from './ide-loader/ide-loader.service'; - import IdeIFrameCtrl from './ide-iframe/ide-iframe.controller'; import IdeIFrame from './ide-iframe/ide-iframe.directive'; import IdeIFrameSvc from './ide-iframe/ide-iframe.service'; -import IdeListItemNavbarCtrl from './ide-list-item-navbar/ide-list-item-navbar.controller'; -import IdeListItemNavbar from './ide-list-item-navbar/ide-list-item-navbar.directive'; - import IdeIFrameButtonLinkCtrl from './ide-iframe-button-link/ide-iframe-button-link.controller'; import IdeIFrameButtonLink from './ide-iframe-button-link/ide-iframe-button-link.directive'; @@ -35,19 +28,10 @@ export class IdeConfig { register.service('ideSvc', IdeSvc); register.controller('IdeCtrl', IdeCtrl); - - register.service('ideLoaderSvc', IdeLoaderSvc); - register.controller('IdeLoaderCtrl', IdeLoaderCtrl); - register.directive('ideLoader', IdeLoader); - register.service('ideIFrameSvc', IdeIFrameSvc); register.controller('IdeIFrameCtrl', IdeIFrameCtrl); register.directive('ideIframe', IdeIFrame); - register.controller('IdeListItemNavbarCtrl', IdeListItemNavbarCtrl); - register.directive('ideListItemNavbar', IdeListItemNavbar); - - register.controller('IdeIFrameButtonLinkCtrl', IdeIFrameButtonLinkCtrl); register.directive('ideIframeButtonLink', IdeIFrameButtonLink); diff --git a/dashboard/src/app/ide/ide-iframe-button-link/ide-iframe-button-link.controller.js b/dashboard/src/app/ide/ide-iframe-button-link/ide-iframe-button-link.controller.js index 36c26a0bcfe..3662dc1d60b 100644 --- a/dashboard/src/app/ide/ide-iframe-button-link/ide-iframe-button-link.controller.js +++ b/dashboard/src/app/ide/ide-iframe-button-link/ide-iframe-button-link.controller.js @@ -20,10 +20,23 @@ class IdeIFrameButtonLinkCtrl { * Default constructor that is using resource * @ngInject for Dependency injection */ - constructor() { + constructor($mdSidenav, $rootScope) { + this.$mdSidenav = $mdSidenav; + this.$rootScope = $rootScope; } + toggleLeftMenu() { + let isLockedOpen = this.$mdSidenav('left').isLockedOpen(), + isOpen = this.$mdSidenav('left').isOpen(); + if (isOpen || isLockedOpen) { + this.$rootScope.hideNavbar = true; + this.$mdSidenav('left').close(); + } else { + this.$rootScope.hideNavbar = isLockedOpen; + this.$mdSidenav('left').toggle(); + } + } } diff --git a/dashboard/src/app/ide/ide-iframe-button-link/ide-iframe-button-link.html b/dashboard/src/app/ide/ide-iframe-button-link/ide-iframe-button-link.html index 585ce6e24fe..b9e8d035e8f 100644 --- a/dashboard/src/app/ide/ide-iframe-button-link/ide-iframe-button-link.html +++ b/dashboard/src/app/ide/ide-iframe-button-link/ide-iframe-button-link.html @@ -1,3 +1,4 @@ -
- +
diff --git a/dashboard/src/app/workspaces/workspace-details/workspace-details.controller.js b/dashboard/src/app/workspaces/workspace-details/workspace-details.controller.js index 6571728d062..7df92f4c614 100644 --- a/dashboard/src/app/workspaces/workspace-details/workspace-details.controller.js +++ b/dashboard/src/app/workspaces/workspace-details/workspace-details.controller.js @@ -144,9 +144,7 @@ export class WorkspaceDetailsCtrl { this.showShowMore = true; delete this.errorMessage; - this.ideSvc.init(); - this.$rootScope.loadingIDE = false; - let promise = this.ideSvc.startIde(this.workspaceDetails, true); + let promise = this.ideSvc.startIde(this.workspaceDetails); promise.then(() => { this.showShowMore = false; }, (error) => { diff --git a/dashboard/src/app/workspaces/workspace-details/workspace-details.html b/dashboard/src/app/workspaces/workspace-details/workspace-details.html index 906912ba9d5..e34f8825196 100644 --- a/dashboard/src/app/workspaces/workspace-details/workspace-details.html +++ b/dashboard/src/app/workspaces/workspace-details/workspace-details.html @@ -46,10 +46,10 @@
- +
diff --git a/dashboard/src/app/workspaces/workspace-status-indicator/workspace-status-indicator.html b/dashboard/src/app/workspaces/workspace-status-indicator/workspace-status-indicator.html deleted file mode 100644 index 2488172edfe..00000000000 --- a/dashboard/src/app/workspaces/workspace-status-indicator/workspace-status-indicator.html +++ /dev/null @@ -1,16 +0,0 @@ -
- - - - - -
-
- -
-
- - -
- {{status}} -
diff --git a/dashboard/src/app/workspaces/workspace-status/workspace-status-indicator.directive.js b/dashboard/src/app/workspaces/workspace-status/workspace-status-indicator.directive.js new file mode 100644 index 00000000000..6538d91f873 --- /dev/null +++ b/dashboard/src/app/workspaces/workspace-status/workspace-status-indicator.directive.js @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2015-2016 Codenvy, S.A. + * 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: + * Codenvy, S.A. - initial API and implementation + */ +'use strict'; + +/** + * Defines a directive for creating simple indicator of workspace's status. + * @author Oleksii Kurinnyi + */ +export class WorkspaceStatusIndicator { + + /** + * Default constructor that is using resource + * @ngInject for Dependency injection + */ + constructor () { + this.restrict = 'E'; + + this.replace = true; + + this.scope = { + status: '=cheStatus' + }; + } + + /** + * Template for the simple indicator of workspace's status + * @param element + * @param attrs + * @returns {string} the template + */ + template (element, attr) { + let emptyCircleOnStopped = attr.cheEmptyCircle; + + return '' + + '' + + '' + + '' + + '' + + '
' + + '
' + + '' + + '
' + + '
' + + '' + + '' + + '
'; + } +} diff --git a/dashboard/src/app/workspaces/workspace-status-indicator/workspace-status-indicator.styl b/dashboard/src/app/workspaces/workspace-status/workspace-status-indicator.styl similarity index 53% rename from dashboard/src/app/workspaces/workspace-status-indicator/workspace-status-indicator.styl rename to dashboard/src/app/workspaces/workspace-status/workspace-status-indicator.styl index ea8fa8bf7e8..94ed4b6bd78 100644 --- a/dashboard/src/app/workspaces/workspace-status-indicator/workspace-status-indicator.styl +++ b/dashboard/src/app/workspaces/workspace-status/workspace-status-indicator.styl @@ -1,16 +1,14 @@ -.workspace-status-indicator-circle - span - width 20px - text-shadow: 0 0 1px #000 +.workspace-status-indicator + display inline-block .workspace-status-stopped - color #d3d3d3 + color #d3d3d3 !important .workspace-status-paused - color #ecab00 + color #ecab00 !important .workspace-status-running - color #46af00 + color #46af00 !important .workspace-status-spinner .spinner width 20px @@ -23,11 +21,7 @@ margin-right 2px .workspace-status-error - color #e22812 + color #e22812 !important .workspace-status-default - color #d3d3d3 - -.workspace-status-indicator-text - padding-left 20px - color $label-info-color + color #d3d3d3 !important diff --git a/dashboard/src/app/workspaces/workspace-status-indicator/workspace-status-indicator.directive.js b/dashboard/src/app/workspaces/workspace-status/workspace-status.directive.js similarity index 69% rename from dashboard/src/app/workspaces/workspace-status-indicator/workspace-status-indicator.directive.js rename to dashboard/src/app/workspaces/workspace-status/workspace-status.directive.js index 83971948a04..3dc76a0bd35 100644 --- a/dashboard/src/app/workspaces/workspace-status-indicator/workspace-status-indicator.directive.js +++ b/dashboard/src/app/workspaces/workspace-status/workspace-status.directive.js @@ -11,11 +11,11 @@ 'use strict'; /** - * Defines a directive for creating RAM allocation slider that are working either on desktop or on mobile devices. - * It will change upon width of the screen + * Defines a directive for creating an indicator of workspace's status, which contains + * both icon and text representation of current status * @author Oleksii Kurinnyi */ -export class WorkspaceStatusIndicator { +export class WorkspaceStatus { /** * Default constructor that is using resource @@ -25,7 +25,7 @@ export class WorkspaceStatusIndicator { this.restrict = 'E'; this.replace = true; - this.templateUrl = 'app/workspaces/workspace-status-indicator/workspace-status-indicator.html'; + this.templateUrl = 'app/workspaces/workspace-status/workspace-status.html'; // scope values this.scope = { diff --git a/dashboard/src/app/workspaces/workspace-status/workspace-status.html b/dashboard/src/app/workspaces/workspace-status/workspace-status.html new file mode 100644 index 00000000000..d70f2605f7c --- /dev/null +++ b/dashboard/src/app/workspaces/workspace-status/workspace-status.html @@ -0,0 +1,4 @@ +
+ + {{status}} +
diff --git a/dashboard/src/app/workspaces/workspace-status/workspace-status.styl b/dashboard/src/app/workspaces/workspace-status/workspace-status.styl new file mode 100644 index 00000000000..0cb7abba332 --- /dev/null +++ b/dashboard/src/app/workspaces/workspace-status/workspace-status.styl @@ -0,0 +1,9 @@ +.workspace-status + + .workspace-status-indicator span + width 20px + text-shadow: 0 0 1px #000 + + .workspace-status-text + padding-left 20px + color $label-info-color !important diff --git a/dashboard/src/app/workspaces/workspaces-config.js b/dashboard/src/app/workspaces/workspaces-config.js index 1be76c7d933..8e8c39eb0c4 100644 --- a/dashboard/src/app/workspaces/workspaces-config.js +++ b/dashboard/src/app/workspaces/workspaces-config.js @@ -34,7 +34,8 @@ import {WorkspaceSelectStack} from './create-workspace/select-stack/workspace-se import {CheWorkspaceRamAllocationSliderCtrl} from './workspace-ram-slider/che-workspace-ram-allocation-slider.controller'; import {CheWorkspaceRamAllocationSlider} from './workspace-ram-slider/che-workspace-ram-allocation-slider.directive'; -import {WorkspaceStatusIndicator} from './workspace-status-indicator/workspace-status-indicator.directive'; +import {WorkspaceStatus} from './workspace-status/workspace-status.directive'; +import {WorkspaceStatusIndicator} from './workspace-status/workspace-status-indicator.directive'; import {CheStackLibraryFilterCtrl} from './create-workspace/select-stack/stack-library/stack-library-filter/che-stack-library-filter.controller'; import {CheStackLibraryFilter} from './create-workspace/select-stack/stack-library/stack-library-filter/che-stack-library-filter.directive'; @@ -75,6 +76,7 @@ export class WorkspacesConfig { register.controller('CheWorkspaceRamAllocationSliderCtrl', CheWorkspaceRamAllocationSliderCtrl); register.directive('cheWorkspaceRamAllocationSlider', CheWorkspaceRamAllocationSlider); + register.directive('workspaceStatus', WorkspaceStatus); register.directive('workspaceStatusIndicator', WorkspaceStatusIndicator); register.controller('ReadyToGoStacksCtrl', ReadyToGoStacksCtrl); diff --git a/dashboard/src/assets/branding/che-logo-text.svg b/dashboard/src/assets/branding/che-logo-text.svg new file mode 100644 index 00000000000..ffa82425d5f --- /dev/null +++ b/dashboard/src/assets/branding/che-logo-text.svg @@ -0,0 +1,27 @@ + + + + + + diff --git a/dashboard/src/assets/branding/product.json b/dashboard/src/assets/branding/product.json index 5a287a87d34..efd7e4470a5 100644 --- a/dashboard/src/assets/branding/product.json +++ b/dashboard/src/assets/branding/product.json @@ -2,6 +2,7 @@ "title": "Eclipse Che - Dashboard", "name": "Eclipse Che", "logoFile": "che-logo.svg", + "logoTextFile": "che-logo-text.svg", "favicon": "favicon.ico", "ideResources": "/ide/_app/", "helpPath": "https://www.eclipse.org/che/", diff --git a/dashboard/src/assets/fonts/che.eot b/dashboard/src/assets/fonts/che.eot index 277b502f816ac94a46a0f56bff2ec6a686c2c64a..4ae94f46b522326f6659103b1e39c1991f3a2015 100644 GIT binary patch delta 847 zcmYjOPiWI{6n-y%n{{oPc1`T;WYW2grcSrm24z?oLxd>|852Y&vF+?!+myDr4TN1h zh?~NQ;!Ok(dKd_sipVbW;K8F453)n`BFwWlwZ61Y{E{#4_rBlzUfwTx+_xDQHbVdd zp;aNx?QZ#&S5M6^9R$Fe05Fv;S(Psjp7sDRQR2k4;^NG!4=*kNaQ6YcuM2rAC%pfj zq}m2CT_6Ex(5Ce!v9D07FNkZ+uhj1&U8_%TpIZY64p6}_X98oHARw)Y%f7AMEAq$>@IsCh*uFTmz89O{ zn!hmsvy^*)aaDrr3p(p)Vae%YGN?F{%pqxUK#|>}cs6jJ9exS8piJ4x@YhAVUBY+7}#!{ps|wqTESU0Ce;g6er3(nr!&VLIgL; zZITrlfi|fLwQSREN9cwLD8e&juorJJCz*TfdCt#`ac}rR{x<)X-*G;1PnKw8LXIvL zMEX3`Gi8KhCNcgu>iY4$TPNg*?PCLslaGf^dV2(70LBPrP%{NlOC5`gh8Z&jRWs6N zI<5(#j{WhpsUmg=NrqK0;bRof(J&*a9z?a1<#>)`S;>PPY)DllpI6{nzvq&ijP`VC z@_r;pqUbE}FHf|GUip7$BOcRIG`40MVv3TH11)s5!|?FXaMpcn=)!4f$o*dc)BpUC zGBr^Pn<+6K){YDgatR}m7>`6EqOR(ymQ**&auYG=l$EFl1E^pSL(Ux~8p~O=!d2U< s=ENB*Tequ=(rnf)AD*A9)Wk~FzMjw4o##qXmgep1T&-ed^Q~9^0Y@E}+5i9m delta 449 zcmXwzKS*0q6vn^v@?JD)@|q?NA(bi^Tfw-MAW^WEj2#?GHz~LIV_x(AVIIUlAyYRU z!X1o@2;x$lk`AE=odj_ZltQ5dQI{?{x{2v|fgbp{=lh-S9PZJpy>xIg4s1Sa1+!|0 zoYmHwdUFDxF91FiEa6_;2X}xHVI|khM)~>R=Nh2qfpEK05=HGe`Gd1ptZan=m8r`8 z5i4D>yp7=4;D+!0Vn1&>1(C?bioBm@|H2X*E~T-}^CbI8TUaIYZEA~;>wSiQT&L#k zoHjoLu^tD` - + + + + diff --git a/dashboard/src/assets/fonts/che.ttf b/dashboard/src/assets/fonts/che.ttf index 861a2fa8f6cf61cb2d96ef734ce6388f4bd509c0..28344cc49bd38c9b18451ff741f84c2004ba6340 100644 GIT binary patch delta 853 zcmYjOPiWI{6n-y%nx@^Frdt!ce@vq5Xu9cE+n@{wW9VQCLu7*JBx^fc*EXdMYy)8m z9tKXCMA^-Y2Y1-Xsfg^L9z1w-p2iM!2!fskFIrz(Cw|G7_j_O7_ws(ftZEy5YufT* z0K5qR)9IpF{`}}^HvrQ`oVs3EntS>2`6U4EA%Oo?E^B5yAHK(_wnj|lNWeL?XuVB5 zk}KMa!e)J+`hB8&qF|-X$a`gv`~}MUisoV&`(d5lAELasWEQi9v5tG=0Ks!4?v|~p zJ+pIu6Cl)21-~9_Yoj4RS`zQJzWsJh8un`{j1JC>Z4a_1;7(oqPsJWjCR8dP$Jds5~t{E=p2kSYB*P~ z$<73$`vV|B5M+Aqac(m|oi)ZUwNMoR?YsfmSz#YvtOdwI1UE`ek`-#fCaDRvY|?E< z=zu9Gzy>ndi+7mQ%zgF(7vRRZ*Zd&A!oTD9oH6dnGL1~g(8Yp4$3s1niLho6qkp5W zpFFsALWbDfHozqLcxa)oM?eEejL=c3hDT77C!#{a&O_Jl2+kMo#i{1d ztN#z3h-zw*##W7lkfda!r-Aln7#n-b^eSvi$Rnzgl*unm&)0J*@9V`515%^zLc-p71PdJ zB{5@GbF-FN$p~|1+O{f7Vm@t^1{UVaRiRw5Ze-K8(A=D*^4na`_;lYCF)S*MSXq#PV;C(ai&6{EPjz%^E+kwg;0ImbTVoX=_uerld z0Ir9iq_lE!z`RTW2vGo6EuB!~; zg*|ba4-)t5YAKIF*rmQgd?=^t32nx^Ma!i&i7$DhP~5w%tO9tNWVo-k0uc$2O2V>% zXDhwa-_Q-T5#ZrjFaKxr!~8`LWQcbGXQ>p{oW%U7qQN#Wf^K$&!|V%3rvOCi@q`dT zAggA(0g|Lzb0NwuTNfZ~djw1GxY-gnMixiC%ArgR`Y4JM`vq{b1AgB}#0v{>j1t~( z3fJaq{GAXLnxZVuu^pk#-o^9AlOyVE%zJ(iB{nPjSWfmiGchAKzLw1w*r}{pCj$Hd DkJnrI diff --git a/dashboard/src/assets/fonts/che.woff b/dashboard/src/assets/fonts/che.woff index bf71646191caf9943a6bd5e4b005dc8b4ea93802..c48f1f1563911552350a8e65f49492abf66b1303 100644 GIT binary patch delta 2760 zcmV;(3ODtP7wi}mcTYw}00961000bZ01E&B000vxkrY3FA!BV}Z~y=SfB*mhlmGw% zP~nxQ9cOHLW&i*J6aWAR$N&HfxVF-?S7>EnWB>pO+yDRoG5`PoHU`S;ENEzDVE_OM z5C8xG9smFUBmrgtZ)k0FcmMzjFaQ7mEC2uiNC&L{;%skYVE_OMTmS$7CIA2cCK<*S z+-+faZ~y={3WNXv03QGV03ZP<0GDoIZDjxe3Zwu40UH1S0orUrjYM#7b94Xz3%~#X z0I2`~0R3LmO{|j$0XhL?lS2U}e*_s)fLu<7OrT;021bw^02O%#(f|Mec%1E#$qmCW z3>Qk2<0NT$frTR401N)FGVsb6?mLYR%?&kNENMHZ@=B$ zeoQCbJ&8SICo`j-X}fJRJK0HuR!h)I8zCOc3don86(Eq{0}>Jv5`qs%i0}MF{sbbN z>Y0$Z-Q_B~%D(s9bI&a%f0#SIVn1Vo85S`1l1fwN(_q@Xj80EaMfI$zKF_jDSMzGV zsOOCF!jwOThmYVq>Hj2r?D-yIj5!_r-I1W7hKHfEaEep zbFZ*OMJS|_QV7qIFBV1NMS)f#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!x{kwc4f4GPRY0{AlG z6*XADV{JnvL&+r31-N_-QM!zgl2YaAD)qPkM1oBb7|@vR$q0e4AC@FDJOxxR2li!+ z+Z>Vf)C4BB3=nhH&jV0^Q50vDWgRd}e|Aqej2?ie1U{%_=G>8tFhY!x_k+mykULs? z<;xHC=;x?M4KN-{pxpE*H`Sqr`1%f_9%}9yK*uPWeYL==84hBiGp>^rWoy=^Ojnei zx-YNuga}K_Lk&&jVT=M38_t46fB4o{;B?0K#MnUM(~P1p51-J!?VBBMBnZObe~yL? z(!kHa2>c;&HdJI}+qvlu{(f0hJ*rBxpX#!`X*>1?U01e!E@do{4kSS7#z58B^}AB#+!e~M>fCvL@O;tde?!WycQeNDWg*%!xgxR>5SM*ge8>s@29ptOK0!@NLIgQ+}+vO zoSer<2^l(a_9P;T>`J@meqb!gGSN&YEeMlgrQJIuNuXj>st6MUimC`k=-e{20h>BN z5~5gvp(MU_4y*(pH1GF_e-=A|6g#m>tijXyaTiec*xI0Wzo6E;!JX_|p4+jWuV51I zPAj794DeN_yI|>Ba~g&tr%##hIDGv1t(3PP`*gj%dz0rWjvOERKgU(no&W%NoMT{Q zU|;~^*t{dR;`wd9GH^4b07V!sUC*tA(f^ + + + + + + + + + + + + + diff --git a/dashboard/src/assets/svg/factory.svg b/dashboard/src/assets/svg/factory.svg new file mode 100644 index 00000000000..d5b8c8986c2 --- /dev/null +++ b/dashboard/src/assets/svg/factory.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + diff --git a/dashboard/src/assets/svg/project.svg b/dashboard/src/assets/svg/project.svg new file mode 100644 index 00000000000..c441809e140 --- /dev/null +++ b/dashboard/src/assets/svg/project.svg @@ -0,0 +1,55 @@ + + + + + + + + + + + + diff --git a/dashboard/src/assets/svg/workspace.svg b/dashboard/src/assets/svg/workspace.svg new file mode 100644 index 00000000000..b7987c23136 --- /dev/null +++ b/dashboard/src/assets/svg/workspace.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + diff --git a/dashboard/src/components/api/che-workspace.factory.js b/dashboard/src/components/api/che-workspace.factory.js index b04f23de649..ddf5036d513 100644 --- a/dashboard/src/components/api/che-workspace.factory.js +++ b/dashboard/src/components/api/che-workspace.factory.js @@ -56,7 +56,8 @@ 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'} + addCommand: {method: 'POST', url: '/api/workspace/:workspaceId/command'}, + createSnapshot: {method: 'POST', url: '/api/workspace/:workspaceId/snapshot'} } ); } @@ -426,4 +427,14 @@ export class CheWorkspace { }); } } + + /** + * Create snapshot of workspace + * @param workspaceId {String} workspace id + * @returns {*} + */ + createSnapshot(workspaceId) { + return this.remoteWorkspaceAPI.createSnapshot({workspaceId : workspaceId}, {}).$promise; + } + } diff --git a/dashboard/src/components/attribute/attribute-config.js b/dashboard/src/components/attribute/attribute-config.js index d25d4d62ad9..12338697a31 100644 --- a/dashboard/src/components/attribute/attribute-config.js +++ b/dashboard/src/components/attribute/attribute-config.js @@ -15,7 +15,8 @@ import {CheAutoScroll} from './scroll/che-automatic-scroll.directive'; import {CheListOnScrollBottom} from './scroll/che-list-on-scroll-bottom.directive'; import {CheReloadHref} from './reload-href/che-reload-href.directive'; import {CheFormatOutput} from './format-output/che-format-output.directive'; - +import {CheOnLongTouch} from './touch/che-on-long-touch.directive'; +import {CheOnRightClick} from './click/che-on-right-click.directive'; export class AttributeConfig { @@ -31,5 +32,8 @@ export class AttributeConfig { register.directive('cheFormatOutput', CheFormatOutput); + register.directive('cheOnLongTouch', CheOnLongTouch); + + register.directive('cheOnRightClick', CheOnRightClick); } } diff --git a/dashboard/src/components/attribute/click/che-on-right-click.directive.js b/dashboard/src/components/attribute/click/che-on-right-click.directive.js new file mode 100644 index 00000000000..3fda8a6f276 --- /dev/null +++ b/dashboard/src/components/attribute/click/che-on-right-click.directive.js @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2015-2016 Codenvy, S.A. + * 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: + * Codenvy, S.A. - initial API and implementation + */ +'use strict'; + +/** + * @ngdoc directive + * @name components.directive:cheOnRightClick + * @restrict A + * @function + * @element + * + * @description + * `che-on-right-click` defines an attribute for adding a callback on right mouse click + * + * @usage + *
+ * + * @author Oleksii Kurinnyi + */ +export class CheOnRightClick { + + /** + * Default constructor that is using resource + * @ngInject for Dependency injection + */ + constructor() { + this.restrict = 'A'; + } + + /** + * Keep reference to the model controller + */ + link($scope, $element, attrs) { + $element.bind('contextmenu', (event) => { + event.stopPropagation(); + event.preventDefault(); + + $scope.$apply(() => { + $scope.$eval(attrs.cheOnRightClick); + }); + }); + } + +} diff --git a/dashboard/src/components/attribute/touch/che-on-long-touch.directive.js b/dashboard/src/components/attribute/touch/che-on-long-touch.directive.js new file mode 100644 index 00000000000..0f6652e1b40 --- /dev/null +++ b/dashboard/src/components/attribute/touch/che-on-long-touch.directive.js @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2015-2016 Codenvy, S.A. + * 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: + * Codenvy, S.A. - initial API and implementation + */ +'use strict'; + +/** + * @ngdoc directive + * @name components.directive:cheOnLongTouch + * @restrict A + * @function + * @element + * + * @description + * `che-on-long-touch` defines an attribute for adding a callback on long touch or long mouse click + * + * @usage + *
+ * + * @author Oleksii Kurinnyi + */ +export class CheOnLongTouch { + + /** + * Default constructor that is using resource + * @ngInject for Dependency injection + */ + constructor($timeout) { + this.$timeout = $timeout; + + this.restrict = 'A'; + } + + /** + * Keep reference to the model controller + */ + link($scope, element, attrs) { + $scope.longTouch = false; + element.on('touchstart mousedown', (event) => { + $scope.longTouch = true; + + this.$timeout(() => { + if ($scope.longTouch && event.which !== 3) { + element.mouseup(); + + $scope.$apply(() => { + $scope.$eval(attrs.cheOnLongTouch); + $scope.longTouch = false; + }); + } + }, 500); + }); + element.on('touchend mouseup', () => { + $scope.longTouch = false; + }); + } + +} diff --git a/dashboard/src/components/branding/che-branding.factory.js b/dashboard/src/components/branding/che-branding.factory.js index 8c314e8b33f..6ce4b75fb9d 100644 --- a/dashboard/src/components/branding/che-branding.factory.js +++ b/dashboard/src/components/branding/che-branding.factory.js @@ -41,6 +41,7 @@ export class CheBranding { title: brandingData.title, name: brandingData.name, logoURL: assetPrefix + brandingData.logoFile, + logoText: assetPrefix + brandingData.logoTextFile, favicon : assetPrefix + brandingData.favicon, ideResourcesPath : brandingData.ideResources, helpPath : brandingData.helpPath, @@ -53,6 +54,7 @@ export class CheBranding { this.name = this.$rootScope.branding.name; this.productFavicon = this.$rootScope.branding.productFavicon; this.productLogo = this.$rootScope.branding.logoURL; + this.productLogoText = this.$rootScope.branding.logoText; this.ideResourcesPath = this.$rootScope.branding.ideResourcesPath; this.helpPath = this.$rootScope.branding.helpPath; this.helpTitle = this.$rootScope.branding.helpTitle; diff --git a/dashboard/src/components/widget/panel/che-panel.styl b/dashboard/src/components/widget/panel/che-panel.styl index 538cb30b842..e96e89ecb5c 100644 --- a/dashboard/src/components/widget/panel/che-panel.styl +++ b/dashboard/src/components/widget/panel/che-panel.styl @@ -8,7 +8,7 @@ position: relative .che-panel .che-panel-title - color $background-color + color $mouse-gray-color margin-left 10px font-size 1.2em outline 0 diff --git a/dashboard/src/components/widget/toolbar/che-toolbar.directive.js b/dashboard/src/components/widget/toolbar/che-toolbar.directive.js index 2734a991631..fb5671e743a 100644 --- a/dashboard/src/components/widget/toolbar/che-toolbar.directive.js +++ b/dashboard/src/components/widget/toolbar/che-toolbar.directive.js @@ -95,12 +95,6 @@ export class CheToolbar { var template = '
\n' + '
'; - //toggle menu button - template += '
' - + '
' - + '' - + '
'; - if (breadcrumbHref) { template += '' diff --git a/dashboard/src/components/widget/toolbar/che-toolbar.styl b/dashboard/src/components/widget/toolbar/che-toolbar.styl index f226f8d3b6d..63329d61e28 100644 --- a/dashboard/src/components/widget/toolbar/che-toolbar.styl +++ b/dashboard/src/components/widget/toolbar/che-toolbar.styl @@ -20,11 +20,6 @@ $toolbar-height = 60px .che-toolbar md-toolbar min-height $toolbar-height -.che-toolbar-section - padding 0px 15px - border-right 1px solid $stroke-color - height $toolbar-height - .che-toolbar-breadcrumb margin-left 10px diff --git a/dashboard/src/index.html b/dashboard/src/index.html index db0669ab1a9..a67efc2801f 100644 --- a/dashboard/src/index.html +++ b/dashboard/src/index.html @@ -50,13 +50,12 @@

You are using an outdated browser. Please upgrade your browser to improve your experience.

- - + + -
-
-
- +
+
+
diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/CoreLocalizationConstant.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/CoreLocalizationConstant.java index 44ff1440f2b..445f2c25127 100644 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/CoreLocalizationConstant.java +++ b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/CoreLocalizationConstant.java @@ -363,18 +363,6 @@ public interface CoreLocalizationConstant extends Messages { @Key("action.showHiddenFiles.description") String actionShowHiddenFilesDescription(); - @Key("action.redirectToDashboardProjects.title") - String actionRedirectToDashboardProjectsTitle(); - - @Key("action.redirectToDashboardProjects.description") - String actionRedirectToDashboardProjectsDescription(); - - @Key("action.redirectToDashboardWorkspaces.title") - String actionRedirectToDashboardWorkspacesTitle(); - - @Key("action.redirectToDashboardWorkspaces.description") - String actionRedirectToDashboardWorkspacesDescription(); - /* NewResource */ @Key("newResource.title") String newResourceTitle(String title); diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/RedirectToDashboardProjectsAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/RedirectToDashboardProjectsAction.java deleted file mode 100644 index c923b90c192..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/RedirectToDashboardProjectsAction.java +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012-2016 Codenvy, S.A. - * 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: - * Codenvy, S.A. - initial API and implementation - *******************************************************************************/ -package org.eclipse.che.ide.actions; - -import com.google.gwt.user.client.Window; -import com.google.inject.Inject; - -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.Action; -import org.eclipse.che.ide.api.action.ActionEvent; - -/** - * Open a new dashboard window with information about the projects - * - * @author Oleksii Orel - */ -public class RedirectToDashboardProjectsAction extends Action { - - private static final String REDIRECT_URL = "/dashboard/#/projects"; - - @Inject - public RedirectToDashboardProjectsAction(CoreLocalizationConstant localization) { - super(localization.actionRedirectToDashboardProjectsTitle(), localization.actionRedirectToDashboardProjectsDescription(), null, null); - } - - /** {@inheritDoc} */ - @Override - public void actionPerformed(ActionEvent e) { - Window.open(REDIRECT_URL, "_blank", ""); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/RedirectToDashboardWorkspacesAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/RedirectToDashboardWorkspacesAction.java deleted file mode 100644 index f7a4f8e6622..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/RedirectToDashboardWorkspacesAction.java +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012-2016 Codenvy, S.A. - * 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: - * Codenvy, S.A. - initial API and implementation - *******************************************************************************/ -package org.eclipse.che.ide.actions; - -import com.google.gwt.user.client.Window; -import com.google.inject.Inject; - -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.Action; -import org.eclipse.che.ide.api.action.ActionEvent; - -/** - * Open a new dashboard window with information about the workspaces - * - * @author Oleksii Orel - */ -public class RedirectToDashboardWorkspacesAction extends Action { - - private static final String REDIRECT_URL = "/dashboard/#/workspaces"; - - @Inject - public RedirectToDashboardWorkspacesAction(CoreLocalizationConstant localization) { - super(localization.actionRedirectToDashboardWorkspacesTitle(), localization.actionRedirectToDashboardWorkspacesDescription(), null, null); - } - - /** {@inheritDoc} */ - @Override - public void actionPerformed(ActionEvent e) { - Window.open(REDIRECT_URL, "_blank", ""); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/client/BootstrapController.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/client/BootstrapController.java index 37b5d61e125..6fd0d0754fb 100644 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/client/BootstrapController.java +++ b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/client/BootstrapController.java @@ -211,8 +211,21 @@ public void onClose(CloseEvent event) { elemental.html.Window window = Browser.getWindow(); + Scheduler.get().scheduleDeferred(new ScheduledCommand() { + @Override + public void execute() { + notifyIDELoaded(); + } + }); } + /** + * Sends a message to the parent frame to inform that IDE application has been loaded. + */ + private native void notifyIDELoaded() /*-{ + $wnd.parent.postMessage("ide-loaded", "*"); + }-*/; + /** * Handles any of initialization errors. * Tries to call predefined IDE.eventHandlers.ideInitializationFailed function. diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/StandardComponentInitializer.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/StandardComponentInitializer.java index c40170ab2f0..cf8bed1df21 100644 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/StandardComponentInitializer.java +++ b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/StandardComponentInitializer.java @@ -41,8 +41,6 @@ import org.eclipse.che.ide.actions.OpenSelectedFileAction; import org.eclipse.che.ide.actions.PasteAction; import org.eclipse.che.ide.actions.ProjectConfigurationAction; -import org.eclipse.che.ide.actions.RedirectToDashboardProjectsAction; -import org.eclipse.che.ide.actions.RedirectToDashboardWorkspacesAction; import org.eclipse.che.ide.actions.RedoAction; import org.eclipse.che.ide.actions.RenameItemAction; import org.eclipse.che.ide.actions.SaveAction; @@ -279,12 +277,6 @@ public interface ParserResource extends ClientBundle { @Inject private ShowReferenceAction showReferenceAction; - @Inject - private RedirectToDashboardProjectsAction redirectToDashboardProjectsAction; - - @Inject - private RedirectToDashboardWorkspacesAction redirectToDashboardWorkspacesAction; - @Inject private ConvertFolderToProjectAction convertFolderToProjectAction; @@ -507,13 +499,8 @@ public void initialize() { //Compose Profile menu DefaultActionGroup profileGroup = (DefaultActionGroup)actionManager.getAction(IdeActions.GROUP_PROFILE); - actionManager.registerAction("redirectToDashboardProjectsAction", redirectToDashboardProjectsAction); - actionManager.registerAction("redirectToDashboardWorkspacesAction", redirectToDashboardWorkspacesAction); actionManager.registerAction("showPreferences", showPreferencesAction); - profileGroup.add(redirectToDashboardProjectsAction); - profileGroup.add(redirectToDashboardWorkspacesAction); - profileGroup.addSeparator(); profileGroup.add(showPreferencesAction); // Compose Help menu @@ -631,4 +618,5 @@ private class NoOpAction extends Action { public void actionPerformed(ActionEvent e) { } } + } diff --git a/ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/CoreLocalizationConstant.properties b/ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/CoreLocalizationConstant.properties index 3da74aea756..4dfd729cfee 100644 --- a/ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/CoreLocalizationConstant.properties +++ b/ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/CoreLocalizationConstant.properties @@ -187,10 +187,6 @@ action.showHiddenFiles.description = Show/Hide Hidden Files action.completions.title = Content Assist action.git.index.updated=Git index updated action.git.index.update.failed=Failed to update git index -action.redirectToDashboardProjects.title=Projects -action.redirectToDashboardProjects.description=Open User Dashboard Projects window -action.redirectToDashboardWorkspaces.title=Workspaces -action.redirectToDashboardWorkspaces.description=Open User Dashboard Workspaces window action.convert.folder.to.project=Convert To Project action.convert.folder.to.project.description=Converts current folder to project diff --git a/plugins/plugin-dashboard/che-plugin-ext-dashboard/pom.xml b/plugins/plugin-dashboard/che-plugin-ext-dashboard/pom.xml index b0bfb5ed121..f2ba9b5832f 100644 --- a/plugins/plugin-dashboard/che-plugin-ext-dashboard/pom.xml +++ b/plugins/plugin-dashboard/che-plugin-ext-dashboard/pom.xml @@ -25,17 +25,25 @@ ${project.build.directory}/generated-sources/dto/ + + com.google.gwt + gwt-elemental + com.google.inject guice org.eclipse.che.core - che-core-ide-api + che-core-api-workspace-shared - org.vectomatic - lib-gwt-svg + org.eclipse.che.core + che-core-commons-gwt + + + org.eclipse.che.core + che-core-ide-api com.google.gwt diff --git a/plugins/plugin-dashboard/che-plugin-ext-dashboard/src/main/java/org/eclipse/che/ide/ext/dashboard/client/DashboardLocalizationConstant.java b/plugins/plugin-dashboard/che-plugin-ext-dashboard/src/main/java/org/eclipse/che/ide/ext/dashboard/client/DashboardLocalizationConstant.java index 96c562036d5..c1851663f25 100644 --- a/plugins/plugin-dashboard/che-plugin-ext-dashboard/src/main/java/org/eclipse/che/ide/ext/dashboard/client/DashboardLocalizationConstant.java +++ b/plugins/plugin-dashboard/che-plugin-ext-dashboard/src/main/java/org/eclipse/che/ide/ext/dashboard/client/DashboardLocalizationConstant.java @@ -20,6 +20,10 @@ public interface DashboardLocalizationConstant extends Messages { @Key("open.dashboard.toolbar-button.title") String openDashboardToolbarButtonTitle(); - @Key("open.dashboard.redirect.url") - String openDashboardRedirectUrl(); + @Key("open.dashboard.url.workspace") + String openDashboardUrlWorkspace(String workspaceID); + + @Key("open.dashboard.url.workspaces") + String openDashboardUrlWorkspaces(); + } diff --git a/plugins/plugin-dashboard/che-plugin-ext-dashboard/src/main/java/org/eclipse/che/ide/ext/dashboard/client/DashboardResources.java b/plugins/plugin-dashboard/che-plugin-ext-dashboard/src/main/java/org/eclipse/che/ide/ext/dashboard/client/DashboardResources.java index 936c0f6371e..4e7a7d556e1 100644 --- a/plugins/plugin-dashboard/che-plugin-ext-dashboard/src/main/java/org/eclipse/che/ide/ext/dashboard/client/DashboardResources.java +++ b/plugins/plugin-dashboard/che-plugin-ext-dashboard/src/main/java/org/eclipse/che/ide/ext/dashboard/client/DashboardResources.java @@ -22,17 +22,11 @@ */ public interface DashboardResources extends ClientBundle { interface DashboardCSS extends CssResource { - String tooltip(); - String dashboardButton(); + String dashboardArrow(); } @Source({"Dashboard.css", "org/eclipse/che/ide/api/ui/style.css"}) DashboardCSS dashboardCSS(); - @Source("icons/dashboardButtonBackground.svg") - SVGResource dashboardButtonBackground(); - - @Source("icons/dashboardButtonIcon.svg") - SVGResource dashboardButtonIcon(); } diff --git a/plugins/plugin-dashboard/che-plugin-ext-dashboard/src/main/java/org/eclipse/che/ide/ext/dashboard/client/RedirectToDashboardAction.java b/plugins/plugin-dashboard/che-plugin-ext-dashboard/src/main/java/org/eclipse/che/ide/ext/dashboard/client/RedirectToDashboardAction.java index c7bbc909434..a5ed28cd0c9 100644 --- a/plugins/plugin-dashboard/che-plugin-ext-dashboard/src/main/java/org/eclipse/che/ide/ext/dashboard/client/RedirectToDashboardAction.java +++ b/plugins/plugin-dashboard/che-plugin-ext-dashboard/src/main/java/org/eclipse/che/ide/ext/dashboard/client/RedirectToDashboardAction.java @@ -12,29 +12,49 @@ import com.google.gwt.dom.client.Element; import com.google.gwt.user.client.DOM; -import com.google.gwt.user.client.ui.Anchor; +import com.google.gwt.user.client.ui.FlowPanel; import com.google.gwt.user.client.ui.Widget; import com.google.inject.Inject; +import com.google.web.bindery.event.shared.EventBus; import org.eclipse.che.ide.api.action.Action; import org.eclipse.che.ide.api.action.ActionEvent; import org.eclipse.che.ide.api.action.CustomComponentAction; import org.eclipse.che.ide.api.action.Presentation; +import org.eclipse.che.ide.api.app.AppContext; +import org.eclipse.che.ide.api.workspace.event.WorkspaceStartedEvent; +import org.eclipse.che.ide.api.workspace.event.WorkspaceStartedHandler; +import org.eclipse.che.ide.api.workspace.event.WorkspaceStoppedEvent; +import org.eclipse.che.ide.api.workspace.event.WorkspaceStoppedHandler; +import org.eclipse.che.ide.ui.Tooltip; +import static org.eclipse.che.ide.ui.menu.PositionController.HorizontalAlign.RIGHT; +import static org.eclipse.che.ide.ui.menu.PositionController.VerticalAlign.BOTTOM; /** * Action to provide Dashboard button onto toolbar. * * @author Oleksii Orel */ -public class RedirectToDashboardAction extends Action implements CustomComponentAction { +public class RedirectToDashboardAction extends Action implements CustomComponentAction, + WorkspaceStartedHandler, WorkspaceStoppedHandler { + private final DashboardLocalizationConstant constant; private final DashboardResources resources; + private final AppContext appContext; + + private Element arrow; @Inject public RedirectToDashboardAction(DashboardLocalizationConstant constant, - DashboardResources resources) { + DashboardResources resources, + EventBus eventBus, + AppContext appContext) { this.constant = constant; this.resources = resources; + this.appContext = appContext; + + eventBus.addHandler(WorkspaceStartedEvent.TYPE, this); + eventBus.addHandler(WorkspaceStoppedEvent.TYPE, this); } @Override @@ -43,22 +63,38 @@ public void actionPerformed(ActionEvent e) { @Override public Widget createCustomComponent(Presentation presentation) { - final Anchor dashboardButton = new Anchor(); - final Element tooltipContainer = DOM.createDiv(); - final Element tooltipElement = DOM.createSpan(); - - dashboardButton.ensureDebugId("dashboard-toolbar-button"); - dashboardButton.addStyleName(resources.dashboardCSS().dashboardButton()); - dashboardButton.setHref(constant.openDashboardRedirectUrl()); - dashboardButton.getElement().setAttribute("target", "_blank"); - dashboardButton.getElement().insertFirst(resources.dashboardButtonBackground().getSvg().getElement()); - dashboardButton.getElement().appendChild(resources.dashboardButtonIcon().getSvg().getElement()); - tooltipElement.setInnerText(constant.openDashboardToolbarButtonTitle()); - tooltipContainer.appendChild(tooltipElement); - tooltipContainer.setClassName(resources.dashboardCSS().tooltip()); - dashboardButton.getElement().appendChild(tooltipContainer); - - return dashboardButton; + FlowPanel panel = new FlowPanel(); + panel.setWidth("24px"); + panel.setHeight("24px"); + + arrow = DOM.createAnchor(); + arrow.setClassName(resources.dashboardCSS().dashboardArrow()); + arrow.setInnerHTML(""); + panel.getElement().appendChild(arrow); + + arrow.setAttribute("href", constant.openDashboardUrlWorkspace(appContext.getWorkspace().getConfig().getName())); + arrow.setAttribute("target", "_blank"); + + Tooltip.create((elemental.dom.Element) arrow, + BOTTOM, + RIGHT, + constant.openDashboardToolbarButtonTitle()); + + return panel; + } + + @Override + public void onWorkspaceStarted(WorkspaceStartedEvent event) { + if (arrow != null) { + arrow.setAttribute("href", constant.openDashboardUrlWorkspace(event.getWorkspace().getConfig().getName())); + } + } + + @Override + public void onWorkspaceStopped(WorkspaceStoppedEvent event) { + if (arrow != null) { + arrow.setAttribute("href", constant.openDashboardUrlWorkspaces()); + } } } diff --git a/plugins/plugin-dashboard/che-plugin-ext-dashboard/src/main/resources/org/eclipse/che/ide/ext/dashboard/client/Dashboard.css b/plugins/plugin-dashboard/che-plugin-ext-dashboard/src/main/resources/org/eclipse/che/ide/ext/dashboard/client/Dashboard.css index e9d50163402..3545a24111a 100644 --- a/plugins/plugin-dashboard/che-plugin-ext-dashboard/src/main/resources/org/eclipse/che/ide/ext/dashboard/client/Dashboard.css +++ b/plugins/plugin-dashboard/che-plugin-ext-dashboard/src/main/resources/org/eclipse/che/ide/ext/dashboard/client/Dashboard.css @@ -8,83 +8,18 @@ * Contributors: * Codenvy, S.A. - initial API and implementation *******************************************************************************/ -@eval buttonIconColor "#FFFFFF"; -@eval buttonIconHoverColor "#E3E3E3"; -div.tooltip { +.dashboardArrow { position: absolute; - width: 50%; - height: 0; - top: 100%; - left: 0; -} - -.tooltip > span { - position: fixed; - color: mainFontColor; - border: 1px solid tooltipBackgroundColor; - background: tooltipBackgroundColor; - white-space: nowrap; - font-family: mainFontFamily; - font-size: 8pt; - font-weight: normal; - text-align: left; - padding: 10px 20px; - line-height: normal; - z-index: 16777271; - margin-left: 7px; - margin-top: 9px; - display: none; -} - -.tooltip > span::after { - content: ""; - position: absolute; - width: 0; - height: 0; - border: 10px solid; - border-color: transparent transparent tooltipBackgroundColor transparent; - top: -20px; - right: literal("calc(100% - 20px)"); -} - -.dashboardButton:hover > .tooltip > span { - display: inline-block; -} - -.tooltip > span:hover { - pointer-events: none; -} - -.dashboardButton { - position: relative; - margin: 0 20px 0 0; - height: 100%; - width: 50px; - padding: 0; - opacity: 1; - border: none; - box-shadow: none; cursor: pointer; + outline: none; + width: 24px; + height: 16px; + top: 4px; + background-color: #525c86; + color: #f1f1f1!important; + font-size: 8px; + padding: 0px; + line-height: 16px; text-align: center; } - -.dashboardButton svg:first-child { - position: absolute; - left: 0; - top: 0; - width: 68px; - height: 24px; -} - -.dashboardButton svg + svg { - position: absolute; - width: 18px; - height: 100%; - fill: buttonIconColor; - left: literal("calc(50% - 3px)"); -} - -.dashboardButton:hover svg + svg { - fill: buttonIconHoverColor; -} \ No newline at end of file diff --git a/plugins/plugin-dashboard/che-plugin-ext-dashboard/src/main/resources/org/eclipse/che/ide/ext/dashboard/client/DashboardLocalizationConstant.properties b/plugins/plugin-dashboard/che-plugin-ext-dashboard/src/main/resources/org/eclipse/che/ide/ext/dashboard/client/DashboardLocalizationConstant.properties index 47d5ce11583..eb9853ec144 100644 --- a/plugins/plugin-dashboard/che-plugin-ext-dashboard/src/main/resources/org/eclipse/che/ide/ext/dashboard/client/DashboardLocalizationConstant.properties +++ b/plugins/plugin-dashboard/che-plugin-ext-dashboard/src/main/resources/org/eclipse/che/ide/ext/dashboard/client/DashboardLocalizationConstant.properties @@ -11,4 +11,5 @@ ############### Redirect Action ############################### open.dashboard.toolbar-button.title = Open dashboard -open.dashboard.redirect.url = /dashboard +open.dashboard.url.workspace = /dashboard/#/ide/{0} +open.dashboard.url.workspaces = /dashboard/#/workspaces diff --git a/plugins/plugin-dashboard/che-plugin-ext-dashboard/src/main/resources/org/eclipse/che/ide/ext/dashboard/client/icons/dashboardButtonBackground.svg b/plugins/plugin-dashboard/che-plugin-ext-dashboard/src/main/resources/org/eclipse/che/ide/ext/dashboard/client/icons/dashboardButtonBackground.svg deleted file mode 100644 index a2276162419..00000000000 --- a/plugins/plugin-dashboard/che-plugin-ext-dashboard/src/main/resources/org/eclipse/che/ide/ext/dashboard/client/icons/dashboardButtonBackground.svg +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/plugin-dashboard/che-plugin-ext-dashboard/src/main/resources/org/eclipse/che/ide/ext/dashboard/client/icons/dashboardButtonIcon.svg b/plugins/plugin-dashboard/che-plugin-ext-dashboard/src/main/resources/org/eclipse/che/ide/ext/dashboard/client/icons/dashboardButtonIcon.svg deleted file mode 100644 index fa448d97d71..00000000000 --- a/plugins/plugin-dashboard/che-plugin-ext-dashboard/src/main/resources/org/eclipse/che/ide/ext/dashboard/client/icons/dashboardButtonIcon.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - -