mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 08:55:24 +00:00
b6659cfaaa
* Add new feature: team policies * Continue work on team policies * Continue work on team policies * Continue team policies * Revert accidental deletion * Rename variables * code refactored; working on runtime errors * updated front end docs * Update URLs from team to teams, add tests for policy auth * Fix test * Continue work on team policies * Add permission checks * mange hosts functional and cleaned up; typing * improved label logic * added try catch to awaits * lint fixes * frontend unit tests don't work for functional components * test fix * revert * Address errors related to refetch on window focus * Add loading error check * Fix typos in loading error checks * Guard against invariant condition in useEffect * Update links and routes for team policies * lint fixes * Update frontend/pages/hosts/ManageHostsPage/helpers.ts Co-authored-by: gillespi314 <73313222+gillespi314@users.noreply.github.com> * Change inherited policies button, tooltip * lint fixes Co-authored-by: gillespi314 <73313222+gillespi314@users.noreply.github.com> Co-authored-by: Tomas Touceda <chiiph@gmail.com>
42 lines
1.2 KiB
TypeScript
42 lines
1.2 KiB
TypeScript
import PropTypes, { string } 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;
|
|
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;
|
|
}
|