npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@axis-backstage-staging/plugin-statuspage

v0.3.6

Published

Welcome to the Statuspage.io plugin!

Downloads

21

Readme

Statuspage.io plugin

Welcome to the Statuspage.io plugin!

Introduction

The Statuspage plugin allows you to embedd https://statuspage.io components, component groups and dashboards in Backstage.

There is a React-card, <StatuspageEntityCard />, that is suitable for the Entity component/service overview page:

entity-card

And also one card, <StatuspagePage name="myinstance"/>, for easy integration of a complete Statuspage. This component is not dependent on the useEntity()-hook, making it easy to integrate on the Home-page (or some other portal).

full-status

Note

You will need to also perform the installation instructions in Statuspage Backend in order for this plugin to work.

Getting Started

  1. First, install the plugin into your app:
# From your Backstage root directory
yarn --cwd packages/app add @axis-backstage/plugin-statuspage
  1. Setup the API-factory.
// packages/app/src/apis.ts:

createApiFactory({
    api: statuspageApiRef,
    deps: {
      discoveryApi: discoveryApiRef,
      fetchApi: fetchApiRef,
    },
    factory: ({ discoveryApi, fetchApi }) =>
      new StatuspageClient({ discoveryApi, fetchApi }),
  }),
  1. Setup configuration
statuspage:
  - name: mystatuspageinstance
    pageid: abc123foo456
    token: ${STATUSPAGE_TOKEN}
    link: https://<your statuspage>.statuspage.io # Optional

If you have access to the Statuspage.io dashboard, your page ID is usually visible in the URL when you're logged in and managing your page. Look for a segment in the URL that appears after /manage/pages/. The format usually looks something like https://manage.statuspage.io/pages/YOUR_PAGE_ID.

  1. Then, modify your entity page in EntityPage.tsx to include the StatuspageEntityComponent component and the isStatuspageAvailable function. Both are exported from the plugin. The example below show how you can add the plugin to the defaultEntityPage:
// In packages/app/src/components/catalog/EntityPage.tsx
import { StatuspageEntityComponent, isStatuspageAvailable } from '@axis-backstage/plugin-statuspage';

const defaultEntityPage = (
      <EntitySwitch>
        <EntitySwitch.Case if={isStatuspageAvailable}>
          <Grid item xs={12}>
            <StatuspageEntityCard />
          </Grid>
        </EntitySwitch.Case>
      </EntitySwitch>
  ...
);

Integration with the Catalog

To enable the StatuspageEntityCard for your entity, the entity yaml must have the following annotation:

apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
  # ...
  annotations:
    statuspage.io/components: instance:component_id,component_id,component_id # Jira component name separated with a comma

The instance here is the statuspage.instance.nam config value.

The component_id could be the id of either a component or a component group. This can be found in your statuspage.io management interface:

component_id

Setup a complete StatuspagePage with all components

// In packages/app/src/App.tsx:

<Route path="/statuspage" element={<StatuspagePage name="myid" />} />