[ 
https://issues.apache.org/jira/browse/DRILL-6432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16503474#comment-16503474
 ] 

ASF GitHub Bot commented on DRILL-6432:
---------------------------------------

sohami closed pull request #1278: DRILL-6432: Show Button to print visualized 
query plan
URL: https://github.com/apache/drill/pull/1278
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/exec/java-exec/src/main/resources/rest/profile/profile.ftl 
b/exec/java-exec/src/main/resources/rest/profile/profile.ftl
index 64a955c4a8..13bd8c45d6 100644
--- a/exec/java-exec/src/main/resources/rest/profile/profile.ftl
+++ b/exec/java-exec/src/main/resources/rest/profile/profile.ftl
@@ -86,7 +86,12 @@ table.sortable thead .sorting_desc { background-image: 
url("/static/img/black-de
       <p><pre>${model.profile.plan}</pre></p>
     </div>
     <div id="query-visual" class="tab-pane">
-      <svg id="query-visual-canvas" class="center-block"></svg>
+      <div style='padding: 15px 15px;'>
+        <button type='button' class='btn btn-default' 
onclick='popUpAndPrintPlan();'><span class="glyphicon glyphicon-print"></span> 
Print Plan</button>
+      </div>
+      <div>
+        <svg id="query-visual-canvas" class="center-block"></svg>
+      </div>
     </div>
     <div id="query-edit" class="tab-pane">
       <p>
@@ -453,7 +458,16 @@ table.sortable thead .sorting_desc { background-image: 
url("/static/img/black-de
       enableBasicAutocompletion: true,
       enableLiveAutocompletion: false
     });
-  </script>
+
+    //Pops out a new window and provids prompt to print
+    var popUpAndPrintPlan = function() {
+      var srcSvg = $('#query-visual-canvas');
+      var screenRatio=0.9;
+      let printWindow = window.open('', 'PlanPrint', 'width=' + 
(screenRatio*screen.width) + ',height=' + (screenRatio*screen.height) );
+      printWindow.document.writeln($(srcSvg).parent().html());
+      printWindow.print();
+    };
+    </script>
 
 </#macro>
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Allow to print the visualized query plan only
> ---------------------------------------------
>
>                 Key: DRILL-6432
>                 URL: https://issues.apache.org/jira/browse/DRILL-6432
>             Project: Apache Drill
>          Issue Type: New Feature
>          Components: Web Server
>            Reporter: Kunal Khatua
>            Assignee: Kunal Khatua
>            Priority: Minor
>              Labels: ready-to-commit
>             Fix For: 1.14.0
>
>
> Provide a convenient way to printing the Visual Query Plan only, instead of 
> the entire profile page.
> This allows for capability in specifying the zoom level when printing large 
> complex plans that might span multiple pages.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to