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

PR - Issue 50836 - Port Schema UI tab to React #3891

Closed
389-ds-bot opened this issue Sep 13, 2020 · 20 comments
Closed

PR - Issue 50836 - Port Schema UI tab to React #3891

389-ds-bot opened this issue Sep 13, 2020 · 20 comments
Labels
merged Migration flag - PR pr Migration flag - PR

Comments

@389-ds-bot
Copy link

389-ds-bot commented Sep 13, 2020

Cloned from Pagure Pull-Request: https://pagure.io/389-ds-base/pull-request/50837

  • Created at 2020-01-21 18:14:03 by spichugi (@droideck)
  • Merged at 2020-01-22 22:27:08

Description: Port the schema UI tab to React and preserve all
existing features.

Resolves: #3890

Reviewed by: ?

@389-ds-bot 389-ds-bot added merged Migration flag - PR pr Migration flag - PR labels Sep 13, 2020
@389-ds-bot
Copy link
Author

Comment from mreynolds (@mreynolds389) at 2020-01-21 20:01:37

Can we merge the two setState functions into this one?

@389-ds-bot
Copy link
Author

Comment from mreynolds (@mreynolds389) at 2020-01-21 20:03:54

This can be removed :)

@389-ds-bot
Copy link
Author

Comment from mreynolds (@mreynolds389) at 2020-01-21 20:14:56

I think you are missing a file from your PR, I can not build the server:

ERROR in ./src/schema.jsx
Module not found: Error: Can't resolve './lib/schema/schemaTables.jsx' in '/home/mareynol/source/ds389/389-ds-base/src/cockpit/389-console/src'

@389-ds-bot
Copy link
Author

Comment from spichugi (@droideck) at 2020-01-21 20:44:14

rebased onto 8d415b6564c963469b8e8fe27879632a155b1d23

@389-ds-bot
Copy link
Author

Comment from spichugi (@droideck) at 2020-01-21 20:45:12

I've put the files to PR. Please, check.

@389-ds-bot
Copy link
Author

Comment from spichugi (@droideck) at 2020-01-21 23:29:36

1 new commit added

  • Remove old code and fix couple of issues

@389-ds-bot
Copy link
Author

Comment from spichugi (@droideck) at 2020-01-21 23:30:08

Can we merge the two setState functions into this one?

Fixed.

This can be removed :)

Fixed.

@389-ds-bot
Copy link
Author

Comment from mreynolds (@mreynolds389) at 2020-01-22 00:17:36

Clicking on Schema tab crashes browser:

TypeError: rowData.x_origin is null
schemaTables.jsx:333:36
    formatters schemaTables.jsx:333
    evaluateFormatters evaluate-formatters.js:10
    reduce self-hosted:303
    evaluateFormatters evaluate-formatters.js:8
    render body-row.js:120
    map self-hosted:251
    render body-row.js:90
    React 13
    toggleLoading schema.jsx:113
    toggleLoading self-hosted:880
    loadSchemaData schema.jsx:214
    s cockpit.js:979
    f cockpit.js:991
    n cockpit.js:897
The above error occurred in the <BodyRow> component:
    in BodyRow (created by Body)
    in tbody (created by Body)
    in Body (created by DSTable)
    in table (created by Provider)
    in Provider (created by TablePfProvider)
    in TablePfProvider (created by DSTable)
    in div (created by DSTable)
    in DSTable (created by AttributesTable)
    in div (created by AttributesTable)
    in AttributesTable (created by Schema)
    in div (created by Schema)
    in div (created by TabPane)
    in Transition (created by Fade)
    in Fade (created by TabPane)
    in TabPane (created by Schema)
    in div (created by TabContent)
    in TabContent (created by Schema)
    in div (created by Schema)
    in TabContainer (created by Uncontrolled(TabContainer))
    in Uncontrolled(TabContainer) (created by Schema)
    in div (created by Schema)
    in div (created by Schema)
    in div (created by Schema)
    in Schema

@389-ds-bot
Copy link
Author

Comment from spichugi (@droideck) at 2020-01-22 00:43:01

1 new commit added

  • Fix the issue when x_origin is null

@389-ds-bot
Copy link
Author

Comment from spichugi (@droideck) at 2020-01-22 00:44:25

Hm, it doesn't crash the browser when I click on Schema but if I search for the attribute which has x_origin == null - it crashes.

This commit should fix it. Please check.

@389-ds-bot
Copy link
Author

Comment from mreynolds (@mreynolds389) at 2020-01-22 07:04:51

Better, but when I try to add a new attribute i get a usage error:

tools.jsx:58 CMD: cmdOperationAttribute: Do the add operation on Attribute ==> dsconf -j ldapi://%2fvar%2frun%2fslapd-localhost.socket schema attributetypes add mark --single-value --user-mod --oid  --usage userApplications --desc mark --sup  --equality  --substr  --ordering 

