Activity log for bug #1389437

Date Who What changed Old value New value Message
2014-11-04 23:10:42 Gloria Gu bug added bug
2014-11-04 23:18:44 Gloria Gu description I am following the instruction regarding how to add in-line edit to the tables based on http://docs.openstack.org/developer/horizon/topics/tables.html I used admin -> volumes I updated following block to the volumes tab table: openstack_dashborad/dashobards/admin/volumes/volumes/tables.py class UpdateRow(tables.Row): ajax = True def get_data(self, request, volume_id): volume = cinder.volume_get(request, volume_id) return volume class UpdateCell(tables.UpdateAction): def allowed(self, request, volume, cell): return True def update_cell(self, request, data, id, cell_name, new_cell_value): obj = data setattr(obj, cell_name, new_cell_value) value = getattr(obj, 'name', None) return True class VolumesTable(volumes_tables.VolumesTable): """ name = tables.Column("name", verbose_name=_("Name"), link="horizon:admin:volumes:volumes:detail")""" name = tables.Column("name", verbose_name=_("Name"), form_field=forms.CharField( max_length=64, required=False), update_action=UpdateCell) ......more code I updated the following block to the volume types tab table: penstack_dashborad/dashobards/admin/volumes/volume_types/tables.py class UpdateRow(tables.Row): ajax = True def get_data(self, request, volume_type_id): volume_type = cinder.volume_type_get(request, volume_type_id) return volume_type class UpdateCell(tables.UpdateAction): def allowed(self, request, volume_type, cell): return True def update_cell(self, request, data, volume_type_id, cell_name, new_cell_value): obj = data setattr(obj, cell_name, new_cell_value) value = getattr(obj, 'name', None) return True class VolumeTypesTable(tables.DataTable): # name = tables.Column("name", verbose_name=_("Name")) name = tables.Column("name", verbose_name=_("Name"), form_field=forms.CharField( max_length=64, required=False), update_action=UpdateCell) .....more code I also add the similar code to snapshots table The inline code for volumes it works fine. The inline code for volume_types seems to have problem. examine the element noticed the following difference: element for the name in volumes table when not hover: <div class="table_cell_action" style="display: none;"><button class="ajax-inline-edit"><span class="glyphicon glyphicon-pencil"></span></button></div> when hover: <div class="table_cell_action" style="display: block;"><button class="ajax-inline-edit"><span class="glyphicon glyphicon-pencil"></span></button></div> element for the name in volume_types table is missing display:none as styling even both of volumes and volume_types using the same openstack_dashboard/static/dashboard/scss/_inline_edit.scss. <div class="table_cell_action"><button class="ajax-inline-edit"><span class="glyphicon glyphicon-pencil"></span></button></div> If I add that display:none or display:block into <div class="table_cell_action"> it seems to work for volume_types. However it sort of disables the volumes in-line-edit. Looks like the in-line edit only allows the first tab's table in-line edit by default, it doesn't seem to allow in-line edit to wirk in multiple tables on different tabs I am following the instruction regarding how to add in-line edit to the tables based on http://docs.openstack.org/developer/horizon/topics/tables.html I used admin -> volumes I updated following block to the volumes tab table: openstack_dashborad/dashobards/admin/volumes/volumes/tables.py class UpdateRow(tables.Row):     ajax = True     def get_data(self, request, volume_id):         volume = cinder.volume_get(request, volume_id)         return volume class UpdateCell(tables.UpdateAction):     def allowed(self, request, volume, cell):         return True     def update_cell(self, request, data, id,                     cell_name, new_cell_value):         obj = data         setattr(obj, cell_name, new_cell_value)         value = getattr(obj, 'name', None)         return True class VolumesTable(volumes_tables.VolumesTable):     """     name = tables.Column("name",                          verbose_name=_("Name"),                          link="horizon:admin:volumes:volumes:detail")"""     name = tables.Column("name", verbose_name=_("Name"),                          form_field=forms.CharField(                              max_length=64, required=False),                          update_action=UpdateCell) ......more code I updated the following block to the volume types tab table: openstack_dashborad/dashobards/admin/volumes/volume_types/tables.py class UpdateRow(tables.Row):     ajax = True     def get_data(self, request, volume_type_id):         volume_type = cinder.volume_type_get(request, volume_type_id)         return volume_type class UpdateCell(tables.UpdateAction):     def allowed(self, request, volume_type, cell):         return True     def update_cell(self, request, data, volume_type_id,                     cell_name, new_cell_value):          obj = data          setattr(obj, cell_name, new_cell_value)          value = getattr(obj, 'name', None)         return True class VolumeTypesTable(tables.DataTable):    # name = tables.Column("name", verbose_name=_("Name"))     name = tables.Column("name", verbose_name=_("Name"),                          form_field=forms.CharField(                              max_length=64, required=False),                          update_action=UpdateCell) .....more code I also add the similar code to snapshots table The inline code for volumes table it works fine. The inline code for volume_types table seems to have problem. the inline code for snapshots table doesn't work either. examine the element noticed the following difference: element for the name cell in volumes table when not hover: <div class="table_cell_action" style="display: none;"><button class="ajax-inline-edit"><span class="glyphicon glyphicon-pencil"></span></button></div> when hover: <div class="table_cell_action" style="display: block;"><button class="ajax-inline-edit"><span class="glyphicon glyphicon-pencil"></span></button></div> element for the name cell in volume_types table is missing display:none as styling even both of volumes and volume_types using the same openstack_dashboard/static/dashboard/scss/_inline_edit.scss. <div class="table_cell_action"><button class="ajax-inline-edit"><span class="glyphicon glyphicon-pencil"></span></button></div> If I add that display:none or display:block into <div class="table_cell_action"> it seems to work for volume_types table. However it sort of disables the volumes in-line-edit. Looks like the in-line edit only allows the first tab's table in-line edit by default, it doesn't seem to allow in-line edit to work in multiple tables on different tabs
2014-11-05 21:50:58 Gloria Gu attachment added 0001-added-code-for-checking-bug.patch https://bugs.launchpad.net/horizon/+bug/1389437/+attachment/4254117/+files/0001-added-code-for-checking-bug.patch
2014-11-06 08:53:39 Paul Karikh horizon: assignee Paul Karikh (pkarikh)
2014-11-13 20:32:49 Gary W. Smith tags horizon-core
2014-11-18 22:12:28 Gary W. Smith summary in-line edit doesn't work on the second tab or third tab inline edit only works on the first tab loaded in a tabbed panel
2014-11-18 22:12:31 Gary W. Smith horizon: status New Confirmed
2014-11-18 22:12:36 Gary W. Smith horizon: importance Undecided Medium
2014-11-20 12:08:52 Vlad Okhrimenko horizon: assignee Paul Karikh (pkarikh) Vlad Okhrimenko (vokhrimenko)
2014-11-28 13:00:24 Timur Sufiev horizon: assignee Vlad Okhrimenko (vokhrimenko) Timur Sufiev (tsufiev-x)
2014-11-28 13:55:50 OpenStack Infra horizon: status Confirmed In Progress
2014-12-12 22:04:03 OpenStack Infra horizon: status In Progress Fix Committed
2014-12-18 16:23:44 Thierry Carrez horizon: status Fix Committed Fix Released
2014-12-18 16:23:44 Thierry Carrez horizon: milestone kilo-1
2015-04-30 08:23:39 Thierry Carrez horizon: milestone kilo-1 2015.1.0