diff --git a/package.json b/package.json index 4cf909dac4..4be72a986f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gsa", - "version": "22.5.4-dev1", + "version": "22.6.1-dev1", "description": "Greenbone Security Assistant", "keywords": [ "openvas", @@ -13,7 +13,7 @@ "type": "git", "url": "https://github.com/greenbone/gsa/" }, - "author": "Björn Ricks ", + "author": "Bj\u00f6rn Ricks ", "license": "AGPL-3.0+", "main": "src/index.js", "engines": { @@ -123,4 +123,4 @@ "git add" ] } -} +} \ No newline at end of file diff --git a/src/gmp/commands/alerts.js b/src/gmp/commands/alerts.js index 53332500d6..0a38e5c6fd 100644 --- a/src/gmp/commands/alerts.js +++ b/src/gmp/commands/alerts.js @@ -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', diff --git a/src/version.js b/src/version.js index 689ca415bd..b4b7ad3ca7 100644 --- a/src/version.js +++ b/src/version.js @@ -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(); diff --git a/src/web/pages/alerts/component.js b/src/web/pages/alerts/component.js index 97dbe70123..2893d5333b 100644 --- a/src/web/pages/alerts/component.js +++ b/src/web/pages/alerts/component.js @@ -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, '', @@ -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, @@ -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, @@ -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} diff --git a/src/web/pages/alerts/dialog.js b/src/web/pages/alerts/dialog.js index 6898e79510..354b547baf 100644 --- a/src/web/pages/alerts/dialog.js +++ b/src/web/pages/alerts/dialog.js @@ -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: '', @@ -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} @@ -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, diff --git a/src/web/pages/alerts/method.js b/src/web/pages/alerts/method.js index 943f24bef8..3c95b4250e 100644 --- a/src/web/pages/alerts/method.js +++ b/src/web/pages/alerts/method.js @@ -198,6 +198,13 @@ const Method = ({method = {}, details = false, reportFormats = []}) => { )} + {isDefined(data.scp_port?.value) && ( + + {_('Port')} + {data.scp_port.value} + + )} + {isDefined(credential) && isDefined(credential.id) && ( {_('Credential')} diff --git a/src/web/pages/alerts/scpmethodpart.js b/src/web/pages/alerts/scpmethodpart.js index ef6f86a650..54f24fe612 100644 --- a/src/web/pages/alerts/scpmethodpart.js +++ b/src/web/pages/alerts/scpmethodpart.js @@ -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'; @@ -45,6 +46,7 @@ const ScpMethodPart = ({ reportFormats, scpCredential, scpHost, + scpPort, scpKnownHosts, scpPath, scpReportFormat, @@ -83,6 +85,17 @@ const ScpMethodPart = ({ /> + + + +