diff options
author | Siri Hansen <[email protected]> | 2011-02-23 15:58:42 +0100 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2011-02-28 17:17:41 +0100 |
commit | 7405f353d3f06f2a4207f382d91435adbe9c9160 (patch) | |
tree | 8433f96ba1111df165589491774688aa067fdaee /lib/observer/src/crashdump_viewer_html.erl | |
parent | 38fc7a0eb46167a27ebac41452ecd1fb0de8803c (diff) | |
download | otp-7405f353d3f06f2a4207f382d91435adbe9c9160.tar.gz otp-7405f353d3f06f2a4207f382d91435adbe9c9160.tar.bz2 otp-7405f353d3f06f2a4207f382d91435adbe9c9160.zip |
Add shell script and .bat file to start crashdump_viewer
Since browsers no longer can provide the full path of a file selected
with a file-type input field (browse button), the input field for
loading a crashdump is now changed to a plain text input field. Since
this reduces the user-friendlyness, a shell script (and a .bat file)
has instead been added so the crashdump_viewer can be started directly
from the command line - and thus normal tab completion can be used for
selecting the crashdump file.
Usage: cdv file [ browser ]
Diffstat (limited to 'lib/observer/src/crashdump_viewer_html.erl')
-rw-r--r-- | lib/observer/src/crashdump_viewer_html.erl | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/lib/observer/src/crashdump_viewer_html.erl b/lib/observer/src/crashdump_viewer_html.erl index 0d70c9b86f..d49023f9f6 100644 --- a/lib/observer/src/crashdump_viewer_html.erl +++ b/lib/observer/src/crashdump_viewer_html.erl @@ -77,23 +77,20 @@ read_file_frame() -> read_file_frame_body() -> - Entry = - case webtool:is_localhost() of - true -> [input("TYPE=file NAME=browse SIZE=40"), - input("TYPE=hidden NAME=path")]; - false -> input("TYPE=text NAME=path SIZE=60") - end, + %% Using a plain text input field instead of a file input field + %% (e.g. <INPUT TYPE=file NAME=pathj SIZE=40">) because most + %% browsers can not forward the full path from this dialog even if + %% the browser is running on localhost (Ref 'fakepath'-problem) + Entry = input("TYPE=text NAME=path SIZE=60"), Form = form( - "NAME=read_file_form METHOD=post ACTION= \"./read_file\"", + "NAME=read_file_form METHOD=post ACTION=\"./read_file\"", table( "BORDER=0", [tr(td("COLSPAN=2","Enter file to analyse")), tr( [td(Entry), - td("ALIGN=center", - input("TYPE=submit onClick=\"path.value=browse.value;\"" - "VALUE=Ok"))])])), + td("ALIGN=center",input("TYPE=submit VALUE=Ok"))])])), table( "WIDTH=100% HEIGHT=60%", tr("VALIGN=middle", @@ -961,8 +958,7 @@ frame(Args) -> ["<FRAME ",Args, ">\n"]. start_visible_table() -> - start_table("BORDER=\"4\" CELLPADDING=\"4\" WIDTH=\"100%\""). -% start_table("BORDER=\"4\" CELLPADDING=\"4\""). + start_table("BORDER=\"4\" CELLPADDING=\"4\""). start_visible_table(ColTitles) -> [start_visible_table(), tr([th(ColTitle) || ColTitle <- ColTitles])]. |