Tal Nisan has uploaded a new change for review. Change subject: webadmin: Export template help tag incorrectly dispalys export vm help ......................................................................
webadmin: Export template help tag incorrectly dispalys export vm help Change-Id: I0fb15ede6a2d6b489e21e858b3cd274caddbc5f3 Bug-Url: https://bugzilla.redhat.com/1174042 Signed-off-by: Tal Nisan <tni...@redhat.com> --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/help/HelpTag.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/templates/TemplateListModel.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/templates/VmBaseListModel.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java 4 files changed, 16 insertions(+), 7 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/87/36187/1 diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/help/HelpTag.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/help/HelpTag.java index 29f6474..8420c70 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/help/HelpTag.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/help/HelpTag.java @@ -180,6 +180,8 @@ export_virtual_machine("export_virtual_machine", HelpTagType.WEBADMIN, "VMs Tab > Export Virtual Machine"), //$NON-NLS-1$ //$NON-NLS-2$ + export_template("export_template", HelpTagType.WEBADMIN, "Templates Tab > Export Template"), //$NON-NLS-1$ //$NON-NLS-2$ + external_subnets("external_subnets", HelpTagType.UNKNOWN), //$NON-NLS-1$ force_lun_disk_creation("force_lun_disk_creation", HelpTagType.WEBADMIN, "'New Disk' context (probably of type 'Direct LUN') -> confirmation dialog regarding LUNs that are already in use in a storage domain."), //$NON-NLS-1$ //$NON-NLS-2$ diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/templates/TemplateListModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/templates/TemplateListModel.java index 69388d6..8145718 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/templates/TemplateListModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/templates/TemplateListModel.java @@ -163,6 +163,9 @@ @Override protected void setupExportModel(ExportVmModel model) { super.setupExportModel(model); + model.setTitle(ConstantsManager.getInstance().getConstants().exportTemplateTitle()); + model.setHelpTag(HelpTag.export_template); + model.setHashName("export_template"); //$NON-NLS-1$ model.getCollapseSnapshots().setIsAvailable(false); } @@ -821,7 +824,7 @@ } else if (command == getExportCommand()) { - export(ConstantsManager.getInstance().getConstants().exportTemplateTitle()); + export(); } else if ("Cancel".equals(command.getName())) //$NON-NLS-1$ { diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/templates/VmBaseListModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/templates/VmBaseListModel.java index 86ecba7..f5e8129 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/templates/VmBaseListModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/templates/VmBaseListModel.java @@ -17,7 +17,6 @@ import org.ovirt.engine.ui.uicommonweb.Linq; import org.ovirt.engine.ui.uicommonweb.UICommand; import org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider; -import org.ovirt.engine.ui.uicommonweb.help.HelpTag; import org.ovirt.engine.ui.uicommonweb.models.ListWithDetailsAndReportsModel; import org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel; import org.ovirt.engine.ui.uicompat.ConstantsManager; @@ -25,7 +24,7 @@ public abstract class VmBaseListModel<T> extends ListWithDetailsAndReportsModel { - protected void export(String title) + protected void export() { T selectedEntity = (T) getSelectedItem(); if (selectedEntity == null) @@ -41,9 +40,6 @@ ExportVmModel model = new ExportVmModel(); setWindow(model); model.startProgress(null); - model.setTitle(title); - model.setHelpTag(HelpTag.export_virtual_machine); - model.setHashName("export_virtual_machine"); //$NON-NLS-1$ setupExportModel(model); AsyncDataProvider.getInstance().getStorageDomainList(new AsyncQuery(this, diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java index 4c85aae..34dc123 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java @@ -1259,6 +1259,14 @@ } } + @Override + protected void setupExportModel(ExportVmModel model) { + super.setupExportModel(model); + model.setTitle(constants.exportVirtualMachineTitle()); + model.setHelpTag(HelpTag.export_virtual_machine); + model.setHashName("export_virtual_machine"); //$NON-NLS-1$ + } + public void onExport() { ExportVmModel model = (ExportVmModel) getWindow(); @@ -2461,7 +2469,7 @@ } else if (command == getExportCommand()) { - export(ConstantsManager.getInstance().getConstants().exportVirtualMachineTitle()); + export(); } else if (command == getCreateSnapshotCommand()) { -- To view, visit http://gerrit.ovirt.org/36187 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0fb15ede6a2d6b489e21e858b3cd274caddbc5f3 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Tal Nisan <tni...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches