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/system.py

40 lines
788 B

7 years ago
# coding:utf-8
import time
import psutil
import os
import sys
from flask import Flask, session
from flask import Blueprint, render_template
from flask import jsonify
7 years ago
sys.path.append("class/core")
7 years ago
import public
7 years ago
import system_api
7 years ago
system = Blueprint('system', __name__, template_folder='templates')
@system.route("/network")
def network():
7 years ago
data = system_api.system_api().getNetWork()
return public.getJson(data)
7 years ago
7 years ago
@system.route("/update_panel")
def updatePanel():
return public.returnJson(False, "12")
@system.route("/system_total")
def systemTotal():
7 years ago
data = system_api.system_api().getSystemTotal()
return public.getJson(data)
7 years ago
@system.route("/disk_info")
def diskInfo():
7 years ago
diskInfo = system_api.system_api().getDiskInfo()
7 years ago
return public.getJson(diskInfo)