Commit Graph

188 Commits

Author SHA1 Message Date
dependabot[bot] a422d7ce5e chore(deps): bump @testing-library/react from 11.2.6 to 12.1.3
Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 11.2.6 to 12.1.3.
- [Release notes](https://github.com/testing-library/react-testing-library/releases)
- [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/react-testing-library/compare/v11.2.6...v12.1.3)

---
updated-dependencies:
- dependency-name: "@testing-library/react"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-10 14:07:33 +01:00
github-actions[bot] b6d947b67f Version Packages 2022-03-10 11:30:23 +00:00
github-actions[bot] 1693f2dc74 Version Packages (next) 2022-03-09 16:09:04 +00:00
Patrik Oldsberg 09b37063f2 packages,plugins: migrate to new lint config
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2022-03-07 14:53:43 +01:00
github-actions[bot] 3c8bb2854d Version Packages 2022-03-03 15:23:53 +00:00
github-actions[bot] c9da151d84 Version Packages 2022-02-24 13:54:37 +00:00
Mike Ball 43c779a38b improve EntitySplunkOnCallCard props
* export the props
* rename the props to match component,
* unpack the props inside the function
* mark both with `/** public */`

...per code review feedback here:
https://github.com/backstage/backstage/pull/9635#discussion_r813155577

Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-23 15:46:29 -05:00
Mike Ball 2a7b83c8aa simplify component rendering logic
Per feedback here:
https://github.com/backstage/backstage/pull/9635#discussion_r813156878

Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-23 15:27:59 -05:00
Mike Ball 7b45dd6f92 restore accidentally-committed change
This restores `eventsRestEndpoint` to its proper state.

Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-23 15:23:09 -05:00
Mike Ball 59864eaebe update splunk-on-call API report
Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-22 12:39:32 -05:00
Mike Ball 262a2a2d51 configure readOnly via simple component prop
This eliminates the use of YAML configuration and instead
relies on a simple property to enable `readOnly` mode, per code review feedback.

Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-22 12:05:10 -05:00
Mike Ball 9a33293425 address lint errors
Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-17 17:07:44 -05:00
Mike Ball f7ebb1b5da improve README language
Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-17 17:07:26 -05:00
Mike Ball 40dddac068 add 'read only' mode README documentation
Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-17 16:52:05 -05:00
Mike Ball 15884c25f6 enable 'read only' mode Splunk OnCall option
This exposes a `splunkOnCall.readOnly` configuration
option to address issue #9634

Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-17 16:31:47 -05:00
github-actions[bot] 408b0300cb Version Packages 2022-02-17 10:38:59 +00:00
Patrik Oldsberg 9892d74326 cli: renamed script commands to package
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2022-02-15 21:27:12 +01:00
Patrik Oldsberg 8f82d80adf migrate all package scripts
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2022-02-14 21:50:07 +01:00
Patrik Oldsberg bb5fcc3209 update all plugin package roles
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2022-02-14 21:50:05 +01:00
Patrik Oldsberg b521c1b83b detect all package roles
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2022-02-14 21:50:03 +01:00
Fredrik Adelöw 1ed305728b bump node-fetch and cross-fetch
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2022-02-10 15:51:50 +01:00
github-actions[bot] e4791789d1 Version Packages 2022-02-10 11:06:33 +00:00
Ben Lambert e34d4ce277 Merge pull request #9362 from mdb/mdb/new-splunk-on-call-annotation
[Plugin] Splunk On-Call plugin support for 'splunk.com/on-call-routing-key' annotation
2022-02-09 14:00:03 +01:00
github-actions[bot] e74f416a00 Version Packages (next) 2022-02-08 19:38:17 +00:00
Mike Ball 9552df7653 test reflects occurrence of single 'Missing Annotation'
Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-07 15:59:32 -05:00
Mike Ball 04365cd213 display only 1 <MissingAnnotationEmptyState />
Per code review feedback, it's arguably unnecessary
to display duplicate `<MissingAnnotationEmptyState />`,
especially given the preceding contextual sentence
noting the supported annotations.

Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-07 15:59:32 -05:00
Mike Ball 1514d8a313 Update plugins/splunk-on-call/src/components/EntitySplunkOnCallCard.tsx
Co-authored-by: Johan Haals <johan.haals@gmail.com>
Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-07 15:59:27 -05:00
Mike Ball da9d1723f6 invalid annotation logic better reflects component logic
The EntitySplunkOnCallCard gives precedence to a `splunk.com/on-call-team`
annotation. Therefore, the InvalidAnnotation component messaging
should reflect that precedence, even in instances where _both_ supported
annotations are provided and both are deemed invalid.

Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-07 15:56:09 -05:00
Mike Ball a957b9fc4d fine-tune Splunk On-Call README language
Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-07 15:56:09 -05:00
Mike Ball 4ddc657bd3 add Splunk client getRoutingKeys method documentation
Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-07 15:56:09 -05:00
Mike Ball 12182960f4 address TypeScript compilation failure
This fixes...

```
Run yarn tsc
yarn run v1.22.1
$ tsc
plugins/splunk-on-call/src/components/EntitySplunkOnCallCard.test.tsx:158:26 - error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'Matcher'.
  Type 'undefined' is not assignable to type 'Matcher'.

158         expect(getByText(MOCK_INCIDENT.entityDisplayName)).toBeInTheDocument(),
                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-07 15:56:09 -05:00
Mike Ball ba1a3e9456 add splunk.com/on-call-routing-key docs to README
Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-07 15:56:09 -05:00
Mike Ball 5669e32ac1 test component rendering w/ new annotation
Test that the Splunk On Call component properly
renders when a `splunk.com/on-call-routing-key`
annotation is used.

Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-07 15:56:09 -05:00
Mike Ball 07ffc7ca9d test when no Splunk On Call annotations are provided
Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-07 15:56:09 -05:00
Mike Ball 4bda7d3045 test warning for incorrect routing key annotation
This adds a test asserting that the correct component
is rendered when the entity `splunk.com/on-call-routing-key`
does not properly map to any associated teams.

Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-07 15:56:08 -05:00
Mike Ball 7fa7857d48 correct incorrect team annotation test
Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-07 15:56:08 -05:00
Mike Ball f408cabe8f handle invalid Splunk On-Call annotations
If a `splunk.com/on-call-team` annotation is provided and
the API returns no associated team, render...

```
Splunk On-Call API returned no record of teams associated with the "foo" team name
Escalation Policy and incident information unavailable. Splunk On-Call requires a valid team name or routing key.
```

If a `splunk.com/on-call-routing-key` annotation is provided and
the API returns no associated team, render...

```
Splunk On-Call API returned no record of teams associated with the "foo" routing key
Escalation Policy and incident information unavailable. Splunk On-Call requires a valid team name or routing key.
```

Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-07 15:56:08 -05:00
Mike Ball 52bb1807db properly render <Missing* /> components
Corrects logic ensuring `<MissingAnnotation />` and `<MissingEventsRestEndpoint />`
render correctly. Previously, neither component would render from
within the `<Content />` component.

Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-07 15:56:08 -05:00
Mike Ball 0dfbb30a5d add 1em spacing between each Splunk On-Call card
Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-07 15:56:08 -05:00
Mike Ball 4c61bc0cfa render Splunk On-Call card per team
In instances where a `splunk.com/on-call-routing-key`
is provided and that routing key is associated with
multiple teams, the component now renders an individual
Splunk On-Call card for each team.

Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-07 15:56:08 -05:00
Mike Ball 70903de879 [wip] support 'splunk.com/on-call-routing-key' annotation
Extends the Splunk On Call plugin Entity card to infer the
corresponding team names from a `splunk.com/on-call-routing-key`
annotation.

This seeks to enable the use of the Splunk On Call plugin on
entity pages for those orgs who associate a component with a
routing key rather than a team name.

Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-07 15:56:08 -05:00
Mike Ball 63e0e3a70d correct spelling of 'Acknowledge' in tooltip
Correct the spelling of 'Acknowledge' in the
Splunk On Call plugin tooltip title.

Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-03 08:36:26 -05:00
github-actions[bot] a12bb7b065 Version Packages 2022-02-03 09:42:25 +00:00
github-actions[bot] 51eecb3f03 Version Packages (next) 2022-02-02 14:28:47 +00:00
github-actions[bot] e1580cf73a Version Packages (next) 2022-02-01 08:53:29 +00:00
github-actions[bot] 406848efee Version Packages 2022-01-27 11:07:27 +00:00
github-actions[bot] 8b18d054f3 Version Packages 2022-01-20 10:33:31 +00:00
github-actions[bot] a94a2b8b3f Version Packages (next) 2022-01-18 13:49:07 +00:00
Fredrik Adelöw 013301e07b remove node-fetch from frontend packages
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2022-01-18 09:41:01 +01:00
Patrik Oldsberg 51fbedc445 plugins: migrate usage of deprecated IdentityApi methods
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2022-01-13 19:51:30 +01:00