AA-2312: Backend changes to get the LLB data for the PDF generation

Review Request #677 — Created Feb. 24, 2025 and updated

apoorva.sn
AMP
amp_3_7
AA-2312
pmurugaiyan, prajesh, shuinvy

Problem

Backend changes to get the LLB data for the PDF generation
Refactored my previous changes for LLB

Solution

Introduced new End point /report/pdf for generation report as PDF

https://192.168.85.47:8888/report/pdf

{
"result": true,
"filename": "LLB_Statistics_Report_from_2025_02_25_19_40_04_to_2025_02_25_19_25_04.pdf"
}

Attached PDF created


Description From Last Updated

Please change epoch timestamp to local timezone or timezone set in AMP. It will be more readable.

prajeshprajesh

can we make endpoint something like reports?format=pdf

pmurugaiyanpmurugaiyan

LLB_Statistics_Report_

pmurugaiyanpmurugaiyan

Can we use relative path?

pmurugaiyanpmurugaiyan

Constants/Global variables in Caps?

pmurugaiyanpmurugaiyan

Can we keep the alignments similar to other reports? Also please add from and to time in readable format in …

pmurugaiyanpmurugaiyan

Please update with logger.

pmurugaiyanpmurugaiyan

Do we need a import here?

pmurugaiyanpmurugaiyan

Please attach updated PDF report.

prajeshprajesh

can we store in the same location as other generated pdff files.

pmurugaiyanpmurugaiyan

Since, we have only one API endpoint to request download the PDF file. How we are supporting downloading the generated …

pmurugaiyanpmurugaiyan
prajesh
  1. Ship It!
  2. 
      
prajesh
  1. 
      
  2. Please change epoch timestamp to local timezone or timezone set in AMP. It will be more readable.

    1. Changed the name to LLB_Statistics_Report_from_2025_02_25_19_40_04_to_2025_02_25_19_25_04.pdf

  3. 
      
pmurugaiyan
  1. 
      
  2. can we make endpoint something like reports?format=pdf

    1. Changed to https://192.168.85.47:8888/report/pdf

      Somehow in AMP the url with parameter is not working. Will need to check further on this. We can take this up when we do general refactor

    1. Changes the name to LLB_Statistics_Report_from_2025_02_25_19_40_04_to_2025_02_25_19_25_04.pdf

  3. Constants/Global variables in Caps?

  4. 
      
pmurugaiyan
  1. 
      
  2. Can we keep the alignments similar to other reports? Also please add from and to time in readable format in the report first page.

  3. 
      
apoorva.sn
Review request changed
prajesh
  1. 
      
  2. branches/amp_3_7/amp.spec (Diff revision 2)
     
     

    Please attach updated PDF report.

    1. Generated PDF is same. Only refactoring was done for the API part

  3. 
      
pmurugaiyan
  1. 
      
  2. branches/amp_3_7/amp.spec (Diff revision 2)
     
     

    can we store in the same location as other generated pdff files.

  3. 
      
pmurugaiyan
  1. 
      
  2. Since, we have only one API endpoint to request download the PDF file. How we are supporting downloading the generated pdf file for later usage? Also, what if the data is huge, as we dont have the queue in place, what if the request got timeout!

  3. 
      
shuinvy
  1. Ship It!
  2. 
      
Loading...