diff --git a/lib/foreman_snapshot_management/engine.rb b/lib/foreman_snapshot_management/engine.rb
index 600233c..23ec580 100644
--- a/lib/foreman_snapshot_management/engine.rb
+++ b/lib/foreman_snapshot_management/engine.rb
@@ -63,7 +63,7 @@ class Engine < ::Rails::Engine
context.add_pagelet :main_tabs,
:name => N_('Snapshots'),
:partial => 'hosts/snapshots_tab',
- :onlyif => proc { |host| host&.compute_resource&.capable?(:snapshots) }
+ :onlyif => proc { |host| host&.compute_resource&.capable?(:snapshots) && host&.uuid }
end
end
end
diff --git a/webpack/components/SnapshotManagementCard/SnapshotManagementCard.js b/webpack/components/SnapshotManagementCard/SnapshotManagementCard.js
index deb6900..504931d 100644
--- a/webpack/components/SnapshotManagementCard/SnapshotManagementCard.js
+++ b/webpack/components/SnapshotManagementCard/SnapshotManagementCard.js
@@ -18,26 +18,28 @@ const SnapshotManagementCard = ({ hostDetails, ...props }) => {
hostDetails?.capabilities?.includes('snapshot_include_quiesce') || false,
};
- if (hostDetails?.id && hostDetails?.permissions)
- children.push(
-
+ if (hostDetails?.uuid) {
+ if (hostDetails?.id && hostDetails?.permissions)
+ children.push(
+
+ );
+ return (
+
+ {children}
+
);
- return (
-
- {children}
-
- );
+ }
};
export default SnapshotManagementCard;
@@ -46,6 +48,7 @@ SnapshotManagementCard.propTypes = {
hostDetails: PropTypes.shape({
name: PropTypes.string,
id: PropTypes.number,
+ uuid: PropTypes.string,
capabilities: PropTypes.array,
permissions: PropTypes.shape({
create_snapshots: PropTypes.bool,