aboutsummaryrefslogtreecommitdiffstats
path: root/SharedSupport/Default Bundles/DB Report.spBundle/Support/processTableData.pl
diff options
context:
space:
mode:
Diffstat (limited to 'SharedSupport/Default Bundles/DB Report.spBundle/Support/processTableData.pl')
-rwxr-xr-xSharedSupport/Default Bundles/DB Report.spBundle/Support/processTableData.pl32
1 files changed, 32 insertions, 0 deletions
diff --git a/SharedSupport/Default Bundles/DB Report.spBundle/Support/processTableData.pl b/SharedSupport/Default Bundles/DB Report.spBundle/Support/processTableData.pl
new file mode 100755
index 00000000..7d0b5545
--- /dev/null
+++ b/SharedSupport/Default Bundles/DB Report.spBundle/Support/processTableData.pl
@@ -0,0 +1,32 @@
+#!/usr/bin/env perl -w
+
+while(<>) {
+
+ # split tab delimited data
+ @data = split(/\t/);
+
+ $pid = $ENV{"PID"};
+ $db = $ENV{"DB"};
+ $res = $ENV{"RES"};
+ $itemType = "table";
+
+ # $data[1] is NULL indicates item is a view
+ if($data[1] eq "NULL") {
+ $img = "file://$res/table-view-small-square.tiff";
+ $itemType = "view";
+ } else {
+ $img = "file://$res/table-small-square.tiff";
+ }
+
+ print <<HTML4;
+ <tr>
+ <td align=center width='40px'><img src=\"$img\"></td>
+ <td><a href=\"sequelpro://$pid\@passToDoc/SelectDatabase/$db/$data[0]/\" title=\"Click to select $itemType “$db.$data[0]”\">$data[0]</a></td>
+ <td>$data[1]</td>
+ <td align=right>$data[4]</td>
+ <td align=right>$data[6]</td>
+ <td align=right>$data[11]</td>
+ <td align=right>$data[12]</td>
+ </tr>
+HTML4
+} \ No newline at end of file