Mittwoch, 3. Februar 2016

PLSQL Profiler Runs => Adding a Gauge 2.0

Based on what I described in

PLSQL Profiler Runs => Adding a Gauge

I changed the query of the interactive report region to

SELECT runid ,
  related_run ,
  run_owner ,
  run_date ,
  run_comment ,
  run_total_time ,
  run_comment1,
  ROUND((run_total_time * 100) / max_run_total_time, 0) AS graph
FROM
  (SELECT r.runid ,
    r.related_run ,
    r.run_owner ,
    TO_TIMESTAMP(TO_CHAR(r.run_date, 'DD.MM.YYYY HH24:MI:SS'), 'DD.MM.YYYY HH24:MI:SS') AS run_date ,
    r.run_comment ,
    r.run_total_time ,
    r.run_comment1,
    (SELECT MAX(run_total_time) FROM plsql_profiler_runs_vw
    ) AS max_run_total_time
  FROM plsql_profiler_runs_vw r
  );

Please notice, that we not have to create some fancy HTML code to display the percentage gauge,

With Apex 5 we only have to set the type of the Graph Attribute to Percent Graph and we are done.


The result looks impressive, doesn't it?

Keine Kommentare:

Kommentar veröffentlichen