Commit Graph

81 Commits

Author SHA1 Message Date
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
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 ff31f9f3d3 blobpacked: start of serving from blobpacked packs
Update #532

Change-Id: I35cc74a5013fe8796b05ae1a4bd27f10b5c90cea
2015-02-04 21:07:59 -08:00
Emil Hessman e8ffb9a66c pkg: fix various vet reports
Change-Id: I0b7fa09849650fe696e59ad5c5c73a034ab80faa
2014-11-12 23:25:53 +01:00
mpl 94ae3f5990 server/ui: initialize lessHandler in dev mode
Change-Id: I42643b9a82639aa2ef20c044e87f42a50a40c992
2014-09-05 22:34:45 +02: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
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
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
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 a34f9e2669 publisher app
http://camlistore.org/issue/365

Change-Id: I281fdcbbe6a2bdf15607e75a21bc93b453f82c85
2014-06-15 00:03:03 +02:00
Aaron Boodman 2c675b3a87 Add FontAwesome. This will be used for icons in the UI.
Change-Id: I92fecd44f12cce83f4daee88bce062d9123a48a7
2014-04-05 17:19:29 -07:00
mpl 08923e1c00 camtool sync: warn when src and dest have different identities
http://camlistore.org/issue/281

Change-Id: I2e2d595534b14476293a031b88e312de3e0b3f4a
2014-03-01 23:47:49 +01:00
Bill Thiede 58b6497b14 ui: Add QR code for configuring mobile clients.
Creates new page @ /ui/mobile.html for generating a QR code that
embeds configuration data for setting up mobile clients.

Imports code.google.com/p/rsc/{gf256,qr} version:

parent: 149:a3cbaf2339c4 tip

This addresses the server and web components of
https://camlistore.org/issue/372

Change-Id: If9239dd138707080afd7dedb5770d04893cbf0ba
2014-02-21 19:58:54 -08:00
Brad Fitzpatrick 48e67cab16 devcam: add --publish=false and --mini option to start a lite server with no blobs
Change-Id: Idcde77f72126800d610c632940552f04c396634d
2014-01-13 20:11:43 -08:00
Aaron Boodman d4fbfe7180 Implement generalized navigation handling, use to implement escape handling in detail view.
Change-Id: Iba5359e9d17fcaa200a9cbb586ac9d6461c179aa
2014-01-10 15:50:05 -08:00
Brad Fitzpatrick 34ed712a4a Move defaultMaxResizeBytes to pkg/constants
Change-Id: Ibb5f82b6f33a4417649f1538a996f1fe7eac885e
2014-01-06 08:08:47 -08:00
Bill Thiede 56510593ff pkg/server: set thumbnail RAM limit per-handler.
Move from one pool for all thumbnail resizing to per-ImageHandler
instace.

Uses the value of "maxResizeBytes" if specified in the "handlerArgs"
section of a "publish" or "ui" handler's low-level config.

If we end up wanting to share pools, i.e. if all published
handlers should share a pool, we'll need to do a bit more work.

Implements suggestion from https://camlistore.org/r/1803 review.
Further improves on https://camlistore.org/issue/316.

Change-Id: Ia93fad119b546064173ac3e2c7f0ab8509744628
2014-01-05 17:49:59 -08:00
Aaron Boodman 07cce4a3e6 Integrate the detail view into index.html.
The detail view now loads with only two HTTP requests: one for the
piggy, and one for the big image. No other resources are loaded,
even the blob descriptions, because they are cached by SearchSession,
which is shared between the search ui and the detail ui.

Likewise, when you go back to the search results page, no additional
requests are done.

Also:
- When you press back on detail page, scroll position is now usually
  restored (if you refresh between index and detail, it still won't
  restore).
- Detail page live updates! It came for free with using SearchSession.

Change-Id: I58ada7bdd30afc2644860fbda6167fc5ce865b0d
2014-01-01 23:13:23 -08:00
Aaron Boodman 2d70e6794f Increase pigginess in new detail UI.
Change-Id: I4eb1acf7e6cd114edf7c5f66fcb4fb6ff8842bdb
2013-12-31 17:49:42 -08:00
Aaron Boodman e4daf4c4b5 Add first bit of a React-based detail page.
When complete, this will be part of index.html, but for now I am developing it separately.

Change-Id: Ibda6fb9f396f64d771919934907dbe4e5cd9d030
2013-12-29 23:50:10 -08:00
Aaron Boodman 4a3b87fe24 Serve React from both devcam server and camlistored.
In camlistored, only react.min.js is served. In devcam all files in
the read directory are served.

Change-Id: I0cb8a4c328e550b5303edef4be7571d39d123340
2013-12-28 21:49:41 -08:00
Bill Thiede 02201753ed server/ui: set Content-Type when serving .svg.
Fixes warning 'Resource interpreted as Image but transferred with MIME
type text/xml:' on Chrome, and more importantly returns the previously
missing icons to my camlistore instances.  Everyone else must be
hitting cache, or something is weird with my setup.  I see missing
icons on Safari / Chome on Mac, and Firefox / Chrome on Linux.

