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' ACM = 'acm'
AWSLAMBDA = 'awslambda' AWSLAMBDA = 'awslambda'
CLOUDFORMATION = 'cloudformation' CLOUDFORMATION = 'cloudformation'
CLOUSDTRAIL = 'cloudtrail' CLOUDTRAIL = 'cloudtrail'
CLOUDWATCH = 'cloudwatch' CLOUDWATCH = 'cloudwatch'
CONFIG = 'config' CONFIG = 'config'
DIRECTCONNECT = 'directconnect' DIRECTCONNECT = 'directconnect'

View File

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

View File

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