log fields and logo fixes

This commit is contained in:
Rami Winestock
2023-12-15 17:57:31 +02:00
parent f90f5edcd1
commit 3ae059ef42
8 changed files with 97 additions and 65 deletions

View File

@@ -1,17 +1,17 @@
<td class="text-right"><a href="#" class="meta btn btn-secondary btn-sm">open</a></td> <td class="text-right"><a href="#" class="meta btn btn-secondary btn-sm">open</a></td>
<td class="text-nowrap"><%- formatDbDate(eventTime, 'MMM DD YYYY, H:mm') %></td> <td class="text-nowrap"><%- formatDbDate(eventTime, 'MMM DD YYYY, H:mm') %></td>
<td><%- eventSeverity %></td> <%= createSpecificTableCell(eventSeverity) %>
<td><%- assetName %></td> <%= createSpecificTableCell(assetName) %>
<td><%- securityAction %></td> <%= createSpecificTableCell(securityAction) %>
<td><%- waapIncidentType %></td> <%= createSpecificTableCell(waapIncidentType) %>
<td><%- httpSourceId %></td> <%= createSpecificTableCell(httpSourceId) %>
<td><%- sourceIp %></td> <%= createSpecificTableCell(sourceIP) %>
<td><%- proxyIp %></td> <%= createSpecificTableCell(proxyIp) %>
<td><%- httpHostName %></td> <%= createSpecificTableCell(httpHostName) %>
<td><%- httpMethod %></td> <%= createSpecificTableCell(httpMethod) %>
<td><%- httpResponseCode %></td> <%= createSpecificTableCell(httpResponseCode) %>
<td><%- httpUriPath %></td> <%= createSpecificTableCell(httpUriPath) %>
<td><%- eventTopic %></td> <%= createSpecificTableCell(eventTopic) %>
<td><%- matchedLocation %></td> <%= createSpecificTableCell(matchedLocation) %>
<td><%- matchedParameter %></td> <%= createSpecificTableCell(matchedParameter) %>
<td><%- matchedSample %></td> <%= createSpecificTableCell(matchedSample) %>

View File

@@ -27,6 +27,14 @@ module.exports = Mn.View.extend({
} }
return '#' + (this.object_id || '?'); return '#' + (this.object_id || '?');
},
createSpecificTableCell: function(value) {
if (value && value.trim() !== '') {
return `<td>${value}</td>`;
} else {
return `<td class="text-center">-</td>`;
} }
} }
}
}); });

View File

@@ -1,17 +1,17 @@
<td class="text-right"><a href="#" class="meta btn btn-secondary btn-sm">open</a></td> <td class="text-right"><a href="#" class="meta btn btn-secondary btn-sm">open</a></td>
<td class="text-nowrap"><%- formatDbDate(eventTime, 'MMM DD YYYY, H:mm') %></td> <td class="text-nowrap"><%- formatDbDate(eventTime, 'MMM DD YYYY, H:mm') %></td>
<td><%- eventSeverity %></td> <%= createSpecificTableCell(eventSeverity) %>
<td><%- assetName %></td> <%= createSpecificTableCell(assetName) %>
<td><%- securityAction %></td> <%= createSpecificTableCell(securityAction) %>
<td><%- waapIncidentType %></td> <%= createSpecificTableCell(waapIncidentType) %>
<td><%- httpSourceId %></td> <%= createSpecificTableCell(httpSourceId) %>
<td><%- sourceIp %></td> <%= createSpecificTableCell(sourceIP) %>
<td><%- proxyIp %></td> <%= createSpecificTableCell(proxyIp) %>
<td><%- httpHostName %></td> <%= createSpecificTableCell(httpHostName) %>
<td><%- httpMethod %></td> <%= createSpecificTableCell(httpMethod) %>
<td><%- httpResponseCode %></td> <%= createSpecificTableCell(httpResponseCode) %>
<td><%- httpUriPath %></td> <%= createSpecificTableCell(httpUriPath) %>
<td><%- eventTopic %></td> <%= createSpecificTableCell(eventTopic) %>
<td><%- matchedLocation %></td> <%= createSpecificTableCell(matchedLocation) %>
<td><%- matchedParameter %></td> <%= createSpecificTableCell(matchedParameter) %>
<td><%- matchedSample %></td> <%= createSpecificTableCell(matchedSample) %>

View File

