Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onAllData(res, err) {
let result = null;
if (res && res.appliedQuery) {
let combineData = res.currentData;
if (res.mode === "historic") {
combineData = res.currentData.concat(res.newData);
} else if (res.mode === "streaming") {
combineData = helper.combineStreamData(res.currentData, res.newData);
}
if (combineData) {
combineData = GetTopTopics(combineData);
const resultMarkup = combineData.map((data, index) => {
if (index < 5) {
return this.itemMarkup(data, index);
}
});
result = (
<div style="{{">
{resultMarkup}
<table>
<tbody></tbody>
</table>
</div>
onData(res, err) {
let result = null;
if (res) {
let combineData = res.currentData;
if (res.mode === "historic") {
combineData = res.currentData.concat(res.newData);
} else if (res.mode === "streaming") {
combineData = helper.combineStreamData(res.currentData, res.newData);
}
if (combineData) {
result = combineData.map((markerData, index) => {
let marker = markerData._source;
return this.itemMarkup(marker, markerData);
});
}
}
return result;
}
onAllData(res, err) {
let result = null;
if (res && res.appliedQuery) {
let combineData = res.currentData;
if (res.mode === "historic") {
combineData = res.currentData.concat(res.newData);
} else if (res.mode === "streaming") {
combineData = helper.combineStreamData(res.currentData, res.newData);
}
if (combineData) {
combineData = GetTopTopics(combineData);
const resultMarkup = combineData.map((data, index) => {
if (index < 5) {
return this.itemMarkup(data, index);
}
});
result = (
<div style="{{">
{resultMarkup}
<table>
<tbody></tbody>
</table>
</div>
onData(res, err) {
let result = null;
if(res) {
let combineData = res.currentData;
if(res.mode === "historic") {
combineData = res.currentData.concat(res.newData);
}
else if(res.mode === "streaming") {
combineData = helper.combineStreamData(res.currentData, res.newData);
}
if (combineData) {
result = combineData.map((markerData, index) => {
let marker = markerData._source;
return this.itemMarkup(marker, markerData);
});
}
}
return result;
}