Commit graph

8 commits

Author SHA1 Message Date
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 <[email protected]>

* Address review feedback

Signed-off-by: Julius Volz <[email protected]>
2019-11-03 12:47:47 +01:00
Boyko cb7cbad5f9 WIP: status page - API and UI (#6243)
* status page initial commit

Signed-off-by: Boyko Lalov <[email protected]>
Signed-off-by: blalov <[email protected]>

* refactor useFetch

Signed-off-by: Boyko Lalov <[email protected]>
Signed-off-by: blalov <[email protected]>

* refactoring

Signed-off-by: Boyko Lalov <[email protected]>
Signed-off-by: blalov <[email protected]>

* adding tests

Signed-off-by: Boyko Lalov <[email protected]>
Signed-off-by: blalov <[email protected]>

* snapshot testing

Signed-off-by: Boyko Lalov <[email protected]>
Signed-off-by: blalov <[email protected]>

* fix wrong go files formatting

Signed-off-by: Boyko Lalov <[email protected]>
Signed-off-by: blalov <[email protected]>

* change the snapshot library

Signed-off-by: Boyko Lalov <[email protected]>
Signed-off-by: blalov <[email protected]>

* update api paths

Signed-off-by: Boyko Lalov <[email protected]>
Signed-off-by: blalov <[email protected]>

* move test folder outside src

Signed-off-by: Boyko Lalov <[email protected]>
Signed-off-by: blalov <[email protected]>

* useFetches tests

Signed-off-by: blalov <[email protected]>

* sticky navbar

Signed-off-by: Boyko Lalov <[email protected]>
Signed-off-by: blalov <[email protected]>

* handle runtimeInfo error on Gather() and add json tags to RuntimeInfo struct

Signed-off-by: blalov <[email protected]>

* refactor alert managers section

Signed-off-by: blalov <[email protected]>
2019-11-02 16:53:32 +01:00
Boyko 8afa8452fd reach router integration initial commit (#6232)
Signed-off-by: blalov <[email protected]>
2019-10-27 22:03:39 +01:00
Boyko dab87ca281 split autocomplete dropdown in to groups (#6211)
* split autocomplete dropdown in to groups

Signed-off-by: blalov <[email protected]>

* fix autocomplete flickering

Signed-off-by: blalov <[email protected]>

* fix expression input issue.

Signed-off-by: blalov <[email protected]>

* select autocomplete item issue fix

Signed-off-by: blalov <[email protected]>

* remove metric group abstraction

Signed-off-by: blalov <[email protected]>
2019-10-26 19:50:22 +02:00
Boyko e235af9c47 migrate query history (#6193)
* migrate query history

Signed-off-by: blalov <[email protected]>

* update lock file

Signed-off-by: blalov <[email protected]>

* set expression input height when item is selected

Signed-off-by: blalov <[email protected]>

* pr review changes

Signed-off-by: blalov <[email protected]>
2019-10-23 22:18:41 +02:00
Julius Volz 1c238ac086
Add links between classic and new UIs (#6191)
The links preserve the graph settings between the two UIs.

Fixes https://github.com/prometheus/prometheus/issues/6162

Signed-off-by: Julius Volz <[email protected]>
2019-10-21 20:18:47 +02:00
Boyko b5a16a8f86 make expression input controlled (#6174)
* make expression input controlled

Signed-off-by: blalov <[email protected]>

* close menu explicitly  when autosuggestion dropdown is hidden

Signed-off-by: blalov <[email protected]>
2019-10-20 22:52:29 +02:00
Julius Volz bca6e90ea6
Integrate beginning of React UI (#5694)
* Initial commit from Create React App

Signed-off-by: Julius Volz <[email protected]>

* Initial Prometheus expression browser code

Signed-off-by: Julius Volz <[email protected]>

* Grpahing, try out echarts

Signed-off-by: Julius Volz <[email protected]>

* Switch to flot

Signed-off-by: Julius Volz <[email protected]>

* Add metrics fetching and stuff

Signed-off-by: Julius Volz <[email protected]>

* Autosuggest and graph improvements

Signed-off-by: Julius Volz <[email protected]>

* Start implementing graph controls, add loading spinner

Signed-off-by: Julius Volz <[email protected]>

* So many new features and fixes

Signed-off-by: Julius Volz <[email protected]>

* Fixed and built more features

Signed-off-by: Julius Volz <[email protected]>

* Make datetimepicker clear work

Signed-off-by: Julius Volz <[email protected]>

* Don't abort when executing empty expression

Signed-off-by: Julius Volz <[email protected]>

* Remove TabPaneAlert

Signed-off-by: Julius Volz <[email protected]>

* Split components into separate files

Signed-off-by: Julius Volz <[email protected]>

* Add table time input

Signed-off-by: Julius Volz <[email protected]>

* Move first files to TypeScript!

Signed-off-by: Julius Volz <[email protected]>

* More TypeScript conversions

Signed-off-by: Julius Volz <[email protected]>

* More TS conversions

Signed-off-by: Julius Volz <[email protected]>

* More TS conversions

Signed-off-by: Julius Volz <[email protected]>

* More TS conversions

Signed-off-by: Julius Volz <[email protected]>

* More TS conversions

Signed-off-by: Julius Volz <[email protected]>

* More TS fixes

Signed-off-by: Julius Volz <[email protected]>

* Convert Graph to TS

Signed-off-by: Julius Volz <[email protected]>

* Changes

Signed-off-by: Julius Volz <[email protected]>

* Resize detector, start building legend, axis font colors

Signed-off-by: Julius Volz <[email protected]>

* Make graph legend work

Signed-off-by: Julius Volz <[email protected]>

* Add URL params support and much more

Signed-off-by: Julius Volz <[email protected]>

* Put panel state into panel list, write URL options

Signed-off-by: Julius Volz <[email protected]>

* Change order of Graph and Table tabs

Signed-off-by: Julius Volz <[email protected]>

* Generalize time input naming more

Signed-off-by: Julius Volz <[email protected]>

* Work on history functionality

Signed-off-by: Julius Volz <[email protected]>

* npm updates

Signed-off-by: Julius Volz <[email protected]>

* Move loading indicator into "Execute" button

Signed-off-by: Julius Volz <[email protected]>

* Fix typo

Signed-off-by: Julius Volz <[email protected]>

* Revert "Move loading indicator into "Execute" button"

This reverts commit ce7daee1f1af35da6c0d8b5517272839285ccfec.

Signed-off-by: Julius Volz <[email protected]>

* Improve error message when failing to fetch server time

Signed-off-by: Julius Volz <[email protected]>

* Move all code to Prometheus repo target dir

Signed-off-by: Julius Volz <[email protected]>

* Add react-app Makefile step and check in generated assets

Signed-off-by: Julius Volz <[email protected]>

* Add preliminary npm packages notice to NOTICE file

Signed-off-by: Julius Volz <[email protected]>

* Update React app's favicon and metadata

Signed-off-by: Julius Volz <[email protected]>

* Remove RP server refs, cleanups

Signed-off-by: Julius Volz <[email protected]>

* Use CircleCI image that includes NodeJS

Signed-off-by: Julius Volz <[email protected]>

* Add some missing React output assets

Signed-off-by: Julius Volz <[email protected]>

* Preserve CRLF in generated React files

Signed-off-by: Julius Volz <[email protected]>

* Switch from npm to yarn for React UI

Signed-off-by: Julius Volz <[email protected]>

* Save npm licenses and include them in release tarball

Signed-off-by: Julius Volz <[email protected]>

* Install npm on Travis

Signed-off-by: Julius Volz <[email protected]>

* Remove npm license tarball from source

Signed-off-by: Julius Volz <[email protected]>

* Remove React graph bundle from source

Signed-off-by: Julius Volz <[email protected]>

* Don't check in any compiled web assets

Signed-off-by: Julius Volz <[email protected]>

* Update README.md with node/yarn/React UI info

Signed-off-by: Julius Volz <[email protected]>

* Fix asset build step on CircleCI promu crossbuild

Signed-off-by: Julius Volz <[email protected]>

* Try to fix multi-arch go generate

Signed-off-by: Julius Volz <[email protected]>

* Remove check_assets from Travis CI build

Signed-off-by: Julius Volz <[email protected]>

* Prevent rebuilding of unchanged React app parts

Signed-off-by: Julius Volz <[email protected]>

* Fix npm license tarball path for promu

Signed-off-by: Julius Volz <[email protected]>

* Simplify Makefile

Signed-off-by: Julius Volz <[email protected]>

* Clarify build instructions in README.md

Signed-off-by: Julius Volz <[email protected]>

* Make minimal JS test pass

Signed-off-by: Julius Volz <[email protected]>

* Integrate React app tests into Makefile

Signed-off-by: Julius Volz <[email protected]>

* Separate react-app-tests target, but run it from CI

Signed-off-by: Julius Volz <[email protected]>

* Fix working directory for React app tests

Signed-off-by: Julius Volz <[email protected]>

* Remove local modifications to Makefile.common

This means that CircleCI will not run the React app tests, but at least
Travis still will...

Signed-off-by: Julius Volz <[email protected]>

* Depend on node_modules path for npm_licenses target

Signed-off-by: Julius Volz <[email protected]>

* Simplify tarball/docker/build Makefile targets

Signed-off-by: Julius Volz <[email protected]>

* Include React tests in "test" target

Signed-off-by: Julius Volz <[email protected]>

* Remove reference to removed "check_assets" target

Signed-off-by: Julius Volz <[email protected]>

* Do initial resize of expression input field

Signed-off-by: Julius Volz <[email protected]>

* Add React app proxying to local Prometheus in dev mode

Signed-off-by: Julius Volz <[email protected]>
2019-10-17 14:38:09 +02:00