正在显示
1 个修改的文件
包含
2 行增加
和
1 行删除
| @@ -621,7 +621,7 @@ class RESTServers(object): | @@ -621,7 +621,7 @@ class RESTServers(object): | ||
| 621 | ''' | 621 | ''' |
| 622 | get all servers which report to this api-server. | 622 | get all servers which report to this api-server. |
| 623 | ''' | 623 | ''' |
| 624 | - def GET(self): | 624 | + def GET(self, id=None): |
| 625 | enable_crossdomain() | 625 | enable_crossdomain() |
| 626 | 626 | ||
| 627 | try: | 627 | try: |
| @@ -631,6 +631,7 @@ class RESTServers(object): | @@ -631,6 +631,7 @@ class RESTServers(object): | ||
| 631 | 631 | ||
| 632 | data = [] | 632 | data = [] |
| 633 | for node in self.__nodes: | 633 | for node in self.__nodes: |
| 634 | + if id == None or node.id == str(id) or node.device_id == str(id): | ||
| 634 | data.append(node.json_dump()) | 635 | data.append(node.json_dump()) |
| 635 | 636 | ||
| 636 | return json.dumps(data) | 637 | return json.dumps(data) |
-
请 注册 或 登录 后发表评论