Changeset - 7ac5cbe5e18c
[Not reviewed]
0 1 0
Jan Kaluza - 9 years ago 2016-01-28 10:41:43
jkaluza@redhat.com
Web interface: Fix show_room_list
1 file changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
spectrum_manager/src/html/js/app.js
Show inline comments
 
@@ -75,13 +75,13 @@ function show_list_rooms() {
 
	$.get($.cookie("base_location") + "api/v1/instances/list_rooms/" + query.id, function(data) {
 
		$("#main_content").html("<h2>Joined rooms</h2><table id='main_result'><tr><th>" + data.frontend_room_label + "</th><th>" + data.legacy_room_label + "</th><th>" + data.legacy_server_label + "</th><th>" + data.name_label + "</th><th>Actions</th></tr>");
 

	
 
		$.each(data.room, function(i, instance) {
 
		$.each(data.rooms, function(i, room) {
 
			var row = '<tr>';
 
			row += '<td>' + room.frontend_room + '</td>';
 
			row += '<td>' + room.legacy_room + '</td>';
 
			row += '<td>' + room.legacy_server + '</td>';
 
			row += '<td>' + room.name + '</td>';
 
			row += '<td><a class="button_command" href="' + $.cookie("base_location") +  'api/v1/instances/leave_room/' + instance.id + '?frontend_room=' + room.frontend_room + '">Leave</a></td>';
 
			row += '<td><a class="button_command" href="' + $.cookie("base_location") +  'api/v1/instances/leave_room/' + query.id + '?frontend_room=' + room.frontend_room + '">Leave</a></td>';
 
			row += '</tr>';
 

	
 
			$("#main_result  > tbody:last-child").append(row);
 
@@ -91,7 +91,7 @@ function show_list_rooms() {
 

	
 
				var url = $(this).attr('href');
 
				$.get(url, function(data) {
 
					show_instances();
 
					show_list_rooms();
 
				});
 
			})
 
		});
0 comments (0 inline, 0 general)