- 04 11月, 2019 1 次提交
-
-
由 Julius Volz 提交于
* 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/6163Signed-off-by: NJulius Volz <julius.volz@gmail.com> * Review feedback Signed-off-by: NJulius Volz <julius.volz@gmail.com>
-
- 28 10月, 2019 2 次提交
-
-
由 CSTDev 提交于
* Initial react-ui linting rules Signed-off-by: Ncstdev <pietomb00@hotmail.com> * Add react linting to build process Move eslint config to its own file to keep package.json clearer. Signed-off-by: Ncstdev <pietomb00@hotmail.com> * Linting changes from master Signed-off-by: Ncstdev <pietomb00@hotmail.com> * Move CI linting to makefile and travis Also add trailing comma to multiline imports. Signed-off-by: Ncstdev <pietomb00@hotmail.com> * Add lint fix target to makefile Signed-off-by: Ncstdev <pietomb00@hotmail.com> * Lint latest master Signed-off-by: Ncstdev <pietomb00@hotmail.com>
-
由 Boyko 提交于
Signed-off-by: Nblalov <boyko.lalov@tick42.com>
-