Merge branch 'master' into techdocs/remove-warnings
Signed-off-by: Morgan Bentell <morgan.bentell@gmail.com>
This commit is contained in:
@@ -1,5 +1,40 @@
|
||||
# @backstage/plugin-splunk-on-call
|
||||
|
||||
## 0.4.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 65454876fb2: Minor API report tweaks
|
||||
- 52b0022dab7: Updated dependency `msw` to `^1.0.0`.
|
||||
- Updated dependencies
|
||||
- @backstage/core-components@0.12.5
|
||||
- @backstage/plugin-catalog-react@1.4.0
|
||||
- @backstage/core-plugin-api@1.5.0
|
||||
- @backstage/catalog-model@1.2.1
|
||||
- @backstage/theme@0.2.18
|
||||
|
||||
## 0.4.5-next.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 65454876fb2: Minor API report tweaks
|
||||
- Updated dependencies
|
||||
- @backstage/core-components@0.12.5-next.2
|
||||
- @backstage/plugin-catalog-react@1.4.0-next.2
|
||||
- @backstage/core-plugin-api@1.5.0-next.2
|
||||
|
||||
## 0.4.5-next.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 52b0022dab7: Updated dependency `msw` to `^1.0.0`.
|
||||
- Updated dependencies
|
||||
- @backstage/core-components@0.12.5-next.1
|
||||
- @backstage/core-plugin-api@1.4.1-next.1
|
||||
- @backstage/theme@0.2.18-next.0
|
||||
- @backstage/plugin-catalog-react@1.4.0-next.1
|
||||
- @backstage/catalog-model@1.2.1-next.1
|
||||
|
||||
## 0.4.5-next.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -214,19 +214,12 @@ export class SplunkOnCallClient implements SplunkOnCallApi {
|
||||
// (undocumented)
|
||||
getUsers(): Promise<User[]>;
|
||||
// (undocumented)
|
||||
incidentAction({
|
||||
routingKey,
|
||||
incidentType,
|
||||
incidentId,
|
||||
incidentDisplayName,
|
||||
incidentMessage,
|
||||
incidentStartTime,
|
||||
}: TriggerAlarmRequest): Promise<Response>;
|
||||
incidentAction(options: TriggerAlarmRequest): Promise<Response>;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export const SplunkOnCallPage: {
|
||||
({ title, subtitle, pageTitle }: SplunkOnCallPageProps): JSX.Element;
|
||||
(props: SplunkOnCallPageProps): JSX.Element;
|
||||
defaultProps: {
|
||||
title: string;
|
||||
subtitle: string;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/plugin-splunk-on-call",
|
||||
"description": "A Backstage plugin that integrates towards Splunk On-Call",
|
||||
"version": "0.4.5-next.0",
|
||||
"version": "0.4.5",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -114,14 +114,16 @@ export class SplunkOnCallClient implements SplunkOnCallApi {
|
||||
return policies;
|
||||
}
|
||||
|
||||
async incidentAction({
|
||||
routingKey,
|
||||
incidentType,
|
||||
incidentId,
|
||||
incidentDisplayName,
|
||||
incidentMessage,
|
||||
incidentStartTime,
|
||||
}: TriggerAlarmRequest): Promise<Response> {
|
||||
async incidentAction(options: TriggerAlarmRequest): Promise<Response> {
|
||||
const {
|
||||
routingKey,
|
||||
incidentType,
|
||||
incidentId,
|
||||
incidentDisplayName,
|
||||
incidentMessage,
|
||||
incidentStartTime,
|
||||
} = options;
|
||||
|
||||
const body = JSON.stringify({
|
||||
message_type: incidentType,
|
||||
...(incidentId ? { entity_id: incidentId } : {}),
|
||||
@@ -132,7 +134,7 @@ export class SplunkOnCallClient implements SplunkOnCallApi {
|
||||
...(incidentStartTime ? { state_start_time: incidentStartTime } : {}),
|
||||
});
|
||||
|
||||
const options = {
|
||||
const request = {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
@@ -143,7 +145,7 @@ export class SplunkOnCallClient implements SplunkOnCallApi {
|
||||
|
||||
const url = `${this.config.eventsRestEndpoint}/${routingKey}`;
|
||||
|
||||
return this.request(url, options);
|
||||
return this.request(url, request);
|
||||
}
|
||||
|
||||
private async findByUrl<T>(url: string): Promise<T> {
|
||||
|
||||
@@ -38,11 +38,8 @@ export type SplunkOnCallPageProps = {
|
||||
pageTitle?: string;
|
||||
};
|
||||
|
||||
export const SplunkOnCallPage = ({
|
||||
title,
|
||||
subtitle,
|
||||
pageTitle,
|
||||
}: SplunkOnCallPageProps): JSX.Element => {
|
||||
export const SplunkOnCallPage = (props: SplunkOnCallPageProps): JSX.Element => {
|
||||
const { title, subtitle, pageTitle } = props;
|
||||
const classes = useStyles();
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user