Commit Graph

412 Commits

Author SHA1 Message Date
Brad Fitzpatrick 306b58afd6 Merge "Modifications allowing /setup to be view on Windows" 2012-11-19 01:16:23 +00:00
Maxime Lavigne 3ec58472db Modifications allowing /setup to be view on Windows
When you go to /setup on Windows, it currently checks
the "localhostAuthorized" function that checks your
UserID with os.Getuid() and than check with the local
and remote address to see if you are allow. In Windows
os.Getuid will always equals -1 and the function default
to unallowed. On darwin, it does check for uid but
afterward only cares if the local and remote addresses
are loopback addresses.

So, I changed this function so that when the os.Getuid
is not avalaible on the platform and returns -1, it does
the same check as in darwin.

I also modified the "isLocalhost" function to use the
helper function "net.IsLoopback" instead of string matching.

Since, I already had parsed addresses and had to call
AddPairUserId, I checked if it wouldn't be simpler to
pass net.Addr directly instead of strings and reconvert
them afterward. It seemed after looking at all the code
that called this function that it simplified calls quite
a bit to do so.

Finally, I modified "netutil.Localhost" for it to return
the first IP it finds instead of the string representation
of the first IP enclosed in square brackets. Since the square
brackets around the IP are only necessary in a TCPAddr, it
would be simplier and more robust for the user to directly
print TCPAddr instead of appending this string to a post.

Change-Id: Id79de6bebd6380f877074211c0d260782058765f
2012-11-18 20:20:25 -05:00
mpl 03a8e7370b default to localhost auth type when generating config for camlistored and clients
Change-Id: I95e74bcde6c1ca564f76e1ed9a916de48c1b6513
2012-11-16 16:49:19 +01: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 89baddb2d0 recent permanodes ui: set width and height of thumbnails
http://code.google.com/p/camlistore/issues/detail?id=63

Change-Id: I51d851993e3b14c54685bc4186ea623db1fe6045
2012-11-12 16:25:42 +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 316d3cff31 camlistored: style fix 2012-11-07 17:52:09 +01:00
Brad Fitzpatrick fad4960033 regenerate embedded files with new genfileembed 2012-11-05 18:43:47 +01:00
Brad Fitzpatrick 5033e26980 Add folder icon from Tango. 2012-11-05 17:37:18 +01:00
Brad Fitzpatrick 776cf7ce75 Add a permanode icon (from Tango); rebuild embed files. 2012-11-05 16:32:30 +01:00
Brad Fitzpatrick 73266993ff sigserver: cleanup
Change-Id: I47e840eb30f88289b9567250997ab954b1ccfa83
2012-11-03 21:00:02 +01:00
mpl 295cbade1b Add postgres support
Also added the -short option for make presubmit
because postgres test is too slow.

Change-Id: I6be21c4d4cd67671eb44ab65333fc32c1e261bbd
2012-11-03 19:59:22 +01:00
Brad Fitzpatrick 13f85afe8c Merge "Modification to allow windows build and deployement" 2012-11-03 13:25:43 +00:00
Maxime Lavigne 5a7510c384 Modification to allow windows build and deployement
Webserver were initialized with "tcp" and ":3179" by default and
listenURL assumed that it would be treated as IPv6 and replaced [::]
by localhost. Host that were listening on IPv4 0.0.0.0 didn't get
the modification.

Receive in localdisk were using link that failed on windows plateforms.

Camlistored didn't use Json Marshaling which caused problem with the
way Windows stores its paths.

Change-Id: I9f62f7d46399c3514707383efcb2752dbaf1f420
2012-10-30 23:17:58 -04:00
mpl 32fdada399 ui: use custom setTextContent to set text with any browser
innerText is not W3C compliant, and does not work on
firefox.
textContent is recommended by W3C, but it does not
work with IE.
setContentText is a generic function that should work
with all browsers.

related issue: http://code.google.com/p/camlistore/issues/detail?id=45

