Skip to content

Commit

Permalink
Revert remove experiment banner and enable by default (#203)
Browse files Browse the repository at this point in the history
* Revert "feat: enable ml-commons-dashboards plugin by default (#200)"

This reverts commit a1cb7de.

Signed-off-by: Lin Wang <[email protected]>

* Revert "feat: remove experiment warning banner (#194)"

This reverts commit 0ef4753.

Signed-off-by: Lin Wang <[email protected]>

---------

Signed-off-by: Lin Wang <[email protected]>
  • Loading branch information
wanglam authored May 31, 2023
1 parent a1cb7de commit 31df7d4
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 6 deletions.
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 }),
}),
};

0 comments on commit 31df7d4

Please sign in to comment.