diff --git a/blazar_dashboard/api/client.py b/blazar_dashboard/api/client.py index 44e3e26..88f787a 100644 --- a/blazar_dashboard/api/client.py +++ b/blazar_dashboard/api/client.py @@ -46,7 +46,7 @@ class Host(base.APIDictWrapper): _attrs = ['id', 'hypervisor_hostname', 'hypervisor_type', 'hypervisor_version', 'vcpus', 'cpu_info', 'memory_mb', 'local_gb', 'status', 'created_at', 'updated_at', - 'service_name', 'trust_id'] + 'service_name', 'trust_id', 'reservable'] def __init__(self, apiresource): super(Host, self).__init__(apiresource) diff --git a/blazar_dashboard/content/hosts/tables.py b/blazar_dashboard/content/hosts/tables.py index 2760ec5..6dafcea 100644 --- a/blazar_dashboard/content/hosts/tables.py +++ b/blazar_dashboard/content/hosts/tables.py @@ -10,6 +10,7 @@ # License for the specific language governing permissions and limitations # under the License. +from django.template import defaultfilters as filters from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ungettext_lazy from horizon import tables @@ -68,6 +69,8 @@ class HostsTable(tables.DataTable): local_gb = tables.Column("local_gb", verbose_name=_("Local Storage"), filters=(sizeformat.diskgbformat,)) type = tables.Column("hypervisor_type", verbose_name=_("Hypervisor type")) + reservable = tables.Column("reservable", verbose_name=_("Reservable"), + filters=(filters.yesno, filters.capfirst)) class Meta(object): name = "hosts" diff --git a/blazar_dashboard/content/hosts/templates/hosts/_detail_overview.html b/blazar_dashboard/content/hosts/templates/hosts/_detail_overview.html index 14f134a..885803f 100644 --- a/blazar_dashboard/content/hosts/templates/hosts/_detail_overview.html +++ b/blazar_dashboard/content/hosts/templates/hosts/_detail_overview.html @@ -7,8 +7,11 @@