Changes to 'refs/tags/spacewalk-schema-1.8.55-1'
by Jan Pazdziora
Tag 'spacewalk-schema-1.8.55-1' created by Jan Pazdziora <jpazdziora(a)redhat.com> at 2012-06-27 08:46 +0000
Tagging package [spacewalk-schema] version [1.8.55-1] in directory [schema/spacewalk/].
Changes since spacewalk-java-1.8.101-1:
Jan Pazdziora (4):
Perl Notes pages seem like dead code.
Table rhnServerGroupNotes not used, removing.
Automatic commit of package [spacewalk-web] release [1.8.22-1].
Automatic commit of package [spacewalk-schema] release [1.8.55-1].
---
rel-eng/packages/spacewalk-schema | 2
rel-eng/packages/spacewalk-web | 2
schema/spacewalk/common/tables/rhnServerGroupNotes.sql | 51 --
schema/spacewalk/common/tables/tables.deps | 1
schema/spacewalk/oracle/triggers/rhnServerGroupNotes.sql | 25 -
schema/spacewalk/postgres/triggers/rhnServerGroupNotes.sql | 17
schema/spacewalk/spacewalk-schema.spec | 5
schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/107-rhnServerGroupNotes-drop.sql | 3
schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/108-rhn_servergroup_note_mod_trig_fun-drop.sql.oracle | 1
schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/108-rhn_servergroup_note_mod_trig_fun-drop.sql.postgresql | 4
web/html/network/systems/details/notes/delete_note_conf.pxt | 52 --
web/html/network/systems/details/notes/edit.pxt | 72 ---
web/html/network/systems/details/notes/notes_list.pxt | 45 -
web/modules/rhn/MANIFEST | 2
web/modules/rhn/RHN/DB/Notes.pm | 235 ----------
web/modules/rhn/RHN/ServerNotes.pm | 47 --
web/modules/sniglets/MANIFEST | 1
web/modules/sniglets/Sniglets/ServerNotes.pm | 147 ------
web/spacewalk-web.spec | 6
19 files changed, 18 insertions(+), 700 deletions(-)
---
11 years, 9 months
2 commits - rel-eng/packages schema/spacewalk web/spacewalk-web.spec
by Jan Pazdziora
rel-eng/packages/spacewalk-schema | 2 +-
rel-eng/packages/spacewalk-web | 2 +-
schema/spacewalk/spacewalk-schema.spec | 5 ++++-
web/spacewalk-web.spec | 5 ++++-
4 files changed, 10 insertions(+), 4 deletions(-)
New commits:
commit d2203dcf3d57a77b12dc8ec5525d4ce48e11348e
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Jun 27 10:46:39 2012 +0200
Automatic commit of package [spacewalk-schema] release [1.8.55-1].
diff --git a/rel-eng/packages/spacewalk-schema b/rel-eng/packages/spacewalk-schema
index 4f5bfa8..c259ed4 100644
--- a/rel-eng/packages/spacewalk-schema
+++ b/rel-eng/packages/spacewalk-schema
@@ -1 +1 @@
-1.8.54-1 schema/spacewalk/
+1.8.55-1 schema/spacewalk/
diff --git a/schema/spacewalk/spacewalk-schema.spec b/schema/spacewalk/spacewalk-schema.spec
index 7b83e34..5fdcac1 100644
--- a/schema/spacewalk/spacewalk-schema.spec
+++ b/schema/spacewalk/spacewalk-schema.spec
@@ -2,7 +2,7 @@ Name: spacewalk-schema
Group: Applications/Internet
Summary: Oracle SQL schema for Spacewalk server
-Version: 1.8.54
+Version: 1.8.55
Release: 1%{?dist}
Source0: %{name}-%{version}.tar.gz
@@ -68,6 +68,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/spacewalk-sql*
%changelog
+* Wed Jun 27 2012 Jan Pazdziora 1.8.55-1
+- Table rhnServerGroupNotes not used, removing.
+
* Fri Jun 22 2012 Jan Pazdziora 1.8.54-1
- 712313 - Add installed size to repodata
commit cefd8a5da7813726f2cb78f49fb3541568b479e8
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Jun 27 10:46:34 2012 +0200
Automatic commit of package [spacewalk-web] release [1.8.22-1].
diff --git a/rel-eng/packages/spacewalk-web b/rel-eng/packages/spacewalk-web
index 2527ac5..82f383f 100644
--- a/rel-eng/packages/spacewalk-web
+++ b/rel-eng/packages/spacewalk-web
@@ -1 +1 @@
-1.8.21-1 web/
+1.8.22-1 web/
diff --git a/web/spacewalk-web.spec b/web/spacewalk-web.spec
index 97ec176..e4312ae 100644
--- a/web/spacewalk-web.spec
+++ b/web/spacewalk-web.spec
@@ -2,7 +2,7 @@ Name: spacewalk-web
Summary: Spacewalk Web site - Perl modules
Group: Applications/Internet
License: GPLv2
-Version: 1.8.21
+Version: 1.8.22
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk/
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -253,6 +253,9 @@ rm -rf $RPM_BUILD_ROOT
# $Id$
%changelog
+* Wed Jun 27 2012 Jan Pazdziora 1.8.22-1
+- Perl Notes pages seem like dead code.
+
* Wed Jun 27 2012 Michael Mraka <michael.mraka(a)redhat.com> 1.8.21-1
- 835608 - error messages in PostgreSQL have different pattern
11 years, 9 months
schema/spacewalk
by Jan Pazdziora
schema/spacewalk/common/tables/rhnServerGroupNotes.sql | 51 ----------
schema/spacewalk/common/tables/tables.deps | 1
schema/spacewalk/oracle/triggers/rhnServerGroupNotes.sql | 25 ----
schema/spacewalk/postgres/triggers/rhnServerGroupNotes.sql | 17 ---
schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/107-rhnServerGroupNotes-drop.sql | 3
schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/108-rhn_servergroup_note_mod_trig_fun-drop.sql.oracle | 1
schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/108-rhn_servergroup_note_mod_trig_fun-drop.sql.postgresql | 4
7 files changed, 8 insertions(+), 94 deletions(-)
New commits:
commit 21e4cf086b5cbb19e2e0090a23a7abd9adffaafe
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Jun 27 10:45:52 2012 +0200
Table rhnServerGroupNotes not used, removing.
diff --git a/schema/spacewalk/common/tables/rhnServerGroupNotes.sql b/schema/spacewalk/common/tables/rhnServerGroupNotes.sql
deleted file mode 100644
index 4774da3..0000000
--- a/schema/spacewalk/common/tables/rhnServerGroupNotes.sql
+++ /dev/null
@@ -1,51 +0,0 @@
---
--- Copyright (c) 2008 Red Hat, Inc.
---
--- This software is licensed to you under the GNU General Public License,
--- version 2 (GPLv2). There is NO WARRANTY for this software, express or
--- implied, including the implied warranties of MERCHANTABILITY or FITNESS
--- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
--- along with this software; if not, see
--- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
---
--- Red Hat trademarks are not licensed under GPLv2. No permission is
--- granted to use or replicate Red Hat trademarks that are incorporated
--- in this software or its documentation.
---
-
-
-CREATE TABLE rhnServerGroupNotes
-(
- id NUMBER NOT NULL
- CONSTRAINT rhn_servergrp_note_id_pk PRIMARY KEY
- USING INDEX TABLESPACE [[64k_tbs]],
- creator NUMBER
- CONSTRAINT rhn_servergrp_note_creator_fk
- REFERENCES web_contact (id)
- ON DELETE SET NULL,
- server_group_id NUMBER NOT NULL
- CONSTRAINT rhn_servergrp_note_fk
- REFERENCES rhnServerGroup (id)
- ON DELETE CASCADE,
- subject VARCHAR2(80) NOT NULL,
- note VARCHAR2(4000) NOT NULL,
- created DATE
- DEFAULT (sysdate) NOT NULL,
- modified DATE
- DEFAULT (sysdate) NOT NULL
-)
-ENABLE ROW MOVEMENT
-;
-
-CREATE INDEX rhn_servergrp_note_srvr_id_idx
- ON rhnServerGroupNotes (server_group_id)
- TABLESPACE [[64k_tbs]]
- NOLOGGING;
-
-CREATE INDEX rhn_servergrp_note_creator_idx
- ON rhnServerGroupNotes (creator)
- TABLESPACE [[64k_tbs]]
- NOLOGGING;
-
-CREATE SEQUENCE rhn_servergrp_note_id_seq;
-
diff --git a/schema/spacewalk/common/tables/tables.deps b/schema/spacewalk/common/tables/tables.deps
index c0c1c3c..fcfe966 100644
--- a/schema/spacewalk/common/tables/tables.deps
+++ b/schema/spacewalk/common/tables/tables.deps
@@ -153,7 +153,6 @@ rhnServerCustomDataValue :: rhnCustomDataKey
rhnServerDMI :: rhnServer
rhnServerGroup :: rhnServerGroupType web_customer
rhnServerGroupMembers :: rhnServer rhnServerGroup
-rhnServerGroupNotes :: web_contact rhnServerGroup
rhnServerGroupTypeFeature :: rhnFeature rhnServerGroupType
rhnServerHistory :: rhnServer
rhnServerInfo :: rhnServer
diff --git a/schema/spacewalk/oracle/triggers/rhnServerGroupNotes.sql b/schema/spacewalk/oracle/triggers/rhnServerGroupNotes.sql
deleted file mode 100644
index b17da42..0000000
--- a/schema/spacewalk/oracle/triggers/rhnServerGroupNotes.sql
+++ /dev/null
@@ -1,25 +0,0 @@
-
---
--- Copyright (c) 2008 Red Hat, Inc.
---
--- This software is licensed to you under the GNU General Public License,
--- version 2 (GPLv2). There is NO WARRANTY for this software, express or
--- implied, including the implied warranties of MERCHANTABILITY or FITNESS
--- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
--- along with this software; if not, see
--- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
---
--- Red Hat trademarks are not licensed under GPLv2. No permission is
--- granted to use or replicate Red Hat trademarks that are incorporated
--- in this software or its documentation.
---
-
-CREATE OR REPLACE TRIGGER
-rhn_servergroup_note_mod_trig
-BEFORE INSERT OR UPDATE ON rhnServerGroupNotes
-FOR EACH ROW
-BEGIN
- :new.modified := sysdate;
-END;
-/
-show errors
diff --git a/schema/spacewalk/postgres/triggers/rhnServerGroupNotes.sql b/schema/spacewalk/postgres/triggers/rhnServerGroupNotes.sql
deleted file mode 100644
index e21d6ed..0000000
--- a/schema/spacewalk/postgres/triggers/rhnServerGroupNotes.sql
+++ /dev/null
@@ -1,17 +0,0 @@
--- oracle equivalent source sha1 841c287c0b98af0e2234cce570dd68abf0ea2c8c
--- retrieved from ./1241102873/cdc6d42049bf86fbc9f1d3a5c54275eeacbd641d/schema/spacewalk/oracle/triggers/rhnServerGroupNotes.sql
-create or replace function rhn_servergroup_note_mod_trig_fun() returns trigger as
-$$
-begin
- new.modified := current_timestamp;
- return new;
-end;
-$$ language plpgsql;
-
-create trigger
-rhn_servergroup_note_mod_trig
-before insert or update on rhnServerGroupNotes
-for each row
-execute procedure rhn_servergroup_note_mod_trig_fun();
-
-
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/107-rhnServerGroupNotes-drop.sql b/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/107-rhnServerGroupNotes-drop.sql
new file mode 100644
index 0000000..1c95421
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/107-rhnServerGroupNotes-drop.sql
@@ -0,0 +1,3 @@
+
+drop table rhnServerGroupNotes;
+
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/108-rhn_servergroup_note_mod_trig_fun-drop.sql.oracle b/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/108-rhn_servergroup_note_mod_trig_fun-drop.sql.oracle
new file mode 100644
index 0000000..b7b00b1
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/108-rhn_servergroup_note_mod_trig_fun-drop.sql.oracle
@@ -0,0 +1 @@
+-- This file is intentionally left empty.
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/108-rhn_servergroup_note_mod_trig_fun-drop.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/108-rhn_servergroup_note_mod_trig_fun-drop.sql.postgresql
new file mode 100644
index 0000000..e124417
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/108-rhn_servergroup_note_mod_trig_fun-drop.sql.postgresql
@@ -0,0 +1,4 @@
+-- oracle equivalent source sha1 b14267384bc104605623a41b755e68e0103b5aa8
+
+drop function rhn_servergroup_note_mod_trig_fun();
+
11 years, 9 months
web/html web/modules web/spacewalk-web.spec
by Jan Pazdziora
web/html/network/systems/details/notes/delete_note_conf.pxt | 52 --
web/html/network/systems/details/notes/edit.pxt | 72 ---
web/html/network/systems/details/notes/notes_list.pxt | 45 --
web/modules/rhn/MANIFEST | 2
web/modules/rhn/RHN/DB/Notes.pm | 235 ------------
web/modules/rhn/RHN/ServerNotes.pm | 47 --
web/modules/sniglets/MANIFEST | 1
web/modules/sniglets/Sniglets/ServerNotes.pm | 147 -------
web/spacewalk-web.spec | 1
9 files changed, 602 deletions(-)
New commits:
commit 2942d4ed908894629c85677e0e9a79c2d6f37cc6
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Jun 27 10:16:37 2012 +0200
Perl Notes pages seem like dead code.
Notes pages were migrated to Java in e9ebf25976da8ee6b632268293fb79d8af5e3f4d.
diff --git a/web/html/network/systems/details/notes/delete_note_conf.pxt b/web/html/network/systems/details/notes/delete_note_conf.pxt
deleted file mode 100644
index 693432a..0000000
--- a/web/html/network/systems/details/notes/delete_note_conf.pxt
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="utf8"?>
-<pxt-passthrough>
- <pxt-use class="Grail::Frame" />
- <pxt-use class="Sniglets::HTML" />
- <pxt-use class="Sniglets::Servers" />
- <pxt-use class="Sniglets::ServerNotes" />
- <pxt-use class="Sniglets::Users" />
-
- <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 Note Deletion</h2>
-
- <div class="page-summary"><p>Are you certain you wish to delete this system note?</p></div>
-
-<pxt-form>
- <rhn-server-note-edit-form>
- <table class="details">
- <tr>
- <th>Subject:</th>
- <td>{subject}</td>
- </tr>
-
- <tr>
- <th>Details:</th>
- <td>{note}</td>
- </tr>
- </table>
- </rhn-server-note-edit-form>
-
-<input type="hidden" name="pxt:trap" value="rhn:server_note_cb" />
-<pxt-hidden name="sid|nid" />
-
-<pxt-formvar>
-<input type="hidden" name="redirect_success" value="notes_list.pxt?sid={formvar:sid}" />
-</pxt-formvar>
-
-<div align="right">
-<hr />
- <input name="delete" type="submit" value="Delete Note" />
-</div>
-</pxt-form>
- </grail-canvas-template>
-</pxt-passthrough>
-
-
diff --git a/web/html/network/systems/details/notes/edit.pxt b/web/html/network/systems/details/notes/edit.pxt
deleted file mode 100644
index 76f70e7..0000000
--- a/web/html/network/systems/details/notes/edit.pxt
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="utf8"?>
-<pxt-passthrough>
- <pxt-use class="Grail::Frame" />
- <pxt-use class="Sniglets::HTML" />
- <pxt-use class="Sniglets::Servers" />
- <pxt-use class="Sniglets::ServerNotes" />
- <pxt-use class="Sniglets::Users" />
-
- <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" />
-
- <rhn-navi-nav prefix="system_details" depth="0" file="/nav/system_detail.xml" style="contentnav" />
-
-
- <rhn-toolbar base="h2" img="/img/rhn-icon-note.gif" deletion-url="/network/systems/details/notes/delete_note_conf.pxt?nid={formvar:nid}&sid={formvar:sid}" deletion-type="note" deletion-acl="formvar_exists(nid)">
- <rhn-require acl="formvar_exists(nid)">Edit</rhn-require>
- <rhn-require acl="not formvar_exists(nid)">Create</rhn-require>
- System Note
- </rhn-toolbar>
-
-<pxt-include-late file="/network/components/message_queues/local.pxi" />
-
- <div class="page-summary">
- <p>
- Create or edit a note for this system using the form below.
- </p>
- </div>
-
- <pxt-form method="POST">
-<rhn-server-note-edit-form>
- <table class="details">
- <tr>
- <th>Subject:</th>
- <td>
- <input type="text" name="subject" size="40" maxlength="80" value="{subject}" />
- </td>
- </tr>
-
- <tr>
- <th>Details:</th>
- <td>
- <textarea name="note" rows="5" cols="40">{note}</textarea>
- </td>
- </tr>
- </table>
-
-
- <div align="right">
- <hr />
- <pxt-hidden name="nid|sid" />
- <input type="hidden" name="pxt:trap" value="rhn:server_note_cb" />
- <input type="hidden" name="redirect_success" value="notes_list.pxt?sid={formvar:sid}" />
-<rhn-if-var formvar="nid">
-<pxt-comment>
- <input name="delete" type="submit" value="Delete" />
-</pxt-comment>
- <input type="submit" value="Update" />
-</rhn-if-var>
-<rhn-unless-var formvar="nid">
- <input type="submit" value="Create" />
-</rhn-unless-var>
- </div>
-</rhn-server-note-edit-form>
- </pxt-form>
-</pxt-formvar>
- </grail-canvas-template>
-</pxt-passthrough>
-
-
diff --git a/web/html/network/systems/details/notes/notes_list.pxt b/web/html/network/systems/details/notes/notes_list.pxt
deleted file mode 100644
index 200f38c..0000000
--- a/web/html/network/systems/details/notes/notes_list.pxt
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="utf8"?>
-<pxt-passthrough>
- <pxt-use class="Grail::Frame" />
- <pxt-use class="Sniglets::Servers" />
- <pxt-use class="Sniglets::Lists" />
- <pxt-use class="Sniglets::Navi" />
- <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" />
-
- <rhn-navi-nav prefix="system_details" depth="0" file="/nav/system_detail.xml" style="contentnav" />
-
- <rhn-toolbar base="h2" img="/img/rhn-icon-note.gif" creation-url="/network/systems/details/notes/edit.pxt?sid={formvar:sid}" creation-type="note">
- System Notes
- </rhn-toolbar>
-
- <div class="page-summary">
- <p>
- The following notes are associated with this system.
- </p>
- </div>
-
-<rhn-listview class="Sniglets::ListView::GeneralList" mode="system_notes">
- <empty_list_message>No notes.</empty_list_message>
-
- <formvars>
- <var name="sid" />
- </formvars>
-
- <column name="Subject" label="subject" width="35%">
- <url>/network/systems/details/notes/edit.pxt?nid={column:id}&sid={formvar:sid}</url>
- </column>
-
- <column name="Details" label="note" width="50%" />
-
- <column name="Updated" label="modified" width="15%" />
-</rhn-listview>
-
-</pxt-formvar>
- </grail-canvas-template>
-</pxt-passthrough>
-
-
diff --git a/web/modules/rhn/MANIFEST b/web/modules/rhn/MANIFEST
index 764293b..8723e33 100644
--- a/web/modules/rhn/MANIFEST
+++ b/web/modules/rhn/MANIFEST
@@ -11,7 +11,6 @@ RHN/DB/ChannelEditor.pm
RHN/DB/Channel.pm
RHN/DB/Errata.pm
RHN/DB/JoinClass.pm
-RHN/DB/Notes.pm
RHN/DB/Org.pm
RHN/DB/Package.pm
RHN/DB.pm
@@ -38,7 +37,6 @@ RHN.pm
RHN/Scheduler.pm
RHN/ServerActions.pm
RHN/ServerGroup.pm
-RHN/ServerNotes.pm
RHN/ServerPackage.pm
RHN/Server.pm
RHN/Session.pm
diff --git a/web/modules/rhn/RHN/DB/Notes.pm b/web/modules/rhn/RHN/DB/Notes.pm
deleted file mode 100644
index 4dea065..0000000
--- a/web/modules/rhn/RHN/DB/Notes.pm
+++ /dev/null
@@ -1,235 +0,0 @@
-#
-# Copyright (c) 2008--2012 Red Hat, Inc.
-#
-# This software is licensed to you under the GNU General Public License,
-# version 2 (GPLv2). There is NO WARRANTY for this software, express or
-# implied, including the implied warranties of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
-# along with this software; if not, see
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
-#
-# Red Hat trademarks are not licensed under GPLv2. No permission is
-# granted to use or replicate Red Hat trademarks that are incorporated
-# in this software or its documentation.
-#
-
-package RHN::DB::Notes;
-
-use strict;
-use Carp;
-use RHN::DB;
-use RHN::DB::TableClass;
-
-use Params::Validate qw/:all/;
-Params::Validate::validation_options(strip_leading => "-");
-
-# fields common to all notes tables
-my @common_fields = qw { id creator subject note created modified };
-
-# fields specific to ServerNotes table
-my @sn_fields = qw { server_id };
-
-# fields specific to ServerGroupNotes table
-my @sgn_fields = qw { server_group_id };
-
-# Structure used to generate packages:
-# [0] package name
-# [1] table name
-# [2] sequence name
-# [3] additional column(s) not found in @oommon_fields
-my @pkgs =(
- [
- "RHN::DB::ServerGroupNotes",
- "rhnServerGroupNotes",
- "rhn_servergrp_note_id_seq",
- [ @sgn_fields ]
- ],
- [
- "RHN::DB::ServerNotes",
- "rhnServerNotes",
- "rhn_server_note_id_seq",
- [ @sn_fields ]
- ]
- );
-
-sub blank_note {
- bless { }, shift;
-}
-
-sub create_note {
- my $note = shift->blank_note;
- $note->{__id__} = -1;
- return $note;
-}
-
-sub lookup {
- my $class = shift;
- my %params = validate(@_, {id => 1});
- my $id = $params{id};
-
- my $dbh = RHN::DB->connect;
- my $ret = $class->blank_note;
-
- my $query = sprintf "SELECT %s FROM %s N WHERE N.id = ?",
- join(", ",map{ "N.$_" } @common_fields,$ret->columns),
- $ret->table;
-
- my $sth = $dbh->prepare($query);
- $sth->execute($id);
- my @cols = $sth->fetchrow;
- $sth->finish;
-
- if ($cols[0]) {
- $ret->{__id__} = $cols[0];
- $ret->$_(shift @cols) foreach (@common_fields,$ret->columns);
- delete $ret->{":modified:"};
- }
- else {
- local $" = ", ";
- croak "Error loading note $id; no ID? (@cols)";
- }
-
- return $ret;
-}
-
-sub commit {
- my $self = shift;
- my $dbh = RHN::DB->connect;
- my $mode = '';
- my $sth;
- my $query;
-
- my @modified;
- my %modified;
-
-
- if ($self->{__delete__}) {
- # hack alert
- $query = "DELETE FROM ";
- $query .= $self->table;
- $query .= " WHERE ID = ";
- $query .= $self->id;
- }
-
- else {
- if ($self->id == -1)
- {
- $mode = 'insert';
- $query = "SELECT sequence_nextval('". $self->sequence . "') FROM DUAL";
-
- $sth = $dbh->prepare($query);
- $sth->execute;
- my ($id) = $sth->fetchrow;
- croak "No new note id from sequence (possible error: " . $sth->errstr . ")" unless $id;
- $sth->finish;
-
- $self->{":modified:"}->{id} = 1;
- $self->{__id__} = $id;
- $mode = 'insert';
- }
- else {
- $mode = 'update';
- }
- croak "$self->commit called on org without valid id" unless $self->id and $self->id > 0;
-
- @modified = keys %{$self->{":modified:"}};
- %modified = map { $_ => 1 } @modified;
- return unless @modified;
- }
-
- $dbh = RHN::DB->connect;
-
- my $o = new RHN::DB::TableClass($self->table,"T","",@common_fields,$self->columns);
- if ($mode eq 'update') {
- $query = $o->update_query($o->methods_to_columns(@modified));
- $query .= "T.ID = ?";
- }
- elsif ($mode eq 'insert') {
- $query = $o->insert_query($o->methods_to_columns(@modified));
- }
-
- $sth = $dbh->prepare($query);
- $sth->execute((map { $self->$_() } grep { $modified{$_} } $o->method_names), ($mode eq 'update') ? ($self->id) : ());
-
- $dbh->commit;
- delete $self->{":modified:"};
-}
-
-#
-# Generate getter/setters
-#
-foreach my $field (@common_fields) {
- my $sub = q {
- sub [[field]] {
- my $self = shift;
- if (@_ and "[[field]]" ne "id") {
- $self->{":modified:"}->{[[field]]} = 1;
- $self->{__[[field]]__} = shift;
- }
- return $self->{__[[field]]__};
- }
- };
-
- $sub =~ s/\[\[field\]\]/$field/g;
-
- eval $sub;
-
- croak $@ if($@);
-}
-
-#
-# Generate packages
-#
-foreach my $p (@pkgs) {
-
- my $pkg = q {
- package [[package]];
- @[[package]]::ISA = ( "RHN::DB::Notes" );
-
- sub columns {
- return qw{ [[columns]] };
- }
-
- sub table {
- return "[[table]]";
- }
-
- sub sequence {
- return "[[sequence]]";
- }
-
- 1;
- };
-
- $pkg =~ s/\[\[package\]\]/$p->[0]/g;
- $pkg =~ s/\[\[table\]\]/$p->[1]/g;
- $pkg =~ s/\[\[sequence\]\]/$p->[2]/g;
- $pkg =~ s/\[\[columns\]\]/@{$p->[3]}/g;
-
- eval $pkg;
-
- croak $@ if($@);
-
- # Generate accessors unique to this package
- foreach my $field (@{$p->[3]}) {
- my $sub = q {
- sub [[package]]::[[field]] {
- my $self = shift;
- if (@_ and "[[field]]" ne "id") {
- $self->{":modified:"}->{[[field]]} = 1;
- $self->{__[[field]]__} = shift;
- }
- return $self->{__[[field]]__};
- }
- };
-
- $sub =~ s/\[\[field\]\]/$field/g;
- $sub =~ s/\[\[package\]\]/$p->[0]/g;
-
- eval $sub;
-
- croak $@ if ($@);
- }
-}
-
-1;
diff --git a/web/modules/rhn/RHN/ServerNotes.pm b/web/modules/rhn/RHN/ServerNotes.pm
deleted file mode 100644
index 65e8952..0000000
--- a/web/modules/rhn/RHN/ServerNotes.pm
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# Copyright (c) 2008--2010 Red Hat, Inc.
-#
-# This software is licensed to you under the GNU General Public License,
-# version 2 (GPLv2). There is NO WARRANTY for this software, express or
-# implied, including the implied warranties of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
-# along with this software; if not, see
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
-#
-# Red Hat trademarks are not licensed under GPLv2. No permission is
-# granted to use or replicate Red Hat trademarks that are incorporated
-# in this software or its documentation.
-#
-
-use strict;
-
-package RHN::ServerNotes;
-
-use RHN::DB::Notes;
-
-our @ISA = qw/RHN::DB::ServerNotes/;
-
-sub lookup {
- my $class = shift;
- my $first_arg = $_[0];
-
- die "No argument to $class->lookup"
- unless $first_arg;
-
- if (substr($first_arg,0,1) eq '-') {
- return $class->SUPER::lookup(@_);
- }
- else {
- warn "deprecated use of unparameterized $class->lookup from (" . join(', ', caller) . ")\n";
- return $class->SUPER::lookup(-id => $first_arg);
- }
-}
-
-sub create {
- my $class = shift;
-
- return RHN::DB::ServerNotes->create_note(@_);
-}
-
-1;
-
diff --git a/web/modules/sniglets/MANIFEST b/web/modules/sniglets/MANIFEST
index 131e3c8..69720ac 100644
--- a/web/modules/sniglets/MANIFEST
+++ b/web/modules/sniglets/MANIFEST
@@ -26,7 +26,6 @@ Sniglets/ServerActions.pm
Sniglets/ServerGroupList.pm
Sniglets/ServerGroup.pm
Sniglets/ServerList.pm
-Sniglets/ServerNotes.pm
Sniglets/Servers.pm
Sniglets/Sets.pm
Sniglets/Sitenav.pm
diff --git a/web/modules/sniglets/Sniglets/ServerNotes.pm b/web/modules/sniglets/Sniglets/ServerNotes.pm
deleted file mode 100644
index 627f019..0000000
--- a/web/modules/sniglets/Sniglets/ServerNotes.pm
+++ /dev/null
@@ -1,147 +0,0 @@
-#
-# Copyright (c) 2008--2010 Red Hat, Inc.
-#
-# This software is licensed to you under the GNU General Public License,
-# version 2 (GPLv2). There is NO WARRANTY for this software, express or
-# implied, including the implied warranties of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
-# along with this software; if not, see
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
-#
-# Red Hat trademarks are not licensed under GPLv2. No permission is
-# granted to use or replicate Red Hat trademarks that are incorporated
-# in this software or its documentation.
-#
-
-use strict;
-
-package Sniglets::ServerNotes;
-
-use Carp;
-use RHN::Server;
-use RHN::ServerNotes;
-use RHN::Exception;
-
-sub register_tags {
- my $class = shift;
- my $pxt = shift;
-
- $pxt->register_tag('rhn-server-note-edit-form' => \&server_note_edit_form);
-}
-
-sub register_callbacks {
- my $class = shift;
- my $pxt = shift;
-
- $pxt->register_callback('rhn:server_note_cb' => \&server_note_cb);
-}
-
-sub server_note_edit_form {
- my $pxt = shift;
- my %params = @_;
-
- my $work_block = $params{__block__};
-
- my $sid = $pxt->param('sid') || ''; #server_id
- my $nid = $pxt->param('nid') || ''; #note_id
- my $n;
-
- if ($nid) {
- $n = RHN::ServerNotes->lookup(-id => $nid);
- my $server = RHN::Server->lookup(-id => $n->server_id);
- $pxt->user->verify_system_access($server->id)
- or $pxt->redirect('/errors/permission.pxt');
- }
-
- my $note_field = defined ($n) ? $n->note : $pxt->dirty_param('note') || '';
- my $subject_field = defined ($n) ? $n->subject : $pxt->dirty_param('subject') || '';
-
- $work_block =~ s/\{note\}/PXT::Utils->escapeHTML($note_field || '')/eg;
- $work_block =~ s/\{subject\}/PXT::Utils->escapeHTML($subject_field)/eg;
-
- return $work_block;
-}
-
-# validate server note and insert into db
-sub server_note_cb {
- my $pxt = shift;
-
- my $sid = $pxt->param('sid');
- my $nid = $pxt->param('nid');
- my $delete = $pxt->dirty_param('delete');
- my $server = RHN::Server->lookup(-id => $sid);
- my $note;
- my $subject = $pxt->dirty_param('subject') || '';
- my $text = $pxt->dirty_param('note') || '';
-
- my $len = length $text;
-
- if ($len > 4000) {
- $pxt->push_message(local_alert => "The text entered was $len characters long. A note cannot exceed 4000 characters.");
- return;
- }
-
- $len = length $subject;
-
- if ($len > 80) {
- $pxt->push_message(local_alert => "The subject entered was $len characters long. It must be at most 80 characters long.");
- return;
- }
-
- # insert or update, depending on whether $nid is defined
- if ($server) {
- if ($nid) {
- $note = RHN::ServerNotes->lookup(-id => $nid);
- my $server = RHN::Server->lookup(-id => $note->server_id);
- $pxt->user->verify_system_access($server->id)
- or $pxt->redirect('/errors/permission.pxt');
- }
- else {
- $note = RHN::ServerNotes->create;
- }
- $note->server_id($sid);
- $note->creator($pxt->user->id());
- $note->subject($subject);
- $note->note($text);
-
- # hack alert
- if (defined $delete) {
- $note->{__delete__} = 1;
- }
- eval {
- $note->commit;
- };
-
- if ($@ and catchable($@)) {
- my $E = $@;
-
- if ($E->constraint_value eq '"RHNSERVERNOTES"."SUBJECT"') {
- $pxt->push_message(local_alert => 'You must choose a subject for your note.');
- return;
- }
- else {
- throw $E;
- }
- }
- elsif ($@) {
- die $@;
- }
- }
-
- my $redir = $pxt->dirty_param('redirect_success');
- throw "param 'redirect_success' needed but not provided." unless $redir;
-
- if ($delete) {
- $pxt->push_message(site_info => "System note deleted.");
- }
- elsif ($nid) {
- $pxt->push_message(site_info => "System note updated.");
- }
- else {
- $pxt->push_message(site_info => "System note created.");
- }
-
- $pxt->redirect($redir);
-}
-
-1;
diff --git a/web/spacewalk-web.spec b/web/spacewalk-web.spec
index b0e2407..97ec176 100644
--- a/web/spacewalk-web.spec
+++ b/web/spacewalk-web.spec
@@ -191,7 +191,6 @@ rm -rf $RPM_BUILD_ROOT
%{perl_vendorlib}/RHN/Server.pm
%{perl_vendorlib}/RHN/ServerActions.pm
%{perl_vendorlib}/RHN/ServerGroup.pm
-%{perl_vendorlib}/RHN/ServerNotes.pm
%{perl_vendorlib}/RHN/Session.pm
%{perl_vendorlib}/RHN/Set.pm
%{perl_vendorlib}/RHN/SimpleStruct.pm
11 years, 9 months
Changes to 'refs/tags/spacewalk-java-1.8.101-1'
by Jan Pazdziora
Tag 'spacewalk-java-1.8.101-1' created by Jan Pazdziora <jpazdziora(a)redhat.com> at 2012-06-27 08:04 +0000
Tagging package [spacewalk-java] version [1.8.101-1] in directory [java/].
Changes since spacewalk-web-1.8.21-1:
Jan Pazdziora (2):
Fixing checkstyle.
Automatic commit of package [spacewalk-java] release [1.8.101-1].
---
java/code/src/com/redhat/rhn/manager/errata/AsyncErrataCloneCounter.java | 23 ++++++++--
java/spacewalk-java.spec | 5 +-
rel-eng/packages/spacewalk-java | 2
3 files changed, 24 insertions(+), 6 deletions(-)
---
11 years, 9 months
java/spacewalk-java.spec rel-eng/packages
by Jan Pazdziora
java/spacewalk-java.spec | 5 ++++-
rel-eng/packages/spacewalk-java | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit e897e8847f82b634f33649b0b93fd94ed57b3116
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Jun 27 10:04:10 2012 +0200
Automatic commit of package [spacewalk-java] release [1.8.101-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index 8b6e6f1..a45e0c5 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -23,7 +23,7 @@ Name: spacewalk-java
Summary: Spacewalk Java site packages
Group: Applications/Internet
License: GPLv2
-Version: 1.8.100
+Version: 1.8.101
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -615,6 +615,9 @@ fi
%{jardir}/postgresql-jdbc.jar
%changelog
+* Wed Jun 27 2012 Jan Pazdziora 1.8.101-1
+- Fixing checkstyle.
+
* Wed Jun 27 2012 Jan Pazdziora 1.8.100-1
- Fixing checkstyle.
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index 8336c14..c6e97ab 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-1.8.100-1 java/
+1.8.101-1 java/
11 years, 9 months
java/code
by Jan Pazdziora
java/code/src/com/redhat/rhn/manager/errata/AsyncErrataCloneCounter.java | 23 ++++++++--
1 file changed, 19 insertions(+), 4 deletions(-)
New commits:
commit 66e6b61700ed338e5f7c849a0d4231af2de8601f
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Jun 27 10:03:33 2012 +0200
Fixing checkstyle.
Addressing
/builddir/build/BUILD/spacewalk-java-1.8.100/./code/src/com/redhat/rhn/manager/errata/AsyncErrataCloneCounter.java:2: Line does not match expected header line of '^ \* Copyright \(c\) (20(0\d|1[01])--)?201[012] (Red Hat, Inc.|Novell)$'.
/builddir/build/BUILD/spacewalk-java-1.8.100/./code/src/com/redhat/rhn/manager/errata/AsyncErrataCloneCounter.java:18: Missing a Javadoc comment.
diff --git a/java/code/src/com/redhat/rhn/manager/errata/AsyncErrataCloneCounter.java b/java/code/src/com/redhat/rhn/manager/errata/AsyncErrataCloneCounter.java
index 2903204..ed76ada 100644
--- a/java/code/src/com/redhat/rhn/manager/errata/AsyncErrataCloneCounter.java
+++ b/java/code/src/com/redhat/rhn/manager/errata/AsyncErrataCloneCounter.java
@@ -1,4 +1,23 @@
/**
+ * Copyright (c) 2012 Red Hat, Inc.
+ *
+ * This software is licensed to you under the GNU General Public License,
+ * version 2 (GPLv2). There is NO WARRANTY for this software, express or
+ * implied, including the implied warranties of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+ * along with this software; if not, see
+ * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+ *
+ * Red Hat trademarks are not licensed under GPLv2. No permission is
+ * granted to use or replicate Red Hat trademarks that are incorporated
+ * in this software or its documentation.
+ */
+
+package com.redhat.rhn.manager.errata;
+
+import java.util.Hashtable;
+
+/**
* If someone attempts to schedule a synchronous errata clone into a
* channel that has asynchronous errata clones taking place in the
* background, a database deadlock will occur. There is no way to
@@ -11,10 +30,6 @@
* @author Stephen Herr <sherr(a)redhat.com>
*
*/
-package com.redhat.rhn.manager.errata;
-
-import java.util.Hashtable;
-
public class AsyncErrataCloneCounter {
// hashtable is syncronized, so is threadsafe
private final Hashtable<Long, Integer> count;
11 years, 9 months
Changes to 'refs/tags/spacewalk-web-1.8.21-1'
by Michael Mraka
Tag 'spacewalk-web-1.8.21-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2012-06-27 07:50 +0000
Tagging package [spacewalk-web] version [1.8.21-1] in directory [web/].
Changes since spacewalk-java-1.8.100-1:
Michael Mraka (2):
835608 - error messages in PostgreSQL have different pattern
Automatic commit of package [spacewalk-web] release [1.8.21-1].
---
rel-eng/packages/spacewalk-web | 2 +-
web/modules/rhn/RHN/Exception.pm | 9 +++++++++
web/spacewalk-web.spec | 5 ++++-
3 files changed, 14 insertions(+), 2 deletions(-)
---
11 years, 9 months
rel-eng/packages web/spacewalk-web.spec
by Michael Mraka
rel-eng/packages/spacewalk-web | 2 +-
web/spacewalk-web.spec | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 1f999a2e7efa16e377580a00516d8a2e91e06440
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Jun 27 09:50:38 2012 +0200
Automatic commit of package [spacewalk-web] release [1.8.21-1].
diff --git a/rel-eng/packages/spacewalk-web b/rel-eng/packages/spacewalk-web
index 0942546..2527ac5 100644
--- a/rel-eng/packages/spacewalk-web
+++ b/rel-eng/packages/spacewalk-web
@@ -1 +1 @@
-1.8.20-1 web/
+1.8.21-1 web/
diff --git a/web/spacewalk-web.spec b/web/spacewalk-web.spec
index b640c94..b0e2407 100644
--- a/web/spacewalk-web.spec
+++ b/web/spacewalk-web.spec
@@ -2,7 +2,7 @@ Name: spacewalk-web
Summary: Spacewalk Web site - Perl modules
Group: Applications/Internet
License: GPLv2
-Version: 1.8.20
+Version: 1.8.21
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk/
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -254,6 +254,9 @@ rm -rf $RPM_BUILD_ROOT
# $Id$
%changelog
+* Wed Jun 27 2012 Michael Mraka <michael.mraka(a)redhat.com> 1.8.21-1
+- 835608 - error messages in PostgreSQL have different pattern
+
* Tue Jun 26 2012 Michael Mraka <michael.mraka(a)redhat.com> 1.8.20-1
- Correcting ISE on postgresql: NVL keyword
11 years, 9 months
web/modules
by Michael Mraka
web/modules/rhn/RHN/Exception.pm | 9 +++++++++
1 file changed, 9 insertions(+)
New commits:
commit 132014256505817da37019a1f21c787177dfdc36
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Jun 27 09:47:00 2012 +0200
835608 - error messages in PostgreSQL have different pattern
diff --git a/web/modules/rhn/RHN/Exception.pm b/web/modules/rhn/RHN/Exception.pm
index ad9ae69..236a3d0 100644
--- a/web/modules/rhn/RHN/Exception.pm
+++ b/web/modules/rhn/RHN/Exception.pm
@@ -94,6 +94,15 @@ sub constraint_value {
return "";
}
}
+ elsif ($self->{-text}) {
+ # PostgreSQL
+ if ($self->{-text} =~ /constraint "(.*)"/) {
+ return uc($1);
+ }
+ else {
+ return "";
+ }
+ }
else {
return "";
}
11 years, 9 months