2021-04-12 13:32:25 +00:00
|
|
|
import PropTypes from "prop-types";
|
2021-06-22 19:26:57 +00:00
|
|
|
import hostUserInterface, { IHostUser } from "./host_users";
|
2021-08-16 14:30:19 +00:00
|
|
|
import labelInterface, { ILabel } from "./label";
|
|
|
|
import packInterface, { IPack } from "./pack";
|
|
|
|
import softwareInterface, { ISoftware } from "./software";
|
|
|
|
import queryStatsInterface, { IQueryStats } from "./query_stats";
|
2016-10-21 23:13:41 +00:00
|
|
|
|
|
|
|
export default PropTypes.shape({
|
2021-08-16 14:30:19 +00:00
|
|
|
created_at: PropTypes.string,
|
|
|
|
updated_at: PropTypes.string,
|
|
|
|
id: PropTypes.number,
|
2016-10-21 23:13:41 +00:00
|
|
|
detail_updated_at: PropTypes.string,
|
2021-08-16 14:30:19 +00:00
|
|
|
label_updated_at: PropTypes.string,
|
|
|
|
last_enrolled_at: PropTypes.string,
|
|
|
|
seen_time: PropTypes.string,
|
|
|
|
refetch_requested: PropTypes.bool,
|
2016-10-21 23:13:41 +00:00
|
|
|
hostname: PropTypes.string,
|
2021-08-16 14:30:19 +00:00
|
|
|
uuid: PropTypes.string,
|
2016-10-21 23:13:41 +00:00
|
|
|
platform: PropTypes.string,
|
2021-08-16 14:30:19 +00:00
|
|
|
osquery_version: PropTypes.string,
|
|
|
|
os_version: PropTypes.string,
|
|
|
|
build: PropTypes.string,
|
|
|
|
platform_like: PropTypes.string,
|
|
|
|
code_name: PropTypes.string,
|
2016-10-21 23:13:41 +00:00
|
|
|
uptime: PropTypes.number,
|
2021-08-16 14:30:19 +00:00
|
|
|
memory: PropTypes.number,
|
|
|
|
cpu_type: PropTypes.string,
|
|
|
|
cpu_brand: PropTypes.string,
|
|
|
|
cpu_physical_cores: PropTypes.number,
|
|
|
|
cpu_logical_cores: PropTypes.number,
|
|
|
|
hardware_vendor: PropTypes.string,
|
|
|
|
hardware_model: PropTypes.string,
|
|
|
|
hardware_version: PropTypes.string,
|
|
|
|
hardware_serial: PropTypes.string,
|
|
|
|
computer_name: PropTypes.string,
|
|
|
|
primary_ip: PropTypes.string,
|
|
|
|
primary_mac: PropTypes.string,
|
|
|
|
distributed_interval: PropTypes.number,
|
|
|
|
config_tls_refresh: PropTypes.number,
|
|
|
|
logger_tls_period: PropTypes.number,
|
|
|
|
team_id: PropTypes.number,
|
|
|
|
pack_stats: PropTypes.arrayOf(
|
|
|
|
PropTypes.shape({
|
|
|
|
pack_id: PropTypes.number,
|
|
|
|
pack_name: PropTypes.string,
|
|
|
|
query_stats: PropTypes.arrayOf(queryStatsInterface),
|
|
|
|
})
|
|
|
|
),
|
|
|
|
team_name: PropTypes.string,
|
|
|
|
additional: PropTypes.object, // eslint-disable-line react/forbid-prop-types
|
|
|
|
labels: PropTypes.arrayOf(labelInterface),
|
|
|
|
packs: PropTypes.arrayOf(packInterface),
|
|
|
|
software: PropTypes.arrayOf(softwareInterface),
|
|
|
|
status: PropTypes.string,
|
|
|
|
display_text: PropTypes.string,
|
2021-06-22 19:26:57 +00:00
|
|
|
users: PropTypes.arrayOf(hostUserInterface),
|
2016-10-21 23:13:41 +00:00
|
|
|
});
|
2021-03-03 16:51:39 +00:00
|
|
|
|
|
|
|
export interface IHost {
|
2021-08-16 14:30:19 +00:00
|
|
|
created_at: string;
|
|
|
|
updated_at: string;
|
|
|
|
id: number;
|
2021-03-03 16:51:39 +00:00
|
|
|
detail_updated_at: string;
|
2021-08-16 14:30:19 +00:00
|
|
|
label_updated_at: string;
|
|
|
|
last_enrolled_at: string;
|
|
|
|
seen_time: string;
|
|
|
|
refetch_requested: boolean;
|
2021-03-03 16:51:39 +00:00
|
|
|
hostname: string;
|
2021-08-16 14:30:19 +00:00
|
|
|
uuid: string;
|
2021-03-03 16:51:39 +00:00
|
|
|
platform: string;
|
2021-08-16 14:30:19 +00:00
|
|
|
osquery_version: string;
|
|
|
|
os_version: string;
|
|
|
|
build: string;
|
|
|
|
platform_like: string;
|
|
|
|
code_name: string;
|
2021-03-03 16:51:39 +00:00
|
|
|
uptime: number;
|
2021-08-16 14:30:19 +00:00
|
|
|
memory: number;
|
|
|
|
cpu_type: string;
|
|
|
|
cpu_brand: string;
|
|
|
|
cpu_physical_cores: number;
|
|
|
|
cpu_logical_cores: number;
|
|
|
|
hardware_vendor: string;
|
|
|
|
hardware_model: string;
|
|
|
|
hardware_version: string;
|
|
|
|
hardware_serial: string;
|
|
|
|
computer_name: string;
|
|
|
|
primary_ip: string;
|
|
|
|
primary_mac: string;
|
|
|
|
distributed_interval: number;
|
|
|
|
config_tls_refresh: number;
|
|
|
|
logger_tls_period: number;
|
|
|
|
team_id: number;
|
|
|
|
pack_stats: {
|
|
|
|
pack_id: number;
|
|
|
|
pack_name: string;
|
|
|
|
query_stats: IQueryStats[];
|
|
|
|
}[];
|
|
|
|
team_name: string;
|
|
|
|
additional: object; // eslint-disable-line @typescript-eslint/ban-types
|
|
|
|
labels: ILabel[];
|
|
|
|
packs: IPack[];
|
|
|
|
software: ISoftware[];
|
|
|
|
status: string;
|
|
|
|
display_text: string;
|
2021-06-22 19:26:57 +00:00
|
|
|
users: IHostUser[];
|
2021-03-03 16:51:39 +00:00
|
|
|
}
|