Skip to content

Commit

Permalink
Rename for Sergi
Browse files Browse the repository at this point in the history
  • Loading branch information
stephmilovic committed Oct 19, 2023
1 parent 5bcbe34 commit d9b7133
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ export function getConnectorType(): OpenAIConnector {
},
actionConnectorFields: lazy(() => import('./connector')),
actionParamsFields: lazy(() => import('./params')),
actionReadOnlyElement: lazy(() => import('./dashboard_link')),
actionReadOnlyExtraComponent: lazy(() => import('./dashboard_link')),
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ const EditConnectorFlyoutComponent: React.FC<EditConnectorFlyoutProps> = ({
) : (
<ReadOnlyConnectorMessage
href={docLinks.links.alerting.preconfiguredConnectors}
extraComponent={actionTypeModel?.actionReadOnlyElement}
extraComponent={actionTypeModel?.actionReadOnlyExtraComponent}
connectorId={connector.id}
connectorName={connector.name}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { ActionTypeModel } from '../../../..';

const ExtraComponent = jest.fn(() => (
<div>Extra Component</div>
)) as unknown as ActionTypeModel['actionReadOnlyElement'];
)) as unknown as ActionTypeModel['actionReadOnlyExtraComponent'];
describe('ReadOnlyConnectorMessage', () => {
it('should render a readonly message with a link to the provided href', () => {
const { getByTestId, getByText, queryByText } = render(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { ActionTypeModel } from '../../../..';
export const ReadOnlyConnectorMessage: React.FC<{
connectorId: string;
connectorName: string;
extraComponent?: ActionTypeModel['actionReadOnlyElement'];
extraComponent?: ActionTypeModel['actionReadOnlyExtraComponent'];
href: string;
}> = ({ connectorId, connectorName, extraComponent, href }) => {
const ExtraComponent = extraComponent;
Expand Down
4 changes: 3 additions & 1 deletion x-pack/plugins/triggers_actions_ui/public/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,9 @@ export interface ActionTypeModel<ActionConfig = any, ActionSecrets = any, Action
ComponentType<ActionConnectorFieldsProps>
> | null;
actionParamsFields: React.LazyExoticComponent<ComponentType<ActionParamsProps<ActionParams>>>;
actionReadOnlyElement?: React.LazyExoticComponent<ComponentType<ActionReadOnlyElementProps>>;
actionReadOnlyExtraComponent?: React.LazyExoticComponent<
ComponentType<ActionReadOnlyElementProps>
>;
defaultActionParams?: RecursivePartial<ActionParams>;
defaultRecoveredActionParams?: RecursivePartial<ActionParams>;
customConnectorSelectItem?: CustomConnectorSelectionItem;
Expand Down

0 comments on commit d9b7133

Please sign in to comment.