Skip to content

Commit

Permalink
[Connectors] Pager duty connector UI fix (elastic#174253)
Browse files Browse the repository at this point in the history
## Summary

Small UI change as discussed [in
here](https://github.com/adcoelho/kibana/pull/new/swap-input-fields-pager-duty).

#### Before:
<img width="1175" alt="before"
src="https://github.com/elastic/kibana/assets/1533137/bcb01b5a-0892-4433-9f2b-5b5c401d5a2a">

#### After:
<img width="1172" alt="after"
src="https://github.com/elastic/kibana/assets/1533137/ac016699-97e6-47a3-b469-5dc3fe99afbd">

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
adcoelho and kibanamachine authored Jan 8, 2024
1 parent 70508b9 commit 2f3ec26
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ export const LinksList: React.FC<LinksListProps> = ({
<EuiFlexItem>
<EuiFormRow
label={i18n.translate(
'xpack.stackConnectors.components.pagerDuty.linkURLFieldLabel',
'xpack.stackConnectors.components.pagerDuty.linkTextFieldLabel',
{
defaultMessage: 'URL',
defaultMessage: 'Label',
}
)}
fullWidth
Expand All @@ -73,21 +73,21 @@ export const LinksList: React.FC<LinksListProps> = ({
index={index}
editAction={(key, value, actionIndex) => {
const newLinks = [...links];
newLinks[currentLinkIndex] = { text: link.text, href: value };
newLinks[currentLinkIndex] = { href: link.href, text: value };
editAction('links', newLinks, actionIndex);
}}
messageVariables={messageVariables}
paramsProperty={'linksHref'}
inputTargetValue={link.href}
paramsProperty={'linksText'}
inputTargetValue={link.text}
/>
</EuiFormRow>
</EuiFlexItem>
<EuiFlexItem>
<EuiFormRow
label={i18n.translate(
'xpack.stackConnectors.components.pagerDuty.linkTextFieldLabel',
'xpack.stackConnectors.components.pagerDuty.linkURLFieldLabel',
{
defaultMessage: 'Label',
defaultMessage: 'URL',
}
)}
fullWidth
Expand All @@ -96,12 +96,12 @@ export const LinksList: React.FC<LinksListProps> = ({
index={index}
editAction={(key, value, actionIndex) => {
const newLinks = [...links];
newLinks[currentLinkIndex] = { href: link.href, text: value };
newLinks[currentLinkIndex] = { text: link.text, href: value };
editAction('links', newLinks, actionIndex);
}}
messageVariables={messageVariables}
paramsProperty={'linksText'}
inputTargetValue={link.text}
paramsProperty={'linksHref'}
inputTargetValue={link.href}
/>
</EuiFormRow>
</EuiFlexItem>
Expand Down

0 comments on commit 2f3ec26

Please sign in to comment.