Change-Id: Ie77a96b34b37ffa4af475756158871c7cf271a51
2012-10-29 16:40:36 +01:00
Brad Fitzpatrick 22495f8bfd schema: adjust rollsum splitting algorithm, make it the default
We might tweak the parameters yet, and I want to add a bunch more
tests, but this is a major relief for me.  I've been reluctant to
put too much data into my personal Camlistore instance until I
figured out how I wanted the file chunks to split.

This also simplifies (deletes) a fair bit of code.

Change-Id: I35c38cc5d39a8a43e3f62445434f8d7fd5de5d17
2012-10-29 02:03:05 +01:00
Brad Fitzpatrick 3098e54163 Merge "Conform to W3C File API" 2012-10-28 12:56:07 +00:00
mpl 909c91a9ea search ui: deleted old/useless TODO
Change-Id: I0f6bbd88d98f9357d4a90e35dd4dc58a5281498e
2012-10-24 17:45:47 +02:00
mpl 94cb8cf05a Be consistent between high and low level configs for https
Change-Id: Ie7e1d9c554e09a34416a2ae3ac9e10f1a2f8fce0
2012-10-18 11:58:30 +02:00
mpl 6ac49843ab fix IPv4 assumption
Change-Id: I334e6ccb5b26a083b55750271262a3469f63e78e
2012-10-16 00:20:57 +02:00
Brad Fitzpatrick 42fb5290fd Merge "If baseURL was not user defined, this change makes sure it is dynamically defined from incoming requests. The listen flag has moved from pkg/webserver to server/camlistored and is not using runsit anymore. httputil.ServerError now only outputs the full error if we're in internal/debug mode. http://code.google.com/p/camlistore/issues/detail?id=53" 2012-10-15 14:33:43 +00:00
mpl 844551d0b2 If baseURL was not user defined, this change makes sure it is
dynamically defined from incoming requests.
The listen flag has moved from pkg/webserver to server/camlistored
and is not using runsit anymore.
httputil.ServerError now only outputs the full error if we're
in internal/debug mode.
http://code.google.com/p/camlistore/issues/detail?id=53

Change-Id: I55a1c6d43a549d9ee2022742a83aa142dc19e02a
2012-10-15 16:26:50 +02:00
mpl 2a434d7276 a couple js bugs in ui home
(showed as errors in ff but not in chromium)

Change-Id: I5df05f72401ad2e8c05160ba2dc2254c8e837f11
2012-10-10 16:04:42 +02:00
mpl 2c27a6686c fix broken symlinks
Change-Id: I4b275d3c796fd034db9d71605848ab327f752542
2012-08-21 14:41:51 +02:00
Amir Mohammad Saied ba22e56262 Conform to W3C File API
Replace WebKitBlobBuilder with Blob() interface implementation of web browser.
Make it working on Firefox as well.

Change-Id: I3b7e677413dbba3aff6b3f3d239f56af07464ab8
2012-08-11 00:53:06 +04:30
Brad Fitzpatrick 11842fcf33 serverconfig: let baseURL and listen be optionally separate 2012-08-04 21:42:10 +10:00
Brad Fitzpatrick 6fe3ae378f fix sigserver 2012-08-03 19:08:36 +10:00
Brad Fitzpatrick 8c293e34b6 Per Go initialism style, rename Json to JSON 2012-07-28 15:42:56 -07:00
Brad Fitzpatrick ed4e781075 Merge branch 'master' of ssh://camlistore.org:29418/camlistore 2012-06-16 10:19:04 -07:00
mpl b2f079f081 handle SIGHUP, restart camli from wizard
Change-Id: I9856e49b9c4d76dc3bed1827594451349d4f5810
2012-05-16 11:37:29 +02: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 87059405ea simplify deref expression
Change-Id: I1738c7c47e79b460f3c13626b1af9e96eb26f73f
2012-05-14 01:40:05 +10:00
Brad Fitzpatrick f70cbb4c05 check MkdirAll error
Change-Id: If8e32c04e5ef71ffc1fd173cbb3626d8c978e3c2
2012-05-14 01:37:46 +10:00
Brad Fitzpatrick 610e708924 fix more references to lib/go/camli
Change-Id: Ic35c67b0255d713185e8c77fdeb91c17c79a11c7
2012-05-14 01:07:13 +10:00
mpl 2a844730b3 support for published entities in genconfig and in wizard
Change-Id: I1768dac9628edb59cf0b987e9054b920d234b36b
2012-04-23 21:00:05 +02:00
Brad Fitzpatrick b76b58ea2a camlistored: don't block server start-up on opening URLs
Change-Id: I4a850fe7b46e74a0804b89b20b98ea351f44dcdd
2012-04-20 11:59:58 -07:00
mpl 8d927b5914 open root page in browser when camli starts
Change-Id: Ida4ffa8ee34e6fd86782f8f61c43eecedc074892
2012-04-16 16:08:36 +02:00
mpl f7ab75d7b3 rm TODO: +localhost already done by Brad
Change-Id: I1762d3a589163d8098a4f5714ecf9943ee9fa39f
2012-04-16 01:22:05 +02:00
Brad Fitzpatrick 92f5835bb4 camlistored: make sqlite a build option.
Change-Id: Ib3624f162aae2130e524cf6a04c3f0fa8f07a01c
2012-04-13 16:16:24 -07:00
Brad Fitzpatrick 71ee67264d osutil: add IdentitySecretRing accessor
Change-Id: Idcb7a62530292eb3e0a98c798dc86a985fc491f1
2012-04-12 16:54:57 -07:00
Brad Fitzpatrick 029d66fa9e In default config, allow localhost access for auth also.
Change-Id: Ie3fc2f3c44d7fc17a367f6a456c6db6511d08f33
2012-04-07 19:02:31 -07:00
Brad Fitzpatrick ce779cd0a7 add appengine build tags, so 'go build ./server/...' works.
Change-Id: I9bbcfe3d4c99de623b420a8559edbd73ed4739d3
2012-03-26 14:02:48 -07:00
Brad Fitzpatrick 0339f75162 move sigserver up a directory.
Change-Id: I219472713dfc2adfa34221a8689d9883c0e90a24
2012-03-26 14:00:43 -07:00
Brad Fitzpatrick a5d41f27c4 sigserver: update for Go 1
Change-Id: Ia8d3bd2992ba7a2ab704f0005a4e9b8274c0fc29
2012-03-26 14:00:07 -07:00
Brad Fitzpatrick 10cf23c700 Get the MySQL indexer working again.
It now uses the generic indexing layer, rather than its own schema.
Also, move it under pkg/index/, like mongo.
Also, link in mongo to the main binary.
Not using the tests yet (leaving for mpl :))

Change-Id: I47a2203ca6c0b5244cd458aedec46227c4363c62
2012-03-26 13:57:53 -07:00
Brad Fitzpatrick d8fe21b89c appengine: +build lines earlier, where they work.
this code still not updated for Go 1, though.

Change-Id: I2c3c9c6d236906fe945684307c71ab2e9702861b
2012-03-26 11:11:57 -07:00
Brad Fitzpatrick e1dc4f7337 update to Go 1
Change-Id: Ib1e3b4e5879879cc6ff370b69799c9bf1d2986ec
2012-03-26 11:05:23 -07:00
Brad Fitzpatrick 125c33f019 camlistored: auto-generate a secring/keyId for new users, without gpg
Change-Id: Ib653f9cb5fa0f5e4730854dfaea6c4654f94f377
2012-03-19 21:31:20 -07:00
Brad Fitzpatrick 5fc47dab41 appengine: start of bringing this server back to life.
Change-Id: I5d0df4c14646f3f189cda1abe25fae5da92d260f
2012-03-19 19:04:41 -07:00