Skip to content

Remove experimental banner #303

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

Merged
merged 2 commits into from
Jan 10, 2023
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
6 changes: 3 additions & 3 deletions public/pages/Alerts/containers/Alerts/Alerts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ import {
successNotificationToast,
} from '../../../../utils/helpers';
import { NotificationsStart } from 'opensearch-dashboards/public';
import { match, withRouter } from 'react-router-dom';
import { match, RouteComponentProps, withRouter } from 'react-router-dom';
import { DateTimeFilter } from '../../../Overview/models/interfaces';
import { ChartContainer } from '../../../../components/Charts/ChartContainer';

export interface AlertsProps {
export interface AlertsProps extends RouteComponentProps {
alertService: AlertsService;
detectorService: DetectorService;
findingService: FindingsService;
Expand Down Expand Up @@ -542,4 +542,4 @@ class Alerts extends Component<AlertsProps, AlertsState> {
}
}

export default withRouter(Alerts);
export default withRouter<AlertsProps, React.ComponentType<AlertsProps>>(Alerts);
51 changes: 5 additions & 46 deletions public/pages/Main/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,8 @@ import {
EuiPageBody,
EuiPageSideBar,
EuiSideNavItemType,
EuiBetaBadge,
EuiTitle,
EuiFlexItem,
EuiFlexGroup,
EuiSpacer,
EuiCallOut,
EuiLink,
} from '@elastic/eui';
import { CoreStart } from 'opensearch-dashboards/public';
import { ServicesConsumer } from '../../services';
Expand Down Expand Up @@ -118,8 +113,8 @@ export default class Main extends Component<MainProps, MainState> {
* Returns current component route index
* @return {number}
*/
getCurrentRouteIndex = (): number => {
let index: number;
getCurrentRouteIndex = (): number | undefined => {
let index: number | undefined;
const pathname = this.props.location.pathname;
for (const [route, routeIndex] of Object.entries(navItemIndexByRoute)) {
if (pathname.match(new RegExp(`^${route}`))) {
Expand Down Expand Up @@ -159,21 +154,9 @@ export default class Main extends Component<MainProps, MainState> {
renderItem: () => {
return (
<>
<EuiFlexGroup alignItems="center" gutterSize="s">
<EuiFlexItem grow={false}>
<EuiTitle size="xs">
<h3>{Navigation.SecurityAnalytics}</h3>
</EuiTitle>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiBetaBadge
label="Experimental"
iconType="beaker"
tooltipContent="Experimental feature"
tooltipPosition="bottom"
/>
</EuiFlexItem>
</EuiFlexGroup>
<EuiTitle size="xs">
<h3>{Navigation.SecurityAnalytics}</h3>
</EuiTitle>
<EuiSpacer />
</>
);
Expand Down Expand Up @@ -243,30 +226,6 @@ export default class Main extends Component<MainProps, MainState> {
</EuiPageSideBar>
)}
<EuiPageBody>
<EuiCallOut title="Experimental feature" iconType="beaker">
<p>
The feature is experimental and should not be used in a production
environment. While we are working on the finishing touches, share your
ideas and feedback on{' '}
<EuiLink
target={'_blank'}
href={
'https://forum.opensearch.org/t/feedback-experimental-feature-security-analytics/11418'
}
>
forum.opensearch.org
</EuiLink>
. For more information see{' '}
<EuiLink
target={'_blank'}
href={'https://opensearch.org/docs/latest/security-analytics/index/'}
>
Security Analytics Documentation
</EuiLink>
.
</p>
</EuiCallOut>
<EuiSpacer />
<Switch>
<Route
path={`${ROUTES.FINDINGS}/:detectorId?`}
Expand Down