server/mirrormanager/controllers.py | 3 -- server/mirrormanager/schema_updates/__init__.py | 11 ++++++++- server/mirrormanager/templates/adminview.kid | 28 ------------------------ 3 files changed, 10 insertions(+), 32 deletions(-)
New commits: commit 6a65f14581980e2ffa2ebec6b8d8f77c3d98c9cb Author: Matt Domsch Matt_Domsch@dell.com Date: Thu Apr 28 17:47:30 2011 -0500
create host_location table in the database on upgrade
diff --git a/server/mirrormanager/schema_updates/__init__.py b/server/mirrormanager/schema_updates/__init__.py index f2d49d7..4490464 100644 --- a/server/mirrormanager/schema_updates/__init__.py +++ b/server/mirrormanager/schema_updates/__init__.py @@ -11,11 +11,20 @@ __connection__ = hub
changes = {}
+# this class won't appear in the model, it's only used to create the table in the database +class NewHostLocation(SQLObject): + class sqlmeta: + table = 'host_location' + host = ForeignKey('Host') + location = ForeignKey('Location') + + def change_tables(): global changes
Location.createTable(ifNotExists=True) FileGroup.createTable(ifNotExists=True) + NewHostLocation.createTable(ifNotExists=True)
if 'emailOnDrop' not in OldSite.sqlmeta.columns and \ 'emailOnAdd' not in OldSite.sqlmeta.columns: @@ -23,7 +32,7 @@ def change_tables(): OldSite.sqlmeta.addColumn(BoolCol("emailOnAdd", default=False), changeSchema=True) changes['site.email_on_drop_add'] = True
- + # Host if 'dnsCountryHost' not in OldHost.sqlmeta.columns: OldHost.sqlmeta.addColumn(BoolCol("dnsCountryHost", default=False), changeSchema=True) changes['host.dns_country_host'] = True
commit b73415723a171edc898dcfe07e4a4f2eb2b2c9fd Author: Matt Domsch Matt_Domsch@dell.com Date: Thu Apr 28 16:19:57 2011 -0500
shorten adminview by dropping directories, repositories, and netblocks long lists
diff --git a/server/mirrormanager/controllers.py b/server/mirrormanager/controllers.py index 95f3321..b06d455 100644 --- a/server/mirrormanager/controllers.py +++ b/server/mirrormanager/controllers.py @@ -1258,11 +1258,8 @@ class Root(controllers.RootController): "arches":Arch.select(), "products":Product.select(), "versions":Version.select(), - "directories":Directory.select(orderBy='name'), "categories":Category.select(), - "repositories":Repository.select(orderBy='name'), "embargoed_countries":EmbargoedCountry.select(), - "netblocks":HostNetblock.select(orderBy='host_id'), "repository_redirects":RepositoryRedirect.select(orderBy='fromRepo'), "country_continent_redirects":CountryContinentRedirect.select(orderBy='country'), "locations":Location.select(orderBy='name'), diff --git a/server/mirrormanager/templates/adminview.kid b/server/mirrormanager/templates/adminview.kid index 089295a..50d1740 100644 --- a/server/mirrormanager/templates/adminview.kid +++ b/server/mirrormanager/templates/adminview.kid @@ -65,25 +65,6 @@ Nothing to see here, move along. </li> </ul> </div> -<div id="Repositories"> - <h3>Repositories</h3> - <ul> - <li py:for="r in repositories"> - <a href="${tg.url('/repository/'+str(r.id)+'/')}"> - <span py:replace="r.directory.name">Repository Name - </span></a> - <a href="${tg.url('/repository/'+str(r.id)+'/delete')}">[Delete]</a> - </li> - </ul> -</div> -<div id="Directories"> - <h3>Directories</h3> - <ul> - <li py:for="d in directories"> - <span py:replace="d.name">Directory Name</span> - </li> - </ul> -</div> <div id="Embargoed Countries"> <h3>Embargoed Counries <a href="${tg.url('/embargoed_country/0/new')}">[Add]</a></h3> <ul> @@ -93,15 +74,6 @@ Nothing to see here, move along. </li> </ul> </div> -<div id="Netblocks"> -<h3>Netblocks</h3> -<ul> - <li py:for="n in netblocks"> - <a href="${tg.url('/host/'+str(n.host.id)+'/')}"><span py:replace="n.host.name">Host Name</span></a> - <span py:replace="n.netblock">Netblock</span> - </li> -</ul> -</div> <div id="Repository Redirects"> <h3>Repository Redirects</h3> <ul>
mirrormanager-commits@lists.fedorahosted.org