Revision 63816e18 ui/templates/machines.html
b/ui/templates/machines.html | ||
---|---|---|
275 | 275 |
$(".reboot").click(function(event) { |
276 | 276 |
$.ajax({ |
277 | 277 |
url: '/api/v1.0/servers/1234/action', |
278 |
//TODO: get the server's id, instead of foo id 1234 |
|
278 | 279 |
type: "POST", |
279 | 280 |
data: { |
280 | 281 |
"reboot": {"type" : "HARD"} |
... | ... | |
284 | 285 |
}); |
285 | 286 |
}); |
286 | 287 |
|
287 |
// destroy action |
|
288 |
$(".destroy").click(function(event) { |
|
289 |
$.ajax({ |
|
290 |
url: '/api/v1.0/servers/1234', |
|
291 |
type: "DELETE", |
|
292 |
//async: false, |
|
293 |
dataType: "json", |
|
294 |
success: function(data) {} |
|
295 |
}); |
|
296 |
}); |
|
297 |
|
|
298 | 288 |
// switch to list view |
299 | 289 |
$("#list").click(function(event){ |
300 | 290 |
$("div.standard#machinesview").load($("#list").attr("href")); |
Also available in: Unified diff