Minor refactoring and typo fix

This commit is contained in:
VakarisZ 2021-01-14 11:59:57 +02:00
parent 87dafeb440
commit 2dfcbb49d4
3 changed files with 4 additions and 7 deletions

View File

@ -8,7 +8,7 @@ class SERVICE_TYPES(Enum):
ACM = 'acm'
AWSLAMBDA = 'awslambda'
CLOUDFORMATION = 'cloudformation'
CLOUSDTRAIL = 'cloudtrail'
CLOUDTRAIL = 'cloudtrail'
CLOUDWATCH = 'cloudwatch'
CONFIG = 'config'
DIRECTCONNECT = 'directconnect'

View File

@ -6,5 +6,5 @@ from monkey_island.cc.services.zero_trust.scoutsuite.data_parsing.rule_path_buil
class CloudTrailRulePathCreator(AbstractRulePathCreator):
service_type = SERVICE_TYPES.CLOUSDTRAIL
service_type = SERVICE_TYPES.CLOUDTRAIL
supported_rules = CloudTrailRules

View File

@ -12,11 +12,8 @@ export default function ScoutSuiteRuleModal(props) {
const [openRuleId, setOpenRuleId] = useState(null)
function toggleRuleDropdown(ruleId) {
if (openRuleId === ruleId) {
setOpenRuleId(null);
} else {
setOpenRuleId(ruleId);
}
let ruleIdToSet = (openRuleId === ruleId) ? null : ruleId;
setOpenRuleId(ruleIdToSet);
}
function renderRuleDropdowns() {