Revision 7e45ddef ui/templates/standard.html

b/ui/templates/standard.html
162 162
    Go through the servers in the input data. Update existing entries, add
163 163
    new ones to the list
164 164
    */    
165
    $.each(data.servers, function(i,server){
166
        
165
    $.each(data.servers.values, function(i,server){
167 166
        existing = $('#' + server.id);
168 167
        
169 168
        // if multiple machines exist in the DOM, delete all but one
......
210 209
                            
211 210
            }
212 211
            existing.find("a.name span.name").text(server.name);
213
            existing.find("a.ip span.public").text(String(server.addresses.public.ip.addr).replace(',',' '));
212
            existing.find("a.ip span.public").text(String(server.addresses.values[0].values[0].addr).replace(',',' '));
214 213
        } else if (server.status != 'DELETED') {
215 214
            // If it does not exist and it's not deleted, we should create it
216 215
            var machine = $("#machine-template").clone().attr("id", server.id).fadeIn("slow");
217 216
            machine.find("a.name span.name").text(server.name);
218 217
            machine.find("img.logo").attr("src","static/machines/"+image_tags[server.imageRef]+'.png');
219 218
            machine.find("span.imagetag").text(image_tags[server.imageRef]);
220
            machine.find("a.ip span.public").text(String(server.addresses.public.ip.addr).replace(',',' '));            
219
            machine.find("a.ip span.public").text(String(server.addresses.values[0].values[0].addr).replace(',',' '));            
221 220
            machine.find(".status").text(STATUS_MESSAGES[server.status]);
222 221
            if (['BUILD', 'ACTIVE', 'REBOOT'].indexOf(server.status) >= 0){
223 222
                machine.appendTo(".running");

Also available in: Unified diff