Skip to content

Commit

Permalink
Sync anywhere-dev with main (#479)
Browse files Browse the repository at this point in the history
* Bumped version from 2.3 to 2.4. (#346)

* Bumping version from 2.3 to 2.4.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Adjusted OSD version used by unit test workflow to last version that allowed the tests to pass.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Bumped d3-color version. (#350)

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Support windows CI (#354)

* Support windows CI

Signed-off-by: Ashish Agrawal <ashisagr@amazon.com>

Signed-off-by: Ashish Agrawal <ashisagr@amazon.com>

* Add 2.4 release notes (#357)

Signed-off-by: Ashish Agrawal <ashisagr@amazon.com>

Signed-off-by: Ashish Agrawal <ashisagr@amazon.com>

* Fix confidence bug (#360)

This PR fixed a bug when showing confidence in trigger definition. Confidence is usually a non-decreasing function on an interval. But we incorrectly only show confidence when the corresponding anomaly grade is larger than 0.

Testing done:
1. manually tested that the bug is fixed. See attached snapshots.
2. yarn test:jest

Signed-off-by: Kaituo Li <kaituo@amazon.com>

* Bumped loader-utils version to address dependabot alert. (#361)

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* updated link to dashboards developer guide (#349)

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* Fixed a bug that prevented the throttling settings from displaying for PER_ALERT bucket level trigger actions. (#328)

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Adjust OpenSearch-Dashboards version used by test workflows. (#363)

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* avoid nesting search inside search (#382)

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* Bumped loader-utils version to address dependabot alert. (#379)

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* [BUG] Issues in the UI above 200 destinations paging issue #195 (#375)

* [BUG] Issues in the UI above 200 destinations #195

Signed-off-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com>

* [BUG] Issues in the UI above 200 destinations #195

Signed-off-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com>

* [BUG] Issues in the UI above 200 destinations #195

Signed-off-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com>

Signed-off-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com>

* sorted data by date (#385)

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* Align all flyout components to be overlay kind and add close button X in header (#373)

* align all flyout components to overlay

Signed-off-by: Aleksandar Djindjic <djindjic@gmail.com>

* simplify if statement

Signed-off-by: Aleksandar Djindjic <djindjic@gmail.com>

* fix snapshot

Signed-off-by: Aleksandar Djindjic <djindjic@gmail.com>

* add close button to flyout header, remove footer

Signed-off-by: Aleksandar Djindjic <djindjic@gmail.com>

* simplify flex layout

Signed-off-by: Aleksandar Djindjic <djindjic@gmail.com>

* update snapshot

Signed-off-by: Aleksandar Djindjic <djindjic@gmail.com>

* add data-test-subject on flyout header title

Signed-off-by: Aleksandar Djindjic <djindjic@gmail.com>

* fix cypress tests, overflow on flyout title

Signed-off-by: Aleksandar Djindjic <djindjic@gmail.com>

* fix snapshot

Signed-off-by: Aleksandar Djindjic <djindjic@gmail.com>

* eui-textTruncate on flyout titles

Signed-off-by: Aleksandar Djindjic <djindjic@gmail.com>

Signed-off-by: Aleksandar Djindjic <djindjic@gmail.com>

* Bumped decode-uri-component version to address CVE-2022-38900. (#400)

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Fixed an issue that was causing the results of the ctx object to be empty.  (#334)

* Fixed an issue that was causing the results of the ctx object to be empty.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Fixed an issue that was causing the results of the ctx object to be empty.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Consolidated duplicate code.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Keep monitor table cell width flexible; Check for whether monitor is enabled when displaying related action (#402)

* made table cells flexible; added monitor enabled check for actions

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* updated snapshot

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* minor updates

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* updated jest snapshots

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* Add release notes for 2.4.1 (#420)

Signed-off-by: Saurabh Singh <sisurab@amazon.com>

Signed-off-by: Saurabh Singh <sisurab@amazon.com>

* Bumped version to 2.5. (#437)

* Bumped version to 2.5.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Adjusted test workflows to not use 2.5 tag for OSD as it hasn't been created yet.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* 2.5.0 release notes. (#440)

* Drafted 2.5 release notes.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Drafted 2.5 release notes.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Refactored the help text elements displayed when users access the destinations list page after destinations deprecation. (#413) (#438) (#443)

* Refactored the help text elements displayed when users access the destinations list page after destinations deprecation.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Refactored the help text elements displayed when users access the destinations list page after destinations deprecation.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Updated snapshot.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Updated button text.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Updated snapshot files.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Refactored landing page logic.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
(cherry picked from commit 58dee83)

Co-authored-by: AWSHurneyt <hurneyt@amazon.com>

Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com>

* Fix CVE-2022-46175 (#453)

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

* Updated MAINTAINERS.md to match recommended opensearch-project format. (#435)

Signed-off-by: dblock <dblock@amazon.com>

Signed-off-by: dblock <dblock@amazon.com>

* Refactored cypress and unit test workflows to use the 2.5.0 tag as the OSD repo reference. (#462)

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

---------

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
Signed-off-by: Ashish Agrawal <ashisagr@amazon.com>
Signed-off-by: Kaituo Li <kaituo@amazon.com>
Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>
Signed-off-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com>
Signed-off-by: Aleksandar Djindjic <djindjic@gmail.com>
Signed-off-by: Saurabh Singh <sisurab@amazon.com>
Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>
Signed-off-by: dblock <dblock@amazon.com>
Co-authored-by: AWSHurneyt <hurneyt@amazon.com>
Co-authored-by: Kaituo Li <kaituo@amazon.com>
Co-authored-by: Amardeepsingh Siglani <amardeep7194@gmail.com>
Co-authored-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com>
Co-authored-by: Aleksandar Djindjic <djindjic@gmail.com>
Co-authored-by: Saurabh Singh <sisurab@amazon.com>
Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com>
Co-authored-by: bowenlan-amzn <bowenlan23@gmail.com>
Co-authored-by: Daniel (dB.) Doubrovkine <dblock@amazon.com>
  • Loading branch information
10 people committed Feb 13, 2023
1 parent 6305d7f commit bf1616f
Show file tree
Hide file tree
Showing 47 changed files with 1,547 additions and 4,477 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/cypress-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ on:
branches:
- "*"
env:
OPENSEARCH_DASHBOARDS_VERSION: '2.3'
OPENSEARCH_VERSION: '2.3.0-SNAPSHOT'
OPENSEARCH_DASHBOARDS_VERSION: '2.5.0'
OPENSEARCH_VERSION: '2.5.0-SNAPSHOT'
ALERTING_PLUGIN_BRANCH: '2.5'
jobs:
tests:
name: Run Cypress E2E tests
Expand All @@ -29,7 +30,7 @@ jobs:
with:
path: alerting
repository: opensearch-project/alerting
ref: 'main'
ref: ${{ env.ALERTING_PLUGIN_BRANCH }}
- name: Run Opensearch with plugin
run: |
cd alerting
Expand Down
20 changes: 17 additions & 3 deletions .github/workflows/unit-tests-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,19 @@ on:
branches:
- "*"
env:
OPENSEARCH_DASHBOARDS_VERSION: '2.2'
OPENSEARCH_DASHBOARDS_VERSION: '2.5.0'
jobs:
tests:
name: Run unit tests
runs-on: ubuntu-latest
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
# Enable longer filenames for windows
- name: Enable longer filenames
if: ${{ matrix.os == 'windows-latest' }}
run: git config --system core.longpaths true
- name: Checkout OpenSearch Dashboards
uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -42,9 +49,16 @@ jobs:
run: |
cd OpenSearch-Dashboards/plugins/alerting-dashboards-plugin
yarn osd bootstrap
- name: Run tests
- name: Run window tests
if: ${{ matrix.os == 'windows-latest' }}
run: |
cd OpenSearch-Dashboards/plugins/alerting-dashboards-plugin
yarn run test:jest:windows --coverage
- name: Run non-window tests
if: ${{ matrix.os != 'windows-latest' }}
run: |
cd OpenSearch-Dashboards/plugins/alerting-dashboards-plugin
yarn run test:jest --coverage
- name: Uploads coverage
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: codecov/codecov-action@v1
2 changes: 1 addition & 1 deletion DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ You will need to install [node.js](https://nodejs.org/en/), [nvm](https://github
1. Download and install the appropriate [OpenSearch Alerting plugin](https://github.com/opensearch-project/alerting).
1. Download the OpenSearch-Dashboards source code for the [version specified in package.json](./package.json#L9) you want to set up.

See the [OpenSearch Dashboards developer guide](https://github.com/opensearch-project/OpenSearch/blob/main/DEVELOPER_GUIDE.md) for more instructions on setting up your development environment.
See the [OpenSearch Dashboards developer guide](https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/DEVELOPER_GUIDE.md) for more instructions on setting up your development environment.

1. Change your node version to the version specified in `.node-version` inside the OpenSearch-Dashboards root directory.
1. cd into the `plugins` directory of the OpenSearch-Dashboards source code directory.
Expand Down
25 changes: 13 additions & 12 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# OpenSearch Maintainers
## Overview

## Maintainers
| Maintainer | GitHub ID | Affiliation |
| --------------- | --------- | ----------- |
| Ashish Agrawal | [lezzago](https://github.com/lezzago) | Amazon |
| Mohammad Qureshi | [qreshi](https://github.com/qreshi) | Amazon |
| Sriram | [skkosuri-amzn](https://github.com/skkosuri-amzn) | Amazon |
| Bowen Lan | [bowenlan-amzn](https://github.com/bowenlan-amzn) | Amazon |
| Rishabh Maurya | [rishabhmaurya](https://github.com/rishabhmaurya) | Amazon |
| Tianli Feng | [tlfeng](https://github.com/tlfeng) | Amazon |
| Annie Lee | [leeyun-amzn](https://github.com/leeyun-amzn) | Amazon |
This document contains a list of maintainers in this repo. See [opensearch-project/.github/RESPONSIBILITIES.md](https://github.com/opensearch-project/.github/blob/main/RESPONSIBILITIES.md#maintainer-responsibilities) that explains what the role of maintainer means, what maintainers do in this and other repos, and how they should be doing it. If you're interested in contributing, and becoming a maintainer, see [CONTRIBUTING](CONTRIBUTING.md).

[This document](https://github.com/opensearch-project/.github/blob/main/MAINTAINERS.md) explains what maintainers do in this repo, and how they should be doing it. If you're interested in contributing, see [CONTRIBUTING](CONTRIBUTING.md).
## Current Maintainers

| Maintainer | GitHub ID | Affiliation |
| ---------------- | ------------------------------------------------- | ----------- |
| Ashish Agrawal | [lezzago](https://github.com/lezzago) | Amazon |
| Mohammad Qureshi | [qreshi](https://github.com/qreshi) | Amazon |
| Sriram | [skkosuri-amzn](https://github.com/skkosuri-amzn) | Amazon |
| Bowen Lan | [bowenlan-amzn](https://github.com/bowenlan-amzn) | Amazon |
| Rishabh Maurya | [rishabhmaurya](https://github.com/rishabhmaurya) | Amazon |
| Tianli Feng | [tlfeng](https://github.com/tlfeng) | Amazon |
| Annie Lee | [leeyun-amzn](https://github.com/leeyun-amzn) | Amazon |
1 change: 1 addition & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ module.exports = {
plugins: [
require('@babel/plugin-proposal-class-properties'),
require('@babel/plugin-proposal-object-rest-spread'),
require('@babel/plugin-transform-modules-commonjs'),
],
};
10 changes: 5 additions & 5 deletions cypress/integration/query_level_monitor_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ describe('Query-Level Monitors', () => {
cy.contains(SAMPLE_MONITOR, { timeout: 20000 });

// Select the existing monitor
cy.get('a').contains(SAMPLE_MONITOR, { timeout: 20000 }).click();
cy.get(`[data-test-subj="${SAMPLE_MONITOR}"]`).click();

// Click Edit button
cy.contains('Edit', { timeout: 20000 }).click({ force: true });
Expand Down Expand Up @@ -195,7 +195,7 @@ describe('Query-Level Monitors', () => {
cy.contains(SAMPLE_MONITOR, { timeout: 20000 });

// Select the existing monitor
cy.get('a').contains(SAMPLE_MONITOR, { timeout: 20000 }).click({ force: true });
cy.get(`[data-test-subj="${SAMPLE_MONITOR}"]`).click({ force: true });

// Click Edit button
cy.contains('Edit', { timeout: 20000 }).click({ force: true });
Expand Down Expand Up @@ -304,7 +304,7 @@ describe('Query-Level Monitors', () => {
cy.contains(SAMPLE_MONITOR);

// Select the existing monitor
cy.get('a').contains(SAMPLE_MONITOR).click();
cy.get(`[data-test-subj="${SAMPLE_MONITOR}"]`).click();

// Click Edit button
cy.contains('Edit').click({ force: true });
Expand Down Expand Up @@ -373,7 +373,7 @@ describe('Query-Level Monitors', () => {
cy.contains(SAMPLE_DAYS_INTERVAL_MONITOR, { timeout: 20000 });

// Select the existing monitor
cy.get('a').contains(SAMPLE_DAYS_INTERVAL_MONITOR).click({ force: true });
cy.get(`[data-test-subj="${SAMPLE_DAYS_INTERVAL_MONITOR}"]`).click({ force: true });

// Click Edit button
cy.contains('Edit').click({ force: true });
Expand All @@ -398,7 +398,7 @@ describe('Query-Level Monitors', () => {
cy.contains(SAMPLE_CRON_EXPRESSION_MONITOR, { timeout: 20000 });

// Select the existing monitor
cy.get('a').contains(SAMPLE_CRON_EXPRESSION_MONITOR).click({ force: true });
cy.get(`[data-test-subj="${SAMPLE_CRON_EXPRESSION_MONITOR}"]`).click({ force: true });

// Click Edit button
cy.contains('Edit').click({ force: true });
Expand Down
4 changes: 2 additions & 2 deletions opensearch_dashboards.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "alertingDashboards",
"version": "2.3.0.0",
"opensearchDashboardsVersion": "2.3.0",
"version": "2.5.0.0",
"opensearchDashboardsVersion": "2.5.0",
"configPath": ["opensearch_alerting"],
"requiredPlugins": [],
"server": true,
Expand Down
11 changes: 8 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "opensearch-alerting-dashboards",
"version": "2.3.0.0",
"version": "2.5.0.0",
"description": "OpenSearch Dashboards Alerting Plugin",
"main": "index.js",
"license": "Apache-2.0",
Expand All @@ -16,6 +16,7 @@
"osd": "node ../../scripts/osd",
"opensearch": "node ../../scripts/opensearch",
"lint": "../../node_modules/.bin/eslint '**/*.js' -c .eslintrc --ignore-path .gitignore",
"test:jest:windows": "SET TZ=UTC ../../node_modules/.bin/jest --config ./test/jest.config.js",
"test:jest": "TZ=UTC ../../node_modules/.bin/jest --config ./test/jest.config.js",
"build": "yarn plugin-helpers build",
"plugin-helpers": "node ../../scripts/plugin_helpers",
Expand All @@ -31,7 +32,8 @@
"@elastic/eslint-import-resolver-kibana": "link:../../packages/osd-eslint-import-resolver-opensearch-dashboards",
"cypress": "^6.0.0",
"husky": "^3.0.0",
"lint-staged": "^10.0.0"
"lint-staged": "^10.0.0",
"@babel/plugin-transform-modules-commonjs": "^7.16.5"
},
"dependencies": {
"brace": "0.11.1",
Expand All @@ -43,12 +45,15 @@
"resolutions": {
"ansi-regex": "^5.0.1",
"async": "^3.2.3",
"decode-uri-component": "^0.2.1",
"fstream": "1.0.12",
"glob-parent": "^5.1.2",
"json-schema": "^0.4.0",
"loader-utils": "1.4.2",
"minimist": "^1.2.6",
"moment": "^2.29.4",
"terser": "^4.8.1"
"terser": "^4.8.1",
"**/d3-color": "^3.1.0"
},
"engines": {
"yarn": "^1.21.1"
Expand Down
47 changes: 27 additions & 20 deletions public/components/Flyout/flyouts/__snapshots__/flyouts.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,40 @@ Object {
"data-test-subj": "alertsDashboardFlyout_undefined",
"hideCloseButton": true,
"size": "m",
"type": "push",
},
"footer": <EuiButtonEmpty
data-test-subj="alertsDashboardFlyout_closeButton_undefined"
iconType="cross"
onClick={[Function]}
style={
Object {
"marginLeft": "0px",
"paddingLeft": "0px",
}
}
>
Close
</EuiButtonEmpty>,
"footerProps": Object {
"style": Object {
"backgroundColor": "#F5F7FA",
},
},
"header": <EuiText
data-test-subj="alertsDashboardFlyout_header_undefined"
"header": <EuiFlexGroup
alignItems="center"
justifyContent="flexStart"
>
<h2>
Alerts by undefined
</h2>
</EuiText>,
<EuiFlexItem
className="eui-textTruncate"
>
<EuiTitle
className="eui-textTruncate"
data-test-subj="alertsDashboardFlyout_header_undefined"
size="m"
>
<h3>
Alerts by undefined
</h3>
</EuiTitle>
</EuiFlexItem>
<EuiFlexItem
grow={false}
>
<EuiButtonIcon
data-test-subj="alertsDashboardFlyout_closeButton_undefined"
display="empty"
iconSize="m"
iconType="cross"
/>
</EuiFlexItem>
</EuiFlexGroup>,
"headerProps": Object {
"hasBorder": true,
},
Expand Down
36 changes: 21 additions & 15 deletions public/components/Flyout/flyouts/alertsDashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import React from 'react';
import { EuiButtonEmpty, EuiText } from '@elastic/eui';
import { EuiFlexGroup, EuiButtonIcon, EuiTitle, EuiFlexItem } from '@elastic/eui';
import AlertsDashboardFlyoutComponent from './components/AlertsDashboardFlyoutComponent';

const alertsDashboard = (payload) => {
Expand All @@ -15,25 +15,31 @@ const alertsDashboard = (payload) => {
size: 'm',
hideCloseButton: true,
'data-test-subj': `alertsDashboardFlyout_${trigger_name}`,
type: 'push',
},
headerProps: { hasBorder: true },
header: (
<EuiText data-test-subj={`alertsDashboardFlyout_header_${trigger_name}`}>
<h2>{`Alerts by ${trigger_name}`}</h2>
</EuiText>
<EuiFlexGroup justifyContent="flexStart" alignItems="center">
<EuiFlexItem className="eui-textTruncate">
<EuiTitle
className="eui-textTruncate"
size={'m'}
data-test-subj={`alertsDashboardFlyout_header_${trigger_name}`}
>
<h3>{`Alerts by ${trigger_name}`}</h3>
</EuiTitle>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiButtonIcon
data-test-subj={`alertsDashboardFlyout_closeButton_${trigger_name}`}
iconType="cross"
display="empty"
iconSize="m"
onClick={closeFlyout}
/>
</EuiFlexItem>
</EuiFlexGroup>
),
footerProps: { style: { backgroundColor: '#F5F7FA' } },
footer: (
<EuiButtonEmpty
iconType={'cross'}
onClick={() => closeFlyout()}
style={{ paddingLeft: '0px', marginLeft: '0px' }}
data-test-subj={`alertsDashboardFlyout_closeButton_${trigger_name}`}
>
Close
</EuiButtonEmpty>
),
body: <AlertsDashboardFlyoutComponent {...payload} />,
};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ export default class AlertsDashboardFlyoutComponent extends Component {
columns.splice(
0,
0,
getAlertsFindingColumn(httpClient, history, true, location, notifications)
getAlertsFindingColumn(httpClient, history, location, notifications)
);
break;
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ export function getDataFromResponse(response, fieldName, monitorType) {
const buckets = _.get(response, 'aggregations.composite_agg.buckets', []);
return buckets
.map((bucket) => getXYValuesByFieldName(bucket, fieldName))
.filter(filterInvalidYValues);
.filter(filterInvalidYValues)
.sort((a, b) => a.x - b.x);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ export default class CreateMonitor extends Component {
plugins={plugins}
isAd={values.searchType === SEARCH_TYPE.AD}
detectorId={this.props.detectorId}
setFlyout={this.props.setFlyout}
/>
<EuiSpacer />

Expand Down
3 changes: 1 addition & 2 deletions public/pages/CreateTrigger/components/Action/Action.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const Action = ({
// Just a swap correct fields.
arrayHelpers.replace(index, {
...action,
destination_id: options[0].value,
destination_id: options[0]?.value,
});
},
onBlur: (e, field, form) => {
Expand All @@ -96,7 +96,6 @@ const Action = ({
</React.Fragment>
),
rowHeight: 45,
async: true,
isLoading: loadingDestinations,
}}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ export default function Message(
switch (monitorType) {
case MONITOR_TYPE.BUCKET_LEVEL:
displayActionableAlertsOptions = true;
displayThrottlingSettings = actionExecutionScopeId === NOTIFY_OPTIONS_VALUES.PER_ALERT;
actionableAlertsSelections = _.get(values, actionableAlertsSelectionsPath);
break;
case MONITOR_TYPE.DOC_LEVEL:
Expand All @@ -194,6 +195,8 @@ export default function Message(
_.set(values, actionableAlertsSelectionsPath, actionableAlertsSelections);
}

if (!displayThrottlingSettings) _.set(values, `${actionPath}.throttle_enabled`, false);

let preview = '';
try {
preview = Mustache.render(action.message_template.source, context);
Expand Down
Loading

0 comments on commit bf1616f

Please sign in to comment.