add api for get limitfields

This commit is contained in:
liuchongrui 2014-10-10 10:32:17 +08:00
parent 25e553a178
commit 7884246521
2 changed files with 7 additions and 3 deletions

View File

@ -1,6 +1,7 @@
package org.bench4q.monitor.api; package org.bench4q.monitor.api;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
import java.util.UUID; import java.util.UUID;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
@ -30,8 +31,8 @@ public class MainController {
@RequestMapping(value = "/limitableFields") @RequestMapping(value = "/limitableFields")
@ResponseBody @ResponseBody
public LimitableFieldsModel limitableFields() throws SigarException { public List<String> limitableFields() throws SigarException {
return new LimitableFieldsModel(); return new LimitableFieldsModel().getFields();
} }
@RequestMapping(value = "/submitLimit/{testPlanId}", method = RequestMethod.PUT) @RequestMapping(value = "/submitLimit/{testPlanId}", method = RequestMethod.PUT)

View File

@ -55,5 +55,8 @@ public class LimitableFieldsModel {
this.fieldsParent = fieldsParent; this.fieldsParent = fieldsParent;
} }
public static void main(String args[]) throws SigarException{
LimitableFieldsModel limitableFieldsModel = new LimitableFieldsModel();
System.out.println(limitableFieldsModel.getFields());
}
} }