@molecule/app-status-summary-vue

Feature · status-summary · App (browser) · v1.1.2 · Apache-2.0

Status-page summary: component grid with operational/degraded/outage badges + incident list

npm install @molecule/app-status-summary-vue

npm · Source on GitHub

How it works

@molecule/app-status-summary-vue is a ready-made status-summary feature for the app (browser) side. It composes the core interfaces it needs, so it works with whichever providers your app has bonded.

import { createApp, defineComponent, h } from 'vue'
import { StatusSummary } from '@molecule/app-status-summary-vue'

const Page = defineComponent({
  setup() {
    return () =>
      h(
        StatusSummary,
        {
          groups: [
            {
              id: 'api',
              name: 'API',
              components: [
                { id: 'rest', name: 'REST API', status: 'operational' },
                { id: 'ws', name: 'WebSockets', status: 'degraded' },
              ],
            },
          ],
        },
        {
          header: () => [h('span', 'Last updated: 2 min ago')],
        },
      )
  },
})

createApp(Page).mount('#app')

Works with: @molecule/app-ui, @molecule/app-ui-vue, @molecule/app-vue

Reference

Vue status-page summary.

Exports <StatusSummary> — a grouped component list with colored operational / degraded / outage badges and an overall banner derived from the worst child status — plus the ComponentStatus, StatusComponent, StatusGroup and StatusSummaryProps types.

It is the Vue counterpart of @molecule/app-status-summary-react: the same props (React names) and the same DOM for the same input.

Auto-generated, AI-first package reference for the molecule.dev ecosystem. It is written to be read by coding agents as much as by people, and is generated from this package's source — edit src/index.ts JSDoc, not this file.

Quick Start

import { createApp, defineComponent, h } from 'vue'
import { StatusSummary } from '@molecule/app-status-summary-vue'

const Page = defineComponent({
  setup() {
    return () =>
      h(
        StatusSummary,
        {
          groups: [
            {
              id: 'api',
              name: 'API',
              components: [
                { id: 'rest', name: 'REST API', status: 'operational' },
                { id: 'ws', name: 'WebSockets', status: 'degraded' },
              ],
            },
          ],
        },
        {
          header: () => [h('span', 'Last updated: 2 min ago')],
        },
      )
  },
})

createApp(Page).mount('#app')

Type

feature

Installation

npm install @molecule/app-status-summary-vue @molecule/app-ui @molecule/app-ui-vue @molecule/app-vue vue

API

Interfaces

StatusComponent

A single monitored component with its current health status.

interface StatusComponent {
  /** Stable identifier, used as the rendered list key. */
  id: string
  /** Component name — passed as a prop or the same-named slot. */
  name: VNodeChild
  /** Current health status. */
  status: ComponentStatus
  /** Optional sub-label (SLA %, region, etc.). */
  subtitle?: VNodeChild
}

StatusGroup

A named group of related StatusComponent entries.

interface StatusGroup {
  /** Stable identifier, used as the rendered section key. */
  id: string
  /** Group name — passed as a prop or the same-named slot. */
  name: VNodeChild
  /** The components in this group. */
  components: StatusComponent[]
}

StatusSummaryProps

Props for the StatusSummary component.

interface StatusSummaryProps {
  /** Grouped components. */
  groups: StatusGroup[]
  /** Overall summary label (auto-derived if omitted). */
  overallStatus?: ComponentStatus
  /**
   * Optional header content (last updated time, subscribe button). Passed as a
   * prop or as the same-named slot — both work.
   */
  header?: VNodeChild
  /**
   * Optional below-the-grid slot — typically a recent-incidents list. Passed
   * as a prop or as the same-named slot — both work.
   */
  footer?: VNodeChild
  /** Extra classes. */
  className?: string
}

Types

ComponentStatus

Union of possible component health states.

type ComponentStatus =
  'operational' | 'degraded' | 'partial-outage' | 'major-outage' | 'maintenance'

Constants

StatusSummary

Status-page summary — grouped component list with colored badges and an overall banner derived from the worst child status.

When overallStatus is omitted the banner shows the worst status found across all components (major-outage > partial-outage > degraded > maintenance > operational). The banner renders header, the grid renders one section per group and footer renders below it — any of them may be passed as a prop or as the same-named slot.

const StatusSummary: DefineComponent<
  ExtractPropTypes<{
    groups: { type: PropType<StatusGroup[]>; required: true }
    overallStatus: { type: PropType<ComponentStatus>; default: undefined }
    header: null
    footer: null
    className: { type: StringConstructor; default: undefined }
  }>,
  () => VNode,
  {},
  {},
  {},
  ComponentOptionsMixin,
  ComponentOptionsMixin,
  {},
  string,
  PublicProps,
  Readonly<
    ExtractPropTypes<{
      groups: { type: PropType<StatusGroup[]>; required: true }
      overallStatus: { type: PropType<ComponentStatus>; default: undefined }
      header: null
      footer: null
      className: { type: StringConstructor; default: undefined }
    }>
  > &
    Readonly<{}>,
  { overallStatus: ComponentStatus; className: string },
  {},
  {},
  {},
  string,
  ComponentProvideOptions,
  true,
  {},
  any
>
  • props — Component props (see StatusSummaryProps).

Returns: The status summary component.

Injection Notes

Requirements

Peer dependencies:

  • @molecule/app-ui ^1.4.0
  • @molecule/app-ui-vue ^1.1.0
  • @molecule/app-vue ^3.5.0 || ^4.0.0
  • vue ^3.4.0

Runtime Dependencies

  • @molecule/app-ui

  • @molecule/app-ui-vue

  • @molecule/app-vue

  • vue

  • Must render inside the app's i18n provider and with a ClassMap bond wired (useTranslation() / getClassMap() throw otherwise).

  • When overallStatus is omitted the banner shows the WORST status found across all components (major-outage > partial-outage > degraded > maintenance > operational).

  • Status colors are a fixed hex palette applied via inline styles (green/yellow/orange/red/blue with white text) — they ignore the app theme and cannot be restyled via ClassMap; acceptable for status pages, but know they will not follow a rebrand.

  • Status labels use the status.operational … status.maintenance i18n keys, which the common locale bond ships in every language; the English fallbacks in code match its en.ts.

  • Node-valued props (header, footer) arrive as a prop AND a same-named slot; group and component names may be nodes too.