@techdocs/cli 1.10.3-next.2 → 1.10.4-next.0
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 +22 -0
- package/dist/embedded-app/.config-schema.json +67 -69
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/index.html.tmpl +1 -1
- package/dist/embedded-app/static/{1335.4269f82a.chunk.js → 1335.18ed80ea.chunk.js} +2 -2
- package/dist/embedded-app/static/{1335.4269f82a.chunk.js.map → 1335.18ed80ea.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{7186.ea520cfe.chunk.js → 7186.0b7e4914.chunk.js} +2 -2
- package/dist/embedded-app/static/{7186.ea520cfe.chunk.js.map → 7186.0b7e4914.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{main.bb6695ee.js → main.b61055d4.js} +4 -4
- package/dist/embedded-app/static/main.b61055d4.js.map +1 -0
- package/dist/embedded-app/static/main.e1e2baaa.css +2 -0
- package/dist/embedded-app/static/{main.5f8bd308.css.map → main.e1e2baaa.css.map} +1 -1
- package/dist/embedded-app/static/module-material-table.5a3a2d93.js +2 -0
- package/dist/embedded-app/static/{module-material-table.09813bc2.js.map → module-material-table.5a3a2d93.js.map} +1 -1
- package/dist/embedded-app/static/module-material-ui.9517effb.js +2 -0
- package/dist/embedded-app/static/{module-material-ui.bc72d455.js.map → module-material-ui.9517effb.js.map} +1 -1
- package/dist/embedded-app/static/{runtime.0a0ee1fa.js → runtime.e43f5848.js} +2 -2
- package/dist/embedded-app/static/{runtime.0a0ee1fa.js.map → runtime.e43f5848.js.map} +1 -1
- package/dist/embedded-app/static/{vendor.2d7d5373.js → vendor.a4b20610.js} +2 -2
- package/dist/embedded-app/static/{vendor.2d7d5373.js.map → vendor.a4b20610.js.map} +1 -1
- package/dist/package.json.cjs.js +1 -1
- package/package.json +5 -5
- package/dist/embedded-app/static/main.5f8bd308.css +0 -2
- package/dist/embedded-app/static/main.bb6695ee.js.map +0 -1
- package/dist/embedded-app/static/module-material-table.09813bc2.js +0 -2
- package/dist/embedded-app/static/module-material-ui.bc72d455.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @techdocs/cli
|
|
2
2
|
|
|
3
|
+
## 1.10.4-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/backend-defaults@0.14.1-next.0
|
|
9
|
+
- @backstage/catalog-model@1.7.6
|
|
10
|
+
- @backstage/cli-common@0.1.16
|
|
11
|
+
- @backstage/config@1.3.6
|
|
12
|
+
- @backstage/plugin-techdocs-node@1.13.10
|
|
13
|
+
|
|
14
|
+
## 1.10.3
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- 43629b1: Updated to use new utilities from `@backstage/cli-common`.
|
|
19
|
+
- 2bae83a: Bumped dev dependencies `@types/node`
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
- @backstage/backend-defaults@0.14.0
|
|
22
|
+
- @backstage/plugin-techdocs-node@1.13.10
|
|
23
|
+
- @backstage/cli-common@0.1.16
|
|
24
|
+
|
|
3
25
|
## 1.10.3-next.2
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
|
@@ -131,52 +131,6 @@
|
|
|
131
131
|
},
|
|
132
132
|
"packageName": "@backstage/plugin-permission-common"
|
|
133
133
|
},
|
|
134
|
-
{
|
|
135
|
-
"path": "../core-components/config.d.ts",
|
|
136
|
-
"value": {
|
|
137
|
-
"type": "object",
|
|
138
|
-
"properties": {
|
|
139
|
-
"auth": {
|
|
140
|
-
"type": "object",
|
|
141
|
-
"properties": {
|
|
142
|
-
"autologout": {
|
|
143
|
-
"description": "Autologout feature configuration",
|
|
144
|
-
"type": "object",
|
|
145
|
-
"properties": {
|
|
146
|
-
"enabled": {
|
|
147
|
-
"description": "Enable or disable the autologout feature",
|
|
148
|
-
"visibility": "frontend",
|
|
149
|
-
"type": "boolean"
|
|
150
|
-
},
|
|
151
|
-
"idleTimeoutMinutes": {
|
|
152
|
-
"description": "Number of minutes after which the inactive user is logged out automatically.\nDefault is 60 minutes (1 hour)",
|
|
153
|
-
"visibility": "frontend",
|
|
154
|
-
"type": "number"
|
|
155
|
-
},
|
|
156
|
-
"promptBeforeIdleSeconds": {
|
|
157
|
-
"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.",
|
|
158
|
-
"visibility": "frontend",
|
|
159
|
-
"type": "number"
|
|
160
|
-
},
|
|
161
|
-
"useWorkerTimers": {
|
|
162
|
-
"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.",
|
|
163
|
-
"visibility": "frontend",
|
|
164
|
-
"type": "boolean"
|
|
165
|
-
},
|
|
166
|
-
"logoutIfDisconnected": {
|
|
167
|
-
"description": "Enable/disable the automatic logout also on users that are logged in but with no Backstage tabs open.\nDefault is true.",
|
|
168
|
-
"visibility": "frontend",
|
|
169
|
-
"type": "boolean"
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
},
|
|
176
|
-
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
177
|
-
},
|
|
178
|
-
"packageName": "@backstage/core-components"
|
|
179
|
-
},
|
|
180
134
|
{
|
|
181
135
|
"path": "../core-app-api/config.d.ts",
|
|
182
136
|
"value": {
|
|
@@ -404,6 +358,52 @@
|
|
|
404
358
|
},
|
|
405
359
|
"packageName": "@backstage/core-app-api"
|
|
406
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
|
+
},
|
|
407
407
|
{
|
|
408
408
|
"path": "../../plugins/techdocs/config.d.ts",
|
|
409
409
|
"value": {
|
|
@@ -451,7 +451,10 @@
|
|
|
451
451
|
"additionalAllowedURIProtocols": {
|
|
452
452
|
"description": "Allows listed protocols in attributes with URI values\nExample:\n additionalAllowedURIProtocols: ['vscode']\n this will allow all attributes with URI values to have `vscode` protocol like `vscode://some/path` in addition to the default protocols\n matched by DOMPurify's IS_ALLOWED_URI RegExp:",
|
|
453
453
|
"visibility": "frontend",
|
|
454
|
-
"type": "
|
|
454
|
+
"type": "array",
|
|
455
|
+
"items": {
|
|
456
|
+
"type": "string"
|
|
457
|
+
}
|
|
455
458
|
}
|
|
456
459
|
}
|
|
457
460
|
}
|
|
@@ -677,15 +680,22 @@
|
|
|
677
680
|
"deprecated": "Use `token` instead.",
|
|
678
681
|
"type": "string"
|
|
679
682
|
},
|
|
683
|
+
"clientId": {
|
|
684
|
+
"description": "OAuth client ID for Bitbucket Cloud.",
|
|
685
|
+
"visibility": "secret",
|
|
686
|
+
"type": "string"
|
|
687
|
+
},
|
|
688
|
+
"clientSecret": {
|
|
689
|
+
"description": "OAuth client secret for Bitbucket Cloud.",
|
|
690
|
+
"visibility": "secret",
|
|
691
|
+
"type": "string"
|
|
692
|
+
},
|
|
680
693
|
"commitSigningKey": {
|
|
681
694
|
"description": "PGP signing key for signing commits.",
|
|
682
695
|
"visibility": "secret",
|
|
683
696
|
"type": "string"
|
|
684
697
|
}
|
|
685
|
-
}
|
|
686
|
-
"required": [
|
|
687
|
-
"username"
|
|
688
|
-
]
|
|
698
|
+
}
|
|
689
699
|
}
|
|
690
700
|
},
|
|
691
701
|
"bitbucketServer": {
|
|
@@ -847,6 +857,10 @@
|
|
|
847
857
|
"items": {
|
|
848
858
|
"type": "string"
|
|
849
859
|
}
|
|
860
|
+
},
|
|
861
|
+
"publicAccess": {
|
|
862
|
+
"description": "If true, then an installation token will be issued for access when no other token is available.",
|
|
863
|
+
"type": "boolean"
|
|
850
864
|
}
|
|
851
865
|
},
|
|
852
866
|
"required": [
|
|
@@ -2471,25 +2485,9 @@
|
|
|
2471
2485
|
"description": "An optional Valkey client configuration. These options are passed to the `@keyv/valkey` client.",
|
|
2472
2486
|
"type": "object",
|
|
2473
2487
|
"properties": {
|
|
2474
|
-
"
|
|
2475
|
-
"description": "Namespace for
|
|
2488
|
+
"keyPrefix": {
|
|
2489
|
+
"description": "Namespace and separator used for prefixing keys.",
|
|
2476
2490
|
"type": "string"
|
|
2477
|
-
},
|
|
2478
|
-
"keyPrefixSeparator": {
|
|
2479
|
-
"description": "Separator to use between namespace and key.",
|
|
2480
|
-
"type": "string"
|
|
2481
|
-
},
|
|
2482
|
-
"clearBatchSize": {
|
|
2483
|
-
"description": "Number of keys to delete in a single batch.",
|
|
2484
|
-
"type": "number"
|
|
2485
|
-
},
|
|
2486
|
-
"useUnlink": {
|
|
2487
|
-
"description": "Enable Unlink instead of using Del for clearing keys. This is more performant but may not be supported by all Redis versions.",
|
|
2488
|
-
"type": "boolean"
|
|
2489
|
-
},
|
|
2490
|
-
"noNamespaceAffectsAll": {
|
|
2491
|
-
"description": "Whether to allow clearing all keys when no namespace is set.\nIf set to true and no namespace is set, iterate() will return all keys.\nDefaults to `false`.",
|
|
2492
|
-
"type": "boolean"
|
|
2493
2491
|
}
|
|
2494
2492
|
}
|
|
2495
2493
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
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="color-scheme" content="light dark"/><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.
|
|
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="color-scheme" content="light dark"/><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.e43f5848.js"></script><script defer="defer" src="/static/module-material-ui.9517effb.js"></script><script defer="defer" src="/static/module-lodash.7d4f904e.js"></script><script defer="defer" src="/static/module-date-fns.fe699224.js"></script><script defer="defer" src="/static/module-mui.375d6d62.js"></script><script defer="defer" src="/static/module-material-table.5a3a2d93.js"></script><script defer="defer" src="/static/module-micromark-core-commonmark.909b7d4e.js"></script><script defer="defer" src="/static/module-zod.4600b494.js"></script><script defer="defer" src="/static/module-react-dom.44002a3f.js"></script><script defer="defer" src="/static/module-i18next.685d0b2d.js"></script><script defer="defer" src="/static/module-react-beautiful-dnd.29de0c3a.js"></script><script defer="defer" src="/static/module-remix-run.f9e8eadd.js"></script><script defer="defer" src="/static/vendor.a4b20610.js"></script><script defer="defer" src="/static/main.b61055d4.js"></script><link href="/static/main.e1e2baaa.css" rel="stylesheet"><script type="backstage.io/config">[
|
|
2
2
|
{
|
|
3
3
|
"context": "app-config.yaml",
|
|
4
4
|
"data": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
color="#5bbad5"
|
|
44
44
|
/>
|
|
45
45
|
<title><%= config.getString('app.title') %></title>
|
|
46
|
-
<meta name="backstage-app-mode" content="public"><meta name="backstage-public-path" content="<%= publicPath %>/"><script defer src="<%= publicPath %>/static/runtime.
|
|
46
|
+
<meta name="backstage-app-mode" content="public"><meta name="backstage-public-path" content="<%= publicPath %>/"><script defer src="<%= publicPath %>/static/runtime.e43f5848.js"></script><script defer src="<%= publicPath %>/static/module-material-ui.9517effb.js"></script><script defer src="<%= publicPath %>/static/module-lodash.7d4f904e.js"></script><script defer src="<%= publicPath %>/static/module-date-fns.fe699224.js"></script><script defer src="<%= publicPath %>/static/module-mui.375d6d62.js"></script><script defer src="<%= publicPath %>/static/module-material-table.5a3a2d93.js"></script><script defer src="<%= publicPath %>/static/module-micromark-core-commonmark.909b7d4e.js"></script><script defer src="<%= publicPath %>/static/module-zod.4600b494.js"></script><script defer src="<%= publicPath %>/static/module-react-dom.44002a3f.js"></script><script defer src="<%= publicPath %>/static/module-i18next.685d0b2d.js"></script><script defer src="<%= publicPath %>/static/module-react-beautiful-dnd.29de0c3a.js"></script><script defer src="<%= publicPath %>/static/module-remix-run.f9e8eadd.js"></script><script defer src="<%= publicPath %>/static/vendor.a4b20610.js"></script><script defer src="<%= publicPath %>/static/main.b61055d4.js"></script><link href="<%= publicPath %>/static/main.e1e2baaa.css" rel="stylesheet"></head>
|
|
47
47
|
<body>
|
|
48
48
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
49
49
|
<div id="root"></div>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([["1335"],{50010(e,t,i){i.d(t,{W:()=>n});let n=(0,i(97386).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.\n 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"}}}})},50874(e,t,i){i.d(t,{CatalogSearchResultListItem:()=>y});var n=i(31085),o=i(9720),s=i(94390),a=i(
|
|
2
|
-
//# sourceMappingURL=1335.
|
|
1
|
+
"use strict";(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([["1335"],{50010(e,t,i){i.d(t,{W:()=>n});let n=(0,i(97386).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.\n 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"}}}})},50874(e,t,i){i.d(t,{CatalogSearchResultListItem:()=>y});var n=i(31085),o=i(9720),s=i(94390),a=i(46423),l=i(5951),r=i(72501),d=i(58837),c=i(60603),p=i(7613),m=i(50010),h=i(89595);let u=(0,d.A)({item:{display:"flex"},flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",wordBreak:"break-all",marginBottom:"1rem"}},{name:"CatalogSearchResultListItem"});function y(e){let t=e.result,i=e.highlight,d=u(),{t:y}=(0,h.i)(m.W);return t?(0,n.jsxs)("div",{className:d.item,children:[e.icon&&(0,n.jsx)(a.A,{children:"function"==typeof e.icon?e.icon(t):e.icon}),(0,n.jsxs)("div",{className:d.flexContainer,children:[(0,n.jsx)(l.A,{className:d.itemText,primaryTypographyProps:{variant:"h6"},primary:(0,n.jsx)(c.N_,{noTrack:!0,to:t.location,children:i?.fields.title?(0,n.jsx)(p.e,{text:i.fields.title,preTag:i.preTag,postTag:i.postTag}):t.title}),secondary:(0,n.jsx)(r.A,{component:"span",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:e.lineClamp,overflow:"hidden"},color:"textSecondary",variant:"body2",children:i?.fields.text?(0,n.jsx)(p.e,{text:i.fields.text,preTag:i.preTag,postTag:i.postTag}):t.text})}),(0,n.jsxs)(o.A,{children:[t.kind&&(0,n.jsx)(s.A,{label:`Kind: ${t.kind}`,size:"small"}),t.type&&(0,n.jsx)(s.A,{label:`Type: ${t.type}`,size:"small"}),t.lifecycle&&(0,n.jsx)(s.A,{label:`${y("searchResultItem.lifecycle")}: ${t.lifecycle}`,size:"small"}),t.owner&&(0,n.jsx)(s.A,{label:`${y("searchResultItem.Owner")}: ${t.owner}`,size:"small"})]})]})]}):null}}}]);
|
|
2
|
+
//# sourceMappingURL=1335.18ed80ea.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static/1335.4269f82a.chunk.js","sources":["webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/alpha/translation.ts","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/CatalogSearchResultListItem/CatalogSearchResultListItem.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/** @alpha */\nexport const catalogTranslationRef = createTranslationRef({\n id: 'catalog',\n messages: {\n indexPage: {\n title: `{{orgName}} Catalog`,\n createButtonTitle: 'Create',\n supportButtonContent: 'All your software catalog entities',\n },\n aboutCard: {\n title: 'About',\n refreshButtonTitle: 'Schedule entity refresh',\n editButtonTitle: 'Edit Metadata',\n createSimilarButtonTitle: 'Create something similar',\n refreshScheduledMessage: 'Refresh scheduled',\n launchTemplate: 'Launch Template',\n viewTechdocs: 'View TechDocs',\n viewSource: 'View Source',\n descriptionField: {\n label: 'Description',\n value: 'No description',\n },\n ownerField: {\n label: 'Owner',\n value: 'No Owner',\n },\n domainField: {\n label: 'Domain',\n value: 'No Domain',\n },\n systemField: {\n label: 'System',\n value: 'No System',\n },\n parentComponentField: {\n label: 'Parent Component',\n value: 'No Parent Component',\n },\n typeField: {\n label: 'Type',\n },\n lifecycleField: {\n label: 'Lifecycle',\n },\n tagsField: {\n label: 'Tags',\n value: 'No Tags',\n },\n targetsField: {\n label: 'Targets',\n },\n },\n searchResultItem: {\n lifecycle: 'Lifecycle',\n Owner: 'Owner',\n },\n catalogTable: {\n warningPanelTitle: 'Could not fetch catalog entities.',\n viewActionTitle: 'View',\n editActionTitle: 'Edit',\n starActionTitle: 'Add to favorites',\n unStarActionTitle: 'Remove from favorites',\n },\n dependencyOfComponentsCard: {\n title: 'Dependency of components',\n emptyMessage: 'No component depends on this component',\n },\n dependsOnComponentsCard: {\n title: 'Depends on components',\n emptyMessage: 'No component is a dependency of this component',\n },\n dependsOnResourcesCard: {\n title: 'Depends on resources',\n emptyMessage: 'No resource is a dependency of this component',\n },\n entityContextMenu: {\n copiedMessage: 'Copied!',\n moreButtonTitle: 'More',\n inspectMenuTitle: 'Inspect entity',\n copyURLMenuTitle: 'Copy entity URL',\n unregisterMenuTitle: 'Unregister entity',\n },\n entityLabelsCard: {\n title: 'Labels',\n emptyDescription:\n 'No labels defined for this entity. You can add labels to your entity YAML as shown in the highlighted example below:',\n readMoreButtonTitle: 'Read more',\n },\n entityLabels: {\n warningPanelTitle: 'Entity not found',\n ownerLabel: 'Owner',\n lifecycleLabel: 'Lifecycle',\n },\n entityLinksCard: {\n title: 'Links',\n emptyDescription:\n 'No links defined for this entity. You can add links to your entity YAML as shown in the highlighted example below:',\n readMoreButtonTitle: 'Read more',\n },\n entityNotFound: {\n title: 'Entity was not found',\n description:\n 'Want to help us build this? Check out our Getting Started documentation.',\n docButtonTitle: 'DOCS',\n },\n deleteEntity: {\n dialogTitle: 'Are you sure you want to delete this entity?',\n deleteButtonTitle: 'Delete',\n cancelButtonTitle: 'Cancel',\n description:\n 'This entity is not referenced by any location and is therefore not receiving updates. Click here to delete.',\n },\n entityProcessingErrorsDescription: 'The error below originates from',\n entityRelationWarningDescription:\n \"This entity has relations to other entities, which can't be found in the catalog.\\n Entities not found are: \",\n hasComponentsCard: {\n title: 'Has components',\n emptyMessage: 'No component is part of this system',\n },\n hasResourcesCard: {\n title: 'Has resources',\n emptyMessage: 'No resource is part of this system',\n },\n hasSubcomponentsCard: {\n title: 'Has subcomponents',\n emptyMessage: 'No subcomponent is part of this component',\n },\n hasSubdomainsCard: {\n title: 'Has subdomains',\n emptyMessage: 'No subdomain is part of this domain',\n },\n hasSystemsCard: {\n title: 'Has systems',\n emptyMessage: 'No system is part of this domain',\n },\n relatedEntitiesCard: {\n emptyHelpLinkTitle: 'Learn how to change this',\n },\n systemDiagramCard: {\n title: 'System Diagram',\n description: 'Use pinch & zoom to move around the diagram.',\n edgeLabels: {\n partOf: 'part of',\n provides: 'provides',\n dependsOn: 'depends on',\n },\n },\n },\n});\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ReactNode } from 'react';\nimport Box from '@material-ui/core/Box';\nimport Chip from '@material-ui/core/Chip';\nimport ListItemIcon from '@material-ui/core/ListItemIcon';\nimport ListItemText from '@material-ui/core/ListItemText';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { Link } from '@backstage/core-components';\nimport {\n IndexableDocument,\n ResultHighlight,\n} from '@backstage/plugin-search-common';\nimport { HighlightedSearchResultText } from '@backstage/plugin-search-react';\nimport { catalogTranslationRef } from '../../alpha/translation';\nimport { useTranslationRef } from '@backstage/frontend-plugin-api';\n\n/** @public */\nexport type CatalogSearchResultListItemClassKey =\n | 'item'\n | 'flexContainer'\n | 'itemText';\n\nconst useStyles = makeStyles(\n {\n item: {\n display: 'flex',\n },\n flexContainer: {\n flexWrap: 'wrap',\n },\n itemText: {\n width: '100%',\n wordBreak: 'break-all',\n marginBottom: '1rem',\n },\n },\n { name: 'CatalogSearchResultListItem' },\n);\n\n/**\n * Props for {@link CatalogSearchResultListItem}.\n *\n * @public\n */\nexport interface CatalogSearchResultListItemProps {\n icon?: ReactNode | ((result: IndexableDocument) => ReactNode);\n result?: IndexableDocument;\n highlight?: ResultHighlight;\n rank?: number;\n lineClamp?: number;\n}\n\n/** @public */\nexport function CatalogSearchResultListItem(\n props: CatalogSearchResultListItemProps,\n) {\n const result = props.result as any;\n const highlight = props.highlight as ResultHighlight;\n\n const classes = useStyles();\n const { t } = useTranslationRef(catalogTranslationRef);\n\n if (!result) return null;\n\n return (\n <div className={classes.item}>\n {props.icon && (\n <ListItemIcon>\n {typeof props.icon === 'function' ? props.icon(result) : props.icon}\n </ListItemIcon>\n )}\n <div className={classes.flexContainer}>\n <ListItemText\n className={classes.itemText}\n primaryTypographyProps={{ variant: 'h6' }}\n primary={\n <Link noTrack to={result.location}>\n {highlight?.fields.title ? (\n <HighlightedSearchResultText\n text={highlight.fields.title}\n preTag={highlight.preTag}\n postTag={highlight.postTag}\n />\n ) : (\n result.title\n )}\n </Link>\n }\n secondary={\n <Typography\n component=\"span\"\n style={{\n display: '-webkit-box',\n WebkitBoxOrient: 'vertical',\n WebkitLineClamp: props.lineClamp,\n overflow: 'hidden',\n }}\n color=\"textSecondary\"\n variant=\"body2\"\n >\n {highlight?.fields.text ? (\n <HighlightedSearchResultText\n text={highlight.fields.text}\n preTag={highlight.preTag}\n postTag={highlight.postTag}\n />\n ) : (\n result.text\n )}\n </Typography>\n }\n />\n <Box>\n {result.kind && <Chip label={`Kind: ${result.kind}`} size=\"small\" />}\n {result.type && <Chip label={`Type: ${result.type}`} size=\"small\" />}\n {result.lifecycle && (\n <Chip\n label={`${t('searchResultItem.lifecycle')}: ${result.lifecycle}`}\n size=\"small\"\n />\n )}\n {result.owner && (\n <Chip\n label={`${t('searchResultItem.Owner')}: ${result.owner}`}\n size=\"small\"\n />\n )}\n </Box>\n </div>\n </div>\n );\n}\n"],"names":["catalogTranslationRef","createTranslationRef","useStyles","makeStyles","CatalogSearchResultListItem","props","result","highlight","classes","t","useTranslationRef","ListItemIcon","ListItemText","Link","HighlightedSearchResultText","Typography","Box","Chip"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"static/1335.18ed80ea.chunk.js","sources":["webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/alpha/translation.ts","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/CatalogSearchResultListItem/CatalogSearchResultListItem.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/** @alpha */\nexport const catalogTranslationRef = createTranslationRef({\n id: 'catalog',\n messages: {\n indexPage: {\n title: `{{orgName}} Catalog`,\n createButtonTitle: 'Create',\n supportButtonContent: 'All your software catalog entities',\n },\n aboutCard: {\n title: 'About',\n refreshButtonTitle: 'Schedule entity refresh',\n editButtonTitle: 'Edit Metadata',\n createSimilarButtonTitle: 'Create something similar',\n refreshScheduledMessage: 'Refresh scheduled',\n launchTemplate: 'Launch Template',\n viewTechdocs: 'View TechDocs',\n viewSource: 'View Source',\n descriptionField: {\n label: 'Description',\n value: 'No description',\n },\n ownerField: {\n label: 'Owner',\n value: 'No Owner',\n },\n domainField: {\n label: 'Domain',\n value: 'No Domain',\n },\n systemField: {\n label: 'System',\n value: 'No System',\n },\n parentComponentField: {\n label: 'Parent Component',\n value: 'No Parent Component',\n },\n typeField: {\n label: 'Type',\n },\n lifecycleField: {\n label: 'Lifecycle',\n },\n tagsField: {\n label: 'Tags',\n value: 'No Tags',\n },\n targetsField: {\n label: 'Targets',\n },\n },\n searchResultItem: {\n lifecycle: 'Lifecycle',\n Owner: 'Owner',\n },\n catalogTable: {\n warningPanelTitle: 'Could not fetch catalog entities.',\n viewActionTitle: 'View',\n editActionTitle: 'Edit',\n starActionTitle: 'Add to favorites',\n unStarActionTitle: 'Remove from favorites',\n },\n dependencyOfComponentsCard: {\n title: 'Dependency of components',\n emptyMessage: 'No component depends on this component',\n },\n dependsOnComponentsCard: {\n title: 'Depends on components',\n emptyMessage: 'No component is a dependency of this component',\n },\n dependsOnResourcesCard: {\n title: 'Depends on resources',\n emptyMessage: 'No resource is a dependency of this component',\n },\n entityContextMenu: {\n copiedMessage: 'Copied!',\n moreButtonTitle: 'More',\n inspectMenuTitle: 'Inspect entity',\n copyURLMenuTitle: 'Copy entity URL',\n unregisterMenuTitle: 'Unregister entity',\n },\n entityLabelsCard: {\n title: 'Labels',\n emptyDescription:\n 'No labels defined for this entity. You can add labels to your entity YAML as shown in the highlighted example below:',\n readMoreButtonTitle: 'Read more',\n },\n entityLabels: {\n warningPanelTitle: 'Entity not found',\n ownerLabel: 'Owner',\n lifecycleLabel: 'Lifecycle',\n },\n entityLinksCard: {\n title: 'Links',\n emptyDescription:\n 'No links defined for this entity. You can add links to your entity YAML as shown in the highlighted example below:',\n readMoreButtonTitle: 'Read more',\n },\n entityNotFound: {\n title: 'Entity was not found',\n description:\n 'Want to help us build this? Check out our Getting Started documentation.',\n docButtonTitle: 'DOCS',\n },\n deleteEntity: {\n dialogTitle: 'Are you sure you want to delete this entity?',\n deleteButtonTitle: 'Delete',\n cancelButtonTitle: 'Cancel',\n description:\n 'This entity is not referenced by any location and is therefore not receiving updates. Click here to delete.',\n },\n entityProcessingErrorsDescription: 'The error below originates from',\n entityRelationWarningDescription:\n \"This entity has relations to other entities, which can't be found in the catalog.\\n Entities not found are: \",\n hasComponentsCard: {\n title: 'Has components',\n emptyMessage: 'No component is part of this system',\n },\n hasResourcesCard: {\n title: 'Has resources',\n emptyMessage: 'No resource is part of this system',\n },\n hasSubcomponentsCard: {\n title: 'Has subcomponents',\n emptyMessage: 'No subcomponent is part of this component',\n },\n hasSubdomainsCard: {\n title: 'Has subdomains',\n emptyMessage: 'No subdomain is part of this domain',\n },\n hasSystemsCard: {\n title: 'Has systems',\n emptyMessage: 'No system is part of this domain',\n },\n relatedEntitiesCard: {\n emptyHelpLinkTitle: 'Learn how to change this',\n },\n systemDiagramCard: {\n title: 'System Diagram',\n description: 'Use pinch & zoom to move around the diagram.',\n edgeLabels: {\n partOf: 'part of',\n provides: 'provides',\n dependsOn: 'depends on',\n },\n },\n },\n});\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ReactNode } from 'react';\nimport Box from '@material-ui/core/Box';\nimport Chip from '@material-ui/core/Chip';\nimport ListItemIcon from '@material-ui/core/ListItemIcon';\nimport ListItemText from '@material-ui/core/ListItemText';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { Link } from '@backstage/core-components';\nimport {\n IndexableDocument,\n ResultHighlight,\n} from '@backstage/plugin-search-common';\nimport { HighlightedSearchResultText } from '@backstage/plugin-search-react';\nimport { catalogTranslationRef } from '../../alpha/translation';\nimport { useTranslationRef } from '@backstage/frontend-plugin-api';\n\n/** @public */\nexport type CatalogSearchResultListItemClassKey =\n | 'item'\n | 'flexContainer'\n | 'itemText';\n\nconst useStyles = makeStyles(\n {\n item: {\n display: 'flex',\n },\n flexContainer: {\n flexWrap: 'wrap',\n },\n itemText: {\n width: '100%',\n wordBreak: 'break-all',\n marginBottom: '1rem',\n },\n },\n { name: 'CatalogSearchResultListItem' },\n);\n\n/**\n * Props for {@link CatalogSearchResultListItem}.\n *\n * @public\n */\nexport interface CatalogSearchResultListItemProps {\n icon?: ReactNode | ((result: IndexableDocument) => ReactNode);\n result?: IndexableDocument;\n highlight?: ResultHighlight;\n rank?: number;\n lineClamp?: number;\n}\n\n/** @public */\nexport function CatalogSearchResultListItem(\n props: CatalogSearchResultListItemProps,\n) {\n const result = props.result as any;\n const highlight = props.highlight as ResultHighlight;\n\n const classes = useStyles();\n const { t } = useTranslationRef(catalogTranslationRef);\n\n if (!result) return null;\n\n return (\n <div className={classes.item}>\n {props.icon && (\n <ListItemIcon>\n {typeof props.icon === 'function' ? props.icon(result) : props.icon}\n </ListItemIcon>\n )}\n <div className={classes.flexContainer}>\n <ListItemText\n className={classes.itemText}\n primaryTypographyProps={{ variant: 'h6' }}\n primary={\n <Link noTrack to={result.location}>\n {highlight?.fields.title ? (\n <HighlightedSearchResultText\n text={highlight.fields.title}\n preTag={highlight.preTag}\n postTag={highlight.postTag}\n />\n ) : (\n result.title\n )}\n </Link>\n }\n secondary={\n <Typography\n component=\"span\"\n style={{\n display: '-webkit-box',\n WebkitBoxOrient: 'vertical',\n WebkitLineClamp: props.lineClamp,\n overflow: 'hidden',\n }}\n color=\"textSecondary\"\n variant=\"body2\"\n >\n {highlight?.fields.text ? (\n <HighlightedSearchResultText\n text={highlight.fields.text}\n preTag={highlight.preTag}\n postTag={highlight.postTag}\n />\n ) : (\n result.text\n )}\n </Typography>\n }\n />\n <Box>\n {result.kind && <Chip label={`Kind: ${result.kind}`} size=\"small\" />}\n {result.type && <Chip label={`Type: ${result.type}`} size=\"small\" />}\n {result.lifecycle && (\n <Chip\n label={`${t('searchResultItem.lifecycle')}: ${result.lifecycle}`}\n size=\"small\"\n />\n )}\n {result.owner && (\n <Chip\n label={`${t('searchResultItem.Owner')}: ${result.owner}`}\n size=\"small\"\n />\n )}\n </Box>\n </div>\n </div>\n );\n}\n"],"names":["catalogTranslationRef","createTranslationRef","useStyles","makeStyles","CatalogSearchResultListItem","props","result","highlight","classes","t","useTranslationRef","ListItemIcon","ListItemText","Link","HighlightedSearchResultText","Typography","Box","Chip"],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([["7186"],{98557(e,t,a){a.d(t,{M:()=>r});var n=a(31085),i=a(58837),l=a(71677),o=a(72501);let s=(0,i.A)({container:{overflow:"visible !important"},typo:{fontSize:"inherit",overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box","-webkit-line-clamp":({line:e})=>e||1,"-webkit-box-orient":"vertical"}},{name:"BackstageOverflowTooltip"});function r(e){let t=s(e);return(0,n.jsx)(l.Ay,{title:e.title??(e.text||""),placement:e.placement,classes:e.tooltipClasses,children:(0,n.jsx)(o.A,{className:t.typo,variant:"inherit",children:e.text})})}},40466(e,t,a){a.d(t,{C4:()=>l,tS:()=>o});var n=a(47426);let i="catalog-entity";(0,n.i)({name:"catalog.entity.read",attributes:{action:"read"},resourceType:i});let l=(0,n.i)({name:"catalog.entity.create",attributes:{action:"create"}});(0,n.i)({name:"catalog.entity.delete",attributes:{action:"delete"},resourceType:i});let o=(0,n.i)({name:"catalog.entity.refresh",attributes:{action:"update"},resourceType:i});(0,n.i)({name:"catalog.entity.validate",attributes:{}}),(0,n.i)({name:"catalog.location.read",attributes:{action:"read"}}),(0,n.i)({name:"catalog.location.create",attributes:{action:"create"}}),(0,n.i)({name:"catalog.location.analyze",attributes:{}}),(0,n.i)({name:"catalog.location.delete",attributes:{action:"delete"}})},19857(e,t,a){a.d(t,{g:()=>l});var n=a(89595),i=a(79811);let l=({translationKey:e})=>{let{t}=(0,n.i)(i.j);return t(`entityTableColumnTitle.${e}`)}},50010(e,t,a){a.d(t,{W:()=>n});let n=(0,a(97386).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.\n 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"}}}})},20393(e,t,a){a.d(t,{CatalogPage:()=>eV});var n=a(31085),i=a(18690),l=a(17944),o=a(84391),s=a(15179),r=a(64947),c=a(29365),d=a(5893),p=a(73657),u=a(25534);function m(e){let{title:t,to:a}=e,i=(0,d.A)(e=>e.breakpoints.down("xs"));return a?i?(0,n.jsx)(c.A,{component:p.N_,color:"primary",title:t,size:"small",to:a,children:(0,n.jsx)(u.default,{})}):(0,n.jsx)(r.A,{component:p.N_,variant:"contained",color:"primary",to:a,children:t}):null}var y=a(23413),g=a(50509),f=a(19735),h=a(16647),x=a(59378),b=a(71242),C=a(48266),j=a(50375),w=a(9720),v=a(14041),S=a(47195),T=a(73466),A=a(76272),k=a(79811),L=a(89595);let P=e=>{let t,a,{allowedKinds:i,hidden:l,initialFilter:o="component"}=e,{t:s}=(0,L.i)(k.j),r=(0,g.gf)(j.k),{error:c,allKinds:d,selectedKind:p,setSelectedKind:u}=function(e){let{filters:t,queryParameters:{kind:a},updateFilters:n}=(0,x.nK)(),i=(0,v.useMemo)(()=>[a].flat()[0],[a]),[l,o]=(0,v.useState)(i??t.kind?.value??e.initialFilter);(0,v.useEffect)(()=>{i&&o(i)},[i]),(0,v.useEffect)(()=>{t.kind?.value&&o(t.kind?.value)},[t.kind]);let{allKinds:s,loading:r,error:c}=function(){let e=(0,g.gf)(A.v),{error:t,loading:a,value:n}=(0,T.A)(async()=>{let{facets:t}=await e.getEntityFacets({facets:["kind"]});return new Map((t.kind??[]).map(e=>e.value).map(e=>[e.toLocaleLowerCase("en-US"),e]))},[e]);return{loading:a,error:t,allKinds:n??new Map}}(),d=s.get(l)||l;return(0,v.useEffect)(()=>{n({kind:l?new S.gM(l,d):void 0})},[l,d,n]),{loading:r,error:c,allKinds:s,selectedKind:l,setSelectedKind:o}}({initialFilter:o});if((0,v.useEffect)(()=>{c&&r.post({message:s("entityKindPicker.errorMessage"),severity:"error"})},[c,r,s]),c)return null;let m=[...(t=Array.from(d.keys()),i&&(t=i.map(e=>e.toLocaleLowerCase("en-US")).filter(e=>d.has(e))),a=new Map(t.map(e=>[e,d.get(e)||e])),p&&!a.has(p)&&a.set(p.toLocaleLowerCase("en-US"),p),a).entries()].map(([e,t])=>({label:t,value:e}));return l?null:(0,n.jsx)(w.A,{pb:1,pt:1,children:(0,n.jsx)(C.w,{label:s("entityKindPicker.title"),items:m,selected:p.toLocaleLowerCase("en-US"),onChange:e=>u(String(e))})})};var M=a(58837),N=a(19030);let O=(0,M.A)({input:{}},{name:"CatalogReactEntityLifecyclePicker"}),R=e=>{let{initialFilter:t=[]}=e,a=O(),{t:i}=(0,L.i)(k.j);return(0,n.jsx)(N.y,{label:i("entityLifecyclePicker.title"),name:"lifecycles",path:"spec.lifecycle",Filter:S.I5,InputProps:{className:a.input},initialSelectedOptions:t})},E=(0,M.A)({input:{}},{name:"CatalogReactEntityNamespacePicker"}),F=e=>{let{initiallySelectedNamespaces:t}=e,a=E(),{t:i}=(0,L.i)(k.j);return(0,n.jsx)(N.y,{label:i("entityNamespacePicker.title"),name:"namespace",path:"metadata.namespace",Filter:S.z,InputProps:{className:a.input},initialSelectedOptions:t})};var K=a(53149),B=a(98552),z=a(86901),U=a(44148),D=a(41260),I=a(80018);let _=(0,M.A)({root:{},input:{},label:{}},{name:"CatalogReactEntityProcessingStatusPickerPicker"}),H=(0,n.jsx)(D.default,{fontSize:"small"}),W=(0,n.jsx)(U.default,{fontSize:"small"}),G=()=>{let e=_(),{updateFilters:t}=(0,x.nK)(),{t:a}=(0,L.i)(k.j),[i,l]=(0,v.useState)([]);return(0,n.jsx)(w.A,{className:e.root,pb:1,pt:1,children:(0,n.jsx)(I.Q,{label:a("entityProcessingStatusPicker.title"),multiple:!0,disableCloseOnSelect:!0,options:["Is Orphan","Has Error"],value:i,onChange:(e,a)=>{var n,i;l(a),t({orphan:(n=a.includes("Is Orphan"))?new S.Kf(n):void 0}),t({error:(i=a.includes("Has Error"))?new S.mT(i):void 0})},renderOption:(e,{selected:t})=>(0,n.jsx)(z.A,{control:(0,n.jsx)(B.A,{icon:H,checkedIcon:W,checked:t}),onClick:e=>e.preventDefault(),label:e}),name:"processing-status-picker",LabelProps:{className:e.label},TextFieldProps:{className:e.input}})})};var V=a(67762),X=a(46343),Y=a.n(X),q=a(40074),J=a.n(q);let $=e=>{let{hidden:t,initialFilter:a}=e,i=(0,g.gf)(j.k),{error:l,availableTypes:o,selectedTypes:s,setSelectedTypes:r}=function(){let e=(0,g.gf)(A.v),{filters:{kind:t,type:a},queryParameters:{type:n},updateFilters:i}=(0,x.nK)(),l=(0,v.useMemo)(()=>[n].flat().filter(Boolean),[n]),[o,s]=(0,v.useState)(l.length?l:a?.getTypes()??[]);(0,v.useEffect)(()=>{l.length&&s(l)},[l]);let[r,c]=(0,v.useState)([]),d=(0,v.useMemo)(()=>t?.value,[t]),{error:p,loading:u,value:m}=(0,T.A)(async()=>d?await e.getEntityFacets({filter:{kind:d},facets:["spec.type"]}).then(e=>e.facets["spec.type"]||[]):[],[d,e]),y=(0,v.useRef)(m);return(0,v.useEffect)(()=>{let e=y.current;if(y.current=m,u||!d||e===m||!m)return;let t=[...new Set(J()(m,e=>-e.count).map(e=>e.value.toLocaleLowerCase("en-US")))];c(t);let a=o.filter(e=>t.includes(e));Y()(o,a)||s(a)},[u,d,o,s,m]),(0,v.useEffect)(()=>{i({type:o.length?new S.qA(o):void 0})},[o,i]),{loading:u,error:p,availableTypes:r,selectedTypes:o,setSelectedTypes:s}}(),{t:c}=(0,L.i)(k.j);if((0,v.useEffect)(()=>{l&&i.post({message:c("entityTypePicker.errorMessage"),severity:"error"}),a&&r([a])},[l,i,a,r,c]),0===o.length||l)return null;o.sort((e,t)=>e.toLocaleLowerCase("en-US").localeCompare(t.toLocaleLowerCase("en-US")));let d=[{value:"all",label:c("entityTypePicker.optionAllTitle")},...o.map(e=>({value:e,label:e}))];return t?null:(0,n.jsx)(w.A,{pb:1,pt:1,children:(0,n.jsx)(C.w,{label:c("entityTypePicker.title"),items:d,selected:(d.length>1?s[0]:void 0)??"all",onChange:e=>r("all"===e?[]:[String(e)])})})};var Q=a(59302);let Z=e=>{let{initialKind:t,initiallySelectedFilter:a,ownerPickerMode:i,initiallySelectedNamespaces:l}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(P,{initialFilter:t}),(0,n.jsx)($,{}),(0,n.jsx)(Q.y,{initialFilter:a}),(0,n.jsx)(K.t,{mode:i}),(0,n.jsx)(R,{}),(0,n.jsx)(V.m,{}),(0,n.jsx)(G,{}),(0,n.jsx)(F,{initiallySelectedNamespaces:l})]})};var ee=a(50714),et=a(11773),ea=a(96403),en=a(58077),ei=a(87187),el=a(4809),eo=a(28499),es=a(7537),er=a(75710),ec=a(53320),ed=a(72501),ep=a(88654),eu=a(75625),em=a(39330),ey=a(45250),eg=a(65398),ef=a.n(eg),eh=a(76025),ex=a(53987),eb=a(94390),eC=a(98557),ej=a(19857);let ew=Object.freeze({createNameColumn(e){function t(t){return t.metadata?.title||(0,es.S)(t,{defaultKind:e?.defaultKind})}return{title:(0,n.jsx)(ej.g,{translationKey:"name"}),field:"resolved.entityRef",highlight:!0,customSort:({entity:e},{entity:a})=>t(e).localeCompare(t(a)),render:({entity:t})=>(0,n.jsx)(eh.z,{entityRef:t,defaultKind:e?.defaultKind||"Component"})}},createSystemColumn:()=>({title:(0,n.jsx)(ej.g,{translationKey:"system"}),field:"resolved.partOfSystemRelationTitle",customFilterAndSearch:(e,t)=>!!t.resolved.partOfSystemRelations&&t.resolved.partOfSystemRelations.map(e=>e.name).join(", ").toLocaleUpperCase("en-US").includes(e.toLocaleUpperCase("en-US")),render:({resolved:e})=>(0,n.jsx)(ex.i,{entityRefs:e.partOfSystemRelations,defaultKind:"system"})}),createOwnerColumn:()=>({title:(0,n.jsx)(ej.g,{translationKey:"owner"}),field:"resolved.ownedByRelationsTitle",render:({resolved:e})=>(0,n.jsx)(ex.i,{entityRefs:e.ownedByRelations,defaultKind:"group"})}),createSpecTargetsColumn:()=>({title:(0,n.jsx)(ej.g,{translationKey:"targets"}),field:"entity.spec.targets",customFilterAndSearch:(e,t)=>{let a=[];return t.entity?.spec?.targets&&Array.isArray(t.entity?.spec?.targets)?a=t.entity?.spec?.targets:t.entity?.spec?.target&&(a=[t.entity?.spec?.target]),a.join(", ").toLocaleUpperCase("en-US").includes(e.toLocaleUpperCase("en-US"))},render:({entity:e})=>(0,n.jsx)(n.Fragment,{children:(e?.spec?.targets||e?.spec?.target)&&(0,n.jsx)(eC.M,{text:(e.spec.targets||[e.spec.target]).join(", "),placement:"bottom-start"})})}),createSpecTypeColumn:(e={hidden:!1})=>({title:(0,n.jsx)(ej.g,{translationKey:"type"}),field:"entity.spec.type",hidden:e.hidden,width:"auto"}),createSpecLifecycleColumn:()=>({title:(0,n.jsx)(ej.g,{translationKey:"lifecycle"}),field:"entity.spec.lifecycle"}),createMetadataDescriptionColumn:()=>({title:(0,n.jsx)(ej.g,{translationKey:"description"}),field:"entity.metadata.description",render:({entity:e})=>(0,n.jsx)(eC.M,{text:e.metadata.description,placement:"bottom-start"}),width:"auto"}),createTagsColumn:()=>({title:(0,n.jsx)(ej.g,{translationKey:"tags"}),field:"entity.metadata.tags",cellStyle:{padding:"0px 16px 0px 20px"},render:({entity:e})=>(0,n.jsx)(n.Fragment,{children:e.metadata.tags&&e.metadata.tags.map(e=>(0,n.jsx)(eb.A,{label:e,size:"small",variant:"outlined",style:{marginBottom:"0px"}},e))}),width:"auto"}),createTitleColumn:e=>({title:(0,n.jsx)(ej.g,{translationKey:"title"}),field:"entity.metadata.title",hidden:e?.hidden,searchable:!0}),createLabelColumn(e,t){function a(e,t){let a=t.metadata?.labels;return a&&a[e]||""}return{title:t?.title||(0,n.jsx)(ej.g,{translationKey:"label"}),field:"entity.metadata.labels",cellStyle:{padding:"0px 16px 0px 20px"},customSort:({entity:t},{entity:n})=>a(e,t).localeCompare(a(e,n)),render:({entity:a})=>{let i=a.metadata?.labels,l=i&&i[e]||t?.defaultValue;return(0,n.jsx)(n.Fragment,{children:l&&(0,n.jsx)(eb.A,{label:l,size:"small",variant:"outlined"},l)})},width:"auto"}},createNamespaceColumn:()=>({title:(0,n.jsx)(ej.g,{translationKey:"namespace"}),field:"entity.metadata.namespace",width:"auto"})});var ev=a(95061),eS=a(63301),eT=a(34839),eA=a(75173),ek=a(64704),eL=a(45917),eP=a(16983);let eM=(0,M.A)(e=>({searchToolbar:{paddingLeft:0,paddingRight:0},input:{}}),{name:"CatalogReactEntitySearchBar"}),eN=()=>{let e=eM(),{t}=(0,L.i)(k.j),{updateFilters:a,queryParameters:{text:i}}=(0,x.nK)(),l=(0,v.useMemo)(()=>[i].flat()[0],[i]),[o,s]=(0,v.useState)(l??"");return(0,eP.default)(()=>{a({text:o.length?new S.V3(o):void 0})},250,[o,a]),(0,v.useEffect)(()=>{l&&s(l)},[l]),(0,n.jsx)(eA.A,{className:e.searchToolbar,children:(0,n.jsx)(ev.A,{children:(0,n.jsx)(eS.A,{"aria-label":"search",id:"input-with-icon-adornment",className:e.input,placeholder:t("entitySearchBar.placeholder"),autoComplete:"off",onChange:e=>s(e.target.value),value:o,startAdornment:(0,n.jsx)(eT.A,{position:"start",children:(0,n.jsx)(eL.default,{})}),endAdornment:(0,n.jsx)(eT.A,{position:"end",children:(0,n.jsx)(c.A,{"aria-label":"clear search",onClick:()=>s(""),edge:"end",disabled:0===o.length,children:(0,n.jsx)(ek.default,{})})})})})})},eO=(0,M.A)(e=>({root:{paddingTop:e.spacing(1.25),paddingLeft:e.spacing(2.5),paddingBottom:e.spacing(.75),display:"flex",justifyContent:"space-between"},text:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}),{name:"PluginCatalogTableToolbar"});function eR(e){let t=eO();return(0,n.jsxs)(eA.A,{className:t.root,children:[(0,n.jsx)(ed.A,{variant:"h5",className:t.text,children:e.title}),(0,n.jsx)(eN,{})]})}function eE(e){let{columns:t,data:a,options:i,...l}=e,{setLimit:o,setOffset:s,limit:r,totalItems:c,offset:d}=(0,x.nK)(),[p,u]=(0,v.useState)(d&&r?Math.floor(d/r):0);return(0,v.useEffect)(()=>{c&&p*r>=c?s(Math.max(0,c-r)):s(Math.max(0,p*r))},[s,p,r,c]),(0,n.jsx)(eo.X,{columns:t,data:a,options:{pageSizeOptions:[5,10,20,50,100],pageSize:r,emptyRowsWhenPaging:!1,...i},components:{Toolbar:eR},page:p,onPageChange:u,onRowsPerPageChange:o,totalCount:c,...l})}function eF(e){let{columns:t,data:a,next:i,prev:l,options:o,...s}=e;return(0,n.jsx)(eo.X,{columns:t,data:a,options:{...o,pageSizeOptions:[],showFirstLastPageButtons:!1,pageSize:Number.MAX_SAFE_INTEGER,emptyRowsWhenPaging:!1},onPageChange:e=>{e>0?i?.():l?.()},components:{Toolbar:eR},page:+!!l,totalCount:i?Number.MAX_VALUE:Number.MAX_SAFE_INTEGER,localization:{pagination:{labelDisplayedRows:""}},...s})}let eK=({filters:e,entities:t})=>{let a=void 0===e.type;return[ew.createTitleColumn({hidden:!0}),ew.createNameColumn({defaultKind:e.kind?.value}),...function(){let n=[ew.createMetadataDescriptionColumn(),ew.createTagsColumn()],i=[ew.createSystemColumn(),ew.createOwnerColumn(),ew.createSpecTypeColumn({hidden:!a}),ew.createSpecLifecycleColumn()];switch(e.kind?.value){case"user":return[...n];case"domain":case"system":return[ew.createOwnerColumn(),...n];case"group":case"template":return[ew.createSpecTypeColumn({hidden:!a}),...n];case"location":return[ew.createSpecTypeColumn({hidden:!a}),ew.createSpecTargetsColumn()];default:return t.every(e=>"default"===e.metadata.namespace)?[...i,...n]:[...i,ew.createNamespaceColumn(),...n]}}()]};var eB=a(50010),ez=a(77899);let eU=(e,t)=>{let a=e=>e.metadata.title||(0,es.S)(e,{defaultKind:"Component"});return a(e).localeCompare(a(t))},eD=e=>{let{columns:t=eK,tableOptions:a,subtitle:i,emptyContent:l}=e,{isStarredEntity:o,toggleStarredEntity:s}=(0,er.I)(),r=(0,x.nK)(),{loading:c,error:d,entities:p,filters:u,pageInfo:m,totalItems:y,paginationMode:g}=r,f=(0,v.useMemo)(()=>"function"==typeof t?t(r):t,[t,r]),{t:h}=(0,L.i)(eB.W);if(d)return(0,n.jsx)("div",{children:(0,n.jsx)(ei.B,{severity:"error",title:h("catalogTable.warningPanelTitle"),children:(0,n.jsx)(el.z,{language:"text",text:d.toString()})})});let b=[({entity:e})=>{let t=e.metadata.annotations?.[et._P],a=h("catalogTable.viewActionTitle");return{icon:()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ed.A,{style:ep.A,children:a}),(0,n.jsx)(em.default,{fontSize:"small"})]}),tooltip:a,disabled:!t,onClick:()=>{t&&window.open(t,"_blank")}}},({entity:e})=>{let t=e.metadata.annotations?.[et.P],a=h("catalogTable.editActionTitle");return{icon:()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ed.A,{style:ep.A,children:a}),(0,n.jsx)(eu.default,{fontSize:"small"})]}),tooltip:a,disabled:!t,onClick:()=>{t&&window.open(t,"_blank")}}},({entity:e})=>{let t=o(e);return{cellStyle:{paddingLeft:"1em"},icon:()=>(0,n.jsx)(ez.m,{isFavorite:t}),tooltip:t?h("catalogTable.unStarActionTitle"):h("catalogTable.starActionTitle"),onClick:()=>s(e)}}],C=u.kind?.label||"",j=u.type?.value||"",w="number"==typeof y?`(${y})`:"",S=(0,ey.capitalize)(u.user?.value??"all"),T=e.title||[S,j,ef()(C),w].filter(e=>e).join(" "),A=e.actions||b,k={actionsColumnIndex:-1,loadingType:"linear",showEmptyDataSourceMessage:!c,padding:"dense",...a};if("cursor"===g)return(0,n.jsx)(eF,{columns:f,emptyContent:l,isLoading:c,title:T,actions:A,subtitle:i,options:k,data:p.map(eI),next:m?.next,prev:m?.prev});if("offset"===g)return(0,n.jsx)(eE,{columns:f,emptyContent:l,isLoading:c,title:T,actions:A,subtitle:i,options:k,data:p.map(eI)});let P=p.sort(eU).map(eI),M=P.length>20;return(0,n.jsx)(eo.X,{isLoading:c,columns:f,options:{paging:M,pageSize:20,pageSizeOptions:[20,50,100],...k},title:T,data:P,actions:A,subtitle:i,emptyContent:l})};function eI(e){let t=(0,ec.t)(e,ea.jn,{kind:"system"}),a=(0,ec.t)(e,ea.vv);return{entity:e,resolved:{name:(0,es.S)(e,{defaultKind:"Component"}),entityRef:(0,en.U2)(e),ownedByRelationsTitle:a.map(e=>(0,es.S)(e,{defaultKind:"group"})).join(", "),ownedByRelations:a,partOfSystemRelationTitle:t.map(e=>(0,es.S)(e,{defaultKind:"system"})).join(", "),partOfSystemRelations:t}}}eD.columns=ew,eD.defaultColumnsFunc=eK;var e_=a(40466),eH=a(17883);function eW(e){let{filters:t,content:a=(0,n.jsx)(eD,{}),pagination:i}=e,r=(0,g.gf)(f.U).getOptionalString("organization.name")??"Backstage",c=(0,h.S)(ee.qP),{t:d}=(0,L.i)(eB.W),{allowed:p}=(0,eH.J)({permission:e_.C4});return(0,n.jsx)(l.d,{title:d("indexPage.title",{orgName:r}),themeId:"home",children:(0,n.jsxs)(o.U,{children:[(0,n.jsxs)(s.d,{title:"",children:[p&&(0,n.jsx)(m,{title:d("indexPage.createButtonTitle"),to:c&&c()}),(0,n.jsx)(y.Y,{children:d("indexPage.supportButtonContent")})]}),(0,n.jsx)(x.B9,{pagination:i,children:(0,n.jsxs)(b.GI,{children:[(0,n.jsx)(b.GI.Filters,{children:t}),(0,n.jsx)(b.GI.Content,{children:a})]})})]})})}function eG(e){let{columns:t,actions:a,initiallySelectedFilter:i="owned",initialKind:l="component",tableOptions:o={},emptyContent:s,pagination:r,ownerPickerMode:c,filters:d,initiallySelectedNamespaces:p}=e;return(0,n.jsx)(eW,{filters:d??(0,n.jsx)(Z,{initialKind:l,initiallySelectedFilter:i,ownerPickerMode:c,initiallySelectedNamespaces:p}),content:(0,n.jsx)(eD,{columns:t,actions:a,tableOptions:o,emptyContent:s}),pagination:r})}function eV(e){return(0,i.P1)()||(0,n.jsx)(eG,{...e})}},47426(e,t,a){a.d(t,{i:()=>n});function n({name:e,attributes:t,resourceType:a}){return a?{type:"resource",name:e,attributes:t,resourceType:a}:{type:"basic",name:e,attributes:t}}},17883(e,t,a){a.d(t,{J:()=>r});var n=a(50509),i=a(31057),l=a(98109),o=a(71696),s=a(52618);function r(e){let t=(0,n.gf)(i.x),{data:a,error:r}=(0,s.Ay)(e,async e=>{if((0,l.OL)(e.permission)&&!e.resourceRef)return o.b.DENY;let{result:a}=await t.authorize(e);return a});return r?{error:r,loading:!1,allowed:!1}:void 0===a?{loading:!0,allowed:!1}:{loading:!1,allowed:a===o.b.ALLOW}}}}]);
|
|
2
|
-
//# sourceMappingURL=7186.
|
|
1
|
+
"use strict";(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([["7186"],{98557(e,t,a){a.d(t,{M:()=>r});var n=a(31085),i=a(58837),l=a(71677),o=a(72501);let s=(0,i.A)({container:{overflow:"visible !important"},typo:{fontSize:"inherit",overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box","-webkit-line-clamp":({line:e})=>e||1,"-webkit-box-orient":"vertical"}},{name:"BackstageOverflowTooltip"});function r(e){let t=s(e);return(0,n.jsx)(l.Ay,{title:e.title??(e.text||""),placement:e.placement,classes:e.tooltipClasses,children:(0,n.jsx)(o.A,{className:t.typo,variant:"inherit",children:e.text})})}},40466(e,t,a){a.d(t,{C4:()=>l,tS:()=>o});var n=a(47426);let i="catalog-entity";(0,n.i)({name:"catalog.entity.read",attributes:{action:"read"},resourceType:i});let l=(0,n.i)({name:"catalog.entity.create",attributes:{action:"create"}});(0,n.i)({name:"catalog.entity.delete",attributes:{action:"delete"},resourceType:i});let o=(0,n.i)({name:"catalog.entity.refresh",attributes:{action:"update"},resourceType:i});(0,n.i)({name:"catalog.entity.validate",attributes:{}}),(0,n.i)({name:"catalog.location.read",attributes:{action:"read"}}),(0,n.i)({name:"catalog.location.create",attributes:{action:"create"}}),(0,n.i)({name:"catalog.location.analyze",attributes:{}}),(0,n.i)({name:"catalog.location.delete",attributes:{action:"delete"}})},19857(e,t,a){a.d(t,{g:()=>l});var n=a(89595),i=a(79811);let l=({translationKey:e})=>{let{t}=(0,n.i)(i.j);return t(`entityTableColumnTitle.${e}`)}},50010(e,t,a){a.d(t,{W:()=>n});let n=(0,a(97386).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.\n 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"}}}})},20393(e,t,a){a.d(t,{CatalogPage:()=>eV});var n=a(31085),i=a(18690),l=a(17944),o=a(84391),s=a(15179),r=a(64947),c=a(29365),d=a(5893),p=a(73657),u=a(25534);function m(e){let{title:t,to:a}=e,i=(0,d.A)(e=>e.breakpoints.down("xs"));return a?i?(0,n.jsx)(c.A,{component:p.N_,color:"primary",title:t,size:"small",to:a,children:(0,n.jsx)(u.default,{})}):(0,n.jsx)(r.A,{component:p.N_,variant:"contained",color:"primary",to:a,children:t}):null}var y=a(23413),g=a(50509),f=a(19735),h=a(16647),x=a(59378),b=a(71242),C=a(48266),j=a(50375),w=a(9720),v=a(14041),S=a(47195),T=a(73466),A=a(76272),k=a(79811),L=a(89595);let P=e=>{let t,a,{allowedKinds:i,hidden:l,initialFilter:o="component"}=e,{t:s}=(0,L.i)(k.j),r=(0,g.gf)(j.k),{error:c,allKinds:d,selectedKind:p,setSelectedKind:u}=function(e){let{filters:t,queryParameters:{kind:a},updateFilters:n}=(0,x.nK)(),i=(0,v.useMemo)(()=>[a].flat()[0],[a]),[l,o]=(0,v.useState)(i??t.kind?.value??e.initialFilter);(0,v.useEffect)(()=>{i&&o(i)},[i]),(0,v.useEffect)(()=>{t.kind?.value&&o(t.kind?.value)},[t.kind]);let{allKinds:s,loading:r,error:c}=function(){let e=(0,g.gf)(A.v),{error:t,loading:a,value:n}=(0,T.A)(async()=>{let{facets:t}=await e.getEntityFacets({facets:["kind"]});return new Map((t.kind??[]).map(e=>e.value).map(e=>[e.toLocaleLowerCase("en-US"),e]))},[e]);return{loading:a,error:t,allKinds:n??new Map}}(),d=s.get(l)||l;return(0,v.useEffect)(()=>{n({kind:l?new S.gM(l,d):void 0})},[l,d,n]),{loading:r,error:c,allKinds:s,selectedKind:l,setSelectedKind:o}}({initialFilter:o});if((0,v.useEffect)(()=>{c&&r.post({message:s("entityKindPicker.errorMessage"),severity:"error"})},[c,r,s]),c)return null;let m=[...(t=Array.from(d.keys()),i&&(t=i.map(e=>e.toLocaleLowerCase("en-US")).filter(e=>d.has(e))),a=new Map(t.map(e=>[e,d.get(e)||e])),p&&!a.has(p)&&a.set(p.toLocaleLowerCase("en-US"),p),a).entries()].map(([e,t])=>({label:t,value:e}));return l?null:(0,n.jsx)(w.A,{pb:1,pt:1,children:(0,n.jsx)(C.w,{label:s("entityKindPicker.title"),items:m,selected:p.toLocaleLowerCase("en-US"),onChange:e=>u(String(e))})})};var M=a(58837),N=a(19030);let O=(0,M.A)({input:{}},{name:"CatalogReactEntityLifecyclePicker"}),R=e=>{let{initialFilter:t=[]}=e,a=O(),{t:i}=(0,L.i)(k.j);return(0,n.jsx)(N.y,{label:i("entityLifecyclePicker.title"),name:"lifecycles",path:"spec.lifecycle",Filter:S.I5,InputProps:{className:a.input},initialSelectedOptions:t})},E=(0,M.A)({input:{}},{name:"CatalogReactEntityNamespacePicker"}),F=e=>{let{initiallySelectedNamespaces:t}=e,a=E(),{t:i}=(0,L.i)(k.j);return(0,n.jsx)(N.y,{label:i("entityNamespacePicker.title"),name:"namespace",path:"metadata.namespace",Filter:S.z,InputProps:{className:a.input},initialSelectedOptions:t})};var K=a(53149),B=a(98552),z=a(86901),U=a(44148),D=a(41260),I=a(80018);let _=(0,M.A)({root:{},input:{},label:{}},{name:"CatalogReactEntityProcessingStatusPickerPicker"}),H=(0,n.jsx)(D.default,{fontSize:"small"}),W=(0,n.jsx)(U.default,{fontSize:"small"}),G=()=>{let e=_(),{updateFilters:t}=(0,x.nK)(),{t:a}=(0,L.i)(k.j),[i,l]=(0,v.useState)([]);return(0,n.jsx)(w.A,{className:e.root,pb:1,pt:1,children:(0,n.jsx)(I.Q,{label:a("entityProcessingStatusPicker.title"),multiple:!0,disableCloseOnSelect:!0,options:["Is Orphan","Has Error"],value:i,onChange:(e,a)=>{var n,i;l(a),t({orphan:(n=a.includes("Is Orphan"))?new S.Kf(n):void 0}),t({error:(i=a.includes("Has Error"))?new S.mT(i):void 0})},renderOption:(e,{selected:t})=>(0,n.jsx)(z.A,{control:(0,n.jsx)(B.A,{icon:H,checkedIcon:W,checked:t}),onClick:e=>e.preventDefault(),label:e}),name:"processing-status-picker",LabelProps:{className:e.label},TextFieldProps:{className:e.input}})})};var V=a(67762),X=a(46343),Y=a.n(X),q=a(40074),J=a.n(q);let $=e=>{let{hidden:t,initialFilter:a}=e,i=(0,g.gf)(j.k),{error:l,availableTypes:o,selectedTypes:s,setSelectedTypes:r}=function(){let e=(0,g.gf)(A.v),{filters:{kind:t,type:a},queryParameters:{type:n},updateFilters:i}=(0,x.nK)(),l=(0,v.useMemo)(()=>[n].flat().filter(Boolean),[n]),[o,s]=(0,v.useState)(l.length?l:a?.getTypes()??[]);(0,v.useEffect)(()=>{l.length&&s(l)},[l]);let[r,c]=(0,v.useState)([]),d=(0,v.useMemo)(()=>t?.value,[t]),{error:p,loading:u,value:m}=(0,T.A)(async()=>d?await e.getEntityFacets({filter:{kind:d},facets:["spec.type"]}).then(e=>e.facets["spec.type"]||[]):[],[d,e]),y=(0,v.useRef)(m);return(0,v.useEffect)(()=>{let e=y.current;if(y.current=m,u||!d||e===m||!m)return;let t=[...new Set(J()(m,e=>-e.count).map(e=>e.value.toLocaleLowerCase("en-US")))];c(t);let a=o.filter(e=>t.includes(e));Y()(o,a)||s(a)},[u,d,o,s,m]),(0,v.useEffect)(()=>{i({type:o.length?new S.qA(o):void 0})},[o,i]),{loading:u,error:p,availableTypes:r,selectedTypes:o,setSelectedTypes:s}}(),{t:c}=(0,L.i)(k.j);if((0,v.useEffect)(()=>{l&&i.post({message:c("entityTypePicker.errorMessage"),severity:"error"}),a&&r([a])},[l,i,a,r,c]),0===o.length||l)return null;o.sort((e,t)=>e.toLocaleLowerCase("en-US").localeCompare(t.toLocaleLowerCase("en-US")));let d=[{value:"all",label:c("entityTypePicker.optionAllTitle")},...o.map(e=>({value:e,label:e}))];return t?null:(0,n.jsx)(w.A,{pb:1,pt:1,children:(0,n.jsx)(C.w,{label:c("entityTypePicker.title"),items:d,selected:(d.length>1?s[0]:void 0)??"all",onChange:e=>r("all"===e?[]:[String(e)])})})};var Q=a(59302);let Z=e=>{let{initialKind:t,initiallySelectedFilter:a,ownerPickerMode:i,initiallySelectedNamespaces:l}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(P,{initialFilter:t}),(0,n.jsx)($,{}),(0,n.jsx)(Q.y,{initialFilter:a}),(0,n.jsx)(K.t,{mode:i}),(0,n.jsx)(R,{}),(0,n.jsx)(V.m,{}),(0,n.jsx)(G,{}),(0,n.jsx)(F,{initiallySelectedNamespaces:l})]})};var ee=a(50714),et=a(11773),ea=a(96403),en=a(58077),ei=a(87187),el=a(4809),eo=a(28499),es=a(7537),er=a(75710),ec=a(53320),ed=a(72501),ep=a(88654),eu=a(75625),em=a(39330),ey=a(45250),eg=a(65398),ef=a.n(eg),eh=a(76025),ex=a(53987),eb=a(94390),eC=a(98557),ej=a(19857);let ew=Object.freeze({createNameColumn(e){function t(t){return t.metadata?.title||(0,es.S)(t,{defaultKind:e?.defaultKind})}return{title:(0,n.jsx)(ej.g,{translationKey:"name"}),field:"resolved.entityRef",highlight:!0,customSort:({entity:e},{entity:a})=>t(e).localeCompare(t(a)),render:({entity:t})=>(0,n.jsx)(eh.z,{entityRef:t,defaultKind:e?.defaultKind||"Component"})}},createSystemColumn:()=>({title:(0,n.jsx)(ej.g,{translationKey:"system"}),field:"resolved.partOfSystemRelationTitle",customFilterAndSearch:(e,t)=>!!t.resolved.partOfSystemRelations&&t.resolved.partOfSystemRelations.map(e=>e.name).join(", ").toLocaleUpperCase("en-US").includes(e.toLocaleUpperCase("en-US")),render:({resolved:e})=>(0,n.jsx)(ex.i,{entityRefs:e.partOfSystemRelations,defaultKind:"system"})}),createOwnerColumn:()=>({title:(0,n.jsx)(ej.g,{translationKey:"owner"}),field:"resolved.ownedByRelationsTitle",render:({resolved:e})=>(0,n.jsx)(ex.i,{entityRefs:e.ownedByRelations,defaultKind:"group"})}),createSpecTargetsColumn:()=>({title:(0,n.jsx)(ej.g,{translationKey:"targets"}),field:"entity.spec.targets",customFilterAndSearch:(e,t)=>{let a=[];return t.entity?.spec?.targets&&Array.isArray(t.entity?.spec?.targets)?a=t.entity?.spec?.targets:t.entity?.spec?.target&&(a=[t.entity?.spec?.target]),a.join(", ").toLocaleUpperCase("en-US").includes(e.toLocaleUpperCase("en-US"))},render:({entity:e})=>(0,n.jsx)(n.Fragment,{children:(e?.spec?.targets||e?.spec?.target)&&(0,n.jsx)(eC.M,{text:(e.spec.targets||[e.spec.target]).join(", "),placement:"bottom-start"})})}),createSpecTypeColumn:(e={hidden:!1})=>({title:(0,n.jsx)(ej.g,{translationKey:"type"}),field:"entity.spec.type",hidden:e.hidden,width:"auto"}),createSpecLifecycleColumn:()=>({title:(0,n.jsx)(ej.g,{translationKey:"lifecycle"}),field:"entity.spec.lifecycle"}),createMetadataDescriptionColumn:()=>({title:(0,n.jsx)(ej.g,{translationKey:"description"}),field:"entity.metadata.description",render:({entity:e})=>(0,n.jsx)(eC.M,{text:e.metadata.description,placement:"bottom-start"}),width:"auto"}),createTagsColumn:()=>({title:(0,n.jsx)(ej.g,{translationKey:"tags"}),field:"entity.metadata.tags",cellStyle:{padding:"0px 16px 0px 20px"},render:({entity:e})=>(0,n.jsx)(n.Fragment,{children:e.metadata.tags&&e.metadata.tags.map(e=>(0,n.jsx)(eb.A,{label:e,size:"small",variant:"outlined",style:{marginBottom:"0px"}},e))}),width:"auto"}),createTitleColumn:e=>({title:(0,n.jsx)(ej.g,{translationKey:"title"}),field:"entity.metadata.title",hidden:e?.hidden,searchable:!0}),createLabelColumn(e,t){function a(e,t){let a=t.metadata?.labels;return a&&a[e]||""}return{title:t?.title||(0,n.jsx)(ej.g,{translationKey:"label"}),field:"entity.metadata.labels",cellStyle:{padding:"0px 16px 0px 20px"},customSort:({entity:t},{entity:n})=>a(e,t).localeCompare(a(e,n)),render:({entity:a})=>{let i=a.metadata?.labels,l=i&&i[e]||t?.defaultValue;return(0,n.jsx)(n.Fragment,{children:l&&(0,n.jsx)(eb.A,{label:l,size:"small",variant:"outlined"},l)})},width:"auto"}},createNamespaceColumn:()=>({title:(0,n.jsx)(ej.g,{translationKey:"namespace"}),field:"entity.metadata.namespace",width:"auto"})});var ev=a(95061),eS=a(63301),eT=a(34839),eA=a(75173),ek=a(64704),eL=a(45917),eP=a(16983);let eM=(0,M.A)(e=>({searchToolbar:{paddingLeft:0,paddingRight:0},input:{}}),{name:"CatalogReactEntitySearchBar"}),eN=()=>{let e=eM(),{t}=(0,L.i)(k.j),{updateFilters:a,queryParameters:{text:i}}=(0,x.nK)(),l=(0,v.useMemo)(()=>[i].flat()[0],[i]),[o,s]=(0,v.useState)(l??"");return(0,eP.default)(()=>{a({text:o.length?new S.V3(o):void 0})},250,[o,a]),(0,v.useEffect)(()=>{l&&s(l)},[l]),(0,n.jsx)(eA.A,{className:e.searchToolbar,children:(0,n.jsx)(ev.A,{children:(0,n.jsx)(eS.A,{"aria-label":"search",id:"input-with-icon-adornment",className:e.input,placeholder:t("entitySearchBar.placeholder"),autoComplete:"off",onChange:e=>s(e.target.value),value:o,startAdornment:(0,n.jsx)(eT.A,{position:"start",children:(0,n.jsx)(eL.default,{})}),endAdornment:(0,n.jsx)(eT.A,{position:"end",children:(0,n.jsx)(c.A,{"aria-label":"clear search",onClick:()=>s(""),edge:"end",disabled:0===o.length,children:(0,n.jsx)(ek.default,{})})})})})})},eO=(0,M.A)(e=>({root:{paddingTop:e.spacing(1.25),paddingLeft:e.spacing(2.5),paddingBottom:e.spacing(.75),display:"flex",justifyContent:"space-between"},text:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}),{name:"PluginCatalogTableToolbar"});function eR(e){let t=eO();return(0,n.jsxs)(eA.A,{className:t.root,children:[(0,n.jsx)(ed.A,{variant:"h5",className:t.text,children:e.title}),(0,n.jsx)(eN,{})]})}function eE(e){let{columns:t,data:a,options:i,...l}=e,{setLimit:o,setOffset:s,limit:r,totalItems:c,offset:d}=(0,x.nK)(),[p,u]=(0,v.useState)(d&&r?Math.floor(d/r):0);return(0,v.useEffect)(()=>{c&&p*r>=c?s(Math.max(0,c-r)):s(Math.max(0,p*r))},[s,p,r,c]),(0,n.jsx)(eo.X,{columns:t,data:a,options:{pageSizeOptions:[5,10,20,50,100],pageSize:r,emptyRowsWhenPaging:!1,...i},components:{Toolbar:eR},page:p,onPageChange:u,onRowsPerPageChange:o,totalCount:c,...l})}function eF(e){let{columns:t,data:a,next:i,prev:l,options:o,...s}=e;return(0,n.jsx)(eo.X,{columns:t,data:a,options:{...o,pageSizeOptions:[],showFirstLastPageButtons:!1,pageSize:Number.MAX_SAFE_INTEGER,emptyRowsWhenPaging:!1},onPageChange:e=>{e>0?i?.():l?.()},components:{Toolbar:eR},page:+!!l,totalCount:i?Number.MAX_VALUE:Number.MAX_SAFE_INTEGER,localization:{pagination:{labelDisplayedRows:""}},...s})}let eK=({filters:e,entities:t})=>{let a=void 0===e.type;return[ew.createTitleColumn({hidden:!0}),ew.createNameColumn({defaultKind:e.kind?.value}),...function(){let n=[ew.createMetadataDescriptionColumn(),ew.createTagsColumn()],i=[ew.createSystemColumn(),ew.createOwnerColumn(),ew.createSpecTypeColumn({hidden:!a}),ew.createSpecLifecycleColumn()];switch(e.kind?.value){case"user":return[...n];case"domain":case"system":return[ew.createOwnerColumn(),...n];case"group":case"template":return[ew.createSpecTypeColumn({hidden:!a}),...n];case"location":return[ew.createSpecTypeColumn({hidden:!a}),ew.createSpecTargetsColumn()];default:return t.every(e=>"default"===e.metadata.namespace)?[...i,...n]:[...i,ew.createNamespaceColumn(),...n]}}()]};var eB=a(50010),ez=a(280);let eU=(e,t)=>{let a=e=>e.metadata.title||(0,es.S)(e,{defaultKind:"Component"});return a(e).localeCompare(a(t))},eD=e=>{let{columns:t=eK,tableOptions:a,subtitle:i,emptyContent:l}=e,{isStarredEntity:o,toggleStarredEntity:s}=(0,er.I)(),r=(0,x.nK)(),{loading:c,error:d,entities:p,filters:u,pageInfo:m,totalItems:y,paginationMode:g}=r,f=(0,v.useMemo)(()=>"function"==typeof t?t(r):t,[t,r]),{t:h}=(0,L.i)(eB.W);if(d)return(0,n.jsx)("div",{children:(0,n.jsx)(ei.B,{severity:"error",title:h("catalogTable.warningPanelTitle"),children:(0,n.jsx)(el.z,{language:"text",text:d.toString()})})});let b=[({entity:e})=>{let t=e.metadata.annotations?.[et._P],a=h("catalogTable.viewActionTitle");return{icon:()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ed.A,{style:ep.A,children:a}),(0,n.jsx)(em.default,{fontSize:"small"})]}),tooltip:a,disabled:!t,onClick:()=>{t&&window.open(t,"_blank")}}},({entity:e})=>{let t=e.metadata.annotations?.[et.P],a=h("catalogTable.editActionTitle");return{icon:()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ed.A,{style:ep.A,children:a}),(0,n.jsx)(eu.default,{fontSize:"small"})]}),tooltip:a,disabled:!t,onClick:()=>{t&&window.open(t,"_blank")}}},({entity:e})=>{let t=o(e);return{cellStyle:{paddingLeft:"1em"},icon:()=>(0,n.jsx)(ez.m,{isFavorite:t}),tooltip:t?h("catalogTable.unStarActionTitle"):h("catalogTable.starActionTitle"),onClick:()=>s(e)}}],C=u.kind?.label||"",j=u.type?.value||"",w="number"==typeof y?`(${y})`:"",S=(0,ey.capitalize)(u.user?.value??"all"),T=e.title||[S,j,ef()(C),w].filter(e=>e).join(" "),A=e.actions||b,k={actionsColumnIndex:-1,loadingType:"linear",showEmptyDataSourceMessage:!c,padding:"dense",...a};if("cursor"===g)return(0,n.jsx)(eF,{columns:f,emptyContent:l,isLoading:c,title:T,actions:A,subtitle:i,options:k,data:p.map(eI),next:m?.next,prev:m?.prev});if("offset"===g)return(0,n.jsx)(eE,{columns:f,emptyContent:l,isLoading:c,title:T,actions:A,subtitle:i,options:k,data:p.map(eI)});let P=p.sort(eU).map(eI),M=P.length>20;return(0,n.jsx)(eo.X,{isLoading:c,columns:f,options:{paging:M,pageSize:20,pageSizeOptions:[20,50,100],...k},title:T,data:P,actions:A,subtitle:i,emptyContent:l})};function eI(e){let t=(0,ec.t)(e,ea.jn,{kind:"system"}),a=(0,ec.t)(e,ea.vv);return{entity:e,resolved:{name:(0,es.S)(e,{defaultKind:"Component"}),entityRef:(0,en.U2)(e),ownedByRelationsTitle:a.map(e=>(0,es.S)(e,{defaultKind:"group"})).join(", "),ownedByRelations:a,partOfSystemRelationTitle:t.map(e=>(0,es.S)(e,{defaultKind:"system"})).join(", "),partOfSystemRelations:t}}}eD.columns=ew,eD.defaultColumnsFunc=eK;var e_=a(40466),eH=a(17883);function eW(e){let{filters:t,content:a=(0,n.jsx)(eD,{}),pagination:i}=e,r=(0,g.gf)(f.U).getOptionalString("organization.name")??"Backstage",c=(0,h.S)(ee.qP),{t:d}=(0,L.i)(eB.W),{allowed:p}=(0,eH.J)({permission:e_.C4});return(0,n.jsx)(l.d,{title:d("indexPage.title",{orgName:r}),themeId:"home",children:(0,n.jsxs)(o.U,{children:[(0,n.jsxs)(s.d,{title:"",children:[p&&(0,n.jsx)(m,{title:d("indexPage.createButtonTitle"),to:c&&c()}),(0,n.jsx)(y.Y,{children:d("indexPage.supportButtonContent")})]}),(0,n.jsx)(x.B9,{pagination:i,children:(0,n.jsxs)(b.GI,{children:[(0,n.jsx)(b.GI.Filters,{children:t}),(0,n.jsx)(b.GI.Content,{children:a})]})})]})})}function eG(e){let{columns:t,actions:a,initiallySelectedFilter:i="owned",initialKind:l="component",tableOptions:o={},emptyContent:s,pagination:r,ownerPickerMode:c,filters:d,initiallySelectedNamespaces:p}=e;return(0,n.jsx)(eW,{filters:d??(0,n.jsx)(Z,{initialKind:l,initiallySelectedFilter:i,ownerPickerMode:c,initiallySelectedNamespaces:p}),content:(0,n.jsx)(eD,{columns:t,actions:a,tableOptions:o,emptyContent:s}),pagination:r})}function eV(e){return(0,i.P1)()||(0,n.jsx)(eG,{...e})}},47426(e,t,a){a.d(t,{i:()=>n});function n({name:e,attributes:t,resourceType:a}){return a?{type:"resource",name:e,attributes:t,resourceType:a}:{type:"basic",name:e,attributes:t}}},17883(e,t,a){a.d(t,{J:()=>r});var n=a(50509),i=a(31057),l=a(98109),o=a(71696),s=a(52618);function r(e){let t=(0,n.gf)(i.x),{data:a,error:r}=(0,s.Ay)(e,async e=>{if((0,l.OL)(e.permission)&&!e.resourceRef)return o.b.DENY;let{result:a}=await t.authorize(e);return a});return r?{error:r,loading:!1,allowed:!1}:void 0===a?{loading:!0,allowed:!1}:{loading:!1,allowed:a===o.b.ALLOW}}}}]);
|
|
2
|
+
//# sourceMappingURL=7186.0b7e4914.chunk.js.map
|