[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-6120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13901928#comment-13901928
 ] 

ASF subversion and git services commented on CLOUDSTACK-6120:
-------------------------------------------------------------

Commit e1e16a2301a75c6746bdb69774a6d9fb996455ca in cloudstack's branch 
refs/heads/master from [~jessicawang]
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=e1e16a2 ]

CLOUDSTACK-6120: UI > listView widget > sorting order > fire only one sorting 
API call(updateXXXXXXX&sortKey=n&id=UUID) for items who have the same UUID.
e.g. An Template/ISO of multiple zones have the same UUID.


> Order of templates and ISOs not honored by UI or API
> ----------------------------------------------------
>
>                 Key: CLOUDSTACK-6120
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-6120
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: UI
>            Reporter: Jessica Wang
>            Assignee: Jessica Wang
>
> there is a problem with the order of UpdateTemplate/ISO API calls in case of 
> multiple zones.
>  If a template is registered on multiple zones while listing we show multiple 
> entries of that template (one entry for each zone), but the UUID of the 
> template is same. 
> Say from UI listtemplates looks like this,
> T2 -> Zone1 (UUID = yyyy)
>  T2 -> Zone2 (UUID = yyyy)
>  T3 -> Zone1 (UUID = zzzz)
>  T3 -> Zone2 (UUID = zzzz)
>  T1 -> Zone1 (UUID = xxxx)
>  T1 -> Zone2 (UUID = xxxx)
> If I pull T1 -> Zone1 to first position
> From UI updatetemplate APIs are called in this order.
> UpdateTemplate API T1 -> Zone1 with sort_key 6 and UUID = xxxx
>  UpdateTemplate API T2 -> Zone1 with sort_key 5 and UUID = yyyy
>  UpdateTemplate API T2 -> Zone2 with sort_key 4 and UUID = yyyy
>  UpdateTemplate API T3 -> Zone1 with sort_key 3 and UUID = zzzz
>  UpdateTemplate API T3 -> Zone2 with sort_key 2 and UUID = zzzz
>  UpdateTemplate API T1 -> Zone2 with sort_key 1 and UUID = xxxx
> Even If I pull T1 to first position the last updateTemplate API call on T1 is 
> with sort_key 1. So it will stay at last position again.
> So from UI if we call updateTemplate/ISO only one time (starting from top) by 
> maintaining a HaspMap of UUIDs it may solve the problem.
>  Update API looks like this
> UpdateTemplate API T1 -> Zone1 with sort_key 6
>  UpdateTemplate API T2 -> Zone1 with sort_key 5
>  UpdateTemplate API T3 -> Zone1 with sort_key 3



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to