Issue 6429 - UI - clicking on a database suffix under the Monitor tab crashes UI - #6610
Merged
Conversation
Contributor
|
@jchapma can you rebase with main so I can test this? Thanks! |
… crashes UI Bug description: Clicking on a db suffix under the MOnitor tab causes the UI to crash when the instance is configured with the mdb db engine. Fix description: Introduced separate database and suffix monitor classes tailored for mdb. Parent class detects the configured db engine and calls the appropriate monitor class. Fixes: 389ds#6429 Reviewed by:
droideck
requested changes
Mar 4, 2025
droideck
left a comment
Member
There was a problem hiding this comment.
Couple of issues, otherwise, looks good!
Comment on lines
-1261
to
-1269
|
|
||
| // Check if have any errors on our attributes | ||
| for (const config_attr of check_attrs) { | ||
| if (config_attr in this.state.error && this.state.error[config_attr]) { | ||
| saveBtnDisabled = true; | ||
| break; | ||
| } | ||
| } | ||
|
|
Member
There was a problem hiding this comment.
Why remove the code? The removal is not mentioned in the commit message and, IIUC, the code has a purpose.
Contributor
Author
There was a problem hiding this comment.
This section was removed in the rebase,I will add it back.
Comment on lines
+592
to
+610
| getDBEngine () { | ||
| const cmd = [ | ||
| "dsconf", "-j", "ldapi://%2fvar%2frun%2fslapd-" + this.props.serverId + ".socket", | ||
| "backend", "config", "get" | ||
| ]; | ||
| log_cmd("getDBEngine", "Get DB Implementation", cmd); | ||
| cockpit | ||
| .spawn(cmd, { superuser: true, err: "message" }) | ||
| .done(content => { | ||
| const config = JSON.parse(content); | ||
| const attrs = config.attrs; | ||
| if ('nsslapd-backend-implement' in attrs) { | ||
| this.setState({ | ||
| dbEngine: attrs['nsslapd-backend-implement'][0], | ||
| }); | ||
| } | ||
| }); | ||
| } | ||
|
|
Member
There was a problem hiding this comment.
If this function fails, I think, we need to report an error in a .fail(error section.
jchapma
added a commit
that referenced
this pull request
Mar 6, 2025
… crashes UI (#6610) Bug description: Clicking on a db suffix under the Monitor tab causes the UI to crash when the instance is configured with the mdb db engine. Fix description: Introduced separate database and suffix monitor classes tailored for mdb. Parent class detects the configured db engine and calls the appropriate monitor class. Fixes: #6429 Reviewed by: @mreynolds389, @droideck (Thank you)
jchapma
added a commit
that referenced
this pull request
Mar 6, 2025
… crashes UI (#6610) Bug description: Clicking on a db suffix under the Monitor tab causes the UI to crash when the instance is configured with the mdb db engine. Fix description: Introduced separate database and suffix monitor classes tailored for mdb. Parent class detects the configured db engine and calls the appropriate monitor class. Fixes: #6429 Reviewed by: @mreynolds389, @droideck (Thank you)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug description:
Clicking on a db suffix under the Monitor tab causes the UI to crash when the instance is configured with the mdb db engine.
Fix description:
Introduced separate database and suffix monitor classes tailored for mdb. Parent class detects the configured db engine and calls the appropriate monitor class.
Fixes: #6429
Reviewed by: