theme.keycloak.v2.admin.resources.assets.Dashboard-DxeDUCJt.js Maven / Gradle / Ivy
import{jsx as e,jsxs as a,Fragment as k}from"react/jsx-runtime";import{_ as ae,c4 as C,m as G,a as L,b as Q,P as u,c as A,bH as te,c5 as ee,s as ie,x as ne,a3 as se,aa as le,Z as M,c6 as U,T as oe,$ as ce,i as y,au as _,bu as de,bv as V,X as W,bs as w,Y as N,ad as H,p as x}from"./main-C7ps2lmX.js";import*as O from"react";import{useState as Y,useMemo as I}from"react";import{R as me,u as he}from"./RoutableTabs-T8JTILEW.js";import{T as pe}from"./PaginatingTableToolbar-Cjsz5Jh4.js";import{U as K,V as fe,W as j,X,Y as z,Z as E}from"./Td-D2hVFK0Z.js";import{E as be}from"./ExpandableSection-CSay1Wbo.js";import{a as B,b as F}from"./Tabs-CMdqT4Cg.js";import{D as S,a as D,b as f,c as b}from"./DescriptionListTerm-Bdo198Bq.js";import{L as Z,a as $,b as ue}from"./ListItem-CHzEhhky.js";import{E as ve,a as ge}from"./EmptyStateFooter-DqmBOP2I.js";import{E as q}from"./EmptyStateActions-DWNUFByn.js";import{A as Te,a as R}from"./KeySelect-jKxsKqdI.js";import"react-dom";import"./PageHandler-P2CRgucq.js";import"./DynamicComponents-DvaX3FJx.js";import"./ClientSelect-B9UqjyP6.js";import"./FileUpload-CumNwlWc.js";import"./CodeEditor-C-nZkUJx.js";import"./copy-icon-ACZmDH8e.js";import"./GroupPickerDialog-C09EjRTA.js";import"./DataListItemRow-BC0LurDd.js";import"./FlexItem-BzZfUnQ1.js";import"./MultiLineInput-DiPNQ1LE.js";import"./useToggle-K3Kx99tM.js";import"./AddRoleMappingModal-DW8o4W0z.js";import"./KeycloakDataTable-DbY4la1D.js";import"./_baseFlatten-eIEJR-AJ.js";import"./ConfirmDialog-hx7XKLbN.js";import"./filter-icon-DO0QNij3.js";import"./ViewHeader-B7eeFzFA.js";import"./useParams-B67lSY02.js";import"./PageList-s9OtSlkz.js";import"./grip-vertical-icon-BxF7V59o.js";const P={brand:"pf-v5-c-brand",modifiers:{picture:"pf-m-picture"}},ye={name:"--pf-v5-c-brand--Height",value:"auto",var:"var(--pf-v5-c-brand--Height)"},_e={name:"--pf-v5-c-brand--Width",value:"auto",var:"var(--pf-v5-c-brand--Width)"},re=r=>{var{className:t="",src:d="",alt:i,children:l,widths:c,heights:h,style:p}=r,n=ae(r,["className","src","alt","children","widths","heights","style"]);let o;return c!==void 0&&(o=Object.assign({},C(c,_e.name))),h!==void 0&&(o=Object.assign(Object.assign({},o),C(h,ye.name))),l!==void 0?O.createElement("picture",Object.assign({className:G(P.brand,P.modifiers.picture,t),style:Object.assign(Object.assign({},p),o)},n),l,O.createElement("img",{src:d,alt:i})):O.createElement("img",Object.assign({},n,{className:G(P.brand,t),style:Object.assign(Object.assign({},p),o),src:d,alt:i}))};re.displayName="Brand";var v;(function(r){r.Default="DEFAULT",r.DisabledByDefault="DISABLED_BY_DEFAULT",r.Preview="PREVIEW",r.PreviewDisabledByDefault="PREVIEW_DISABLED_BY_DEFAULT",r.Experimental="EXPERIMENTAL",r.Deprecated="DEPRECATED"})(v||(v={}));const Ee=()=>{const{t:r}=L(),t=Q(),[d,i]=Y(""),[l,c]=Y([]),h=I(()=>Object.entries(t.providers||[]).filter(([n])=>n.toLowerCase().includes(d.toLowerCase())),[d]),p=n=>{l.includes(n)?c(l.filter(o=>o!==n)):c([...l,n])};return e(u,{variant:"light",children:e(pe,{inputGroupName:"search",inputGroupPlaceholder:r("search"),inputGroupOnEnter:i,children:a(K,{variant:"compact",children:[e(fe,{children:a(j,{children:[e(X,{width:20,children:r("spi")}),e(X,{children:r("providers")})]})}),e(z,{children:h.map(([n,{providers:o}])=>a(j,{children:[e(E,{children:n}),e(E,{children:e("ul",{children:Object.entries(o).map(([m,{operationalInfo:g}])=>a("li",{children:[m,g?e(be,{isExpanded:l.includes(m),onToggle:()=>p(m),toggleText:l.includes(m)?r("showLess"):r("showMore"),children:e(K,{borders:!1,children:e(z,{children:Object.entries(g).map(([T,s])=>a(j,{children:[e(E,{children:T}),e(E,{children:s})]},T))})})},m):null]},m))})})]},n))})]})})})},De=()=>{const{environment:r}=te(),{t}=L(),{realm:d,realmRepresentation:i}=A(),l=r.logo?r.logo:"/icon.svg",c=ee(t,i?.displayName,d);return e(u,{variant:"light",children:a(ve,{variant:"lg",children:[e(re,{src:r.resourceUrl+l,alt:"Keycloak icon",className:"keycloak__dashboard_icon"}),e(q,{titleText:e(k,{children:t("welcome")}),headingLevel:"h2"}),e(q,{titleText:c,headingLevel:"h1"}),e(ge,{children:t("introduction")})]})})},J=({feature:r})=>{const{t}=L();return a(ue,{className:"pf-v5-u-mb-sm",children:[r.name," ",r.type===v.Experimental&&e(x,{color:"orange",children:t("experimental")}),r.type===v.Preview&&e(x,{color:"blue",children:t("preview")}),r.type===v.Default&&e(x,{color:"green",children:t("supported")})]})},Ie=()=>{const{t:r}=L(),{realm:t,realmRepresentation:d}=A(),i=Q(),l=ie(),c=I(()=>l(i.features??[],ne("name")),[i.features]),h=I(()=>c.filter(s=>!s.enabled)||[],[i.features]),p=I(()=>c.filter(s=>s.enabled)||[],[i.features]),n=s=>he(U({realm:t,tab:s})),o=ee(r,d?.displayName,t),m=n("welcome"),g=n("info"),T=n("providers");return Object.keys(i).length===0?e(se,{}):a(k,{children:[e(u,{variant:"light",children:e(le,{className:"pf-v5-u-mr-sm",children:e(M,{component:"h1",children:r("realmNameTitle",{name:t})})})}),e(u,{variant:"light",className:"pf-v5-u-p-0",children:a(me,{"data-testid":"dashboard-tabs",defaultLocation:U({realm:t,tab:"welcome"}),isBox:!0,mountOnEnter:!0,children:[e(B,{id:"welcome","data-testid":"welcomeTab",title:e(F,{children:r("welcomeTabTitle")}),...m,children:e(u,{variant:"light",children:a("div",{className:"pf-v5-l-grid pf-v5-u-ml-lg",children:[e("div",{className:"pf-v5-l-grid__item pf-m-12-col",children:e(oe,{className:"pf-v5-u-font-weight-bold",headingLevel:"h2",size:"3xl",children:r("welcomeTo",{realmDisplayInfo:o})})}),e("div",{className:"pf-v5-l-grid__item keycloak__dashboard_welcome_tab",children:e(M,{component:ce.h3,children:r("welcomeText")})}),e("div",{className:"pf-v5-l-grid__item pf-m-10-col pf-v5-u-mt-md",children:e(y,{className:"pf-v5-u-px-lg pf-v5-u-py-sm",component:"a",href:_.documentation,target:"_blank",variant:"primary",children:r("viewDocumentation")})}),a(Te,{className:"pf-v5-u-mt-sm",children:[e(R,{children:e(y,{component:"a",href:_.guides,target:"_blank",variant:"tertiary",children:r("viewGuides")})}),e(R,{children:e(y,{component:"a",href:_.community,target:"_blank",variant:"tertiary",children:r("joinCommunity")})}),e(R,{children:e(y,{component:"a",href:_.blog,target:"_blank",variant:"tertiary",children:r("readBlog")})})]})]})})}),e(B,{id:"info","data-testid":"infoTab",title:e(F,{children:r("serverInfo")}),...g,children:e(u,{variant:"light",children:a(de,{hasGutter:!0,children:[e(V,{lg:2,sm:12,children:a(W,{className:"keycloak__dashboard_card",children:[e(w,{children:r("serverInfo")}),e(N,{children:e(S,{children:a(D,{children:[e(f,{children:r("version")}),e(b,{children:i.systemInfo?.version})]})})}),e(w,{children:r("memory")}),e(N,{children:e(S,{children:a(D,{children:[e(f,{children:r("totalMemory")}),e(b,{children:i.memoryInfo?.totalFormated}),e(f,{children:r("freeMemory")}),e(b,{children:i.memoryInfo?.freeFormated}),e(f,{children:r("usedMemory")}),e(b,{children:i.memoryInfo?.usedFormated})]})})})]})}),e(V,{lg:10,sm:12,children:a(W,{className:"keycloak__dashboard_card",children:[e(w,{children:r("profile")}),e(N,{children:a(S,{children:[a(D,{children:[a(f,{children:[r("enabledFeatures")," ",e(H,{fieldLabelId:"enabledFeatures",helpText:r("infoEnabledFeatures")})]}),e(b,{children:e(Z,{variant:$.inline,children:p.map(s=>e(J,{feature:s},s.name))})})]}),a(D,{children:[a(f,{children:[r("disabledFeatures")," ",e(H,{fieldLabelId:"disabledFeatures",helpText:r("infoDisabledFeatures")})]}),e(b,{children:e(Z,{variant:$.inline,children:h.map(s=>e(J,{feature:s},s.name))})})]})]})})]})})]})})}),e(B,{id:"providers","data-testid":"providersTab",title:e(F,{children:r("providerInfo")}),...T,children:e(Ee,{})})]})})]})};function nr(){const{realm:r}=A(),t=r==="master";return a(k,{children:[!t&&e(De,{}),t&&e(Ie,{})]})}export{nr as default};
//# sourceMappingURL=Dashboard-DxeDUCJt.js.map
© 2015 - 2025 Weber Informatics LLC | Privacy Policy