~ubuntu-branches/ubuntu/vivid/horizon/vivid-proposed

« back to all changes in this revision

Viewing changes to openstack_dashboard/dashboards/admin/routers/ports/tables.py

  • Committer: Package Import Robot
  • Author(s): Corey Bryant, Chuck Short, Corey Bryant, James Page
  • Date: 2015-01-05 16:42:06 UTC
  • mfrom: (0.9.1) (1.2.5)
  • Revision ID: package-import@ubuntu.com-20150105164206-zrt2q64h4weugkur
Tags: 1:2015.1~b1-0ubuntu1
[ Chuck Short ]
* Open for Kilo.
* d/control: Update bzr branches 
* d/patches/embedded-xstatic.patch: Refreshed
* d/patches/add-juju-environment-download.patch: Temporarily disabled.

[ Corey Bryant ]
* New upstream release.
  - d/control: Align requirements with upstream.
  - d/watch: Update uversionmangle for kilo beta naming.
* d/control: Bumped Standards-Version to 3.9.6.

[ James Page ]
* d/bundle-xstatic.sh: Tweak grep to be case insensitive.
* d/p/add-juju-environment-download.patch: Rebase for kilo-1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#    License for the specific language governing permissions and limitations
13
13
#    under the License.
14
14
 
 
15
from django.utils.translation import pgettext_lazy
15
16
from django.utils.translation import ugettext_lazy as _
16
17
 
17
18
from horizon import tables
21
22
    import tables as routers_tables
22
23
 
23
24
 
 
25
DISPLAY_CHOICES = (
 
26
    ("UP", pgettext_lazy("Admin state of a Network", u"UP")),
 
27
    ("DOWN", pgettext_lazy("Admin state of a Network", u"DOWN")),
 
28
)
 
29
 
 
30
 
24
31
class PortsTable(tables.DataTable):
25
32
    name = tables.Column("name",
26
33
                         verbose_name=_("Name"),
31
38
    device_owner = tables.Column(routers_tables.get_device_owner,
32
39
                                 verbose_name=_("Type"))
33
40
    admin_state = tables.Column("admin_state",
34
 
                                verbose_name=_("Admin State"))
 
41
                                verbose_name=_("Admin State"),
 
42
                                display_choices=DISPLAY_CHOICES)
35
43
 
36
44
    def get_object_display(self, port):
37
45
        return port.id