-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Support any channel types from Notification (#743) * Support any channel types from Notification * Remove unused CHANNEL_TYPES constant * Return empty array if failed to get features --------- * Drafted 2.11 release notes. (#764) * Drafted 2.11 release notes. * Drafted 2.11 release notes. --------- * Removed "last updated by" sections from the UI. (#767) * Removed "last updated by" section from the UI as the SearchMonitor API can no longer return that info. * Updated cypress workflow. --------- * Onboard Jenkins prod docker image to github actions (#789) * Onboard Jenkins prod docker image to github actions * Small typos * Add back workflows * Restore macos/windows --------- * Bumped babel version. (#821) * Bumped babel version. Adjusted babel config. Refactored unit test that started failing after bump. * Updated yarn file. --------- * Fix fetching of channels for composite monitors (#820) * fixed incorrect use of this.props * resolved dependency conflict * updated babel config --------- * Added 2.11.1 release notes. (#828) * Amended 2.11.0 release notes. * Added 2.11.1 release notes. * Added 2.11.1 release notes. * Added 2.11.1 release notes. * Added 2.11.1 release notes. --------- * Fixed bucket monitor groupBy/aggregation display bug. (#827) * Fixed a bug that was causing groupBy/aggregation fields from displaying in various areas of the UI. Related issues: 816, 817, 818. * Fixed trigger context object bug in issue 791. * Capitalized bucket column titles, and moved bucket columns to the end of the column array. * Added wait steps to reduce test flakiness. * Added wait step to reduce test flakiness. Adjusted test monitor trigger condition to always triggers on a healthy clusters. * Removed unused imports. * fixed bucket level monitor flaky cypress test --------- * Issue #671 fix trigger name validation (#794) * Remove integtest.sh since it is not being used (#849) * do not create Message component on every text change (#854) * Implemented server API call to feature backend API. * Implemented remote cluster support for creating/editing query, bucket, and cluster metrics monitors. * Implemented warning model when monitor execution time exceeds a certain value. * Updated alert details flyout to show remote cluster info. Updated monitor details page to show data sources. * Updated unit tests. * Added experimental banner. * Updated snapshots. * Edited text on the experimental banner. * Moved getSettings call to hide Data source panel for cluster metrics monitors when remote monitoring is disabled. * Updated snapshots. * Increased cypress test timeout. --------- (cherry picked from commit fb82368) Signed-off-by: Ashish Agrawal <[email protected]> Signed-off-by: AWSHurneyt <[email protected]> Signed-off-by: Peter Zhu <[email protected]> Signed-off-by: Amardeepsingh Siglani <[email protected]> Signed-off-by: Chenxi Wang <[email protected]> Signed-off-by: Derek Ho <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Ashish Agrawal <[email protected]> Co-authored-by: Peter Zhu <[email protected]> Co-authored-by: Amardeepsingh Siglani <[email protected]> Co-authored-by: Chenxi Wang <[email protected]> Co-authored-by: Derek Ho <[email protected]>
- Loading branch information
1 parent
607b2d7
commit a66a331
Showing
45 changed files
with
1,313 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import React from 'react'; | ||
import { EuiBasicTable, EuiFlexGroup, EuiButtonIcon, EuiTitle, EuiFlexItem } from '@elastic/eui'; | ||
import { MONITOR_TYPE } from '../../../utils/constants'; | ||
|
||
export const DATA_SOURCES_FLYOUT_TYPE = 'dataSources'; | ||
|
||
const dataSources = ({ | ||
closeFlyout = () => {}, | ||
dataSources = [], | ||
localClusterName = '', | ||
monitorType = MONITOR_TYPE.QUERY_LEVEL, | ||
}) => { | ||
const columns = [ | ||
{ | ||
field: 'cluster', | ||
name: 'Data connection', | ||
sortable: true, | ||
truncateText: true, | ||
}, | ||
]; | ||
switch (monitorType) { | ||
case MONITOR_TYPE.CLUSTER_METRICS: | ||
// Cluster metrics monitors do not use indexes as data sources; excluding that column. | ||
break; | ||
default: | ||
columns.push({ | ||
field: 'index', | ||
name: 'Index', | ||
sortable: true, | ||
truncateText: true, | ||
}); | ||
} | ||
|
||
const indexItems = dataSources.map((dataSource = '', int) => { | ||
const item = { id: int }; | ||
switch (monitorType) { | ||
case MONITOR_TYPE.CLUSTER_METRICS: | ||
item.cluster = | ||
dataSource === localClusterName ? `${dataSource} (Local)` : `${dataSource} (Remote)`; | ||
break; | ||
default: | ||
const shouldSplit = dataSource.includes(':'); | ||
const splitIndex = dataSource.split(':'); | ||
let clusterName = shouldSplit ? splitIndex[0] : localClusterName; | ||
clusterName = | ||
clusterName === localClusterName ? `${clusterName} (Local)` : `${clusterName} (Remote)`; | ||
const indexName = shouldSplit ? splitIndex[1] : dataSource; | ||
item.cluster = clusterName; | ||
item.index = indexName; | ||
} | ||
return item; | ||
}); | ||
|
||
return { | ||
flyoutProps: { | ||
'aria-labelledby': 'dataSourcesFlyout', | ||
size: 'm', | ||
hideCloseButton: true, | ||
'data-test-subj': `dataSourcesFlyout`, | ||
}, | ||
headerProps: { hasBorder: true }, | ||
header: ( | ||
<EuiFlexGroup justifyContent="flexStart" alignItems="center"> | ||
<EuiFlexItem className={'eui-textTruncate'}> | ||
<EuiTitle | ||
className={'eui-textTruncate'} | ||
size={'m'} | ||
data-test-subj={'dataSourcesFlyout_header'} | ||
> | ||
<h3>{`Data sources`}</h3> | ||
</EuiTitle> | ||
</EuiFlexItem> | ||
<EuiFlexItem grow={false}> | ||
<EuiButtonIcon | ||
data-test-subj={'dataSourcesFlyout_closeButton'} | ||
iconType={'cross'} | ||
display={'empty'} | ||
iconSize={'m'} | ||
onClick={closeFlyout} | ||
/> | ||
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
), | ||
footerProps: { style: { backgroundColor: '#F5F7FA' } }, | ||
body: ( | ||
<EuiBasicTable | ||
items={indexItems} | ||
itemId={(item) => item.id} | ||
columns={columns} | ||
pagination={true} | ||
isSelectable={false} | ||
hasActions={false} | ||
noItemsMessage={'No data sources configured for this monitor.'} | ||
data-test-subj={'dataSourcesFlyout_table'} | ||
/> | ||
), | ||
}; | ||
}; | ||
|
||
export default dataSources; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.