diff --git a/README.md b/README.md index a32abc4c8..74eb866c3 100644 --- a/README.md +++ b/README.md @@ -10,4 +10,5 @@ curl -fsSL https://raw.githubusercontent.com/midoks/mdweb/master/install/instal - pip install pip==9.0.3 - pip install flask - pip install gunicorn +- pip install psutil - pip install -r requirements.txt diff --git a/main.py b/main.py index 062704129..9518f82c7 100644 --- a/main.py +++ b/main.py @@ -2,7 +2,7 @@ from flask import Flask from flask import Blueprint,render_template -from views import dashboard,site +from views import dashboard,site,files app = Flask(__name__) app.debug = True @@ -10,6 +10,7 @@ app.debug = True DEFAULT_MODULES = ( (dashboard, "/"), (site, "/site"), + (files, "/files"), ) def setting_modules(app, modules): diff --git a/models/index.html b/models/index.html new file mode 100644 index 000000000..b2d525b29 --- /dev/null +++ b/models/index.html @@ -0,0 +1 @@ +index \ No newline at end of file diff --git a/plugins/index.html b/plugins/index.html new file mode 100644 index 000000000..b2d525b29 --- /dev/null +++ b/plugins/index.html @@ -0,0 +1 @@ +index \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index f163f4d22..a2478b34f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ flask -gunicorn \ No newline at end of file +gunicorn +psutil \ No newline at end of file diff --git a/static/js/files.js b/static/js/files.js index 0fac35880..faf3a432d 100755 --- a/static/js/files.js +++ b/static/js/files.js @@ -781,7 +781,7 @@ function GetFileName(fileNameFull) { //取磁盘 function GetDisk() { var LBody = ''; - $.get('/system?action=GetDiskInfo', function(rdata) { + $.get('/files/GetDiskInfo', function(rdata) { for (var i = 0; i < rdata.length; i++) { LBody += " " + (rdata[i].path=='/'?lan.files.path_root:rdata[i].path) + "(" + rdata[i].size[2] + ")"; } diff --git a/templates/default/files.html b/templates/default/files.html index c6be288be..19de9f628 100755 --- a/templates/default/files.html +++ b/templates/default/files.html @@ -1,88 +1,89 @@ -$def with (tData) +{% extends "default/layout.html" %} {% block content %}
-
-
-
-
-
-
- - - - -
-
- -
-
-
- - - - - -
- - -
-
-
-
- -
-
+
+
+
+
+
+
+ + + + +
+
+ +
+
+
+ + + + + +
+ + +
+
+
+
+ +
+
\ No newline at end of file +setTimeout(function() { + GetFiles((xPath != undefined ? xPath : '/www/wwwroot')); +}, 800); + +PathPlaceBtn((xPath != undefined ? xPath : '/www/wwwroot')); +setCookie('uploadSize', 1024 * 1024 * 1024); +if (getCookie('rank') == undefined || getCookie('rank') == null) { + setCookie('rank', 'a'); +} +$$("#set_icon").click(function() { + setCookie('rank', 'b'); + $$(this).addClass("active"); + $$("#set_list").removeClass("active"); + GetFiles(getCookie('Path')); +}); +$$("#set_list").click(function() { + setCookie('rank', 'a'); + $$(this).addClass("active"); + $$("#set_icon").removeClass("active"); + GetFiles(getCookie('Path')); +}) +$$(".refreshBtn").click(function() { + GetFiles(getCookie('Path')); +}) + +{% endblock %} \ No newline at end of file diff --git a/templates/default/index.html b/templates/default/index.html index 4e16f3e9b..d8bcc32e7 100755 --- a/templates/default/index.html +++ b/templates/default/index.html @@ -1,7 +1,4 @@ -{% extends "default/layout.html" %} - - -{% block content %} +{% extends "default/layout.html" %} {% block content %}
@@ -9,7 +6,7 @@ 首页/服务器状态
- 免费版 0.0.1 + 免费版 0.0.1 检查更新
@@ -27,33 +24,33 @@
-

$data['lan']['T1']

- $data['lan']['T2'] - $data['lan']['T3'] +

服务器状态

+ 连接管理 + 进程管理