-
Notifications
You must be signed in to change notification settings - Fork 5
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
The template parameter example isn't working #12
Comments
I have found out what I was missing to get the documented template to work: create the file import { createRouter } from '@pagerduty/backstage-plugin-backend';
import { Router } from 'express';
import { PluginEnvironment } from '../types';
export default async function createPlugin(
env: PluginEnvironment,
): Promise<Router> {
return await createRouter({
logger: env.logger,
config: env.config,
});
} And then add to // In packages/backend/src/index.ts
import pagerduty from './plugins/pagerduty';
// ...
async function main() {
// ...
const pagerdutyEnv = useHotMemoize(module, () => createEnv('pagerduty'));
// ...
apiRouter.use('/pagerduty', await todo(pagerdutyEnv)); I'd recommend updating the instructions to setup the backend. |
Hello @crivetechie! Adding it immediately and will tag you here if you want to review it before I close this issue. |
@crivetechie the documentation has been updated 👉🏼 https://pagerduty.github.io/backstage-plugin-docs/getting-started/backstage/#add-the-backend-plugin-to-your-application Let me know if that looks good to you and I'll close the ticket. Feel free to suggest any additional changes. |
@t1agob docs look great, thank you! |
Describe the bug
The example provided in https://pagerduty.github.io/backstage-plugin-docs/advanced/create-service-software-template/ doesn't work even after having followed the provided instructions to setup the plugin: the
escalation_policy_id
displays an error.When using the suggested configuration
The software template invokes the endpoint
<backstagehost>/pagerduty/escalation_policies
which returns a404
and therefore prevent the field from rendering the escalation policies.I tried to update the configuration to use the proxy path instead and the policies gets listed but it requires setting
arraySelector
option and changinglabelSelector
andvalueSelector
, working config:The pagerduty configuration in app-config for Backstage is as follow:
The text was updated successfully, but these errors were encountered: