4
%% Copyright Ericsson AB 2010. All Rights Reserved.
6
%% The contents of this file are subject to the Erlang Public License,
7
%% Version 1.1, (the "License"); you may not use this file except in
8
%% compliance with the License. You should have received a copy of the
9
%% Erlang Public License along with this software. If not, it can be
10
%% retrieved online at http://www.erlang.org/.
12
%% Software distributed under the License is distributed on an "AS IS"
13
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
14
%% the License for the specific language governing rights and limitations
21
-module(hdlt_random_html).
24
page(SessionID, _Env, Input) ->
25
%% log("page(~p) -> deliver content-type when"
28
%% "~n Input: ~p", [self(), SessionID, Env, Input]),
29
[WorkSimStr, SzSimStr] = string:tokens(Input, [$:]),
30
WorkSim = list_to_integer(WorkSimStr),
31
SzSim = list_to_integer(SzSimStr),
32
mod_esi:deliver(SessionID, "Content-Type:text/html\r\n\r\n"),
33
mod_esi:deliver(SessionID, start("Random test page")),
34
mod_esi:deliver(SessionID, content(WorkSim, SzSim)),
35
mod_esi:deliver(SessionID, stop()),
41
<TITLE>" ++ Title ++ "</TITLE>
50
content(WorkSim, SzSim) ->
53
lists:sort([random:uniform(X) || X <- lists:seq(1, WorkSim)]),
54
lists:flatten(lists:duplicate(SzSim, "Dummy data ")).
57
%% hdlt_logger:set_name("HDLT RANDOM-HTML"),
58
%% hdlt_logger:set_level(debug),
59
%% hdlt_logger:log(F, A).