Sha256: d96fe4ea72d9aff7f2e23ce66b9265ea0c79913343227325cb8f78eb8ae7b1a4
Contents?: true
Size: 1.24 KB
Versions: 4
Compression:
Stored size: 1.24 KB
Contents
%div.card %a.btn.btn-outline-info{:href => "//#{$host_with_port}/predict"} %span.fa.fa-caret-left{:aria=>{:hidden=>"true"}} New Prediction %div.card.bg-light{:id=>"uploadDataset"} %div.card-body %h3.card-title="Processing file #{@filename} to dataset." %img.h2{:src=>"/images/wait30trans.gif", :id=>"circle_upload", :class=>"circle", :alt=>"processing"} :javascript $(document).ready(function() { var aClient = new HttpClient(); aClient.post('//#{$host_with_port}/predict', 'models=#{@models}&batchfile=#{@filename}', function(res1) { var contentType = res1.getResponseHeader('content-type'); if (contentType == "application/json"){ var response = JSON.parse(res1.responseText); } else { var response = res1.responseText; } if (res1.status == 200 && response['models'] && response['dataset_id']){ aClient.post('//#{$host_with_port}/predict', 'models='+response['models']+'&dataset_id='+response['dataset_id'], function(res2) { $("body").html(res2.responseText); }); } if (res1.status == 200 && contentType == "text/html"){ $("body").html(response); } }); });
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
lazar-gui-1.4.2 | views/upload.haml |
lazar-gui-1.4.1 | views/upload.haml |
lazar-gui-1.4.0 | views/upload.haml |
lazar-gui-1.4.0.pre.0 | views/upload.haml |