anchor.diff:  %% @end
   %% ===================================================================
   %% @doc: This file contains n2o website code
  +%% The page allows for viewing online cluster monitoring.
   %% @end
   %% ===================================================================
   
  
positive.code: -include("logging.hrl").
  
  % n2o API and comet
  -export([main/0, event/1, comet_loop/2]).
  
  -define(TIME_RANGES, [<<"last 5 minutes">>, <<"last 15 minutes">>, <<"last hour">>, <<"last 24 hours">>, <<"last 7 days">>, <<"last 30 days">>, <<"last 365 days">>]).
  -define(SUMMARY_CHART_TYPES, [<<"CPU utilization">>, <<"memory usage">>, <<"network throughput">>, <<"network transfer">>, <<"Erlang ports transfer">>, <<"storage IO transfer">>]).
  -define(HOST_CHART_TYPES, [<<"CPU utilization">>, <<"memory usage">>, <<"network throughput">>, <<"network transfer">>, <<"Erlang ports transfer">>]).
  -define(GEN_SERVER_TIMEOUT, 5000).
  
  -record(page_state, {nodes, node, time_range, chart_type, charts = []}).
  -record(chart, {id, node, time_range, type, update_period}).
  
  %% main/0
  
negative.code:                 end,
                  gui_jq:update(<<"chart_type_dropdown">>, chart_type_dropdown_body(NewChartType, ChartTypes)),
                  gui_comet:flush(),
                  PageState#page_state{chart_type = NewChartType};
  
              add_chart ->
                  gui_jq:remove(<<"error_message">>),
  