forked from p34709852/monkey
Improved and fixed bugs related to ScoutSuite UI components
This commit is contained in:
parent
49e13a651e
commit
dc295d4a60
|
@ -50,18 +50,29 @@ export default function ResourceDropdown(props) {
|
|||
return JSON.stringify(data, null, 4);
|
||||
}
|
||||
|
||||
function getResourceDropdownContents() {
|
||||
function getResourceValueDisplay() {
|
||||
let parser = new ScoutSuiteDataParser(props.scoutsuite_data.data.services);
|
||||
let resource_value = parser.getValueAt(props.resource_path);
|
||||
if (resource_value) {
|
||||
return(
|
||||
<div>
|
||||
<p className={'resource-value-title'}>Value:</p>
|
||||
<pre className={'resource-value-json'}>{prettyPrintJson(resource_value)}</pre>
|
||||
</div>
|
||||
)
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
|
||||
function getResourceDropdownContents() {
|
||||
return (
|
||||
<div className={'resource-display'}>
|
||||
<div>
|
||||
<p className={'resource-path-title'}>Path:</p>
|
||||
<p className={'resource-path-contents'}>{replacePathDotsWithArrows(props.resource_path)}</p>
|
||||
</div>
|
||||
<div>
|
||||
<p className={'resource-value-title'}>Value:</p>
|
||||
<pre className={'resource-value-json'}>{prettyPrintJson(parser.getValueAt(props.resource_path))}</pre>
|
||||
</div>
|
||||
{getResourceValueDisplay()}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ export default function ScoutSuiteRuleModal(props) {
|
|||
<p>
|
||||
There {Pluralize('is', props.scoutsuite_rules.length)} {
|
||||
<div className={'badge badge-primary'}>{props.scoutsuite_rules.length}</div>
|
||||
} ScoutSuite {Pluralize('rule', props.scoutsuite_rules.length)} associated with finding.
|
||||
} ScoutSuite {Pluralize('rule', props.scoutsuite_rules.length)} associated with this finding.
|
||||
</p>
|
||||
{renderRuleDropdowns()}
|
||||
</Modal.Body>
|
||||
|
|
|
@ -8,7 +8,7 @@ import classNames from 'classnames';
|
|||
import * as PropTypes from 'prop-types';
|
||||
import RULE_LEVELS from '../../common/consts/ScoutSuiteConsts/RuleLevels';
|
||||
import STATUSES from '../../common/consts/StatusConsts';
|
||||
import {faCheckCircle, faCircle, faExclamationCircle} from '@fortawesome/free-solid-svg-icons';
|
||||
import {faCheckCircle, faCircle, faExclamationCircle, faQuestionCircle} from '@fortawesome/free-solid-svg-icons';
|
||||
import RuleDisplay from './RuleDisplay';
|
||||
|
||||
export default function ScoutSuiteSingleRuleDropdown(props) {
|
||||
|
@ -41,7 +41,7 @@ export default function ScoutSuiteSingleRuleDropdown(props) {
|
|||
case STATUSES.STATUS_PASSED:
|
||||
return faCheckCircle;
|
||||
case STATUSES.STATUS_VERIFY:
|
||||
return faExclamationCircle;
|
||||
return faQuestionCircle;
|
||||
case STATUSES.STATUS_FAILED:
|
||||
return faExclamationCircle;
|
||||
case STATUSES.STATUS_UNEXECUTED:
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
.resource-display .resource-value-title,
|
||||
.resource-display .resource-path-title {
|
||||
margin-right:5px;
|
||||
font-weight: 500;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue