Add flag to admin replicate update to toggle synchronous replication (#4514)

This commit is contained in:
Poorna
2023-04-08 08:54:39 -07:00
committed by GitHub
parent a9fb9426f1
commit 2c3f0e8ccf
3 changed files with 38 additions and 12 deletions
+10 -5
View File
@@ -70,16 +70,21 @@ func (i srInfo) String() string {
Field{"Deployment ID", 36},
Field{"Name", 15},
Field{"Endpoint", 50},
).buildRow("Deployment ID", "Site Name", "Endpoint"))
Field{"Endpoint", 46},
Field{"Sync", 4},
).buildRow("Deployment ID", "Site Name", "Endpoint", "Sync"))
messages = append(messages, r)
for _, peer := range info.Sites {
var chk string
if peer.SyncState == madmin.SyncEnabled {
chk = check
}
r := console.Colorize("TDetail", newPrettyTable(" | ",
Field{"Deployment ID", 36},
Field{"Name", 15},
Field{"Endpoint", 50},
).buildRow(peer.DeploymentID, peer.Name, peer.Endpoint))
Field{"Endpoint", 46},
Field{"Sync", 4},
).buildRow(peer.DeploymentID, peer.Name, peer.Endpoint, chk))
messages = append(messages, r)
}
} else {