Revision 202b47e9 src/cli/one_helper/onevmgroup_helper.rb

View differences:

src/cli/one_helper/onevmgroup_helper.rb
33 33
                d["ID"]
34 34
            end
35 35

  
36
            column :NAME, "Name of the VM Group", :left, :size=>20 do |d|
36
            column :NAME, "Name of the VM Group", :left, :size=>15 do |d|
37 37
                d["NAME"]
38 38
            end
39 39

  
......
46 46
                helper.group_name(d, options)
47 47
            end
48 48

  
49
            default :ID, :USER, :GROUP, :NAME
49
            column :ROLES, "Roles in the VM Group", :left, :size=>31 do |d|
50
                roles = d["ROLES"]["ROLE"]
51
                roles_names = ""
52

  
53
                if !roles.nil?
54
                    rnames = roles.collect { |i| i["NAME"] }
55
                    roles_names = rnames.join(", ") if !rnames.empty?
56
                end
57

  
58
                roles_names
59
            end
60

  
61
            default :ID, :USER, :GROUP, :NAME, :ROLES
50 62
        end
51 63

  
52 64
        table

Also available in: Unified diff