aboutsummaryrefslogtreecommitdiffstats
path: root/SharedSupport/Default Bundles/DB Report.spBundle/Support
diff options
context:
space:
mode:
Diffstat (limited to 'SharedSupport/Default Bundles/DB Report.spBundle/Support')
-rw-r--r--SharedSupport/Default Bundles/DB Report.spBundle/Support/header.html41
-rwxr-xr-xSharedSupport/Default Bundles/DB Report.spBundle/Support/processTableData.pl32
2 files changed, 73 insertions, 0 deletions
diff --git a/SharedSupport/Default Bundles/DB Report.spBundle/Support/header.html b/SharedSupport/Default Bundles/DB Report.spBundle/Support/header.html
new file mode 100644
index 00000000..b67b633c
--- /dev/null
+++ b/SharedSupport/Default Bundles/DB Report.spBundle/Support/header.html
@@ -0,0 +1,41 @@
+<html>
+ <head>
+ <title>Database Report</title>
+ <style type="text/css">
+ hr {
+ background: #606060;
+ color: #606060;
+ border-style: solid;
+ border-color: #606060;
+ border-width: 2px 0 0 0;
+ margin-top: 0;
+ }
+ a:hover {
+ text-decoration: none;
+ }
+ a {
+ text-decoration: none;
+ }
+ a:hover:after {
+ content: " ➪";
+ }
+ .nonVisible {
+ display:none;
+ }
+ </style>
+ <script type="text/javascript" charset="utf-8">
+ function toggle_display(elt)
+ {
+ var e; var p;
+ e = elt.getAttribute("id") + ":data";
+ if (window.document.getElementById(e).className != "") {
+ window.document.getElementById(e).className = "";
+ elt.innerHTML = "▼";
+ } else {
+ window.document.getElementById(e).className = "nonVisible";
+ elt.innerHTML = "▶";
+ }
+ }
+ </script>
+ </head>
+<body>
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