Commit graph

1614 commits

Author SHA1 Message Date
Julius Volz 074b4eb36e Smaller font size for data table
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2024-03-07 17:44:45 +01:00
Julius Volz 124f36e670 Add back removing panels via menu
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2024-03-07 16:59:47 +01:00
Julius Volz 1e523b204d Improve query panel / data table layout and spacing
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2024-03-07 16:59:25 +01:00
Julius Volz 2bb14c5787 Lots of more progress on the new Mantine UI
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2024-03-07 13:16:54 +01:00
Julius Volz 89ecb3a3f2 Add input field to /graph page.
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2024-02-23 17:38:25 +01:00
Julius Volz 128b6461e9 Start working on /alerts page, factor out rule definition display
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2024-02-23 17:37:56 +01:00
Julius Volz 65cc7b058e Remove index.css from initial default app
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2024-02-23 14:21:20 +01:00
Julius Volz ce1ca6481e Better navbar icon sizes
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2024-02-23 14:19:46 +01:00
Julius Volz 096acdce7e Fix npm workspaces build for Mantine UI
Thanks to input by @nexucis :)

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2024-02-21 22:36:27 +01:00
Julius Volz cc38c1426a Attempt to integrate Mantine UI into npm workspaces + Prometheus binary
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2024-02-21 11:14:35 +01:00
Julius Volz d6a347e5de Implement several status pages and other general aspects
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2024-02-21 11:13:48 +01:00
Julius Volz dfabda7507 Add scaffold for new Mantine-based UI
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2024-02-17 12:29:47 +01:00
Bryan Boreham 39af788dbd Tests: use replacement DeepEquals using go-cmp
Use DeepEqual replacement using go-cmp, which is more flexible.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-02-08 19:30:20 +00:00
Bryan Boreham 98c4889029
Merge pull request #9298 from Creatone/creatone/use-testify
tests: Move from t.Errorf and others.
2024-02-04 16:27:57 +01:00
Faustas Butkus 6feffeb92e
promql: add histogram_avg function (#13467)
Add histogram_avg function

---------

Signed-off-by: Faustas Butkus <faustas.butkus@gmail.com>
Signed-off-by: Björn Rabenstein <github@rabenste.in>
Co-authored-by: Björn Rabenstein <github@rabenste.in>
2024-02-01 18:28:42 +01:00
Bryan Boreham 16e68c01e4 tests: remove err from message when testify prints it already
For instance `require.NoError` will print the unexpected error; we don't
need to include it in the message.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-02-01 14:18:01 +00:00
Paweł Szulik 6e9cca8158 Refactor web tests to use testify.
Signed-off-by: Paweł Szulik <paul.szulik@gmail.com>
2024-02-01 13:51:31 +00:00
Leegin 19efd0a675
api: Serialize discovered labels into JSON directly in dropped targets (#13484)
Converted maps into labels.Labels to avoid a lot of copying of data which leads to very high memory consumption while opening the /service-discovery endpoint in the Prometheus UI

Signed-off-by: Leegin <114397475+Leegin-darknight@users.noreply.github.com>
2024-01-29 10:20:20 +00:00
Leegin e3040bfabc
api: Serialize discovered and target labels into JSON directly (#13469)
Converted maps into labels.Labels to avoid a lot of copying of data which leads to very high memory consumption while opening the /service-discovery endpoint in the Prometheus UI

Signed-off-by: Leegin <114397475+Leegin-darknight@users.noreply.github.com>
2024-01-29 10:19:02 +00:00
Yury Molodov a598ddfbc4
ui/fix: correct url handling for stacked graphs (#13460)
Signed-off-by: Yury Moladau <yurymolodov@gmail.com>
2024-01-26 09:25:23 +01:00
Augustin Husson 52fa5863a2
Merge branch 'main' into nexucis/merge-back 2024-01-25 13:31:16 +01:00
Filip Petkovski 583f3e587c
Optimize histogram iterators (#13340)
Optimize histogram iterators

Histogram iterators allocate new objects in the AtHistogram and
AtFloatHistogram methods, which makes calculating rates over long
ranges expensive.

In #13215 we allowed an existing object to be reused
when converting an integer histogram to a float histogram. This commit follows
the same idea and allows injecting an existing object in the AtHistogram and
AtFloatHistogram methods. When the injected value is nil, iterators allocate
new histograms, otherwise they populate and return the injected object.

The commit also adds a CopyTo method to Histogram and FloatHistogram which
is used in the BufferedIterator to overwrite items in the ring instead of making
new copies.

Note that a specialized HPoint pool is needed for all of this to work 
(`matrixSelectorHPool`).

---------

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
2024-01-23 17:02:14 +01:00
tyltr f97fa2736c remove obsolete build tag
Signed-off-by: tyltr <tylitianrui@126.com>
2024-01-17 22:26:32 +08:00
bwplotka 216b5edb41 Cut 2.49.1 web package.
Signed-off-by: bwplotka <bwplotka@gmail.com>
2024-01-15 16:44:33 +00:00
Bartlomiej Plotka db3544c552
Merge branch 'main' into merge-2.49.0-back
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
2024-01-15 12:38:36 +01:00
Ayoub Mrini ace9c8a3da
promtool: allow setting multiple matchers to "promtool tsdb dump" command. (#13296)
Conditions are ANDed inside the same matcher but matchers are ORed

Including unit tests for "promtool tsdb dump".

Refactor some matchers scraping utils.

Signed-off-by: machine424 <ayoubmrini424@gmail.com>
2024-01-15 10:29:53 +00:00
bwplotka cf50f85faa Cut 2.49.0
Signed-off-by: bwplotka <bwplotka@gmail.com>
2024-01-15 09:55:35 +00:00
bwplotka abbcdc61f5 Cut 2.49.0-rc.2
Signed-off-by: bwplotka <bwplotka@gmail.com>
2024-01-08 09:49:30 +00:00
Bartlomiej Plotka d4a6bc03f2 Merge pull request #13371 from kevinmingtarja/fix-isHeatmapData
ui: fix handling of scalar and string in isHeatmapData
2024-01-08 09:42:46 +00:00
Bartlomiej Plotka 775d955919
Merge pull request #13371 from kevinmingtarja/fix-isHeatmapData
ui: fix handling of scalar and string in isHeatmapData
2024-01-07 19:59:20 +01:00
Kevin Mingtarja 40941d450b Fix handling of scalar and string in isHeatmapData
Signed-off-by: Kevin Mingtarja <kevin.mingtarja@gmail.com>
2024-01-04 02:48:54 +07:00
Kevin Mingtarja c126c21baa Fix DataTableProps['data'] for resultType string
Signed-off-by: Kevin Mingtarja <kevin.mingtarja@gmail.com>
2024-01-04 01:51:56 +07:00
bwplotka 20b4ef5d58 Cut v2.49.0-rc.1
Signed-off-by: bwplotka <bwplotka@gmail.com>
2023-12-19 19:23:43 +00:00
Bryan Boreham 8065bef172 Move metric type definitions to common/model
They are used in multiple repos, so common is a better place for them.
Several packages now don't depend on `model/textparse`, e.g.
`storage/remote`.

Also remove `metadata` struct from `api.go`, since it was identical to
a struct in the `metadata` package.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-12-19 18:56:54 +00:00
Bryan Boreham 99c17b4319
Merge pull request #13177 from bboreham/less-madness
scrape: consistent function names for metadata
2023-12-19 17:51:52 +00:00
machine424 ea97086484
ui: create a reproduction for https://github.com/prometheus/prometheus/issues/13292
Signed-off-by: machine424 <ayoubmrini424@gmail.com>
2023-12-15 18:04:29 +01:00
Bartlomiej Plotka c4c8d59c14
Cut 2.49.0-rc.0 (#13270)
* Cut 2.49.0-rc.0

Signed-off-by: bwplotka <bwplotka@gmail.com>

* Removed the duplicate.

Signed-off-by: bwplotka <bwplotka@gmail.com>

---------

Signed-off-by: bwplotka <bwplotka@gmail.com>
2023-12-12 10:12:08 +00:00
Björn Rabenstein db915b07cb
Merge pull request #13215 from fpetkovski/float-histogram-reuse
Enable reusing memory when converting between histogram types
2023-12-09 22:44:46 +01:00
Bartlomiej Plotka 91a383f52c
Merge pull request #13059 from zenador/add-mad-function
Add mad_over_time function
2023-12-08 11:53:22 +00:00
Filip Petkovski 10a82f87fd
Enable reusing memory when converting between histogram types
The 'ToFloat' method on integer histograms currently allocates new memory
each time it is called.

This commit adds an optional *FloatHistogram parameter that can be used
to reuse span and bucket slices. It is up to the caller to make sure the
input float histogram is not used anymore after the call.

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
2023-12-08 10:22:59 +01:00
dependabot[bot] 48b1818ee8
build(deps-dev): bump @types/node from 17.0.45 to 20.10.4 in /web/ui (#13260)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 17.0.45 to 20.10.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-08 09:19:48 +00:00
Bartlomiej Plotka bc4f8366c5
Upgraded npm dependencies pre 2.49-rc.0 (#13256)
Signed-off-by: bwplotka <bwplotka@gmail.com>
2023-12-07 14:43:15 +00:00
dependabot[bot] b9960d6d8d
build(deps-dev): bump @babel/traverse from 7.19.3 to 7.23.3 in /web/ui (#13137)
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.19.3 to 7.23.3.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.3/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-07 11:44:57 +00:00
Matthieu MOREL 9c4782f1cc
golangci-lint: enable testifylint linter (#13254)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-12-07 11:35:01 +00:00
Julien Pivotto 6e8e16c050
Merge pull request #13227 from prometheus/release-2.48
Merge release-2.48 back into main
2023-12-01 16:09:02 +01:00
Jeanette Tan 9bf4cc993e Add mad_over_time function
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-12-01 01:22:58 +08:00
Alexander Trost 5051a993ab promql: add sort_by_label and sort_by_label_desc functions
This adds functions to sort a vector by its label value.

Based on https://github.com/prometheus/prometheus/pull/1533

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2023-11-28 14:40:07 +01:00
dependabot[bot] 8d058884a0
build(deps): bump sanitize-html from 2.10.0 to 2.11.0 in /web/ui (#12513)
Bumps [sanitize-html](https://github.com/apostrophecms/sanitize-html) from 2.10.0 to 2.11.0.
- [Changelog](https://github.com/apostrophecms/sanitize-html/blob/main/CHANGELOG.md)
- [Commits](https://github.com/apostrophecms/sanitize-html/compare/2.10.0...2.11.0)

---
updated-dependencies:
- dependency-name: sanitize-html
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-28 12:49:34 +01:00
Yury Molodov 2e205ee95c
ui: heatmap visualization for histogram buckets (#13096)
ui: heatmap visualization for histogram buckets

Signed-off-by: Yury Moladau <yurymolodov@gmail.com>

---------

Signed-off-by: Yury Moladau <yurymolodov@gmail.com>
2023-11-24 22:44:48 +01:00
Bryan Boreham 34676a240e scrape: consistent function names for metadata
Too confusing to have `MetadataList` and `ListMetadata`, etc.
I standardised on the ones which are in an interface.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-11-23 09:08:02 +00:00