cockpit.js:606 usage: dsconf instance schema attributetypes add [-h] [--oid OID]
                                                 [--desc DESC]
                                                 [--x-origin X_ORIGIN]
                                                 [--aliases ALIASES [ALIASES ...]]
                                                 [--single-value]
                                                 [--multi-value]
                                                 [--no-user-mod] [--user-mod]
                                                 [--equality EQUALITY]
                                                 [--substr SUBSTR]
                                                 [--ordering ORDERING]
                                                 [--usage USAGE]
                                                 [--sup SUP [SUP ...]]
                                                 --syntax SYNTAX
                                                 name
dsconf instance schema attributetypes add: error: the following arguments are required: --syntax

We now need "--syntax "

@389-ds-bot
Copy link
Author

Comment from spichugi (@droideck) at 2020-01-22 11:17:43

1 new commit added

  • Add field validation

@389-ds-bot
Copy link
Author

Comment from spichugi (@droideck) at 2020-01-22 11:19:37

Yeah, I was about to add it but then I decided to create the PR sooner for the initial review.
Now it the field validation is added, please check.

@389-ds-bot
Copy link
Author

Comment from mreynolds (@mreynolds389) at 2020-01-22 17:57:14

On FF there is no space between the checkbox and the label for user-defined classes.

When adding an objectclass, the tab just starts reloading, but doesn't say its saving, just says that the page is reloading. This is confusing

When I click on "view objectclass" it also showing the loading page. It should just open the modal, not reload the entire tab every time I want to look at an objectclass. So there's some weird toggling going on for these tasks. Also viewing an objectclass does not show the allowed attributes.

Same issue when deleting an objectclass. When you choose delete the pages just says "Loading schema". Then a notification finally pops up saying the delete was successful.

On the objectclass table if I reset the page size the browser crashes (for the Attribute table it works correctly):

TypeError: rowData.x_origin is undefined
schemaTables.jsx:125:36
The above error occurred in the <BodyRow> component:
    in BodyRow (created by Body)
    in tbody (created by Body)
    in Body (created by DSTable)
    in table (created by Provider)
    in Provider (created by TablePfProvider)
    in TablePfProvider (created by DSTable)
    in div (created by DSTable)
    in DSTable (created by ObjectClassesTable)
    in div (created by ObjectClassesTable)
    in ObjectClassesTable (created by Schema)
    in div (created by Schema)
    in div (created by TabPane)
    in Transition (created by Fade)
    in Fade (created by TabPane)
    in TabPane (created by Schema)
    in div (created by TabContent)
    in TabContent (created by Schema)
    in div (created by Schema)
    in TabContainer (created by Uncontrolled(TabContainer))
    in Uncontrolled(TabContainer) (created by Schema)
    in div (created by Schema)
    in div (created by Schema)
    in div (created by Schema)
    in Schema

@389-ds-bot
Copy link
Author

Comment from spichugi (@droideck) at 2020-01-22 20:40:45

rebased onto 084799802b14b0fe7688d2d7a586fb59e4402470

@389-ds-bot
Copy link
Author

Comment from spichugi (@droideck) at 2020-01-22 20:43:14

On FF there is no space between the checkbox and the label for user-defined classes.

Fixed.

When adding an objectclass, the tab just starts reloading, but doesn't say its saving, just says that the page is reloading. This is confusing
When I click on "view objectclass" it also showing the loading page. It should just open the modal, not reload the entire tab every time I want to look at an objectclass. So there's some weird toggling going on for these tasks. Also viewing an objectclass does not show the allowed attributes.
Same issue when deleting an objectclass. When you choose delete the pages just says "Loading schema". Then a notification finally pops up saying the delete was successful.

I agree, it's a bit confusing. I've split the spinners to 3 kinds: global, table, modal.

On the objectclass table if I reset the page size the browser crashes (for the Attribute table it works correctly)

Works for me but I've added an additional precaution check.

Please, review.

@389-ds-bot
Copy link
Author

Comment from mreynolds (@mreynolds389) at 2020-01-22 21:29:43

For objectclasses and attributes I still don't see a space between the checkbox and the label Only Non-standard Schema (attributes with X-ORIGIN: "user defined")

Everything else is good!

@389-ds-bot
Copy link
Author

Comment from spichugi (@droideck) at 2020-01-22 22:25:56

rebased onto 2ebdd30

@389-ds-bot
Copy link
Author

Comment from spichugi (@droideck) at 2020-01-22 22:27:08

Pull-Request has been merged by droideck

@389-ds-bot
Copy link
Author

Patch
50837.patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged Migration flag - PR pr Migration flag - PR
Projects
None yet
Development

No branches or pull requests

1 participant