Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2015-11-09 15:19:50 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
18b50d961fe1a5c60289fdaf3a1aa6050ffa5244
18b50d96
1 parent
d916c537
support query server by id.
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
3 行增加
和
2 行删除
trunk/research/api-server/server.py
trunk/research/api-server/server.py
查看文件 @
18b50d9
...
...
@@ -621,7 +621,7 @@ class RESTServers(object):
'''
get all servers which report to this api-server.
'''
def
GET
(
self
):
def
GET
(
self
,
id
=
None
):
enable_crossdomain
()
try
:
...
...
@@ -631,7 +631,8 @@ class RESTServers(object):
data
=
[]
for
node
in
self
.
__nodes
:
data
.
append
(
node
.
json_dump
())
if
id
==
None
or
node
.
id
==
str
(
id
)
or
node
.
device_id
==
str
(
id
):
data
.
append
(
node
.
json_dump
())
return
json
.
dumps
(
data
)
finally
:
...
...
请
注册
或
登录
后发表评论