anmolbabu has posted comments on this change. Change subject: webadmin : add pdf export button to volume profile ......................................................................
Patch Set 7: (6 comments) http://gerrit.ovirt.org/#/c/28085/7/backend/manager/dependencies/pom.xml File backend/manager/dependencies/pom.xml: Line 463: <groupId>com.itextpdf</groupId> Line 464: <artifactId>itextpdf</artifactId> Line 465: <moduleName>com.itextpdf</moduleName> Line 466: </module> Line 467: > LWS Done Line 468: </modules> Line 469: </configuration> Line 470: </plugin> Line 471: http://gerrit.ovirt.org/#/c/28085/7/backend/manager/modules/bll/pom.xml File backend/manager/modules/bll/pom.xml: Line 48: <dependency> Line 49: <groupId>com.itextpdf</groupId> Line 50: <artifactId>itextpdf</artifactId> Line 51: <version>5.5.1</version> Line 52: > LWS Done Line 53: </dependency> Line 54: <dependency> Line 55: <groupId>org.ovirt.engine.extensions</groupId> Line 56: <artifactId>builtin</artifactId> http://gerrit.ovirt.org/#/c/28085/7/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterVolumeProfilePdfExportCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterVolumeProfilePdfExportCommand.java: Line 39: createPdf = new CreatePdf(); Line 40: String userId = getParameters().getUserId(); Line 41: GlusterVolumeProfileInfo profileInfo = getParameters().getProfileInfo(); Line 42: String filePath = ""; Line 43: //if((getParameters().getFilePath() == null || getParameters().getFilePath() == "")) { > Remove the commented code Done Line 44: filePath = "/home/" + getGlusterVolumeDao().getById(profileInfo.getVolumeId()).getName(); Line 45: //} else { Line 46: // filePath = getParameters().getFilePath(); Line 47: //} Line 40: String userId = getParameters().getUserId(); Line 41: GlusterVolumeProfileInfo profileInfo = getParameters().getProfileInfo(); Line 42: String filePath = ""; Line 43: //if((getParameters().getFilePath() == null || getParameters().getFilePath() == "")) { Line 44: filePath = "/home/" + getGlusterVolumeDao().getById(profileInfo.getVolumeId()).getName(); > Should we create the file always in home directory? Shouldnt we create unde I am planning to get it entered as a text if the user wishes to(as opening a file browser for the user to select a path would be highly complicated as of now).Or otherwise store it in some default location say home or downloads or any other that we decide on. Line 45: //} else { Line 46: // filePath = getParameters().getFilePath(); Line 47: //} Line 48: try { http://gerrit.ovirt.org/#/c/28085/7/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/VolumeProfileStatisticsModel.java File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/VolumeProfileStatisticsModel.java: Line 293: @Override Line 294: public void executeCommand(UICommand command) { Line 295: if (command.getName().equalsIgnoreCase("export_to_pdf")) {//$NON-NLS-1$ Line 296: GlusterVolumeProfileInfo profileInfo = getProfileInfo(); Line 297: GlusterVolumeCreatePdfParameters pdfParameters = new GlusterVolumeCreatePdfParameters(profileInfo, "", "admin");//$NON-NLS-1$//$NON-NLS-2$ > admin? Yes I'll change it to take current user dynamically.But I am just trying to see how the library can fit into our engine and trying to play around with it.So,I have hardcoded it as admin.Just to ensure there are no glitches from permission's side.I'll change this after it starts working in the full happy flow :)) Line 298: Frontend.getInstance().runAction(VdcActionType.GlusterVolumeProfilePdfExport, pdfParameters, new IFrontendActionAsyncCallback() { Line 299: @Override Line 300: public void executed(FrontendActionAsyncResult result) { Line 301: VdcReturnValueBase returnValue = result.getReturnValue(); Line 303: ConfirmationModel cModel = new ConfirmationModel(); Line 304: cModel.setMessage(returnValue.getDescription()); Line 305: } Line 306: }); Line 307: //Frontend.getInstance().runAction(VdcActionType.StartGlusterVolumeProfile, new GlusterVolumeParameters(volumeId)); > ?? Yep I'll remove this.I had just added this line to check if the library was not working or there are any other faults owing to which the pdf was not getting exported. Line 308: } Line 309: } -- To view, visit http://gerrit.ovirt.org/28085 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I506efc1c626059811c8e69d8232145430b3ec963 Gerrit-PatchSet: 7 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: anmolbabu <anb...@redhat.com> Gerrit-Reviewer: Shubhendu Tripathi <shtri...@redhat.com> Gerrit-Reviewer: anmolbabu <anb...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches