Commit Graph

1158 Commits

Author SHA1 Message Date
Mathieu Lonjaret 8a17e7252b Merge "pkg/sorted/mysql: drop tables on reindex" 2017-01-18 18:14:06 +00:00
mpl af77128123 pkg/sorted/mysql: drop tables on reindex
When reindexing on a (My)SQL based sorted.KeyValue, we should recreate
the database schema from scratch, which means dropping the tables.

However, index.Reindex just calls Wipe on the newly created
sorted.KeyValue, which only deletes the rows, and does not drop the
tables.

Therefore, this CL changes the implementation of Wipe in the MySQL case,
so that it takes care of dropping the tables, and doing everything that
needs to be done afterwards to set up the sorted.KeyValue.

In addition, with the introduction of the sorted.NeedWipeError, we detect
upon initialization of a sorted.KeyValue if it failed because it needed
a schema update. If that is the case, and we're in reindex mode, we can
fix the sorted.KeyValue with a Wipe and carry on.

Finally, we introduce the new sorted.NewKeyValueMaybeWipe function that
automatically wipes a KeyValue when a NeedWipeError was returned upon
its creation.

Next, do the same with other sorted SQLs.

Fixes #806

Change-Id: I2032781cbf453a364880bd3e2e8b3c09aac7aed9
2017-01-16 19:10:05 +01:00
mpl 8813375592 pkg/deploy: no self-signed certs, name in camlistore.net
This CL changes the GCE launcher to work with the new features of
camlistored: i.e. that it can automatically get a hostname in
camlistore.net, and that it can get an HTTPS certificate from Let's
Encrypt, for said hostname.

In order for the user to easily (without having to look at the logs)
know what their hostname is, camlistored stores it as the
"camlistore-hostname" key in the custom metadata of the GCE instance.
The deployer can then query for that key, to report the hostname on the
instance creation success page.

Change-Id: Iaaef2d51f34fa5e1e0ee90097919abab7ee72a12
2017-01-13 16:47:04 +01:00
Mathieu Lonjaret d864e35802 Merge "server/camlistored: request a name in camlistore.net" 2017-01-13 14:50:31 +00:00
mpl 620388bd57 server/camlistored: request a name in camlistore.net
In order to use HTTPS, one must have a certificate, and one must have a
domain name for which the certificate is valid.
The first part is solved by the use of Let's Encrypt. For the second
part, we want to provide to any Camlistore instance a name such as
<gpgKeyId>.camlistore.net, where gpgKeyId is the fingerprint of its GPG
key. The DNS for camlistore.net agrees to add a record for that name if
and only if the Camlistore instance can prove it owns the GPG key, as
well as the IP address bound to that name in the DNS record.

A protocol such as the above is already implemented in pkg/gpgchallenge.

This CL:
- uses the client-side of the gpgchallenge protocol in camlistored, so
that it can claim a hostname in camlistore.net on startup (and then use
that hostname when requesting a certificate from Let's Encrypt).
- adds the configuration parameter "CamliNetIP" for the high-level
config. This parameter specifies the IP address that camlistored will
supply during the gpgpchallenge, so it can  prove to the DNS server that
we own this address.

Fixes #722

Change-Id: I6bf4ec149b6dffd0ae93a6fa7bf208b2e8a05445
2017-01-13 00:43:24 +01:00
mpl b0eefd74fa server/camnetdns: get certificate from Lets Encrypt
Change-Id: Icd67eca36a153fe142d07b39df9ace6ef8301992
2016-12-17 23:38:40 +01:00
mpl 9a32570a48 server/camnetdns: persist records in datastore
Store records in Google Datastore in production (on GCE), with an LRU
cache in front.

Keep dev mode that stores in sorted mem key value though.

Change-Id: I17b088b56a68a019f4e253b60c6bd42395a64984
2016-12-16 00:36:08 +01:00
mpl c55c8602d3 server/camlistored: use Let's Encrypt
Or to be more precise, golang.org/x/crypto/acme/autocert

The default behaviour regarding HTTPS certificates changes as such:

1) If the high-level config does not specify a certificate, the
low-level config used to be generated with a default certificate path.
This is no longer the case.
2) If the low-level config does not specify a certificate, we used to
generate self-signed ones at the default path. This is no longer always
the case. We only do this if our hostname does not look like an FQDN,
otherwise we try Let's Encrypt.
3) As a result, if the high-level config does not specify a certificate,
and the hostname looks like an FQDN, it is no longer the case that we'll
generate a self-signed. Let's Encrypt will be tried instead.

To sum up, the new rules are:
If cert/key files are specified, and found, use them.
If cert/key files are specified, not found, and the default values,
generate them (self-signed CA used as a cert), and use them.
If cert/key files are not specified, use Let's Encrypt if we have an
FQDN, otherwise generate self-signed.

Regarding cert caching:

On non-GCE, store the autocert cache dir in
osutil.CamliConfigDir()/letsencrypt.cache
On GCE, store in /tmp/camli-letsencrypt.cache

Fixes #701
Fixes #859

Change-Id: Id78a9c6f113fa93e38d690033c10a749d1844ea6
2016-12-05 19:43:37 +01:00
mpl 99a6268893 server/camlistored/ui: specify sort order in search queries
In particular, specify "blobref" when search is not about permanode
results (instead of the "-created" default).

