summaryrefslogtreecommitdiff
path: root/views/upload.haml
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2019-08-16 09:49:53 +0000
committergebele <gebele@in-silico.ch>2019-08-16 09:49:53 +0000
commit270bddf5081671cd1905d6cce6eb3659159f573a (patch)
tree86dd2db590b86185cce8f52cefb2b7fba0fb9623 /views/upload.haml
parent74332693fed1d5ecb695dd6ae0c2fc611d14c4d7 (diff)
change hostname method
Diffstat (limited to 'views/upload.haml')
-rw-r--r--views/upload.haml6
1 files changed, 3 insertions, 3 deletions
diff --git a/views/upload.haml b/views/upload.haml
index 159f7a5..54faa5c 100644
--- a/views/upload.haml
+++ b/views/upload.haml
@@ -1,5 +1,5 @@
%div.card
- %a.btn.btn-outline-info{:href => "//#{ENV['VIRTUAL_HOST']}/predict"}
+ %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"}
@@ -9,7 +9,7 @@
:javascript
$(document).ready(function() {
var aClient = new HttpClient();
- aClient.post('//#{ENV['VIRTUAL_HOST']}/predict', 'models=#{@models}&batchfile=#{@filename}', function(res1) {
+ 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);
@@ -17,7 +17,7 @@
var response = res1.responseText;
}
if (res1.status == 200 && response['models'] && response['dataset_id']){
- aClient.post('//#{ENV['VIRTUAL_HOST']}/predict', 'models='+response['models']+'&dataset_id='+response['dataset_id'], function(res2) {
+ aClient.post('//#{$host_with_port}/predict', 'models='+response['models']+'&dataset_id='+response['dataset_id'], function(res2) {
$("body").html(res2.responseText);
});
}