@@ -27,6 +27,13 @@ module.exports = Mn.View.extend({
} }
return '#' + (this.object_id || '?'); return '#' + (this.object_id || '?');
},
createSpecificTableCell: function(value) {
if (value && value.trim() !== '') {
return `<td>${value}</td>`;
} else {
return `<td class="text-center">-</td>`;
}
} }
} }
}); });

View File

@@ -1,8 +1,8 @@
<td class="text-right"><a href="#" class="meta btn btn-secondary btn-sm">open</a></td> <td class="text-right"><a href="#" class="meta btn btn-secondary btn-sm">open</a></td>
<td class="text-nowrap"><%- formatDbDate(eventTime, 'MMM DD YYYY, H:mm') %></td> <td class="text-nowrap"><%- formatDbDate(eventTime, 'MMM DD YYYY, H:mm') %></td>
<td><%- eventSeverity %></td> <%= createSpecificTableCell(eventSeverity) %>
<td><%- eventPriority %></td> <%= createSpecificTableCell(eventPriority) %>
<td><%- eventTopic %></td> <%= createSpecificTableCell(eventTopic) %>
<td><%- eventName %></td> <%= createSpecificTableCell(eventName) %>
<td><%- suggestedRemediation %></td> <%= createSpecificTableCell(suggestedRemediation) %>
<td><%- assetName %></td> <%= createSpecificTableCell(assetName) %>

View File

@@ -27,6 +27,13 @@ module.exports = Mn.View.extend({
} }
return '#' + (this.object_id || '?'); return '#' + (this.object_id || '?');
},
createSpecificTableCell: function(value) {
if (value && value.trim() !== '') {
return `<td>${value}</td>`;
} else {
return `<td class="text-center">-</td>`;
}
} }
} }
}); });

View File

@@ -7,14 +7,24 @@
<div class="row"> <div class="row">
<div class="col-sm-12 col-md-6"> <div class="col-sm-12 col-md-6">
<div class="text-center p-1"> <div class="text-center p-1">
<div class="text-center">
<img src="/images/logo-text-vertical-grey.png" alt="Logo" /> <img src="/images/logo-text-vertical-grey.png" alt="Logo" />
<div class="text-center text-muted mt-5"> <div class="text-center text-muted my-5">
<%- i18n('main', 'version', {version: getVersion()}) %> <%- i18n('main', 'version' , {version: getVersion()}) %>
</div> </div>
<div class="mt-5">
<span class="small mr-3 text-nowrap">Secured by:</span> <div class="d-flex position-relative justify-content-center">
<img src="/images/open-appsec-logo.svg" border="0" width="29" class="mr-2"> <div class="position-absolute" style="left: 55px;">
<span class="mr-sm-0 mr-md-4 my-0 align-middle text-nowrap" style="font-family: Open Sans;">open-appsec</span> <span class="small pr-1">Secured by:</span>
</div>
<div class="mx-auto">
<img src="/images/open-appsec-logo.svg" border="0" width="29">
</div>
<div class="position-absolute" style="right: 35px;">
<span class="pl-2 align-middle" style="font-family: Open Sans;">open-appsec</span>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -5,30 +5,30 @@ const model = Backbone.Model.extend({
defaults: function () { defaults: function () {
return { return {
name: '-', name: '',
eventSeverity: '-', eventSeverity: '',
assetName: '-', assetName: '',
securityAction: '-', securityAction: '',
waapIncidentType: '-', waapIncidentType: '',
httpSourceId: '-', httpSourceId: '',
sourceIp: '-', sourceIP: '',
// 'Proxy-IP': '-', // 'Proxy-IP': '',
proxyIp: '-', proxyIp: '',
httpHostName: '-', httpHostName: '',
httpMethod: '-', httpMethod: '',
// 'HTTP-Response-Code': '-', // 'HTTP-Response-Code': '',
httpResponseCode: '-', httpResponseCode: '',
httpUriPath: '-', httpUriPath: '',
// 'Protection-Name': '-', // 'Protection-Name': '',
protectionName: '-', protectionName: '',
matchedLocation: '-', matchedLocation: '',
matchedParameter: '-', matchedParameter: '',
matchedSample: '-', matchedSample: '',
eventPriority: '-', eventPriority: '',
eventTopic: '-', eventTopic: '',
eventName: '-', eventName: '',
// Suggested Remediation if Applicable // Suggested Remediation if Applicable
suggestedRemediation: '-' suggestedRemediation: ''
}; };
} }
}); });