Leafcutter UI fixes
This commit is contained in:
parent
f074ec264f
commit
b429f195c1
3 changed files with 11 additions and 8 deletions
|
|
@ -22,7 +22,7 @@ import { QueryDateRangeSelector } from "./QueryDateRangeSelector";
|
||||||
import { useAppContext } from "./AppProvider";
|
import { useAppContext } from "./AppProvider";
|
||||||
import { Tooltip } from "./Tooltip";
|
import { Tooltip } from "./Tooltip";
|
||||||
|
|
||||||
interface QueryBuilderProps {}
|
interface QueryBuilderProps { }
|
||||||
|
|
||||||
export const QueryBuilder: FC<QueryBuilderProps> = () => {
|
export const QueryBuilder: FC<QueryBuilderProps> = () => {
|
||||||
const t = useTranslate();
|
const t = useTranslate();
|
||||||
|
|
@ -155,9 +155,9 @@ export const QueryBuilder: FC<QueryBuilderProps> = () => {
|
||||||
<QueryBuilderSection
|
<QueryBuilderSection
|
||||||
width={12}
|
width={12}
|
||||||
name={t("region")}
|
name={t("region")}
|
||||||
keyName="region"
|
keyName="subregion"
|
||||||
Image={MapIcon}
|
Image={MapIcon}
|
||||||
showQueryType
|
showQueryType={false}
|
||||||
tooltipTitle={t("regionCardTitle")}
|
tooltipTitle={t("regionCardTitle")}
|
||||||
tooltipDescription={t("regionCardDescription")}
|
tooltipDescription={t("regionCardDescription")}
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ export const RawDataViewer: FC<RawDataViewerProps> = ({ rows, height }) => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
<Box sx={{ width: "100%", height }}>
|
<Box sx={{ width: "100%", height }} onClick={(e: any) => e.stopPropagation()}>
|
||||||
<Grid container direction="column" spacing={2}>
|
<Grid container direction="column" spacing={2}>
|
||||||
<Grid item>
|
<Grid item>
|
||||||
<DataGridPro
|
<DataGridPro
|
||||||
|
|
@ -71,10 +71,11 @@ export const RawDataViewer: FC<RawDataViewerProps> = ({ rows, height }) => {
|
||||||
hideFooter
|
hideFooter
|
||||||
disableColumnMenu
|
disableColumnMenu
|
||||||
scrollbarSize={10}
|
scrollbarSize={10}
|
||||||
|
disableVirtualization
|
||||||
/>
|
/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Box>
|
</Box>
|
||||||
</Grid>
|
</Grid >
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -423,8 +423,6 @@ export const performQuery = async (searchQuery: any, limit: number) => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(JSON.stringify(body, null, 2));
|
|
||||||
|
|
||||||
const dataResponse = await client.search({
|
const dataResponse = await client.search({
|
||||||
index: dataIndexName,
|
index: dataIndexName,
|
||||||
size: limit,
|
size: limit,
|
||||||
|
|
@ -435,8 +433,12 @@ export const performQuery = async (searchQuery: any, limit: number) => {
|
||||||
hits: { hits },
|
hits: { hits },
|
||||||
} = dataResponse.body;
|
} = dataResponse.body;
|
||||||
const results = hits.map((hit: any) => ({
|
const results = hits.map((hit: any) => ({
|
||||||
id: hit._id,
|
|
||||||
...hit._source,
|
...hit._source,
|
||||||
|
id: hit._id,
|
||||||
|
incident: Array.isArray(hit._source.incident) ? hit._source.incident.join(", ") : hit._source.incident,
|
||||||
|
technology: Array.isArray(hit._source.technology) ? hit._source.technology.join(", ") : hit._source.technology,
|
||||||
|
targeted_group: Array.isArray(hit._source.targeted_group) ? hit._source.targeted_group.join(", ") : hit._source.targeted_group,
|
||||||
|
country: Array.isArray(hit._source.country) ? hit._source.country.join(", ") : hit._source.country,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
return results;
|
return results;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue