Commit Graph

19 Commits

Author SHA1 Message Date
Mathieu Lonjaret dd230b2cba Merge "app/publisher: file rendering and navigation with jquery" 2016-07-19 21:48:16 +00:00
mpl 153fe65735 app/publisher: file rendering and navigation with jquery
Built with gopherjs.

Change-Id: I4ad487930f376b6ac5e2bd08944e7a3643ea650b
2016-07-19 16:37:35 +02:00
mpl f40cfc78bb make.go: generate search types for app/publisher
Using go:generate to call a shell script with some go doc + sed hackery.
we could probably do it better with go/types later if needed.

Change-Id: Ie1cf04d418b8b498f83f7029eb736dbc779feeb5
2016-07-18 17:05:58 +02:00
mpl faac33f409 app/publisher: infinite scrolling of set members
Done with gopherjs and jquery.

Some build tagging added in pkg/schema and pkg/netutil because
gopherjs does not support cgo (so no os/user).

Issue #798

Change-Id: Ib1e1e94185f75cdf696aa2dd31c57fa9e3af84a1
2016-07-15 00:34:52 +02:00
Mathieu Lonjaret bae6855ade Merge "make.go: build and run gopherjs for publisher" 2016-07-13 13:31:34 +00:00
mpl 3b2ec3af0f make.go: build and run gopherjs for publisher
Run gopherjs to generate trivial javascript code that is used by the
publisher app.

Context:
https://github.com/camlistore/camlistore/issues/798#issuecomment-226902924

github.com/gopherjs vendored in at rev
f3c437955da554f2643747a598b0cc772a749f3f

PLEASE NOTE that this copy of gopherjs has been modified to avoid
depending on fsnotify. Hence the -w flag and the gopherjs serve command
are most likely broken.
Diff for that modification:
https://gist.github.com/mpl/ac9033bb28207401b7cedc3d74e6c096

Dependencies for building gopherjs:

kardianos/osext 29ae4ffbc9a6fe9fb2bc5029050ce6996ea1d3bc
neelance/sourcemap 8c68805598ab8d5637b1a72b5f7d381ea0f39c31
spf13/cobra c678ff029ee250b65714e518f4f5c5cb934955de
spf13/pflag 7f60f83a2c81bc3c3c0d5297f61ddfa68da9d3b7
golang.org/x/crypto/ssh/terminal
c197bcf24cde29d3f73c7b4ac6fd41f4384e8af6
golang.org/x/tools/go/types/typeutil
ac02106e04bdb66a2db0413d931012bea165d7e0

github.com/gopherjs/jquery vendored in at
fbbfc4bbe29a29cb05788b66be44e0ac7f43cac7

jquery vendored in at 2.2.3

Change-Id: I7ff2d8e43e8a963f5ac1d13a2c936f263f7c53fc
2016-07-13 00:06:20 +02:00
mpl 65343d114d pkg/server/app: improve app handling
These improvements on the server app handler should help writing
and running stand-alone apps.

The two main goals are:
1) "simple" configurations should work automatically; the parameters for
the app are derived from the Listen and BaseURL of the Camlistore
server.
2) More advanced configurations, such as being behind a proxy, should be
easily configurable through the app's Listen, BackendURL, and ApiHost
parameters.

I had worked on them while doing the scanning cabinet app, and I am
backporting them now since we haven't landed the scanning cabinet yet,
and people have been having trouble setting up the publisher.

pkg/app/app_test.go is gone because app.ListenAddress is now dumb. The
hard work is done in pkg/server/app instead.

Fixes #818

Change-Id: Ice2610d6bac611b209cc3a928e67fa6093a41d3e
2016-07-04 22:21:16 +02:00
Brad Fitzpatrick e93e4f3822 Fix deadlock in search/index.
The describe requests were launching a storm of RLocks which weren't
safe in the presence of goroutines trying to acquire write locks.

Instead, make the corpus locking the responsibility of the caller and
add Lock/Unlock/RLock/RUnlock methods to the index and move locking up
a level.

This also adds a fair bit of context.Context plumbing which was used
in earlier debugging.

Fixes camlistore/camlistore#709

Change-Id: I8d7254d1e1da541f8c080d62f5408aac807fd3b1
2016-04-22 14:57:10 -07:00
Will Norris 77ed42edf8 add canonical import paths
The import path was added to the go file that included the package
documentation if one existed.  Otherwise, I used what seemed to be the
primary file for the package.

Fixes #689

Change-Id: If51be0e86529fd6f179e80af6781e639f8550fd2
2016-03-13 19:57:14 -07:00
mpl 12eddf9c19 vendor: go4.org/strutil go4.org/syncutil
They were internal packages (under pkg), which we are now moving to
go4.org, so we in turn need to vendor them in now.

Change-Id: I92224f731404d0bd4ca1c57492bed37cb3367ed4
2015-11-21 00:21:20 +01:00
mpl 1576fdad6d search: remove all thumbnail business
Fixes Issue #321

Change-Id: I4818580b52c335e204f58b176450459ebc26189c
2015-07-16 16:19:16 +02:00
Brad Fitzpatrick 6425d033fd server: refactor ui's DownloadHandler
Prep for efficient serving from blobpacked.

Change-Id: I5ea0902e6adcc0ba24e89984f684f0f2d4052022
2015-02-02 10:41:35 +01:00
Salmān Aljammāz 24aa482d97 Fix file embedding I broke with previous commit
oops. http://i.imgur.com/lV8VNe0.jpg

Change-Id: I369b786ff307ef4e3127a1a01e373d9ea6089fa7
2015-01-31 11:44:11 +01:00
Salmān Aljammāz 76356b5a59 various trivial doc fixes
mostly package doc comments.

Change-Id: Iaec3215fc2c24862018ac3a47c276eccfed848c4
2015-01-30 07:45:21 +03:00
mpl b7d8d55bb3 pkg/webserver: use a custom logger, if provided
http://camlistore.org/issue/479

Change-Id: I41bd0a02d40e9ad94f655b5c1abdfa5db76c7019
2014-07-29 01:40:51 +02:00
mpl 26cb64e825 Introduce search.QueryDescriber interface. *client.Client implements it.
There are several places where we're using a *search.Handler, when we
only want to be able to do query and describe requests. When these
places need to be moved also out of the context of camlistored, (like
when making a server app such as the publisher), the QueryDescriber can
be used, and the adequate implementation (*search.Handler,
*client.Client, or any other) is used depending on the context.

Change-Id: Ie1c5bb6f1bbba32c24a8eb2d1175af95ffcc8335
2014-07-21 22:20:24 +02:00
mpl b8e3890d1f serverinit: bootstrap publisher camliRoot in dev-mode
http://camlistore.org/issue/455

Change-Id: If6e1977e5fd63d48accd4a7f99f063f6c990d4e1
2014-06-19 00:27:54 +02:00
mpl 736648ce9c publisher app: SSL support
http://camlistore.org/issue/458

Change-Id: I89013a345dbe06fd02c877422cadb8d6def1580d
2014-06-16 19:41:22 +02:00
mpl a34f9e2669 publisher app
http://camlistore.org/issue/365

Change-Id: I281fdcbbe6a2bdf15607e75a21bc93b453f82c85
2014-06-15 00:03:03 +02:00