[Inference] Updating link text for model_id (#211087)

## Summary

Updating link text for `model_field` field to have `Learn more.` when
the provider is Elasticsearch.

### screenshots:

#### Elasticsearch provider
![Screenshot 2025-02-13 at 2 26
13 PM](https://github.com/user-attachments/assets/a4b12e99-c69a-47b4-ba9d-81786f39d82c)

#### Other providers
![Screenshot 2025-02-13 at 2 26
28 PM](https://github.com/user-attachments/assets/ba35f36b-fc5d-48e5-91cf-1f37b96f95ec)


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [X] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [X] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
This commit is contained in:
Samiul Monir 2025-02-13 17:05:42 -05:00 committed by GitHub
parent 11211cfb27
commit 84fdbcba62
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 5 deletions

View file

@ -37,7 +37,7 @@ describe('ConfigurationFormItems', () => {
it('renders link when isInternalProvider is true and key is model_id', () => {
render(<ConfigurationFormItems {...defaultProps} isInternalProvider={true} />);
const link = screen.getByRole('link', { name: /looking for elasticsearch model ids/i });
const link = screen.getByRole('link', { name: /Learn more./i });
expect(link).toBeInTheDocument();
expect(link).toHaveAttribute(
'href',

View file

@ -66,7 +66,7 @@ export const ConfigurationFormItems: React.FC<ConfigurationFormItemsProps> = ({
external
target="_blank"
>
{LABELS.ES_MODELS_LINK_TEXT}
{LABELS.LEARN_MORE}
</EuiLink>
</>
) : (

View file

@ -120,10 +120,10 @@ export const OPTIONALTEXT = i18n.translate(
}
);
export const ES_MODELS_LINK_TEXT = i18n.translate(
'xpack.inferenceEndpointUICommon.components.esModelsLinkText',
export const LEARN_MORE = i18n.translate(
'xpack.inferenceEndpointUICommon.components.learnMoreText',
{
defaultMessage: 'Looking for Elasticsearch model Ids',
defaultMessage: 'Learn more.',
}
);