Commit b3fdd5fa authored by liuzheng712's avatar liuzheng712

update

parent 853eaffc
......@@ -173,150 +173,120 @@ server.run = function (options) {
apis.route('/perms/v1/user/my/asset-groups-assets/')
.get(function (req, res) {
res.json([
{
"id": 0,
"name": "ungrouped",
"assets": []
},
{
"id": 1,
"name": "Default",
"comment": "Default asset group",
"assets": [
{
"id": 0,
"name": "ungrouped",
"assets": []
},
{
"id": 1,
"name": "Default",
"comment": "Default asset group",
"assets": [
{
"id": 2,
"hostname": "192.168.1.6",
"ip": "192.168.2.6",
"port": 22,
"system_users": [
{
"id": 1,
"name": "web",
"username": "web",
"protocol": "ssh",
"auth_method": "P",
"auto_push": true
}
]
"id": 2,
"hostname": "192.168.1.6",
"ip": "192.168.2.6",
"port": 22,
"system_users": [
{
"id": 1,
"name": "web",
"username": "web",
"protocol": "ssh",
"auth_method": "P",
"auto_push": true
}
]
},
{
"id": 4,
"hostname": "testserver123",
"ip": "123.57.183.135",
"port": 8022,
"system_users": [
{
"id": 1,
"name": "web",
"username": "web",
"protocol": "ssh",
"auth_method": "P",
"auto_push": true
}
]
"id": 4,
"hostname": "testserver123",
"ip": "123.57.183.135",
"port": 8022,
"system_users": [
{
"id": 1,
"name": "web",
"username": "web",
"protocol": "ssh",
"auth_method": "P",
"auto_push": true
}
]
}
]
},
{
"id": 4,
"name": "java",
"comment": "",
"assets": [
]
},
{
"id": 4,
"name": "java",
"comment": "",
"assets": [
{
"id": 2,
"hostname": "192.168.1.6",
"ip": "192.168.2.6",
"port": 22,
"system_users": [
{
"id": 1,
"name": "web",
"username": "web",
"protocol": "ssh",
"auth_method": "P",
"auto_push": true
}
]
"id": 2,
"hostname": "192.168.1.6",
"ip": "192.168.2.6",
"port": 22,
"system_users": [
{
"id": 1,
"name": "web",
"username": "web",
"protocol": "ssh",
"auth_method": "P",
"auto_push": true
}
]
}
]
},
{
"id": 3,
"name": "数据库",
"comment": "",
"assets": [
]
},
{
"id": 3,
"name": "数据库",
"comment": "",
"assets": [
{
"id": 2,
"hostname": "192.168.1.6",
"ip": "192.168.2.6",
"port": 22,
"system_users": [
{
"id": 1,
"name": "web",
"username": "web",
"protocol": "ssh",
"auth_method": "P",
"auto_push": true
}
]
"id": 2,
"hostname": "192.168.1.6",
"ip": "192.168.2.6",
"port": 22,
"system_users": [
{
"id": 1,
"name": "web",
"username": "web",
"protocol": "ssh",
"auth_method": "P",
"auto_push": true
}
]
}
]
},
{
"id": 2,
"name": "运维组",
"comment": "",
"assets": [
]
},
{
"id": 2,
"name": "运维组",
"comment": "",
"assets": [
{
"id": 2,
"hostname": "192.168.1.6",
"ip": "192.168.2.6",
"port": 22,
"system_users": [
{
"id": 1,
"name": "web",
"username": "web",
"protocol": "ssh",
"auth_method": "P",
"auto_push": true
}
]
"id": 2,
"hostname": "192.168.1.6",
"ip": "192.168.2.6",
"port": 22,
"system_users": [
{
"id": 1,
"name": "web",
"username": "web",
"protocol": "ssh",
"auth_method": "P",
"auto_push": true
}
]
}
]
}
]);
res.json([{
"name": "测试服务器组1",
"id": 1,
"children": [{"name": "测试服务器1", "uuid": "", "type": "ssh", "users": ["root", "test"]}, {
"name": "测试服务器2",
"uuid": "",
"type": "ssh",
"users": ["root", "test"]
}]
}, {
"name": "樱花庄服务器组",
"id": 2,
"children": [{"name": "测试服务器1", "uuid": "", "type": "ssh", "users": ["root", "test"]}, {
"name": "测试服务器2",
"uuid": "",
"type": "ssh",
"users": ["root", "test"]
}]
}, {
"name": "阿里云服务器组",
"id": 3,
"children": [{"name": "测试服务器1", "uuid": "", "type": "ssh", "users": ["root", "test"]}, {
"name": "测试服务器2",
"uuid": "",
"type": "ssh",
"users": ["root", "test"]
}]
}])
]
}
])
});
app.use("/api", apis);
......
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