mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
* rephrase flout title
* fix host validation error display
* Make text even more consistent
* Make text even more consistent
* trim values before submitting
(cherry picked from commit 46a2c63ab3
)
Co-authored-by: Mark Hopkin <mark.hopkin@elastic.co>
This commit is contained in:
parent
12bee76b6b
commit
d831a8122d
2 changed files with 6 additions and 5 deletions
|
@ -54,13 +54,13 @@ export const EditDownloadSourceFlyout: React.FunctionComponent<EditDownloadSourc
|
|||
{!downloadSource ? (
|
||||
<FormattedMessage
|
||||
id="xpack.fleet.settings.editDownloadSourcesFlyout.createTitle"
|
||||
defaultMessage="Add new agent download binary host"
|
||||
defaultMessage="Add new agent binary source"
|
||||
data-test-subj="editDownloadSourcesFlyout.add.title"
|
||||
/>
|
||||
) : (
|
||||
<FormattedMessage
|
||||
id="xpack.fleet.settings.editDownloadSourcesFlyout.editTitle"
|
||||
defaultMessage="Edit agent download binary host"
|
||||
defaultMessage="Edit agent binary source"
|
||||
data-test-subj="editDownloadSourcesFlyout.edit.title"
|
||||
/>
|
||||
)}
|
||||
|
@ -116,6 +116,7 @@ export const EditDownloadSourceFlyout: React.FunctionComponent<EditDownloadSourc
|
|||
defaultMessage="Host"
|
||||
/>
|
||||
}
|
||||
{...inputs.hostInput.formRowProps}
|
||||
>
|
||||
<EuiFieldText
|
||||
data-test-subj="editDownloadSourcesFlyout.hostInput"
|
||||
|
|
|
@ -58,8 +58,8 @@ export function useDowloadSourceFlyoutForm(onSuccess: () => void, downloadSource
|
|||
setIsloading(true);
|
||||
|
||||
const data: PostDownloadSourceRequest['body'] = {
|
||||
name: nameInput.value,
|
||||
host: hostInput.value,
|
||||
name: nameInput.value.trim(),
|
||||
host: hostInput.value.trim(),
|
||||
is_default: defaultDownloadSourceInput.value,
|
||||
};
|
||||
|
||||
|
@ -123,7 +123,7 @@ function validateName(value: string) {
|
|||
|
||||
export function validateHost(value: string) {
|
||||
try {
|
||||
if (!value || value === '') {
|
||||
if (!value) {
|
||||
return [
|
||||
i18n.translate('xpack.fleet.settings.dowloadSourceFlyoutForm.HostIsRequiredErrorMessage', {
|
||||
defaultMessage: 'Host is required',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue