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

add MDS support for detector creation&Update flow #728

Merged

Conversation

jackiehanyang
Copy link
Collaborator

@jackiehanyang jackiehanyang commented Apr 18, 2024

onboarded MDS for the following API calls by adding datasourceid paths to the redux and node apis:

  • apiRouter.post('/detectors/preview/{dataSourceId}', adService.previewDetector);
  • apiRouter.get('/detectors/{detectorName}/_match/{dataSourceId}', adService.matchDetector);
  • apiRouter.get('/detectors/_count/{dataSourceId}', adService.getDetectorCount);
  • apiRouter.post('/detectors/_validate/{validationType}/{dataSourceId}', adService.validateDetector);
  • apiRouter.get('/_mappings/{dataSourceId}', opensearchService.getMapping);

Revisions:

4/19:

  • remove neo in variable naming
  • create and use enum when referring to list detector page query param
  • make universal MDSState and share it between pages

Description

This pr adds MDS support for detector creation&update flow

Screen.Recording.2024-04-18.at.14.30.04.mov

Issues Resolved

#721
[List any issues this PR will resolve]

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
@jackiehanyang jackiehanyang changed the title add MDS support for detector creation flow add MDS support for detector creation&Update flow Apr 18, 2024
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Copy link
Member

@huyaboo huyaboo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good. Please see comments regarding how your page is handling DataSourceSelectable components and check if activeOption is being handled correctly in the case that no dataSourceId is provided.

