fix bugs
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="flex items-center justify-between p-2">
|
<div class="flex items-center justify-between p-2">
|
||||||
<h1>
|
<h1>
|
||||||
Source Code Explorer : {{application}}
|
Source Code Explorer : {{userPrefStore.getSelApp.fe_name}}
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
<div class="col-span-8">
|
<div class="col-span-8">
|
||||||
<div class="card flow-codeviewer">
|
<div class="card flow-codeviewer">
|
||||||
<h5>File Explorer</h5>
|
<h5>File Explorer</h5>
|
||||||
<FileFlowViewer :file="selectedFile" :application="application"/>
|
<FileFlowViewer :file="selectedFile" :application="userPrefStore.getSelApp.fe_name"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -28,21 +28,21 @@
|
|||||||
import FileFlowViewer from '@/components/FileFlowViewer.vue';
|
import FileFlowViewer from '@/components/FileFlowViewer.vue';
|
||||||
import { ApplicationCodeService } from '@/service/ApplicationCodeService';
|
import { ApplicationCodeService } from '@/service/ApplicationCodeService';
|
||||||
import Tree from 'primevue/tree';
|
import Tree from 'primevue/tree';
|
||||||
import { onMounted, ref } from 'vue';
|
import { onMounted, ref, watch } from 'vue';
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
import { UserPrefStore } from '../../stores/UserPrefStore.js';
|
import { UserPrefStore } from '../../stores/UserPrefStore.js';
|
||||||
|
|
||||||
const nodes = ref(null)
|
const nodes = ref(null)
|
||||||
const expandedKeys = ref({});
|
const expandedKeys = ref({});
|
||||||
const selectedFile = ref({})
|
const selectedFile = ref({})
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
const userPrefStore = UserPrefStore();
|
const userPrefStore = UserPrefStore();
|
||||||
const selectedApp = userPrefStore.getSelApp;
|
//const selectedApp = userPrefStore.getSelApp;
|
||||||
const application=ref(selectedApp.fe_name)
|
//const application=ref(selectedApp.fe_name)
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
console.log("Mounted")
|
console.log("Mounted")
|
||||||
ApplicationCodeService.getApplication(selectedApp.internal_name).then(response => {
|
ApplicationCodeService.getApplication(userPrefStore.getSelApp.internal_name).then(response => {
|
||||||
var tmp = []
|
var tmp = []
|
||||||
tmp.push(response.data)
|
tmp.push(response.data)
|
||||||
nodes.value = tmp
|
nodes.value = tmp
|
||||||
@@ -50,6 +50,22 @@ onMounted(() => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
/*function reloadPage() {
|
||||||
|
console.log("reloadPage", router);
|
||||||
|
//router.replace({ path: router.currentRoute.value.path });
|
||||||
|
window.location.reload();
|
||||||
|
}*/
|
||||||
|
|
||||||
|
function reloadPage() {
|
||||||
|
// Controlla se il valore è cambiato
|
||||||
|
console.log("reloadPage");
|
||||||
|
router.push({ name: 'app-browser'});
|
||||||
|
//window.location.reload(); // Ricarica la pagina solo se il valore cambia
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(() => userPrefStore.getSelApp, reloadPage, { immediate: true });
|
||||||
|
|
||||||
function onNodeSelect(e){
|
function onNodeSelect(e){
|
||||||
if(e.icon == "pi pi-fw pi-file"){
|
if(e.icon == "pi pi-fw pi-file"){
|
||||||
selectedFile.value = e.key
|
selectedFile.value = e.key
|
||||||
|
|||||||
@@ -7,13 +7,7 @@
|
|||||||
<h1>
|
<h1>
|
||||||
{{ scenario.name }}
|
{{ scenario.name }}
|
||||||
</h1>
|
</h1>
|
||||||
<Button
|
|
||||||
@click="back()"
|
|
||||||
label="Load"
|
|
||||||
class="flex items-center text-sm">
|
|
||||||
<ChevronLeftIcon name="chevron-left" class="w-4 h-5 text-white"/>
|
|
||||||
<span>Back to Scenarios</span>
|
|
||||||
</Button>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="flex mt-6">
|
<div class="flex mt-6">
|
||||||
<div class="card flex flex-col gap-4 w-full">
|
<div class="card flex flex-col gap-4 w-full">
|
||||||
@@ -31,7 +25,7 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Button label="Send" @click="execScenario" class="mt-9 ml-4"/>
|
<Button label="Send" @click="execScenario" class="mt-9 ml-4" :disabled="!isInputFilled"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
@@ -101,7 +95,6 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
|
|
||||||
import ChangeImpactOutputViewer from '@/components/ChangeImpactOutputViewer.vue';
|
import ChangeImpactOutputViewer from '@/components/ChangeImpactOutputViewer.vue';
|
||||||
import { ChevronLeftIcon } from '@heroicons/vue/24/solid';
|
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import JsonEditorVue from 'json-editor-vue';
|
import JsonEditorVue from 'json-editor-vue';
|
||||||
import { MdPreview } from 'md-editor-v3';
|
import { MdPreview } from 'md-editor-v3';
|
||||||
@@ -110,7 +103,7 @@ import InputText from 'primevue/inputtext';
|
|||||||
import ProgressSpinner from 'primevue/progressspinner';
|
import ProgressSpinner from 'primevue/progressspinner';
|
||||||
import Select from 'primevue/select';
|
import Select from 'primevue/select';
|
||||||
import Textarea from 'primevue/textarea';
|
import Textarea from 'primevue/textarea';
|
||||||
import { onMounted, ref } from 'vue';
|
import { computed, onMounted, ref } from 'vue';
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
|
|
||||||
|
|
||||||
@@ -129,6 +122,14 @@ const exec_scenario = ref({});
|
|||||||
const debug_modal = ref(false);
|
const debug_modal = ref(false);
|
||||||
let pollingInterval = null;
|
let pollingInterval = null;
|
||||||
|
|
||||||
|
const isInputFilled = computed(() => {
|
||||||
|
const inputName = scenario.value.inputs[0]?.name;
|
||||||
|
return inputName && formData.value[inputName] && formData.value[inputName].length > 0;
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
const id = route.params.id;
|
const id = route.params.id;
|
||||||
|
|||||||
@@ -22,15 +22,23 @@
|
|||||||
:paginatorTemplate="paginatorTemplate"
|
:paginatorTemplate="paginatorTemplate"
|
||||||
:totalRecords="scenario_execution_store.scenariosExecution.length"
|
:totalRecords="scenario_execution_store.scenariosExecution.length"
|
||||||
:first="first"
|
:first="first"
|
||||||
@page="onPage"
|
@page="onPage"
|
||||||
|
:filters="filters"
|
||||||
>
|
>
|
||||||
<Column field="id" header="Execution ID" />
|
<Column field="id" header="Execution ID" filter filterPlaceholder="Search by ID" />
|
||||||
<Column field="scenario.name" header="Name" />
|
<Column field="scenario.name" header="Scenario Name" />
|
||||||
<Column field="" header="Execution Date" />
|
|
||||||
<Column field="execSharedMap.user_input.selected_project" header="Project Input" />
|
<Column field="execSharedMap.user_input.selected_project" header="Project Input" />
|
||||||
<Column field="execSharedMap.user_input.selected_application" header="Application Input" />
|
<Column field="execSharedMap.user_input.selected_application" header="Application Input" />
|
||||||
<Column field="scenario.id" header="Scenario ID" />
|
<Column field="" header="Start Date" />
|
||||||
|
<Column field="" header="End Date" />
|
||||||
<Column field="" header="Model AI" />
|
<Column field="" header="Model AI" />
|
||||||
|
<Column field="" header="Version" />
|
||||||
|
<Column header="Output Type">
|
||||||
|
<template #body="slotProps">
|
||||||
|
{{ slotProps.data.scenario.outputType || 'text' }}
|
||||||
|
</template>
|
||||||
|
</Column>
|
||||||
|
<Column field="" header="Rating" />
|
||||||
<Column field="id">
|
<Column field="id">
|
||||||
<template #body="slotProps">
|
<template #body="slotProps">
|
||||||
<Button label="View" @click="goToScenarioExec(slotProps.data)" class="mt-9 ml-4" />
|
<Button label="View" @click="goToScenarioExec(slotProps.data)" class="mt-9 ml-4" />
|
||||||
@@ -89,6 +97,14 @@ function onPage(event) {
|
|||||||
first.value = event.first;
|
first.value = event.first;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const filters = ref({
|
||||||
|
id: { value: null, matchMode: 'contains' },
|
||||||
|
//scenario: { value: null, matchMode: 'contains' },
|
||||||
|
//'execSharedMap.user_input.selected_project': { value: null, matchMode: 'contains' },
|
||||||
|
//'execSharedMap.user_input.selected_application': { value: null, matchMode: 'contains' },
|
||||||
|
// Aggiungi altri filtri come preferisci
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user