View source
<?php
require_once drupal_get_path('module', 'statspro') . '/statspro_settings.inc';
function statspro_log() {
$view = views_new_view();
$view->name = 'statspro_log';
$view->description = 'Error messages and warnings';
$view->tag = 'Statistics Pro';
$view->view_php = '';
$view->base_table = 'statspro';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE;
$handler = $view
->new_display('default', 'Defaults', 'default');
$handler
->override_option('fields', array(
'day' => array(
'label' => 'Date',
'date_format' => 'custom',
'custom_date_format' => 'd. F Y',
'exclude' => 0,
'id' => 'day',
'table' => 'statspro',
'field' => 'day',
'relationship' => 'none',
),
'error' => array(
'label' => 'Errors',
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'error',
'table' => 'statspro',
'field' => 'error',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
'display_mode' => 'graph',
'graph_size' => '350',
),
'error_1' => array(
'label' => 'Trend',
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'error_1',
'table' => 'statspro',
'field' => 'error',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
'display_mode' => 'trend',
'graph_size' => '',
),
'error_2' => array(
'label' => 'Amount',
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'error_2',
'table' => 'statspro',
'field' => 'error',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
'display_mode' => 'text',
'graph_size' => '',
),
));
$handler
->override_option('sorts', array(
'day' => array(
'order' => 'DESC',
'id' => 'day',
'table' => 'statspro',
'field' => 'day',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
));
$handler
->override_option('filters', array(
'error' => array(
'operator' => '>',
'value' => array(
'value' => '0',
'min' => '',
'max' => '',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'error',
'table' => 'statspro',
'field' => 'error',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
));
$handler
->override_option('access', array(
'type' => 'perm',
'perm' => 'access statistics pro reports',
));
$handler
->override_option('cache', array(
'type' => 'none',
));
$handler
->override_option('title', 'Statistics Pro');
$handler
->override_option('header', 'Overview for error messages.');
$handler
->override_option('header_format', '1');
$handler
->override_option('header_empty', 0);
$handler
->override_option('use_ajax', TRUE);
$handler
->override_option('use_pager', '1');
$handler
->override_option('style_plugin', 'table');
$handler
->override_option('style_options', array(
'grouping' => '',
'override' => 1,
'sticky' => 0,
'order' => 'desc',
'columns' => array(
'day' => 'day',
'error' => 'error',
'error_1' => 'error_1',
'error_2' => 'error_2',
),
'info' => array(
'day' => array(
'sortable' => 1,
'separator' => '',
),
'error' => array(
'sortable' => 0,
'separator' => '',
),
'error_1' => array(
'sortable' => 0,
'separator' => '',
),
'error_2' => array(
'sortable' => 1,
'separator' => '',
),
),
'default' => 'day',
));
$handler = $view
->new_display('page', 'All alerts', 'page_1');
$handler
->override_option('fields', array(
'day' => array(
'label' => 'Date',
'date_format' => 'custom',
'custom_date_format' => 'd. F Y',
'exclude' => 0,
'id' => 'day',
'table' => 'statspro',
'field' => 'day',
'relationship' => 'none',
),
'alert' => array(
'label' => 'Alerts',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'alert',
'table' => 'statspro',
'field' => 'alert',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'display_mode' => 'text',
'graph_size' => '350',
),
'alert_1' => array(
'label' => 'Trend',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'alert_1',
'table' => 'statspro',
'field' => 'alert',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'display_mode' => 'trend',
'graph_size' => '',
),
'alert_2' => array(
'label' => 'Amount',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'alert_2',
'table' => 'statspro',
'field' => 'alert',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'display_mode' => 'text',
'graph_size' => '',
),
));
$handler
->override_option('filters', array());
$handler
->override_option('header', 'Alert messages.');
$handler
->override_option('path', 'admin/reports/statspro/log');
$handler
->override_option('menu', array(
'type' => 'tab',
'title' => 'Logs',
'description' => '',
'weight' => '0',
'name' => 'navigation',
));
$handler
->override_option('tab_options', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
'name' => 'navigation',
));
$handler = $view
->new_display('attachment', 'Alerts presented to authenticated users', 'attachment_1');
$handler
->override_option('fields', array(
'day' => array(
'label' => 'Date',
'date_format' => 'custom',
'custom_date_format' => 'd. F Y',
'exclude' => 0,
'id' => 'day',
'table' => 'statspro',
'field' => 'day',
'relationship' => 'none',
),
'ualert' => array(
'label' => 'Alerts',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => ',.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'ualert',
'table' => 'statspro',
'field' => 'ualert',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'display_mode' => 'text',
'graph_size' => '350',
),
'ualert_1' => array(
'label' => 'Trend',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'ualert_1',
'table' => 'statspro',
'field' => 'ualert',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'display_mode' => 'text',
'graph_size' => '',
),
'ualert_2' => array(
'label' => 'Amount',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'ualert_2',
'table' => 'statspro',
'field' => 'ualert',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'display_mode' => 'text',
'graph_size' => '',
),
));
$handler
->override_option('filters', array());
$handler
->override_option('header', 'Alerts presented to authenticated users');
$handler
->override_option('attachment_position', 'after');
$handler
->override_option('inherit_arguments', TRUE);
$handler
->override_option('inherit_exposed_filters', FALSE);
$handler
->override_option('inherit_pager', FALSE);
$handler
->override_option('render_pager', TRUE);
$handler
->override_option('displays', array(
'page_1' => 'page_1',
'default' => 0,
));
$handler = $view
->new_display('attachment', 'All critical condition messages', 'attachment_2');
$handler
->override_option('fields', array(
'day' => array(
'label' => 'Date',
'date_format' => 'custom',
'custom_date_format' => 'd. F Y',
'exclude' => 0,
'id' => 'day',
'table' => 'statspro',
'field' => 'day',
'relationship' => 'none',
),
'critical' => array(
'label' => 'Critical conditions',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'critical',
'table' => 'statspro',
'field' => 'critical',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'display_mode' => 'text',
'graph_size' => '350',
),
'critical_1' => array(
'label' => 'Trend',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'critical_1',
'table' => 'statspro',
'field' => 'critical',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'display_mode' => 'text',
'graph_size' => '',
),
'critical_2' => array(
'label' => 'Amount',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'critical_2',
'table' => 'statspro',
'field' => 'critical',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'display_mode' => 'text',
'graph_size' => '',
),
));
$handler
->override_option('filters', array());
$handler
->override_option('header', 'Critical condition messages.');
$handler
->override_option('attachment_position', 'after');
$handler
->override_option('inherit_arguments', TRUE);
$handler
->override_option('inherit_exposed_filters', FALSE);
$handler
->override_option('inherit_pager', FALSE);
$handler
->override_option('render_pager', TRUE);
$handler
->override_option('displays', array(
'page_1' => 'page_1',
'default' => 0,
));
$handler = $view
->new_display('attachment', 'Critical condition messages presented to authenticated users', 'attachment_3');
$handler
->override_option('fields', array(
'day' => array(
'label' => 'Date',
'date_format' => 'custom',
'custom_date_format' => 'd. F Y',
'exclude' => 0,
'id' => 'day',
'table' => 'statspro',
'field' => 'day',
'relationship' => 'none',
),
'ucritical' => array(
'label' => 'Critical conditions',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'ucritical',
'table' => 'statspro',
'field' => 'ucritical',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'display_mode' => 'text',
'graph_size' => '350',
),
'ucritical_1' => array(
'label' => 'Trend',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'ucritical_1',
'table' => 'statspro',
'field' => 'ucritical',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'display_mode' => 'text',
'graph_size' => '',
),
'ucritical_2' => array(
'label' => 'Amount',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'ucritical_2',
'table' => 'statspro',
'field' => 'ucritical',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'display_mode' => 'text',
'graph_size' => '',
),
));
$handler
->override_option('filters', array());
$handler
->override_option('header', 'Critical condition messages presented to authenticated users');
$handler
->override_option('attachment_position', 'after');
$handler
->override_option('inherit_arguments', TRUE);
$handler
->override_option('inherit_exposed_filters', FALSE);
$handler
->override_option('inherit_pager', FALSE);
$handler
->override_option('render_pager', TRUE);
$handler
->override_option('displays', array(
'page_1' => 'page_1',
'default' => 0,
));
$handler = $view
->new_display('attachment', 'All emergency messages', 'attachment_4');
$handler
->override_option('fields', array(
'day' => array(
'label' => 'Date',
'date_format' => 'custom',
'custom_date_format' => 'd. F Y',
'exclude' => 0,
'id' => 'day',
'table' => 'statspro',
'field' => 'day',
'relationship' => 'none',
),
'emergency' => array(
'label' => 'Emergencies',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'emergency',
'table' => 'statspro',
'field' => 'emergency',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'display_mode' => 'text',
'graph_size' => '350',
),
'emergency_1' => array(
'label' => 'Trend',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'emergency_1',
'table' => 'statspro',
'field' => 'emergency',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'display_mode' => 'text',
'graph_size' => '',
),
'emergency_2' => array(
'label' => 'Amount',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'emergency_2',
'table' => 'statspro',
'field' => 'emergency',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'display_mode' => 'text',
'graph_size' => '',
),
));
$handler
->override_option('filters', array());
$handler
->override_option('header', 'Emergency messages');
$handler
->override_option('attachment_position', 'after');
$handler
->override_option('inherit_arguments', TRUE);
$handler
->override_option('inherit_exposed_filters', FALSE);
$handler
->override_option('inherit_pager', FALSE);
$handler
->override_option('render_pager', TRUE);
$handler
->override_option('displays', array(
'page_1' => 'page_1',
'default' => 0,
));
$handler = $view
->new_display('attachment', 'Emergency messages presented to authenticated users', 'attachment_5');
$handler
->override_option('fields', array(
'day' => array(
'label' => 'Date',
'date_format' => 'custom',
'custom_date_format' => 'd. F Y',
'exclude' => 0,
'id' => 'day',
'table' => 'statspro',
'field' => 'day',
'relationship' => 'none',
),
'uemergency' => array(
'label' => 'Emergencies',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'uemergency',
'table' => 'statspro',
'field' => 'uemergency',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'display_mode' => 'text',
'graph_size' => '350',
),
'uemergency_1' => array(
'label' => 'Trend',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'uemergency_1',
'table' => 'statspro',
'field' => 'uemergency',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'display_mode' => 'text',
'graph_size' => '',
),
'uemergency_2' => array(
'label' => 'Amount',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'uemergency_2',
'table' => 'statspro',
'field' => 'uemergency',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'display_mode' => 'text',
'graph_size' => '',
),
));
$handler
->override_option('filters', array());
$handler
->override_option('header', 'Emergency messages presented to authenticated users');
$handler
->override_option('attachment_position', 'after');
$handler
->override_option('inherit_arguments', TRUE);
$handler
->override_option('inherit_exposed_filters', FALSE);
$handler
->override_option('inherit_pager', FALSE);
$handler
->override_option('render_pager', TRUE);
$handler
->override_option('displays', array(
'page_1' => 'page_1',
'default' => 0,
));
$handler = $view
->new_display('attachment', 'All error messages', 'attachment_6');
$handler
->override_option('filters', array());
$handler
->override_option('header', 'All error messages');
$handler
->override_option('attachment_position', 'after');
$handler
->override_option('inherit_arguments', TRUE);
$handler
->override_option('inherit_exposed_filters', FALSE);
$handler
->override_option('inherit_pager', FALSE);
$handler
->override_option('render_pager', TRUE);
$handler
->override_option('displays', array(
'page_1' => 'page_1',
'default' => 0,
));
$handler = $view
->new_display('attachment', 'Errors presented to authenticated users', 'attachment_7');
$handler
->override_option('fields', array(
'day' => array(
'label' => 'Date',
'date_format' => 'custom',
'custom_date_format' => 'd. F Y',
'exclude' => 0,
'id' => 'day',
'table' => 'statspro',
'field' => 'day',
'relationship' => 'none',
),
'uerror' => array(
'label' => 'Errors, users',
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'uerror',
'table' => 'statspro',
'field' => 'uerror',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'display_mode' => 'graph',
'graph_size' => '350',
),
'uerror_1' => array(
'label' => 'Trend',
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'uerror_1',
'table' => 'statspro',
'field' => 'uerror',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'display_mode' => 'trend',
'graph_size' => '',
),
'uerror_2' => array(
'label' => 'Amount',
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'uerror_2',
'table' => 'statspro',
'field' => 'uerror',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'display_mode' => 'text',
'graph_size' => '',
),
));
$handler
->override_option('filters', array());
$handler
->override_option('header', 'Error messages presented to authenticated users');
$handler
->override_option('style_options', array(
'grouping' => '',
'override' => 1,
'sticky' => 0,
'order' => 'desc',
'columns' => array(
'day' => 'day',
'uerror' => 'uerror',
'uerror_1' => 'uerror_1',
'uerror_2' => 'uerror_2',
),
'info' => array(
'day' => array(
'sortable' => 1,
'separator' => '',
),
'uerror' => array(
'sortable' => 0,
'separator' => '',
),
'uerror_1' => array(
'sortable' => 0,
'separator' => '',
),
'uerror_2' => array(
'sortable' => 1,
'separator' => '',
),
),
'default' => 'day',
));
$handler
->override_option('attachment_position', 'after');
$handler
->override_option('inherit_arguments', TRUE);
$handler
->override_option('inherit_exposed_filters', FALSE);
$handler
->override_option('inherit_pager', FALSE);
$handler
->override_option('render_pager', TRUE);
$handler
->override_option('displays', array(
'page_1' => 'page_1',
'default' => 0,
));
$handler = $view
->new_display('attachment', 'All warnings', 'attachment_8');
$handler
->override_option('fields', array(
'day' => array(
'label' => 'Date',
'date_format' => 'custom',
'custom_date_format' => 'd. F Y',
'exclude' => 0,
'id' => 'day',
'table' => 'statspro',
'field' => 'day',
'relationship' => 'none',
),
'warning' => array(
'label' => 'Warnings',
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'warning',
'table' => 'statspro',
'field' => 'warning',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'display_mode' => 'graph',
'graph_size' => '350',
),
'warning_1' => array(
'label' => 'Trend',
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'warning_1',
'table' => 'statspro',
'field' => 'warning',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'display_mode' => 'trend',
'graph_size' => '',
),
'warning_2' => array(
'label' => 'Amount',
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'warning_2',
'table' => 'statspro',
'field' => 'warning',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'display_mode' => 'text',
'graph_size' => '',
),
));
$handler
->override_option('filters', array());
$handler
->override_option('header', 'Overview for warnings.');
$handler
->override_option('style_options', array(
'grouping' => '',
'override' => 1,
'sticky' => 0,
'order' => 'desc',
'columns' => array(
'day' => 'day',
'warning' => 'warning',
'warning_1' => 'warning_1',
'warning_2' => 'warning_2',
),
'info' => array(
'day' => array(
'sortable' => 1,
'separator' => '',
),
'warning' => array(
'sortable' => 0,
'separator' => '',
),
'warning_1' => array(
'sortable' => 0,
'separator' => '',
),
'warning_2' => array(
'sortable' => 1,
'separator' => '',
),
),
'default' => 'day',
));
$handler
->override_option('attachment_position', 'after');
$handler
->override_option('inherit_arguments', TRUE);
$handler
->override_option('inherit_exposed_filters', FALSE);
$handler
->override_option('inherit_pager', FALSE);
$handler
->override_option('render_pager', TRUE);
$handler
->override_option('displays', array(
'page_1' => 'page_1',
'default' => 0,
));
$handler = $view
->new_display('attachment', 'Warnings presented to authenticated users', 'attachment_9');
$handler
->override_option('fields', array(
'day' => array(
'label' => 'Date',
'date_format' => 'custom',
'custom_date_format' => 'd. F Y',
'exclude' => 0,
'id' => 'day',
'table' => 'statspro',
'field' => 'day',
'relationship' => 'none',
),
'uwarning' => array(
'label' => 'Warnings, users',
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'uwarning',
'table' => 'statspro',
'field' => 'uwarning',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'display_mode' => 'graph',
'graph_size' => '350',
),
'uwarning_1' => array(
'label' => 'Trend',
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'uwarning_1',
'table' => 'statspro',
'field' => 'uwarning',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'display_mode' => 'trend',
'graph_size' => '',
),
'uwarning_2' => array(
'label' => 'Amount',
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'uwarning_2',
'table' => 'statspro',
'field' => 'uwarning',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'display_mode' => 'text',
'graph_size' => '',
),
));
$handler
->override_option('filters', array());
$handler
->override_option('header', 'Warnings presented to authenticated users');
$handler
->override_option('style_options', array(
'grouping' => '',
'override' => 1,
'sticky' => 0,
'order' => 'desc',
'columns' => array(
'day' => 'day',
'uwarning' => 'uwarning',
'uwarning_1' => 'uwarning_1',
'uwarning_2' => 'uwarning_2',
),
'info' => array(
'day' => array(
'sortable' => 1,
'separator' => '',
),
'uwarning' => array(
'sortable' => 0,
'separator' => '',
),
'uwarning_1' => array(
'sortable' => 0,
'separator' => '',
),
'uwarning_2' => array(
'sortable' => 1,
'separator' => '',
),
),
'default' => 'day',
));
$handler
->override_option('attachment_position', 'after');
$handler
->override_option('inherit_arguments', TRUE);
$handler
->override_option('inherit_exposed_filters', FALSE);
$handler
->override_option('inherit_pager', FALSE);
$handler
->override_option('render_pager', TRUE);
$handler
->override_option('displays', array(
'page_1' => 'page_1',
'default' => 0,
));
if (module_exists('views_charts')) {
$handler = $view
->new_display('attachment', 'Watchdog messages chart', 'attachment_10');
$handler
->override_option('fields', array(
'day' => array(
'label' => 'Date',
'date_format' => 'custom',
'custom_date_format' => 'd. F Y',
'exclude' => 0,
'id' => 'day',
'table' => 'statspro',
'field' => 'day',
'relationship' => 'none',
),
'alert' => array(
'label' => 'Alerts',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'alert',
'table' => 'statspro',
'field' => 'alert',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'display_mode' => 'text',
'graph_size' => '',
),
'ualert' => array(
'label' => 'Alerts for authenticated users',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'ualert',
'table' => 'statspro',
'field' => 'ualert',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'display_mode' => 'text',
'graph_size' => '',
),
'critical' => array(
'label' => 'Critical conditions',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'critical',
'table' => 'statspro',
'field' => 'critical',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'display_mode' => 'text',
'graph_size' => '',
),
'ucritical' => array(
'label' => 'Critical conditions for authenticated users',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'ucritical',
'table' => 'statspro',
'field' => 'ucritical',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'display_mode' => 'text',
'graph_size' => '',
),
'emergency' => array(
'label' => 'Emergencies',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'emergency',
'table' => 'statspro',
'field' => 'emergency',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'display_mode' => 'text',
'graph_size' => '',
),
'uemergency' => array(
'label' => 'Emergencies for authenticated users',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'uemergency',
'table' => 'statspro',
'field' => 'uemergency',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'display_mode' => 'text',
'graph_size' => '',
),
'error' => array(
'label' => 'Errors',
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'error',
'table' => 'statspro',
'field' => 'error',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
'display_mode' => 'graph',
'graph_size' => '350',
),
'uerror' => array(
'label' => 'Errors for authenticated users',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'uerror',
'table' => 'statspro',
'field' => 'uerror',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'display_mode' => 'text',
'graph_size' => '',
),
'warning' => array(
'label' => 'Warnings',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'warning',
'table' => 'statspro',
'field' => 'warning',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'display_mode' => 'text',
'graph_size' => '',
),
'uwarning' => array(
'label' => 'Warnings for authenticated users',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => '.',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'uwarning',
'table' => 'statspro',
'field' => 'uwarning',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'display_mode' => 'text',
'graph_size' => '',
),
));
$handler
->override_option('filters', array());
$handler
->override_option('header', 'Watchdog messages chart');
$handler
->override_option('style_plugin', 'charts');
$handler
->override_option('style_options', array(
'views_charts_series_fields' => array(
'alert' => 'alert',
'ualert' => 'ualert',
'critical' => 'critical',
'ucritical' => 'ucritical',
'emergency' => 'emergency',
'uemergency' => 'uemergency',
'error' => 'error',
'uerror' => 'uerror',
'warning' => 'warning',
'uwarning' => 'uwarning',
),
'views_charts_x_labels' => 'day',
'width' => '700',
'height' => '200',
'engine' => statspro_get_current_charting_option(),
'type' => array(
'amcharts' => 'line',
'bluff' => 'line',
'open-flash' => 'line',
),
'wmode' => 'window',
'y_min' => '0',
'y_legend' => '',
));
$handler
->override_option('attachment_position', 'after');
$handler
->override_option('inherit_arguments', TRUE);
$handler
->override_option('inherit_exposed_filters', FALSE);
$handler
->override_option('inherit_pager', FALSE);
$handler
->override_option('render_pager', TRUE);
$handler
->override_option('displays', array(
'page_1' => 'page_1',
'default' => 0,
));
}
return $view
->preview('page_1', array());
}