Vitor Baptista
b26f270ffa
[ #425 ] Fix Dataset.query() when called with Query model
...
The problem is that Backbone >= 0.9.9 doesn't accept updating models with:
model.set(otherModel);
That needs to be changed to:
model.set(otherModel.attributes);
Dataset.query() accepts both regular JS objects and Query models, so we need to
check the parameter type to support both.
2014-05-14 15:51:11 -03:00
kielni
964a593106
fix variable hiding when finding filter to replace
2014-01-06 14:56:31 -08:00
mjuniper
f96099513e
Don't override backbone.sync globally; only inside recline.Dataset.
2013-12-10 15:24:21 -07:00
kielni
56ac25611e
change range filter template to match Elasticsearch convention: from/to instead of start/stop
2013-10-29 07:29:51 -07:00
kielni
ee2067da68
this.backend might be null; set handleResult before fetch
2013-09-10 10:21:02 -07:00
kielni
91c0f7704a
allow a dataset to override handleQueryResult
2013-09-09 07:31:12 -07:00
kielni
f7f010ea33
add new methods for facets: removeFacet, clearFacets, and refreshFacets
2013-09-06 13:51:17 -07:00
kielni
95fab060c3
add options to addFacet for size and silent
2013-09-06 11:58:23 -07:00
kielni
ef1064b888
add method to replace a filter
2013-09-06 11:40:31 -07:00
Rufus Pollock
4d128af797
[model,bugfix][s]: if explicitly passed field info to a dataset use that over any field info derived from backend.
2013-06-02 20:04:09 +01:00
Dan Wilson
f6a6a41c07
Rewrote Deferred selection code to not use "window".
...
This means it can be used in a web worker.
2013-05-17 18:27:50 +01:00
Dan Wilson
d626fab31c
Fixes a bug in querystate handling. Fixes okfn/dataexplorer#120 .
2013-05-16 20:48:00 +01:00
Dan Wilson
b72dd0fb62
Enabled strict mode, and fixed issues raised.
2013-05-13 16:53:55 +01:00
Rufus Pollock
fc79518ba5
[#349,transform][s]: remove transform view and associated code - fixes #349 .
2013-05-04 22:13:27 +01:00
John Glover
9e47ea3ad9
[ #340 ] jshint cleanup of model.js
2013-04-15 17:35:59 +02:00
Rufus Pollock
dc55d53fdd
[#330,model][s]: getFieldValue & getFieldValueUnrendered now return '' if field argument is null / undefined - fixes #330 .
2013-02-24 14:34:28 +00:00
Rufus Pollock
723d128d13
[#313,backend][s]: use jquery deferred if available - fixes #313 .
2013-02-08 13:31:03 +00:00
Rufus Pollock
bd98d15b61
[#313,backend/memory][xs]: use jquery deferred if we can.
2013-02-08 13:20:38 +00:00
Rufus Pollock
68215a0fa5
[#313,model][s]: use jquery promise api if available.
2013-02-08 13:05:00 +00:00
Rufus Pollock
965bf6e9bb
[#172,refactor][s]: switch everything to use underscore.deferred rather than jQuery.Deferred - fixes #172 .
...
* In addition reduced pattern of passing in $ to backend modules - instead just use jQuery explicitly (this should make it easier to mock-out jQuery if you waned to
2013-01-04 20:13:16 +00:00
John Glover
9bfbce776b
[ #264 ] Fix for #264 from ckan-updates branch.
...
Uses _.defaults rather than performing an explicit
deep copy.
2012-12-10 16:57:44 +01:00
Rufus Pollock
5a322e2c7c
[#286,bugfix]: fix for case where fields array has nulls in it.
...
If passed fields = [ null, ..., ...] or [ ... , null, ...] we fail in Dataset._normalizeRecordsAndFields method because:
1. If null is first element we do not do field generation correctly because typeof(null) is object - ede211646a/src/model.js (L108)
2. We call toString on field names which fails for null ede211646a/src/model.js (L113)
2012-12-09 18:58:52 +00:00
Rufus Pollock
ede211646a
[#264,bugfix,filtereditor][s]: track down and fix bug with addFilter (and hence filtereditor) - fixes #264 .
...
* Quite a subtle bug due to the fact that we were not doing a deep copy on the filter template in addFilter
2012-11-08 20:35:03 +00:00
Rufus Pollock
f6a3395b40
[#258,model][xs]: tiny bugfix for cases where fields in raw state contain a non-string - fixes #258 .
2012-10-19 07:57:47 +01:00
Rufus Pollock
7819b3b185
[#248,model][s]: normalize Field types where possible by mapping standard type aliases to default type name - fixes #248 .
...
* view.graph.js improve graph view by making sure datetime for an axis is judged by whether it is date, datetime or time not just date!
* backend.ckan.js some type conversions now done in core model so can be removed
2012-10-12 22:06:56 +01:00
Rufus Pollock
1bcb163ebe
[filter,refactor][s]: remove fieldType attribute on filters as can (and should) get fieldType from model if needed.
...
* fieldType is needed now as we parse values to specific type before doing filters
* needed to correct some tests for this change
2012-10-04 07:01:41 +01:00
Rufus Pollock
d5f0b074c2
[model][xs]: tweak to _backendFromString to remove option to look up backends specified as full module pathes as this is a liable to bugs and it is not being used.
2012-09-18 22:57:44 +01:00
Rufus Pollock
70c2676fc0
[#196,bugfix][s]: add back in support for serializing *all* dataset info into state object (and restoring from it) - fixes #196 .
...
* Also minor refactor move dataset restore functionality into multiview (it makes more sense as it is multiview which does the serializing in the first place)
* Improved tests for this!
2012-08-16 14:28:44 +01:00
Krzysztof Trzewiczek
532f777f78
[#166,closed,gdocs/backend] Added title to GDocs backend metadata
2012-08-09 17:59:25 +02:00
Krzysztof Trzewiczek
d7fc9ba1f8
[#96,closed] Range filter with support for string, number and date data-types
2012-08-09 13:00:41 +02:00
Krzysztof Trzewiczek
d445629318
Simple range filter added to Memory backend
2012-08-08 17:44:47 +02:00
Rufus Pollock
d599f75e85
[model,refator][s]: reintroduce summary on Record object deprecating recordSummary on Dataset.
...
* Reverses change in 1dadc1106bd2dbcad4580d3889e15ac44c865f80
* Record now has fields attribute passed down from Dataset. This is needed in order to support summary method and also makes sense -- as pointed out by @zephod
* Update examples
2012-07-09 01:29:46 +01:00
Rufus Pollock
a58f5e5bb0
[#174,refactor][s]: rename currentRecords to records on Dataset.
2012-07-05 15:37:17 +01:00
Rufus Pollock
b3ac590a58
[model][s]: add a constructor with the name of the object for better debugging.
2012-07-04 15:00:13 +01:00
Rufus Pollock
202ca2dce0
[model,bugfix][s]: correction for change introduced in last commit to move summary method from Record to Dataset.recordSummary.
2012-07-03 15:35:40 +01:00
Rufus Pollock
1dadc1106b
[#113,docs/tutorial][l]: tutorial-basics written giving introduction to dataset and associated functionality.
...
* Minor corrections to several other parts of docs.
2012-07-01 15:40:04 +01:00
Rufus Pollock
568eb1e034
[model,bugfix][xs]: prevent query function triggering a second query by using silent: true when setting queryState.
2012-07-01 13:54:00 +01:00
Rufus Pollock
b9555cce6a
[refactor][xs]: rename docCount to recordCount.
2012-07-01 09:01:21 +01:00
Rufus Pollock
f06b9ad1b1
[field][xs]: formatter for geo_point type (like an object).
2012-06-29 20:40:15 +01:00
Rufus Pollock
aa1a362bb2
[#94,transform][m]: rework transform functionality and integration extensively (+ its working again!).
...
* view.transform.js: major refactor
* general record transform rather than column transform
* Normal dataset view rather than modal
* Reworked UI
* split out css from grid.css and simplify
* model.js + backend.memory.js: transform implemented on Dataset and Memory (Dataset passes off to _store).
* multiview: use new transform view
* _includes/recline-deps - rework to use source files rather than built ones
2012-06-28 23:52:58 +01:00
Rufus Pollock
3d6ad46cc5
[#162,refactor][s]: backend is now string in 'normal' set of Dataset arguments.
2012-06-25 10:10:12 +01:00
Rufus Pollock
5216e23f45
[model/query][s]: tidying up last part of recent filter refactor by removing addTermFilter + addGeoFilter - closes #154 .
2012-06-25 09:30:37 +01:00
Rufus Pollock
d48115d274
[#162,model/dataset,bugfix][s]: call toJSON on dataset before passing to backend on query.
2012-06-24 15:02:15 +01:00
Rufus Pollock
1fee4c2821
[#165,model/dataset][m]: new method normalizeRecordsAndFields to ensure we get valid records and fields from fetch (e.g. no duplicate field ids!).
2012-06-24 12:42:22 +01:00
Rufus Pollock
bb02f75539
[doc/model][m]: move all main model item docs in jekyll doc library-model.markdown and start tidying up.
...
* Started this in branch even though general as a pre-cursor to documentation of new backend setup.
2012-06-23 23:27:11 +01:00
Rufus Pollock
31980857a9
[#162,be/elasticsearch][s]: convert elasticsearch to the new setup (remove all Backbone from the Backend!).
...
* Also convert to new QueryResult format in which no _source, _type etc - cf #159
2012-06-23 22:31:23 +01:00
Rufus Pollock
dd45991321
[#162,refactor][s]: backend fetch method dataset argument is simple JS object not backbone Dataset.
...
* Helps make Backends simpler and more independent of Model
2012-06-23 22:29:12 +01:00
Rufus Pollock
3f37da089a
[#162,refactor][s]: remove recline.Memory.createDataset now that it is obsoleted by recent improvements.
2012-06-23 20:38:47 +01:00
Rufus Pollock
6e5c15a816
[#162,backend,model][l]: major commit addressing several parts of the backend / model refactor in #162 .
...
* Now have Dataset setup and manage "memory store"
* New fetch API as per issue #162 spec
* dataproxy utilizes useMemoryStore attribute and just implements fetch
* Switch gdocs to use Memory.Store properly via new useMemoryStore + fetch methodology
* Memory backend: query function now follows promise API, remove fetch,upsert,delete and add save function to Store object
* Also refactor to remove _source in QueryResult "hits" attribute on all backends but ElasticSearch - cf #159 (note this means ES currently broken)
2012-06-23 20:23:24 +01:00
Rufus Pollock
1ed3b9f423
[be/dataproxy][m]: switch dataproxy to use Memory data store ( fixes #164 ) and switch to new backend / model setup ( #162 ).
2012-06-23 18:00:30 +01:00