mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
5ab18aaa4d
commit
f61468f270
1 changed files with 11 additions and 5 deletions
|
@ -153,9 +153,10 @@ export const ActionForm = ({
|
|||
const preconfiguredConnectors = connectors.filter(connector => connector.isPreconfigured);
|
||||
const hasActionsDisabled = actions.some(
|
||||
action =>
|
||||
!actionTypesIndex![action.actionTypeId].enabled &&
|
||||
actionTypesIndex &&
|
||||
!actionTypesIndex[action.actionTypeId].enabled &&
|
||||
!checkActionFormActionTypeEnabled(
|
||||
actionTypesIndex![action.actionTypeId],
|
||||
actionTypesIndex[action.actionTypeId],
|
||||
preconfiguredConnectors
|
||||
).isEnabled
|
||||
);
|
||||
|
@ -209,7 +210,11 @@ export const ActionForm = ({
|
|||
},
|
||||
index: number
|
||||
) => {
|
||||
const actionType = actionTypesIndex![actionItem.actionTypeId];
|
||||
if (!actionTypesIndex) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const actionType = actionTypesIndex[actionItem.actionTypeId];
|
||||
|
||||
const optionsList = connectors
|
||||
.filter(
|
||||
|
@ -227,7 +232,7 @@ export const ActionForm = ({
|
|||
if (!actionTypeRegistered || actionItem.group !== defaultActionGroupId) return null;
|
||||
const ParamsFieldsComponent = actionTypeRegistered.actionParamsFields;
|
||||
const checkEnabledResult = checkActionFormActionTypeEnabled(
|
||||
actionTypesIndex![actionConnector.actionTypeId],
|
||||
actionTypesIndex[actionConnector.actionTypeId],
|
||||
connectors.filter(connector => connector.isPreconfigured)
|
||||
);
|
||||
|
||||
|
@ -249,7 +254,8 @@ export const ActionForm = ({
|
|||
/>
|
||||
}
|
||||
labelAppend={
|
||||
actionTypesIndex![actionConnector.actionTypeId].enabledInConfig ? (
|
||||
actionTypesIndex &&
|
||||
actionTypesIndex[actionConnector.actionTypeId].enabledInConfig ? (
|
||||
<EuiButtonEmpty
|
||||
size="xs"
|
||||
data-test-subj={`addNewActionConnectorButton-${actionItem.actionTypeId}`}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue