Commit graph

361 commits

Author SHA1 Message Date
Joey Hess
0d50a6105b whitespace fixes 2012-12-13 00:45:27 -04:00
Joey Hess
551924e6be webapp: Allow user to specify the ssh port when setting up a remote. 2012-12-06 17:09:38 -04:00
Joey Hess
c9fd389fbf webapp: Encryption can be disabled when setting up remotes. 2012-12-04 13:28:22 -04:00
Joey Hess
45821bd557 tweak 2012-12-02 23:10:11 -04:00
Joey Hess
4f4209b833 webapp: Added help buttons and links next to fields that require explanations. 2012-12-02 22:33:30 -04:00
Joey Hess
7b032dbbc8 webapp: Fix bad interaction between required fields and modals. 2012-12-02 17:32:54 -04:00
Joey Hess
c941523b63 webapp: Prettify error display. 2012-12-02 15:02:49 -04:00
Joey Hess
0b6c889012 webapp: S3 and Glacier forms now have a select list of all currently-supported AWS regions. 2012-12-01 14:11:37 -04:00
Joey Hess
8dd1d9aaf9 webapp: Defaults to sharing box.com account info with friends, allowing one-click enabling of the repository. 2012-11-28 13:31:49 -04:00
Joey Hess
18fe34222a allow building webapp w/o webdav 2012-11-25 14:36:24 -04:00
Joey Hess
3dfc9cadb0 simplify 2012-11-25 00:38:11 -04:00
Joey Hess
59733456ed refactor 2012-11-25 00:27:17 -04:00
Joey Hess
495b0a898c automatically create archive directory 2012-11-24 16:39:36 -04:00
Joey Hess
463cf58140 webapp and assistant glacier support 2012-11-24 16:30:15 -04:00
Joey Hess
a5111a6d85 Amazon Glacier special remote; 100% working 2012-11-20 16:43:58 -04:00
Joey Hess
8a5eaf8c3f Merge branch 'master' of ssh://git-annex.branchable.com 2012-11-18 13:21:32 -04:00
Joey Hess
dea2780b78 fix build with yesod-form-1.2.0 2012-11-18 13:21:19 -04:00
Joey Hess
b60d5116a9 fix warning 2012-11-18 13:04:35 -04:00
Joey Hess
70f4bed400 language CPP 2012-11-18 13:03:00 -04:00
Joey Hess
fe11b3a940 fix build with shakespeare-js-1.0.0.2
For no apparent reason, this version removes all useful instances of
ToJavaScript, leavind behind only an instance for Aeson.Value. Argh. Pissed
off at this arbitrary breaking change, and seriously considering dropping
this library.
2012-11-18 13:00:35 -04:00
Joey Hess
b0a76592c3 pass Text into julius
May fix
http://git-annex.branchable.com/bugs/3.20121112:_build_error_in_assistant/
2012-11-17 16:19:54 -04:00
Joey Hess
453587d392 UI for enabling existing webdav remotes 2012-11-17 16:10:13 -04:00
Joey Hess
7addb89dc1 webapp: support box.com 2012-11-17 15:30:11 -04:00
Joey Hess
e250f6f11f factor out Creds 2012-11-14 19:32:27 -04:00
Joey Hess
d468e37f46 automatic repolist updating 2012-11-13 17:50:54 -04:00
Joey Hess
75dbce69e6 Show error message to user when testing XMPP creds. 2012-11-13 13:21:09 -04:00
Joey Hess
8fd78f45a2 fix build without XMPP
not sure if I'll keep bothering with this option
2012-11-12 01:48:15 -04:00
Joey Hess
8b22bd8831 add a yes/no confirm for xmpp pairing requests 2012-11-11 22:29:16 -04:00
Joey Hess
b91f07fe83 split up xmpp and local pairing UIs 2012-11-11 17:41:56 -04:00
Joey Hess
5e44ab177c don't try to transfer data to/from XMPP remotes
Partition syncRemotes into ones needing git sync (ie, non-special remotes),
and ones needing data sync (ie, non-XMPP remotes).
2012-11-11 16:23:16 -04:00
Joey Hess
6a0756d2fb use trustExclude 2012-11-11 00:26:29 -04:00
Joey Hess
b160856297 end of xmpp pairing page encourages adding a shared cloud repository 2012-11-10 20:38:52 -04:00
Joey Hess
75048b43e2 split repository comfiguration page into several widgets 2012-11-10 17:08:43 -04:00
Joey Hess
fd22734392 show when a buddy is already paired 2012-11-10 16:36:21 -04:00
Joey Hess
da6fb44446 finished XMPP pairing!
This includes keeping track of which buddies we're pairing with, to know
which PairAck are legitimate.
2012-11-05 17:43:17 -04:00
Joey Hess
db36b11e28 switch to silent chat messages for XMPP pairing
Along the way, significantly cleaned up Assistant.XMPP, and made XMPP
message decoding more efficient.
2012-11-05 15:40:56 -04:00
Joey Hess
0b8027e527 webapp: When setting up authorized_keys, use GIT_ANNEX_SHELL_DIRECTORY. 2012-11-05 12:35:05 -04:00
Joey Hess
a6cecfcf33 workaround for Google Talk's insane handling of self-directed presence
Maybe the spec allows it, but broadcasting self-directed presence info to
all buddies is just insane.

