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

Integration with saved object management pages #1

Open
wants to merge 149 commits into
base: feature/saved-object-client
Choose a base branch
from

Conversation

SuZhou-Joe
Copy link
Owner

Description

[Describe what this change achieves]

Issues Resolved

[List any issues this PR will resolve]

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
    • yarn test:ftr
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Nicksqain and others added 2 commits June 8, 2023 09:41
…-project#4026)

* Add bluebird replaces for src/plugins/saved_objects
* Add changelog entry

---------

Signed-off-by: Alexei Karikov <[email protected]>
@SuZhou-Joe SuZhou-Joe changed the title Feature/inte with pages Integration with saved object management pages Jun 20, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jun 20, 2023

Welcome to Codecov 🎉

Once merged to your default branch, Codecov will compare your coverage reports and display the results in this comment.

Thanks for integrating Codecov - We've got you covered ☂️

Aigerim-ai and others added 2 commits June 20, 2023 10:52
* links

Signed-off-by: Aigerim Suleimenova <[email protected]>

* new section for doveloper guide

Signed-off-by: Aigerim Suleimenova <[email protected]>

* updates

Signed-off-by: Aigerim Suleimenova <[email protected]>

* Update DEVELOPER_GUIDE.md

Co-authored-by: Ashwin P Chandran <[email protected]>
Signed-off-by: Aigerim Suleimenova <[email protected]>

* Update DEVELOPER_GUIDE.md

Signed-off-by: Josh Romero <[email protected]>

---------

Signed-off-by: Aigerim Suleimenova <[email protected]>
Signed-off-by: Josh Romero <[email protected]>
Co-authored-by: Ashwin P Chandran <[email protected]>
Co-authored-by: Josh Romero <[email protected]>
)

* Enable data client with sample data server side

* Add dataSourceId into savedObject

Signed-off-by: Kristen Tian <[email protected]>

* Functional list, install uninstall

Signed-off-by: Kristen Tian <[email protected]>

* add change log

Signed-off-by: Kristen Tian <[email protected]>

* address comments

Signed-off-by: Kristen Tian <[email protected]>

* add ut

Signed-off-by: Kristen Tian <[email protected]>

---------

Signed-off-by: Kristen Tian <[email protected]>
@SuZhou-Joe SuZhou-Joe force-pushed the feature/saved-object-client branch from 3d22fe5 to 2548a48 Compare June 21, 2023 02:20
@SuZhou-Joe SuZhou-Joe force-pushed the feature/inte-with-pages branch from 4b5502c to 1c6e69f Compare June 21, 2023 02:21
AMoo-Miki and others added 8 commits June 21, 2023 11:34
* Copy over the labels from the original PR
* Label the backport PR with `autocut`
* Label a PR that fails to backport

Signed-off-by: Miki <[email protected]>
* [Lint] add custom stylelint rules and config

Adding `@osd/stylelint-config` and `@osd/stylelint-plugin-stylelint` packages.

These packages are utilized by OSD core and can be ran with the following:
`yarn lint:style`

Can be used to fix known non-compliant styling with the following:
`yarn lint:style --fix`

Can be used to audit untracked styling (based on defined rules) with the following:
```
export OUI_AUDIT_ENABLED=true
yarn lint:style
```

---

`@osd/stylelint-config`

Defines rules approved by UX and OSD core in JSON files and is added to OSD core.
Within this commit is defined `colors.json` and `global_selectors.json`.

`colors.json` defines a property that can be matched with a regex of a selector.
If the selector is tracked it will have an `approved` value and a list of `rejected`
values that UX knows if a value should be something.

`global_selectors.json` defines a selector that if tracked, it will have an `approved`
list of relative paths to files that can modify the global selector.

---

`@osd/stylelint-plugin-stylelint`

Creates the functionality that utilizes the JSON files within the `@osd/stylelint-config`.
Within this commit is defined `no_custom_colors` and `no_modifying_global_selectors` rules.

`no_custom_colors` checks if a property is a color property. It then utilizes a compliance
engine helper to check the `colors.json` to see if the property being modified has a compliance
rule available for the property for the specific selector and if it is not compliant.
For example, if a selector matches `button` and we are trying to apply `background-color: red`
to it. Stylelint will catch this and flag this as a known non-compliance issue since it knows
that it should `$euiColorWarning`. If we pass `--fix` the property will be updated to be
`$euiColorWarning`. If `OUI_AUDIT_ENABLED` is true it will catch all `background-color` being
modified that is not being defined explicitly in `colors.json`

`no_modifying_global_selectors` checks if a selector being modified is defined in
`global_selectors.json` to see if a selector not defined in a specific list of approved files.
For example, if a selector matches `#opensearch-dashboards-body` and it is being modified in
`src/core/public/rendering/_base.scss`. Stylelint will catch this and flag this as a
non-compliance issue. Since no other file should be modifying this selector. If we pass `--fix`
the styling will be complete removed from the non-compliant file.

---

Next steps:

* Migrate these packages to OUI
* Consider adding `yarn lint:style --fix` to the build release script here:
https://github.com/opensearch-project/opensearch-build/blob/main/scripts/default/opensearch-dashboards/build.sh#L89

Issue:
opensearch-project#4246

Signed-off-by: Kawika Avilla <[email protected]>

* fix to use find

Signed-off-by: Kawika Avilla <[email protected]>

* Add regex matching and OUI modification lint

Signed-off-by: Matt Provost <[email protected]>

* add changelog

Signed-off-by: Josh Romero <[email protected]>

* address issues

Signed-off-by: Kawika Avilla <[email protected]>

---------

Signed-off-by: Kawika Avilla <[email protected]>
Signed-off-by: Matt Provost <[email protected]>
Signed-off-by: Josh Romero <[email protected]>
Co-authored-by: Matt Provost <[email protected]>
Co-authored-by: Josh Romero <[email protected]>
Also now:
* `theme:darkMode` and `theme:version` can be configured via `defaults`
* unauthenticated users are no longer forced to light mode

Signed-off-by: Miki <[email protected]>
@SuZhou-Joe SuZhou-Joe force-pushed the feature/inte-with-pages branch 2 times, most recently from 8bd06c7 to 3d1be7d Compare June 25, 2023 11:29
@SuZhou-Joe SuZhou-Joe force-pushed the feature/saved-object-client branch 2 times, most recently from 8ef247a to b28074c Compare June 26, 2023 07:17
@SuZhou-Joe SuZhou-Joe force-pushed the feature/inte-with-pages branch from a952973 to d6db10e Compare June 26, 2023 07:18
Hailong-am and others added 8 commits June 26, 2023 15:51
* remove duplicate EuiPage

Signed-off-by: Hailong Cui <[email protected]>

* fix: remove duplicate workspace template

Signed-off-by: Hailong Cui <[email protected]>

---------

Signed-off-by: Hailong Cui <[email protected]>
…ct#4294)

* Refactor color to use OUI
* Pull theme value from actual active theme
* Update changelog

---------

Signed-off-by: Matt Provost <[email protected]>
Signed-off-by: Josh Romero <[email protected]>
Co-authored-by: Anan Zhuang <[email protected]>
Co-authored-by: Josh Romero <[email protected]>
…t#4384)

* Remove broken documentation link for Ruby API

https://apidock.com/ruby/Time/to_i is currently down for maintenance

But we don't need this link anyway, because it's talking about standard methods.
And we plan to deprecate flot_charts altogether: opensearch-project#4267

Signed-off-by: Josh Romero <[email protected]>

* remove leftover link brackets

Signed-off-by: Josh Romero <[email protected]>

---------

Signed-off-by: Josh Romero <[email protected]>
* Fix relationships header overflow (opensearch-project#3967)

Co-authored-by: Andrey Myssak <[email protected]>
Signed-off-by: Sergey Myssak <[email protected]>

* Replace relationships css file with oui classname (opensearch-project#3967)

Co-authored-by: Andrey Myssak <[email protected]>
Signed-off-by: Sergey Myssak <[email protected]>

* Make title overflow wrap instead of truncation (opensearch-project#3967)

Co-authored-by: Andrey Myssak <[email protected]>
Signed-off-by: Sergey Myssak <[email protected]>

* Remove icon from flyout header and wrap title

Signed-off-by: Josh Romero <[email protected]>

---------

Signed-off-by: Sergey Myssak <[email protected]>
Signed-off-by: Josh Romero <[email protected]>
Co-authored-by: Andrey Myssak <[email protected]>
Co-authored-by: Josh Romero <[email protected]>
* Remove color_util

Signed-off-by: Matt Provost <[email protected]>

* Update changelog

Signed-off-by: Matt Provost <[email protected]>

* Revert "Remove color_util"

This reverts commit 9ca9c56.

Signed-off-by: Matt Provost <[email protected]>

* Refactor color maps to use Oui color palettes

Signed-off-by: Matt Provost <[email protected]>

* Update changelog pt 2: electric boogaloo

Signed-off-by: Matt Provost <[email protected]>

* Make gradients look better

Signed-off-by: Matt Provost <[email protected]>

* Fix typescript ignore

Signed-off-by: Matt Provost <[email protected]>

* Fix tests

Signed-off-by: Matt Provost <[email protected]>

* Add todo followup

Signed-off-by: Matt Provost <[email protected]>

---------

Signed-off-by: Matt Provost <[email protected]>
Signed-off-by: Josh Romero <[email protected]>
Co-authored-by: Josh Romero <[email protected]>
this is a temporary fix just for demo, should be reverted later

Signed-off-by: Yulong Ruan <[email protected]>
…#3964)

* Remove unused tags in the navigation plugin (opensearch-project#3962)

Signed-off-by: Andrey Myssak <[email protected]>

* Update CHANGELOG.md (opensearch-project#3962)

Signed-off-by: Andrey Myssak <[email protected]>

---------

Signed-off-by: Andrey Myssak <[email protected]>
Signed-off-by: Manasvini B Suryanarayana <[email protected]>
Co-authored-by: Manasvini B Suryanarayana <[email protected]>
ruanyl and others added 24 commits July 19, 2023 08:16
Signed-off-by: Yulong Ruan <[email protected]>
* remove duplicate EuiPage

Signed-off-by: Hailong Cui <[email protected]>

* fix: remove duplicate workspace template

Signed-off-by: Hailong Cui <[email protected]>

---------

Signed-off-by: Hailong Cui <[email protected]>
this is a temporary fix just for demo, should be reverted later

Signed-off-by: Yulong Ruan <[email protected]>
…t#32)

* feat: add some logic check when overwrite a saved object

Signed-off-by: SuZhoue-Joe <[email protected]>

* fix: type check

Signed-off-by: SuZhoue-Joe <[email protected]>

* feat: update

Signed-off-by: SuZhoue-Joe <[email protected]>

---------

Signed-off-by: SuZhoue-Joe <[email protected]>
)

* feat: add color, icon and defaultVISTheme field for workspace saved object

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

* add new fields to workspace form

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

* feat: remove feature or group name hack

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

---------

Signed-off-by: Lin Wang <[email protected]>
* feat: register library menus

Signed-off-by: SuZhoue-Joe <[email protected]>

* feat: some update

Signed-off-by: SuZhoue-Joe <[email protected]>

* feat: optimize code

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: optimize code

Signed-off-by: SuZhou-Joe <[email protected]>

---------

Signed-off-by: SuZhoue-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
* Exit workspace from left menu

Signed-off-by: yuye-aws <[email protected]>

* Show exit workspace button with small window size

Signed-off-by: yuye-aws <[email protected]>

* Remove recently viewed and workspace overview on left menu

Signed-off-by: yuye-aws <[email protected]>

* Add buttons for outside, inside workspace case

Signed-off-by: yuye-aws <[email protected]>

* Implement home button and workspace over view button on left menu

Signed-off-by: yuye-aws <[email protected]>

* Implement workspace dropdown list in left menu

Signed-off-by: yuye-aws <[email protected]>

* Add props on recently accessed and custom nav link

Signed-off-by: yuye-aws <[email protected]>

* Add three props to mock props for collapsible nav: exitWorkspace, getWorkspaceUrl, workspaceList$

Signed-off-by: yuye-aws <[email protected]>

* Add three props to mock props for header: exitWorkspace, getWorkspaceUrl, workspaceList$

Signed-off-by: yuye-aws <[email protected]>

* Fix bugs for function createWorkspaceNavLink

Signed-off-by: yuye-aws <[email protected]>

* Remove unused constants

Signed-off-by: yuye-aws <[email protected]>

* Reuse method getWorkspaceUrl

Signed-off-by: yuye-aws <[email protected]>

* Remove recently accessed and custom nav props in test

Signed-off-by: yuye-aws <[email protected]>

* Revert "Remove recently accessed and custom nav props in test"

This reverts commit 7895e5c.

* Wrap title with i18n

Signed-off-by: yuye-aws <[email protected]>

* Add redirect for workspace app

Signed-off-by: yuye-aws <[email protected]>

* Enable users to go to workspace lists page via see more under workspaces in left menu

Signed-off-by: yuye-aws <[email protected]>

---------

Signed-off-by: yuye-aws <[email protected]>
* feat: make url stateful

Signed-off-by: SuZhoue-Joe <[email protected]>

* feat: optimize code

Signed-off-by: SuZhoue-Joe <[email protected]>

* feat: remove useless change

Signed-off-by: SuZhoue-Joe <[email protected]>

* feat: optimize url listener

Signed-off-by: SuZhoue-Joe <[email protected]>

* feat: make formatUrlWithWorkspaceId extensible

Signed-off-by: SuZhoue-Joe <[email protected]>

* feat: modify to related components

Signed-off-by: SuZhoue-Joe <[email protected]>

* feat: modify the async format to be sync function

Signed-off-by: SuZhoue-Joe <[email protected]>

* feat: modify the async format to be sync function

Signed-off-by: SuZhoue-Joe <[email protected]>

* fix: type check

Signed-off-by: SuZhoue-Joe <[email protected]>

* feat: use path to maintain workspace info

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: optimize code

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: optimize code

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: optimize code

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: optimize code

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: optimize code

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: optimize code

Signed-off-by: SuZhou-Joe <[email protected]>

---------

Signed-off-by: SuZhoue-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
* fix: fix build error and some ut

Signed-off-by: tygao <[email protected]>

* chore: remove saved object client test diff

Signed-off-by: tygao <[email protected]>

---------

Signed-off-by: tygao <[email protected]>
* feat: add workspace permission control interface

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

* feat: add request parameter for workspace permission control

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

---------

Signed-off-by: Lin Wang <[email protected]>
…-project#46)

return 404 if accessing a workspace path when workspace is disabled

---------

Signed-off-by: Yulong Ruan <[email protected]>
* Add workspace column into saved management page

Signed-off-by: Hailong Cui <[email protected]>

* savedObjectsManagement as optional dependency

Signed-off-by: Hailong Cui <[email protected]>

* i18n for column title

Signed-off-by: Hailong Cui <[email protected]>

---------

Signed-off-by: Hailong Cui <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
SuZhou-Joe pushed a commit that referenced this pull request Sep 13, 2023
…ct#118)

* feat: import sample data saved objects to workspace

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

* refactor: update typo saveObject to savedObject

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

* feat: separate getWorkspaceAndDataSourceIntegratedSavedObjects to getDataSourceIntegratedSavedObjects and getWorkspaceIntegratedSavedObjects

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

* refactor: update to cloneDeep

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

* refactor: simplify sample data saved object id prefix logic (#1)

* refactor: simplify sample data saved object id prefix logic

Signed-off-by: Yulong Ruan <[email protected]>

* fix: align the prefix order of sample data install and uninstall

rename appendPrefix to addPrefix

Signed-off-by: Yulong Ruan <[email protected]>

---------

Signed-off-by: Yulong Ruan <[email protected]>

---------

Signed-off-by: Lin Wang <[email protected]>
Signed-off-by: Yulong Ruan <[email protected]>
Co-authored-by: Yulong Ruan <[email protected]>
SuZhou-Joe pushed a commit that referenced this pull request Sep 18, 2023
…ct#118)

* feat: import sample data saved objects to workspace

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

* refactor: update typo saveObject to savedObject

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

* feat: separate getWorkspaceAndDataSourceIntegratedSavedObjects to getDataSourceIntegratedSavedObjects and getWorkspaceIntegratedSavedObjects

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

* refactor: update to cloneDeep

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

* refactor: simplify sample data saved object id prefix logic (#1)

* refactor: simplify sample data saved object id prefix logic

Signed-off-by: Yulong Ruan <[email protected]>

* fix: align the prefix order of sample data install and uninstall

rename appendPrefix to addPrefix

Signed-off-by: Yulong Ruan <[email protected]>

---------

Signed-off-by: Yulong Ruan <[email protected]>

---------

Signed-off-by: Lin Wang <[email protected]>
Signed-off-by: Yulong Ruan <[email protected]>
Co-authored-by: Yulong Ruan <[email protected]>
SuZhou-Joe pushed a commit that referenced this pull request Sep 23, 2023
SuZhou-Joe pushed a commit that referenced this pull request Oct 16, 2023
…ect#210)

* feat: import sample data saved objects to workspace

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

* refactor: simplify sample data saved object id prefix logic (#1)

* refactor: simplify sample data saved object id prefix logic

Signed-off-by: Yulong Ruan <[email protected]>

* fix: align the prefix order of sample data install and uninstall

rename appendPrefix to addPrefix

Signed-off-by: Yulong Ruan <[email protected]>

---------

Signed-off-by: Yulong Ruan <[email protected]>

* refactor: assigned copied saved objects to new variables

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

---------

Signed-off-by: Lin Wang <[email protected]>
Signed-off-by: Yulong Ruan <[email protected]>
Co-authored-by: Yulong Ruan <[email protected]>
SuZhou-Joe pushed a commit that referenced this pull request Feb 29, 2024
…ect#210)

* feat: import sample data saved objects to workspace

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

* refactor: simplify sample data saved object id prefix logic (#1)

* refactor: simplify sample data saved object id prefix logic

Signed-off-by: Yulong Ruan <[email protected]>

* fix: align the prefix order of sample data install and uninstall

rename appendPrefix to addPrefix

Signed-off-by: Yulong Ruan <[email protected]>

---------

Signed-off-by: Yulong Ruan <[email protected]>

* refactor: assigned copied saved objects to new variables

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

---------

Signed-off-by: Lin Wang <[email protected]>
Signed-off-by: Yulong Ruan <[email protected]>
Co-authored-by: Yulong Ruan <[email protected]>
SuZhou-Joe pushed a commit that referenced this pull request Mar 18, 2024
…ect#210)

* feat: import sample data saved objects to workspace

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

* refactor: simplify sample data saved object id prefix logic (#1)

* refactor: simplify sample data saved object id prefix logic

Signed-off-by: Yulong Ruan <[email protected]>

* fix: align the prefix order of sample data install and uninstall

rename appendPrefix to addPrefix

Signed-off-by: Yulong Ruan <[email protected]>

---------

Signed-off-by: Yulong Ruan <[email protected]>

* refactor: assigned copied saved objects to new variables

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

---------

Signed-off-by: Lin Wang <[email protected]>
Signed-off-by: Yulong Ruan <[email protected]>
Co-authored-by: Yulong Ruan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.