Skip to content

Commit

Permalink
Minor Fixes - Simulate, Calibrate (#5983)
Browse files Browse the repository at this point in the history
Co-authored-by: Yohann Paris <github@yohannparis.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Jan 8, 2025
1 parent 152f643 commit 91cd67b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ const isMappingfilled = computed(
const areNodeInputsFilled = computed(() => datasetId.value && modelConfigId.value);
const isRunDisabled = computed(() => !isMappingfilled.value || !areNodeInputsFilled.value);
const isRunDisabled = computed(() => !isMappingfilled.value || !areNodeInputsFilled.value || isLoading.value);
const mappingFilledTooltip = computed(() =>
!isMappingfilled.value ? 'Must contain a Timestamp column and at least one filled in mapping. \n' : ''
Expand All @@ -728,8 +728,10 @@ const nodeInputsFilledTooltip = computed(() =>
!areNodeInputsFilled.value ? 'Must a valid dataset and model configuration\n' : ''
);
const isLoadingTooltip = computed(() => (isLoading.value ? 'Must wait for the current run to finish\n' : ''));
const runButtonMessage = computed(() =>
isRunDisabled.value ? `${mappingFilledTooltip.value} ${nodeInputsFilledTooltip.value}` : ''
isRunDisabled.value ? `${mappingFilledTooltip.value} ${nodeInputsFilledTooltip.value} ${isLoadingTooltip.value}` : ''
);
const selectedOutputId = ref<string>();
Expand Down Expand Up @@ -1048,7 +1050,8 @@ onMounted(async () => {
watch(
() => knobs.value,
async () => {
(newValue, oldValue) => {
if (_.isEqual(newValue, oldValue)) return;
const state = _.cloneDeep(props.node.state);
state.numIterations = knobs.value.numIterations;
state.numSamples = knobs.value.numSamples;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,15 @@
:start-date="modelConfiguration.temporalContext"
:calendar-settings="getCalendarSettingsFromModel(model)"
v-model="timespan.start"
@update:model-value="updateState"
/>
<tera-timestep-calendar
v-if="model && modelConfiguration"
label="End time"
:start-date="modelConfiguration.temporalContext"
:calendar-settings="getCalendarSettingsFromModel(model)"
v-model="timespan.end"
@update:model-value="updateState"
/>
</div>

Expand Down Expand Up @@ -387,16 +389,14 @@
<script setup lang="ts">
import _, { isEmpty } from 'lodash';
import { computed, onMounted, onUnmounted, ref, watch } from 'vue';
import { VAceEditor } from 'vue3-ace-editor';
import { VAceEditorInstance } from 'vue3-ace-editor/types';
import Accordion from 'primevue/accordion';
import AccordionTab from 'primevue/accordiontab';
import Button from 'primevue/button';
import Dropdown from 'primevue/dropdown';
import Divider from 'primevue/divider';
import SelectButton from 'primevue/selectbutton';
import type {
CsvAsset,
InterventionPolicy,
Expand All @@ -407,7 +407,6 @@ import type {
} from '@/types/Types';
import { AssetType } from '@/types/Types';
import type { WorkflowNode } from '@/types/workflow';
import { deleteAnnotation } from '@/services/chart-settings';
import { flattenInterventionData, getInterventionPolicyById } from '@/services/intervention-policy';
import {
Expand All @@ -425,11 +424,8 @@ import {
DataArray,
CiemssMethodOptions
} from '@/services/models/simulation-service';
import { logger } from '@/utils/logger';
import { ChartSettingType, CiemssPresetTypes, DrilldownTabs } from '@/types/common';
import VegaChart from '@/components/widgets/VegaChart.vue';
import { KernelSessionManager } from '@/services/jupyter';
import TeraChartSettings from '@/components/widgets/tera-chart-settings.vue';
Expand All @@ -447,7 +443,6 @@ import TeraSaveSimulationModal from '@/components/project/tera-save-simulation-m
import TeraSliderPanel from '@/components/widgets/tera-slider-panel.vue';
import TeraTimestepCalendar from '@/components/widgets/tera-timestep-calendar.vue';
import { nodeMetadata } from '@/components/workflow/util';
import { useCharts } from '@/composables/useCharts';
import { useChartSettings } from '@/composables/useChartSettings';
import { useProjects } from '@/composables/project';
Expand Down

0 comments on commit 91cd67b

Please sign in to comment.