I had to bring back the IQ messages for self-pairing, while still using
directed presence for other pairing. Ugly.
2012-11-03 22:52:41 -04:00
Joey Hess
17e84a8096 switch to directed presence for pair requests
Testing between Google Talk and prosody, the directed IQ messages
were not received. Google Talk probably only relays them between
clients using the same account.

I first tried even more directed presence, with each client JID being sent
a separate presence, but that didn't work on Google Talk, particularly
it was ignored when one client sent it to another client using the same
account.

So, presence directed at the user@host of the client to pair with. Tested
working between Google Talk and prosody (in both directions), as well
as between two clients with the same account on Google Talk, and
two clients with the same account on prosody.

Only problem with this form of directed presence is that if I also use it
for git pushes, more clients than are interested in a push's data will
receive it. So I may need some better approach, or a hybrid between
directed IQ and directed presence.
2012-11-03 21:19:59 -04:00
Joey Hess
42f030c905 XMPP pair requests are now received, and an alert displayed 2012-11-03 17:46:22 -04:00
Joey Hess
b95c255b6d XMPP pairing notifications are now sent
Rest of pairing process still to do.
2012-11-03 16:01:09 -04:00
Joey Hess
9a8d0be866 send a presence query when the buddy list is displayed
This ensures that clients that have not sent presence in a while will show
up in the list.
2012-11-03 14:25:06 -04:00
Joey Hess
a1228e27ed refactor XMPP client 2012-11-03 14:16:17 -04:00
Joey Hess
6a61829e2d add buddy list to pairing UI 2012-11-02 21:13:06 -04:00
Joey Hess
2ae43e71e0 xmpp buddy list tracking 2012-11-02 14:28:36 -04:00
Joey Hess
33dbb19d99 webapp: Ensure that rsync special remotes are enabled using the same name they were originally created using.
It was creating a new special remote with a different name, unless
the stars perfectly aligned and the names matched.
2012-10-31 16:14:52 -04:00
Joey Hess
c03d9b2310 webapp: Fix renaming of special remotes.
Working around what seems to me to be a git bug. Surely there are valid
setups of real git remotes that don't have fetch set?
2012-10-31 14:39:05 -04:00
Joey Hess
7fe077ec24 webapp: Fix creation of rsync.net repositories. 2012-10-31 13:58:31 -04:00
Joey Hess
f460a2a2a8 make initial commit quietly 2012-10-31 13:42:07 -04:00
Joey Hess
88d1907278 where indentation 2012-10-31 02:34:03 -04:00
Joey Hess
0cf152b88b webapp: Make an initial, empty commit so there is a master branch
Several things only happen when on a branch, so make sure we're on one.
2012-10-30 19:12:05 -04:00
Joey Hess
96c7a5ce32 fix intro display when there is 1 remote 2012-10-30 18:21:13 -04:00
Joey Hess
f6208bca0d reload uuid map after editing repo description and saving
Don't rely on the ConfigMonitor thread, it might be too slow.
2012-10-30 17:22:21 -04:00
Joey Hess
93ffd47d76 finished pushing Assistant monad into all relevant files
All temporary and old functions are removed.
2012-10-30 17:14:51 -04:00
Joey Hess
47d94eb9a4 pushed Assistant monad down into DaemonStatus code
Currently have three old versions of functions that more reworking is
needed to remove: getDaemonStatusOld, modifyDaemonStatusOld_, and
modifyDaemonStatusOld
2012-10-30 15:39:15 -04:00
Joey Hess
ea8df8fe9f cleanup daemonStatus accessors 2012-10-30 14:44:18 -04:00
Joey Hess
68118b8986 split remaining assistant types 2012-10-30 14:34:48 -04:00
Joey Hess
f78ca9bc58 split out daemonstatus types 2012-10-30 14:11:14 -04:00
Joey Hess
86cb3faf51 moved ThreadedMonad to Types 2012-10-29 19:07:10 -04:00
Joey Hess
87ba4f8677 split and lift Assistant.Pushes 2012-10-29 17:52:43 -04:00
Joey Hess
d5a5c05a79 tweak 2012-10-29 17:02:50 -04:00
Joey Hess
1852eddce6 lift alertWhile 2012-10-29 16:49:47 -04:00
Joey Hess
e18b733c81 move alert display functions 2012-10-29 16:34:11 -04:00
Joey Hess
5d57b28a34 lifted Assistant.Sync into Assistant monad
lots of nice cleanups
2012-10-29 16:22:14 -04:00
Joey Hess
67ce7929a5 Assistant monad, stage 3
All toplevel named threads are converted to the Assistant monad.

