Skip to content

Commit

Permalink
Add custom custom_live_log_socket_url for single-master systems behin…
Browse files Browse the repository at this point in the history
…d an LB

Thanks to @BitProcessor for this change!
  • Loading branch information
jhuckaby committed Oct 17, 2019
1 parent 0d670ce commit 55c6489
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions htdocs/js/pages/JobDetails.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,11 @@ Class.subclass( Page.Base, "Page.JobDetails", {

// live job log tail
var remote_api_url = app.proto + job.hostname + ':' + app.port + config.base_api_uri;
if (!config.web_socket_use_hostnames && app.servers && app.servers[job.hostname] && app.servers[job.hostname].ip) {
if (config.custom_live_log_socket_url) {
// custom websocket URL for single-master systems behind an LB
remote_api_url = config.custom_live_log_socket_url + config.base_api_uri;
}
else if (!config.web_socket_use_hostnames && app.servers && app.servers[job.hostname] && app.servers[job.hostname].ip) {
// use ip if available, may work better in some setups
remote_api_url = app.proto + app.servers[job.hostname].ip + ':' + app.port + config.base_api_uri;
}
Expand Down Expand Up @@ -1041,7 +1045,11 @@ Class.subclass( Page.Base, "Page.JobDetails", {
var error_shown = false;

var url = app.proto + job.hostname + ':' + app.port;
if (!config.web_socket_use_hostnames && app.servers && app.servers[job.hostname] && app.servers[job.hostname].ip) {
if (config.custom_live_log_socket_url) {
// custom websocket URL for single-master systems behind an LB
url = config.custom_live_log_socket_url;
}
else if (!config.web_socket_use_hostnames && app.servers && app.servers[job.hostname] && app.servers[job.hostname].ip) {
// use ip if available, may work better in some setups
url = app.proto + app.servers[job.hostname].ip + ':' + app.port;
}
Expand Down

0 comments on commit 55c6489

Please sign in to comment.