Commit Graph

33 Commits

Author SHA1 Message Date
Abhishek Srikanth d108095aac Replaced re_path with path where path can be used 2021-11-20 18:21:03 +01:00
Abhishek Srikanth 3cb4be10ad Replaced url() with re_path() 2021-11-20 18:21:03 +01:00
Jelle van der Waa e9b8e8ee68
Convert visualize tests to pytest fixtures 2021-09-13 22:37:51 +02:00
Justin ! c6cf91a40d Fix pep8 errors 2020-11-11 22:23:29 +01:00
Jelle van der Waa 809cc4c482 Revert "visualize: remove unrequired list() calls added"
This reverts commit 1560c4d904.
2019-04-27 21:49:30 +02:00
Jelle van der Waa 1560c4d904 visualize: remove unrequired list() calls added
2to3 added list() for safety reasons, but not the right reasons, remove
the conversion.
2019-04-27 21:35:13 +02:00
Jelle van der Waa dbd3ac16fd visualize: update d3js to 3.5.0
Update to the latest version 3 release which does not break backwards
compatibility yet.

Signed-off-by: Jelle van der Waa <jelle@archlinux.org>
2019-03-17 20:57:25 +01:00
Jelle van der Waa c612b19314 main: run 2to3 2019-01-21 21:19:58 +01:00
Jelle van der Waa 6451de6686 Move format_filesize to the visualize.js
The only user of format_filesize is visualize.js, move the code there to
reduce archewb.js which is loaded on multiple pages.
2018-11-18 22:49:25 +01:00
Jelle van der Waa 6c6b4541b5 Update urls.py to non relative imports 2018-04-08 12:51:19 +02:00
Johannes Löthberg 996ef6ec72 Change urls.py from patterns to list of url()
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2018-04-08 12:51:19 +02:00
Jelle van der Waa c1bfb31c07 visualize: add tests 2017-06-11 18:43:14 +02:00
Dan McGee cd22bfd73b Master signing keys page improvements
* Don't show non-packagers
* Don't hardcode group names in view code
* Reduce number of database queries for all of the cross-signature
  developer name lookups

Signed-off-by: Dan McGee <dan@archlinux.org>
2014-11-07 09:27:56 -06:00
Dan McGee 3e70c8107b Remove now unnecessary empty models.py files
Signed-off-by: Dan McGee <dan@archlinux.org>
2014-09-11 18:35:36 -05:00
Dan McGee b7b2474064 Various minor code cleanups and fixes
Most of these were suggested by PyCharm, and include everything from
little syntax issues and other bad smells to dead or bad code.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-16 22:12:01 -05:00
Dan McGee 82947873d6 Upgrade D3 to 3.0.6
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-08 21:19:17 -06:00
Dan McGee 66850026ca Use content_type and not mimetype on HttpResponse()
Bug #16519 in Django deprecates mimetype, so update our code
accordingly.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-13 22:34:33 -06:00
Dan McGee 2b9519996a Update D3 to 3.0.0
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-27 16:43:01 -06:00
Dan McGee 6dd4d54bb0 Use Python 2.7 dictionary comprehension syntax
Rather than the old idiom of dict((k, v) for <> in <>).

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-11-16 16:37:52 -06:00
Dan McGee 45d81a9578 Move JSON keys view to public/ app
This seems like a more appropriate place, and now the visualization is
done here anyway so we should move the data backing it.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-11-13 10:21:02 -06:00
Dan McGee 6859a7568c Add comments to visualize JS
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-11-12 09:43:32 -06:00
Dan McGee 76c37ce3ac Replace deprecated direct_to_template() with render() shortcut
Now that Django actually provides a concise way to use a RequestContext
object without instantiating it, we can use that rather than the old
function-based generic view that worked well to do the same.
Additionally, these function-based generic views will be gone in Django
1.5, so might as well make the move now.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-24 19:57:20 -05:00
Dan McGee 34157510cd Update d3.js resources
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-08 23:35:13 -05:00
Dan McGee a5f5557493 Use python json module directly in place of simplejson
As of Python 2.6, this is a builtin module that has all the same
functions and capabilities of the Django simplejson module. Additionally
simplejson is deprecated in the upcoming Django 1.5 release.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-12 09:32:30 -05:00
Dan McGee 5780cf2e21 Tweak the PGP key visualization a bit
* Add mouseover/mouseout events to highlight the incoming and outgoing
  signatures from a given key when moused over.
* Change the border color of each developer key based on how many
  signatures from keys besides the master key they have. Thus,
  devs that have a lot of signatures from other devs will have a more
  green border; those with none will have a white border.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-27 09:12:26 -05:00
Dan McGee ef88f3d5ef Add developer status table to master keys page
This shows the cross-product of each master key with each developer key
so you can see who has been signed, where signatures are missing, etc.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-29 11:37:07 -05:00
Dan McGee b8c20439c0 Change Django urls.py import
Until Django 1.3, the functions include(), patterns() and url() plus
handler404, handler500 were located in a django.conf.urls.defaults
module.

In Django 1.4, they live in django.conf.urls.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-23 19:54:40 -05:00
Dan McGee 14c51a5bd8 Update d3 to 2.8.1
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-02 11:41:01 -06:00
Dan McGee 32633d4558 Update D3 JS resources
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-21 13:35:52 -06:00
Dan McGee 943ef2e8e4 Convert to and enable staticfiles contrib application
This moves our site static files into the sitestatic directory if they
are shared resources, and also moves a handful of things (such as the
artwork logos) into application-specific static/ directories. This
allows the staticfiles contrib app to work after a few settings tweaks,
a run of collectstatic, and massaging the hardcoded '/media/' prefix out
of our templates.

Django 1.4 is going to make this a lot easier to move things to a CDN
and provides better template tags; for now this is setting the stage
before we can move to that.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-05 23:06:10 -06:00
Dan McGee ab9162ac14 Add pgp_keys visualize JSON view
This will be used for an SVG graph of all of the master and developer
PGP keys.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-05 21:57:33 -06: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 d5063bd1d2 Add package visualizations page
Why the hell not? Have fun clicking all the pretty buttons.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-10-05 15:45:44 -05:00