Some utility functions still need to be converted.
2012-10-29 14:07:12 -04:00
Joey Hess
4dbdc2b666 Assistant monad, stage 2.5
Converted several threads to run in the monad.

Added a lot of useful combinators for working with the monad.

Now the monad includes the name of the thread.

Some debugging messages are disabled pending converting other threads.
2012-10-29 02:21:04 -04:00
Joey Hess
4e765327ca Assistant monad, stage 1
This adds the Assistant monad, and an AssistantData structure.
So far, none of the assistant's threads run in the monad yet.
2012-10-29 00:15:43 -04:00
Joey Hess
4ac2fd0a22 ensure that git-annex branch is pushed after a successful transfer
I now have this topology working:

   assistant ---> {bare repo, special remote} <--- assistant

And, I think, also this one:

        +----------- bare repo --------+
        v                              v
  assistant ---> special remote <--- assistant

While before with assistant <---> assistant connections, both sides got
location info updated after a transfer, in this topology, the bare repo
*might* get its location info updated, but the other assistant has no way to
know that it did. And a special remote doesn't record location info,
so transfers to it won't propigate out location log changes at all.

So, for these to work, after a transfer succeeds, the git-annex branch
needs to be pushed. This is done by recording a synthetic commit has
occurred, which lets the pusher handle pushing out the change (which will
include actually committing any still journalled changes to the git-annex
branch).

Of course, this means rather a lot more syncing action than happened
before. At least the pusher bundles together very close together pushes,
somewhat. Currently it just waits 2 seconds between each push.
2012-10-28 16:05:34 -04:00
Joey Hess
531f1d1446 add XMPP nudge alert, displayed after making a cloud repository 2012-10-27 12:25:29 -04:00
Joey Hess
c71836269b (re)start XMPP when it's configured in the webapp 2012-10-27 00:50:14 -04:00
Joey Hess
6803667f00 store xmpp creds from form 2012-10-26 17:13:30 -04:00
Joey Hess
1d04dff4f0 split out xmpp utilities 2012-10-26 14:44:36 -04:00
Joey Hess
82b7e835e4 run xmpp test in bound thread 2012-10-26 14:39:22 -04:00
Joey Hess
07494cbb4b XMPP configuration form
Currently relies on SRV being set, or the JID's hostname being the server
hostname and the port being default. Future work: Allow manual
configuration of user name, hostname, and port.
2012-10-26 14:17:09 -04:00
Joey Hess
5544ca2fb8 build fix with pairing disabled 2012-10-26 12:56:19 -04:00
Joey Hess
7ee0ffaeb9 Use USER and HOME environment when set, and only fall back to getpwent, which doesn't work with LDAP or NIS. 2012-10-25 18:17:54 -04:00
Nicolas Pouillard
03ba7d6a87 One more #ifdef WITH_S3 2012-10-18 12:43:24 -04:00
Joey Hess
362e18e3fd allow renaming git remotes in the edit form 2012-10-14 17:18:01 -04:00
Joey Hess
08e1efb278 make repo description optional 2012-10-14 16:32:55 -04:00
Joey Hess
8932acb5d0 redirect to the new repository version of the end form 2012-10-14 16:11:21 -04:00
Joey Hess
2aacae3ebb always make removable drive repos bare
None-bare removable drive repos don't have the assistant running in them,
so don't get their master branch updated as syncs come in. This will
probably change later, but for now, set up something that works.

