Skip to content

Issue 6375 - UI - Update cockpit.js code to the latest version #6376

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

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

droideck
Copy link
Member

Description: Update src/cockpit/389-console/pkg/lib/cockpit.js to the latest version.
Update the entire src/cockpit/389-console/pkg/lib directory from Cockpit's repository.
Update package.json.

Fixes: #6375

Reviewed by: ?

@droideck droideck marked this pull request as draft October 21, 2024 22:23
@droideck
Copy link
Member Author

Okay, I've tried to do this without the Patternfly 4 -> 5 upgrade, and it didn't work correctly.
The porting should not be very hard, but it's a bit time-consuming. Select and table components are the main issues:
https://www.patternfly.org/get-started/upgrade/

I'll be back from PTO in 10 days. If we need it sooner, feel free to continue the PR. Otherwise, I'll finish when I return.

Copy link
Contributor

@progier389 progier389 left a comment

Choose a reason for hiding this comment

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

Although I have not found anything suspicious,
because of the amount of changes, it is quite hard to understand the global impact.
So my feeling is that we should go ahead and merge this PR then fully test cockpit again.

@droideck
Copy link
Member Author

Although I have not found anything suspicious, because of the amount of changes, it is quite hard to understand the global impact. So my feeling is that we should go ahead and merge this PR then fully test cockpit again.

I still need to finish Tables. We have a lot of warnings otherwise (and the migration script complains about elements, even though generally, tables-deprecated works)

So I first finish all of the tables, and then we can merge and test it, yep...

@droideck droideck force-pushed the upgrade-cockpit branch 6 times, most recently from 060fb7f to c9090a5 Compare November 22, 2024 04:31
@droideck
Copy link
Member Author

Okay, it's ready for review!
P.S. I still need to replace FontAwesomeIcons as they throw warnings but it should not affect other content review.

@droideck droideck marked this pull request as ready for review November 22, 2024 04:33
@droideck droideck force-pushed the upgrade-cockpit branch 2 times, most recently from 6fb7815 to e6a1405 Compare November 26, 2024 01:01
@mreynolds389
Copy link
Contributor

Not sure how you want to handle this, but your new tables seem to be missing the "compact" setting

