diff options
author | Siri Hansen <[email protected]> | 2017-09-13 15:26:55 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2017-09-18 11:07:08 +0200 |
commit | 9ee5ad4f99f2540860f5acb357aac6b08d7e494e (patch) | |
tree | edcde8e08a77dd474e8275e96c71a53ee30b4510 /lib/observer/src/cdv_term_cb.erl | |
parent | ae089c72fb06b069675cbebcec10f0820cf16112 (diff) | |
download | otp-9ee5ad4f99f2540860f5acb357aac6b08d7e494e.tar.gz otp-9ee5ad4f99f2540860f5acb357aac6b08d7e494e.tar.bz2 otp-9ee5ad4f99f2540860f5acb357aac6b08d7e494e.zip |
cdv: Show progress bar while reading big data
Diffstat (limited to 'lib/observer/src/cdv_term_cb.erl')
-rw-r--r-- | lib/observer/src/cdv_term_cb.erl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/observer/src/cdv_term_cb.erl b/lib/observer/src/cdv_term_cb.erl index f206d7e4c9..24fc33267e 100644 --- a/lib/observer/src/cdv_term_cb.erl +++ b/lib/observer/src/cdv_term_cb.erl @@ -30,8 +30,11 @@ detail_pages() -> [{"Term", fun init_term_page/2}]. init_term_page(ParentWin, {Type, [Term, Tab]}) -> + observer_lib:report_progress({ok,"Expanding term"}), + observer_lib:report_progress({ok,start_pulse}), Expanded = expand(Term, true), BinSaved = expand(Term, Tab), + observer_lib:report_progress({ok,stop_pulse}), cdv_multi_wx:start_link( ParentWin, [{"Format \~p",cdv_html_wx,{Type, format_term_fun("~p",BinSaved,Tab)}}, @@ -42,11 +45,15 @@ init_term_page(ParentWin, {Type, [Term, Tab]}) -> format_term_fun(Format,Term,Tab) -> fun() -> + observer_lib:report_progress({ok,"Formatting term"}), + observer_lib:report_progress({ok,start_pulse}), try io_lib:format(Format,[Term]) of Str -> {expand, plain_html(Str), Tab} catch error:badarg -> Warning = "This term can not be formatted with " ++ Format, observer_html_lib:warning(Warning) + after + observer_lib:report_progress({ok,stop_pulse}) end end. |