diff --git a/ui/src/Common/Popper.ts b/ui/src/Common/Popper.ts new file mode 100644 index 000000000..0aa541d35 --- /dev/null +++ b/ui/src/Common/Popper.ts @@ -0,0 +1,9 @@ +export const CommonPopperModifiers = [ + { name: "arrow", enabled: false }, + { + name: "computeStyles", + options: { + gpuAcceleration: false, + }, + }, +]; diff --git a/ui/src/Components/Grid/AlertGrid/AlertGroup/Alert/AlertMenu.js b/ui/src/Components/Grid/AlertGrid/AlertGroup/Alert/AlertMenu.js index 72c052a98..58b435f8a 100644 --- a/ui/src/Components/Grid/AlertGrid/AlertGroup/Alert/AlertMenu.js +++ b/ui/src/Components/Grid/AlertGrid/AlertGroup/Alert/AlertMenu.js @@ -17,11 +17,17 @@ import { SilenceTabNames, AlertmanagerClustersToOption, } from "Stores/SilenceFormStore"; +import { CommonPopperModifiers } from "Common/Popper"; import { FetchPauser } from "Components/FetchPauser"; import { DropdownSlide } from "Components/Animations/DropdownSlide"; import { DateFromNow } from "Components/DateFromNow"; import { useOnClickOutside } from "Hooks/useOnClickOutside"; +const PopperModifiers = [ + ...CommonPopperModifiers, + { name: "offset", options: { offset: "-5px, 0px" } }, +]; + const onSilenceClick = (alertStore, silenceFormStore, group, alert) => { let clusters = {}; Object.entries(alertStore.data.clustersWithoutReadOnly).forEach( @@ -148,13 +154,7 @@ const AlertMenu = ({ )} - + {({ placement, ref, style }) => ( matches snapshot when inhibited 1`] = ` "
  • -
    +
    matches snapshot when inhibited 1`] = `
    -
    +
    matches snapshot when inhibited 1`] = ` 1 day ago -
    +
    matches snapshot when inhibited 1`] = `
    -
    +
    job: @@ -110,9 +102,7 @@ exports[` matches snapshot when inhibited 1`] = `
    -
    +
    cluster: @@ -151,9 +141,7 @@ exports[` matches snapshot with showAlertmanagers=false showReceiver=fa "
  • -
    +
    matches snapshot with showAlertmanagers=false showReceiver=fa
    -
    +
    matches snapshot with showAlertmanagers=false showReceiver=fa 1 day ago -
    +
    job: @@ -237,9 +221,7 @@ exports[` matches snapshot with showAlertmanagers=false showReceiver=fa
    -
    +
    cluster: 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 82f23198e..ad323767d 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 @@ -28,9 +28,7 @@ exports[` matches snapshot 1`] = ` exports[` matches snapshot when visible=false 1`] = ` " -
    +
    matches snapshot when visible=false 1`] = ` exports[` matches snapshot when visible=true 1`] = ` " -
    +
    matches snapshot 1`] = ` "