mirror of
https://github.com/dkmstr/openuds-gui.git
synced 2025-01-18 10:03:33 +03:00
Added support for custom message launcher, so we can include some advice at launch time per poool basis. Also, this is controlable by scheduled actions (show, hide, not changing text)...
This commit is contained in:
parent
fc7e44e364
commit
37b0b44ab3
@ -93,7 +93,7 @@ export class ServiceComponent implements OnInit {
|
||||
this.api.gui.alert('<p align="center"><b>' + django.gettext('Launcher') + '</b></p>', message);
|
||||
}
|
||||
|
||||
launch(transport: JSONTransport|null) {
|
||||
async launch(transport: JSONTransport|null) {
|
||||
if (this.service.maintenance) {
|
||||
this.notifyNotLaunching(django.gettext('Service is in maintenance and cannot be launched'));
|
||||
} else if (this.service.not_accesible) {
|
||||
@ -111,6 +111,11 @@ export class ServiceComponent implements OnInit {
|
||||
if (transport === null || this.service.show_transports === false) {
|
||||
transport = this.service.transports[0];
|
||||
}
|
||||
if (this.service.custom_message_text !== null && this.service.custom_message_text !== undefined) {
|
||||
if ((await this.api.gui.yesno(django.gettext('Service message'), this.service.custom_message_text)) === false) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.api.executeCustomJSForServiceLaunch();
|
||||
this.api.launchURL(transport.link);
|
||||
}
|
||||
|
@ -33,6 +33,7 @@ export interface JSONService {
|
||||
to_be_replaced: boolean;
|
||||
to_be_replaced_text: string;
|
||||
custom_calendar_text: string;
|
||||
custom_message_text: string|null;
|
||||
in_use: boolean;
|
||||
transports: JSONTransport[];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user