From 4d2a543e4a95113657b5c99585d7d89a8eec4593 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Wed, 13 May 2020 08:56:59 +0100 Subject: [PATCH] fix(ui): collapse annotations when clicking on the name Fixes #1721 --- .../Alert/__snapshots__/index.test.js.snap | 64 ++++++++++--------- .../__snapshots__/index.test.js.snap | 32 +++++----- .../AlertGrid/AlertGroup/Annotation/index.js | 10 ++- .../__snapshots__/index.test.js.snap | 64 ++++++++++--------- 4 files changed, 89 insertions(+), 81 deletions(-) diff --git a/ui/src/Components/Grid/AlertGrid/AlertGroup/Alert/__snapshots__/index.test.js.snap b/ui/src/Components/Grid/AlertGrid/AlertGroup/Alert/__snapshots__/index.test.js.snap index d01292a75..ce53a0cce 100644 --- a/ui/src/Components/Grid/AlertGrid/AlertGroup/Alert/__snapshots__/index.test.js.snap +++ b/ui/src/Components/Grid/AlertGrid/AlertGroup/Alert/__snapshots__/index.test.js.snap @@ -11,22 +11,24 @@ exports[` matches snapshot when inhibited 1`] = ` data-original-title=\\"Click the icon to hide annotation value\\" >
- - + - - - - help: + + + + + help: + @@ -171,22 +173,24 @@ exports[` matches snapshot with showAlertmanagers=false showReceiver=fa data-original-title=\\"Click the icon to hide annotation value\\" >
- - + - - - - help: + + + + + help: + diff --git a/ui/src/Components/Grid/AlertGrid/AlertGroup/Annotation/__snapshots__/index.test.js.snap b/ui/src/Components/Grid/AlertGrid/AlertGroup/Annotation/__snapshots__/index.test.js.snap index 07d01b4aa..81dad7c93 100644 --- a/ui/src/Components/Grid/AlertGrid/AlertGroup/Annotation/__snapshots__/index.test.js.snap +++ b/ui/src/Components/Grid/AlertGrid/AlertGroup/Annotation/__snapshots__/index.test.js.snap @@ -60,22 +60,24 @@ exports[` matches snapshot when visible=true 1`] = ` style=\\"display:inline-block;max-width:100%\\" >
- - + - - - - foo: + + + + + foo: + diff --git a/ui/src/Components/Grid/AlertGrid/AlertGroup/Annotation/index.js b/ui/src/Components/Grid/AlertGrid/AlertGroup/Annotation/index.js index bb9ab86b3..7802b786a 100644 --- a/ui/src/Components/Grid/AlertGrid/AlertGroup/Annotation/index.js +++ b/ui/src/Components/Grid/AlertGrid/AlertGroup/Annotation/index.js @@ -54,12 +54,10 @@ const RenderNonLinkAnnotation = observer( return (
- - {name}: + + + {name}: + matches snapshot 1`] = ` data-original-title=\\"Click the icon to hide annotation value\\" >
- - + - - - - summary: + + + + + summary: + @@ -156,22 +158,24 @@ exports[` mathes snapshot when silence is rendered 1`] = ` data-original-title=\\"Click the icon to hide annotation value\\" >
- - + - - - - summary: + + + + + summary: +