All Downloads are FREE. Search and download functionalities are using the official Maven repository.

theme.keycloak.v2.admin.resources.assets.Dashboard-f8765c8a.js Maven / Gradle / Ivy

There is a newer version: 25.0.1
Show newest version
import{bg as A,bh as V,bi as q,bj as Q,bk as W,bl as X,bm as $,u as S,W as z,r as j,j as e,P as u,c as D,bn as H,aV as F,T as N,K as J,N as Y,bo as O,at as Z,h as w,o as p}from"./index-831988f6.js";import{u as ee}from"./useLocaleSort-6d6b4eec.js";import{R as se,u as re}from"./RoutableTabs-8afbc312.js";import{T as ae}from"./TableToolbar-af5dff6f.js";import{X as ie,T as C,O as ne,P as I,Q as _,R as G,S as v}from"./Td-bb613d18.js";import{E as oe}from"./ExpandableSection-4ded5b10.js";import{E as te,a as le}from"./EmptyStateBody-dd392e69.js";import{a as M,b as R}from"./Tabs-f8972b46.js";import{G as de,a as P}from"./GridItem-2c75fd83.js";import{C as k}from"./Card-f255349a.js";import{C as y}from"./CardTitle-234a430a.js";import{C as L}from"./CardBody-7b8c88cd.js";import{D as E,a as T,b as c,c as h}from"./DescriptionListTerm-8a48b17a.js";import{L as B,a as K,b as U}from"./ListItem-dbf5a2d8.js";import{T as ce}from"./Text-2a2c2dcc.js";import"./ToolbarContent-186be8fd.js";import"./Form-bd3cf98e.js";import"./star-icon-f5649401.js";import"./check-fc57dbe1.js";import"./grip-vertical-icon-0333850c.js";import"./Checkbox-d44d2684.js";import"./plus-icon-1b237b1a.js";import"./MenuList-d75eeee8.js";function he(s,i){var a=[];return A(s,function(d,o,l){i(d,o,l)&&a.push(d)}),a}function me(s,i){var a=V(s)?q:he;return a(s,Q(i))}var xe=W(function(s){return X($(s,1,ie,!0))});const pe=xe,je=()=>{const{t:s}=S("dashboard"),i=z(),[a,d]=j.useState(""),[o,l]=j.useState([]),m=j.useMemo(()=>Object.entries(i.providers||[]).filter(([n])=>n.includes(a)),[a]),g=n=>{o.includes(n)?l(o.filter(x=>x!==n)):l([...o,n])};return e.jsx(u,{variant:"light",children:e.jsx(ae,{inputGroupName:"search",inputGroupPlaceholder:s("common:search"),inputGroupOnEnter:d,children:e.jsxs(C,{variant:"compact",children:[e.jsx(ne,{children:e.jsxs(I,{children:[e.jsx(_,{width:20,children:s("spi")}),e.jsx(_,{children:s("providers")})]})}),e.jsx(G,{children:m.map(([n,{providers:x}])=>e.jsxs(I,{children:[e.jsx(v,{children:n}),e.jsx(v,{children:e.jsx("ul",{children:Object.entries(x).map(([t,{operationalInfo:b}])=>e.jsxs("li",{children:[t,b?e.jsx(oe,{isExpanded:o.includes(t),onToggle:()=>g(t),toggleText:o.includes(t)?s("showLess"):s("showMore"),children:e.jsx(C,{borders:!1,children:e.jsx(G,{children:Object.entries(b).map(([f,r])=>e.jsxs(I,{children:[e.jsx(v,{children:f}),e.jsx(v,{children:r})]},f))})})},t):null]},t))})})]},n))})]})})})};const ue=()=>{const{t:s}=S("dashboard"),{realm:i}=D(),a=F.logo?F.logo:"/icon.svg";return e.jsx(u,{variant:"light",children:e.jsxs(te,{variant:"large",children:[e.jsx(H,{src:F.resourceUrl+a,alt:"Keycloak icon",className:"keycloak__dashboard_icon"}),e.jsx(N,{headingLevel:"h2",size:"3xl",children:s("welcome")}),e.jsx(N,{headingLevel:"h1",size:"4xl",children:i}),e.jsx(le,{children:s("introduction")})]})})},be=()=>{const{t:s}=S("dashboard"),{realm:i}=D(),a=z(),d=ee(),o=r=>n.includes(r),l=r=>a.profileInfo?.experimentalFeatures?.includes(r),m=r=>a.profileInfo?.previewFeatures?.includes(r),g=r=>!l(r)&&!m(r),n=j.useMemo(()=>d(a.profileInfo?.disabledFeatures??[],r=>r),[a.profileInfo]),x=j.useMemo(()=>d(me(pe(a.profileInfo?.experimentalFeatures,a.profileInfo?.previewFeatures),r=>!o(r)),r=>r),[a.profileInfo]),t=r=>re(O({realm:i,tab:r})),b=t("info"),f=t("providers");return Object.keys(a).length===0?e.jsx(J,{}):e.jsxs(e.Fragment,{children:[e.jsx(u,{variant:"light",children:e.jsx(Y,{className:"pf-u-mr-sm",children:e.jsx(ce,{component:"h1",children:s("realmName",{name:i})})})}),e.jsx(u,{variant:"light",className:"pf-u-p-0",children:e.jsxs(se,{"data-testid":"dashboard-tabs",defaultLocation:O({realm:i,tab:"info"}),isBox:!0,mountOnEnter:!0,children:[e.jsx(M,{id:"info","data-testid":"infoTab",title:e.jsx(R,{children:s("serverInfo")}),...b,children:e.jsx(u,{variant:"light",children:e.jsxs(de,{hasGutter:!0,children:[e.jsx(P,{lg:2,sm:12,children:e.jsxs(k,{className:"keycloak__dashboard_card",children:[e.jsx(y,{children:s("serverInfo")}),e.jsx(L,{children:e.jsx(E,{children:e.jsxs(T,{children:[e.jsx(c,{children:s("version")}),e.jsx(h,{children:a.systemInfo?.version}),e.jsx(c,{children:s("product")}),e.jsx(h,{children:Z(a.profileInfo?.name)})]})})}),e.jsx(y,{children:s("memory")}),e.jsx(L,{children:e.jsx(E,{children:e.jsxs(T,{children:[e.jsx(c,{children:s("totalMemory")}),e.jsx(h,{children:a.memoryInfo?.totalFormated}),e.jsx(c,{children:s("freeMemory")}),e.jsx(h,{children:a.memoryInfo?.freeFormated}),e.jsx(c,{children:s("usedMemory")}),e.jsx(h,{children:a.memoryInfo?.usedFormated})]})})})]})}),e.jsx(P,{lg:10,sm:12,children:e.jsxs(k,{className:"keycloak__dashboard_card",children:[e.jsx(y,{children:s("profile")}),e.jsx(L,{children:e.jsxs(E,{children:[e.jsxs(T,{children:[e.jsxs(c,{children:[s("enabledFeatures")," ",e.jsx(w,{fieldLabelId:"dashboard:enabledFeatures",helpText:s("dashboard:infoEnabledFeatures")})]}),e.jsx(h,{children:e.jsx(B,{variant:K.inline,children:x.map(r=>e.jsxs(U,{className:"pf-u-mb-sm",children:[r," ",l(r)?e.jsx(p,{color:"orange",children:s("experimental")}):null,m(r)?e.jsx(p,{color:"blue",children:s("preview")}):null]},r))})})]}),e.jsxs(T,{children:[e.jsxs(c,{children:[s("disabledFeatures")," ",e.jsx(w,{fieldLabelId:"dashboard:disabledFeatures",helpText:s("dashboard:infoDisabledFeatures")})]}),e.jsx(h,{children:e.jsx(B,{variant:K.inline,children:n.map(r=>e.jsxs(U,{className:"pf-u-mb-sm",children:[r," ",l(r)?e.jsx(p,{color:"orange",children:s("experimental")}):null,m(r)?e.jsx(p,{color:"blue",children:s("preview")}):null,g(r)?e.jsx(p,{color:"green",children:s("supported")}):null]},r))})})]})]})})]})})]})})}),e.jsx(M,{id:"providers","data-testid":"providersTab",title:e.jsx(R,{children:s("providerInfo")}),...f,children:e.jsx(je,{})})]})})]})};function Ue(){const{realm:s}=D(),i=s==="master";return e.jsxs(e.Fragment,{children:[!i&&e.jsx(ue,{}),i&&e.jsx(be,{})]})}export{Ue as default};
//# sourceMappingURL=Dashboard-f8765c8a.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy