Commit Graph

173 Commits

Author SHA1 Message Date
Brad Fitzpatrick a78704c979 search: add AnyCamliType constraint
Change-Id: Ib129d4d365d040e0b12b2e3aa35c38a59ed7bc04
2013-10-18 19:10:59 -07:00
Brad Fitzpatrick ea079282d6 search: tests for logical operators
Change-Id: I3d389c3b58206fd98140834162aec17218bbce14
2013-10-18 18:50:19 -07:00
Brad Fitzpatrick f515ec9861 search: add test for blob prefix queries
Change-Id: If53acf332f8eb72d82735d8707a77a21694e83ba
2013-10-18 18:28:05 -07:00
Brad Fitzpatrick b9d4b7dc09 search: search on blob size
Change-Id: Id87fb65ebe0fec304637c6acb29ea27bd99d3bb1
2013-10-18 18:12:23 -07:00
Brad Fitzpatrick 7101fe1b64 search: search on CamliType
Change-Id: Ie4c0655da9407b49a67cd6d11240b697bd9bd6f0
2013-10-18 17:56:56 -07:00
Brad Fitzpatrick 17ecf8df07 search: start of general Query support. very rough draft.
Start of something that builds and 'works', but barely fleshed out at all.
Likely to change drastically yet.

Change-Id: I7fba25528a341ff2dbbc4dbb579f2450d7889320
2013-10-18 17:17:35 -07:00
Brad Fitzpatrick 7742892670 Merge branch 'master' of https://camlistore.googlesource.com/camlistore 2013-10-05 20:46:43 -10:00
Brad Fitzpatrick c8badb4404 Misc cleanups
Change-Id: I9183ca1ec7a98df210373f27ec3493c996f00f74
2013-10-05 20:46:39 -10:00
Aaron Boodman 74eb8e6c3c Further visual refinements to layout of homepage:
* Increase default image size a few settings
* Increase gutter between items
* Remove extraneous padding and whitepsace
* Remove unneeded gigantic heading
* Move build version into statusbar
* Change algorithm for fitting rows -- instead of preferring to clip
  edges of image, instead prefer to adjust height of rows. I find it
  looks more interesting visually when the widths of the images vary
  more.
* Replace folder and file icon with something better looking
* Swap order of + and - buttons in toolbar, they were backward from
  what is typical

Change-Id: Idfe85a813926c2c9eea774a86046df62ecacd45c
2013-10-04 14:04:38 -07:00
mpl 304f5c4b38 camput attr: support -del
Change-Id: I28460fed5b572ba9a83cfcb04f38e42124fa723f
2013-10-03 15:07:43 +02:00
Brad Fitzpatrick 128f56887b Handle GET and HEAD the same in more (all?) places.
Change-Id: I486a95f0a6fc127d17dcf0abeb94eab292980156
2013-09-15 20:12:26 +01:00
Brad Fitzpatrick 0375ee2d47 Do directory describe queries in parallel.
Change-Id: I9e3a4d97a97b177356d11d4ff0a735d80bfc63db
TODO: use syncutil.Group in many more places.
2013-09-12 16:22:00 +01:00
mpl d488c576fc search: support for static directory children
This change introduces a new index entry
to help with finding the children of a static directory.
It also fixes ResolvePrefixHop so that it takes
into account static directories, and not only collections.

This is the first step to support publishing static directories.

http://camlistore.org/issue/179

Change-Id: I5666e5caa6c782004054ae4c19a6b6119d4fda8b
2013-09-10 23:06:48 +02:00
Brad Fitzpatrick 3a5793b743 search: actually use result of SearchPermanodesWithAttr and don't leak a goroutine
Change-Id: Ia1ff8acc1d396901c6b589dbe9a972e3dd4df05f
2013-09-03 18:22:05 -07:00
Brad Fitzpatrick 0bdf20884b all: delete pkg/blobref; convert all from *blobref.BlobRef to new blob.Ref
Change-Id: Id2dfb7f19452bedf4f3c9310b36227fd8117b225
2013-08-03 19:54:30 -07:00
Aaron Boodman 24458fca93 Tile images nicely within BlobItemContainer.
Screenshots here: http://imgur.com/XN9qFLP,PeEDPnW,CS35Pw6,VS0nHaG,SNT1ZXZ,2nMWVYz,8RmuLuw,NE8b26n,EFErMdg

