-
Notifications
You must be signed in to change notification settings - Fork 90
Expand configuration_links to support internal/external links #844
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
1e3c65b
54ff32b
0326728
e258a24
678fa4b
d1ee4b1
f5cc7b1
fa99813
e941595
ae17e94
e4a8259
6112482
cf1cb93
12d648c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -79,10 +79,22 @@ policy_templates: | |
| organization: security | ||
| division: engineering | ||
| team: cloud-security | ||
| # bad format: missing fields | ||
| configuration_links: | ||
| # bad format: missing field url | ||
| - title: Security overview | ||
| type: next_step | ||
| internal: true | ||
| # bad format: missing field `internal` | ||
| - title: View Agents | ||
| url: "/agents" | ||
| type: next_step | ||
| content: "Check your agents in Fleet" | ||
| appId: "fleet" | ||
| # bad format: `internal: false` should match http or https format | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure how to enforce this rule. I found the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you would need to use
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it can be used I've tried to set these conditions in the manifest definition: $ git diff
diff --git spec/integration/manifest.spec.yml spec/integration/manifest.spec.yml
index cf39a4f..bd79026 100644
--- spec/integration/manifest.spec.yml
+++ spec/integration/manifest.spec.yml
@@ -235,6 +235,30 @@ spec:
description: Set to true for internal kibana links, false for external links. Defaults to false.
type: boolean
default: false
+ allOf:
+ - if:
+ properties:
+ internal:
+ const: true
+ then:
+ required:
+ - appId
+ properties:
+ url:
+ type: string
+ pattern: '^/'
+ - if:
+ properties:
+ internal:
+ const: false
+ then:
+ not:
+ required:
+ - appId
+ properties:
+ url:
+ type: string
+ pattern: '^http(s)?://'
required:
- title
- urlAdding those definitions there are some errors, that probably are legit. These conditions enforce:
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, I'm switching to use format |
||
| - title: View Agents | ||
| url: "/agents" | ||
| type: next_step | ||
| internal: false | ||
| inputs: | ||
| - type: apache/metrics | ||
| title: Collect metrics in agentless | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,10 +40,22 @@ policy_templates: | |
| division: observability | ||
| team: obs-infraobs-integrations | ||
| configuration_links: | ||
| - title: Security overview | ||
| url: "/security/overview" | ||
| - title: View Agents | ||
| url: "/agents" | ||
| type: next_step | ||
| content: "View security overview" | ||
| content: "Check your agents in Fleet" | ||
| appId: "fleet" | ||
| internal: true | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of adding the
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I couldn't find any examples in package-spec, but maybe you refer to the Kibana dev tools? We could use this format, it requires to do some more manipulation in kibana as the url needs to be split (it cannot be used directly by kibana this way) and it's also less explicit. However, reading your other comments I understand your concerns that this could be a bit too specific to Kibana internal way of handling urls.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated the PR and the description based on this discussion.
criamico marked this conversation as resolved.
Outdated
|
||
| - title: Elastic website | ||
| url: "https://www.elastic.co/" | ||
| type: action | ||
| content: "See more" | ||
| internal: false | ||
| - title: Configure fleet | ||
| url: "https://www.elastic.co/guide/en/fleet/master/fleet-overview.html" | ||
| type: next_step | ||
| content: "See docs" | ||
| internal: false | ||
| inputs: | ||
| - type: apache/metrics | ||
| title: Collect metrics from Apache instances | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.