MojoFacets.git
13 years agoupgrade old values in changes to array
Dobrica Pavlinusic [Sat, 19 Jun 2010 11:42:33 +0000 (13:42 +0200)]
upgrade old values in changes to array

13 years agotoggle show/hide on console click
Dobrica Pavlinusic [Fri, 18 Jun 2010 22:09:37 +0000 (00:09 +0200)]
toggle show/hide on console click

13 years agotweak columns acquision order
Dobrica Pavlinusic [Fri, 18 Jun 2010 22:02:11 +0000 (00:02 +0200)]
tweak columns acquision order

This allows us again just to reload table data after we restart server,
since we don't require columns (which isn't saved until user selects
save for the first time) but headers which is there.
However, if we do have columns in session, we'll use that (which is
required for code eval to add new columns).

13 years agoextract meters from text data
Dobrica Pavlinusic [Fri, 18 Jun 2010 21:29:12 +0000 (23:29 +0200)]
extract meters from text data

13 years agoexample for in-place update
Dobrica Pavlinusic [Fri, 18 Jun 2010 20:24:07 +0000 (22:24 +0200)]
example for in-place update

13 years agoself-modifing code depends on modified columns
Dobrica Pavlinusic [Fri, 18 Jun 2010 20:23:03 +0000 (22:23 +0200)]
self-modifing code depends on modified columns

13 years agotwo code samples for pftf dataset
Dobrica Pavlinusic [Fri, 18 Jun 2010 20:15:41 +0000 (22:15 +0200)]
two code samples for pftf dataset

13 years agocleanup code depends and description generation
Dobrica Pavlinusic [Fri, 18 Jun 2010 19:56:37 +0000 (21:56 +0200)]
cleanup code depends and description generation

13 years agoadded console link
Dobrica Pavlinusic [Fri, 18 Jun 2010 19:48:14 +0000 (21:48 +0200)]
added console link

13 years agoquote column names in regexps
Dobrica Pavlinusic [Fri, 18 Jun 2010 18:27:57 +0000 (20:27 +0200)]
quote column names in regexps

13 years agoadded overwrite checkbox to code console
Dobrica Pavlinusic [Fri, 18 Jun 2010 18:19:44 +0000 (20:19 +0200)]
added overwrite checkbox to code console

Newly generated code will always be saved, but modifications won't
witout user explicitly clicking on checkbox or renaming description.

13 years agoload code depends and description
Dobrica Pavlinusic [Fri, 18 Jun 2010 17:58:44 +0000 (19:58 +0200)]
load code depends and description

13 years agosave commited code snippets
Dobrica Pavlinusic [Fri, 18 Jun 2010 17:30:22 +0000 (19:30 +0200)]
save commited code snippets

Dependent columns (part before the dot) is calculated automatically.
If there are newly created columns, they are suggested as description.

13 years agodump all log to /tmp/mojo_facets.log for debug
Dobrica Pavlinusic [Fri, 18 Jun 2010 17:29:44 +0000 (19:29 +0200)]
dump all log to /tmp/mojo_facets.log for debug

13 years agounload datasets from memory
Dobrica Pavlinusic [Fri, 18 Jun 2010 17:03:45 +0000 (19:03 +0200)]
unload datasets from memory

if checkbox m(emory) is unchecked on load screen

13 years agohide scrollbar in textarea
Dobrica Pavlinusic [Fri, 18 Jun 2010 16:30:00 +0000 (18:30 +0200)]
hide scrollbar in textarea

13 years agowe need filters for columns, not header
Dobrica Pavlinusic [Fri, 18 Jun 2010 16:16:29 +0000 (18:16 +0200)]
we need filters for columns, not header

header is filled just once from source file, while columns is updated
with columns added from code

13 years ago_data_items is unused
Dobrica Pavlinusic [Fri, 18 Jun 2010 16:14:17 +0000 (18:14 +0200)]
_data_items is unused

13 years agohide ignored files
Dobrica Pavlinusic [Fri, 18 Jun 2010 16:07:34 +0000 (18:07 +0200)]
hide ignored files

13 years agohide changes
Dobrica Pavlinusic [Fri, 18 Jun 2010 16:07:17 +0000 (18:07 +0200)]
hide changes

