Simple Linux Panel
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mdserver-web/route/files.py

36 lines
650 B

7 years ago
# coding:utf-8
from flask import Flask
7 years ago
from flask import Blueprint, render_template
7 years ago
from flask import jsonify
7 years ago
import os
import sys
sys.path.append("class/")
import public
7 years ago
files = Blueprint('files', __name__, template_folder='templates')
7 years ago
7 years ago
@files.route("/")
def index():
return render_template('default/files.html')
7 years ago
7 years ago
@files.route("/GetDiskInfo")
def GetDiskInfo():
7 years ago
return jsonify({'result': 'ok'})
@files.route('/GetExecLog', methods=['POST'])
def GetExecLog():
file = os.getcwd() + "/tmp/panelExec.log"
v = public.GetLastLine(file, 100)
return v
@files.route('/GetExecLogs', methods=['POST'])
def GetExecLogs():
pass