Skip to content

Commit

Permalink
[Fleet] Add owner type to search response (#1115)
Browse files Browse the repository at this point in the history
  • Loading branch information
nchaulet authored Nov 16, 2023
1 parent d633cc4 commit 34d56b3
Show file tree
Hide file tree
Showing 20 changed files with 24 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- Add package and datastream agent privileges in the package endpoint [#1109](https://github.com/elastic/package-registry/pull/1109)
- Add owner.type to the package endpoint [#1109](https://github.com/elastic/package-registry/pull/1115)

### Deprecated

Expand Down
1 change: 1 addition & 0 deletions packages/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ type Version struct {
}

type Owner struct {
Type string `config:"type,omitempty" json:"type,omitempty"`
Github string `config:"github,omitempty" json:"github,omitempty"`
}

Expand Down
1 change: 1 addition & 0 deletions packages/testdata/marshaler/packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -1945,6 +1945,7 @@
}
},
"owner": {
"type": "elastic",
"github": "ruflin"
},
"categories": [
Expand Down
1 change: 1 addition & 0 deletions testdata/generated/package/reference/1.0.0/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
}
},
"owner": {
"type": "elastic",
"github": "ruflin"
},
"categories": [
Expand Down
1 change: 1 addition & 0 deletions testdata/generated/search-all-proxy.json
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,7 @@
}
},
"owner": {
"type": "elastic",
"github": "ruflin"
},
"categories": [
Expand Down
1 change: 1 addition & 0 deletions testdata/generated/search-all.json
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,7 @@
}
},
"owner": {
"type": "elastic",
"github": "ruflin"
},
"categories": [
Expand Down
1 change: 1 addition & 0 deletions testdata/generated/search-category-custom.json
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@
}
},
"owner": {
"type": "elastic",
"github": "ruflin"
},
"categories": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
}
},
"owner": {
"type": "elastic",
"github": "ruflin"
},
"categories": [
Expand Down
1 change: 1 addition & 0 deletions testdata/generated/search-category-web-all.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
}
},
"owner": {
"type": "elastic",
"github": "ruflin"
},
"categories": [
Expand Down
1 change: 1 addition & 0 deletions testdata/generated/search-category-web.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
}
},
"owner": {
"type": "elastic",
"github": "ruflin"
},
"categories": [
Expand Down
1 change: 1 addition & 0 deletions testdata/generated/search-just-latest-proxy.json
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@
}
},
"owner": {
"type": "elastic",
"github": "ruflin"
},
"categories": [
Expand Down
1 change: 1 addition & 0 deletions testdata/generated/search-kibana721.json
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@
}
},
"owner": {
"type": "elastic",
"github": "ruflin"
},
"categories": [
Expand Down
1 change: 1 addition & 0 deletions testdata/generated/search-package-experimental.json
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,7 @@
}
},
"owner": {
"type": "elastic",
"github": "ruflin"
},
"categories": [
Expand Down
1 change: 1 addition & 0 deletions testdata/generated/search-package-internal.json
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@
}
},
"owner": {
"type": "elastic",
"github": "ruflin"
},
"categories": [
Expand Down
1 change: 1 addition & 0 deletions testdata/generated/search-package-prerelease.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@
}
},
"owner": {
"type": "elastic",
"github": "ruflin"
},
"categories": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,7 @@
}
},
"owner": {
"type": "elastic",
"github": "ruflin"
},
"categories": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,7 @@
}
},
"owner": {
"type": "elastic",
"github": "ruflin"
},
"categories": [
Expand Down
1 change: 1 addition & 0 deletions testdata/generated/search-spec-max-2.10.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,7 @@
}
},
"owner": {
"type": "elastic",
"github": "ruflin"
},
"categories": [
Expand Down
1 change: 1 addition & 0 deletions testdata/generated/search.json
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@
}
},
"owner": {
"type": "elastic",
"github": "ruflin"
},
"categories": [
Expand Down
13 changes: 5 additions & 8 deletions testdata/package/reference/1.0.0/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ type: integration
# Details about the owner of the package. Current only github link is supported.
# A package can only have a single owner, the owner can be a user or a team.
owner:
type: elastic
github: "ruflin"

conditions:
Expand Down Expand Up @@ -68,8 +69,7 @@ screenshots:
# Icons options are commented out as currently not icons added
# It is expected that icons are in svg, but other formats are supported.
icons:
-
# src is a required field
- # src is a required field
src: "/img/icon.svg"
# This helps to send the right header
type: "image/svg+xml"
Expand All @@ -79,16 +79,14 @@ icons:
# Defining a datasource allows the UI to generate a form for each input and generate the agent
# config out of it. For a visual guide on what fields is used how in the UI, check out https://github.com/elastic/package-registry/pull/242
policy_templates:
-
# Do we need a name for the data source?
- # Do we need a name for the data source?
name: nginx
title: Nginx logs and metrics.
description: Collecting logs and metrics from nginx.

# List of inputs this datasource supports
inputs:
-
# An id can be given, in case the type used here is not unique
- # An id can be given, in case the type used here is not unique
# This is for selection in the stream
# id: nginx

Expand All @@ -109,8 +107,7 @@ policy_templates:
title: Hosts

description: List of nginx hosts to collect data from.
default:
["http://127.0.0.1"]
default: ["http://127.0.0.1"]
# All the config options that are required should be shown in the UI
required: true
multi: true
Expand Down

0 comments on commit 34d56b3

Please sign in to comment.