feeds.views_default.inc 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. <?php
  2. /**
  3. * @file
  4. * Default view definitions for Feeds.
  5. */
  6. /**
  7. * Implementation of hook_views_default_views().
  8. */
  9. function feeds_views_default_views() {
  10. $views = array();
  11. $view = new view();
  12. $view->name = 'feeds_log';
  13. $view->description = 'Feeds log displays for overview, standalone importers and feed nodes.';
  14. $view->tag = 'Feeds';
  15. $view->base_table = 'feeds_log';
  16. $view->human_name = 'Feeds log';
  17. $view->core = 0;
  18. $view->api_version = '3.0';
  19. $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  20. /* Display: Defaults */
  21. $handler = $view->new_display('default', 'Defaults', 'default');
  22. $handler->display->display_options['use_more_always'] = FALSE;
  23. $handler->display->display_options['access']['type'] = 'perm';
  24. $handler->display->display_options['access']['perm'] = 'administer feeds';
  25. $handler->display->display_options['cache']['type'] = 'none';
  26. $handler->display->display_options['query']['type'] = 'views_query';
  27. $handler->display->display_options['exposed_form']['type'] = 'basic';
  28. $handler->display->display_options['pager']['type'] = 'full';
  29. $handler->display->display_options['pager']['options']['items_per_page'] = '50';
  30. $handler->display->display_options['pager']['options']['offset'] = '0';
  31. $handler->display->display_options['pager']['options']['id'] = '0';
  32. $handler->display->display_options['pager']['options']['quantity'] = '9';
  33. $handler->display->display_options['style_plugin'] = 'table';
  34. $handler->display->display_options['style_options']['columns'] = array(
  35. 'log_time' => 'log_time',
  36. 'request_time' => 'request_time',
  37. 'message' => 'message',
  38. 'severity' => 'severity',
  39. 'importer_name' => 'importer_name',
  40. 'title' => 'title',
  41. );
  42. $handler->display->display_options['style_options']['default'] = '-1';
  43. $handler->display->display_options['style_options']['info'] = array(
  44. 'log_time' => array(
  45. 'sortable' => 0,
  46. 'default_sort_order' => 'asc',
  47. 'align' => '',
  48. 'separator' => '',
  49. 'empty_column' => 0,
  50. ),
  51. 'request_time' => array(
  52. 'sortable' => 0,
  53. 'default_sort_order' => 'asc',
  54. 'align' => '',
  55. 'separator' => '',
  56. 'empty_column' => 0,
  57. ),
  58. 'message' => array(
  59. 'align' => '',
  60. 'separator' => '',
  61. 'empty_column' => 0,
  62. ),
  63. 'severity' => array(
  64. 'align' => '',
  65. 'separator' => '',
  66. 'empty_column' => 0,
  67. ),
  68. 'importer_name' => array(
  69. 'align' => '',
  70. 'separator' => '',
  71. 'empty_column' => 0,
  72. ),
  73. 'title' => array(
  74. 'sortable' => 0,
  75. 'default_sort_order' => 'asc',
  76. 'align' => '',
  77. 'separator' => '',
  78. 'empty_column' => 0,
  79. ),
  80. );
  81. /* No results behavior: Global: Text area */
  82. $handler->display->display_options['empty']['area']['id'] = 'area';
  83. $handler->display->display_options['empty']['area']['table'] = 'views';
  84. $handler->display->display_options['empty']['area']['field'] = 'area';
  85. $handler->display->display_options['empty']['area']['empty'] = TRUE;
  86. $handler->display->display_options['empty']['area']['content'] = 'There are no log messages.';
  87. $handler->display->display_options['empty']['area']['format'] = 'plain_text';
  88. /* Field: Feeds log: Log time */
  89. $handler->display->display_options['fields']['log_time']['id'] = 'log_time';
  90. $handler->display->display_options['fields']['log_time']['table'] = 'feeds_log';
  91. $handler->display->display_options['fields']['log_time']['field'] = 'log_time';
  92. $handler->display->display_options['fields']['log_time']['date_format'] = 'custom';
  93. $handler->display->display_options['fields']['log_time']['custom_date_format'] = 'Y-m-d H:i:s';
  94. /* Field: Feeds log: Request time */
  95. $handler->display->display_options['fields']['request_time']['id'] = 'request_time';
  96. $handler->display->display_options['fields']['request_time']['table'] = 'feeds_log';
  97. $handler->display->display_options['fields']['request_time']['field'] = 'request_time';
  98. $handler->display->display_options['fields']['request_time']['date_format'] = 'custom';
  99. $handler->display->display_options['fields']['request_time']['custom_date_format'] = 'Y-m-d H:i:s';
  100. /* Field: Feeds log: Log message */
  101. $handler->display->display_options['fields']['message']['id'] = 'message';
  102. $handler->display->display_options['fields']['message']['table'] = 'feeds_log';
  103. $handler->display->display_options['fields']['message']['field'] = 'message';
  104. $handler->display->display_options['fields']['message']['label'] = 'Message';
  105. /* Field: Feeds log: Severity */
  106. $handler->display->display_options['fields']['severity']['id'] = 'severity';
  107. $handler->display->display_options['fields']['severity']['table'] = 'feeds_log';
  108. $handler->display->display_options['fields']['severity']['field'] = 'severity';
  109. /* Sort criterion: Feeds log: Log id */
  110. $handler->display->display_options['sorts']['flid']['id'] = 'flid';
  111. $handler->display->display_options['sorts']['flid']['table'] = 'feeds_log';
  112. $handler->display->display_options['sorts']['flid']['field'] = 'flid';
  113. $handler->display->display_options['sorts']['flid']['order'] = 'DESC';
  114. /* Contextual filter: Feeds log: Importer id */
  115. $handler->display->display_options['arguments']['id']['id'] = 'id';
  116. $handler->display->display_options['arguments']['id']['table'] = 'feeds_log';
  117. $handler->display->display_options['arguments']['id']['field'] = 'id';
  118. $handler->display->display_options['arguments']['id']['default_action'] = 'empty';
  119. $handler->display->display_options['arguments']['id']['default_argument_type'] = 'fixed';
  120. $handler->display->display_options['arguments']['id']['summary']['number_of_records'] = '0';
  121. $handler->display->display_options['arguments']['id']['summary']['format'] = 'default_summary';
  122. $handler->display->display_options['arguments']['id']['summary_options']['items_per_page'] = '25';
  123. $handler->display->display_options['arguments']['id']['specify_validation'] = TRUE;
  124. $handler->display->display_options['arguments']['id']['limit'] = '0';
  125. /* Filter criterion: Feeds log: Feed node id */
  126. $handler->display->display_options['filters']['feed_nid']['id'] = 'feed_nid';
  127. $handler->display->display_options['filters']['feed_nid']['table'] = 'feeds_log';
  128. $handler->display->display_options['filters']['feed_nid']['field'] = 'feed_nid';
  129. $handler->display->display_options['filters']['feed_nid']['value']['value'] = '0';
  130. /* Filter criterion: Feeds log: Severity */
  131. $handler->display->display_options['filters']['severity']['id'] = 'severity';
  132. $handler->display->display_options['filters']['severity']['table'] = 'feeds_log';
  133. $handler->display->display_options['filters']['severity']['field'] = 'severity';
  134. $handler->display->display_options['filters']['severity']['exposed'] = TRUE;
  135. $handler->display->display_options['filters']['severity']['expose']['operator_id'] = 'severity_op';
  136. $handler->display->display_options['filters']['severity']['expose']['label'] = 'Severity';
  137. $handler->display->display_options['filters']['severity']['expose']['operator'] = 'severity_op';
  138. $handler->display->display_options['filters']['severity']['expose']['identifier'] = 'severity';
  139. /* Display: Standalone importer page */
  140. $handler = $view->new_display('page', 'Standalone importer page', 'page_1');
  141. $handler->display->display_options['defaults']['hide_admin_links'] = FALSE;
  142. $handler->display->display_options['path'] = 'import/%/log';
  143. $handler->display->display_options['menu']['type'] = 'tab';
  144. $handler->display->display_options['menu']['title'] = 'Log';
  145. $handler->display->display_options['menu']['weight'] = '0';
  146. $handler->display->display_options['menu']['context'] = 0;
  147. /* Display: Feed node page */
  148. $handler = $view->new_display('page', 'Feed node page', 'page_2');
  149. $handler->display->display_options['defaults']['hide_admin_links'] = FALSE;
  150. $handler->display->display_options['defaults']['arguments'] = FALSE;
  151. /* Contextual filter: Feeds log: Feed node id */
  152. $handler->display->display_options['arguments']['feed_nid']['id'] = 'feed_nid';
  153. $handler->display->display_options['arguments']['feed_nid']['table'] = 'feeds_log';
  154. $handler->display->display_options['arguments']['feed_nid']['field'] = 'feed_nid';
  155. $handler->display->display_options['arguments']['feed_nid']['default_action'] = 'not found';
  156. $handler->display->display_options['arguments']['feed_nid']['default_argument_type'] = 'fixed';
  157. $handler->display->display_options['arguments']['feed_nid']['summary']['number_of_records'] = '0';
  158. $handler->display->display_options['arguments']['feed_nid']['summary']['format'] = 'default_summary';
  159. $handler->display->display_options['arguments']['feed_nid']['summary_options']['items_per_page'] = '25';
  160. $handler->display->display_options['arguments']['feed_nid']['specify_validation'] = TRUE;
  161. $handler->display->display_options['arguments']['feed_nid']['validate']['type'] = 'feed_nid';
  162. $handler->display->display_options['defaults']['filter_groups'] = FALSE;
  163. $handler->display->display_options['defaults']['filters'] = FALSE;
  164. /* Filter criterion: Feeds log: Severity */
  165. $handler->display->display_options['filters']['severity']['id'] = 'severity';
  166. $handler->display->display_options['filters']['severity']['table'] = 'feeds_log';
  167. $handler->display->display_options['filters']['severity']['field'] = 'severity';
  168. $handler->display->display_options['filters']['severity']['exposed'] = TRUE;
  169. $handler->display->display_options['filters']['severity']['expose']['operator_id'] = 'severity_op';
  170. $handler->display->display_options['filters']['severity']['expose']['label'] = 'Severity';
  171. $handler->display->display_options['filters']['severity']['expose']['operator'] = 'severity_op';
  172. $handler->display->display_options['filters']['severity']['expose']['identifier'] = 'severity';
  173. $handler->display->display_options['path'] = 'node/%/log';
  174. $handler->display->display_options['menu']['type'] = 'tab';
  175. $handler->display->display_options['menu']['title'] = 'Log';
  176. $handler->display->display_options['menu']['weight'] = '12';
  177. $handler->display->display_options['menu']['context'] = 0;
  178. /* Display: All entries */
  179. $handler = $view->new_display('page', 'All entries', 'page_3');
  180. $handler->display->display_options['defaults']['title'] = FALSE;
  181. $handler->display->display_options['title'] = 'Feeds log';
  182. $handler->display->display_options['defaults']['hide_admin_links'] = FALSE;
  183. $handler->display->display_options['defaults']['relationships'] = FALSE;
  184. /* Relationship: Feeds log: Feed node */
  185. $handler->display->display_options['relationships']['feed_nid']['id'] = 'feed_nid';
  186. $handler->display->display_options['relationships']['feed_nid']['table'] = 'feeds_log';
  187. $handler->display->display_options['relationships']['feed_nid']['field'] = 'feed_nid';
  188. $handler->display->display_options['defaults']['fields'] = FALSE;
  189. /* Field: Feeds log: Log time */
  190. $handler->display->display_options['fields']['log_time']['id'] = 'log_time';
  191. $handler->display->display_options['fields']['log_time']['table'] = 'feeds_log';
  192. $handler->display->display_options['fields']['log_time']['field'] = 'log_time';
  193. $handler->display->display_options['fields']['log_time']['date_format'] = 'custom';
  194. $handler->display->display_options['fields']['log_time']['custom_date_format'] = 'Y-m-d H:i:s';
  195. /* Field: Feeds log: Request time */
  196. $handler->display->display_options['fields']['request_time']['id'] = 'request_time';
  197. $handler->display->display_options['fields']['request_time']['table'] = 'feeds_log';
  198. $handler->display->display_options['fields']['request_time']['field'] = 'request_time';
  199. $handler->display->display_options['fields']['request_time']['date_format'] = 'custom';
  200. $handler->display->display_options['fields']['request_time']['custom_date_format'] = 'Y-m-d H:i:s';
  201. /* Field: Feeds log: Log message */
  202. $handler->display->display_options['fields']['message']['id'] = 'message';
  203. $handler->display->display_options['fields']['message']['table'] = 'feeds_log';
  204. $handler->display->display_options['fields']['message']['field'] = 'message';
  205. $handler->display->display_options['fields']['message']['label'] = 'Message';
  206. /* Field: Feeds log: Severity */
  207. $handler->display->display_options['fields']['severity']['id'] = 'severity';
  208. $handler->display->display_options['fields']['severity']['table'] = 'feeds_log';
  209. $handler->display->display_options['fields']['severity']['field'] = 'severity';
  210. /* Field: Feeds log: Importer name */
  211. $handler->display->display_options['fields']['importer_name']['id'] = 'importer_name';
  212. $handler->display->display_options['fields']['importer_name']['table'] = 'feeds_log';
  213. $handler->display->display_options['fields']['importer_name']['field'] = 'importer_name';
  214. $handler->display->display_options['fields']['importer_name']['label'] = 'Importer';
  215. $handler->display->display_options['fields']['importer_name']['link'] = '2';
  216. /* Field: Content: Title */
  217. $handler->display->display_options['fields']['title']['id'] = 'title';
  218. $handler->display->display_options['fields']['title']['table'] = 'node';
  219. $handler->display->display_options['fields']['title']['field'] = 'title';
  220. $handler->display->display_options['fields']['title']['relationship'] = 'feed_nid';
  221. $handler->display->display_options['fields']['title']['label'] = 'Feed node';
  222. $handler->display->display_options['fields']['title']['alter']['max_length'] = '40';
  223. $handler->display->display_options['fields']['title']['alter']['trim'] = TRUE;
  224. $handler->display->display_options['defaults']['arguments'] = FALSE;
  225. $handler->display->display_options['defaults']['filter_groups'] = FALSE;
  226. $handler->display->display_options['defaults']['filters'] = FALSE;
  227. /* Filter criterion: Feeds log: Severity */
  228. $handler->display->display_options['filters']['severity']['id'] = 'severity';
  229. $handler->display->display_options['filters']['severity']['table'] = 'feeds_log';
  230. $handler->display->display_options['filters']['severity']['field'] = 'severity';
  231. $handler->display->display_options['filters']['severity']['exposed'] = TRUE;
  232. $handler->display->display_options['filters']['severity']['expose']['operator_id'] = 'severity_op';
  233. $handler->display->display_options['filters']['severity']['expose']['label'] = 'Severity';
  234. $handler->display->display_options['filters']['severity']['expose']['operator'] = 'severity_op';
  235. $handler->display->display_options['filters']['severity']['expose']['identifier'] = 'severity';
  236. $handler->display->display_options['path'] = 'admin/reports/feeds';
  237. $handler->display->display_options['menu']['type'] = 'normal';
  238. $handler->display->display_options['menu']['title'] = 'Feeds log';
  239. $handler->display->display_options['menu']['description'] = 'Review log messages of imports and subscriptions to feeds.';
  240. $handler->display->display_options['menu']['weight'] = '0';
  241. $handler->display->display_options['menu']['name'] = 'management';
  242. $handler->display->display_options['menu']['context'] = 0;
  243. $translatables['feeds_log'] = array(
  244. t('Defaults'),
  245. t('more'),
  246. t('Apply'),
  247. t('Reset'),
  248. t('Sort by'),
  249. t('Asc'),
  250. t('Desc'),
  251. t('Items per page'),
  252. t('- All -'),
  253. t('Offset'),
  254. t('« first'),
  255. t('‹ previous'),
  256. t('next ›'),
  257. t('last »'),
  258. t('There are no log messages.'),
  259. t('Log time'),
  260. t('Request time'),
  261. t('Message'),
  262. t('Severity'),
  263. t('Standalone importer page'),
  264. t('Feed node page'),
  265. t('All entries'),
  266. t('Feeds log'),
  267. t('Feed node'),
  268. t('Importer'),
  269. );
  270. $views[$view->name] = $view;
  271. return $views;
  272. }