Skip to content

Commit

Permalink
[Maps] Show empty list when all saved maps in list deleted (elastic#9…
Browse files Browse the repository at this point in the history
…5126)

Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
Aaron Caldwell and kibanamachine authored Apr 1, 2021
1 parent e0a1fe1 commit 5db8027
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -347,20 +347,6 @@ class TableListView extends React.Component<TableListViewProps, TableListViewSta
}
}

renderNoItemsMessage() {
if (this.props.noItemsFragment) {
return this.props.noItemsFragment;
} else {
return (
<FormattedMessage
id="kibana-react.tableListView.listing.noAvailableItemsMessage"
defaultMessage="No {entityNamePlural} available."
values={{ entityNamePlural: this.props.entityNamePlural }}
/>
);
}
}

renderToolsLeft() {
const selection = this.state.selectedIds;

Expand Down Expand Up @@ -473,10 +459,9 @@ class TableListView extends React.Component<TableListViewProps, TableListViewSta
}

renderListingOrEmptyState() {
if (!this.state.fetchError && this.hasNoItems()) {
return this.renderNoItemsMessage();
if (this.props.noItemsFragment && !this.state.fetchError && this.hasNoItems()) {
return this.props.noItemsFragment;
}

return this.renderListing();
}

Expand Down
2 changes: 0 additions & 2 deletions x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -3027,7 +3027,6 @@
"kibana-react.tableListView.listing.listingLimitExceeded.advancedSettingsLinkText": "高度な設定",
"kibana-react.tableListView.listing.listingLimitExceededDescription": "{totalItems} 件の {entityNamePlural} がありますが、{listingLimitText} の設定により {listingLimitValue} 件までしか下の表に表示できません。{advancedSettingsLink} の下でこの設定を変更できます。",
"kibana-react.tableListView.listing.listingLimitExceededTitle": "リスティング制限超過",
"kibana-react.tableListView.listing.noAvailableItemsMessage": "利用可能な {entityNamePlural} がありません。",
"kibana-react.tableListView.listing.noMatchedItemsMessage": "検索条件に一致する {entityNamePlural} がありません。",
"kibana-react.tableListView.listing.table.actionTitle": "アクション",
"kibana-react.tableListView.listing.table.editActionDescription": "編集",
Expand Down Expand Up @@ -12579,7 +12578,6 @@
"xpack.maps.mapListing.descriptionFieldTitle": "説明",
"xpack.maps.mapListing.entityName": "マップ",
"xpack.maps.mapListing.entityNamePlural": "マップ",
"xpack.maps.mapListing.errorAttemptingToLoadSavedMaps": "マップを読み込めません",
"xpack.maps.mapListing.titleFieldTitle": "タイトル",
"xpack.maps.maps.choropleth.rightSourcePlaceholder": "インデックスパターンを選択",
"xpack.maps.mapSavedObjectLabel": "マップ",
Expand Down
2 changes: 0 additions & 2 deletions x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -3048,7 +3048,6 @@
"kibana-react.tableListView.listing.listingLimitExceeded.advancedSettingsLinkText": "高级设置",
"kibana-react.tableListView.listing.listingLimitExceededDescription": "您有 {totalItems} 个{entityNamePlural},但您的“{listingLimitText}”设置阻止下表显示 {listingLimitValue} 个以上。您可以在“{advancedSettingsLink}”下更改此设置。",
"kibana-react.tableListView.listing.listingLimitExceededTitle": "已超过列表限制",
"kibana-react.tableListView.listing.noAvailableItemsMessage": "没有可用的{entityNamePlural}。",
"kibana-react.tableListView.listing.noMatchedItemsMessage": "没有任何{entityNamePlural}匹配您的搜索。",
"kibana-react.tableListView.listing.table.actionTitle": "操作",
"kibana-react.tableListView.listing.table.editActionDescription": "编辑",
Expand Down Expand Up @@ -12744,7 +12743,6 @@
"xpack.maps.mapListing.descriptionFieldTitle": "描述",
"xpack.maps.mapListing.entityName": "地图",
"xpack.maps.mapListing.entityNamePlural": "地图",
"xpack.maps.mapListing.errorAttemptingToLoadSavedMaps": "无法加载地图",
"xpack.maps.mapListing.titleFieldTitle": "标题",
"xpack.maps.maps.choropleth.rightSourcePlaceholder": "选择索引模式",
"xpack.maps.mapSavedObjectLabel": "地图",
Expand Down

0 comments on commit 5db8027

Please sign in to comment.