Commit graph

131 commits

Author SHA1 Message Date
Joey Hess
74cf65a4dd avoid first person 2012-07-29 22:18:58 -04:00
Joey Hess
895b068e35 tweak intro 2012-07-29 22:11:01 -04:00
Joey Hess
326617ad2f add intro 2012-07-29 21:54:23 -04:00
Joey Hess
0186f06744 tweak Alert closability and construction 2012-07-29 19:41:17 -04:00
Joey Hess
d62b157194 better ordering of alerts 2012-07-29 19:05:51 -04:00
Joey Hess
d52c932424 moved all alert messages into one file
Makes it easier to edit for consistent voice etc.
2012-07-29 18:09:24 -04:00
Joey Hess
b2dc8fdb06 add more alerts
Nearly all long-running actions now display an alert.
2012-07-29 17:53:18 -04:00
Joey Hess
ce7889ba86 debuggery 2012-07-29 14:10:17 -04:00
Joey Hess
c4023f7858 probably fixes http://git-annex.branchable.com/bugs/lsof__47__committer_thread_loops_occassionally/ 2012-07-29 13:55:07 -04:00
Joey Hess
ebd8362d58 fix bug in transfer initiation checking
Putting the transfer on the currentTransfers atomically introduced a bug:
It checks to see if the transfer is in progress, and cancels it.

Fixed by moving that check inside the STM transaction.
2012-07-29 13:37:26 -04:00
Joey Hess
09e77a0cf0 add some alerts 2012-07-29 13:22:08 -04:00
Joey Hess
e1d4bfe671 typo; was waiting on the wrong notifier for the sidebar! 2012-07-29 12:37:45 -04:00
Joey Hess
c2f3e66d8c show alerts in the sidebar
This has a bug -- it seems long polling can only wait on one page at a
time. Need to re-unify the notifiers.
2012-07-29 11:31:06 -04:00
Joey Hess
5271d699d2 add alerts to DaemonStatus 2012-07-29 09:35:50 -04:00
Joey Hess
57203e3981 refactor 2012-07-29 08:52:57 -04:00
Joey Hess
62dac85880 update the sidebar by long polling
Needs to use a different NotificationBroadcaster, and not replace the
whole sidebar div, but instead add in new content. However, it's 3:30 am.
2012-07-29 03:23:17 -04:00
Joey Hess
38ade1af70 better noscript UI 2012-07-29 00:55:22 -04:00
Joey Hess
376f8443c1 add a separate page for noscript browsers
This may be customised differently than the main page later on, but
for now the important thing is that this constantly refreshed page does not
allocate a new NotificationHandle each time it's loaded.
2012-07-29 00:08:14 -04:00
Joey Hess
a498be7f98 renamed /status to /transfers
Also fixed a bug; the ident for the div was regnerated each time
/status was called. This only was the same as the original ident due to
luck.
2012-07-28 23:55:41 -04:00
Joey Hess
9b18dc2a39 tune javascript refresh delays
WebApp now shows changes with no delay. Comparing a running git-annex get
and the webapp side-by-side, they both show each new transfer at the same
time.
2012-07-28 21:25:56 -04:00
Joey Hess
6a9abf6526 add NotificationID to StatusR, and use it to block 2012-07-28 21:21:22 -04:00
Joey Hess
e31277d38a send notifications when the TransferQueue is changed
The fun part was making it move things from TransferQueue to currentTransfers
entirely atomically. Which will avoid inconsistent display if the WebApp
renders the current status at just the wrong time. STM to the rescue!
2012-07-28 18:47:24 -04:00
Joey Hess
3cc1885793 move DaemonStatus manipulation out of the Annex monad to IO
I've convinced myself that nothing in DaemonStatus can deadlock,
as it always keepts the TMVar full. That was the only reason it was in the
Annex monad.
2012-07-28 18:02:11 -04:00
Joey Hess
a17fde22fa add a NotificationBroadcaster to DaemonStatus
First use of it is to make the status checkpointer thread block until
there is really a change to the status.
2012-07-28 16:09:34 -04:00
Joey Hess
c0ca6f44ac template reorg 2012-07-27 20:47:48 -04:00
Joey Hess
ecd63e2981 template cleanup
use julius's nice #id and .class things
2012-07-27 20:25:28 -04:00
Joey Hess
7717501fee add alert close buttons 2012-07-27 16:28:00 -04:00
Joey Hess
02ec8ea012 much better webapp startup of the assistant
This avoids forking another process, avoids polling, fixes a race,
and avoids a rare forkProcess thread hang that I saw once time
when starting the webapp.
2012-07-27 15:33:24 -04:00
Joey Hess
0f6292920a webapp now displays the real running and queued transfers
yowza!!!
2012-07-27 11:47:34 -04:00
Joey Hess
7e3c1e008d webapp now uses twitter bootstrap
mocked up the main screen, and am actually pretty happy with it!
2012-07-27 04:48:50 -04:00
Joey Hess
1983ca2852 added jquery to static site
Had to switch to toWaiAppPlain to avoid a seeming bug in toWaiApp;
chromium only received a partial copy of jquery. Always the same length
each time, which makes me think it's a bug in the compression, although
a bug in the autohead middleware is also a possibility.