Change-Id: I6a66b5b782363882261b80e7ac9930ff1046efa6
2013-08-01 22:25:52 -07:00
Brad Fitzpatrick c28fcb4cda search: let the HTTP interface describe multiple blobs at once
Change-Id: I1998e0fa9a550fb15589bde6da1b549c14bcb97c
2013-07-11 20:17:05 +10:00
Brad Fitzpatrick 4a404a3c60 search: clean up describe handler and DescribeRequest
Change-Id: I4e6184765b6139de3bdc153d27a12d3cb205a55e
2013-07-11 10:35:06 +10:00
Brad Fitzpatrick d2b8d08397 search: make describe follow camliPath attributes
Change-Id: I875587a734d118a3f3fc204901ae1788247b91ab
2013-07-11 10:03:56 +10:00
Andrew Gerrand 64153d9f02 client,search: add withattr and describe to client
Change-Id: I9d55a7283bc7c99560e61aea80024c8f80dacc05
2013-07-10 21:10:18 +10:00
mpl 574b5feb96 Merge "publish: serve a zip of all files in a published path" 2013-07-08 13:32:01 +00:00
mpl 86b591cab9 publish: serve a zip of all files in a published path
Change-Id: I415f4d50936ab419695389dcda1facaf71565a8d
2013-07-08 13:00:41 +02:00
Brad Fitzpatrick 9468e5ba70 More docs. Every package is documented now.
misc.CountingReader moves into readerutil.

pkg/atomics is folded into pkg/types.

pkg/test/testdep is folded into pkg/test, with better name/docs.

Old cruft from pkg/webserver is deleted.

Change-Id: I3f72d8b29804254ef944995fb085837c878f79f5
2013-07-07 21:12:30 -07:00
Brad Fitzpatrick d832b6a06f Document PrefixHandler and clean up users with accessor functions.
Change-Id: Ib0b23ff3cc548a35c35eae1cdc59a8673dc19638
2013-06-12 11:17:30 +02:00
mpl af204bca92 newui: search page, with index page style
Change-Id: Iad9a3e914a4ffa79af6629c88a13a9946b7f3a2c
2013-05-19 00:38:19 +02:00
Brad Fitzpatrick 85c0fa9c61 Merge "search: factorize max results sanitation, allow max specified from ui" 2013-05-01 02:22:24 +00:00
mpl e9443ec182 search: refactor serveEdgesTo with annotated structs
http://camlistore.org/issue/99

Change-Id: I84ed551db4fecbd1ca06d76759d7512d1651bbf2
2013-04-26 18:33:27 +02:00
mpl 7c08f37abe search: factorize max results sanitation, allow max specified from ui
Change-Id: I066369829816189dbd2f682ce003c8b82022d131
2013-04-04 15:38:55 +02:00
mpl 0dfd84a7d8 search handler: return correct thumbnail dimensions
images: DecodeConfig to get the predicted width
and height after EXIF correction
search&index: add GetImageInfo and use it in search
to predict the thumbnail dimensions

http://camlistore.org/issue/115

Change-Id: I358136a2ab03ea09c8f8fd2fa0dc574921c819c5
2013-03-25 17:06:15 +01:00
mpl 5344af8e39 search handler: more tests, and fix for the describe depth race
http://camlistore.org/issue/121

Change-Id: I5807df784d9bd47f3cc8720a891d458ee722013b
2013-03-06 19:04:10 +01:00
Brad Fitzpatrick ace9474d95 index: index file times too, and return in index.GetFileInfo.
Change-Id: I59d91f0938c725a4cbdf5ca933cdff3529e25f5f
2013-02-18 21:31:41 -08:00
Brad Fitzpatrick 8155b3867a Fix case of MimeType to MIMEType, per Go style.
Change-Id: I6c67a61cea2c71d7fa5d52c4ae283e33e993fd0f
2013-02-18 11:16:13 -08:00
mpl 1b06e32f30 search handler: formalize and split serveSignerPaths
Change-Id: I8399b55aed45d3456b0cad89a4cf5bb6f4c57d69
2013-02-13 17:51:39 +01:00
mpl 46846e0844 search handler: getClaims: error out if nil permanode
Change-Id: Ieeb36ec3c3ed0c9f68abc6a659ba8f0b23a5bbb1
2013-02-12 16:46:16 +01:00
mpl 1f2b140bbd search handler: formalized and split serveClaims
Plus a few related cleanups (better httputil use).

Change-Id: I9ea34f2fe658624d05b7a6f347f5d946759a07b5
2013-02-12 01:18:46 +01:00
Brad Fitzpatrick f1845db855 search: split metaMap into metaMap and metaMapThumbs
Change-Id: I5a29166be7ed44a7c6a954ba689f1f3dbfbe57d7
2013-02-10 12:59:05 -08:00
Brad Fitzpatrick 7300184066 httputil, search: more HTTP util usage, deleting code.
Change-Id: I90e51a3e8b3fdd868b26a40446f9715aaa7f89c0
2013-02-08 22:21:09 -08:00
Brad Fitzpatrick e624e24c46 httputil/handler: start of more formal approach to input validation and HTTP error handling
Change-Id: I219a6263e1ba2d0e64819c01a885078dbf1c8b4c
2013-02-08 19:04:24 -08:00
Brad Fitzpatrick 3605285924 Add pkg/types with types.Time3339; use it in search/handler JSON types
Change-Id: I79bf1484ef8b3548bca2e732f189352bcfbcd6db
2013-02-08 18:10:31 -08:00
mpl 0a84607099 search handler: all funcs now rid of manual maps responses.
serveDescribe, servePermanodesWithAttr, and serveSignerPaths
rewritten like serveRecent. Got rid of populateJSON.

