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