Merge pull request #118 from vmarmol/ui-fix

Request 60s of container history and no samples in the UI.
This commit is contained in:
Vish Kannan 2014-07-24 11:26:26 -07:00
commit 93b5e2be5b

View File

@ -90,9 +90,14 @@ function getMachineInfo(callback) {
// Get the container stats for the specified container.
function getStats(containerName, callback) {
$.getJSON("/api/v1.0/containers" + containerName, function(data) {
callback(data);
// Request 60s of container history and no samples.
var request = JSON.stringify({
"num_stats": 60,
"num_samples": 0
});
$.post("/api/v1.0/containers" + containerName, request, function(data) {
callback(data);
}, "json");
}
// Draw the graph for CPU usage.