Skip to content

Commit

Permalink
rearrange correlation details interface to associate flow metric with…
Browse files Browse the repository at this point in the history
… bands
  • Loading branch information
ngottlieb committed Dec 18, 2024
1 parent 345edb1 commit 56c4d0e
Showing 1 changed file with 41 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,7 @@
<div class="mb-xs">
<h3>{{ correlation.gaugeInfo.name }} ({{ correlation.gaugeInfo.gaugeSource }}-{{ correlation.gaugeInfo.gaugeSourceIdentifier }})</h3>
</div>
<div class="gauge-subheader">
<div>
<div>
<label for="isPrimary">Primary Gauge</label>
<input v-model="isPrimary" type="checkbox" :disabled="!editing" >
</div>
</div>
<div class="gauge-subheader mb-spacing-md">
<div>
<template v-if="editing">
<cv-button
Expand Down Expand Up @@ -54,7 +48,6 @@
</div>
</div>
<div>
<h4>Boating flow ranges</h4>
<div v-if="correlation.migrationErrorExplanation" class="migration-errors">
<p>
<em>
Expand All @@ -71,26 +64,39 @@
<li v-for="(e, i) in errors" :key="`error-${i}`" v-text="e" />
</ul>
</div>
<p>
<em>
Note: all range values are now required.
</em>
</p>
<div>
<cv-select
v-if="editing"
v-model="localCorrelationDetails.metric"
inline
label="Flow Metric"
>
<cv-select-option
v-for="metric in correlationMetrics"
:key="metric.key"
:value="metric.key"
>{{ metric.name }}
</cv-select-option>
</cv-select>
<label v-else for="metric">Flow Metric: {{ correlationDetails ? correlationMetrics[correlationDetails.metric].name : "none set" }}</label>

<div class="correlation-fields">
<div>
<label for="isPrimary" class="bx--label">Primary Gauge</label>
<input v-model="isPrimary" type="checkbox" :disabled="!editing" >
</div>


<hr>

<h4>Boating flow ranges</h4>
<p class="mb-spacing-md">
<em>
Note: all range values are now required and metric can only be set when flow ranges are set.
</em>
</p>

<div class="mb-spacing-sm">
<cv-select
v-if="editing"
v-model="localCorrelationDetails.metric"
inline
label="Flow Metric"
>
<cv-select-option
v-for="metric in correlationMetrics"
:key="metric.key"
:value="metric.key"
>{{ metric.name }}
</cv-select-option>
</cv-select>
<label v-else for="metric" class="bx--label">Flow Metric: {{ correlationDetails ? correlationMetrics[correlationDetails.metric].name : "none set" }}</label>
</div>
</div>

<p v-if="!correlationDetails && !editing">
Expand Down Expand Up @@ -430,6 +436,13 @@ export default {
}
}
.correlation-fields {
// carbon sets this transparent, but since it's on a grey background we need them visible
.cv-select .bx--select-input__wrapper select, .bx--text-input {
background-color: #ffffff;
}
}
.ranges {
align-items: center;
flex-direction: column;
Expand Down

0 comments on commit 56c4d0e

Please sign in to comment.