Skip to content

Commit

Permalink
enhancement/adjust-formula-display (#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinJJackson authored Feb 27, 2024
1 parent 4b09e8e commit 7c1c87c
Show file tree
Hide file tree
Showing 3 changed files with 9 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": "hhd-ui",
"version": "0.15.4",
"version": "0.15.5",
"private": true,
"dependencies": {
"@ag-grid-community/client-side-row-model": "^30.0.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ export default connect(
timeseriesSelected &&
timeseriesSelected.name &&
timeseriesSelected.instrument &&
`${timeseriesSelected.instrument} | ${timeseriesSelected.name}`
`${timeseriesSelected.instrument} | ${timeseriesSelected.name}`
) || 'Select a Timeseries'}
>
{timeseries.map((t, idx) => (
<Dropdown.Item key={idx} onClick={() => setTimeseriesSelected(t)}>
{`${t.instrument} | ${t.name}`}
{`${t.instrument} | ${t.name}`}
</Dropdown.Item>

))}
Expand Down
11 changes: 6 additions & 5 deletions src/app-pages/instrument/formula/formula.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export default connect(
nonComputedTimeseriesItemsByRoute: timeseries,
}) => {
const [activeFormula, setActiveFormula] = useState(null);
const sortedTimeseries = timeseries.sort((a, b) => String(a.variable).localeCompare(b.variable));

const createNewFormula = () => {
doInstrumentFormulasSave({
Expand Down Expand Up @@ -47,17 +48,17 @@ export default connect(
visualized, you can choose a single data series, or alter the values
using a combination of series and constants.
</p>
Available parameters
<div className='row'>
<i className='ml-3'>Available parameters</i>
<div className='row mt-2'>
<div className='col-3'>
<ul className='list-group'>
{timeseries.map((ts, i) => (
<ul className='list-group limit-item-list'>
{sortedTimeseries.map((ts, i) => (
<li
key={i}
className='list-group-item list-group-item-action noselect'
onDoubleClick={() => insertParam(`[${ts.variable}]`)}
>
{ts.slug}
{ts.variable}
</li>
))}
</ul>
Expand Down

0 comments on commit 7c1c87c

Please sign in to comment.