Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI: Allow setting the ui2 web app page title #3317

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions dcm4chee-arc-ui2/src/app/app.component.ts
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']);
})
}

}

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