Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Spaces] Remove “identifier” column from Spaces listing #201290

Merged
merged 9 commits into from
Nov 27, 2024

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import { reactRouterNavigate } from '@kbn/kibana-react-plugin/public';

import { addSpaceIdToPath, type Space } from '../../../common';
import { isReservedSpace } from '../../../common';
import { DEFAULT_SPACE_ID, ENTER_SPACE_PATH } from '../../../common/constants';
import { ENTER_SPACE_PATH } from '../../../common/constants';
import { getSpacesFeatureDescription } from '../../constants';
import { getSpaceAvatarComponent } from '../../space_avatar';
import { SpaceSolutionBadge } from '../../space_solution_badge';
Expand Down Expand Up @@ -317,24 +317,9 @@ export class SpacesGridPage extends Component<Props, State> {
}),
sortable: true,
truncateText: true,
width: '40%',
},
];

config.push({
field: 'id',
name: i18n.translate('xpack.spaces.management.spacesGridPage.identifierColumnName', {
defaultMessage: 'Identifier',
}),
sortable: true,
render(id: string) {
if (id === DEFAULT_SPACE_ID) {
return '';
}
return id;
},
});

if (this.props.allowSolutionVisibility) {
config.push({
field: 'solution',
Expand All @@ -345,7 +330,7 @@ export class SpacesGridPage extends Component<Props, State> {
render: (solution: Space['solution'], record: Space) => (
<SpaceSolutionBadge solution={solution} data-test-subj={`${record.id}-solution`} />
),
width: '10%',
width: '18%',
});
}

Expand Down Expand Up @@ -431,6 +416,7 @@ export class SpacesGridPage extends Component<Props, State> {
'data-test-subj': (rowRecord) => `${rowRecord.id}-deleteSpace`,
},
],
width: '18%',
});

return config;
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -44888,7 +44888,6 @@
"xpack.spaces.management.spacesGridPage.editSpaceActionDescription": "Modifier {spaceName}.",
"xpack.spaces.management.spacesGridPage.editSpaceActionName": "Modifier",
"xpack.spaces.management.spacesGridPage.errorTitle": "Erreur lors du chargement des espaces",
"xpack.spaces.management.spacesGridPage.identifierColumnName": "Identificateur",
"xpack.spaces.management.spacesGridPage.loadingTitle": "chargement…",
"xpack.spaces.management.spacesGridPage.searchPlaceholder": "Recherche",
"xpack.spaces.management.spacesGridPage.solutionColumnName": "Afficher la solution",
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -44848,7 +44848,6 @@
"xpack.spaces.management.spacesGridPage.editSpaceActionDescription": "{spaceName} を編集。",
"xpack.spaces.management.spacesGridPage.editSpaceActionName": "編集",
"xpack.spaces.management.spacesGridPage.errorTitle": "スペースの読み込みエラー",
"xpack.spaces.management.spacesGridPage.identifierColumnName": "識別子",
"xpack.spaces.management.spacesGridPage.loadingTitle": "読み込み中…",
"xpack.spaces.management.spacesGridPage.searchPlaceholder": "検索",
"xpack.spaces.management.spacesGridPage.solutionColumnName": "ソリューションビュー",
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -44162,7 +44162,6 @@
"xpack.spaces.management.spacesGridPage.editSpaceActionDescription": "编辑 {spaceName}。",
"xpack.spaces.management.spacesGridPage.editSpaceActionName": "编辑",
"xpack.spaces.management.spacesGridPage.errorTitle": "加载工作区时出错",
"xpack.spaces.management.spacesGridPage.identifierColumnName": "标识符",
"xpack.spaces.management.spacesGridPage.loadingTitle": "正在加载……",
"xpack.spaces.management.spacesGridPage.searchPlaceholder": "搜索",
"xpack.spaces.management.spacesGridPage.solutionColumnName": "解决方案视图",
Expand Down