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

Revert remove experiment banner and enable by default #203

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
25 changes: 25 additions & 0 deletions public/components/experiment_warning/__tests__/index.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/
import React from 'react';
import { render, screen } from '../../../../test/test_utils';
import { ExperimentalWarning } from '..';

describe('<ExperimentalWarning />', () => {
it('should navigate to # when clicking link of "Machine Learning Documentation"', () => {
render(<ExperimentalWarning />);
const link = screen.getByText('Machine Learning Documentation');
expect(link.getAttribute('href')).toBe(
'https://opensearch.org/docs/latest/ml-commons-plugin/ml-dashbaord/'
);
});

it('should navigate to # when clicking forum.opensearch.org', () => {
render(<ExperimentalWarning />);
const link = screen.getByText('forum.opensearch.org');
expect(link.getAttribute('href')).toBe(
'https://forum.opensearch.org/t/feedback-ml-commons-ml-model-health-dashboard-for-admins-experimental-release/12494'
);
});
});
27 changes: 27 additions & 0 deletions public/components/experiment_warning/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/
import React from 'react';

import { EuiCallOut, EuiLink } from '@elastic/eui';

export const ExperimentalWarning = () => {
return (
<EuiCallOut title="Experimental Feature" iconType="iInCircle">
The feature is experimental and should not be used in a production environment. For more
information, see{' '}
<EuiLink href="https://opensearch.org/docs/latest/ml-commons-plugin/ml-dashbaord/" external>
Machine Learning Documentation
</EuiLink>
. To leave feedback, visit{' '}
<EuiLink
href="https://forum.opensearch.org/t/feedback-ml-commons-ml-model-health-dashboard-for-admins-experimental-release/12494"
external
>
forum.opensearch.org
</EuiLink>
.
</EuiCallOut>
);
};
2 changes: 2 additions & 0 deletions public/components/monitoring/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import React, { useState, useRef, useCallback } from 'react';

import { RefreshInterval } from '../common/refresh_interval';
import { PreviewPanel } from '../preview_panel';
import { ExperimentalWarning } from '../experiment_warning';
import { ModelDeploymentItem, ModelDeploymentTable } from './model_deployment_table';
import { useMonitoring } from './use_monitoring';
import { ModelStatusFilter } from './model_status_filter';
Expand Down Expand Up @@ -68,6 +69,7 @@ export const Monitoring = () => {

return (
<div>
<ExperimentalWarning />
<EuiSpacer size="s" />
<EuiSpacer size="xs" />
<EuiPageHeader
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
Compatible with OpenSearch 2.8.0


### Features

* Remove experiment warning banner. ([#194](https://github.com/opensearch-project/ml-commons-dashboards/pull/194))
* Update plugin config to enable plugin by default. ([#200](https://github.com/opensearch-project/ml-commons-dashboards/pull/200))

### Infrastructure

* Update husky to 8.0.3 to remove execa as development dependency. ([#160](https://github.com/opensearch-project/ml-commons-dashboards/pull/160))
2 changes: 1 addition & 1 deletion server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ export { MlCommonsPluginSetup, MlCommonsPluginStart } from './types';

export const config: PluginConfigDescriptor = {
schema: schema.object({
enabled: schema.boolean({ defaultValue: true }),
enabled: schema.boolean({ defaultValue: false }),
}),
};