Commit d4f7dd61 authored by Magnus Holm Brunbjerg's avatar Magnus Holm Brunbjerg
Browse files

Minor update

parent 75923eee
......@@ -15,6 +15,8 @@ body {
width: 200px;
position: fixed;
border-right: 1px solid #000000;
background-color: #ffffff;
z-index: 1;
}
.nav-content {
......@@ -34,7 +36,7 @@ body {
.content {
margin: 0px 0px 0px 200px;
padding: 25px 15px 25px 15px;
padding: 25px 25px 25px 25px;
}
table, th, td {
......
......@@ -17,19 +17,22 @@
function makeData (data) {
const labels = []
const issues = []
let stepCounter = {}
let issueCounter = {}
let time = {}
for (let i = 0; i < data.length; i++) {
const step = data[i].step
if (!stepCounter[step]) {
stepCounter[step] = 1
// Increment count if it already has a count
if (issueCounter[step]) {
issueCounter[step] = issueCounter[step] += 1
} else {
stepCounter[step] = stepCounter[step] += 1
// If a step has no issue count
issueCounter[step] = 1
}
}
for (let step in stepCounter) {
issues.push(stepCounter[step])
for (let step in issueCounter) {
issues.push(issueCounter[step])
labels.push(step)
}
}
return { labels, issues }
}
......@@ -62,7 +65,7 @@
}
})
}
const dataset = [{{#each issues}}{ id: '{{this.id}}', experiment_id: '{{this.experiment_id}}', hardware_id: '{{this.hardware_id}}', step: {{this.step}}, start_time: '{{this.start_time}}', end_time: '{{this.end_time}}' }{{#unless @last}}, {{/unless}}{{/each}}]
makeChart(dataset)
</script>
......
<nav class="nav-content">
<a href="/" class="nav-item"><img src="/images/logo/logo.png" alt="Logo" width="100px"></a>
<a href="/" class="nav-item">Forside</a>
<a href="/experiments" class="nav-item">Eksperimenter</a>
</nav>
\ No newline at end of file
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