Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Commit 7f93116

Browse files
ghillertcppwfs
authored andcommitted
gh-313 Resolve ng lint failures
Need to use Object.keys when using map in a for loop.
1 parent a86d74b commit 7f93116

26 files changed

+60
-64
lines changed

ui/src/app/about/about-details.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export class AboutDetailsComponent implements OnInit {
4141
goBack() {
4242
console.log('Back to about page ...');
4343
this.router.navigate(['about']);
44-
};
44+
}
4545

4646
onCopyToClipboardSuccess(e) {
4747
this.toastyService.success('Copied About Details to Clipboard (As JSON).');
@@ -55,5 +55,5 @@ export class AboutDetailsComponent implements OnInit {
5555
}
5656
}
5757
return true;
58-
};
58+
}
5959
}

ui/src/app/about/about.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ export class AboutComponent implements OnInit {
3737
goToDetails() {
3838
console.log('Go to details ...');
3939
this.router.navigate(['about/details']);
40-
};
40+
}
4141
}

ui/src/app/about/about.service.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { AboutService } from './about.service';
2-
import { Observable } from 'rxjs/Rx'
2+
import { Observable } from 'rxjs/Rx';
33
import { ErrorHandler } from '../shared/model/error-handler';
44
import { Response, ResponseOptions } from '@angular/http';
55

ui/src/app/apps/app-details/app-details.component.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,5 @@ export class AppDetailsComponent implements OnInit {
5353
goBack() {
5454
console.log('Back to apps page ...');
5555
this.router.navigate(['apps']);
56-
};
57-
58-
56+
}
5957
}

ui/src/app/apps/apps-bulk-import.component.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,17 @@ export class AppsBulkImportComponent implements OnInit, OnChanges {
3838
goBack() {
3939
console.log('Back to apps page ...');
4040
this.router.navigate(['apps']);
41-
};
41+
}
4242

4343
displayFileContents(contents) {
4444
console.log(contents);
4545
const reader = new FileReader();
4646
reader.onloadend = (e) => {
4747
this.parseTextArea(reader.result);
48-
}
48+
};
4949
console.log(contents.target.files[0]);
5050
reader.readAsText(contents.target.files[0]);
51-
};
51+
}
5252

5353
getAppsPropertiesAsString(): string {
5454
return this.model.appsProperties.join('\n');
@@ -72,7 +72,7 @@ export class AppsBulkImportComponent implements OnInit, OnChanges {
7272
/**
7373
* Bulk Import Apps.
7474
*/
75-
bulkImportApps = function() {
75+
bulkImportApps() {
7676

7777
if (this.model.uri && this.model.appsProperties.length > 0) {
7878
this.toastyService.error('Please provide only a URI or Properties not both.');
@@ -92,15 +92,13 @@ export class AppsBulkImportComponent implements OnInit, OnChanges {
9292
this.toastyService.success('Apps Imported.');
9393
const reloadAppsObservable = this.appsService.getApps(true).subscribe(
9494
appRegistrations => {
95-
console.log('Back to about page ...')
96-
this.router.navigate(['apps'])
95+
console.log('Back to about page ...');
96+
this.router.navigate(['apps']);
9797
}
9898
);
9999
this.busy.push(reloadAppsObservable);
100100
}
101101
);
102102
this.busy.push(observable);
103-
104-
};
105-
103+
}
106104
}

ui/src/app/apps/apps-register/apps-register.component.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export class AppsRegisterComponent implements OnInit, OnChanges {
4848
goBack() {
4949
console.log('Back to apps page ...');
5050
this.router.navigate(['apps']);
51-
};
51+
}
5252

5353
ngOnChanges(changes) {
5454
console.log(changes);
@@ -71,8 +71,8 @@ export class AppsRegisterComponent implements OnInit, OnChanges {
7171
this.toastyService.success(`${data.length} App(s) registered.`);
7272
const reloadAppsObservable = this.appsService.getApps(true).subscribe(
7373
appRegistrations => {
74-
console.log('Back to apps page ...')
75-
this.router.navigate(['apps'])
74+
console.log('Back to apps page ...');
75+
this.router.navigate(['apps']);
7676
}
7777
);
7878
this.busy.push(reloadAppsObservable);
@@ -81,23 +81,23 @@ export class AppsRegisterComponent implements OnInit, OnChanges {
8181
this.toastyService.error(error);
8282
}
8383
));
84-
};
84+
}
8585

8686
/**
8787
* Removes app comntroller entry
8888
* @param index Index of the entry
8989
*/
9090
removeApp(index) {
9191
this.model.splice(index, 1);
92-
};
92+
}
9393

9494
/**
9595
* Adds app entry at the specified index
9696
* @param index Insertion index
9797
*/
9898
addApp(index) {
9999
this.model.splice(index + 1, 0, new AppRegistration());
100-
};
100+
}
101101

