Skip to content

Commit 2647892

Browse files
committed
Implement 'Save' button
- Restore some filtering functions - Replace legacy jQuery unbind/bind with off/on - Simplify the values saved to the session - Make pace actions more consistent for long running queries especially
1 parent f9c7e62 commit 2647892

File tree

3 files changed

+122
-94
lines changed

3 files changed

+122
-94
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
* feature: Support IPv4 and IPv6
3636
* feature: Support daily and hourly partitioning
3737
* feature: Run Schedules in Background
38+
* feature: Allow Saving of some Filter Information from Flowview
3839

3940
--- 2.1 ---
4041
* issue: Prepare for sunrise theme in 1.1.17

flowview.php

Lines changed: 4 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@
3636
case 'save':
3737
save_filter();
3838
break;
39+
case 'savefilter':
40+
save_filter_form();
41+
break;
3942
case 'sort_filter':
4043
sort_filter();
4144
break;
@@ -183,20 +186,8 @@ function load_session_for_filter() {
183186
function flowview_request_vars() {
184187
/* ================= input validation and session storage ================= */
185188
$filters = array(
186-
'includeif' => array(
187-
'filter' => FILTER_VALIDATE_INT,
188-
'default' => '1'
189-
),
190-
'statistics' => array(
191-
'filter' => FILTER_VALIDATE_INT,
192-
'default' => '0'
193-
),
194-
'printed' => array(
195-
'filter' => FILTER_VALIDATE_INT,
196-
'default' => '0'
197-
),
198189
'sortfield' => array(
199-
'filter' => FILTER_DEFAULT,
190+
'filter' => FILTER_VALIDATE_INT,
200191
'default' => ''
201192
),
202193
'sortvalue' => array(
@@ -217,11 +208,6 @@ function flowview_request_vars() {
217208
'filter' => FILTER_VALIDATE_INT,
218209
'default' => '1000000'
219210
),
220-
'device' => array(
221-
'filter' => FILTER_CALLBACK,
222-
'options' => array('options' => 'sanitize_search_string'),
223-
'default' => '0'
224-
),
225211
'predefined_timespan' => array(
226212
'filter' => FILTER_VALIDATE_INT,
227213
'default' => read_user_setting('default_timespan')
@@ -240,56 +226,6 @@ function flowview_request_vars() {
240226
'options' => array('options' => 'sanitize_search_string'),
241227
'default' => ''
242228
),
243-
'protocols' => array(
244-
'filter' => FILTER_VALIDATE_IS_NUMERIC_ARRAY,
245-
'default' => array()
246-
),
247-
'includeif' => array(
248-
'filter' => FILTER_VALIDATE_INT,
249-
'default' => ''
250-
),
251-
'tcpflags' => array(
252-
'filter' => FILTER_VALIDATE_IS_NUMERIC_LIST,
253-
'default' => ''
254-
),
255-
'tosfields' => array(
256-
'filter' => FILTER_VALIDATE_IS_NUMERIC_LIST,
257-
'default' => ''
258-
),
259-
'sourceip' => array(
260-
'filter' => FILTER_CALLBACK,
261-
'options' => array('options' => 'sanitize_search_string'),
262-
'default' => ''
263-
),
264-
'sourceport' => array(
265-
'filter' => FILTER_VALIDATE_IS_NUMERIC_LIST,
266-
'default' => ''
267-
),
268-
'sourceinterface' => array(
269-
'filter' => FILTER_VALIDATE_IS_NUMERIC_LIST,
270-
'default' => ''
271-
),
272-
'sourceas' => array(
273-
'filter' => FILTER_VALIDATE_IS_NUMERIC_LIST,
274-
'default' => ''
275-
),
276-
'destip' => array(
277-
'filter' => FILTER_CALLBACK,
278-
'options' => array('options' => 'sanitize_search_string'),
279-
'default' => ''
280-
),
281-
'destport' => array(
282-
'filter' => FILTER_VALIDATE_IS_NUMERIC_LIST,
283-
'default' => ''
284-
),
285-
'destinterface' => array(
286-
'filter' => FILTER_VALIDATE_IS_NUMERIC_LIST,
287-
'default' => ''
288-
),
289-
'destas' => array(
290-
'filter' => FILTER_VALIDATE_IS_NUMERIC_LIST,
291-
'default' => ''
292-
),
293229
'domains' => array(
294230
'filter' => FILTER_VALIDATE_REGEXP,
295231
'options' => array('options' => array('regexp' => '(true|false)')),
@@ -314,11 +250,6 @@ function flowview_request_vars() {
314250
'filter' => FILTER_VALIDATE_REGEXP,
315251
'options' => array('options' => array('regexp' => '(true|false)')),
316252
'default' => 'false'
317-
),
318-
'resolve' => array(
319-
'filter' => FILTER_VALIDATE_REGEXP,
320-
'options' => array('options' => array('regexp' => '(Y|N|true|false)')),
321-
'default' => 'true'
322253
)
323254
);
324255

0 commit comments

Comments
 (0)