mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 17:05:18 +00:00
5cc6e5e445
## Addresses #11825 - [x] Add ChromeOS to Dashboard page: <img width="1365" alt="Screenshot 2023-06-02 at 4 01 12 AM" src="https://github.com/fleetdm/fleet/assets/61553566/e846c4b6-5fcb-4847-af05-67b2237ada39"> - [x] Add to platforms dropdown, confirm order of platform options, add route - [x] Hosts summary card - [x] Add responsiveness for <980px <img width="952" alt="Screenshot 2023-06-02 at 4 02 44 AM" src="https://github.com/fleetdm/fleet/assets/61553566/93662957-c590-40e0-876d-6ce4adabad2b"> - [x] TODO: Confirm label number of chrome hosts label - ask Juan on [this issue](https://github.com/fleetdm/fleet/issues/11829) - needed to call an API to get this id - [x] Missing hosts card (didn’t need any changes) - [x] Low disk space hosts card (Not supported) - [x] Operating systems card **Note for reviewers:** There is an API call happening from the HostsSummary component to get the id for the ChromeOS label needed for the URL to the filtered manage hosts page. This feature working properly depends on the response from that endpoint, which is WIP. UPDATE 6/5 - the endpoint is now working and being called correctly, though the id being returned is WIP (backend). No need to replace anything to test. ## Checklist for submitter - [x] Changes file added for user-visible changes in `changes/` - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
63 lines
1.6 KiB
TypeScript
63 lines
1.6 KiB
TypeScript
import PropTypes from "prop-types";
|
|
|
|
export default PropTypes.shape({
|
|
created_at: PropTypes.string,
|
|
updated_at: PropTypes.string,
|
|
id: PropTypes.oneOfType([PropTypes.number]),
|
|
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 type LabelType = "regular" | "builtin";
|
|
export type LabelMembershipType = "dynamic" | "manual";
|
|
|
|
export interface ILabelSummary {
|
|
id: number;
|
|
name: string;
|
|
description?: string;
|
|
label_type: LabelType;
|
|
}
|
|
|
|
export interface ILabel extends ILabelSummary {
|
|
created_at: string;
|
|
updated_at: string;
|
|
uuid?: string;
|
|
query: string;
|
|
label_membership_type: LabelMembershipType;
|
|
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;
|
|
}
|
|
|
|
// corresponding to fleet>server>fleet>labels.go>LabelSpec
|
|
export interface ILabelSpecResponse {
|
|
specs: {
|
|
id: number;
|
|
name: string;
|
|
description: string;
|
|
query: string;
|
|
platform?: string; // improve to only allow possible platforms from API
|
|
label_type?: LabelType;
|
|
label_membership_type: LabelMembershipType;
|
|
hosts?: string[];
|
|
};
|
|
}
|