60 Commits

Author SHA1 Message Date
456b356f21 Expressions: updating copy from experimental to beta. (#35149) 2021-06-04 15:18:21 +02:00
7dd5a065ba Alerting: New alert list panel component (#34614) 2021-05-31 14:08:05 +02:00
d6037a49b6 Docs: document creating alert rules (#34839) 2021-05-28 17:20:54 +03:00
83a83de10a Clarify that Threema Gateway Alerts support only Basic IDs (#34828)
Threema Gateway supports two types of IDs: Basic IDs (where the
encryption is managed by the API server) and End-to-End IDs (where the
keys are managed by the user).

This plugin currently does not support End-to-End IDs (since it's much
more complex to implement, because the encryption needs to happen
locally). Add a few clarifications to the UI.

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-05-28 08:54:55 +02:00
e085b2316c Alerting: Set max width on alerting query rows (#34749) 2021-05-27 16:15:43 +02:00
347273cdea Alerting: check upstream response content type in lotex proxy (#34760) 2021-05-27 14:12:29 +03:00
871e476e41 sort alert instance, "datasource" -> "data source" (#34724) 2021-05-27 13:47:26 +03:00
1ded9a37c1 Alerting: rename type to make it obvious what part of the code base it belongs to. (#34714)
* renamed grafana query to grafana alert query.

* renamed according to feedback in PR.
2021-05-27 12:29:10 +02:00
23cf31a567 Alerting: Move Visualization to QueryRow (#34658)
* move visualization to queryeditorrow

* add prop to hide disable query

* move panel plugin state outside the vizwrapper
2021-05-27 10:46:06 +02:00
ad3b0b2272 PageToolbar: add bottom padding (#34602)
* fix(pagetoolbar): pad elements top and bottom to keep vertical align and wrapper padding

* fix(sidemenu): prevent mobile sidemenu squashing dashboard, vertically align mobile sidemenu icon

* fix(dashboardsettings): prevent subheader overlap

* fix(pagetoolbar): center align all toolbar elements vertically

* refactor(pagetoolbar): combine vertical paddings to bring back original padding values

* refactor: update padding values for components that use PageToolbar

* fix(playlists): update Empty cta link route to prevent 404

* test(dashboard): update snapshot
2021-05-26 10:49:39 +02:00
70efaa5582 Alerting: making sure we use the updated queries when querying for data. (#34631) 2021-05-26 10:07:20 +02:00
e19b3df1a9 Alerting: added possibility to preview grafana managed alert rules. (#34600)
* starting to add eval logic.

* wip

* first version of test rule.

* reverted file.

* add info colum to result to show error or (with CC evalmatches)

* fix labels in evalmatch

* fix be test

* refactored using observables.

* moved widht/height div to outside panel rendere.

* adding docs api level.

* adding container styles to error div.

* increasing size of preview.

Co-authored-by: kyle <kyle@grafana.com>
2021-05-26 10:06:28 +02:00
dcef87fd79 Alerting: Move query components to unified folder (#34587) 2021-05-25 11:34:19 +02:00
d666defaea Alerting: misc ui fixes volume 4 (#34503) 2021-05-25 10:26:10 +03:00
54c33c6cdd Alerting: update email template (#34205) 2021-05-19 18:58:31 +02:00
eaf964a827 Alerting: misc rule list fixes (#34400)
* misc rule table fixes

* rule stats for all rules

* inactive -> normal

* always show tooltip for rule error
2021-05-19 18:54:03 +03:00
22f7120204 Alerting: Optimize how much space a table viz takes (#34396)
* optimize table height

* use gridSize
2021-05-19 17:14:12 +02:00
8ddf6de6e7 Alerting: app specific query editors for Loki and Prometheus (#34365)
* Adding simplified version of query editor based on app flag.

* cleaned up the absolute time range.

* changing placeholder text.

* updated snapshot.

* added some tests.

* adding loki query editor tests.

* updating snapshots.
2021-05-19 16:24:27 +02:00
538b1b196b Alerting: fix route, silence matchers (#34372) 2021-05-19 15:30:39 +03:00
26638c23c3 Alerting: Lower the default timerange (#34280)
* use a custom default

* use default function
2021-05-19 09:42:40 +02:00
89558f20bd Alerting: improve error presentation in forms (#34309) 2021-05-19 10:12:44 +03:00
5721019573 Alerting: various rule form fixes (#34272) 2021-05-18 19:14:57 +03:00
11243dec14 [Alerting]: Assign UUID to grafana receivers (#34241)
* [Alerting]: Assign UUID to grafana receivers

* Apply suggestions from code review

* Add test for updating invalid receiver

Co-authored-by: Domas <domasx2@gmail.com>
2021-05-18 17:31:00 +03:00
2aa1a051f0 Alerting: visualizing data when creating/editing alerting rule. (#34191)
* VizWrapper to handle some state

* alertingqueryrunner first edition

* added so we always set name and uid when changing datasource.

* wip.

* wip

* added support for canceling requests.

* util for getting time ranges for expression queries

* remove logs, store data in state

* merge from run branch

* incremental commit

* viz working

* added structure for marble testing.

* paddings and move viz picker

* less height for viz, less width on rows

* change so the expression buttons doesnt submit form.

* fixed run button.

* replaced mocks with implementation that will set default query + expression.

* merge with run queries

* fixed so we set a datasource name for the default expression rule.

* improving expression guard.

* lots of styling fixes for viz

* adding placeholder for relative time range.

* fixed story.

* added basic structure to handle open/close of time range picker.

* removed section from TimeOptions since it isn't used any where.

* adding mapper and tests

* move relativetimepicker to its own dir

* added some simple tests.

* changed test.

* use relativetimerangeinput

* redo state management

* refactored the tests.

* replace timerange with relativetimerange

* wip

* wip

* did some refactoring.

* refactored time option formatting.

* added proper formatting and display of time range.

* add relative time description, slight refactor of height

* fixed incorrect import.

* added validator and changed formatting.

* removed unused dep.

* reverted back to internal function.

* fixed display of relative time range picker.

* fixed failing tests.

* fixed parsing issue.

* fixed position of time range picker.

* some more refactorings.

* fixed validation of really big values.

* added another test.

* restored the step2 check.

* fixed merge issue.

* Update packages/grafana-ui/src/components/Forms/RadioButtonGroup/RadioButtonGroup.tsx

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>

* reverted change.

* fixed merge conflict.

* fixed todo.

* sort some paddings

* replace theme with theme2

Co-authored-by: Peter Holmberg <peter.hlmbrg@gmail.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-05-18 16:16:26 +02:00
098b4fc319 Alerting: wrap top level components in ErrorBoundary (#34040) 2021-05-18 13:56:31 +03:00
815603dc19 fix rule editor remounting issue (#34228) 2021-05-18 09:42:52 +03:00
7a2dff741b Alerting: Global config form for cloud alert manager (#34074) 2021-05-17 10:50:29 +02:00
8a0dbd0127 Alerting: enforce roles on frontend (#33997) 2021-05-17 11:15:17 +03:00
a26507e9c4 Alerting: update panel alert tab (#33850) 2021-05-17 10:39:42 +03:00
889d3ed76f Alerting: Add duration field to silence editor (#34029) 2021-05-17 08:59:27 +03:00
ddb2fc1ae6 Alerting: fix maching loki prom rules to rule rules, rename "Inactive" to "Normal" (#34111) 2021-05-14 12:41:13 +02:00
ccc0f7fc22 DataSource: show the uid in edit url, not the local id (#33818) 2021-05-08 18:13:26 +02:00
0b3d757172 fix links to dashboard settings (#33782) 2021-05-06 15:46:33 +02:00
b5b8877253 Alerting: implement deleting templates & receivers (#33677) 2021-05-06 14:51:44 +03:00
10a4606315 Alerting: edit cloud receivers (#33570) 2021-05-06 12:32:45 +03:00
d2d13ea39a Alerting: miscllaneous UI fixes & improvements (#33734) 2021-05-06 11:21:58 +03:00
d994d0e762 Alerting: Create and edit silences (#33593) 2021-05-06 10:29:02 +03:00
0006765a40 Alerting: Run queries (#33423)
* alertingqueryrunner first edition

* added so we always set name and uid when changing datasource.

* wip.

* wip

* added support for canceling requests.

* util for getting time ranges for expression queries

* remove logs, store data in state

* added structure for marble testing.

* change so the expression buttons doesnt submit form.

* fixed run button.

* replaced mocks with implementation that will set default query + expression.

* fixed so we set a datasource name for the default expression rule.

* improving expression guard.

* Update public/app/features/alerting/components/AlertingQueryEditor.tsx

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>

* fixed some nits.

* some refactoring after feedback.

* use grafanthemev2

* rename grafanatheme

* fixing so we convert to correct relative time range.

* added some more tests.

* fixing so duplicating query works.

* added some more tests without marbles.

* small refactoring to share code between runRequest and alerting query runner.

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-05-04 16:31:25 +02:00
9510c4f112 Alerting: Add alerting routes (#33179)
* Add amroutes

* Update table

* Recompute items when prop changes

* Update styling

* Updates

* Improvements

* Remove unnecessary line

* Updates

* Updates

* Improve code

* Add empty area component

* Move panel from root route to specific routing

* Update from master

* Update theme

* Implement save

* Fixes for PR review

* receiver -> contact point

* Fixes for PR review

* Fixes

* Add basic test

Co-authored-by: Domas <domasx2@gmail.com>
2021-05-04 16:57:11 +03:00
a62bfba63b Alerting: Updates the new alerting rule table to use new theme (#33684) 2021-05-04 13:38:01 +02:00
7ee994f843 Theme: Renames new theme model from GrafanaThemeV2 to just GrafanaTheme (#33619) 2021-05-03 09:45:54 +02:00
f6ecded86b Theme: Page styles move to emotion global styles and design tweaks (#33529)
* Theme: Page styles move to emotion global styles and design tweaks

* More style tweaks

* tweaks

* Updating snapshots

* Another fix

* Another fix

* minor fix

* More style tweaks to page toolbar and alert rule page

* minor polish
2021-04-30 10:04:01 +02:00
3b515e650c Grafana-UI: Update React Hook Form to v7 (#33328)
* Update hook form

* Update Form component

* Update ChangePassword.tsx

* Update custom types

* Update SaveDashboardForm

* Update form story

* Update FieldArray.story.tsx

* Bump hook form version

* Update typescript to v4.2.4

* Update ForgottenPassword.tsx

* Update LoginForm.tsx

* Update SignupPage.tsx

* Update VerifyEmail.tsx

* Update AdminEditOrgPage.tsx

* Update UserCreatePage.tsx

* Update BasicSettings.tsx

* Update NotificationChannelForm.tsx

* Update NotificationChannelOptions.tsx

* Update NotificationSettings.tsx

* Update OptionElement.tsx

* Update AlertRuleForm.tsx

* Update AlertTypeStep.tsx

* Update AnnotationsField.tsx

* Update ConditionField.tsx

* Update ConditionsStep.tsx

* Update GroupAndNamespaceFields.tsx

* Update LabelsField.tsx

* Update QueryStep.tsx

* Update RowOptionsForm.tsx

* Update SaveDashboardAsForm.tsx

* Update NewDashboardsFolder.tsx

* Update ImportDashboardForm.tsx

* Update DashboardImportPage.tsx

* Update NewOrgPage.tsx

* Update OrgProfile.tsx

* Update UserInviteForm.tsx

* Update PlaylistForm.tsx

* Update ChangePasswordForm.tsx

* Update UserProfileEditForm.tsx

* Update TeamSettings.tsx

* Update SignupInvited.tsx

* Expose setValue from the Form

* Update typescript to v4.2.4

* Remove ref from field props

* Fix tests

* Revert TS update

* Use exact version

* Update latest batch of changes

* Reduce the number of strict TS errors

* Fix defaults

* more type error fixes

* Update CreateTeam

* fix folder picker in rule form

* fixes for hook form 7

* Update docs

Co-authored-by: Domas <domasx2@gmail.com>
2021-04-29 16:54:38 +03:00
9de2f1bb8f Alerting: moving data source uid to query instead of model (#33416)
* initial commit.

* Some more improvements to the expression data source support.

* added tests to verify that time range picker and data source picker only is visible when callbacks is passed to row.

* fixing issue with filter in alerting list.

* minor refactoring.

* removed guarding code, should be fixed in  backend.

* cleaning the data query if we change to a different data source.
2021-04-29 15:10:14 +02:00
df4181c43a Alerting: edit receivers (grafana) (#33327) 2021-04-28 12:22:48 +03:00
1913d304a3 Alerting: Add silences table (#33138)
* Create table for silences

* Style table to figma designs

* Add rules table to silences

* Rebase with new rules table

* Remove redundant reducer

* fetch alertmanager alerts (#33142)

* fetch alertmanager alerts

* show the alerts json

* Use matching alerts from alertmanager api

* Add handle to expire silence

* Get silenced alerts closer to figma designs

* fix expire silence endpoint typo

* Style affected alerts table

* Add default empty string for alertmanager source

Co-authored-by: Domas <domasx2@gmail.com>
2021-04-27 13:46:34 -07:00
e8faec5c19 Alerting: create/edit notification templates (#33225) 2021-04-27 16:28:53 +03:00
cf2d557974 Alerts/InfoBox: Replaces all uses of InfoBox & FeatureInfoBox with Alert (#33352)
* Alerts/InfoBox: Replaces all uses of InfoBox & FeatureInfoBox with Alert

* Fixes some more stuff

* fixed border radius
2021-04-26 07:18:46 +02:00
67f6611d85 Alerting: receivers table in the receivers page (#33119) 2021-04-23 15:54:31 +03:00
cf64adf156 Alerting: hide private labels, collapse query json by default (#33284) 2021-04-23 09:22:41 +03:00