Commit graph

638 commits

Author SHA1 Message Date
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
Joey Hess
c950e8fba0 move out to template 2012-07-31 18:33:19 -04:00
Joey Hess
4b5ffe8f9b implemented the addrepository form
shiny!
2012-07-31 17:57:08 -04:00
Joey Hess
c70496dc7f improve first run screen 2012-07-31 16:13:09 -04:00
Joey Hess
04794eafc0 webapp now starts up when run not in a git repo 2012-07-31 12:17:31 -04:00
Joey Hess
b9b0097876 tweak types so the webapp can run without a threadstate when outside an annex 2012-07-31 11:19:40 -04:00
Joey Hess
e9d9d9d5ea add icons 2012-07-31 03:10:16 -04:00
Joey Hess
f0a88e1203 change url 2012-07-31 02:36:18 -04:00
Joey Hess
02b345249b stub 2012-07-31 02:35:07 -04:00
Joey Hess
2c8bbdf307 made navbar work
also added an About page and a stub Config page.
2012-07-31 02:30:26 -04:00
Joey Hess
5fed026bcd reorg templates 2012-07-31 01:24:49 -04:00
Joey Hess
58dfa3fa5b split up webapp files 2012-07-31 01:11:32 -04:00