Commit Graph

121 Commits

Author SHA1 Message Date
Simon Michael
702f900ec0 web: fix warnings 2014-05-23 09:02:20 -07:00
Ryan Desfosses
b60da51386 made the following changes to resolve deprecated warnings:
replaced hamletToRepHtml with giveUrlRenderer
  updated type RepHtml to Html
  replaced settingsPort with setPort
2014-05-21 07:30:54 -04:00
Simon Michael
e6a1339370 cli: options help polish 2014-05-01 07:22:44 -07:00
Simon Michael
3fb5e25fd4 web: rename --static-root to --file-url 2014-04-30 08:48:23 -07:00
Simon Michael
a9c83f0ce1 web: add Peter Simons' patch fixing Data.Conduit.Network HostIPv4 error (#171)
(cherry picked from commit 993cae3a74)

Conflicts:
	hledger-web/Hledger/Web/Main.hs
2014-04-17 12:35:42 -07:00
Xinruo Sun
0275485bf9 web: add a --static-root option to customize static files root 2013-12-15 12:20:07 +08:00
Simon Michael
02fea186a3 web: fix debug option breakage in Main 2013-12-08 19:48:51 -08:00
Simon Michael
a66a715eeb command line options API updates, possibly fixing hledger-web build 2013-09-22 22:31:06 -07:00
Simon Michael
080eb866ec web: clean up language extensions a bit, make autoweb works again 2013-06-04 18:23:55 -07:00
Simon Michael
c744451dfa web: loosen "starting web browser" message for servers 2013-06-01 11:40:00 -07:00
Simon Michael
8873ffbe77 web: fix auto-exit in local mode, clarify startup messages 2013-05-01 12:02:47 -07:00
Simon Michael
c9b6dd8819 web: --server flag re-enables long-running, request-logging mode; output cleanups 2013-05-01 07:23:59 -07:00
Simon Michael
0a47715b17 web: also launch a browser at startup; auto-terminate after 2m or on enter
We're now using the wai-handler-launch middleware. This injects a
script in each page that pings the server repeatedly, and terminates
the server if it gets no pings (ie there are no browser tabs
displaying the app) for two minutes. The server can also be easily
terminated at the console by pressing enter, yesod devel style.
2013-04-20 20:02:50 -07:00
Simon Michael
0a77eba02e web: try using wai-launch-handler.. not working yet 2013-04-20 10:03:15 -07:00
Simon Michael
d5e575c862 web: remove io-storage 2013-04-09 12:53:21 -07:00
Simon Michael
0df4a235af web: set up journal for yesod devel, store it in App (fixes #101)
The web app's journal state is now kept in the yesod App as an IORef,
instead of using io-storage.
yesod devel now works; it uses the journal file specified by
$LEDGER_FILE, or ~/.hledger.journal.

web: update journal state handling, fix yesod devel - WIP
2013-04-09 12:41:22 -07:00
Simon Michael
3d33673b25 web: obey command-line query options at startup again 2012-11-15 17:53:10 +00:00
Simon Michael
cfbd8bb956 web: update for yesod 1.1.3
Build with latest yesod. Also reorganise to conform more closely with
yesod's standard scaffold layout to reduce upgrade effort.
2012-11-15 17:48:48 +00:00
Simon Michael
f441bbd946 web: add missing CPP pragma 2012-10-13 14:57:42 +00:00
Simon Michael
00f22819ae balance report speedup
This refactoring fixes an O(n^2) slowdown in the balance command with
large numbers of accounts. It's now speedy, and the implementation is
clearer. To facilitate this, the Account type now represents a tree of
accounts which can easily be traversed up or down (and/or flattened
into a list).

Benchmark on a 2010 macbook:

    +-------------------------------------------++--------------+------------+--------+
    |                                           || before:      | after:     |        |
    |                                           || hledger-0.18 | hledgeropt | ledger |
    +===========================================++==============+============+========+
    | -f data/100x100x10.journal     balance    ||         0.21 |       0.07 |   0.09 |
    | -f data/1000x1000x10.journal   balance    ||        10.13 |       0.47 |   0.62 |
    | -f data/1000x10000x10.journal  balance    ||        40.67 |       0.67 |   1.01 |
    | -f data/10000x1000x10.journal  balance    ||        15.01 |       3.22 |   2.36 |
    | -f data/10000x1000x10.journal  balance aa ||         4.77 |       4.40 |   2.33 |
    +-------------------------------------------++--------------+------------+--------+
2012-10-21 17:18:18 +00:00
Simon Michael
f03b020e2f set version with CPP instead of cabal-file-th; make building more robust
hledger and hledger-web were reading their version number (and program
name) from their cabal files at compile time using cabal-file-th,
which allowed the version number be maintained in one place (per
package).

This meant you had to be in same directory as the cabal file when
building, which made life more complicated, eg emacs compilation mode
could not jump to errors. Also, it slowed down building slightly, and
is a factor in hledger Debian packages being unavailable on a number
of platforms (we also use TH for report templates).

Now, the build version is set with a CPP VERSION flag, which seems
simpler overall. For cabal builds, this needs to be configured
manually in a few more places in each cabal file. For makefile builds,
it is set it to the name of the most recent darcs tag (which should be
more useful than the old behaviour). If not set, it defaults to the
blank string, useful eg for haddock. And, all makefile builds now run
from the top directory.
2012-10-13 19:21:17 +00:00
Simon Michael
155cb0eafe web: fix compilation error with -fblaze_html_0_5 flag 2012-07-08 00:18:39 +00:00
Simon Michael
4b11890e02 web: fix a build error 2012-03-07 16:42:35 +00:00
Simon Michael
28d86aca53 web: fix excess angle bracket in add form 2012-04-01 21:07:01 +00:00
Simon Michael
25b514b721 web: fix js error breaking second use of add form (#72) 2012-04-01 21:08:30 +00:00
Simon Michael
bb131f1b8c web: add closing angle brackets which yesod 1.0 requires 2012-04-01 20:30:44 +00:00
Simon Michael
296a4d1bb2 web: better hamlet override 2012-04-03 17:53:12 +00:00
Simon Michael
64b6316785 web: revert unintended hunk in Settings.hs 2012-04-03 17:43:49 +00:00
Simon Michael
acc5139c54 tools: makefile updates 2012-04-03 17:12:47 +00:00
Simon Michael
f298aac874 web: fix account balance rendering 2012-05-29 03:18:24 +00:00
Simon Michael
f35b961c86 web: update for yesod 1.0 2012-05-29 02:53:33 +00:00
Simon Michael
98274b481d more build warnings 2012-05-06 20:44:23 +00:00
Simon Michael
88f69e12e2 fix Dates exports for hledger-web 2012-04-16 17:09:27 +00:00
Simon Michael
93dd7bd064 web: simplify ifdef 2012-05-29 16:43:13 +00:00
Simon Michael
b4514cc37d web: don't munge static file names in dev mode 2012-05-29 03:09:43 +00:00
Simon Michael
f6f615196f web: define our own hamlet so it can be tweaked for debugging 2012-04-01 20:49:36 +00:00
Simon Michael
cfa59cc4f8 web: Hledger.Web api cleanup, haddocks 2012-04-01 20:29:10 +00:00
Simon Michael
2912a11929 web: officially drop GHC 6.12 support, fix build warnings with 7.0, 7.2, 7.4 2012-03-29 23:24:48 +00:00
Simon Michael
7f3b990394 docs: fix api docs 2012-03-07 16:05:04 +00:00
Simon Michael
5b749ab8a2 web: work around static file problem by skipping etag parameter 2012-05-29 16:45:24 +00:00
Simon Michael
88212f26e8 simplify journal parser names 2012-05-09 15:34:05 +00:00
Simon Michael
e1b1b8bce8 rename Matcher to Query, simplify constructors 2012-05-16 07:12:49 +00:00
Simon Michael
0c73d91f94 web: fix static file embedding in non-dev builds 2012-03-09 18:52:31 +00:00
Simon Michael
a27eb7c29f more matcher -> query renaming 2012-05-16 07:37:24 +00:00
Simon Michael
c27707f578 web: bump version, upgrade to yesod 0.10 2012-03-05 07:52:36 +00:00
Simon Michael
6eb7ad28e1 refactor/beef up readJournal/readJournalFile 2012-03-23 16:21:41 +00:00
Simon Michael
48460b0130 fix missing chart regression (#72) 2012-01-03 13:00:28 +00:00
Simon Michael
03359b48d3 web: prevent flot js error which broke add form fields after adding a transaction (#72) 2012-01-03 12:14:22 +00:00
Simon Michael
7f60e3504c web: fix $ quoting 2012-01-03 10:46:39 +00:00
Simon Michael
fd22dde57b web: needed to escape literal dollar signs in hamlet templates 2012-01-02 13:19:12 +00:00