#50782 Issue 50780 - Fix UI issues
Closed 3 years ago by spichugi. Opened 4 years ago by mreynolds.
mreynolds/389-ds-base issue50780  into  master

@@ -316,11 +316,11 @@ 

      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 {
@@ -553,7 +553,7 @@ 

  }

  

  .ds-conflict-btn {

-     width: 110px;

+     width: 150px;

  }

  

  option {

@@ -556,6 +556,9 @@ 

          for (let el of elements) {

              el.setAttribute('title', el.innerText);

          }

+         this.setState({

+             disableTree: false

+         });

      }

  

      showSuffixModal () {

@@ -544,7 +544,7 @@ 

                              <Icon type="pf" name="close" />

                          </button>

                          <Modal.Title>

-                             Resolve Replication Conflicts

+                             Resolve Replication Conflict

                          </Modal.Title>

                      </Modal.Header>

                      <Modal.Body>
@@ -580,7 +580,7 @@ 

                                      <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"

@@ -123,6 +123,7 @@ 

                                  return [

                                      <td key={rowData.name[0]}>

                                          <Button

+                                             bsStyle="primary"

                                              onClick={() => {

                                                  this.props.viewLog(this.props.viewLog(rowData.name));

                                              }}
@@ -321,6 +322,7 @@ 

                                  return [

                                      <td key={rowData.name[0]}>

                                          <Button

+                                             bsStyle="primary"

                                              onClick={() => {

                                                  this.props.viewLog(rowData.name);

                                              }}
@@ -1495,6 +1497,7 @@ 

                                  return [

                                      <td key={rowData.dn[0]}>

                                          <Button

+                                             bsStyle="primary"

                                              onClick={() => {

                                                  this.props.resolveConflict(rowData.dn[0]);

                                              }}

@@ -352,7 +352,10 @@ 

                  };

              });

          } 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 {

file modified
+1 -1
@@ -1169,7 +1169,7 @@ 

              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

  

Description:

Fixed issue with replication conflict entry modal, and problem with the monitor's replication and suffix state data collision that cuased a crash if you first looked at replication and then the suffix monitor

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

I think this approach with repl- unnecessary rises the complexity...

It becomes harder to follow when repl- should be used in the code and when it shouldn't (you don't use it in reloadReplAgmts and reloadReplWinsyncAgmts, for example).

IMO, it'll be better to store all of the suffix data in one state as we do now.

And then we can check if we need to load the database data for suffixes or not:

src/cockpit/389-console/src/monitor.jsx
@@ -352,7 +352,11 @@ 
              };
          });
      } 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 {

Or maybe you can add more comments in the code...

rebased onto 8e6c4920b0b34d48b0468c2027c0057dad1f2f17

4 years ago

@spichugi - changes made please review...

rebased onto 7ffb2eb

4 years ago

Pull-Request has been merged by mreynolds

4 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/3837

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

3 years ago