'
+ '
'
diff --git a/dashboard/src/app/dashboard/last-workspaces/last-workspaces.directive.ts b/dashboard/src/app/dashboard/last-workspaces/last-workspaces.directive.ts
index 948b93ce77..efa3baa19c 100644
--- a/dashboard/src/app/dashboard/last-workspaces/last-workspaces.directive.ts
+++ b/dashboard/src/app/dashboard/last-workspaces/last-workspaces.directive.ts
@@ -16,20 +16,13 @@
* @description This class is handling the directive of the listing last opened workspaces in the dashboard
* @author Oleksii Orel
*/
-export class DashboardLastWorkspaces {
+export class DashboardLastWorkspaces implements ng.IDirective {
+ restrict = 'E';
+ templateUrl = 'app/dashboard/last-workspaces/last-workspaces.html';
- /**
- * Default constructor that is using resource
- * @ngInject for Dependency injection
- */
- constructor() {
- this.restrict = 'E';
- this.templateUrl = 'app/dashboard/last-workspaces/last-workspaces.html';
-
- this.controller = 'DashboardLastWorkspacesController';
- this.controllerAs = 'dashboardLastWorkspacesController';
- this.bindToController = true;
- }
+ controller = 'DashboardLastWorkspacesController';
+ controllerAs = 'dashboardLastWorkspacesController';
+ bindToController = true;
}
diff --git a/dashboard/src/app/diagnostics/diagnostics.directive.ts b/dashboard/src/app/diagnostics/diagnostics.directive.ts
index 1c5a8ab181..0a1e3e1b9c 100644
--- a/dashboard/src/app/diagnostics/diagnostics.directive.ts
+++ b/dashboard/src/app/diagnostics/diagnostics.directive.ts
@@ -24,7 +24,7 @@
*
* @author Florent Benoit
*/
-export class Diagnostics {
+export class Diagnostics implements ng.IDirective {
replace: boolean = false;
restrict: string = 'E';
diff --git a/dashboard/src/app/factories/create-factory/action/factory-action-box.directive.ts b/dashboard/src/app/factories/create-factory/action/factory-action-box.directive.ts
index 0c8470e66b..4feb0032ce 100644
--- a/dashboard/src/app/factories/create-factory/action/factory-action-box.directive.ts
+++ b/dashboard/src/app/factories/create-factory/action/factory-action-box.directive.ts
@@ -14,15 +14,15 @@
* Defines a directive for displaying action box.
* @author Florent Benoit
*/
-export class FactoryActionBox {
- private restrict: string;
- private templateUrl: string;
- private replace: boolean;
- private controller: string;
- private controllerAs: string;
- private bindToController: boolean;
+export class FactoryActionBox implements ng.IDirective {
+ restrict: string;
+ templateUrl: string;
+ replace: boolean;
+ controller: string;
+ controllerAs: string;
+ bindToController: boolean;
- private scope: {
+ scope: {
[propName: string]: string;
};
diff --git a/dashboard/src/app/factories/create-factory/command/factory-command.directive.ts b/dashboard/src/app/factories/create-factory/command/factory-command.directive.ts
index bb2a31cb18..c2e0090bff 100644
--- a/dashboard/src/app/factories/create-factory/command/factory-command.directive.ts
+++ b/dashboard/src/app/factories/create-factory/command/factory-command.directive.ts
@@ -14,15 +14,15 @@
* Defines a directive for displaying factory commands.
* @author Florent Benoit
*/
-export class FactoryCommand {
- private restrict: string;
- private templateUrl: string;
- private replace: boolean;
- private controller: string;
- private controllerAs: string;
- private bindToController: boolean;
+export class FactoryCommand implements ng.IDirective {
+ restrict: string;
+ templateUrl: string;
+ replace: boolean;
+ controller: string;
+ controllerAs: string;
+ bindToController: boolean;
- private scope: {
+ scope: {
[propName: string]: string;
};
diff --git a/dashboard/src/app/factories/create-factory/config-file-tab/factory-from-file.controller.ts b/dashboard/src/app/factories/create-factory/config-file-tab/factory-from-file.controller.ts
index f8135ca457..1eb9c2dde6 100644
--- a/dashboard/src/app/factories/create-factory/config-file-tab/factory-from-file.controller.ts
+++ b/dashboard/src/app/factories/create-factory/config-file-tab/factory-from-file.controller.ts
@@ -51,7 +51,7 @@ export class FactoryFromFileCtrl {
this.isImporting = this.uploader.isUploading;
- var ctrl = this;
+ const ctrl = this;
// filters
this.uploader.filters.push({
diff --git a/dashboard/src/app/factories/create-factory/config-file-tab/factory-from-file.directive.ts b/dashboard/src/app/factories/create-factory/config-file-tab/factory-from-file.directive.ts
index 75e0e9b824..66142afcc1 100644
--- a/dashboard/src/app/factories/create-factory/config-file-tab/factory-from-file.directive.ts
+++ b/dashboard/src/app/factories/create-factory/config-file-tab/factory-from-file.directive.ts
@@ -18,15 +18,15 @@ interface IFactoryFromFileScope extends ng.IScope {
* Defines a directive for configuring factory from file.
* @author Oleksii Orel
*/
-export class FactoryFromFile {
- private restrict: string;
- private templateUrl: string;
- private replace: boolean;
- private controller: string;
- private controllerAs: string;
- private bindToController: boolean;
+export class FactoryFromFile implements ng.IDirective {
+ restrict: string;
+ templateUrl: string;
+ replace: boolean;
+ controller: string;
+ controllerAs: string;
+ bindToController: boolean;
- private scope: {
+ scope: {
[propName: string]: string;
};
diff --git a/dashboard/src/app/factories/create-factory/create-factory-config.ts b/dashboard/src/app/factories/create-factory/create-factory-config.ts
index 907fb27da7..e70b4566d9 100644
--- a/dashboard/src/app/factories/create-factory/create-factory-config.ts
+++ b/dashboard/src/app/factories/create-factory/create-factory-config.ts
@@ -58,7 +58,7 @@ export class CreateFactoryConfig {
// config routes
- register.app.config(($routeProvider: any) => {
+ register.app.config(($routeProvider: che.route.IRouteProvider) => {
$routeProvider.accessWhen('/factories/create-factory', {
title: 'New Factory',
templateUrl: 'app/factories/create-factory/create-factory.html',
diff --git a/dashboard/src/app/factories/create-factory/create-factory.controller.ts b/dashboard/src/app/factories/create-factory/create-factory.controller.ts
index 24b0595290..d53ed07801 100644
--- a/dashboard/src/app/factories/create-factory/create-factory.controller.ts
+++ b/dashboard/src/app/factories/create-factory/create-factory.controller.ts
@@ -43,7 +43,14 @@ export class CreateFactoryCtrl {
* Default constructor that is using resource injection
* @ngInject for Dependency injection
*/
- constructor($location: ng.ILocationService, cheAPI: CheAPI, $log: ng.ILogService, cheNotification: CheNotification, $scope: ng.IScope, $filter: ng.IFilterService, lodash: any, $document: ng.IDocumentService) {
+ constructor($location: ng.ILocationService,
+ cheAPI: CheAPI,
+ $log: ng.ILogService,
+ cheNotification: CheNotification,
+ $scope: ng.IScope,
+ $filter: ng.IFilterService,
+ lodash: any,
+ $document: ng.IDocumentService) {
this.$location = $location;
this.cheAPI = cheAPI;
this.$log = $log;
diff --git a/dashboard/src/app/factories/create-factory/git/create-factory-git.directive.ts b/dashboard/src/app/factories/create-factory/git/create-factory-git.directive.ts
index 095d1fe848..6526da3ba7 100644
--- a/dashboard/src/app/factories/create-factory/git/create-factory-git.directive.ts
+++ b/dashboard/src/app/factories/create-factory/git/create-factory-git.directive.ts
@@ -14,14 +14,14 @@
* Defines a directive for creating factory from git.
* @author Florent Benoit
*/
-export class CreateFactoryGit {
- private restrict: string;
- private templateUrl: string;
- private controller: string;
- private controllerAs: string;
- private bindToController: boolean;
+export class CreateFactoryGit implements ng.IDirective {
+ restrict: string;
+ templateUrl: string;
+ controller: string;
+ controllerAs: string;
+ bindToController: boolean;
- private scope: {
+ scope: {
[propName: string]: string;
};
diff --git a/dashboard/src/app/factories/create-factory/template-tab/factory-from-template.directive.ts b/dashboard/src/app/factories/create-factory/template-tab/factory-from-template.directive.ts
index 937a8fee06..be78c367f8 100644
--- a/dashboard/src/app/factories/create-factory/template-tab/factory-from-template.directive.ts
+++ b/dashboard/src/app/factories/create-factory/template-tab/factory-from-template.directive.ts
@@ -14,15 +14,15 @@
* Defines a directive for displaying factory from template widget.
* @author Oleksii Orel
*/
-export class FactoryFromTemplate {
- private restrict: string;
- private templateUrl: string;
- private controller: string;
- private controllerAs: string;
- private bindToController: boolean;
- private replace: boolean;
+export class FactoryFromTemplate implements ng.IDirective {
+ restrict: string;
+ templateUrl: string;
+ controller: string;
+ controllerAs: string;
+ bindToController: boolean;
+ replace: boolean;
- private scope: {
+ scope: {
[propName: string]: string;
};
diff --git a/dashboard/src/app/factories/factories-config.ts b/dashboard/src/app/factories/factories-config.ts
index db5eac2c9f..aa891b0b2d 100644
--- a/dashboard/src/app/factories/factories-config.ts
+++ b/dashboard/src/app/factories/factories-config.ts
@@ -32,7 +32,7 @@ export class FactoryConfig {
register.service('loadFactoryService', LoadFactoryService);
// config routes
- register.app.config(function ($routeProvider) {
+ register.app.config(function ($routeProvider: che.route.IRouteProvider) {
$routeProvider.accessWhen('/factories', {
title: 'Factories',
templateUrl: 'app/factories/list-factories/list-factories.html',
@@ -55,9 +55,11 @@ export class FactoryConfig {
});
// config files
+ /* tslint:disable */
new FactoryDetailsConfig(register);
new CreateFactoryConfig(register);
new LastFactoriesConfig(register);
+ /* tslint:enable */
}
}
diff --git a/dashboard/src/app/factories/factory-details/factory-details-config.ts b/dashboard/src/app/factories/factory-details/factory-details-config.ts
index da14d977b4..b8bfe0b6ba 100644
--- a/dashboard/src/app/factories/factory-details/factory-details-config.ts
+++ b/dashboard/src/app/factories/factory-details/factory-details-config.ts
@@ -20,7 +20,7 @@ export class FactoryDetailsConfig {
register.controller('FactoryDetailsController', FactoryDetailsController);
// config routes
- register.app.config(($routeProvider: any) => {
+ register.app.config(($routeProvider: che.route.IRouteProvider) => {
let locationProvider = {
title: 'Factory',
templateUrl: 'app/factories/factory-details/factory-details.html',
@@ -34,6 +34,8 @@ export class FactoryDetailsConfig {
});
// config files
+ /* tslint:disable */
new InformationTabConfig(register);
+ /* tslint:enable */
}
}
diff --git a/dashboard/src/app/factories/factory-details/factory-details.controller.ts b/dashboard/src/app/factories/factory-details/factory-details.controller.ts
index 16a89d5286..5c4daa1096 100644
--- a/dashboard/src/app/factories/factory-details/factory-details.controller.ts
+++ b/dashboard/src/app/factories/factory-details/factory-details.controller.ts
@@ -25,7 +25,9 @@ export class FactoryDetailsController {
* @ngInject for Dependency injection
*/
constructor($route: ng.route.IRouteService, cheFactory: CheFactory, cheNotification: CheNotification) {
+ /* tslint:disable */
'ngInject';
+ /* tslint:enable */
this.cheFactory = cheFactory;
let factoryId = $route.current.params.id;
diff --git a/dashboard/src/app/factories/factory-details/information-tab/factory-information/factory-information.controller.ts b/dashboard/src/app/factories/factory-details/information-tab/factory-information/factory-information.controller.ts
index 9d51275c47..87b6fd46ea 100644
--- a/dashboard/src/app/factories/factory-details/information-tab/factory-information/factory-information.controller.ts
+++ b/dashboard/src/app/factories/factory-details/information-tab/factory-information/factory-information.controller.ts
@@ -37,7 +37,7 @@ export class FactoryInformationController {
private factory: che.IFactory;
private copyOriginFactory: che.IFactory;
private factoryContent: string;
- private workspaceImportedRecipe: any;
+ // private workspaceImportedRecipe: any;
private environmentName: string;
private workspaceName: string;
private stackId: string;
@@ -49,8 +49,16 @@ export class FactoryInformationController {
* Default constructor that is using resource injection
* @ngInject for Dependency injection
*/
- constructor($scope: ng.IScope, cheAPI: CheAPI, cheNotification: CheNotification, $location: ng.ILocationService, $log: ng.ILogService,
- $timeout: ng.ITimeoutService, lodash: any, $filter: ng.IFilterService, $q: ng.IQService, confirmDialogService: ConfirmDialogService) {
+ constructor($scope: ng.IScope,
+ cheAPI: CheAPI,
+ cheNotification: CheNotification,
+ $location: ng.ILocationService,
+ $log: ng.ILogService,
+ $timeout: ng.ITimeoutService,
+ lodash: any,
+ $filter: ng.IFilterService,
+ $q: ng.IQService,
+ confirmDialogService: ConfirmDialogService) {
this.cheAPI = cheAPI;
this.cheNotification = cheNotification;
this.$location = $location;
diff --git a/dashboard/src/app/factories/last-factories/last-factories.directive.ts b/dashboard/src/app/factories/last-factories/last-factories.directive.ts
index a129d684c9..4ae4f18395 100644
--- a/dashboard/src/app/factories/last-factories/last-factories.directive.ts
+++ b/dashboard/src/app/factories/last-factories/last-factories.directive.ts
@@ -16,13 +16,13 @@
* @description This class is handling the directive of the listing last opened factories
* @author Oleksii Orel
*/
-export class LastFactories {
- private restrict: string;
- private templateUrl: string;
- private replace: boolean;
- private controller: string;
- private controllerAs: string;
- private bindToController: boolean;
+export class LastFactories implements ng.IDirective {
+ restrict: string;
+ templateUrl: string;
+ replace: boolean;
+ controller: string;
+ controllerAs: string;
+ bindToController: boolean;
/**
* Default constructor that is using resource
diff --git a/dashboard/src/app/factories/list-factories/factory-item/factory-item.controller.ts b/dashboard/src/app/factories/list-factories/factory-item/factory-item.controller.ts
index ec736dc1ef..958fb334cc 100644
--- a/dashboard/src/app/factories/list-factories/factory-item/factory-item.controller.ts
+++ b/dashboard/src/app/factories/list-factories/factory-item/factory-item.controller.ts
@@ -20,14 +20,17 @@ export class FactoryItemController {
private $location: ng.ILocationService;
private cheFactory: CheFactory;
private cheEnvironmentRegistry: CheEnvironmentRegistry;
- private lodash: _.LoDashStatic;
+ private lodash: any;
private factory: che.IFactory;
/**
* Default constructor that is using resource injection
* @ngInject for Dependency injection
*/
- constructor($location: ng.ILocationService, cheFactory: CheFactory, cheEnvironmentRegistry: CheEnvironmentRegistry, lodash: _.LoDashStatic) {
+ constructor($location: ng.ILocationService,
+ cheFactory: CheFactory,
+ cheEnvironmentRegistry: CheEnvironmentRegistry,
+ lodash: any) {
this.$location = $location;
this.cheFactory = cheFactory;
this.cheEnvironmentRegistry = cheEnvironmentRegistry;
diff --git a/dashboard/src/app/factories/list-factories/factory-item/factory-item.directive.ts b/dashboard/src/app/factories/list-factories/factory-item/factory-item.directive.ts
index 7213df6fac..7fe88ae910 100644
--- a/dashboard/src/app/factories/list-factories/factory-item/factory-item.directive.ts
+++ b/dashboard/src/app/factories/list-factories/factory-item/factory-item.directive.ts
@@ -14,7 +14,7 @@
* Defines a directive for factory item in list.
* @author Oleksii Orel
*/
-export class CheFactoryItem {
+export class CheFactoryItem implements ng.IDirective {
restrict: string = 'E';
templateUrl: string = 'app/factories/list-factories/factory-item/factory-item.html';
diff --git a/dashboard/src/app/factories/load-factory/load-factory.controller.ts b/dashboard/src/app/factories/load-factory/load-factory.controller.ts
index 14365011b4..5f9b2bf1d5 100644
--- a/dashboard/src/app/factories/load-factory/load-factory.controller.ts
+++ b/dashboard/src/app/factories/load-factory/load-factory.controller.ts
@@ -16,7 +16,7 @@ import {RouteHistory} from '../../../components/routing/route-history.service';
import {CheJsonRpcApi} from '../../../components/api/json-rpc/che-json-rpc-api.factory';
import {CheJsonRpcMasterApi} from '../../../components/api/json-rpc/che-json-rpc-master-api';
-const WS_AGENT_STEP: number = 3
+const WS_AGENT_STEP: number = 3;
/**
* This class is handling the controller for the factory loading.
@@ -27,7 +27,7 @@ export class LoadFactoryController {
private $timeout: ng.ITimeoutService;
private $mdDialog: ng.material.IDialogService;
private loadFactoryService: LoadFactoryService;
- private lodash: _.LoDashStatic;
+ private lodash: any;
private cheNotification: CheNotification;
private $location: ng.ILocationService;
private routeHistory: RouteHistory;
@@ -46,9 +46,17 @@ export class LoadFactoryController {
* Default constructor that is using resource
* @ngInject for Dependency injection
*/
- constructor(cheAPI: CheAPI, cheJsonRpcApi: CheJsonRpcApi, $route: ng.route.IRouteService, $timeout: ng.ITimeoutService,
- $mdDialog: ng.material.IDialogService, loadFactoryService: LoadFactoryService, lodash: _.LoDashStatic, cheNotification: CheNotification,
- $location: ng.ILocationService, routeHistory: RouteHistory, $window: ng.IWindowService) {
+ constructor(cheAPI: CheAPI,
+ cheJsonRpcApi: CheJsonRpcApi,
+ $route: ng.route.IRouteService,
+ $timeout: ng.ITimeoutService,
+ $mdDialog: ng.material.IDialogService,
+ loadFactoryService: LoadFactoryService,
+ lodash: any,
+ cheNotification: CheNotification,
+ $location: ng.ILocationService,
+ routeHistory: RouteHistory,
+ $window: ng.IWindowService) {
this.cheAPI = cheAPI;
this.$timeout = $timeout;
this.$mdDialog = $mdDialog;
@@ -60,7 +68,7 @@ export class LoadFactoryController {
this.$window = $window;
this.workspaces = [];
- this.workspace = {};
+ this.workspace = {} as che.IWorkspace;
this.hideMenuAndFooter();
this.jsonRpcMasterApi = cheJsonRpcApi.getJsonRpcMasterApi(cheAPI.getWorkspace().getJsonRpcApiLocation());
@@ -202,11 +210,11 @@ export class LoadFactoryController {
*/
getWorkspaceToStart(): void {
let createPolicy = (this.factory.policies) ? this.factory.policies.create : 'perClick';
- var workspace = null;
+ let workspace = null;
switch (createPolicy) {
case 'perUser' :
workspace = this.lodash.find(this.workspaces, (w: che.IWorkspace) => {
- return this.factory.id === w.attributes.factoryId;
+ return this.factory.id === (w.attributes as any).factoryId;
});
break;
case 'perAccount' :
@@ -465,7 +473,7 @@ export class LoadFactoryController {
detectProjectsToImport(projects: Array
): void {
this.projectsToImport = 0;
- projects.forEach((project: che.IProject) => {
+ projects.forEach((project: che.IProjectTemplate) => {
if (!this.isProjectOnFileSystem(project)) {
this.projectsToImport++;
this.importProject(this.workspace.id, project);
@@ -480,7 +488,7 @@ export class LoadFactoryController {
/**
* Project is on file system if there is no errors except code=9.
*/
- isProjectOnFileSystem(project: che.IProject): boolean {
+ isProjectOnFileSystem(project: che.IProjectTemplate): boolean {
let problems = project.problems;
if (!problems || problems.length === 0) {
return true;
@@ -557,7 +565,7 @@ export class LoadFactoryController {
} else {
// add every factory parameter by prefix
Object.keys(this.routeParams).forEach((key: string) => {
- ideParams.push('factory-' + key + ':' + this.$window.encodeURIComponent(this.routeParams[key]));
+ ideParams.push('factory-' + key + ':' + (this.$window as any).encodeURIComponent(this.routeParams[key]));
});
}
@@ -658,7 +666,7 @@ export class LoadFactoryController {
*/
downloadLogs(): void {
let logs = '';
- this.getLoadingSteps().forEach((step) => {
+ this.getLoadingSteps().forEach((step: any) => {
logs += step.logs + '\n';
});
window.open('data:text/csv,' + encodeURIComponent(logs));
diff --git a/dashboard/src/app/factories/load-factory/load-factory.service.ts b/dashboard/src/app/factories/load-factory/load-factory.service.ts
index 47d1dac71d..86192dfd8f 100644
--- a/dashboard/src/app/factories/load-factory/load-factory.service.ts
+++ b/dashboard/src/app/factories/load-factory/load-factory.service.ts
@@ -90,7 +90,7 @@ export class LoadFactoryService {
* Reset the loading progress.
*/
resetLoadProgress(): void {
- this.loadingSteps.forEach((step) => {
+ this.loadingSteps.forEach((step: any) => {
step.logs = '';
step.hasError = false;
});
diff --git a/dashboard/src/app/navbar/navbar-dropdown-menu/navbar-dropdown-menu.directive.ts b/dashboard/src/app/navbar/navbar-dropdown-menu/navbar-dropdown-menu.directive.ts
index 54b51621d6..76592b1358 100644
--- a/dashboard/src/app/navbar/navbar-dropdown-menu/navbar-dropdown-menu.directive.ts
+++ b/dashboard/src/app/navbar/navbar-dropdown-menu/navbar-dropdown-menu.directive.ts
@@ -10,6 +10,14 @@
*/
'use strict';
+interface IDropdonwMenuAttributes extends ng.IAttributes {
+ navbarDropdownRightClick: any;
+}
+
+interface IDropdonwMenuRootScope extends ng.IRootScopeService {
+ navbarDropdownActiveMenu: HTMLElement;
+}
+
/**
* @ngDoc directive
* @name navbar.directive:NavbarDropdownMenu
@@ -28,7 +36,7 @@ export class NavbarDropdownMenu implements ng.IDirective {
/**
* Root scope service.
*/
- $rootScope: ng.IRootScopeService;
+ $rootScope: IDropdonwMenuRootScope;
restrict: string = 'E';
bindToController: boolean = true;
@@ -54,118 +62,121 @@ export class NavbarDropdownMenu implements ng.IDirective {
*/
constructor($timeout: ng.ITimeoutService,
$document: ng.IDocumentService,
- $rootScope: ng.IRootScopeService) {
+ $rootScope: IDropdonwMenuRootScope) {
this.$timeout = $timeout;
this.$document = $document;
this.$rootScope = $rootScope;
}
- compile($element, attrs) {
+ compile($element: ng.IAugmentedJQuery, $attrs: IDropdonwMenuAttributes): ng.IDirectivePrePost {
let jqButton = $element.find('[ng-transclude]');
- if (angular.isDefined(attrs['navbarDropdownRightClick'])) {
+ if (angular.isDefined($attrs.navbarDropdownRightClick)) {
jqButton.attr('ng-click', '');
jqButton.attr('che-on-right-click', '$mdOpenMenu($event)');
} else {
jqButton.attr('ng-click', '$mdOpenMenu($event)');
}
+
+ return {};
}
- link($scope, $element) {
+ link($scope: ng.IScope, $element: ng.IAugmentedJQuery): void {
// store active menu element in rootScope
let menuContentEl = $element.find('.navbar-dropdown-menu'),
menuEl = $element.find('md-menu');
$scope.$watch(() => {
return menuContentEl.is(':visible');
- }, (visible) => {
+ }, (visible: boolean) => {
if (visible) {
this.$rootScope.navbarDropdownActiveMenu = menuEl[0];
}
});
let self = this;
- this.$document.off('.dropdown-menu')
- .on('mousedown.dropdown-menu contextmenu.dropdown-menu', '.md-menu-backdrop', (e) => {
- let eventType = e.type,
- eventWhich = e.which,
- backdropEl = angular.element(e.target);
+ this.$document
+ .off('.dropdown-menu')
+ .on('mousedown.dropdown-menu contextmenu.dropdown-menu', '.md-menu-backdrop', (e: JQueryEventObject) => {
+ let eventType = e.type,
+ eventWhich = e.which,
+ backdropEl = angular.element(e.target);
- if (eventType === 'mousedown') {
- if (eventWhich === 3) {
- // prevent event propagation for right mousedown
- // and wait for contextmenu event
- e.preventDefault();
- e.stopPropagation();
- return false;
- } else {
- eventType = 'click';
- }
- }
-
- var x = e.clientX,
- y = e.clientY,
- stack = [];
- let elementMouseIsOver = self.$document[0].elementFromPoint(x, y);
- elementMouseIsOver.style.pointerEvents = 'none';
- stack.push(elementMouseIsOver);
-
- // iterate elements under cursor
- let limit = 50,
- nextTargetEl;
- while (elementMouseIsOver && elementMouseIsOver.tagName !== 'BODY' && elementMouseIsOver.tagName !== 'MD-MENU' && limit > 0){
- elementMouseIsOver = self.$document[0].elementFromPoint(x, y);
-
- // break when top of tree is reached
- if (stack[stack.length-1] === elementMouseIsOver) {
- break;
- }
-
- let curEl = angular.element(elementMouseIsOver);
-
- // element to trigger event
- if (!nextTargetEl) {
- nextTargetEl = curEl;
+ if (eventType === 'mousedown') {
+ if (eventWhich === 3) {
+ // prevent event propagation for right mousedown
+ // and wait for contextmenu event
+ e.preventDefault();
+ e.stopPropagation();
+ return false;
+ } else {
+ eventType = 'click';
+ }
}
+ const x = e.clientX,
+ y = e.clientY,
+ stack = [];
+ let elementMouseIsOver = (self.$document[0] as any).elementFromPoint(x, y);
elementMouseIsOver.style.pointerEvents = 'none';
stack.push(elementMouseIsOver);
- limit--;
- }
+ // iterate elements under cursor
+ let limit = 50,
+ nextTargetEl;
+ while (elementMouseIsOver && elementMouseIsOver.tagName !== 'BODY' && elementMouseIsOver.tagName !== 'MD-MENU' && limit > 0) {
+ elementMouseIsOver = (self.$document[0] as any).elementFromPoint(x, y);
- // click on menu's backdrop to hide menu
- backdropEl.triggerHandler('click');
+ // break when top of tree is reached
+ if (stack[stack.length - 1] === elementMouseIsOver) {
+ break;
+ }
- if (elementMouseIsOver && elementMouseIsOver.tagName === 'MD-MENU') {
- // if menu is found then
- // check if click is caught over the same menu
- if(elementMouseIsOver === this.$rootScope.navbarDropdownActiveMenu) {
- // clear active menu
- delete this.$rootScope.navbarDropdownActiveMenu;
+ let curEl = angular.element(elementMouseIsOver);
+
+ // element to trigger event
+ if (!nextTargetEl) {
+ nextTargetEl = curEl;
+ }
+
+ elementMouseIsOver.style.pointerEvents = 'none';
+ stack.push(elementMouseIsOver);
+
+ limit--;
+ }
+
+ // click on menu's backdrop to hide menu
+ backdropEl.triggerHandler('click');
+
+ if (elementMouseIsOver && elementMouseIsOver.tagName === 'MD-MENU') {
+ // if menu is found then
+ // check if click is caught over the same menu
+ if (elementMouseIsOver === this.$rootScope.navbarDropdownActiveMenu) {
+ // clear active menu
+ delete this.$rootScope.navbarDropdownActiveMenu;
+ } else {
+ // open new menu by triggering mouse event
+ angular.element(nextTargetEl).trigger({
+ type: eventType,
+ which: eventWhich
+ } as JQueryEventObject);
+ }
} else {
- // open new menu by triggering mouse event
+ // if menu isn't found
+ // just trigger same mouse event on first found element
angular.element(nextTargetEl).trigger({
type: eventType,
which: eventWhich
- });
+ } as JQueryEventObject);
}
- } else {
- // if menu isn't found
- // just trigger same mouse event on first found element
- angular.element(nextTargetEl).trigger({
- type: eventType,
- which: eventWhich
- });
- }
- // clean pointer events
- for (let i=0; i {
// if there is a previous selected element, unselect it
if (this.$rootScope.selectedNavBarElement) {
@@ -60,40 +59,40 @@ export class NavBarSelected implements ng.IDirective {
};
// highlight item at start
- if (attrs.href === '#' + this.$location.path()) {
- select(element);
+ if ($attrs.href === '#' + this.$location.path()) {
+ select($element);
}
// highlight item on click
- element.bind('click', (event: JQueryEventObject) => {
+ $element.bind('click', (event: JQueryEventObject) => {
// prevent activating menu item if Ctrl key is pressed
if (event.ctrlKey) {
this.$rootScope.selectedNavBarElement.focus();
return;
}
- select(element);
+ select($element);
});
- element.bind('mousedown', () => {
- element.addClass('navbar-item-no-hover');
+ $element.bind('mousedown', () => {
+ $element.addClass('navbar-item-no-hover');
});
- element.bind('mouseup', () => {
- if (element !== this.$rootScope.selectedNavBarElement) {
- element.blur();
+ $element.bind('mouseup', () => {
+ if ($element !== this.$rootScope.selectedNavBarElement) {
+ $element.blur();
}
});
- element.bind('mouseover', () => {
- element.removeClass('navbar-item-no-hover');
+ $element.bind('mouseover', () => {
+ $element.removeClass('navbar-item-no-hover');
});
$scope.$on('navbar-selected:set', (event: ng.IAngularEvent, path: string) => {
// unselect previously selected item
- if (this.$rootScope.selectedNavBarElement === element) {
+ if (this.$rootScope.selectedNavBarElement === $element) {
this.$rootScope.selectedNavBarElement.removeClass('che-navbar-selected');
delete this.$rootScope.selectedNavBarElement;
}
// select item
- if (attrs.href === path) {
- select(element);
+ if ($attrs.href === path) {
+ select($element);
}
});
}
diff --git a/dashboard/src/app/navbar/navbar.controller.ts b/dashboard/src/app/navbar/navbar.controller.ts
index b8f369046f..fb98a581d4 100644
--- a/dashboard/src/app/navbar/navbar.controller.ts
+++ b/dashboard/src/app/navbar/navbar.controller.ts
@@ -14,7 +14,7 @@ import {CheKeycloak} from '../../components/api/che-keycloak.factory';
import {CheService} from '../../components/api/che-service.factory';
export class CheNavBarController {
- private menuItemUrl = {
+ menuItemUrl = {
dashboard: '#/',
workspaces: '#/workspaces',
administration: '#/administration',
diff --git a/dashboard/src/app/navbar/navbar.directive.ts b/dashboard/src/app/navbar/navbar.directive.ts
index 6864d8c00b..72479cc5c6 100644
--- a/dashboard/src/app/navbar/navbar.directive.ts
+++ b/dashboard/src/app/navbar/navbar.directive.ts
@@ -14,12 +14,12 @@
* Defines a directive for creating navbar.
* @author Florent Benoit
*/
-export class CheNavBar {
- private replace: boolean;
- private restrict: string;
- private templateUrl: string;
- private controller: string;
- private controllerAs: string;
+export class CheNavBar implements ng.IDirective {
+ replace: boolean;
+ restrict: string;
+ templateUrl: string;
+ controller: string;
+ controllerAs: string;
/**
* Default constructor that is using resource
diff --git a/dashboard/src/app/navbar/notification/navbar-notification.controller.ts b/dashboard/src/app/navbar/notification/navbar-notification.controller.ts
index 81fce43e11..362cb636ae 100644
--- a/dashboard/src/app/navbar/notification/navbar-notification.controller.ts
+++ b/dashboard/src/app/navbar/notification/navbar-notification.controller.ts
@@ -26,7 +26,7 @@ export class NavbarNotificationController {
*/
constructor(applicationNotifications: ApplicationNotifications, $scope: ng.IScope) {
this.applicationNotifications = applicationNotifications;
- $scope.$on("$mdMenuClose", () => {
+ $scope.$on('$mdMenuClose', () => {
this.removeReadNotifications();
});
}
@@ -53,7 +53,7 @@ export class NavbarNotificationController {
*/
removeReadNotifications(): void {
let notificationsToRemove = [];
- let notifications = this.applicationNotifications.getNotifications()
+ let notifications = this.applicationNotifications.getNotifications();
notifications.forEach((notification: any) => {
if (notification.removeOnRead) {
notificationsToRemove.push(notification);
diff --git a/dashboard/src/app/navbar/notification/navbar-notification.directive.ts b/dashboard/src/app/navbar/notification/navbar-notification.directive.ts
index 2ed9373de3..9f0eeec810 100644
--- a/dashboard/src/app/navbar/notification/navbar-notification.directive.ts
+++ b/dashboard/src/app/navbar/notification/navbar-notification.directive.ts
@@ -16,21 +16,14 @@
* @description This class is handling the directive to handle the container with notifications
* @author Ann Shumilova
*/
-export class NavbarNotification {
+export class NavbarNotification implements ng.IDirective {
- /**
- * Default constructor that is using resource
- * @ngInject for Dependency injection
- */
- constructor() {
- this.restrict = 'E';
- this.bindToController = true;
- this.templateUrl = 'app/navbar/notification/navbar-notification.html';
- this.controller = 'NavbarNotificationController';
- this.controllerAs = 'navbarNotificationController';
+ restrict = 'E';
+ bindToController = true;
+ templateUrl = 'app/navbar/notification/navbar-notification.html';
+ controller = 'NavbarNotificationController';
+ controllerAs = 'navbarNotificationController';
- this.transclude = true;
-
- }
+ transclude = true;
}
diff --git a/dashboard/src/app/navbar/recent-workspaces/recent-workspaces.controller.spec.ts b/dashboard/src/app/navbar/recent-workspaces/recent-workspaces.controller.spec.ts
index fe76baafbd..4ec39763e0 100644
--- a/dashboard/src/app/navbar/recent-workspaces/recent-workspaces.controller.spec.ts
+++ b/dashboard/src/app/navbar/recent-workspaces/recent-workspaces.controller.spec.ts
@@ -14,8 +14,6 @@ import {CheAPIBuilder} from '../../../components/api/builder/che-api-builder.fac
import {CheHttpBackend} from '../../../components/api/test/che-http-backend';
import IdeSvc from '../../ide/ide.service';
import {CheBranding} from '../../../components/branding/che-branding.factory';
-import {IWorkspaceAttributes} from '../../../components/api/builder/che-workspace-builder';
-
/**
* Test of the NavbarRecentWorkspacesController
@@ -68,7 +66,7 @@ describe('NavbarRecentWorkspacesController', () => {
let wrkspName = 'testName' + i;
let wrkspCreateDate = new Date(2001, 1, 1, i, 1).toString();
let wrkspUpdateDate = new Date(2001, 1, 1, i, 2).toString();
- let wrkspAttr = {'created': Date.parse(wrkspCreateDate), 'updated': Date.parse(wrkspUpdateDate)} as IWorkspaceAttributes;
+ let wrkspAttr = {'created': Date.parse(wrkspCreateDate), 'updated': Date.parse(wrkspUpdateDate)};
let workspace = apiBuilder.getWorkspaceBuilder().withId(wrkspId).withAttributes(wrkspAttr).withName(wrkspName).build();
workspaces.push(workspace);
}
diff --git a/dashboard/src/app/navbar/recent-workspaces/recent-workspaces.directive.ts b/dashboard/src/app/navbar/recent-workspaces/recent-workspaces.directive.ts
index 40b28a3263..6a6d962601 100644
--- a/dashboard/src/app/navbar/recent-workspaces/recent-workspaces.directive.ts
+++ b/dashboard/src/app/navbar/recent-workspaces/recent-workspaces.directive.ts
@@ -16,7 +16,7 @@
* @description This class is handling the directive of the listing recent opened workspaces in the navbar
* @author Oleksii Kurinnyi
*/
-export class NavbarRecentWorkspaces {
+export class NavbarRecentWorkspaces implements ng.IDirective {
restrict: string;
templateUrl: string;
controller: string;
diff --git a/dashboard/src/app/organizations/organization-details/organization-select-members-dialog/organization-select-members-dialog.controller.ts b/dashboard/src/app/organizations/organization-details/organization-select-members-dialog/organization-select-members-dialog.controller.ts
index e13a874d78..9b8623b106 100644
--- a/dashboard/src/app/organizations/organization-details/organization-select-members-dialog/organization-select-members-dialog.controller.ts
+++ b/dashboard/src/app/organizations/organization-details/organization-select-members-dialog/organization-select-members-dialog.controller.ts
@@ -57,10 +57,6 @@ export class OrganizationSelectMembersDialogController {
* The list of users, that are available to be added
*/
private availableUsers: Array;
- /**
- * The list of users, that are going to be added
- */
- private usersToAdd: Array;
/**
* Current user.
*/
@@ -122,7 +118,7 @@ export class OrganizationSelectMembersDialogController {
map[member.id] = member;
return map;
}, {});
- this.availableUsers = this.parentOrganizationMembers.filter((parentOrganizationMember: che.IUser) => {
+ this.availableUsers = this.parentOrganizationMembers.filter((parentOrganizationMember: che.IUser) => {
return !existingMembers[parentOrganizationMember.id] && parentOrganizationMember.id !== this.user.id;
});
diff --git a/dashboard/src/app/profile/profile-config.ts b/dashboard/src/app/profile/profile-config.ts
index 7dd682675d..650f068969 100644
--- a/dashboard/src/app/profile/profile-config.ts
+++ b/dashboard/src/app/profile/profile-config.ts
@@ -24,7 +24,7 @@ export class ProfileConfig {
};
// config routes
- register.app.config(function ($routeProvider) {
+ register.app.config(function ($routeProvider: che.route.IRouteProvider) {
$routeProvider.accessWhen('/account', locationProvider);
});
}
diff --git a/dashboard/src/app/profile/profile.controller.ts b/dashboard/src/app/profile/profile.controller.ts
index f954eb49b5..95e9d882af 100644
--- a/dashboard/src/app/profile/profile.controller.ts
+++ b/dashboard/src/app/profile/profile.controller.ts
@@ -33,10 +33,10 @@ export class ProfileController {
this.profileUrl = cheKeycloak.getProfileUrl();
let profile = cheProfile.getProfile();
- this.firstName = profile.attributes['firstName'];
- this.lastName = profile.attributes['lastName'];
+ this.firstName = profile.attributes.firstName;
+ this.lastName = profile.attributes.lastName;
this.email = profile.email;
- this.userName = profile.attributes['preferred_username'];
+ this.userName = (profile.attributes as any).preferred_username;
}
/**
diff --git a/dashboard/src/app/proxy/proxy-settings.constant.ts.template b/dashboard/src/app/proxy/proxy-settings.constant.ts.template
index 24e92de3d4..8b0de9ac13 100644
--- a/dashboard/src/app/proxy/proxy-settings.constant.ts.template
+++ b/dashboard/src/app/proxy/proxy-settings.constant.ts.template
@@ -12,8 +12,8 @@
export class ProxySettingsConfig {
- constructor(register) {
- // Register this factory
+ constructor(register: che.IRegisterService) {
+ // register this factory
register.app.constant('proxySettings', '%CONTENT%');
}
diff --git a/dashboard/src/app/stacks/list-stacks/build-stack/build-stack.controller.ts b/dashboard/src/app/stacks/list-stacks/build-stack/build-stack.controller.ts
index 8661686c6c..692426a733 100644
--- a/dashboard/src/app/stacks/list-stacks/build-stack/build-stack.controller.ts
+++ b/dashboard/src/app/stacks/list-stacks/build-stack/build-stack.controller.ts
@@ -14,7 +14,6 @@ import {ImportStackService} from '../../stack-details/import-stack.service';
import {CheStack} from '../../../../components/api/che-stack.factory';
import {IEnvironmentManagerMachine} from '../../../../components/api/environment/environment-manager-machine';
import {CheBranding} from '../../../../components/branding/che-branding.factory';
-import {EnvironmentManager} from '../../../../components/api/environment/environment-manager';
import {CheRecipeTypes} from '../../../../components/api/recipe/che-recipe-types';
import {RecipeEditor} from './recipe-editor/recipe-editor';
import {CheWorkspace} from '../../../../components/api/workspace/che-workspace.factory';
@@ -68,7 +67,7 @@ export class BuildStackController {
* It will hide the dialog box.
*/
cancel(): void {
- this.importStackService.setStack({});
+ this.importStackService.setStack({} as che.IStack);
this.$mdDialog.cancel();
}
diff --git a/dashboard/src/app/stacks/list-stacks/build-stack/recipe-editor/recipe-editor.ts b/dashboard/src/app/stacks/list-stacks/build-stack/recipe-editor/recipe-editor.ts
index ed9fd63a52..a98c283b11 100644
--- a/dashboard/src/app/stacks/list-stacks/build-stack/recipe-editor/recipe-editor.ts
+++ b/dashboard/src/app/stacks/list-stacks/build-stack/recipe-editor/recipe-editor.ts
@@ -11,7 +11,6 @@
'use strict';
import {EnvironmentManager} from '../../../../../components/api/environment/environment-manager';
-import {CheRecipeTypes} from '../../../../../components/api/recipe/che-recipe-types';
export class RecipeEditor {
diff --git a/dashboard/src/app/stacks/list-stacks/stack-item/stack-item.controller.ts b/dashboard/src/app/stacks/list-stacks/stack-item/stack-item.controller.ts
index d723f85015..77dc11f192 100644
--- a/dashboard/src/app/stacks/list-stacks/stack-item/stack-item.controller.ts
+++ b/dashboard/src/app/stacks/list-stacks/stack-item/stack-item.controller.ts
@@ -18,11 +18,17 @@
*/
export class StackItemController {
+ $location: ng.ILocationService;
+ lodash: any;
+
+ stack: che.IStack;
+
/**
* Default constructor that is using resource
* @ngInject for Dependency injection
*/
- constructor($location, lodash) {
+ constructor($location: ng.ILocationService,
+ lodash: any) {
this.$location = $location;
this.lodash = lodash;
}
@@ -39,8 +45,8 @@ export class StackItemController {
* @param stack stack with components
* @returns {*}
*/
- getComponents(stack) {
- return this.lodash.map(stack.components, (component) => {
+ getComponents(stack: che.IStack) {
+ return this.lodash.map(stack.components, (component: any) => {
return component.name;
}).join(', ');
}
diff --git a/dashboard/src/app/stacks/list-stacks/stack-item/stack-item.directive.ts b/dashboard/src/app/stacks/list-stacks/stack-item/stack-item.directive.ts
index 03743cc4d9..70077d6363 100644
--- a/dashboard/src/app/stacks/list-stacks/stack-item/stack-item.directive.ts
+++ b/dashboard/src/app/stacks/list-stacks/stack-item/stack-item.directive.ts
@@ -15,33 +15,28 @@
* Expects in parent scope:
* @param{object} stack
*/
-export class StackItem {
+export class StackItem implements ng.IDirective {
- /**
- * Default constructor.
- */
- constructor() {
- this.restrict = 'E';
+ restrict = 'E';
- // we require ngModel as we want to use it inside our directive
- this.require = ['ngModel'];
+ // we require ngModel as we want to use it inside our directive
+ require = ['ngModel'];
- // scope values
- this.scope = {
- stack: '=stack',
- userId: '=userId',
- isSelectable: '=cheSelectable',
- isSelect: '=?ngModel',
- onCheckboxClick: '&?cheOnCheckboxClick',
- onDelete: '&cheOnDelete',
- onDuplicate: '&cheOnDuplicate'
- };
+ // scope values
+ scope = {
+ stack: '=stack',
+ userId: '=userId',
+ isSelectable: '=cheSelectable',
+ isSelect: '=?ngModel',
+ onCheckboxClick: '&?cheOnCheckboxClick',
+ onDelete: '&cheOnDelete',
+ onDuplicate: '&cheOnDuplicate'
+ };
- this.templateUrl = 'app/stacks/list-stacks/stack-item/stack-item.html';
+ templateUrl = 'app/stacks/list-stacks/stack-item/stack-item.html';
- this.controller = 'StackItemController';
- this.controllerAs = 'stackItemController';
- this.bindToController = true;
- }
+ controller = 'StackItemController';
+ controllerAs = 'stackItemController';
+ bindToController = true;
}
diff --git a/dashboard/src/app/stacks/stack-details/import-stack.service.ts b/dashboard/src/app/stacks/stack-details/import-stack.service.ts
index aa7df9414a..6a25121c0f 100644
--- a/dashboard/src/app/stacks/stack-details/import-stack.service.ts
+++ b/dashboard/src/app/stacks/stack-details/import-stack.service.ts
@@ -18,7 +18,7 @@ import {StackValidationService} from './stack-validation.service';
*/
export class ImportStackService {
private stackValidationService: StackValidationService;
- private stack: che.IStack | {};
+ private stack: che.IStack;
/**
@@ -28,7 +28,7 @@ export class ImportStackService {
constructor(stackValidationService: StackValidationService) {
this.stackValidationService = stackValidationService;
- this.stack = {};
+ this.stack = {} as che.IStack;
}
/**
@@ -36,7 +36,7 @@ export class ImportStackService {
*
* @param stack {che.IStack}
*/
- setStack(stack: che.IStack | {}): void {
+ setStack(stack: che.IStack): void {
this.stack = stack;
}
@@ -45,7 +45,7 @@ export class ImportStackService {
*
* @returns {che.IStack}
*/
- getStack(): che.IStack | {} {
+ getStack(): che.IStack {
return this.stack;
}
diff --git a/dashboard/src/app/stacks/stack-details/select-template/select-template.controller.ts b/dashboard/src/app/stacks/stack-details/select-template/select-template.controller.ts
index 79bdf7cea0..f45068a711 100644
--- a/dashboard/src/app/stacks/stack-details/select-template/select-template.controller.ts
+++ b/dashboard/src/app/stacks/stack-details/select-template/select-template.controller.ts
@@ -20,7 +20,7 @@ import {StackController} from '../stack.controller';
*/
export class SelectTemplateController {
stack: che.IStack;
- selectedTemplates: Array;
+ selectedTemplates: Array;
projectsOrderBy: string;
private $mdDialog: ng.material.IDialogService;
@@ -53,10 +53,10 @@ export class SelectTemplateController {
/**
* Helper method used to get the length of keys of the given object
- * @param projectTemplate {che.IProject}
+ * @param projectTemplate {che.IProjectTemplate}
* @param isAdd {boolean}
*/
- updateSelectedTemplates(projectTemplate: che.IProject, isAdd: boolean): void {
+ updateSelectedTemplates(projectTemplate: che.IProjectTemplate, isAdd: boolean): void {
if (isAdd) {
this.selectedTemplates.push(projectTemplate);
} else {
diff --git a/dashboard/src/app/stacks/stack-details/stack.controller.ts b/dashboard/src/app/stacks/stack-details/stack.controller.ts
index 7286a9aa78..6b6e184028 100644
--- a/dashboard/src/app/stacks/stack-details/stack.controller.ts
+++ b/dashboard/src/app/stacks/stack-details/stack.controller.ts
@@ -302,7 +302,8 @@ export class StackController {
this.createStack();
return;
}
- this.cheStack.updateStack(this.stack.id, this.stackJson).then((stack: any) => {
+ const stack = angular.fromJson(this.stackJson);
+ this.cheStack.updateStack(this.stack.id, stack).then((stack: any) => {
this.cheNotification.showInfo('Stack is successfully updated.');
this.isLoading = false;
this.stack = stack;
@@ -320,7 +321,8 @@ export class StackController {
* Creates new stack.
*/
createStack(): void {
- this.cheStack.createStack(this.stackJson).then((stack: any) => {
+ const stack = angular.fromJson(this.stackJson);
+ this.cheStack.createStack(stack).then((stack: any) => {
this.stack = stack;
this.isLoading = false;
this.cheStack.fetchStacks();
@@ -380,11 +382,11 @@ export class StackController {
/**
* Update projects sequentially by iterating on the number of the projects.
* @param workspaceId{string} - the ID of the workspace to use for adding commands
- * @param projects{Array} - the array to follow
+ * @param projects{Array} - the array to follow
* @param index{number} - the index of the array of commands
* @param deferred{ng.IDeferred}
*/
- updateProjects(workspaceId: string, projects: Array, index: number, deferred: ng.IDeferred): void {
+ updateProjects(workspaceId: string, projects: Array, index: number, deferred: ng.IDeferred): void {
if (index < projects.length) {
let project = projects[index];
let projectTypeResolverService = this.cheWorkspace.getWorkspaceAgent(workspaceId).getProjectTypeResolver();
@@ -406,12 +408,12 @@ export class StackController {
/**
* Add projects.
* @param workspaceId{string} - the ID of the workspace to use for adding projects
- * @param projects{Array} - the adding projects
+ * @param projects{Array} - the adding projects
* @param deferred{ng.IDeferred}
*
* @returns {ng.IPromise}
*/
- addProjects(workspaceId: string, projects: Array, deferred: ng.IDeferred): void {
+ addProjects(workspaceId: string, projects: Array, deferred: ng.IDeferred): void {
if (projects && projects.length) {
let workspaceAgent = this.cheWorkspace.getWorkspaceAgent(workspaceId);
workspaceAgent.getProject().createProjects(projects).then(() => {
@@ -427,9 +429,9 @@ export class StackController {
/**
* Show popup for stack's testing
* @param stack {che.IStack}
- * @param projects {Array}
+ * @param projects {Array}
*/
- showStackTestPopup(stack: che.IStack, projects: Array): void {
+ showStackTestPopup(stack: che.IStack, projects: Array): void {
this.showIDE = false;
stack.workspaceConfig.projects = [];
let deferred = this.$q.defer();
diff --git a/dashboard/src/app/teams/invite-members/list-members.controller.ts b/dashboard/src/app/teams/invite-members/list-members.controller.ts
index 6b0f00304a..925f89566f 100644
--- a/dashboard/src/app/teams/invite-members/list-members.controller.ts
+++ b/dashboard/src/app/teams/invite-members/list-members.controller.ts
@@ -107,7 +107,7 @@ export class ListMembersController {
* Handler for value changed in the list.
* @param member
*/
- onValueChanged(member): void {
+ onValueChanged(member: any): void {
member.roles = [angular.fromJson(member.role)];
}
diff --git a/dashboard/src/app/teams/invite-members/list-members.directive.ts b/dashboard/src/app/teams/invite-members/list-members.directive.ts
index 2f46ffcc7c..f3a512d9dc 100644
--- a/dashboard/src/app/teams/invite-members/list-members.directive.ts
+++ b/dashboard/src/app/teams/invite-members/list-members.directive.ts
@@ -38,6 +38,4 @@ export class ListMembers implements ng.IDirective {
owner: '='
};
- constructor () {
- }
}
diff --git a/dashboard/src/app/teams/team-details/team-members/list-team-members.controller.ts b/dashboard/src/app/teams/team-details/team-members/list-team-members.controller.ts
index f570522d84..272b3e7029 100644
--- a/dashboard/src/app/teams/team-details/team-members/list-team-members.controller.ts
+++ b/dashboard/src/app/teams/team-details/team-members/list-team-members.controller.ts
@@ -10,6 +10,10 @@
*/
'use strict';
import {TeamDetailsService} from '../team-details.service';
+import {ConfirmDialogService} from '../../../../components/service/confirm-dialog/confirm-dialog.service';
+import {CheNotification} from '../../../../components/notification/che-notification.factory';
+import {CheProfile} from '../../../../components/api/che-profile.factory';
+import {CheUser} from '../../../../components/api/che-user.factory';
/**
* @ngdoc controller
@@ -22,6 +26,10 @@ export class ListTeamMembersController {
* Location service.
*/
$location: ng.ILocationService;
+ /**
+ * Selection and filtration helper
+ */
+ cheListHelper: che.widget.ICheListHelper;
/**
* Team API interaction.
@@ -34,11 +42,11 @@ export class ListTeamMembersController {
/**
* User API interaction.
*/
- private cheUser: any;
+ private cheUser: CheUser;
/**
* User profile API interaction.
*/
- private cheProfile: any;
+ private cheProfile: CheProfile;
/**
* Permissions API interaction.
*/
@@ -50,11 +58,11 @@ export class ListTeamMembersController {
/**
* Notifications service.
*/
- private cheNotification: any;
+ private cheNotification: CheNotification;
/**
* Confirm dialog service.
*/
- private confirmDialogService: any;
+ private confirmDialogService: ConfirmDialogService;
/**
* Promises service.
*/
@@ -87,19 +95,25 @@ export class ListTeamMembersController {
* The editable (whether current user can edit members list and see invitations) state of the members (comes from outside).
*/
private editable: any;
- /**
- * Selection and filtration helper
- */
- cheListHelper: che.widget.ICheListHelper;
/**
* Default constructor that is using resource
* @ngInject for Dependency injection
*/
- constructor(cheTeam: che.api.ICheTeam, chePermissions: che.api.IChePermissions, cheInvite: che.api.ICheInvite, cheUser: any, cheProfile: any,
- confirmDialogService: any, $mdDialog: angular.material.IDialogService, $q: ng.IQService, cheNotification: any,
- lodash: any, $location: ng.ILocationService, teamDetailsService: TeamDetailsService,
- $scope: ng.IScope, cheListHelperFactory: che.widget.ICheListHelperFactory) {
+ constructor(cheTeam: che.api.ICheTeam,
+ chePermissions: che.api.IChePermissions,
+ cheInvite: che.api.ICheInvite,
+ cheUser: CheUser,
+ cheProfile: CheProfile,
+ confirmDialogService: ConfirmDialogService,
+ $mdDialog: angular.material.IDialogService,
+ $q: ng.IQService,
+ cheNotification: CheNotification,
+ lodash: any,
+ $location: ng.ILocationService,
+ teamDetailsService: TeamDetailsService,
+ $scope: ng.IScope,
+ cheListHelperFactory: che.widget.ICheListHelperFactory) {
this.cheTeam = cheTeam;
this.cheInvite = cheInvite;
this.chePermissions = chePermissions;
diff --git a/dashboard/src/app/teams/team-details/team-members/member-item/member-item.controller.ts b/dashboard/src/app/teams/team-details/team-members/member-item/member-item.controller.ts
index 5d631ec264..62a05427cd 100644
--- a/dashboard/src/app/teams/team-details/team-members/member-item/member-item.controller.ts
+++ b/dashboard/src/app/teams/team-details/team-members/member-item/member-item.controller.ts
@@ -98,7 +98,7 @@ export class MemberItemController {
let roles = this.cheTeam.getRolesFromActions(this.member.permissions.actions);
let titles = [];
- let processedActions = []
+ let processedActions = [];
roles.forEach((role: any) => {
titles.push(role.title);
processedActions = processedActions.concat(role.actions);
diff --git a/dashboard/src/app/teams/team-details/team-members/member-item/member-item.directive.ts b/dashboard/src/app/teams/team-details/team-members/member-item/member-item.directive.ts
index 3cb564ffd2..1a9c2e0fda 100644
--- a/dashboard/src/app/teams/team-details/team-members/member-item/member-item.directive.ts
+++ b/dashboard/src/app/teams/team-details/team-members/member-item/member-item.directive.ts
@@ -34,6 +34,4 @@ export class MemberItem implements ng.IDirective {
isOwner: '=isOwner'
};
- constructor() {
- }
}
diff --git a/dashboard/src/app/workspaces/create-workspace/project-source-selector/add-import-project/add-import-project.controller.ts b/dashboard/src/app/workspaces/create-workspace/project-source-selector/add-import-project/add-import-project.controller.ts
index 8688b2e3fd..55a34068fd 100644
--- a/dashboard/src/app/workspaces/create-workspace/project-source-selector/add-import-project/add-import-project.controller.ts
+++ b/dashboard/src/app/workspaces/create-workspace/project-source-selector/add-import-project/add-import-project.controller.ts
@@ -39,7 +39,9 @@ export class AddImportProjectController {
* Callback to check uniqueness of project name.
* Provided by parent controller.
*/
+ /* tslint:disable */
private isProjectNameUnique: (data: {name: string}) => boolean;
+ /* tslint:enable */
/**
* Callback provided by parent controller.
*/
diff --git a/dashboard/src/app/workspaces/create-workspace/project-source-selector/edit-project/edit-project.controller.ts b/dashboard/src/app/workspaces/create-workspace/project-source-selector/edit-project/edit-project.controller.ts
index 556023aa7b..5264b29de2 100644
--- a/dashboard/src/app/workspaces/create-workspace/project-source-selector/edit-project/edit-project.controller.ts
+++ b/dashboard/src/app/workspaces/create-workspace/project-source-selector/edit-project/edit-project.controller.ts
@@ -25,7 +25,9 @@ export class EditProjectController {
* Callback to check uniqueness of project name.
* Provided by parent controller.
*/
+ /* tslint:disable */
private isProjectNameUnique: (data: {name: string}) => boolean;
+ /* tslint:enable */
/**
* Callback which should be called for changes to be saved.
* Provided by parent controller.
diff --git a/dashboard/src/app/workspaces/create-workspace/project-source-selector/edit-project/project-metadata/project-metadata.controller.ts b/dashboard/src/app/workspaces/create-workspace/project-source-selector/edit-project/project-metadata/project-metadata.controller.ts
index da3289aea2..6bc6711222 100644
--- a/dashboard/src/app/workspaces/create-workspace/project-source-selector/edit-project/project-metadata/project-metadata.controller.ts
+++ b/dashboard/src/app/workspaces/create-workspace/project-source-selector/edit-project/project-metadata/project-metadata.controller.ts
@@ -41,7 +41,9 @@ export class ProjectMetadataController {
* Original template name provided from parent controller.
* Provided by parent controller.
*/
+ /* tslint:disable */
private templateName: string;
+ /* tslint:enable */
/**
* Callback to check uniqueness of project name.
* Provided by parent controller.
diff --git a/dashboard/src/app/workspaces/list-workspaces/workspace-item/usage-chart.directive.ts b/dashboard/src/app/workspaces/list-workspaces/workspace-item/usage-chart.directive.ts
index f9c7147740..7e51711a27 100644
--- a/dashboard/src/app/workspaces/list-workspaces/workspace-item/usage-chart.directive.ts
+++ b/dashboard/src/app/workspaces/list-workspaces/workspace-item/usage-chart.directive.ts
@@ -24,7 +24,7 @@ interface IUsageChartScope extends ng.IScope {
* Defines a directive for displaying usage of resource: chart + description.
* @author Ann Shumilova
*/
-export class UsageChart {
+export class UsageChart implements ng.IDirective {
restrict: string;
templateUrl: string;
replace: boolean;
@@ -54,28 +54,28 @@ export class UsageChart {
}
- link($scope: IUsageChartScope, element: ng.IAugmentedJQuery, attrs: any): void {
+ link($scope: IUsageChartScope, $element: ng.IAugmentedJQuery, $attrs: ng.IAttributes): void {
if ($scope.usedColor) {
- element.find('.usage-chart-used-value').css('color', $scope.usedColor);
- element.find('.usage-chart-label').css('color', $scope.usedColor);
+ $element.find('.usage-chart-used-value').css('color', $scope.usedColor);
+ $element.find('.usage-chart-label').css('color', $scope.usedColor);
}
$scope.$watch(function () {
- return element.is(':visible');
+ return $element.is(':visible');
}, function () {
- if (element.is(':visible')) {
+ if ($element.is(':visible')) {
$scope.loaded = true;
}
});
let t = this;
- attrs.$observe('cheUsed', function () {
+ $attrs.$observe('cheUsed', function () {
if ($scope.used && $scope.provided) {
t.initChart($scope);
}
});
- attrs.$observe('cheProvided', function () {
+ $attrs.$observe('cheProvided', function () {
if ($scope.used && $scope.provided) {
t.initChart($scope);
}
@@ -92,9 +92,9 @@ export class UsageChart {
$scope.config = {
tooltips: true,
labels: false,
- mouseover: () => {},
- mouseout: () => {},
- click: () => {},
+ // mouseover: () => {},
+ // mouseout: () => {},
+ // click: () => {},
legend: {
display: false,
position: 'right'
diff --git a/dashboard/src/app/workspaces/share-workspace/add-developers/add-developers.controller.ts b/dashboard/src/app/workspaces/share-workspace/add-developers/add-developers.controller.ts
index 3aba30256c..e2fb02c640 100644
--- a/dashboard/src/app/workspaces/share-workspace/add-developers/add-developers.controller.ts
+++ b/dashboard/src/app/workspaces/share-workspace/add-developers/add-developers.controller.ts
@@ -27,7 +27,9 @@ export class AddDeveloperController {
/**
* true if user owns the workspace.
*/
+ /* tslint:disable */
private canShare: boolean;
+ /* tslint:enable */
/**
* List of users to share the workspace.
*/
diff --git a/dashboard/src/app/workspaces/share-workspace/share-workspace.controller.ts b/dashboard/src/app/workspaces/share-workspace/share-workspace.controller.ts
index 4da3ef2b94..93980cd09d 100644
--- a/dashboard/src/app/workspaces/share-workspace/share-workspace.controller.ts
+++ b/dashboard/src/app/workspaces/share-workspace/share-workspace.controller.ts
@@ -95,8 +95,24 @@ export class ShareWorkspaceController {
* Default constructor that is using resource
* @ngInject for Dependency injection
*/
- constructor(cheWorkspace: CheWorkspace, cheUser: CheUser, chePermissions: che.api.IChePermissions, cheNotification: CheNotification, $mdDialog: ng.material.IDialogService, $document: ng.IDocumentService, $mdConstant: any, $route: ng.route.IRouteService, $q: ng.IQService, lodash: any, confirmDialogService: ConfirmDialogService, cheTeam: che.api.ICheTeam, $log: ng.ILogService, $scope: ng.IScope, cheListHelperFactory: che.widget.ICheListHelperFactory) {
+ constructor(cheWorkspace: CheWorkspace,
+ cheUser: CheUser,
+ chePermissions: che.api.IChePermissions,
+ cheNotification: CheNotification,
+ $mdDialog: ng.material.IDialogService,
+ $document: ng.IDocumentService,
+ $mdConstant: any,
+ $route: ng.route.IRouteService,
+ $q: ng.IQService,
+ lodash: any,
+ confirmDialogService: ConfirmDialogService,
+ cheTeam: che.api.ICheTeam,
+ $log: ng.ILogService,
+ $scope: ng.IScope,
+ cheListHelperFactory: che.widget.ICheListHelperFactory) {
+ /* tslint:disable */
'ngInject';
+ /* tslint:enable */
this.cheWorkspace = cheWorkspace;
this.cheUser = cheUser;
diff --git a/dashboard/src/app/workspaces/workspace-details/environments/list-env-variables/list-env-variables.controller.ts b/dashboard/src/app/workspaces/workspace-details/environments/list-env-variables/list-env-variables.controller.ts
index 7503493e12..9bbe03b22b 100644
--- a/dashboard/src/app/workspaces/workspace-details/environments/list-env-variables/list-env-variables.controller.ts
+++ b/dashboard/src/app/workspaces/workspace-details/environments/list-env-variables/list-env-variables.controller.ts
@@ -24,7 +24,7 @@ interface IEnvironmentVariable {
*/
export class ListEnvVariablesController {
$mdDialog: ng.material.IDialogService;
- lodash: _.LoDashStatic;
+ lodash: any;
isNoSelected: boolean = true;
isBulkChecked: boolean = false;
@@ -46,7 +46,9 @@ export class ListEnvVariablesController {
* Default constructor that is using resource
* @ngInject for Dependency injection
*/
- constructor($mdDialog: ng.material.IDialogService, lodash: _.LoDashStatic, confirmDialogService: ConfirmDialogService) {
+ constructor($mdDialog: ng.material.IDialogService,
+ lodash: any,
+ confirmDialogService: ConfirmDialogService) {
this.$mdDialog = $mdDialog;
this.lodash = lodash;
this.confirmDialogService = confirmDialogService;
diff --git a/dashboard/src/app/workspaces/workspace-details/environments/list-servers/edit-server-dialog/edit-server-dialog.controller.ts b/dashboard/src/app/workspaces/workspace-details/environments/list-servers/edit-server-dialog/edit-server-dialog.controller.ts
index 7ad4d32707..853bfd0c3b 100644
--- a/dashboard/src/app/workspaces/workspace-details/environments/list-servers/edit-server-dialog/edit-server-dialog.controller.ts
+++ b/dashboard/src/app/workspaces/workspace-details/environments/list-servers/edit-server-dialog/edit-server-dialog.controller.ts
@@ -20,7 +20,7 @@ import {IEnvironmentManagerMachineServer} from '../../../../../../components/api
*/
export class EditServerDialogController {
$mdDialog: ng.material.IDialogService;
- lodash: _.LoDashStatic;
+ lodash: any;
popupTitle: string;
@@ -44,7 +44,8 @@ export class EditServerDialogController {
* Default constructor that is using resource
* @ngInject for Dependency injection
*/
- constructor($mdDialog: ng.material.IDialogService, lodash: _.LoDashStatic) {
+ constructor($mdDialog: ng.material.IDialogService,
+ lodash: any) {
this.$mdDialog = $mdDialog;
this.lodash = lodash;
diff --git a/dashboard/src/app/workspaces/workspace-details/environments/list-servers/list-servers.controller.ts b/dashboard/src/app/workspaces/workspace-details/environments/list-servers/list-servers.controller.ts
index 56a644ff80..e2bff82b23 100644
--- a/dashboard/src/app/workspaces/workspace-details/environments/list-servers/list-servers.controller.ts
+++ b/dashboard/src/app/workspaces/workspace-details/environments/list-servers/list-servers.controller.ts
@@ -24,7 +24,7 @@ interface IServerListItem extends IEnvironmentManagerMachineServer {
*/
export class ListServersController {
$mdDialog: ng.material.IDialogService;
- lodash: _.LoDashStatic;
+ lodash: any;
isNoSelected: boolean = true;
isBulkChecked: boolean = false;
@@ -46,7 +46,9 @@ export class ListServersController {
* Default constructor that is using resource
* @ngInject for Dependency injection
*/
- constructor($mdDialog: ng.material.IDialogService, lodash: _.LoDashStatic, confirmDialogService: ConfirmDialogService) {
+ constructor($mdDialog: ng.material.IDialogService,
+ lodash: any,
+ confirmDialogService: ConfirmDialogService) {
this.$mdDialog = $mdDialog;
this.lodash = lodash;
this.confirmDialogService = confirmDialogService;
diff --git a/dashboard/src/app/workspaces/workspace-details/environments/machine-config/machine-config.controller.ts b/dashboard/src/app/workspaces/workspace-details/environments/machine-config/machine-config.controller.ts
index 5062458dd5..cdd503a220 100644
--- a/dashboard/src/app/workspaces/workspace-details/environments/machine-config/machine-config.controller.ts
+++ b/dashboard/src/app/workspaces/workspace-details/environments/machine-config/machine-config.controller.ts
@@ -27,7 +27,7 @@ export class WorkspaceMachineConfigController {
$mdDialog: ng.material.IDialogService;
$q: ng.IQService;
$timeout: ng.ITimeoutService;
- lodash: _.LoDashStatic;
+ lodash: any;
timeoutPromise;
@@ -52,7 +52,12 @@ export class WorkspaceMachineConfigController {
* Default constructor that is using resource injection
* @ngInject for Dependency injection
*/
- constructor($mdDialog: ng.material.IDialogService, $q: ng.IQService, $scope: ng.IScope, $timeout: ng.ITimeoutService, lodash: _.LoDashStatic, confirmDialogService: ConfirmDialogService) {
+ constructor($mdDialog: ng.material.IDialogService,
+ $q: ng.IQService,
+ $scope: ng.IScope,
+ $timeout: ng.ITimeoutService,
+ lodash: any,
+ confirmDialogService: ConfirmDialogService) {
this.$mdDialog = $mdDialog;
this.$q = $q;
this.$timeout = $timeout;
diff --git a/dashboard/src/app/workspaces/workspace-details/environments/machine-config/machine-config.directive.ts b/dashboard/src/app/workspaces/workspace-details/environments/machine-config/machine-config.directive.ts
index 38590e33b7..b419aac3b8 100644
--- a/dashboard/src/app/workspaces/workspace-details/environments/machine-config/machine-config.directive.ts
+++ b/dashboard/src/app/workspaces/workspace-details/environments/machine-config/machine-config.directive.ts
@@ -24,7 +24,7 @@
*
* @author Oleksii Kurinnyi
*/
-export class WorkspaceMachineConfig {
+export class WorkspaceMachineConfig implements ng.IDirective {
restrict = 'E';
templateUrl = 'app/workspaces/workspace-details/environments/machine-config/machine-config.html';
@@ -43,10 +43,5 @@ export class WorkspaceMachineConfig {
machineIsOpened: '='
};
- /**
- * Default constructor that is using resource
- * @ngInject for Dependency injection
- */
- constructor () { }
}
diff --git a/dashboard/src/app/workspaces/workspace-details/export-workspace/dialog/export-workspace-dialog.controller.ts b/dashboard/src/app/workspaces/workspace-details/export-workspace/dialog/export-workspace-dialog.controller.ts
index df9b75799f..ecbaed7073 100644
--- a/dashboard/src/app/workspaces/workspace-details/export-workspace/dialog/export-workspace-dialog.controller.ts
+++ b/dashboard/src/app/workspaces/workspace-details/export-workspace/dialog/export-workspace-dialog.controller.ts
@@ -26,7 +26,7 @@ export class ExportWorkspaceDialogController {
private $mdDialog: ng.material.IDialogService;
private cheRemote: CheRemote;
private $window: ng.IWindowService;
- private lodash: _.LoDashStatic;
+ private lodash: any;
private editorOptions: any;
private destination: string;
@@ -45,9 +45,15 @@ export class ExportWorkspaceDialogController {
* Default constructor that is using resource
* @ngInject for Dependency injection
*/
- constructor($q: ng.IQService, $filter: ng.IFilterService, lodash: _.LoDashStatic, cheRemote: CheRemote,
- cheNotification: CheNotification, $mdDialog: ng.material.IDialogService, $log: ng.ILogService,
- $window: ng.IWindowService, $scope: ng.IScope) {
+ constructor($q: ng.IQService,
+ $filter: ng.IFilterService,
+ lodash: any,
+ cheRemote: CheRemote,
+ cheNotification: CheNotification,
+ $mdDialog: ng.material.IDialogService,
+ $log: ng.ILogService,
+ $window: ng.IWindowService,
+ $scope: ng.IScope) {
this.$q = $q;
this.$filter = $filter;
this.lodash = lodash;
@@ -72,7 +78,7 @@ export class ExportWorkspaceDialogController {
this.copyOfConfig = this.getCopyOfConfig();
this.exportConfigContent = this.$filter('json')(angular.fromJson(this.copyOfConfig), 2);
- $scope.selectedIndex = this.destination === 'file' ? 0 : 1;
+ ($scope as any).selectedIndex = this.destination === 'file' ? 0 : 1;
}
/**
@@ -101,7 +107,7 @@ export class ExportWorkspaceDialogController {
removeLinks(object: any) {
delete object.links;
- return this.lodash.forEach(object, (value) => {
+ return this.lodash.forEach(object, (value: any) => {
if (angular.isObject(value)) {
return this.removeLinks(value);
} else {
diff --git a/dashboard/src/app/workspaces/workspace-details/export-workspace/export-workspace.controller.ts b/dashboard/src/app/workspaces/workspace-details/export-workspace/export-workspace.controller.ts
index 0c40d74253..37ccb7bb7f 100644
--- a/dashboard/src/app/workspaces/workspace-details/export-workspace/export-workspace.controller.ts
+++ b/dashboard/src/app/workspaces/workspace-details/export-workspace/export-workspace.controller.ts
@@ -18,15 +18,20 @@
*/
export class ExportWorkspaceController {
+ $mdDialog: ng.material.IDialogService;
+
+ workspaceId: string;
+ workspaceDetails: che.IWorkspace;
+
/**
* Default constructor that is using resource
* @ngInject for Dependency injection
*/
- constructor($mdDialog) {
+ constructor($mdDialog: ng.material.IDialogService) {
this.$mdDialog = $mdDialog;
}
- showExport($event, destination) {
+ showExport($event: MouseEvent, destination: string) {
this.$mdDialog.show({
targetEvent: $event,
controller: 'ExportWorkspaceDialogController',
diff --git a/dashboard/src/app/workspaces/workspace-details/export-workspace/export-workspace.directive.ts b/dashboard/src/app/workspaces/workspace-details/export-workspace/export-workspace.directive.ts
index 5e9dc5a6c7..6d5017fe66 100644
--- a/dashboard/src/app/workspaces/workspace-details/export-workspace/export-workspace.directive.ts
+++ b/dashboard/src/app/workspaces/workspace-details/export-workspace/export-workspace.directive.ts
@@ -24,26 +24,20 @@
*
* @author Florent Benoit
*/
-export class ExportWorkspace {
+export class ExportWorkspace implements ng.IDirective {
- /**
- * Default constructor that is using resource
- * @ngInject for Dependency injection
- */
- constructor () {
- this.restrict = 'E';
- this.templateUrl = 'app/workspaces/workspace-details/export-workspace/export-workspace.html';
+ restrict = 'E';
+ templateUrl = 'app/workspaces/workspace-details/export-workspace/export-workspace.html';
- this.controller = 'ExportWorkspaceController';
- this.controllerAs = 'exportWorkspaceCtrl';
- this.bindToController = true;
+ controller = 'ExportWorkspaceController';
+ controllerAs = 'exportWorkspaceCtrl';
+ bindToController = true;
- // scope values
- this.scope = {
- workspaceId: '@workspaceId',
- workspaceDetails: '=workspaceDetails',
- workspaceExportDisabled: '='
- };
- }
+ // scope values
+ scope = {
+ workspaceId: '@workspaceId',
+ workspaceDetails: '=workspaceDetails',
+ workspaceExportDisabled: '='
+ };
}
diff --git a/dashboard/src/app/workspaces/workspace-details/select-stack/ready-to-go-stacks/ready-to-go-stacks.controller.ts b/dashboard/src/app/workspaces/workspace-details/select-stack/ready-to-go-stacks/ready-to-go-stacks.controller.ts
index 89b2df5a6d..d716c17864 100644
--- a/dashboard/src/app/workspaces/workspace-details/select-stack/ready-to-go-stacks/ready-to-go-stacks.controller.ts
+++ b/dashboard/src/app/workspaces/workspace-details/select-stack/ready-to-go-stacks/ready-to-go-stacks.controller.ts
@@ -20,7 +20,7 @@ import {CheBranding} from '../../../../../components/branding/che-branding.facto
export class ReadyToGoStacksController {
private $scope: ng.IScope;
- private lodash: _.LoDashStatic;
+ private lodash: any;
private tabName: string;
private selectedStackId: string;
private allStackTags: Array = [];
@@ -35,7 +35,10 @@ export class ReadyToGoStacksController {
* Default constructor that is using resource
* @ngInject for Dependency injection
*/
- constructor($scope: ng.IScope, lodash: _.LoDashStatic, cheStack: CheStack, cheBranding: CheBranding) {
+ constructor($scope: ng.IScope,
+ lodash: any,
+ cheStack: CheStack,
+ cheBranding: CheBranding) {
this.$scope = $scope;
this.lodash = lodash;
this.priorityStacks = cheBranding.getWorkspace().priorityStacks;
diff --git a/dashboard/src/app/workspaces/workspace-details/select-stack/ready-to-go-stacks/ready-to-go-stacks.directive.ts b/dashboard/src/app/workspaces/workspace-details/select-stack/ready-to-go-stacks/ready-to-go-stacks.directive.ts
index 3d3991db12..c020760360 100644
--- a/dashboard/src/app/workspaces/workspace-details/select-stack/ready-to-go-stacks/ready-to-go-stacks.directive.ts
+++ b/dashboard/src/app/workspaces/workspace-details/select-stack/ready-to-go-stacks/ready-to-go-stacks.directive.ts
@@ -24,24 +24,18 @@
*
* @author Florent Benoit
*/
-export class ReadyToGoStacks {
+export class ReadyToGoStacks implements ng.IDirective {
- /**
- * Default constructor that is using resource
- * @ngInject for Dependency injection
- */
- constructor() {
- this.restrict = 'E';
- this.templateUrl = 'app/workspaces/workspace-details/select-stack/ready-to-go-stacks/ready-to-go-stacks.html';
+ restrict = 'E';
+ templateUrl = 'app/workspaces/workspace-details/select-stack/ready-to-go-stacks/ready-to-go-stacks.html';
- this.controller = 'ReadyToGoStacksController';
- this.controllerAs = 'readyToGoStacksCtrl';
- this.bindToController = true;
+ controller = 'ReadyToGoStacksController';
+ controllerAs = 'readyToGoStacksCtrl';
+ bindToController = true;
- // scope values
- this.scope = {
- tabName: '@cheTabName'
- };
- }
+ // scope values
+ scope = {
+ tabName: '@cheTabName'
+ };
}
diff --git a/dashboard/src/app/workspaces/workspace-details/select-stack/stack-library/create-project-stack-library.controller.ts b/dashboard/src/app/workspaces/workspace-details/select-stack/stack-library/create-project-stack-library.controller.ts
index 9fdb10315f..b89cd3849b 100644
--- a/dashboard/src/app/workspaces/workspace-details/select-stack/stack-library/create-project-stack-library.controller.ts
+++ b/dashboard/src/app/workspaces/workspace-details/select-stack/stack-library/create-project-stack-library.controller.ts
@@ -19,7 +19,7 @@ import {CheStack} from '../../../../../components/api/che-stack.factory';
export class CreateProjectStackLibraryController {
private $scope: ng.IScope;
- private lodash: _.LoDashStatic;
+ private lodash: any;
private tabName: string;
private selectedStackId: string;
private allStackTags: Array = [];
@@ -30,7 +30,9 @@ export class CreateProjectStackLibraryController {
* Default constructor that is using resource
* @ngInject for Dependency injection
*/
- constructor($scope: ng.IScope, cheStack: CheStack, lodash: _.LoDashStatic) {
+ constructor($scope: ng.IScope,
+ cheStack: CheStack,
+ lodash: any) {
this.$scope = $scope;
this.lodash = lodash;
@@ -43,7 +45,7 @@ export class CreateProjectStackLibraryController {
});
}
- $scope.$on('event:library:selectStackId', (event, data) => {
+ $scope.$on('event:library:selectStackId', (event: ng.IAngularEvent, data: string) => {
this.setStackSelectionById(data);
});
}
diff --git a/dashboard/src/app/workspaces/workspace-details/select-stack/stack-library/create-project-stack-library.directive.ts b/dashboard/src/app/workspaces/workspace-details/select-stack/stack-library/create-project-stack-library.directive.ts
index 4f44b734b3..b7ea682141 100644
--- a/dashboard/src/app/workspaces/workspace-details/select-stack/stack-library/create-project-stack-library.directive.ts
+++ b/dashboard/src/app/workspaces/workspace-details/select-stack/stack-library/create-project-stack-library.directive.ts
@@ -21,25 +21,18 @@
*
* @author Florent Benoit
*/
-export class CreateProjectStackLibrary {
+export class CreateProjectStackLibrary implements ng.IDirective {
- /**
- * Default constructor that is using resource
- * @ngInject for Dependency injection
- */
- constructor() {
- this.restrict = 'E';
- this.templateUrl = 'app/workspaces/workspace-details/select-stack/stack-library/create-project-stack-library.html';
+ restrict = 'E';
+ templateUrl = 'app/workspaces/workspace-details/select-stack/stack-library/create-project-stack-library.html';
- this.controller = 'CreateProjectStackLibraryController';
- this.controllerAs = 'createProjectStackLibraryCtrl';
- this.bindToController = true;
+ controller = 'CreateProjectStackLibraryController';
+ controllerAs = 'createProjectStackLibraryCtrl';
+ bindToController = true;
- // scope values
- this.scope = {
- tabName: '@cheTabName'
- };
-
- }
+ // scope values
+ scope = {
+ tabName: '@cheTabName'
+ };
}
diff --git a/dashboard/src/app/workspaces/workspace-details/warnings/workspace-warnings.directive.ts b/dashboard/src/app/workspaces/workspace-details/warnings/workspace-warnings.directive.ts
index 75cc32ad52..59b48a6ec6 100644
--- a/dashboard/src/app/workspaces/workspace-details/warnings/workspace-warnings.directive.ts
+++ b/dashboard/src/app/workspaces/workspace-details/warnings/workspace-warnings.directive.ts
@@ -16,14 +16,14 @@
* @description This class is handling the directive for the container with warnings
* @author Ann Shumilova
*/
-export class WorkspaceWarnings {
- private restrict: string;
- private bindToController:boolean;
- private templateUrl: string;
- private controller: string;
- private controllerAs: string;
- private transclude: boolean;
- private scope: {
+export class WorkspaceWarnings implements ng.IDirective {
+ restrict: string;
+ bindToController: boolean;
+ templateUrl: string;
+ controller: string;
+ controllerAs: string;
+ transclude: boolean;
+ scope: {
[propName: string]: string
};
@@ -41,7 +41,7 @@ export class WorkspaceWarnings {
this.transclude = true;
this.scope = {
workspace: '=workspace'
- }
+ };
}
}
diff --git a/dashboard/src/app/workspaces/workspace-details/workspace-machines/edit-machine-dialog/edit-machine-dialog.controller.ts b/dashboard/src/app/workspaces/workspace-details/workspace-machines/edit-machine-dialog/edit-machine-dialog.controller.ts
index fb2d0a9857..86798e2845 100644
--- a/dashboard/src/app/workspaces/workspace-details/workspace-machines/edit-machine-dialog/edit-machine-dialog.controller.ts
+++ b/dashboard/src/app/workspaces/workspace-details/workspace-machines/edit-machine-dialog/edit-machine-dialog.controller.ts
@@ -210,21 +210,10 @@ export class EditMachineDialogController {
this.$mdDialog.hide();
}
- /**
- * Stringify machine recipe.
- */
- private stringifyMachineRecipe(): void {
- try {
- this.machineRecipeScript = this.environmentManager.stringifyRecipe(this.machine.recipe);
- } catch (e) {
- this.$log.error('Cannot parse machine\'s recipe, error: ', e);
- }
- }
-
/**
* Parse machine recipe.
*/
- private parseMachineRecipe(): void {
+ parseMachineRecipe(): void {
try {
this.machine.recipe = this.environmentManager.parseMachineRecipe(this.machineRecipeScript);
// checks critical recipe changes
@@ -249,6 +238,17 @@ export class EditMachineDialogController {
}
}
+ /**
+ * Stringify machine recipe.
+ */
+ private stringifyMachineRecipe(): void {
+ try {
+ this.machineRecipeScript = this.environmentManager.stringifyRecipe(this.machine.recipe);
+ } catch (e) {
+ this.$log.error('Cannot parse machine\'s recipe, error: ', e);
+ }
+ }
+
/**
* Gets full name.
* @param {string} name
diff --git a/dashboard/src/app/workspaces/workspace-details/workspace-projects/add-project-popover/add-project-popover.controller.ts b/dashboard/src/app/workspaces/workspace-details/workspace-projects/add-project-popover/add-project-popover.controller.ts
index 170a239b15..128de596cf 100644
--- a/dashboard/src/app/workspaces/workspace-details/workspace-projects/add-project-popover/add-project-popover.controller.ts
+++ b/dashboard/src/app/workspaces/workspace-details/workspace-projects/add-project-popover/add-project-popover.controller.ts
@@ -25,7 +25,9 @@ export class AddProjectPopoverController {
* Callback to check uniqueness of project name.
* Provided by parent controller.
*/
+ /* tslint:disable */
private isProjectNameUnique: (data: {name: string}) => boolean;
+ /* tslint:enable */
/**
* Callback which is called when project templates are added to the list of ready-to-import projects.
* Provided by parent controller.
diff --git a/dashboard/src/app/workspaces/workspace-details/workspace-projects/project-details/project-details.controller.ts b/dashboard/src/app/workspaces/workspace-details/workspace-projects/project-details/project-details.controller.ts
index f53ae11f3f..bf7e9cdd05 100644
--- a/dashboard/src/app/workspaces/workspace-details/workspace-projects/project-details/project-details.controller.ts
+++ b/dashboard/src/app/workspaces/workspace-details/workspace-projects/project-details/project-details.controller.ts
@@ -231,7 +231,7 @@ export class ProjectDetailsController {
this.cheAPI.getWorkspace().fetchWorkspaceDetails(this.workspace.namespace + ':' + this.workspace.config.name).finally(() => {
this.$location.path('/workspace/' + this.workspace.namespace + '/' + this.workspace.config.name).search({tab: 'Projects'});
});
- }, (error) => {
+ }, (error: any) => {
this.$log.log('error', error);
});
});
@@ -243,7 +243,9 @@ export class ProjectDetailsController {
*/
getWorkspaceProjects(): Array {
let projects = this.cheAPI.getWorkspace().getWorkspaceProjects()[this.workspace.id];
- let _projects = this.lodash.filter(projects, (project) => { return project.name !== this.projectName});
+ let _projects = this.lodash.filter(projects, (project: che.IProject) => {
+ return project.name !== this.projectName;
+ });
return _projects;
}
diff --git a/dashboard/src/app/workspaces/workspace-details/workspace-projects/project-details/repository/project-repository.controller.ts b/dashboard/src/app/workspaces/workspace-details/workspace-projects/project-details/repository/project-repository.controller.ts
index 78c06a3d24..b7b9aeac6d 100644
--- a/dashboard/src/app/workspaces/workspace-details/workspace-projects/project-details/repository/project-repository.controller.ts
+++ b/dashboard/src/app/workspaces/workspace-details/workspace-projects/project-details/repository/project-repository.controller.ts
@@ -70,7 +70,7 @@ export class ProjectRepositoryController {
}
if (projectDetails.mixins.indexOf(subversionMixinId) !== -1) {
- //update remote svn url
+ // update remote svn url
if (!this.wsagent.getSvn().getRemoteUrlByKey(projectDetails.workspaceId, projectDetails.path)) {
const promise = this.wsagent.getSvn().fetchRemoteUrl(projectDetails.workspaceId, projectDetails.path);
@@ -83,7 +83,7 @@ export class ProjectRepositoryController {
}
if (projectDetails.mixins.indexOf(gitMixinId) !== -1) {
- //update git local url
+ // update git local url
if (!this.wsagent.getGit().getLocalUrlByKey(projectDetails.path)) {
const promise = this.wsagent.getGit().fetchLocalUrl(projectDetails.path);
@@ -94,7 +94,7 @@ export class ProjectRepositoryController {
this.localGitRepository = this.wsagent.getGit().getLocalUrlByKey(projectDetails.path);
}
- //update git remote urls
+ // update git remote urls
if (!this.wsagent.getGit().getRemoteUrlArrayByKey(projectDetails.path)) {
const promise = this.wsagent.getGit().fetchRemoteUrlArray(projectDetails.path);
diff --git a/dashboard/src/app/workspaces/workspace-details/workspace-ssh/workspace-details-ssh.controller.ts b/dashboard/src/app/workspaces/workspace-details/workspace-ssh/workspace-details-ssh.controller.ts
index 8d87484cfd..978a7fac19 100644
--- a/dashboard/src/app/workspaces/workspace-details/workspace-ssh/workspace-details-ssh.controller.ts
+++ b/dashboard/src/app/workspaces/workspace-details/workspace-ssh/workspace-details-ssh.controller.ts
@@ -72,7 +72,13 @@ export class WorkspaceDetailsSshCtrl {
* Default constructor that is using resource
* @ngInject for Dependency injection
*/
- constructor($route : ng.route.IRouteService, cheSsh: CheSsh, cheWorkspace: CheWorkspace, cheNotification, $mdDialog : ng.material.IDialogService, $log : ng.ILogService, $q : ng.IQService, $timeout : ng.ITimeoutService) {
+ constructor($route: ng.route.IRouteService,
+ cheSsh: CheSsh,
+ cheWorkspace: CheWorkspace,
+ cheNotification: CheNotification,
+ $mdDialog: ng.material.IDialogService,
+ $log: ng.ILogService,
+ $q: ng.IQService) {
this.cheWorkspace = cheWorkspace;
this.cheSsh = cheSsh;
this.cheNotification = cheNotification;
@@ -80,7 +86,7 @@ export class WorkspaceDetailsSshCtrl {
this.$log = $log;
this.$q = $q;
- this.machineSshAgents = new Array<>();
+ this.machineSshAgents = [];
this.namespace = $route.current.params.namespace;
this.workspaceName = $route.current.params.workspaceName;
this.workspaceKey = this.namespace + ':' + this.workspaceName;
@@ -121,15 +127,22 @@ export class WorkspaceDetailsSshCtrl {
*/
removeDefaultKey() {
this.cheSsh.removeKey('workspace', this.workspaceId).then(
- () => {this.$timeout( this.updateData(), 3000)}
- );
+ () => {
+ this.$timeout(() => {
+ this.updateData();
+ }, 3000);
+ });
}
/**
* Generate a new default workspace keypair
*/
generateDefaultKey() {
- this.cheSsh.generateKey('workspace', this.workspaceId).then(() => {this.$timeout( this.updateData(), 3000)});
+ this.cheSsh.generateKey('workspace', this.workspaceId).then(() => {
+ this.$timeout(() => {
+ this.updateData();
+ }, 3000);
+ });
}
diff --git a/dashboard/src/app/workspaces/workspace-details/workspace-ssh/workspace-details-ssh.directive.ts b/dashboard/src/app/workspaces/workspace-details/workspace-ssh/workspace-details-ssh.directive.ts
index f26ca2593e..00141e0d17 100644
--- a/dashboard/src/app/workspaces/workspace-details/workspace-ssh/workspace-details-ssh.directive.ts
+++ b/dashboard/src/app/workspaces/workspace-details/workspace-ssh/workspace-details-ssh.directive.ts
@@ -24,8 +24,7 @@
*
* @author Florent Benoit
*/
-export class WorkspaceDetailsSsh {
-
+export class WorkspaceDetailsSsh implements ng.IDirective {
restrict: string = 'E';
templateUrl: string = 'app/workspaces/workspace-details/workspace-ssh/workspace-details-ssh.html';
@@ -34,13 +33,4 @@ export class WorkspaceDetailsSsh {
controllerAs: string = 'workspaceDetailsSshCtrl';
bindToController: boolean = true;
-
- /**
- * Default constructor that is using resource
- * @ngInject for Dependency injection
- */
- constructor () {
-
- }
-
}
diff --git a/dashboard/src/app/workspaces/workspace-ram-slider/che-workspace-ram-allocation-slider.controller.ts b/dashboard/src/app/workspaces/workspace-ram-slider/che-workspace-ram-allocation-slider.controller.ts
index 2371e453ce..58944a75c6 100644
--- a/dashboard/src/app/workspaces/workspace-ram-slider/che-workspace-ram-allocation-slider.controller.ts
+++ b/dashboard/src/app/workspaces/workspace-ram-slider/che-workspace-ram-allocation-slider.controller.ts
@@ -26,7 +26,9 @@ export class CheWorkspaceRamAllocationSliderController {
* @ngInject for Dependency injection
*/
constructor ($timeout: ng.ITimeoutService, $scope: ng.IScope) {
- "ngInject";
+ /* tslint:disable */
+ 'ngInject';
+ /* tslint:enable */
this.$timeout = $timeout;
$scope.$watch(() => {
diff --git a/dashboard/src/app/workspaces/workspace-ram-slider/che-workspace-ram-allocation-slider.directive.ts b/dashboard/src/app/workspaces/workspace-ram-slider/che-workspace-ram-allocation-slider.directive.ts
index 67732b3af2..961d6a81e4 100644
--- a/dashboard/src/app/workspaces/workspace-ram-slider/che-workspace-ram-allocation-slider.directive.ts
+++ b/dashboard/src/app/workspaces/workspace-ram-slider/che-workspace-ram-allocation-slider.directive.ts
@@ -15,30 +15,25 @@
* It will change upon width of the screen
* @author Oleksii Kurinnyi
*/
-export class CheWorkspaceRamAllocationSlider {
+export class CheWorkspaceRamAllocationSlider implements ng.IDirective {
- /**
- * Default constructor that is using resource
- * @ngInject for Dependency injection
- */
- constructor () {
- this.restrict = 'E';
+ restrict = 'E';
- this.replace = true;
- this.templateUrl = 'app/workspaces/workspace-ram-slider/che-workspace-ram-allocation-slider.html';
+ replace = true;
+ templateUrl = 'app/workspaces/workspace-ram-slider/che-workspace-ram-allocation-slider.html';
- // we require ngModel as we want to use it inside our directive
- this.require = 'ngModel';
+ // we require ngModel as we want to use it inside our directive
+ require = 'ngModel';
- this.bindToController = true;
+ bindToController = true;
- this.controller = 'CheWorkspaceRamAllocationSliderController';
- this.controllerAs = 'cheWorkspaceRamAllocationSliderController';
+ controller = 'CheWorkspaceRamAllocationSliderController';
+ controllerAs = 'cheWorkspaceRamAllocationSliderController';
+
+ // scope values
+ scope = {
+ ngModel: '=',
+ cheOnChange: '&'
+ };
- // scope values
- this.scope = {
- ngModel: '=',
- cheOnChange: '&'
- };
- }
}
diff --git a/dashboard/src/app/workspaces/workspace-status/workspace-status-indicator.directive.ts b/dashboard/src/app/workspaces/workspace-status/workspace-status-indicator.directive.ts
index 4e38f81d8a..2aa26c6a23 100644
--- a/dashboard/src/app/workspaces/workspace-status/workspace-status-indicator.directive.ts
+++ b/dashboard/src/app/workspaces/workspace-status/workspace-status-indicator.directive.ts
@@ -14,7 +14,7 @@
* Defines a directive for creating simple indicator of workspace's status.
* @author Oleksii Kurinnyi
*/
-export class WorkspaceStatusIndicator {
+export class WorkspaceStatusIndicator implements ng.IDirective {
restrict: string;
replace: boolean;
scope;
@@ -35,12 +35,12 @@ export class WorkspaceStatusIndicator {
/**
* Template for the simple indicator of workspace's status
- * @param element
- * @param attr
+ * @param $element
+ * @param $attrs
* @returns {string} the template
*/
- template (element, attr) {
- let emptyCircleOnStopped = attr.cheEmptyCircle;
+ template ($element: ng.IAugmentedJQuery, $attrs: ng.IAttributes) {
+ let emptyCircleOnStopped = ($attrs as any).cheEmptyCircle;
return '' +
'' +
diff --git a/dashboard/src/app/workspaces/workspace-status/workspace-status.directive.ts b/dashboard/src/app/workspaces/workspace-status/workspace-status.directive.ts
index 31b1f7628f..7e9d216554 100644
--- a/dashboard/src/app/workspaces/workspace-status/workspace-status.directive.ts
+++ b/dashboard/src/app/workspaces/workspace-status/workspace-status.directive.ts
@@ -27,5 +27,4 @@ export class WorkspaceStatus implements ng.IDirective {
status: '=cheStatus',
isSupported: '=cheIsSupported'
};
-
}
diff --git a/dashboard/src/components/api/builder/che-workspace-builder.ts b/dashboard/src/components/api/builder/che-workspace-builder.ts
index be2cd08197..00d15fe3ae 100644
--- a/dashboard/src/components/api/builder/che-workspace-builder.ts
+++ b/dashboard/src/components/api/builder/che-workspace-builder.ts
@@ -11,12 +11,6 @@
'use strict';
import IWorkspaceEnvironment = che.IWorkspaceEnvironment;
-export interface IWorkspaceAttributes {
- created: number;
- updated?: number;
- [propName: string]: string | number;
-}
-
/**
* This class is providing a builder for Workspace
* @author Florent Benoit
@@ -44,7 +38,7 @@ export class CheWorkspaceBuilder {
return this;
}
- withAttributes(attributes: IWorkspaceAttributes): CheWorkspaceBuilder {
+ withAttributes(attributes: che.IWorkspaceAttributes): CheWorkspaceBuilder {
this.workspace.attributes = attributes;
return this;
}
diff --git a/dashboard/src/components/api/che-agent.factory.ts b/dashboard/src/components/api/che-agent.factory.ts
index e867574cb4..920322e499 100644
--- a/dashboard/src/components/api/che-agent.factory.ts
+++ b/dashboard/src/components/api/che-agent.factory.ts
@@ -55,12 +55,12 @@ export class CheAgent {
// reset global list
this.agents.length = 0;
- agents.forEach((agent: che.IAgent[]) => {
+ agents.forEach((agent: che.IAgent) => {
this.agents.push(agent);
});
defer.resolve(this.agents);
}, (error: any) => {
- if (error.status != 304) {
+ if (error.status !== 304) {
defer.reject(error);
} else {
defer.resolve(this.agents);
diff --git a/dashboard/src/components/api/environment/compose-parser.ts b/dashboard/src/components/api/environment/compose-parser.ts
index 3d719b555b..a55c8a44ea 100644
--- a/dashboard/src/components/api/environment/compose-parser.ts
+++ b/dashboard/src/components/api/environment/compose-parser.ts
@@ -14,6 +14,9 @@ import {IParser} from './parser';
export interface IComposeServiceRecipe {
image: string;
+ environment: any;
+ depends_on: any[];
+ links: any[];
[propName: string]: any;
}
diff --git a/dashboard/src/components/typings/che.d.ts b/dashboard/src/components/typings/che.d.ts
index b1b0b9cbc6..447381672f 100755
--- a/dashboard/src/components/typings/che.d.ts
+++ b/dashboard/src/components/typings/che.d.ts
@@ -285,19 +285,21 @@ declare namespace che {
temporary?: boolean;
status?: string;
namespace?: string;
- attributes?: {
- updated?: number;
- created?: number;
- stackId?: string;
- errorMessage?: string;
- [propName: string]: string | number;
- };
+ attributes?: IWorkspaceAttributes;
config: IWorkspaceConfig;
runtime?: IWorkspaceRuntime;
isLocked?: boolean;
usedResources?: string;
}
+ export interface IWorkspaceAttributes {
+ created: number;
+ updated?: number;
+ stackId?: string;
+ errorMessage?: string;
+ [propName: string]: string | number;
+ }
+
export interface IWorkspaceConfig {
name?: string;
defaultEnv?: string;
diff --git a/dashboard/tsconfig.json b/dashboard/tsconfig.json
index 23f09fb521..6b76d7638e 100644
--- a/dashboard/tsconfig.json
+++ b/dashboard/tsconfig.json
@@ -6,7 +6,8 @@
"exclude": [
"node_modules",
- "bower_components"
+ "bower_components",
+ "target"
]
}