Skip to content

Commit

Permalink
Adding MDS support in Notifications page in ISM (#1121)
Browse files Browse the repository at this point in the history
Signed-off-by: Ramakrishna Chilaka <ramachil@amazon.com>
(cherry picked from commit 018b831)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] authored and SuZhou-Joe committed Aug 19, 2024
1 parent 1610144 commit a98af09
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
2 changes: 2 additions & 0 deletions public/pages/Main/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ const dataSourceEnabledPaths: string[] = [
ROUTES.REPOSITORIES,
ROUTES.CREATE_REPOSITORY,
ROUTES.EDIT_REPOSITORY,
ROUTES.NOTIFICATIONS,
];

const LocalCluster: DataSourceOption = {
Expand Down Expand Up @@ -521,6 +522,7 @@ export default class Main extends Component<MainProps, MainState> {
ROUTES.REPOSITORIES,
ROUTES.CREATE_REPOSITORY,
ROUTES.EDIT_REPOSITORY,
ROUTES.NOTIFICATIONS,
]}
render={() => (
<DataSourceMenu
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,7 @@

import React, { ReactChild, useContext, useEffect, useRef, useState } from "react";
import { unstable_batchedUpdates } from "react-dom";
import {
EuiButton,
EuiCallOut,
EuiCard,
EuiEmptyPrompt,
EuiFlexGroup,
EuiFlexItem,
EuiPanel,
EuiSpacer,
EuiText,
EuiTitle,
} from "@elastic/eui";
import { EuiButton, EuiCallOut, EuiEmptyPrompt, EuiFlexGroup, EuiFlexItem, EuiPanel, EuiSpacer, EuiText, EuiTitle } from "@elastic/eui";
import { get } from "lodash";
import { CoreStart } from "opensearch-dashboards/public";
import useField from "../../../../lib/field";
Expand All @@ -43,6 +32,7 @@ import {
} from "../../constant";
import { checkPermissionForSubmitLRONConfig } from "../../../../containers/NotificationConfig";
import "./index.scss";
import { DataSourceMenuContext } from "../../../../services/DataSourceMenuContext";

export interface NotificationsProps {}

Expand Down Expand Up @@ -320,5 +310,7 @@ const Notifications = (props: NotificationsProps) => {
);
};

// @ts-ignore
export default Notifications;
export default function (props: NotificationsProps) {
const dataSourceMenuProps = useContext(DataSourceMenuContext);
return <Notifications {...props} key={dataSourceMenuProps.dataSourceId} />;
}
1 change: 0 additions & 1 deletion server/services/NotificationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
OpenSearchDashboardsRequest,
OpenSearchDashboardsResponseFactory,
IOpenSearchDashboardsResponse,
ILegacyCustomClusterClient,
ResponseError,
} from "opensearch-dashboards/server";
import { ServerResponse } from "../models/types";
Expand Down

0 comments on commit a98af09

Please sign in to comment.