Skip to content

Commit

Permalink
#63 Display results in detail view
Browse files Browse the repository at this point in the history
  • Loading branch information
chovanecm committed Mar 25, 2018
1 parent 920ee07 commit 7423086
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sacredboard",
"version": "0.4.1-dev1",
"version": "0.4.1-dev2",
"description": "Sacredboard NPM package file for automatic tests.",
"dependencies": {},
"devDependencies": [
Expand Down
13 changes: 13 additions & 0 deletions sacredboard/static/scripts/runs/detailView/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ <h3>Details for: <!--ko text: run.experiment_name--><!--/ko-->
<a data-bind="attr: {href: '#captured-output-' + run.id}"
data-toggle="pill">Captured output</a>
</li>
<li role="presentation">
<a data-bind="attr: {href: '#experiment-result-' + run.id}"
data-toggle="pill">Result</a>
</li>

<li role="presentation">
<a data-bind="attr: {href: '#experiment-experiment-' + run.id}"
data-toggle="pill">Experiment</a>
Expand Down Expand Up @@ -66,6 +71,14 @@ <h4>Run info</h4>
params="value: run.object.info"></dictionary-browser>
</div>
</div>
<div data-bind="attr: {id: 'experiment-result-' + run.id}"
class="tab-pane table-responsive">
<h4>Result</h4>
<div class="detail-page-box">
<dictionary-browser
params="value: run.result"></dictionary-browser>
</div>
</div>
<div data-bind="attr: {id: 'experiment-experiment-' + run.id}"
class="tab-pane table-responsive">
<h4>Experiment</h4>
Expand Down
28 changes: 22 additions & 6 deletions sacredboard/static/scripts/runs/dictionaryBrowser/template.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
<table class="table table-condensed table-hover"
data-bind="foreach: {data: dict.getChildren(), as: 'entry'}"
style="border-left: groove">
<tr data-bind="click: entry.toggleCollapse,
css: { 'cursor-pointer': entry.hasChildren() }"><td data-bind="text: entry.getDisplayName()"></td><td data-bind="text: entry.getDisplayValue()"></td></tr>
<tr data-bind="visible: !entry.contentCollapsed()">
<td colspan="2" style="padding-top: 0"><dictionary-browser params="value: entry.value"></dictionary-browser></td></tr>
</table>
<!-- ko ifnot: dict.hasChildren() -->
<tbody>
<tr><td data-bind="text: dict.getDisplayValue()"></td></tr>
</tbody>
<!-- /ko -->
<!-- ko if: dict.hasChildren() -->
<tbody data-bind="foreach: {data: dict.getChildren(), as: 'entry'}">
<tr data-bind="click: entry.toggleCollapse,
css: { 'cursor-pointer': entry.hasChildren() }">
<td data-bind="text: entry.getDisplayName()"></td>
<td data-bind="text: entry.getDisplayValue()"></td>
</tr>
<!-- ko if: entry.hasChildren() -->
<tr data-bind="visible: !entry.contentCollapsed()">
<td colspan="2" style="padding-top: 0">
<dictionary-browser params="value: entry.value"></dictionary-browser>
</td>
</tr>
<!-- /ko -->
</tbody>
<!-- /ko -->
</table>
2 changes: 1 addition & 1 deletion sacredboard/tests/app/test_sacredboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

class TestSacredboard(TestCase):
def test_get_version(self):
assert Sacredboard.get_version() == "0.4.1.dev1"
assert Sacredboard.get_version() == "0.4.1.dev2"

0 comments on commit 7423086

Please sign in to comment.