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:
1 parent
b7021b017f
commit
1feb59562d
2 files changed
+6
-2
No files matched your search
@@ -81,6 +81,11 @@ export interface CatalogCategorySpec {
|
||||
* These columns will not be used in the "Browse" view.
|
||||
*/
|
||||
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";
|
||||
|
||||
const noItemsMessage = activeCategory?.metadata.name == "Dev Clusters" ? "There are no Dev Clusters in this space"
|
||||
: "Item list is empty";
|
||||
const noItemsMessage = activeCategory?.spec.noItemsMessage ?? "Item list is empty";
|
||||
|
||||
if (this.activeTab === undefined) {
|
||||
return null;
|
||||
|
||||
Reference in new issue
Block a user