updated CIA and File Tree visualization
This commit is contained in:
@@ -7,9 +7,9 @@ import Dialog from 'primevue/dialog'
|
|||||||
import { nextTick, onMounted, ref, toRefs } from 'vue'
|
import { nextTick, onMounted, ref, toRefs } from 'vue'
|
||||||
import ClassNode from './ClassNode.vue'
|
import ClassNode from './ClassNode.vue'
|
||||||
import { useLayout } from './useLayout'
|
import { useLayout } from './useLayout'
|
||||||
|
|
||||||
import { defineProps } from 'vue'
|
import { defineProps } from 'vue'
|
||||||
import 'vue3-markdown/dist/style.css'
|
import 'vue3-markdown/dist/style.css'
|
||||||
|
import { UserPrefStore } from '@/stores/UserPrefStore.js';
|
||||||
|
|
||||||
|
|
||||||
const { onInit, onNodeDragStop, onConnect, addEdges, setViewport, toObject, onNodeClick,fitView } = useVueFlow()
|
const { onInit, onNodeDragStop, onConnect, addEdges, setViewport, toObject, onNodeClick,fitView } = useVueFlow()
|
||||||
@@ -22,6 +22,7 @@ const { graph, layout, previousDirection } = useLayout()
|
|||||||
|
|
||||||
const dialogCodeVisible = ref(false)
|
const dialogCodeVisible = ref(false)
|
||||||
|
|
||||||
|
const userPrefStore = UserPrefStore();
|
||||||
|
|
||||||
//66f55e4b2894530b1c154f69
|
//66f55e4b2894530b1c154f69
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@@ -59,11 +60,9 @@ function layoutGraph(direction) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function defineNodes() {
|
function defineNodes() {
|
||||||
|
|
||||||
var tmpNode=[]
|
var tmpNode=[]
|
||||||
var tmpEdges=[]
|
var tmpEdges = []
|
||||||
var app = {'name':'Apollo'}
|
var app = { name: userPrefStore.getSelApp.fe_name }
|
||||||
|
|
||||||
tmpNode.push({
|
tmpNode.push({
|
||||||
id: app.name,
|
id: app.name,
|
||||||
data: { label: app.name },
|
data: { label: app.name },
|
||||||
|
|||||||
@@ -61,11 +61,15 @@ export const UserPrefStore = defineStore('userpref_store', () => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const getSelProj = computed(() => {
|
||||||
|
return selectedProject.value
|
||||||
|
})
|
||||||
|
|
||||||
const getSelApp = computed(() => {
|
const getSelApp = computed(() => {
|
||||||
return selectedApp.value
|
return selectedApp.value
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return { user,fetchUserData,userLoaded,selectedProject,availableApp,getSelApp,setSelectedApp,selectedApp, updateSelectedProject }
|
return { user,fetchUserData,userLoaded,selectedProject,availableApp,getSelApp,setSelectedApp,selectedApp, updateSelectedProject,getSelProj }
|
||||||
})
|
})
|
||||||
@@ -5,24 +5,22 @@
|
|||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid grid-cols-12 gap-2">
|
<div class="flex gap-2">
|
||||||
<div class="col-span-6">
|
<div class="card folder-tree">
|
||||||
<div class="card folder-tree ">
|
<h5>File Browser</h5>
|
||||||
<h5>File Browser</h5>
|
<div v-if="nodes && nodes.length" class="flex-1">
|
||||||
<div v-if="nodes && nodes.length">
|
<div class="flex flex-wrap gap-2">
|
||||||
<div class="flex flex-wrap gap-2">
|
<Button type="button" icon="pi pi-plus" label="Expand All" @click="expandAll"></Button>
|
||||||
<Button type="button" icon="pi pi-plus" label="Expand All" @click="expandAll"></Button>
|
<Button type="button" icon="pi pi-minus" label="Collapse All" @click="collapseAll"></Button>
|
||||||
<Button type="button" icon="pi pi-minus" label="Collapse All" @click="collapseAll"></Button>
|
|
||||||
</div>
|
|
||||||
<Tree :value="nodes" @nodeSelect="onNodeSelect" selectionMode="single" :expandedKeys="expandedKeys" @nodeExpand="expandNode" @nodeCollapse="collapseNode" :filter="true" filterMode="lenient" class="w-full"></Tree>
|
|
||||||
</div>
|
|
||||||
<div v-else class="self-center" style="flex: 1">
|
|
||||||
<Skeleton v-for="(config, index) in skeletonConfigs"
|
|
||||||
:key="index"
|
|
||||||
:width="config.width"
|
|
||||||
:height="config.height"
|
|
||||||
class="mb-2" />
|
|
||||||
</div>
|
</div>
|
||||||
|
<Tree :value="nodes" @nodeSelect="onNodeSelect" selectionMode="single" :expandedKeys="expandedKeys" @nodeExpand="expandNode" @nodeCollapse="collapseNode" :filter="true" filterMode="lenient" class="w-full"></Tree>
|
||||||
|
</div>
|
||||||
|
<div v-else class="flex-skeleton">
|
||||||
|
<Skeleton v-for="(config, index) in skeletonConfigs"
|
||||||
|
:key="index"
|
||||||
|
:width="config.width"
|
||||||
|
:height="config.height"
|
||||||
|
class="mb-2 w-full" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id ="card-flow-codeviewer" class="flex-1">
|
<div id ="card-flow-codeviewer" class="flex-1">
|
||||||
@@ -44,15 +42,13 @@ import { LoadingStore } from '@/stores/LoadingStore.js';
|
|||||||
import Tree from 'primevue/tree';
|
import Tree from 'primevue/tree';
|
||||||
import { onMounted, ref, watch } from 'vue';
|
import { onMounted, ref, watch } from 'vue';
|
||||||
import { useRouter } from 'vue-router';
|
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 router = useRouter();
|
||||||
const userPrefStore = UserPrefStore();
|
const userPrefStore = UserPrefStore();
|
||||||
//const selectedApp = userPrefStore.getSelApp;
|
|
||||||
//const application=ref(selectedApp.fe_name)
|
|
||||||
const loadingStore = LoadingStore()
|
const loadingStore = LoadingStore()
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
@@ -92,7 +88,7 @@ function onNodeSelect(e){
|
|||||||
selectedFile.value = e.key
|
selectedFile.value = e.key
|
||||||
}
|
}
|
||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
const expandAll = () => {
|
const expandAll = () => {
|
||||||
@@ -169,7 +165,13 @@ watch(selectedFile, () => {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.flow-codeviewer{
|
.flow-codeviewer {
|
||||||
height:75vh
|
height: 75vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex-skeleton {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 350px;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user