#421 set host url in the left menu bar

This commit is contained in:
Mario Romano
2016-07-14 20:51:10 +01:00
parent 925da1389a
commit 4b6785c91b
2 changed files with 13 additions and 0 deletions

View File

@@ -61,6 +61,7 @@ declare var document: any;
export class AppComponent {
translate: AlfrescoTranslationService;
searchTerm: string = '';
hostecm: string = 'http://localhost:8080';
constructor(public auth: AlfrescoAuthenticationService,
public router: Router,
@@ -68,11 +69,18 @@ export class AppComponent {
alfrescoSettingsService: AlfrescoSettingsService) {
alfrescoSettingsService.ecmHost = 'http://localhost:8080';
alfrescoSettingsService.bpmHost = 'http://localhost:9999';
alfrescoSettingsService.host = this.hostecm;
this.translate = translate;
this.translate.addTranslationFolder();
}
public onChangeHost(event: KeyboardEvent): void {
console.log( (<HTMLInputElement>event.target).value);
this.hostecm = (<HTMLInputElement>event.target).value;
this.alfrescoSettingsService.host = this.hostecm;
}
isActive(instruction: any[]): boolean {
return this.router.isRouteActive(this.router.generate(instruction));
}