/* Copyright (c) 2010-2012, Vsevolod Stakhov * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL AUTHOR BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef ROLL_HISTORY_H_ #define ROLL_HISTORY_H_ #include "config.h" #include "mem_pool.h" /* * Roll history is a special cycled buffer for checked messages, it is designed for writing history messages * and displaying them in webui */ #define HISTORY_MAX_ID 100 #define HISTORY_MAX_SYMBOLS 200 #define HISTORY_MAX_USER 20 #define HISTORY_MAX_ROWS 200 struct worker_task; struct roll_history_row { struct timeval tv; gchar message_id[HISTORY_MAX_ID]; gchar symbols[HISTORY_MAX_SYMBOLS]; gchar user[HISTORY_MAX_USER]; #ifdef HAVE_INET_PTON struct { union { struct in_addr in4; struct in6_addr in6; } d; gboolean ipv6; gboolean has_addr; } from_addr; #else struct in_addr from_addr; #endif gsize len; guint scan_time; gint action; gdouble score; gdouble required_score; guint8 completed; }; struct roll_history { struct roll_history_row rows[HISTORY_MAX_ROWS]; gint cur_row; memory_pool_t *pool; gboolean need_lock; memory_pool_mutex_t *mtx; }; /** * Returns new roll history * @param pool pool for shared memory * @return new structure */ struct roll_history* rspamd_roll_history_new (memory_pool_t *pool); /** * Update roll history with data from task * @param history roll history object * @param task task object */ void rspamd_roll_history_update (struct roll_history *history, struct worker_task *task); /** * Load previously saved history from file * @param history roll history object * @param filename filename to load from * @return TRUE if history has been loaded */ gboolean rspamd_roll_history_load (struct roll_history *history, const gchar *filename); /** * Save history to file * @param history roll history object * @param filename filename to load from * @return TRUE if history has been saved */ gboolean rspamd_roll_history_save (struct roll_history *history, const gchar *filename); #endif /* ROLL_HISTORY_H_ */ form>
path: root/package.json
blob: 30e4f60fa3bf0392285b366e6d547f9f1ec522c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{
  "license": "MIT",
  "private": true,
  "type": "module",
  "engines": {
    "node": ">= 12.17.0"
  },
  "dependencies": {
    "@claviska/jquery-minicolors": "2.3.5",
    "@primer/octicons": "15.0.1",
    "add-asset-webpack-plugin": "2.0.1",
    "codemirror": "5.62.2",
    "css-loader": "6.2.0",
    "dropzone": "5.9.2",
    "easymde": "2.15.0",
    "esbuild-loader": "2.15.0",
    "escape-goat": "4.0.0",
    "fast-glob": "3.2.7",
    "font-awesome": "4.7.0",
    "jquery": "3.6.0",
    "jquery.are-you-sure": "1.9.0",
    "less": "4.1.1",
    "less-loader": "10.0.1",
    "license-checker-webpack-plugin": "0.2.1",
    "mermaid": "8.11.5",
    "mini-css-extract-plugin": "2.2.0",
    "monaco-editor": "0.27.0",
    "monaco-editor-webpack-plugin": "4.1.2",
    "pretty-ms": "7.0.1",
    "sortablejs": "1.14.0",
    "swagger-ui-dist": "4.0.0-beta.4",
    "tributejs": "5.1.3",
    "vue": "2.6.14",
    "vue-bar-graph": "1.3.0",
    "vue-calendar-heatmap": "0.8.4",
    "vue-loader": "15.9.8",
    "vue-template-compiler": "2.6.14",
    "webpack": "5.50.0",
    "webpack-cli": "4.8.0",
    "workbox-routing": "6.2.4",
    "workbox-strategies": "6.2.4",
    "worker-loader": "3.0.8",
    "wrap-ansi": "8.0.0"
  },
  "devDependencies": {
    "editorconfig-checker": "4.0.2",
    "eslint": "7.32.0",
    "eslint-plugin-html": "6.1.2",
    "eslint-plugin-import": "2.24.0",
    "eslint-plugin-unicorn": "35.0.0",
    "eslint-plugin-vue": "7.16.0",
    "jest": "27.0.6",
    "jest-extended": "0.11.5",
    "stylelint": "13.13.1",
    "stylelint-config-standard": "22.0.0",
    "svgo": "2.4.0",
    "updates": "12.1.0"
  },
  "browserslist": [
    "defaults",
    "not ie > 0",
    "not ie_mob > 0"
  ]
}