From 6ea3fc26e3914c48b4f964e2bbd73902756a7a81 Mon Sep 17 00:00:00 2001
From: "andrea.terzani"
Date: Fri, 18 Oct 2024 07:03:24 +0200
Subject: [PATCH] code browser
---
src/components/CiaFlowCodeViewer.vue | 9 -
src/components/CiaSingleImpactView.vue | 2 +-
src/components/FileFlowViewer.vue | 229 +++++++++++++++++++++++++
src/components/SingleClassViewer.vue | 173 +++++++++++++++++++
src/layout/AppMenu.vue | 4 +
src/main.js | 2 +-
src/router/index.js | 5 +
src/service/ApplicationCodeService.js | 8 +
src/views/pages/ApplicationBrowser.vue | 95 ++++++++++
9 files changed, 516 insertions(+), 11 deletions(-)
create mode 100644 src/components/FileFlowViewer.vue
create mode 100644 src/components/SingleClassViewer.vue
create mode 100644 src/service/ApplicationCodeService.js
create mode 100644 src/views/pages/ApplicationBrowser.vue
diff --git a/src/components/CiaFlowCodeViewer.vue b/src/components/CiaFlowCodeViewer.vue
index 012f65e..a52ff8e 100644
--- a/src/components/CiaFlowCodeViewer.vue
+++ b/src/components/CiaFlowCodeViewer.vue
@@ -113,15 +113,6 @@ function defineNodes() {
diff --git a/src/components/CiaSingleImpactView.vue b/src/components/CiaSingleImpactView.vue
index 934db3a..5fc40aa 100644
--- a/src/components/CiaSingleImpactView.vue
+++ b/src/components/CiaSingleImpactView.vue
@@ -40,7 +40,7 @@
theme="dark"
width="100%"
height="100%"
- codeLines="true"
+ :codeLines="true"
fontSize="14px"
>
diff --git a/src/components/FileFlowViewer.vue b/src/components/FileFlowViewer.vue
new file mode 100644
index 0000000..d88f2a8
--- /dev/null
+++ b/src/components/FileFlowViewer.vue
@@ -0,0 +1,229 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/SingleClassViewer.vue b/src/components/SingleClassViewer.vue
new file mode 100644
index 0000000..ff9264b
--- /dev/null
+++ b/src/components/SingleClassViewer.vue
@@ -0,0 +1,173 @@
+
+
+
+ Class Code
+ Class RE
+ Method List
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
No Description available for this class
+
+
+
+
+
+
+
+
+
+
+
Method Code ( No reverse engineering available )
+
+
+
+
+
Method Explaination
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/layout/AppMenu.vue b/src/layout/AppMenu.vue
index ba84f29..219d8b4 100644
--- a/src/layout/AppMenu.vue
+++ b/src/layout/AppMenu.vue
@@ -13,7 +13,11 @@ const model = ref([
}, {
label: 'Canvas',
items: [{ label: 'New Canvas', icon: 'pi pi-fw pi-id-card', to: '/mdcanvas' }]
+ },{
+ label: 'Browse Code',
+ items: [{ label: 'ATF-Prossor', icon: 'pi pi-fw pi-id-card', to: '/app-browser' }]
}
+
]);
diff --git a/src/main.js b/src/main.js
index b6b43d8..ac98284 100644
--- a/src/main.js
+++ b/src/main.js
@@ -47,7 +47,7 @@ var auth = createAuth({
}
});
-axios.defaults.baseURL = import.meta.env.VITE_BACKEND_URL;//'http://localhost:8081'//
+axios.defaults.baseURL = 'http://localhost:8081' //import.meta.env.VITE_BACKEND_URL;//'http://localhost:8081'//
const app = createApp(App);
diff --git a/src/router/index.js b/src/router/index.js
index fd59fdb..5c75047 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -38,6 +38,11 @@ const router = createRouter({
path: '/canvas',
name: 'canvas',
component: () => import('@/views/pages/canvas/Canvas.vue')
+ },
+ {
+ path: '/app-browser',
+ name: 'app-browser',
+ component: () => import('@/views/pages/ApplicationBrowser.vue')
},
{
path: '/mdcanvas',
diff --git a/src/service/ApplicationCodeService.js b/src/service/ApplicationCodeService.js
new file mode 100644
index 0000000..5b2ffec
--- /dev/null
+++ b/src/service/ApplicationCodeService.js
@@ -0,0 +1,8 @@
+import axios from 'axios';
+
+export const ApplicationCodeService = {
+
+ getApplication(applicationName) {
+ return axios.get(`/source-viewer/getApplicationTreeNode?applicationName=${applicationName}`);
+ }
+};
\ No newline at end of file
diff --git a/src/views/pages/ApplicationBrowser.vue b/src/views/pages/ApplicationBrowser.vue
new file mode 100644
index 0000000..4566800
--- /dev/null
+++ b/src/views/pages/ApplicationBrowser.vue
@@ -0,0 +1,95 @@
+
+
+
+ Source Code Explorer : ATF-Processor
+
+
+
+
+
+
+
File Browser
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file