mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Adding noItemsMessage to CatalogEntitySpec
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
b7021b017f
commit
1feb59562d
@ -81,6 +81,11 @@ export interface CatalogCategorySpec {
|
|||||||
* These columns will not be used in the "Browse" view.
|
* These columns will not be used in the "Browse" view.
|
||||||
*/
|
*/
|
||||||
displayColumns?: CategoryColumnRegistration[];
|
displayColumns?: CategoryColumnRegistration[];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Custom message to display when no items available inside current category
|
||||||
|
*/
|
||||||
|
noItemsMessage?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -250,8 +250,7 @@ class NonInjectedCatalog extends React.Component<Props & Dependencies> {
|
|||||||
? `catalog-items-${activeCategory.metadata.name.replace(" ", "")}`
|
? `catalog-items-${activeCategory.metadata.name.replace(" ", "")}`
|
||||||
: "catalog-items";
|
: "catalog-items";
|
||||||
|
|
||||||
const noItemsMessage = activeCategory?.metadata.name == "Dev Clusters" ? "There are no Dev Clusters in this space"
|
const noItemsMessage = activeCategory?.spec.noItemsMessage ?? "Item list is empty";
|
||||||
: "Item list is empty";
|
|
||||||
|
|
||||||
if (this.activeTab === undefined) {
|
if (this.activeTab === undefined) {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user