BUGS
====
 - We are currently just skipping databases which are failed to connect to the
 data source (request.pph/GetSources/catch block). In case if we are caching the
 data this prevents administrator from getting information about the problems.
 

Easy ToDo
=========
 - List of displayed elements in options tab in left-bottom corner (Arsen)
 - Support for Database titles (using regexps)
 - Implement RRD reader and make system monitoring installation

 - Provide a standalone page with the list of all ADEI servers, providing
  brief summary on the current status (like conky).
    Errors, number of groups, last update, cache size
  * Simpler idea:  Port conky monitoring system to web and mozilla prism
    a) Lua scripts execution from cron
    b) Lua + conky to html translation script

 - Y-value precision of big numbers under high zooms (500.000000000001) should
 be implemented using string arithmetics. Negative numbers should be considered,
 see implementation at php code.
  a) window.js/SetCustomAxis/*.toPrecision - increase from 7 to something....
  b) implement computations using string arithmetics

 - AXIS described in database tables are not correctly visible in Tree-view.
 This is becuase it only defined for a single reader, while tree view combines
 multiple readers. As a solution, we can have special reader which will access
 the AXIS information and provide it globaly for setup.


KATRIN
======
  - Can you please, test if your PHP module is loaded and otherwise skip 
  loading KATRIN extensions. Basically, if module is not present you should 
  remove "katrin" from the list of modules in config.php ($MODULES variable)


Version 0.0.9 (Interface improvements)
=============
A. Download Manager (Aki)
 1. Download Page
    Instead of direct download, - download files in special folder and 
    afterwards, allow users to download them, delete, etc. Report status
    "still donwloading".
 2. Progress function in Export class
    a) Divides first by groups/sources. Each is allocated similiar slice of
    percents. Then within READER::ExportGroup just track position in interval.
B. MASK/Experiment Editor (Aki)
 1. Include Save Mask, Save Time Window buttons (We need to update SOURCE and 
    MENU if new mask/experiment is added)
 2. Mask / Experiment editor. It should be allowed to delete mask, alter its
    name, view included items (possibly allowing deletion)
 3. Support for mask properties, allowing special ways of display
C. Better Navigation (Toni)
 1. Activate / deactivate Axis in single-axis mode, then zooming only on them.
 2. Move left-rigth/up-down then dragging on the axis.
 3. Shading will redrawing
 4. iPhone / iPad / Android versions
D. Disconnected DIVS
 1. Multi-windows mode, allow to disconnect div's and open in standalone window
 2. Display different divs (pages, etc.) depending on iPhone orientation
E. LEGEND
    a) Information about clicked location
    b) Add "Show Only", "Remove" buttons.
F. GRAPH improvements requested by Andreas
 1. Show Legend on graph, optionally (another parameter)
 2. In single channel mode, draw MIN-MAX-MEAN-?
G. SEARCH improvements
 1. In case of item search, add addition button to add this item into the 
    virtual tree.
H. SIDEBAR improvements
  1. Show sidebar items depending on selected page (for Sebastian)
I. OTHER things
 - Join archived databases with current ones to present continious data flow.
 - Disconnected ADEI setup caching all the channel, group names, and axes

VERSION 0.0.10 (Weather Tower: Marks, Secondary Graph)
==============
1. Marking engine
    a) In selection add mark (with default value 1)
    b) Ad Marks module to left pane displaying all registered marks for current
    window and mask. Allow to set specific value or cancel mark.
    c) Support filtering of values marked with certain mark.

2. Secondary graph for weather tower
    a) Using selection, getting area and then clicking needed profile 
    (temperature, wind, .?). The available profiles could be independent of
    group/db_mask selection
    b) In appropriate box of left pane, we will have picture (starting on
    left edge) and slider allowing navigation. About 10-50 positions 
    distributed uniformely over time. On each position the first item
    after time is displayed. The time stamp is shown on as well.
    c) How to prevent from overloading server?

3. Different way of visualization
    a) 24 hour cache to hide day changes
    b) Sum several 24hours interval together and display the changes other the day
    c) Implement background images

Version 0.0.11 (Navigation Bar)
==============
1. Again use cropper but with fixed width and always visible
   prefix: source, selector_config
2. As a main "navigator" provide point density (red - green?), with special
    color highlight the places where are distance between points exceeding
    specified threshold.
3. Run-indicators in navigation bar (Sebastian)

Version 0.0.12 (Search improvements)
==============
    a) Search for interval where conditions (<>=) are met (only aggregated 
    caching tables are used)
    b) "Jan" find all Januaries containing data and auto-select the current 
    one

---------------------------------------------------------------------------

VERSION 0.0.13 (Aggregation)
==============
1. Weather tower: there is differnt types of channels: analog, count rate,
   digital (flags), direction. This data should be aggregated and displayed
   in different ways.
   For example, 
    a) 355grad and 5grad should not be averaged to 180, but to 0
    b) digital flags could not be averaged at all.
    ...
2. MED aggregation:
    MEDIAN style approach. On each smalles caching interval it is MEDIAN. Then
    the middle of this intervals select to represent value of next caching 
    level. And so on.

Version 0.0.14 (Finishing half way interfaces)
==============
1. Control infastracture
    a) Finalyze checking of values prior to setting setpoints
    b) Implement VirtualControlGroup joining specified control groups, to 
    refer from ExpressVI
    d) VirtualController. COMPLEXID is just merge of groups (we don't have 
    time to synchronize here)
    e) LabVIEW ExpressVI
2. Improved DRAW interface
 0. Colors (use tones to show different channels using the same axis)
 1. MultiAxis, prevent complete filling: 
    a) axis stacked vertically
    b) line length calculation
    c) better single combined approach 

    
Version 0.0.15 (Group merging and basic arithmetic)
==============
4. Merging groups using CACHESet / Virtual Group Joiner 
    a) Provide CACHESet::GetData
    b) Provide CACHESetReader
5. Basic arithmetic operations on channels
    a) Organized as a separate virtual group
    b) set base group
    c) cached

Version 0.0.16 (Analysis)
==============
 - ROOT interaction, support for scripts making basic analysis tasks.
 - Improve rendering speed by performing drawing in ROOT.


----------------------------------------------------------------------------
Version 0.1 (Misc)
==============
A Handling graph ends
  1. With "optimize_time_axes=false", ADEI     
       '|'.        
       .  ,     
       [        
     ].
        , ..      
      ???
  2. Remove LIMIT from SQL requests in DATAInterval
  3. Enable Flexible mode for intervals in DRAW (this could damage edges, so it
    should be done together with 1)

C. SEARCH
    - Buttons to Open/Close result descriptions and module results
    - Tagging current configuration (Title, Description, Props) in CacheDB
D. Support for auxilliary graph ( Temperature profiles, for example)
E. Support for marking data points ( ignoring/using, weather)
F. Specify the current element (number) in graph, not group? Or in other way
 indicate what we are showing without openning sidebar.
G. Clean screen after error
H. Synchronize menu with sidebar functionality (+Aggregation,?)
I. Horizontal scrolling in Source Tree should be always visible (standard
   procedure will corrupt window)


Version 0.1.1 (Code beutification)
==============
    1. require, include_once => $ADEI->RequireClass(array(), overridable)
    2. globals => $ADEI->GetGlobalOption
    3. Remove references(&) from all class variables
    4. Use static ADEI calls where possible

Version 0.2 (Subcaches)
===========
1. Support for Subcaches (if density is above threshold use apporpiate 
   subcache). Join current table and subcache to automatically sort.

2. Show somethere information about used CACHE and its configuration

3. CACHE updating daemon and check renewals

Version 0.3 (Local Time)
===========
1. Support for Local Time. Major obstacle is synchronization between php (jpgraph)
   and browsers. Just using timezone offset doesn't allow us to find out 
   DST changes and etc.
   In Mozilla and Safari, however, there is tricky way of obtaining time-zone.
      var now = new Date();
      now.toString();
    will return the lexcial name of time-zone (however, the names could differ
    between php and JS?). It is possible to extract this time zone info and
    pass to php. From, other side Opera and IE7 returns just numerical
    representation of offset GMT+, without real name. And there is no any
    warranty on toString() format change...
    
    May be it is should be solved with horizontal labeling. We just pass from
    JS few time values and fixing places to set them?

VERSION 0.5 (Real-time Display)
===========
1. Real-time display of the last 100-200 records [separate window]


VERSION 0.6 (Side-menu, Users)
===========
1. Redesign side menu (popups)
    a) Optionaly open over graph (skip, just b?)
    b) Single popup. And just select current mode (see google maps?)
2. Users loggons / Multiple options / ...

Version 0.7 (Fixups)
===========
1. What will hapen when clicking during long redraw (many items).

2. Check Firefox / IE memory consumption. Memory leaks?

3. Save opened page in history

4. READER and CACHE data intervals mistmatch. What to do (use CACHE intevals
   if notification turned off)? Month/Day/Hour intervals within READER data
   but out of the CACHE data? The accuracy is droped, since we calculating
   amount of points for bigger window.

5. Limit dhtmlHistory size (optionally disable: All/Gecko/None)

6. Reimplement CACHEInterval using CACHE0 'id' instead of 'time'+'ns'

7. After an error we should go back in history. Otherwise it'll be corrupted.

8. Depsite width is 100% the Item Selector is not resized to fill all available
   space (mozilla, safari).


VERSION 0.8
===========
    - Autogenerate experiments by thresholding some of the channels (set with
    sql statements?)

VERSION 0.9
===========
    - Image caching? Separate scales?
    - Cache few default zoom levels and several screens in all directions?
    - On end-crop start pereparing image?
    - Permanent server performing requets?
    - Table
	adei draw json version (to prevent new/missing json options), from-to, 
	json options to return, image_file

ZEUS Related
============
1. Start Experiment / Stop Experiment to ZEUS web control
3. ZEUS MSSQL Backup


Future Versions - Architectural Questions
===============
1. Use "nanoseconds since" instead current quite strange system with 
   number-string timing. Or?

2. Graph precision calulating. \/\/______\/\. Using longest interval? But it
    will damage other cases (points).

3. Joint visualization of multiple LOGGROUPs. How?
    a) Virtual Groups joining several physical ones?
    b) ...?


Future Versions - Beter Usability
==============
1. Currenly double-click zoom is only working within selection. However, if we
   are doing horizontal or vertical zooms, there are more areas selected.
   Should we make them double-clickable as well? Or not?

2. At the moment on the browser window resize the graphic is not autoupdated,
   we probably should force update.

3. The following case: We made a selection and opened one of the popups. The
   forced graph update have canceled selection. However, the selected values
   are still present window configuration dialog.
   Should we cancel them? Or could user to use them? Or should we draw 
   selection after update?

4. Position Apply Button within 'Source' popup always in the bottom of the
   popup (if initial size (defined by open-button size) is bigger than 
   actual content size, than the Apply Button will be positioned just after
   content).

5. Do more on graph navigation. 
    a) Speed of zooming / mooving (with plus/minus keys?)
    b) Arrows for mooving, Backspace go back in history
    c) Some mouse action for going back in history
    d) Drag window for moving.

6. Open sidebar with single click. All popups at once

Future Versions - Interface
===============
1. Rewrite JS calendar
    a) Straight forward way of selecting time (not update date every time
    afterwards)
    b) Allow multiple windows (title)
    c) Selection GMT/Local time (?)
    d) Open correct month/year page, not current one
    e) Date(toString/Parse) functions are behaving differently on different
    browsers (mozilla for example not adding timezone information, but works
    in the user time zone). It is completely Okey until only that functions
    are used. Therefore, the timepicker should be changed to use this 
    functions for the date printout.

2. Near borders of graph remove the control from the croper, change pictogram
   to 'hands' and allow moving source_window currently on display.
   
3. Move window with keyboard keys

4. Introduce graph options (Logarithmic). Move login to somethere.

5. If we had selcted an area of graph and afterwards in controls have altered
   the window properties. At the moment the selection is canceled. It would
   be nice to check if new values are within the currently displayed window
   and, if so, adjust selection instead.
   
8.At the moment we are reseting the mask/experiment/window properties after 
LogGroup have been changed. We should try to use current 
    a) window/interval if they are inside the range.
    b) Preserve "all" mask (and named masks as well if they exists for both 
    groups)
    
9. Do not execute update while we are changing configuration.

10. Optimize cssSetProperty by caching found classes.

11. Statusbar improvements
    a) Provide more information on statusbar
    b) Possibility to remove statusbar from the screen (small closer?)

12. Extra options in aggregator
    + logarithmic scale (?)
    + force better/worse precision (?)

13. Use "Katrin", "TOSKA" pictures as menu opener instead of nasty button
    arround.

    
Future Versions - Backend
===============
1. Filter data, ignore zeroes? Etc.

2. READER. Exchange remote data source with local backup.

3. LOGGROUP joiner.

4. GRAPH: Reusing existing files (at the moment we don't store enough 
information to do that (xmin,xmax,ymin,ymax,etc.)

5. APPFilter. 
  a) Add support for global and per-block header/footer (with options parsing)
  b) Block separators (messages sent between two blocks) [ if 'groupmode=false']

6. Support for 'omit_raw_cache' option (using READER instead of raw cache table)
  Intended to reduce caching table size if connection to data source is reliable
  and it is not overloaded

Future Version - Support Tools
==============
1. ROOT
  a) Provide subsecond precision.



Very Future Versions
====================
1. SELECTION. 
    a) Show statistics (if single-item-graph)
    b) Show correlation (if two-items-graph)
2. CONFIGURATION (Data sources/groups/experiments/etc.)
    a) Load big XML configuration on startup and use it to generate all menus.
    Expected benfits:
	1. Stability: Prevents errors during SOURCE updates
	2. Easy programming: The asynchronousity is eleminated
    b) At least load all SOURCE menus (single update, I mean) in one chunk
3. ERROR Handling. Standartize error handling in JS scripts
    a) Throw from async parts???? And call adeiError in all others???
    b) Use "translate" calls everythere.
4. GRAPH. Multiple data aggregation modes. Currently we are using MIN-MAX, 
    but we could provide at least MEAN mode easily. 
    a) Think about providing MEDIAN?
    b) MEAN could be over items, or over length (considering that the old 
    value is valid until next one).
5. Develop streamable TAR archives, for in-place streaming multiple groups. In
    this case the user will receive the data will we preparing next portion.
    a) TAR. In the block begining [0,size] data_block, used_size
    b) DIME?
6. At the moment while calculating the data gaps for grouped (aggregated) data 
    we are assuming what the data is uniformely distributed over interval. 
    This is not precise enough (if something is really going wrong, it likely
    what all missing data is concentrated in one place and, threfore, the real
    gap is considerably bigger then estimated one).
     Unfortunately, the SQL syntax of MySQL server is not  allowing us to 
    calculate distance between two sequent rows. Therefore, we need to 
    implement stored function for that purpose and, then, implement 
    CACHE_PRECISE_GAPS support in the DATAInterval.
    
   To correct the 'missing' values stored in the database (which are also not
   precise enough, value <= real_value < 3*value) we could make another 
   iteration over the data and correct approximated values.
   



10. Add Item to the graph.
11. Y-axes precise arithmetic if needed (and other rescalling options)
