Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding MDS support in Notifications page in ISM #1121

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions public/pages/Main/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ const dataSourceEnabledPaths: string[] = [
ROUTES.REPOSITORIES,
ROUTES.CREATE_REPOSITORY,
ROUTES.EDIT_REPOSITORY,
ROUTES.NOTIFICATIONS,
];

const LocalCluster: DataSourceOption = {
Expand Down Expand Up @@ -524,6 +525,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
Loading