Change-Id: I4809d8c7948a49fe80fdf1a97ac98b2161ba0307
2013-12-27 19:12:37 -08:00
Brad Fitzpatrick 0d36539f81 Add CAMLI_DISABLE_THUMB_CACHE option for when working on thumbnailer
Change-Id: Ifa99a57c82c67a83fe0b89abaeee407058b00af8
2013-12-16 18:11:52 -08:00
Brad Fitzpatrick 5c5666d037 Thumbnail cleanups and let the meta map persist on disk with a sorted.KeyValue
Previously, every time you restarted the server, it forgot about all
thumbnails previously generated.  (in practice it didn't/doesn't
matter with a single user, though, since they're still cached in the
browser and we always reply to If-Modified-Since immediately without
checking the cache)  But it'll matter more with the Publish handler.

Also, rename some stuff, clean up some stuff, drop an unused interface.

And then necessarily change the serverconfig low-level generator to use
a kvfile for the thumbmeta map when using local disk for blobs.

--

Change-Id: I4dcfcb21429a440aa118794c03f7abf7bd69c33b
2013-12-14 09:37:56 -08:00
Brad Fitzpatrick 1fe9afd480 Unexport UIHandler's PublishRoots
Change-Id: I844d2f0cd7ef2b81caf3035ed8abaeef023b90ee
2013-12-14 17:41:26 +01:00
Brad Fitzpatrick a159d20b41 server: unexport some image stuff, add docs, TODOs, clean up
Change-Id: I4914de33406da08a4bbf806d9d0386a285e4a8d7
2013-12-14 15:16:29 +01:00
Aaron Boodman aac43b56fc Move to "G+-style" selection.
To select an item, click the checkmark that overlays on rollover.
To navigate, just click anywhere else on the item.

Also move selection from additive by default rather than exclusive.

Change-Id: I47e6ca1942fe1fdaaf615f6ab0e0a547f1a51735
2013-10-03 22:06:31 +00: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
mpl a41c89a24e devcam appengine: replaces ./dev-appengine
Change-Id: Ic4adcb8898fc3ead801aefd679682bcc646f3573
2013-08-20 00:10:01 +02:00
mpl 40951c103f appengine: fix the UI
-dev-appengine populates the default sourceRoot.
-app.yaml filters out the go files from the static
resources
-the UI handler warns that sourceRoot is required

Change-Id: I816456a882ff4b0573bc8962cce85139d8a0f611
2013-08-16 18:49:51 +02: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
mpl 66bc4f35d6 Merge "dev-server: remove. replaced by devcam server." 2013-08-03 16:34:35 +00:00
mpl f4ef8c0375 dev-server: remove. replaced by devcam server.
Fix related docs, config files, buildbot...

Change-Id: I638d3856f42953603b13204fb56782974d0db9ee
2013-08-03 01:12:38 +02: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
mpl 004c261358 closure: GenJSDeps now takes a VFS, delete ui/deps.js
This changes allows to always dynamically serve deps.js, generated
either from the local files, or from the embedded resources.
ui.go and publish.go now make use of it.

http://camlistore.org/issue/151

Change-Id: I129895b2c65a0726c1239bdd7387c62e90649a9d
2013-07-05 19:43:22 +02:00
mpl 3cec70b4ad ui: rm wantsRecentPermanodes and index-compiled.html
Change-Id: I5dd8d0b11b5b82f51738fbe5669f5a7798929300
2013-07-04 21:47:34 +02:00
mpl 633b8df2a7 publish: find ui and closure resources similarly to ui handler
Fixes publishing of pics.

Change-Id: I5fe305ee8c7e4c4d80e53b8efea462980636dbf2
2013-06-29 00:54:59 +02:00
Brad Fitzpatrick 1c9436d26a Make sourceRoot take precedence over fileembedded resources. 2013-06-20 14:58:12 -07:00
Brad Fitzpatrick 10d000d900 ui: serve Closure from embedded zip data when available
Change-Id: I9bb6bb4f13f69b293fd98441d82068c0677ffbd5
2013-06-18 23:14:36 -07:00
mpl ad5f3b854d genjsdeps: now pkg + cmd in misc/closure/
pkg/server/ui.go uses misc/closure too

fixes http://camlistore.org/issue/142

Change-Id: I614e34e6b7d493d66aa61108e3ca940854844c0f
2013-06-14 00:29:45 +02:00
Brad Fitzpatrick 5761b57d69 Work on implementing new static resource plan, as documented in the big TODO item.
Change-Id: I79d7665a24633630c39cceb5e1ab49cbb0300150
2013-06-12 10:10:24 -07:00
Brad Fitzpatrick f491e63b51 Rename newui to ui
Change-Id: I379ae0f2ee71e1512448bd8b481660b2a48c697d
2013-06-12 08:49:35 -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
Brad Fitzpatrick 8e09d1c245 ui: docs and cleanup
Change-Id: Iaeaa21f1699cad218c48dfe955c8356d4edb97d0
2013-06-12 11:05:01 +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
mpl 4b32a6fb6a newui: bug fix: filetree now working
Change-Id: I0c5faa5a22f6dd1b80896a4e4eb7a3ee5f2c4a67
2013-06-09 23:29:43 +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