@techdocs/cli 0.0.0-nightly-20250507024112 → 0.0.0-nightly-20250509023918

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # @techdocs/cli
2
2
 
3
- ## 0.0.0-nightly-20250507024112
3
+ ## 0.0.0-nightly-20250509023918
4
4
 
5
5
  ### Patch Changes
6
6
 
7
7
  - Updated dependencies
8
- - @backstage/backend-defaults@0.0.0-nightly-20250507024112
9
- - @backstage/plugin-techdocs-node@0.0.0-nightly-20250507024112
8
+ - @backstage/backend-defaults@0.0.0-nightly-20250509023918
9
+ - @backstage/plugin-techdocs-node@0.0.0-nightly-20250509023918
10
10
  - @backstage/config@1.3.2
11
11
  - @backstage/catalog-model@1.7.3
12
12
  - @backstage/cli-common@0.1.15
@@ -358,6 +358,52 @@
358
358
  },
359
359
  "packageName": "@backstage/core-app-api"
360
360
  },
361
+ {
362
+ "path": "../core-components/config.d.ts",
363
+ "value": {
364
+ "type": "object",
365
+ "properties": {
366
+ "auth": {
367
+ "type": "object",
368
+ "properties": {
369
+ "autologout": {
370
+ "description": "Autologout feature configuration",
371
+ "type": "object",
372
+ "properties": {
373
+ "enabled": {
374
+ "description": "Enable or disable the autologout feature",
375
+ "visibility": "frontend",
376
+ "type": "boolean"
377
+ },
378
+ "idleTimeoutMinutes": {
379
+ "description": "Number of minutes after which the inactive user is logged out automatically.\nDefault is 60 minutes (1 hour)",
380
+ "visibility": "frontend",
381
+ "type": "number"
382
+ },
383
+ "promptBeforeIdleSeconds": {
384
+ "description": "Number of seconds before the idle timeout where the user will be asked if it's still active.\nA dialog will be shown.\nDefault is 10 seconds.\nSet to 0 seconds to disable the prompt.",
385
+ "visibility": "frontend",
386
+ "type": "number"
387
+ },
388
+ "useWorkerTimers": {
389
+ "description": "Enable/disable the usage of worker thread timers instead of main thread timers.\nDefault is true.\nIf you experience some browser incompatibility, you may try to set this to false.",
390
+ "visibility": "frontend",
391
+ "type": "boolean"
392
+ },
393
+ "logoutIfDisconnected": {
394
+ "description": "Enable/disable the automatic logout also on users that are logged in but with no Backstage tabs open.\nDefault is true.",
395
+ "visibility": "frontend",
396
+ "type": "boolean"
397
+ }
398
+ }
399
+ }
400
+ }
401
+ }
402
+ },
403
+ "$schema": "http://json-schema.org/draft-07/schema#"
404
+ },
405
+ "packageName": "@backstage/core-components"
406
+ },
361
407
  {
362
408
  "path": "../../plugins/techdocs/config.d.ts",
363
409
  "value": {
@@ -414,52 +460,6 @@
414
460
  },
415
461
  "packageName": "@backstage/plugin-techdocs"
416
462
  },
417
- {
418
- "path": "../core-components/config.d.ts",
419
- "value": {
420
- "type": "object",
421
- "properties": {
422
- "auth": {
423
- "type": "object",
424
- "properties": {
425
- "autologout": {
426
- "description": "Autologout feature configuration",
427
- "type": "object",
428
- "properties": {
429
- "enabled": {
430
- "description": "Enable or disable the autologout feature",
431
- "visibility": "frontend",
432
- "type": "boolean"
433
- },
434
- "idleTimeoutMinutes": {
435
- "description": "Number of minutes after which the inactive user is logged out automatically.\nDefault is 60 minutes (1 hour)",
436
- "visibility": "frontend",
437
- "type": "number"
438
- },
439
- "promptBeforeIdleSeconds": {
440
- "description": "Number of seconds before the idle timeout where the user will be asked if it's still active.\nA dialog will be shown.\nDefault is 10 seconds.\nSet to 0 seconds to disable the prompt.",
441
- "visibility": "frontend",
442
- "type": "number"
443
- },
444
- "useWorkerTimers": {
445
- "description": "Enable/disable the usage of worker thread timers instead of main thread timers.\nDefault is true.\nIf you experience some browser incompatibility, you may try to set this to false.",
446
- "visibility": "frontend",
447
- "type": "boolean"
448
- },
449
- "logoutIfDisconnected": {
450
- "description": "Enable/disable the automatic logout also on users that are logged in but with no Backstage tabs open.\nDefault is true.",
451
- "visibility": "frontend",
452
- "type": "boolean"
453
- }
454
- }
455
- }
456
- }
457
- }
458
- },
459
- "$schema": "http://json-schema.org/draft-07/schema#"
460
- },
461
- "packageName": "@backstage/core-components"
462
- },
463
463
  {
464
464
  "path": "../integration/config.d.ts",
465
465
  "value": {
@@ -531,6 +531,9 @@
531
531
  },
532
532
  "personalAccessToken": {
533
533
  "type": "string"
534
+ },
535
+ "managedIdentityClientId": {
536
+ "type": "string"
534
537
  }
535
538
  }
536
539
  }
@@ -1362,52 +1365,6 @@
1362
1365
  },
1363
1366
  "packageName": "@backstage/plugin-auth-backend-module-guest-provider"
1364
1367
  },
1365
- {
1366
- "path": "../../node_modules/@backstage-community/plugin-stackstorm/node_modules/@backstage/core-components/config.d.ts",
1367
- "value": {
1368
- "type": "object",
1369
- "properties": {
1370
- "auth": {
1371
- "type": "object",
1372
- "properties": {
1373
- "autologout": {
1374
- "description": "Autologout feature configuration",
1375
- "type": "object",
1376
- "properties": {
1377
- "enabled": {
1378
- "description": "Enable or disable the autologout feature",
1379
- "visibility": "frontend",
1380
- "type": "boolean"
1381
- },
1382
- "idleTimeoutMinutes": {
1383
- "description": "Number of minutes after which the inactive user is logged out automatically.\nDefault is 60 minutes (1 hour)",
1384
- "visibility": "frontend",
1385
- "type": "number"
1386
- },
1387
- "promptBeforeIdleSeconds": {
1388
- "description": "Number of seconds before the idle timeout where the user will be asked if it's still active.\nA dialog will be shown.\nDefault is 10 seconds.\nSet to 0 seconds to disable the prompt.",
1389
- "visibility": "frontend",
1390
- "type": "number"
1391
- },
1392
- "useWorkerTimers": {
1393
- "description": "Enable/disable the usage of worker thread timers instead of main thread timers.\nDefault is true.\nIf you experience some browser incompatibility, you may try to set this to false.",
1394
- "visibility": "frontend",
1395
- "type": "boolean"
1396
- },
1397
- "logoutIfDisconnected": {
1398
- "description": "Enable/disable the automatic logout also on users that are logged in but with no Backstage tabs open.\nDefault is true.",
1399
- "visibility": "frontend",
1400
- "type": "boolean"
1401
- }
1402
- }
1403
- }
1404
- }
1405
- }
1406
- },
1407
- "$schema": "http://json-schema.org/draft-07/schema#"
1408
- },
1409
- "packageName": "@backstage/core-components"
1410
- },
1411
1368
  {
1412
1369
  "path": "../../node_modules/@backstage-community/plugin-puppetdb/node_modules/@backstage/core-components/config.d.ts",
1413
1370
  "value": {
@@ -1681,6 +1638,52 @@
1681
1638
  },
1682
1639
  "packageName": "@backstage/core-app-api"
1683
1640
  },