Anyway, there's little need for compression for a local webapp. Not wasting
time compressing things is probably a net gain.

Similarly, I've not worried about minifying this yet. Although that would
avoid bloating the git-annex binary quite so much.
2012-07-26 23:55:51 -04:00
Joey Hess
615dc09ffc use widgetFile 2012-07-26 22:54:31 -04:00
Joey Hess
e40f94cbcd add threadState member, will need this later to access the daemonStatus 2012-07-26 21:51:56 -04:00
Joey Hess
f5ef46d01e cleaned up refreshing code into a widget
Very happy to have a reusable autoUpdate widget that can make any Yesod
widget automatically refresh!

Also added support for non-javascript browsers, falling back to meta
refresh.

Also, the home page is now rendered with the webapp status on it, before
any refreshing is done.
2012-07-26 21:03:46 -04:00
Joey Hess
9fd03c65f9 webapp now does long polling
The webapp is now a constantly updating clock! I accomplished this amazing
feat using "long polling", with some jquery and a little custom java
script.

There are more modern techniques, but this one works everywhere.
2012-07-26 17:56:24 -04:00
Joey Hess
95f4b192f0 on second thought, the session cookie is still useful to support setMessage 2012-07-26 12:41:20 -04:00
Joey Hess
a453be4195 disable client session cookie 2012-07-26 12:10:53 -04:00
Joey Hess
b89b801567 update 2012-07-26 05:20:52 -04:00
Joey Hess
9d6b59d0e2 use the secret token for authentication, and add to all dynamic urls 2012-07-26 04:50:09 -04:00
Joey Hess
b36804d648 generate random token and launch webapp using it 2012-07-26 03:38:20 -04:00
Joey Hess
3ac2cf09e5 added a custom defaultLayout, static site, and favicon
Broke hamlet out into standalone files.

I don't like the favicon display; it should be served from /favicon.ico,
but I could only get the static site to serve /static/favicon.ico, so
I had to use a <link rel=icon> to pull it in. I looked at
Yesod.Default.Handlers.getFaviconR, but it doesn't seem to embed
the favicon into the binary?
2012-07-26 02:45:01 -04:00
Joey Hess
6a8540c1a2 tweak 2012-07-26 00:39:25 -04:00
Joey Hess
805d50c69d use hamlet at least for the static html 2012-07-25 23:50:29 -04:00
Joey Hess
1ffef3ad75 git annex webapp now opens a browser to the webapp
Also, starts the assistant if it wasn't already running.
2012-07-25 23:13:01 -04:00
Joey Hess
e6ce54de82 build fixes 2012-07-25 22:04:10 -04:00
Joey Hess
32d3cffc4c run yesod, and launch webapp on startup 2012-07-25 21:26:13 -04:00
Joey Hess
95c80b6440 laziness fix
Now scanning runs fully interleaved with transferring.
2012-07-25 14:54:09 -04:00
Joey Hess
b665ffe36f implement simple working copy based scan
Works.. could be more efficient.
2012-07-25 14:16:53 -04:00
Joey Hess
2b7f9c8442 fix including of remote in TransferInfo when queueing new transfers 2012-07-25 14:02:50 -04:00
Joey Hess
a9dbfdf28d better transfer queue management
Allow transfers to be added with blocking until the queue is sufficiently
small.

Better control over which end of the queue to add a transfer to.
2012-07-25 13:12:34 -04:00