-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
GUI miscellaneous #2 #995
GUI miscellaneous #2 #995
Conversation
swaterkamp
commented
Oct 4, 2018
•
edited
Loading
edited
- Fix ScanConfigDialog tables
- Fix translating FilterTypes
- Fix CVEs table
- Change titles in Result details
- ... some clean-up
There were several issues when displaying the tables presumably due to the new layout.
Edit Scanner Preferences doesn't seem to have actions assigned, thereofre, remove table column title.
Remove "Vulnerability" from titles for "Detection Method", "Insight", and "Detection Result". Also don't distinguish between "Detection Method" and "Log Method" anymore.
Codecov Report
@@ Coverage Diff @@
## master #995 +/- ##
=========================================
- Coverage 9.11% 9.11% -0.01%
=========================================
Files 821 821
Lines 26742 26745 +3
Branches 5719 5745 +26
=========================================
Hits 2437 2437
- Misses 21943 21945 +2
- Partials 2362 2363 +1
Continue to review full report at Codecov.
|
@@ -327,31 +328,33 @@ class NvtFamily extends React.Component { | |||
{name} | |||
</TableData> | |||
<TableData> | |||
<Layout align="end"> | |||
<Layout align="start"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't the align be set on the TableData here? For me the extra Layout seems to be unnecessary.
@@ -84,10 +85,10 @@ class NvtPreferenceDisplay extends React.Component { | |||
<TableData style={{overflowWrap: 'break-word'}}> | |||
{preference.name} | |||
</TableData> | |||
<TableData> | |||
<TableData style={{overflowWrap: 'break-word'}}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we extract this into an own component now we even use this twice?
{/* add empty cells to spread row to end of table */} | ||
<TableData/> | ||
<TableData/> | ||
<TableData/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems strange to me. Shouldn't we remove the columns at all if we don't have content for them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do have content for the columns, just not in the very last row.
</DetailsLink> | ||
))} | ||
{userTags.map(tag => { | ||
const valueString = tag.value === '' ? '' : '=' + tag.value; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you use isEmpty(tag.value)
from gmp/utils/string instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it would even better to parse the tag value as undefined if it is an empty string...
gsa/src/gmp/models/tag.js
Outdated
@@ -42,6 +42,9 @@ class Tag extends Model { | |||
else { | |||
ret.resourceCount = 0; | |||
} | |||
if (elem.value === '') { | |||
ret.value = undefined; | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be
ret.value = isEmpty(elem.value) ? undefined : elem.value;
{preference.name} | ||
</TableData> | ||
<TableData style={{overflowWrap: 'break-word'}}> | ||
<TableData overflowWrap="break-word"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sorry you did misunderstood my comment. Should have been
const StyledTableData = styled(TableData)`
overflow-wrap: break-word;
`;
...
<StyledTableData>
{preference.nvt.name}
</StyledTableData>
<StyledTableData>
{preference.name}
</StyledTableData>
<TableData>
...
Hint: If this doesn't work currently TableData has to forwards the className prop.
Also use this change in Results detailspage