PageSourceSearch

https://console.loginradius.com/assets/js/idICNSPN.js

js loginradius.com collected 2026-10-02 02:16:30 UTC 4,722 bytes, 1 lines download raw bytes

1import{bG as e,r as a,bO as s,cu as n,e5 as t,bQ as i,bS as p,bq as o,e6 as r,e7 as d,R as l,b4 as c,b3 as h,bA as m}from"./MZk2sk3Q.js";import{D as g}from"./t2hC0EP0.js";import{t as u,a as I,e as x,I as f,M as j,d as S,h as A,l as w,T,f as N,B as y,a0 as L}from"./r_90E_HP.js";import"./D5_PwlkE.js";const{Text:v,Link:b,Title:k}=x,C=()=>{const{yourSites:l,sharedSites:c}=e(e=>e.auth),{i18n:{languages:h}}=e(e=>e.appState),[m,g]=a.useState(!1),[x,S]=a.useState({appId:"",appName:""}),A=s(),w=e(e=>e.team.deleteSelf),T=e(e=>e.securityConfiguration.appInfo);u(()=>{if(w.isSuccess&&!w.isError){if(!l.response.length&&1===c.response.length)return n("success","You have been removed from "+x.appName),t(),void(location.href="/logout");let e={appName:""};if(T.AppInfo&&+x.appId!==T.AppInfo.AppId){let a=l.response.find(e=>e.AppId===T.AppInfo.AppId);a||(a=c.response.find(e=>e.AppId===T.AppInfo.AppId)),a&&(e={appId:a.AppId,appName:a.AppName})}else if(l.response.length)e={appId:l.response[0].AppId,appName:l.response[0].AppName};else if(c.response.length){const a=c.response.filter(e=>e.AppId!==+x.appId);e={appId:a[0].AppId,appName:a[0].AppName}}n("success","You have been removed from "+x.appName),N(e.appName,"/getting-started"),S({appId:"",appName:""})}else w.isError&&(n("error",w.error),g(!1))},[w.isLoading]);const N=(e,a)=>{let s=!1,n=-1;for(const t of l.response)if(t.AppName===e){s=!0,n=t.AppId;break}if(!s)for(const t of c.response)if(t.AppName===e){n=t.AppId;break}-1!==n&&A(s?i(n,e,a):p(n,e,a))};return o.jsxs(I,{direction:"vertical",size:24,children:[o.jsx("div",{className:"page-header",children:o.jsxs(I,{direction:"vertical",size:12,children:[o.jsx(k,{children:h.YOUR_SITES}),o.jsxs(v,{type:"secondary",children:[h[r.main[h.YOUR_SITES]?.docKey],o.jsxs(b,{className:"doc-link",href:r.main[h.YOUR_SITES]?.docLink||"",target:"_blank",children:["Documentation ",o.jsx(f,{size:18,icon:"arrow-up-right"})]})]})]})}),(l.isSuccess||c.isSuccess)&&o.jsx(E,{ownedData:l.response||[],sharedData:c.response||[],showLoading:m,setShowLoading:g,switchTenant:N,setLeaveSitePopup:S}),o.jsx(j,{title:`Leave ${x.appName}?`,open:!!x?.appId&&!m,okText:"Leave Tenant",onOk:()=>{g(!0),A(d(+x.appId,x.appName))},onCancel:()=>S({appId:"",appName:""}),children:h.LEAVE_TENANT_POPUP_DESCRIPTION})]})},E=e=>{const{ownedData:s,sharedData:n,showLoading:t,setLeaveSitePopup:i,setShowLoading:p,switchTenant:r}=e,[d,u]=a.useState(""),x=[...s.map(e=>({...e,_owned:!0})),...n.map(e=>({...e,_owned:!1}))],j=[{title:"Tenant Name",dataIndex:"name",key:"tenantname",width:"30%",render:(e,a)=>o.jsx(o.Fragment,{children:o.jsx(c,{align:"middle",gutter:[8,0],children:o.jsx(h,{span:a.flag?24:14,children:o.jsx(o.Fragment,{children:o.jsx("span",{children:a.name})})})})})},{title:"Your Role",dataIndex:"role",key:"role"},{title:"Status",dataIndex:"status",key:"status"},{title:o.jsx(T,{title:"To change the data location, please raise a support ticket to LoginRadius Support team",children:"Data Location"}),dataIndex:"dataLocation",key:"dataLocation",width:"15%",render:e=>{const a={Americas:"🌎",Europe:"🇪🇺","Asia Pacific":"🌏",Australia:"🇦🇺"}[e];return o.jsxs(S,{gap:6,align:"center",children:[a&&o.jsx("span",{children:a}),o.jsx("span",{children:e})]})}},{title:"Type",dataIndex:"IsB2BTenant",key:"tenantType",render:(e,a)=>o.jsx(N,{bordered:!1,children:a.IsB2BTenant?o.jsxs(S,{gap:8,justify:"space-between",align:"center",children:[o.jsx(f,{color:m,size:12,icon:"organization"}),"PIAM"]}):o.jsxs(S,{gap:8,justify:"space-between",align:"center",children:[o.jsx(f,{color:m,size:12,icon:"users-filled"}),"CIAM"]})})},{title:"Actions",dataIndex:"navigate",width:"28%",render:(e,a)=>o.jsxs(S,{gap:8,wrap:!0,children:[o.jsxs(y,{type:"link",style:{padding:0},onClick:()=>{p(!0),r(a.name,"/dashboard")},children:["Switch to Tenant",o.jsx(L,{})]}),!a.flag&&o.jsx(y,{type:"link",danger:!0,onClick:()=>i({appId:a.key,appName:a.name}),children:"Leave Tenant"})]})}],v=x.map(e=>({key:e.AppId,name:e.AppName,role:e.Role.toString(),status:e.Status||void 0===e.Status?"Active":"Inactive",tag:e.EnvironmentTag?e.EnvironmentTag.toLowerCase():"",flag:e._owned?"own":"",IsB2BTenant:e.IsB2BTenant,dataLocation:e.DataLocation||"—"})).filter(e=>!d||e.name.toLowerCase().includes(d.toLowerCase()));return o.jsxs(l.Fragment,{children:[x.length>10&&o.jsx(S,{justify:"flex-end",children:o.jsx(A,{allowClear:!0,style:{width:"300px"},value:d,onChange:e=>u(e.target.value),placeholder:"Search by tenant name"})}),t?o.jsx(w,{}):o.jsx(I,{direction:"vertical",size:8,children:o.jsx(g,{caption:"Tenants",tableLayout:"fixed",columns:j,dataSource:v,pagination:{pageSize:10,showSizeChanger:!1,position:["bottomCenter"],hideOnSinglePage:!0}})})]})};export{C as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.