Skip to content

Commit

Permalink
loader.js: Allow to initiate a refresh with __REFRESH__
Browse files Browse the repository at this point in the history
  • Loading branch information
nilmerg committed Sep 7, 2023
1 parent cdfe7e9 commit a3c04f9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions public/js/icinga/loader.js
Expand Up @@ -597,6 +597,15 @@

$redirectTarget = $('#col1');
redirect = icinga.history.getCol1State();
} else if (redirect.match(/__REFRESH__/)) {
if (req.$redirectTarget.is('#col1')) {
redirect = icinga.history.getCol1State();
} else if (req.$redirectTarget.is('#col2')) {
redirect = icinga.history.getCol2State().replace(/^#!/, '');
} else {
icinga.logger.error('Unable to refresh. Not a primary column: ', req.$redirectTarget);
return false;
}
}

var useHttp = req.getResponseHeader('X-Icinga-Redirect-Http');
Expand Down

0 comments on commit a3c04f9

Please sign in to comment.