1641
+ {
1642
+ "path": "../../node_modules/@backstage-community/plugin-stackstorm/node_modules/@backstage/core-components/config.d.ts",
1643
+ "value": {
1644
+ "type": "object",
1645
+ "properties": {
1646
+ "auth": {
1647
+ "type": "object",
1648
+ "properties": {
1649
+ "autologout": {
1650
+ "description": "Autologout feature configuration",
1651
+ "type": "object",
1652
+ "properties": {
1653
+ "enabled": {
1654
+ "description": "Enable or disable the autologout feature",
1655
+ "visibility": "frontend",
1656
+ "type": "boolean"
1657
+ },
1658
+ "idleTimeoutMinutes": {
1659
+ "description": "Number of minutes after which the inactive user is logged out automatically.\nDefault is 60 minutes (1 hour)",
1660
+ "visibility": "frontend",
1661
+ "type": "number"
1662
+ },
1663
+ "promptBeforeIdleSeconds": {
1664
+ "description": "Number of seconds before the idle timeout where the user will be asked if it's still active.\nA dialog will be shown.\nDefault is 10 seconds.\nSet to 0 seconds to disable the prompt.",
1665
+ "visibility": "frontend",
1666
+ "type": "number"
1667
+ },
1668
+ "useWorkerTimers": {
1669
+ "description": "Enable/disable the usage of worker thread timers instead of main thread timers.\nDefault is true.\nIf you experience some browser incompatibility, you may try to set this to false.",
1670
+ "visibility": "frontend",
1671
+ "type": "boolean"
1672
+ },
1673
+ "logoutIfDisconnected": {
1674
+ "description": "Enable/disable the automatic logout also on users that are logged in but with no Backstage tabs open.\nDefault is true.",
1675
+ "visibility": "frontend",
1676
+ "type": "boolean"
1677
+ }
1678
+ }
1679
+ }
1680
+ }
1681
+ }
1682
+ },
1683
+ "$schema": "http://json-schema.org/draft-07/schema#"
1684
+ },
1685
+ "packageName": "@backstage/core-components"
1686
+ },
1684
1687
  {
1685
1688
  "path": "../../node_modules/@oriflame/backstage-plugin-score-card/node_modules/@backstage/core-components/config.d.ts",
1686
1689
  "value": {
@@ -1 +1 @@
1
- <!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Backstage is an open source framework for building developer portals"/><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"/><link rel="icon" href="/favicon.ico"/><link rel="shortcut icon" href="/favicon.ico"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"/><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"/><title>Techdocs Preview App</title><meta name="backstage-app-mode" content="public"><script defer="defer" src="/static/runtime.70a3bb94.js"></script><script defer="defer" src="/static/module-material-ui.557c1930.js"></script><script defer="defer" src="/static/module-lodash.05581125.js"></script><script defer="defer" src="/static/module-date-fns.c633d602.js"></script><script defer="defer" src="/static/module-mui.f702282a.js"></script><script defer="defer" src="/static/module-material-table.00de7997.js"></script><script defer="defer" src="/static/module-react-dom.42a304d3.js"></script><script defer="defer" src="/static/module-zod.4f2eeb8c.js"></script><script defer="defer" src="/static/module-i18next.f50c1612.js"></script><script defer="defer" src="/static/module-react-beautiful-dnd.e9f14677.js"></script><script defer="defer" src="/static/module-remix-run.ae6d33c5.js"></script><script defer="defer" src="/static/vendor.70a3bb94.js"></script><script defer="defer" src="/static/main.70a3bb94.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
1
+ <!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Backstage is an open source framework for building developer portals"/><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"/><link rel="icon" href="/favicon.ico"/><link rel="shortcut icon" href="/favicon.ico"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"/><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"/><title>Techdocs Preview App</title><meta name="backstage-app-mode" content="public"><script defer="defer" src="/static/runtime.d824a551.js"></script><script defer="defer" src="/static/module-material-ui.557c1930.js"></script><script defer="defer" src="/static/module-lodash.05581125.js"></script><script defer="defer" src="/static/module-date-fns.c633d602.js"></script><script defer="defer" src="/static/module-mui.f702282a.js"></script><script defer="defer" src="/static/module-material-table.00de7997.js"></script><script defer="defer" src="/static/module-react-dom.42a304d3.js"></script><script defer="defer" src="/static/module-zod.4f2eeb8c.js"></script><script defer="defer" src="/static/module-i18next.f50c1612.js"></script><script defer="defer" src="/static/module-react-beautiful-dnd.e9f14677.js"></script><script defer="defer" src="/static/module-remix-run.ae6d33c5.js"></script><script defer="defer" src="/static/vendor.d824a551.js"></script><script defer="defer" src="/static/main.d824a551.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
@@ -42,7 +42,7 @@
42
42
  color="#5bbad5"
43
43
  />
44
44
  <title><%= config.getString('app.title') %></title>
45
- <meta name="backstage-app-mode" content="public"><meta name="backstage-public-path" content="<%= publicPath %>/"><script defer src="<%= publicPath %>/static/runtime.70a3bb94.js"></script><script defer src="<%= publicPath %>/static/module-material-ui.557c1930.js"></script><script defer src="<%= publicPath %>/static/module-lodash.05581125.js"></script><script defer src="<%= publicPath %>/static/module-date-fns.c633d602.js"></script><script defer src="<%= publicPath %>/static/module-mui.f702282a.js"></script><script defer src="<%= publicPath %>/static/module-material-table.00de7997.js"></script><script defer src="<%= publicPath %>/static/module-react-dom.42a304d3.js"></script><script defer src="<%= publicPath %>/static/module-zod.4f2eeb8c.js"></script><script defer src="<%= publicPath %>/static/module-i18next.f50c1612.js"></script><script defer src="<%= publicPath %>/static/module-react-beautiful-dnd.e9f14677.js"></script><script defer src="<%= publicPath %>/static/module-remix-run.ae6d33c5.js"></script><script defer src="<%= publicPath %>/static/vendor.70a3bb94.js"></script><script defer src="<%= publicPath %>/static/main.70a3bb94.js"></script></head>
45
+ <meta name="backstage-app-mode" content="public"><meta name="backstage-public-path" content="<%= publicPath %>/"><script defer src="<%= publicPath %>/static/runtime.d824a551.js"></script><script defer src="<%= publicPath %>/static/module-material-ui.557c1930.js"></script><script defer src="<%= publicPath %>/static/module-lodash.05581125.js"></script><script defer src="<%= publicPath %>/static/module-date-fns.c633d602.js"></script><script defer src="<%= publicPath %>/static/module-mui.f702282a.js"></script><script defer src="<%= publicPath %>/static/module-material-table.00de7997.js"></script><script defer src="<%= publicPath %>/static/module-react-dom.42a304d3.js"></script><script defer src="<%= publicPath %>/static/module-zod.4f2eeb8c.js"></script><script defer src="<%= publicPath %>/static/module-i18next.f50c1612.js"></script><script defer src="<%= publicPath %>/static/module-react-beautiful-dnd.e9f14677.js"></script><script defer src="<%= publicPath %>/static/module-remix-run.ae6d33c5.js"></script><script defer src="<%= publicPath %>/static/vendor.d824a551.js"></script><script defer src="<%= publicPath %>/static/main.d824a551.js"></script></head>
46
46
  <body>
47
47
  <noscript>You need to enable JavaScript to run this app.</noscript>
48
48
  <div id="root"></div>
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[2177],{48514:(z,C,t)=>{t.d(C,{M:()=>E});var e=t(31085),g=t(58837),x=t(71677),v=t(72501);const O=(0,g.A)({container:{overflow:"visible !important"},typo:{fontSize:"inherit",overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box","-webkit-line-clamp":({line:y})=>y||1,"-webkit-box-orient":"vertical"}},{name:"BackstageOverflowTooltip"});function E(y){const M=O(y);return(0,e.jsx)(x.Ay,{title:y.title??(y.text||""),placement:y.placement,children:(0,e.jsx)(v.A,{className:M.typo,variant:"inherit",children:y.text})})}},35773:(z,C,t)=>{t.d(C,{C4:()=>v,tS:()=>E});var e=t(14117);const g="catalog-entity",x=(0,e.i)({name:"catalog.entity.read",attributes:{action:"read"},resourceType:g}),v=(0,e.i)({name:"catalog.entity.create",attributes:{action:"create"}}),O=(0,e.i)({name:"catalog.entity.delete",attributes:{action:"delete"},resourceType:g}),E=(0,e.i)({name:"catalog.entity.refresh",attributes:{action:"update"},resourceType:g}),y=(0,e.i)({name:"catalog.entity.validate",attributes:{}}),M=(0,e.i)({name:"catalog.location.read",attributes:{action:"read"}}),b=(0,e.i)({name:"catalog.location.create",attributes:{action:"create"}}),K=(0,e.i)({name:"catalog.location.analyze",attributes:{}}),R=(0,e.i)({name:"catalog.location.delete",attributes:{action:"delete"}}),Y=[x,v,O,E,y,M,b,R,K]},90759:(z,C,t)=>{t.d(C,{W:()=>g});var e=t(93184);const g=(0,e.h)({id:"catalog",messages:{indexPage:{title:"{{orgName}} Catalog",createButtonTitle:"Create",supportButtonContent:"All your software catalog entities"},aboutCard:{title:"About",refreshButtonTitle:"Schedule entity refresh",editButtonTitle:"Edit Metadata",createSimilarButtonTitle:"Create something similar",refreshScheduledMessage:"Refresh scheduled",launchTemplate:"Launch Template",viewTechdocs:"View TechDocs",viewSource:"View Source",descriptionField:{label:"Description",value:"No description"},ownerField:{label:"Owner",value:"No Owner"},domainField:{label:"Domain",value:"No Domain"},systemField:{label:"System",value:"No System"},parentComponentField:{label:"Parent Component",value:"No Parent Component"},typeField:{label:"Type"},lifecycleField:{label:"Lifecycle"},tagsField:{label:"Tags",value:"No Tags"},targetsField:{label:"Targets"}},searchResultItem:{lifecycle:"Lifecycle",Owner:"Owner"},catalogTable:{warningPanelTitle:"Could not fetch catalog entities.",viewActionTitle:"View",editActionTitle:"Edit",starActionTitle:"Add to favorites",unStarActionTitle:"Remove from favorites"},dependencyOfComponentsCard:{title:"Dependency of components",emptyMessage:"No component depends on this component"},dependsOnComponentsCard:{title:"Depends on components",emptyMessage:"No component is a dependency of this component"},dependsOnResourcesCard:{title:"Depends on resources",emptyMessage:"No resource is a dependency of this component"},entityContextMenu:{copiedMessage:"Copied!",moreButtonTitle:"More",inspectMenuTitle:"Inspect entity",copyURLMenuTitle:"Copy entity URL",unregisterMenuTitle:"Unregister entity"},entityLabelsCard:{title:"Labels",emptyDescription:"No labels defined for this entity. You can add labels to your entity YAML as shown in the highlighted example below:",readMoreButtonTitle:"Read more"},entityLabels:{warningPanelTitle:"Entity not found",ownerLabel:"Owner",lifecycleLabel:"Lifecycle"},entityLinksCard:{title:"Links",emptyDescription:"No links defined for this entity. You can add links to your entity YAML as shown in the highlighted example below:",readMoreButtonTitle:"Read more"},entityNotFound:{title:"Entity was not found",description:"Want to help us build this? Check out our Getting Started documentation.",docButtonTitle:"DOCS"},deleteEntity:{dialogTitle:"Are you sure you want to delete this entity?",deleteButtonTitle:"Delete",cancelButtonTitle:"Cancel",description:"This entity is not referenced by any location and is therefore not receiving updates. Click here to delete."},entityProcessingErrorsDescription:"The error below originates from",entityRelationWarningDescription:`This entity has relations to other entities, which can't be found in the catalog.
2
- Entities not found are: `,hasComponentsCard:{title:"Has components",emptyMessage:"No component is part of this system"},hasResourcesCard:{title:"Has resources",emptyMessage:"No resource is part of this system"},hasSubcomponentsCard:{title:"Has subcomponents",emptyMessage:"No subcomponent is part of this component"},hasSubdomainsCard:{title:"Has subdomains",emptyMessage:"No subdomain is part of this domain"},hasSystemsCard:{title:"Has systems",emptyMessage:"No system is part of this domain"},relatedEntitiesCard:{emptyHelpLinkTitle:"Learn how to change this"},systemDiagramCard:{title:"System Diagram",description:"Use pinch & zoom to move around the diagram.",edgeLabels:{partOf:"part of",provides:"provides",dependsOn:"depends on"}}}})},62177:(z,C,t)=>{t.r(C),t.d(C,{BaseCatalogPage:()=>Ce,CatalogPage:()=>xt,DefaultCatalogPage:()=>ve});var e=t(31085),g=t(18690),x=t(27155),v=t(26280),O=t(59428),E=t(64947),y=t(29365),M=t(5893),b=t(73657),K=t(25534);function R(n){const{title:a,to:s}=n,i=(0,M.A)(o=>o.breakpoints.down("xs"));return s?i?(0,e.jsx)(y.A,{component:b.N_,color:"primary",title:a,size:"small",to:s,children:(0,e.jsx)(K.A,{})}):(0,e.jsx)(E.A,{component:b.N_,variant:"contained",color:"primary",to:s,children:a}):null}var Y=t(27586),w=t(72427),xe=t(65461),Pe=t(9222),F=t(21405),k=t(54203),te=t(66917),ne=t(36017),Q=t(10394),m=t(14041),N=t(92822),ae=t(73466),se=t(7341);function Ae(){const n=(0,w.gf)(se.v),{error:a,loading:s,value:i}=(0,ae.A)(async()=>{const{facets:o}=await n.getEntityFacets({facets:["kind"]}),l=(o.kind??[]).map(r=>r.value);return new Map(l.map(r=>[r.toLocaleLowerCase("en-US"),r]))},[n]);return{loading:s,error:a,allKinds:i??new Map}}function Ee(n,a,s){let i=Array.from(n.keys());a&&(i=a.map(l=>l.toLocaleLowerCase("en-US")).filter(l=>n.has(l)));const o=new Map(i.map(l=>[l,n.get(l)||l]));return s&&!o.has(s)&&o.set(s.toLocaleLowerCase("en-US"),s),o}var I=t(64630),j=t(87849);function je(n){const{filters:a,queryParameters:{kind:s},updateFilters:i}=(0,F.nK)(),o=(0,m.useMemo)(()=>[s].flat()[0],[s]),[l,r]=(0,m.useState)(o??a.kind?.value??n.initialFilter);(0,m.useEffect)(()=>{o&&r(o)},[o]),(0,m.useEffect)(()=>{a.kind?.value&&r(a.kind?.value)},[a.kind]);const{allKinds:c,loading:d,error:p}=Ae(),u=c.get(l)||l;return(0,m.useEffect)(()=>{i({kind:l?new N.gM(l,u):void 0})},[l,u,i]),{loading:d,error:p,allKinds:c,selectedKind:l,setSelectedKind:r}}const Le=n=>{const{allowedKinds:a,hidden:s,initialFilter:i="component"}=n,{t:o}=(0,j.i)(I.j),l=(0,w.gf)(ne.k),{error:r,allKinds:c,selectedKind:d,setSelectedKind:p}=je({initialFilter:i});if((0,m.useEffect)(()=>{r&&l.post({message:o("entityKindPicker.errorMessage"),severity:"error"})},[r,l,o]),r)return null;const T=[...Ee(c,a,d).entries()].map(([h,S])=>({label:S,value:h}));return s?null:(0,e.jsx)(Q.A,{pb:1,pt:1,children:(0,e.jsx)(te.w,{label:o("entityKindPicker.title"),items:T,selected:d.toLocaleLowerCase("en-US"),onChange:h=>p(String(h))})})};var W=t(58837),oe=t(47144);const Oe=(0,W.A)({input:{}},{name:"CatalogReactEntityLifecyclePicker"}),Me=n=>{const{initialFilter:a=[]}=n,s=Oe(),{t:i}=(0,j.i)(I.j);return(0,e.jsx)(oe.y,{label:i("entityLifecyclePicker.title"),name:"lifecycles",path:"spec.lifecycle",Filter:N.I5,InputProps:{className:s.input},initialSelectedOptions:a})},be=(0,W.A)({input:{}},{name:"CatalogReactEntityNamespacePicker"}),Re=n=>{const{initiallySelectedNamespaces:a}=n,s=be(),{t:i}=(0,j.i)(I.j);return(0,e.jsx)(oe.y,{label:i("entityNamespacePicker.title"),name:"namespace",path:"metadata.namespace",Filter:N.z,InputProps:{className:s.input},initialSelectedOptions:a})};var Fe=t(72987),Ne=t(69076),Be=t(86901),De=t(44148),Ke=t(41260),Ie=t(22995);const Ue=(0,W.A)({root:{},input:{},label:{}},{name:"CatalogReactEntityProcessingStatusPickerPicker"}),ze=(0,e.jsx)(Ke.A,{fontSize:"small"}),we=(0,e.jsx)(De.A,{fontSize:"small"}),We=()=>{const n=Ue(),{updateFilters:a}=(0,F.nK)(),{t:s}=(0,j.i)(I.j),[i,o]=(0,m.useState)([]);function l(d){a({orphan:d?new N.Kf(d):void 0})}function r(d){a({error:d?new N.mT(d):void 0})}const c=["Is Orphan","Has Error"];return(0,e.jsx)(Q.A,{className:n.root,pb:1,pt:1,children:(0,e.jsx)(Ie.Q,{label:s("entityProcessingStatusPicker.title"),multiple:!0,disableCloseOnSelect:!0,options:c,value:i,onChange:(d,p)=>{o(p),l(p.includes("Is Orphan")),r(p.includes("Has Error"))},renderOption:(d,{selected:p})=>(0,e.jsx)(Be.A,{control:(0,e.jsx)(Ne.A,{icon:ze,checkedIcon:we,checked:p}),onClick:u=>u.preventDefault(),label:d}),name:"processing-status-picker",LabelProps:{className:n.label},TextFieldProps:{className:n.input}})})};var He=t(91035),Ve=t(46343),Ye=t.n(Ve),Ge=t(40074),Xe=t.n(Ge);function ke(){const n=(0,w.gf)(se.v),{filters:{kind:a,type:s},queryParameters:{type:i},updateFilters:o}=(0,F.nK)(),l=(0,m.useMemo)(()=>[i].flat().filter(Boolean),[i]),[r,c]=(0,m.useState)(l.length?l:s?.getTypes()??[]);(0,m.useEffect)(()=>{l.length&&c(l)},[l]);const[d,p]=(0,m.useState)([]),u=(0,m.useMemo)(()=>a?.value,[a]),{error:T,loading:h,value:S}=(0,ae.A)(async()=>u?await n.getEntityFacets({filter:{kind:u},facets:["spec.type"]}).then(P=>P.facets["spec.type"]||[]):[],[u,n]),V=(0,m.useRef)(S);return(0,m.useEffect)(()=>{const U=V.current;if(V.current=S,h||!u||U===S||!S)return;const P=[...new Set(Xe()(S,B=>-B.count).map(B=>B.value.toLocaleLowerCase("en-US")))];p(P);const X=r.filter(B=>P.includes(B));Ye()(r,X)||c(X)},[h,u,r,c,S]),(0,m.useEffect)(()=>{o({type:r.length?new N.qA(r):void 0})},[r,o]),{loading:h,error:T,availableTypes:d,selectedTypes:r,setSelectedTypes:c}}const Qe=n=>{const{hidden:a,initialFilter:s}=n,i=(0,w.gf)(ne.k),{error:o,availableTypes:l,selectedTypes:r,setSelectedTypes:c}=ke(),{t:d}=(0,j.i)(I.j);if((0,m.useEffect)(()=>{o&&i.post({message:d("entityTypePicker.errorMessage"),severity:"error"}),s&&c([s])},[o,i,s,c,d]),l.length===0||o)return null;l.sort((u,T)=>u.toLocaleLowerCase("en-US").localeCompare(T.toLocaleLowerCase("en-US")));const p=[{value:"all",label:d("entityTypePicker.optionAllTitle")},...l.map(u=>({value:u,label:u}))];return a?null:(0,e.jsx)(Q.A,{pb:1,pt:1,children:(0,e.jsx)(te.w,{label:d("entityTypePicker.title"),items:p,selected:(p.length>1?r[0]:void 0)??"all",onChange:u=>c(u==="all"?[]:[String(u)])})})};var Je=t(67626);const $e=n=>{const{initialKind:a,initiallySelectedFilter:s,ownerPickerMode:i,initiallySelectedNamespaces:o}=n;return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(Le,{initialFilter:a}),(0,e.jsx)(Qe,{}),(0,e.jsx)(Je.y,{initialFilter:s}),(0,e.jsx)(Fe.t,{mode:i}),(0,e.jsx)(Me,{}),(0,e.jsx)(He.m,{}),(0,e.jsx)(We,{}),(0,e.jsx)(Re,{initiallySelectedNamespaces:o})]})};var Ze=t(95203),ie=t(72348),le=t(51372),qe=t(6820),_e=t(88640),et=t(77310),J=t(14209),H=t(90184),tt=t(56889),re=t(67871),$=t(72501),ce=t(88654),nt=t(75625),at=t(39330),st=t(45250),ot=t(65398),it=t.n(ot),lt=t(8859),de=t(34428),ue=t(67720),me=t(48514);const f=Object.freeze({createNameColumn(n){function a(s){return s.metadata?.title||(0,H.S)(s,{defaultKind:n?.defaultKind})}return{title:"Name",field:"resolved.entityRef",highlight:!0,customSort({entity:s},{entity:i}){return a(s).localeCompare(a(i))},render:({entity:s})=>(0,e.jsx)(lt.z,{entityRef:s,defaultKind:n?.defaultKind||"Component"})}},createSystemColumn(){return{title:"System",field:"resolved.partOfSystemRelationTitle",customFilterAndSearch:(n,a)=>a.resolved.partOfSystemRelations?a.resolved.partOfSystemRelations.map(o=>o.name).join(", ").toLocaleUpperCase("en-US").includes(n.toLocaleUpperCase("en-US")):!1,render:({resolved:n})=>(0,e.jsx)(de.i,{entityRefs:n.partOfSystemRelations,defaultKind:"system"})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:n})=>(0,e.jsx)(de.i,{entityRefs:n.ownedByRelations,defaultKind:"group"})}},createSpecTargetsColumn(){return{title:"Targets",field:"entity.spec.targets",customFilterAndSearch:(n,a)=>{let s=[];return a.entity?.spec?.targets&&Array.isArray(a.entity?.spec?.targets)?s=a.entity?.spec?.targets:a.entity?.spec?.target&&(s=[a.entity?.spec?.target]),s.join(", ").toLocaleUpperCase("en-US").includes(n.toLocaleUpperCase("en-US"))},render:({entity:n})=>(0,e.jsx)(e.Fragment,{children:(n?.spec?.targets||n?.spec?.target)&&(0,e.jsx)(me.M,{text:(n.spec.targets||[n.spec.target]).join(", "),placement:"bottom-start"})})}},createSpecTypeColumn(n={hidden:!1}){return{title:"Type",field:"entity.spec.type",hidden:n.hidden,width:"auto"}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"entity.spec.lifecycle"}},createMetadataDescriptionColumn(){return{title:"Description",field:"entity.metadata.description",render:({entity:n})=>(0,e.jsx)(me.M,{text:n.metadata.description,placement:"bottom-start"}),width:"auto"}},createTagsColumn(){return{title:"Tags",field:"entity.metadata.tags",cellStyle:{padding:"0px 16px 0px 20px"},render:({entity:n})=>(0,e.jsx)(e.Fragment,{children:n.metadata.tags&&n.metadata.tags.map(a=>(0,e.jsx)(ue.A,{label:a,size:"small",variant:"outlined",style:{marginBottom:"0px"}},a))}),width:"auto"}},createTitleColumn(n){return{title:"Title",field:"entity.metadata.title",hidden:n?.hidden,searchable:!0}},createLabelColumn(n,a){function s(i,o){const l=o.metadata?.labels;return l&&l[i]||""}return{title:a?.title||"Label",field:"entity.metadata.labels",cellStyle:{padding:"0px 16px 0px 20px"},customSort({entity:i},{entity:o}){return s(n,i).localeCompare(s(n,o))},render:({entity:i})=>{const o=i.metadata?.labels,l=o&&o[n]||a?.defaultValue;return(0,e.jsx)(e.Fragment,{children:l&&(0,e.jsx)(ue.A,{label:l,size:"small",variant:"outlined"},l)})},width:"auto"}},createNamespaceColumn(){return{title:"Namespace",field:"entity.metadata.namespace",width:"auto"}}});var rt=t(95061),ct=t(63301),pe=t(34839),ge=t(75173),dt=t(64704),ut=t(45917),mt=t(16983);const pt=(0,W.A)(n=>({searchToolbar:{paddingLeft:0,paddingRight:0},input:{}}),{name:"CatalogReactEntitySearchBar"}),gt=()=>{const n=pt(),{t:a}=(0,j.i)(I.j),{updateFilters:s,queryParameters:{text:i}}=(0,F.nK)(),o=(0,m.useMemo)(()=>[i].flat()[0],[i]),[l,r]=(0,m.useState)(o??"");return(0,mt.A)(()=>{s({text:l.length?new N.V3(l):void 0})},250,[l,s]),(0,m.useEffect)(()=>{o&&r(o)},[o]),(0,e.jsx)(ge.A,{className:n.searchToolbar,children:(0,e.jsx)(rt.A,{children:(0,e.jsx)(ct.A,{"aria-label":"search",id:"input-with-icon-adornment",className:n.input,placeholder:a("entitySearchBar.placeholder"),autoComplete:"off",onChange:c=>r(c.target.value),value:l,startAdornment:(0,e.jsx)(pe.A,{position:"start",children:(0,e.jsx)(ut.A,{})}),endAdornment:(0,e.jsx)(pe.A,{position:"end",children:(0,e.jsx)(y.A,{"aria-label":"clear search",onClick:()=>r(""),edge:"end",disabled:l.length===0,children:(0,e.jsx)(dt.A,{})})})})})})},yt=(0,W.A)(n=>({root:{paddingTop:n.spacing(1.25),paddingLeft:n.spacing(2.5),paddingBottom:n.spacing(.75),display:"flex",justifyContent:"space-between"},text:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}),{name:"PluginCatalogTableToolbar"});function ye(n){const a=yt();return(0,e.jsxs)(ge.A,{className:a.root,children:[(0,e.jsx)($.A,{variant:"h5",className:a.text,children:n.title}),(0,e.jsx)(gt,{})]})}function ft(n){const{columns:a,data:s,options:i,...o}=n,{setLimit:l,setOffset:r,limit:c,totalItems:d,offset:p}=(0,F.nK)(),[u,T]=(0,m.useState)(p&&c?Math.floor(p/c):0);return(0,m.useEffect)(()=>{d&&u*c>=d?r(Math.max(0,d-c)):r(Math.max(0,u*c))},[r,u,c,d]),(0,e.jsx)(J.X,{columns:a,data:s,options:{paginationPosition:"both",pageSizeOptions:[5,10,20,50,100],pageSize:c,emptyRowsWhenPaging:!1,...i},components:{Toolbar:ye},page:u,onPageChange:h=>{T(h)},onRowsPerPageChange:h=>{l(h)},totalCount:d,localization:{pagination:{labelDisplayedRows:""}},...o})}function ht(n){const{columns:a,data:s,next:i,prev:o,options:l,...r}=n;return(0,e.jsx)(J.X,{columns:a,data:s,options:{paginationPosition:"both",...l,pageSizeOptions:[],showFirstLastPageButtons:!1,pageSize:Number.MAX_SAFE_INTEGER,emptyRowsWhenPaging:!1},onPageChange:c=>{c>0?i?.():o?.()},components:{Toolbar:ye},page:o?1:0,totalCount:i?Number.MAX_VALUE:Number.MAX_SAFE_INTEGER,localization:{pagination:{labelDisplayedRows:""}},...r})}const fe=({filters:n,entities:a})=>{const s=n.type===void 0;return[f.createTitleColumn({hidden:!0}),f.createNameColumn({defaultKind:n.kind?.value}),...i()];function i(){const o=[f.createMetadataDescriptionColumn(),f.createTagsColumn()],l=[f.createSystemColumn(),f.createOwnerColumn(),f.createSpecTypeColumn({hidden:!s}),f.createSpecLifecycleColumn()];switch(n.kind?.value){case"user":return[...o];case"domain":case"system":return[f.createOwnerColumn(),...o];case"group":case"template":return[f.createSpecTypeColumn({hidden:!s}),...o];case"location":return[f.createSpecTypeColumn({hidden:!s}),f.createSpecTargetsColumn()];default:return a.every(r=>r.metadata.namespace==="default")?[...l,...o]:[...l,f.createNamespaceColumn(),...o]}}};var he=t(90759),Ct=t(18956);const vt=(n,a)=>{const s=i=>i.metadata.title||(0,H.S)(i,{defaultKind:"Component"});return s(n).localeCompare(s(a))},G=n=>{const{columns:a=fe,tableOptions:s,subtitle:i,emptyContent:o}=n,{isStarredEntity:l,toggleStarredEntity:r}=(0,tt.I)(),c=(0,F.nK)(),{loading:d,error:p,entities:u,filters:T,pageInfo:h,totalItems:S,paginationMode:V}=c,U=(0,m.useMemo)(()=>typeof a=="function"?a(c):a,[a,c]),{t:P}=(0,j.i)(he.W);if(p)return(0,e.jsx)("div",{children:(0,e.jsx)(_e.B,{severity:"error",title:P("catalogTable.warningPanelTitle"),children:(0,e.jsx)(et.z,{language:"text",text:p.toString()})})});const X=[({entity:L})=>{const A=L.metadata.annotations?.[ie._P],D=P("catalogTable.viewActionTitle");return{icon:()=>(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)($.A,{style:ce.A,children:D}),(0,e.jsx)(at.A,{fontSize:"small"})]}),tooltip:D,disabled:!A,onClick:()=>{A&&window.open(A,"_blank")}}},({entity:L})=>{const A=L.metadata.annotations?.[ie.P],D=P("catalogTable.editActionTitle");return{icon:()=>(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)($.A,{style:ce.A,children:D}),(0,e.jsx)(nt.A,{fontSize:"small"})]}),tooltip:D,disabled:!A,onClick:()=>{A&&window.open(A,"_blank")}}},({entity:L})=>{const A=l(L),D=P(A?"catalogTable.unStarActionTitle":"catalogTable.starActionTitle");return{cellStyle:{paddingLeft:"1em"},icon:()=>(0,e.jsx)(Ct.m,{isFavorite:A}),tooltip:D,onClick:()=>r(L)}}],B=T.kind?.label||"",Pt=T.type?.value||"",At=typeof S=="number"?`(${S})`:"",Et=(0,st.capitalize)(T.user?.value??"all"),q=n.title||[Et,Pt,it()(B),At].filter(L=>L).join(" "),_=n.actions||X,ee={actionsColumnIndex:-1,loadingType:"linear",showEmptyDataSourceMessage:!d,padding:"dense",...s};if(V==="cursor")return(0,e.jsx)(ht,{columns:U,emptyContent:o,isLoading:d,title:q,actions:_,subtitle:i,options:ee,data:u.map(Z),next:h?.next,prev:h?.prev});if(V==="offset")return(0,e.jsx)(ft,{columns:U,emptyContent:o,isLoading:d,title:q,actions:_,subtitle:i,options:ee,data:u.map(Z)});const Te=u.sort(vt).map(Z),Se=20,jt=Te.length>Se;return(0,e.jsx)(J.X,{isLoading:d,columns:U,options:{paging:jt,pageSize:Se,pageSizeOptions:[20,50,100],...ee},title:q,data:Te,actions:_,subtitle:i,emptyContent:o})};G.columns=f,G.defaultColumnsFunc=fe;function Z(n){const a=(0,re.t)(n,le.jn,{kind:"system"}),s=(0,re.t)(n,le.vv);return{entity:n,resolved:{name:(0,H.S)(n,{defaultKind:"Component"}),entityRef:(0,qe.U2)(n),ownedByRelationsTitle:s.map(i=>(0,H.S)(i,{defaultKind:"group"})).join(", "),ownedByRelations:s,partOfSystemRelationTitle:a.map(i=>(0,H.S)(i,{defaultKind:"system"})).join(", "),partOfSystemRelations:a}}}var Tt=t(35773),St=t(39292);function Ce(n){const{filters:a,content:s=(0,e.jsx)(G,{}),pagination:i}=n,o=(0,w.gf)(xe.U).getOptionalString("organization.name")??"Backstage",l=(0,Pe.S)(Ze.qP),{t:r}=(0,j.i)(he.W),{allowed:c}=(0,St.J)({permission:Tt.C4});return(0,e.jsx)(x.d,{title:r("indexPage.title",{orgName:o}),themeId:"home",children:(0,e.jsxs)(v.U,{children:[(0,e.jsxs)(O.d,{title:"",children:[c&&(0,e.jsx)(R,{title:r("indexPage.createButtonTitle"),to:l&&l()}),(0,e.jsx)(Y.Y,{children:r("indexPage.supportButtonContent")})]}),(0,e.jsx)(F.B9,{pagination:i,children:(0,e.jsxs)(k.GI,{children:[(0,e.jsx)(k.GI.Filters,{children:a}),(0,e.jsx)(k.GI.Content,{children:s})]})})]})})}function ve(n){const{columns:a,actions:s,initiallySelectedFilter:i="owned",initialKind:o="component",tableOptions:l={},emptyContent:r,pagination:c,ownerPickerMode:d,filters:p,initiallySelectedNamespaces:u}=n;return(0,e.jsx)(Ce,{filters:p??(0,e.jsx)($e,{initialKind:o,initiallySelectedFilter:i,ownerPickerMode:d,initiallySelectedNamespaces:u}),content:(0,e.jsx)(G,{columns:a,actions:s,tableOptions:l,emptyContent:r}),pagination:c})}function xt(n){return(0,g.P1)()||(0,e.jsx)(ve,{...n})}},14117:(z,C,t)=>{t.d(C,{i:()=>e});function e({name:g,attributes:x,resourceType:v}){return v?{type:"resource",name:g,attributes:x,resourceType:v}:{type:"basic",name:g,attributes:x}}},39292:(z,C,t)=>{t.d(C,{J:()=>E});var e=t(72427),g=t(96824),x=t(13646),v=t(54241),O=t(68721);function E(y){const M=(0,e.gf)(g.x),{data:b,error:K}=(0,O.Ay)(y,async R=>{if((0,x.OL)(R.permission)&&!R.resourceRef)return v.b.DENY;const{result:Y}=await M.authorize(R);return Y});return K?{error:K,loading:!1,allowed:!1}:b===void 0?{loading:!0,allowed:!1}:{loading:!1,allowed:b===v.b.ALLOW}}}}]);})();
1
+ "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[2177],{48514:(z,h,t)=>{t.d(h,{M:()=>E});var e=t(31085),y=t(58837),S=t(71677),C=t(72501);const O=(0,y.A)({container:{overflow:"visible !important"},typo:{fontSize:"inherit",overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box","-webkit-line-clamp":({line:g})=>g||1,"-webkit-box-orient":"vertical"}},{name:"BackstageOverflowTooltip"});function E(g){const M=O(g);return(0,e.jsx)(S.Ay,{title:g.title??(g.text||""),placement:g.placement,children:(0,e.jsx)(C.A,{className:M.typo,variant:"inherit",children:g.text})})}},35773:(z,h,t)=>{t.d(h,{C4:()=>C,tS:()=>E});var e=t(14117);const y="catalog-entity",S=(0,e.i)({name:"catalog.entity.read",attributes:{action:"read"},resourceType:y}),C=(0,e.i)({name:"catalog.entity.create",attributes:{action:"create"}}),O=(0,e.i)({name:"catalog.entity.delete",attributes:{action:"delete"},resourceType:y}),E=(0,e.i)({name:"catalog.entity.refresh",attributes:{action:"update"},resourceType:y}),g=(0,e.i)({name:"catalog.entity.validate",attributes:{}}),M=(0,e.i)({name:"catalog.location.read",attributes:{action:"read"}}),b=(0,e.i)({name:"catalog.location.create",attributes:{action:"create"}}),K=(0,e.i)({name:"catalog.location.analyze",attributes:{}}),R=(0,e.i)({name:"catalog.location.delete",attributes:{action:"delete"}}),Y=[S,C,O,E,g,M,b,R,K]},90759:(z,h,t)=>{t.d(h,{W:()=>y});var e=t(93184);const y=(0,e.h)({id:"catalog",messages:{indexPage:{title:"{{orgName}} Catalog",createButtonTitle:"Create",supportButtonContent:"All your software catalog entities"},aboutCard:{title:"About",refreshButtonTitle:"Schedule entity refresh",editButtonTitle:"Edit Metadata",createSimilarButtonTitle:"Create something similar",refreshScheduledMessage:"Refresh scheduled",launchTemplate:"Launch Template",viewTechdocs:"View TechDocs",viewSource:"View Source",descriptionField:{label:"Description",value:"No description"},ownerField:{label:"Owner",value:"No Owner"},domainField:{label:"Domain",value:"No Domain"},systemField:{label:"System",value:"No System"},parentComponentField:{label:"Parent Component",value:"No Parent Component"},typeField:{label:"Type"},lifecycleField:{label:"Lifecycle"},tagsField:{label:"Tags",value:"No Tags"},targetsField:{label:"Targets"}},searchResultItem:{lifecycle:"Lifecycle",Owner:"Owner"},catalogTable:{warningPanelTitle:"Could not fetch catalog entities.",viewActionTitle:"View",editActionTitle:"Edit",starActionTitle:"Add to favorites",unStarActionTitle:"Remove from favorites"},dependencyOfComponentsCard:{title:"Dependency of components",emptyMessage:"No component depends on this component"},dependsOnComponentsCard:{title:"Depends on components",emptyMessage:"No component is a dependency of this component"},dependsOnResourcesCard:{title:"Depends on resources",emptyMessage:"No resource is a dependency of this component"},entityContextMenu:{copiedMessage:"Copied!",moreButtonTitle:"More",inspectMenuTitle:"Inspect entity",copyURLMenuTitle:"Copy entity URL",unregisterMenuTitle:"Unregister entity"},entityLabelsCard:{title:"Labels",emptyDescription:"No labels defined for this entity. You can add labels to your entity YAML as shown in the highlighted example below:",readMoreButtonTitle:"Read more"},entityLabels:{warningPanelTitle:"Entity not found",ownerLabel:"Owner",lifecycleLabel:"Lifecycle"},entityLinksCard:{title:"Links",emptyDescription:"No links defined for this entity. You can add links to your entity YAML as shown in the highlighted example below:",readMoreButtonTitle:"Read more"},entityNotFound:{title:"Entity was not found",description:"Want to help us build this? Check out our Getting Started documentation.",docButtonTitle:"DOCS"},deleteEntity:{dialogTitle:"Are you sure you want to delete this entity?",deleteButtonTitle:"Delete",cancelButtonTitle:"Cancel",description:"This entity is not referenced by any location and is therefore not receiving updates. Click here to delete."},entityProcessingErrorsDescription:"The error below originates from",entityRelationWarningDescription:`This entity has relations to other entities, which can't be found in the catalog.
2
+ Entities not found are: `,hasComponentsCard:{title:"Has components",emptyMessage:"No component is part of this system"},hasResourcesCard:{title:"Has resources",emptyMessage:"No resource is part of this system"},hasSubcomponentsCard:{title:"Has subcomponents",emptyMessage:"No subcomponent is part of this component"},hasSubdomainsCard:{title:"Has subdomains",emptyMessage:"No subdomain is part of this domain"},hasSystemsCard:{title:"Has systems",emptyMessage:"No system is part of this domain"},relatedEntitiesCard:{emptyHelpLinkTitle:"Learn how to change this"},systemDiagramCard:{title:"System Diagram",description:"Use pinch & zoom to move around the diagram.",edgeLabels:{partOf:"part of",provides:"provides",dependsOn:"depends on"}}}})},62177:(z,h,t)=>{t.r(h),t.d(h,{BaseCatalogPage:()=>Ce,CatalogPage:()=>xt,DefaultCatalogPage:()=>ve});var e=t(31085),y=t(18690),S=t(27155),C=t(26280),O=t(59428),E=t(64947),g=t(29365),M=t(5893),b=t(73657),K=t(25534);function R(n){const{title:a,to:s}=n,i=(0,M.A)(o=>o.breakpoints.down("xs"));return s?i?(0,e.jsx)(g.A,{component:b.N_,color:"primary",title:a,size:"small",to:s,children:(0,e.jsx)(K.A,{})}):(0,e.jsx)(E.A,{component:b.N_,variant:"contained",color:"primary",to:s,children:a}):null}var Y=t(27586),w=t(72427),xe=t(65461),Pe=t(9222),F=t(21405),k=t(54203),te=t(66917),ne=t(36017),Q=t(10394),m=t(14041),N=t(92822),ae=t(73466),se=t(7341);function Ae(){const n=(0,w.gf)(se.v),{error:a,loading:s,value:i}=(0,ae.A)(async()=>{const{facets:o}=await n.getEntityFacets({facets:["kind"]}),l=(o.kind??[]).map(r=>r.value);return new Map(l.map(r=>[r.toLocaleLowerCase("en-US"),r]))},[n]);return{loading:s,error:a,allKinds:i??new Map}}function Ee(n,a,s){let i=Array.from(n.keys());a&&(i=a.map(l=>l.toLocaleLowerCase("en-US")).filter(l=>n.has(l)));const o=new Map(i.map(l=>[l,n.get(l)||l]));return s&&!o.has(s)&&o.set(s.toLocaleLowerCase("en-US"),s),o}var I=t(64630),j=t(87849);function je(n){const{filters:a,queryParameters:{kind:s},updateFilters:i}=(0,F.nK)(),o=(0,m.useMemo)(()=>[s].flat()[0],[s]),[l,r]=(0,m.useState)(o??a.kind?.value??n.initialFilter);(0,m.useEffect)(()=>{o&&r(o)},[o]),(0,m.useEffect)(()=>{a.kind?.value&&r(a.kind?.value)},[a.kind]);const{allKinds:c,loading:d,error:p}=Ae(),u=c.get(l)||l;return(0,m.useEffect)(()=>{i({kind:l?new N.gM(l,u):void 0})},[l,u,i]),{loading:d,error:p,allKinds:c,selectedKind:l,setSelectedKind:r}}const Le=n=>{const{allowedKinds:a,hidden:s,initialFilter:i="component"}=n,{t:o}=(0,j.i)(I.j),l=(0,w.gf)(ne.k),{error:r,allKinds:c,selectedKind:d,setSelectedKind:p}=je({initialFilter:i});if((0,m.useEffect)(()=>{r&&l.post({message:o("entityKindPicker.errorMessage"),severity:"error"})},[r,l,o]),r)return null;const v=[...Ee(c,a,d).entries()].map(([x,T])=>({label:T,value:x}));return s?null:(0,e.jsx)(Q.A,{pb:1,pt:1,children:(0,e.jsx)(te.w,{label:o("entityKindPicker.title"),items:v,selected:d.toLocaleLowerCase("en-US"),onChange:x=>p(String(x))})})};var W=t(58837),oe=t(47144);const Oe=(0,W.A)({input:{}},{name:"CatalogReactEntityLifecyclePicker"}),Me=n=>{const{initialFilter:a=[]}=n,s=Oe(),{t:i}=(0,j.i)(I.j);return(0,e.jsx)(oe.y,{label:i("entityLifecyclePicker.title"),name:"lifecycles",path:"spec.lifecycle",Filter:N.I5,InputProps:{className:s.input},initialSelectedOptions:a})},be=(0,W.A)({input:{}},{name:"CatalogReactEntityNamespacePicker"}),Re=n=>{const{initiallySelectedNamespaces:a}=n,s=be(),{t:i}=(0,j.i)(I.j);return(0,e.jsx)(oe.y,{label:i("entityNamespacePicker.title"),name:"namespace",path:"metadata.namespace",Filter:N.z,InputProps:{className:s.input},initialSelectedOptions:a})};var Fe=t(72987),Ne=t(69076),Be=t(86901),De=t(44148),Ke=t(41260),Ie=t(22995);const Ue=(0,W.A)({root:{},input:{},label:{}},{name:"CatalogReactEntityProcessingStatusPickerPicker"}),ze=(0,e.jsx)(Ke.A,{fontSize:"small"}),we=(0,e.jsx)(De.A,{fontSize:"small"}),We=()=>{const n=Ue(),{updateFilters:a}=(0,F.nK)(),{t:s}=(0,j.i)(I.j),[i,o]=(0,m.useState)([]);function l(d){a({orphan:d?new N.Kf(d):void 0})}function r(d){a({error:d?new N.mT(d):void 0})}const c=["Is Orphan","Has Error"];return(0,e.jsx)(Q.A,{className:n.root,pb:1,pt:1,children:(0,e.jsx)(Ie.Q,{label:s("entityProcessingStatusPicker.title"),multiple:!0,disableCloseOnSelect:!0,options:c,value:i,onChange:(d,p)=>{o(p),l(p.includes("Is Orphan")),r(p.includes("Has Error"))},renderOption:(d,{selected:p})=>(0,e.jsx)(Be.A,{control:(0,e.jsx)(Ne.A,{icon:ze,checkedIcon:we,checked:p}),onClick:u=>u.preventDefault(),label:d}),name:"processing-status-picker",LabelProps:{className:n.label},TextFieldProps:{className:n.input}})})};var He=t(91035),Ve=t(46343),Ye=t.n(Ve),Ge=t(40074),Xe=t.n(Ge);function ke(){const n=(0,w.gf)(se.v),{filters:{kind:a,type:s},queryParameters:{type:i},updateFilters:o}=(0,F.nK)(),l=(0,m.useMemo)(()=>[i].flat().filter(Boolean),[i]),[r,c]=(0,m.useState)(l.length?l:s?.getTypes()??[]);(0,m.useEffect)(()=>{l.length&&c(l)},[l]);const[d,p]=(0,m.useState)([]),u=(0,m.useMemo)(()=>a?.value,[a]),{error:v,loading:x,value:T}=(0,ae.A)(async()=>u?await n.getEntityFacets({filter:{kind:u},facets:["spec.type"]}).then(P=>P.facets["spec.type"]||[]):[],[u,n]),V=(0,m.useRef)(T);return(0,m.useEffect)(()=>{const U=V.current;if(V.current=T,x||!u||U===T||!T)return;const P=[...new Set(Xe()(T,B=>-B.count).map(B=>B.value.toLocaleLowerCase("en-US")))];p(P);const X=r.filter(B=>P.includes(B));Ye()(r,X)||c(X)},[x,u,r,c,T]),(0,m.useEffect)(()=>{o({type:r.length?new N.qA(r):void 0})},[r,o]),{loading:x,error:v,availableTypes:d,selectedTypes:r,setSelectedTypes:c}}const Qe=n=>{const{hidden:a,initialFilter:s}=n,i=(0,w.gf)(ne.k),{error:o,availableTypes:l,selectedTypes:r,setSelectedTypes:c}=ke(),{t:d}=(0,j.i)(I.j);if((0,m.useEffect)(()=>{o&&i.post({message:d("entityTypePicker.errorMessage"),severity:"error"}),s&&c([s])},[o,i,s,c,d]),l.length===0||o)return null;l.sort((u,v)=>u.toLocaleLowerCase("en-US").localeCompare(v.toLocaleLowerCase("en-US")));const p=[{value:"all",label:d("entityTypePicker.optionAllTitle")},...l.map(u=>({value:u,label:u}))];return a?null:(0,e.jsx)(Q.A,{pb:1,pt:1,children:(0,e.jsx)(te.w,{label:d("entityTypePicker.title"),items:p,selected:(p.length>1?r[0]:void 0)??"all",onChange:u=>c(u==="all"?[]:[String(u)])})})};var Je=t(67626);const $e=n=>{const{initialKind:a,initiallySelectedFilter:s,ownerPickerMode:i,initiallySelectedNamespaces:o}=n;return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(Le,{initialFilter:a}),(0,e.jsx)(Qe,{}),(0,e.jsx)(Je.y,{initialFilter:s}),(0,e.jsx)(Fe.t,{mode:i}),(0,e.jsx)(Me,{}),(0,e.jsx)(He.m,{}),(0,e.jsx)(We,{}),(0,e.jsx)(Re,{initiallySelectedNamespaces:o})]})};var Ze=t(95203),ie=t(72348),le=t(51372),qe=t(6820),_e=t(88640),et=t(77310),J=t(14209),H=t(90184),tt=t(56889),re=t(67871),$=t(72501),ce=t(88654),nt=t(75625),at=t(39330),st=t(45250),ot=t(65398),it=t.n(ot),lt=t(8859),de=t(34428),ue=t(67720),me=t(48514);const f=Object.freeze({createNameColumn(n){function a(s){return s.metadata?.title||(0,H.S)(s,{defaultKind:n?.defaultKind})}return{title:"Name",field:"resolved.entityRef",highlight:!0,customSort({entity:s},{entity:i}){return a(s).localeCompare(a(i))},render:({entity:s})=>(0,e.jsx)(lt.z,{entityRef:s,defaultKind:n?.defaultKind||"Component"})}},createSystemColumn(){return{title:"System",field:"resolved.partOfSystemRelationTitle",customFilterAndSearch:(n,a)=>a.resolved.partOfSystemRelations?a.resolved.partOfSystemRelations.map(o=>o.name).join(", ").toLocaleUpperCase("en-US").includes(n.toLocaleUpperCase("en-US")):!1,render:({resolved:n})=>(0,e.jsx)(de.i,{entityRefs:n.partOfSystemRelations,defaultKind:"system"})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:n})=>(0,e.jsx)(de.i,{entityRefs:n.ownedByRelations,defaultKind:"group"})}},createSpecTargetsColumn(){return{title:"Targets",field:"entity.spec.targets",customFilterAndSearch:(n,a)=>{let s=[];return a.entity?.spec?.targets&&Array.isArray(a.entity?.spec?.targets)?s=a.entity?.spec?.targets:a.entity?.spec?.target&&(s=[a.entity?.spec?.target]),s.join(", ").toLocaleUpperCase("en-US").includes(n.toLocaleUpperCase("en-US"))},render:({entity:n})=>(0,e.jsx)(e.Fragment,{children:(n?.spec?.targets||n?.spec?.target)&&(0,e.jsx)(me.M,{text:(n.spec.targets||[n.spec.target]).join(", "),placement:"bottom-start"})})}},createSpecTypeColumn(n={hidden:!1}){return{title:"Type",field:"entity.spec.type",hidden:n.hidden,width:"auto"}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"entity.spec.lifecycle"}},createMetadataDescriptionColumn(){return{title:"Description",field:"entity.metadata.description",render:({entity:n})=>(0,e.jsx)(me.M,{text:n.metadata.description,placement:"bottom-start"}),width:"auto"}},createTagsColumn(){return{title:"Tags",field:"entity.metadata.tags",cellStyle:{padding:"0px 16px 0px 20px"},render:({entity:n})=>(0,e.jsx)(e.Fragment,{children:n.metadata.tags&&n.metadata.tags.map(a=>(0,e.jsx)(ue.A,{label:a,size:"small",variant:"outlined",style:{marginBottom:"0px"}},a))}),width:"auto"}},createTitleColumn(n){return{title:"Title",field:"entity.metadata.title",hidden:n?.hidden,searchable:!0}},createLabelColumn(n,a){function s(i,o){const l=o.metadata?.labels;return l&&l[i]||""}return{title:a?.title||"Label",field:"entity.metadata.labels",cellStyle:{padding:"0px 16px 0px 20px"},customSort({entity:i},{entity:o}){return s(n,i).localeCompare(s(n,o))},render:({entity:i})=>{const o=i.metadata?.labels,l=o&&o[n]||a?.defaultValue;return(0,e.jsx)(e.Fragment,{children:l&&(0,e.jsx)(ue.A,{label:l,size:"small",variant:"outlined"},l)})},width:"auto"}},createNamespaceColumn(){return{title:"Namespace",field:"entity.metadata.namespace",width:"auto"}}});var rt=t(95061),ct=t(63301),pe=t(34839),ye=t(75173),dt=t(64704),ut=t(45917),mt=t(16983);const pt=(0,W.A)(n=>({searchToolbar:{paddingLeft:0,paddingRight:0},input:{}}),{name:"CatalogReactEntitySearchBar"}),yt=()=>{const n=pt(),{t:a}=(0,j.i)(I.j),{updateFilters:s,queryParameters:{text:i}}=(0,F.nK)(),o=(0,m.useMemo)(()=>[i].flat()[0],[i]),[l,r]=(0,m.useState)(o??"");return(0,mt.A)(()=>{s({text:l.length?new N.V3(l):void 0})},250,[l,s]),(0,m.useEffect)(()=>{o&&r(o)},[o]),(0,e.jsx)(ye.A,{className:n.searchToolbar,children:(0,e.jsx)(rt.A,{children:(0,e.jsx)(ct.A,{"aria-label":"search",id:"input-with-icon-adornment",className:n.input,placeholder:a("entitySearchBar.placeholder"),autoComplete:"off",onChange:c=>r(c.target.value),value:l,startAdornment:(0,e.jsx)(pe.A,{position:"start",children:(0,e.jsx)(ut.A,{})}),endAdornment:(0,e.jsx)(pe.A,{position:"end",children:(0,e.jsx)(g.A,{"aria-label":"clear search",onClick:()=>r(""),edge:"end",disabled:l.length===0,children:(0,e.jsx)(dt.A,{})})})})})})},gt=(0,W.A)(n=>({root:{paddingTop:n.spacing(1.25),paddingLeft:n.spacing(2.5),paddingBottom:n.spacing(.75),display:"flex",justifyContent:"space-between"},text:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}),{name:"PluginCatalogTableToolbar"});function ge(n){const a=gt();return(0,e.jsxs)(ye.A,{className:a.root,children:[(0,e.jsx)($.A,{variant:"h5",className:a.text,children:n.title}),(0,e.jsx)(yt,{})]})}function ft(n){const{columns:a,data:s,options:i,...o}=n,{setLimit:l,setOffset:r,limit:c,totalItems:d,offset:p}=(0,F.nK)(),[u,v]=(0,m.useState)(p&&c?Math.floor(p/c):0);return(0,m.useEffect)(()=>{d&&u*c>=d?r(Math.max(0,d-c)):r(Math.max(0,u*c))},[r,u,c,d]),(0,e.jsx)(J.X,{columns:a,data:s,options:{pageSizeOptions:[5,10,20,50,100],pageSize:c,emptyRowsWhenPaging:!1,...i},components:{Toolbar:ge},page:u,onPageChange:v,onRowsPerPageChange:l,totalCount:d,...o})}function ht(n){const{columns:a,data:s,next:i,prev:o,options:l,...r}=n;return(0,e.jsx)(J.X,{columns:a,data:s,options:{...l,pageSizeOptions:[],showFirstLastPageButtons:!1,pageSize:Number.MAX_SAFE_INTEGER,emptyRowsWhenPaging:!1},onPageChange:c=>{c>0?i?.():o?.()},components:{Toolbar:ge},page:o?1:0,totalCount:i?Number.MAX_VALUE:Number.MAX_SAFE_INTEGER,localization:{pagination:{labelDisplayedRows:""}},...r})}const fe=({filters:n,entities:a})=>{const s=n.type===void 0;return[f.createTitleColumn({hidden:!0}),f.createNameColumn({defaultKind:n.kind?.value}),...i()];function i(){const o=[f.createMetadataDescriptionColumn(),f.createTagsColumn()],l=[f.createSystemColumn(),f.createOwnerColumn(),f.createSpecTypeColumn({hidden:!s}),f.createSpecLifecycleColumn()];switch(n.kind?.value){case"user":return[...o];case"domain":case"system":return[f.createOwnerColumn(),...o];case"group":case"template":return[f.createSpecTypeColumn({hidden:!s}),...o];case"location":return[f.createSpecTypeColumn({hidden:!s}),f.createSpecTargetsColumn()];default:return a.every(r=>r.metadata.namespace==="default")?[...l,...o]:[...l,f.createNamespaceColumn(),...o]}}};var he=t(90759),Ct=t(18956);const vt=(n,a)=>{const s=i=>i.metadata.title||(0,H.S)(i,{defaultKind:"Component"});return s(n).localeCompare(s(a))},G=n=>{const{columns:a=fe,tableOptions:s,subtitle:i,emptyContent:o}=n,{isStarredEntity:l,toggleStarredEntity:r}=(0,tt.I)(),c=(0,F.nK)(),{loading:d,error:p,entities:u,filters:v,pageInfo:x,totalItems:T,paginationMode:V}=c,U=(0,m.useMemo)(()=>typeof a=="function"?a(c):a,[a,c]),{t:P}=(0,j.i)(he.W);if(p)return(0,e.jsx)("div",{children:(0,e.jsx)(_e.B,{severity:"error",title:P("catalogTable.warningPanelTitle"),children:(0,e.jsx)(et.z,{language:"text",text:p.toString()})})});const X=[({entity:L})=>{const A=L.metadata.annotations?.[ie._P],D=P("catalogTable.viewActionTitle");return{icon:()=>(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)($.A,{style:ce.A,children:D}),(0,e.jsx)(at.A,{fontSize:"small"})]}),tooltip:D,disabled:!A,onClick:()=>{A&&window.open(A,"_blank")}}},({entity:L})=>{const A=L.metadata.annotations?.[ie.P],D=P("catalogTable.editActionTitle");return{icon:()=>(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)($.A,{style:ce.A,children:D}),(0,e.jsx)(nt.A,{fontSize:"small"})]}),tooltip:D,disabled:!A,onClick:()=>{A&&window.open(A,"_blank")}}},({entity:L})=>{const A=l(L),D=P(A?"catalogTable.unStarActionTitle":"catalogTable.starActionTitle");return{cellStyle:{paddingLeft:"1em"},icon:()=>(0,e.jsx)(Ct.m,{isFavorite:A}),tooltip:D,onClick:()=>r(L)}}],B=v.kind?.label||"",Pt=v.type?.value||"",At=typeof T=="number"?`(${T})`:"",Et=(0,st.capitalize)(v.user?.value??"all"),q=n.title||[Et,Pt,it()(B),At].filter(L=>L).join(" "),_=n.actions||X,ee={actionsColumnIndex:-1,loadingType:"linear",showEmptyDataSourceMessage:!d,padding:"dense",...s};if(V==="cursor")return(0,e.jsx)(ht,{columns:U,emptyContent:o,isLoading:d,title:q,actions:_,subtitle:i,options:ee,data:u.map(Z),next:x?.next,prev:x?.prev});if(V==="offset")return(0,e.jsx)(ft,{columns:U,emptyContent:o,isLoading:d,title:q,actions:_,subtitle:i,options:ee,data:u.map(Z)});const Te=u.sort(vt).map(Z),Se=20,jt=Te.length>Se;return(0,e.jsx)(J.X,{isLoading:d,columns:U,options:{paging:jt,pageSize:Se,pageSizeOptions:[20,50,100],...ee},title:q,data:Te,actions:_,subtitle:i,emptyContent:o})};G.columns=f,G.defaultColumnsFunc=fe;function Z(n){const a=(0,re.t)(n,le.jn,{kind:"system"}),s=(0,re.t)(n,le.vv);return{entity:n,resolved:{name:(0,H.S)(n,{defaultKind:"Component"}),entityRef:(0,qe.U2)(n),ownedByRelationsTitle:s.map(i=>(0,H.S)(i,{defaultKind:"group"})).join(", "),ownedByRelations:s,partOfSystemRelationTitle:a.map(i=>(0,H.S)(i,{defaultKind:"system"})).join(", "),partOfSystemRelations:a}}}var Tt=t(35773),St=t(39292);function Ce(n){const{filters:a,content:s=(0,e.jsx)(G,{}),pagination:i}=n,o=(0,w.gf)(xe.U).getOptionalString("organization.name")??"Backstage",l=(0,Pe.S)(Ze.qP),{t:r}=(0,j.i)(he.W),{allowed:c}=(0,St.J)({permission:Tt.C4});return(0,e.jsx)(S.d,{title:r("indexPage.title",{orgName:o}),themeId:"home",children:(0,e.jsxs)(C.U,{children:[(0,e.jsxs)(O.d,{title:"",children:[c&&(0,e.jsx)(R,{title:r("indexPage.createButtonTitle"),to:l&&l()}),(0,e.jsx)(Y.Y,{children:r("indexPage.supportButtonContent")})]}),(0,e.jsx)(F.B9,{pagination:i,children:(0,e.jsxs)(k.GI,{children:[(0,e.jsx)(k.GI.Filters,{children:a}),(0,e.jsx)(k.GI.Content,{children:s})]})})]})})}function ve(n){const{columns:a,actions:s,initiallySelectedFilter:i="owned",initialKind:o="component",tableOptions:l={},emptyContent:r,pagination:c,ownerPickerMode:d,filters:p,initiallySelectedNamespaces:u}=n;return(0,e.jsx)(Ce,{filters:p??(0,e.jsx)($e,{initialKind:o,initiallySelectedFilter:i,ownerPickerMode:d,initiallySelectedNamespaces:u}),content:(0,e.jsx)(G,{columns:a,actions:s,tableOptions:l,emptyContent:r}),pagination:c})}function xt(n){return(0,y.P1)()||(0,e.jsx)(ve,{...n})}},14117:(z,h,t)=>{t.d(h,{i:()=>e});function e({name:y,attributes:S,resourceType:C}){return C?{type:"resource",name:y,attributes:S,resourceType:C}:{type:"basic",name:y,attributes:S}}},39292:(z,h,t)=>{t.d(h,{J:()=>E});var e=t(72427),y=t(96824),S=t(13646),C=t(54241),O=t(68721);function E(g){const M=(0,e.gf)(y.x),{data:b,error:K}=(0,O.Ay)(g,async R=>{if((0,S.OL)(R.permission)&&!R.resourceRef)return C.b.DENY;const{result:Y}=await M.authorize(R);return Y});return K?{error:K,loading:!1,allowed:!1}:b===void 0?{loading:!0,allowed:!1}:{loading:!1,allowed:b===C.b.ALLOW}}}}]);})();
3
3
 
4
- //# sourceMappingURL=2177.d7152699.chunk.js.map
4
+ //# sourceMappingURL=2177.68de3516.chunk.js.map