add Scenario outputType
This commit is contained in:
@@ -20,7 +20,7 @@ const model = ref([
|
|||||||
items: [
|
items: [
|
||||||
{ label: 'Scenarios', icon: 'pi pi-fw pi-id-card', to: '/' },
|
{ label: 'Scenarios', icon: 'pi pi-fw pi-id-card', to: '/' },
|
||||||
{ label: 'CIA Scenario', icon: 'pi pi-fw pi-id-card', to: '/cia' },
|
{ label: 'CIA Scenario', icon: 'pi pi-fw pi-id-card', to: '/cia' },
|
||||||
{ label: 'Executions', icon: 'pi pi-fw pi-id-card', to: '/exectutions' }]
|
{ label: 'Executions', icon: 'pi pi-fw pi-id-card', to: '/executions' }]
|
||||||
}, {
|
}, {
|
||||||
label: 'Canvas',
|
label: 'Canvas',
|
||||||
items: [{ label: 'New Canvas', icon: 'pi pi-fw pi-id-card', to: '/mdcanvas' }]
|
items: [{ label: 'New Canvas', icon: 'pi pi-fw pi-id-card', to: '/mdcanvas' }]
|
||||||
|
|||||||
@@ -30,8 +30,8 @@ const router = createRouter({
|
|||||||
name: 'scenario-exec',
|
name: 'scenario-exec',
|
||||||
component: () => import('@/views/pages/ScenarioExec.vue')
|
component: () => import('@/views/pages/ScenarioExec.vue')
|
||||||
},{
|
},{
|
||||||
path: '/exectutions',
|
path: '/executions',
|
||||||
name: 'exectutions',
|
name: 'executions',
|
||||||
component: () => import('@/views/pages/OldScenarioExec.vue')
|
component: () => import('@/views/pages/OldScenarioExec.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -50,10 +50,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<div class="card flex flex-col gap-4 w-full">
|
<div class="card flex flex-col gap-4 w-full">
|
||||||
<div v-if="scenario_output != null">
|
<div v-if="scenario.outputType == 'ciaOutput'">
|
||||||
<!--<MdPreview class="editor" v-model="scenario_output" language="en-US" />-->
|
|
||||||
<ChangeImpactOutputViewer :scenario_output="scenario_output" />
|
<ChangeImpactOutputViewer :scenario_output="scenario_output" />
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<MdPreview class="editor" v-model="scenario_output" language="en-US" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Panel>
|
</Panel>
|
||||||
@@ -74,6 +75,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
|
|
||||||
import ChangeImpactOutputViewer from '@/components/ChangeImpactOutputViewer.vue';
|
import ChangeImpactOutputViewer from '@/components/ChangeImpactOutputViewer.vue';
|
||||||
|
import { MdPreview } from 'md-editor-v3';
|
||||||
import { ChevronLeftIcon } from '@heroicons/vue/24/solid';
|
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';
|
||||||
@@ -95,9 +97,8 @@ const loading_data = ref(false);
|
|||||||
const formData = ref({});
|
const formData = ref({});
|
||||||
const exec_id = ref(null);
|
const exec_id = ref(null);
|
||||||
const exec_scenario = ref({});
|
const exec_scenario = ref({});
|
||||||
const debug_modal = ref(false)
|
const debug_modal = ref(false);
|
||||||
const execution_id=ref("");
|
const execution_id = ref("");
|
||||||
|
|
||||||
|
|
||||||
const retrieveScenarioExec = () => {
|
const retrieveScenarioExec = () => {
|
||||||
const id = execution_id.value
|
const id = execution_id.value
|
||||||
|
|||||||
@@ -76,7 +76,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<div class="card flex flex-col gap-4 w-full">
|
<div class="card flex flex-col gap-4 w-full">
|
||||||
<div v-if="scenario_output != null">
|
<div v-if="scenario.outputType == 'ciaOutput'">
|
||||||
|
<ChangeImpactOutputViewer :scenario_output="scenario_output" />
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
<MdPreview class="editor" v-model="scenario_output" language="en-US" />
|
<MdPreview class="editor" v-model="scenario_output" language="en-US" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -108,6 +111,8 @@ import { onMounted, ref } from 'vue';
|
|||||||
import { useRoute, useRouter } from 'vue-router';
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
import { MdPreview } from 'md-editor-v3';
|
import { MdPreview } from 'md-editor-v3';
|
||||||
import 'md-editor-v3/lib/style.css';
|
import 'md-editor-v3/lib/style.css';
|
||||||
|
import ChangeImpactOutputViewer from '@/components/ChangeImpactOutputViewer.vue';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -121,7 +126,7 @@ const loading_data = ref(false);
|
|||||||
const formData = ref({});
|
const formData = ref({});
|
||||||
const exec_id = ref(null);
|
const exec_id = ref(null);
|
||||||
const exec_scenario = ref({});
|
const exec_scenario = ref({});
|
||||||
const debug_modal = ref(false)
|
const debug_modal = ref(false);
|
||||||
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
@@ -163,7 +168,6 @@ onMounted(() => {
|
|||||||
data_loaded.value = true;
|
data_loaded.value = true;
|
||||||
scenario_output.value = response.data.stringOutput;
|
scenario_output.value = response.data.stringOutput;
|
||||||
exec_id.value = response.data.scenarioExecution_id
|
exec_id.value = response.data.scenarioExecution_id
|
||||||
|
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.error('Error executing scenario:', error);
|
console.error('Error executing scenario:', error);
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ import { UserPrefStore } from '../../stores/UserPrefStore.js';
|
|||||||
|
|
||||||
const scenarioTypeOp = ref([
|
const scenarioTypeOp = ref([
|
||||||
{ name: 'All', value: 'all' },
|
{ name: 'All', value: 'all' },
|
||||||
{ name: 'Croos', value: 'cross' },
|
{ name: 'Cross', value: 'cross' },
|
||||||
{ name: 'Project', value: 'project' },
|
{ name: 'Project', value: 'project' },
|
||||||
{ name: 'Application', value: 'application' }
|
{ name: 'Application', value: 'application' }
|
||||||
|
|
||||||
|
|||||||
@@ -24,10 +24,15 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex mt-2">
|
<div class="flex mt-2">
|
||||||
|
<div v-if="scenario.outputType == 'ciaOutput'">
|
||||||
|
<ChangeImpactOutputViewer :scenario_output="scenario_output" />
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
<MdPreview class="editor" v-model="scenario_output" language="en-US" />
|
<MdPreview class="editor" v-model="scenario_output" language="en-US" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -39,8 +44,9 @@
|
|||||||
import Textarea from 'primevue/textarea';
|
import Textarea from 'primevue/textarea';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { MdEditor } from 'md-editor-v3';
|
import { MdEditor } from 'md-editor-v3';
|
||||||
import { MdPreview, MdCatalog } from 'md-editor-v3';
|
import { MdPreview } from 'md-editor-v3';
|
||||||
import 'md-editor-v3/lib/preview.css';
|
import 'md-editor-v3/lib/style.css';
|
||||||
|
import ChangeImpactOutputViewer from '@/components/ChangeImpactOutputViewer.vue';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user