Commit 77307192 authored by BAIRE Anthony's avatar BAIRE Anthony
Browse files

remove hardcoded allgo.inria.fr urls

parent e44d3038
module ApplicationHelper
def avatar_url(email)
"https://allgo.inria.fr/images/guest.png"
"/images/guest.png"
end
def appicon_url(app)
......
......@@ -7,7 +7,7 @@ class WebappPrivateMailer < ApplicationMailer
mail(
to: @webapp.user.email,
subject: 'Your allgo app is ready',
body: "Hello, You can now see and share your webapp by providing this link : https://allgo.inria.fr/app/#{@webapp.docker_name}?access_token=#{@webapp.access_token} to people.
body: "Hello, You can now see and share your webapp by providing this link: #{app_url @webapp.docker_name}?#{{access_token: @webapp.access_token}.to_query} to people.
The Allgo team."
)
end
......
......@@ -3,11 +3,11 @@
<p class="lead">
First, check your private token on your <%= link_to "account page", edit_user_registration_path %> ,
Second, the generic syntax to execute the web service is the one below.
<pre>curl -H 'Authorization: Token token=&#60;your_private_token&#62;' -X POST -F job[webapp_id]=&#60;service_id&#62;
-F job[param]="" -F files[0]=@&#60;path_to_file0&#62; -F files[1]=@&#60;path_to_file1&#62;
-F job[file_url]=&#60; http://www.lirmm.fr/DEMAR/images/inria_corpo_rvb.jpg &#62;
-F job[dataset]=&#60;dataset_name&#62;
https://allgo.inria.fr/api/v1/jobs</pre>
<pre><%="curl -H 'Authorization: Token token=<your_private_token>' -X POST -F job[webapp_id]=<service_id>
-F job[param]='' -F files[0]=@<path_to_file0> -F files[1]=@<path_to_file1>
-F job[file_url]=<your_file_url>
-F job[dataset]=<dataset_name>
#{api_v1_jobs_url}"%></pre>
<ul>
<li> &#60;your_private_token&#62; : this code is given in your accouont information page</li>
<li> one or several input files can be specified using arguments "-F files[i]" </li>
......@@ -20,7 +20,8 @@
</p>
Third, check the resulting job to get the url files with :
<pre>curl -H 'Authorization: Token token=&#60your_private_token&#62' -X GET https://allgo.inria.fr/api/v1/jobs/&#60;job_id&#62;</pre>
<pre><%= "curl -H 'Authorization: Token token=<your_private_token>' -X GET #{api_v1_job_url(id: "ID").gsub("ID", "<job_id>")}" %></pre>
with &#60;job_id&#62; the job number returned by the former cURL command.
<p> This command will give you the list of your files, so you can download them </p>
......
......@@ -5,19 +5,19 @@
<p class="lead"> This app id is : <%= @webapp.id %> </p>
<p class="lead">This curl command will create a job, and return your job url, and also the average execution time</p>
<span class="help-block">files and/or dataset are optionnal, think to remove them if not wanted</span class="help-block">
<pre>
curl -H 'Authorization: Token token=&#60;your_private_token&#62;' -X POST
-F job[webapp_id]=<%= @webapp.id %>
<pre><%="
curl -H 'Authorization: Token token=<your_private_token>' -X POST
-F job[webapp_id]=#{@webapp.id}
-F job[param]=""
-F files[0]=@test.txt
-F files[1]=@test2.csv
-F job[file_url]="http://www.lirmm.fr/DEMAR/images/inria_corpo_rvb.jpg"
-F job[dataset]=&#60;my_dataset_name&#62; https://allgo.inria.fr/api/v1/jobs
</pre>
-F job[file_url]=<my_file_url>
-F job[dataset]=<my_dataset_name> #{api_v1_jobs_url}
"%></pre>
<br />
<p class="lead">Then, check your job to get the url files with :</p>
<pre>
curl -H 'Authorization: Token token=&#60;your_private_token&#62;' -X GET https://allgo.inria.fr/api/v1/jobs/&#60;job_id&#62;
<%="curl -H 'Authorization: Token token=<your_private_token>' -X GET #{api_v1_job_url(id: "ID").gsub("ID", "<job_id>")}"%>
</pre>
</div>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment