From c7f9b1f61c52240ad3311bd6332b18bf01e361d4 Mon Sep 17 00:00:00 2001 From: Cole Blanchard Date: Tue, 24 Sep 2024 14:03:26 -0400 Subject: [PATCH 1/6] save for reuse for simulation assets --- .../project/tera-save-simulation-modal.vue | 63 +++++++++ .../tera-calibrate-ciemss-drilldown.vue | 16 ++- .../tera-optimize-ciemss-drilldown.vue | 14 +- .../tera-simulate-ciemss-drilldown.vue | 40 +++--- .../src/services/models/simulation-service.ts | 24 +++- .../dataservice/SimulationController.java | 126 ++++++++++++------ .../service/data/SimulationService.java | 58 +++++++- 7 files changed, 263 insertions(+), 78 deletions(-) create mode 100644 packages/client/hmi-client/src/components/project/tera-save-simulation-modal.vue diff --git a/packages/client/hmi-client/src/components/project/tera-save-simulation-modal.vue b/packages/client/hmi-client/src/components/project/tera-save-simulation-modal.vue new file mode 100644 index 0000000000..d77fa06f13 --- /dev/null +++ b/packages/client/hmi-client/src/components/project/tera-save-simulation-modal.vue @@ -0,0 +1,63 @@ + + + diff --git a/packages/client/hmi-client/src/components/workflow/ops/calibrate-ciemss/tera-calibrate-ciemss-drilldown.vue b/packages/client/hmi-client/src/components/workflow/ops/calibrate-ciemss/tera-calibrate-ciemss-drilldown.vue index 04ab681fde..48e3f961c2 100644 --- a/packages/client/hmi-client/src/components/workflow/ops/calibrate-ciemss/tera-calibrate-ciemss-drilldown.vue +++ b/packages/client/hmi-client/src/components/workflow/ops/calibrate-ciemss/tera-calibrate-ciemss-drilldown.vue @@ -373,14 +373,16 @@ - @@ -418,9 +420,9 @@ import { CsvAsset, DatasetColumn, ModelConfiguration, - AssetType, ChartAnnotation, - InterventionPolicy + InterventionPolicy, + SimulationType } from '@/types/Types'; import { CiemssPresetTypes, DrilldownTabs, ChartSetting, ChartSettingType } from '@/types/common'; import { getTimespan, drilldownChartSize, nodeMetadata } from '@/components/workflow/util'; @@ -451,7 +453,7 @@ import TeraChartControl from '@/components/workflow/tera-chart-control.vue'; import TeraInputText from '@/components/widgets/tera-input-text.vue'; import { displayNumber } from '@/utils/number'; import TeraPyciemssCancelButton from '@/components/pyciemss/tera-pyciemss-cancel-button.vue'; -import TeraSaveAssetModal from '@/components/project/tera-save-asset-modal.vue'; +import TeraSaveSimulationModal from '@/components/project/tera-save-simulation-modal.vue'; import { useClientEvent } from '@/composables/useClientEvent'; import { getInterventionPolicyById } from '@/services/intervention-policy'; import TeraInterventionSummaryCard from '@/components/workflow/ops/simulate-ciemss/tera-intervention-summary-card.vue'; diff --git a/packages/client/hmi-client/src/components/workflow/ops/optimize-ciemss/tera-optimize-ciemss-drilldown.vue b/packages/client/hmi-client/src/components/workflow/ops/optimize-ciemss/tera-optimize-ciemss-drilldown.vue index 830c445961..694b5b165a 100644 --- a/packages/client/hmi-client/src/components/workflow/ops/optimize-ciemss/tera-optimize-ciemss-drilldown.vue +++ b/packages/client/hmi-client/src/components/workflow/ops/optimize-ciemss/tera-optimize-ciemss-drilldown.vue @@ -372,14 +372,16 @@ @click="saveModelConfiguration" /> - @@ -391,7 +393,7 @@ import Dropdown from 'primevue/dropdown'; import TeraInputText from '@/components/widgets/tera-input-text.vue'; import SelectButton from 'primevue/selectbutton'; import Dialog from 'primevue/dialog'; -import TeraSaveAssetModal from '@/components/project/tera-save-asset-modal.vue'; +import TeraSaveSimulationModal from '@/components/project/tera-save-simulation-modal.vue'; import TeraDatasetDatatable from '@/components/dataset/tera-dataset-datatable.vue'; import TeraDrilldown from '@/components/drilldown/tera-drilldown.vue'; import TeraDrilldownSection from '@/components/drilldown/tera-drilldown-section.vue'; @@ -419,7 +421,7 @@ import { OptimizeInterventions, OptimizeQoi, OptimizeRequestCiemss, - AssetType + SimulationType } from '@/types/Types'; import { logger } from '@/utils/logger'; import { drilldownChartSize, nodeMetadata } from '@/components/workflow/util'; diff --git a/packages/client/hmi-client/src/components/workflow/ops/simulate-ciemss/tera-simulate-ciemss-drilldown.vue b/packages/client/hmi-client/src/components/workflow/ops/simulate-ciemss/tera-simulate-ciemss-drilldown.vue index 031543f554..2a9eaa4f3a 100644 --- a/packages/client/hmi-client/src/components/workflow/ops/simulate-ciemss/tera-simulate-ciemss-drilldown.vue +++ b/packages/client/hmi-client/src/components/workflow/ops/simulate-ciemss/tera-simulate-ciemss-drilldown.vue @@ -118,15 +118,10 @@ - +
@@ -195,6 +190,14 @@
+