Make the protocol on additionalServers actually optional

parent 3f23c6fe
...@@ -135,7 +135,7 @@ hawtioPluginLoader.registerPreBootstrapTask(function(next) { ...@@ -135,7 +135,7 @@ hawtioPluginLoader.registerPreBootstrapTask(function(next) {
// There can not be any conflicts in the groups/resources from these API servers. // There can not be any conflicts in the groups/resources from these API servers.
var additionalDeferreds = []; var additionalDeferreds = [];
_.each(window.OPENSHIFT_CONFIG.additionalServers, function(server) { _.each(window.OPENSHIFT_CONFIG.additionalServers, function(server) {
var baseURL = server.protocol + "://" + server.hostPort + server.prefix; var baseURL = (server.protocol ? (server.protocol + "://") : protocol) + server.hostPort + server.prefix;
additionalDeferreds.push($.get(baseURL) additionalDeferreds.push($.get(baseURL)
.then(_.partial(getGroups, baseURL, server), function(data, textStatus, jqXHR) { .then(_.partial(getGroups, baseURL, server), function(data, textStatus, jqXHR) {
API_DISCOVERY_ERRORS.push({ API_DISCOVERY_ERRORS.push({
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -135,7 +135,7 @@ hawtioPluginLoader.registerPreBootstrapTask(function(next) { ...@@ -135,7 +135,7 @@ hawtioPluginLoader.registerPreBootstrapTask(function(next) {
// There can not be any conflicts in the groups/resources from these API servers. // There can not be any conflicts in the groups/resources from these API servers.
var additionalDeferreds = []; var additionalDeferreds = [];
_.each(window.OPENSHIFT_CONFIG.additionalServers, function(server) { _.each(window.OPENSHIFT_CONFIG.additionalServers, function(server) {
var baseURL = server.protocol + "://" + server.hostPort + server.prefix; var baseURL = (server.protocol ? (server.protocol + "://") : protocol) + server.hostPort + server.prefix;
additionalDeferreds.push($.get(baseURL) additionalDeferreds.push($.get(baseURL)
.then(_.partial(getGroups, baseURL, server), function(data, textStatus, jqXHR) { .then(_.partial(getGroups, baseURL, server), function(data, textStatus, jqXHR) {
API_DISCOVERY_ERRORS.push({ API_DISCOVERY_ERRORS.push({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment