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

Data sources UI improvements #1059

Merged
merged 11 commits into from
Oct 3, 2023
Merged

Conversation

derek-ho
Copy link
Collaborator

@derek-ho derek-ho commented Sep 30, 2023

Description

Make changes according to UX feedback:

  • Change spacing/heading style of permissions sub group on configure flow
  • Make CTA for error toast
  • Remove edit capabilities on datasource specific page
  • hook up s3 and prometheus correctly, and send actual data in request

Issues Resolved

[List any issues this PR will resolve]

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • 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.

@codecov
Copy link

codecov bot commented Sep 30, 2023

Codecov Report

Merging #1059 (7d7cdad) into main (18256c5) will decrease coverage by 0.03%.
Report is 1 commits behind head on main.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1059      +/-   ##
==========================================
- Coverage   44.44%   44.42%   -0.03%     
==========================================
  Files         324      322       -2     
  Lines       19116    19117       +1     
  Branches     4572     4572              
==========================================
- Hits         8496     8492       -4     
- Misses      10577    10582       +5     
  Partials       43       43              
Flag Coverage Δ
dashboards-observability 44.42% <ø> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 14 files with indirect coverage changes

Comment on lines -80 to -90
const saveChanges = () => {
http!.put(`${DATACONNECTIONS_BASE}`, {
body: JSON.stringify({
name: props.dataConnection,
allowedRoles: selectedQueryPermissionRoles.map((role) => role.label),
connector: props.connector,
properties: props.properties,
}),
});
setMode('view');
};
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

datasources is read only for now until backend support PATCH

setAccessKeyForRequest?: React.Dispatch<React.SetStateAction<string>>;
setSecretKeyForRequest?: React.Dispatch<React.SetStateAction<string>>;
setPasswordForRequest: React.Dispatch<React.SetStateAction<string>>;
setUsernameForRequest: React.Dispatch<React.SetStateAction<string>>;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I know we do it quite often so I'm more just curious: is there any way to send updaters in props without having to write out all these dispatch types and keep track of everything?

setRegionForRequest,
setSecretKeyForRequest,
setUsernameForRequest,
} = props;
Copy link
Collaborator

Choose a reason for hiding this comment

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

At this point I would probably just use the object directly to make it more explicit, call it authProps and use e.g. authProps.currentUsername or authProps.setAccessKeyForRequest. The extra typing is worth the clarity.

{currentUsername ? 'Basic auth' : 'AWSSigV4'}
{currentAuthMethod === 'basicauth'
? 'Basic authentication'
: 'AWS Signature Version 4'}
Copy link
Collaborator

Choose a reason for hiding this comment

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

No handling for noauth. Seems pervasive in some other spots as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Prometheus only supports basic and sigv4

@YANG-DB YANG-DB merged commit af822a5 into opensearch-project:main Oct 3, 2023
8 of 9 checks passed
derek-ho added a commit to derek-ho/dashboards-observability that referenced this pull request Oct 4, 2023
* Make UI changes based on UX feedback

Signed-off-by: Derek Ho <[email protected]>

* Remove notifications pass through props

Signed-off-by: Derek Ho <[email protected]>

* Fix steps

Signed-off-by: Derek Ho <[email protected]>

* Remove edit buttons, delete files, update tests

Signed-off-by: Derek Ho <[email protected]>

* Finish fixing promtheus flow

Signed-off-by: Derek Ho <[email protected]>

* fix up s3 flow

Signed-off-by: Derek Ho <[email protected]>

* Hook up fields to actual call

Signed-off-by: Derek Ho <[email protected]>

* Update according to UX feedback and tests

Signed-off-by: Derek Ho <[email protected]>

* Add test

Signed-off-by: Derek Ho <[email protected]>

* Finish up test coverage for manage flow

Signed-off-by: Derek Ho <[email protected]>

---------

