TWSD-1433 - APV: Unable to generate the status report for "Virtual Service" from the Monitor Center

Review Request #1458 — Created March 20, 2026 and submitted — Latest diff uploaded

shuinvy
APV10
rel_apv_10_7
TWSD-1433
austin, kevin.poh, mingji, peteryeh

Enhance the speed of generating PDF for SLB module

The Jira ticket is:
https://arraynetworks.atlassian.net/browse/TWSD-1433

To enhance the speed of generating PDF for SLB module,
I have do these things:
1. Setting the font config in global area (pdfmetrics.registerFont...)
2. Use ROWBACKGROUNDS and style_cmds for table row color and style, instead of using for loop.
3. Use new smaller picture for logo of PDF, originall is too large and it will let speed slower when compression (Original pitcure is 3249x970. New one is 400x119)
4. Use IN sql instead for loop with each name, reduce the count of calling databases. And modify code for it.
5. Fetch database data before generating PDF objects
6. Use canvas.drawImage instead of p.drawOn (Method of Paragraph)

The SQL changes are:
1. Add name in SELECT part, for example SELECT service_name as name...
2. use Where name IN (...) instead of Where name="..."
3. Add name to Group BY, for example: GROUP BY timef, name

Besides,
I remove code that useless (useless variables or comments and spaces).
And I don't put new logo for PDF in review board (Only for attachment for reference),
I will commit it when I commit my code.

I also only use English version logo,
because the Chinese one is other company...


    Loading...