mirror of
https://github.com/dkmstr/openuds-gui.git
synced 2024-10-26 08:55:23 +03:00
Merge remote-tracking branch 'origin/v3.0'
This commit is contained in:
commit
7ddf256db7
@ -82,21 +82,24 @@ export class Plugin {
|
||||
this.api.transportUrl(url).subscribe(data => {
|
||||
alert.close();
|
||||
if (data.url) {
|
||||
// If the url contains "o_n_w", will open the url on a new window ALWAYS
|
||||
let name = 'global';
|
||||
if (data.url.indexOf('o_n_w=') !== -1) {
|
||||
// Extract window name from o_n_w parameter if present
|
||||
const onw = /.*o_n_w=([a-zA-Z0-9._-]*)/.exec(data.url);
|
||||
if (onw) {
|
||||
name = onw[1];
|
||||
if (data.url.indexOf('o_s_w=') !== -1) {
|
||||
window.location.href = data.url;
|
||||
} else {
|
||||
// If the url contains "o_n_w", will open the url on a new window ALWAYS
|
||||
let name = 'global';
|
||||
if (data.url.indexOf('o_n_w=') !== -1) {
|
||||
// Extract window name from o_n_w parameter if present
|
||||
const onw = /.*o_n_w=([a-zA-Z0-9._-]*)/.exec(data.url);
|
||||
if (onw) {
|
||||
name = onw[1];
|
||||
}
|
||||
}
|
||||
if (Plugin.transportsWindow[name]) {
|
||||
Plugin.transportsWindow[name].close();
|
||||
}
|
||||
Plugin.transportsWindow[name] = window.open(data.url, 'uds_trans_' + name);
|
||||
}
|
||||
if (Plugin.transportsWindow[name]) {
|
||||
Plugin.transportsWindow[name].close();
|
||||
}
|
||||
Plugin.transportsWindow[name] = window.open(data.url, 'uds_trans_' + name);
|
||||
} else if (data.running) { // Already preparing, show some info and request wait a bit to user
|
||||
alert.close();
|
||||
this.showAlert(
|
||||
django.gettext('The service is now being prepared. (It is at #).'.replace('#', '' + data.running + '%')),
|
||||
django.gettext('Please, try again in a few moments.'),
|
||||
|
@ -52,4 +52,4 @@ export interface JSONTransportURLService {
|
||||
url?: string;
|
||||
running?: string;
|
||||
error?: string;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user