Signed-off-by: Derek Ho <[email protected]>
pjfitzgibbons added a commit that referenced this pull request Oct 5, 2023
* Update mocha (#960)
* added code for the change of design of the sidebar, fixed overriding … (#928)
* Refactor add_integration_flyout to break out nested methods (#956)
* [Log Explorer] Remove top level tabs (#970)
* Explorer's timeheader & color change (#959)
* Update caching (#965)
* Move query_utils to /public (#983)
* Remove Zeppelin Parser from Notebook (#985)
* Explorer empty bucket (#990)
* refactored classnames for sidebar (#933)
* Refactor Integrations Backend to abstract IO (#947)
* Create React component for Integrations Setup UI (#1009)
* Create Data sources plugin with Manage Datasources Flow  (#1035)
* Manage datasources (#967)
* Add acceleration management UI  (#989)
* Rename data sources to data connections (#1004)
* Add fallback to show if user does not have datasource API permissions (#1008)
* Add access control tab content (#992)
* Delete datasource and Connection Configuration Tab (#1024)
* adjust explorer chart color and spacing (#1051)
* Configure S3 datasource flow (#1049)
* Manage datasources (#967)
* Add acceleration management UI  (#989)
* Rename data sources to data connections (#1004)
* Add fallback to show if user does not have datasource API permissions (#1008)
* Add access control tab content (#992)
* Delete datasource and Connection Configuration Tab (#1024)
* modified explorer data grid to follow discover look and feel (#1041)
* Create prometheus datasource flow (#1054)
* Manage datasources (#967)
* Add acceleration management UI  (#989)
* Rename data sources to data connections (#1004)
* Add fallback to show if user does not have datasource API permissions (#1008)
* Add access control tab content (#992)
* Delete datasource and Connection Configuration Tab (#1024)
* added design changes for sidebar (#1061)
* updated snapshots (#1062)
* Update UI for integrations setup (#1052)
* Data sources UI improvements (#1059)
* adding redirection to datasources (#1063)
* Move convertDateTime, refactor query_utils (#1064)
* Setup S3 connection with integrations (#1057)
* Use approved svg from UX (#1066)
* Fix missing import 'moment' on query_utils. (#1067)

---------

Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: sumukhswamy <[email protected]>
Signed-off-by: Eric Wei <[email protected]>
Signed-off-by: Paul Sebastian <[email protected]>
Signed-off-by: Peter Fitzgibbons <[email protected]>
Signed-off-by: Shenoy Pratik <[email protected]>
Signed-off-by: Simeon Widdis <[email protected]>
Co-authored-by: sumukhswamy <[email protected]>
Co-authored-by: Eric Wei <[email protected]>
Co-authored-by: Paul Sebastian <[email protected]>
Co-authored-by: Peter Fitzgibbons <[email protected]>
Co-authored-by: Paul Sebastian <[email protected]>
Co-authored-by: Shenoy Pratik <[email protected]>
Co-authored-by: Simeon Widdis <[email protected]>
mengweieric pushed a commit to mengweieric/dashboards-observability that referenced this pull request Oct 15, 2023
* Make UI changes based on UX feedback

Signed-off-by: Derek Ho <[email protected]>

* Remove notifications pass through props

Signed-off-by: Derek Ho <[email protected]>

* Fix steps

Signed-off-by: Derek Ho <[email protected]>

* Remove edit buttons, delete files, update tests

Signed-off-by: Derek Ho <[email protected]>

* Finish fixing promtheus flow

Signed-off-by: Derek Ho <[email protected]>

* fix up s3 flow

Signed-off-by: Derek Ho <[email protected]>

* Hook up fields to actual call

Signed-off-by: Derek Ho <[email protected]>

* Update according to UX feedback and tests

Signed-off-by: Derek Ho <[email protected]>

* Add test

Signed-off-by: Derek Ho <[email protected]>

* Finish up test coverage for manage flow

Signed-off-by: Derek Ho <[email protected]>

---------

Signed-off-by: Derek Ho <[email protected]>
amsiglan pushed a commit to amsiglan/dashboards-observability that referenced this pull request Jun 7, 2024
* Update mocha (opensearch-project#960)
* added code for the change of design of the sidebar, fixed overriding … (opensearch-project#928)
* Refactor add_integration_flyout to break out nested methods (opensearch-project#956)
* [Log Explorer] Remove top level tabs (opensearch-project#970)
* Explorer's timeheader & color change (opensearch-project#959)
* Update caching (opensearch-project#965)
* Move query_utils to /public (opensearch-project#983)
* Remove Zeppelin Parser from Notebook (opensearch-project#985)
* Explorer empty bucket (opensearch-project#990)
* refactored classnames for sidebar (opensearch-project#933)
* Refactor Integrations Backend to abstract IO (opensearch-project#947)
* Create React component for Integrations Setup UI (opensearch-project#1009)
* Create Data sources plugin with Manage Datasources Flow  (opensearch-project#1035)
* Manage datasources (opensearch-project#967)
* Add acceleration management UI  (opensearch-project#989)
* Rename data sources to data connections (opensearch-project#1004)
* Add fallback to show if user does not have datasource API permissions (opensearch-project#1008)
* Add access control tab content (opensearch-project#992)
* Delete datasource and Connection Configuration Tab (opensearch-project#1024)
* adjust explorer chart color and spacing (opensearch-project#1051)
* Configure S3 datasource flow (opensearch-project#1049)
* Manage datasources (opensearch-project#967)
* Add acceleration management UI  (opensearch-project#989)
* Rename data sources to data connections (opensearch-project#1004)
* Add fallback to show if user does not have datasource API permissions (opensearch-project#1008)
* Add access control tab content (opensearch-project#992)
* Delete datasource and Connection Configuration Tab (opensearch-project#1024)
* modified explorer data grid to follow discover look and feel (opensearch-project#1041)
* Create prometheus datasource flow (opensearch-project#1054)
* Manage datasources (opensearch-project#967)
* Add acceleration management UI  (opensearch-project#989)
* Rename data sources to data connections (opensearch-project#1004)
* Add fallback to show if user does not have datasource API permissions (opensearch-project#1008)
* Add access control tab content (opensearch-project#992)
* Delete datasource and Connection Configuration Tab (opensearch-project#1024)
* added design changes for sidebar (opensearch-project#1061)
* updated snapshots (opensearch-project#1062)
* Update UI for integrations setup (opensearch-project#1052)
* Data sources UI improvements (opensearch-project#1059)
* adding redirection to datasources (opensearch-project#1063)
* Move convertDateTime, refactor query_utils (opensearch-project#1064)
* Setup S3 connection with integrations (opensearch-project#1057)
* Use approved svg from UX (opensearch-project#1066)
* Fix missing import 'moment' on query_utils. (opensearch-project#1067)

---------

Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: sumukhswamy <[email protected]>
Signed-off-by: Eric Wei <[email protected]>
Signed-off-by: Paul Sebastian <[email protected]>
Signed-off-by: Peter Fitzgibbons <[email protected]>
Signed-off-by: Shenoy Pratik <[email protected]>
Signed-off-by: Simeon Widdis <[email protected]>
Co-authored-by: sumukhswamy <[email protected]>
Co-authored-by: Eric Wei <[email protected]>
Co-authored-by: Paul Sebastian <[email protected]>
Co-authored-by: Peter Fitzgibbons <[email protected]>
Co-authored-by: Paul Sebastian <[email protected]>
Co-authored-by: Shenoy Pratik <[email protected]>
Co-authored-by: Simeon Widdis <[email protected]>
(cherry picked from commit 171acde)
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.

4 participants