From b0abb6972043d4240b763603075f6979a69b88ef Mon Sep 17 00:00:00 2001 From: Peter Andersson Date: Tue, 3 Jul 2012 17:23:00 +0200 Subject: Make it possible to sort the HTML tables OTP-9896 Introduce java scripts in the web pages to enable sorting of table elements. --- lib/test_server/src/test_server_ctrl.erl | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) (limited to 'lib/test_server/src') diff --git a/lib/test_server/src/test_server_ctrl.erl b/lib/test_server/src/test_server_ctrl.erl index 5ed296d215..e191735a09 100644 --- a/lib/test_server/src/test_server_ctrl.erl +++ b/lib/test_server/src/test_server_ctrl.erl @@ -218,6 +218,7 @@ -define(auto_skip_color, "#FFA64D"). -define(user_skip_color, "#FF8000"). +-define(sortable_table_name, "SortableTable"). -record(state,{jobs=[],levels={1,19,10}, multiply_timetraps=1, scale_timetraps=true, @@ -1424,8 +1425,10 @@ init_tester(Mod, Func, Args, Dir, Name, {SumLev,MajLev,MinLev}, end, OkN = get(test_server_ok), FailedN = get(test_server_failed), - print(html,"TOTAL" - "~.3fs~s~p Ok, ~p Failed~s of ~p\n", + print(html,"\n\n\n" + "TOTAL" + "~.3fs~s~p Ok, ~p Failed~s of ~p\n" + "\n", [Time,SuccessStr,OkN,FailedN,SkipStr,OkN+FailedN+SkippedN]). %% timer:tc/3 @@ -1741,7 +1744,8 @@ do_test_cases(TopCases, SkipCases, test_server_sup:framework_call(report, [tests_start,{Test,N}]), {Header,Footer} = case test_server_sup:framework_call(get_html_wrapper, - [TestDescr,true,TestDir], "") of + [TestDescr,true,TestDir, + {[],[2,3,4,7,8],[1,6]}], "") of Empty when (Empty == "") ; (element(2,Empty) == "") -> put(basic_html, true), {["\n", @@ -1803,14 +1807,15 @@ do_test_cases(TopCases, SkipCases, [?suitelog_name,?coverlog_name]), print(html, "

~s

\n" ++ - xhtml("", - "
") ++ - "" ++ - "" ++ - "\n", - [print_if_known(N, {"Executing ~p test cases...\n",[N]}, + xhtml("
NumModuleGroupCaseLogTimeResultComment
", + ["
\n", + "\n"]) ++ + "" ++ + "" ++ + "\n\n\n", + [print_if_known(N, {"Executing ~p test cases..." ++ + xhtml("\n
\n", "\n
\n"),[N]}, {"",[]})]), - print(html, xhtml("
", "
")), print(major, "=cases ~p", [get(test_server_cases)]), print(major, "=user ~s", [TI#target_info.username]), @@ -1964,7 +1969,8 @@ start_minor_log_file1(Mod, Func, LogDir, AbsName) -> {Header,Footer} = case test_server_sup:framework_call(get_html_wrapper, [TestDescr,false, - filename:dirname(AbsName)], "") of + filename:dirname(AbsName), + undefined], "") of Empty when (Empty == "") ; (element(2,Empty) == "") -> put(basic_html, true), {["\n", @@ -2094,7 +2100,7 @@ html_possibly_convert(Src, SrcInfo, Dest) -> Header = case test_server_sup:framework_call(get_html_wrapper, ["Module "++Src,false, - OutDir], "") of + OutDir,undefined], "") of Empty when (Empty == "") ; (element(2,Empty) == "") -> ["\n", -- cgit v1.2.3
NumModuleGroupCaseLogTimeResultComment