-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding view to see plot of features and listing of specs. When we hav…
…e working specs we can add the "find similar working" view Signed-off-by: vsoch <vsoch@users.noreply.github.com>
- Loading branch information
Showing
8 changed files
with
193 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
all: | ||
uvicorn app.main:app --host=0.0.0.0 --port=5000 | ||
uvicorn app.main:app --host=0.0.0.0 --port=5000 --reload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,5 @@ aiofiles==0.8.0 | |
python-multipart==0.0.5 | ||
jinja2==3.0.3 | ||
Markdown==3.3.6 | ||
pytest==6.2.5 | ||
pytest==6.2.5 | ||
pyaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{% extends "base.html" %} | ||
{% set active_page = "error-cluster" %} | ||
|
||
{% block title %}Error Cluster {{ cluster_id }}{% endblock %} | ||
{% block head %} | ||
<link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/themes/prism-coy.min.css" rel="stylesheet" type="text/css"> | ||
{{ super() }} | ||
|
||
{% endblock %} | ||
|
||
{% block page_content %} | ||
|
||
<div class="row"> | ||
<div class="col-md-4"> | ||
<h1 class="cap">Error Cluster {{ cluster_id }}</h1> | ||
<p><strong>{{ specs | length }}</strong> specs are assigned to this cluster!</p> | ||
</div> | ||
<div class="col-md-8"> | ||
<a href="/analysis/features/{{ cluster_id }}" type="button" class="btn btn-primary right-button">View Features</a> | ||
<a type="button" class="btn btn-primary right-button">Find Similar Working</a> | ||
</div> | ||
</div> | ||
|
||
<div class="row"><div class="col-md-12"> | ||
<div class="accordion" id="accordionSpecs"> | ||
{% for spec_hash, spec in specs.items() %}<div class="accordion-item"> | ||
<h2 class="accordion-header" id="heading-{{ spec_hash }}"> | ||
<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#collapse-{{ spec_hash }}" aria-expanded="true" aria-controls="collapse-{{ spec_hash }}"> | ||
<strong style="margin-right:5px">Spec #{{ loop.index }}</strong> {{ spec_hash }} | ||
</button> | ||
</h2> | ||
<div id="collapse-{{ spec_hash }}" class="accordion-collapse collapse" aria-labelledby="heading" data-bs-parent="#accordionSpecs"> | ||
<div class="accordion-body"> | ||
<pre><code class="language-javascript"> | ||
{{ spec }} | ||
</code></pre> | ||
</div> | ||
</div> | ||
</div> | ||
{% endfor %} | ||
</div> | ||
</div></div> <!-- end row/col--> | ||
|
||
{% endblock %} | ||
|
||
{% block scripts %} | ||
{{ super() }} | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/prism.min.js"></script> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
{% extends "base.html" %} | ||
{% set active_page = "features" %} | ||
|
||
{% block title %}Features for Cluster {{ cluster_id }}{% endblock %} | ||
{% block head %} | ||
{{ super() }} | ||
|
||
{% endblock %} | ||
|
||
{% block page_content %} | ||
|
||
<div class="row"> | ||
<div class="col-md-4"> | ||
<h1 class="cap">Features for Cluster {{ cluster_id }}</h1> | ||
{% if not features %}<p>This cluster does not have any features.</p>{% endif %} | ||
</div> | ||
<div class="col-md-8"> | ||
<a href="/analysis/errors/{{ cluster_id }}" type="button" class="btn btn-primary right-button">Back to Specs</a> | ||
<a type="button" class="btn btn-primary right-button">Find Similar Working</a> | ||
</div> | ||
</div> | ||
|
||
<div class="row"><div class="col-md-12"> | ||
<div style="height:700px"><canvas id="features"></canvas></div> | ||
</div></div> <!-- end row/col--> | ||
|
||
{% endblock %} | ||
|
||
{% block scripts %} | ||
{{ super() }} | ||
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.5.0/Chart.min.js"></script> | ||
<script> | ||
function make_plot() { | ||
var data = { | ||
labels: [{% for feature in features %}"{{ feature[0] }}"{% if loop.last %}{% else %},{% endif %}{% endfor %}], | ||
datasets: [{ | ||
label: "Features for Cluster {{ cluster_id }}", | ||
backgroundColor: "rgba(15, 58, 128, 0.47)", | ||
borderColor: "rgb(4, 69, 174)", | ||
borderWidth: 2, | ||
hoverBackgroundColor: "rgb(15, 58, 128)", | ||
hoverBorderColor: "rgb(102, 16, 242)", | ||
data: [{% for feature in features %}{{ feature[1]}}{% if loop.last %}{% else %},{% endif %}{% endfor %}], | ||
}] | ||
}; | ||
|
||
var option = { | ||
scales: { | ||
yAxes: [{ | ||
stacked: true, | ||
gridLines: { | ||
display: true, | ||
color: "rgba(15, 58, 128, 0.2)" | ||
} | ||
}], | ||
xAxes: [{ | ||
gridLines: { | ||
display: false | ||
}, | ||
ticks: { | ||
autoSkip: false | ||
} | ||
}] | ||
} | ||
}; | ||
|
||
Chart.Bar('features', { | ||
options: option, | ||
data: data, | ||
options: { | ||
responsive: true, | ||
maintainAspectRatio: false | ||
} | ||
}); | ||
} | ||
|
||
make_plot() | ||
</script> | ||
{% endblock %} |
This file was deleted.
Oops, something went wrong.