cleared execution data after changing a scenario, added logic to change scenario execution from url

This commit is contained in:
2024-11-26 12:02:07 +01:00
parent 112513182e
commit 42bfe0d3cb
3 changed files with 35 additions and 13 deletions

View File

@@ -2,9 +2,9 @@
<div v-if="loading" class="flex justify-center">
<ProgressSpinner style="width: 50px; height: 50px; margin-top: 50px" strokeWidth="3" fill="transparent"/>
</div>
<div v-else>
<div class="flex items-center justify-between p-2">
<!--
<div v-else >
<!-- <div class="flex items-center justify-between p-2">
<Button
@click="back()"
label="Load"
@@ -12,11 +12,11 @@
<ChevronLeftIcon name="chevron-left" class="w-4 h-5 text-white"/>
<span>Back to Scenarios</span>
</Button>
-->
</div>
</div> -->
<h2 class="text-xl font-bold mt-6">Executions List</h2>
<DataTable v-model:filters="filters" :value="scenario_execution_store.scenariosExecution"
<DataTable v-model:filters="filters" :value="scenario_execution_store.scenariosExecution" scrollable scrollHeight="420px"
:loading="loading_data"
class="mt-0"
:rows="10"
@@ -74,7 +74,7 @@
<Rating :value="slotProps.data.rating" :stars="5" readonly cancel="false" />
</template>
</Column>
<Column field="id">
<Column field="id" :style="{ position: 'sticky', right: '0', zIndex: '1', background: '#f3f3f3'}">
<template #body="slotProps">
<div class="flex justify-center items-center h-full">
<Button label="View" @click="goToScenarioExec(slotProps.data)" class="mt-0 ml-0" />
@@ -139,7 +139,7 @@ const goToScenarioExec = (execScenarioItem) => {
console.log(execScenarioItem);
scenario_execution_store.setSelectedExecScenario(execScenarioItem).then(() => {
router.push({ name: 'scenario-exec-history'});
router.push({ name: 'scenario-exec-history', query: { id:execScenarioItem.id } });
});
};