Commit c0aaedab authored by tywldx's avatar tywldx

add new api

parent daacab31
...@@ -108,6 +108,22 @@ admin.get('/get_hosts', function (req, res) { ...@@ -108,6 +108,22 @@ admin.get('/get_hosts', function (req, res) {
res.send(items); res.send(items);
}); });
// 根据类型获取系统名称
admin.get('/get_systems_by_type', function (req, res) {
res.setHeader("Content-Type","application/json");
var comstr = attrComsArr.join("/");
var ui_str = execSync(`node ./get_project_config.js -type ui -attr name`)
ui_str = ui_str.replace(" ",",");
var java_str = execSync(`node ./get_project_config.js -type java -attr name`)
var node_str = execSync(`node ./get_project_config.js -type node -attr name`)
var python_str = execSync(`node ./get_project_config.js -type python -attr name`)
var server_str = `${java_str} ${node_str} ${python_str}`
server_str = server_str.replace(" ",",");
res.send({
frontend:ui_str,
backend:server_str
});
});
// 增加一个新的nginx映射 // 增加一个新的nginx映射
admin.post('/add_new_proxy', function (req, res) { admin.post('/add_new_proxy', function (req, res) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment