Skip to content

Commit

Permalink
Add readonly identifier text field to Spaces Edit view
Browse files Browse the repository at this point in the history
  • Loading branch information
tsullivan committed Nov 21, 2024
1 parent a5b6903 commit 45c5678
Showing 1 changed file with 24 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,32 +122,31 @@ export class CustomizeSpace extends Component<Props, State> {
/>
</EuiFormRow>

{editingExistingSpace ? null : (
<EuiFormRow
label={
<FormattedMessage
id="xpack.spaces.management.spaceIdentifier.urlIdentifierTitle"
defaultMessage="URL identifier"
/>
}
helpText={
<FormattedMessage
id="xpack.spaces.management.spaceIdentifier.kibanaURLForSpaceIdentifierDescription"
defaultMessage="You can't change the URL identifier once created."
/>
}
{...this.props.validator.validateURLIdentifier(this.props.space)}
fullWidth
>
<EuiFieldText
data-test-subj="spaceURLDisplay"
value={this.props.space.id ?? ''}
onChange={this.onSpaceIdentifierChange}
isInvalid={this.props.validator.validateURLIdentifier(this.props.space).isInvalid}
fullWidth
<EuiFormRow
label={
<FormattedMessage
id="xpack.spaces.management.spaceIdentifier.urlIdentifierTitle"
defaultMessage="URL identifier"
/>
</EuiFormRow>
)}
}
helpText={
<FormattedMessage
id="xpack.spaces.management.spaceIdentifier.kibanaURLForSpaceIdentifierDescription"
defaultMessage="You can't change the URL identifier once created."
/>
}
{...this.props.validator.validateURLIdentifier(this.props.space)}
fullWidth
>
<EuiFieldText
data-test-subj="spaceURLDisplay"
value={this.props.space.id ?? ''}
onChange={this.onSpaceIdentifierChange}
isInvalid={this.props.validator.validateURLIdentifier(this.props.space).isInvalid}
disabled={editingExistingSpace}
fullWidth
/>
</EuiFormRow>
</EuiDescribedFormGroup>
</SectionPanel>
);
Expand Down

0 comments on commit 45c5678

Please sign in to comment.