Add reset action to VM management.
This commit is contained in:
parent
af41c78c07
commit
8d96307bb5
7 changed files with 126 additions and 18 deletions
|
|
@ -785,6 +785,20 @@ public class VmAccess extends FreeMarkerConlet<VmAccess.ResourceModel> {
|
|||
}
|
||||
}
|
||||
|
||||
private void confirmReset(NotifyConletModel event,
|
||||
ConsoleConnection channel, ResourceModel model,
|
||||
ResourceBundle resourceBundle) throws TemplateNotFoundException,
|
||||
MalformedTemplateNameException, ParseException, IOException {
|
||||
Template tpl = freemarkerConfig()
|
||||
.getTemplate("VmAccess-confirmReset.ftl.html");
|
||||
channel.respond(new OpenModalDialog(type(), model.getConletId(),
|
||||
processTemplate(event, tpl,
|
||||
fmModel(event, channel, model.getConletId(), model)))
|
||||
.addOption("cancelable", true).addOption("closeLabel", "")
|
||||
.addOption("title",
|
||||
resourceBundle.getString("confirmResetTitle")));
|
||||
}
|
||||
|
||||
private void openConsole(ConsoleConnection channel, ResourceModel model,
|
||||
VmChannel vmChannel, VmDefinition vmDef, Set<Permission> perms) {
|
||||
var resourceBundle = resourceBundle(channel.locale());
|
||||
|
|
@ -828,20 +842,6 @@ public class VmAccess extends FreeMarkerConlet<VmAccess.ResourceModel> {
|
|||
}
|
||||
}
|
||||
|
||||
private void confirmReset(NotifyConletModel event,
|
||||
ConsoleConnection channel, ResourceModel model,
|
||||
ResourceBundle resourceBundle) throws TemplateNotFoundException,
|
||||
MalformedTemplateNameException, ParseException, IOException {
|
||||
Template tpl = freemarkerConfig()
|
||||
.getTemplate("VmAccess-confirmReset.ftl.html");
|
||||
channel.respond(new OpenModalDialog(type(), model.getConletId(),
|
||||
processTemplate(event, tpl,
|
||||
fmModel(event, channel, model.getConletId(), model)))
|
||||
.addOption("cancelable", true).addOption("closeLabel", "")
|
||||
.addOption("title",
|
||||
resourceBundle.getString("confirmResetTitle")));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean doSetLocale(SetLocale event, ConsoleConnection channel,
|
||||
String conletId) throws Exception {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue