#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

@@ -51,6 +51,11 @@
<a class="mdl-navigation__link" href="" [routerLink]="['Webscript']" (click)="hideDrawer()">Webscript</a>
<a class="mdl-navigation__link" href="" [routerLink]="['About']" (click)="hideDrawer()">About</a>
</nav>
<span class="mdl-layout-title">Configurations</span>
<nav class="mdl-navigation">
<input type="text" class="mdl-textfield__input" id="hostecm" data-automation-id="hostecm"
tabindex="1" (change)="onChangeHost($event)" value="{{hostecm}}"/>
</nav>
</div>
<main class="mdl-layout__content">
<div class="page-content">

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));
}