Fixes #886

Change-Id: I112288d42ea498873a5dcc3ddd37aa780620f309
2016-11-30 17:14:05 +01:00
Mathieu Lonjaret 10fb1f2bd3 Merge "pkg/blobserver/blobpacked: change the meaning of -recovery" 2016-11-28 17:28:19 +00:00
Mathieu Lonjaret fd0ee3791c Merge "pkg/test/integration: make sure testing not linked in camlistored" 2016-11-28 16:59:30 +00:00
mpl 745f8516ea pkg/test/integration: make sure testing not linked in camlistored
I had to add the "-help" flag to camlistored, as otherwise relying on
the automatic usage gets us an exit status == 2, and hence an error when
running the Command.

fixes #475

Change-Id: I6f90329dbdb876a77c13d016f698de5026169e4a
2016-11-25 00:57:01 +01:00
mpl 06f6272e93 camlistored/ui: implement swipe for left/right nav on mobile
Naive implementation for now. I imitated how things were setup for the
left and right keys, but maybe the listener should be on the image
container instead of on the index page? It seems to work anyway.

No animation when starting to swipe though, which means users have no
clue swipe exists/works until they actually try to do it for real.

Change-Id: If0baed3c8d3ff1f5d8886fca891a8ac40980f66e
2016-11-23 17:56:01 +01:00
mpl 14322f8afe pkg/blobserver/blobpacked: change the meaning of -recovery
The -recovery flag from camlistored, now forces the blobpacked index to
be rebuilt, regardless of its state.

Fixes #876

Change-Id: I4e6bd5374ec68d7bb32de9fc119abbc881707625
2016-11-07 22:44:59 +01:00
Mathieu Lonjaret 4081409698 Merge "server/camnetdns: reply with NXDOMAIN when needed" 2016-10-31 17:21:38 +00:00
Filippo Valsorda e8b9df32af blobserver/b2: add new Storage based on Backblaze B2
github.com/FiloSottile/b2: c32038dd691290351948e8fbe956b0ade65e70ea

Change-Id: I0fb5ed3a622ed541170a9fb946b6781defef96fe
2016-10-23 18:04:48 +01:00
mpl 0ab95c3f13 server/camnetdns: reply with NXDOMAIN when needed
When we get a query for a name we are authoritative about, we should
reply with NXDOMAIN when this name does not exist.

This change moves the name lookup to as early as possible to make sure
of that. This means we're now doing lookups even for cases where we
technically wouldn't have needed them, so maybe a substantial increase
in load? We'll see.

Change-Id: I5e9946dd67757856f626f484b547197c6246cccd
2016-10-21 19:14:35 +02:00
mpl 0273e6c5f5 server/camnetdns: implement more of the DNS protocol
As Let's Encrypt DNS server (Unbound) is pretty strict, it
wouldn't resolve names camlistore.net until we implemented more of the
DNS protocol and fix various things.

Since I had no way at first to know what exactly it didn't like, I
started by fixing all errors and warnings reported at:
http://dnsviz.net/d/camlistore.net/dnssec/

Therefore, this CL adds:
-TCP support
-NS response
-SOA response
-MX (empty) response
-DNSKEY (empty) response
-TXT (empty) response
-explicit non-support of EDNS

Then I found out we also needed this:

-https://tools.ietf.org/html/draft-vixie-dnsext-dns0x20-00
-CAA response. A proper response is optional here, as Let's Encrypt only
enforces the response if it finds one. But we do have to reply.

Fixes #867

Change-Id: Ib45f8a642cd83cf19c8ab36435644a2c645a70e7
2016-10-20 17:53:11 +02:00
mpl 39a33c7fa9 server/camnetdns: make it work
Before that change, one would only get a response to a DNS query, if
directly sending the query to the dns server.

I think the main problem was that one has to copy the question section
of the query in the response message, which is part of what SetReply
does.

With this change, I seem to get responses (for e.g. www.camlistore.net
and 6401800c.camlistore.net), without having to specify a server to
query to dig (or nslookup), so by letting the resolver and the DNS
hierarchy follow its normal course.

Issue #722

Change-Id: I530529920fdaa3e5fb025c7684b563e3f05772ac
2016-10-06 16:26:18 +02:00
mpl 2c4332ada2 make.go: optionally build camnetdns
server/camnetdns: update to cloud.google.com/go imports.

vendor: add github.com/miekg/dns at rev
3f1f7c8ec9ead89493df11f2c3d8bec353a2c2c0 as a dep of server/camnetdns

Change-Id: Ief8e0ad3e09a6c3511c72a7991309808f855d3df
2016-10-04 01:58:50 +02:00
mpl ab06dbd80d vendor: rename google.golang.org/cloud to cloud.google.com/go
rm google.golang.org/cloud
add cloud.google.com/go at a47b182e769f5e75f5fc927ff6ee2678f7f552cf
update google.golang.org/api to 63cb68f1e3834e44683ca062ddf06cb9a889380a
update google.golang.org/grpc to
0e6ec3a4501ee9ee2d023abe92e436fd04ed4081
update go4.org to f5283521d7365fb2875408726e9cbf349f173767

fix in cmd/ pkg/ server/

TODO(mpl): fix misc/docker tools as well. next CL.

