Skip to content

Commit

Permalink
Merge pull request #2023 from swaterkamp/ReportDetailsHostsTabCounts
Browse files Browse the repository at this point in the history
Fix Report details hosts tab counts flickering
  • Loading branch information
swaterkamp authored Mar 9, 2020
2 parents 38d69e1 + 4d8772d commit 1afa1a6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

### Fixed
- Fixed usage of report format %F in generateFilename() [#2021](https://github.com/greenbone/gsa/pull/2021)
- Fixed report DetailsContent counts in tabs [#2004](https://github.com/greenbone/gsa/pull/2004)
- Fixed report DetailsContent counts in tabs [#2004](https://github.com/greenbone/gsa/pull/2004) [#2023](https://github.com/greenbone/gsa/pull/2023)
- Fixed auto_delete_value of 0 for tasks and audits [#1987](https://github.com/greenbone/gsa/pull/1987)
- Fixed bulk tagging by user selection (send IDs as array) [#1985](https://github.com/greenbone/gsa/pull/1985)
- Fixed pluralizing type 'vulnerability' [#1984](https://github.com/greenbone/gsa/pull/1984)
Expand Down
2 changes: 1 addition & 1 deletion gsa/src/gmp/models/report/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ export const parseOperatingSystems = (report, filter) => {
export const parseHosts = (report, filter) => {
const {host: hosts, results, hosts: hosts_count} = report;

if (!isDefined(hosts_count)) {
if (!isDefined(hosts)) {
return emptyCollectionList(filter);
}

Expand Down
3 changes: 3 additions & 0 deletions gsa/src/web/pages/reports/__mocks__/mockdeltareport.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import {setLocale} from 'gmp/locale/lang';

import Report from 'gmp/models/report';

import {host1, host2} from './mockreport';

setLocale('en');

// Task
Expand Down Expand Up @@ -100,6 +102,7 @@ export const getMockDeltaReport = () => {
result_count: {__text: 2, full: 2, filtered: 2},
results: {result: [result1, result2]},
hosts: {count: 2},
host: [host1, host2],
};

const entity = Report.fromElement({
Expand Down
4 changes: 2 additions & 2 deletions gsa/src/web/pages/reports/__mocks__/mockreport.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ const result3 = {
};

// Hosts
const host1 = {
export const host1 = {
ip: '123.456.78.910',
asset: {_asset_id: '123'},
start: '2019-06-03T11:00:22Z',
Expand Down Expand Up @@ -153,7 +153,7 @@ const host1 = {
],
};

const host2 = {
export const host2 = {
ip: '109.876.54.321',
start: '2019-06-03T11:15:14Z',
end: '2019-06-03T11:31:23Z',
Expand Down

0 comments on commit 1afa1a6

Please sign in to comment.