fleet/frontend/interfaces/label.ts
RachelElysia bb11f5008f
Frontend tech debt: Clean up 409 lint warnings (#3703)
* Clean up unused variables, return types, many quick type any
2022-02-14 17:11:12 -05:00

43 lines
1.2 KiB
TypeScript

import PropTypes from "prop-types";
export default PropTypes.shape({
created_at: PropTypes.string,
updated_at: PropTypes.string,
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
name: PropTypes.string,
query: PropTypes.string,
label_type: PropTypes.string,
label_membership_type: PropTypes.string,
hosts_count: PropTypes.number,
display_text: PropTypes.string,
count: PropTypes.number, // seems to be a repeat of hosts_count issue #1618
host_ids: PropTypes.arrayOf(PropTypes.number),
});
export interface ILabel {
created_at: string;
updated_at: string;
id: number | string;
uuid?: string;
name: string;
description?: string;
query: string;
label_type: "regular" | "builtin";
label_membership_type: string;
hosts_count: number;
display_text: string;
count: number; // seems to be a repeat of hosts_count issue #1618
host_ids: number[] | null;
type?: "custom" | "platform" | "status" | "all";
slug?: string; // e.g., "labels/13" | "online"
target_type?: string; // e.g., "labels"
platform: string;
}
export interface ILabelFormData {
name: string;
query: string;
description: string;
platform: string;
}