Skip to content

Commit

Permalink
Merge pull request #1834 from saberlynx/long-result-desc
Browse files Browse the repository at this point in the history
Limit the length of result description with a div
  • Loading branch information
bjoernricks authored Dec 6, 2019
2 parents 6dac00b + 32b6907 commit 800a454
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
[#1507](https://github.com/greenbone/gsa/pull/1507)

### Changed
- Limit the length of result description with a div [#1834](https://github.com/greenbone/gsa/pull/1834)
- New permission dialog: radio button for groups disabled if no groups available [#1836](https://github.com/greenbone/gsa/pull/1836)
- Changed new override dialog defaults [#1833](https://github.com/greenbone/gsa/pull/1833)
- Refactored cvsscalculatorpage to function and parse vector from url [#1824](https://github.com/greenbone/gsa/pull/1824)
Expand Down
11 changes: 9 additions & 2 deletions gsa/src/web/pages/results/details.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,12 @@ import Diff from './diff';
*/
const Pre = styled.pre`
white-space: pre-wrap;
word-wrap: normal;
word-wrap: word-break;
`;

const GrowDiv = styled.div`
min-width: 500px;
max-width: 1080px;
`;

const ResultDetails = ({className, links = true, entity}) => {
Expand Down Expand Up @@ -119,7 +124,9 @@ const ResultDetails = ({className, links = true, entity}) => {
) : (
<DetailsBlock title={_('Detection Result')}>
{!isEmpty(result.description) && result.description.length > 1 ? (
<Pre>{result.description}</Pre>
<GrowDiv>
<Pre>{result.description}</Pre>
</GrowDiv>
) : (
_(
'Vulnerability was detected according to the ' +
Expand Down

0 comments on commit 800a454

Please sign in to comment.