From c6318f4785c86103503611fb014f72a3d5281cef Mon Sep 17 00:00:00 2001
From: Daniel Weck {row.rule.rule} {localize("report.violationsSection.via")} {row.rule.engine}
{localize("report.title")}
- {
// shell.openExternal(src);
ipcRenderer.send('ELECTRON_SHELL_OPEN_EXTERNAL', `file://${decodeURIComponent(src).replace(/\\/g, "/")}`);
- }} style={{ objectFit: "contain", cursor: "pointer" }} src={`fileproto://host/${src}`}/>
+ }} style={{ maxHeight: rowHeight, objectFit: "contain", cursor: "pointer" }} src={`fileproto://host/${src}`}/>
}
},
@@ -73,8 +75,8 @@ export default class Images extends React.Component {
overflowY: "auto",
padding: 6,
margin: 0,
- height: 98,
- maxheight: 98,
+ height: rowHeight,
+ maxHeight: rowHeight,
whiteSpace: "break-spaces",
textOverflow: "ellipsis"
}} >
@@ -97,8 +99,8 @@ export default class Images extends React.Component {
overflowY: "auto",
padding: 6,
margin: 0,
- height: 98,
- maxheight: 98,
+ height: rowHeight,
+ maxHeight: rowHeight,
whiteSpace: "break-spaces",
textOverflow: "ellipsis"
}}>
@@ -121,8 +123,8 @@ export default class Images extends React.Component {
overflowY: "auto",
padding: 6,
margin: 0,
- height: 98,
- maxheight: 98,
+ height: rowHeight,
+ maxHeight: rowHeight,
whiteSpace: "break-spaces",
textOverflow: "ellipsis"
}}>
@@ -145,8 +147,8 @@ export default class Images extends React.Component {
overflowY: "auto",
padding: 6,
margin: 0,
- height: 98,
- maxheight: 98,
+ height: rowHeight,
+ maxHeight: rowHeight,
whiteSpace: "break-spaces",
textOverflow: "ellipsis"
}}>
@@ -170,8 +172,8 @@ export default class Images extends React.Component {
overflowY: "auto",
padding: 6,
margin: 0,
- height: 98,
- maxheight: 98,
+ height: rowHeight,
+ maxHeight: rowHeight,
textOverflow: "ellipsis",
overflowWrap: "break-word",
}} className="location">
@@ -205,8 +207,8 @@ export default class Images extends React.Component {
overflowY: "auto",
padding: 6,
margin: 0,
- height: 98,
- maxheight: 98,
+ height: rowHeight,
+ maxHeight: rowHeight,
whiteSpace: "break-spaces",
textOverflow: "ellipsis"
}}>
diff --git a/src/renderer/components/ReportSections/Metadata.js b/src/renderer/components/ReportSections/Metadata.js
index 9b733c3..10c06b4 100644
--- a/src/renderer/components/ReportSections/Metadata.js
+++ b/src/renderer/components/ReportSections/Metadata.js
@@ -21,6 +21,8 @@ import classNames from 'classnames';
import CircularProgress from '@material-ui/core/CircularProgress'
+const rowHeight = 60;
+
const styles = theme => ({
buttonProcessing: {
@@ -127,8 +129,8 @@ class Metadata extends React.Component {
overflowY: "auto",
padding: 6,
margin: 0,
- height: 98,
- maxheight: 98,
+ height: rowHeight,
+ maxHeight: rowHeight,
whiteSpace: "break-spaces",
textOverflow: "ellipsis"
}} >
@@ -151,8 +153,8 @@ class Metadata extends React.Component {
overflowY: "auto",
padding: 6,
margin: 0,
- height: 98,
- maxheight: 98,
+ height: rowHeight,
+ maxHeight: rowHeight,
whiteSpace: "break-spaces",
textOverflow: "ellipsis"
}} >
@@ -185,8 +187,8 @@ class Metadata extends React.Component {
overflowY: "auto",
padding: 6,
margin: 0,
- height: 98,
- maxheight: 98,
+ height: rowHeight,
+ maxHeight: rowHeight,
whiteSpace: "break-spaces",
textOverflow: "ellipsis"
}} >
diff --git a/src/renderer/components/ReportSections/Violations.js b/src/renderer/components/ReportSections/Violations.js
index 1aa639d..9090312 100644
--- a/src/renderer/components/ReportSections/Violations.js
+++ b/src/renderer/components/ReportSections/Violations.js
@@ -7,6 +7,8 @@ const {ipcRenderer} = require('electron');
import { localizer } from './../../../shared/l10n/localize';
const { localize, getCurrentLanguage } = localizer;
+const rowHeight = 150;
+
// the violations page of the report
export default class Violations extends React.Component {
@@ -61,8 +63,8 @@ export default class Violations extends React.Component {
overflowY: "auto",
padding: 6,
margin: 0,
- height: 98,
- maxheight: 98,
+ height: rowHeight,
+ maxheight: rowHeight,
whiteSpace: "break-spaces",
textOverflow: "ellipsis"
}} >
@@ -91,8 +93,8 @@ export default class Violations extends React.Component {
overflowY: "auto",
padding: 6,
margin: 0,
- height: 98,
- maxheight: 98,
+ height: rowHeight,
+ maxheight: rowHeight,
whiteSpace: "break-spaces",
textOverflow: "ellipsis"
}} >
@@ -117,12 +119,12 @@ export default class Violations extends React.Component {
overflowY: "auto",
padding: 6,
margin: 0,
- height: 98,
- maxheight: 98,
+ height: rowHeight,
+ maxheight: rowHeight,
whiteSpace: "break-spaces",
textOverflow: "ellipsis"
}} >
-
{row.location.filename}
-
{unescape(row.location.snippet)}+ }}>{unescape(row.location.snippet)} : ''} @@ -183,8 +183,8 @@ export default class Violations extends React.Component { overflowY: "auto", padding: 6, margin: 0, - height: 98, - maxheight: 98, + height: rowHeight, + maxheight: rowHeight, whiteSpace: "break-spaces", textOverflow: "ellipsis" }} > diff --git a/src/renderer/components/Table/EnhancedTable.js b/src/renderer/components/Table/EnhancedTable.js index 8fec807..74ad079 100644 --- a/src/renderer/components/Table/EnhancedTable.js +++ b/src/renderer/components/Table/EnhancedTable.js @@ -19,6 +19,8 @@ import { lighten } from '@material-ui/core/styles/colorManipulator'; import { localizer } from './../../../shared/l10n/localize'; const { localize } = localizer; +const tableLayoutFixed = false; + function desc(a, b, orderBy, head) { // console.log("----------", JSON.stringify(a), " ================ ", JSON.stringify(b), " ############### ", orderBy, " ***** ", JSON.stringify(head)); let aValue = head.hasOwnProperty('sortOn') ? head.sortOn(a[orderBy]) : a[orderBy]; @@ -294,7 +296,7 @@ export default class EnhancedTable extends React.Component { }); return ( -