Skip to content

Commit

Permalink
Issue 50780 - Fix UI issues
Browse files Browse the repository at this point in the history
Description:  Fixed issue with replication conflict entry modal, and
              problem with the monitor's replication and suffix
              state data collision that caused a crash if you first
              looked at replication and then the suffix monitor

relates: https://pagure.io/389-ds-base/issue/50780

Reviewed by: spichugi(Thanks!)
  • Loading branch information
mreynolds389 committed Dec 17, 2019
1 parent 60c1831 commit e6c6c4a
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/cockpit/389-console/src/css/ds.css
Original file line number Diff line number Diff line change
Expand Up @@ -316,11 +316,11 @@ td {
min-width: 350px !important;
}

.ds-modal-wide {
.ds-modal-wide .modal-content {
width: 875px !important;
min-width: 875px !important;
vertical-align: middle;
margin-left: -100px !important;
margin-left: -90px !important;
}

.ds-button-right {
Expand Down Expand Up @@ -553,7 +553,7 @@ textarea {
}

.ds-conflict-btn {
width: 110px;
width: 150px;
}

option {
Expand Down
3 changes: 3 additions & 0 deletions src/cockpit/389-console/src/database.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,9 @@ export class Database extends React.Component {
for (let el of elements) {
el.setAttribute('title', el.innerText);
}
this.setState({
disableTree: false
});
}

showSuffixModal () {
Expand Down
4 changes: 2 additions & 2 deletions src/cockpit/389-console/src/lib/monitor/monitorModals.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ class ConflictCompareModal extends React.Component {
<Icon type="pf" name="close" />
</button>
<Modal.Title>
Resolve Replication Conflicts
Resolve Replication Conflict
</Modal.Title>
</Modal.Header>
<Modal.Body>
Expand Down Expand Up @@ -580,7 +580,7 @@ class ConflictCompareModal extends React.Component {
<h4>You can convert the <b>Conflict Entry</b> into a new valid entry by providing a new RDN value below, like "<i>cn=NEW_RDN</i>"</h4>
</Row>
<Row>
<Col sm={2}>
<Col sm={3}>
<Button
bsStyle="primary"
className="ds-conflict-btn"
Expand Down
3 changes: 3 additions & 0 deletions src/cockpit/389-console/src/lib/monitor/monitorTables.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ class AbortCleanALLRUVTable extends React.Component {
return [
<td key={rowData.name[0]}>
<Button
bsStyle="primary"
onClick={() => {
this.props.viewLog(this.props.viewLog(rowData.name));
}}
Expand Down Expand Up @@ -321,6 +322,7 @@ class CleanALLRUVTable extends React.Component {
return [
<td key={rowData.name[0]}>
<Button
bsStyle="primary"
onClick={() => {
this.props.viewLog(rowData.name);
}}
Expand Down Expand Up @@ -1495,6 +1497,7 @@ class ConflictTable extends React.Component {
return [
<td key={rowData.dn[0]}>
<Button
bsStyle="primary"
onClick={() => {
this.props.resolveConflict(rowData.dn[0]);
}}
Expand Down
5 changes: 4 additions & 1 deletion src/cockpit/389-console/src/monitor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,10 @@ export class Monitor extends React.Component {
};
});
} else {
if (selectedNode.id in this.state) {
if (selectedNode.id in this.state &&
("chainingData" in this.state[selectedNode.id] ||
"suffixData" in this.state[selectedNode.id])
) {
// This suffix is already cached
this.setState(prevState => {
return {
Expand Down
2 changes: 1 addition & 1 deletion src/lib389/lib389/replica.py
Original file line number Diff line number Diff line change
Expand Up @@ -1169,7 +1169,7 @@ def _lint_conflicts(self):
if len(conflicts) > 0:
report = copy.deepcopy(DSREPLLE0002)
report['detail'] = report['detail'].replace('SUFFIX', suffix)
report['detail'] = report['detail'].replace('COUNT', len(conflicts))
report['detail'] = report['detail'].replace('COUNT', str(len(conflicts)))
report['fix'] = report['fix'].replace('YOUR_INSTANCE', self._instance.serverid)
yield report

Expand Down

0 comments on commit e6c6c4a

Please sign in to comment.