Make VM extra data a class.
This commit is contained in:
parent
d5e589709f
commit
d27339b1e9
7 changed files with 208 additions and 123 deletions
|
|
@ -810,13 +810,12 @@ public class VmAccess extends FreeMarkerConlet<VmAccess.ResourceModel> {
|
|||
}
|
||||
var pwQuery = Event.onCompletion(new GetDisplayPassword(vmDef, user),
|
||||
e -> {
|
||||
var data = vmDef.connectionFile(e.password().orElse(null),
|
||||
preferredIpVersion, deleteConnectionFile);
|
||||
if (data == null) {
|
||||
return;
|
||||
}
|
||||
channel.respond(new NotifyConletView(type(),
|
||||
model.getConletId(), "openConsole", data));
|
||||
vmDef.extra()
|
||||
.map(xtra -> xtra.connectionFile(e.password().orElse(null),
|
||||
preferredIpVersion, deleteConnectionFile))
|
||||
.ifPresent(
|
||||
cf -> channel.respond(new NotifyConletView(type(),
|
||||
model.getConletId(), "openConsole", cf)));
|
||||
});
|
||||
fire(pwQuery, vmChannel);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue