Merged PR 69: cod fix bugs

This commit is contained in:
D'Alia, Florinda
2025-02-26 16:12:50 +00:00
4 changed files with 17 additions and 6 deletions

View File

@@ -47,7 +47,7 @@ function updateApplicationsMenu() {
//Raggruppa gli scenari per categoria (solo se type non è null) //Raggruppa gli scenari per categoria (solo se type non è null)
selectedApp.available_scenarios.forEach(app => { selectedApp.available_scenarios.forEach(app => {
if (app.type) { if (app.type) {
const type = app.type; const type = app.type.trim();
if (!groupedScenarios[type]) { if (!groupedScenarios[type]) {
groupedScenarios[type] = []; groupedScenarios[type] = [];
} }

View File

@@ -119,8 +119,8 @@
</div> </div>
</div> </div>
<div v-else> <div v-else>
<div v-if="fileType == 'FILE'"> <div v-if="fileType == 'FILE' && exec_scenario.execSharedMap.status!=null && exec_scenario.execSharedMap.status==='DONE'">
<ul> <ul class="file-list">
<li class="file-item"> <li class="file-item">
sf_document-{{execution_id}} sf_document-{{execution_id}}
<Button <Button
@@ -131,6 +131,7 @@
/> />
</li> </li>
</ul> </ul>
</div> </div>
<div v-else-if="fileType == 'MARKDOWN'"> <div v-else-if="fileType == 'MARKDOWN'">
<div v-html="fileContent" class="markdown-content"></div> <div v-html="fileContent" class="markdown-content"></div>

View File

@@ -530,9 +530,9 @@ watch(() => route.params.id, fetchScenario);
// Controlla se l'array `inputs` contiene un elemento con `name = 'MultiFileUpload'` // Controlla se l'array `inputs` contiene un elemento con `name = 'MultiFileUpload'`
if (scenario.value.inputs.some((input) => input.name === 'MultiFileUpload')) { if (scenario.value.inputs.some((input) => input.name === 'MultiFileUpload')) {
console.log('Im in');
// Accedi al primo step e controlla se esiste l'attributo `codegenie_output_type` if(response.data.status == 'OK' ){
// Accedi al primo step e controlla se esiste l'attributo `codegenie_output_type`
const firstStep = scenario.value.steps[0]; const firstStep = scenario.value.steps[0];
if (firstStep?.attributes?.['codegenie_output_type']) { if (firstStep?.attributes?.['codegenie_output_type']) {
// Controlla se `codegenie_output_type` è uguale a 'FILE' // Controlla se `codegenie_output_type` è uguale a 'FILE'
@@ -557,6 +557,12 @@ if (scenario.value.inputs.some((input) => input.name === 'MultiFileUpload')) {
showFileContent(scenario_output.value, 'JSON') showFileContent(scenario_output.value, 'JSON')
} }
} }
}else{
console.log("Error in execution");
}
} }

View File

@@ -58,6 +58,10 @@
<div class="p-4 flex flex-col flex-grow"> <div class="p-4 flex flex-col flex-grow">
<h3 class="text-lg font-medium text-gray-900 dark:text-gray-100">{{ item.name }}</h3> <h3 class="text-lg font-medium text-gray-900 dark:text-gray-100">{{ item.name }}</h3>
<p class="text-sm font-medium text-gray-500 dark:text-gray-400 mt-2">{{ item.description }}</p> <p class="text-sm font-medium text-gray-500 dark:text-gray-400 mt-2">{{ item.description }}</p>
<div v-if="item.visible==='DRAFT'" class="text-xs font-semibold text-white bg-purple-600 px-2 py-1 rounded-md inline-flex items-center justify-center w-auto mt-2">
{{ item.visible }}
</div>
</div> </div>
<div class="p-2 border-t border-gray-200 dark:border-gray-700 flex justify-end"> <div class="p-2 border-t border-gray-200 dark:border-gray-700 flex justify-end">
<Button @click="executeScenario(item.id)" size="small" label="Load" class="flex-auto md:flex-initial text-white"> <Button @click="executeScenario(item.id)" size="small" label="Load" class="flex-auto md:flex-initial text-white">