Skip to content

Commit

Permalink
add gauge comment to correlation details component and flow tab
Browse files Browse the repository at this point in the history
  • Loading branch information
ngottlieb committed Dec 18, 2024
1 parent 56c4d0e commit ca6cf50
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,17 @@

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

<div class="mb-spacing-sm">
<cv-text-input v-if="editing" v-model="comment" label="Correlation comment:" class="correlation-comment" />
<template v-else-if="comment">
<label for="comment" class="bx--label">Correlation comment:</label>
<p v-text="comment" />
</template>
</div>

<hr>

Expand Down Expand Up @@ -195,6 +202,7 @@ export default {
beginHighRunnable: null,
endHighRunnable: null,
},
comment: null,
isPrimary: undefined,
saving: false,
errors: [],
Expand Down Expand Up @@ -276,6 +284,7 @@ export default {
gaugeSource: this.correlation?.gaugeInfo.gaugeSource,
gaugeSourceIdentifier: this.correlation?.gaugeInfo.gaugeSourceIdentifier,
forcePrimary: this.isPrimary ? 'force-primary' : null,
comment: this.comment,
correlationDetails: processedDetails || null
}
},
Expand Down Expand Up @@ -394,6 +403,7 @@ export default {
}
this.isPrimary = this.correlation.isPrimary;
this.comment = this.correlation.comment;
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions src/app/views/river-detail/components/flow-tab/flow-tab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@
<cv-skeleton-text headline/>
</template>
<template v-else>
<div v-if="gauge.comment" class="gauge-comment bx--tile bx--type-caption">
<label class="bx--label">Correlation comment</label>
<br>
<span v-text="gauge.comment" />
</div>
<div v-if="gauge.gaugeInfo.externalSourceLinks" class="gauge-links">
<h6 class="mb-spacing-sm">View at source:</h6>
<cv-link v-if="gauge.gaugeInfo.externalSourceLinks.sourceLink"
Expand Down

0 comments on commit ca6cf50

Please sign in to comment.