Remove Orchestration Resource Types names restriction

The additional columns "Implementation", "Component" and "Resource"
are representative for a limited resource type group only. Resource
type name can have less or more than three words and Heat even allows
to specify a URL as a resource type. Horizon should not use these
columns at all: "Type" column and filter will do just the same trick.

Change-Id: I38a671490b90122e2d75e6aa11d3de0fa12817c9
Closes-Bug: #1614000
This commit is contained in:
Tatiana Ovchinnikova 2016-08-17 20:21:19 +03:00
parent d668fcd81b
commit a86c7d9be7
1 changed files with 0 additions and 16 deletions

View File

@ -17,25 +17,9 @@ from horizon import tables
class ResourceTypesTable(tables.DataTable):
class ResourceColumn(tables.Column):
def get_raw_data(self, datum):
attr_list = ['implementation', 'component', 'resource']
info_list = datum.resource_type.split('::')
info_list[0] = info_list[0].replace("OS", "OpenStack")
if info_list[0] == "AWS":
info_list[0] = _("AWS compatible")
info_dict = dict(zip(attr_list, info_list))
return info_dict[self.transform]
name = tables.Column("resource_type",
verbose_name=_("Type"),
link="horizon:project:stacks.resource_types:details",)
implementation = ResourceColumn("implementation",
verbose_name=_("Implementation"),)
component = ResourceColumn("component",
verbose_name=_("Component"),)
resource = ResourceColumn("resource",
verbose_name=_("Resource"),)
def get_object_id(self, resource):
return resource.resource_type