mirror of
https://github.com/empayre/fleet.git
synced 2024-11-07 01:15:22 +00:00
a950e9d095
* create new components for query side panel * add reusable icon component that uses svg for icons * integrate with new osquery_fleet_schema.json data * update UI to work with osquery_fleet_schema.json * add remark-gfm to safely support direct urls in markdown * move fleet ace into markdown component so we can render code with ace editor * add testing for new query sidebar * remove incomplete tests for query sidepanel
17 lines
567 B
TypeScript
17 lines
567 B
TypeScript
import { flatMap } from "lodash";
|
|
|
|
import { IOsQueryTable } from "interfaces/osquery_table";
|
|
import osqueryFleetTablesJSON from "../../schema/osquery_fleet_schema.json";
|
|
|
|
// Typecasting explicity here as we are adding more rigid types such as
|
|
// IOsqueryPlatform for platform names, instead of just any strings.
|
|
const queryTable = osqueryFleetTablesJSON as IOsQueryTable[];
|
|
|
|
export const osqueryTables = queryTable.sort((a, b) => {
|
|
return a.name >= b.name ? 1 : -1;
|
|
});
|
|
|
|
export const osqueryTableNames = flatMap(osqueryTables, (table) => {
|
|
return table.name;
|
|
});
|