Skip to content

Commit

Permalink
change code to reflect correlationDetails schema change from flowMetr…
Browse files Browse the repository at this point in the history
…ic to metric
  • Loading branch information
ngottlieb committed Jun 18, 2024
1 parent 3c98d8e commit df0c429
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export default {
}
}
if (this.gaugeCorrelationHasRange && this.metric.key === this.correlationDetails.flowMetric) {
if (this.gaugeCorrelationHasRange && this.metric.key === this.correlationDetails.metric) {
let graphBackgrounds = [
{
min: Number.MIN_SAFE_INTEGER,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</svg>

<span v-html="entry.gtOrLtSymbol" />
<em>{{ entry.value }} {{ correlationMetrics[correlationDetails.flowMetric].unit }}</em>
<em>{{ entry.value }} {{ correlationMetrics[correlationDetails.metric].unit }}</em>
{{ entry.label }}
<div class="range-description">
<span v-if="entry.adjustedComment" v-text="entry.adjustedComment" />
Expand Down
6 changes: 3 additions & 3 deletions src/app/views/river-detail/components/flow-tab/flow-tab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</div>
<div v-if="gauge.correlationDetails.data" class="gauge-range">
{{ gauge.correlationDetails.data.beginLowRunnable }} - {{ gauge.correlationDetails.data.endHighRunnable }}
{{ gauge.correlationDetails.data.flowMetric }}
{{ correlationMetrics[gauge.correlationDetails.data.metric].unit }}
</div>
<div class="gauge-class">
<span v-if="adjustedReachGrade(gauge)">
Expand Down Expand Up @@ -276,7 +276,7 @@ export default {
correlations = reachDetail?.detail?.correlations.map(c => {
return {
...c,
requestedMetric: c.correlationDetails?.data?.flowMetric,
requestedMetric: c.correlationDetails?.data?.metric,
historyTimeScale: '24h',
readings: [],
loading: true
Expand Down Expand Up @@ -308,7 +308,7 @@ export default {
},
correlationMatchesMetric(gauge) {
return gauge && gauge.correlationDetails && gauge.correlationDetails.data &&
gauge.correlationDetails.data.flowMetric === gauge.requestedMetric;
gauge.correlationDetails.data.metric === gauge.requestedMetric;
},
async getReadings(gauge) {
gauge.loading = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<td>Flow Range</td>
<td class="flow-range">
{{ gaugeCorrelation.correlationDetails.data.beginLowRunnable }} - {{ gaugeCorrelation.correlationDetails.data.endHighRunnable }}
{{ correlationMetrics[gaugeCorrelation.correlationDetails.data.flowMetric].unit }}
{{ correlationMetrics[gaugeCorrelation.correlationDetails.data.metric].unit }}
</td>
</tr>
<tr v-if="gaugeCorrelation.status">
Expand Down
2 changes: 1 addition & 1 deletion src/app/views/river-detail/river-detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ export default {
deleteReachModalVisible: false,
bookmarked: false,
transitionName: "fade",
reachDetail: null
reachDetail: {}
}),
tabs: {
main: "General",
Expand Down

0 comments on commit df0c429

Please sign in to comment.