Skip to content
Permalink
Browse files

Updates frontend.js to fix broken urls

Fixes bug with loading sound resources occurring when running NagVis on nonstandard Port (e.g. :4443) resulting in malformed URLs with :4443:4443.
  • Loading branch information...
mhoffmann75 authored and LarsMichelsen committed Jul 31, 2018
1 parent b181c0f commit 4a2ec62c92f0324a6e98f8c5389363dcabef7290
Showing with 1 addition and 1 deletion.
  1. +1 −1 share/frontend/nagvis-js/js/frontend.js
@@ -340,7 +340,7 @@ function playSound(objectId, iNumTimes){
var oEmbed = document.createElement('embed');
oEmbed.setAttribute('id', 'sound'+sState);
// Relative URL does not work, add full url
oEmbed.setAttribute('src', window.location.protocol + '//' + window.location.host + ':'
oEmbed.setAttribute('src', window.location.protocol + '//' + window.location.hostname + ':'
+ window.location.port + oGeneralProperties.path_sounds+sSound);
oEmbed.setAttribute('width', '0');
oEmbed.setAttribute('height', '0');

0 comments on commit 4a2ec62

Please sign in to comment.
You can’t perform that action at this time.