Skip to content

Commit

Permalink
Fixes #37716 - Add an option to disable the 'Reclaim Space' warning
Browse files Browse the repository at this point in the history
  • Loading branch information
wbclark authored and chris1984 committed Aug 20, 2024
1 parent 0f7c58f commit 28e0a4e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
12 changes: 7 additions & 5 deletions app/views/foreman/smart_proxies/_reclaim_space.html.erb
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<div>
<h3><%= _('Reclaim Space') %></h3>
<p translate>
<strong>Warning</strong>: reclaiming space will delete all cached content units in "On Demand" repositories on this Smart Proxy.<br>
Take precaution when cleaning custom repositories whose upstream parents don't keep old package versions.
Storage used by deleted repositories will be reclaimed during the next orphan cleanup run.
</p>
<% unless Setting[:hide_reclaim_space_warning] %>
<p translate>
<strong>Warning</strong>: reclaiming space will delete all cached content units in "On Demand" repositories on this Smart Proxy.<br>
Take precaution when cleaning custom repositories whose upstream parents don't keep old package versions.
Storage used by deleted repositories will be reclaimed during the next orphan cleanup run.
</p>
<% end %>
<div class="button">
<button class="btn btn-default" type="button" id="reclaimSpaceButton" ng-click="reclaimSpace()" translate>
Reclaim Space
Expand Down
6 changes: 6 additions & 0 deletions lib/katello/plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,12 @@ def katello_template_setting_values(name)
default: true,
full_name: N_('Calculate content counts on smart proxies automatically'),
description: N_("If this is enabled, content counts on smart proxies will be updated automatically after content sync.")

setting 'hide_reclaim_space_warning',
type: :boolean,
default: false,
full_name: N_('Hide Reclaim Space Warning'),
description: N_('If this is enabled, the Smart Proxy page will suppress the warning message about reclaiming space.')
end
end

Expand Down

0 comments on commit 28e0a4e

Please sign in to comment.