Commit Graph

103 Commits

Author SHA1 Message Date
Brad Fitzpatrick d832b6a06f Document PrefixHandler and clean up users with accessor functions.
Change-Id: Ib0b23ff3cc548a35c35eae1cdc59a8673dc19638
2013-06-12 11:17:30 +02:00
Brad Fitzpatrick 8e09d1c245 ui: docs and cleanup
Change-Id: Iaeaa21f1699cad218c48dfe955c8356d4edb97d0
2013-06-12 11:05:01 +02:00
mpl daa6e35bf2 wizard: added xsrf protection
Change-Id: I1d80faecd43953c22162a85eec92590cdfcef4ed
2013-06-11 17:16:21 +02:00
mpl 5aeeae5f74 Merge "wizard: cosmetic changes and clean up" 2013-06-11 14:30:23 +00:00
mpl b12865c348 wizard: cosmetic changes and clean up
Change-Id: I6d8aa1e283aa3db70b59972bcc06d5ee45e16963
2013-06-11 16:48:53 +02:00
mpl 8b8d573c27 root page: added link to ui
Change-Id: Ie9d0f7dba380a72f727ea1ed29685a0a01abfc1c
2013-06-11 16:42:02 +02:00
mpl cf80262ef1 ui.go: cleanup leftover println
Change-Id: I33892d2354ec09e112f3dba55a193bae4a7e8dd5
2013-06-11 14:00:53 +02:00
mpl 75507e65fa newui: Final move to get rid of the old ui!
1) Everything in ui/ except for js-notes.txt was removed.
2) mv newui/* ui/
3) modified pkg/server/ui.go to make it all work
4) modified Makefile to generate server/camlistored/ui/deps.js
5) regenerated all the zembeds
6) Some fixes to attempt to make it (re-)work on appengine:
  -removed the Go1.1 check
  -added pkg/osutil/restart_stub.go (for restarting a process)
7) The closure handler now redirects to the online files when
the closure library is not on disk, because we do not embed
the required closure js files.

Change-Id: Id1bcf007550cafb7188ba2674352e8f3bd07fb8c
2013-06-11 13:25:59 +02:00
Brad Fitzpatrick 5e13871b67 Merge branch 'master' of ssh://camlistore.org:29418/camlistore 2013-06-10 01:34:39 +02:00
Brad Fitzpatrick c6cb32bcac fileembed: put all metadata first, and also support rolling checksum splitting of large embeds
Change-Id: I9da21c9a21cb2f9b04484d4374a621cb4b97679d
2013-06-10 01:11:03 +02:00
mpl 4b32a6fb6a newui: bug fix: filetree now working
Change-Id: I0c5faa5a22f6dd1b80896a4e4eb7a3ee5f2c4a67
2013-06-09 23:29:43 +02:00
mpl 9942cda125 server status: bugfixes, and rid of version as a field.
Also smaller font on the index page

Change-Id: I5918dedfadf551a8a982d74670fefc4174555c72
2013-06-09 19:27:17 +02:00
mpl 7059a616c0 show server status on index page
We're only showing build version for now.
Next step would be status handler.

See http://camlistore.org/issue/111

Change-Id: I9e0792abe9ffed8139d38478d186b6e75f99de7e
2013-06-09 18:46:24 +02:00
mpl 11a3f78691 WIP: switch from ui to newui
This CL proposes 4 changes:

1) When making the embeds, any .html files in newui is rewwritten
on the fly so that the resulting embed uses all.js instead of
individual .js files. all.js is the only javascript file embedded
for newui.

2) Various bugs and paths in the newui/*.js files were fixed so that
everything works when using all.js

3) pkg/server/ui.go was modified so that all features from ui should
now have an equivalent in newui, that is served through ui/new/.
In a next step, we can move back everything from newui/ into ui/ and
completely get rid of the old ui.

4) The published gallery now uses closure too.
In another next step, we should probably work on serving its static
part directly from an .html file or (include it in the zembed somehow?)
instead of generating it at every request. Or at least cache it?

This commit includes the zembeds in newui, except for zembed_all.js.go
since it is large and it would take a lot of space in the git history
everytime we change it.
The plan is to roll-sum it into chunks to address that problem.

Change-Id: I381d8ddf3a2bbe37e3c4b1c4bf423f16beffaaf4
2013-06-04 16:34:51 +02:00
mpl 64ddd47788 newui: filetree
Change-Id: Ibf8972a57c7253e55bcfcc679d141e933db3fe7b
2013-05-24 20:00:22 +02:00
Brad Fitzpatrick c88abec2b0 Merge "newui: permanode page: show members as blob container" 2013-05-23 19:07:44 +00:00
mpl b1577e34b9 ui: fix filetree (subsequent to describe response changes)
Change-Id: Ib715693ea98206158680cd9bec1566d6fe11ca96
2013-05-23 18:04:56 +02:00
mpl b126f548d3 newui: permanode page: show members as blob container
Change-Id: Ifd2a52e6ef97f97b9fb16bc11888be6875faf832
2013-05-23 16:54:33 +02:00
mpl 644561ad68 newui: blobinfo page
Change-Id: Iecc82e5feac704dfe7e280a6f21a17098a36070b
2013-05-13 23:17:12 +02:00
mpl abbcc38ee7 newui: permanode page
Change-Id: I3f2c5b54de2a43d5a53b1a31d7ecbf4b70afb6cf
2013-05-12 23:09:10 +02:00
mpl 07e5106035 Merge "schema: add Share type" 2013-04-22 13:59:41 +00:00
mpl 17119dade8 setup wizard: parse shareHandler and memIndex fields as booleans
http://camlistore.org/issue/128

Change-Id: Iee55f4e758a0429d6490efe745f5256580efee6e
2013-04-01 17:06:03 +02:00
mpl 8d3c5acca7 website,genfileembed: exclude zembeds and fileembed.go from godoc
Change-Id: I6af25a566a519274b15b72c3e41dccd016de5442
2013-03-16 01:16:40 +01:00
mpl 0830902ffb schema: add Share type
This changes allows to get rid of the use of map[string]interface{} in
pkg/server/share.go

Change-Id: Ifeae6b194ff4db679be63d0087cb6d1c5df2f3ca
2013-03-11 21:53:56 +01:00
mpl f21cea5131 share: refactored
-pkg/server/share.go handles share(d) blobs.
-pkg/blobserver/gethandler no longer deals with share blobs
and has been rewritten like the other handlers (no more auth
in there).
-client and signhandler changed accordingly.
-serverconfig: auth moved up in makeCamliHandler
-share parameter added to the user level and low level config.
-share URL is now http(s)://host[:port]/[prefix/]share/sha1-xxxx.

Addresses http://camlistore.org/issue/107

Change-Id: I0a2c07ac1a1e435b141702e0ff06dc8182721d65
2013-03-06 19:11:00 +01: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 fbcb4411df images: move rescaling from server/image to pkg/images
Fixes http://code.google.com/p/camlistore/issues/detail?id=94

Change-Id: Ifa73e0a3ccbbcaef31ae8870d39f63b8a90aad26
2013-02-18 16:44:41 +01:00
Brad Fitzpatrick 4c7e985c14 uploadhelper: use a type for JSON response, not maps.
Change-Id: I642af4daf97829a813bf7dad61cc7683ec780e69
2013-02-11 20:33:53 -08:00
Brad Fitzpatrick 1f31c21cec Generate and server Closure sourcemaps.
Change-Id: Ida17718eeffa1f5f1f3c849790d977921707d440
2013-02-10 17:39:18 -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
mpl ee29f1f8e7 Make newui ready to dev on with closure compiler, plus misc cleanup.
Added env var in dev-server and rules in Makefile to build
all.js with the closure compiler from the js files in newui.

Misc related changes:
-fixed a few closure annotations and added a few as well.
-added missing options to dev-server usage.
-renamed CAM_HTTP_DEBUG into CAMLI_HTTP_DEBUG for consistency.

Change-Id: Ica2c12358150aec24147628201e6f7a5852f9383
2013-02-07 15:25:10 +01:00
Brad Fitzpatrick 13105dad21 server: use http.ServeContent and use cache headers in download handler
Change-Id: I5c24f39c86f6308b32167cf0d92ee68f801b9181
2013-01-25 15:18:32 -08:00
Brad Fitzpatrick bcd57baf8f Merge branch 'master' of ssh://camlistore.org:29418/camlistore 2013-01-25 15:09:36 -08:00
Brad Fitzpatrick 1ac09e6a42 server/image: set cache headers on thumbnails
Change-Id: Iecf15319cfbc132b8cb2581e4891e6c77de5284d
2013-01-25 15:07:47 -08:00
mpl fc8ecb3b29 closure: changed the library setup, added the compiler
1) The code to get the closure library has been moved from
dev-server to misc/get_closure.pl
2) The svn checkout version for the closure library was bumped
to the latest: 2459
3) The closure library checkout now goes into tmp/closure-library/,
to keep tmp/ clean for other things we might want to add there
(like the compiler). So the path to the actual libraries is now
tmp/closure-library/closure/
4) The code to get the closure compiler build was added in
misc/get_closure.pl. The compiler goes to
tmp/closure-compiler/compiler.jar
5) The version of the closure compiler is the latest build as
of this time: 20121212

Change-Id: I7e03ad7d6fe440430c5727cf56a956efed360d43
2013-01-25 17:13:19 +01:00
Brad Fitzpatrick 1bf01d7315 schema: lot of Blob/Builder work, and kill schema.Map.
Next up: unexport schema.Superset.

Change-Id: Ia4bb34790abba75bdb4d4101df7a4f15875f4237
2013-01-21 20:56:12 -08:00
Brad Fitzpatrick 764bb90f70 Merge branch 'master' of ssh://camlistore.org:29418/camlistore 2013-01-20 14:28:52 -08:00
Brad Fitzpatrick 06aed874c5 server: remove unnecessary log spam. dev-server --verbose will show this
Change-Id: Ia6613730ad2b40a436cb91806610e10a3b97cf48
2013-01-20 14:28:42 -08:00
Brad Fitzpatrick 2796a55a67 Merge "validate format of blog and gallery fields" 2013-01-20 22:11:58 +00:00
Ryan Barrett 759ea2b4e6 validate format of blog and gallery fields
Change-Id: I757d17e746a76fac0006edc0272b2f665dd730f8
2013-01-20 14:04:41 -08:00
Brad Fitzpatrick 392640da89 camli.js: global cleanup. remove onConfiguration.
Change-Id: I1a74298ea1f333e060cebcf1221008705bcdb8ec
2013-01-20 12:46:50 -08:00
Brad Fitzpatrick f696b164f4 newui: redirect /ui/new to /ui/new/
Change-Id: I2686a3e577a32436d55e7cf5fd6640d1717caac5
2013-01-20 12:33:15 -08:00
mpl 717dc05fcc images: Decode now returns a Config with a Modified field
This allows to know after a call to images.Decode if the image
was actually rotated or flipped.
Without knowing this, when making a thumbnail, it could happen
(if there was no rescaling required) that an image that needed
being rotated/flipped would not get rotated, because
useBytesUnchanged would still be true.

Change-Id: Ifc5e1e1f5a8543e6754102e3b3a685b736ae8673
2013-01-19 00:19:06 +01:00
mpl 1248dfd4da auth: added OpDiscovery
Change-Id: I71ce44732206f5ec84cc2c1db4457d49eb906b0e
2013-01-15 15:02:51 +01:00
Brad Fitzpatrick 2ce7b7f719 Add a favicon to the server.
Change-Id: I123b897bad6e34d36458c9f128eafa6807c3e3be
2013-01-12 21:25:55 -08:00
mpl 3129e70380 discovery: add synchandlers
Change-Id: I2934c4a7d926770eaf59cb82f0fe48b6c8deb225
2013-01-12 01:55:32 +01:00
Brad Fitzpatrick 446f03619c root: lazily load the search handler as needed. Don't block start-up.
This means we can prevent cycles elsewhere in load.

Change-Id: I670b7563b50818ef489a7f2fc832489e4bc659c8
2013-01-11 10:39:14 -08:00
Brad Fitzpatrick 5998fecc22 publish: don't retain a blobserver.Loader, just a FindHandlerByTyper
Change-Id: I37d5873ce4c30f67841f31fa744afaf80b24d4b3
2013-01-11 10:14:18 -08:00
Brad Fitzpatrick 23d11a5835 Unbreak line
Change-Id: Ia1d287d4c04744c57877281f393ba8ee267807bb
2013-01-10 19:29:10 -08:00
mpl 12213c058e Changed auth to take into account not only the credentials,
but the requested operation/action too.

This allows to restrict vivify credentials to only upload
(as well as get and stat, because they're needed) to the
blobserver.

Change-Id: Idaed60d1f0d679cb9795ba9a11f094f964774335
2013-01-04 22:17:12 +01:00