Skip to content

Commit

Permalink
Release v3.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fhemberger committed Dec 23, 2024
1 parent 3e36940 commit 3890d5d
Show file tree
Hide file tree
Showing 6 changed files with 2,157 additions and 2,359 deletions.
8 changes: 4 additions & 4 deletions extension/js/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ const formatPrometheusMetrics = (body) => {
// line is a comment
tmp = line.match(/^# (?:HELP|TYPE) ([^ ]+)/)
if (tmp && tmp.length > 1) {
let metricName = tmp[1]
const metricName = tmp[1]

// First comment, don't render closing </section>
if (previousMetricName == '') {
if (previousMetricName === '') {
previousMetricName = metricName
return `<section aria-label="${metricName}">\n<span class="comment">${line}</span>`
}

if (metricName != previousMetricName) {
if (metricName !== previousMetricName) {
previousMetricName = metricName
return `</section>\n<section aria-label="${metricName}">\n<span class="comment">${line}</span>`
}
Expand Down Expand Up @@ -60,7 +60,7 @@ const formatPrometheusMetrics = (body) => {
return line
})
.join('<br>') + '</section>'
}
}

// Listen for requests from content pages wanting to set up a port
chrome.runtime.onConnect.addListener(port => {
Expand Down
2 changes: 1 addition & 1 deletion extension/js/content.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global chrome */
/* global chrome, DOMParser */

// Don't process HTTP response bodies over 30MB
const MAX_BODY_SIZE_BYTES = 30 * 1024 * 1024
Expand Down
2 changes: 1 addition & 1 deletion extension/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Prometheus Formatter",
"version": "3.1.0",
"version": "3.2.0",
"manifest_version": 3,
"description": "Makes plain Prometheus/OpenMetrics endpoints easier to read.",
"homepage_url": "https://github.com/fhemberger/prometheus-formatter",
Expand Down
Loading

0 comments on commit 3890d5d

Please sign in to comment.