http://code.google.com/p/camlistore/issues/detail?id=101

Change-Id: Id730d40005476634b138b13260248e497d1a87d0
2013-02-09 02:12:06 +01:00
Brad Fitzpatrick 76735113f9 fs: recent directory works.
Change-Id: I13fb418e7ef32c8be8ab635b8179fbded5e18c79
2013-02-07 22:43:50 -08:00
Brad Fitzpatrick e867ea7dc0 client, search, fs: cammount now getting search queries back
Change-Id: I68541e9f9d54fa4240872d440972ad39f6bad33f
2013-02-07 21:55:17 -08:00
Brad Fitzpatrick a068e4d7aa search: separate out query logic from HTTP/JSON on GetRecentPermanodes
Change-Id: I4afb34aa548e83a2db2374a4cca2a9d5368473be
2013-02-07 21:34:25 -08:00
Brad Fitzpatrick f8639c5c5c search: fix error message
Change-Id: Ic89e3a32a919414746eeb1c96f3b694fabf9798a
2013-02-07 19:20:37 -08:00
Brad Fitzpatrick cfa43225d4 search: move thumbnailSize out into a func
Change-Id: If7d6ab242fe7fcef2174aa9dad12a85a06ce0091
2013-02-07 09:40:59 -08:00
Brad Fitzpatrick 6cc5f33da1 search: handler response type cleanup (Issue 99).
Notably, don't mix 'meta' bag keys with rest of response. Makes it easier for both Go and Closure types to not mix keys from one type with another type.

Change-Id: I65e51f2a6c236c5111b5a9b88830e1220d6b29d4
2013-02-07 09:33:00 -08:00
Brad Fitzpatrick c34fc8c345 search: use a struct for recent items, not manual map
Change-Id: I443983b3689434afc0471a55357a78d03c0bb18f
2013-02-07 08:05:31 -08:00
Brad Fitzpatrick 5a8afdf951 search: rename populateJSONThumbnails to populateJSONAndThumbnails
Change-Id: Ibd4db3909c01c8a352df1875de703c71d657c428
2013-02-07 07:54:45 -08:00
Brad Fitzpatrick 6e35c1c26e search: don't fail the whole search request if dir info isn't available
Change-Id: Iae78d099c608dbe41f8ce9ccad1a11d70d212c48
2013-01-20 11:12:32 -08:00
mpl 67c5678062 Index directories with "fileinfo", and use this to
find their name in a search request.

Fixes http://code.google.com/p/camlistore/issues/detail?id=79

Change-Id: I755afd8f52dbd2f8a48ba72bed0a6b0192d1dd71
2013-01-09 16:59:04 +01:00
Brad Fitzpatrick 31df4a7a01 Add generic file icon.
Change-Id: I23517e6112ddfd7048a575161a7785b73fb7bd0f
2012-12-06 17:36:34 -08:00
mpl d1e5a1d4c6 search UI: find all roots
This change allows to find all roots (permanodes with the
"camliRoot" attribute) from the search.html ui page.
To achieve that, func (x *Index) SearchPermanodesWithAttr
now uses a prefix string without the query part if the
query is "".

http://code.google.com/p/camlistore/issues/detail?id=35

Change-Id: I396fba683e6e7b2296d1f0df8009c07e3c2cd09d
2012-11-14 11:11:40 +01:00
mpl ffcbad9528 fix search handler test:
leading slash for thumbnailSrc removed

Change-Id: If402235986d12bfbba11bbaf4f82d5cb051ec226
2012-11-12 23:20:24 +01:00
mpl def34eff94 display thumbnail on the permanode page if content is image.
The serveDescribe search handler now also checks for the
thumbnails req parameter and uses populateJSONThumbnails.
As a result, the client side can directly use thumbnailSrc
from the json response.

http://code.google.com/p/camlistore/issues/detail?id=62

