Resource count displayed at the above of each table will not be changed according to UpdateRow result

Bug #1694207 reported by Keiichi Hikita
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Low
Keiichi Hikita

Bug Description

There is problem in UpdateRow of Horizon page.

If we do some resource action(e.g. create/update/delete ...), UpdateRow will be started.
And then resource status will be updated automatically in front-end.

But in case removing resource, number of resource that displayed on both above and bottom of table will not be updated correctly.

For example, in case we have two resource, table has label like "Displaying 2 items".
Then if we remove one resource, after UpdateRow finished, number of resource becomes following status.
- Bottom one becomes "Displaying 1 item".
- Above one keeps display "Displaying 2 items". (Not modified depending on resource count changing)

As other example, in case we have only one resource, table has label like "Displaying 1 item" first.
And if we remove this resource, number of resource becomes following status.
- Bottom one is hidden. (Nothing is displayed)
- Above one keeps display "Displaying 1 items". (Also not modified)

I think we should fix this problem.

Changed in horizon:
assignee: nobody → Keiichi Hikita (keiichi-hikita)
description: updated
Revision history for this message
Keiichi Hikita (keiichi-hikita) wrote :
description: updated
Changed in horizon:
status: New → In Progress
Revision history for this message
Keiichi Hikita (keiichi-hikita) wrote :

This problem occurs simply by decreasing the number of resources as UpdateRow result...
Not only in case resource count reached to zero.

summary: - Resource count displayed at the above of each table will not be hidden
- in case resource count changes to zero
+ Resource count displayed at the above of each table will not be changed
+ according to UpdateRow result
description: updated
Revision history for this message
Keiichi Hikita (keiichi-hikita) wrote :

I've send review request to gerrit yesterday.
But Jenkikns CI is now failed.
And reason why CI failed is seems like following.

===
2017-05-31 00:47:32.357968 | creating /home/jenkins/workspace/gate-horizon-docs-ubuntu-xenial/doc/build/html
2017-05-31 00:47:32.367080 | [pbr] Writing ChangeLog
2017-05-31 00:47:32.367221 | [pbr] Generating ChangeLog
2017-05-31 00:47:32.606936 | [pbr] ChangeLog complete (0.2s)
2017-05-31 00:47:32.606998 | [pbr] Generating AUTHORS
2017-05-31 00:47:32.995998 | [pbr] AUTHORS complete (0.4s)
2017-05-31 00:47:32.996958 | Running Sphinx v1.6.2
2017-05-31 00:47:33.352608 |
2017-05-31 00:47:33.352678 | Warning, treated as error:
2017-05-31 00:47:33.352706 | No local_settings file found.
2017-05-31 00:47:33.393535 | ERROR: InvocationError: '/home/jenkins/workspace/gate-horizon-docs-ubuntu-xenial/.tox/venv/bin/python setup.py build_sphinx'
2017-05-31 00:47:33.393670 | ___________________________________ summary ____________________________________
2017-05-31 00:47:33.393714 | ERROR: venv: commands failed
2017-05-31 00:47:33.406831 | [Zuul] Task exit code: 1
2017-05-31 00:47:34.956339 | [Zuul] Job complete, result: FAILURE
===

Would you tell how can I fix this problem? (No local_settings file found.)
I think local_settings is basically not included in horizon repository...(There is only sample file ...)

Revision history for this message
Keiichi Hikita (keiichi-hikita) wrote :

I understood the reason why CI failed.
Thanks!

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/469289
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=5b2fe409edb6ffc3b03f28eab71aa6cb141a33d6
Submitter: Jenkins
Branch: master

commit 5b2fe409edb6ffc3b03f28eab71aa6cb141a33d6
Author: Keiichi Hikita <email address hidden>
Date: Wed May 31 09:18:04 2017 +0900

    There is problem in UpdateRow of Horizon page.

    If we do some resource action(e.g. create/update/delete ...),
    UpdateRow will be started.
    And then resource status will be updated automatically in front-end.
    But in case removing resource, number of resource that displayed
    on both above and bottom of table will not be updated correctly.

    I fixed update_footer_count function in horizon.tables.js.
    This function only updates number of resource in footer field.
    (tfoot span.table_count)
    But we also need to update header field. (thead span.table_count)
    So I add header update logic into this file.

    Change-Id: Idc4330fe779b62607ada39a9db3637de82d014f7
    Closes-Bug: #1694207

Changed in horizon:
status: In Progress → Fix Released
Changed in horizon:
milestone: none → pike-3
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/484169

tags: added: ocata-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/ocata)

Reviewed: https://review.openstack.org/484169
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=352be501fc6ea0b71710a77e77e92d8ff4aaa2f0
Submitter: Jenkins
Branch: stable/ocata

commit 352be501fc6ea0b71710a77e77e92d8ff4aaa2f0
Author: Keiichi Hikita <email address hidden>
Date: Wed May 31 09:18:04 2017 +0900

    There is problem in UpdateRow of Horizon page.

    If we do some resource action(e.g. create/update/delete ...),
    UpdateRow will be started.
    And then resource status will be updated automatically in front-end.
    But in case removing resource, number of resource that displayed
    on both above and bottom of table will not be updated correctly.

    I fixed update_footer_count function in horizon.tables.js.
    This function only updates number of resource in footer field.
    (tfoot span.table_count)
    But we also need to update header field. (thead span.table_count)
    So I add header update logic into this file.

    Change-Id: Idc4330fe779b62607ada39a9db3637de82d014f7
    Closes-Bug: #1694207
    (cherry picked from commit 5b2fe409edb6ffc3b03f28eab71aa6cb141a33d6)

tags: added: in-stable-ocata
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 12.0.0.0b3

This issue was fixed in the openstack/horizon 12.0.0.0b3 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 11.0.4

This issue was fixed in the openstack/horizon 11.0.4 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.