Drumil Patel
687a962bd1
Add conditional rendering of Navlink for Consoles ( #6761 )
...
* Add conditional rendering of Navlink for Consoles
Signed-off-by: Drumil Patel <drumilpatel720@gmail.com>
* Replacing if else with only if conditional rendering
Signed-off-by: Drumil Patel <drumilpatel720@gmail.com>
* Add tests and removing global declaration in Navbar
Signed-off-by: Drumil Patel <drumilpatel720@gmail.com>
* Correct Navbar Testcases and add types for ConsolesLink
Signed-off-by: Drumil Patel <drumilpatel720@gmail.com>
* Change names for Console link as per-naming convention
Signed-off-by: Drumil Patel <drumilpatel720@gmail.com>
* Change prop names to AppProps and NavbarProps respectively
Signed-off-by: Drumil Patel <drumilpatel720@gmail.com>
2020-02-08 11:00:47 +01:00
Boyko
8c2bc2f57a
Unify react fetcher components ( #6629 )
...
* set useFetch loading flag to be true initially
Signed-off-by: blalov <boiskila@gmail.com>
* make extended props optional
Signed-off-by: blalov <boiskila@gmail.com>
* add status indicator to targets page
Signed-off-by: blalov <boiskila@gmail.com>
* add status indicator to tsdb status page
Signed-off-by: blalov <boiskila@gmail.com>
* spread response in Alerts
Signed-off-by: blalov <boiskila@gmail.com>
* disable eslint func retun type rule
Signed-off-by: blalov <boiskila@gmail.com>
* add status indicator to Service Discovery page
Signed-off-by: blalov <boiskila@gmail.com>
* refactor PanelList
Signed-off-by: blalov <boiskila@gmail.com>
* test fix
Signed-off-by: blalov <boiskila@gmail.com>
* use local storage hook in PanelList
Signed-off-by: blalov <boiskila@gmail.com>
* use 'useFetch' for fetching metrics
Signed-off-by: blalov <boiskila@gmail.com>
* left-overs
Signed-off-by: blalov <boiskila@gmail.com>
* remove targets page custom error message
Signed-off-by: Boyko Lalov <boiskila@gmail.com>
* adding components displayName
Signed-off-by: Boyko Lalov <boiskila@gmail.com>
* display more user friendly error messages
Signed-off-by: Boyko Lalov <boiskila@gmail.com>
* update status page snapshot
Signed-off-by: Boyko Lalov <boiskila@gmail.com>
* pr review changes
Signed-off-by: Boyko Lalov <boiskila@gmail.com>
* fix broken tests
Signed-off-by: Boyko Lalov <boiskila@gmail.com>
* fix typos
Signed-off-by: Boyko Lalov <boiskila@gmail.com>
2020-02-03 15:14:25 +01:00
Dustin Hooten
820d7775eb
Escape invalid css selector characters in tooltip ID ( #6737 )
...
* Escape invalid css selector characters in tooltip ID
Signed-off-by: Dustin Hooten <dhooten@splunk.com>
* Use CSS.escape polyfill to escape characters
Signed-off-by: Dustin Hooten <dhooten@splunk.com>
2020-02-02 10:51:33 +01:00
Boyko
41071278b6
Change old UI link to React App to point to graph page ( #6697 )
...
* change the link to React App to point to graph page
Signed-off-by: blalov <boiskila@gmail.com>
* add search params to classic UI link
Signed-off-by: blalov <boiskila@gmail.com>
* lint fix
Signed-off-by: blalov <boiskila@gmail.com>
* remove navLink onclick
Signed-off-by: blalov <boiskila@gmail.com>
* remove left-over
Signed-off-by: blalov <boiskila@gmail.com>
* remove pkg files
Signed-off-by: blalov <boiskila@gmail.com>
* delete .vscode
Signed-off-by: Boyko Lalov <boiskila@gmail.com>
2020-01-28 14:04:56 +01:00
Harkishen Singh
c1e49d50c5
Adds support for rules screen in react-ui ( #6503 )
...
* base
Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>
* base of rules page
Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>
* initial version
Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>
* removed unused function
Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>
* version 1
Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>
* implemented suggestions
Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>
* implemented suggestions
Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>
* implemented suggestions.
Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>
* new fetching pattern
Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>
* implemented suggestions
Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>
2020-01-27 10:27:43 +01:00
Julius Volz
d996ba20ec
React UI: Support local timezone on /graph ( #6692 )
...
* React UI: Support local timezone on /graph
This partially implements
https://github.com/prometheus/prometheus/issues/500 in the sense that it
only addresses the /graph page, and only allows toggling between UTC and
local (browser) time, but no arbitrary timezone selection yet.
Signed-off-by: Julius Volz <julius.volz@gmail.com>
* Fixup: Also display TZ offset in tooltip
Signed-off-by: Julius Volz <julius.volz@gmail.com>
* Just show offset, not timezone name abbreviation
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2020-01-24 23:44:18 +01:00
Julius Volz
a677622184
React UI: Send cookies on fetch() on older browsers ( #6553 )
...
* React UI: Send cookies on fetch() on older browsers
Fixes https://github.com/prometheus/prometheus/issues/6428
Signed-off-by: Julius Volz <julius.volz@gmail.com>
* Fix fetch() tests to expect new options
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2020-01-20 16:50:32 +01:00
Boyko
0f84d5b2cf
React UI: broken graph page browser history ( #6659 )
...
* add panel state for the expression input
Signed-off-by: blalov <boiskila@gmail.com>
* remove redundant test
Signed-off-by: blalov <boiskila@gmail.com>
2020-01-18 23:40:25 +01:00
Boyko
c8469ecaf5
React UI: hide non selected alert types ( #6642 )
...
* hide non selected alert types
Signed-off-by: Boyko Lalov <boiskila@gmail.com>
* revert 'show annotations' checkbox to be always visible
Signed-off-by: blalov <boiskila@gmail.com>
2020-01-16 22:22:47 +01:00
Tobias Guggenmos
3a204be6b7
PromQL: Fix string and parentheses handling in engine ( #6612 )
...
* WIP: PromQL: Allow engine to return strings
Signed-off-by: Tobias Guggenmos <tguggenm@redhat.com>
* Add test suggested by @roidelapluie
Signed-off-by: Tobias Guggenmos <tguggenm@redhat.com>
* Fix typo in React UI
Signed-off-by: Tobias Guggenmos <tguggenm@redhat.com>
* Fix parenthesis handling for functions and aggregator params
Signed-off-by: Tobias Guggenmos <tguggenm@redhat.com>
* Add more tests
Signed-off-by: Tobias Guggenmos <tguggenm@redhat.com>
* Fix React UI test
Signed-off-by: Tobias Guggenmos <tguggenm@redhat.com>
2020-01-15 18:31:58 +01:00
Boyko
bab47b58f5
ReactUI: folder re-organization ( #6601 )
...
* remove redundant sanitizeHTML abstraction
Signed-off-by: blalov <boiskila@gmail.com>
* organize folders
Signed-off-by: blalov <boiskila@gmail.com>
* move hooks outside common folder
Signed-off-by: blalov <boiskila@gmail.com>
* move PathPrefix interface in types
Signed-off-by: blalov <boiskila@gmail.com>
* remove config folder
Signed-off-by: blalov <boiskila@gmail.com>
* remove redundant snapshots
Signed-off-by: blalov <boiskila@gmail.com>
* rename common folder
Signed-off-by: blalov <boiskila@gmail.com>
* merge utils files
Signed-off-by: Boyko Lalov <boiskila@gmail.com>
* sync with master
Signed-off-by: blalov <boiskila@gmail.com>
2020-01-14 19:34:48 +01:00
Boyko
e12e5ecc8f
ReactUI: adopt grafana flot fix for stacked graphs ( #6603 )
...
* adopt grafana flot fix for stacked graphs
Signed-off-by: blalov <boiskila@gmail.com>
Signed-off-by: Boyko Lalov <boiskila@gmail.com>
* remove flot as dependencie
Signed-off-by: blalov <boiskila@gmail.com>
Signed-off-by: Boyko Lalov <boiskila@gmail.com>
* disable eslint error in flot.js
Signed-off-by: blalov <boiskila@gmail.com>
Signed-off-by: Boyko Lalov <boiskila@gmail.com>
* fix broken test due to wrong import
Signed-off-by: blalov <boiskila@gmail.com>
Signed-off-by: Boyko Lalov <boiskila@gmail.com>
* bring back flot crosshair plugin
Signed-off-by: blalov <boiskila@gmail.com>
Signed-off-by: Boyko Lalov <boiskila@gmail.com>
* trying to prevent CI out of memory by adding test script --runInBand flag
Signed-off-by: blalov <boiskila@gmail.com>
Signed-off-by: Boyko Lalov <boiskila@gmail.com>
* additional notices regarding origin of the flot vendor
Signed-off-by: Boyko Lalov <boiskila@gmail.com>
* move flot in own folder
Signed-off-by: Boyko Lalov <boiskila@gmail.com>
* move text on top
Signed-off-by: Boyko Lalov <boiskila@gmail.com>
2020-01-14 16:12:08 +01:00
Daniel Swarbrick
097fda1440
Match closing tag to opening button tag ( #6587 )
...
Signed-off-by: Daniel Swarbrick <daniel.swarbrick@cloud.ionos.com>
2020-01-09 10:58:27 +00:00
Boyko
1637ad2717
ReactUI: replace togglers tabs with checkboxes ( #6543 )
...
* replace togglers tabs with checkboxes
Signed-off-by: blalov <boiskila@gmail.com>
* create state-color tuples config for checkboxes rendering
Signed-off-by: blalov <boiskila@gmail.com>
* separate filters from show-annotations checkbox
Signed-off-by: blalov <boiskila@gmail.com>
* style improvements
Signed-off-by: blalov <boiskila@gmail.com>
* lint fix
Signed-off-by: blalov <boiskila@gmail.com>
* style adjustments
Signed-off-by: blalov <boiskila@gmail.com>
2020-01-07 16:12:38 +01:00
Josh Soref
91d76c8023
Spelling ( #6517 )
...
* spelling: alertmanager
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: attributes
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: autocomplete
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: bootstrap
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: caught
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: chunkenc
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: compaction
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: corrupted
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: deletable
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: expected
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: fine-grained
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: initialized
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: iteration
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: javascript
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: multiple
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: number
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: overlapping
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: possible
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: postings
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: procedure
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: programmatic
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: queuing
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: querier
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: repairing
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: received
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: reproducible
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: retention
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: sample
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: segements
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: semantic
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: software [LICENSE]
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: staging
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: timestamp
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: unfortunately
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: uvarint
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: subsequently
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: ressamples
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2020-01-02 15:54:09 +01:00
Harkishen Singh
edf8f135bc
Adds support service discovery page in react ui ( #6394 )
...
* active targets component completed
Signed-off-by: Harkishen-Singh <harkishensingh@hotmail.com>
* support for service-discovery in react ui
Signed-off-by: Harkishen-Singh <harkishensingh@hotmail.com>
* restored prev files
Signed-off-by: Harkishen-Singh <harkishensingh@hotmail.com>
* used fc
Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>
* removed trivial keys
Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>
* FC based labels
Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>
* implemented suggestions
Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>
* implemented suggestions
Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>
* implmented suggestions
Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>
* minor word change
Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>
* before dropped addressed
Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>
* implemented suggestions
Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>
* linted
Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>
* implemented suggestions
Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>
* implemented suggestions. removed false styles
Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>
* implemented suggestions. Unified buttons with targets screen.
Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>
* component for ToggleButton
Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>
* removed false Button
Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>
* implemented suggestions.
Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>
* tests for ToggleMoreLess component
Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>
* linted
Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>
* fixed nested h3. implemented suggestions
Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>
* linted
Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>
2019-12-31 18:41:50 +01:00
Boyko
b90b5736b9
Allow sec timestamp ( #6460 )
...
* adding seconds timestamp to time input
Signed-off-by: Boyko Lalov <boiskila@gmail.com>
* calc time range properly
Signed-off-by: Boyko Lalov <boiskila@gmail.com>
* fix test
Signed-off-by: Boyko Lalov <boiskila@gmail.com>
* unify table and graph time inputs
Signed-off-by: blalov <boiskila@gmail.com>
* rename calcTimeRange func
Signed-off-by: blalov <boiskila@gmail.com>
2019-12-17 10:50:58 +01:00
Dustin Hooten
fce2e131db
React UI: Fix issue when changing query then time, the old query executed ( #6437 )
...
* React UI: Fix issue when changing query then time, the old query is executed
Signed-off-by: Dustin Hooten <dhooten@splunk.com>
* pr feedback
Signed-off-by: Dustin Hooten <dhooten@splunk.com>
* more pr feedback
Signed-off-by: Dustin Hooten <dhooten@splunk.com>
2019-12-12 23:22:12 +01:00
Boyko
1c66aea992
React UI: Implement alerts page ( #6402 )
...
* url filter rules param
Signed-off-by: blalov <boiskila@gmail.com>
Signed-off-by: Boyko Lalov <boiskila@gmail.com>
Signed-off-by: blalov <boiskila@gmail.com>
* address review changes
Signed-off-by: blalov <boiskila@gmail.com>
Signed-off-by: Boyko Lalov <boiskila@gmail.com>
Signed-off-by: blalov <boiskila@gmail.com>
* ui initial commit
Signed-off-by: blalov <boiskila@gmail.com>
Signed-off-by: Boyko Lalov <boiskila@gmail.com>
Signed-off-by: blalov <boiskila@gmail.com>
* improve ui
Signed-off-by: blalov <boiskila@gmail.com>
Signed-off-by: Boyko Lalov <boiskila@gmail.com>
Signed-off-by: blalov <boiskila@gmail.com>
* fix typo in component name
Signed-off-by: Boyko Lalov <boiskila@gmail.com>
Signed-off-by: blalov <boiskila@gmail.com>
* create query link + ui enhancements
Signed-off-by: Boyko Lalov <boiskila@gmail.com>
Signed-off-by: blalov <boiskila@gmail.com>
* add count to state labels
Signed-off-by: blalov <boiskila@gmail.com>
* put alerts table render in the right place
Signed-off-by: blalov <boiskila@gmail.com>
* refactoring
Signed-off-by: blalov <boiskila@gmail.com>
* fix rules endpoint test
Signed-off-by: blalov <boiskila@gmail.com>
* lint fixes
Signed-off-by: blalov <boiskila@gmail.com>
* test query params
Signed-off-by: blalov <boiskila@gmail.com>
* refactoring
Signed-off-by: blalov <boiskila@gmail.com>
* review changes
Signed-off-by: blalov <boiskila@gmail.com>
* adding down arrow as click indicator in Alert
Signed-off-by: blalov <boiskila@gmail.com>
* add period at the end of the comment
Signed-off-by: blalov <boiskila@gmail.com>
* review changes
Signed-off-by: blalov <boiskila@gmail.com>
* remove left-over css
Signed-off-by: blalov <boiskila@gmail.com>
* adding expand/collapse arrows on Alert
Signed-off-by: blalov <boiskila@gmail.com>
* create proper expression for alert name
Signed-off-by: blalov <boiskila@gmail.com>
2019-12-09 23:42:59 +01:00
Boyko
315b28439f
Graph multi series select ( #6391 )
...
* adding graph series multi select support
Signed-off-by: Boyko Lalov <boiskila@gmail.com>
Signed-off-by: blalov <boiskila@gmail.com>
* skip inital plot draw from ResizeDetector
Signed-off-by: Boyko Lalov <boiskila@gmail.com>
Signed-off-by: blalov <boiskila@gmail.com>
* fix unit tests
Signed-off-by: blalov <boiskila@gmail.com>
* extract Legend as component
Signed-off-by: blalov <boiskila@gmail.com>
* create legend state interface
Signed-off-by: blalov <boiskila@gmail.com>
* fix click selection issue
Signed-off-by: blalov <boiskila@gmail.com>
* fix single series select bug
Signed-off-by: Boyko Lalov <boiskila@gmail.com>
* review changes
Signed-off-by: blalov <boiskila@gmail.com>
2019-12-03 20:20:45 +01:00
Boyko
28470c229c
React UI: Graph refactoring ( #6382 )
...
* move graph related files into own folder
Signed-off-by: blalov <boiskila@gmail.com>
* move graph helper functions into own file
Signed-off-by: blalov <boiskila@gmail.com>
* fix typo in file name
Signed-off-by: blalov <boiskila@gmail.com>
* fix typo in file name and lint fixes
Signed-off-by: blalov <boiskila@gmail.com>
2019-11-27 16:51:40 +01:00
Boyko
fa1489e35c
React UI: Improve graph legend hover performance ( #6367 )
...
* improve hover performance
Signed-off-by: blalov <boyko.lalov@tick42.com>
* increase graph tests coverage
Signed-off-by: blalov <boiskila@gmail.com>
* wrap plotSetAndDraw into requestAnimationFrame to achieve smooth hover effect
Signed-off-by: Boyko Lalov <boiskila@gmail.com>
* unit tests
Signed-off-by: Boyko Lalov <boiskila@gmail.com>
* add destroy plot method to types
Signed-off-by: blalov <boiskila@gmail.com>
* make chart undefined by default
Signed-off-by: Boyko Lalov <boiskila@gmail.com>
* make destroy plot test more meaningful
Signed-off-by: Boyko Lalov <boiskila@gmail.com>
* remove chart.destroy extra check
Signed-off-by: Boyko Lalov <boiskila@gmail.com>
2019-11-26 20:48:53 +01:00
Boyko
731ca08acd
React UI: Graph legend ( #6321 )
...
* initial commit
Signed-off-by: blalov <boyko.lalov@tick42.com>
Signed-off-by: Boyko Lalov <boyskila@gmail.com>
* eslint fixes
Signed-off-by: blalov <boyko.lalov@tick42.com>
Signed-off-by: Boyko Lalov <boyskila@gmail.com>
* hover bug fix
Signed-off-by: blalov <boyko.lalov@tick42.com>
Signed-off-by: Boyko Lalov <boyskila@gmail.com>
* refactoring
Signed-off-by: blalov <boyko.lalov@tick42.com>
Signed-off-by: Boyko Lalov <boyskila@gmail.com>
* remove unnecessary check
Signed-off-by: blalov <boyko.lalov@tick42.com>
Signed-off-by: Boyko Lalov <boyskila@gmail.com>
* fix tests
Signed-off-by: blalov <boyko.lalov@tick42.com>
Signed-off-by: Boyko Lalov <boyskila@gmail.com>
* lint fix
https://github.com/prometheus/prometheus/issues/6268
Signed-off-by: blalov <boyko.lalov@tick42.com>
Signed-off-by: Boyko Lalov <boyskila@gmail.com>
* fix typos
Fixes<https://github.com/prometheus/prometheus/issues/6268 >
Signed-off-by: blalov <boyko.lalov@tick42.com>
Signed-off-by: Boyko Lalov <boyskila@gmail.com>
* init hover events if can
Fixes: <https://github.com/prometheus/prometheus/issues/6268 >
Signed-off-by: blalov <boyko.lalov@tick42.com>
Signed-off-by: Boyko Lalov <boyskila@gmail.com>
* review changes
Signed-off-by: blalov <boyko.lalov@tick42.com>
Signed-off-by: Boyko Lalov <boyskila@gmail.com>
* fix activeIndex bug
Signed-off-by: Boyko Lalov <boyskila@gmail.com>
* extend plot options types
Signed-off-by: Boyko Lalov <boyskila@gmail.com>
* adding more types
Signed-off-by: blalov <boyko.lalov@tick42.com>
* fix branch after wrong force push
Signed-off-by: blalov <boyko.lalov@tick42.com>
* unit test fixes
Signed-off-by: blalov <boyko.lalov@tick42.com>
* remove unused variables
Signed-off-by: blalov <boyko.lalov@tick42.com>
2019-11-24 13:14:57 +01:00
Julius Volz
cb92a45bf3
React UI: Make test spy attachment more jest-y ( #6361 )
...
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2019-11-24 13:14:01 +01:00
Julius Volz
22d884b38e
React UI: Fix tests harder ( #6316 )
...
* React UI: Fix tests harder
Again not sure why this passed last time (?), but now I was getting an
error about 'NaN' not being a valid value to assign to the 'height'
property of the input element. This changes it so that only the blur()
function is actually mocked out on the active input element.
Signed-off-by: Julius Volz <julius.volz@gmail.com>
* Fixup
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2019-11-22 16:20:07 +01:00
Julius Volz
20ec57160c
React UI: Clarify VSCode usage requirements ( #6357 )
...
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2019-11-22 14:55:32 +01:00
Julius Volz
d2cb05846b
React UI: Add /tsdb-status to React-handled routes ( #6313 )
...
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2019-11-20 15:50:52 +01:00
Boyko
3e3b7ceb0b
React UI: Change the dynamic react key with static id ( #6325 )
...
* change the dynamic key with static id for react key prop
Signed-off-by: blalov <boyko.lalov@tick42.com>
* test fix
Signed-off-by: blalov <boyko.lalov@tick42.com>
* add initial panel on did mount
Signed-off-by: blalov <boyko.lalov@tick42.com>
* lint fix
Signed-off-by: blalov <boyko.lalov@tick42.com>
* remove filter for empty expression
Signed-off-by: blalov <boyko.lalov@tick42.com>
* refactoring
Signed-off-by: blalov <boyko.lalov@tick42.com>
* refactor encodePanelOptionsToQueryString
Signed-off-by: blalov <boyko.lalov@tick42.com>
* refactor encodePanelOptionsToQueryString
Signed-off-by: blalov <boyko.lalov@tick42.com>
* revert to format range/endTime
Signed-off-by: blalov <boyko.lalov@tick42.com>
* urlParams unit tests
Signed-off-by: blalov <boyko.lalov@tick42.com>
* unit tests adjustments
Signed-off-by: Boyko Lalov <boyskila@gmail.com>
2019-11-20 15:33:03 +01:00
Julius Volz
85cae37107
React UI: Add better docs for the React UI ( #6315 )
...
* React UI: Add better docs for the React UI
Signed-off-by: Julius Volz <julius.volz@gmail.com>
* Fixups
Signed-off-by: Julius Volz <julius.volz@gmail.com>
* Fixup
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2019-11-14 19:53:10 +01:00
Julius Volz
2a6df53416
React UI: Make link to classic UI work ( #6320 )
...
It being a Reach Router <Link> caused the Reach router to not actually
leave the React app, even though the destination path was not a path
handled by the Reach Router.
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2019-11-14 18:46:39 +01:00
Boyko
12d347e4db
unit test fixes ( #6314 )
...
Signed-off-by: Boyko Lalov <boyskila@gmail.com>
2019-11-13 14:58:45 +01:00
Julius Volz
e110402d44
React UI: Fix build ( #6312 )
...
This fixes two TypeScript errors. Not sure why we didn't catch the
breakage in the PR CI tests... also, updating TypeScript just for good
measure.
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2019-11-13 13:36:43 +01:00
Boyko
8a9509b0a8
Replace fetching hooks with class render prop component ( #6267 )
...
* replace fetching hooks with class render prop component
Signed-off-by: Boyko Lalov <boyskila@gmail.com>
Signed-off-by: blalov <boyko.lalov@tick42.com>
Signed-off-by: Boyko Lalov <boyskila@gmail.com>
* rename Fetcher
Signed-off-by: blalov <boyko.lalov@tick42.com>
Signed-off-by: Boyko Lalov <boyskila@gmail.com>
* status page markup separated from fetcher component
Signed-off-by: blalov <boyko.lalov@tick42.com>
Signed-off-by: Boyko Lalov <boyskila@gmail.com>
* fetch api reusability
Signed-off-by: blalov <boyko.lalov@tick42.com>
Signed-off-by: Boyko Lalov <boyskila@gmail.com>
* extract Config and Flags pages as 'dumb' components
Signed-off-by: blalov <boyko.lalov@tick42.com>
Signed-off-by: Boyko Lalov <boyskila@gmail.com>
* more components splitting
Signed-off-by: blalov <boyko.lalov@tick42.com>
Signed-off-by: Boyko Lalov <boyskila@gmail.com>
* implement fetchWithstatus HOC
Signed-off-by: blalov <boyko.lalov@tick42.com>
Signed-off-by: Boyko Lalov <boyskila@gmail.com>
* refactor changed files tests
Signed-off-by: blalov <boyko.lalov@tick42.com>
Signed-off-by: Boyko Lalov <boyskila@gmail.com>
* switching back to hooks.
Signed-off-by: blalov <boyko.lalov@tick42.com>
Signed-off-by: Boyko Lalov <boyskila@gmail.com>
* fetch response bug fix
Signed-off-by: Boyko Lalov <boyskila@gmail.com>
* make wrapped by withstatusIndicator components names consistent
Signed-off-by: Boyko Lalov <boyskila@gmail.com>
2019-11-12 14:35:47 +01:00
Sharad Gaur
a85e7aac0e
Adding TSDB Stats Page in React UI ( #6281 )
...
Signed-off-by: Sharad Gaur <sgaur@splunk.com>
2019-11-12 11:15:20 +01:00
Boyko
fc309a35bb
update panels on back button pressed ( #6300 )
...
Signed-off-by: Boyko Lalov <boyskila@gmail.com>
2019-11-12 10:21:23 +01:00
Dustin Hooten
ca60bf298c
React UI: Implement /targets page ( #6276 )
...
* Add LastScrapeDuration to targets endpoint
Signed-off-by: Dustin Hooten <dhooten@splunk.com>
* Add Scrape job name to targets endpoint
Signed-off-by: Dustin Hooten <dhooten@splunk.com>
* Implement the /targets page in react
Signed-off-by: Dustin Hooten <dhooten@splunk.com>
* Add state query param to targets endpoint
Signed-off-by: Dustin Hooten <dhooten@splunk.com>
* Use state filter in api call
Signed-off-by: Dustin Hooten <dhooten@splunk.com>
* api feedback
Signed-off-by: Dustin Hooten <dhooten@splunk.com>
* pr feedback frontend
Signed-off-by: Dustin Hooten <dhooten@splunk.com>
* Implement and use localstorage hook
Signed-off-by: Dustin Hooten <dhooten@splunk.com>
* PR feedback
Signed-off-by: Dustin Hooten <dhooten@splunk.com>
2019-11-11 22:42:24 +01:00
Julien Pivotto
d2257cb7d8
React UI: Display small numbers correctly ( #6274 )
...
Closes #6272
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2019-11-06 12:37:17 +01:00
David Leadbeater
129dbdaf74
Ensure warnings are escaped ( #6279 )
...
Signed-off-by: David Leadbeater <dgl@dgl.cx>
2019-11-06 07:55:28 +00:00
Julius Volz
431844f0a7
React UI: Mark not-yet-done pages as under construction ( #6277 )
...
This is a quick change because the release is about to be cut in a few
hours and it would be good to clarify to users what the empty pages in
the new UI are about.
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2019-11-05 20:09:37 +01:00
Julius Volz
3836cc1997
React UI: Fix left/right icons in the time picker ( #6275 )
...
https://github.com/prometheus/prometheus/pull/6193 removed these icons
from the font library, but the non-React timepicker library requires
these.
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2019-11-05 08:15:18 -07:00
Sharad Gaur
e94503ff5c
Head Cardinality Status Page ( #6125 )
...
* Adding TSDB Head Stats like cardinality to Status Page
Signed-off-by: Sharad Gaur <sgaur@splunk.com>
* Moving mutx to Head
Signed-off-by: Sharad Gaur <sgaur@splunk.com>
* Renaming variabls
Signed-off-by: Sharad Gaur <sgaur@splunk.com>
* Renaming variabls and html
Signed-off-by: Sharad Gaur <sgaur@splunk.com>
* Removing unwanted whitespaces
Signed-off-by: Sharad Gaur <sgaur@splunk.com>
* Adding Tests, Banchmarks and Max Heap for Postings Stats
Signed-off-by: Sharad Gaur <sgaur@splunk.com>
* Adding more tests for postingstats and web handler
Signed-off-by: Sharad Gaur <sgaur@splunk.com>
* Adding more tests for postingstats and web handler
Signed-off-by: Sharad Gaur <sgaur@splunk.com>
* Remove generated asset file that is no longer used
Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
* Changing comment and variable name for more readability
Signed-off-by: Sharad Gaur <sgaur@splunk.com>
* Using time.Duration in postings status function and removing refresh button from web page
Signed-off-by: Sharad Gaur <sgaur@splunk.com>
2019-11-04 19:06:13 -07:00
Boyko
7293c859ab
pass the value to the input instead to downshift ( #6235 )
...
* pass the value to the input instead to downshift
Signed-off-by: blalov <boyko.lalov@tick42.com>
* adjust expression input tests
Signed-off-by: blalov <boyko.lalov@tick42.com>
* improve ExpressionInput test coverage
Signed-off-by: blalov <boyko.lalov@tick42.com>
2019-11-04 13:15:25 +01:00
Julius Volz
95554074d8
React UI: Support custom path prefixes ( #6264 )
...
* React UI: Support custom path prefixes
The challenge was that the path prefix can be set dynamically as a flag
on Prometheus, but the React app bundle is statically compiled in to
expect a given path prefix. By adding a placeholder value to the React
app's index.html and replacing it in Prometheus with the right path
prefix during serving, this injects Prometheus's path prefix into the
React app via a global const.
Threading the path prefix into the different React components could have
been done with React's Contexts (https://reactjs.org/docs/context.html ),
but I found the consumer side of context values to be a bit cumbersome
(wrapping entire components in context consumers), so I ended up
preferring direct threading of the path prefix values to components that
needed them. Also, using contexts in tests is more verbose than just
passing in path prefix values directly.
Fixes https://github.com/prometheus/prometheus/issues/6163
Signed-off-by: Julius Volz <julius.volz@gmail.com>
* Review feedback
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2019-11-04 09:17:50 +01:00
Julius Volz
5bc935337a
React UI: Simpler and relative-only query URL building ( #6263 )
...
I prefer just keeping it dumb (and it helps with a current Netlify
deploy hack I have).
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2019-11-03 13:21:35 +01:00
Julius Volz
8c0b76d1da
React UI: Improve styling of autocomplete sections ( #6228 )
...
* React UI: Improve styling of autocomplete sections
I removed the Card-related components and went back to normal <ul>/<li>,
since the style that Cards added just got in the way (like adding extra
borders and rounding, etc.), and from the examples at
https://getbootstrap.com/docs/4.3/components/card/ , it doesn't seem like
multiple Cards are meant to be used as part of a larger list
(style-wise).
Signed-off-by: Julius Volz <julius.volz@gmail.com>
* Address review feedback
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2019-11-03 12:47:47 +01:00
Julius Volz
fffb5ca1e9
React UI: More conversions to Function Components ( #6259 )
...
* React UI: More conversions to Function Components
Signed-off-by: Julius Volz <julius.volz@gmail.com>
* Address chat feedback over Riot
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2019-11-02 21:45:22 +01:00
Boyko
cb7cbad5f9
WIP: status page - API and UI ( #6243 )
...
* status page initial commit
Signed-off-by: Boyko Lalov <boyskila@gmail.com>
Signed-off-by: blalov <boyko.lalov@tick42.com>
* refactor useFetch
Signed-off-by: Boyko Lalov <boyskila@gmail.com>
Signed-off-by: blalov <boyko.lalov@tick42.com>
* refactoring
Signed-off-by: Boyko Lalov <boyskila@gmail.com>
Signed-off-by: blalov <boyko.lalov@tick42.com>
* adding tests
Signed-off-by: Boyko Lalov <boyskila@gmail.com>
Signed-off-by: blalov <boyko.lalov@tick42.com>
* snapshot testing
Signed-off-by: Boyko Lalov <boyskila@gmail.com>
Signed-off-by: blalov <boyko.lalov@tick42.com>
* fix wrong go files formatting
Signed-off-by: Boyko Lalov <boyskila@gmail.com>
Signed-off-by: blalov <boyko.lalov@tick42.com>
* change the snapshot library
Signed-off-by: Boyko Lalov <boyskila@gmail.com>
Signed-off-by: blalov <boyko.lalov@tick42.com>
* update api paths
Signed-off-by: Boyko Lalov <boyskila@gmail.com>
Signed-off-by: blalov <boyko.lalov@tick42.com>
* move test folder outside src
Signed-off-by: Boyko Lalov <boyskila@gmail.com>
Signed-off-by: blalov <boyko.lalov@tick42.com>
* useFetches tests
Signed-off-by: blalov <boyko.lalov@tick42.com>
* sticky navbar
Signed-off-by: Boyko Lalov <boyskila@gmail.com>
Signed-off-by: blalov <boyko.lalov@tick42.com>
* handle runtimeInfo error on Gather() and add json tags to RuntimeInfo struct
Signed-off-by: blalov <boyko.lalov@tick42.com>
* refactor alert managers section
Signed-off-by: blalov <boyko.lalov@tick42.com>
2019-11-02 16:53:32 +01:00
Chris Marchbanks
f17a0e17aa
Implement the /flags page in react ( #6248 )
...
* 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>
2019-11-02 10:27:36 +01:00
Michał
040425b0eb
filtering alerts by state and display count of alerts in each state ( #5758 )
...
* 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>
2019-10-29 11:09:52 +01:00
Dustin Hooten
e0443e6fa3
Add unit tests for react-app ( #6234 )
...
* Add MetricFormat unit tests
Signed-off-by: Dustin Hooten <dhooten@splunk.com>
* Add App unit tests; Add debug script
Signed-off-by: Dustin Hooten <dhooten@splunk.com>
* Add Checkbox unit tests
Signed-off-by: Dustin Hooten <dhooten@splunk.com>
* Add SeriesName unit tests
Signed-off-by: Dustin Hooten <dhooten@splunk.com>
* Add QueryStatsView unit test
Signed-off-by: Dustin Hooten <dhooten@splunk.com>
* Add Legend unit tests
Signed-off-by: Dustin Hooten <dhooten@splunk.com>
* Remove unused utils/func
Signed-off-by: Dustin Hooten <dhooten@splunk.com>
* Add utils/urlParams unit test
Signed-off-by: Dustin Hooten <dhooten@splunk.com>
* Add utils/timeFormat unit test
Signed-off-by: Dustin Hooten <dhooten@splunk.com>
* Add ExpressionInput unit tests
Signed-off-by: Dustin Hooten <dhooten@splunk.com>
* Add GraphControls unit test
Signed-off-by: Dustin Hooten <dhooten@splunk.com>
* Add TimeInput unit test
Signed-off-by: Dustin Hooten <dhooten@splunk.com>
* Add DataTable unit test
Signed-off-by: Dustin Hooten <dhooten@splunk.com>
* Add SanitizeHTML unit test
Signed-off-by: Dustin Hooten <dhooten@splunk.com>
* Add Graph unit test
Signed-off-by: Dustin Hooten <dhooten@splunk.com>
* Extract utils/html
Signed-off-by: Dustin Hooten <dhooten@splunk.com>
* Add PanelList unit test
Signed-off-by: Dustin Hooten <dhooten@splunk.com>
* Add Panel unit test
Signed-off-by: Dustin Hooten <dhooten@splunk.com>
* Add react-ui test coverage report to CI
Signed-off-by: Dustin Hooten <dhooten@splunk.com>
2019-10-28 18:09:48 +01:00