Skip to content

Commit

Permalink
UI: Allow setting the ui2 web app page title
Browse files Browse the repository at this point in the history
Resolves dcm4che#3316
  • Loading branch information
isolovey committed Aug 19, 2021
1 parent a4c4471 commit 1d9f6ce
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions dcm4chee-arc-ui2/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {PermissionService} from "./helpers/permissions/permission.service";
import {Observable} from "../../node_modules/rxjs";
import {HttpClient} from "@angular/common/http";
import {DcmWebApp} from "./models/dcm-web-app";
import {Title} from "@angular/platform-browser";
import {KeycloakService} from "./helpers/keycloak-service/keycloak.service";
import {Globalvar} from "./constants/globalvar";
import {KeycloakHttpClient} from "./helpers/keycloak-service/keycloak-http-client.service";
Expand Down Expand Up @@ -64,6 +65,7 @@ export class AppComponent implements OnInit {
public config: MatDialogConfig,
public mainservice: AppService,
private appRequests: AppRequestsService,
private titleService: Title,
private permissionService:PermissionService,
private keycloakHttpClient:KeycloakHttpClient,
private _keycloakService: KeycloakService,
Expand Down Expand Up @@ -160,6 +162,7 @@ export class AppComponent implements OnInit {
return `${this.getFullYear()}${j4care.getSingleDateTimeValueFromInt(this.getMonth()+1)}${j4care.getSingleDateTimeValueFromInt(this.getDate())}${j4care.getSingleDateTimeValueFromInt(this.getHours())}${j4care.getSingleDateTimeValueFromInt(this.getMinutes())}${j4care.getSingleDateTimeValueFromInt(this.getSeconds())}`;
};
this.initGetDevicename(2);
this.setTitle();
/* this.setServerTime(()=>{
});*/
this.initGetPDQServices();
Expand Down Expand Up @@ -458,6 +461,13 @@ export class AppComponent implements OnInit {
})
}

setTitle() {
this.appRequests.getDeviceName()
.subscribe(
(res) => {
this.titleService.setTitle(res['ui2-web-app-title']);
})
}

}

Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public String dcm4cheeArc() {
sb.append("\",\"super-user-role\":\"").append(System.getProperty("super-user-role", "admin"));
sb.append("\",\"management-http-port\":").append(intSystemProperty("jboss.management.http.port", 9990));
sb.append(",\"management-https-port\":").append(intSystemProperty("jboss.management.https.port", 9993));
sb.append(",\"ui2-web-app-title\":\"").append(System.getProperty("ui2-web-app-title", "dcm4chee-arc-ui")).append("\"");
sb.append("}");
return sb.toString();
}
Expand Down

0 comments on commit 1d9f6ce

Please sign in to comment.