Tal Nisan has posted comments on this change. Change subject: webadmin: migration progress ......................................................................
Patch Set 1: (2 comments) http://gerrit.ovirt.org/#/c/26827/1/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/column/OneColorPercentColumn.java File frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/column/OneColorPercentColumn.java: Line 4: Line 5: @Override Line 6: protected String getColorByProgress(int progress) { Line 7: // always return green Line 8: return "#669966"; //$NON-NLS-1$ Please use a constant here also, perhaps it will be wise for future usecases to specify the color as a constant parameter in case someone will want to make a red one color progress back? Line 9: } http://gerrit.ovirt.org/#/c/26827/1/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/column/ProgressBarColumn.java File frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/column/ProgressBarColumn.java: Line 29: /** Line 30: * Default color scheme for the progress bar - override if other colors are needed Line 31: */ Line 32: protected String getColorByProgress(int progress) { Line 33: return progress < 70 ? "#669966" : progress < 95 ? "#FF9900" : "#FF0000"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ > I think that double ternary operator here might be a bit confusing, maybe w Agree on the if else, strongly agree on extracting the colors to constants Line 34: } Line 35: Line 36: /** Line 37: * Returns the progress value in percent ({@code null} values will be interpreted as zeroes). -- To view, visit http://gerrit.ovirt.org/26827 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I31cb4fefe897536b633cce1583881e1e3511c0e8 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Tomas Jelinek <[email protected]> Gerrit-Reviewer: Daniel Erez <[email protected]> Gerrit-Reviewer: Tal Nisan <[email protected]> Gerrit-Reviewer: Tomas Jelinek <[email protected]> Gerrit-Reviewer: Vojtech Szocs <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
