Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bulk-create-target from hosts #1575

Merged
merged 2 commits into from
Aug 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
logged in [#1508](https://github.com/greenbone/gsa/pull/1508)

### Fixed
- Fixed creating target from hosts [#1575](https://github.com/greenbone/gsa/pull/1575)
- Fixed CVSSBaseCalculatorv2 [#1572](https://github.com/greenbone/gsa/pull/1572)
- Fix title in Operating Systems table of Reports [#1567](https://github.com/greenbone/gsa/pull/1567)
- Fix displaying only usable report formats at report download [#1565](https://github.com/greenbone/gsa/pull/1565)
Expand Down
5 changes: 3 additions & 2 deletions gsa/src/web/pages/hosts/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class HostComponent extends React.Component {

openCreateTargetSelectionDialog(data) {
const {entities, entitiesSelected, selectionType, filter} = data;

const {entitiesCounts} = this.props;
let size;
let filterstring;

Expand All @@ -112,7 +112,7 @@ class HostComponent extends React.Component {
size = entities.length;
filterstring = filter.toFilterString();
} else {
const counts = entities.getCounts();
const counts = entitiesCounts;
size = counts.filtered;
filterstring = filter.all().toFilterString();
}
Expand Down Expand Up @@ -192,6 +192,7 @@ class HostComponent extends React.Component {
HostComponent.propTypes = {
children: PropTypes.func.isRequired,
createtarget: PropTypes.func.isRequired,
entitiesCounts: PropTypes.counts,
gmp: PropTypes.gmp.isRequired,
selectionType: PropTypes.string,
onCloneError: PropTypes.func,
Expand Down
3 changes: 3 additions & 0 deletions gsa/src/web/pages/hosts/listpage.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ ToolBarIcons.propTypes = {
};

const Page = ({
entitiesCounts,
filter,
onChanged,
onDownloaded,
Expand All @@ -77,6 +78,7 @@ const Page = ({
...props
}) => (
<HostComponent
entitiesCounts={entitiesCounts}
onTargetCreated={goto_details('target', props)}
onTargetCreateError={onError}
onCreated={onChanged}
Expand Down Expand Up @@ -131,6 +133,7 @@ const Page = ({
);

Page.propTypes = {
entitiesCounts: PropTypes.counts,
filter: PropTypes.filter,
onChanged: PropTypes.func.isRequired,
onDownloaded: PropTypes.func.isRequired,
Expand Down
4 changes: 4 additions & 0 deletions gsa/src/web/pages/targets/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,8 @@ class TargetComponent extends React.Component {
credential,
credentials,
hosts,
hosts_count,
hosts_filter,
id,
in_use,
name,
Expand Down Expand Up @@ -357,6 +359,8 @@ class TargetComponent extends React.Component {
esxi_credential_id={esxi_credential_id}
exclude_hosts={exclude_hosts}
hosts={hosts}
hosts_count={hosts_count}
hosts_filter={hosts_filter}
id={id}
in_use={in_use}
name={name}
Expand Down