componentType={'DataSourceSelectable'}
componentConfig={{
fullWidth: false,
activeOption: [{ id: MDSCreateState.selectedDataSourceId }],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How are we handling the case where MDSCreateState.selectedDataSourceId = '' but Local cluster is disabled? When this is initially defined, the default value is '' which means the initial selected option will be the Local cluster. I think a potential solution here is to set the initial state of MDSCreateState.selectedDataSourceId = undefined and something like the following:

activeOption: MDSCreateState.selectedDataSourceId === undefined ? [{ id: MDSCreateState.selectedDataSourceId }] : undefined

This enables the DataSourceSelectable component to handle the default selected choice. Could you please check for other pages as well?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, good catch

Copy link
Collaborator Author

@jackiehanyang jackiehanyang Apr 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't the decision for when MDSCreateState.selectedDataSourceId = '' but Local cluster is disabled is an error banner will be thrown from the data source picker component? Have we changed that design? I think @zhyuanqi was working on that implementation?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The case I'm referring to is how you set the initial render of the page. Currently, if Local cluster is disabled and you navigate to the /app/anomaly-detection-dashboards#/, it will throw the toast message every time which should be avoided. This is because MDSCreateState.selectedDataSourceId = '' when this is not valid.

From datasource UI component side, it is not possible for a user to select Local cluster because the component will check to see if Local cluster is disabled and add/omit it if necessary. Of course, the toast should still be thrown if the user intentionally/unintentionally sets the url to dataSourceId= because it's invalid.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ic, this is the issue that AD and IMS have in the future playground, right? Let's address it in the next pr, I haven't pull latest change from OSD in this pr. So the bug has not been exposed in my local yet

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From MDS side, here should be the expected behaviors:

If Local cluster is enabled:

  • The initial render of the page should have defaultDataSource as the selected option, not the Local cluster. This can be easily done if activeOptions = undefined. The url should reflect this choice with ?dataSourceId=<defaultDataSource>
  • The user should be able to select Local cluster without any Toast message being shown (and the url should reflect this choice with ?dataSourceId=)
  • The ?dataSourceId= should be a valid url and this should represent the Local cluster being selected

If Local cluster is disabled:

  • The initial render of the page should have defaultDataSource as the selected option, not the Local cluster. This can be easily done if activeOptions = undefined. The url should reflect this choice with ?dataSourceId=<defaultDataSource>
  • The user shouldn't be able to select Local cluster from UI component (this is datasource UI responsibility; this should already be covered)
  • The ?dataSourceId= can either do one of 2 things:
    • Throw the toast message because the Local cluster is attempted to be made but is not valid
    • (Preferred): redirect the url to the ?dataSourceId=<defaultDataSource> and put the defaultDatasource as the selected option. If this is non-trivial, this is the preferred option

Copy link
Collaborator Author

@jackiehanyang jackiehanyang Apr 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the details! I will do a sanity check on all the data source picker components and make adjustment in the next pr. Wanted to focus on adding MDS support for creation&update flow in this pr :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kgcreative I may need confirmation if this makes sense from UX perspective. For right now, on datasource UI side, defaultDataSource is prioritized over Local cluster so we shouldn't change these priorities.

server/models/types.ts Show resolved Hide resolved
Copy link
Member

@ohltyler ohltyler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! Nothing big, few minor comments. Besides that, could you also add a lot more details in the PR description? It is really helpful for tracking and auditing of changes to have at the very least some details in each PR regarding the impact of the change, the implementation changes made (e.g., 'onboarded MDS for the following x API calls by adding datasourceid paths to the redux and node apis', etc. In addition to what is currently missing if it's an ongoing process, what future PRs will finish x,y,z, and referencing to the meta issue. Especially when it comes to hunting down bugs or user-reported issues.

public/pages/DefineDetector/containers/DefineDetector.tsx Outdated Show resolved Hide resolved
Comment on lines +265 to +270
const handleDataSourceChange = ([event]) => {
const dataSourceId = event?.id;
if (!dataSourceId) {
getNotifications().toasts.addDanger(
prettifyErrorMessage('Unable to set data source.')
);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curious, what could cause event to not have an id? Is there a way to make event typesafe so we don't need to worry about if id does not exist?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not so sure... MDS team provided this usage in their component guideline doc

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BionIT @huyaboo thoughts on this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The callback function will either return [] (error state), [{id: '', label: 'Local cluster'] (if Local cluster is enabled) or [{id: <dataSourceId>, label: <dataSourceTitle>}]. Thus, event can be undefined and it's expected that Plugins handle this case as an invalid/error state.

One example of [] being returned is when you pass in an activeOption and you specify a dataSourceFilter that filters out the datasource. Since the dataSourceFilter function removes the activeOption as a valid choice, the component will return [].

componentType={'DataSourceSelectable'}
componentConfig={{
fullWidth: false,
activeOption: [{ id: MDSCreateState.selectedDataSourceId }],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, good catch

public/pages/utils/helpers.ts Outdated Show resolved Hide resolved
public/utils/constants.ts Show resolved Hide resolved
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Copy link
Member

@ohltyler ohltyler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finished another round, getting close. I'll wait for the open threads to be resolved as well. Can you please update the PR description as well?

public/pages/utils/helpers.ts Outdated Show resolved Hide resolved
server/utils/constants.ts Show resolved Hide resolved
Copy link
Member

@huyaboo huyaboo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with 2 action items:

  • Address remaining comments
  • After merge, align with the expected behaviors for the DataSourceSelectable components and how to handle url cases gracefully

Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Copy link
Member

@ohltyler ohltyler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Lets track the open discussions.

@jackiehanyang jackiehanyang merged commit a0a2608 into opensearch-project:feature/mds Apr 19, 2024
1 of 2 checks passed
owaiskazi19 pushed a commit to owaiskazi19/anomaly-detection-dashboards-plugin that referenced this pull request Apr 26, 2024
…#728)

* update snapshots

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add snpshot

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add data source client

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* test

* neo List Detectors page

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add opensearch_dashboards.json file

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* neo List Detectors page

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* test

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* Support MDS on DetectorDetails page

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* change 4/7

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* version change

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* list detector list change

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* Support MDS on List, Detail, Dashboard, Overview pages

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* change version back to 3.0

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* revert version change

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* make dataSourceId optional in DetectorListItem type

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* update imports

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* remove used function

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* cleanup

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add getter and setter for dataSource plugin

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* read dataSourceId from the url instead of passing props

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* addressing comments

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* addressing comments and run prettier

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* addressing comments in neo1 branch

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* addressing comments

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* make getDataSourceManagementPlugin() optional

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add comment

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* make dataSourceId type safe

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add MDS support on creation page

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* updated methods to get data source query param from url

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* using helper to construct url with dataSourceId

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add update page, and update urls on detector detail page

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* update update call router

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* update reducer and router

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* clean up

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* addressing comments

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* update enums

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

---------

Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com>
jackiehanyang added a commit to jackiehanyang/anomaly-detection-dashboards-plugin that referenced this pull request Apr 29, 2024
…#728)

* update snapshots

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add snpshot

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add data source client

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* test

* neo List Detectors page

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add opensearch_dashboards.json file

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* neo List Detectors page

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* test

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* Support MDS on DetectorDetails page

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* change 4/7

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* version change

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* list detector list change

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* Support MDS on List, Detail, Dashboard, Overview pages

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* change version back to 3.0

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* revert version change

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* make dataSourceId optional in DetectorListItem type

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* update imports

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* remove used function

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* cleanup

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add getter and setter for dataSource plugin

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* read dataSourceId from the url instead of passing props

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* addressing comments

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* addressing comments and run prettier

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* addressing comments in neo1 branch

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* addressing comments

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* make getDataSourceManagementPlugin() optional

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add comment

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* make dataSourceId type safe

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add MDS support on creation page

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* updated methods to get data source query param from url

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* using helper to construct url with dataSourceId

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add update page, and update urls on detector detail page

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* update update call router

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* update reducer and router

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* clean up

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* addressing comments

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* update enums

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

---------

Signed-off-by: Jackie Han <jkhanjob@gmail.com>
jackiehanyang added a commit that referenced this pull request Apr 29, 2024
* Support MDS on List, Detail, Dashboard, Overview pages (#722)

* update snapshots

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add snpshot

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add data source client

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* test

* neo List Detectors page

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add opensearch_dashboards.json file

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* neo List Detectors page

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* test

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* Support MDS on DetectorDetails page

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* change 4/7

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* version change

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* list detector list change

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* Support MDS on List, Detail, Dashboard, Overview pages

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* change version back to 3.0

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* revert version change

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* make dataSourceId optional in DetectorListItem type

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* update imports

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* remove used function

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* cleanup

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add getter and setter for dataSource plugin

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* read dataSourceId from the url instead of passing props

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* addressing comments and run prettier

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* addressing comments

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* make getDataSourceManagementPlugin() optional

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add comment

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* make dataSourceId type safe

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

---------

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add MDS support for detector creation&Update flow (#728)

* update snapshots

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add snpshot

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add data source client

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* test

* neo List Detectors page

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add opensearch_dashboards.json file

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* neo List Detectors page

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* test

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* Support MDS on DetectorDetails page

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* change 4/7

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* version change

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* list detector list change

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* Support MDS on List, Detail, Dashboard, Overview pages

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* change version back to 3.0

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* revert version change

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* make dataSourceId optional in DetectorListItem type

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* update imports

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* remove used function

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* cleanup

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add getter and setter for dataSource plugin

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* read dataSourceId from the url instead of passing props

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* addressing comments

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* addressing comments and run prettier

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* addressing comments in neo1 branch

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* addressing comments

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* make getDataSourceManagementPlugin() optional

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add comment

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* make dataSourceId type safe

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add MDS support on creation page

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* updated methods to get data source query param from url

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* using helper to construct url with dataSourceId

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add update page, and update urls on detector detail page

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* update update call router

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* update reducer and router

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* clean up

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* addressing comments

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* update enums

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

---------

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* update actionOption attribution for all data soure components (#732)

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* Add MDS UTs and bug fixes (#734)

* working on ut

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* update ut

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* update UTs and add bug fixes

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

---------

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* bug fixes (#737)

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

---------

Signed-off-by: Jackie Han <jkhanjob@gmail.com>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 29, 2024
* Support MDS on List, Detail, Dashboard, Overview pages (#722)

* update snapshots

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add snpshot

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add data source client

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* test

* neo List Detectors page

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add opensearch_dashboards.json file

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* neo List Detectors page

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* test

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* Support MDS on DetectorDetails page

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* change 4/7

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* version change

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* list detector list change

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* Support MDS on List, Detail, Dashboard, Overview pages

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* change version back to 3.0

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* revert version change

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* make dataSourceId optional in DetectorListItem type

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* update imports

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* remove used function

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* cleanup

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add getter and setter for dataSource plugin

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* read dataSourceId from the url instead of passing props

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* addressing comments and run prettier

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* addressing comments

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* make getDataSourceManagementPlugin() optional

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add comment

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* make dataSourceId type safe

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

---------

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add MDS support for detector creation&Update flow (#728)

* update snapshots

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add snpshot

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add data source client

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* test

* neo List Detectors page

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add opensearch_dashboards.json file

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* neo List Detectors page

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* test

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* Support MDS on DetectorDetails page

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* change 4/7

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* version change

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* list detector list change

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* Support MDS on List, Detail, Dashboard, Overview pages

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* change version back to 3.0

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* revert version change

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* make dataSourceId optional in DetectorListItem type

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* update imports

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* remove used function

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* cleanup

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add getter and setter for dataSource plugin

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* read dataSourceId from the url instead of passing props

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* addressing comments

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* addressing comments and run prettier

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* addressing comments in neo1 branch

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* addressing comments

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* make getDataSourceManagementPlugin() optional

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add comment

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* make dataSourceId type safe

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add MDS support on creation page

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* updated methods to get data source query param from url

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* using helper to construct url with dataSourceId

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add update page, and update urls on detector detail page

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* update update call router

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* update reducer and router

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* clean up

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* addressing comments

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* update enums

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

---------

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* update actionOption attribution for all data soure components (#732)

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* Add MDS UTs and bug fixes (#734)

* working on ut

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* update ut

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* update UTs and add bug fixes

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

---------

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* bug fixes (#737)

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

---------

Signed-off-by: Jackie Han <jkhanjob@gmail.com>
(cherry picked from commit 48acb93)
jackiehanyang added a commit that referenced this pull request Apr 29, 2024
* Support MDS on List, Detail, Dashboard, Overview pages (#722)

* update snapshots

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add snpshot

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add data source client

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* test

* neo List Detectors page

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add opensearch_dashboards.json file

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* neo List Detectors page

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* test

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* Support MDS on DetectorDetails page

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* change 4/7

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* version change

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* list detector list change

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* Support MDS on List, Detail, Dashboard, Overview pages

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* change version back to 3.0

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* revert version change

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* make dataSourceId optional in DetectorListItem type

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* update imports

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* remove used function

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* cleanup

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add getter and setter for dataSource plugin

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* read dataSourceId from the url instead of passing props

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* addressing comments and run prettier

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* addressing comments

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* make getDataSourceManagementPlugin() optional

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add comment

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* make dataSourceId type safe

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

---------

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add MDS support for detector creation&Update flow (#728)

* update snapshots

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add snpshot

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add data source client

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* test

* neo List Detectors page

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add opensearch_dashboards.json file

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* neo List Detectors page

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* test

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* Support MDS on DetectorDetails page

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* change 4/7

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* version change

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* list detector list change

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* Support MDS on List, Detail, Dashboard, Overview pages

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* change version back to 3.0

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* revert version change

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* make dataSourceId optional in DetectorListItem type

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* update imports

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* remove used function

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* cleanup

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add getter and setter for dataSource plugin

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* read dataSourceId from the url instead of passing props

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* addressing comments

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* addressing comments and run prettier

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* addressing comments in neo1 branch

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* addressing comments

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* make getDataSourceManagementPlugin() optional

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add comment

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* make dataSourceId type safe

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add MDS support on creation page

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* updated methods to get data source query param from url

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* using helper to construct url with dataSourceId

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* add update page, and update urls on detector detail page

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* update update call router

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* update reducer and router

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* clean up

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* addressing comments

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* update enums

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

---------

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* update actionOption attribution for all data soure components (#732)

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* Add MDS UTs and bug fixes (#734)

* working on ut

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* update ut

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* update UTs and add bug fixes

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

---------

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* bug fixes (#737)

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

---------

Signed-off-by: Jackie Han <jkhanjob@gmail.com>
(cherry picked from commit 48acb93)

Co-authored-by: Jackie Han <jkhanjob@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants