Skip to content

Commit

Permalink
fix(calibrate): don't hide add charts button if there's no charts (#4221
Browse files Browse the repository at this point in the history
)
  • Loading branch information
shawnyama authored Jul 23, 2024
1 parent b03b78f commit 3d3d50f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
<!-- Variable charts -->
<div v-if="!showSpinner" class="form-section">
<h5>Variables</h5>
<section v-if="modelConfig && node.state.chartConfigs.length && csvAsset" ref="outputPanel">
<section v-if="modelConfig && csvAsset" ref="outputPanel">
<template v-for="(cfg, index) of node.state.chartConfigs" :key="index">
<tera-chart-control
:variables="Object.keys(pyciemssMap)"
Expand All @@ -108,14 +108,7 @@
/>
<vega-chart :are-embed-actions-visible="true" :visualization-spec="preparedCharts[index]" />
</template>
<Button
class="add-chart"
text
:outlined="true"
@click="chartProxy.addChart()"
label="Add chart"
icon="pi pi-plus"
></Button>
<Button size="small" text @click="chartProxy.addChart()" label="Add chart" icon="pi pi-plus" />
</section>
<section v-else-if="!modelConfig" class="emptyState">
<img src="@assets/svg/seed.svg" alt="" draggable="false" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
<tera-notebook-error v-bind="node.state.errorMessage" />
<template v-if="runResults[selectedRunId]">
<div v-if="view === OutputView.Charts" ref="outputPanel">
<template v-for="(cfg, index) of props.node.state.chartConfigs" :key="index">
<template v-for="(cfg, index) of node.state.chartConfigs" :key="index">
<tera-chart-control
:variables="Object.keys(pyciemssMap)"
:chartConfig="{ selectedRun: selectedRunId, selectedVariable: cfg }"
Expand All @@ -113,13 +113,7 @@
/>
<vega-chart :are-embed-actions-visible="true" :visualization-spec="preparedCharts[index]" />
</template>

<Button
class="p-button-sm p-button-text"
@click="chartProxy.addChart()"
label="Add chart"
icon="pi pi-plus"
/>
<Button size="small" text @click="chartProxy.addChart()" label="Add chart" icon="pi pi-plus" />
</div>
<div v-else-if="view === OutputView.Data">
<tera-dataset-datatable
Expand Down

0 comments on commit 3d3d50f

Please sign in to comment.