Commit Graph

285 Commits

Author SHA1 Message Date
mpl 8d76f0563b vendor: go4.org/syncutil/singleflight
Previously pkg/singleflight

Imported from github.com/camlistore/go4/ at rev
039bcc4ca7e407e5611cbdf15a1f208be0bceda0

Also reimport vendor/go4.org/syncutil because some of it got split into
github.com/camlistore/go4/syncutil/syncdebug

Change-Id: Iaf48de71928d17e0410442ea6f5bef7262ba60d2
2015-11-24 17:28:28 +01: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 8a10bb52e0 pkg/server/status: link to GCL logs on GCE
Fixes issue #592

Change-Id: Ife405816ee42902258c93eac917a6ff5bada4138
2015-11-20 01:26:12 +01:00
mpl d9d5088fbe pkg/server/sync: actually use runSync 1st arg
Change-Id: I9866b980595f72cdb1996fdd40c7195a7265d071
2015-10-26 19:18:01 +01:00
mpl 7410fc29ab pkg/server/help: fix server's hostname when needed
When baseURL or listen is something like ":3179" or "0.0.0.0:3179", the
resulting server hostname in the client config would be useless.
Therefore, in that case we use req.Host to set the hostname instead.

Fixes issue #641

Change-Id: I33d65776fbac945a411f4328ebbbc5763dec8eb6
2015-10-21 00:16:21 +02:00
mpl 666d525530 blobserver, server: use httputil.MultipartReader for vendored multipart Reader
We redefine a MultipartReader(*http.Request) function to use instead of
req.MultipartReader, so we can get a (bugfixed) multipart Reader from
our vendored mime/multipart, instead of the buggy one from the stdlib's.

Fixes issue #642

Change-Id: I6a205bff915632d4ee77547e6e26bc0af99665e9
2015-10-14 19:22:10 +02:00
mpl 6dfe405666 camput init: get client config from server help handler
This is particularly useful for getting clients fully configured for a
server on the same host.

Context:
https://github.com/scaleway-community/scaleway-camlistore/issues/2

Change-Id: I667dd32a80cba4e1e6f6a4ca86a0497a72047d30
2015-09-28 16:44:38 +02:00
mpl 483d9dfacf server/help: Add search bar predicates. reorganize.
Change-Id: Ia41b9dbc52dd90e80ab2a429b515cd2491fa03dc
2015-06-29 17:54:17 +02:00
mpl b8dd557bce pkg/server/app: fix path to env vars doc
Change-Id: I0438da76082e076259bfcbbeaf598bb5d8f50632
2015-06-25 23:51:13 +02:00
Mario Russo 7b1903d5b1 pkg/server: added help handler
- Available at '/help/'
- Loads and parses server config upon init and generates the necessary client config for access
- Links to 'Downloadable Tools' are not functional (task is not yet completed)
- A link was added to the default server page as well as a 'Help' option to the Piggy menu

Issue: #536

Change-Id: I10629de034c908ebc76f6feacbbfca1df7bf1c2b
2015-05-28 10:02:17 +02:00
Mathieu Lonjaret 6570d9ea94 Merge "pkg/server: decouple sign handler from UI, replace JSON maps with structs" 2015-05-25 16:52:40 +00:00
Fabian Reinartz 76a445a956 pkg/server: decouple sign handler from UI, replace JSON maps with structs
Signhandler was moved from the ui to the root handler and genconfig
adjusted accordingly.
New discovery struct types to replace the JSON maps are defined in
pkg/types/camtypes. The changes are related to Issue #539.

Change-Id: Ib3f12feeaf6fa81107de2d468cab491723e590ae
2015-05-25 09:28:07 +02:00
mpl 1af881a3f2 server/filetree: do not defer standard response
Because we don't want to send it in the error case.

Address comments from
https://camlistore-review.googlesource.com/#/c/4957/2/pkg/server/filetree.go

Change-Id: I96ea90a8430299fb21038b5d7b794098c40d95b1
2015-05-13 19:46:00 +02:00
Mathieu Lonjaret 19eb7d1a8c Merge "pkg/server: replace JSON map with struct for file tree response" 2015-05-12 15:54:05 +00:00
Fabian Reinartz f701562661 pkg/server: replace JSON map with struct for file tree response
This change is related to Issue #539.

