Skip to content

Commit

Permalink
Add: Add delta reports version to user settings
Browse files Browse the repository at this point in the history
  • Loading branch information
a-h-abdelsalam authored and timopollmeier committed Oct 6, 2023
1 parent 5a430cb commit f093675
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions public/locales/gsa-de.json
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@
"Delete {{entity}}": "{{entity}} löschen",
"Delta": "Delta",
"Delta Report": "Delta-Bericht",
"Delta Reports Version (immutable)": "Delta-Bericht-Version (unveränderlich)",
"Delta Results": "Delta-Ergebnisse",
"Deny all": "Alle verweigern",
"Deny all and allow": "Verweigere alle und erlaube",
Expand Down
12 changes: 12 additions & 0 deletions src/web/pages/usersettings/usersettingspage.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ class UserSettings extends React.Component {
certBundFilter,
dfnCertFilter,
autoCacheRebuild = {},
deltaReportsVersion,
} = this.props;

alertsFilter = hasValue(alertsFilter) ? alertsFilter : {};
Expand Down Expand Up @@ -455,6 +456,12 @@ class UserSettings extends React.Component {
: ''}
</TableData>
</TableRow>
<TableRow>
<TableData>
{_('Delta Reports Version (immutable)')}
</TableData>
<TableData>{deltaReportsVersion}</TableData>
</TableRow>
</TableBody>
</Table>
</TabPanel>
Expand Down Expand Up @@ -808,6 +815,7 @@ UserSettings.propTypes = {
defaultSnmpCredential: PropTypes.object,
defaultSshCredential: PropTypes.object,
defaultTarget: PropTypes.object,
deltaReportsVersion: PropTypes.string,
detailsExportFileName: PropTypes.object,
dfnCertFilter: PropTypes.object,
dynamicSeverity: PropTypes.object,
Expand Down Expand Up @@ -971,6 +979,9 @@ const mapStateToProps = rootState => {
const certBundFilter = userDefaultFilterSelector.getFilter('certbund');
const dfnCertFilter = userDefaultFilterSelector.getFilter('dfncert');
const nvtFilter = userDefaultFilterSelector.getFilter('nvt');
const deltaReportsVersion = userDefaultsSelector.getValueByName(
'deltareportsversion',
);

let scanconfigs = scanConfigsSel.getEntities(ALL_FILTER);
if (isDefined(scanconfigs)) {
Expand Down Expand Up @@ -1036,6 +1047,7 @@ const mapStateToProps = rootState => {
dfnCertFilter,
nvtFilter,
autoCacheRebuild,
deltaReportsVersion,
};
};

Expand Down

0 comments on commit f093675

Please sign in to comment.