Commit 4754f72b authored by Floreal Cabanettes's avatar Floreal Cabanettes
Browse files

Get id of result to show from url

parent 47df0884
......@@ -2,9 +2,9 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="6f64fbdd-2ff7-4c87-84d0-38027b4fc1bc" name="Default" comment="">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/css/style.css" afterPath="$PROJECT_DIR$/css/style.css" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/js/d3.boxplot.js" afterPath="$PROJECT_DIR$/js/d3.boxplot.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/srv/main.py" afterPath="$PROJECT_DIR$/srv/main.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/srv/templates/index.html" afterPath="$PROJECT_DIR$/srv/templates/index.html" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
......@@ -27,11 +27,11 @@
</provider>
</entry>
</file>
<file leaf-file-name="main.py" pinned="false" current-in-tab="false">
<file leaf-file-name="main.py" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/srv/main.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="340">
<caret line="20" column="15" lean-forward="false" selection-start-line="20" selection-start-column="15" selection-end-line="20" selection-end-column="15" />
<state relative-caret-position="442">
<caret line="26" column="50" lean-forward="true" selection-start-line="26" selection-start-column="50" selection-end-line="26" selection-end-column="50" />
<folding>
<element signature="e#24#33#0" expanded="true" />
</folding>
......@@ -52,8 +52,8 @@
<file leaf-file-name="d3.boxplot.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/js/d3.boxplot.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="221">
<caret line="43" column="46" lean-forward="false" selection-start-line="43" selection-start-column="46" selection-end-line="43" selection-end-column="46" />
<state relative-caret-position="476">
<caret line="46" column="19" lean-forward="false" selection-start-line="46" selection-start-column="19" selection-end-line="46" selection-end-column="19" />
<folding />
</state>
</provider>
......@@ -69,11 +69,11 @@
</provider>
</entry>
</file>
<file leaf-file-name="index.html" pinned="false" current-in-tab="true">
<file leaf-file-name="index.html" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/srv/templates/index.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="170">
<caret line="10" column="110" lean-forward="false" selection-start-line="10" selection-start-column="110" selection-end-line="10" selection-end-column="110" />
<state relative-caret-position="238">
<caret line="14" column="31" lean-forward="false" selection-start-line="14" selection-start-column="31" selection-end-line="14" selection-end-column="31" />
<folding />
</state>
</provider>
......@@ -122,6 +122,7 @@
<find>stroke-w</find>
<find>console.log</find>
<find>zoom =</find>
<find>dirname</find>
</findStrings>
</component>
<component name="Git.Settings">
......@@ -134,10 +135,10 @@
<option value="$PROJECT_DIR$/lib/parse_paf.py" />
<option value="$PROJECT_DIR$/js/draw_graph.js" />
<option value="$PROJECT_DIR$/js/d3.boxplot.events.js" />
<option value="$PROJECT_DIR$/srv/main.py" />
<option value="$PROJECT_DIR$/js/d3.boxplot.js" />
<option value="$PROJECT_DIR$/css/style.css" />
<option value="$PROJECT_DIR$/srv/templates/index.html" />
<option value="$PROJECT_DIR$/js/d3.boxplot.js" />
<option value="$PROJECT_DIR$/srv/main.py" />
</list>
</option>
</component>
......@@ -373,16 +374,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/srv/main.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="340">
<caret line="20" column="15" lean-forward="false" selection-start-line="20" selection-start-column="15" selection-end-line="20" selection-end-column="15" />
<folding>
<element signature="e#24#33#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/prepare_paf.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="178">
......@@ -393,45 +384,55 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/parse_paf.py">
<entry file="file://$PROJECT_DIR$/js/d3.boxplot.events.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="969">
<caret line="57" column="52" lean-forward="false" selection-start-line="57" selection-start-column="52" selection-end-line="57" selection-end-column="52" />
<state relative-caret-position="170">
<caret line="10" column="42" lean-forward="false" selection-start-line="10" selection-start-column="42" selection-end-line="10" selection-end-column="42" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/js/d3.boxplot.js">
<entry file="file://$PROJECT_DIR$/css/style.css">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="221">
<caret line="43" column="46" lean-forward="false" selection-start-line="43" selection-start-column="46" selection-end-line="43" selection-end-column="46" />
<state relative-caret-position="306">
<caret line="72" column="7" lean-forward="true" selection-start-line="72" selection-start-column="7" selection-end-line="72" selection-end-column="7" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/js/d3.boxplot.events.js">
<entry file="file://$PROJECT_DIR$/lib/parse_paf.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="170">
<caret line="10" column="42" lean-forward="false" selection-start-line="10" selection-start-column="42" selection-end-line="10" selection-end-column="42" />
<state relative-caret-position="969">
<caret line="57" column="52" lean-forward="false" selection-start-line="57" selection-start-column="52" selection-end-line="57" selection-end-column="52" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/css/style.css">
<entry file="file://$PROJECT_DIR$/srv/templates/index.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="306">
<caret line="72" column="7" lean-forward="true" selection-start-line="72" selection-start-column="7" selection-end-line="72" selection-end-column="7" />
<state relative-caret-position="238">
<caret line="14" column="31" lean-forward="false" selection-start-line="14" selection-start-column="31" selection-end-line="14" selection-end-column="31" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/srv/templates/index.html">
<entry file="file://$PROJECT_DIR$/js/d3.boxplot.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="170">
<caret line="10" column="110" lean-forward="false" selection-start-line="10" selection-start-column="110" selection-end-line="10" selection-end-column="110" />
<state relative-caret-position="476">
<caret line="46" column="19" lean-forward="false" selection-start-line="46" selection-start-column="19" selection-end-line="46" selection-end-column="19" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/srv/main.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="442">
<caret line="26" column="50" lean-forward="true" selection-start-line="26" selection-start-column="50" selection-end-line="26" selection-end-column="50" />
<folding>
<element signature="e#24#33#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</component>
</project>
\ No newline at end of file
......@@ -39,13 +39,12 @@ d3.boxplot.color_idy = {
//Filter sizes:
d3.boxplot.min_sizes = [0, 0.01, 0.02, 0.03, 0.05, 1, 2];
d3.boxplot.init = function () {
d3.boxplot.init = function (id) {
$("#filter_size").val(0);
$("#stroke-linecap").prop("checked", false);
$("#stroke-width").val(0);
$.post("/get_graph",
{"id": "araduvseve2"},
//{"id": "2_10_vs_thal_f"},
{"id": id},
function (data) {
let res = null;
try {
......
......@@ -5,9 +5,6 @@ import json
from flask import Flask, render_template, request
from lib.parse_paf import parse_paf
# Init Jinja2 template loader:
dirname = os.path.dirname(__file__)
# Init Flash:
app = Flask(__name__, static_url_path='/static')
......@@ -16,10 +13,10 @@ app_data = "/home/fcabanettes/public_html/test"
# Root path
@app.route("/")
def hello():
@app.route("/result/<id_res>", methods=['GET'])
def hello(id_res):
title = "IGenoComp - An Interactive Genome Comparator"
return render_template("index.html", title=title)
return render_template("index.html", title=title, id=id_res)
@app.route('/get_graph', methods=['POST'])
......
......@@ -12,7 +12,7 @@
<link rel="stylesheet" href="{{ url_for('static', filename='css/jquery-ui.min.css') }}" type="text/css">
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}" type="text/css">
</head>
<body onload="d3.boxplot.init();">
<body onload="d3.boxplot.init('{{ id }}');">
<div id="main-bar-title">
<img src="{{ url_for('static', filename='images/logo.png') }}" height="40px" alt=""/><h1>{{ title }}</h1>
</div>
......
Markdown is supported
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