Change-Id: I47480a4fd4c5eddd999c6247682dbba36c11d05f
2015-05-09 12:31:43 +02:00
mpl 89488a3cf4 pkg/server: redirect "/" to "/ui/"
Fixes #593

Change-Id: I6d98c3560aa329e9fd8a30012a8f283903d7d274
2015-05-07 17:39:42 +02:00
Brad Fitzpatrick f88da2ae70 Set X-Camlistore-Packed in download handler for debugging.
Change-Id: I30704f566159df6b4cd3b57b16d89f0ba8b0b042
2015-04-13 21:02:41 +02:00
Brad Fitzpatrick f947f8fc19 ui: use WholeRefFetcher for downloads and thumbnails, if available
This makes downloads and the thumbnailer's reading of full images use
blobpacked's WholeRefFetcher fast path, when available. The end result
is many fewer blob fetches.

Updates #532

Change-Id: I3bfd1cb0f04f68f81b80a63378c7b365bd73c974
2015-04-13 20:38:41 +02:00
Brad Fitzpatrick 58035c4c1b pkg/server: richer /status/ page
Shows Camlistore version, Go version, GOOS/GOARCH/cgo support, djpeg availability.

Fixes #594

Change-Id: I9ae8e16bc78765382d8b33e7a69bb9fc56618585
2015-04-02 18:17:18 +02:00
Brad Fitzpatrick af36d78bd7 env: add IsDev and use it everywhere
Change-Id: I5547ce989c05f1f48774f24abee41c489326baa0
2015-04-02 05:55:01 -07:00
mpl 8a93e80a8b Merge "blob, server: show hash functions in discovery" 2015-03-02 18:30:31 +00:00
mpl dfe854e168 blob, server: show hash functions in discovery
Issue #122

Change-Id: Iddc3edd4d10065b4cf94f4d554cc6c24ca78a26c
2015-03-02 18:45:58 +01:00
Mario Russo a6fe834326 Capture the file's lastModifiedDate provided by File API when uploading from the UI
this change introduces one API to filewriter, which takes an additional param for the file's lastmodtime to store with the file blob

Issue #317

Change-Id: I8da3134306c28e6945661296aaafb7752b4bf8b5
2015-02-26 09:59:43 +01:00
Brad Fitzpatrick ff31f9f3d3 blobpacked: start of serving from blobpacked packs
Update #532

Change-Id: I35cc74a5013fe8796b05ae1a4bd27f10b5c90cea
2015-02-04 21:07:59 -08: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 00e6c8f764 server: restart camlistored from the /status handler
Fixes #558

Change-Id: I3f69ada01f958c5574d0116e78acea254a1c4430
2014-12-21 21:10:14 +00:00
Mario Russo 999a148b32 ui: added 'View original' link to sidebar
Notes:
-this patch also introduces the sidebar to the contents listing aspect (when viewing members of a set)
-the link will only appear for a _single_ selected item

https://code.google.com/p/camlistore/issues/detail?id=541
https://code.google.com/p/camlistore/issues/detail?id=546

Change-Id: Icc93eaa2478f40f3fe272520b1f6ede41f0731dc
2014-12-01 11:47:28 +01:00
Emil Hessman e8ffb9a66c pkg: fix various vet reports
Change-Id: I0b7fa09849650fe696e59ad5c5c73a034ab80faa
2014-11-12 23:25:53 +01:00
mpl 1bd76c138a setup wizard: redirect to server docs until someone wants to do nicer
Plus we're going to have the automatic deployment to GCE for total
newbies and advanced users don't need the wizard, so it felt like it
needs to die/be hidden.

http://camlistore.org/issue/522

Change-Id: I2ad3d12197df83eb57f68e6b3c85f2d691e96c75
2014-10-19 18:22:21 +02:00
Aaron Boodman 51ef6152fd Add -search argument to camput share.
Bug: https://code.google.com/p/camlistore/issues/detail?id=512

Change-Id: Ic0dd559c98589107fcdeade8784699cf6b2f1761
2014-09-06 18:50:21 -07:00
mpl 94ae3f5990 server/ui: initialize lessHandler in dev mode
Change-Id: I42643b9a82639aa2ef20c044e87f42a50a40c992
2014-09-05 22:34:45 +02:00
Aaron Boodman 6cca8d98d0 Merge "Add CORS header to share handler." 2014-09-04 20:26:34 +00:00
Brad Fitzpatrick ebda5dd9d7 server: gofmt ui.go
Lindsey, fix your editor. :)