13 years agodump filters
Dobrica Pavlinusic [Fri, 18 Jun 2010 16:06:04 +0000 (18:06 +0200)]
dump filters

13 years agomark all columns used in code
Dobrica Pavlinusic [Fri, 18 Jun 2010 15:54:00 +0000 (17:54 +0200)]
mark all columns used in code

13 years agohighlight added columns with changed class
Dobrica Pavlinusic [Fri, 18 Jun 2010 15:33:28 +0000 (17:33 +0200)]
highlight added columns with changed class

13 years agowe need session columns to show applicable code
Dobrica Pavlinusic [Fri, 18 Jun 2010 12:38:04 +0000 (14:38 +0200)]
we need session columns to show applicable code

13 years agofix filter creation
Dobrica Pavlinusic [Fri, 18 Jun 2010 09:10:31 +0000 (11:10 +0200)]
fix filter creation

re-use of $i is just plain wrong, braking filters

13 years agohide code console after commit
Dobrica Pavlinusic [Fri, 18 Jun 2010 08:04:55 +0000 (10:04 +0200)]
hide code console after commit

13 years agoorder column must exist
Dobrica Pavlinusic [Fri, 18 Jun 2010 07:54:08 +0000 (09:54 +0200)]
order column must exist

If it doesn't we reset it to first columns because without it we
don't get any rows displayed

13 years agoMerge branch 'master' of git.rot13.org:/git/mojo_facets
Dobrica Pavlinusic [Thu, 17 Jun 2010 19:43:56 +0000 (21:43 +0200)]
Merge branch 'master' of git.rot13.org:/git/mojo_facets

13 years agoupgrade scalar values to arrays
Dobrica Pavlinusic [Thu, 17 Jun 2010 19:41:57 +0000 (21:41 +0200)]
upgrade scalar values to arrays

This usally happens when you write eval code wrong, like in

$row->{something} = 1;

istead of

$row->{something} = [ 1 ];

This is probably wrong place for this, but it makes simple mistake less
fatal.

13 years agodon't insert newlines in code textarea
Dobrica Pavlinusic [Thu, 17 Jun 2010 19:41:40 +0000 (21:41 +0200)]
don't insert newlines in code textarea

13 years agoadded reload original link, hide commit on errors
Dobrica Pavlinusic [Thu, 17 Jun 2010 19:09:10 +0000 (21:09 +0200)]
added reload original link, hide commit on errors

13 years agochange left-over $rec to $row
Dobrica Pavlinusic [Thu, 17 Jun 2010 18:56:47 +0000 (20:56 +0200)]
change left-over $rec to $row

13 years agobutton to close code console
Dobrica Pavlinusic [Thu, 17 Jun 2010 18:56:31 +0000 (20:56 +0200)]
button to close code console

13 years agodon't include code console if there is no code
Dobrica Pavlinusic [Thu, 17 Jun 2010 18:15:58 +0000 (20:15 +0200)]
don't include code console if there is no code

13 years agoload and test code snippets
Dobrica Pavlinusic [Thu, 17 Jun 2010 18:08:07 +0000 (20:08 +0200)]
load and test code snippets

13 years agobrowse code on disk at /code/
Dobrica Pavlinusic [Thu, 17 Jun 2010 17:42:08 +0000 (19:42 +0200)]
browse code on disk at /code/

13 years agoadded code examples
Dobrica Pavlinusic [Thu, 17 Jun 2010 17:15:33 +0000 (19:15 +0200)]
added code examples

13 years agobetter count example
Dobrica Pavlinusic [Thu, 17 Jun 2010 16:54:35 +0000 (18:54 +0200)]
better count example

13 years agoMerge branch 'eval-code'
Dobrica Pavlinusic [Thu, 17 Jun 2010 16:46:26 +0000 (18:46 +0200)]
Merge branch 'eval-code'

13 years agoelement in code eval is now called $row eval-code
Dobrica Pavlinusic [Thu, 17 Jun 2010 16:44:13 +0000 (18:44 +0200)]
element in code eval is now called $row

This is much better name than $rec, especially when you try to
read code example or explain it to someone :-)

13 years agoconvert action filename back to REST url
Dobrica Pavlinusic [Thu, 17 Jun 2010 16:43:51 +0000 (18:43 +0200)]
convert action filename back to REST url

13 years agomodify existing column example
Dobrica Pavlinusic [Thu, 17 Jun 2010 14:47:28 +0000 (16:47 +0200)]
modify existing column example

13 years agorebuild stats when new columns are added
Dobrica Pavlinusic [Thu, 17 Jun 2010 14:39:55 +0000 (16:39 +0200)]
rebuild stats when new columns are added

13 years agoMerge branch 'master' into eval-code
Dobrica Pavlinusic [Thu, 17 Jun 2010 14:27:51 +0000 (16:27 +0200)]
Merge branch 'master' into eval-code

13 years agodon't redirect to /data/index needlessly
Dobrica Pavlinusic [Thu, 17 Jun 2010 14:26:30 +0000 (16:26 +0200)]
don't redirect to /data/index needlessly

This allow us to restart server and just load needed data on demand with
reload as opposed to first selecting active dataset and rest of the
stuff which we allready have in session.

13 years agofix warning for datasets without modifications
Dobrica Pavlinusic [Thu, 17 Jun 2010 14:18:45 +0000 (16:18 +0200)]
fix warning for datasets without modifications

13 years agostore new columns in $loaded
Dobrica Pavlinusic [Thu, 17 Jun 2010 14:00:57 +0000 (16:00 +0200)]
store new columns in $loaded

This allows sorting to do the right thing (e.g. work)

13 years agofind columns used in code snippet and show them to user
Dobrica Pavlinusic [Thu, 17 Jun 2010 12:53:05 +0000 (14:53 +0200)]
find columns used in code snippet and show them to user

13 years agoadded two examples of perl code to eval on data
Dobrica Pavlinusic [Thu, 17 Jun 2010 12:48:44 +0000 (14:48 +0200)]
added two examples of perl code to eval on data

13 years agodefault code is nothing
Dobrica Pavlinusic [Wed, 16 Jun 2010 22:08:04 +0000 (00:08 +0200)]
default code is nothing

13 years agomock adding of single column on test or commit
Dobrica Pavlinusic [Wed, 16 Jun 2010 21:18:27 +0000 (23:18 +0200)]
mock adding of single column on test or commit

13 years agocommit changes only to filtered items
Dobrica Pavlinusic [Wed, 16 Jun 2010 20:23:07 +0000 (22:23 +0200)]
commit changes only to filtered items

13 years agofixes to code eval
Dobrica Pavlinusic [Wed, 16 Jun 2010 20:15:49 +0000 (22:15 +0200)]
fixes to code eval

Since code is now persistant in session, we need to apply changes
only if test button is really pressed.

This changeset also fixes browing code textarea on reload

13 years agoMerge branch 'master' into eval-code
Dobrica Pavlinusic [Wed, 16 Jun 2010 19:51:29 +0000 (21:51 +0200)]
Merge branch 'master' into eval-code

13 years agoclear all other ids from url
Dobrica Pavlinusic [Wed, 16 Jun 2010 19:51:00 +0000 (21:51 +0200)]
clear all other ids from url

13 years agoMerge branch 'master' into eval-code
Dobrica Pavlinusic [Wed, 16 Jun 2010 19:40:27 +0000 (21:40 +0200)]
Merge branch 'master' into eval-code

13 years agouse /data/items/:show
Dobrica Pavlinusic [Wed, 16 Jun 2010 19:38:41 +0000 (21:38 +0200)]
use /data/items/:show

This allows nicer REST API and at the same time, skips recording of
action because I re-used :id as show, so request doesn't have
parameters and isn't recorderd in actions to reduce clutter

13 years agopost code
Dobrica Pavlinusic [Wed, 16 Jun 2010 19:32:29 +0000 (21:32 +0200)]
post code

13 years agokeep last code in session
Dobrica Pavlinusic [Wed, 16 Jun 2010 19:19:53 +0000 (21:19 +0200)]
keep last code in session

13 years agoreally commit code evals to whole data
Dobrica Pavlinusic [Wed, 16 Jun 2010 18:54:21 +0000 (20:54 +0200)]
really commit code evals to whole data

13 years agotextarea_grow jquery plugin
Dobrica Pavlinusic [Wed, 16 Jun 2010 18:46:37 +0000 (20:46 +0200)]
textarea_grow jquery plugin

13 years agotest code or commit changes
Dobrica Pavlinusic [Wed, 16 Jun 2010 15:08:08 +0000 (17:08 +0200)]
test code or commit changes

13 years agofirst working code eval
Dobrica Pavlinusic [Wed, 16 Jun 2010 13:58:17 +0000 (15:58 +0200)]
first working code eval

It needs a lot of work still (error reporting, examples etc), but
this proof of concept shows it's usable :-)

Code example:

 map {
  s/^\.+//;
 } @{ $rec->{'Cited Author'} };

13 years agoadded code eval form
Dobrica Pavlinusic [Wed, 16 Jun 2010 13:19:11 +0000 (15:19 +0200)]
added code eval form

13 years agoadd dot before save link
Dobrica Pavlinusic [Mon, 14 Jun 2010 18:35:53 +0000 (20:35 +0200)]
add dot before save link

13 years agoadded __path_modified
Dobrica Pavlinusic [Mon, 14 Jun 2010 18:33:21 +0000 (20:33 +0200)]
added __path_modified

Use it to correctly show save link if needed
cleanup __invalidate_path_column (it doesn't need self, so double
underscore is good idea to indicate that)

13 years agoadded icon
Dobrica Pavlinusic [Wed, 9 Jun 2010 12:15:11 +0000 (14:15 +0200)]
added icon

13 years agodon't dump huge $unique helper hash
Dobrica Pavlinusic [Tue, 8 Jun 2010 20:22:01 +0000 (22:22 +0200)]
don't dump huge $unique helper hash

13 years agodisplay link to load dataset with changes applied
Dobrica Pavlinusic [Tue, 8 Jun 2010 20:21:30 +0000 (22:21 +0200)]
display link to load dataset with changes applied

13 years agocorrectly commit change and invalidate caches
Dobrica Pavlinusic [Tue, 8 Jun 2010 20:11:28 +0000 (22:11 +0200)]
correctly commit change and invalidate caches

This makes changes commit actually useful, because you can reply your
changes on original data again or on differet dataset

13 years agoall values must be arrays
Dobrica Pavlinusic [Tue, 8 Jun 2010 19:55:55 +0000 (21:55 +0200)]
all values must be arrays

13 years agodon't rebuild stats if called from edit
Dobrica Pavlinusic [Mon, 7 Jun 2010 12:56:59 +0000 (14:56 +0200)]
don't rebuild stats if called from edit

This allow us to rebuild stat just once after a bunch of edits or
running ./script/actions-to-changes

13 years agoshorter MAX_FACETS message to fit in the middle
Dobrica Pavlinusic [Sun, 6 Jun 2010 21:39:57 +0000 (23:39 +0200)]
shorter MAX_FACETS message to fit in the middle

13 years agoreload facet with all values in single click
Dobrica Pavlinusic [Sun, 6 Jun 2010 18:17:56 +0000 (20:17 +0200)]
reload facet with all values in single click

we also replicate alter on top bar to get better visibility
after page loaded

13 years agowarn about MAX_FACETS but include rest of checked
Dobrica Pavlinusic [Sun, 6 Jun 2010 16:32:24 +0000 (18:32 +0200)]
warn about MAX_FACETS but include rest of checked

This allows us to keep selected values on next submit

13 years agolink to config to change MAX_FACETS
Dobrica Pavlinusic [Sun, 6 Jun 2010 16:04:45 +0000 (18:04 +0200)]
link to config to change MAX_FACETS

13 years agoadded config and move export to left
Dobrica Pavlinusic [Sun, 6 Jun 2010 15:59:37 +0000 (17:59 +0200)]
added config and move export to left

13 years agoconfig MAX_FACETS
Dobrica Pavlinusic [Sun, 6 Jun 2010 15:52:23 +0000 (17:52 +0200)]
config MAX_FACETS

13 years agoload only MAX_FACETS facets, 10000 by default
Dobrica Pavlinusic [Sun, 6 Jun 2010 15:46:20 +0000 (17:46 +0200)]
load only MAX_FACETS facets, 10000 by default

This will help in keeping memory usage in browser under 100Mb and
page load time resonable.

13 years agowith empty session we don't need to die here
Dobrica Pavlinusic [Sun, 6 Jun 2010 14:54:19 +0000 (16:54 +0200)]
with empty session we don't need to die here

13 years agorelax import regex
Dobrica Pavlinusic [Sun, 6 Jun 2010 12:17:39 +0000 (14:17 +0200)]
relax import regex

13 years agouse File::Path mkpath to create export directories
Dobrica Pavlinusic [Sun, 6 Jun 2010 12:14:02 +0000 (14:14 +0200)]
use File::Path mkpath to create export directories

13 years agoimport filters
Dobrica Pavlinusic [Sun, 6 Jun 2010 11:44:26 +0000 (13:44 +0200)]
import filters

13 years agofix sorting of columns with undef values
Dobrica Pavlinusic [Sat, 5 Jun 2010 19:58:24 +0000 (21:58 +0200)]
fix sorting of columns with undef values

13 years agoedit will just mark stats invalid by modified == 2
Dobrica Pavlinusic [Sat, 5 Jun 2010 19:50:51 +0000 (21:50 +0200)]
edit will just mark stats invalid by modified == 2

So, we use magic number 2 in modified to rebuild stats so we don't have
to do it for each edit. This improved speed of ajax and
actions-to-changes

13 years agoshow status stats for actions processed
Dobrica Pavlinusic [Sat, 5 Jun 2010 19:42:11 +0000 (21:42 +0200)]
show status stats for actions processed

13 years agoapply actions sorted by time
Dobrica Pavlinusic [Sat, 5 Jun 2010 19:21:36 +0000 (21:21 +0200)]
apply actions sorted by time

13 years agodisplay skipped changes
Dobrica Pavlinusic [Sat, 5 Jun 2010 18:19:33 +0000 (20:19 +0200)]
display skipped changes

13 years agoshow number of changes
Dobrica Pavlinusic [Sat, 5 Jun 2010 18:12:21 +0000 (20:12 +0200)]
show number of changes

13 years agoinvalidate stats on data edit
Dobrica Pavlinusic [Sat, 5 Jun 2010 18:06:37 +0000 (20:06 +0200)]
invalidate stats on data edit

13 years agodocument tunring actions into changes
Dobrica Pavlinusic [Sat, 5 Jun 2010 18:03:46 +0000 (20:03 +0200)]
document tunring actions into changes

13 years agoadded backward compatiblity for data migration
Dobrica Pavlinusic [Sat, 5 Jun 2010 17:48:03 +0000 (19:48 +0200)]
added backward compatiblity for data migration

some time ago, I renamed changes to new_changes, but old data include
change filed, so we use it if found.

13 years agorename edits to changes
Dobrica Pavlinusic [Sat, 5 Jun 2010 17:38:51 +0000 (19:38 +0200)]
rename edits to changes

13 years agomore rigourous check of edits
Dobrica Pavlinusic [Sat, 5 Jun 2010 17:27:58 +0000 (19:27 +0200)]
more rigourous check of edits

13 years agofix json loading
Dobrica Pavlinusic [Sat, 5 Jun 2010 17:21:15 +0000 (19:21 +0200)]
fix json loading

13 years agodocument html table format in directory.html
Dobrica Pavlinusic [Sat, 5 Jun 2010 15:46:21 +0000 (17:46 +0200)]
document html table format in directory.html

13 years ago__normalize_header to cleanup names import-html-tables
Dobrica Pavlinusic [Sat, 5 Jun 2010 13:54:12 +0000 (15:54 +0200)]
__normalize_header to cleanup names

13 years agoproduce items structure
Dobrica Pavlinusic [Sat, 5 Jun 2010 13:46:58 +0000 (15:46 +0200)]
produce items structure

13 years agomove file import code into own package
Dobrica Pavlinusic [Sat, 5 Jun 2010 13:29:28 +0000 (15:29 +0200)]
move file import code into own package

13 years agoparse table using HTML::TableExtract
Dobrica Pavlinusic [Sat, 5 Jun 2010 13:08:29 +0000 (15:08 +0200)]
parse table using HTML::TableExtract

This will detect header as first line, and parse all other html files
with same number of (hardcoded) columns