~ubuntu-branches/ubuntu/saucy/horizon/saucy-updates

« back to all changes in this revision

Viewing changes to openstack_dashboard/dashboards/project/loadbalancers/tables.py

  • Committer: Package Import Robot
  • Author(s): James Page, James Page, Chuck Short
  • Date: 2013-10-03 13:48:12 UTC
  • mfrom: (1.1.31)
  • Revision ID: package-import@ubuntu.com-20131003134812-2vkwosem4flwuk5y
Tags: 1:2013.2~rc1-0ubuntu1
[ James Page ]
* New upstream release candidate:
  - d/static: Refreshed static assets for 2013.2~rc1.
  - d/patches: Refreshed patches.

[ Chuck Short ]
* debian/control: Add python-lesscpy as a suggests to optionally
  support online compression of static assets (LP: #1226674).

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
 
18
18
from django.core.urlresolvers import reverse  # noqa
 
19
from django.template import defaultfilters as filters
19
20
from django.utils import http
20
21
from django.utils.translation import ugettext_lazy as _  # noqa
21
22
 
24
25
 
25
26
from openstack_dashboard import api
26
27
 
27
 
import logging
28
 
 
29
 
 
30
 
LOG = logging.getLogger(__name__)
31
 
 
32
28
 
33
29
class AddPoolLink(tables.LinkAction):
34
30
    name = "addpool"
151
147
 
152
148
 
153
149
def get_vip_link(pool):
154
 
    return reverse("horizon:project:loadbalancers:vipdetails",
155
 
                   args=(http.urlquote(pool.vip_id),))
 
150
    if pool.vip_id:
 
151
        return reverse("horizon:project:loadbalancers:vipdetails",
 
152
                       args=(http.urlquote(pool.vip_id),))
 
153
    else:
 
154
        return None
156
155
 
157
156
 
158
157
class AddPMAssociationLink(tables.LinkAction):
190
189
                       verbose_name=_("Name"),
191
190
                       link="horizon:project:loadbalancers:pooldetails")
192
191
    description = tables.Column('description', verbose_name=_("Description"))
 
192
    provider = tables.Column('provider', verbose_name=_("Provider"),
 
193
                             filters=(lambda v: filters.default(v, _('N/A')),))
193
194
    subnet_name = tables.Column('subnet_name', verbose_name=_("Subnet"))
194
195
    protocol = tables.Column('protocol', verbose_name=_("Protocol"))
195
196
    vip_name = tables.Column('vip_name', verbose_name=_("VIP"),