Revision e2ccad35

b/ui/static/main.css
897 897
    color: #3D3D3D;
898 898
    cursor: pointer;
899 899
    padding: 0px;
900
    height: 20px !important;
900 901
}
901 902

  
902 903
div.confirm_single button, .action_error button {
903
    height: 20px !important;
904 904
    width: 80px !important;
905 905
}
906 906
div.confirm_single button.yes, div.confirm_multiple button.yes {
......
941 941

  
942 942
div.confirm_multiple {
943 943
    width: 692px;
944
    height: 25px;
944
    height: 28px;
945 945
    margin: 0 0 10px -32px;
946 946
}
947 947

  
b/ui/templates/home.html
48 48
            '501' : '{% trans "This server has not been implemented yet." %}',
49 49
            // service unavailable
50 50
            '503' : '{% trans "This service is unavailable right now, please try again later." %}',
51
            // no images unavailable
51
            // no images found
52 52
            'NO_IMAGES' : '{% trans "Cannot show the Create machine wizard: No images found." %}',
53
            // no images unavailable
53
            // no flavors found
54 54
            'NO_FLAVORS' : '{% trans "Cannot show the Create machine wizard: No machine configurations found." %}'
55 55
        };
56 56
        
b/ui/templates/list.html
175 175
        current = -1;
176 176
        // check server status to select the appropriate OS icon
177 177
        osTag = image_tags[server.imageRef]
178
        var osIcon = osTag + ".png", imgStr;
178
        var osIcon = osTag + ".png", imgStr, imgSrc;
179 179

  
180 180
		// check if the server already exists in the datatable
181 181
		tableData.forEach(function(row,index){
......
189 189
			try {
190 190
				console.info(server.name + ' from ' 
191 191
							+ tableData[current][5] + ' to ' + STATUS_MESSAGES[server.status]);
192
			} catch(err) {}
192
			} catch(err) {}		
193 193
			if (server.status == "DELETED") {
194 194
				vmTable.fnDeleteRow(current);	
195
			} else {
196
				// update status
197
				tableData[current][0] = "<input class="+server.status+" id="+server.id+" type=checkbox>";
195
			} else { // server exists and should not be deleted		
198 196
                // check server status to select the appropriate OS icon
199 197
                if (['ERROR', 'STOPPED'].indexOf(server.status) >= 0) {
200 198
                    osIcon = osTag + "-off.png";
201 199
                }
202
				
203
				if (tableData[current][5].indexOf(STATUS_MESSAGES[server.status]) > -1 ||
204
					$('#'+server.id).parent().parent().find('.list-logo').attr('src').indexOf('wave')>-1){
205
					imgStr = "<img class=list-logo src=static/os_logos/" + osIcon +
206
                                        " title=" + osTag + " height=16 width=16 />";
207
				} else {
208
					imgStr = "<img class=list-logo src=static/wave.gif height=16 width=16 />";	
209
				}
210
                tableData[current][1] = "<span class=imagetag>" + osTag + 
211
                                        "</span>" + imgStr;
212
				tableData[current][5] = "<span class=status>" + STATUS_MESSAGES[server.status] + "</span>";
213
				// TODO: update name & ip
214
				vmTable.fnUpdate(tableData[current],current);
215
				imgStr = "<img class=list-logo src=static/os_logos/" + osIcon +
216
                                        " title=" + osTag + " height=16 width=16 />";
217
                tableData[current][1] = "<span class=imagetag>" + osTag + 
218
                                        "</span>" + imgStr;
219
				//setTimeout($('#'+server.id).parent().parent().find('.list-logo').attr, 2000,'src',imgStr);
220
				//setTimeout("vmTable.fnUpdate('"+tableData[current]+"','"+current+"')",2000);
200
				// if the new state does not differ from the previous one
201
				if (tableData[current][5].indexOf(STATUS_MESSAGES[server.status]) > -1){
202
					// do nothing
203
				} else { // state has changed
204
					//$('#'+server.id).parent().parent().find('.list-logo').attr('src').indexOf('wave')>-1){
205
					
206
					imgSrc = "static/wave.gif";
207
					tableData[current][0] = "<input class="+server.status+" id="+server.id+" type=checkbox>";
208
					imgStr = "<img class=list-logo src=" + imgSrc + " title=" + osTag + " height=16 width=16 />";
209
					tableData[current][1] = "<span class=imagetag>" + osTag + "</span>" + imgStr;
210
					tableData[current][2] = "<a class=name><span class=name>" + server.name + "</span></a>";
211
					tableData[current][3] = "<a class=ip><span class=public>"+ server.addresses.public.ip.addr + "</span></a>";
212
					//tableData[current][4] = "group"; //TODO
213
					tableData[current][5] = "<span class=status>" + STATUS_MESSAGES[server.status] + "</span>";
214
					vmTable.fnUpdate(tableData[current],current);
221 215

  
216
					//try{console.info('vm ' + server.id + ' from ' + tableData[current][5] + ' to ' + STATUS_MESSAGES[server.status])} catch(err) {}						
217
					setTimeout("$('#"+server.id+"').parent().parent().find('.list-logo').attr('src','static/os_logos/" + osIcon+"')", 2000);					
218
				}
222 219
			}
223 220
			updateActions();
224 221
        } else if (server.status != "DELETED") { // does not exist, we should create it
......
249 246
    }
250 247
	
251 248
	// set confirm box position
252
    if (window.innerHeight - 235 < $('#machinesview').height())
249
    if (window.innerHeight - 200 < $('#machinesview').height())
253 250
        $('.confirm_multiple').addClass('fixed');
254 251
    else
255 252
        $('.confirm_multiple').removeClass('fixed');
b/ui/templates/machines.html
447 447
$("ul.tabs").tabs("div.panes ul");
448 448

  
449 449
$(window).resize(function(){
450
    if (this.innerHeight - 240 < $('#machinesview').height())
450
    if (this.innerHeight - 200 < $('#machinesview').height())
451 451
        $('.confirm_multiple').addClass('fixed');
452 452
    else
453 453
        $('.confirm_multiple').removeClass('fixed');
b/ui/templates/standard.html
246 246
    }
247 247
    
248 248
    // set confirm box position
249
    if (window.innerHeight - 235 < $('#machinesview').height())
249
    if (window.innerHeight - 200 < $('#machinesview').height())
250 250
        $('.confirm_multiple').addClass('fixed');
251 251
    else
252 252
        $('.confirm_multiple').removeClass('fixed');

Also available in: Unified diff