102102
trackModel(index, appRegistration) {
103103
return index;

ui/src/app/apps/apps.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export class AppsComponent implements OnInit {
7373
bulkImportApps() {
7474
console.log('Go to Bulk Import page ...');
7575
this.router.navigate(['apps/bulk-import-apps']);
76-
};
76+
}
7777

7878
public proceedToUnregisterSingleAppRegistration(appRegistration: AppRegistration): void {
7979
console.log('Proceeding to unregister application...', appRegistration);
@@ -105,11 +105,11 @@ export class AppsComponent implements OnInit {
105105

106106
public cancelUnregisterSingleApp() {
107107
this.unregisterSingleAppModal.hide();
108-
};
108+
}
109109

110110
public cancelUnregisterMultipleApps() {
111111
this.unregisterMultipleAppsModal.hide();
112-
};
112+
}
113113

114114
public viewDetails(appRegistration: AppRegistration) {
115115
this.router.navigate(['apps/' + appRegistration.type + '/' + appRegistration.name]);
@@ -123,7 +123,7 @@ export class AppsComponent implements OnInit {
123123
* @param page 1-index-based
124124
*/
125125
getPage(page: number) {
126-
console.log(`Getting page ${page}.`)
126+
console.log(`Getting page ${page}.`);
127127
this.appsService.appRegistrations.pageNumber = page - 1;
128128
this.loadAppRegistrations(true);
129129
}

ui/src/app/apps/apps.service.spec.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { URLSearchParams } from '@angular/http';
2-
import { Observable } from 'rxjs/Rx'
2+
import { Observable } from 'rxjs/Rx';
33

44
import { AppsService } from './apps.service';
5-
import { HttpUtils } from '../shared/support/http.utils'
5+
import { HttpUtils } from '../shared/support/http.utils';
66
import { ApplicationType, AppRegistration, ErrorHandler } from '../shared/model';
77
import { SharedAppsService } from '../shared/services/shared-apps.service';
88
import { AppRegistrationImport } from './model/app-registration-import';
@@ -58,7 +58,7 @@ describe('AppsService', () => {
5858

5959
it('should call the apps service with the right url to get all apps', () => {
6060

61-
const requestOptions = HttpUtils.getDefaultRequestOptions()
61+
const requestOptions = HttpUtils.getDefaultRequestOptions();
6262
const params = new URLSearchParams();
6363

6464
params.append('uri', 'http://blubba');
@@ -78,7 +78,7 @@ describe('AppsService', () => {
7878
describe('unregisterApp', () => {
7979

8080
it('should call the apps service with the right url to unregister a single app', () => {
81-
const requestOptions = HttpUtils.getDefaultRequestOptions()
81+
const requestOptions = HttpUtils.getDefaultRequestOptions();
8282
const appRegistration = new AppRegistration('blubba', ApplicationType.source, 'http://somewhere');
8383
this.mockHttp.delete.and.returnValue(Observable.of(this.jsonData));
8484
this.appsService.unregisterApp(appRegistration);
@@ -90,7 +90,7 @@ describe('AppsService', () => {
9090
describe('registerApp', () => {
9191

9292
it('should call the apps service with the right url to register a single app', () => {
93-
const requestOptions = HttpUtils.getDefaultRequestOptions()
93+
const requestOptions = HttpUtils.getDefaultRequestOptions();
9494
const params = new URLSearchParams();
9595

9696
params.append('uri', 'http://blubba');
@@ -110,15 +110,15 @@ describe('AppsService', () => {
110110

111111
describe('registerMultipleApps', () => {
112112
it('should call the apps service with the right url to register multiple apps', () => {
113-
const requestOptions1 = HttpUtils.getDefaultRequestOptions()
113+
const requestOptions1 = HttpUtils.getDefaultRequestOptions();
114114
const params1 = new URLSearchParams();
115115

116116
params1.append('uri', 'http://somewhere');
117117
params1.append('force', 'false');
118118

119119
requestOptions1.params = params1;
120120

121-
const requestOptions2 = HttpUtils.getDefaultRequestOptions()
121+
const requestOptions2 = HttpUtils.getDefaultRequestOptions();
122122
const params2 = new URLSearchParams();
123123

124124
params2.append('uri', 'http://somewhere-else');

ui/src/app/apps/apps.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { ApplicationType } from '../shared/model/application-type';
1414
import { AppRegistrationImport } from './model/app-registration-import';
1515
import { PageRequest } from '../shared/model/pagination/page-request.model';
1616

17-
import { HttpUtils } from '../shared/support/http.utils'
17+
import { HttpUtils } from '../shared/support/http.utils';
1818

1919
/**
2020
* Service class for the Apps module.
@@ -42,7 +42,7 @@ export class AppsService {
4242
if (!this.appRegistrations) {
4343
this.appRegistrations = new Page<AppRegistration>();
4444
}
45-
console.log('Fetching App Registrations remotely.')
45+
console.log('Fetching App Registrations remotely.');
4646
this.remotelyLoaded = true;
4747

4848
return this.sharedAppsService.getApps(

ui/src/app/runtime/model/runtime-app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export class RuntimeApp {
1010
public deploymentId: String;
1111
public state: String;
1212
public instances: any;
13-
public appInstances: RuntimeAppInstance[]
13+
public appInstances: RuntimeAppInstance[];
1414

1515
constructor(
1616
deploymentId: String,

0 commit comments

Comments
 (0)