Query Types are now zero-based in FTL. This removes the extra offset of 1 everywhere.

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2019-11-26 11:48:13 +01:00
parent b6b1750c27
commit fa549697bb

View File

@@ -135,8 +135,7 @@ class QueryLog extends Component<WithTranslation, QueryLogState> {
break;
}
// Query Types start at 1
filters.query_type = parseInt(filter.value) + 1;
filters.query_type = parseInt(filter.value);
break;
case "domain":
if (filter.value.length === 0) {
@@ -450,7 +449,7 @@ const columns = (t: i18next.TFunction) => [
{
Header: t("Type"),
id: "queryType",
accessor: (r: ApiQuery) => queryTypes[r.type - 1],
accessor: (r: ApiQuery) => queryTypes[r.type],
width: 50,
filterable: true,
filterMethod: () => true, // Don't filter client side