Change-Id: I4ff606f8d3ef291490f05cabdc66219744b53638
2012-11-10 00:04:44 +01:00
mpl 438ae4ecb4 recent permanodes thumbnails
Change-Id: I140766df4b58853e5bc4358f564cf1cfc807882a
2012-11-09 19:43:18 +01:00
Brad Fitzpatrick ef47a3533e index: fix deadlock, document PeerBlob and friends' lock rules, rename lk to mu 2012-11-09 10:00:47 -08:00
Brad Fitzpatrick a41269e78e Reindex all dev-server blobs into memindex on restart.
Required some sync work (full syncs on start, blocking full syncs on
start, and also adding a dev-only hack to force a depedency from
search -> sync, to control the handler initialization order, otherwise
publish handlers would race with the sync handler and they'd create
new "blog" and "pics" permanodes and we'd end up with duplicates).
2012-11-07 22:40:17 +01:00
Brad Fitzpatrick e582f155ed Thumbnails for permanodes with members (folder) and camliContent to file images 2012-11-05 18:01:03 +01:00
Brad Fitzpatrick 6f82d343ef search: push thumbnail logic into its own function 2012-11-05 17:23:42 +01:00
Brad Fitzpatrick 9b7faaca07 Push server-side thumbnails down into DescribeRequest. Use node.png. 2012-11-05 16:32:56 +01:00
Brad Fitzpatrick 03b8cd143f Start of server-side icon support for recent permanodes list. 2012-11-05 15:48:13 +01:00
Brad Fitzpatrick 832b774025 search: add EdgesTo handler and tests 2012-11-05 15:09:34 +01:00
Brad Fitzpatrick f696007a14 index: implement EdgesTo
For finding back references in the graph.
2012-11-05 10:29:42 +01:00
Brad Fitzpatrick e783ad1717 Add another search handler test, for recent permanodes.
Change-Id: Iaf40cd94aba7b96c16fa1b04c2bfcebdfeea870e
2012-11-04 15:26:13 +01:00
Brad Fitzpatrick 305b4557b9 Improve search handler tests.
Change-Id: I5639447cc95f06d0773e7f15cb601d51c7dd5031
2012-11-04 13:59:19 +01:00
Brad Fitzpatrick 4b0d2841ee Add search.EdgesTo method to search interface. No implementation yet.
Change-Id: Ie3a9eb91e218e172b195d55cb9c17cb6c8f819ce
2012-11-03 16:08:37 +01:00
Brad Fitzpatrick 1466c77198 Add 'edgeback' key to index, for going backwards.
Change-Id: I43057a6fb96c3e8d9364002288d5c7b9ad2fd034
2012-11-03 14:25:48 +01:00
mpl 3e9aef409c search handler: documented the "attr" values when searching for a permanode
Change-Id: I607d1fe016078912faac9864630552cd2b496aa2
2012-10-24 17:26:46 +02:00
Brad Fitzpatrick 8c293e34b6 Per Go initialism style, rename Json to JSON 2012-07-28 15:42:56 -07:00
Brad Fitzpatrick 3b30cbd63f add TODO
Change-Id: Icd386f58b9004b78dd52bdaf32cca257d1593495
2012-05-13 13:30:42 -07:00
Brad Fitzpatrick 1b63c44b4e Update all os.ENOENT references to ErrNotExist. Mostly docs/dead code.
Change-Id: I2bb4d5a9d9c610e8dce2309335d06046dbb1e049
2012-05-13 12:06:21 -07:00
Brad Fitzpatrick 997f0db09e fix pkg/server tests
Change-Id: I2b34e61a128c15f20392b325a532b113a457f488
2012-03-29 16:22:05 -07:00
Brad Fitzpatrick 0714a463c9 Update from r60 to [almost] Go 1.
A lot is still broken, but most stuff at least compiles now.

The directory tree has been rearranged now too.  Go libraries are now
under "pkg".  Fully qualified, they are e.g. "camlistore.org/pkg/jsonsign".

The go tool cannot yet fetch from arbitrary domains, but discussion is
happening now on which mechanism to use to allow that.

For now, put the camlistore root under $GOPATH/src.  Typically $GOPATH
is $HOME, so Camlistore should be at $HOME/src/camlistore.org.

Then you can:

$ go build ./server/camlistored

... etc

The build.pl script is currently disabled.  It'll be resurrected at
some point, but with a very different role (helping create a fake
GOPATH and running the go build command, if things are installed at
the wrong place, and/or running fileembed generators).

Many things are certainly broken.

Many things are disabled.  (MySQL, all indexing, etc).

Many things need to be moved into
camlistore.org/third_party/{code.google.com,github.com} and updated
from their r60 to Go 1 versions, where applicable.

The GoMySQL stuff should be updated to use database/sql and the ziutek
library implementing database/sql/driver.

Help wanted.

Change-Id: If71217dc5c8f0e70dbe46e9504ca5131c6eeacde
2012-02-18 21:53:06 -08:00