builder.append("=======================================" + OsUtils.LINE_SEPARATOR);
builder.append("* Server Info *" + OsUtils.LINE_SEPARATOR);
builder.append("=======================================" + OsUtils.LINE_SEPARATOR);
builder.append( OsUtils.LINE_SEPARATOR );
ServerInfo info = datastore.findServerInfo( name );
if( info == null ) {
return "None found";
}
output( builder, pad20("Name: "), info.getName() );
output( builder, pad20("Host: "), info.getHost() );
output( builder, pad20("Port:"), info.getPort().toString() );
output( builder, pad20("Keyfile: "), nullVariant(info.getKeyFile()) );
output( builder, pad20("CheckHostKey: "), nullVariant(info.getCheckHostKey()) );
output( builder, pad20("Username: "), nullVariant(info.getUsername()) );
output( builder, pad20("Password: "), nullVariant( "****" ) );
builder.append( OsUtils.LINE_SEPARATOR );
for(PortForwarding pf : info.getPortForwardings() ) {
builder.append("== Port Forwarding" + OsUtils.LINE_SEPARATOR );
output( builder, pad20("Name: "), pf.getName() );
output( builder, pad20("Type: "), nullVariant( pf.getType() ) );
output( builder, pad20("Description: "), nullVariant( pf.getDescription() ) );
output( builder, pad20("Remote Host: "), pf.getRemoteHost() );
output( builder, pad20("Remote Port: "), pf.getRemotePort().toString() );
output( builder, pad20("Local Port: "), nullVariant( pf.getLocalPort() ) );
builder.append("==" + OsUtils.LINE_SEPARATOR );
}
for(ServerLink link : info.getLinks() ) {
builder.append("== Link" + OsUtils.LINE_SEPARATOR );
output( builder, pad20("Name: "), link.getTarget() );
output( builder, pad20("Local Port: "), link.getLocalPort().toString() );
builder.append("==" + OsUtils.LINE_SEPARATOR );
}