Skip to content

Commit

Permalink
Merge pull request #1127 from swaterkamp/GUImisc
Browse files Browse the repository at this point in the history
GUI miscellaneous #11
  • Loading branch information
bjoernricks authored Jan 21, 2019
2 parents 075fcf2 + 003f5d2 commit e16c1c2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions gsa/src/web/components/menu/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ const Menu = ({
...props
}) => {
let link;
children = React.Children.toArray(children).filter(hasValue);
if (isDefined(to)) {
link = <Link to={to}>{title}</Link>;
}
Expand All @@ -123,12 +124,11 @@ const Menu = ({
link = React.cloneElement(child, {title});
}

const menuentries = React.Children.map(children, child => hasValue(child) ? (
const menuentries = children.map(child => (
<StyledMenuEntry key={child.key}>
{child}
</StyledMenuEntry>
) : child);

));
return (
<StyledMenu>
<DefaultEntry>
Expand Down
4 changes: 3 additions & 1 deletion gsa/src/web/pages/alerts/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import {

import {
email_credential_filter,
smb_credential_filter,
vFire_credential_filter,
} from 'gmp/models/credential';

Expand Down Expand Up @@ -569,6 +570,7 @@ class AlertComponent extends React.Component {

const result_filters = filters.filter(filter_results_filter);
const secinfo_filters = filters.filter(filter_secinfo_filter);
const smbCredentials = credentials.filter(smb_credential_filter);

const result_filter_id = selectSaveId(result_filters);
const report_format_id = selectSaveId(report_formats);
Expand Down Expand Up @@ -636,7 +638,7 @@ class AlertComponent extends React.Component {
method_data_recipient_credential: UNSET_VALUE,
method_data_send_report_format: report_format_id,
method_data_start_task_task: selectSaveId(tasks),
method_data_smb_credential: selectSaveId(credentials),
method_data_smb_credential: selectSaveId(smbCredentials),
method_data_smb_share_path: undefined,
method_data_smb_file_path: undefined,
method_data_smb_file_path_type: undefined,
Expand Down
2 changes: 1 addition & 1 deletion gsa/src/web/pages/alerts/method.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ const Method = ({
</div>
);
}
return _('text');
return _('Alemba vFire');
}

if (method.type === METHOD_TYPE_SCP) {
Expand Down
2 changes: 1 addition & 1 deletion gsa/src/web/pages/alerts/smbmethodpart.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const SmbMethodPart = ({
onNewCredentialClick,
onCredentialChange,
}) => {
credentials.filter(smb_credential_filter);
credentials = credentials.filter(smb_credential_filter);
return (
<Layout
flex="column"
Expand Down

0 comments on commit e16c1c2

Please sign in to comment.