Merge pull request #19 in ST/ch.psi.daq.queryrest from atest287 to master
# By Zellweger Christof Ralf # Via Zellweger Christof Ralf * commit 'af75f3794517db2c69180520638c0930330809b8': ATEST-287: - fixing test: adding data gen again ATEST-287: - adding new eventCount to default query fields
This commit is contained in:
6
.project
6
.project
@ -5,6 +5,11 @@
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.common.project.facet.core.builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
@ -20,5 +25,6 @@
|
||||
<nature>org.springframework.ide.eclipse.core.springnature</nature>
|
||||
<nature>org.springsource.ide.eclipse.gradle.core.nature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
#Fri Nov 27 16:17:06 CET 2015
|
||||
#Mon Nov 30 11:01:36 CET 2015
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
|
@ -32,6 +32,8 @@ import ch.psi.daq.query.model.impl.DAQQuery;
|
||||
*/
|
||||
public class ResponseStreamWriter {
|
||||
|
||||
private static final String DATA_RESP_FIELD = "data";
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(ResponseStreamWriter.class);
|
||||
|
||||
@Resource
|
||||
@ -114,7 +116,7 @@ public class ResponseStreamWriter {
|
||||
generator.writeStartObject();
|
||||
generator.writeStringField(QueryField.channel.name(), entry.getKey());
|
||||
|
||||
generator.writeFieldName("data");
|
||||
generator.writeFieldName(DATA_RESP_FIELD);
|
||||
writer.writeValue(generator, entry.getValue());
|
||||
|
||||
generator.writeEndObject();
|
||||
|
@ -1,6 +1,6 @@
|
||||
# defines the fields that are included in the response
|
||||
# if no fields have been specified by the user
|
||||
queryrest.default.response.fields=channel,pulseId,globalMillis,globalNanos,iocMillis,iocNanos,shape,value
|
||||
queryrest.default.response.fields=channel,pulseId,globalMillis,globalNanos,iocMillis,iocNanos,shape,eventCount,value
|
||||
|
||||
# aggregation which are included in the response by default if aggregation is enabled for a given query
|
||||
queryrest.default.response.aggregations=min,max,sum
|
||||
|
@ -11,6 +11,7 @@ import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
|
||||
|
||||
import ch.psi.daq.cassandra.reader.CassandraReader;
|
||||
import ch.psi.daq.cassandra.util.test.CassandraDataGen;
|
||||
import ch.psi.daq.query.processor.QueryProcessor;
|
||||
import ch.psi.daq.query.processor.QueryProcessorLocal;
|
||||
import ch.psi.daq.test.cassandra.admin.CassandraTestAdmin;
|
||||
@ -49,4 +50,10 @@ public class DaqWebMvcConfig extends WebMvcConfigurationSupport {
|
||||
public CassandraTestAdmin cassandraTestAdmin() {
|
||||
return new CassandraTestAdminImpl();
|
||||
}
|
||||
|
||||
@Bean
|
||||
@Lazy
|
||||
public CassandraDataGen cassandraDataGen() {
|
||||
return new CassandraDataGen();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user