You are here

function elasticsearch_watchdog_settings in Elasticsearch Connector 7.5

Same name and namespace in other branches
  1. 7 modules/elasticsearch_watchdog/elasticsearch_watchdog.admin.inc \elasticsearch_watchdog_settings()
  2. 7.2 modules/elasticsearch_watchdog/elasticsearch_watchdog.admin.inc \elasticsearch_watchdog_settings()

Building a settings form for the Elasticsearch watchdog functionality.

Return value

array Settings form

1 string reference to 'elasticsearch_watchdog_settings'
elasticsearch_watchdog_menu in modules/elasticsearch_watchdog/elasticsearch_watchdog.module
Implements hook_menu().

File

modules/elasticsearch_watchdog/elasticsearch_watchdog.admin.inc, line 11
Created on Jan 06, 2014

Code

function elasticsearch_watchdog_settings() {
  $form = array();
  $form['#old_cluster_id'] = variable_get('elasticsearch_watchdog_cluster_id', array());
  $form['elasticsearch_watchdog_cluster_id'] = array(
    '#type' => 'ec_index',
    '#title' => t('Select cluster'),
    '#required' => TRUE,
    '#default_value' => variable_get('elasticsearch_watchdog_cluster_id', array()),
    '#description' => t('Select the settings in order to be able to hold the logs.'),
  );
  $form['elasticsearch_watchdog_view_additional_indexes'] = array(
    '#type' => 'textfield',
    '#title' => t('Additional indexes to monitor'),
    '#required' => FALSE,
    '#default_value' => variable_get('elasticsearch_watchdog_view_additional_indexes', ''),
    '#description' => t('Comma separated list of watchdog indexes you want to monitor.'),
  );
  $form['#validate'] = array(
    'elasticsearch_watchdog_settings_validate',
  );
  return system_settings_form($form);
}