diff --git a/content/incus/try-it.html b/content/incus/try-it.html index 7da84f42..2ebbba2f 100644 --- a/content/incus/try-it.html +++ b/content/incus/try-it.html @@ -52,7 +52,7 @@

Start

diff --git a/content/incus/try-it.ja.html b/content/incus/try-it.ja.html index 4903dbcd..48dd7e4b 100644 --- a/content/incus/try-it.ja.html +++ b/content/incus/try-it.ja.html @@ -55,7 +55,7 @@

試用開始

diff --git a/static/js/tryit.js b/static/js/tryit.js index 0814d906..2df9b4ae 100644 --- a/static/js/tryit.js +++ b/static/js/tryit.js @@ -254,9 +254,34 @@ $(document).ready(function() { $('#tryit_progress').css("display", "inherit"); highlightProgress(getIDFromIndex(0)); + var last_response_len = false; + var last_response = ""; $.ajax({ - url: "https://"+tryit_server+"/1.0/start?terms="+tryit_terms_hash + url: "https://"+tryit_server+"/1.0/start?terms="+tryit_terms_hash, + xhrFields: { + onprogress: function(e) { + var this_response, response = e.currentTarget.response; + if (last_response_len === false) + { + this_response = response; + last_response_len = response.length; + } + else + { + this_response = response.substring(last_response_len); + last_response_len = response.length; + } + last_response = this_response; + + data = $.parseJSON(this_response); + if (data.message != "") { + $('#tryit_start_status').text(data.message); + } + } + } }).then(function(data) { + data = $.parseJSON(last_response); + if (data.status && data.status != 0) { if (data.status == 1) { window.location.href = original_url;