Commit Graph

248 Commits

Author SHA1 Message Date
Dan McGee
886630dd4e Always use same URL for both secure and non-secure CDN requests
Use a scheme-relative URL rather than serving different content to
users based on HTTP or HTTPS. Should prevent mismatched certificate
errors.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-08 13:55:38 -06:00
Dan McGee
0db2830b8f Make maintainer lookup on todo lists fast
This is rather sick to look at. Sorry, Django gives me no other choice.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-03 23:30:16 -05:00
Dan McGee
19c2841f20 Add new attach_maintainers() utility method
This allows us to alleviate the N+1 query problem when we want
maintainer data for a queryset of packages. We use it on signoffs here;
we should also be able to apply this to the todolist section where this
problem has existed for some time.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-03 23:04:16 -05:00
Dan McGee
e3e3e49876 Add URL to todolist email
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-03 17:33:40 -05:00
Dan McGee
ac2278423a Many signoff page improvements
Add a new 'SignoffSpecification' model which will capture metadata
regarding a specific package if it differs from the norm- e.g. more or
less than 2 required signoffs, is known to be bad, a comment from the
maintainer, etc. The groundwork is laid here; much of this will still
need to be wired up in the future.

Enhance the view with a lot more JS prettiness and add revoking of
signoffs. The signoff page can be filtered and the links and all the fun
stuff are totally dynamic now.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-03 17:19:26 -05:00
Dan McGee
bc0e9d3e85 Add created column to Donor model
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-01 16:56:40 -05:00
Dan McGee
2d5777b11d Add a generate_keyring command
This grabs all the PGP keys from the developer profiles and adds them to
the keyrings. Obviously we may want to do more in the future such as
filter by groups, active status, etc. but this is just a first
iteration.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-10-21 18:49:00 -05:00
Dan McGee
002574cce1 Accept 40 hex char PGP key signatures only
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-10-21 18:18:49 -05:00
Dan McGee
71e57570c2 Pylint suggested and other cleanups
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-10-11 19:29:15 -05:00
Dan McGee
797185faed Add some dev dashboard info regarding signed package count
This adds a column similar to the flagged package count for the number
of signed packages in a given architecture or repository. It is up to
the user to do some simple math to figure out the number of unsigned
packages.

Also, add 'signed' as a hidden search field option similar to what we
did for packager.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-19 08:44:22 -05:00
Dan McGee
2cc3385aad Use HTTPS by default in email URLs
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-10 07:08:16 -05:00
Dan McGee
293e42fc55 List packages in required by list with depend provided by this package
Implements FS#25862. Most noticable on package like util-linux
(util-linux-ng) and openjdk6 (java-runtime, java-environment).

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-08 14:10:13 -05:00
Dan McGee
e5d09fb7e9 Add PGP signature package field
And add eventual display code for it to the details template, but don't
show it yet as no packages will have it.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-17 16:18:12 -05:00
Dan McGee
b167fcb087 Refactor get_depends() to use PackageDepends methods
The returned objects now also have a providers list if it makes sense.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-09 23:34:29 -05:00
Dan McGee
02c0dbc482 Add some methods to PackageDepend object
This will allow for some future "find the best provider link" stuff as
well as refactoring of the get_depends() method on Package.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-09 23:33:27 -05:00
Dan McGee
2a73675f0e Select arch/repo for split package related fields
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-29 23:08:33 -05:00
Dan McGee
d8e089fd30 Delete old signoff model
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-06 12:12:17 -05:00
Dan McGee
f95abca269 Refactor code to use new signoff model
This moves signoff creation and display to the new packages.Signoff
model.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-06 12:12:17 -05:00
Dan McGee
c5308b7583 Recent updates refactor
Pull out a few helpful objects and functions for use later elsewhere.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-05 09:48:10 -05:00
Dan McGee
e37d465c4e Allow more lenient data entry for PGP key field
Don't allow the max_length parameter to make it through to the HTML
form, silently cutting off HTML cut and pastes. Trim out spaces
automatically, as well as '0x' and '2048R/' type prefixes.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-05 09:47:20 -05:00
Dan McGee
5e85c5ac9e Move set_created_field() to shared utils class
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-05 09:44:45 -05:00
Dan McGee
c584ffc9b6 Fix syntax errors, == not =
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-23 20:30:31 -05:00
Dan McGee
5bf28d1cab Add Package.in_staging method
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-23 20:25:06 -05:00
Dan McGee
55f6ad0c95 Set up queries for staging repos
This treats repo.staging special in much the way we already have to
treat repo.testing as special.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-23 20:19:49 -05:00
Dan McGee
388973d6fd Revert "Remove unused flagged() manager method"
Far from unneeded, this is used on the developer dashboard. Silly me.
Document this fact as well in the code so we don't screw it up again.

