@techdocs/cli 1.10.3 → 1.10.4-next.1
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 +19 -0
- package/dist/embedded-app/.config-schema.json +86 -86
- 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/{7526.e4cc38b1.chunk.js → 7526.dd1429dd.chunk.js} +2 -2
- package/dist/embedded-app/static/{7526.e4cc38b1.chunk.js.map → 7526.dd1429dd.chunk.js.map} +1 -1
- package/dist/embedded-app/static/main.c03cc860.js +550 -0
- package/dist/embedded-app/static/main.c03cc860.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.47f251b0.js} +2 -2
- package/dist/embedded-app/static/{runtime.0a0ee1fa.js.map → runtime.47f251b0.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 +7 -7
- package/dist/embedded-app/static/main.3c83117c.js +0 -550
- package/dist/embedded-app/static/main.3c83117c.js.map +0 -1
- package/dist/embedded-app/static/main.5f8bd308.css +0 -2
- 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,24 @@
|
|
|
1
1
|
# @techdocs/cli
|
|
2
2
|
|
|
3
|
+
## 1.10.4-next.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/backend-defaults@0.14.1-next.1
|
|
9
|
+
- @backstage/plugin-techdocs-node@1.13.11-next.0
|
|
10
|
+
|
|
11
|
+
## 1.10.4-next.0
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
- @backstage/backend-defaults@0.14.1-next.0
|
|
17
|
+
- @backstage/catalog-model@1.7.6
|
|
18
|
+
- @backstage/cli-common@0.1.16
|
|
19
|
+
- @backstage/config@1.3.6
|
|
20
|
+
- @backstage/plugin-techdocs-node@1.13.10
|
|
21
|
+
|
|
3
22
|
## 1.10.3
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -106,6 +106,31 @@
|
|
|
106
106
|
},
|
|
107
107
|
"path": "../cli/package.json"
|
|
108
108
|
},
|
|
109
|
+
{
|
|
110
|
+
"path": "../../plugins/permission-common/config.d.ts",
|
|
111
|
+
"value": {
|
|
112
|
+
"type": "object",
|
|
113
|
+
"properties": {
|
|
114
|
+
"permission": {
|
|
115
|
+
"description": "Configuration options for Backstage permissions and authorization",
|
|
116
|
+
"type": "object",
|
|
117
|
+
"properties": {
|
|
118
|
+
"enabled": {
|
|
119
|
+
"description": "Whether authorization is enabled in Backstage. Defaults to false, which means authorization\nrequests will be automatically allowed without invoking the authorization policy.",
|
|
120
|
+
"visibility": "frontend",
|
|
121
|
+
"type": "boolean"
|
|
122
|
+
},
|
|
123
|
+
"EXPERIMENTAL_enableBatchedRequests": {
|
|
124
|
+
"visibility": "frontend",
|
|
125
|
+
"type": "boolean"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
131
|
+
},
|
|
132
|
+
"packageName": "@backstage/plugin-permission-common"
|
|
133
|
+
},
|
|
109
134
|
{
|
|
110
135
|
"path": "../core-app-api/config.d.ts",
|
|
111
136
|
"value": {
|
|
@@ -379,6 +404,67 @@
|
|
|
379
404
|
},
|
|
380
405
|
"packageName": "@backstage/core-components"
|
|
381
406
|
},
|
|
407
|
+
{
|
|
408
|
+
"path": "../../plugins/techdocs/config.d.ts",
|
|
409
|
+
"value": {
|
|
410
|
+
"type": "object",
|
|
411
|
+
"properties": {
|
|
412
|
+
"techdocs": {
|
|
413
|
+
"description": "Configuration options for the techdocs plugin",
|
|
414
|
+
"type": "object",
|
|
415
|
+
"properties": {
|
|
416
|
+
"builder": {
|
|
417
|
+
"description": "Documentation building process depends on the builder attr",
|
|
418
|
+
"visibility": "frontend",
|
|
419
|
+
"enum": [
|
|
420
|
+
"external",
|
|
421
|
+
"local"
|
|
422
|
+
],
|
|
423
|
+
"type": "string"
|
|
424
|
+
},
|
|
425
|
+
"legacyUseCaseSensitiveTripletPaths": {
|
|
426
|
+
"description": "Allows fallback to case-sensitive triplets in case of migration issues.",
|
|
427
|
+
"visibility": "frontend",
|
|
428
|
+
"type": "boolean"
|
|
429
|
+
},
|
|
430
|
+
"sanitizer": {
|
|
431
|
+
"type": "object",
|
|
432
|
+
"properties": {
|
|
433
|
+
"allowedIframeHosts": {
|
|
434
|
+
"description": "Allows iframe tag only for listed hosts\nExample:\n allowedIframeHosts: [\"example.com\"]\n this will allow all iframes with the host `example.com` in the src attribute",
|
|
435
|
+
"visibility": "frontend",
|
|
436
|
+
"type": "array",
|
|
437
|
+
"items": {
|
|
438
|
+
"type": "string"
|
|
439
|
+
}
|
|
440
|
+
},
|
|
441
|
+
"allowedCustomElementTagNameRegExp": {
|
|
442
|
+
"description": "Allows listed custom element tag name regex\nExample:\n allowedCustomElementTagNameRegExp: '^backstage-'\n this will allow all custom elements with tag name matching `^backstage-` like <backstage-custom-element /> etc.",
|
|
443
|
+
"visibility": "frontend",
|
|
444
|
+
"type": "string"
|
|
445
|
+
},
|
|
446
|
+
"allowedCustomElementAttributeNameRegExp": {
|
|
447
|
+
"description": "Allows listed custom element attribute name regex\nExample:\n allowedCustomElementAttributeNameRegExp: 'attribute1|attribute2'\n this will allow all custom element attributes matching `attribute1` or `attribute2` like <backstage-custom-element attribute1=\"yes\" attribute2/>",
|
|
448
|
+
"visibility": "frontend",
|
|
449
|
+
"type": "string"
|
|
450
|
+
},
|
|
451
|
+
"additionalAllowedURIProtocols": {
|
|
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
|
+
"visibility": "frontend",
|
|
454
|
+
"type": "array",
|
|
455
|
+
"items": {
|
|
456
|
+
"type": "string"
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
},
|
|
464
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
465
|
+
},
|
|
466
|
+
"packageName": "@backstage/plugin-techdocs"
|
|
467
|
+
},
|
|
382
468
|
{
|
|
383
469
|
"path": "../integration/config.d.ts",
|
|
384
470
|
"value": {
|
|
@@ -1186,92 +1272,6 @@
|
|
|
1186
1272
|
},
|
|
1187
1273
|
"packageName": "@backstage/plugin-catalog"
|
|
1188
1274
|
},
|
|
1189
|
-
{
|
|
1190
|
-
"path": "../../plugins/permission-common/config.d.ts",
|
|
1191
|
-
"value": {
|
|
1192
|
-
"type": "object",
|
|
1193
|
-
"properties": {
|
|
1194
|
-
"permission": {
|
|
1195
|
-
"description": "Configuration options for Backstage permissions and authorization",
|
|
1196
|
-
"type": "object",
|
|
1197
|
-
"properties": {
|
|
1198
|
-
"enabled": {
|
|
1199
|
-
"description": "Whether authorization is enabled in Backstage. Defaults to false, which means authorization\nrequests will be automatically allowed without invoking the authorization policy.",
|
|
1200
|
-
"visibility": "frontend",
|
|
1201
|
-
"type": "boolean"
|
|
1202
|
-
},
|
|
1203
|
-
"EXPERIMENTAL_enableBatchedRequests": {
|
|
1204
|
-
"visibility": "frontend",
|
|
1205
|
-
"type": "boolean"
|
|
1206
|
-
}
|
|
1207
|
-
}
|
|
1208
|
-
}
|
|
1209
|
-
},
|
|
1210
|
-
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
1211
|
-
},
|
|
1212
|
-
"packageName": "@backstage/plugin-permission-common"
|
|
1213
|
-
},
|
|
1214
|
-
{
|
|
1215
|
-
"path": "../../plugins/techdocs/config.d.ts",
|
|
1216
|
-
"value": {
|
|
1217
|
-
"type": "object",
|
|
1218
|
-
"properties": {
|
|
1219
|
-
"techdocs": {
|
|
1220
|
-
"description": "Configuration options for the techdocs plugin",
|
|
1221
|
-
"type": "object",
|
|
1222
|
-
"properties": {
|
|
1223
|
-
"builder": {
|
|
1224
|
-
"description": "Documentation building process depends on the builder attr",
|
|
1225
|
-
"visibility": "frontend",
|
|
1226
|
-
"enum": [
|
|
1227
|
-
"external",
|
|
1228
|
-
"local"
|
|
1229
|
-
],
|
|
1230
|
-
"type": "string"
|
|
1231
|
-
},
|
|
1232
|
-
"legacyUseCaseSensitiveTripletPaths": {
|
|
1233
|
-
"description": "Allows fallback to case-sensitive triplets in case of migration issues.",
|
|
1234
|
-
"visibility": "frontend",
|
|
1235
|
-
"type": "boolean"
|
|
1236
|
-
},
|
|
1237
|
-
"sanitizer": {
|
|
1238
|
-
"type": "object",
|
|
1239
|
-
"properties": {
|
|
1240
|
-
"allowedIframeHosts": {
|
|
1241
|
-
"description": "Allows iframe tag only for listed hosts\nExample:\n allowedIframeHosts: [\"example.com\"]\n this will allow all iframes with the host `example.com` in the src attribute",
|
|
1242
|
-
"visibility": "frontend",
|
|
1243
|
-
"type": "array",
|
|
1244
|
-
"items": {
|
|
1245
|
-
"type": "string"
|
|
1246
|
-
}
|
|
1247
|
-
},
|
|
1248
|
-
"allowedCustomElementTagNameRegExp": {
|
|
1249
|
-
"description": "Allows listed custom element tag name regex\nExample:\n allowedCustomElementTagNameRegExp: '^backstage-'\n this will allow all custom elements with tag name matching `^backstage-` like <backstage-custom-element /> etc.",
|
|
1250
|
-
"visibility": "frontend",
|
|
1251
|
-
"type": "string"
|
|
1252
|
-
},
|
|
1253
|
-
"allowedCustomElementAttributeNameRegExp": {
|
|
1254
|
-
"description": "Allows listed custom element attribute name regex\nExample:\n allowedCustomElementAttributeNameRegExp: 'attribute1|attribute2'\n this will allow all custom element attributes matching `attribute1` or `attribute2` like <backstage-custom-element attribute1=\"yes\" attribute2/>",
|
|
1255
|
-
"visibility": "frontend",
|
|
1256
|
-
"type": "string"
|
|
1257
|
-
},
|
|
1258
|
-
"additionalAllowedURIProtocols": {
|
|
1259
|
-
"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:",
|
|
1260
|
-
"visibility": "frontend",
|
|
1261
|
-
"type": "array",
|
|
1262
|
-
"items": {
|
|
1263
|
-
"type": "string"
|
|
1264
|
-
}
|
|
1265
|
-
}
|
|
1266
|
-
}
|
|
1267
|
-
}
|
|
1268
|
-
}
|
|
1269
|
-
}
|
|
1270
|
-
},
|
|
1271
|
-
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
1272
|
-
},
|
|
1273
|
-
"packageName": "@backstage/plugin-techdocs"
|
|
1274
|
-
},
|
|
1275
1275
|
{
|
|
1276
1276
|
"path": "../backend-plugin-api/config.d.ts",
|
|
1277
1277
|
"value": {
|
|
@@ -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.47f251b0.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.c03cc860.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.47f251b0.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.c03cc860.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
|