Commit Graph

325 Commits

Author SHA1 Message Date
dependabot[bot] a465885055
Bump webpack from 5.76.0 to 5.92.1 in /ui/react-app
Bumps [webpack](https://github.com/webpack/webpack) from 5.76.0 to 5.92.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.76.0...v5.92.1)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-28 14:16:34 +00:00
Simon Pasquier 4c1a187fef
Merge pull request #3788 from prometheus/dependabot/npm_and_yarn/ui/react-app/use-query-params-2.2.1
Bump use-query-params from 2.2.0 to 2.2.1 in /ui/react-app
2024-06-25 16:02:57 +02:00
Simon Pasquier 36d653ab9f
Merge pull request #3755 from prometheus/dependabot/npm_and_yarn/ui/react-app/fork-ts-checker-webpack-plugin-9.0.2
Bump fork-ts-checker-webpack-plugin from 7.3.0 to 9.0.2 in /ui/react-app
2024-06-21 16:33:50 +02:00
Simon Pasquier 7c455af540
Merge pull request #3767 from prometheus/dependabot/npm_and_yarn/ui/react-app/webpack-5.76.0
Bump webpack from 5.75.0 to 5.76.0 in /ui/react-app
2024-06-21 16:32:36 +02:00
dependabot[bot] 24be2dc3e3
Bump fork-ts-checker-webpack-plugin from 7.3.0 to 9.0.2 in /ui/react-app
Bumps [fork-ts-checker-webpack-plugin](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin) from 7.3.0 to 9.0.2.
- [Release notes](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/releases)
- [Changelog](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/blob/main/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/compare/v7.3.0...v9.0.2)

---
updated-dependencies:
- dependency-name: fork-ts-checker-webpack-plugin
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-21 13:55:14 +00:00
youngwendy 72b62dbfea
chore: remove repetitive words (#3804)
Signed-off-by: youngwendy <clonefetch@outlook.com>
2024-04-25 18:54:53 +02:00
Holger Freyther 530bb3f6b3
ui: Force using linux/amd64 when using docker (#3807)
The elm npm package doesn't support linux/arm64. The easiest option
is to force docker to run this as a AMD64 container.

Upstream issue:
https://github.com/elm/compiler/issues/2283

Signed-off-by: Holger Hans Peter Freyther <holger@freyther.de>
2024-04-25 17:39:05 +01:00
dependabot[bot] 688d6490b4
Bump use-query-params from 2.2.0 to 2.2.1 in /ui/react-app
Bumps [use-query-params](https://github.com/pbeshai/use-query-params) from 2.2.0 to 2.2.1.
- [Release notes](https://github.com/pbeshai/use-query-params/releases)
- [Commits](https://github.com/pbeshai/use-query-params/compare/use-query-params@2.2.0...use-query-params@2.2.1)

---
updated-dependencies:
- dependency-name: use-query-params
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-01 15:38:38 +00:00
dependabot[bot] 85d1e06d24
Bump webpack from 5.75.0 to 5.76.0 in /ui/react-app
Bumps [webpack](https://github.com/webpack/webpack) from 5.75.0 to 5.76.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.75.0...v5.76.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-19 13:58:59 +00:00
dependabot[bot] 54af8b59ab
Bump webpack-merge from 5.8.0 to 5.10.0 in /ui/react-app (#3751)
Bumps [webpack-merge](https://github.com/survivejs/webpack-merge) from 5.8.0 to 5.10.0.
- [Changelog](https://github.com/survivejs/webpack-merge/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/survivejs/webpack-merge/compare/v5.8.0...v5.10.0)

---
updated-dependencies:
- dependency-name: webpack-merge
  dependency-type: direct:development
  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>
2024-03-14 12:45:57 +00:00
dependabot[bot] abb5abdcdc
Bump @types/react-dom from 18.0.11 to 18.2.19 in /ui/react-app (#3753)
Bumps [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom) from 18.0.11 to 18.2.19.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom)

---
updated-dependencies:
- dependency-name: "@types/react-dom"
  dependency-type: direct:development
  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>
2024-03-14 12:44:32 +00:00
dependabot[bot] 9edea05c12
Bump mdi-material-ui from 7.6.0 to 7.8.0 in /ui/react-app (#3754)
Bumps [mdi-material-ui](https://github.com/TeamWertarbyte/mdi-material-ui) from 7.6.0 to 7.8.0.
- [Release notes](https://github.com/TeamWertarbyte/mdi-material-ui/releases)
- [Commits](https://github.com/TeamWertarbyte/mdi-material-ui/compare/v7.6.0...v7.8.0)

---
updated-dependencies:
- dependency-name: mdi-material-ui
  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>
2024-03-14 12:44:21 +00:00
dependabot[bot] 8e7f3d2366
Bump ts-loader from 9.4.2 to 9.5.1 in /ui/react-app (#3688)
Bumps [ts-loader](https://github.com/TypeStrong/ts-loader) from 9.4.2 to 9.5.1.
- [Release notes](https://github.com/TypeStrong/ts-loader/releases)
- [Changelog](https://github.com/TypeStrong/ts-loader/blob/main/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/ts-loader/compare/v9.4.2...v9.5.1)

---
updated-dependencies:
- dependency-name: ts-loader
  dependency-type: direct:development
  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>
2024-02-06 15:50:34 +00:00
dependabot[bot] e8084744f0
Bump style-loader from 3.3.1 to 3.3.4 in /ui/react-app (#3689)
Bumps [style-loader](https://github.com/webpack-contrib/style-loader) from 3.3.1 to 3.3.4.
- [Release notes](https://github.com/webpack-contrib/style-loader/releases)
- [Changelog](https://github.com/webpack-contrib/style-loader/blob/v3.3.4/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/style-loader/compare/v3.3.1...v3.3.4)

---
updated-dependencies:
- dependency-name: style-loader
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-06 15:36:31 +00:00
dependabot[bot] 0b40ac1fd6
Bump eslint from 8.35.0 to 8.56.0 in /ui/react-app (#3692)
Bumps [eslint](https://github.com/eslint/eslint) from 8.35.0 to 8.56.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.35.0...v8.56.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  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>
2024-02-06 15:36:22 +00:00
dependabot[bot] d5d89b3fc0
Bump eslint-webpack-plugin from 3.2.0 to 4.0.1 in /ui/react-app (#3695)
Bumps [eslint-webpack-plugin](https://github.com/webpack-contrib/eslint-webpack-plugin) from 3.2.0 to 4.0.1.
- [Release notes](https://github.com/webpack-contrib/eslint-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/eslint-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/eslint-webpack-plugin/compare/v3.2.0...v4.0.1)

---
updated-dependencies:
- dependency-name: eslint-webpack-plugin
  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>
2024-02-06 15:36:13 +00:00
dependabot[bot] 946a3b4e77
Bump @types/react from 18.0.28 to 18.2.51 in /ui/react-app (#3706)
Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.0.28 to 18.2.51.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/react"
  dependency-type: direct:development
  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>
2024-02-06 15:36:04 +00:00
Ben Kochie 0c6393b3f4
Update golanci-lint (#3632)
Update golangci-lint from upstream Prometheus and fixup issues.

Signed-off-by: SuperQ <superq@gmail.com>
2023-12-07 16:42:42 +00:00
Alexander Weaver fdea7e731c
Isolate react-app package (#3589)
* Isolate react-app package

Signed-off-by: Alex Weaver <weaver.alex.d@gmail.com>

---------

Signed-off-by: Alex Weaver <weaver.alex.d@gmail.com>
2023-11-03 14:50:06 +00:00
Julius Volz 6cbe2eb21f
Merge pull request #3262 from prometheus/nexucis/react-app
Initiate the React application with Status page
2023-08-28 18:02:27 +02:00
Simon Pasquier b8f60392f4
Check the validity of the generatorURL field
The Source button should only be displayed if the link starts by
'http://' or 'https://'.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2023-08-23 16:42:24 +01:00
Augustin Husson fc3974518b sort import according to the config
Signed-off-by: Augustin Husson <augustin.husson@amadeus.com>
2023-08-16 09:53:05 +02:00
Augustin Husson f334232b85 override lint makefile directive
Signed-off-by: Augustin Husson <augustin.husson@amadeus.com>
2023-08-16 09:37:10 +02:00
Augustin Husson 4b86e08028 Merge branch 'main' into nexucis/react-app 2023-08-16 09:20:52 +02:00
Julien Pivotto 14a265b710
Add receiver name to the alerts page (#3289)
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-03-09 16:32:13 +00:00
Augustin Husson 6809cf2ef1 deactivate button based on the location
Signed-off-by: Augustin Husson <augustin.husson@amadeus.com>
2023-03-02 14:46:50 +01:00
Augustin Husson 1927ba4fe0 simplify url-builder function
Signed-off-by: Augustin Husson <augustin.husson@amadeus.com>
2023-03-02 11:19:04 +01:00
Augustin Husson cdab0769c6 add display of peers
Signed-off-by: Augustin Husson <augustin.husson@amadeus.com>
2023-03-01 16:06:18 +01:00
Augustin Husson 0a488e265e make the table small and change the navbar color
Signed-off-by: Augustin Husson <augustin.husson@amadeus.com>
2023-03-01 15:30:30 +01:00
Augustin Husson 25d1f32138 inject react-app in binary
Signed-off-by: Augustin Husson <augustin.husson@amadeus.com>
2023-02-28 12:57:49 +01:00
Augustin Husson d450bed6f1 implementing the status page
Signed-off-by: Augustin Husson <augustin.husson@amadeus.com>
2023-02-27 17:10:58 +01:00
Augustin Husson c86c6131ae init a react-app
Signed-off-by: Augustin Husson <augustin.husson@amadeus.com>
2023-02-27 12:30:09 +01:00
Martin Schimandl 893ad67978
Allow first day of week to be Sunday or Monday (#3093)
* Allow week to start at Monday or Sunday

Signed-off-by: Martin Schimandl <martin.schimandl@gmail.com>

* refactor from Int to DataType

Signed-off-by: Martin Schimandl <martin.schimandl@gmail.com>

* refactor to use name 'firstDayOfWeek' everywhere

Signed-off-by: Martin Schimandl <martin.schimandl@gmail.com>

* CSS fine tuning

Signed-off-by: Martin Schimandl <martin.schimandl@gmail.com>

* Check firstDayOfWeek with case statements

Signed-off-by: Martin Schimandl <martin.schimandl@gmail.com>

* Change default to Sunday. Use radio buttons

Signed-off-by: Martin Schimandl <martin.schimandl@gmail.com>

* Update ui/app/src/Views/Settings/Views.elm

Co-authored-by: Andrey Kuzmin <unsoundscapes@gmail.com>
Signed-off-by: Martin Schimandl <martin.schimandl@gmail.com>

* Regenerate assets_vfsdata.go

Signed-off-by: Martin Schimandl <martin.schimandl@gmail.com>

Signed-off-by: Martin Schimandl <martin.schimandl@gmail.com>
Co-authored-by: Andrey Kuzmin <unsoundscapes@gmail.com>
2022-10-19 18:01:24 +02:00
Christopher Taylor 2c04c5aaa7
UI: add 'Link' button to alerts in list (#2880)
* add 'Link' button

adds a button to each alert that allows linking to a single alert.
This works by generating a link that filters on _all_ of the alert's
label values, similar to the button to create a new silence from an
alert.

Signed-off-by: Christopher Taylor <chris.taylor@soundcloud.com>

* update asset/assets_vfsdata.go

Signed-off-by: Christopher Taylor <chris.taylor@soundcloud.com>

Signed-off-by: Christopher Taylor <chris.taylor@soundcloud.com>
2022-10-05 18:29:12 +02:00
Nicolas Dumazet dec51b5ad9
/-/{healthy,ready}/ respond to HEAD (#3039)
Some frameworks issue HEAD requests to determine health.

This is meant to be the alertmanager equivalent of prometheus/prometheus#11160

Signed-off-by: Nicolas Dumazet <nicdumz.commits@gmail.com>

Signed-off-by: Nicolas Dumazet <nicdumz.commits@gmail.com>
2022-09-09 16:08:46 +02:00
nekketsuuu 007c93e203 chore: Let git ignore temporary files for ui/app
Signed-off-by: nekketsuuu <nekketsuuu@users.noreply.github.com>
2021-10-24 21:17:37 +09:00
Julien Pivotto b2a4cacb95 Update go dependencies & switch to go-kit/log
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-08-02 12:43:23 +02:00
Andrey Kuzmin 194f1cfd7c
Integrate elm-review in CI (#2555)
* Run elm-review from CI

Signed-off-by: Andrey Kuzmin <unsoundscapes@gmail.com>

* Use the jfmengels/elm-review-simplify rule

Signed-off-by: Andrey Kuzmin <unsoundscapes@gmail.com>

* Make assets

Signed-off-by: Andrey Kuzmin <unsoundscapes@gmail.com>
2021-04-27 07:14:00 +02:00
Andrey Kuzmin 54431be888
UI cleanup dead code with elm-review (#2528)
* Add elm-review

Signed-off-by: Andrey Kuzmin <unsoundscapes@gmail.com>

* elm-review --fix-all

Signed-off-by: Andrey Kuzmin <unsoundscapes@gmail.com>

* Update vfsdata

Signed-off-by: Andrey Kuzmin <unsoundscapes@gmail.com>
2021-04-08 21:04:09 +02:00
Andrey Kuzmin b0083ec55d
Negative matchers on the Silence form page (#2488)
* Support negative matchers in silence form

Signed-off-by: Andrey Kuzmin <unsoundscapes@gmail.com>

* Extract url manipulation from filterBar

This is needed for silence form, where we don't have to
manipulate the url.

Signed-off-by: Andrey Kuzmin <unsoundscapes@gmail.com>

* Only show the silence button in the alert list

Signed-off-by: Andrey Kuzmin <unsoundscapes@gmail.com>

* Validate matchers

Signed-off-by: Andrey Kuzmin <unsoundscapes@gmail.com>

* Improve silence form layout

Signed-off-by: Andrey Kuzmin <unsoundscapes@gmail.com>

* Fix for editing existing silence

Signed-off-by: Andrey Kuzmin <unsoundscapes@gmail.com>

* Fix for resetting the form

Signed-off-by: Andrey Kuzmin <unsoundscapes@gmail.com>

* Update assets_vfsdata.go

Signed-off-by: Andrey Kuzmin <unsoundscapes@gmail.com>
2021-03-01 16:40:32 +01:00
Kiril Vladimirov 740a97345f ui: add isEqual field to Matcher
Signed-off-by: Kiril Vladimirov <kiril@vladimiroff.org>
2021-02-19 00:14:04 +02:00
Simon Pasquier 45db1a1163
ui: update versions for the Elm components (#2482)
The frontend CI job started to fail for some obscure reasons, most
probably because we use a very old version of NodeJS.

To make it work again, this change does the following:

* Bump to the latest NodeJS LTS version and use the buster variant.
* Use Yarn instead of npm to install Javascript packages.
* Bump Elm components to their latest versions.

There should be no functional change to the UI code.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2021-02-09 15:47:54 +01:00
Nicholas Capo 193ebba04d
Display Silence and Alert dates in ISO8601 format (#2363)
* This changes the Alert view the SilenceList and SilenceView

Signed-off-by: Nicholas Capo <nicholas.capo@gmail.com>
2020-12-03 23:06:14 +01:00
B++ 00b86d9067
setting favicon.ico dinamically (#2392)
* added favico link with relative path

Signed-off-by: jberny <f.bernardi89@gmail.com>

* re-generated assets

Signed-off-by: jberny <f.bernardi89@gmail.com>
2020-10-15 11:10:48 +02:00
masataka 73db78741f
Add date picker to silence form views (#2262)
* add datepicker

Signed-off-by: m-masataka <m.mizukoshi.wakuwaku@gmail.com>

* fix import error

Signed-off-by: m-masataka <m.mizukoshi.wakuwaku@gmail.com>

* fix unnecessary import from DateTime package

Signed-off-by: m-masataka <m.mizukoshi.wakuwaku@gmail.com>

* fix unnecessary import utc

Signed-off-by: m-masataka <m.mizukoshi.wakuwaku@gmail.com>

* change datetime picker component

Signed-off-by: m-masataka <m.mizukoshi.wakuwaku@gmail.com>

* added datetime picker utils

Signed-off-by: m-masataka <m.mizukoshi.wakuwaku@gmail.com>

* added datetime picker utils

Signed-off-by: m-masataka <m.mizukoshi.wakuwaku@gmail.com>

* remove config

Signed-off-by: m-masataka <m.mizukoshi.wakuwaku@gmail.com>

* replace case expressions to Result.toMaybe

Signed-off-by: m-masataka <m.mizukoshi.wakuwaku@gmail.com>
2020-07-24 14:52:29 +02:00
Simon Pasquier 9c3ee38683
.circleci/config.yml: collect test metadata (#2211)
* .circleci/config.yml: collect test metadata

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Store frontend test results too

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2020-06-04 09:49:32 +02:00
masataka 443fdb0b36
fix receiver regex (#2090)
Signed-off-by: m-masataka <m.mizukoshi.wakuwaku@gmail.com>
2020-02-18 17:24:05 +01:00
NotAFile 4ec53566e5 add elm-* to ui/app make clean (#2098)
Signed-off-by: NotAFile <nota@notafile.com>
2019-11-20 10:45:46 +01:00
Simon Pasquier 5211fad581
ui/app: fix silences filter (#2075)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-10-18 11:47:26 +02:00
Stephen Reddekopp f3a2ff8b7f Disable the grammarly plugin on all textareas to prevent inserted nodes from crashing the vdom (#2061)
Signed-off-by: Stephen Reddekopp <stephen.reddekopp@gmail.com>
2019-10-04 11:00:22 +02:00
masataka c5d41bb68e Grouping label's expand button with grouping id (#2012)
* Expand button with id

Signed-off-by: m-masataka <m.mizukoshi.wakuwaku@gmail.com>

* fixed indexedMap

Signed-off-by: m-masataka <m.mizukoshi.wakuwaku@gmail.com>

* rebuild

Signed-off-by: m-masataka <m.mizukoshi.wakuwaku@gmail.com>
2019-08-29 09:33:24 +02:00
masataka c1040d5d74 Recreate silence with previous comment. (#1927)
* Recreate silence with previous comment.

Signed-off-by: m-masataka <m.mizukoshi.wakuwaku@gmail.com>

* implement newSilenceFromMatchersAndComment

Signed-off-by: m-masataka <m.mizukoshi.wakuwaku@gmail.com>

* Trigger

Signed-off-by: m-masataka <m.mizukoshi.wakuwaku@gmail.com>
2019-08-27 12:03:57 +02:00
masataka b33a9366dd Textarea with auto resize in UI (#1893)
* textarea with auto resize

Signed-off-by: mizukoshi-m <mizukoshi@mfeed.ad.jp>

* implement resize textarea on type

Signed-off-by: m-masataka <m.mizukoshi.wakuwaku@gmail.com>

* remove scrollHeight

Signed-off-by: m-masataka <m.mizukoshi.wakuwaku@gmail.com>

* Add new function for textarea field

Signed-off-by: m-masataka <m.mizukoshi.wakuwaku@gmail.com>

* remove unnecessary code

Signed-off-by: m-masataka <m.mizukoshi.wakuwaku@gmail.com>
2019-06-12 08:54:16 +02:00
masataka e33edd6f13 Create Silence from filter Bar (#1911)
* Create Silence from filters

Signed-off-by: m-masataka <m.mizukoshi.wakuwaku@gmail.com>

* Get rid of unnecessary things

Signed-off-by: m-masataka <m.mizukoshi.wakuwaku@gmail.com>
2019-06-05 19:01:56 +02:00
Stuart Nelson d7000fc984 Merge branch 'master' into stn/collapse-alert-groups 2019-05-13 10:03:27 +02:00
Andrey Kuzmin 658dd3a29f Properly serialize boolean
Signed-off-by: Andrey Kuzmin <andrey.kuzmin@soundcloud.com>
2019-05-11 20:28:33 +02:00
Andrey Kuzmin 20c336fe22 Adjust the styling
Signed-off-by: Andrey Kuzmin <andrey.kuzmin@soundcloud.com>
2019-05-11 20:28:33 +02:00
Will Hegedus 5a5133af7e update Tests to account for "active" param
Signed-off-by: Will Hegedus <wbhegedus@liberty.edu>
2019-05-10 09:57:27 -04:00
Will Hegedus 96a33e1bc6 Add filtering based off "active" query param
Signed-off-by: Will Hegedus <wbhegedus@liberty.edu>
2019-05-08 12:05:18 -04:00
stuart nelson 1abb1fb9bb Persist alert group expansion in local storage
Signed-off-by: stuart nelson <stuartnelson3@gmail.com>
2019-05-07 16:08:32 +02:00
stuart nelson f46adfe46a Support expanding multiple groups
Signed-off-by: stuart nelson <stuartnelson3@gmail.com>
2019-05-07 16:08:29 +02:00
stuart nelson 072365a44e Show alert count behind group
Signed-off-by: stuart nelson <stuartnelson3@gmail.com>
2019-05-07 16:08:26 +02:00
stuart nelson 7e0862f67c When only one alert group is present, always expand it
Can't think of a reason to hide the alerts if
there's only a single group.

Signed-off-by: stuart nelson <stuartnelson3@gmail.com>
2019-05-07 16:08:22 +02:00
stuart nelson 759bf7b6b6 Parse alert list into alert groups when received from API
We can simplify the view flow by parsing the list
of alerts for custom grouping as soon as they are
returned to the update function.

Signed-off-by: stuart nelson <stuartnelson3@gmail.com>
2019-05-07 16:08:05 +02:00
stuart nelson b4fb8a28ef Collapse alert groups when initially viewing ui
Signed-off-by: stuart nelson <stuartnelson3@gmail.com>
2019-05-03 16:15:07 +02:00
James Ritchie a6bdc73fa4 added icon to show inhibited status
Signed-off-by: James Ritchie <james.g.ritchie@baesystems.com>
2019-05-01 08:22:41 +00:00
stuart nelson 0a7e227549 Merge branch 'master' into default-grouping-in-ui
Signed-off-by: stuart nelson <stuartnelson3@gmail.com>
2019-04-30 15:09:56 +02:00
stuart nelson 1f41731881 Correctly construct filter query string for api
Updating the api in
bc373f562f
resulted in the UI sending query strings for the
filter that no longer match what the backend
expects. This brings that in to line.

Signed-off-by: stuart nelson <stuartnelson3@gmail.com>
2019-04-29 16:50:56 +02:00
Andrey Kuzmin eb8345e72f Update tests
Signed-off-by: Andrey Kuzmin <andrey.kuzmin@soundcloud.com>
2019-04-27 12:31:48 +02:00
Andrey Kuzmin 9ddadb8c77 Support default grouping
Signed-off-by: Andrey Kuzmin <andrey.kuzmin@soundcloud.com>
2019-04-27 12:14:31 +02:00
Andrey Kuzmin 1df9de3f28 Introduce a helper to render apiData
Signed-off-by: Andrey Kuzmin <andrey.kuzmin@soundcloud.com>
2019-04-27 12:14:31 +02:00
Andrey Kuzmin 91d29725e0 Remove unused filter argument
Signed-off-by: Andrey Kuzmin <andrey.kuzmin@soundcloud.com>
2019-04-27 12:14:31 +02:00
Andrey Kuzmin 26f3e4ef44 Generate AlertGroup decoders
Signed-off-by: Andrey Kuzmin <andrey.kuzmin@soundcloud.com>
2019-04-27 12:14:31 +02:00
Max Leonard Inden b1f05ce988
ui/web: Set HTTP headers to prevent asset caching
This patch adds HTTP headers to each web asset response, disabling
caching for the payload. This prevents users running an old version of
the UI against a new version of Alertmanager once they updated. On the
down-side it increases page load size on subsequent page loads.

Signed-off-by: Max Leonard Inden <IndenML@gmail.com>
2019-03-29 09:33:20 +01:00
Paul Gier c834a991c6 set ELM_HOME for the elm-env container
The ELM_HOME variable needs to be set to the mounted volume
directory when building to prevent permissions errors caused
by using root as the default home dir.

Signed-off-by: Paul Gier <pgier@redhat.com>
2019-03-11 10:45:45 -05:00
Paul Gier 458f1d646b Makefile improvements
- make clean shouldn't print errors when files/directories have already
been removed
- add copyright header to generated api files to pass license check

Signed-off-by: Paul Gier <pgier@redhat.com>
2019-03-11 10:45:45 -05:00
Simon Pasquier bc373f562f *: fix filter parameters with comma
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-03-08 09:56:05 +01:00
beorn7 f2345d7c8e Make the silence preview show also muted alerts
Even if an alert is already silenced and/or muted, I still want to
know that my newly created silence will affect it.

Signed-off-by: beorn7 <beorn@soundcloud.com>
2019-03-01 14:15:53 +01:00
Nguyen Quang Huy edf170d03b Add signed off to commit (#1766)
- Fix error string should not be capitalized from [Golang coding convention](https://github.com/golang/go/wiki/CodeReviewComments#error-strings)
- Fix some typos

Signed-off-by: Nguyen Quang Huy <huynq0911@gmail.com>
2019-02-25 11:04:42 +01:00
Max Leonard Inden 8e157b3af5
api/v2: Make cluster status peers and name optional
If a users chooses to disable the Alertmanager cluster feature, there is
no cluster name nor cluster peers. Hence these should be optional. Only
cluster status is set to "disabled".

Signed-off-by: Max Leonard Inden <IndenML@gmail.com>
2019-02-04 11:40:30 +01:00
Max Leonard Inden 2f055d9966
api/v2: Do not populate cluster info if clustering is disabled
When users start Alertmanager with `--cluster.listen-address=`, the
cluster will not be initialized, hence api.peer will be `nil`. So far
this would result in a nil pointer dereference by the API v2 accessing
the api.peer field.

With this patch, api v2 skips populating the peers array, sets the name
to an empty string and the status to "disabled" in case `api.peer` is
nil.

Signed-off-by: Max Leonard Inden <IndenML@gmail.com>
2019-01-31 16:56:59 +01:00
stuart nelson dba283edd0
respect regex matchers when recreating silences (#1697)
* Respect regexes when recreating silences
* Generate assets

Signed-off-by: stuart nelson <stuartnelson3@gmail.com>
2019-01-09 10:33:43 +01:00
stuart nelson b437240bd9
Stn/update alert compact view (#1698)
* Remove inhibited/silenced text

In the alert list, this is already seen via the
icons. In the silence preview, since it's in the
silence preview, clearly it's affected by the
silence.

* Generate assets

Signed-off-by: stuart nelson <stuartnelson3@gmail.com>
2019-01-08 16:26:12 +01:00
Max Leonard Inden 2b697aaa6b
api/v2: Extract shared properties of gettable and postable alert
With issue 1465 on openapi-generator [1] being fixed, we can not extract
shared properties of the gettable and postable alert definition into a
shared object (`alert`) like we do for silence, gettable silence and
postable silence.

In addition this patch does the following changes to the UI:

- Use `List GettableAlert` instead of plural type definition like
`GettableAlerts` because the plural definitions are not generated.

- Fix openapi-generator-cli docker image to specific hash.

[1] https://github.com/OpenAPITools/openapi-generator/issues/1465

Signed-off-by: Max Leonard Inden <IndenML@gmail.com>
2018-11-28 14:35:39 +01:00
Max Inden 218b8fb1f4 ui: Pass parameterized api url down to status logic (#1637)
Previously the api url was hardcoded in the elm logic fetching the
status of an Alertmanager. Instead it is now being passed down like we
already did for /alerts, /silences and /receivers.

Signed-off-by: Max Leonard Inden <IndenML@gmail.com>
2018-11-27 15:33:19 +01:00
Max Leonard Inden f504f953c1
ui: Move /alerts to API v2
Signed-off-by: Max Leonard Inden <IndenML@gmail.com>
2018-11-23 12:53:48 +01:00
Max Leonard Inden 8c19b96bd6
Revert "ui: Patch /alerts and /receivers to use api v1"
This reverts commit fb86df6add.

Signed-off-by: Max Leonard Inden <IndenML@gmail.com>
2018-11-21 17:10:17 +01:00
Max Leonard Inden b4b8b750df
api/v2/openapi.yaml: Differentiate between post and get silence
Instead of having one general silence, differentiate between postable
and gettable silence, hence making more fields required.

Signed-off-by: Max Leonard Inden <IndenML@gmail.com>
2018-11-15 16:21:07 +01:00
Max Leonard Inden fb86df6add
ui: Patch /alerts and /receivers to use api v1
With the previous patch /status and /silences were requested from api
v2. Requesting alerts from api v1 is done in a separate commit to be
able to revert it once alerts also come from api v2.

Signed-off-by: Max Leonard Inden <IndenML@gmail.com>
2018-11-15 13:25:41 +01:00
Max Leonard Inden e4e053b18e
ui: Move /status & /silences to API v2
This patch makes the Alertmanager UI (/status & /silences) use the
api/v2 endpoint. In addition it adds logic to generate the elm side data
model based on the OpenAPI specification.

Signed-off-by: Max Leonard Inden <IndenML@gmail.com>
2018-11-15 13:24:26 +01:00
stuart nelson 72e6720bea
Fixes #1615 (#1620)
Support `w` duration when making silences. Remove
`y` as a supported duration, silences are for
short term notification prevention.

Signed-off-by: stuart nelson <stuartnelson3@gmail.com>
2018-11-13 15:08:37 +01:00
stuart nelson 625604df90
Show more alert information on silence form/ silence view pages (#1601)
* Display same alert info as available in alert list

Signed-off-by: stuart nelson <stuartnelson3@gmail.com>
2018-11-07 17:08:22 +01:00
Simon Pasquier 3558e6fd9e Migrate from go-bindata to vfsgen (#1532)
* Migrate from go-bindata to vfsgen

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Ensure idempotent generation for vfsgen

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* asset: update generated files

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Fix asset paths for Windows platforms

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Regenerate assets

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Add vfs wrapper that returns constant mod time

This is identical to what we had with go-bindata and avoids the extra
step of storing the identity of the complete file system in another
location.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Additional cleanup

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-09-24 15:12:40 +02:00
stuart nelson 6f1118ab46
fix silence redirect (#1548)
* Use a button instead of a for buttons

Using <a> was causing an unintended redirect to
the root. It appears this behavior has changed in
0.19.

Signed-off-by: stuart nelson <stuartnelson3@gmail.com>

* bindata

Signed-off-by: stuart nelson <stuartnelson3@gmail.com>
2018-09-13 15:02:24 +02:00
Andrey Kuzmin e768371a39
Upgrade Alertmanager UI to Elm 0.19 (#1539)
* Run elm-upgrade
* Make compile
* Update index.html
* Upgrade tests
* Finalize the upgrade
* Optimize!
2018-09-06 18:08:51 +02:00
Harsh Agarwal 049663b2c8 Help tab (#1522)
* add helpTab in navbar

Signed-off-by: Harsh Agarwal <cs15btech11019@iith.ac.in>

* add updated bindata.go

Signed-off-by: Harsh Agarwal <cs15btech11019@iith.ac.in>
2018-08-16 00:20:29 +02:00
Simon Pasquier 0c512998ee Use Makefile.common from Prometheus (#1396)
* Include Makefile.common
* Fix the bindata.go files to make the style target happy
* Inline `.PHONY` statements

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-06-13 14:41:52 +02:00
Simon Pasquier b95b32821f ui: replace deprecated InstrumentHandler() (#1302)
This change replaces the deprecated InstrumentHandler function by
the equivalent functions from the promhttp package.

The following metrics are removed:

* http_request_duration_microseconds (Summary).
* http_request_size_bytes (Summary).
* http_requests_total (Counter).

And the following metrics are added instead:

* alertmanager_http_request_duration_seconds (Histogram).
* alertmanager_http_response_size_bytes (Histogram).
* promhttp_metric_handler_requests_in_flight (Gauge).
* promhttp_metric_handler_requests_total (Counter).
2018-03-28 15:28:38 +02:00
Stuart Nelson 85caf29316 Cleanup frontend makefile 2018-03-20 11:54:44 +01:00
Stuart Nelson 5ddf0444c4 Update bindata 2018-03-20 10:48:12 +01:00