This reverts commit 2a44855556.
2011-06-23 18:49:30 -05:00
Dan McGee
dcbee21c1b Nicer formatting of PGP key display value
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-21 08:56:50 -05:00
Dan McGee
2a44855556 Remove unused flagged() manager method
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-15 15:52:37 -05:00
Dan McGee
4a9b6867a3 Refactor common select_related into manager method
For a Package object query, we almost always did .select_related('arch',
'repo). Refactor this into the manager as a 'normal()' method so we can
avoid sprinkling the same logic everywhere.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-15 15:50:14 -05:00
Dan McGee
eb231660b0 PositiveBigIntegerField: set get_internal_type() correctly
This is a key for Django to return the DB type that matches this value.
Since we are basically just ripping off a BigIntegerField, we can use
the database types for it.

This makes my prior checked in migrations actually work on MySQL.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-15 15:14:05 -05:00
Dan McGee
199cd423d1 Update to jQuery 1.4.4
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-15 15:01:59 -05:00
Dan McGee
ef61eacd08 Simplify jQuery CDN tag
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-14 19:20:23 -05:00
Dan McGee
f465a6afb7 Mark several package columns as non-NULL
These have been around for a long time now so they don't need to be
NULL-able anymore. We can also add a custom field type for our numbers
to at least get a check constraint at the Django level.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-14 18:17:22 -05:00
Dan McGee
1840416b9e Add a PGP key field on the dev profile
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-02 16:21:08 -05:00
Dan McGee
72bf6a02f3 Ensure required by works for arch-agnostic packages
We weren't showing required by entries for arch-specific packages that
depended on arch-agnostic ones. Make the check a bit less specific for
arch-agnostic packages similar to what we do for dependencies. Fixes
FS#24184.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-09 16:49:20 -05:00
Dan McGee
a08cac6dd0 Add two new groups for permissions
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-03 13:39:51 -05:00
Dan McGee
381e0a7872 Developer reports
This commit adds four initial developer reports that are hopefully
useful to developers and packages in checking up on the state of things.
They include:

* big : the 100 biggest packages in the repos
* old : packages built > 2 years ago
* uncompressed-man : self-explanatory
* uncompressed-info : self-explanatory

There should obviously be some sort of index page to access all of
these, so that will be coming soon.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-25 18:09:39 -05:00
Dan McGee
e6717510a0 Update repos fixture with new fields
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-23 14:29:29 -05:00
Dan McGee
f1f01ecf02 Reimplement links code as template tags
These were starting to get a bit too much inside the model itself, and
they don't really belong there as they are view layer concerns anyway.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-18 23:26:13 -05:00
Dan McGee
d8022fd572 Add a "Report a Bug" link
We need Flyspray category data to make this more useful, and we can
prefill the Subject and Category fields (along with putting it on the
right project). Implements FS#23751.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-18 23:00:30 -05:00
Dan McGee
6fe08cd689 Utilize Django 1.3 'on_delete' feature on several foreign keys
The most important one here is PROTECT to keep people from making
bone-headed plays and deleting an Arch or Repo and every package along
with it. We can use this in a few other places, as well as some
carefully placed SET_NULL indicators.

Note that nothing here pushes deletion responsibilities down to the
database, although that will probably happen in a future commit.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-07 17:04:00 -05:00
Dan McGee
77842a6c76 Consolidate caching black magic
Get the stuff used to retrieve and refresh the latest date values all in
the same place, and make it a bit more beautiful by refactoring it all
into a common set of methods.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-07 17:03:13 -05:00
Dan McGee
d766595965 Add some migrations to convert database to UTC time
This follows the earlier commit where we make sure any value going to or
being pulled from the database is UTC.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-07 17:03:06 -05:00
Dan McGee
01db07bad8 Use UTC datetime objects everywhere
Rather than the twisted mix of local times and UTC times we currently have.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-07 17:03:00 -05:00
Dan McGee
7d08d59280 Show a few more fields in package admin
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-07 17:01:51 -05:00
Dan McGee
5f7fbcb713 Add basic todo list admin site
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-23 13:01:21 -05:00
Dan McGee
2ccedba2b5 Fix potential logic bug in requiredby filtering
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-22 21:46:37 -05:00
Dan McGee
3f6aaf6ebe Add 'staging' field to Repo model
First steps towards implementing FS#23298.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-22 21:41:33 -05:00
Dan McGee
06550061b6 Add index to todo list date added
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-22 20:46:28 -05:00
Dan McGee
3d6392391b Check in actual models update for DateTime migration
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-15 09:00:20 -05:00
Dan McGee
dfab07f5ab Make todo list DateField a DateTimeField
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-14 23:55:52 -05:00