Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove unused code #14480

Merged
merged 2 commits into from
Sep 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions dashboard/src/app/index.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ import {DemoComponentsController} from './demo-components/demo-components.contro
import {CheBranding} from '../components/branding/che-branding.factory';
import {ChePreferences} from '../components/api/che-preferences.factory';
import {RoutingRedirect} from '../components/routing/routing-redirect.factory';
import IdeIFrameSvc from './ide/ide-iframe/ide-iframe.service';
import {CheIdeFetcher} from '../components/ide-fetcher/che-ide-fetcher.service';
import {RouteHistory} from '../components/routing/route-history.service';
import {CheUIElementsInjectorService} from '../components/service/injector/che-ui-elements-injector.service';
import {OrganizationsConfig} from './organizations/organizations-config';
Expand Down Expand Up @@ -260,16 +258,25 @@ initModule.config(['$routeProvider', ($routeProvider: che.route.IRouteProvider)
/**
* Setup route redirect module
*/
initModule.run(['$rootScope', '$location', '$routeParams', 'routingRedirect', '$timeout', '$mdSidenav', 'cheIdeFetcher', 'routeHistory', 'cheUIElementsInjectorService', 'workspaceDetailsService',
($rootScope: che.IRootScopeService, $location: ng.ILocationService, $routeParams: ng.route.IRouteParamsService, routingRedirect: RoutingRedirect, $timeout: ng.ITimeoutService, $mdSidenav: ng.material.ISidenavService, cheIdeFetcher: CheIdeFetcher, routeHistory: RouteHistory, cheUIElementsInjectorService: CheUIElementsInjectorService) => {
initModule.run(['$rootScope', '$location', '$routeParams', 'routingRedirect', '$timeout', '$mdSidenav', 'routeHistory', 'cheUIElementsInjectorService', 'workspaceDetailsService',
(
$rootScope: che.IRootScopeService,
$location: ng.ILocationService,
$routeParams: ng.route.IRouteParamsService,
routingRedirect: RoutingRedirect,
$timeout: ng.ITimeoutService,
$mdSidenav: ng.material.ISidenavService,
routeHistory: RouteHistory,
cheUIElementsInjectorService: CheUIElementsInjectorService
) => {

$rootScope.hideLoader = false;
$rootScope.waitingLoaded = false;
$rootScope.showIDE = false;
$rootScope.hideNavbar = false;

// here only to create instances of these components
/* tslint:disable */
cheIdeFetcher;
routeHistory;
/* tslint:enable */

Expand Down Expand Up @@ -324,7 +331,6 @@ initModule.run(['$rootScope', '$location', '$routeParams', 'routingRedirect', '$
]);

initModule.config(['$mdThemingProvider', 'jsonColors', ($mdThemingProvider: ng.material.IThemingProvider, jsonColors: any) => {

const cheColors = angular.fromJson(jsonColors);
const getColor = (key: string) => {
let color = cheColors[key];
Expand Down
1 change: 0 additions & 1 deletion dashboard/src/assets/branding/product.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"logoTextFile": "che-logo-text.svg",
"favicon": "favicon.ico",
"loader": "loader.svg",
"ideResources": "/_app/",
"websocketContext": "/api/websocket",
"helpPath": "https://www.eclipse.org/che/",
"helpTitle": "Community",
Expand Down
11 changes: 0 additions & 11 deletions dashboard/src/components/branding/che-branding.factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ interface IBranding {
logoTextFile?: string;
favicon?: string;
loader?: string;
ideResources?: string;
websocketContext?: string;
helpPath?: string;
helpTitle?: string;
Expand Down Expand Up @@ -56,7 +55,6 @@ const DEFAULT_PRODUCT_FAVICON = 'favicon.ico';
const DEFAULT_LOADER = 'loader.svg';
const DEFAULT_PRODUCT_LOGO = 'che-logo.svg';
const DEFAULT_PRODUCT_LOGO_TEXT = 'che-logo-text.svg';
const DEFAULT_IDE_RESOURCES_PATH = '/_app/';
const DEFAULT_OAUTH_DOCS = 'Configure OAuth in the che.properties file.';
const DEFAULT_CLI_NAME = 'che.env';
const DEFAULT_CLI_CONFIG_NAME = 'CHE';
Expand Down Expand Up @@ -125,7 +123,6 @@ export class CheBranding {
logoText: this.getProductLogoText(),
favicon: this.getProductFavicon(),
loaderURL: this.getLoaderUrl(),
ideResourcesPath: this.getIdeResourcesPath(),
websocketContext: this.getWebsocketContext(),
helpPath: this.getProductHelpPath(),
helpTitle: this.getProductHelpTitle(),
Expand Down Expand Up @@ -207,14 +204,6 @@ export class CheBranding {
return this.brandingData.loader ? ASSET_PREFIX + this.brandingData.loader : ASSET_PREFIX + DEFAULT_LOADER;
}

/**
* Gets ide resources path.
* @returns {string}
*/
getIdeResourcesPath(): string {
return this.brandingData.ideResources ? this.brandingData.ideResources : DEFAULT_IDE_RESOURCES_PATH;
}

/**
* Gets ide resources path.
* @returns {string}
Expand Down
2 changes: 0 additions & 2 deletions dashboard/src/components/components-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import {AttributeConfig} from './attribute/attribute-config';
import {FilterConfig} from './filter/filter-config';
import {CheBrandingConfig} from './branding/che-branding-config';
import {GitHubService} from './github/github-service';
import {CheIdeFetcherConfig} from './ide-fetcher/che-ide-fetcher-config';
import {CheNotificationConfig} from './notification/che-notification-config';
import {RoutingConfig} from './routing/routing-config';
import {ValidatorConfig} from './validator/validator-config';
Expand All @@ -38,7 +37,6 @@ export class ComponentsConfig {
new FilterConfig(register);
new CheBrandingConfig(register);
new GitHubService(register);
new CheIdeFetcherConfig(register);
new CheNotificationConfig(register);
new RoutingConfig(register);
new ValidatorConfig(register);
Expand Down
23 changes: 0 additions & 23 deletions dashboard/src/components/ide-fetcher/che-ide-fetcher-config.ts

This file was deleted.

132 changes: 0 additions & 132 deletions dashboard/src/components/ide-fetcher/che-ide-fetcher.service.ts

This file was deleted.