Skip to content

Commit

Permalink
Merge pull request #188 from wtrgjadmw/modify-layout
Browse files Browse the repository at this point in the history
This PR modified the layout of serial console to the side of the power graph to make the graphs of two iterations visible without scrolling the page. Also, d3area was deleted because it is not used.
  • Loading branch information
wtrgjadmw authored Dec 7, 2023
2 parents 6a5d995 + 49a8bfb commit 09fe027
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 26 deletions.
3 changes: 2 additions & 1 deletion docs/servo_power_test/dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/servo_power_test/dist/index.js.map

Large diffs are not rendered by default.

30 changes: 14 additions & 16 deletions docs/servo_power_test/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -158,19 +158,24 @@ body {
}

#backlog {
margin-top: 1rem;
width: 100vw;
width: 25%;
padding: 0;
box-sizing: border-box;
display: flex;
flex-direction: column;
}

#backlog span {
display: inline-block;
border: 1px solid #aaa;
padding: 1rem;
padding: 16px;
width: auto;
min-height: 100px;
height: 300px;
height: 448px;
font-family: monospace;
white-space: pre-wrap;
word-wrap: break-word;
overflow-y: scroll;
}

.log {
Expand All @@ -179,18 +184,11 @@ body {
width: 26%;
}

#d3area {
width: 50%;
overflow-y: scroll;
}

#dut-console {
height: 100%;
width: 24%;
font-family: monospace;
white-space: pre-wrap;
word-wrap: break-word;
overflow-y: scroll;
#graph-list {
width: 75%;
left: 0;
right: 0;
margin: 0;
}

#popup-overlay {
Expand Down
15 changes: 8 additions & 7 deletions docs/servo_power_test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,25 @@
<button id='halt-button'>Cancel</button>
<button id='download-button'>Download</button>
<span>number of iterations: <input id="iteration-input" type="number" placeholder="1"></span>
<span>margin: <input id="margin-time-input" type="number" value="300" autocomplete="off" />ms</span>
</div>
<div id="config">
<button id="add-config-button">Add config</button>
<ul id="shell-script-list"></ul>
</div>
<p>margin: <input id="margin-time-input" type="number" value="300" autocomplete="off" />ms</p>
<div id="total-histogram"></div>
<div id="backlog">
<span id="serial-output" class="log"></span>
<span id="d3area"></span>
<span id="dut-console"></span>
</div>
<div class="flex">
<p>current iteration: </p>
<select id="iteration-selector" class="hidden"></select>
<p id="current-iteration"></p>
</div>
<ul id="graph-list"></ul>
<div class="flex">
<div id="backlog">
<span id="serial-output" class="log"></span>
<span id="dut-console"></span>
</div>
<ul id="graph-list"></ul>
</div>
<span id="drop-zone">Drop .json here</span>
<script src='./dist/index.js'></script>
</body>
3 changes: 2 additions & 1 deletion docs/servo_power_test/src/graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class Graph {
constructor(ui: Ui, graphDiv: HTMLElement, histogramDiv: HTMLElement) {
this.ui = ui;
this.g = new Dygraph(graphDiv, [], {
height: 500,
height: 480,
});
const parentElementSize = d3
.select(histogramDiv)
Expand Down Expand Up @@ -45,6 +45,7 @@ export class Graph {
file: powerDataList,
labels: ['t', 'ina0'],
showRoller: true,
height: 480,
xlabel: 'Relative Time (s)',
ylabel: 'Power (mW)',
legend: 'always',
Expand Down

0 comments on commit 09fe027

Please sign in to comment.