Skip to content

Commit

Permalink
add filters to mock report
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahd93 committed Feb 12, 2021
1 parent 944eed3 commit 7e695f7
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions gsa/src/web/pages/reports/__mocks__/mockreport.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,25 @@ const error2 = {
},
};

// Filters

const filters = {
filter: ['High', 'Medium', 'Low'],
keywords: {
keyword: [
{column: 'apply_overrides', relation: '=', value: '0'},
{column: 'levels', relation: '=', value: 'hml'},
{column: 'rows', relation: '=', value: '100'},
{column: 'min_qod', relation: '=', value: '70'},
{column: 'first', relation: '=', value: '1'},
{column: 'sort-reverse', relation: '=', value: 'severity'},
],
},
term:
'apply_overrides=0 levels=hml rows=100 min_qod=70 first=1 sort-reverse=severity',
_id: '0',
};

export const getMockReport = () => {
const report = {
_id: '1234',
Expand Down Expand Up @@ -276,6 +295,7 @@ export const getMockReport = () => {
full: 10.0,
filtered: 10.0,
},
filters: filters,
};

const entity = Report.fromElement({
Expand Down

0 comments on commit 7e695f7

Please sign in to comment.