datajunction-ui
Version:
DataJunction UI
3 lines (2 loc) • 1.99 kB
JavaScript
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("./index-h1A5IisM.cjs"),t=require("react"),h=require("react-router-dom");function x(){const[c,r]=t.useState([]),[i,m]=t.useState([]),{name:a}=h.useParams(),l=t.useContext(n.DJClientContext).DataJunctionAPI;return t.useEffect(()=>{(async()=>{const d=await l.listNodesForTag(a),o=await l.getTag(a);r(d),m(o)})().catch(console.error)},[l,a]),e.jsxs("div",{className:"mid",children:[e.jsx(n.NamespaceHeader,{namespace:""}),e.jsx("div",{className:"card",children:e.jsxs("div",{className:"card-header",children:[e.jsx("h3",{className:"card-title align-items-start flex-column",style:{display:"inline-block"},children:"Tag"}),e.jsxs("div",{children:[e.jsxs("div",{style:{marginBottom:"1.5rem"},children:[e.jsx("h6",{className:"mb-0 w-100",children:"Display Name"}),e.jsx("p",{className:"mb-0 opacity-75",children:i.display_name})]}),e.jsxs("div",{style:{marginBottom:"1.5rem"},children:[e.jsx("h6",{className:"mb-0 w-100",children:"Name"}),e.jsx("p",{className:"mb-0 opacity-75",children:a})]}),e.jsxs("div",{style:{marginBottom:"1.5rem"},children:[e.jsx("h6",{className:"mb-0 w-100",children:"Tag Type"}),e.jsx("p",{className:"mb-0 opacity-75",children:i.tag_type})]}),e.jsxs("div",{style:{marginBottom:"1.5rem"},children:[e.jsx("h6",{className:"mb-0 w-100",children:"Description"}),e.jsx("p",{className:"mb-0 opacity-75",children:i.description})]}),e.jsxs("div",{style:{marginBottom:"1.5rem"},children:[e.jsx("h6",{className:"mb-0 w-100",children:"Nodes"}),e.jsx("div",{className:"list-group-item",children:c==null?void 0:c.map(s=>e.jsxs("div",{className:"button-3 cube-element",role:"cell","aria-label":"CubeElement","aria-hidden":"false",children:[e.jsx("a",{href:`/nodes/${s.name}`,children:s.display_name}),e.jsx("span",{className:`badge node_type__${s.type}`,children:s.type})]},s.name))})]})]})]})})]})}exports.TagPage=x;
//# sourceMappingURL=index-BW5oQV58.cjs.map