From b237df0434a71fc54de6f8c65c9d57d52400315b Mon Sep 17 00:00:00 2001 From: Nguyen Hai Date: Mon, 19 Feb 2018 21:30:22 +0900 Subject: [PATCH] Add Default VIM value column in VIM Management Please see the results at: https://pasteboard.co/H8waCde.png Change-Id: I0b6331ab487e8af24f0e7ac3cc216c10e304fe0c --- .../openstack_dashboard/dashboards/nfv/vim/tables.py | 1 + .../openstack_dashboard/dashboards/nfv/vim/tabs.py | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tacker_horizon/openstack_dashboard/dashboards/nfv/vim/tables.py b/tacker_horizon/openstack_dashboard/dashboards/nfv/vim/tables.py index e360c58..5d08cce 100644 --- a/tacker_horizon/openstack_dashboard/dashboards/nfv/vim/tables.py +++ b/tacker_horizon/openstack_dashboard/dashboards/nfv/vim/tables.py @@ -60,6 +60,7 @@ class VIMTable(tables.DataTable): link="horizon:nfv:vim:detail",) description = tables.Column('description', verbose_name=_("Description")) id = tables.Column('id', verbose_name=_("VIM Id")) + is_default = tables.Column('is_default', verbose_name=_("Default")) auth_url = tables.Column('auth_url', verbose_name=_("Auth URL")) regions = tables.Column('regions', verbose_name=_("Regions")) user = tables.Column('user', verbose_name=_("User")) diff --git a/tacker_horizon/openstack_dashboard/dashboards/nfv/vim/tabs.py b/tacker_horizon/openstack_dashboard/dashboards/nfv/vim/tabs.py index 3f383ea..acafe9e 100644 --- a/tacker_horizon/openstack_dashboard/dashboards/nfv/vim/tabs.py +++ b/tacker_horizon/openstack_dashboard/dashboards/nfv/vim/tabs.py @@ -24,11 +24,12 @@ from tacker_horizon.openstack_dashboard.dashboards.nfv.vim import tables class VIMItem(object): - def __init__(self, name, description, regions, vim_id, auth_url, - user, project, status): + def __init__(self, name, description, is_default, regions, vim_id, + auth_url, user, project, status): self.id = vim_id self.name = name self.description = description + self.is_default = is_default self.regions = regions self.auth_url = auth_url self.user = user @@ -61,8 +62,10 @@ class VIMTab(tabs.TableTab): project = project_info['name'] if project_info[ 'name'] else project_info['id'] status = vim["status"] + is_default = vim['is_default'] item = VIMItem(name=vim.get('name', ''), description=vim.get('description', ''), + is_default=is_default, regions=vim_regions, vim_id=vim.get('id', ''), auth_url=vim.get('auth_url', ''),