Change-Id: I12ce560a7202a5aff98d18c42a49a096fd7893da
2014-09-04 08:30:59 -07:00
Lindsey Simon ffb660b54d Adds less (CSS processor) v1.7.4 (Apache v2)
Change-Id: I364e46d395c0752df8c585a5aeab3aa9a289162c
2014-09-03 22:22:56 -07:00
Aaron Boodman 698f3d0eea Add CORS header to share handler.
Change-Id: Ia12ea1f3de334e6f5b4d29c2a24291d263cc8068
2014-08-31 23:46:37 -07:00
Aaron Boodman 16085b9a4d Move importerRoot from status.json to discovery.
It seems to make more sense there...

Change-Id: I8450f1cb30ed331cfe15ddb49f55438c5bf9fd5b
2014-08-30 09:09:05 -07:00
Brad Fitzpatrick f4740e77e8 Aggregate all errors with their URLS in status.json in one place.
Change-Id: If7a540fc3d1a6caa94b5f04d44de3207f15ac4cf
2014-08-29 16:03:44 -07:00
Brad Fitzpatrick 6517bbc392 Send system status JSON on websockets upon connect and when it changes.
Change-Id: Ic0f211611d63b9d519ee3c5da0dd96c6b77459d5
2014-08-29 14:12:02 -07:00
mpl afdb045036 server/ui: do checkType before conf.Validate
Change-Id: I9167cad044ecd2539925ec83f2be519e2b07d0aa
2014-08-20 18:54:18 +02:00
Aaron Boodman a4abea7525 Change URL format for individual blobs in the web UI.
Instead of /ui/?b=<hash>, /ui/?p=<hash>, /ui/?d=<hash>, etc...,
it's now just: /ui/<hash>

This makes constructing links easier, because you don't have to
know whether a blob is also a permanode, or a directory, or
whatever.

Change-Id: I771fa1b1699b9009269c7eee632e7e8fd5335331
2014-08-18 18:17:47 -07:00
Brad Fitzpatrick dbc1a681bc Add importers to status.
For http://camlistore.org/issue/483

Change-Id: I2621c5484efb121a5e5e24debeff64ffc5139ad3
2014-08-16 11:58:16 -07:00
Aaron Boodman a6450f6468 Merge "Propagate all clicks in the hacky child frame up to the main app." 2014-08-16 04:20:08 +00:00
Aaron Boodman 48803d183b Propagate all clicks in the hacky child frame up to the main app.
This is temporary duct tape to make the child frames work better
utnil they are rewritten.

Change-Id: I1822af95620164896b959f946b9a888e6ecdf91f
2014-08-15 21:19:54 -07:00
Brad Fitzpatrick 81b4417e8c server: ignore errors looking up optional username.
Change-Id: I457f604c60726beaf9d263c07fb0283035696fd2
2014-08-15 18:24:23 -07:00
mpl 0a869ad067 netutil: add HostPort, serverinit: return app baseURL
Context: http://camlistore.org/issue/479

This patch allows camlistored to wait for all the apps to be serving,
before printing its own listening address.

Change-Id: I4035b115a03ef6a2a43177b83b5b65ebc50a2188
2014-08-01 00:01:27 +02:00
tnt 6868a882b9 Fixed calls to formatting functions
Change-Id: I3ec2af85364674ac6f1a88cd12b6cb369d8e50e1
2014-07-21 22:06:53 +00:00
Bill Thiede eb7f66fe28 jpeg: enable images/jpeg imported from Go tip.
Addresses https://camlistore.org/issue/463

Change-Id: Ie7b8f937ded78d95875f4cd13b024d0429136981
2014-07-02 21:22:15 -07:00
tnt 5d8eeb534b Fixed wrong calls to formatting functions.
E.g: fmt.Println("%s", "hello world") -> fmt.Printf("%s", "hello world")

Change-Id: I51c0bd54c14173e074fafd86c83a5287fcdb1520
2014-06-30 22:05:22 +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 8f5a9e2922 server/app: fix binPath logic bug
Change-Id: I1c77881cc0a0de93a8745d3e82db56de86e18880
2014-06-16 15:32:54 +02:00