Sort by "Used CPU" or "Used Memory" in VMs view list

Hello,

I’m running OpenNebula 5.10.1. I would like to know if it would be possible to add the “feature” to allow sorting by “Used CPU” or/and “Used Memory” in VMs list.

Thanks.

Hi,

Sunstone lets you sort by clicking on the table headers. Now, you need to add the CPU column in the relevant view in /etc/one/sunston-views, you’ll see something like

        table_columns:                                                          
            - 0       # Checkbox                                                
            - 1       # ID                                                      
            - 2       # Name                                                    
            - 3       # Owner                                                   
            - 4       # Group                                                   
            - 5       # Status                                                  
            #- 6      # Used CPU                                                
            #- 7      # Used Memory                                             
            - 8       # Host                                                    
            - 9       # IPs                                                     
            #- 10     # Start Time                                              
            - 11      # VNC                                                     
            #- 12     # Hidden Template                                         
            #- 13     # Labels                                                  
            #- 14     # Search data  

On the CLI we usually relay on --csv, --filter and pipe to sort.

At the API level this is a bit more difficult as the CPU values are in the VM documents…

Hi,

I had already enabled that columns, as you can see in attached picture, but I can’t sort by them clicking on theirs headers. I can only sort by ID, Name, Owner, Group, Status and IPs, but not by UsedCPU or Used Memory.

My system runs OpenNebula 5.10.1

Thanks.!

Screenshot_2020-10-23 OpenNebula Sunstone Cloud Operations Center|690x77