Also, set the description of a newly added drive's repo locally. This
ensures that the repo edit form has the description in it.
2012-10-14 15:53:40 -04:00
Joey Hess
6ea6a2e71c better variable name 2012-10-14 14:50:03 -04:00
Joey Hess
3f06c883f2 hook up syncing toggles
Although I observe that these toggles don't always prevent syncing.
When a transfer scan is active, it will still queue items from the disabled
remote.

Also, transfers from a disabled remote show up as from "unknown", which is
not ideal.
2012-10-12 12:45:16 -04:00
Joey Hess
a7642b3b6e add syncing enabled/disabled to repo list with icon, and toggle link
The toggle link doesn't work yet.

Also lots of refactoring and type improvements
2012-10-12 01:09:28 -04:00
Joey Hess
9b760150b7 fix crash when editing the current repo 2012-10-11 19:36:28 -04:00
Joey Hess
0b266f970f set/unset annex-sync, rather than annex-ignore
This reserves annex.ignore for repos that should not be visible at all;
repos with syncing disabled are now skipped by the assistant, but are
displayed in the list and can be configured.
2012-10-11 19:22:29 -04:00
Joey Hess
f31d292ab1 after setting up a new repo, go to a special version of the configuration page 2012-10-11 17:35:08 -04:00
Joey Hess
5b9900133c allow disabling syncing to a repo on its edit form
This is not quite right yet, since it disables it so hard it doesn't show
up in the repo list anymore!
2012-10-11 17:14:42 -04:00
Joey Hess
4ef6dac5c2 webapp: Improve wording of intro display. Closes: #689848 2012-10-11 15:04:38 -04:00
Joey Hess
7aef34f501 implement saving of repository settings 2012-10-10 19:13:49 -04:00
Joey Hess
5d85c1497c fix setting the group of the first repo created 2012-10-10 16:32:15 -04:00
Joey Hess
4e2e08b45a ui for selecting a repository group 2012-10-10 16:23:41 -04:00
Joey Hess
39be7eea40 add standard group selector to repo edit form 2012-10-10 16:04:28 -04:00
Joey Hess
9da7dd8874 webapp: configure new repos to use the standard preferred content settings 2012-10-10 15:35:10 -04:00
Joey Hess
3490977d97 webapp: put new repos in standard groups
I'm using transfer for most things, both removable drives and cloud
storage, because it's the safest choice. We'll see if it makes sense
to prompt for the group when setting this up, or let the user pick
something else after the fact.
2012-10-10 15:27:25 -04:00
Joey Hess
f06587ba23 basic repository edit form
Only shows description so far.
2012-10-09 15:11:48 -04:00
Joey Hess
b6a3f03f82 add "configure" link to each repository in the webapp's repo list 2012-10-09 14:43:53 -04:00
Joey Hess
a5781fd9ba webapp automatic grouping
webapp: Adds newly created repositories to one of these groups:
clients, drives, servers

This is heuristic, but it's a pretty good heuristic, and can always be
configured.
2012-10-09 14:24:17 -04:00
Joey Hess
33fdcd59be tweak 2012-09-29 16:22:53 -04:00
Joey Hess
0ccfb3bbb2 let's not -DOSX, that results in unwanted mangling 2012-09-29 14:49:15 -04:00
Joey Hess
cc0e5b7c52 use getAddrInfo, to support ipv6 2012-09-29 12:50:12 -04:00
Joey Hess
e88e3ba85b standalone linux app nearly ready
also made several fixes that apply to the OSX app
2012-09-28 19:08:13 -04:00
Joey Hess
fede52ac05 if the webapp is started with a cwd the user can't write to, don't suggest it
Fall back to somewhere under $HOME instead.

I had a report that git-annex.app on OSX was coming up with "/" as the
suggested location on first run.
2012-09-28 16:04:49 -04:00
Joey Hess
1087fac544 add a alert at the top of the main part of the webapp, above the transfers display
Based on feedback that it was too sparse to be clear what it's doing.
2012-09-28 13:30:29 -04:00
Joey Hess
06a2427deb disable etags on yesod static site
Seems buggy, it was causing redirects from /static/jquery-full.js to
/jquery-full.js. Only in some builds, like Jimmy's.
2012-09-28 12:34:44 -04:00
Joey Hess
8b61bac418 put version on about page 2012-09-27 18:09:05 -04:00
Joey Hess
a02d6b36d8 Add OSX standalone app license bundle, and arrange for the About page
to link to it.
2012-09-27 16:47:52 -04:00
Joey Hess
3979086035 use ~/.ssh/git-annex-shell wrapper
This was needed for the OSX self-contained app, but is a generally good
idea. It avoids needing perl; is probably faster; and could eventually
be replaced by something faster yet.
2012-09-26 18:59:18 -04:00
Joey Hess
c2c577f34f allow enabling existing S3 repos 2012-09-26 15:24:23 -04:00
Joey Hess
17708dd173 add a configurator for S3 2012-09-26 14:44:07 -04:00
Joey Hess
cb3c9340f8 license the webapp under the AGPL 3+
This means that anyone serving up the webapp to users as a service
(ie, without providing any git-annex binary at all to the user) still needs
to provide a link to the source code for it, including any modifications
they may make.

This may make git-annex be covered by the AGPL as a whole when it is built
with the webapp. If in doubt, you should ask a lawyer.

When git-annex is built with the webapp disabled, no AGPLed code is used.
Even building in the assistant does not pull in AGPLed code.
2012-09-24 14:48:47 -04:00
Joey Hess
45a26175d6 renamed RsyncFile -> Rsync 2012-09-19 14:28:32 -04:00
Joey Hess
18bae020ed make other repositories list list all autostarted repos
And add a form to add another, unrelated repository
2012-09-18 17:50:07 -04:00
Joey Hess
74906ed13f UI for enabling special remotes
Now other repositories can configure special remotes, and when their
configuration has propigated out, they'll appear in the webapp's list of
repositories, with a link to enable them.

Added support for enabling rsync special remotes, and directory special
remotes that are on removable drives. However, encrypted directory special
remotes are not supported yet. The removable drive configuator doesn't
support them yet anyway.
2012-09-13 16:50:02 -04:00
Joey Hess
df337bb63b hlint 2012-09-13 00:57:52 -04:00
Joey Hess
ade511f6e3 keep webapp snappy by generating ssh keypair in the background 2012-09-11 15:51:27 -04:00
Joey Hess
99d52f26bc fix combining of pairing alerts 2012-09-11 15:43:33 -04:00
Joey Hess
2c1ceeeaf9 pairing works!!
Finally.

Last bug fixes here: Send PairResp with same UUID in the PairReq.
Fix off-by-one in code that filters out our own pairing messages.

Also reworked the pairing alerts, which are still slightly buggy.
2012-09-11 15:09:00 -04:00
Joey Hess
aace44454a keep track of the stage we're at in pairing
This avoids us responding to our own pairing messages, as well
as ignoring any out of order messages that might be received somehow.
2012-09-11 12:58:00 -04:00
Joey Hess
16d27e9c02 work around a bug in Yesod
The PathPiece instance for Text results in a 404 for T.empty.
2012-09-11 12:26:42 -04:00
Joey Hess
0208d6aa82 add a UUID to pair requests
Pair requests the the same UUID are part of the same pairing session,
which allows us to detect attempts to brute force the shared secret,
as that will result in pair requests with the same UUID that are
not verified with the right secret.
2012-09-11 03:16:00 -04:00
Joey Hess
675621d903 clean up authorized_keys handling
Including rollback of adding the key when a pairing response
gets canceled by the user.
2012-09-11 00:23:34 -04:00
Joey Hess
d19bbd29d8 pairing probably works now (untested) 2012-09-10 21:55:59 -04:00
Joey Hess
a41255723c check that ssh public key received over the wire is sane 2012-09-10 18:18:55 -04:00
Joey Hess
c20d6f4189 responding to pair requests *almost* works 2012-09-10 17:53:51 -04:00
Joey Hess
b573d91aa2 broke out fairly generic ssh stuff to Assistant.Ssh so pairing can use it too
I'd rather Utility.Ssh, but the SshData type is not sufficiently clean and
generic for Utility.
2012-09-10 15:21:34 -04:00
Joey Hess
34a0e09d4b split up ssh key generation and setup steps 2012-09-10 14:55:15 -04:00
Joey Hess
16cefae7f2 add an alert while a locally initiated pairing request is in progress
Has a button to cancel the request.
2012-09-09 16:24:34 -04:00
Joey Hess
1e41c0d85e update pair request alert when button is pressed 2012-09-09 01:02:44 -04:00
Joey Hess
f62cc48482 reorg templates 2012-09-08 23:32:08 -04:00
Joey Hess
6e60b08060 moved the PairStage inside the Verifiable data 2012-09-08 21:06:10 -04:00
Joey Hess
e59b0a1c88 first pass at alert buttons
They work fine. But I had to go to a lot of trouble to get Yesod to render
routes in a pure function. It may instead make more sense to have each
alert have an assocated IO action, and a single route that runs the IO
action of a given alert id. I just wish I'd realized that before the past
several hours of struggling with something Yesod really doesn't want to
allow.
2012-09-08 19:57:15 -04:00
Joey Hess
317ab14da2 add remote directory to pair request 2012-09-08 15:40:47 -04:00
Joey Hess
61ee1e1660 fix build without pairing support 2012-09-08 15:21:34 -04:00
Joey Hess
0f0c7f8d70 added pair listener thread 2012-09-08 15:07:44 -04:00
Joey Hess
3e070b947a don't pass .local hostname over the wire
The remote computer may not support mDNS. Instead, pass over the uname -a
hostname, and the IP address, and leave best hostname calculation to the
remote side.
2012-09-08 14:23:35 -04:00
Joey Hess
3dd4b4058f implement pair request broadcasts
Pair requests are sent on all network interfaces, and contain the best
available hostname to use to contact the host on that interface.

