summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGunnar Mills <gmills@us.ibm.com>2018-03-13 15:49:11 -0500
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-03-23 20:07:15 +0000
commit0c61caa6af11bac221e3373c3c111a600ba07fc3 (patch)
tree9c86166dff171bb4578c36ec5c360a9465ca8207
parentcdd9d6bc7afa94b2c106f10e2dcc2110708ac145 (diff)
downloadphosphor-webui-0c61caa6af11bac221e3373c3c111a600ba07fc3.tar.gz
phosphor-webui-0c61caa6af11bac221e3373c3c111a600ba07fc3.zip
Only add ":" when a port is given
Before if no port was given, the HOST field would look like "9.41.165.233:". Added a check for a port before adding a ":". Resolves openbmc/openbmc#2995 Tested: Flashed an image with this change on a Witherspoon and verified no ":" when no port was given. Also, verified displayed data and log in looked good. Change-Id: I315c73489d419aacc041218e971e75d21ff6c255 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
-rw-r--r--app/common/services/dataService.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/common/services/dataService.js b/app/common/services/dataService.js
index 2672c0e..201e79c 100644
--- a/app/common/services/dataService.js
+++ b/app/common/services/dataService.js
@@ -47,8 +47,8 @@ window.angular && (function (angular) {
return sessionStorage.getItem(Constants.API_CREDENTIALS.host_storage_key);
}else{
return Constants.API_CREDENTIALS.default_protocol + "://" +
- window.location.hostname + ':' +
- window.location.port;
+ window.location.hostname +
+ (window.location.port ? ":" + window.location.port : "");
}
}
OpenPOWER on IntegriCloud