mirror of
https://github.com/yhl452493373/frpc-panel.git
synced 2026-04-04 06:17:00 +08:00
add convert json to toml by toml.js
This commit is contained in:
@@ -16,6 +16,21 @@ var loadClientInfo = (function ($) {
|
||||
type: 'none'
|
||||
}).done(function (result) {
|
||||
if (result.success) {
|
||||
var proxies = [];
|
||||
result.data.proxies.forEach(function (proxy){
|
||||
var items = flatJSON(proxy.ProxyConfigurer);
|
||||
proxies.push(expandJSON(items))
|
||||
})
|
||||
var visitors = [];
|
||||
result.data.visitors.forEach(function (visitor){
|
||||
var items = flatJSON(visitor.VisitorConfigurer);
|
||||
visitors.push(expandJSON(items))
|
||||
})
|
||||
|
||||
var newD = $.extend({},result.data,true);
|
||||
newD.proxies = proxies;
|
||||
newD.visitors = visitors;
|
||||
console.log(TOML.stringify(newD))
|
||||
renderClientInfo(result.data);
|
||||
} else {
|
||||
layui.layer.msg(result.message);
|
||||
|
||||
Reference in New Issue
Block a user