This commit is contained in:
parent
039ab49b0a
commit
ba7e87eb6a
|
@ -4,7 +4,7 @@ module.exports = function(app) {
|
|||
app.use(
|
||||
'/api', // 如果请求路径匹配'/api',则进行代理
|
||||
createProxyMiddleware({
|
||||
target: 'http://36.138.114.105:31055/', // 目标后端服务地址
|
||||
target: 'http://127.0.0.1:5000s', // 目标后端服务地址
|
||||
changeOrigin: true,
|
||||
})
|
||||
);
|
||||
|
|
|
@ -6,7 +6,7 @@ import paramiko
|
|||
|
||||
from teacher_func import *
|
||||
from student_func import *
|
||||
from k8s_func import *
|
||||
# from k8s_func import *
|
||||
|
||||
from flask import Flask, render_template, request, jsonify, send_from_directory, session
|
||||
from flask_cors import CORS
|
||||
|
@ -331,32 +331,32 @@ def appendQuestion():
|
|||
|
||||
|
||||
|
||||
@app.route("/api/teacher/list_pods",methods=['POST']) # 列出pod
|
||||
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") # 创建服务 1为项目实训, 0为安装实训
|
||||
# def teacher_create_pod():
|
||||
# create_pod(1, "test2")
|
||||
|
||||
@app.route("/api/teacher/DelPods",methods=['POST']) # 删除服务
|
||||
def teacher_delete_pod():
|
||||
name=request.json['name']
|
||||
studentID=name[1:9]
|
||||
testID=name[10:]
|
||||
delDMFunc(studentID,testID)
|
||||
return delete_pod(name=name)
|
||||
|
||||
@app.route("/api/student/check_pod",methods=['POST']) # 检测数据库是否安装成功 若成功,返回OK 否则返回NO
|
||||
def teacher_check_pod():
|
||||
name=request.json["student_ID"]
|
||||
testID=request.json["operateID"]
|
||||
name= 'n' + str(name) + '-' + str(testID)
|
||||
result = check_dm(name)
|
||||
return jsonify(result)
|
||||
# @app.route("/api/teacher/list_pods",methods=['POST']) # 列出pod
|
||||
# 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") # 创建服务 1为项目实训, 0为安装实训
|
||||
# # def teacher_create_pod():
|
||||
# # create_pod(1, "test2")
|
||||
#
|
||||
# @app.route("/api/teacher/DelPods",methods=['POST']) # 删除服务
|
||||
# def teacher_delete_pod():
|
||||
# name=request.json['name']
|
||||
# studentID=name[1:9]
|
||||
# testID=name[10:]
|
||||
# delDMFunc(studentID,testID)
|
||||
# return delete_pod(name=name)
|
||||
#
|
||||
# @app.route("/api/student/check_pod",methods=['POST']) # 检测数据库是否安装成功 若成功,返回OK 否则返回NO
|
||||
# def teacher_check_pod():
|
||||
# name=request.json["student_ID"]
|
||||
# testID=request.json["operateID"]
|
||||
# name= 'n' + str(name) + '-' + str(testID)
|
||||
# result = check_dm(name)
|
||||
# return jsonify(result)
|
||||
|
||||
@app.route('/')
|
||||
@app.route('/<path:path>')
|
||||
|
|
|
@ -4,7 +4,7 @@ from Crypto.Cipher import AES
|
|||
from Crypto.Random import get_random_bytes
|
||||
import base64
|
||||
import datetime
|
||||
import k8s_func
|
||||
# import k8s_func
|
||||
|
||||
db = dmPython.connect(user='SYSDBA', password='dameng!!', host="36.138.114.105", port="32522")
|
||||
|
||||
|
|
Loading…
Reference in New Issue