cleared execution data after changing a scenario, added logic to change scenario execution from url
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
<Panel class="mt-6">
|
||||
<template #header>
|
||||
<div class="flex items-center gap-2">
|
||||
<span class="font-bold">Hermione Response of Execution ID {{execution_id.id}}</span>
|
||||
<span class="font-bold">Response of Execution ID {{execution_id}}</span>
|
||||
</div>
|
||||
</template>
|
||||
<template #icons>
|
||||
@@ -33,8 +33,17 @@
|
||||
</Button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div class="box p-4 border rounded-md shadow-sm" style="background-color: white;">
|
||||
<div v-for="(input, index) in inputs" :key="index" class="input-container">
|
||||
<div class="input-wrapper">
|
||||
<span class="font-bold">{{ index.replace(/_/g, ' ').replace(/\b\w/g, char => char.toUpperCase()) }}:</span>
|
||||
<span>{{ input }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card flex flex-col gap-4 w-full">
|
||||
<div class="card flex flex-col gap-4 w-full">
|
||||
<div v-if="scenario.outputType == 'ciaOutput'">
|
||||
<ChangeImpactOutputViewer :scenario_output="scenario_output" />
|
||||
</div>
|
||||
@@ -82,12 +91,22 @@ const exec_id = ref(null);
|
||||
const exec_scenario = ref({});
|
||||
const debug_modal = ref(false);
|
||||
const scenario_execution_store = ScenarioExecutionStore();
|
||||
const execution_id = scenario_execution_store.getSelectedExecScenario;
|
||||
const execution = scenario_execution_store.getSelectedExecScenario;
|
||||
const execution_id = ref(null)
|
||||
const inputs = ref(null);
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
console.log("scenario id: ", execution_id.id);
|
||||
retrieveScenarioExec(execution_id.id)
|
||||
if (execution){
|
||||
console.log("scenario id: ", execution);
|
||||
execution_id.value = execution.id
|
||||
console.log("execution_id: ",execution_id)
|
||||
}else{
|
||||
const url = window.location.href;
|
||||
execution_id.value = (new URL(url)).searchParams.get('id')
|
||||
console.log(execution_id.value)
|
||||
}
|
||||
retrieveScenarioExec(execution_id.value)
|
||||
});
|
||||
|
||||
const retrieveScenarioExec = (id) => {
|
||||
@@ -102,6 +121,7 @@ const retrieveScenarioExec = (id) => {
|
||||
data_loaded.value = true;
|
||||
scenario_output.value = response.data.execSharedMap.scenario_output;
|
||||
exec_id.value = response.data.scenarioExecution_id
|
||||
inputs.value = response.data.scenarioExecutionInput.inputs
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user