Skip to content

Commit

Permalink
Hide instrument parameter <p> </p> if data not available
Browse files Browse the repository at this point in the history
(leaves room to populate these from the cmd string in the future)
  • Loading branch information
willend committed Aug 29, 2024
1 parent 5ff6cbe commit cf07d5f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,24 @@ const InfoView = () => {
<b>Command: </b>
{instrument.cmd}
</p>
{instrument.params.length > 0 ? (
<p>
<b>Instrument parameters: </b>
{instrument.params}
</p>
) : null}
{instrument.params_defaults.length > 0 ? (
<p>
<b>Instrument parameter defaults: </b>
{instrument.params_defaults}
</p>
) : null}
{instrument.params_values.length > 0 ? (
<p>
<b>Instrument parameters values: </b>
{instrument.params_values}
</p>
) : null}
{rays.numrays ? (
<p>
<b>Number of rays: </b>
Expand Down
6 changes: 3 additions & 3 deletions tools/Python/mcdisplay/webgl/model/Instrument.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { Component } from "./Component";
export interface Instrument {
name: string;
abspath: string;
params: any[];
params_defaults: any[];
params_values: any[];
params: string;
params_defaults: string;
params_values: string;
cmd: string;
components: Component[];
}

0 comments on commit cf07d5f

Please sign in to comment.