@backstage-community/plugin-stackstorm
Version:
A Backstage plugin that integrates towards StackStorm
41 lines (38 loc) • 1.08 kB
JavaScript
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
import { StatusWarning, StatusError, StatusRunning, StatusOK } from '@backstage/core-components';
const Status = ({ status }) => {
if (status === void 0) return null;
const st = status.toLocaleLowerCase("en-US");
switch (status) {
case "succeeded":
case "enabled":
case "complete":
return /* @__PURE__ */ jsxs(Fragment, { children: [
/* @__PURE__ */ jsx(StatusOK, {}),
" ",
st
] });
case "scheduled":
case "running":
return /* @__PURE__ */ jsxs(Fragment, { children: [
/* @__PURE__ */ jsx(StatusRunning, {}),
" ",
st
] });
case "failed":
case "error":
return /* @__PURE__ */ jsxs(Fragment, { children: [
/* @__PURE__ */ jsx(StatusError, {}),
" ",
st
] });
default:
return /* @__PURE__ */ jsxs(Fragment, { children: [
/* @__PURE__ */ jsx(StatusWarning, {}),
" ",
st
] });
}
};
export { Status };
//# sourceMappingURL=Status.esm.js.map