--- a/src/cockpit/389-console/src/lib/server/errorLog.jsx
+++ b/src/cockpit/389-console/src/lib/server/errorLog.jsx
@@ -501,7 +501,7 @@ export class ServerErrorLog extends React.Component {
     handleOnSelect = (_event, isSelected, rowIndex) => {
         let disableSaveBtn = true;
         const rows = [...this.state.rows];
-        
+
         // Update the selected row
         rows[rowIndex].selected = isSelected;
 
@@ -596,6 +596,7 @@ export class ServerErrorLog extends React.Component {
                             <Table
                                 aria-label="Selectable Error Log Levels"
                                 className="ds-left-margin"
+                                variant="compact"
                             >
                                 <Thead>
                                     <Tr>

Not every table "is compact" but I think almost all of them were:

variant={TableVariant.compact}   --->   variant="compact"

It might be easier to fix this now than in a different PR. Thoughts?

@mreynolds389
Copy link
Contributor

Browser crash

Monitor -> Database -> "dc=example,dc=com":

suffixMonitor.jsx:166 Uncaught TypeError: Cannot read properties of undefined (reading '0')
    at Function.<anonymous> (suffixMonitor.jsx:166:50)
    at process_queue (deferred.js:124:33)
    at deferred.js:137:31
    at later_drain (deferred.js:18:9)

Also, it looks like most of the tables are compact, so maybe it's just the logging level tables?

@mreynolds389
Copy link
Contributor

Browser crash

Monitor -> Database -> "dc=example,dc=com":

suffixMonitor.jsx:166 Uncaught TypeError: Cannot read properties of undefined (reading '0')
    at Function.<anonymous> (suffixMonitor.jsx:166:50)
    at process_queue (deferred.js:124:33)
    at deferred.js:137:31
    at later_drain (deferred.js:18:9)

Ok this was not a regression in your patch. This is also crashing in main (bdb vs mdb issue)

Copy link
Contributor

@mreynolds389 mreynolds389 left a comment

Choose a reason for hiding this comment

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

Please update the logging level tables to be compact, and double check there are no more tables that might be missing the compact variant. Otherwise looks good!!

Description: Update src/cockpit/389-console/pkg/lib/cockpit.js to the latest version.
Update the entire src/cockpit/389-console/pkg/lib directory from Cockpit's repository.
Update package.json.
Update 389 DS UI components to PF5.

Fixes: 389ds#6375

Reviewed by: @progier389, @mreynolds389 (Thanks!!)
@droideck
Copy link
Member Author

droideck commented Dec 2, 2024

It might be easier to fix this now than in a different PR. Thoughts?

Sounds good!

Ok this was not a regression in your patch. This is also crashing in main (bdb vs mdb issue)

Yeah, it won't be one line fix, MDB/BDB wise, - we'll need another PR.

As for this, changes are done... Please, review:)

@droideck droideck merged commit 976f43e into 389ds:main Dec 2, 2024
199 checks passed
droideck added a commit to droideck/389-ds-base that referenced this pull request Jan 8, 2025
…#6376)

Description: Update src/cockpit/389-console/pkg/lib/cockpit.js to the latest version.
Update the entire src/cockpit/389-console/pkg/lib directory from Cockpit's repository.
Update package.json.
Update 389 DS UI components to PF5.

Fixes: 389ds#6375

Reviewed by: @progier389, @mreynolds389 (Thanks!!)
droideck added a commit to droideck/389-ds-base that referenced this pull request Jan 30, 2025
…#6376)

Description: Update src/cockpit/389-console/pkg/lib/cockpit.js to the latest version.
Update the entire src/cockpit/389-console/pkg/lib directory from Cockpit's repository.
Update package.json.
Update 389 DS UI components to PF5.

Fixes: 389ds#6375

Reviewed by: @progier389, @mreynolds389 (Thanks!!)
droideck added a commit to droideck/389-ds-base that referenced this pull request Jan 30, 2025
…#6376)

Description: Update src/cockpit/389-console/pkg/lib/cockpit.js to the latest version.
Update the entire src/cockpit/389-console/pkg/lib directory from Cockpit's repository.
Update package.json.
Update 389 DS UI components to PF5.

Fixes: 389ds#6375

Reviewed by: @progier389, @mreynolds389 (Thanks!!)
droideck added a commit that referenced this pull request Jan 30, 2025
Description: Update src/cockpit/389-console/pkg/lib/cockpit.js to the latest version.
Update the entire src/cockpit/389-console/pkg/lib directory from Cockpit's repository.
Update package.json.
Update 389 DS UI components to PF5.

Fixes: #6375

Reviewed by: @progier389, @mreynolds389 (Thanks!!)
droideck added a commit to droideck/389-ds-base that referenced this pull request Jan 30, 2025
…#6376)

Description: Update src/cockpit/389-console/pkg/lib/cockpit.js to the latest version.
Update the entire src/cockpit/389-console/pkg/lib directory from Cockpit's repository.
Update package.json.
Update 389 DS UI components to PF5.

Fixes: 389ds#6375

Reviewed by: @progier389, @mreynolds389 (Thanks!!)
droideck added a commit to droideck/389-ds-base that referenced this pull request Jan 30, 2025
…#6376)

Description: Update src/cockpit/389-console/pkg/lib/cockpit.js to the latest version.
Update the entire src/cockpit/389-console/pkg/lib directory from Cockpit's repository.
Update package.json.
Update 389 DS UI components to PF5.

Fixes: 389ds#6375

Reviewed by: @progier389, @mreynolds389 (Thanks!!)
droideck added a commit to droideck/389-ds-base that referenced this pull request Jan 31, 2025
…#6376)

Description: Update src/cockpit/389-console/pkg/lib/cockpit.js to the latest version.
Update the entire src/cockpit/389-console/pkg/lib directory from Cockpit's repository.
Update package.json.
Update 389 DS UI components to PF5.

Fixes: 389ds#6375

Reviewed by: @progier389, @mreynolds389 (Thanks!!)
droideck added a commit that referenced this pull request Jan 31, 2025
Description: Update src/cockpit/389-console/pkg/lib/cockpit.js to the latest version.
Update the entire src/cockpit/389-console/pkg/lib directory from Cockpit's repository.
Update package.json.
Update 389 DS UI components to PF5.

Fixes: #6375

Reviewed by: @progier389, @mreynolds389 (Thanks!!)
droideck added a commit that referenced this pull request Jan 31, 2025
Description: Update src/cockpit/389-console/pkg/lib/cockpit.js to the latest version.
Update the entire src/cockpit/389-console/pkg/lib directory from Cockpit's repository.
Update package.json.
Update 389 DS UI components to PF5.

Fixes: #6375

Reviewed by: @progier389, @mreynolds389 (Thanks!!)
droideck added a commit to droideck/389-ds-base that referenced this pull request Jan 31, 2025
…#6376)

Description: Update src/cockpit/389-console/pkg/lib/cockpit.js to the latest version.
Update the entire src/cockpit/389-console/pkg/lib directory from Cockpit's repository.
Update package.json.
Update 389 DS UI components to PF5.

Fixes: 389ds#6375

Reviewed by: @progier389, @mreynolds389 (Thanks!!)
droideck added a commit to droideck/389-ds-base that referenced this pull request Jan 31, 2025
…#6376)

Description: Update src/cockpit/389-console/pkg/lib/cockpit.js to the latest version.
Update the entire src/cockpit/389-console/pkg/lib directory from Cockpit's repository.
Update package.json.
Update 389 DS UI components to PF5.

Fixes: 389ds#6375

Reviewed by: @progier389, @mreynolds389 (Thanks!!)
droideck added a commit to droideck/389-ds-base that referenced this pull request Jan 31, 2025
…#6376)

Description: Update src/cockpit/389-console/pkg/lib/cockpit.js to the latest version.
Update the entire src/cockpit/389-console/pkg/lib directory from Cockpit's repository.
Update package.json.
Update 389 DS UI components to PF5.

Fixes: 389ds#6375

Reviewed by: @progier389, @mreynolds389 (Thanks!!)
droideck added a commit to droideck/389-ds-base that referenced this pull request Jan 31, 2025
…#6376)

Description: Update src/cockpit/389-console/pkg/lib/cockpit.js to the latest version.
Update the entire src/cockpit/389-console/pkg/lib directory from Cockpit's repository.
Update package.json.
Update 389 DS UI components to PF5.

Fixes: 389ds#6375

Reviewed by: @progier389, @mreynolds389 (Thanks!!)
droideck added a commit that referenced this pull request Jan 31, 2025
Description: Update src/cockpit/389-console/pkg/lib/cockpit.js to the latest version.
Update the entire src/cockpit/389-console/pkg/lib directory from Cockpit's repository.
Update package.json.
Update 389 DS UI components to PF5.

Fixes: #6375

Reviewed by: @progier389, @mreynolds389 (Thanks!!)
droideck added a commit to droideck/389-ds-base that referenced this pull request Jan 31, 2025
…#6376)

Description: Update src/cockpit/389-console/pkg/lib/cockpit.js to the latest version.
Update the entire src/cockpit/389-console/pkg/lib directory from Cockpit's repository.
Update package.json.
Update 389 DS UI components to PF5.

Fixes: 389ds#6375

Reviewed by: @progier389, @mreynolds389 (Thanks!!)
droideck added a commit to droideck/389-ds-base that referenced this pull request Jan 31, 2025
…#6376)

Description: Update src/cockpit/389-console/pkg/lib/cockpit.js to the latest version.
Update the entire src/cockpit/389-console/pkg/lib directory from Cockpit's repository.
Update package.json.
Update 389 DS UI components to PF5.

Fixes: 389ds#6375

Reviewed by: @progier389, @mreynolds389 (Thanks!!)
droideck added a commit that referenced this pull request Feb 5, 2025
Description: Update src/cockpit/389-console/pkg/lib/cockpit.js to the latest version.
Update the entire src/cockpit/389-console/pkg/lib directory from Cockpit's repository.
Update package.json.
Update 389 DS UI components to PF5.

Fixes: #6375

Reviewed by: @progier389, @mreynolds389 (Thanks!!)
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.

UI - Update cockpit.js code to the latest version
3 participants