}
@Override
protected void updateComponentCustom(JPanel old) {
try {
MongoClient mongo = getMongoNode().getMongoClient();
setStringFieldValue(Item.version, mongo.getVersion());
ServerAddress master = mongo.getAddress();
if (master != null) {
setStringFieldValue(Item.masterServer, getServerAddressString(master));
}
List<ServerAddress> addrs = mongo.getAllAddress();
String html = "<html>";
for (ServerAddress addr : addrs) {
html += getServerAddressString(addr) + "<br/>";
}
html += "</html>";
setStringFieldValue(Item.seedServers, html);
addrs = mongo.getServerAddressList();
html = "<html>";
for (ServerAddress addr : addrs) {
// String ports = MongoUtils.makeInfoString("used", mongo.getConnector().getDBPortPool(addr).inUse(),
// "available", mongo.getConnector().getDBPortPool(addr).available(),
// "created", mongo.getConnector().getDBPortPool(addr).everCreated());
String txt = getServerAddressString(addr);
html += txt + "<br/>";
}
setStringFieldValue(Item.activeServers, html);
setStringFieldValue(Item.queryOptions, MongoUtils.queryOptionsToString(mongo.getOptions()));
((DocField) getBoundUnit(Item.writeConcern)).setDoc(mongo.getWriteConcern().getCommand());
((DocField) getBoundUnit(Item.readPreference)).setDoc(mongo.getReadPreference().toDBObject());
setStringFieldValue(Item.maxObjectSize, String.valueOf(mongo.getMaxBsonObjectSize()));
} catch (Exception e) {
UMongo.instance.showError(this.getClass().getSimpleName() + " update", e);
}
}