-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
106 additions
and
1 deletion.
There are no files selected for viewing
Binary file not shown.
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,62 @@ | ||
const url = new URL(window.location.href); | ||
let p = new URLSearchParams(url.search); | ||
let caseId = p.get('id'); | ||
const path = '../../' + config.path; | ||
|
||
$(window).ready(() => { | ||
$.get(`${path}/summary.json`, (data) => { | ||
let x = data.cases.find((x) => x.id == caseId); | ||
console.log(x); | ||
|
||
$('#caseId').html(x.id); | ||
$('#caseId').removeClass().addClass('retCode_' + x.l2v5RetCode); | ||
$('#casePath').html(`${path}/cases/${x.id}/`); | ||
$('#retCode').html(x.l2v5RetCode); | ||
|
||
$.get(`${path}/cases/${x.id}/synopsis.txt`, (data) => { | ||
let shorted = splitLines(data); | ||
$('#synopsis pre code').html(shorted); | ||
}).fail(() => { | ||
$('#synopsis pre code').html('No synopsis.txt file found'); | ||
}); | ||
|
||
$.get(`${path}/cases/${x.id}/l2v5/heta-code/output.heta`, (data) => { | ||
$('#heta-code-l2v5 pre code').html(data); | ||
}).fail(() => { | ||
$('#heta-code-l2v5 pre code').html('No l2v5/heta-code/output.heta file found'); | ||
}); | ||
$.get(`${path}/cases/${x.id}/l2v5/build.log`, (data) => { | ||
$('#logs-l2v5 pre code').html(data); | ||
}).fail(() => { | ||
$('#logs-l2v5 pre code').html('No l2v5/build.log file found'); | ||
}); | ||
|
||
$.get(`${path}/cases/${x.id}/l3v2/heta-code/output.heta`, (data) => { | ||
$('#heta-code-l3v2 pre code').html(data); | ||
}).fail(() => { | ||
$('#heta-code-l3v2 pre code').html('No l3v2/heta-code/output.heta file found'); | ||
}); | ||
$.get(`${path}/cases/${x.id}/l3v2/build.log`, (data) => { | ||
$('#logs-l3v2 pre code').html(data); | ||
}).fail(() => { | ||
$('#logs-l3v2 pre code').html('No l3v2/build.log file found'); | ||
}); | ||
}); | ||
}); | ||
|
||
function splitLines(s) { | ||
let newS = []; | ||
s.split('\n').forEach((line) => { | ||
if (line.length <= 180) { | ||
newS.push(line); | ||
} else { | ||
let i = 0; | ||
while (i < line.length) { | ||
newS.push(line.slice(i, i + 100)); | ||
i += 100; | ||
} | ||
} | ||
}); | ||
|
||
return newS.join('\n'); | ||
} |
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,42 @@ | ||
<!DOCTYPE html> | ||
<HTML> | ||
<head> | ||
<meta charset="UTF-8"/> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> | ||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> | ||
<script src="../config.js"></script> | ||
<script src="case.js"></script> | ||
<link rel="stylesheet" href="../style.css"/> | ||
<title>SBML case result</title> | ||
</head> | ||
<body> | ||
<div> | ||
<h1>SBML case results</h1> | ||
<div id="preamble"> | ||
<h2 id="caseId"></h2> | ||
<p>Case path: <span id="casePath"></span></p> | ||
<p>Return code: <span id="retCode"></span></p> | ||
</div> | ||
<div id="synopsis"> | ||
<h3>Synopsis</h3> | ||
<pre><code class="text"></code></pre> | ||
</div> | ||
<div id="heta-code-l2v5"> | ||
<h3>Heta code</h3> | ||
<pre class="heta"><code></code></pre> | ||
</div> | ||
<div id="logs-l2v5"> | ||
<h3>Logs</h3> | ||
<pre><code class="text"></code></pre> | ||
</div> | ||
<div id="heta-code-l3v2"> | ||
<h3>Heta code</h3> | ||
<pre class="heta"><code></code></pre> | ||
</div> | ||
<div id="logs-l3v2"> | ||
<h3>Logs</h3> | ||
<pre><code class="text"></code></pre> | ||
</div> | ||
</div> | ||
</body> | ||
</HTML> |
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,5 +1,5 @@ | ||
window.config = { | ||
results: './results.json', | ||
figPath: './cases/output', | ||
path: 'latest', // base_dir | ||
path: 'result/latest', | ||
}; |
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