Fixes #832

Change-Id: I842b968a0afea8a5822913bd614d67cdbe50ee63
2016-09-08 15:14:12 +02:00
mpl c052bd2804 web UI: upload with input file button
Fixes #830

Change-Id: Ic69fb7e6edc6a0dc0d604356f0214aaf6c8136a9
2016-08-16 18:18:56 +02:00
mpl@serenity 5522ebbeb1 webUI: disable tokenAuth when auth is None
This allows deferring HTTP authentication and authorization to a proxy
(such as nginx) between Camlistore and the rest of the world, without
breaking the web UI.

Fixes #816

Change-Id: Ia4b5be8f2236ddac68dc0d3a09f0f24e588c4995
2016-06-28 01:56:08 +02:00
Mathieu Lonjaret fbe5656196 Merge "Add button to remove selection from current set." 2016-05-10 23:24:24 +00:00
Mathieu Lonjaret cdadfd650b Merge "server/camlistored: allow GCL for non-GCE" 2016-05-05 13:47:55 +00:00
mpl 1ddc5ec092 server/camlistored: allow GCL for non-GCE
This change enables camlistored to log on Google Cloud Logging even when
not running on Google Compute Engine.

The main reason is to help with debugging cloud logging bugs, because
it usually is easier to do so from a local camlistored than from one
running on GCE.

Related: issue #704

Change-Id: I7de23cf9365683f8641a6bbad0deab754fc579f7
2016-05-05 15:47:09 +02:00
Brad Fitzpatrick e305847941 Merge "ui: fix reload menu item for broken websocket connection" 2016-04-30 21:28:24 +00:00
Tilman Dilo d208b531c9 Fix permissions for files
Use mode 0644 instead of 0755 for non-vendored files.

Change-Id: Ifbe1d5e21f24814531248a8a6c84d6f0a72c071c
2016-04-28 21:15:09 +02:00
Tilman Dilo cb67c554ec ui: fix reload menu item for broken websocket connection
The "click to reload" menu item displayed when the websocket connection
fails was non-functional. Clicking on the menu item only produced an
error (Uncaught TypeError: Illegal invocation) in the JavaScript
console.

Change-Id: Iea44dd35c92c99562c35f87c38687f4fa433ad41
2016-04-28 21:11:44 +02:00
Jeromy 444b2a81f3 server/camnetdns: set authority flag on dns response
Updates #722

Change-Id: I18277a0181234e9a9e497100a5f86613fca2dba4
2016-04-25 18:07:52 -07:00
Jeromy d77d4b8b51 server/camnetdns: log all incoming requests
Updates #722

Change-Id: Ief6b172d8ec4e62f22332a117f379ea4998a3f76
2016-04-25 16:53:50 -07:00
Jeromy e53f91085b server/camnetdns: default to port 53 on gce
Updates #722

Change-Id: I4d435634b6c78a4d4d1392616870d50f0c458e5c
2016-04-25 16:38:04 -07:00
Jeromy 4841ce270f server/camnetdns: add cloudlaunch config
Updates #722

Change-Id: Ia7532118183b5c38dfedc3aaa437f5284301b4c9
2016-04-25 16:26:26 -07:00
Brad Fitzpatrick 15ad9bf381 Merge "server/camnetdns: start of camlistore.net DNS server" 2016-04-25 23:08:34 +00:00
Jeromy 21c5373a0b server/camnetdns: start of camlistore.net DNS server
Updates #722

Change-Id: Ie4c2d6d036f13d7fb6f5545131397f55d1d9a91c
2016-04-25 16:05:25 -07:00
Mathieu Lonjaret 7332aad3aa Merge "server/camlistored: upload gpg key blob on startup" 2016-04-25 22:43:38 +00:00
mpl 36944ca818 server/camlistored: upload gpg key blob on startup
Fixes Issue #700

Change-Id: Ica92c321666220043e9c157de38e67a043250afe
2016-04-25 15:42:04 -07:00
Brad Fitzpatrick 924c895b22 server/camlistored/ui: rename confusing Pudgy menu to Camli
Change-Id: Ic7785881f2db65aff562ef329753d78aa131e68b
2016-04-23 17:42:56 -07:00
Brad Fitzpatrick 75d60962f6 Move remaining stuff in third_party/* to vendor/*
Change-Id: Ifbcc02817083cba68d8c1acec3e6ec50e8f61149
2016-04-20 16:49:15 -07:00
Tamás Gulácsi 7402cc0efd Delete misc unused objects
Using honnef.co/go/unused/cmd/unused

Change-Id: I672b3cb77f09e9bd80dcdc149cde4f7f2939e451
2016-04-06 17:59:51 +02:00
Mathieu Lonjaret 1c08a41322 Merge "ui: renamed "Search roots" to "Favorites"" 2016-03-19 00:12:27 +00:00
mpl 4e4f045c29 web UI: port Directory view to React
Side-effects:

Fixes issue #694

And we can now remove filetree.* and cache_buster_iframe.js

Change-Id: Id2d72054366be820771e8b342bb84c4da07a0abf
2016-03-17 00:29:26 +01:00
Ricardo Kirkner 48695d85a0 ui: renamed "Search roots" to "Favorites"
Mostly a cosmetic change but should make the menu item easier to
understand for users.

Fixes #506

Change-Id: I30b75a659948859988c1fd07780d08175b56cbc6
2016-03-16 20:09:04 -03: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
Mathieu Lonjaret c86007e232 Merge "blobserver/blobpacked: reindex meta from packed blobs" 2016-03-11 20:51:46 +00:00
mpl 4dd31658a5 blobserver/blobpacked: reindex meta from packed blobs
Added recovery mode to trigger reindex.

Fixes #676

Change-Id: Ifb9c26e1fe8e562c1dab5f1ce793f1c9165be988
2016-03-11 17:02:38 +01:00
Steve Armstrong 93dba45f8d ui: fix symlink in filetree view
Fixes issue #687

Change-Id: I385b5c86d736f798aaaf1416221bee05598c6c4c
2016-03-08 20:30:14 -08:00
mpl e03d0af04f ui: use authentication token instead of Basic Auth
Since issue #660 showed that we could not rely on Basic Auth for some
very particular cases (of POST requests), we wanted to replace Basic
Auth with a pre-generated token based authentication mechanism for these
cases.

However, as there already is such a mechanism used to authenticate
websocket connections, we simply extended the use of that mechanism.
Therefore, the token that is initially generated for websocket
connections is also now a valid token to authenticate any other
connection. The relevant types and method names have been changed to
reflect that. The javascript code pertaining to the sensitive cases
mentioned above has been changed to use that token.

Some doc has been added to point out how security-sensitive the
OpDiscovery permission is, since it gives access to the auth token.

Fixes issue #660

Change-Id: Iafed3b6e4804364ca2559414c8d87dc4a30f6637
2016-02-10 16:58:34 +01:00
Mathieu Lonjaret e67998ee12 Merge "UI: add to set when dropped is a dup but not yet a member of the set" 2015-12-29 18:22:48 +00:00
mpl 4cf54fb196 UI: add to set when dropped is a dup but not yet a member of the set
Follow-up to 82c6feb61a and builds upon the work of Mathieu Lonjaret's Change 5345.

When viewing a set, and the dropped file is a dup for an existing permanode('s content), we still need to add the permanode to the set if it is not already a member of it. The above commit overlooked that point.

Fixes #622

Change-Id: I694e583625886a7bf164ab9fd5bf8874a7cc2b23
2015-12-29 10:57:34 -07:00
mpl cea5e332ce vendor: go4.org/legal
At rev c3c16077b235db4c6b2a2a6121c2d429707f4ed4

And use it in new package pkg/camlegal

And remove pkg/legal

Change-Id: I5e398aa5f145a02a04d33719276fd2f8b82ab12b
2015-12-16 18:50:49 +01:00
Tamás Gulácsi 9f7e1df32b Remove pkg/context
Use golang.org/x/net/context instead.

Fixes #648.

Change-Id: I676a2f25458be97610a49d6f954f2102cbd373fa
2015-12-12 23:09:02 +01:00
mpl 40be4d8da2 vendor: go4.org/jsonconfig (and errorutil)
Previously pkg/jsonconfig and pkg/errorutil

Copied from go4.org at rev d1b8a2fb2de6160036e4801aa5e4d855571078b8

Change-Id: I673ed55b0825baa2607289b6082f205100261d7a
2015-12-01 17:21:49 +01:00
mpl 40c0d80b07 vendor: go4.org/wkfs
Previously pkg/wkfs

Copied from go4.org at rev 3970dd22c0e7e2397304ad626a20b72f8db41b58

Note that pkg/wkfs/gcs has not been moved yet (for dependencies
reasons).

Change-Id: I737e88a360bccfc643e1fa43541f65f2384c3157
2015-11-27 00:23:03 +01:00
mpl 82c6feb61a UI/upload: detect when permanode already exists
When uploading a file, we were already checking if the contents and file
blob already existed, and acted smartly accordingly. However, we were
still always creating a new permanode (and camliContent claim) for that
file.

This CL addresses that last point.

Fixes #622

Change-Id: Ifb5c8846e20b6684d25a7749c64b09904e07bb6f
2015-08-25 01:11:18 +02:00
Brad Fitzpatrick ff3e52d9d0 camlistored, osutil/gce: log to Cloud Logging when on GCE 2015-08-18 10:03:47 +02:00
Brad Fitzpatrick 2a4dbc9f08 pkg/env: start of env-specific log destinations 2015-08-17 18:06:35 +02:00
mpl c78b881af2 Merge "search: remove all thumbnail business" 2015-07-20 14:43:24 +00:00
mpl 1576fdad6d search: remove all thumbnail business
Fixes Issue #321

Change-Id: I4818580b52c335e204f58b176450459ebc26189c
2015-07-16 16:19:16 +02:00
Mario Russo 5ad8e3a3cb ui: fixes broken links on DirectoryDetail / FiletreePage
Fixes: #629

Change-Id: I35d4fed1e038aba1996964ebca016dd02f7392c6
2015-07-03 09:28:27 +02:00
mpl 0cbed52a3b UI: add title arg to history.replaceState
According to
https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Manipulating_the_browser_history
the second (=title) argument is ignored. However, in the chrome console
I'm getting
Uncaught TypeError: Failed to execute 'replaceState' on 'History': 2 arguments required, but only 1 present.
errors so I figure it's worth fixing.

Change-Id: I6b745503a68511c8010c41257b6790e7df9b8acb
2015-06-30 00:58:31 +02:00
mpl 5398396ef5 UI: remove unused blob pages
Also remove obsolete stanzas in Makefile

Change-Id: I864451e44bf760ab546d02d5bbf7b59afdc8a665
2015-06-22 17:24:35 +02:00
mpl 630052ff02 Merge "ui/navigator: allow tests, fix navigate return, add tests" 2015-06-04 22:17:09 +00:00
mpl c3869765ed Merge "ui/server_connection: fix opt_fail handling + long overdue cleanups" 2015-06-04 22:13:17 +00:00
mpl 7d355cf5d8 ui/server_connection: fix opt_fail handling + long overdue cleanups
opt_fail as an optional argument didn't work in the cases where the
func would also receive an event as argument. Because when opt_fail is
not provided, the arguments get shifted and the event value would end up
in the opt_fail variable, or vice-versa.
So in these cases, I switched to the more robust
func({success: success, fail: fail}, event) syntax

As a result, safeFail wasn't that useful anymore, and it was incorrectly
bound in some cases, so I removed it.

I also removed a few intermediate function calls which made reading
unnecessarily more complicated.

Change-Id: Ie70694a26e52f302837bbf6ffc16b0a0bb77ad7e
2015-06-03 19:35:57 +02:00
mpl 8c392e92a0 ui/navigator: allow tests, fix navigate return, add tests
1) cam.object dep was needed for any of the tests to run
2) fixed the return logic of navigate() to match its doc. Should be of
no consequence though, as afaik this return value is not used anywhere.
3) added tests for 2)

Change-Id: I5c236ab95482b50437f0047d63e42603f754438d
2015-06-03 17:46:33 +02:00
Mario Russo 38f16f6e31 ui: fixing persisted selection state across navigation
Reintroduction of the left/right arrow and the Around query
broke saved selection state.

Fixes: #609

Change-Id: I0974fd8af48e0eb9fe9d16faecd41b17a6f3824b
2015-05-29 14:58:39 +02:00
Mathieu Lonjaret cbec324c6a Merge "pkg/server: added help handler" 2015-05-28 13:30:25 +00: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
mpl 177cf52a37 Merge "UI: document components lifecycle" 2015-05-27 21:20:31 +00:00
mpl d83bf692b7 UI: document components lifecycle
Change-Id: I2145c668bf54d89ced27891449feff5582b6fa1e
2015-05-21 23:58:41 +02:00
mpl 93727cbff0 ui/index.js: add fallback blobRef search for targetSearchSession_
Also refactor updateTargetSearchSession_ and updateChildSearchSession_
for query string VS target blobRef precedence clarity.

Fixes #614
Fixes #615

Change-Id: Ib70f9fb582e96a6dac3b0920ce324c03501bcd32
2015-05-20 20:07:45 +02:00
Mario Russo ae85a3ff4e ui: added 'No references' placeholder text to the blob detail aspect when there are no references to display
Change-Id: I9bd7b10ab8954c41a3b4a7c375748e087fdc77b3
2015-04-23 11:08:17 +02:00
mpl b19e836c7b ui: Get left/right arrows workin again with Around query.
Author: Aaron Boodman

Change-Id: Ib3947e668ca26f65c3e3e2a0178c565e21a884bf
2015-04-02 14:19:44 +02:00
Brad Fitzpatrick c7213346d0 Revert "Temporary GCE-specific log spam for debugging."
This reverts commit 314162705c.
2015-04-02 03:25:46 -07:00
Brad Fitzpatrick 314162705c Temporary GCE-specific log spam for debugging.
Change-Id: I62de01cd0be48636e6cac8cd4e7bf8d46f9abf64
2015-04-02 02:29:08 -07:00
Brad Fitzpatrick c9a0beae45 Add new 'env' package to detect the type of environment.
Also, delete my old gce package from third_party and only use the
google metadata package (which my gce package became, and which was
also already vendored into third_party)

Fixes #596

Change-Id: I64fd6f1e9dc6f433466f91f81efd2ecbf039334f
2015-04-01 08:45:36 -07:00
Aaron Boodman e987220ad6 Merge "Add a header to the sidebar that displays number of selected items." 2015-03-15 13:46:02 +00:00
Aaron Boodman cd072f78cd Add a header to the sidebar that displays number of selected items.
Change-Id: Idd877a96dc0f835c4f372d4de787114a39058628
2015-03-15 06:43:36 -07:00
Aaron Boodman 5f3d6a1474 Change button text casing from 'Update Tags' to 'Update tags' for consistency.
Change-Id: Ide78b0f194a6f9da119724b286854faba5d28fd4
2015-03-14 21:17:15 -07:00
Mathieu Lonjaret 68836026b8 Merge "Capture the file's lastModifiedDate provided by File API when uploading from the UI" 2015-02-27 16:27:03 +00: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
mpl 3e79e73272 search: implement post-search Created sort
Fix some UI queries, since UI always queries with "-created".

Also add Unsorted, to override the CreatedDesc default, for when we
really do not want to sort, e.g. when we don't have a corpus and
trying to sort would make us error out.

Issue #579

Change-Id: Ife0aa816c5e8cac8dc6612d0ffd104238abc6838
2015-02-25 16:43:35 +01:00
Mario Russo 62e1a1f7f7 ui: fixing broken 'View original' link on contextual nav bar
Issue: #576

Change-Id: I9ca432aafdb4ec0b783aded74f51360254da88b5
2015-02-04 19:47:32 +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
Brad Fitzpatrick 098ec2d70c server/camlistored: link in blobpacked
Update #532

Change-Id: I66513fda7cde57c8c3a0aa7e5213826400b659f0
2015-01-18 18:03:44 -08:00
Aaron Boodman 1d9918ba92 Add button to remove selection from current set.
Change-Id: Ie16fb15a824b9bf2ca50a5e80cd06669d0651b2b
2015-01-04 23:52:52 -08:00
Aaron Boodman bc5fd6ea9d Remove no longer used permanode.js
Change-Id: I02a723ac81957e9f5438ab27399974554e7c39c7
2015-01-04 22:52:32 -08:00
Aaron Boodman ea2c8fa990 Add a list of references to a blob to the blob aspect.
Change-Id: I2fe96bc8f04f8137773aee393eb934e06517575d
2015-01-04 21:59:10 -08:00
Aaron Boodman e40504a9b2 Improve heuristic for determining when to show search aspect.
We now show it when either there are existing children, or when
the permanode doesn't have a more specific type.

Change-Id: Ic90829a60bf5f6213afd53476473eed4ffee6ca8
2015-01-02 23:10:45 -08:00
Aaron Boodman 437b8f99e1 Factor out cam.permanodeUtils.getCamliNodeType
Change-Id: I205c1551fd316d9a844cd3fe4041d6e2cf0845b9
2015-01-02 23:10:43 -08:00
Aaron Boodman 7d688b9d85 Revert "Add camliNodeType:'set'"
This reverts commit 2d67328243.

I decided to do this only with heuristics, since we have to maintain
backward compat with data before this camliNodeType existed.

Change-Id: Ieba5dd1f8a4c8f5aedc1477c4fab1ffebcc2878c
2015-01-02 23:08:16 -08:00
Mario Russo a645be4554 Merge "ui: redirect to set after creation" 2014-12-29 17:10:44 +00:00
Aaron Boodman 2d67328243 Add camliNodeType:'set'
Change-Id: Ia174d747dbe386f0150c4470c4db170d9cc1d362
2014-12-28 11:38:32 -08:00
Mario Russo 936bd8a336 ui: redirect to set after creation
Updates #553

Change-Id: I1b2f8e2f07cab08f30d2b30356ba02834dcdb95b
2014-12-28 09:52:25 -07:00
Aaron Boodman fbc116392b Increase size and padding of blob item checkmarks
Change-Id: I36bd82cd7cb0e1d57428734eff05133158b10a04
2014-12-24 10:49:47 -08:00
Aaron Boodman 3683a15e05 Save selection state across navigations.
Bug: https://github.com/camlistore/camlistore/issues/552
Change-Id: I53b0035dd84d1263723ddbb18e6ca488cef7d406
2014-12-24 10:37:10 -08:00
Brad Fitzpatrick ad145260c0 Update more links to use the camlistore.org redirector.
Change-Id: I1ef94301d7ac0df69abc4f3f27bcb363fa8e8082
2014-12-13 17:25:16 +11:00
Mario Russo ef286f891a ui: code cleanup to eliminate ReactJS warnings in console
-"unique key" warnings for items dynamically added via arrays
-"bind" errors when binding without providing 'null' as first param

Related Issue: https://code.google.com/p/camlistore/issues/detail?id=426

Change-Id: I9ab3d8e1097fc37bed54f1e0a6c078dd264ef579
2014-12-06 23:25:01 +01:00
Mario Russo a41b24011b Merge "ui: added 'View original' link to sidebar" 2014-12-01 21:09:31 +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
mpl f15ec3fe92 Merge "pkg/deploy/gce: lib + tool to deploy on Google Cloud" 2014-11-27 15:44:32 +00:00
mpl 99fe925efc pkg/deploy/gce: lib + tool to deploy on Google Cloud
http://camlistore.org/issue/531

Change-Id: I69ffe0544341d380bb844aef1dcca8a1ae441ea7
2014-11-26 22:50:27 +01:00
Mario Russo 958688ce68 Merge "ui: updates to file upload dialog" 2014-11-18 08:30:28 +00:00
Mario Russo 4c53a1cd27 ui: updates to file upload dialog
-display total/transferred bytes rather than num files
-upload is now context sensitive if currently viewing a set
-updated closure dependencies

https://code.google.com/p/camlistore/issues/detail?id=336
https://code.google.com/p/camlistore/issues/detail?id=504

Change-Id: I8dee1ee2711c06dfdc9d59e8d0fa0e4ebc641092
2014-11-16 15:31:08 +01:00
Salmān Aljammāz 4e39af1086 Generate self-signed certs with the correct hostname.
This change makes gce/create.go generate a self-signed certificate
with the hostname from the -hostname argument and upload it to GCS
before creating a new camlistore instance.

It also makes camlistored use baseURL to figure out the hostname
when generating its self-signed certificate.

Change-Id: I64f85853dab34a7ce95e5d5997e58f2e5da43496
2014-11-13 15:53:40 +00:00
Aaron Boodman 755cf0eb0f Merge "Fix bug where 'no results' message sometimes showed momentarily." 2014-11-08 07:46:38 +00:00
Aaron Boodman d9316ff8dd Fix bug where 'no results' message sometimes showed momentarily.
SearchSession::isComplete() could sometimes return the wrong answer.
Nulling out the continuation is needed to make loadMoreResults()
idempotent. So had to add more state to SearchSession specifically
for tracking completeness.

Change-Id: Ic2a90c73f3a764f358476cffa6d498ea53103421
2014-11-07 23:44:39 -08:00
Aaron Boodman 8ac319f437 Merge "Fix scrolling on firefox" 2014-11-06 17:25:35 +00:00
Brad Fitzpatrick 0e841e0f51 Rename pkg/misc to pkg/hashutil
It only had one function anyway.

Change-Id: Iec4b7868d823148c8e1d2607347fe9d3c1463403
2014-11-06 13:31:58 -03:00
Aaron Boodman 96bae4b0e2 Fix scrolling on firefox
Change-Id: Ic023dba06680f3d4772fe709b7f5f0dd0d54e7ae
2014-11-06 11:04:21 +00:00
Mario Russo 4cf29f33d3 ui: added 'No results found' message to blob item container
this patch incorporates visual feedback from aaron

Change-Id: Ib7b8bbc7daa958693dafc9b2108cac3ee91bb870
2014-11-06 10:52:47 +01:00
Aaron Boodman 0ba58ae829 Fix badly aligned piggy animation in upload dialog.
Change-Id: I69e9432a90382a2ece9c5f77c089de7f7c9ea492
2014-11-04 16:45:24 -08:00
Aaron Boodman ac67a8d479 Moved contextual nav items back to a sidebar.
Global nav items remain in piggy menu.

This is an adaptation of https://camlistore-review.googlesource.com/#/c/3898/ by Mario Russo <mail.mr@gmail.com>.

Change-Id: I85f7f386aa0573026253e13c5bd12b46ad08f83a
2014-11-04 15:34:08 -08:00
Aaron Boodman 3fde03eb39 Add an 'upload...' button to the piggy menu.
Bug: https://code.google.com/p/camlistore/issues/detail?id=504
Change-Id: I736499ee10e9d07e15432eff2224a64abb1569ce
2014-10-26 01:41:19 -07:00
Aaron Boodman b4a03836c0 Show a more obvious drop target when dragging items onto UI.
This also shows a very crude upload progress.

Bugs:
https://code.google.com/p/camlistore/issues/detail?id=336
https://code.google.com/p/camlistore/issues/detail?id=504

Change-Id: I3c232c94d0238290abc295b59871eb7206624960
2014-10-26 01:04:12 -07:00
Mario Russo a8c7b8d7fb ui: tags control
Removing DEBUG_TAGS flag so that tags control is available by default.
Request per Aaron (https://camlistore-review.googlesource.com/#/c/3806/)

Change-Id: If1ad842a563d1992fb8ca203c67502825d2eb64c
2014-10-12 15:32:48 +02:00
Tamás Gulácsi 3686417bac Import pkg/sorted/leveldb in server/camlistore
To be able to use it (ATM only in low-level config, by specifying
metaIndex with the stores/queues/caches).

Change-Id: I7743ebffb90f59b83124063f8f488a9b80c869ca
2014-09-25 18:40:33 +02:00
Mario Russo 5385ff14a9 ui: introduction of tagging controls to new contextual nav bar.
Currently disabled but can be tested via the DEBUG_TAGS flag in index.js. Potential enhancements are documented in tags_control.js. This patch
removes one piece of unused code.

Change-Id: I751fca63fbc93c209628f03a3f3aa6e87d01e309
2014-09-22 23:19:39 +02:00
Eric Drechsel 906ef089e6 UI permanode aspect: Don't save if nothing changed.
Bug: https://code.google.com/p/camlistore/issues/detail?id=505
Change-Id: I6816a51c2f005c7d903c9a02aa1410a52177cbec
2014-09-07 21:35:02 -07:00
Lindsey Simon 9cb690bea8 Adds less (css pre-processor) to fix missing CSS prefixes
Change-Id: I47a90ff128abfeac00c886a3dece4ffa38c704c8
2014-09-04 17:32:01 -07:00
Aaron Boodman 2acf13c702 Fix FOPA (flash of permanode aspect) when clicking permanodes with children.
We were waiting to show the container aspect until the child search session
returned. This meant that we temporarily showed the permanode aspect then
swapped to the container aspect shortly thereafter (because the container
aspect is higher priority).

The right solution to this is to change the search protocol so that clients
can know how many children a permanode has without getting the entire list
of them. But for now, it just so happens that search returns the entire
list, so we can use that instead.

Change-Id: Iaf93f689e965a1dc9ef73d834d46c57026c100cd
2014-09-03 00:30:46 -07:00
Aaron Boodman 6f91febae4 Don't trigger sad piggy when we purposely close sockets.
Change-Id: I2e3b0e894fff180a028fcffbf649ff18f69fd963
2014-09-03 00:07:08 -07:00
Aaron Boodman dbdda81230 Be defensive against getting null updates on web socket.
Change-Id: Id7a7b850ddaa57fe24d8e7ec380fb8881b27def5
2014-09-03 00:00:28 -07:00
Aaron Boodman 95bf8e42a3 Get continual server status updates over websocket.
Also show channel-level websocket errors in piggy menu.

Change-Id: Iad5f00e5578f28f837cd2e88cbdab3f715a9fed1
2014-08-30 09:43:27 -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
Aaron Boodman 40390c651a Adjust position of error icon.
Change-Id: I2b86d8b52a3c616ca3f2408973d85e70fb27a2d7
2014-08-29 20:55:52 -07:00
Aaron Boodman ef5e0dfc82 Show server errors in the piggy menu.
When there is a server error, the piggy becomes sad and periodically
shakes his head. When you expand the piggy menu you see one or more
entries explaining why he is sad.

Change-Id: If1e28dbf02c9befaa46b62838cb704220f719bc6
2014-08-29 16:08:19 -07:00
Brad Fitzpatrick 77a5f0f375 Merge branch 'master' of https://camlistore.googlesource.com/camlistore 2014-08-25 16:50:42 -07:00
Brad Fitzpatrick 1d95b1133b Disable App Engine build tests, since GAE is Go 1.2 and we need 1.3
Will renable when App Engine supports Go 1.3.

Change-Id: I777f83f3b040aa873bf9d92f2401d7f430e930f0
2014-08-25 16:39:41 -07:00
Aaron Boodman 1f57cf3924 Merge "Rewrite permanode detail in React." 2014-08-22 23:25:34 +00:00
Aaron Boodman c07828d663 Rewrite permanode detail in React.
This is more general than the old one... it allows generic editing
of all attributes.

Change-Id: I308e39034cf206f9cd8e99cb52863a09c2755705
2014-08-22 16:16:39 -07:00
Aaron Boodman 0d923c6207 Add a link in the piggy drop down to importers UI
Change-Id: I4a2ba7127822e85f086ff4155c079a74ee31fae6
2014-08-21 10:36:39 -07:00
Aaron Boodman 90d1df956f Hide contents view on empty permanodes.
Otherwise, we end up showing a stupid empty contents view for every
tweet, foursquare checkin, etc.

This has the downside that when you remove the last item from a
set, the contents view goes away.

Change-Id: If5f53a713aaff63d9fb294b675a5e55ca452eff1
2014-08-20 19:13:19 -07:00
Aaron Boodman 8e876b51b9 Always show the search aspect for searches, even when results are empty.
Before we did not show the search aspect when the results were empty.
This was intended for the case where you're looking at an image or
something that doesn't have children.

But it had the side effect of meaning that we didn't show the search
aspect for empty sets, or empty search results, which isn't right
because you still want users to be able add items to empty sets.

Change-Id: Iad187b38317a5adcefbfd06f92047c03c5815583
2014-08-18 19:24:29 -07:00
Aaron Boodman 940150a5c7 Reimplement the Blob aspect using React.
Change-Id: I819b4d1dda86fe80db203f10e1e8a1b23b0777d5
2014-08-18 18:19:50 -07: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 d36efd7434 ui: Change text Server status, not just Sync status
Change-Id: I9de4d6c6ee391fac81401331f907bbbd57ab7faf
2014-08-16 14:52:57 -07:00
Aaron Boodman 4b9874afd5 Fix UI refresh when you don't have websocket support.
I broke this in an early CL. Damn you JavaScript and your non-compiling.

Change-Id: I796bb19855802d7663e0aed9c7e30ddcc4061b44
2014-08-16 11:05:29 -07:00
Aaron Boodman 89bcd69bed Merge "Add a piggy menu item to go to the sync status page." 2014-08-16 04:20:08 +00:00
Aaron Boodman 2cb1956a3a Add a piggy menu item to go to the sync status page.
Also add support for piggy menu items that are just links. Links are
nice because you can right-click 'em and so on.

Change-Id: I0cfb4ba6f58141ee396916925793a06033457028
2014-08-16 10:57:11 -07:00
Brad Fitzpatrick 9dae4f7ddf Since GCE only links to the HTTP url, redirect HTTP requests to https.
Change-Id: I50ff31f0d27437a11f672565e5f0870aaa2fd81b
2014-08-15 23:17:14 -07:00
Brad Fitzpatrick 4106d1bd2e Merge branch 'master' of https://camlistore.googlesource.com/camlistore 2014-08-15 22:29:55 -07:00
Brad Fitzpatrick cab5f227f6 Handle serverinit.DefaultEnvConfig return values correctly.
Change-Id: I074507fc1e32d62f2d1b8af00f4ce47d733d89a7
2014-08-15 22:05:33 -07:00
Brad Fitzpatrick 79335328cc Make 2048 bit keys instead of 1024.
Change-Id: I82a93a7fc5ba8e6b688a422b55b868bb3f3969fa
2014-08-15 22:05:08 -07:00
Aaron Boodman 1e0db747fd Make directory aspect actually work.
Change-Id: I560cb9c8d91a395c26253d7fd4a8ec605671a910
2014-08-15 21:37:43 -07:00
Aaron Boodman 6b9ed9e467 Some cleanup: remove an unneeded file and rename another.
Change-Id: I7ef87c7fcfc831d40b2c507128de04b7c8b20d1c
2014-08-15 21:37:22 -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