aboutsummaryrefslogtreecommitdiff
path: root/gn2
diff options
context:
space:
mode:
authorAlexander Kabui2024-09-17 15:43:40 +0300
committerGitHub2024-09-17 15:43:40 +0300
commitd58288c315481c766bce203493bbcf3fb038b0e2 (patch)
tree0a6df879fd2bf7f8fb6959f8d58ef253f844f874 /gn2
parent02b2ac384953f2d69479a1ea53a071043394b590 (diff)
parent5c71ead0411b834b51bf084c147543208390c310 (diff)
downloadgenenetwork2-d58288c315481c766bce203493bbcf3fb038b0e2.tar.gz
Merge pull request #873 from genenetwork/chores/editor-ui-refactoring
Refactor: Gn editor code refactoring.
Diffstat (limited to 'gn2')
-rw-r--r--gn2/wqflask/__init__.py2
-rw-r--r--gn2/wqflask/static/new/javascript/show_trait.js2
-rw-r--r--gn2/wqflask/templates/gn_editor.html4
-rw-r--r--gn2/wqflask/templates/gn_editor_commit.html8
-rw-r--r--gn2/wqflask/templates/gn_editor_results_page.html31
-rw-r--r--gn2/wqflask/templates/mapping_results.html10
-rw-r--r--gn2/wqflask/templates/show_trait_calculate_correlations.html2
-rw-r--r--gn2/wqflask/templates/show_trait_statistics.html2
8 files changed, 31 insertions, 30 deletions
diff --git a/gn2/wqflask/__init__.py b/gn2/wqflask/__init__.py
index d959598d..af386317 100644
--- a/gn2/wqflask/__init__.py
+++ b/gn2/wqflask/__init__.py
@@ -110,7 +110,7 @@ app.jinja_env.globals.update(
# Registering blueprints
-app.register_blueprint(gn_docs_blueprint, url_prefix="/gn_docs")
+app.register_blueprint(gn_docs_blueprint, url_prefix="/gn-docs")
app.register_blueprint(glossary_blueprint, url_prefix="/glossary")
app.register_blueprint(references_blueprint, url_prefix="/references")
app.register_blueprint(links_blueprint, url_prefix="/links")
diff --git a/gn2/wqflask/static/new/javascript/show_trait.js b/gn2/wqflask/static/new/javascript/show_trait.js
index edb2cfab..6d77e130 100644
--- a/gn2/wqflask/static/new/javascript/show_trait.js
+++ b/gn2/wqflask/static/new/javascript/show_trait.js
@@ -68,7 +68,7 @@ statTableRows.push(
}, {
vn: "interquartile",
pretty: "<font color='black'>Interquartile Range</font>",
- url: "http://www.genenetwork.org/glossary.html#Interquartile",
+ url: "{{ url_for('gn_docs_blueprint.glossary') }}#Interquartile",
digits: 3
}, {
vn: "skewness",
diff --git a/gn2/wqflask/templates/gn_editor.html b/gn2/wqflask/templates/gn_editor.html
index d89aaf0a..6f4685ac 100644
--- a/gn2/wqflask/templates/gn_editor.html
+++ b/gn2/wqflask/templates/gn_editor.html
@@ -29,10 +29,10 @@
hx-get="/editor/commit"
hx-target="#output"
hx-trigger="click"
- hx-swap="innerHTML">Commit</a>
+ hx-swap="innerHTML">Save</a>
</li>
<li>
- <a hx-trigger="click" id="diffBtn" hx-swap="innerHTML">Diff</a>
+ <a hx-trigger="click" id="diffBtn" hx-swap="innerHTML">Show Diff</a>
</li>
<li>
<a href="#"
diff --git a/gn2/wqflask/templates/gn_editor_commit.html b/gn2/wqflask/templates/gn_editor_commit.html
index 2eb3e60c..6006f6d2 100644
--- a/gn2/wqflask/templates/gn_editor_commit.html
+++ b/gn2/wqflask/templates/gn_editor_commit.html
@@ -3,7 +3,7 @@
<div>
<div>
<h2>
- <i>Commit your Changes</i>
+ <i>Save your Changes</i>
</h2>
</div>
</div>
@@ -11,7 +11,7 @@
<div>
<div class="row">
<label class="col-sm-8" for="message">
- <i>*Commit Message*</i>
+ <i>*Describe edit*</i>
</label>
</div>
<br>
@@ -24,9 +24,9 @@
<br>
<div class="row">
<button id="btn-commit"
- class="btn btn-primary col-lg-3 col-lg-offset-1 col-sm-4 col-sm-offset-1">Commit</button>
+ class="btn btn-primary col-lg-3 col-lg-offset-1 col-sm-4 col-sm-offset-1">Save</button>
<button id="btn-diff"
- class="btn col-lg-3 col-lg-offset-1 col-sm-4 col-sm-offset-1">Show Diff</button>
+ class="btn col-lg-3 col-lg-offset-1 col-sm-4 col-sm-offset-1">Show Edit Diff</button>
</div>
<br>
<div id="diff_page"></div>
diff --git a/gn2/wqflask/templates/gn_editor_results_page.html b/gn2/wqflask/templates/gn_editor_results_page.html
index 6eaeb941..4f169a66 100644
--- a/gn2/wqflask/templates/gn_editor_results_page.html
+++ b/gn2/wqflask/templates/gn_editor_results_page.html
@@ -1,13 +1,5 @@
<section classs="row commit-content" style="padding-top:25px">
<div class="col-sm-10 col-sm-offset-1">
- <div>
- <div>
- <h2>
- <i>Results status - {{ status }}</i>
- </h2>
- </div>
- </div>
- <br>
{% if error %}
<h1>
Error-type: <mark style="font-family: 'Linux Libertine','Georgia','Times','Source Serif Pro',serif"><b><i>{{ error }}</i></b></mark>
@@ -18,18 +10,27 @@
</h3>
{% else %}
<div>
+ <div class="lead">
+ <h3>
+ Save results message:
+ <mark style="font-family: 'Linux Libertine','Georgia','Times','Source Serif Pro',serif"><b>
+ {% if status == '200' %}
+ <i>Everything is up to date; No changes to Save</i>
+ {% elif status == '201' %}
+ <i> Saved your changes Successfully </i>
+ {% else %}
+ {{ message }}
+ {% endif %}
+ </b></mark>
+ </h3>
+ </div>
+ <br />
<h3>
- New Commit Sha: <span class="lead">
+ New Edit Sha: <span class="lead">
<mark style="font-family: 'Linux Libertine','Georgia','Times','Source Serif Pro',serif"><b><i>{{ commit_sha }}</i></b></mark>
</span>
</h3>
<br />
- <div class="lead">
- <h3>
- Commit Message:
- <mark style="font-family: 'Linux Libertine','Georgia','Times','Source Serif Pro',serif"><b><i>{{ message }}</i></b></mark>
- </h3>
- </div>
</div>
{% endif %}
<br>
diff --git a/gn2/wqflask/templates/mapping_results.html b/gn2/wqflask/templates/mapping_results.html
index 2fed79c1..2b1660fd 100644
--- a/gn2/wqflask/templates/mapping_results.html
+++ b/gn2/wqflask/templates/mapping_results.html
@@ -116,7 +116,7 @@
<label class="radio-inline">
<input type="radio" name="LRSCheck" value="{% if LRS_LOD == "-logP" %}-logP{% else %}LOD{% endif %}" {% if LRS_LOD == "LOD" or LRS_LOD == "-logP" %}checked{% endif %}>{% if LRS_LOD == "-logP" %}-logP{% else %}LOD{% endif %}
</label>
- <a href="https://genenetwork.org/glossary.html#LOD" target="_blank">
+ <a href="{{ url_for('gn_docs_blueprint.glossary') }}#LOD" target="_blank">
<sup style="color:#f00"> ?</sup>
</a>
</td>
@@ -158,27 +158,27 @@
<div class="col-xs-4" style="padding: 0px;">
{% if (mapping_method == "reaper" or mapping_method == "rqtl_geno") and nperm > 0 %}
<input type="checkbox" name="permCheck" class="checkbox" style="display: inline; margin-top: 0px;" {% if permChecked|upper == "ON" %}value="ON" checked{% endif %}> <span style="font-size: 12px;">Permutation Test
- <a href="http://genenetwork.org/glossary.html#Permutation" target="_blank">
+ <a href="{{ url_for('gn_docs_blueprint.glossary') }}#Permutation" target="_blank">
<sup style="color:#f00"> ?</sup>
</a>
<br>
{% endif %}
{% if mapping_method == "reaper" and nboot > 0 %}
<input type="checkbox" name="bootCheck" class="checkbox" style="display: inline; margin-top: 0px;" {% if bootChecked|upper == "ON" %}value="ON" checked{% endif %}> <span style="font-size: 12px;">Bootstrap Test
- <a href="http://genenetwork.org/glossary.html#bootstrap" target="_blank">
+ <a href="{{ url_for('gn_docs_blueprint.glossary') }}#bootstrap" target="_blank">
<sup style="color:#f00"> ?</sup>
</a>
<br>
{% endif %}
{% if mapping_method == "reaper" %}
<input type="checkbox" name="additiveCheck" class="checkbox" style="display: inline; margin-top: 0px;" {% if additiveChecked|upper == "ON" %}value="ON" checked{% endif %}> <span style="font-size: 12px;">Allele Effects
- <a href="http://genenetwork.org/glossary.html#additive" target="_blank">
+ <a href="{{ url_for('gn_docs_blueprint.glossary') }}#additive" target="_blank">
<sup style="color:#f00"> ?</sup>
</a>
<br>
{% endif %}
<input type="checkbox" name="showSNP" class="checkbox" style="display: inline; margin-top: 0px;" {% if SNPChecked|upper == "ON" %}value="ON" checked{% endif %}> <span style="font-size: 12px;">SNP Track </span>
- <a href="http://genenetwork.org/glossary.html#snpSeismograph" target="_blank">
+ <a href="{{ url_for('gn_docs_blueprint.glossary') }}#snpSeismograph" target="_blank">
<sup style="color:#f00"> ?</sup>
</a>
<span style="color:red;">*</span>
diff --git a/gn2/wqflask/templates/show_trait_calculate_correlations.html b/gn2/wqflask/templates/show_trait_calculate_correlations.html
index d2e6624e..2f78a095 100644
--- a/gn2/wqflask/templates/show_trait_calculate_correlations.html
+++ b/gn2/wqflask/templates/show_trait_calculate_correlations.html
@@ -148,7 +148,7 @@
Semantic Gene Organizer</span>
and human, rat, and mouse data from PubMed.
Values are ranked by Lit r, but Sample r and Tissue r are also displayed.<br>
- <a href="http://genenetwork.org/glossary.html#Literature">More on using Lit r</a></dd>
+ <a href="{{ url_for('gn_docs_blueprint.glossary') }}#Literature">More on using Lit r</a></dd>
<dt class="map-method-text">Tissue Correlation</dt>
<dd>The <a href="http://genenetwork.org/webqtl/main.py?FormID=tissueCorrelation">Tissue Correlation</a>
(Tissue r)
diff --git a/gn2/wqflask/templates/show_trait_statistics.html b/gn2/wqflask/templates/show_trait_statistics.html
index 9ee0de5c..d16835e7 100644
--- a/gn2/wqflask/templates/show_trait_statistics.html
+++ b/gn2/wqflask/templates/show_trait_statistics.html
@@ -87,7 +87,7 @@
<br>
<div>
More about <a href="http://en.wikipedia.org/wiki/Normal_probability_plot">Normal Probability Plots</a> and more
- about interpreting these plots from the <a href="http://genenetwork.org/glossary.html#normal_probability">glossary</a>
+ about interpreting these plots from the <a href="{{ url_for('gn_docs_blueprint.glossary') }}#normal_probability">glossary</a>
</div>
</div>
</div>