3 commits - spacewalk/config web/html web/modules

Jan Pazdziora adelton at fedoraproject.org
Wed Jun 27 09:24:51 UTC 2012


 spacewalk/config/etc/httpd/conf.d/zz-spacewalk-www.conf |    9 --
 web/html/network/systems/details/delete_confirm.pxt     |   60 ----------------
 web/modules/rhn/RHN/DB/Server.pm                        |   26 ------
 web/modules/sniglets/Sniglets/Servers.pm                |   39 ----------
 4 files changed, 134 deletions(-)

New commits:
commit b36f3af55e9be5188c7e1060948a00eb1a154453
Author: Jan Pazdziora <jpazdziora at redhat.com>
Date:   Wed Jun 27 11:23:56 2012 +0200

    The remove_virtualization_host_entitlement no longer used, removing.

diff --git a/web/modules/rhn/RHN/DB/Server.pm b/web/modules/rhn/RHN/DB/Server.pm
index f9d65fa..8d466ad 100644
--- a/web/modules/rhn/RHN/DB/Server.pm
+++ b/web/modules/rhn/RHN/DB/Server.pm
@@ -641,32 +641,6 @@ EOS
   return $ret;
 }
 
-# bug 247457
-# need to remove virtualization_host by hand to allow removal
-# of corrupt servers from satellite. This is lame, but without
-# a schema change, it is the only viable solution.
-sub remove_virtualization_host_entitlement {
-  my $class = shift;
-  my $server_id = shift;
-
-  my $query = <<EOQ;
-  SELECT sg.id FROM rhnServerGroup sg, rhnServerGroupType sgt
-   WHERE sg.group_type = sgt.id 
-     AND sgt.label = 'virtualization_host'
-EOQ
-
-  my $dbh = RHN::DB->connect();
-  my $sth = $dbh->prepare($query);
-  $sth->execute_h();
-  my ($id) = $sth->fetchrow;
-  $sth->finish;
-  # if we can't find it, just bail
-  return unless $id;
-
-  $class->remove_servers_from_groups([$server_id], [$id], $dbh);
-  $dbh->commit;
-}
-
 sub system_pending_actions_count {
   my $class = shift;
   my $server_id = shift;


commit 4078c12f0eb507e76d08c47fec37b35432f498d5
Author: Jan Pazdziora <jpazdziora at redhat.com>
Date:   Wed Jun 27 11:23:10 2012 +0200

    The rhn:delete_server_cb and delete_server_cb no longer used, removing.

diff --git a/web/modules/sniglets/Sniglets/Servers.pm b/web/modules/sniglets/Sniglets/Servers.pm
index 0f3e9c8..759e28a 100644
--- a/web/modules/sniglets/Sniglets/Servers.pm
+++ b/web/modules/sniglets/Sniglets/Servers.pm
@@ -72,7 +72,6 @@ sub register_callbacks {
   my $class = shift;
   my $pxt = shift;
 
-  $pxt->register_callback('rhn:delete_server_cb' => \&delete_server_cb);
   $pxt->register_callback('rhn:reboot_server_cb' => \&reboot_server_cb);
 
   $pxt->register_callback('rhn:server_prefs_form_cb' => \&server_prefs_form_cb);
@@ -335,44 +334,6 @@ sub system_monitoring_info {
   return $ret;
 }
 
-sub delete_server_cb {
-  my $pxt = shift;
-
-  my $sid = $pxt->param('sid');
-
-  unless ($pxt->dirty_param('brb_confirm')) {
-    my $redir = $pxt->dirty_param('delete_confirm_page');
-    throw "param 'delete_confirm_page' needed but not provided." unless $redir;
-    $pxt->redirect($redir);
-  }
-
-  my $server = RHN::Server->lookup(-id => $sid);
-
-  my $system_set = RHN::Set->lookup(-label => 'system_list', -uid => $pxt->user->id);
-
-  if ($system_set) {
-    $system_set->remove($sid);
-    $system_set->commit;
-  }
-
-  # bug 247457
-  # remove virtualization_host if server has both virtualization_host and
-  # virtualization_host_platform
-  if ($server->has_entitlement('virtualization_host') and 
-      $server->has_entitlement('virtualization_host_platform')) {
-      warn "server has both virtualization_host and virtualization_host_platform entitlements, removing virtualization_host prior to deletion";
-      $server->remove_virtualization_host_entitlement($sid);
-  }
-
-  $server->delete_server;
-
-  my $redir = $pxt->dirty_param('delete_success_page');
-  throw "param 'delete_success_page' needed but not provided." unless $redir;
-  
-  my $message = "?message=message.serverdeleted";
-  $pxt->redirect($redir . $message);
-}
-
 sub server_history_event_details {
   my $pxt = shift;
   my %params = @_;


commit b547f63c33cfc986760c4d690dd0ea7c175f225c
Author: Jan Pazdziora <jpazdziora at redhat.com>
Date:   Wed Jun 27 11:19:59 2012 +0200

    The delete_confirm.pxt was replaced by DeleteConfirm.do.
    
    Ported in commit 9935e718f8d2fd8eba166fe1c9ccb96583546260.

diff --git a/spacewalk/config/etc/httpd/conf.d/zz-spacewalk-www.conf b/spacewalk/config/etc/httpd/conf.d/zz-spacewalk-www.conf
index dddaa85..9a9ed8b 100644
--- a/spacewalk/config/etc/httpd/conf.d/zz-spacewalk-www.conf
+++ b/spacewalk/config/etc/httpd/conf.d/zz-spacewalk-www.conf
@@ -275,15 +275,6 @@ PerlModule PXT::ApacheAuth
 	require acl user_role(org_admin); org_entitlement(sw_mgr_enterprise)
 </Directory>
 
-<Directory "/var/www/html/network/users/details">
-	<Files delete_confirm.pxt>
-		AuthType Basic
-		AuthName "RHN Org Admin Area"
-		PerlAuthenHandler PXT::ApacheAuth
-		require acl user_role(org_admin)
-	</Files>
-</Directory>
-
 <Directory "/var/www/html/network/users/details/contact_methods">
 	AuthType Basic
 	AuthName "RHN Monitoring Area"
diff --git a/web/html/network/systems/details/delete_confirm.pxt b/web/html/network/systems/details/delete_confirm.pxt
deleted file mode 100644
index ad71044..0000000
--- a/web/html/network/systems/details/delete_confirm.pxt
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="utf8"?>
-<pxt-passthrough>
-
-<pxt-use class="Grail::Frame" />
-<pxt-use class="Sniglets::Servers" />
-<pxt-use class="Sniglets::HTML" />
-
-    <pxt-use class="Sniglets::HTML" />
-
-  <grail-canvas-template base="/templates/c.pxt" mode="main_canvas">
-<pxt-formvar>
-    <pxt-include-late file="/network/components/systems/system_details_toolbar.pxi" />
-</pxt-formvar>
-
-    <rhn-navi-nav prefix="system_details" depth="0" file="/nav/system_detail.xml" style="contentnav" />
-
-
-<h2>Confirm System Profile Deletion</h2>
-
-<pxt-include-late file="/network/components/message_queues/local.pxi" />
-
-<div class="page-summary">
-
-<pxt-formvar>
-	<p>This will delete this profile <strong>permanently</strong>.</p>
-
-	<p><strong>If you are uncertain about performing this action, 
-	please <a href="/rhn/systems/details/Overview.do?sid={formvar:sid}">review the details</a> for this system.</strong></p>
-        <p>Otherwise, confirm the immediate deletion of this system profile by
-        clicking the button below.</p>
-
-	<p><strong>Please click the button only once; it will take a few moments for the deletion process to complete.</strong></p>
-
-</pxt-formvar>
-</div>
-
-<br />
-
-<pxt-form>
-
-<div align="right">
-<hr />
-
-<pxt-formvar>
-
-<input type="hidden" name="sid" value="{formvar:sid}" />
-<input type="hidden" name="brb_confirm" value="1" />
-<input type="hidden" name="delete_success_page" value="/rhn/systems/Overview.do" />
-<input type="submit" name="system_deletion_brb" value="Delete Profile" />
-<input type="hidden" name="pxt:trap" value="rhn:delete_server_cb" />
-
-</pxt-formvar>
-</div>
-
-
-</pxt-form>
-
-  </grail-canvas-template>
-
-</pxt-passthrough>




More information about the spacewalk-commits mailing list