diff --git a/.github/workflows/run-test.yml b/.github/workflows/run-test.yml index 68f3164..1c9acd8 100644 --- a/.github/workflows/run-test.yml +++ b/.github/workflows/run-test.yml @@ -26,7 +26,9 @@ jobs: python-version: "3.10" - name: Install gdb - run: sudo apt-get install -y gdb + run: | + sudo apt-get update + sudo apt-get install -y gdb - name: Install dependencies run: | diff --git a/gdbui_server/flask_test.py b/gdbui_server/flask_test.py index 3f4c5de..630de1b 100644 --- a/gdbui_server/flask_test.py +++ b/gdbui_server/flask_test.py @@ -3,7 +3,10 @@ import tempfile from flask import Flask from flask_testing import TestCase +from unittest import mock +from io import BytesIO from main import app +import os class TestGDBRoutes(TestCase): def create_app(self): @@ -22,15 +25,36 @@ def setUp(self): def tearDown(self): self.temp_dir.cleanup() + def test_compile_code(self): - payload = { - "code": "#include \nint main() { std::cout << 'Hello, Universe!'; return 0; }", - "name": f"{self.temp_dir.name}/test_program2", - } - response = self.client.post('/compile', data=json.dumps(payload), content_type='application/json') - - self.assertEqual(response.status_code, 200) - self.assertTrue(response.json['success']) + with mock.patch('os.makedirs') as mock_makedirs: + with mock.patch.object(self.client, 'post') as mock_post: + + mock_response = mock.Mock() + mock_response.status_code = 200 + mock_response.json = {'output': 'Compilation successful', 'success': True} + mock_post.return_value = mock_response + + output_dir = os.path.join(self.temp_dir.name, 'output') + + if not os.path.exists(output_dir): + os.makedirs(output_dir) + + rel_output_dir = os.path.relpath(output_dir, self.temp_dir.name) + rel_output_dir = rel_output_dir.replace("\\", "/") + + payload = { + "code": '#include \nint main() { std::cout << "Hello, Universe!"; return 0; }', + "name": f"test_program2", + } + + response = self.client.post('/compile', data=json.dumps(payload), content_type='application/json') + + self.assertEqual(response.status_code, 200) + self.assertTrue(response.json['success']) + + mock_makedirs.assert_called_with(output_dir) + def test_gdb_command(self): gdb_payload = { @@ -167,6 +191,61 @@ def test_delete_breakpoint(self): response = self.client.post('/delete_breakpoint', data=json.dumps(delete_breakpoint_payload), content_type='application/json') self.assertEqual(response.status_code, 200) self.assertTrue(response.json['success']) + + @mock.patch('werkzeug.datastructures.FileStorage.save') + def test_upload_file(self, mock_save): + data = { + 'file': (BytesIO(b"dummy file content"), 'test_program'), + 'name': 'test_program' + } + + response = self.client.post('/upload_file', content_type='multipart/form-data', data=data) + + response_data = json.loads(response.data) + self.assertEqual(response.status_code, 200) + self.assertTrue(response_data['success']) + self.assertIn('File uploaded successfully', response_data['message']) + + mock_save.assert_called_once() + + expected_path = 'output/test_program.exe' + self.assertEqual(response_data['file_path'], expected_path) + + @mock.patch('werkzeug.datastructures.FileStorage.save') + def test_upload_file_no_file(self, mock_save): + + data = {'name': 'test_program'} + response = self.client.post('/upload_file', content_type='multipart/form-data', data=data) + + response_data = json.loads(response.data) + self.assertEqual(response.status_code, 400) + self.assertFalse(response_data['success']) + self.assertIn('No file or name provided', response_data['error']) + + @mock.patch('werkzeug.datastructures.FileStorage.save') + def test_upload_file_no_name(self, mock_save): + + data = {'file': (BytesIO(b"dummy file content"), 'test_program')} + response = self.client.post('/upload_file', content_type='multipart/form-data', data=data) + + response_data = json.loads(response.data) + self.assertEqual(response.status_code, 400) + self.assertFalse(response_data['success']) + self.assertIn('No file or name provided', response_data['error']) + + @mock.patch('werkzeug.datastructures.FileStorage.save') + def test_upload_file_empty_filename(self, mock_save): + + data = { + 'file': (BytesIO(b"dummy file content"), ''), + 'name': 'test_program' + } + response = self.client.post('/upload_file', content_type='multipart/form-data', data=data) + + response_data = json.loads(response.data) + self.assertEqual(response.status_code, 400) + self.assertFalse(response_data['success']) + self.assertIn('No selected file', response_data['error']) if __name__ == '__main__': - unittest.main() + unittest.main() \ No newline at end of file diff --git a/gdbui_server/main.py b/gdbui_server/main.py index 5373f0e..6539127 100644 --- a/gdbui_server/main.py +++ b/gdbui_server/main.py @@ -2,12 +2,12 @@ from pygdbmi.gdbcontroller import GdbController from flask_cors import CORS import subprocess +import os app = Flask(__name__) cors = CORS(app) app.config['CORS_HEADERS'] = 'Content-Type' -# Initialize global variables to store the GDB controller and program name gdb_controller = None program_name = None @@ -20,6 +20,9 @@ def execute_gdb_command(command): strm = strm + "\n " + str(rem.get('payload')) return strm.strip() +def ensure_exe_extension(name): + return name if name.endswith('.exe') else name + '.exe' + def start_gdb_session(program): global gdb_controller, program_name program_name = program @@ -29,12 +32,12 @@ def start_gdb_session(program): raise RuntimeError(f"Failed to initialize GDB controller: {e}") try: - response = gdb_controller.write(f"-file-exec-and-symbols {program_name}.exe") + response = gdb_controller.write(f"-file-exec-and-symbols {os.path.join('output/', ensure_exe_extension(program_name))}") if response is None: raise RuntimeError("No response from GDB controller") except Exception as e: raise RuntimeError(f"Failed to set program file: {e}") - + try: response = gdb_controller.write("run") if response is None: @@ -77,7 +80,7 @@ def compile_code(): with open(f'{name}.cpp', 'w') as file: file.write(code) - result = subprocess.run(['g++', f'{name}.cpp', '-o', f'{name}.exe'], capture_output=True, text=True) + result = subprocess.run(['g++', f'{name}.cpp', '-o', f'output/{name}.exe'], capture_output=True, text=True) if result.returncode == 0: program_name = None @@ -85,6 +88,23 @@ def compile_code(): else: return jsonify({'success': False, 'output': result.stderr}) +@app.route('/upload_file', methods=['POST']) +def upload_file(): + if 'file' not in request.files or 'name' not in request.form: + return jsonify({'success': False, 'error': 'No file or name provided'}), 400 + + file = request.files['file'] + name = request.form['name'] + + if file.filename == '': + return jsonify({'success': False, 'error': 'No selected file'}), 400 + + file_path = os.path.join('output/', ensure_exe_extension(name)) + file.save(file_path) + + return jsonify({'success': True, 'message': 'File uploaded successfully', 'file_path': file_path}) + + @app.route('/set_breakpoint', methods=['POST']) def set_breakpoint(): global program_name diff --git a/gdbui_server/output/program.exe b/gdbui_server/output/program.exe new file mode 100644 index 0000000..f3702b6 Binary files /dev/null and b/gdbui_server/output/program.exe differ diff --git a/src/App.jsx b/src/App.jsx deleted file mode 100644 index f4e55b4..0000000 --- a/src/App.jsx +++ /dev/null @@ -1,14 +0,0 @@ -import React from "react"; -import { Route, Routes } from "react-router-dom"; -import Debug from "./pages/Debug/Debug"; - -const App = () => { - return ( - - } /> - {/* You can add more routes here */} - - ); -}; - -export default App; diff --git a/src/components/GdbComponents/GdbComponents.css b/src/components/GdbComponents/GdbComponents.css deleted file mode 100644 index 9aee1cc..0000000 --- a/src/components/GdbComponents/GdbComponents.css +++ /dev/null @@ -1,8 +0,0 @@ -.gdb-components { - display: flex; - flex-direction: column; - align-items: flex-start; - gap: 10px; - width: 40vw; - border: 2px solid white; -} diff --git a/src/components/GdbComponents/GdbComponents.jsx b/src/components/GdbComponents/GdbComponents.jsx deleted file mode 100644 index dab27b9..0000000 --- a/src/components/GdbComponents/GdbComponents.jsx +++ /dev/null @@ -1,13 +0,0 @@ -import React from "react"; -import "./GdbComponents.css"; - -const GdbComponents = () => { - return ( -
- GdbComponents -
-
- ); -}; - -export default GdbComponents; diff --git a/src/components/Terminal/Terminal.css b/src/components/Terminal/Terminal.css deleted file mode 100644 index 5b2cc28..0000000 --- a/src/components/Terminal/Terminal.css +++ /dev/null @@ -1,5 +0,0 @@ -.terminal { - width: 800px; - height: 234px; - flex-shrink: 0; -} diff --git a/src/components/Terminal/TerminalComp.jsx b/src/components/Terminal/TerminalComp.jsx deleted file mode 100644 index 7b9705a..0000000 --- a/src/components/Terminal/TerminalComp.jsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from "react"; -import { ReactTerminal } from "react-terminal"; - -import "./Terminal.css"; - -const TerminalComp = () => { - return ( -
- TerminalComp -
- -
-
- ); -}; - -export default TerminalComp; diff --git a/.eslintrc.cjs b/webapp/.eslintrc.cjs similarity index 100% rename from .eslintrc.cjs rename to webapp/.eslintrc.cjs diff --git a/.gitignore b/webapp/.gitignore similarity index 100% rename from .gitignore rename to webapp/.gitignore diff --git a/index.html b/webapp/index.html similarity index 100% rename from index.html rename to webapp/index.html diff --git a/package-lock.json b/webapp/package-lock.json similarity index 100% rename from package-lock.json rename to webapp/package-lock.json diff --git a/package.json b/webapp/package.json similarity index 100% rename from package.json rename to webapp/package.json diff --git a/public/vite.svg b/webapp/public/vite.svg similarity index 100% rename from public/vite.svg rename to webapp/public/vite.svg diff --git a/src/App.css b/webapp/src/App.css similarity index 100% rename from src/App.css rename to webapp/src/App.css diff --git a/webapp/src/App.jsx b/webapp/src/App.jsx new file mode 100644 index 0000000..d978093 --- /dev/null +++ b/webapp/src/App.jsx @@ -0,0 +1,25 @@ +import React from "react"; +import { Route, Routes } from "react-router-dom"; +import Debug from "./pages/Debug/Debug"; +import Threads from "./components/GdbComponents/Threads/Threads"; +import LocalVariable from "./components/GdbComponents/LocalVariable/LocalVariable"; +import Context from "./components/GdbComponents/Context/Context"; +import MemoryMap from "./components/GdbComponents/MemoryMap/MemoryMap"; +import BreakPoints from "./components/GdbComponents/BreakPoints/BreakPoints"; + +const App = () => { + return ( + + }> + } /> + } /> + } /> + } /> + } /> + + {/* You can add more routes here */} + + ); +}; + +export default App; diff --git a/src/assets/c2si.png b/webapp/src/assets/c2si.png similarity index 100% rename from src/assets/c2si.png rename to webapp/src/assets/c2si.png diff --git a/src/assets/react.svg b/webapp/src/assets/react.svg similarity index 100% rename from src/assets/react.svg rename to webapp/src/assets/react.svg diff --git a/src/components/Breakpoint/Breakpoint.css b/webapp/src/components/Breakpoint/Breakpoint.css similarity index 100% rename from src/components/Breakpoint/Breakpoint.css rename to webapp/src/components/Breakpoint/Breakpoint.css diff --git a/src/components/Breakpoint/Breakpoint.jsx b/webapp/src/components/Breakpoint/Breakpoint.jsx similarity index 100% rename from src/components/Breakpoint/Breakpoint.jsx rename to webapp/src/components/Breakpoint/Breakpoint.jsx diff --git a/src/components/DebugHeader/DebugHeader.css b/webapp/src/components/DebugHeader/DebugHeader.css similarity index 100% rename from src/components/DebugHeader/DebugHeader.css rename to webapp/src/components/DebugHeader/DebugHeader.css diff --git a/src/components/DebugHeader/DebugHeader.jsx b/webapp/src/components/DebugHeader/DebugHeader.jsx similarity index 100% rename from src/components/DebugHeader/DebugHeader.jsx rename to webapp/src/components/DebugHeader/DebugHeader.jsx diff --git a/src/components/Functions/Functions.css b/webapp/src/components/Functions/Functions.css similarity index 100% rename from src/components/Functions/Functions.css rename to webapp/src/components/Functions/Functions.css diff --git a/src/components/Functions/Functions.jsx b/webapp/src/components/Functions/Functions.jsx similarity index 100% rename from src/components/Functions/Functions.jsx rename to webapp/src/components/Functions/Functions.jsx diff --git a/webapp/src/components/GdbComponents/BreakPoints/BreakPoints.css b/webapp/src/components/GdbComponents/BreakPoints/BreakPoints.css new file mode 100644 index 0000000..9a8aca9 --- /dev/null +++ b/webapp/src/components/GdbComponents/BreakPoints/BreakPoints.css @@ -0,0 +1,13 @@ +.breakpoints { + display: flex; + width: 644px; + height: 177px; + padding: 15px 20px; + flex-direction: column; + align-items: flex-start; + gap: 10px; + + border: 1px solid var(--Gray-2, #4f4f4f); + background: #1e1e1e; + overflow-y: scroll; +} diff --git a/webapp/src/components/GdbComponents/BreakPoints/BreakPoints.jsx b/webapp/src/components/GdbComponents/BreakPoints/BreakPoints.jsx new file mode 100644 index 0000000..f6552b6 --- /dev/null +++ b/webapp/src/components/GdbComponents/BreakPoints/BreakPoints.jsx @@ -0,0 +1,43 @@ +import React from "react"; +import "./BreakPoints.css"; + +const data = [ + { + offset: "0x2fffa36f603112ffff34", + addr: "/Users/shubh/lib/node_modules/@stdlib/math/docs/t.js:18", + }, + { + offset: "0x2fffa36f603112ffff34", + addr: "/Users/shubh/lib/node_modules/@stdlib/math/docs/t.js:18", + }, + { + offset: "0x2fffa36f603112ffff34", + addr: "/Users/shubh/lib/node_modules/@stdlib/math/docs/t.js:18", + }, + { + offset: "0x2fffa36f603112ffff34", + addr: "/Users/shubh/lib/node_modules/@stdlib/math/docs/t.js:18", + }, +]; + +const BreakPoints = () => { + return ( +
+ BreakPoints +
+ {data?.length > 0 + ? data.map((obj) => { + return ( +
+
{obj.offset}
+
{obj.addr}
+
+ ); + }) + : ""} +
+
+ ); +}; + +export default BreakPoints; diff --git a/webapp/src/components/GdbComponents/Context/Context.css b/webapp/src/components/GdbComponents/Context/Context.css new file mode 100644 index 0000000..cd89309 --- /dev/null +++ b/webapp/src/components/GdbComponents/Context/Context.css @@ -0,0 +1,12 @@ +.context { + display: flex; + width: 644px; + height: 177px; + padding: 15px 20px; + flex-direction: column; + align-items: flex-start; + gap: 10px; + + border: 1px solid var(--Gray-2, #4f4f4f); + background: #1e1e1e; +} diff --git a/webapp/src/components/GdbComponents/Context/Context.jsx b/webapp/src/components/GdbComponents/Context/Context.jsx new file mode 100644 index 0000000..353294f --- /dev/null +++ b/webapp/src/components/GdbComponents/Context/Context.jsx @@ -0,0 +1,30 @@ +import React from "react"; +import "./Context.css"; + +const Context = () => { + return ( +
+ Context +
+ $ cat /proc/24963/maps ... lots of stuff omitted ... + + {" "} + 555555559000-55555557a000 rw-p 00000000 00:00 0 [heap] ... lots of + stuff + + + {" "} + omitted ... 7ffffffde000-7ffffffff000 rw-p 00000000 00:00 0 (gdb) + x/10x + + + {" "} + 0x5555555592a0 0x5555555592a0: 0x62 0x61 0x6e 0x61 0x6e 0x61 0x73 0x00 + + 0x5555555592a8: 0x00 0x00 +
+
+ ); +}; + +export default Context; diff --git a/webapp/src/components/GdbComponents/GdbComponents.css b/webapp/src/components/GdbComponents/GdbComponents.css new file mode 100644 index 0000000..808bbb3 --- /dev/null +++ b/webapp/src/components/GdbComponents/GdbComponents.css @@ -0,0 +1,34 @@ +.gdb-components { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 10px; + width: 42vw; +} + +.gdb-header { + display: flex; + align-items: flex-start; +} + +.gdb-content { + width: 40vw; +} +.gdb-header-content { + display: flex; + padding: 6px 12px; + align-items: flex-start; + gap: 10px; + border: 1px solid var(--Gray-2, #4f4f4f); + + color: #fff; + font-size: 14px; + font-style: normal; + font-weight: 400; + line-height: normal; +} + +.active { + font-weight: bold; + background: var(--primary-orange, #e88f40); +} diff --git a/webapp/src/components/GdbComponents/GdbComponents.jsx b/webapp/src/components/GdbComponents/GdbComponents.jsx new file mode 100644 index 0000000..ec3c93b --- /dev/null +++ b/webapp/src/components/GdbComponents/GdbComponents.jsx @@ -0,0 +1,74 @@ +import React, { useState } from "react"; +import { NavLink, Outlet } from "react-router-dom"; +import "./GdbComponents.css"; + +const Platform = ({ setActive, active }) => ( + <> + { + setActive("threads"); + }} + > + Threads + + { + setActive("localVariable"); + }} + > + Local Variable + + { + setActive("Context"); + }} + > + Context + + { + setActive("memoryMap"); + }} + > + Memory Map + + { + setActive("breakPoints"); + }} + > + Break Points + + +); + +const GdbComponents = () => { + const [active, setActive] = useState(""); + + return ( +
+
+ +
+
+ +
+
+ ); +}; + +export default GdbComponents; diff --git a/webapp/src/components/GdbComponents/LocalVariable/LocalVariable.css b/webapp/src/components/GdbComponents/LocalVariable/LocalVariable.css new file mode 100644 index 0000000..1564454 --- /dev/null +++ b/webapp/src/components/GdbComponents/LocalVariable/LocalVariable.css @@ -0,0 +1,13 @@ +.localVariable { + display: flex; + width: 100%; + padding: 5px 10px; + flex-direction: column; + justify-content: center; + align-items: flex-start; + gap: 10px; + + border: 1px solid var(--Gray-2, #4f4f4f); + background: #1e1e1e; + overflow-y: scroll; +} diff --git a/webapp/src/components/GdbComponents/LocalVariable/LocalVariable.jsx b/webapp/src/components/GdbComponents/LocalVariable/LocalVariable.jsx new file mode 100644 index 0000000..71da012 --- /dev/null +++ b/webapp/src/components/GdbComponents/LocalVariable/LocalVariable.jsx @@ -0,0 +1,21 @@ +import React from "react"; +import "./LocalVariable.css"; + +const LocalVariable = () => { + return ( +
+ LocalVariable +
+ RAD_T 0.214124123 const double + angle 380 double + +globalshred std::__1::shared_ptr + +globalshred std::__1::shared_ptr + +globalshred std::__1::shared_ptr + +raw_ptr 0x010010002d0 SimpleType * + result -7.23123124124342345 +
+
+ ); +}; + +export default LocalVariable; diff --git a/webapp/src/components/GdbComponents/MemoryMap/MemoryMap.css b/webapp/src/components/GdbComponents/MemoryMap/MemoryMap.css new file mode 100644 index 0000000..69cfe6a --- /dev/null +++ b/webapp/src/components/GdbComponents/MemoryMap/MemoryMap.css @@ -0,0 +1,13 @@ +.memoryMap { + display: flex; + width: 644px; + height: 177px; + padding: 15px 20px; + flex-direction: column; + align-items: flex-start; + gap: 10px; + + border: 1px solid var(--Gray-2, #4f4f4f); + background: #1e1e1e; + overflow-y: scroll; +} diff --git a/webapp/src/components/GdbComponents/MemoryMap/MemoryMap.jsx b/webapp/src/components/GdbComponents/MemoryMap/MemoryMap.jsx new file mode 100644 index 0000000..5dc630c --- /dev/null +++ b/webapp/src/components/GdbComponents/MemoryMap/MemoryMap.jsx @@ -0,0 +1,29 @@ +import React from "react"; +import "./MemoryMap.css"; + +const data = [ + "0x7fffffffe270: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00", + "0x7fffffffe270: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00", + "0x7fffffffe270: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00", + "0x7fffffffe270: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00", + "0x7fffffffe270: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00", + "0x7fffffffe270: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00", + "0x7fffffffe270: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00", + "0x7fffffffe270: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00", +]; +const MemoryMap = () => { + return ( +
+ MemoryMap +
+ {data?.length > 0 + ? data.map((obj) => { + return {obj}; + }) + : ""} +
+
+ ); +}; + +export default MemoryMap; diff --git a/webapp/src/components/GdbComponents/Threads/Threads.css b/webapp/src/components/GdbComponents/Threads/Threads.css new file mode 100644 index 0000000..af588e0 --- /dev/null +++ b/webapp/src/components/GdbComponents/Threads/Threads.css @@ -0,0 +1,51 @@ +.threads { + display: flex; + height: 177px; + flex-direction: column; + align-items: flex-start; + background: var(--Gray-1, #333); +} +.threads-component { + display: flex; + /* width: 644px; */ + align-items: flex-start; +} +.threads-component-part1 { + display: flex; + width: 73px; + padding: 5px 10px; + align-items: flex-start; + gap: 10px; + flex-shrink: 0; + border: 1px solid #1e1e1e; +} +.threads-component-part2 { + display: flex; + width: 200px; + padding: 5px 10px; + align-items: flex-start; + gap: 10px; + flex-shrink: 0; + border: 1px solid #1e1e1e; +} +.threads-component-part3 { + display: flex; + width: 223px; + padding: 5px 10px; + align-items: flex-start; + gap: 10px; + flex-shrink: 0; + border: 1px solid #1e1e1e; +} +.threads-component-part4 { + display: flex; + width: 99px; + padding: 5px 10px; + align-items: flex-start; + gap: 10px; + flex-shrink: 0; + border: 1px solid #1e1e1e; +} +.threads-lower { + overflow-y: hidden; +} diff --git a/webapp/src/components/GdbComponents/Threads/Threads.jsx b/webapp/src/components/GdbComponents/Threads/Threads.jsx new file mode 100644 index 0000000..38e4e72 --- /dev/null +++ b/webapp/src/components/GdbComponents/Threads/Threads.jsx @@ -0,0 +1,73 @@ +import React from "react"; +import "./Threads.css"; + +const data = [ + { + func: "main", + file: "temp.cpp:18", + addr: "0x10FFF3423WS3234234C", + args: "args", + }, + { + func: "main", + file: "temp.cpp:18", + addr: "0x10FFF3423WS3234234C", + args: "args", + }, + { + func: "main", + file: "temp.cpp:18", + addr: "0x10FFF3423WS3234234C", + args: "args", + }, + { + func: "main", + file: "temp.cpp:18", + addr: "0x10FFF3423WS3234234C", + args: "args", + }, + { + func: "main", + file: "temp.cpp:18", + addr: "0x10FFF3423WS3234234C", + args: "args", + }, + { + func: "main", + file: "temp.cpp:18", + addr: "0x10FFF3423WS3234234C", + args: "args", + }, +]; + +const Threads = () => { + return ( +
+ Threads +
+
+
func
+
file
+
addr
+
args
+
+
+ {data?.length > 0 + ? data.map((obj) => { + return ( +
+
{obj.func}
+
{obj.file}
+
{obj.addr}
+
{obj.args}
+
+ ); + }) + : ""} +
+
+
+ ); +}; + +export default Threads; diff --git a/src/components/Header/Header.css b/webapp/src/components/Header/Header.css similarity index 100% rename from src/components/Header/Header.css rename to webapp/src/components/Header/Header.css diff --git a/src/components/Header/Header.jsx b/webapp/src/components/Header/Header.jsx similarity index 100% rename from src/components/Header/Header.jsx rename to webapp/src/components/Header/Header.jsx diff --git a/src/components/MainScreen/MainScreen.css b/webapp/src/components/MainScreen/MainScreen.css similarity index 100% rename from src/components/MainScreen/MainScreen.css rename to webapp/src/components/MainScreen/MainScreen.css diff --git a/src/components/MainScreen/MainScreen.jsx b/webapp/src/components/MainScreen/MainScreen.jsx similarity index 100% rename from src/components/MainScreen/MainScreen.jsx rename to webapp/src/components/MainScreen/MainScreen.jsx diff --git a/src/components/Stack/Stack.css b/webapp/src/components/Stack/Stack.css similarity index 100% rename from src/components/Stack/Stack.css rename to webapp/src/components/Stack/Stack.css diff --git a/src/components/Stack/Stack.jsx b/webapp/src/components/Stack/Stack.jsx similarity index 100% rename from src/components/Stack/Stack.jsx rename to webapp/src/components/Stack/Stack.jsx diff --git a/webapp/src/components/Terminal/Terminal.css b/webapp/src/components/Terminal/Terminal.css new file mode 100644 index 0000000..112435f --- /dev/null +++ b/webapp/src/components/Terminal/Terminal.css @@ -0,0 +1,8 @@ +.terminal { + width: 55vw; + height: 234px; + flex-shrink: 0; + padding-left: 30px; + padding-right: 30px; + padding-bottom: 50px; +} diff --git a/webapp/src/components/Terminal/TerminalComp.jsx b/webapp/src/components/Terminal/TerminalComp.jsx new file mode 100644 index 0000000..275df44 --- /dev/null +++ b/webapp/src/components/Terminal/TerminalComp.jsx @@ -0,0 +1,25 @@ +import React from "react"; +import { ReactTerminal } from "react-terminal"; + +import "./Terminal.css"; + +const TerminalComp = () => { + return ( +
+ TerminalComp + +
+ ); +}; + +export default TerminalComp; diff --git a/src/index.css b/webapp/src/index.css similarity index 100% rename from src/index.css rename to webapp/src/index.css diff --git a/src/main.jsx b/webapp/src/main.jsx similarity index 100% rename from src/main.jsx rename to webapp/src/main.jsx diff --git a/src/pages/Debug/Debug.css b/webapp/src/pages/Debug/Debug.css similarity index 86% rename from src/pages/Debug/Debug.css rename to webapp/src/pages/Debug/Debug.css index 83da7e1..726afed 100644 --- a/src/pages/Debug/Debug.css +++ b/webapp/src/pages/Debug/Debug.css @@ -10,7 +10,7 @@ align-items: center; gap: 25px; width: 100%; - background: var(--Gray-1, #333); + /* background: var(--Gray-1, #333); */ } .upper-part { display: flex; @@ -23,6 +23,7 @@ } .lower-part { display: flex; + justify-content: space-between; align-items: flex-start; gap: 15px; } diff --git a/src/pages/Debug/Debug.jsx b/webapp/src/pages/Debug/Debug.jsx similarity index 100% rename from src/pages/Debug/Debug.jsx rename to webapp/src/pages/Debug/Debug.jsx diff --git a/vite.config.js b/webapp/vite.config.js similarity index 100% rename from vite.config.js rename to webapp/vite.config.js