forked from mirror/MCSManager
修改 - 后端更改版本
This commit is contained in:
parent
658aab7e6b
commit
12478a7d9f
31
helper/version.js
Normal file
31
helper/version.js
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
const {
|
||||||
|
WebSocketObserver
|
||||||
|
} = require('../../model/WebSocketModel');
|
||||||
|
const response = require('../../helper/Response');
|
||||||
|
const permssion = require('../../helper/Permission');
|
||||||
|
const os = require("os");
|
||||||
|
|
||||||
|
//前端显示版本
|
||||||
|
//每次更新之后,修改此处,表明修改
|
||||||
|
//这样, 用户截图时, 可以知道具体的版本
|
||||||
|
const oversion = "Beta_8.3.0.0"; //前端
|
||||||
|
const tversion = "Beta_8.3.0.0"; //后端
|
||||||
|
|
||||||
|
//首页
|
||||||
|
// WebSocketObserver().listener('index/update', (data) => {
|
||||||
|
// if (!permssion.isMaster(data.WsSession)) return;
|
||||||
|
// response.wsSend(data.ws, 'index/update', {
|
||||||
|
// system: os.type() + " " + os.arch(),
|
||||||
|
// root: process.cwd(),
|
||||||
|
// oneversion: oversion,
|
||||||
|
// twoversion: tversion
|
||||||
|
// })
|
||||||
|
// });
|
||||||
|
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
system: os.type() + " " + os.arch(),
|
||||||
|
root: process.cwd(),
|
||||||
|
oneversion: oversion,
|
||||||
|
twoversion: tversion
|
||||||
|
}
|
@ -10,6 +10,8 @@ const permssion = require('../../helper/Permission');
|
|||||||
const userModel = require('../../model/UserModel');
|
const userModel = require('../../model/UserModel');
|
||||||
const os = require("os");
|
const os = require("os");
|
||||||
|
|
||||||
|
const mversion = require('../../helper/version');
|
||||||
|
|
||||||
const MB_SIZE = 1024 * 1024;
|
const MB_SIZE = 1024 * 1024;
|
||||||
let serverM = serverModel.ServerManager();
|
let serverM = serverModel.ServerManager();
|
||||||
let userM = userModel.userCenter();
|
let userM = userModel.userCenter();
|
||||||
@ -88,8 +90,10 @@ setInterval(function () {
|
|||||||
banip: banipc, //封的ip
|
banip: banipc, //封的ip
|
||||||
passwordError: counter.get('passwordError'), //密码错误次数
|
passwordError: counter.get('passwordError'), //密码错误次数
|
||||||
csrfCounter: counter.get('csrfCounter'), //可能存在的CSRF攻击次数
|
csrfCounter: counter.get('csrfCounter'), //可能存在的CSRF攻击次数
|
||||||
notPermssionCounter: counter.get('notPermssionCounter') //API的无权访问
|
notPermssionCounter: counter.get('notPermssionCounter'), //API的无权访问
|
||||||
|
root: mversion.root,
|
||||||
|
oneversion: mversion.oneversion,
|
||||||
|
twoversion: mversion.twoversion
|
||||||
}
|
}
|
||||||
|
|
||||||
let useMemBai = ((os.freemem() / 1024) / (os.totalmem() / 1024) * 100).toFixed(0);
|
let useMemBai = ((os.freemem() / 1024) / (os.totalmem() / 1024) * 100).toFixed(0);
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
const {
|
|
||||||
WebSocketObserver
|
|
||||||
} = require('../../model/WebSocketModel');
|
|
||||||
const response = require('../../helper/Response');
|
|
||||||
const permssion = require('../../helper/Permission');
|
|
||||||
const os = require("os");
|
|
||||||
|
|
||||||
//前端显示版本
|
|
||||||
//每次更新之后,修改此处,表明修改
|
|
||||||
//这样, 用户截图时, 可以知道具体的版本
|
|
||||||
const oversion = "Release_8.2.8.1"; //前端
|
|
||||||
const tversion = "Release_8.2.8.1"; //后端
|
|
||||||
|
|
||||||
//首页
|
|
||||||
WebSocketObserver().listener('index/update', (data) => {
|
|
||||||
if (!permssion.isMaster(data.WsSession)) return;
|
|
||||||
response.wsSend(data.ws, 'index/update', {
|
|
||||||
system: os.type() + " " + os.arch(),
|
|
||||||
root: process.cwd(),
|
|
||||||
oneversion: oversion,
|
|
||||||
twoversion: tversion
|
|
||||||
})
|
|
||||||
});
|
|
Loading…
Reference in New Issue
Block a user