From 99a3671e9bcff5528c5220753822de6aab22c688 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Mon, 16 Jul 2018 22:09:23 +0200 Subject: [PATCH] feat(ui): read config from index.html and use it to setup Sentry & default filters --- internal/models/api.go | 1 - ui/package-lock.json | 5 ++++ ui/package.json | 1 + ui/public/index.html | 9 +++++++ ui/src/App.js | 23 +++++++++++++++-- ui/src/Stores/AlertStore.js | 29 ++++++++++++++------- ui/src/index.js | 51 ++++++++++++++++++++++++++++++++++++- 7 files changed, 106 insertions(+), 13 deletions(-) diff --git a/internal/models/api.go b/internal/models/api.go index f270adeef..a6c3f69d1 100644 --- a/internal/models/api.go +++ b/internal/models/api.go @@ -161,7 +161,6 @@ func (ag *APIAlertGroup) DedupSharedMaps() { // Settings is used to export unsee configuration that is used by UI type Settings struct { StaticColorLabels []string `json:"staticColorLabels"` - DefaultFilters []string `json:"defaultFilters"` } // AlertsResponse is the structure of JSON response UI will use to get alert data diff --git a/ui/package-lock.json b/ui/package-lock.json index 21822dfd7..f219ef869 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -9487,6 +9487,11 @@ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=" }, + "raven-js": { + "version": "3.26.3", + "resolved": "https://registry.npmjs.org/raven-js/-/raven-js-3.26.3.tgz", + "integrity": "sha512-VPAsPfK73A9VPcJx5X/kt0GxOqUGpGDM8vdzsYNQXMhYemyZGiW1JX1AI+f4jxm37Apijj6VVtCyJcYFz3ocSQ==" + }, "raw-body": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", diff --git a/ui/package.json b/ui/package.json index 718cbc772..6368df1ea 100644 --- a/ui/package.json +++ b/ui/package.json @@ -19,6 +19,7 @@ "moment": "^2.22.2", "prop-types": "^15.6.2", "qs": "^6.5.2", + "raven-js": "^3.26.3", "react": "^16.4.1", "react-autosuggest": "^9.3.4", "react-dom": "^16.4.1", diff --git a/ui/public/index.html b/ui/public/index.html index 848a1ff36..50684982e 100644 --- a/ui/public/index.html +++ b/ui/public/index.html @@ -16,6 +16,15 @@ + + +