Author: Lars Michelsen <[email protected]>
Date: Fri Sep 23 10:30:52 2011 +0200
Committer: Lars Michelsen <[email protected]>
Commit-Date: Fri Sep 23 10:30:52 2011 +0200
Bugfix: Fixed broken URL handling in e.g. rotation pools
---
ChangeLog | 1 +
share/frontend/nagvis-js/js/frontend.js | 19 +++++++++++++++++++
share/userfiles/templates/default.header.js | 4 ++--
3 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f4acd37..be38c3e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -43,6 +43,7 @@ Frontend
* Bugfix: It is now possible to choose none as map_image in map options to
disable the background image
* Bugfix: std_speedometer.php fixed min/max handling (Thanks to foxkilo)
+ * Bugfix: Fixed broken URL handling in e.g. rotation pools
* Readded the "edit" action to the maps module. In this mode all object are
automatically unlocked and changes to the lock state are not persisted
* Also disabling the object left click actions in unlocked mode
diff --git a/share/frontend/nagvis-js/js/frontend.js
b/share/frontend/nagvis-js/js/frontend.js
index 2ebb4d5..3fd118e 100644
--- a/share/frontend/nagvis-js/js/frontend.js
+++ b/share/frontend/nagvis-js/js/frontend.js
@@ -1712,6 +1712,25 @@ function parseMap(iMapCfgAge, type, mapName) {
}
/**
+ * Fetches the contents of the given url and prints it on the current page
+ *
+ * @param String The url to fetch
+ * @author Lars Michelsen <[email protected]>
+ */
+function parseUrl(sUrl) {
+ // Fetch contents from server
+ var oUrlContents = getSyncRequest(oGeneralProperties.path_server
+ + '?mod=Url&act=getContents&show='
+ + escapeUrlValues(sUrl));
+
+ if(typeof oUrlContents !== 'undefined' && oUrlContents.content) {
+ // Replace the current contents with the new url
+ var urlContainer = document.getElementById('url');
+ urlContainer.innerHTML = oUrlContents.content;
+ }
+}
+
+/**
* workerInitialize()
*
* Does the initial parsing of the pages
diff --git a/share/userfiles/templates/default.header.js
b/share/userfiles/templates/default.header.js
index dd15041..ce4f968 100644
--- a/share/userfiles/templates/default.header.js
+++ b/share/userfiles/templates/default.header.js
@@ -32,7 +32,7 @@
function headerDraw() {
scaleView();
- if(!oUserProperties)
+ if(typeof(oUserProperties) === 'undefined')
return;
if(typeof(oUserProperties.header) !== 'undefined' &&
oUserProperties.header === false)
@@ -161,7 +161,7 @@ function getSidebarWidth() {
// Cares about the initial drawing of the sidebar on page load
// Loads the sidebar visibility state from the server
function sidebarDraw() {
- if(!oUserProperties)
+ if(typeof(oUserProperties) === 'undefined')
return;
if(typeof(oUserProperties.sidebar) !== 'undefined' &&
oUserProperties.sidebar === 1)
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins