Extend sort functionality for policy status UI (#5078)

This commit is contained in:
gillespi314
2022-04-13 11:08:37 -05:00
committed by GitHub
parent a4be69d9d1
commit fa8bfbd796
13 changed files with 143 additions and 147 deletions
+6 -15
View File
@@ -11,20 +11,10 @@ export default PropTypes.shape({
online: PropTypes.number,
});
export interface ICampaignQueryResult {
build_distro: string;
build_platform: string;
config_hash: string;
config_valid: string;
extensions: string;
export interface ICampaignError {
host_hostname: string;
instance_id: string;
pid: string;
platform_mask: string;
start_time: string;
uuid: string;
version: string;
watcher: string;
osquery_version: string;
error: string;
}
export interface ICampaign {
@@ -32,7 +22,7 @@ export interface ICampaign {
[key: string]: any;
};
created_at: string;
errors: any;
errors: ICampaignError[];
hosts: IHost[];
hosts_count: {
total: number;
@@ -41,7 +31,7 @@ export interface ICampaign {
};
id: number;
query_id: number;
query_results: ICampaignQueryResult[];
query_results: unknown[];
status: string;
totals: {
count: number;
@@ -53,6 +43,7 @@ export interface ICampaign {
user_id: number;
}
// TODO: review use of ICampaignState to see if legacy code can be removed
export interface ICampaignState {
campaign: ICampaign;
observerShowSql: boolean;
+2 -7
View File
@@ -97,15 +97,10 @@ export interface IPackStats {
export interface IHostPolicyQuery {
id: number;
hostname: string;
query_results?: unknown[];
status?: string;
}
export interface IHostPolicyQueryError {
host_hostname: string;
osquery_version: string;
error: string;
}
interface IGeoLocation {
country_iso: string;
city_name: string;
@@ -170,6 +165,6 @@ export interface IHost {
munki?: IMunkiData;
mdm?: IMDMData;
policies: IHostPolicy[];
query_results?: [];
query_results?: unknown[];
geolocation?: IGeoLocation;
}