UNPKG

@backstage-community/plugin-puppetdb

Version:

Backstage plugin to visualize resource information and Puppet facts from PuppetDB.

33 lines (30 loc) 974 B
import { jsxs, Fragment, jsx } from 'react/jsx-runtime'; import { StatusOK, StatusPending, StatusRunning, StatusError } from '@backstage/core-components'; const StatusField = (props) => { const { status } = props; const statusUC = status.toLocaleUpperCase("en-US"); switch (status) { case "failed": return /* @__PURE__ */ jsxs(Fragment, { children: [ /* @__PURE__ */ jsx(StatusError, {}), statusUC ] }); case "changed": return /* @__PURE__ */ jsxs(Fragment, { children: [ /* @__PURE__ */ jsx(StatusRunning, {}), statusUC ] }); case "unchanged": return /* @__PURE__ */ jsxs(Fragment, { children: [ /* @__PURE__ */ jsx(StatusPending, {}), statusUC ] }); default: return /* @__PURE__ */ jsxs(Fragment, { children: [ /* @__PURE__ */ jsx(StatusOK, {}), statusUC ] }); } }; export { StatusField }; //# sourceMappingURL=StatusField.esm.js.map