Skip to content

Commit

Permalink
Fix XML template
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen committed Oct 17, 2019
1 parent c74af63 commit 9deeaf7
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions templates/monitor.xml.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,11 @@
$authsources = $this->data['authsources'];
$metadata = $this->data['metadata'];
$healthInfo = $this->data['healthInfo'];
$protocol = $this->data['protocol'];
$responseCode = $this->data['responseCode'];

list($healthState, $healthColor) = $healthInfo[$state];

$overall = $healthState;

$GLOBALS['http_response_code'] = $responseCode;
if ($responseCode === 200) {
header($protocol . ' 200 OK');
} else if ($responseCode === 417) {
header($protocol . ' 417 Expectation failed');
} else {
header($protocol . ' 500 Internal Server Error');
}

$output = '<?xml version="1.0" encoding="UTF-8"?>';
$output .= '<monitor>';
$output .= '<health>' . $overall . '</health>';
Expand Down

0 comments on commit 9deeaf7

Please sign in to comment.