~ubuntu-branches/debian/squeeze/erlang/squeeze

« back to all changes in this revision

Viewing changes to lib/percept/src/percept_html.erl

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-02-15 16:42:52 UTC
  • mfrom: (1.1.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20090215164252-dxpjjuq108nz4noa
Tags: 1:12.b.5-dfsg-2
Upload to unstable after lenny is released.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
        concurrency_page/3,
27
27
        process_info_page/3
28
28
        ]).
 
29
 
29
30
-export([
30
31
        value2pid/1, 
31
32
        pid2value/1, 
82
83
    load_database_content(SessionID, Env, Input),
83
84
    mod_esi:deliver(SessionID, footer()).
84
85
 
 
86
 
85
87
%%% --------------------------- %%%
86
88
%%%     Content pages           %%%
87
89
%%% --------------------------- %%%
102
104
        table_line(["Profile time:", TotalProfileTime]) ++
103
105
        table_line(["Processes:", RegisteredProcesses]) ++
104
106
        table_line(["Ports:", RegisteredPorts]) ++
105
 
%       table_line(["Active processes:", 0]) ++
106
 
%       table_line(["Average concurrency:", 0]) ++ 
107
107
        table_line(["Min. range:", Min]) ++
108
108
        table_line(["Max. range:", Max]) ++
109
109
        "</table>",
126
126
                <option disabled=true value=\""++ url_graph(Width, Height, Min, Max, []) ++"\" />Processes
127
127
                <option value=\""++ url_graph(Width, Height, Min, Max, []) ++"\" />Ports & Processes
128
128
            </select>",
129
 
            "<input type=submit value=Update>" 
 
129
            "<input type=submit value=Update>"
130
130
            ]) ++
131
131
        table_line([
132
132
            "Max:", 
133
133
            "<input name=range_max value=" ++ term2html(float(Max)) ++">",
134
134
            "",
135
 
            "<a href=/cgi-bin/percept_html/codelocation_page?range_min=" ++ term2html(Min) ++ "&range_max=" ++ term2html(Max) ++ ">Code location</a>"
 
135
            "<a href=/cgi-bin/percept_html/codelocation_page?range_min=" ++
 
136
            term2html(Min) ++ "&range_max=" ++ term2html(Max) ++ ">Code location</a>"
136
137
            ]) ++
137
138
        "</table>",
138
 
    
 
139
   
 
140
 
139
141
    MainTable = 
140
142
        "<table>" ++
141
143
        table_line([div_tag_graph(Width, Height, Min, Max, [])]) ++
183
185
        ++ "&range_max=" ++ term2html(float(Max))
184
186
        ++ "&width=" ++ term2html(float(W))
185
187
        ++ "&height=" ++ term2html(float(H)).
186
 
%url_graph(W, H, Min, Max, Pids) ->
187
 
%    PidValues = [pid2value(Pid) || Pid <- Pids],
188
 
%    PidRequests = join_strings_with(PidValues, ":"),
189
 
%    "/cgi-bin/percept_graph/graph?range_min=" ++ term2html(float(Min)) 
190
 
%       ++ "&range_max=" ++ term2html(float(Max))
191
 
%       ++ "&width=" ++ term2html(float(W))
192
 
%       ++ "&height=" ++ term2html(float(H))
193
 
%       ++ "&pids=" ++ PidRequests.
194
188
 
195
189
%%% process_info_content
196
190
 
224
218
    table_line(["<b>Arguments</b>", ArgumentString, ""]) ++ 
225
219
    table_line(["<b>Timetable</b>", TimeTable, ""]) ++
226
220
    table_line(["Parent", pid2html(I#information.parent), ""]) ++
227
 
    table_line(["Children", term2html(I#information.children), ""]) ++
 
221
    table_line(["Children", 
 
222
        lists:flatten(lists:map(
 
223
            fun(Child) ->
 
224
                pid2html(Child) ++ " "
 
225
            end, I#information.children)), ""]) ++
228
226
    "</table>",
229
227
    
230
228
    PidActivities = percept_db:select({activity, [{id, Pid}]}),