~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/browser/distribution.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-06-16 14:09:27 UTC
  • mfrom: (13247.1.1 reland-bug-772754)
  • Revision ID: launchpad@pqm.canonical.com-20110616140927-0m85vn5lqja0zpej
[r=bac, benji, danilo, gmb][bug=772754] (Re-merge of r13243,
 reverted in r13247) with weird merge artefacts removed) Provide new
 bug subscription widget and list of subscribers. Remove advanced subscription
 feature flags. Code by Benji, Danilo & Gary.

Show diffs side-by-side

added added

removed removed

Lines of Context:
118
118
    MirrorSpeed,
119
119
    )
120
120
from lp.registry.interfaces.series import SeriesStatus
121
 
from lp.services.features import getFeatureFlag
122
121
from lp.services.geoip.helpers import (
123
122
    ipaddress_from_request,
124
123
    request_country,
301
300
 
302
301
    @cachedproperty
303
302
    def links(self):
304
 
        links = ['edit', 'pubconf']
305
 
        use_advanced_features = getFeatureFlag(
306
 
            'malone.advanced-structural-subscriptions.enabled')
307
 
        if use_advanced_features:
308
 
            links.append('subscribe_to_bug_mail')
309
 
            links.append('edit_bug_mail')
310
 
        return links
 
303
        return ['edit', 'pubconf', 'subscribe_to_bug_mail', 'edit_bug_mail']
311
304
 
312
305
 
313
306
class DistributionOverviewMenu(ApplicationMenu, DistributionLinksMixin):
1018
1011
        if throughput < 1000:
1019
1012
            return str(throughput) + ' Kbps'
1020
1013
        elif throughput < 1000000:
1021
 
            return str(throughput/1000) + ' Mbps'
 
1014
            return str(throughput / 1000) + ' Mbps'
1022
1015
        else:
1023
 
            return str(throughput/1000000) + ' Gbps'
 
1016
            return str(throughput / 1000000) + ' Gbps'
1024
1017
 
1025
1018
    @cachedproperty
1026
1019
    def total_throughput(self):