Skip to content

Commit

Permalink
Merge branch 'main' into sched-recurr-tz
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmundell authored Aug 11, 2023
2 parents 14d3ade + ec72a76 commit 19f1153
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 4 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gsa",
"version": "22.5.4-dev1",
"version": "22.6.1-dev1",
"description": "Greenbone Security Assistant",
"keywords": [
"openvas",
Expand All @@ -13,7 +13,7 @@
"type": "git",
"url": "https://github.com/greenbone/gsa/"
},
"author": "Björn Ricks <[email protected]>",
"author": "Bj\u00f6rn Ricks <[email protected]>",
"license": "AGPL-3.0+",
"main": "src/index.js",
"engines": {
Expand Down Expand Up @@ -123,4 +123,4 @@
"git add"
]
}
}
}
1 change: 1 addition & 0 deletions src/gmp/commands/alerts.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ const method_data_fields = [
'scp_host',
'scp_known_hosts',
'scp_path',
'scp_port',
'scp_report_format',
'smb_credential',
'smb_file_path',
Expand Down
2 changes: 1 addition & 1 deletion src/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const getMajorMinorVersion = () => {
return `${major}.${minor}`;
};

export const VERSION = '22.5.4-dev1';
export const VERSION = '22.6.1-dev1';

export const RELEASE_VERSION = getMajorMinorVersion();

Expand Down
4 changes: 4 additions & 0 deletions src/web/pages/alerts/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,7 @@ class AlertComponent extends React.Component {
DEFAULT_SCP_PATH,
),
method_data_scp_host: getValue(method.data.scp_host, ''),
method_data_scp_port: getValue(method.data.scp_port, 22),
method_data_scp_known_hosts: getValue(
method.data.scp_known_hosts,
'',
Expand Down Expand Up @@ -726,6 +727,7 @@ class AlertComponent extends React.Component {
method_data_scp_path: DEFAULT_SCP_PATH,
method_data_scp_report_format: report_format_id,
method_data_scp_host: undefined,
method_data_scp_port: 22,
method_data_scp_known_hosts: undefined,
method_data_send_port: undefined,
method_data_send_host: undefined,
Expand Down Expand Up @@ -958,6 +960,7 @@ class AlertComponent extends React.Component {
method_data_scp_report_format,
method_data_scp_path,
method_data_scp_host,
method_data_scp_port,
method_data_scp_known_hosts,
method_data_send_port,
method_data_send_host,
Expand Down Expand Up @@ -1079,6 +1082,7 @@ class AlertComponent extends React.Component {
method_data_scp_report_format={method_data_scp_report_format}
method_data_scp_path={method_data_scp_path}
method_data_scp_host={method_data_scp_host}
method_data_scp_port={method_data_scp_port}
method_data_scp_known_hosts={method_data_scp_known_hosts}
method_data_send_port={method_data_send_port}
method_data_send_host={method_data_send_host}
Expand Down
3 changes: 3 additions & 0 deletions src/web/pages/alerts/dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ const DEFAULTS = {
method_data_notice_report_format: DEFAULT_NOTICE_REPORT_FORMAT,
method_data_scp_path: DEFAULT_SCP_PATH,
method_data_scp_host: '',
method_data_scp_port: 22,
method_data_scp_known_hosts: '',
method_data_send_host: '',
method_data_send_port: '',
Expand Down Expand Up @@ -717,6 +718,7 @@ class AlertDialog extends React.Component {
reportFormats={report_formats}
scpCredential={values.method_data_scp_credential}
scpHost={values.method_data_scp_host}
scpPort={values.method_data_scp_port}
scpKnownHosts={values.method_data_scp_known_hosts}
scpPath={values.method_data_scp_path}
scpReportFormat={values.method_data_scp_report_format}
Expand Down Expand Up @@ -905,6 +907,7 @@ AlertDialog.propTypes = {
method_data_scp_host: PropTypes.string,
method_data_scp_known_hosts: PropTypes.string,
method_data_scp_path: PropTypes.string,
method_data_scp_port: PropTypes.number,
method_data_scp_report_format: PropTypes.id,
method_data_send_host: PropTypes.string,
method_data_send_port: PropTypes.string,
Expand Down
7 changes: 7 additions & 0 deletions src/web/pages/alerts/method.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,13 @@ const Method = ({method = {}, details = false, reportFormats = []}) => {
</TableRow>
)}

{isDefined(data.scp_port?.value) && (
<TableRow>
<TableData>{_('Port')}</TableData>
<TableData>{data.scp_port.value}</TableData>
</TableRow>
)}

{isDefined(credential) && isDefined(credential.id) && (
<TableRow>
<TableData>{_('Credential')}</TableData>
Expand Down
14 changes: 14 additions & 0 deletions src/web/pages/alerts/scpmethodpart.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import withPrefix from '../../utils/withPrefix.js';

import Select from '../../components/form/select.js';
import FormGroup from '../../components/form/formgroup.js';
import Spinner from '../../components/form/spinner.js';
import TextField from '../../components/form/textfield.js';
import TextArea from '../../components/form/textarea.js';

Expand All @@ -45,6 +46,7 @@ const ScpMethodPart = ({
reportFormats,
scpCredential,
scpHost,
scpPort,
scpKnownHosts,
scpPath,
scpReportFormat,
Expand Down Expand Up @@ -83,6 +85,17 @@ const ScpMethodPart = ({
/>
</FormGroup>

<FormGroup title={_('Port')}>
<Spinner
name={prefix + 'scp_port'}
value={scpPort}
type="int"
onChange={onChange}
min={1}
max={65535}
/>
</FormGroup>

<FormGroup title={_('Known Hosts')}>
<TextArea
grow="1"
Expand Down Expand Up @@ -122,6 +135,7 @@ ScpMethodPart.propTypes = {
scpHost: PropTypes.string.isRequired,
scpKnownHosts: PropTypes.string.isRequired,
scpPath: PropTypes.string.isRequired,
scpPort: PropTypes.number.isRequired,
scpReportFormat: PropTypes.id,
onChange: PropTypes.func.isRequired,
onCredentialChange: PropTypes.func.isRequired,
Expand Down

0 comments on commit 19f1153

Please sign in to comment.