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 { Tooltip } from "./Tooltip";
|
||||
|
||||
interface QueryBuilderProps {}
|
||||
interface QueryBuilderProps { }
|
||||
|
||||
export const QueryBuilder: FC<QueryBuilderProps> = () => {
|
||||
const t = useTranslate();
|
||||
|
|
@ -155,9 +155,9 @@ export const QueryBuilder: FC<QueryBuilderProps> = () => {
|
|||
<QueryBuilderSection
|
||||
width={12}
|
||||
name={t("region")}
|
||||
keyName="region"
|
||||
keyName="subregion"
|
||||
Image={MapIcon}
|
||||
showQueryType
|
||||
showQueryType={false}
|
||||
tooltipTitle={t("regionCardTitle")}
|
||||
tooltipDescription={t("regionCardDescription")}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ export const RawDataViewer: FC<RawDataViewerProps> = ({ rows, height }) => {
|
|||
|
||||
return (
|
||||
<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 item>
|
||||
<DataGridPro
|
||||
|
|
@ -71,10 +71,11 @@ export const RawDataViewer: FC<RawDataViewerProps> = ({ rows, height }) => {
|
|||
hideFooter
|
||||
disableColumnMenu
|
||||
scrollbarSize={10}
|
||||
disableVirtualization
|
||||
/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</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({
|
||||
index: dataIndexName,
|
||||
size: limit,
|
||||
|
|
@ -435,8 +433,12 @@ export const performQuery = async (searchQuery: any, limit: number) => {
|
|||
hits: { hits },
|
||||
} = dataResponse.body;
|
||||
const results = hits.map((hit: any) => ({
|
||||
id: hit._id,
|
||||
...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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue