2021-04-12 13:32:25 +00:00
|
|
|
|
import PropTypes from "prop-types";
|
2021-11-30 18:24:30 +00:00
|
|
|
|
import hostPolicyInterface, { IHostPolicy } from "./policy";
|
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";
|
2021-12-09 16:38:51 +00:00
|
|
|
|
import hostQueryResult from "./campaign";
|
2021-08-16 14:30:19 +00:00
|
|
|
|
import queryStatsInterface, { IQueryStats } from "./query_stats";
|
2023-02-01 17:47:52 +00:00
|
|
|
|
import { ILicense, IDeviceGlobalConfig } from "./config";
|
2023-04-27 15:10:41 +00:00
|
|
|
|
import {
|
2023-10-06 22:04:33 +00:00
|
|
|
|
IHostMdmProfile,
|
2023-04-27 15:10:41 +00:00
|
|
|
|
MdmEnrollmentStatus,
|
|
|
|
|
|
BootstrapPackageStatus,
|
2023-10-06 22:04:33 +00:00
|
|
|
|
DiskEncryptionStatus,
|
2023-04-27 15:10:41 +00:00
|
|
|
|
} from "./mdm";
|
2024-07-25 20:33:36 +00:00
|
|
|
|
import { HostPlatform } from "./platform";
|
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,
|
2023-11-15 21:42:57 +00:00
|
|
|
|
last_restarted_at: PropTypes.string,
|
2021-08-16 14:30:19 +00:00
|
|
|
|
label_updated_at: PropTypes.string,
|
2022-11-01 18:59:40 +00:00
|
|
|
|
policy_updated_at: PropTypes.string,
|
2021-08-16 14:30:19 +00:00
|
|
|
|
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,
|
2024-04-04 19:18:04 +00:00
|
|
|
|
orbit_version: PropTypes.string,
|
|
|
|
|
|
fleet_desktop_version: PropTypes.string,
|
2021-08-16 14:30:19 +00:00
|
|
|
|
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,
|
2022-11-01 18:59:40 +00:00
|
|
|
|
cpu_subtype: PropTypes.string,
|
2021-08-16 14:30:19 +00:00
|
|
|
|
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
|
2021-08-25 20:05:54 +00:00
|
|
|
|
percent_disk_space_available: PropTypes.number,
|
|
|
|
|
|
gigs_disk_space_available: PropTypes.number,
|
2021-08-16 14:30:19 +00:00
|
|
|
|
labels: PropTypes.arrayOf(labelInterface),
|
|
|
|
|
|
packs: PropTypes.arrayOf(packInterface),
|
|
|
|
|
|
software: PropTypes.arrayOf(softwareInterface),
|
|
|
|
|
|
status: PropTypes.string,
|
2022-10-14 19:26:15 +00:00
|
|
|
|
display_name: PropTypes.string,
|
2021-06-22 19:26:57 +00:00
|
|
|
|
users: PropTypes.arrayOf(hostUserInterface),
|
2021-10-18 18:29:48 +00:00
|
|
|
|
policies: PropTypes.arrayOf(hostPolicyInterface),
|
2021-12-09 16:38:51 +00:00
|
|
|
|
query_results: PropTypes.arrayOf(hostQueryResult),
|
2022-11-01 18:59:40 +00:00
|
|
|
|
batteries: PropTypes.arrayOf(
|
|
|
|
|
|
PropTypes.shape({
|
|
|
|
|
|
cycle_count: PropTypes.number,
|
|
|
|
|
|
health: PropTypes.string,
|
|
|
|
|
|
})
|
|
|
|
|
|
),
|
2016-10-21 23:13:41 +00:00
|
|
|
|
});
|
2021-03-03 16:51:39 +00:00
|
|
|
|
|
2022-10-14 20:21:30 +00:00
|
|
|
|
export type HostStatus = "online" | "offline" | "new" | "missing";
|
2021-09-28 21:05:25 +00:00
|
|
|
|
export interface IDeviceUser {
|
|
|
|
|
|
email: string;
|
2021-12-27 23:57:15 +00:00
|
|
|
|
source: string;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2021-09-28 21:05:25 +00:00
|
|
|
|
export interface IMunkiData {
|
|
|
|
|
|
version: string;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-06-27 15:33:38 +00:00
|
|
|
|
export type MacDiskEncryptionActionRequired = "log_out" | "rotate_key";
|
2023-03-13 21:15:55 +00:00
|
|
|
|
|
2023-10-06 22:04:33 +00:00
|
|
|
|
export interface IOSSettings {
|
|
|
|
|
|
disk_encryption: {
|
|
|
|
|
|
status: DiskEncryptionStatus | null;
|
2023-10-18 21:02:15 +00:00
|
|
|
|
detail: string;
|
2023-10-06 22:04:33 +00:00
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-03-13 21:15:55 +00:00
|
|
|
|
interface IMdmMacOsSettings {
|
2023-10-06 22:04:33 +00:00
|
|
|
|
disk_encryption: DiskEncryptionStatus | null;
|
2023-04-27 15:10:41 +00:00
|
|
|
|
action_required: MacDiskEncryptionActionRequired | null;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
interface IMdmMacOsSetup {
|
|
|
|
|
|
bootstrap_package_status: BootstrapPackageStatus | "";
|
|
|
|
|
|
details: string;
|
|
|
|
|
|
bootstrap_package_name: string;
|
2023-03-13 21:15:55 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-02-26 14:26:30 +00:00
|
|
|
|
export type HostMdmDeviceStatus = "unlocked" | "locked" | "wiped";
|
|
|
|
|
|
export type HostMdmPendingAction = "unlock" | "lock" | "wipe" | "";
|
2024-02-13 18:03:53 +00:00
|
|
|
|
|
2022-12-16 21:12:11 +00:00
|
|
|
|
export interface IHostMdmData {
|
2023-02-14 17:00:36 +00:00
|
|
|
|
encryption_key_available: boolean;
|
2023-02-01 17:47:52 +00:00
|
|
|
|
enrollment_status: MdmEnrollmentStatus | null;
|
2024-03-01 16:52:19 +00:00
|
|
|
|
dep_profile_error?: boolean;
|
2023-03-13 21:15:55 +00:00
|
|
|
|
name?: string;
|
UI: 9274 unenroll mdm modal (#9539)
# Addresses #9274
https://www.loom.com/share/2edd946cbd424af2b960801cc505ac85
## Button and permissions:
- no permission, enrolled, online: <img width="1131" alt="no permission,
enrolled, online"
src="https://user-images.githubusercontent.com/61553566/215197330-abc1606d-bf0a-44ec-b2de-2ef687bd529b.png">
- permission, enrolled, online: <img width="1131" alt="permission,
enrolled, online"
src="https://user-images.githubusercontent.com/61553566/215197443-a1353b9b-10dd-408b-8295-56029f2df4c3.png">
- permission, enrolled, offline: <img width="1131" alt="permission,
enrolled, offline"
src="https://user-images.githubusercontent.com/61553566/215197544-b2a997a7-09e5-4f8a-b723-af587b61a90d.png">
- not enrolled: <img width="1131" alt="not enrolled"
src="https://user-images.githubusercontent.com/61553566/215197630-87f99cb3-63a9-45ce-bc85-57a45d54cae0.png">
## Modal
- <img width="672" alt="modal"
src="https://user-images.githubusercontent.com/61553566/215214640-96670a23-d927-4213-a8fa-89411279c075.png">
- <img width="672" alt="Screenshot 2023-01-27 at 2 12 42 PM"
src="https://user-images.githubusercontent.com/61553566/215215098-40d29556-3b73-4f52-a4ae-cc8b09122f5d.png">
- <img width="672" alt="Screenshot 2023-01-27 at 2 17 48 PM"
src="https://user-images.githubusercontent.com/61553566/215216304-b9362b13-f37f-4454-81b5-423f6fc72280.png">
- <img width="787" alt="success-shot"
src="https://user-images.githubusercontent.com/61553566/215236373-be7b1970-662d-47e6-ac59-f51eff344fcd.png">
# Checklist for submitter
If some of the following don't apply, delete the relevant line.
- [x] Changes file added for user-visible changes in `changes/`
- [x] Updated test inventory
- [x] Manual QA for all new/changed functionality
---------
Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2023-01-30 23:59:02 +00:00
|
|
|
|
id?: number;
|
2024-02-13 18:03:53 +00:00
|
|
|
|
server_url: string | null;
|
2023-10-06 22:04:33 +00:00
|
|
|
|
profiles: IHostMdmProfile[] | null;
|
|
|
|
|
|
os_settings?: IOSSettings;
|
2023-04-28 14:04:55 +00:00
|
|
|
|
macos_settings?: IMdmMacOsSettings;
|
|
|
|
|
|
macos_setup?: IMdmMacOsSetup;
|
2024-02-13 18:03:53 +00:00
|
|
|
|
device_status: HostMdmDeviceStatus;
|
|
|
|
|
|
pending_action: HostMdmPendingAction;
|
2024-06-14 18:01:12 +00:00
|
|
|
|
connected_to_fleet?: boolean;
|
2021-12-27 23:57:15 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
Add host's next maintenance window to the `hosts/{id}` and `hosts/identifier/{identifier}` endpoints, and render that data on the host details page (#19820)
## Addresses full stack for #18554
- Add new `timezone` column to `calendar_events` table
- When fetched from Google's API, save calendar user's timezone in this
new column along with rest of event data
- Implement datastore method to retrieve the start time and timezone for
a host's next calendar event as a `HostMaintenanceWindow`
- Localize and add UTC offset to the `HostMaintenanceWindow`'s start
time according to its `timezone`
- Include the processed `HostMaintenanceWindow`, if present, in the
response to the `GET` `hosts/{id}` and `hosts/identifier/{identifier}`
endpoints
- Implement UI on the host details page to display this data
- Add new and update existing UI, core integration, datastore, and
`fleetctl` tests
- Update `date-fns` package to the latest version
<img width="1062" alt="Screenshot 2024-06-26 at 1 02 34 PM"
src="https://github.com/fleetdm/fleet/assets/61553566/c3ddad97-23da-42c1-b4ed-b7615ec88aed">
# Checklist for submitter
If some of the following don't apply, delete the relevant line.
<!-- Note that API documentation changes are now addressed by the
product design team. -->
- [x] Changes file added for user-visible changes in `changes/`
- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [x] Added/updated tests
- [x] If database migrations are included, checked table schema to
confirm autoupdate
- For database migrations:
- [x] Checked schema for all modified tables for columns that will
auto-update timestamps during migration.
- [x] Confirmed that updating the timestamps is acceptable, and will not
cause unwanted side effects.
- [x] Manual QA for all new/changed functionality
---------
Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2024-06-28 17:51:13 +00:00
|
|
|
|
export interface IHostMaintenanceWindow {
|
2024-07-25 22:31:04 +00:00
|
|
|
|
starts_at: string; // e.g. "2024-06-18T13:27:18−07:00"
|
|
|
|
|
|
timezone: string | null; // e.g. "America/Los_Angeles"
|
Add host's next maintenance window to the `hosts/{id}` and `hosts/identifier/{identifier}` endpoints, and render that data on the host details page (#19820)
## Addresses full stack for #18554
- Add new `timezone` column to `calendar_events` table
- When fetched from Google's API, save calendar user's timezone in this
new column along with rest of event data
- Implement datastore method to retrieve the start time and timezone for
a host's next calendar event as a `HostMaintenanceWindow`
- Localize and add UTC offset to the `HostMaintenanceWindow`'s start
time according to its `timezone`
- Include the processed `HostMaintenanceWindow`, if present, in the
response to the `GET` `hosts/{id}` and `hosts/identifier/{identifier}`
endpoints
- Implement UI on the host details page to display this data
- Add new and update existing UI, core integration, datastore, and
`fleetctl` tests
- Update `date-fns` package to the latest version
<img width="1062" alt="Screenshot 2024-06-26 at 1 02 34 PM"
src="https://github.com/fleetdm/fleet/assets/61553566/c3ddad97-23da-42c1-b4ed-b7615ec88aed">
# Checklist for submitter
If some of the following don't apply, delete the relevant line.
<!-- Note that API documentation changes are now addressed by the
product design team. -->
- [x] Changes file added for user-visible changes in `changes/`
- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [x] Added/updated tests
- [x] If database migrations are included, checked table schema to
confirm autoupdate
- For database migrations:
- [x] Checked schema for all modified tables for columns that will
auto-update timestamps during migration.
- [x] Confirmed that updating the timestamps is acceptable, and will not
cause unwanted side effects.
- [x] Manual QA for all new/changed functionality
---------
Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2024-06-28 17:51:13 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2022-09-02 22:05:07 +00:00
|
|
|
|
export interface IMunkiIssue {
|
|
|
|
|
|
id: number;
|
|
|
|
|
|
name: string;
|
|
|
|
|
|
type: "error" | "warning";
|
|
|
|
|
|
created_at: string;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-04-27 15:10:41 +00:00
|
|
|
|
interface IMacadminMDMData {
|
|
|
|
|
|
enrollment_status: MdmEnrollmentStatus | null;
|
|
|
|
|
|
name?: string;
|
|
|
|
|
|
server_url: string | null;
|
|
|
|
|
|
id?: number;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2021-12-27 23:57:15 +00:00
|
|
|
|
export interface IMacadminsResponse {
|
|
|
|
|
|
macadmins: null | {
|
|
|
|
|
|
munki: null | IMunkiData;
|
2023-04-27 15:10:41 +00:00
|
|
|
|
mobile_device_management: null | IMacadminMDMData;
|
2022-09-02 22:05:07 +00:00
|
|
|
|
munki_issues: IMunkiIssue[];
|
2021-12-27 23:57:15 +00:00
|
|
|
|
};
|
2021-09-28 21:05:25 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2021-11-12 19:43:29 +00:00
|
|
|
|
export interface IPackStats {
|
|
|
|
|
|
pack_id: number;
|
|
|
|
|
|
pack_name: string;
|
|
|
|
|
|
query_stats: IQueryStats[];
|
|
|
|
|
|
type: string;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-04-16 16:00:23 +00:00
|
|
|
|
export interface IPolicyHostResponse {
|
2021-12-09 16:38:51 +00:00
|
|
|
|
id: number;
|
2022-10-19 22:24:42 +00:00
|
|
|
|
display_name: string;
|
2022-04-13 16:08:37 +00:00
|
|
|
|
query_results?: unknown[];
|
2021-12-09 16:38:51 +00:00
|
|
|
|
status?: string;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2022-03-21 16:29:52 +00:00
|
|
|
|
interface IGeoLocation {
|
|
|
|
|
|
country_iso: string;
|
|
|
|
|
|
city_name: string;
|
|
|
|
|
|
geometry?: {
|
|
|
|
|
|
type: string;
|
|
|
|
|
|
coordinates: number[];
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2022-11-01 18:59:40 +00:00
|
|
|
|
interface IBattery {
|
|
|
|
|
|
cycle_count: number;
|
|
|
|
|
|
health: string;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2022-11-18 16:25:39 +00:00
|
|
|
|
export interface IHostResponse {
|
|
|
|
|
|
host: IHost;
|
|
|
|
|
|
}
|
2023-02-01 17:47:52 +00:00
|
|
|
|
|
2022-11-18 16:25:39 +00:00
|
|
|
|
export interface IDeviceUserResponse {
|
2023-05-23 18:01:04 +00:00
|
|
|
|
host: IHostDevice;
|
2022-11-18 16:25:39 +00:00
|
|
|
|
license: ILicense;
|
|
|
|
|
|
org_logo_url: string;
|
Update UI for software self-service features (#19244)
Issues https://github.com/fleetdm/fleet/issues/17587,
https://github.com/fleetdm/fleet/issues/18836,
https://github.com/fleetdm/fleet/issues/18837,
https://github.com/fleetdm/fleet/pull/18339, and
https://github.com/fleetdm/fleet/pull/18340
# TODOS
- Integrate backend
- Unit/integration tests
- Various todos noted in comments
- Cleanup styles and organization of components (de-duplicating and
consolidating where possible)
- Activity feed updates (if any)
# Checklist for submitter
If some of the following don't apply, delete the relevant line.
<!-- Note that API documentation changes are now addressed by the
product design team. -->
- [ ] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [ ] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [ ] Added support on fleet's osquery simulator `cmd/osquery-perf` for
new osquery data ingestion features.
- [ ] Added/updated tests
- [ ] If database migrations are included, checked table schema to
confirm autoupdate
- For database migrations:
- [ ] Checked schema for all modified table for columns that will
auto-update timestamps during migration.
- [ ] Confirmed that updating the timestamps is acceptable, and will not
cause unwanted side effects.
- [ ] Ensured the correct collation is explicitly set for character
columns (`COLLATE utf8mb4_unicode_ci`).
- [ ] Manual QA for all new/changed functionality
- For Orbit and Fleet Desktop changes:
- [ ] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.
- [ ] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md)).
---------
Co-authored-by: Gabriel Hernandez <ghernandez345@gmail.com>
2024-05-31 10:09:53 +00:00
|
|
|
|
org_contact_url: string;
|
2022-11-18 16:25:39 +00:00
|
|
|
|
disk_encryption_enabled?: boolean;
|
2024-07-25 20:33:36 +00:00
|
|
|
|
platform?: HostPlatform;
|
2023-02-01 17:47:52 +00:00
|
|
|
|
global_config: IDeviceGlobalConfig;
|
2024-07-02 16:32:49 +00:00
|
|
|
|
self_service: boolean;
|
2022-11-18 16:25:39 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2023-02-14 17:00:36 +00:00
|
|
|
|
export interface IHostEncrpytionKeyResponse {
|
|
|
|
|
|
host_id: number;
|
|
|
|
|
|
encryption_key: {
|
|
|
|
|
|
updated_at: string;
|
|
|
|
|
|
key: string;
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-03-13 19:09:16 +00:00
|
|
|
|
export interface IHostIssues {
|
|
|
|
|
|
total_issues_count: number;
|
2024-06-18 19:26:45 +00:00
|
|
|
|
critical_vulnerabilities_count?: number; // Premium
|
2024-03-13 19:09:16 +00:00
|
|
|
|
failing_policies_count: number;
|
|
|
|
|
|
}
|
2025-04-04 14:46:22 +00:00
|
|
|
|
export interface IHostEndUser {
|
2025-04-08 14:02:25 +00:00
|
|
|
|
idp_id?: string;
|
|
|
|
|
|
idp_username?: string;
|
|
|
|
|
|
idp_full_name?: string;
|
2025-04-04 14:46:22 +00:00
|
|
|
|
idp_info_updated_at: string | null;
|
2025-04-08 14:02:25 +00:00
|
|
|
|
idp_groups?: string[];
|
|
|
|
|
|
other_emails?: Array<{
|
2025-04-04 14:46:22 +00:00
|
|
|
|
email: string;
|
|
|
|
|
|
source: string;
|
|
|
|
|
|
}>;
|
|
|
|
|
|
}
|
2024-03-13 19:09:16 +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;
|
2024-06-12 13:38:57 +00:00
|
|
|
|
software_updated_at?: string;
|
2021-08-16 14:30:19 +00:00
|
|
|
|
id: number;
|
2021-03-03 16:51:39 +00:00
|
|
|
|
detail_updated_at: string;
|
2023-11-15 21:42:57 +00:00
|
|
|
|
last_restarted_at: string;
|
2021-08-16 14:30:19 +00:00
|
|
|
|
label_updated_at: string;
|
2022-11-01 18:59:40 +00:00
|
|
|
|
policy_updated_at: string;
|
2021-08-16 14:30:19 +00:00
|
|
|
|
last_enrolled_at: string;
|
|
|
|
|
|
seen_time: string;
|
|
|
|
|
|
refetch_requested: boolean;
|
2023-05-23 16:47:39 +00:00
|
|
|
|
refetch_critical_queries_until: string | null;
|
2021-03-03 16:51:39 +00:00
|
|
|
|
hostname: string;
|
2021-08-16 14:30:19 +00:00
|
|
|
|
uuid: string;
|
2024-07-25 20:33:36 +00:00
|
|
|
|
platform: HostPlatform;
|
2021-08-16 14:30:19 +00:00
|
|
|
|
osquery_version: string;
|
2024-04-11 20:28:42 +00:00
|
|
|
|
orbit_version: string | null;
|
|
|
|
|
|
fleet_desktop_version: string | null;
|
2021-08-16 14:30:19 +00:00
|
|
|
|
os_version: string;
|
|
|
|
|
|
build: string;
|
2023-10-06 22:04:33 +00:00
|
|
|
|
platform_like: string; // TODO: replace with more specific union type
|
2021-08-16 14:30:19 +00:00
|
|
|
|
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;
|
2022-11-01 18:59:40 +00:00
|
|
|
|
cpu_subtype: string;
|
2021-08-16 14:30:19 +00:00
|
|
|
|
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;
|
2022-03-21 16:29:52 +00:00
|
|
|
|
public_ip: string;
|
2021-08-16 14:30:19 +00:00
|
|
|
|
primary_ip: string;
|
|
|
|
|
|
primary_mac: string;
|
|
|
|
|
|
distributed_interval: number;
|
|
|
|
|
|
config_tls_refresh: number;
|
|
|
|
|
|
logger_tls_period: number;
|
2022-11-01 18:59:40 +00:00
|
|
|
|
team_id: number | null;
|
|
|
|
|
|
pack_stats: IPackStats[] | null;
|
|
|
|
|
|
team_name: string | null;
|
|
|
|
|
|
additional?: object; // eslint-disable-line @typescript-eslint/ban-types
|
2021-08-25 20:05:54 +00:00
|
|
|
|
percent_disk_space_available: number;
|
|
|
|
|
|
gigs_disk_space_available: number;
|
2021-08-16 14:30:19 +00:00
|
|
|
|
labels: ILabel[];
|
|
|
|
|
|
packs: IPack[];
|
2024-05-31 16:03:11 +00:00
|
|
|
|
software?: ISoftware[];
|
2024-03-13 19:09:16 +00:00
|
|
|
|
issues: IHostIssues;
|
2022-10-10 18:07:47 +00:00
|
|
|
|
status: HostStatus;
|
2021-08-16 14:30:19 +00:00
|
|
|
|
display_text: string;
|
2022-10-14 19:26:15 +00:00
|
|
|
|
display_name: string;
|
2022-01-06 03:41:52 +00:00
|
|
|
|
target_type?: string;
|
2024-04-12 13:10:19 +00:00
|
|
|
|
scripts_enabled: boolean | null;
|
2021-06-22 19:26:57 +00:00
|
|
|
|
users: IHostUser[];
|
2021-09-28 21:05:25 +00:00
|
|
|
|
device_users?: IDeviceUser[];
|
|
|
|
|
|
munki?: IMunkiData;
|
Add host's next maintenance window to the `hosts/{id}` and `hosts/identifier/{identifier}` endpoints, and render that data on the host details page (#19820)
## Addresses full stack for #18554
- Add new `timezone` column to `calendar_events` table
- When fetched from Google's API, save calendar user's timezone in this
new column along with rest of event data
- Implement datastore method to retrieve the start time and timezone for
a host's next calendar event as a `HostMaintenanceWindow`
- Localize and add UTC offset to the `HostMaintenanceWindow`'s start
time according to its `timezone`
- Include the processed `HostMaintenanceWindow`, if present, in the
response to the `GET` `hosts/{id}` and `hosts/identifier/{identifier}`
endpoints
- Implement UI on the host details page to display this data
- Add new and update existing UI, core integration, datastore, and
`fleetctl` tests
- Update `date-fns` package to the latest version
<img width="1062" alt="Screenshot 2024-06-26 at 1 02 34 PM"
src="https://github.com/fleetdm/fleet/assets/61553566/c3ddad97-23da-42c1-b4ed-b7615ec88aed">
# Checklist for submitter
If some of the following don't apply, delete the relevant line.
<!-- Note that API documentation changes are now addressed by the
product design team. -->
- [x] Changes file added for user-visible changes in `changes/`
- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [x] Added/updated tests
- [x] If database migrations are included, checked table schema to
confirm autoupdate
- For database migrations:
- [x] Checked schema for all modified tables for columns that will
auto-update timestamps during migration.
- [x] Confirmed that updating the timestamps is acceptable, and will not
cause unwanted side effects.
- [x] Manual QA for all new/changed functionality
---------
Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2024-06-28 17:51:13 +00:00
|
|
|
|
maintenance_window?: IHostMaintenanceWindow;
|
UI: 9274 unenroll mdm modal (#9539)
# Addresses #9274
https://www.loom.com/share/2edd946cbd424af2b960801cc505ac85
## Button and permissions:
- no permission, enrolled, online: <img width="1131" alt="no permission,
enrolled, online"
src="https://user-images.githubusercontent.com/61553566/215197330-abc1606d-bf0a-44ec-b2de-2ef687bd529b.png">
- permission, enrolled, online: <img width="1131" alt="permission,
enrolled, online"
src="https://user-images.githubusercontent.com/61553566/215197443-a1353b9b-10dd-408b-8295-56029f2df4c3.png">
- permission, enrolled, offline: <img width="1131" alt="permission,
enrolled, offline"
src="https://user-images.githubusercontent.com/61553566/215197544-b2a997a7-09e5-4f8a-b723-af587b61a90d.png">
- not enrolled: <img width="1131" alt="not enrolled"
src="https://user-images.githubusercontent.com/61553566/215197630-87f99cb3-63a9-45ce-bc85-57a45d54cae0.png">
## Modal
- <img width="672" alt="modal"
src="https://user-images.githubusercontent.com/61553566/215214640-96670a23-d927-4213-a8fa-89411279c075.png">
- <img width="672" alt="Screenshot 2023-01-27 at 2 12 42 PM"
src="https://user-images.githubusercontent.com/61553566/215215098-40d29556-3b73-4f52-a4ae-cc8b09122f5d.png">
- <img width="672" alt="Screenshot 2023-01-27 at 2 17 48 PM"
src="https://user-images.githubusercontent.com/61553566/215216304-b9362b13-f37f-4454-81b5-423f6fc72280.png">
- <img width="787" alt="success-shot"
src="https://user-images.githubusercontent.com/61553566/215236373-be7b1970-662d-47e6-ac59-f51eff344fcd.png">
# Checklist for submitter
If some of the following don't apply, delete the relevant line.
- [x] Changes file added for user-visible changes in `changes/`
- [x] Updated test inventory
- [x] Manual QA for all new/changed functionality
---------
Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2023-01-30 23:59:02 +00:00
|
|
|
|
mdm: IHostMdmData;
|
2021-10-18 18:29:48 +00:00
|
|
|
|
policies: IHostPolicy[];
|
2022-04-13 16:08:37 +00:00
|
|
|
|
query_results?: unknown[];
|
2022-03-21 16:29:52 +00:00
|
|
|
|
geolocation?: IGeoLocation;
|
2022-11-01 18:59:40 +00:00
|
|
|
|
batteries?: IBattery[];
|
2022-11-07 21:51:03 +00:00
|
|
|
|
disk_encryption_enabled?: boolean;
|
2024-03-13 19:09:16 +00:00
|
|
|
|
device_mapping: IDeviceUser[] | null;
|
2025-04-08 14:02:25 +00:00
|
|
|
|
end_users?: IHostEndUser[];
|
2021-03-03 16:51:39 +00:00
|
|
|
|
}
|
2023-05-23 18:01:04 +00:00
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
* IHostDevice is an extension of IHost that is returned by the /devices endpoint. It includes the
|
|
|
|
|
|
* dep_assigned_to_fleet field, which is not returned by the /hosts endpoint.
|
|
|
|
|
|
*/
|
|
|
|
|
|
export interface IHostDevice extends IHost {
|
|
|
|
|
|
dep_assigned_to_fleet: boolean;
|
|
|
|
|
|
}
|