Added a pairing in progress page.

Revert "reduce some boilerplate using ghc extensions", because it caused
overlapping instances for Text.
2012-09-08 13:04:19 -04:00
Joey Hess
0c01348b65 pairing passphrase entry form, validation, etc
Actually 3 forms in one, this handles the initial passphrase entry, and the
confirmation, and also varys wording if the same user or a different user
is confirming.
2012-09-08 02:02:39 -04:00
Joey Hess
3bee6b3c74 yesod skelton and routes for pairing
yet more changes to pairing message data types
2012-09-08 00:27:27 -04:00
Joey Hess
46fd6b54c7 rsync.net configurator tested and 100% working 2012-09-04 15:27:06 -04:00
Joey Hess
b584d96c13 rsync.net configurator display
Doesn't set up the repo yet.
2012-09-03 00:39:55 -04:00
Joey Hess
b6a91d7a4d defer setting up ssh public key until after confirmation 2012-09-02 20:43:32 -04:00
Joey Hess
014974a7da allow making encrypted rsync special remotes
wow, that was easy!
2012-09-02 17:32:24 -04:00
Joey Hess
9f403113dd make bare repo on server
I think this makes sense.. Unless the assistant is running on the server,
the repo won't be updated, so it might as well be bare.

Non-bare repos will be handled by the pairing configurator, later.
2012-09-02 15:30:32 -04:00
Joey Hess
97ce4d24cb adding ssh remote working
Rsync remote still needs work
2012-09-02 15:27:00 -04:00
Joey Hess
6623a51cf9 run sync in background 2012-09-02 15:20:03 -04:00
Joey Hess
e6f61e5ab9 factored out repository creation code and made more generic
for use by other configurators.. probably should be moved to a utility
module somewhere
2012-09-02 15:06:27 -04:00
Joey Hess
93f29997a9 reduce some boilerplate using ghc extensions 2012-09-02 02:07:15 -04:00
Joey Hess
837cd79e4f add ssh confirmation page
also broke out webapp types into a separate module
2012-09-02 00:49:25 -04:00
Joey Hess
53043999ac don't set up authorized_keys during probe 2012-09-01 21:10:40 -04:00
Joey Hess
32ab049f9c ssh connection testing and key setup 2012-09-01 20:37:35 -04:00
Joey Hess
54a492db5f UI for adding a ssh or rsync remote 2012-08-31 18:59:57 -04:00
Joey Hess
86fb1305dc split out local repo configurators 2012-08-31 15:17:12 -04:00
Joey Hess
4004baafaf fix alterTransferInfo
don't want to stomp over fields other than the ones being changed
2012-08-31 12:14:16 -04:00
Joey Hess
34aeecb78a fix bug where resuming a transfer also started one queued transfer 2012-08-31 11:47:35 -04:00
Joey Hess
8d32d54320 make start button work on queued transfers
When multiple downloads of a key are queued, it starts the first, but leaves the
other downloads in the queue. This ensures that we don't lose a queued
download if the one that got started failed.
2012-08-29 16:30:40 -04:00
Joey Hess
c21a9fe04a more generic 2012-08-29 15:56:47 -04:00
Joey Hess
a4fa31ffa1 remove debug print 2012-08-29 15:45:48 -04:00
Joey Hess
99525f8454 when canceling a transfer, also cancel all other downloads of the same key 2012-08-29 15:24:09 -04:00
Joey Hess
9e54355e8b pausing tweaks 2012-08-29 15:13:12 -04:00
Joey Hess
93037580b6 fix resume button
Change alterTransferInfo to not merge in old values, including
transferPaused.
2012-08-29 14:14:57 -04:00
Joey Hess
07de26ed7b simple transfer queue display cleanup
Don't display redundant queued downloads. The only problem with this is
that it reduces the total number of queued transfers the webapp displays.
2012-08-29 13:41:47 -04:00
Joey Hess
0dd7860393 fix a transfers display glitch
Run code that pops off the next queued transfer and adds it to the active
transfer map within an allocated transfer slot, rather than before
allocating a slot. Fixes the transfers display, which had been displaying
the next transfer as a running transfer, while the previous transfer was
still running.
2012-08-28 17:17:09 -04:00
Joey Hess
2433f6ca5a use the ~/.config/git-annex/program file to find command when running transfers 2012-08-27 13:43:03 -04:00
Joey Hess
271ea49978 add support for readonly remotes
Currently only the web special remote is readonly, but it'd be possible to
also have readonly drives, or other remotes. These are handled in the
assistant by only downloading from them, and never trying to upload to
them.
2012-08-26 15:39:02 -04:00
Joey Hess
95bfbcd3e3 make canCheckSymlink check in a parent directory if the directory DNE 2012-08-16 16:50:21 -07:00
Joey Hess
a73e271d60 run resumed transfers immediately, do not wait for free transfer slot
The resumed transfer still uses a slot, so will delay other, queued
transfers from starting.
2012-08-12 12:36:08 -04:00
Joey Hess
b6b8f6da9c implement resuming of paused transfers
Currently waits for a new transfer slot to open up, which probably needs to
change..
2012-08-12 12:11:20 -04:00
Joey Hess
37eed5d8d0 fix button display for paused transfer 2012-08-10 18:50:21 -04:00
Joey Hess
8ba9830653 implement pausing of transfers
A paused transfer's thread keeps running, keeping the slot in use.
This is intentional; pausing a transfer should not let other
queued transfers to run in its place.
2012-08-10 18:42:44 -04:00
Joey Hess
21bd92f077 send update notificaton when removing a queued transfer 2012-08-10 16:00:24 -04:00
Joey Hess
0d80406b2b remove dummy 2012-08-10 15:54:12 -04:00
Joey Hess
a76078a78e process group killing
This seems to work pretty well.

