* Implement the /flags page in react
Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
* Use custom react hook for calling api
Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
* local storage selectedTab on targets tab was renamed
Signed-off-by: Michał Szczygieł <1153719+mszczygiel@users.noreply.github.com>
* added filters when displaying alerts
Signed-off-by: Michał Szczygieł <1153719+mszczygiel@users.noreply.github.com>
* function was simplified
Signed-off-by: Michał Szczygieł <1153719+mszczygiel@users.noreply.github.com>
* fixed rebase
Signed-off-by: Michał Szczygieł <1153719+mszczygiel@users.noreply.github.com>
* minor rename
Signed-off-by: Michał Szczygieł <1153719+mszczygiel@users.noreply.github.com>
* Active -> Pending
Signed-off-by: Michał Szczygieł <1153719+mszczygiel@users.noreply.github.com>
* add test to custom-sd/adapter writeOutput() function
Signed-off-by: Benoit Gagnon <benoit.gagnon@ubisoft.com>
* fix Adapter.writeOutput() function to work on Windows
On that platform, files cannot be moved while a process holds a handle
to them. Added an explicit Close() before that move. With this change,
the unit test succeeds.
Signed-off-by: Benoit Gagnon <benoit.gagnon@ubisoft.com>
* add missing dot to comment
Signed-off-by: Benoit Gagnon <benoit.gagnon@ubisoft.com>
Update the aggregation operator documentation.
* Include before expression style syntax as valid.
* Update examples to show before style.
Signed-off-by: Ben Kochie <superq@gmail.com>
This makes React UI URLs look nicer than the previous
/static/graph-new/app.html, but internally still serves all React UI
files from the compiled-in static assets directory.
Also, to allow future usage of the React / Reach router, we need to
serve the main React app's index.html on certain sub-paths that
correspond to current Prometheus's UI pages, instead of trying to serve
actual files that match the provided path name.
Signed-off-by: Julius Volz <julius.volz@gmail.com>
* Use root relative font size rather than px to avoid hidpi issues.
* Darken to 50% saturation of base font color.
Signed-off-by: Ben Kochie <superq@gmail.com>
The metric names only get loaded once initially, so there is no reason
to mix them up with the handling of ongoing query history.
Signed-off-by: Julius Volz <julius.volz@gmail.com>
github actions runs the comment validation for every comment which in
turn downloads and runs a new container on every execution.
This is wasting many resources and also there is a big delay when
starting a test so need to think for a different design and for now will
disable GH actions.
An addition to this people are receiving an email for each posted
comment that fails the validation
Signed-off-by: Krasi Georgiev <8903888+krasi-georgiev@users.noreply.github.com>
* Adds the query stats to UI
Adds the query load time, resolution and total number of time series,
as the current UI has
Signed-off-by: cstdev <pietomb00@hotmail.com>
* Implement unit test for QueryStats
Signed-off-by: cstdev <pietomb00@hotmail.com>
* Tidy Query Stats component
Rename it and expose a interface for the values it displays
Make it a functional component as it has no state or lifecycle
Better null/undefined checks
Only render if needed, decided by the panel
Remove old stats if the next errors
Signed-off-by: cstdev <pietomb00@hotmail.com>
* Refactor calculateDesiredShards + don't reshard if we're having issues
sending samples.
* Track lastSendTimestamp via an int64 with atomic add/load, add a test
for reshard calculation.
* Simplify conditional for skipping resharding, add samplesIn/Out to shard
testcase struct.
Signed-off-by: Callum Styan <callumstyan@gmail.com>
* make expression input controlled
Signed-off-by: blalov <boyko.lalov@tick42.com>
* close menu explicitly when autosuggestion dropdown is hidden
Signed-off-by: blalov <boyko.lalov@tick42.com>
* adding unit test for target group
Signed-off-by: Jean-Baptiste Le Duigou <jb.leduigou@gmail.com>
* Improve unit tests for target group
Signed-off-by: Jean-Baptiste Le Duigou <jb.leduigou@gmail.com>
* Fix imports
Signed-off-by: Jean-Baptiste Le Duigou <jb.leduigou@gmail.com>
* Improve test by asserting on whole Target Group object
Signed-off-by: Jean-Baptiste Le Duigou <jb.leduigou@gmail.com>
* Include tsdb tool in builds (#6085) (#6089)
Add the tsdb tool to promu so that it's included in the release
tarballs.
Signed-off-by: Ben Kochie <superq@gmail.com>
* web/ui: fix for CVE-2019-10215 (#6098)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* cut 2.13 release (#6099)
Signed-off-by: Krasi Georgiev <8903888+krasi-georgiev@users.noreply.github.com>
* Fix panic in ARM builds of Prometheus (#6110)
An extra sync.Pool was added during a refactor which caused some 64 bit,
atomically accessed variables to no longer be 64 bit aligned. By moving
all atomically accessed variables to the beginning of the struct they
are guaranteed to be 64 bit aligned.
Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
* promql: fix potential panic in the query logger (#6094)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* Cut release 2.13.1 (#6145)
Signed-off-by: Krasi Georgiev <8903888+krasi-georgiev@users.noreply.github.com>
* Add component to sanitize html
Signed-off-by: Ritesh Shrivastav <ritesh.conf@gmail.com>
* Use SanitizeHTML component to allow only supported elements
Signed-off-by: Ritesh Shrivastav <ritesh.conf@gmail.com>
* Add allowedTags props in SanitizeHTML component
Signed-off-by: Ritesh Shrivastav <ritesh.conf@gmail.com>
* Update all React app node modules
I ran "yarn upgrade --latest" and then fixed items that caused errors
with new linter settings in the React UI source.
Signed-off-by: Julius Volz <julius.volz@gmail.com>
* Fix more React UI lint errors that fail CI
Signed-off-by: Julius Volz <julius.volz@gmail.com>