Daniel Erez has posted comments on this change.
Change subject: webadmin: add the image block alignment scan
......................................................................
Patch Set 1: I would prefer that you didn't submit this
(9 inline comments)
There's still some work left... other than that, nice work!
....................................................
File
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/disks/DisksViewColumns.java
Line 113: public static final DiskStatusColumn diskStatusColumn = new
DiskStatusColumn();
Line 114:
Line 115: public static final DiskContainersColumn diskContainersColumn =
new DiskContainersColumn();
Line 116:
Line 117: public static final TextColumnWithTooltip<Disk>
diskAlignmentColumn = new TextColumnWithTooltip<Disk>() {
Use FullDateTimeColumn instead
Line 118: @Override
Line 119: public String getValue(Disk object) {
Line 120: if (object.getLastAlignmentScan() != null) {
Line 121: DateTimeFormat lastScanDateFormat =
DateTimeFormat.getFormat("yyyy-MM-dd, HH:mm"); //$NON-NLS-1$
Line 117: public static final TextColumnWithTooltip<Disk>
diskAlignmentColumn = new TextColumnWithTooltip<Disk>() {
Line 118: @Override
Line 119: public String getValue(Disk object) {
Line 120: if (object.getLastAlignmentScan() != null) {
Line 121: DateTimeFormat lastScanDateFormat =
DateTimeFormat.getFormat("yyyy-MM-dd, HH:mm"); //$NON-NLS-1$
already implemented in FullDateTimeColumn
Line 122: getCell().setTitle(constants.lastDiskAlignmentScan() +
Line 123: ": " +
lastScanDateFormat.format(object.getLastAlignmentScan())); //$NON-NLS-1$
Line 124: } else {
Line 125: getCell().setTitle(null);
Line 118: @Override
Line 119: public String getValue(Disk object) {
Line 120: if (object.getLastAlignmentScan() != null) {
Line 121: DateTimeFormat lastScanDateFormat =
DateTimeFormat.getFormat("yyyy-MM-dd, HH:mm"); //$NON-NLS-1$
Line 122: getCell().setTitle(constants.lastDiskAlignmentScan() +
You can extract it to a Message instead of instead of ":" concatenation...
(i.e. add a new Message in CommonApplicationMessages)
Line 123: ": " +
lastScanDateFormat.format(object.getLastAlignmentScan())); //$NON-NLS-1$
Line 124: } else {
Line 125: getCell().setTitle(null);
Line 126: }
Line 121: DateTimeFormat lastScanDateFormat =
DateTimeFormat.getFormat("yyyy-MM-dd, HH:mm"); //$NON-NLS-1$
Line 122: getCell().setTitle(constants.lastDiskAlignmentScan() +
Line 123: ": " +
lastScanDateFormat.format(object.getLastAlignmentScan())); //$NON-NLS-1$
Line 124: } else {
Line 125: getCell().setTitle(null);
would be cleaner to add setTitle() to TextColumnWithTooltip
(as in ImageResourceColumn).
Line 126: }
Line 127: return object.getAlignment().toString();
Line 128: }
Line 129: };
Line 123: ": " +
lastScanDateFormat.format(object.getLastAlignmentScan())); //$NON-NLS-1$
Line 124: } else {
Line 125: getCell().setTitle(null);
Line 126: }
Line 127: return object.getAlignment().toString();
for localization use EnumColumn and add it to
LocalizedEnums.java/LocalizedEnums.properties.
Line 128: }
Line 129: };
Line 130:
Line 131: public static final StorageDomainsColumn storageDomainsColumn =
new StorageDomainsColumn();
....................................................
File
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/vm/BaseVmDiskListModelTable.java
Line 123: getTable().ensureColumnPresent(
Line 124: DisksViewColumns.interfaceColumn,
constants.interfaceDisk(), all || images || luns, "100px"); //$NON-NLS-1$
Line 125:
Line 126: getTable().ensureColumnPresent(
Line 127: DisksViewColumns.diskAlignmentColumn,
constants.diskAlignment(), all || images || luns, "100px"); //$NON-NLS-1$
is it relevant for luns?
Line 128:
Line 129: getTable().ensureColumnPresent(
Line 130: DisksViewColumns.statusColumn,
constants.statusDisk(), images, "100px"); //$NON-NLS-1$
Line 131:
....................................................
File
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/disks/DiskGeneralModel.java
Line 192: setDiskId(disk.getId().toString());
Line 193:
Line 194: if (disk.getLastAlignmentScan() != null) {
Line 195: DateTimeFormat lastScanDateFormat =
DateTimeFormat.getFormat("yyyy-MM-dd, HH:mm"); //$NON-NLS-1$
Line 196: setAlignment(disk.getAlignment().toString() + " (" +
//$NON-NLS-1$
same here - better extract to CommonApplicationMessages
Line 197:
ConstantsManager.getInstance().getConstants().lastDiskAlignmentScan() + ": " +
//$NON-NLS-1$
Line 198:
lastScanDateFormat.format(disk.getLastAlignmentScan()) + ")"); //$NON-NLS-1$
Line 199: } else {
Line 200: setAlignment(disk.getAlignment().toString());
....................................................
File
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmDiskListModel.java
Line 945:
Line 946: getMoveCommand().setIsExecutionAllowed(getSelectedItems() !=
null && getSelectedItems().size() > 0
Line 947: && (isMoveCommandAvailable() ||
isLiveMoveCommandAvailable()));
Line 948:
Line 949:
getScanAlignmentCommand().setIsExecutionAllowed(getSelectedItems() != null
* Any other availability checks? E.g. should it be disabled when disk is locked?
* DC/Cluster version check should be added here. I.e. using AsyncDataProvider
-> IsCommandCompatible (GetCommandsCompatibilityVersions).
Line 950: && getSelectedItems().size());
Line 951:
Line 952:
getPlugCommand().setIsExecutionAllowed(isPlugCommandAvailable(true));
Line 953:
....................................................
File
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/disk/SubTabDiskGeneralView.java
Line 68: public boolean isVisible() {
Line 69: return getDetailModel().isLun();
Line 70: }
Line 71: });
Line 72: formBuilder.addFormItem(new
FormItem(constants.diskAlignment(), alignment, 2, 0));
* this line should be above 'lunIdSanStorage' item
* 2 -> 3 (and 'lunIdSanStorage'/'quota' items should be modified accordingly...)
Line 73: formBuilder.addFormItem(new FormItem(constants.quota(),
quotaName, 4, 0) {
Line 74: @Override
Line 75: public boolean isVisible() {
Line 76: return getDetailModel().isQuotaAvailable();
--
To view, visit http://gerrit.ovirt.org/12417
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf3a80a73e6f30f75806736a77a76247c61250b4
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches