diff --git a/frontend/utilities/osquery_tables.js b/frontend/utilities/osquery_tables.js index 26e4fc1e8d..1dace6785f 100644 --- a/frontend/utilities/osquery_tables.js +++ b/frontend/utilities/osquery_tables.js @@ -1,4 +1,4 @@ -import { flatten, map, flatMap } from 'lodash'; +import { flatten, map, flatMap, sortBy } from 'lodash'; import osqueryTablesJSON from '../osquery_tables.json'; const appendPlatformKeyToTables = (parsedTables) => { @@ -15,7 +15,9 @@ export const normalizeTables = (tablesJSON) => { const { tables: parsedTables } = typeof tablesJSON === 'object' ? tablesJSON : JSON.parse(tablesJSON); const tablesWithPlatformKey = appendPlatformKeyToTables(parsedTables); - return flatten(tablesWithPlatformKey); + const flattenedTables = flatten(tablesWithPlatformKey); + + return sortBy(flattenedTables, (table) => { return table.name; }); }; export const osqueryTables = normalizeTables(osqueryTablesJSON);