Skip to content

Commit

Permalink
Add Alemba vFire details to alert details
Browse files Browse the repository at this point in the history
  • Loading branch information
swaterkamp committed Dec 18, 2018
1 parent 5ea34e3 commit 296e69a
Showing 1 changed file with 124 additions and 0 deletions.
124 changes: 124 additions & 0 deletions gsa/src/web/pages/alerts/method.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import {isDefined} from 'gmp/utils/identity';
import {
EMAIL_NOTICE_ATTACH,
EMAIL_NOTICE_INCLUDE,
METHOD_TYPE_ALEMBA_VFIRE,
METHOD_TYPE_SCP,
METHOD_TYPE_SEND,
METHOD_TYPE_SNMP,
Expand Down Expand Up @@ -64,6 +65,129 @@ const Method = ({
details = false,
}) => {
let url = '';
if (method.type === METHOD_TYPE_ALEMBA_VFIRE) {
const {data = {}} = method;
if (details) {
return (
<div>
<div>{_('Alemba vFire')}</div>
<Table>
<TableBody>
{isDefined(data.vfire_base_url) &&
isDefined(data.vfire_base_url.value) &&
<TableRow>
<TableData>
{_('Base URL')}
</TableData>
<TableData>
{data.vfire_base_url.value}
</TableData>
</TableRow>
}

{isDefined(data.vfire_call_description) &&
isDefined(data.vfire_call_description.value) &&
<TableRow>
<TableData>
{_('Call Description')}
</TableData>
<TableData>
{data.vfire_call_description.value}
</TableData>
</TableRow>
}

{isDefined(data.vfire_call_impact) &&
isDefined(data.vfire_call_impact.value) &&
<TableRow>
<TableData>
{_('Impact')}
</TableData>
<TableData>
{data.vfire_call_impact.value}
</TableData>
</TableRow>
}

{isDefined(data.vfire_call_partition_name) &&
isDefined(data.vfire_call_partition_name.value) &&
<TableRow>
<TableData>
{_('Partition')}
</TableData>
<TableData>
{data.vfire_call_partition_name.value}
</TableData>
</TableRow>
}

{isDefined(data.vfire_call_template_name) &&
isDefined(data.vfire_call_template_name.value) &&
<TableRow>
<TableData>
{_('Call Template')}
</TableData>
<TableData>
{data.vfire_call_template_name.value}
</TableData>
</TableRow>
}

{isDefined(data.vfire_call_type_name) &&
isDefined(data.vfire_call_type_name.value) &&
<TableRow>
<TableData>
{_('Call Type')}
</TableData>
<TableData>
{data.vfire_call_type_name.value}
</TableData>
</TableRow>
}

{isDefined(data.vfire_call_urgency_name) &&
isDefined(data.vfire_call_urgency_name.value) &&
<TableRow>
<TableData>
{_('Urgency')}
</TableData>
<TableData>
{data.vfire_call_urgency_name.value}
</TableData>
</TableRow>
}

{isDefined(data.vfire_client_id) &&
isDefined(data.vfire_client_id.value) &&
<TableRow>
<TableData>
{_('Alemba Client ID')}
</TableData>
<TableData>
{data.vfire_client_id.value}
</TableData>
</TableRow>
}

{isDefined(data.vfire_session_type) &&
isDefined(data.vfire_session_type.value) &&
<TableRow>
<TableData>
{_('Session Type')}
</TableData>
<TableData>
{data.vfire_session_type.value}
</TableData>
</TableRow>
}
</TableBody>
</Table>
</div>
);
}
return _('text');
}

if (method.type === METHOD_TYPE_SCP) {
const {data = {}} = method;
const {scp_credential = {}} = data;
Expand Down

0 comments on commit 296e69a

Please sign in to comment.