This commit is contained in:
30404 2024-07-01 21:48:24 +08:00
parent ba1d0d53ba
commit 4a024ccf1a
3 changed files with 4 additions and 18 deletions

View File

@ -26,9 +26,8 @@ import Marking from '../TeacherPages/MarkingPages/Marking';
import StudentLink from '../TeacherPages/MarkingPages/StudentLink'; import StudentLink from '../TeacherPages/MarkingPages/StudentLink';
import SendTrain from '../TeacherPages/SendTrain/SendTrain'; import SendTrain from '../TeacherPages/Trainmanage/SendTrain';
import TrainManage from '../TeacherPages/SendTest/trainmanage'; import TrainManage from '../TeacherPages/Trainmanage/Trainmanage';
import Test from "../TeacherPages/teachermanagetest/Test.tsx"
// (exam)使 // (exam)使
const MainLayout = ({ headerNav:HeaderNav }) => { const MainLayout = ({ headerNav:HeaderNav }) => {
return ( return (
@ -70,7 +69,6 @@ function App() {
<Route path="/classID/:key" element={<MainLayout headerNav={HeaderNavTeacher} />}> <Route path="/classID/:key" element={<MainLayout headerNav={HeaderNavTeacher} />}>
<Route index element={<ClassID/>} /> <Route index element={<ClassID/>} />
</Route> </Route>
<Route path="test" element={<Test />}/>
{/* 页面使用单独的布局不包含HeaderNav和HeaderNavTeacher */} {/* 页面使用单独的布局不包含HeaderNav和HeaderNavTeacher */}
<Route path="exam/:examId" element={<Exam />} />{/* 练习-考试页面 */} <Route path="exam/:examId" element={<Exam />} />{/* 练习-考试页面 */}

View File

@ -4,7 +4,7 @@ module.exports = function(app) {
app.use( app.use(
'/api', // 如果请求路径匹配'/api',则进行代理 '/api', // 如果请求路径匹配'/api',则进行代理
createProxyMiddleware({ createProxyMiddleware({
target: 'http://36.138.114.105:32087', // 目标后端服务地址 target: 'http://127.0.0.1:5000', // 目标后端服务地址
changeOrigin: true, changeOrigin: true,
}) })
); );

View File

@ -6,7 +6,6 @@ import paramiko
from teacher_func import * from teacher_func import *
from student_func import * from student_func import *
from k8s_func import *
from flask import Flask, render_template, request, jsonify, send_from_directory, session from flask import Flask, render_template, request, jsonify, send_from_directory, session
from flask_cors import CORS from flask_cors import CORS
@ -272,17 +271,6 @@ def Find_details():
ID=data['ID'] ID=data['ID']
result=Find_details_Func(ID) result=Find_details_Func(ID)
return jsonify({'TestScore':result}) return jsonify({'TestScore':result})
@app.route("/api/teacher/list_pods")
def teacher_list_pods():
return list_pods()
@app.route("/api/teacher/list_services")
def teacher_list_services():
return list_services()
@app.route("/api/teacher/create_pod")
def teacher_create_pod():
create_pod(0, "test")
@app.route('/') @app.route('/')
@ -342,5 +330,5 @@ def handle_disconnect():
if __name__ == '__main__': if __name__ == '__main__':
socketio.run(app, host='0.0.0.0', port=5000) socketio.run(app, host='0.0.0.0', port=5000 ,allow_unsafe_werkzeug=True)