adding widget support and moving tables to an external file
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 26 Sep 2005 18:13:44 +0000 (18:13 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 26 Sep 2005 18:13:44 +0000 (18:13 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@1873 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/reporter/report_base.example.xml
Open-ILS/src/reporter/tables.example.xml [new file with mode: 0644]
Open-ILS/src/reporter/widgets.example.xml [new file with mode: 0644]

index 0fb834d..a7cca59 100644 (file)
@@ -6,6 +6,7 @@
                        <stage1>/tmp/reporter/</stage1>
                        <stage2>/tmp/reporter/</stage2>
                        <stage3>/tmp/reporter/</stage3>
+                       <widget-family>/tmp/reporter/</widget-family>
                </files>
                <database>
                        <host>10.0.0.2</host>
                </database>
        </setup>
 
-       <tables>
+       <xi:include href="tables.example.xml">
+               This file sucks in table definitions
+       </xi:include>
+       <xi:include href="widgets.example.xml">
+               This file sucks in widget definitions
+       </xi:include>
 
-               <table id="silly.fact" partition="true">
-                       <name>Silly Fact table</name>
-                       <description>Silly Fact table</description>
-                       <tablename>stats.silly_fact</tablename>
-
-                       <partition>
-                               <field>said_when</field>
-                               <!-- Valid options:  years, months, weeks, days, hours, minutes, seconds  -->
-                               <chunk>months</chunk>
-                               <start>2005-09-01</start>
-                               <end>2005-12-31</end>
-                       </partition>
-
-                       <fields>
-                               <field
-                                 name="silly_word_dim"
-                                 datatype="int"
-                                 indexed="true">
-                                       <label>Silly word dim</label>
-                                       <description>Silly word entry dimension link</description>
-                               </field>
-                               <field
-                                 name="silly_sayer_dim"
-                                 datatype="int"
-                                 indexed="true">
-                                       <label>Silly sayer dim</label>
-                                       <description>Silly sayer entry dimension link</description>
-                               </field>
-                               <field
-                                 name="said_when"
-                                 datatype="timestamptz"
-                                 core="true"
-                                 indexed="true"
-                                 default="now()">
-                                       <label>Silly word timestamp</label>
-                                       <description>Silly word entry timestamp</description>
-                               </field>
-                       </fields>
-                       <links>
-                               <link
-                                 field="silly_word_dim"
-                                 table="silly.word_dim"
-                                 key="id"
-                                 type="has_a"/>
-                               <link
-                                 field="silly_sayer_dim"
-                                 table="silly.sayer_dim"
-                                 key="id"
-                                 type="has_a"/>
-                       </links>
-               </table>
-
-               <table id="silly.word_dim">
-                       <name>Silly word list</name>
-                       <description>Silly word list</description>
-                       <tablename>stats.words</tablename>
-                       <fields>
-                               <field
-                                 name="id"
-                                 primary="1"
-                                 create-type="serial"
-                                 datatype="int"/>
-                               <field
-                                 name="word"
-                                 datatype="text"
-                                 indexed="true"
-                                 index-type="BTREE"/>
-                       </fields>
-               </table>
-
-               <table id="silly.sayer_dim">
-                       <name>Silly word sayer list</name>
-                       <description>Silly word sayer list</description>
-                       <tablename>stats.silly_sayers</tablename>
-                       <fields>
-                               <field
-                                 name="id"
-                                 primary="1"
-                                 create-type="serial"
-                                 datatype="int"/>
-                               <field
-                                 name="sayer"
-                                 datatype="text"
-                                 indexed="true"
-                                 index-type="BTREE"/>
-                       </fields>
-               </table>
-
-       </tables>
 </reporter>
diff --git a/Open-ILS/src/reporter/tables.example.xml b/Open-ILS/src/reporter/tables.example.xml
new file mode 100644 (file)
index 0000000..6ec6b07
--- /dev/null
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tables>
+
+       <table id="silly.fact" partition="true">
+               <name>Silly Fact table</name>
+               <description>Silly Fact table</description>
+               <tablename>stats.silly_fact</tablename>
+
+               <partition>
+                       <field>said_when</field>
+                       <!-- Valid options:  years, months, weeks, days, hours, minutes, seconds  -->
+                       <chunk>months</chunk>
+                       <start>2005-09-01</start>
+                       <end>2005-12-31</end>
+               </partition>
+
+               <fields>
+                       <field
+                         name="id"
+                         primary="true"
+                         create-type="serial"
+                         datatype="int">
+                               <label>Silly entry id</label>
+                               <description>Silly entry id</description>
+                       </field>
+                       <field
+                         name="silly_word_dim"
+                         datatype="int"
+                         indexed="true">
+                               <label>Silly word dim</label>
+                               <description>Silly word entry dimension link</description>
+                       </field>
+                       <field
+                         name="silly_sayer_dim"
+                         datatype="int"
+                         indexed="true">
+                               <label>Silly sayer dim</label>
+                               <description>Silly sayer entry dimension link</description>
+                       </field>
+                       <field
+                         name="said_when"
+                         datatype="timestamptz"
+                         core="true"
+                         indexed="true"
+                         default="now()">
+                               <label>Silly word timestamp</label>
+                               <description>Silly word entry timestamp</description>
+                       </field>
+               </fields>
+               <links>
+                       <link
+                         field="silly_word_dim"
+                         table="silly.word_dim"
+                         key="id"
+                         type="has_a"/>
+                       <link
+                         field="silly_sayer_dim"
+                         table="silly.sayer_dim"
+                         key="id"
+                         type="has_a"/>
+               </links>
+       </table>
+
+       <table id="silly.word_dim">
+               <name>Silly word list</name>
+               <description>Silly word list</description>
+               <tablename>stats.words</tablename>
+               <fields>
+                       <field
+                         name="id"
+                         primary="true"
+                         create-type="serial"
+                         datatype="int"/>
+                       <field
+                         name="word"
+                         datatype="text"
+                         indexed="true"
+                         index-type="BTREE"/>
+               </fields>
+       </table>
+
+       <table id="silly.sayer_dim">
+               <name>Silly word sayer list</name>
+               <description>Silly word sayer list</description>
+               <tablename>stats.silly_sayers</tablename>
+               <fields>
+                       <field
+                         name="id"
+                         primary="true"
+                         create-type="serial"
+                         datatype="int"/>
+                       <field
+                         name="sayer"
+                         widget-family="string-choose"
+                         datatype="text"
+                         indexed="true"
+                         index-type="BTREE"/>
+               </fields>
+       </table>
+
+</tables>
+
diff --git a/Open-ILS/src/reporter/widgets.example.xml b/Open-ILS/src/reporter/widgets.example.xml
new file mode 100644 (file)
index 0000000..ecc57d4
--- /dev/null
@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<widgets>
+       
+       <!-- String selection from user input -->
+       <widget-family name="string-input" datatype="text">
+               <label>String matching from user input</label>
+       
+               <widget name="exact">
+                       <label>Exactly match a user supplied string</label>
+                       <description>
+                               This widget filters a column based on an exact string
+                               match.
+                       </description>
+               </widget>
+       
+               <widget name="multistring">
+                       <label>Exactly match one of several user supplied strings</label>
+                       <description>
+                               This widget filters a column based on an set of strings.
+                       </description>
+               </widget>
+       
+               <widget name="initial-substring">
+                       <label>Match the begining of a string from user input</label>
+                       <description>
+                               This widget filters a column based on an initial substring
+                               match.
+                       </description>
+               </widget>
+       </widget-family>
+       
+       
+       <!-- String selection from in-database data -->
+       <widget-family name="string-choose" datatype="text">
+               <label>String filter from known data</label>
+       
+               <widget name="dropdown">
+                       <label>Exactly match a string chosen from a dropdown</label>
+                       <description>
+                               This widget filters a column based on an exact string match.
+                       </description>
+               </widget>
+               
+               <widget name="multiselect">
+                       <label>Match multiple strings chosen from a multiselect box</label>
+                       <description>
+                               This widget filters a column based on multiple strings.
+                       </description>
+               </widget>
+       </widget-family>
+       
+       
+       <!-- Specific time range selection family -->
+       <widget-family name="specifc-timerange" datatype="timestamptz">
+               <label>Specific time-range widgets</label>
+       
+               <widget name="any">
+                       <label>User defined time range</label>
+                       <description>
+                               This widget allows the user to pick an arbitrary time range
+                               on which to report.
+                       </description>
+               </widget>
+               
+               <widget name="day">
+                       <label>Choose a specific date</label>
+                       <description>
+                               This widget allows the user to pick a specific date on which
+                               to report.
+                       </description>
+               </widget>
+       
+               <widget name="week">
+                       <label>Choose a specific week of the year</label>
+                       <description>
+                               This widget allows the user to pick a specific week of the year
+                               on which to report.
+                       </description>
+               </widget>
+               
+               <widget name="multiweek">
+                       <label>Choose a range of weeks of the year</label>
+                       <description>
+                               This widget allows the user to pick a range of weeks of the year
+                               on which to report.
+                       </description>
+               </widget>
+               
+               <widget name="month">
+                       <label>Choose a specific year and month</label>
+                       <description>
+                               This widget allows the user to pick a specific year and month
+                               on which to report.
+                       </description>
+               </widget>
+               
+               <widget name="multimonth">
+                       <label>Choose a range of months</label>
+                       <description>
+                               This widget allows the user to pick a range of month on which to
+                               report.
+                       </description>
+               </widget>
+               
+               <widget name="quarter">
+                       <label>Choose a specific year and quarter</label>
+                       <description>
+                               This widget allows the user to pick a specific year and
+                               quarter on which to report.
+                       </description>
+               </widget>
+               
+               <widget name="multiquarter">
+                       <label>Choose a range of quarters</label>
+                       <description>
+                               This widget allows the user to pick a range of quarter on which
+                               to report.
+                       </description>
+               </widget>
+               
+               <widget name="year">
+                       <label>Choose a specific year</label>
+                       <description>
+                               This widget allows the user to pick a specific year on which to
+                               report.
+                       </description>
+               </widget>
+               
+               <widget name="multiyear">
+                       <label>Choose a range of years</label>
+                       <description>
+                               This widget allows the user to pick a range of years on which to
+                               report.
+                       </description>
+               </widget>
+       </widget-family>
+       
+       <!-- Specific time range selection family -->
+       <widget-family name="relative-timerange" datatype="timestamptz">
+               <label>Relative time-range widgets</label>
+               
+               <widget name="day">
+                       <label>Choose a date relative to the report runtime</label>
+                       <description>
+                               This widget allows the user to pick a date relative to the
+                               report runtime on which to report.
+                       </description>
+               </widget>
+               
+               <widget name="week">
+                       <label>Choose a week (sun-sat) relative to the report runtime</label>
+                       <description>
+                               This widget allows the user to pick a week (sun-sat)  relative
+                               to the report runtime on which to report.
+                       </description>
+               </widget>
+               
+               <widget name="month">
+                       <label>Choose a month relative to the report runtime</label>
+                       <description>
+                               This widget allows the user to pick a month relative to the
+                               report runtime on which to report.
+                       </description>
+               </widget>
+               
+               <widget name="quarter">
+                       <label>Choose a quarter relative to the report runtime</label>
+                       <description>
+                               This widget allows the user to pick a quarter relative to the
+                               report runtime on which to report.
+                       </description>
+               </widget>
+               
+               <widget name="year">
+                       <label>Choose a year relative to the report runtime</label>
+                       <description>
+                               This widget allows the user to pick a year relative to the
+                               report runtime on which to report.
+                       </description>
+               </widget>
+       </widget-family>
+</widgets>
+