Module: nagvis Branch: master Commit: eba3041062ba0ac9f93a28830d52a32aae1b7955 URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=eba3041062ba0ac9f93a28830d52a32aae1b7955
Author: LaMi <[email protected]> Date: Sun Nov 8 17:22:09 2009 +0100 The overview page is now less problematic on temporary communication problems with the core --- share/frontend/nagvis-js/js/frontend.js | 35 +++++++++++++++++++++++++++++++ 1 files changed, 35 insertions(+), 0 deletions(-) diff --git a/share/frontend/nagvis-js/js/frontend.js b/share/frontend/nagvis-js/js/frontend.js index ed80bb9..0029ee0 100644 --- a/share/frontend/nagvis-js/js/frontend.js +++ b/share/frontend/nagvis-js/js/frontend.js @@ -1212,6 +1212,12 @@ function parseOverviewPage() { function parseOverviewMaps(aMapsConf) { eventlog("worker", "debug", "parseOverviewMaps: Start setting maps"); + // Exit this function on invalid call + if(aMapsConf === null) { + eventlog("worker", "warning", "parseOverviewMaps: Invalid call - maybe broken ajax response"); + return false; + } + // Render the maps when enabled if(oPageProperties.showmaps == 1 && aMapsConf.length > 0) { var oTable = document.getElementById('overviewMaps'); @@ -1270,6 +1276,12 @@ function parseOverviewMaps(aMapsConf) { function parseOverviewAutomaps(aMapsConf) { eventlog("worker", "debug", "parseOverviewAutomaps: Start setting automaps"); + // Exit this function on invalid call + if(aMapsConf === null) { + eventlog("worker", "warning", "parseOverviewAutomaps: Invalid call - maybe broken ajax response"); + return false; + } + // Render the maps when enabled if(oPageProperties.showautomaps == 1 && aMapsConf.length > 0) { var oTable = document.getElementById('overviewAutomaps'); @@ -2086,6 +2098,29 @@ function workerUpdate(iCount, sType, sIdentifier) { * Now proceed with real actions when everything is OK */ + // When no automaps/maps present: Try to fetch them continously + if(aMapObjects.length === 0) { + eventlog("worker", "debug", "No automaps/maps found, reparsing..."); + parseOverviewMaps(getOverviewMaps()); + parseOverviewAutomaps(getOverviewAutomaps()); + + // Bulk get all hover templates which are needed on the overview page + eventlog("worker", "debug", "Fetching hover templates"); + getHoverTemplates(aMapObjects); + + // Assign the hover templates to the objects and parse them + eventlog("worker", "debug", "Parse hover menus"); + parseHoverMenus(aMapObjects); + + // Bulk get all context templates which are needed on the overview page + eventlog("worker", "aMapObjects", "Fetching context templates"); + getContextTemplates(aMapObjects); + + // Assign the context templates to the objects and parse them + eventlog("worker", "info", "Parse context menus"); + parseContextMenus(aMapObjects); + } + // Get objects which need an update var arrObj = getObjectsToUpdate(aMapObjects); ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Nagvis-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagvis-checkins
