anmolbabu has posted comments on this change. Change subject: webadmin: UI to list the no of gluster volume snapshots ......................................................................
Patch Set 3: (4 comments) http://gerrit.ovirt.org/#/c/35305/3/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/dataprovider/AsyncDataProvider.java File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/dataprovider/AsyncDataProvider.java: Line 1637: Frontend.getInstance().runQuery(VdcQueryType.GetGlusterVolumeRebalanceStatus, parameters, aQuery); Line 1638: } Line 1639: Line 1640: public void getEngineTimeStamp(AsyncQuery aQuery) { Line 1641: aQuery.setHandleFailure(true); setHandleFailure simply throws a backend triggered error Popup. But I feel since this is not a user intentionally triggered action, we should probably handle it in some other fashion. Like for example, forcefully make the user to enter a name(I believe this is the intended purpose) by leaving the name field blank. or populate the default browser time(which I think may not be good). Line 1642: Frontend.getInstance().runQuery(VdcQueryType.GetEngineTimestamp, new VdcQueryParametersBase(), aQuery); Line 1643: } Line 1644: Line 1645: public void getGlusterVolumeProfilingStatistics(AsyncQuery aQuery, Guid clusterId, Guid volumeId, boolean nfs) { http://gerrit.ovirt.org/#/c/35305/3/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/volumes/VolumeListModel.java File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/volumes/VolumeListModel.java: Line 361: Line 362: AsyncDataProvider.getInstance().getEngineTimeStamp(new AsyncQuery(this, new INewAsyncCallback() { Line 363: @Override Line 364: public void onSuccess(Object model, Object returnValue) { Line 365: VdcQueryReturnValue vdcValue = (VdcQueryReturnValue) returnValue; Going by previous comment, You can probably do vdcValue.getSucceeded() and handle it differently for true and false cases Line 366: String timeStamp = (String)vdcValue.getReturnValue(); Line 367: snapshotModel.getSnapshotName().setEntity(volumeEntity.getName() + "-snap-" + timeStamp);//$NON-NLS-1$ Line 368: } Line 369: })); Line 363: @Override Line 364: public void onSuccess(Object model, Object returnValue) { Line 365: VdcQueryReturnValue vdcValue = (VdcQueryReturnValue) returnValue; Line 366: String timeStamp = (String)vdcValue.getReturnValue(); Line 367: snapshotModel.getSnapshotName().setEntity(volumeEntity.getName() + "-snap-" + timeStamp);//$NON-NLS-1$ Due to localisation issues You can move the string formation part to UIMessages(localisation of word "snap") Line 368: } Line 369: })); Line 370: Line 371: UICommand command = new UICommand("onCreateSnapshot", this); //$NON-NLS-1$ http://gerrit.ovirt.org/#/c/35305/3/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationTemplates.java File frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationTemplates.java: Line 159: "<td> <div> {2} </div> </td>" + Line 160: "<td> {3} / </td>" + Line 161: "<td> <div style='text-align: center'> {4} </div> </td>" + Line 162: "</tr> </table>") Line 163: SafeHtml volumeSnapshotsStatusTemplate(SafeHtml upImage, int activatedCount, SafeHtml downImage, int deactivatedCount, int maxLimit); Why not use volumeBrickStatusTemplate Line 164: Line 165: @Template("<div style='line-height: 100%; text-align: center; vertical-align: middle; border: solid 1px transparent; '>{0}</div>") Line 166: SafeHtml volumeActivityMenu(SafeHtml statusImage); Line 167: -- To view, visit http://gerrit.ovirt.org/35305 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I805a0d89833225a98018ae7124e9d4c6d7f743c0 Gerrit-PatchSet: 3 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Shubhendu Tripathi <[email protected]> Gerrit-Reviewer: Kanagaraj M <[email protected]> Gerrit-Reviewer: anmolbabu <[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
