fleet/cmd/fleetctl/testdata/expectedHostDetailResponseYaml.yml
Lucas Manuel Rodriguez 964f85b174
Amend policy creation and spec (for proprietary query), and add update APIs (#2890)
* Amend policy creation (proprietary query), add update APIs

* Fix Datastore.SavePolicy bug (and add tests)

* Add integration tests for new policy APIs

* Add author email

* Add activities

* Push breaking changes for return policy fields

* WIP

* Add integration test for host policies

* Make more improvements to policy representation

* Improve upgrade code (from PR review comments)

* PR changes

* Revert activities for policies

* Use *uint instead of uint for queryID, use fleet.PolicyPayload

* Filter out other schemas

* New policy flow (#2922)

* created new policy flow -- no API connection

* added api props

* fixed prop name

* lint fixes

* removed unused modal; fixed style

* name, desc icons; created global components

* lint fixes

* ignoring certain files and lines for prettier

* Update frontend/pages/policies/PolicyPage/PolicyPage.tsx

* Make policy names unique across deployment

* Amend upgrade script

* Fix migration for unique names

* Do not deduplicate but instead rename policies

Co-authored-by: Martavis Parker <47053705+martavis@users.noreply.github.com>
2021-11-24 14:16:42 -03:00

73 lines
1.7 KiB
YAML

apiVersion: v1
kind: host
spec:
build: ""
code_name: ""
computer_name: test_host
config_tls_refresh: 0
cpu_brand: ""
cpu_logical_cores: 0
cpu_physical_cores: 0
cpu_subtype: ""
cpu_type: ""
created_at: "0001-01-01T00:00:00Z"
detail_updated_at: "0001-01-01T00:00:00Z"
display_text: test_host
distributed_interval: 0
gigs_disk_space_available: 0
hardware_model: ""
hardware_serial: ""
hardware_vendor: ""
hardware_version: ""
hostname: test_host
id: 0
issues:
failing_policies_count: 0
total_issues_count: 0
label_updated_at: "0001-01-01T00:00:00Z"
labels: []
last_enrolled_at: "0001-01-01T00:00:00Z"
logger_tls_period: 0
memory: 0
os_version: ""
osquery_version: ""
pack_stats: null
packs: []
percent_disk_space_available: 0
platform: ""
platform_like: ""
policies:
- author_email: "alice@example.com"
author_id: 1
author_name: Alice
id: 1
description: "Some description"
name: query1
query: select 1 from osquery_info where start_time > 1;
resolution: "Some resolution"
response: passes
team_id: 1
created_at: "0001-01-01T00:00:00Z"
updated_at: "0001-01-01T00:00:00Z"
- author_email: "alice@example.com"
author_id: 1
author_name: Alice
id: 2
description: ""
name: query2
query: select 1 from osquery_info where start_time > 1;
response: fails
team_id: null
created_at: "0001-01-01T00:00:00Z"
updated_at: "0001-01-01T00:00:00Z"
policy_updated_at: "0001-01-01T00:00:00Z"
primary_ip: ""
primary_mac: ""
refetch_requested: false
seen_time: "0001-01-01T00:00:00Z"
status: mia
team_id: null
team_name: null
updated_at: "0001-01-01T00:00:00Z"
uptime: 0
uuid: ""