open-index/open-npm huggingface dataset:
npm package: @marek.libra/backstage-plugin-notifications
Description: Frontend part of the notifications providing the Notifications API, Notifications page, left-side menu item and other REACT components.
Latest version: 1.0.11

# Notifications

This Backstage front-end plugin provides:

- the `Notifications` page listing notifications from the logged-in user's perspective
- the NotificationsApi for accessing the notifications backend from front-end plugins
- an active item to the main left side menu to both notify the user about new messages and provide navigation to the Notifications page
- an alert about new system notifications

## Getting started

### Prerequisities

Have `@janus-idp/plugin-notifications-backend` installed and running.

### Add NPM dependency

```
cd packages/app
yarn add @janus-idp/plugin-notifications
```

### Add left-side menu item

In the `packages/app/src/components/Root/Root.tsx`:

```
import { NotificationsSidebarItem } from '@janus-idp/plugin-notifications';

...
export const Root = ({ children }: PropsWithChildren<{}>) => (
    ...
      {/* New code: */}
      <SidebarDivider />
      <NotificationsSidebarItem pollingInterval={5000} />

      {/* Existing code for reference: */}
      <SidebarSpace />
      <SidebarSpace />
      <SidebarDivider />
      <SidebarDivider />
      <SidebarGroup
        <SidebarGroup label="Settings"
```

### Add to router

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

```
import { NOTIFICATIONS_ROUTE, NotificationsPage } from '@janus-idp/plugin-notifications';
...

export const AppBase = () => {
    ...
      {/* New code: */}
      <Route path={NOTIFICATIONS_ROUTE} element={<NotificationsPage />} />
```

## How to use the NotificationApi

```
import { notificationsApiRef, Notification } from '@janus-idp/plugin-notifications';

...

const notificationsApi = useApi(notificationsApiRef);
const notifications: Notification[] = await notificationsApi.getNotifications(params);

```

See `src/api/notificationsApi.ts` for more details.
npm package: @marek.libra/backstage-plugin-orchestrator-backend-dynamic
Description: Welcome to the backend package for the Orchestrator plugin!
Author: The Backstage Community
Latest version: 1.22.12

# Orchestrator Backend Plugin for Backstage

Welcome to the backend package for the Orchestrator plugin!

For more information about the Orchestrator plugin, see the [Orchestrator Plugin documentation](https://github.com/janus-idp/backstage-plugins/tree/main/plugins/orchestrator) on GitHub.
npm package: @marek.libra/plugin-notifications
Description: Frontend part of the notifications providing the Notifications API, Notifications page, left-side menu item and other REACT components.
Latest version: 1.1.13-11

# Notifications

This Backstage front-end plugin provides:

- the `Notifications` page listing notifications from the logged-in user's perspective
- the NotificationsApi for accessing the notifications backend from front-end plugins
- an active item to the main left side menu to both notify the user about new messages and provide navigation to the Notifications page
- an alert about new system notifications

## Getting started

### Prerequisities

Have `@janus-idp/plugin-notifications-backend` installed and running.

## Installing as a dynamic plugin

The sections below are relevant for static plugins. If the plugin is expected to be installed as a dynamic one:

- follow https://github.com/janus-idp/backstage-showcase/blob/main/showcase-docs/dynamic-plugins.md#installing-a-dynamic-plugin-package-in-the-showcase
- add content of `app-config.janus-idp.yaml` into `app-config.local.yaml`.
- customize configuration configure as needed

### Configuration

There is polling used to check for new notifications. It can be tuned via `pollingIntervalMs` config property (see `app-config.janus-idp.yaml`). When set to 0, the polling is turned off.

## Installing as a static plugin

### Add NPM dependency

```
cd packages/app
yarn add @janus-idp/plugin-notifications
```

### Add left-side menu item

In the `packages/app/src/components/Root/Root.tsx`:

```
import { NotificationsActiveIcon } from '@janus-idp/plugin-notifications';

...
export const Root = ({ children }: PropsWithChildren<{}>) => (
    ...
      {/* New code: */}
      <SidebarDivider />
      <SidebarItem icon={NotificationsActiveIcon} to="notifications" text="Notifications" />

      {/* Existing code for reference: */}
      <SidebarSpace />
      <SidebarSpace />
      <SidebarDivider />
      <SidebarDivider />
      <SidebarGroup
        <SidebarGroup label="Settings"
```

### Add to router

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

```
import { NotificationsPage } from '@janus-idp/plugin-notifications';
...

export const AppBase = () => {
    ...
      {/* New code: */}
      <Route path="/notifications" element={<NotificationsPage />} />
```

## How to use the NotificationApi

Once installed as either static or dynamic plugin, a 3rd party frontend plugin can access the notifications via its frontend API:

```
import { notificationsApiRef, Notification } from '@janus-idp/plugin-notifications';

...

const notificationsApi = useApi(notificationsApiRef);
const notifications: Notification[] = await notificationsApi.getNotifications(params);

```

See `src/api/notificationsApi.ts` for more details.
npm package: @marek.libra/plugin-redhat-resource-optimization-backend-dynamic
Description: Welcome to the redhat-resource-optimization backend plugin!
Latest version: 1.0.0

# Resource Optimization back-end plugin

Welcome to the redhat-resource-optimization backend plugin!

_This plugin was created through the Backstage CLI_

## Getting started

This workspace includes a [devcontainer](../../.devcontainer/devcontainer.json) configuration, this is the recommended way for setting up a local dev-environment. Just open the [redhat-resource-optimization.code-workspace](../../redhat-resource-optimization.code-workspace) file with VSCode and choose to open this workspace in the preconfigured devcontiner when the prompt appears.

The plugin has been added to the example app in this workspace, meaning you'll be able to access it by running `yarn
start` in the root directory, and then navigating to http://localhost:3000/redhat-resource-optimization.
The health check endpoint for this back-end is available at: http://localhost:7007/api/resourceOptimizationPlugin/health.

You can also serve the plugin in isolation by running `yarn start:dev` in the plugin directory.
This method of serving the plugin provides quicker iteration speed and a faster startup and hot reloads.
It is only meant for local development, and the setup for it can be found inside the [/dev](/dev) directory.