Handled the process groups like this:

- git-annex processes started by the assistant for transfers are run in their
  own process groups.
- otherwise, rely on the shell to allocate a process group for git-annex

There is potentially a problem if some other program runs git-annex
directly (not using sh -c) The program and git-annex would then be in
the same process group. If that git-annex starts a transfer and it's
canceled, the program would also get killed. May or may not be a desired
result.

Also, the new updateTransferInfo probably closes a race where it was
possible for the thread id to not be recorded in the transfer info, if
the transfer info file from the transfer process is read first.
2012-08-10 15:52:22 -04:00
Joey Hess
d5e06e7b89 fork off git-annex copy for transfers
This doesn't quite work, because canceling a transfer sends a signal
to git-annex, but not to rsync (etc).

Looked at making git-annex run in its own process group, which could then
be killed, and would kill child processes. But, rsync checks if it's
process group is the foreground process group and doesn't show progress if
not, and when git has run git-annex, if git-annex makes a new process
group, that is not the case. Also, if git has run git-annex, ctrl-c
wouldn't be propigated to it if it made a new process group.

So this seems like a blind alley, but recording it here just in case.
2012-08-10 14:14:08 -04:00
Joey Hess
20203b45b9 transfer canceling
Should work (untested) for transfers being run by other processes.

Not yet by transfers being run by the assistant. killThread does not
kill processes forked off by a thread. To fix this, will probably
need to make `git annex getkey` and `git annex sendkey` commands that
operate on keys, and write their own transfer info. Then the assistant
can run them, and kill them, as needed.
2012-08-08 17:55:56 -04:00
Joey Hess
09449792fa factor out onclick javascript 2012-08-08 17:07:38 -04:00
Joey Hess
94fcd0cf59 add routes to pause/start/cancel transfers
This commit includes a paydown on technical debt incurred two years ago,
when I didn't know that it was bad to make custom Read and Show instances
for types. As the routes need Read and Show for Transfer, which includes a
Key, and deriving my own Read instance of key was not practical,
I had to finally clean that up.

So the compact Key read and show functions are now file2key and key2file,
and Read and Show are now derived instances.

Changed all code that used the old instances, compiler checked.
(There were a few places, particularly in Command.Unused, and the test
suite where the Show instance continue to be used for legitimate
comparisons; ie show key_x == show key_y (though really in a bloom filter))
2012-08-08 16:20:24 -04:00
Joey Hess
94e92a1b58 make alerts change tense when they finish 2012-08-06 15:00:46 -04:00
Joey Hess
aab3a01a71 merge two repository screens into one 2012-08-05 19:55:06 -04:00
Joey Hess
a3f76fe696 wording
De-emphasize "clone", because it's not that simple. The removable drive may
already have an annex with content; if so it'll get synced in.
2012-08-05 15:57:30 -04:00
Joey Hess
cb0f435d94 adding removable drive repos now basically works 2012-08-05 14:49:47 -04:00
Joey Hess
3add2cd3ba wire up scan and transfer to newly added removable drive
remote setup still todo
2012-08-04 21:18:57 -04:00
Joey Hess
e125ce74b8 work toward adding new repos on removable drives
This actually does add a new repo, but it doesn't yet set up
remotes, or sync to it.
2012-08-04 18:17:16 -04:00
Joey Hess
e0c3958d9a improved config 2012-08-03 20:40:34 -04:00
Joey Hess
1bd2be549f add extra sidebar widget
html is slightly broken
2012-08-03 20:10:32 -04:00
Joey Hess
b1a5a4f985 moving toward configuring new repos in the webapp 2012-08-03 14:36:16 -04:00
Joey Hess
a323b0c46d update
default description will be added elsewhere
2012-08-03 10:44:13 -04:00
Joey Hess
89120261e0 run the file browser in a separate thread to avoid blocking the browser 2012-08-03 10:18:57 -04:00
Joey Hess
1f89712e6b add a navbar button that opens the repo in the desktop's native file browser
This should work on linux (xdg-open) and OSX (open). If the program
is not in $PATH, it falls back to opening a browser window/tab with file:///

The only tricky bit is the javascript code, that handles clicking on the
link. This is to avoid unnecessary page refreshes. Until I added the
return false at the end, the <a>'s normal click event also fired, so two
file browsers opened. I have not checked portability extensively.
2012-08-03 10:02:56 -04:00
Joey Hess
a6e4283fed add slight delay in between sidebar updates, to avoid excessive churn
Tested and 0.01 seconds is not perceivable as a delay when interacting with
the UI.
2012-08-02 13:55:38 -04:00
Joey Hess
22d7447ced fix tilde expansion 2012-08-02 07:55:10 -04:00
Joey Hess
9a038b4a9b better ~/ handling 2012-08-02 07:50:13 -04:00
Joey Hess
112ce4f49c support XDG_DATA_DIR 2012-08-02 07:47:39 -04:00
Joey Hess
60da0d6ad2 full autostart support
git annex assistant --autostart will start separate daemons in each
listed autostart repo

running the webapp outside any git-annex repo will open it on the
first listed autostart repo
2012-08-02 00:42:33 -04:00
Joey Hess
7606f3e7c1 cleanup 2012-08-01 16:31:16 -04:00
Joey Hess
ecc168aba3 implemented firstrun repository creation and redirection to full webapp
Some of the trickiest code I've possibly ever written.
2012-08-01 16:10:26 -04:00
Joey Hess
1efe4f3332 only use smart default on first run 2012-07-31 21:34:29 -04:00
Joey Hess
b9afb7785e typo 2012-07-31 21:12:58 -04:00
Joey Hess
e81e8913d9 default repository location
Unifying poll results, it's Annex in lowercase. :)

When cwd is HOME, use ~/Desktop/annex, unless there's no Desktop directory;
then use use ~/annex

If cwd is not $HOME, use cwd
2012-07-31 21:06:30 -04:00
Joey Hess
bab80bf24a full input validation for repository path
Expands ~ , checks for every crazy input problem I can think of
2012-07-31 20:56:10 -04:00