From ae903f8e718d89cdff5538bf2d5c93ec7c59c360 Mon Sep 17 00:00:00 2001 From: Tavis Aitken Date: Tue, 27 Apr 2021 11:01:56 -0600 Subject: [PATCH 1/2] Added config schema to the Splunk On Call plugin. Signed-off-by: Tavis Aitken --- .changeset/fresh-vans-nail.md | 5 +++++ plugins/splunk-on-call/package.json | 6 ++++-- plugins/splunk-on-call/schema.d.ts | 26 ++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 .changeset/fresh-vans-nail.md create mode 100644 plugins/splunk-on-call/schema.d.ts diff --git a/.changeset/fresh-vans-nail.md b/.changeset/fresh-vans-nail.md new file mode 100644 index 0000000000..64af4ee60b --- /dev/null +++ b/.changeset/fresh-vans-nail.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-splunk-on-call': patch +--- + +Added config schema to expose `splunkOnCall.eventsRestEndpoint` config option to the frontend diff --git a/plugins/splunk-on-call/package.json b/plugins/splunk-on-call/package.json index 9e93004bf5..b033b41e75 100644 --- a/plugins/splunk-on-call/package.json +++ b/plugins/splunk-on-call/package.json @@ -59,6 +59,8 @@ "node-fetch": "^2.6.1" }, "files": [ - "dist" - ] + "dist", + "schema.d.ts" + ], + "configSchema": "schema.d.ts" } diff --git a/plugins/splunk-on-call/schema.d.ts b/plugins/splunk-on-call/schema.d.ts new file mode 100644 index 0000000000..b14f2ef110 --- /dev/null +++ b/plugins/splunk-on-call/schema.d.ts @@ -0,0 +1,26 @@ +/* + * Copyright 2021 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +export interface Config { + /** + * Splunk On Call Plugin specific configs + */ + splunkOnCall: { + /** + * @visibility frontend + */ + eventsRestEndpoint: string; + }; +} From 7883cef882d80a8bfaa6978be912779ec1459bb5 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Tue, 15 Jun 2021 14:59:29 +0200 Subject: [PATCH 2/2] splunk-on-call: tweak config schema Signed-off-by: Patrik Oldsberg --- plugins/splunk-on-call/{schema.d.ts => config.d.ts} | 4 ++-- plugins/splunk-on-call/package.json | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) rename plugins/splunk-on-call/{schema.d.ts => config.d.ts} (93%) diff --git a/plugins/splunk-on-call/schema.d.ts b/plugins/splunk-on-call/config.d.ts similarity index 93% rename from plugins/splunk-on-call/schema.d.ts rename to plugins/splunk-on-call/config.d.ts index b14f2ef110..f2c0508f76 100644 --- a/plugins/splunk-on-call/schema.d.ts +++ b/plugins/splunk-on-call/config.d.ts @@ -17,10 +17,10 @@ export interface Config { /** * Splunk On Call Plugin specific configs */ - splunkOnCall: { + splunkOnCall?: { /** * @visibility frontend */ - eventsRestEndpoint: string; + eventsRestEndpoint?: string; }; } diff --git a/plugins/splunk-on-call/package.json b/plugins/splunk-on-call/package.json index b033b41e75..d53c3c525c 100644 --- a/plugins/splunk-on-call/package.json +++ b/plugins/splunk-on-call/package.json @@ -58,9 +58,9 @@ "msw": "^0.21.2", "node-fetch": "^2.6.1" }, + "configSchema": "config.d.ts", "files": [ "dist", - "schema.d.ts" - ], - "configSchema": "schema.d.ts" + "config.d.ts" + ] }