Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(calibrate): don't hide add charts button if there's no charts #4221

Merged
merged 1 commit into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading