|
|
@@ -22,6 +22,7 @@ import org.elasticsearch.core.TimeValue;
|
|
|
import org.elasticsearch.tasks.CancellableTask;
|
|
|
import org.elasticsearch.tasks.Task;
|
|
|
import org.elasticsearch.tasks.TaskId;
|
|
|
+import org.elasticsearch.xcontent.ParseField;
|
|
|
import org.elasticsearch.xcontent.ToXContentObject;
|
|
|
import org.elasticsearch.xcontent.XContentBuilder;
|
|
|
import org.elasticsearch.xpack.core.action.util.PageParams;
|
|
|
@@ -157,8 +158,8 @@ public class GetTransformStatsAction extends ActionType<GetTransformStatsAction.
|
|
|
public static class Response extends BaseTasksResponse implements ToXContentObject {
|
|
|
private final QueryPage<TransformStats> transformsStats;
|
|
|
|
|
|
- public Response(List<TransformStats> transformStateAndStats, long count) {
|
|
|
- this(new QueryPage<>(transformStateAndStats, count, TransformField.TRANSFORMS));
|
|
|
+ public Response(List<TransformStats> transformStateAndStats) {
|
|
|
+ this(new QueryPage<>(transformStateAndStats, transformStateAndStats.size(), TransformField.TRANSFORMS));
|
|
|
}
|
|
|
|
|
|
public Response(
|
|
|
@@ -170,7 +171,7 @@ public class GetTransformStatsAction extends ActionType<GetTransformStatsAction.
|
|
|
this(new QueryPage<>(transformStateAndStats, count, TransformField.TRANSFORMS), taskFailures, nodeFailures);
|
|
|
}
|
|
|
|
|
|
- private Response(QueryPage<TransformStats> transformsStats) {
|
|
|
+ public Response(QueryPage<TransformStats> transformsStats) {
|
|
|
this(transformsStats, Collections.emptyList(), Collections.emptyList());
|
|
|
}
|
|
|
|
|
|
@@ -196,6 +197,10 @@ public class GetTransformStatsAction extends ActionType<GetTransformStatsAction.
|
|
|
return transformsStats.count();
|
|
|
}
|
|
|
|
|
|
+ public ParseField getResultsField() {
|
|
|
+ return transformsStats.getResultsField();
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public void writeTo(StreamOutput out) throws IOException {
|
|
|
super.writeTo(out);
|