diff --git a/index.php b/index.php index 1acf153..50c1934 100755 --- a/index.php +++ b/index.php @@ -152,20 +152,20 @@ if (empty($html)) {
📋 Request Information
-
- - - -
+ + + + + + + + + + + + + +
diff --git a/parsers/github.php b/parsers/github.php index 8a45453..2811a6c 100644 --- a/parsers/github.php +++ b/parsers/github.php @@ -46,20 +46,20 @@ function githubParse($rawBody, $headers, $metadata) { $eventContent = <<
Push Details
-
-
- - -
-
- - -
-
- - -
-
+ + + + + + + + + + + + + + HTML; @@ -88,28 +88,28 @@ HTML; $eventContent = <<
Pull Request Details
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
+ + + + + + + + + + + + + + + + + + + + + + HTML; break; @@ -125,24 +125,24 @@ HTML; $eventContent = <<
Issue Details
-
-
- - -
-
- - -
-
- - -
-
- - -
-
+ + + + + + + + + + + + + + + + + + HTML; break; @@ -157,20 +157,20 @@ HTML; $eventContent = <<
Release Details
-
-
- - -
-
- - -
-
- - -
-
+ + + + + + + + + + + + + + HTML; break; @@ -190,24 +190,24 @@ HTML;
📋 Repository Information
-
- - - - -
+ + + + + + + + + + + + + + + + + +
$eventContent diff --git a/parsers/grafana.php b/parsers/grafana.php index f39f543..2fb6b8a 100644 --- a/parsers/grafana.php +++ b/parsers/grafana.php @@ -47,42 +47,42 @@ function grafanaParse($rawBody, $headers, $metadata) { $alertSummary = <<
Alert Summary
-
-
- - -
-
- - -
-
- - -
+ + + + + + + + + + + + + HTML; if ($truncatedAlerts > 0) { $alertSummary .= << -
Truncated Alerts
-
$truncatedAlerts
- + + + + HTML; } if ($externalURL) { $externalURLSafe = htmlspecialchars($externalURL, ENT_QUOTES, 'UTF-8'); $alertSummary .= << -
Alertmanager URL
-
$externalURLSafe
- + + + + HTML; } $alertSummary .= << +
HTML; @@ -92,33 +92,33 @@ HTML; $labelsContent .= '
Labels
'; if (!empty($groupLabels)) { - $labelsContent .= '
Group Labels
'; + $labelsContent .= '
Group Labels
'; foreach ($groupLabels as $key => $value) { $keySafe = htmlspecialchars($key, ENT_QUOTES, 'UTF-8'); $valueSafe = htmlspecialchars($value, ENT_QUOTES, 'UTF-8'); $labelsContent .= << - - - + + + + HTML; } - $labelsContent .= ''; + $labelsContent .= ''; } if (!empty($commonLabels)) { - $labelsContent .= '
Common Labels
'; @@ -127,18 +127,18 @@ HTML; // Build common annotations section $annotationsContent = ''; if (!empty($commonAnnotations)) { - $annotationsContent .= '
Common Annotations
'; @@ -268,16 +268,16 @@ HTML;
📋 Request Information
- + + + + + + + + + +
HTML; $html = emailShell($emailTitle, $emailStamp, $body, "This Grafana/Prometheus alert was automatically forwarded to your email address."); diff --git a/parsers/helpers.php b/parsers/helpers.php index 883e1de..410c804 100644 --- a/parsers/helpers.php +++ b/parsers/helpers.php @@ -31,26 +31,26 @@ function renderDataAsTable($data, $depth = 0) { if (is_array($item)) { $html .= '
'; $html .= '
Item ' . ($index + 1) . '
'; - $html .= ''; } else { $valueSafe = htmlspecialchars((string)$item, ENT_QUOTES, 'UTF-8'); @@ -59,32 +59,32 @@ function renderDataAsTable($data, $depth = 0) { } } else { // Render as key-value table - $html .= '