@techdocs/cli 1.2.2-next.2 → 1.2.3-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 +32 -0
- package/dist/embedded-app/.config-schema.json +34 -5
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/static/{1032.98bf1656.chunk.js → 1032.eb3b9695.chunk.js} +2 -2
- package/dist/embedded-app/static/{1032.98bf1656.chunk.js.map → 1032.eb3b9695.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{1105.c44a4e31.chunk.js → 1105.40283456.chunk.js} +2 -2
- package/dist/embedded-app/static/{1105.c44a4e31.chunk.js.map → 1105.40283456.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{184.9b13e518.chunk.js → 184.1cc84853.chunk.js} +2 -2
- package/dist/embedded-app/static/{184.9b13e518.chunk.js.map → 184.1cc84853.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{2440.d2ba00eb.chunk.js → 2440.99fc794a.chunk.js} +2 -2
- package/dist/embedded-app/static/{2440.d2ba00eb.chunk.js.map → 2440.99fc794a.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{5458.75ad4388.chunk.js → 5458.c2cfc48a.chunk.js} +2 -2
- package/dist/embedded-app/static/{5458.75ad4388.chunk.js.map → 5458.c2cfc48a.chunk.js.map} +1 -1
- package/dist/embedded-app/static/5837.ebb0f422.chunk.js +3 -0
- package/dist/embedded-app/static/5837.ebb0f422.chunk.js.map +1 -0
- package/dist/embedded-app/static/{732.dc28074b.chunk.js → 732.426f89e4.chunk.js} +2 -2
- package/dist/embedded-app/static/{732.dc28074b.chunk.js.map → 732.426f89e4.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{7560.7f574fa6.chunk.js → 7560.b3ed3a97.chunk.js} +2 -2
- package/dist/embedded-app/static/{7560.7f574fa6.chunk.js.map → 7560.b3ed3a97.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{7750.f1fbf797.chunk.js → 7750.0f3395fe.chunk.js} +2 -2
- package/dist/embedded-app/static/{7750.f1fbf797.chunk.js.map → 7750.0f3395fe.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{8951.dbc0ba7e.chunk.js → 8951.b74cd97a.chunk.js} +1 -1
- package/dist/embedded-app/static/{8951.dbc0ba7e.chunk.js.map → 8951.b74cd97a.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{9545.d96fa9ec.chunk.js → 9545.59bf7391.chunk.js} +2 -2
- package/dist/embedded-app/static/{9545.d96fa9ec.chunk.js.map → 9545.59bf7391.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{9770.f5e0b19c.chunk.js → 9770.ae81d806.chunk.js} +2 -2
- package/dist/embedded-app/static/{9770.f5e0b19c.chunk.js.map → 9770.ae81d806.chunk.js.map} +1 -1
- package/dist/embedded-app/static/main.ee853139.js +492 -0
- package/dist/embedded-app/static/main.ee853139.js.map +1 -0
- package/dist/embedded-app/static/{module-octokit.67523b24.js → module-octokit.9fb0d235.js} +2 -2
- package/dist/embedded-app/static/{module-octokit.67523b24.js.map → module-octokit.9fb0d235.js.map} +1 -1
- package/dist/embedded-app/static/{runtime.8dc9310c.js → runtime.ee853139.js} +2 -2
- package/dist/embedded-app/static/{runtime.8dc9310c.js.map → runtime.ee853139.js.map} +1 -1
- package/dist/embedded-app/static/vendor.ee853139.js +236 -0
- package/dist/embedded-app/static/vendor.ee853139.js.map +1 -0
- package/dist/index.cjs.js +1 -1
- package/package.json +6 -6
- package/dist/embedded-app/static/5837.b13b9c05.chunk.js +0 -3
- package/dist/embedded-app/static/5837.b13b9c05.chunk.js.map +0 -1
- package/dist/embedded-app/static/main.8dc9310c.js +0 -492
- package/dist/embedded-app/static/main.8dc9310c.js.map +0 -1
- package/dist/embedded-app/static/vendor.8dc9310c.js +0 -236
- package/dist/embedded-app/static/vendor.8dc9310c.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# @techdocs/cli
|
|
2
2
|
|
|
3
|
+
## 1.2.3-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/backend-common@0.16.0-next.0
|
|
9
|
+
- @backstage/plugin-techdocs-node@1.4.2-next.0
|
|
10
|
+
- @backstage/catalog-model@1.1.3-next.0
|
|
11
|
+
- @backstage/cli-common@0.1.10
|
|
12
|
+
- @backstage/config@1.0.4-next.0
|
|
13
|
+
|
|
14
|
+
## 1.2.2
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- 0b2a30dead: fixing techdocs-cli Docker client creation
|
|
19
|
+
|
|
20
|
+
Docker client does not need to be created when --no-docker
|
|
21
|
+
option is provided.
|
|
22
|
+
|
|
23
|
+
If you had DOCKER_CERT_PATH environment variable defined
|
|
24
|
+
the Docker client was looking for certificates
|
|
25
|
+
and breaking techdocs-cli generate command even with --no-docker
|
|
26
|
+
option.
|
|
27
|
+
|
|
28
|
+
- Updated dependencies
|
|
29
|
+
- @backstage/catalog-model@1.1.2
|
|
30
|
+
- @backstage/backend-common@0.15.2
|
|
31
|
+
- @backstage/plugin-techdocs-node@1.4.1
|
|
32
|
+
- @backstage/cli-common@0.1.10
|
|
33
|
+
- @backstage/config@1.0.3
|
|
34
|
+
|
|
3
35
|
## 1.2.2-next.2
|
|
4
36
|
|
|
5
37
|
### Patch Changes
|
|
@@ -231,6 +231,8 @@
|
|
|
231
231
|
}
|
|
232
232
|
},
|
|
233
233
|
"homepage": {
|
|
234
|
+
"description": "This config was used by the HomepageTimer but has been replaced by the HeaderWorldClock in the home plugin",
|
|
235
|
+
"deprecated": "in favor of the HeaderWorldClock which is found in the home plugin",
|
|
234
236
|
"type": "object",
|
|
235
237
|
"properties": {
|
|
236
238
|
"clocks": {
|
|
@@ -517,7 +519,6 @@
|
|
|
517
519
|
},
|
|
518
520
|
"apps": {
|
|
519
521
|
"description": "GitHub Apps configuration",
|
|
520
|
-
"visibility": "backend",
|
|
521
522
|
"type": "array",
|
|
522
523
|
"items": {
|
|
523
524
|
"type": "object",
|
|
@@ -602,7 +603,6 @@
|
|
|
602
603
|
"properties": {
|
|
603
604
|
"clientEmail": {
|
|
604
605
|
"description": "Service account email used to authenticate requests.",
|
|
605
|
-
"visibility": "backend",
|
|
606
606
|
"type": "string"
|
|
607
607
|
},
|
|
608
608
|
"privateKey": {
|
|
@@ -630,7 +630,6 @@
|
|
|
630
630
|
},
|
|
631
631
|
"accessKeyId": {
|
|
632
632
|
"description": "Account access key used to authenticate requests.",
|
|
633
|
-
"visibility": "backend",
|
|
634
633
|
"type": "string"
|
|
635
634
|
},
|
|
636
635
|
"secretAccessKey": {
|
|
@@ -640,16 +639,46 @@
|
|
|
640
639
|
},
|
|
641
640
|
"roleArn": {
|
|
642
641
|
"description": "ARN of the role to be assumed",
|
|
643
|
-
"visibility": "backend",
|
|
644
642
|
"type": "string"
|
|
645
643
|
},
|
|
646
644
|
"externalId": {
|
|
647
645
|
"description": "External ID to use when assuming role",
|
|
648
|
-
"visibility": "backend",
|
|
649
646
|
"type": "string"
|
|
650
647
|
}
|
|
651
648
|
}
|
|
652
649
|
}
|
|
650
|
+
},
|
|
651
|
+
"gitea": {
|
|
652
|
+
"description": "Integration configuration for Gitea",
|
|
653
|
+
"type": "array",
|
|
654
|
+
"items": {
|
|
655
|
+
"type": "object",
|
|
656
|
+
"properties": {
|
|
657
|
+
"host": {
|
|
658
|
+
"description": "The hostname of the given Gitea instance",
|
|
659
|
+
"visibility": "frontend",
|
|
660
|
+
"type": "string"
|
|
661
|
+
},
|
|
662
|
+
"baseUrl": {
|
|
663
|
+
"description": "The base url for the Gitea instance.",
|
|
664
|
+
"visibility": "frontend",
|
|
665
|
+
"type": "string"
|
|
666
|
+
},
|
|
667
|
+
"username": {
|
|
668
|
+
"description": "The username to use for authenticated requests.",
|
|
669
|
+
"visibility": "secret",
|
|
670
|
+
"type": "string"
|
|
671
|
+
},
|
|
672
|
+
"password": {
|
|
673
|
+
"description": "Gitea password used to authenticate requests. This can be either a password\nor a generated access token.",
|
|
674
|
+
"visibility": "secret",
|
|
675
|
+
"type": "string"
|
|
676
|
+
}
|
|
677
|
+
},
|
|
678
|
+
"required": [
|
|
679
|
+
"host"
|
|
680
|
+
]
|
|
681
|
+
}
|
|
653
682
|
}
|
|
654
683
|
}
|
|
655
684
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Backstage is an open platform for building developer portals"/><link rel="apple-touch-icon" href="/logo192.png"/><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><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="description" content="Backstage is an open platform for building developer portals"/><link rel="apple-touch-icon" href="/logo192.png"/><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><script defer="defer" src="/static/runtime.ee853139.js"></script><script defer="defer" src="/static/module-material-ui.e3edf608.js"></script><script defer="defer" src="/static/module-lodash.0cada415.js"></script><script defer="defer" src="/static/module-date-fns.d70f4cc3.js"></script><script defer="defer" src="/static/module-yaml.b5c4d531.js"></script><script defer="defer" src="/static/module-ajv.fca02de5.js"></script><script defer="defer" src="/static/module-material-table.5d56e1cb.js"></script><script defer="defer" src="/static/module-luxon.f67513b2.js"></script><script defer="defer" src="/static/module-octokit.9fb0d235.js"></script><script defer="defer" src="/static/module-react-dom.5abdac04.js"></script><script defer="defer" src="/static/module-zod.49ffd80f.js"></script><script defer="defer" src="/static/module-react-beautiful-dnd.97cccd01.js"></script><script defer="defer" src="/static/vendor.ee853139.js"></script><script defer="defer" src="/static/main.ee853139.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[1032,732],{81032:function(y,i,n){n.r(i),n.d(i,{DependsOnResourcesCard:function(){return s}});var e=n(52322),c=n(25271),t=n(2784),r=n(732);function s(u){const{variant:a="gridItem"}=u;return(0,e.jsx)(r.RelatedEntitiesCard,{variant:a,title:"Depends on resources",entityKind:"Resource",relationType:c.nP,columns:r.resourceEntityColumns,emptyMessage:"No resource is a dependency of this component",emptyHelpLink:r.componentEntityHelpLink,asRenderableEntities:r.asResourceEntities})}},732:function(y,i,n){n.r(i),n.d(i,{RelatedEntitiesCard:function(){return u},asComponentEntities:function(){return f},asResourceEntities:function(){return h},asSystemEntities:function(){return g},componentEntityColumns:function(){return a},componentEntityHelpLink:function(){return p},resourceEntityColumns:function(){return C},resourceEntityHelpLink:function(){return E},systemEntityColumns:function(){return v},systemEntityHelpLink:function(){return R}});var e=n(52322),c=n(90436),t=n(43297),r=n(2784),s=n(
|
|
1
|
+
"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[1032,732],{81032:function(y,i,n){n.r(i),n.d(i,{DependsOnResourcesCard:function(){return s}});var e=n(52322),c=n(25271),t=n(2784),r=n(732);function s(u){const{variant:a="gridItem"}=u;return(0,e.jsx)(r.RelatedEntitiesCard,{variant:a,title:"Depends on resources",entityKind:"Resource",relationType:c.nP,columns:r.resourceEntityColumns,emptyMessage:"No resource is a dependency of this component",emptyHelpLink:r.componentEntityHelpLink,asRenderableEntities:r.asResourceEntities})}},732:function(y,i,n){n.r(i),n.d(i,{RelatedEntitiesCard:function(){return u},asComponentEntities:function(){return f},asResourceEntities:function(){return h},asSystemEntities:function(){return g},componentEntityColumns:function(){return a},componentEntityHelpLink:function(){return p},resourceEntityColumns:function(){return C},resourceEntityHelpLink:function(){return E},systemEntityColumns:function(){return v},systemEntityHelpLink:function(){return R}});var e=n(52322),c=n(90436),t=n(43297),r=n(2784),s=n(93414);function u(o){const{variant:l="gridItem",title:m,columns:j,entityKind:x,relationType:L,emptyMessage:k,emptyHelpLink:H,asRenderableEntities:D}=o,{entity:K}=(0,t.X2)(),{entities:S,loading:M,error:d}=(0,t.eK)(K,{type:L,kind:x});return M?(0,e.jsx)(s.rJ,{variant:l,title:m,children:(0,e.jsx)(s.Ex,{})}):d?(0,e.jsx)(s.rJ,{variant:l,title:m,children:(0,e.jsx)(s.Gk,{error:d})}):(0,e.jsx)(t.u3,{title:m,variant:l,emptyContent:(0,e.jsxs)("div",{style:{textAlign:"center"},children:[(0,e.jsx)(c.Z,{variant:"body1",children:k}),(0,e.jsx)(c.Z,{variant:"body2",children:(0,e.jsx)(s.rU,{to:H,children:"Learn how to change this."})})]}),columns:j,entities:D(S||[])})}const a=[t.u3.columns.createEntityRefColumn({defaultKind:"component"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createSpecTypeColumn(),t.u3.columns.createSpecLifecycleColumn(),t.u3.columns.createMetadataDescriptionColumn()],p="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component",f=o=>o,C=[t.u3.columns.createEntityRefColumn({defaultKind:"resource"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createSpecTypeColumn(),t.u3.columns.createSpecLifecycleColumn(),t.u3.columns.createMetadataDescriptionColumn()],E="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource",h=o=>o,v=[t.u3.columns.createEntityRefColumn({defaultKind:"system"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createMetadataDescriptionColumn()],R="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system",g=o=>o}}]);})();
|
|
2
2
|
|
|
3
|
-
//# sourceMappingURL=1032.
|
|
3
|
+
//# sourceMappingURL=1032.eb3b9695.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/DependsOnResourcesCard/DependsOnResourcesCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/presets.ts"],"names":["DependsOnResourcesCard","props","variant","RelatedEntitiesCard","title","entityKind","relationType","RELATION_DEPENDS_ON","columns","resourceEntityColumns","emptyMessage","emptyHelpLink","componentEntityHelpLink","asRenderableEntities","asResourceEntities","entity","useEntity","entities","loading","error","useRelatedEntities","type","kind","InfoCard","Progress","ResponseErrorPanel","EntityTable","emptyContent","div","style","textAlign","Typography","Link","to","componentEntityColumns","defaultKind","asComponentEntities","resourceEntityHelpLink","systemEntityColumns","systemEntityHelpLink","asSystemEntities"],"mappings":"gQA+BO,SAASA,EAAuBC,EAAoC,CACzE,KAAM,CAAEC,UAAU,UAAW,EAAID,EACjC,O,EACE,OAACE,sBAAmBA,CAClBD,QAASA,EACTE,MAAM,uBACNC,WAAW,WACXC,aAAcC,KACdC,QAASC,wBACTC,aAAa,gDACbC,cAAeC,0BACfC,qBAAsBC,oB,EAG5B,C,mgBCYO,SAASX,EACdF,EACA,CACA,KAAM,CACJC,UAAU,WACVE,QACAI,UACAH,aACAC,eACAI,eACAC,gBACAE,sBAAoB,EAClBZ,EAEE,CAAEc,QAAO,G,EAAIC,MAAU,EACvB,CAAEC,WAAUC,UAASC,OAAM,G,EAAIC,MAAmBL,EAAQ,CAC9DM,KAAMf,EACNgB,KAAMjB,CACR,CAAC,EAED,OAAIa,G,EAEA,OAACK,KAAQA,CAACrB,QAASA,EAASE,MAAOA,E,YACjC,OAACoB,KAAQA,G,GAKXL,G,EAEA,OAACI,KAAQA,CAACrB,QAASA,EAASE,MAAOA,E,YACjC,OAACqB,KAAkBA,CAACN,MAAOA,C,QAM/B,OAACO,KAAWA,CACVtB,MAAOA,EACPF,QAASA,EACTyB,c,EACE,QAACC,OAAIC,MAAO,CAAEC,UAAW,QAAS,E,aAChC,OAACC,IAAUA,CAAC7B,QAAQ,Q,SAASQ,C,MAC7B,OAACqB,IAAUA,CAAC7B,QAAQ,Q,YAClB,OAAC8B,KAAIA,CAACC,GAAItB,E,SAAe,2B,QAI/BH,QAASA,EACTS,SAAUJ,EAAqBI,GAAY,CAAC,CAAC,C,EAGnD,CCrFO,MAAMiB,EAAyD,CACpER,mCAA0C,CAAES,YAAa,WAAY,CAAC,EACtET,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCd,EACX,uFACWwB,EAAuBnB,GAClCA,EAEWR,EAAuD,CAClEiB,mCAA0C,CAAES,YAAa,UAAW,CAAC,EACrET,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCW,EACX,sFACWvB,EAAsBG,GACjCA,EAEWqB,EAAmD,CAC9DZ,mCAA0C,CAAES,YAAa,QAAS,CAAC,EACnET,+BAAsC,EACtCA,6CAAoD,C,EAEzCa,EACX,oFACWC,EAAoBvB,GAC/BA,C","file":"static/1032.
|
|
1
|
+
{"version":3,"sources":["webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/DependsOnResourcesCard/DependsOnResourcesCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/presets.ts"],"names":["DependsOnResourcesCard","props","variant","RelatedEntitiesCard","title","entityKind","relationType","RELATION_DEPENDS_ON","columns","resourceEntityColumns","emptyMessage","emptyHelpLink","componentEntityHelpLink","asRenderableEntities","asResourceEntities","entity","useEntity","entities","loading","error","useRelatedEntities","type","kind","InfoCard","Progress","ResponseErrorPanel","EntityTable","emptyContent","div","style","textAlign","Typography","Link","to","componentEntityColumns","defaultKind","asComponentEntities","resourceEntityHelpLink","systemEntityColumns","systemEntityHelpLink","asSystemEntities"],"mappings":"gQA+BO,SAASA,EAAuBC,EAAoC,CACzE,KAAM,CAAEC,UAAU,UAAW,EAAID,EACjC,O,EACE,OAACE,sBAAmBA,CAClBD,QAASA,EACTE,MAAM,uBACNC,WAAW,WACXC,aAAcC,KACdC,QAASC,wBACTC,aAAa,gDACbC,cAAeC,0BACfC,qBAAsBC,oB,EAG5B,C,mgBCYO,SAASX,EACdF,EACA,CACA,KAAM,CACJC,UAAU,WACVE,QACAI,UACAH,aACAC,eACAI,eACAC,gBACAE,sBAAoB,EAClBZ,EAEE,CAAEc,QAAO,G,EAAIC,MAAU,EACvB,CAAEC,WAAUC,UAASC,OAAM,G,EAAIC,MAAmBL,EAAQ,CAC9DM,KAAMf,EACNgB,KAAMjB,CACR,CAAC,EAED,OAAIa,G,EAEA,OAACK,KAAQA,CAACrB,QAASA,EAASE,MAAOA,E,YACjC,OAACoB,KAAQA,G,GAKXL,G,EAEA,OAACI,KAAQA,CAACrB,QAASA,EAASE,MAAOA,E,YACjC,OAACqB,KAAkBA,CAACN,MAAOA,C,QAM/B,OAACO,KAAWA,CACVtB,MAAOA,EACPF,QAASA,EACTyB,c,EACE,QAACC,OAAIC,MAAO,CAAEC,UAAW,QAAS,E,aAChC,OAACC,IAAUA,CAAC7B,QAAQ,Q,SAASQ,C,MAC7B,OAACqB,IAAUA,CAAC7B,QAAQ,Q,YAClB,OAAC8B,KAAIA,CAACC,GAAItB,E,SAAe,2B,QAI/BH,QAASA,EACTS,SAAUJ,EAAqBI,GAAY,CAAC,CAAC,C,EAGnD,CCrFO,MAAMiB,EAAyD,CACpER,mCAA0C,CAAES,YAAa,WAAY,CAAC,EACtET,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCd,EACX,uFACWwB,EAAuBnB,GAClCA,EAEWR,EAAuD,CAClEiB,mCAA0C,CAAES,YAAa,UAAW,CAAC,EACrET,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCW,EACX,sFACWvB,EAAsBG,GACjCA,EAEWqB,EAAmD,CAC9DZ,mCAA0C,CAAES,YAAa,QAAS,CAAC,EACnET,+BAAsC,EACtCA,6CAAoD,C,EAEzCa,EACX,oFACWC,EAAoBvB,GAC/BA,C","file":"static/1032.eb3b9695.chunk.js","sourcesContent":["/*\n * Copyright 2020 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 { RELATION_DEPENDS_ON } from '@backstage/catalog-model';\nimport { InfoCardVariants } from '@backstage/core-components';\nimport React from 'react';\nimport {\n asResourceEntities,\n componentEntityHelpLink,\n RelatedEntitiesCard,\n resourceEntityColumns,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface DependsOnResourcesCardProps {\n variant?: InfoCardVariants;\n}\n\nexport function DependsOnResourcesCard(props: DependsOnResourcesCardProps) {\n const { variant = 'gridItem' } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title=\"Depends on resources\"\n entityKind=\"Resource\"\n relationType={RELATION_DEPENDS_ON}\n columns={resourceEntityColumns}\n emptyMessage=\"No resource is a dependency of this component\"\n emptyHelpLink={componentEntityHelpLink}\n asRenderableEntities={asResourceEntities}\n />\n );\n}\n","/*\n * Copyright 2020 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 { Entity } from '@backstage/catalog-model';\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport {\n InfoCard,\n InfoCardVariants,\n Link,\n Progress,\n ResponseErrorPanel,\n TableColumn,\n} from '@backstage/core-components';\n\n/** @public */\nexport type RelatedEntitiesCardProps<T extends Entity> = {\n variant?: InfoCardVariants;\n title: string;\n columns: TableColumn<T>[];\n entityKind?: string;\n relationType: string;\n emptyMessage: string;\n emptyHelpLink: string;\n asRenderableEntities: (entities: Entity[]) => T[];\n};\n\n/**\n * A low level card component that can be used as a building block for more\n * specific cards.\n *\n * @remarks\n *\n * You probably want to make a dedicated component for your needs, which renders\n * this card as its implementation with some of the props set to the appropriate\n * values.\n *\n * @public\n */\nexport function RelatedEntitiesCard<T extends Entity>(\n props: RelatedEntitiesCardProps<T>,\n) {\n const {\n variant = 'gridItem',\n title,\n columns,\n entityKind,\n relationType,\n emptyMessage,\n emptyHelpLink,\n asRenderableEntities,\n } = props;\n\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: relationType,\n kind: entityKind,\n });\n\n if (loading) {\n return (\n <InfoCard variant={variant} title={title}>\n <Progress />\n </InfoCard>\n );\n }\n\n if (error) {\n return (\n <InfoCard variant={variant} title={title}>\n <ResponseErrorPanel error={error} />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title={title}\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">{emptyMessage}</Typography>\n <Typography variant=\"body2\">\n <Link to={emptyHelpLink}>Learn how to change this.</Link>\n </Typography>\n </div>\n }\n columns={columns}\n entities={asRenderableEntities(entities || [])}\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 */\nimport {\n ComponentEntity,\n Entity,\n ResourceEntity,\n SystemEntity,\n} from '@backstage/catalog-model';\nimport { EntityTable } from '@backstage/plugin-catalog-react';\nimport { TableColumn } from '@backstage/core-components';\n\nexport const componentEntityColumns: TableColumn<ComponentEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'component' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const componentEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component';\nexport const asComponentEntities = (entities: Entity[]): ComponentEntity[] =>\n entities as ComponentEntity[];\n\nexport const resourceEntityColumns: TableColumn<ResourceEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'resource' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const resourceEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource';\nexport const asResourceEntities = (entities: Entity[]): ResourceEntity[] =>\n entities as ResourceEntity[];\n\nexport const systemEntityColumns: TableColumn<SystemEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'system' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const systemEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system';\nexport const asSystemEntities = (entities: Entity[]): SystemEntity[] =>\n entities as SystemEntity[];\n"],"sourceRoot":""}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[1105,732],{1105:function(p,i,n){n.r(i),n.d(i,{HasComponentsCard:function(){return o}});var e=n(52322),c=n(25271),t=n(2784),r=n(732);function o(a){const{variant:u="gridItem"}=a;return(0,e.jsx)(r.RelatedEntitiesCard,{variant:u,title:"Has components",entityKind:"Component",relationType:c.aS,columns:r.componentEntityColumns,emptyMessage:"No component is part of this system",emptyHelpLink:r.componentEntityHelpLink,asRenderableEntities:r.asComponentEntities})}},732:function(p,i,n){n.r(i),n.d(i,{RelatedEntitiesCard:function(){return a},asComponentEntities:function(){return f},asResourceEntities:function(){return h},asSystemEntities:function(){return j},componentEntityColumns:function(){return u},componentEntityHelpLink:function(){return y},resourceEntityColumns:function(){return C},resourceEntityHelpLink:function(){return E},systemEntityColumns:function(){return v},systemEntityHelpLink:function(){return g}});var e=n(52322),c=n(90436),t=n(43297),r=n(2784),o=n(
|
|
1
|
+
"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[1105,732],{1105:function(p,i,n){n.r(i),n.d(i,{HasComponentsCard:function(){return o}});var e=n(52322),c=n(25271),t=n(2784),r=n(732);function o(a){const{variant:u="gridItem"}=a;return(0,e.jsx)(r.RelatedEntitiesCard,{variant:u,title:"Has components",entityKind:"Component",relationType:c.aS,columns:r.componentEntityColumns,emptyMessage:"No component is part of this system",emptyHelpLink:r.componentEntityHelpLink,asRenderableEntities:r.asComponentEntities})}},732:function(p,i,n){n.r(i),n.d(i,{RelatedEntitiesCard:function(){return a},asComponentEntities:function(){return f},asResourceEntities:function(){return h},asSystemEntities:function(){return j},componentEntityColumns:function(){return u},componentEntityHelpLink:function(){return y},resourceEntityColumns:function(){return C},resourceEntityHelpLink:function(){return E},systemEntityColumns:function(){return v},systemEntityHelpLink:function(){return g}});var e=n(52322),c=n(90436),t=n(43297),r=n(2784),o=n(93414);function a(s){const{variant:l="gridItem",title:m,columns:x,entityKind:H,relationType:L,emptyMessage:R,emptyHelpLink:k,asRenderableEntities:S}=s,{entity:K}=(0,t.X2)(),{entities:M,loading:T,error:d}=(0,t.eK)(K,{type:L,kind:H});return T?(0,e.jsx)(o.rJ,{variant:l,title:m,children:(0,e.jsx)(o.Ex,{})}):d?(0,e.jsx)(o.rJ,{variant:l,title:m,children:(0,e.jsx)(o.Gk,{error:d})}):(0,e.jsx)(t.u3,{title:m,variant:l,emptyContent:(0,e.jsxs)("div",{style:{textAlign:"center"},children:[(0,e.jsx)(c.Z,{variant:"body1",children:R}),(0,e.jsx)(c.Z,{variant:"body2",children:(0,e.jsx)(o.rU,{to:k,children:"Learn how to change this."})})]}),columns:x,entities:S(M||[])})}const u=[t.u3.columns.createEntityRefColumn({defaultKind:"component"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createSpecTypeColumn(),t.u3.columns.createSpecLifecycleColumn(),t.u3.columns.createMetadataDescriptionColumn()],y="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component",f=s=>s,C=[t.u3.columns.createEntityRefColumn({defaultKind:"resource"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createSpecTypeColumn(),t.u3.columns.createSpecLifecycleColumn(),t.u3.columns.createMetadataDescriptionColumn()],E="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource",h=s=>s,v=[t.u3.columns.createEntityRefColumn({defaultKind:"system"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createMetadataDescriptionColumn()],g="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system",j=s=>s}}]);})();
|
|
2
2
|
|
|
3
|
-
//# sourceMappingURL=1105.
|
|
3
|
+
//# sourceMappingURL=1105.40283456.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/HasComponentsCard/HasComponentsCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/presets.ts"],"names":["HasComponentsCard","props","variant","RelatedEntitiesCard","title","entityKind","relationType","RELATION_HAS_PART","columns","componentEntityColumns","emptyMessage","emptyHelpLink","componentEntityHelpLink","asRenderableEntities","asComponentEntities","entity","useEntity","entities","loading","error","useRelatedEntities","type","kind","InfoCard","Progress","ResponseErrorPanel","EntityTable","emptyContent","div","style","textAlign","Typography","Link","to","defaultKind","resourceEntityColumns","resourceEntityHelpLink","asResourceEntities","systemEntityColumns","systemEntityHelpLink","asSystemEntities"],"mappings":"0PA+BO,SAASA,EAAkBC,EAA+B,CAC/D,KAAM,CAAEC,UAAU,UAAW,EAAID,EACjC,O,EACE,OAACE,sBAAmBA,CAClBD,QAASA,EACTE,MAAM,iBACNC,WAAW,YACXC,aAAcC,KACdC,QAASC,yBACTC,aAAa,sCACbC,cAAeC,0BACfC,qBAAsBC,qB,EAG5B,C,mgBCYO,SAASX,EACdF,EACA,CACA,KAAM,CACJC,UAAU,WACVE,QACAI,UACAH,aACAC,eACAI,eACAC,gBACAE,sBAAoB,EAClBZ,EAEE,CAAEc,QAAO,G,EAAIC,MAAU,EACvB,CAAEC,WAAUC,UAASC,OAAM,G,EAAIC,MAAmBL,EAAQ,CAC9DM,KAAMf,EACNgB,KAAMjB,CACR,CAAC,EAED,OAAIa,G,EAEA,OAACK,KAAQA,CAACrB,QAASA,EAASE,MAAOA,E,YACjC,OAACoB,KAAQA,G,GAKXL,G,EAEA,OAACI,KAAQA,CAACrB,QAASA,EAASE,MAAOA,E,YACjC,OAACqB,KAAkBA,CAACN,MAAOA,C,QAM/B,OAACO,KAAWA,CACVtB,MAAOA,EACPF,QAASA,EACTyB,c,EACE,QAACC,OAAIC,MAAO,CAAEC,UAAW,QAAS,E,aAChC,OAACC,IAAUA,CAAC7B,QAAQ,Q,SAASQ,C,MAC7B,OAACqB,IAAUA,CAAC7B,QAAQ,Q,YAClB,OAAC8B,KAAIA,CAACC,GAAItB,E,SAAe,2B,QAI/BH,QAASA,EACTS,SAAUJ,EAAqBI,GAAY,CAAC,CAAC,C,EAGnD,CCrFO,MAAMR,EAAyD,CACpEiB,mCAA0C,CAAEQ,YAAa,WAAY,CAAC,EACtER,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCd,EACX,uFACWE,EAAuBG,GAClCA,EAEWkB,EAAuD,CAClET,mCAA0C,CAAEQ,YAAa,UAAW,CAAC,EACrER,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCU,EACX,sFACWC,EAAsBpB,GACjCA,EAEWqB,EAAmD,CAC9DZ,mCAA0C,CAAEQ,YAAa,QAAS,CAAC,EACnER,+BAAsC,EACtCA,6CAAoD,C,EAEzCa,EACX,oFACWC,EAAoBvB,GAC/BA,C","file":"static/1105.
|
|
1
|
+
{"version":3,"sources":["webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/HasComponentsCard/HasComponentsCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/presets.ts"],"names":["HasComponentsCard","props","variant","RelatedEntitiesCard","title","entityKind","relationType","RELATION_HAS_PART","columns","componentEntityColumns","emptyMessage","emptyHelpLink","componentEntityHelpLink","asRenderableEntities","asComponentEntities","entity","useEntity","entities","loading","error","useRelatedEntities","type","kind","InfoCard","Progress","ResponseErrorPanel","EntityTable","emptyContent","div","style","textAlign","Typography","Link","to","defaultKind","resourceEntityColumns","resourceEntityHelpLink","asResourceEntities","systemEntityColumns","systemEntityHelpLink","asSystemEntities"],"mappings":"0PA+BO,SAASA,EAAkBC,EAA+B,CAC/D,KAAM,CAAEC,UAAU,UAAW,EAAID,EACjC,O,EACE,OAACE,sBAAmBA,CAClBD,QAASA,EACTE,MAAM,iBACNC,WAAW,YACXC,aAAcC,KACdC,QAASC,yBACTC,aAAa,sCACbC,cAAeC,0BACfC,qBAAsBC,qB,EAG5B,C,mgBCYO,SAASX,EACdF,EACA,CACA,KAAM,CACJC,UAAU,WACVE,QACAI,UACAH,aACAC,eACAI,eACAC,gBACAE,sBAAoB,EAClBZ,EAEE,CAAEc,QAAO,G,EAAIC,MAAU,EACvB,CAAEC,WAAUC,UAASC,OAAM,G,EAAIC,MAAmBL,EAAQ,CAC9DM,KAAMf,EACNgB,KAAMjB,CACR,CAAC,EAED,OAAIa,G,EAEA,OAACK,KAAQA,CAACrB,QAASA,EAASE,MAAOA,E,YACjC,OAACoB,KAAQA,G,GAKXL,G,EAEA,OAACI,KAAQA,CAACrB,QAASA,EAASE,MAAOA,E,YACjC,OAACqB,KAAkBA,CAACN,MAAOA,C,QAM/B,OAACO,KAAWA,CACVtB,MAAOA,EACPF,QAASA,EACTyB,c,EACE,QAACC,OAAIC,MAAO,CAAEC,UAAW,QAAS,E,aAChC,OAACC,IAAUA,CAAC7B,QAAQ,Q,SAASQ,C,MAC7B,OAACqB,IAAUA,CAAC7B,QAAQ,Q,YAClB,OAAC8B,KAAIA,CAACC,GAAItB,E,SAAe,2B,QAI/BH,QAASA,EACTS,SAAUJ,EAAqBI,GAAY,CAAC,CAAC,C,EAGnD,CCrFO,MAAMR,EAAyD,CACpEiB,mCAA0C,CAAEQ,YAAa,WAAY,CAAC,EACtER,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCd,EACX,uFACWE,EAAuBG,GAClCA,EAEWkB,EAAuD,CAClET,mCAA0C,CAAEQ,YAAa,UAAW,CAAC,EACrER,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCU,EACX,sFACWC,EAAsBpB,GACjCA,EAEWqB,EAAmD,CAC9DZ,mCAA0C,CAAEQ,YAAa,QAAS,CAAC,EACnER,+BAAsC,EACtCA,6CAAoD,C,EAEzCa,EACX,oFACWC,EAAoBvB,GAC/BA,C","file":"static/1105.40283456.chunk.js","sourcesContent":["/*\n * Copyright 2020 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 { RELATION_HAS_PART } from '@backstage/catalog-model';\nimport { InfoCardVariants } from '@backstage/core-components';\nimport React from 'react';\nimport {\n asComponentEntities,\n componentEntityColumns,\n componentEntityHelpLink,\n RelatedEntitiesCard,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface HasComponentsCardProps {\n variant?: InfoCardVariants;\n}\n\nexport function HasComponentsCard(props: HasComponentsCardProps) {\n const { variant = 'gridItem' } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title=\"Has components\"\n entityKind=\"Component\"\n relationType={RELATION_HAS_PART}\n columns={componentEntityColumns}\n emptyMessage=\"No component is part of this system\"\n emptyHelpLink={componentEntityHelpLink}\n asRenderableEntities={asComponentEntities}\n />\n );\n}\n","/*\n * Copyright 2020 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 { Entity } from '@backstage/catalog-model';\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport {\n InfoCard,\n InfoCardVariants,\n Link,\n Progress,\n ResponseErrorPanel,\n TableColumn,\n} from '@backstage/core-components';\n\n/** @public */\nexport type RelatedEntitiesCardProps<T extends Entity> = {\n variant?: InfoCardVariants;\n title: string;\n columns: TableColumn<T>[];\n entityKind?: string;\n relationType: string;\n emptyMessage: string;\n emptyHelpLink: string;\n asRenderableEntities: (entities: Entity[]) => T[];\n};\n\n/**\n * A low level card component that can be used as a building block for more\n * specific cards.\n *\n * @remarks\n *\n * You probably want to make a dedicated component for your needs, which renders\n * this card as its implementation with some of the props set to the appropriate\n * values.\n *\n * @public\n */\nexport function RelatedEntitiesCard<T extends Entity>(\n props: RelatedEntitiesCardProps<T>,\n) {\n const {\n variant = 'gridItem',\n title,\n columns,\n entityKind,\n relationType,\n emptyMessage,\n emptyHelpLink,\n asRenderableEntities,\n } = props;\n\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: relationType,\n kind: entityKind,\n });\n\n if (loading) {\n return (\n <InfoCard variant={variant} title={title}>\n <Progress />\n </InfoCard>\n );\n }\n\n if (error) {\n return (\n <InfoCard variant={variant} title={title}>\n <ResponseErrorPanel error={error} />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title={title}\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">{emptyMessage}</Typography>\n <Typography variant=\"body2\">\n <Link to={emptyHelpLink}>Learn how to change this.</Link>\n </Typography>\n </div>\n }\n columns={columns}\n entities={asRenderableEntities(entities || [])}\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 */\nimport {\n ComponentEntity,\n Entity,\n ResourceEntity,\n SystemEntity,\n} from '@backstage/catalog-model';\nimport { EntityTable } from '@backstage/plugin-catalog-react';\nimport { TableColumn } from '@backstage/core-components';\n\nexport const componentEntityColumns: TableColumn<ComponentEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'component' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const componentEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component';\nexport const asComponentEntities = (entities: Entity[]): ComponentEntity[] =>\n entities as ComponentEntity[];\n\nexport const resourceEntityColumns: TableColumn<ResourceEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'resource' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const resourceEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource';\nexport const asResourceEntities = (entities: Entity[]): ResourceEntity[] =>\n entities as ResourceEntity[];\n\nexport const systemEntityColumns: TableColumn<SystemEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'system' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const systemEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system';\nexport const asSystemEntities = (entities: Entity[]): SystemEntity[] =>\n entities as SystemEntity[];\n"],"sourceRoot":""}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[184,732],{40184:function(y,i,n){n.r(i),n.d(i,{DependencyOfComponentsCard:function(){return o}});var e=n(52322),r=n(25271),t=n(2784),c=n(732);function o(a){const{variant:u="gridItem",title:l="Dependency of components"}=a;return(0,e.jsx)(c.RelatedEntitiesCard,{variant:u,title:l,entityKind:"Component",relationType:r.w$,columns:c.componentEntityColumns,emptyMessage:"No component depends on this component",emptyHelpLink:c.componentEntityHelpLink,asRenderableEntities:c.asComponentEntities})}},732:function(y,i,n){n.r(i),n.d(i,{RelatedEntitiesCard:function(){return a},asComponentEntities:function(){return f},asResourceEntities:function(){return h},asSystemEntities:function(){return j},componentEntityColumns:function(){return u},componentEntityHelpLink:function(){return l},resourceEntityColumns:function(){return C},resourceEntityHelpLink:function(){return E},systemEntityColumns:function(){return v},systemEntityHelpLink:function(){return g}});var e=n(52322),r=n(90436),t=n(43297),c=n(2784),o=n(
|
|
1
|
+
"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[184,732],{40184:function(y,i,n){n.r(i),n.d(i,{DependencyOfComponentsCard:function(){return o}});var e=n(52322),r=n(25271),t=n(2784),c=n(732);function o(a){const{variant:u="gridItem",title:l="Dependency of components"}=a;return(0,e.jsx)(c.RelatedEntitiesCard,{variant:u,title:l,entityKind:"Component",relationType:r.w$,columns:c.componentEntityColumns,emptyMessage:"No component depends on this component",emptyHelpLink:c.componentEntityHelpLink,asRenderableEntities:c.asComponentEntities})}},732:function(y,i,n){n.r(i),n.d(i,{RelatedEntitiesCard:function(){return a},asComponentEntities:function(){return f},asResourceEntities:function(){return h},asSystemEntities:function(){return j},componentEntityColumns:function(){return u},componentEntityHelpLink:function(){return l},resourceEntityColumns:function(){return C},resourceEntityHelpLink:function(){return E},systemEntityColumns:function(){return v},systemEntityHelpLink:function(){return g}});var e=n(52322),r=n(90436),t=n(43297),c=n(2784),o=n(93414);function a(s){const{variant:m="gridItem",title:d,columns:x,entityKind:L,relationType:R,emptyMessage:k,emptyHelpLink:H,asRenderableEntities:D}=s,{entity:K}=(0,t.X2)(),{entities:S,loading:M,error:p}=(0,t.eK)(K,{type:R,kind:L});return M?(0,e.jsx)(o.rJ,{variant:m,title:d,children:(0,e.jsx)(o.Ex,{})}):p?(0,e.jsx)(o.rJ,{variant:m,title:d,children:(0,e.jsx)(o.Gk,{error:p})}):(0,e.jsx)(t.u3,{title:d,variant:m,emptyContent:(0,e.jsxs)("div",{style:{textAlign:"center"},children:[(0,e.jsx)(r.Z,{variant:"body1",children:k}),(0,e.jsx)(r.Z,{variant:"body2",children:(0,e.jsx)(o.rU,{to:H,children:"Learn how to change this."})})]}),columns:x,entities:D(S||[])})}const u=[t.u3.columns.createEntityRefColumn({defaultKind:"component"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createSpecTypeColumn(),t.u3.columns.createSpecLifecycleColumn(),t.u3.columns.createMetadataDescriptionColumn()],l="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component",f=s=>s,C=[t.u3.columns.createEntityRefColumn({defaultKind:"resource"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createSpecTypeColumn(),t.u3.columns.createSpecLifecycleColumn(),t.u3.columns.createMetadataDescriptionColumn()],E="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource",h=s=>s,v=[t.u3.columns.createEntityRefColumn({defaultKind:"system"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createMetadataDescriptionColumn()],g="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system",j=s=>s}}]);})();
|
|
2
2
|
|
|
3
|
-
//# sourceMappingURL=184.
|
|
3
|
+
//# sourceMappingURL=184.1cc84853.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/DependencyOfComponentsCard/DependencyOfComponentsCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/presets.ts"],"names":["DependencyOfComponentsCard","props","variant","title","RelatedEntitiesCard","entityKind","relationType","RELATION_DEPENDENCY_OF","columns","componentEntityColumns","emptyMessage","emptyHelpLink","componentEntityHelpLink","asRenderableEntities","asComponentEntities","entity","useEntity","entities","loading","error","useRelatedEntities","type","kind","InfoCard","Progress","ResponseErrorPanel","EntityTable","emptyContent","div","style","textAlign","Typography","Link","to","defaultKind","resourceEntityColumns","resourceEntityHelpLink","asResourceEntities","systemEntityColumns","systemEntityHelpLink","asSystemEntities"],"mappings":"mQAgCO,SAASA,EACdC,EACA,CACA,KAAM,CAAEC,UAAU,WAAYC,QAAQ,0BAA2B,EAAIF,EACrE,O,EACE,OAACG,sBAAmBA,CAClBF,QAASA,EACTC,MAAOA,EACPE,WAAW,YACXC,aAAcC,KACdC,QAASC,yBACTC,aAAa,yCACbC,cAAeC,0BACfC,qBAAsBC,qB,EAG5B,C,mgBCSO,SAASV,EACdH,EACA,CACA,KAAM,CACJC,UAAU,WACVC,QACAK,UACAH,aACAC,eACAI,eACAC,gBACAE,sBAAoB,EAClBZ,EAEE,CAAEc,QAAO,G,EAAIC,MAAU,EACvB,CAAEC,WAAUC,UAASC,OAAM,G,EAAIC,MAAmBL,EAAQ,CAC9DM,KAAMf,EACNgB,KAAMjB,CACR,CAAC,EAED,OAAIa,G,EAEA,OAACK,KAAQA,CAACrB,QAASA,EAASC,MAAOA,E,YACjC,OAACqB,KAAQA,G,GAKXL,G,EAEA,OAACI,KAAQA,CAACrB,QAASA,EAASC,MAAOA,E,YACjC,OAACsB,KAAkBA,CAACN,MAAOA,C,QAM/B,OAACO,KAAWA,CACVvB,MAAOA,EACPD,QAASA,EACTyB,c,EACE,QAACC,OAAIC,MAAO,CAAEC,UAAW,QAAS,E,aAChC,OAACC,IAAUA,CAAC7B,QAAQ,Q,SAASQ,C,MAC7B,OAACqB,IAAUA,CAAC7B,QAAQ,Q,YAClB,OAAC8B,KAAIA,CAACC,GAAItB,E,SAAe,2B,QAI/BH,QAASA,EACTS,SAAUJ,EAAqBI,GAAY,CAAC,CAAC,C,EAGnD,CCrFO,MAAMR,EAAyD,CACpEiB,mCAA0C,CAAEQ,YAAa,WAAY,CAAC,EACtER,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCd,EACX,uFACWE,EAAuBG,GAClCA,EAEWkB,EAAuD,CAClET,mCAA0C,CAAEQ,YAAa,UAAW,CAAC,EACrER,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCU,EACX,sFACWC,EAAsBpB,GACjCA,EAEWqB,EAAmD,CAC9DZ,mCAA0C,CAAEQ,YAAa,QAAS,CAAC,EACnER,+BAAsC,EACtCA,6CAAoD,C,EAEzCa,EACX,oFACWC,EAAoBvB,GAC/BA,C","file":"static/184.
|
|
1
|
+
{"version":3,"sources":["webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/DependencyOfComponentsCard/DependencyOfComponentsCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/presets.ts"],"names":["DependencyOfComponentsCard","props","variant","title","RelatedEntitiesCard","entityKind","relationType","RELATION_DEPENDENCY_OF","columns","componentEntityColumns","emptyMessage","emptyHelpLink","componentEntityHelpLink","asRenderableEntities","asComponentEntities","entity","useEntity","entities","loading","error","useRelatedEntities","type","kind","InfoCard","Progress","ResponseErrorPanel","EntityTable","emptyContent","div","style","textAlign","Typography","Link","to","defaultKind","resourceEntityColumns","resourceEntityHelpLink","asResourceEntities","systemEntityColumns","systemEntityHelpLink","asSystemEntities"],"mappings":"mQAgCO,SAASA,EACdC,EACA,CACA,KAAM,CAAEC,UAAU,WAAYC,QAAQ,0BAA2B,EAAIF,EACrE,O,EACE,OAACG,sBAAmBA,CAClBF,QAASA,EACTC,MAAOA,EACPE,WAAW,YACXC,aAAcC,KACdC,QAASC,yBACTC,aAAa,yCACbC,cAAeC,0BACfC,qBAAsBC,qB,EAG5B,C,mgBCSO,SAASV,EACdH,EACA,CACA,KAAM,CACJC,UAAU,WACVC,QACAK,UACAH,aACAC,eACAI,eACAC,gBACAE,sBAAoB,EAClBZ,EAEE,CAAEc,QAAO,G,EAAIC,MAAU,EACvB,CAAEC,WAAUC,UAASC,OAAM,G,EAAIC,MAAmBL,EAAQ,CAC9DM,KAAMf,EACNgB,KAAMjB,CACR,CAAC,EAED,OAAIa,G,EAEA,OAACK,KAAQA,CAACrB,QAASA,EAASC,MAAOA,E,YACjC,OAACqB,KAAQA,G,GAKXL,G,EAEA,OAACI,KAAQA,CAACrB,QAASA,EAASC,MAAOA,E,YACjC,OAACsB,KAAkBA,CAACN,MAAOA,C,QAM/B,OAACO,KAAWA,CACVvB,MAAOA,EACPD,QAASA,EACTyB,c,EACE,QAACC,OAAIC,MAAO,CAAEC,UAAW,QAAS,E,aAChC,OAACC,IAAUA,CAAC7B,QAAQ,Q,SAASQ,C,MAC7B,OAACqB,IAAUA,CAAC7B,QAAQ,Q,YAClB,OAAC8B,KAAIA,CAACC,GAAItB,E,SAAe,2B,QAI/BH,QAASA,EACTS,SAAUJ,EAAqBI,GAAY,CAAC,CAAC,C,EAGnD,CCrFO,MAAMR,EAAyD,CACpEiB,mCAA0C,CAAEQ,YAAa,WAAY,CAAC,EACtER,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCd,EACX,uFACWE,EAAuBG,GAClCA,EAEWkB,EAAuD,CAClET,mCAA0C,CAAEQ,YAAa,UAAW,CAAC,EACrER,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCU,EACX,sFACWC,EAAsBpB,GACjCA,EAEWqB,EAAmD,CAC9DZ,mCAA0C,CAAEQ,YAAa,QAAS,CAAC,EACnER,+BAAsC,EACtCA,6CAAoD,C,EAEzCa,EACX,oFACWC,EAAoBvB,GAC/BA,C","file":"static/184.1cc84853.chunk.js","sourcesContent":["/*\n * Copyright 2020 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 { RELATION_DEPENDENCY_OF } from '@backstage/catalog-model';\nimport { InfoCardVariants } from '@backstage/core-components';\nimport React from 'react';\nimport {\n asComponentEntities,\n componentEntityColumns,\n componentEntityHelpLink,\n RelatedEntitiesCard,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface DependencyOfComponentsCardProps {\n variant?: InfoCardVariants;\n title?: string;\n}\n\nexport function DependencyOfComponentsCard(\n props: DependencyOfComponentsCardProps,\n) {\n const { variant = 'gridItem', title = 'Dependency of components' } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title={title}\n entityKind=\"Component\"\n relationType={RELATION_DEPENDENCY_OF}\n columns={componentEntityColumns}\n emptyMessage=\"No component depends on this component\"\n emptyHelpLink={componentEntityHelpLink}\n asRenderableEntities={asComponentEntities}\n />\n );\n}\n","/*\n * Copyright 2020 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 { Entity } from '@backstage/catalog-model';\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport {\n InfoCard,\n InfoCardVariants,\n Link,\n Progress,\n ResponseErrorPanel,\n TableColumn,\n} from '@backstage/core-components';\n\n/** @public */\nexport type RelatedEntitiesCardProps<T extends Entity> = {\n variant?: InfoCardVariants;\n title: string;\n columns: TableColumn<T>[];\n entityKind?: string;\n relationType: string;\n emptyMessage: string;\n emptyHelpLink: string;\n asRenderableEntities: (entities: Entity[]) => T[];\n};\n\n/**\n * A low level card component that can be used as a building block for more\n * specific cards.\n *\n * @remarks\n *\n * You probably want to make a dedicated component for your needs, which renders\n * this card as its implementation with some of the props set to the appropriate\n * values.\n *\n * @public\n */\nexport function RelatedEntitiesCard<T extends Entity>(\n props: RelatedEntitiesCardProps<T>,\n) {\n const {\n variant = 'gridItem',\n title,\n columns,\n entityKind,\n relationType,\n emptyMessage,\n emptyHelpLink,\n asRenderableEntities,\n } = props;\n\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: relationType,\n kind: entityKind,\n });\n\n if (loading) {\n return (\n <InfoCard variant={variant} title={title}>\n <Progress />\n </InfoCard>\n );\n }\n\n if (error) {\n return (\n <InfoCard variant={variant} title={title}>\n <ResponseErrorPanel error={error} />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title={title}\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">{emptyMessage}</Typography>\n <Typography variant=\"body2\">\n <Link to={emptyHelpLink}>Learn how to change this.</Link>\n </Typography>\n </div>\n }\n columns={columns}\n entities={asRenderableEntities(entities || [])}\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 */\nimport {\n ComponentEntity,\n Entity,\n ResourceEntity,\n SystemEntity,\n} from '@backstage/catalog-model';\nimport { EntityTable } from '@backstage/plugin-catalog-react';\nimport { TableColumn } from '@backstage/core-components';\n\nexport const componentEntityColumns: TableColumn<ComponentEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'component' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const componentEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component';\nexport const asComponentEntities = (entities: Entity[]): ComponentEntity[] =>\n entities as ComponentEntity[];\n\nexport const resourceEntityColumns: TableColumn<ResourceEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'resource' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const resourceEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource';\nexport const asResourceEntities = (entities: Entity[]): ResourceEntity[] =>\n entities as ResourceEntity[];\n\nexport const systemEntityColumns: TableColumn<SystemEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'system' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const systemEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system';\nexport const asSystemEntities = (entities: Entity[]): SystemEntity[] =>\n entities as SystemEntity[];\n"],"sourceRoot":""}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[2440,732],{82440:function(p,i,n){n.r(i),n.d(i,{HasSubcomponentsCard:function(){return o}});var e=n(52322),c=n(25271),t=n(2784),r=n(732);function o(a){const{variant:u="gridItem"}=a;return(0,e.jsx)(r.RelatedEntitiesCard,{variant:u,title:"Has subcomponents",entityKind:"Component",relationType:c.aS,columns:r.componentEntityColumns,asRenderableEntities:r.asComponentEntities,emptyMessage:"No subcomponent is part of this component",emptyHelpLink:"https://backstage.io/docs/features/software-catalog/descriptor-format#specsubcomponentof-optional"})}},732:function(p,i,n){n.r(i),n.d(i,{RelatedEntitiesCard:function(){return a},asComponentEntities:function(){return f},asResourceEntities:function(){return h},asSystemEntities:function(){return j},componentEntityColumns:function(){return u},componentEntityHelpLink:function(){return y},resourceEntityColumns:function(){return C},resourceEntityHelpLink:function(){return E},systemEntityColumns:function(){return v},systemEntityHelpLink:function(){return g}});var e=n(52322),c=n(90436),t=n(43297),r=n(2784),o=n(
|
|
1
|
+
"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[2440,732],{82440:function(p,i,n){n.r(i),n.d(i,{HasSubcomponentsCard:function(){return o}});var e=n(52322),c=n(25271),t=n(2784),r=n(732);function o(a){const{variant:u="gridItem"}=a;return(0,e.jsx)(r.RelatedEntitiesCard,{variant:u,title:"Has subcomponents",entityKind:"Component",relationType:c.aS,columns:r.componentEntityColumns,asRenderableEntities:r.asComponentEntities,emptyMessage:"No subcomponent is part of this component",emptyHelpLink:"https://backstage.io/docs/features/software-catalog/descriptor-format#specsubcomponentof-optional"})}},732:function(p,i,n){n.r(i),n.d(i,{RelatedEntitiesCard:function(){return a},asComponentEntities:function(){return f},asResourceEntities:function(){return h},asSystemEntities:function(){return j},componentEntityColumns:function(){return u},componentEntityHelpLink:function(){return y},resourceEntityColumns:function(){return C},resourceEntityHelpLink:function(){return E},systemEntityColumns:function(){return v},systemEntityHelpLink:function(){return g}});var e=n(52322),c=n(90436),t=n(43297),r=n(2784),o=n(93414);function a(s){const{variant:l="gridItem",title:m,columns:x,entityKind:H,relationType:L,emptyMessage:R,emptyHelpLink:k,asRenderableEntities:S}=s,{entity:b}=(0,t.X2)(),{entities:K,loading:M,error:d}=(0,t.eK)(b,{type:L,kind:H});return M?(0,e.jsx)(o.rJ,{variant:l,title:m,children:(0,e.jsx)(o.Ex,{})}):d?(0,e.jsx)(o.rJ,{variant:l,title:m,children:(0,e.jsx)(o.Gk,{error:d})}):(0,e.jsx)(t.u3,{title:m,variant:l,emptyContent:(0,e.jsxs)("div",{style:{textAlign:"center"},children:[(0,e.jsx)(c.Z,{variant:"body1",children:R}),(0,e.jsx)(c.Z,{variant:"body2",children:(0,e.jsx)(o.rU,{to:k,children:"Learn how to change this."})})]}),columns:x,entities:S(K||[])})}const u=[t.u3.columns.createEntityRefColumn({defaultKind:"component"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createSpecTypeColumn(),t.u3.columns.createSpecLifecycleColumn(),t.u3.columns.createMetadataDescriptionColumn()],y="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component",f=s=>s,C=[t.u3.columns.createEntityRefColumn({defaultKind:"resource"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createSpecTypeColumn(),t.u3.columns.createSpecLifecycleColumn(),t.u3.columns.createMetadataDescriptionColumn()],E="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource",h=s=>s,v=[t.u3.columns.createEntityRefColumn({defaultKind:"system"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createMetadataDescriptionColumn()],g="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system",j=s=>s}}]);})();
|
|
2
2
|
|
|
3
|
-
//# sourceMappingURL=2440.
|
|
3
|
+
//# sourceMappingURL=2440.99fc794a.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/HasSubcomponentsCard/HasSubcomponentsCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/presets.ts"],"names":["HasSubcomponentsCard","props","variant","RelatedEntitiesCard","title","entityKind","relationType","RELATION_HAS_PART","columns","componentEntityColumns","asRenderableEntities","asComponentEntities","emptyMessage","emptyHelpLink","entity","useEntity","entities","loading","error","useRelatedEntities","type","kind","InfoCard","Progress","ResponseErrorPanel","EntityTable","emptyContent","div","style","textAlign","Typography","Link","to","defaultKind","componentEntityHelpLink","resourceEntityColumns","resourceEntityHelpLink","asResourceEntities","systemEntityColumns","systemEntityHelpLink","asSystemEntities"],"mappings":"8PA8BO,SAASA,EAAqBC,EAAkC,CACrE,KAAM,CAAEC,UAAU,UAAW,EAAID,EACjC,O,EACE,OAACE,sBAAmBA,CAClBD,QAASA,EACTE,MAAM,oBACNC,WAAW,YACXC,aAAcC,KACdC,QAASC,yBACTC,qBAAsBC,sBACtBC,aAAa,4CACbC,cAAc,mG,EAGpB,C,mgBCaO,SAASV,EACdF,EACA,CACA,KAAM,CACJC,UAAU,WACVE,QACAI,UACAH,aACAC,eACAM,eACAC,gBACAH,sBAAoB,EAClBT,EAEE,CAAEa,QAAO,G,EAAIC,MAAU,EACvB,CAAEC,WAAUC,UAASC,OAAM,G,EAAIC,MAAmBL,EAAQ,CAC9DM,KAAMd,EACNe,KAAMhB,CACR,CAAC,EAED,OAAIY,G,EAEA,OAACK,KAAQA,CAACpB,QAASA,EAASE,MAAOA,E,YACjC,OAACmB,KAAQA,G,GAKXL,G,EAEA,OAACI,KAAQA,CAACpB,QAASA,EAASE,MAAOA,E,YACjC,OAACoB,KAAkBA,CAACN,MAAOA,C,QAM/B,OAACO,KAAWA,CACVrB,MAAOA,EACPF,QAASA,EACTwB,c,EACE,QAACC,OAAIC,MAAO,CAAEC,UAAW,QAAS,E,aAChC,OAACC,IAAUA,CAAC5B,QAAQ,Q,SAASU,C,MAC7B,OAACkB,IAAUA,CAAC5B,QAAQ,Q,YAClB,OAAC6B,KAAIA,CAACC,GAAInB,E,SAAe,2B,QAI/BL,QAASA,EACTQ,SAAUN,EAAqBM,GAAY,CAAC,CAAC,C,EAGnD,CCrFO,MAAMP,EAAyD,CACpEgB,mCAA0C,CAAEQ,YAAa,WAAY,CAAC,EACtER,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCS,EACX,uFACWvB,EAAuBK,GAClCA,EAEWmB,EAAuD,CAClEV,mCAA0C,CAAEQ,YAAa,UAAW,CAAC,EACrER,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCW,EACX,sFACWC,EAAsBrB,GACjCA,EAEWsB,EAAmD,CAC9Db,mCAA0C,CAAEQ,YAAa,QAAS,CAAC,EACnER,+BAAsC,EACtCA,6CAAoD,C,EAEzCc,EACX,oFACWC,EAAoBxB,GAC/BA,C","file":"static/2440.
|
|
1
|
+
{"version":3,"sources":["webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/HasSubcomponentsCard/HasSubcomponentsCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/presets.ts"],"names":["HasSubcomponentsCard","props","variant","RelatedEntitiesCard","title","entityKind","relationType","RELATION_HAS_PART","columns","componentEntityColumns","asRenderableEntities","asComponentEntities","emptyMessage","emptyHelpLink","entity","useEntity","entities","loading","error","useRelatedEntities","type","kind","InfoCard","Progress","ResponseErrorPanel","EntityTable","emptyContent","div","style","textAlign","Typography","Link","to","defaultKind","componentEntityHelpLink","resourceEntityColumns","resourceEntityHelpLink","asResourceEntities","systemEntityColumns","systemEntityHelpLink","asSystemEntities"],"mappings":"8PA8BO,SAASA,EAAqBC,EAAkC,CACrE,KAAM,CAAEC,UAAU,UAAW,EAAID,EACjC,O,EACE,OAACE,sBAAmBA,CAClBD,QAASA,EACTE,MAAM,oBACNC,WAAW,YACXC,aAAcC,KACdC,QAASC,yBACTC,qBAAsBC,sBACtBC,aAAa,4CACbC,cAAc,mG,EAGpB,C,mgBCaO,SAASV,EACdF,EACA,CACA,KAAM,CACJC,UAAU,WACVE,QACAI,UACAH,aACAC,eACAM,eACAC,gBACAH,sBAAoB,EAClBT,EAEE,CAAEa,QAAO,G,EAAIC,MAAU,EACvB,CAAEC,WAAUC,UAASC,OAAM,G,EAAIC,MAAmBL,EAAQ,CAC9DM,KAAMd,EACNe,KAAMhB,CACR,CAAC,EAED,OAAIY,G,EAEA,OAACK,KAAQA,CAACpB,QAASA,EAASE,MAAOA,E,YACjC,OAACmB,KAAQA,G,GAKXL,G,EAEA,OAACI,KAAQA,CAACpB,QAASA,EAASE,MAAOA,E,YACjC,OAACoB,KAAkBA,CAACN,MAAOA,C,QAM/B,OAACO,KAAWA,CACVrB,MAAOA,EACPF,QAASA,EACTwB,c,EACE,QAACC,OAAIC,MAAO,CAAEC,UAAW,QAAS,E,aAChC,OAACC,IAAUA,CAAC5B,QAAQ,Q,SAASU,C,MAC7B,OAACkB,IAAUA,CAAC5B,QAAQ,Q,YAClB,OAAC6B,KAAIA,CAACC,GAAInB,E,SAAe,2B,QAI/BL,QAASA,EACTQ,SAAUN,EAAqBM,GAAY,CAAC,CAAC,C,EAGnD,CCrFO,MAAMP,EAAyD,CACpEgB,mCAA0C,CAAEQ,YAAa,WAAY,CAAC,EACtER,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCS,EACX,uFACWvB,EAAuBK,GAClCA,EAEWmB,EAAuD,CAClEV,mCAA0C,CAAEQ,YAAa,UAAW,CAAC,EACrER,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCW,EACX,sFACWC,EAAsBrB,GACjCA,EAEWsB,EAAmD,CAC9Db,mCAA0C,CAAEQ,YAAa,QAAS,CAAC,EACnER,+BAAsC,EACtCA,6CAAoD,C,EAEzCc,EACX,oFACWC,EAAoBxB,GAC/BA,C","file":"static/2440.99fc794a.chunk.js","sourcesContent":["/*\n * Copyright 2020 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 { RELATION_HAS_PART } from '@backstage/catalog-model';\nimport { InfoCardVariants } from '@backstage/core-components';\nimport React from 'react';\nimport {\n asComponentEntities,\n componentEntityColumns,\n RelatedEntitiesCard,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface HasSubcomponentsCardProps {\n variant?: InfoCardVariants;\n}\n\nexport function HasSubcomponentsCard(props: HasSubcomponentsCardProps) {\n const { variant = 'gridItem' } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title=\"Has subcomponents\"\n entityKind=\"Component\"\n relationType={RELATION_HAS_PART}\n columns={componentEntityColumns}\n asRenderableEntities={asComponentEntities}\n emptyMessage=\"No subcomponent is part of this component\"\n emptyHelpLink=\"https://backstage.io/docs/features/software-catalog/descriptor-format#specsubcomponentof-optional\"\n />\n );\n}\n","/*\n * Copyright 2020 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 { Entity } from '@backstage/catalog-model';\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport {\n InfoCard,\n InfoCardVariants,\n Link,\n Progress,\n ResponseErrorPanel,\n TableColumn,\n} from '@backstage/core-components';\n\n/** @public */\nexport type RelatedEntitiesCardProps<T extends Entity> = {\n variant?: InfoCardVariants;\n title: string;\n columns: TableColumn<T>[];\n entityKind?: string;\n relationType: string;\n emptyMessage: string;\n emptyHelpLink: string;\n asRenderableEntities: (entities: Entity[]) => T[];\n};\n\n/**\n * A low level card component that can be used as a building block for more\n * specific cards.\n *\n * @remarks\n *\n * You probably want to make a dedicated component for your needs, which renders\n * this card as its implementation with some of the props set to the appropriate\n * values.\n *\n * @public\n */\nexport function RelatedEntitiesCard<T extends Entity>(\n props: RelatedEntitiesCardProps<T>,\n) {\n const {\n variant = 'gridItem',\n title,\n columns,\n entityKind,\n relationType,\n emptyMessage,\n emptyHelpLink,\n asRenderableEntities,\n } = props;\n\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: relationType,\n kind: entityKind,\n });\n\n if (loading) {\n return (\n <InfoCard variant={variant} title={title}>\n <Progress />\n </InfoCard>\n );\n }\n\n if (error) {\n return (\n <InfoCard variant={variant} title={title}>\n <ResponseErrorPanel error={error} />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title={title}\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">{emptyMessage}</Typography>\n <Typography variant=\"body2\">\n <Link to={emptyHelpLink}>Learn how to change this.</Link>\n </Typography>\n </div>\n }\n columns={columns}\n entities={asRenderableEntities(entities || [])}\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 */\nimport {\n ComponentEntity,\n Entity,\n ResourceEntity,\n SystemEntity,\n} from '@backstage/catalog-model';\nimport { EntityTable } from '@backstage/plugin-catalog-react';\nimport { TableColumn } from '@backstage/core-components';\n\nexport const componentEntityColumns: TableColumn<ComponentEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'component' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const componentEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component';\nexport const asComponentEntities = (entities: Entity[]): ComponentEntity[] =>\n entities as ComponentEntity[];\n\nexport const resourceEntityColumns: TableColumn<ResourceEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'resource' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const resourceEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource';\nexport const asResourceEntities = (entities: Entity[]): ResourceEntity[] =>\n entities as ResourceEntity[];\n\nexport const systemEntityColumns: TableColumn<SystemEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'system' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const systemEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system';\nexport const asSystemEntities = (entities: Entity[]): SystemEntity[] =>\n entities as SystemEntity[];\n"],"sourceRoot":""}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[5458,732],{5458:function(y,i,n){n.r(i),n.d(i,{HasSystemsCard:function(){return s}});var e=n(52322),c=n(25271),t=n(2784),r=n(732);function s(a){const{variant:u="gridItem"}=a;return(0,e.jsx)(r.RelatedEntitiesCard,{variant:u,title:"Has systems",entityKind:"System",relationType:c.aS,columns:r.systemEntityColumns,asRenderableEntities:r.asSystemEntities,emptyMessage:"No system is part of this domain",emptyHelpLink:r.systemEntityHelpLink})}},732:function(y,i,n){n.r(i),n.d(i,{RelatedEntitiesCard:function(){return a},asComponentEntities:function(){return f},asResourceEntities:function(){return h},asSystemEntities:function(){return j},componentEntityColumns:function(){return u},componentEntityHelpLink:function(){return p},resourceEntityColumns:function(){return C},resourceEntityHelpLink:function(){return E},systemEntityColumns:function(){return v},systemEntityHelpLink:function(){return g}});var e=n(52322),c=n(90436),t=n(43297),r=n(2784),s=n(
|
|
1
|
+
"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[5458,732],{5458:function(y,i,n){n.r(i),n.d(i,{HasSystemsCard:function(){return s}});var e=n(52322),c=n(25271),t=n(2784),r=n(732);function s(a){const{variant:u="gridItem"}=a;return(0,e.jsx)(r.RelatedEntitiesCard,{variant:u,title:"Has systems",entityKind:"System",relationType:c.aS,columns:r.systemEntityColumns,asRenderableEntities:r.asSystemEntities,emptyMessage:"No system is part of this domain",emptyHelpLink:r.systemEntityHelpLink})}},732:function(y,i,n){n.r(i),n.d(i,{RelatedEntitiesCard:function(){return a},asComponentEntities:function(){return f},asResourceEntities:function(){return h},asSystemEntities:function(){return j},componentEntityColumns:function(){return u},componentEntityHelpLink:function(){return p},resourceEntityColumns:function(){return C},resourceEntityHelpLink:function(){return E},systemEntityColumns:function(){return v},systemEntityHelpLink:function(){return g}});var e=n(52322),c=n(90436),t=n(43297),r=n(2784),s=n(93414);function a(o){const{variant:l="gridItem",title:m,columns:x,entityKind:H,relationType:L,emptyMessage:R,emptyHelpLink:S,asRenderableEntities:k}=o,{entity:K}=(0,t.X2)(),{entities:M,loading:T,error:d}=(0,t.eK)(K,{type:L,kind:H});return T?(0,e.jsx)(s.rJ,{variant:l,title:m,children:(0,e.jsx)(s.Ex,{})}):d?(0,e.jsx)(s.rJ,{variant:l,title:m,children:(0,e.jsx)(s.Gk,{error:d})}):(0,e.jsx)(t.u3,{title:m,variant:l,emptyContent:(0,e.jsxs)("div",{style:{textAlign:"center"},children:[(0,e.jsx)(c.Z,{variant:"body1",children:R}),(0,e.jsx)(c.Z,{variant:"body2",children:(0,e.jsx)(s.rU,{to:S,children:"Learn how to change this."})})]}),columns:x,entities:k(M||[])})}const u=[t.u3.columns.createEntityRefColumn({defaultKind:"component"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createSpecTypeColumn(),t.u3.columns.createSpecLifecycleColumn(),t.u3.columns.createMetadataDescriptionColumn()],p="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component",f=o=>o,C=[t.u3.columns.createEntityRefColumn({defaultKind:"resource"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createSpecTypeColumn(),t.u3.columns.createSpecLifecycleColumn(),t.u3.columns.createMetadataDescriptionColumn()],E="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource",h=o=>o,v=[t.u3.columns.createEntityRefColumn({defaultKind:"system"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createMetadataDescriptionColumn()],g="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system",j=o=>o}}]);})();
|
|
2
2
|
|
|
3
|
-
//# sourceMappingURL=5458.
|
|
3
|
+
//# sourceMappingURL=5458.c2cfc48a.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/HasSystemsCard/HasSystemsCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/presets.ts"],"names":["HasSystemsCard","props","variant","RelatedEntitiesCard","title","entityKind","relationType","RELATION_HAS_PART","columns","systemEntityColumns","asRenderableEntities","asSystemEntities","emptyMessage","emptyHelpLink","systemEntityHelpLink","entity","useEntity","entities","loading","error","useRelatedEntities","type","kind","InfoCard","Progress","ResponseErrorPanel","EntityTable","emptyContent","div","style","textAlign","Typography","Link","to","componentEntityColumns","defaultKind","componentEntityHelpLink","asComponentEntities","resourceEntityColumns","resourceEntityHelpLink","asResourceEntities"],"mappings":"uPA+BO,SAASA,EAAeC,EAA4B,CACzD,KAAM,CAAEC,UAAU,UAAW,EAAID,EACjC,O,EACE,OAACE,sBAAmBA,CAClBD,QAASA,EACTE,MAAM,cACNC,WAAW,SACXC,aAAcC,KACdC,QAASC,sBACTC,qBAAsBC,mBACtBC,aAAa,mCACbC,cAAeC,sB,EAGrB,C,mgBCYO,SAASX,EACdF,EACA,CACA,KAAM,CACJC,UAAU,WACVE,QACAI,UACAH,aACAC,eACAM,eACAC,gBACAH,sBAAoB,EAClBT,EAEE,CAAEc,QAAO,G,EAAIC,MAAU,EACvB,CAAEC,WAAUC,UAASC,OAAM,G,EAAIC,MAAmBL,EAAQ,CAC9DM,KAAMf,EACNgB,KAAMjB,CACR,CAAC,EAED,OAAIa,G,EAEA,OAACK,KAAQA,CAACrB,QAASA,EAASE,MAAOA,E,YACjC,OAACoB,KAAQA,G,GAKXL,G,EAEA,OAACI,KAAQA,CAACrB,QAASA,EAASE,MAAOA,E,YACjC,OAACqB,KAAkBA,CAACN,MAAOA,C,QAM/B,OAACO,KAAWA,CACVtB,MAAOA,EACPF,QAASA,EACTyB,c,EACE,QAACC,OAAIC,MAAO,CAAEC,UAAW,QAAS,E,aAChC,OAACC,IAAUA,CAAC7B,QAAQ,Q,SAASU,C,MAC7B,OAACmB,IAAUA,CAAC7B,QAAQ,Q,YAClB,OAAC8B,KAAIA,CAACC,GAAIpB,E,SAAe,2B,QAI/BL,QAASA,EACTS,SAAUP,EAAqBO,GAAY,CAAC,CAAC,C,EAGnD,CCrFO,MAAMiB,EAAyD,CACpER,mCAA0C,CAAES,YAAa,WAAY,CAAC,EACtET,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCU,EACX,uFACWC,EAAuBpB,GAClCA,EAEWqB,EAAuD,CAClEZ,mCAA0C,CAAES,YAAa,UAAW,CAAC,EACrET,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCa,EACX,sFACWC,EAAsBvB,GACjCA,EAEWR,EAAmD,CAC9DiB,mCAA0C,CAAES,YAAa,QAAS,CAAC,EACnET,+BAAsC,EACtCA,6CAAoD,C,EAEzCZ,EACX,oFACWH,EAAoBM,GAC/BA,C","file":"static/5458.
|
|
1
|
+
{"version":3,"sources":["webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/HasSystemsCard/HasSystemsCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/presets.ts"],"names":["HasSystemsCard","props","variant","RelatedEntitiesCard","title","entityKind","relationType","RELATION_HAS_PART","columns","systemEntityColumns","asRenderableEntities","asSystemEntities","emptyMessage","emptyHelpLink","systemEntityHelpLink","entity","useEntity","entities","loading","error","useRelatedEntities","type","kind","InfoCard","Progress","ResponseErrorPanel","EntityTable","emptyContent","div","style","textAlign","Typography","Link","to","componentEntityColumns","defaultKind","componentEntityHelpLink","asComponentEntities","resourceEntityColumns","resourceEntityHelpLink","asResourceEntities"],"mappings":"uPA+BO,SAASA,EAAeC,EAA4B,CACzD,KAAM,CAAEC,UAAU,UAAW,EAAID,EACjC,O,EACE,OAACE,sBAAmBA,CAClBD,QAASA,EACTE,MAAM,cACNC,WAAW,SACXC,aAAcC,KACdC,QAASC,sBACTC,qBAAsBC,mBACtBC,aAAa,mCACbC,cAAeC,sB,EAGrB,C,mgBCYO,SAASX,EACdF,EACA,CACA,KAAM,CACJC,UAAU,WACVE,QACAI,UACAH,aACAC,eACAM,eACAC,gBACAH,sBAAoB,EAClBT,EAEE,CAAEc,QAAO,G,EAAIC,MAAU,EACvB,CAAEC,WAAUC,UAASC,OAAM,G,EAAIC,MAAmBL,EAAQ,CAC9DM,KAAMf,EACNgB,KAAMjB,CACR,CAAC,EAED,OAAIa,G,EAEA,OAACK,KAAQA,CAACrB,QAASA,EAASE,MAAOA,E,YACjC,OAACoB,KAAQA,G,GAKXL,G,EAEA,OAACI,KAAQA,CAACrB,QAASA,EAASE,MAAOA,E,YACjC,OAACqB,KAAkBA,CAACN,MAAOA,C,QAM/B,OAACO,KAAWA,CACVtB,MAAOA,EACPF,QAASA,EACTyB,c,EACE,QAACC,OAAIC,MAAO,CAAEC,UAAW,QAAS,E,aAChC,OAACC,IAAUA,CAAC7B,QAAQ,Q,SAASU,C,MAC7B,OAACmB,IAAUA,CAAC7B,QAAQ,Q,YAClB,OAAC8B,KAAIA,CAACC,GAAIpB,E,SAAe,2B,QAI/BL,QAASA,EACTS,SAAUP,EAAqBO,GAAY,CAAC,CAAC,C,EAGnD,CCrFO,MAAMiB,EAAyD,CACpER,mCAA0C,CAAES,YAAa,WAAY,CAAC,EACtET,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCU,EACX,uFACWC,EAAuBpB,GAClCA,EAEWqB,EAAuD,CAClEZ,mCAA0C,CAAES,YAAa,UAAW,CAAC,EACrET,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCa,EACX,sFACWC,EAAsBvB,GACjCA,EAEWR,EAAmD,CAC9DiB,mCAA0C,CAAES,YAAa,QAAS,CAAC,EACnET,+BAAsC,EACtCA,6CAAoD,C,EAEzCZ,EACX,oFACWH,EAAoBM,GAC/BA,C","file":"static/5458.c2cfc48a.chunk.js","sourcesContent":["/*\n * Copyright 2020 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 { RELATION_HAS_PART } from '@backstage/catalog-model';\nimport { InfoCardVariants } from '@backstage/core-components';\nimport React from 'react';\nimport {\n asSystemEntities,\n RelatedEntitiesCard,\n systemEntityColumns,\n systemEntityHelpLink,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface HasSystemsCardProps {\n variant?: InfoCardVariants;\n}\n\nexport function HasSystemsCard(props: HasSystemsCardProps) {\n const { variant = 'gridItem' } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title=\"Has systems\"\n entityKind=\"System\"\n relationType={RELATION_HAS_PART}\n columns={systemEntityColumns}\n asRenderableEntities={asSystemEntities}\n emptyMessage=\"No system is part of this domain\"\n emptyHelpLink={systemEntityHelpLink}\n />\n );\n}\n","/*\n * Copyright 2020 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 { Entity } from '@backstage/catalog-model';\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport {\n InfoCard,\n InfoCardVariants,\n Link,\n Progress,\n ResponseErrorPanel,\n TableColumn,\n} from '@backstage/core-components';\n\n/** @public */\nexport type RelatedEntitiesCardProps<T extends Entity> = {\n variant?: InfoCardVariants;\n title: string;\n columns: TableColumn<T>[];\n entityKind?: string;\n relationType: string;\n emptyMessage: string;\n emptyHelpLink: string;\n asRenderableEntities: (entities: Entity[]) => T[];\n};\n\n/**\n * A low level card component that can be used as a building block for more\n * specific cards.\n *\n * @remarks\n *\n * You probably want to make a dedicated component for your needs, which renders\n * this card as its implementation with some of the props set to the appropriate\n * values.\n *\n * @public\n */\nexport function RelatedEntitiesCard<T extends Entity>(\n props: RelatedEntitiesCardProps<T>,\n) {\n const {\n variant = 'gridItem',\n title,\n columns,\n entityKind,\n relationType,\n emptyMessage,\n emptyHelpLink,\n asRenderableEntities,\n } = props;\n\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: relationType,\n kind: entityKind,\n });\n\n if (loading) {\n return (\n <InfoCard variant={variant} title={title}>\n <Progress />\n </InfoCard>\n );\n }\n\n if (error) {\n return (\n <InfoCard variant={variant} title={title}>\n <ResponseErrorPanel error={error} />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title={title}\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">{emptyMessage}</Typography>\n <Typography variant=\"body2\">\n <Link to={emptyHelpLink}>Learn how to change this.</Link>\n </Typography>\n </div>\n }\n columns={columns}\n entities={asRenderableEntities(entities || [])}\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 */\nimport {\n ComponentEntity,\n Entity,\n ResourceEntity,\n SystemEntity,\n} from '@backstage/catalog-model';\nimport { EntityTable } from '@backstage/plugin-catalog-react';\nimport { TableColumn } from '@backstage/core-components';\n\nexport const componentEntityColumns: TableColumn<ComponentEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'component' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const componentEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component';\nexport const asComponentEntities = (entities: Entity[]): ComponentEntity[] =>\n entities as ComponentEntity[];\n\nexport const resourceEntityColumns: TableColumn<ResourceEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'resource' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const resourceEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource';\nexport const asResourceEntities = (entities: Entity[]): ResourceEntity[] =>\n entities as ResourceEntity[];\n\nexport const systemEntityColumns: TableColumn<SystemEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'system' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const systemEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system';\nexport const asSystemEntities = (entities: Entity[]): SystemEntity[] =>\n entities as SystemEntity[];\n"],"sourceRoot":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[5837],{95837:function(P,i,n){n.r(i),n.d(i,{CatalogPage:function(){return m},DefaultCatalogPage:function(){return c}});var t=n(52322),D=n(2784),u=n(10289),a=n(93414),o=n(25248),l=n(43297),x=n(19625),j=n(86359),h=n(79324);const C=()=>(0,o.yx)();function c(s){const{columns:r,actions:f,initiallySelectedFilter:v="owned",initialKind:d="component",tableOptions:p={},emptyContent:y}=s;var e;const F=(e=(0,o.h_)(o.Ds).getOptionalString("organization.name"))!==null&&e!==void 0?e:"Backstage",g=(0,o.tg)(x.yw),{createButtonTitle:O}=C();return(0,t.jsx)(a.g9,{title:`${F} Catalog`,themeId:"home",children:(0,t.jsx)(l.UO,{children:(0,t.jsxs)(a.VY,{children:[(0,t.jsxs)(a.yW,{titleComponent:(0,t.jsx)(h.K,{initialFilter:d}),children:[(0,t.jsx)(a.XF,{title:O,to:g&&g()}),(0,t.jsx)(a.qt,{children:"All your software catalog entities"})]}),(0,t.jsxs)(l._i,{children:[(0,t.jsxs)(l._i.Filters,{children:[(0,t.jsx)(l.tW,{initialFilter:d}),(0,t.jsx)(l.sL,{}),(0,t.jsx)(l.EW,{initialFilter:v}),(0,t.jsx)(l.dq,{}),(0,t.jsx)(l.df,{}),(0,t.jsx)(l.xE,{}),(0,t.jsx)(l.nl,{})]}),(0,t.jsx)(l._i.Content,{children:(0,t.jsx)(j.E,{columns:r,actions:f,tableOptions:p,emptyContent:y})})]})]})})})}function m(s){return(0,u.pC)()||(0,t.jsx)(c,{...s})}}}]);})();
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=5837.ebb0f422.chunk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/options.ts","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/CatalogPage/CatalogPage.tsx"],"names":["useCatalogPluginOptions","usePluginOptions","DefaultCatalogPage","props","columns","actions","initiallySelectedFilter","initialKind","tableOptions","emptyContent","useApi","orgName","configApiRef","getOptionalString","createComponentLink","useRouteRef","createComponentRouteRef","createButtonTitle","PageWithHeader","title","themeId","EntityListProvider","Content","ContentHeader","titleComponent","CatalogKindHeader","initialFilter","CreateButton","to","SupportButton","CatalogFilterLayout","EntityKindPicker","EntityTypePicker","UserListPicker","EntityOwnerPicker","EntityLifecyclePicker","EntityTagPicker","EntityProcessingStatusPicker","CatalogTable","CatalogPage","useOutlet"],"mappings":"kVA2BO,MAAMA,EAA0B,K,EACrCC,MAAgBA,EC8BX,SAASC,EAAmBC,EAAgC,CACjE,KAAM,CACJC,UACAC,UACAC,0BAA0B,QAC1BC,cAAc,YACdC,eAAe,CAAC,EAChBC,cAAY,EACVN,E,IAEFO,EADF,MAAMC,GACJD,G,EAAAA,MAAOE,IAAYA,EAAEC,kBAAkB,mBAAmB,KAAnB,MAAvCH,aAA+D,YAC3DI,G,EAAsBC,MAAYC,IAAuBA,EAEzD,CAAEC,mBAAkB,EAAIjB,EAAwB,EAEtD,O,EACE,OAACkB,KAAcA,CAACC,MAAO,GAAGR,YAAmBS,QAAQ,O,YACnD,OAACC,KAAkBA,C,YACjB,QAACC,KAAOA,C,aACN,QAACC,KAAaA,CACZC,gB,EAAgB,OAACC,IAAiBA,CAACC,cAAenB,C,gBAElD,OAACoB,KAAYA,CACXR,MAAOF,EACPW,GAAId,GAAuBA,EAAoB,C,MAEjD,OAACe,KAAaA,C,SAAC,oC,SAEjB,QAACC,KAAmBA,C,aAClB,QAACA,aAA2B,C,aAC1B,OAACC,KAAgBA,CAACL,cAAenB,C,MACjC,OAACyB,KAAgBA,K,EACjB,OAACC,KAAcA,CAACP,cAAepB,C,MAC/B,OAAC4B,KAAiBA,K,EAClB,OAACC,KAAqBA,K,EACtB,OAACC,KAAeA,K,EAChB,OAACC,KAA4BA,G,OAE/B,OAACP,aAA2B,C,YAC1B,OAACQ,IAAYA,CACXlC,QAASA,EACTC,QAASA,EACTG,aAAcA,EACdC,aAAcA,C,cAQ9B,CCtFO,SAAS8B,EAAYpC,EAAgC,CAG1D,O,EAFeqC,MAAU,I,EAER,OAACtC,EAAkBA,CAAE,GAAGC,C,EAC3C,C","file":"static/5837.ebb0f422.chunk.js","sourcesContent":["/*\n * Copyright 2020 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 { usePluginOptions } from '@backstage/core-plugin-api';\n\nexport type CatalogPluginOptions = {\n createButtonTitle: string;\n};\n\n/** @ignore */\nexport type CatalogInputPluginOptions = {\n createButtonTitle: string;\n};\n\nexport const useCatalogPluginOptions = () =>\n usePluginOptions<CatalogPluginOptions>();\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 {\n Content,\n ContentHeader,\n CreateButton,\n PageWithHeader,\n SupportButton,\n TableColumn,\n TableProps,\n} from '@backstage/core-components';\nimport { configApiRef, useApi, useRouteRef } from '@backstage/core-plugin-api';\nimport {\n CatalogFilterLayout,\n EntityLifecyclePicker,\n EntityListProvider,\n EntityProcessingStatusPicker,\n EntityOwnerPicker,\n EntityTagPicker,\n EntityTypePicker,\n UserListFilterKind,\n UserListPicker,\n EntityKindPicker,\n} from '@backstage/plugin-catalog-react';\nimport React, { ReactNode } from 'react';\nimport { createComponentRouteRef } from '../../routes';\nimport { CatalogTable, CatalogTableRow } from '../CatalogTable';\nimport { CatalogKindHeader } from '../CatalogKindHeader';\nimport { useCatalogPluginOptions } from '../../options';\n\n/**\n * Props for root catalog pages.\n *\n * @public\n */\nexport interface DefaultCatalogPageProps {\n initiallySelectedFilter?: UserListFilterKind;\n columns?: TableColumn<CatalogTableRow>[];\n actions?: TableProps<CatalogTableRow>['actions'];\n initialKind?: string;\n tableOptions?: TableProps<CatalogTableRow>['options'];\n emptyContent?: ReactNode;\n}\n\nexport function DefaultCatalogPage(props: DefaultCatalogPageProps) {\n const {\n columns,\n actions,\n initiallySelectedFilter = 'owned',\n initialKind = 'component',\n tableOptions = {},\n emptyContent,\n } = props;\n const orgName =\n useApi(configApiRef).getOptionalString('organization.name') ?? 'Backstage';\n const createComponentLink = useRouteRef(createComponentRouteRef);\n\n const { createButtonTitle } = useCatalogPluginOptions();\n\n return (\n <PageWithHeader title={`${orgName} Catalog`} themeId=\"home\">\n <EntityListProvider>\n <Content>\n <ContentHeader\n titleComponent={<CatalogKindHeader initialFilter={initialKind} />}\n >\n <CreateButton\n title={createButtonTitle}\n to={createComponentLink && createComponentLink()}\n />\n <SupportButton>All your software catalog entities</SupportButton>\n </ContentHeader>\n <CatalogFilterLayout>\n <CatalogFilterLayout.Filters>\n <EntityKindPicker initialFilter={initialKind} />\n <EntityTypePicker />\n <UserListPicker initialFilter={initiallySelectedFilter} />\n <EntityOwnerPicker />\n <EntityLifecyclePicker />\n <EntityTagPicker />\n <EntityProcessingStatusPicker />\n </CatalogFilterLayout.Filters>\n <CatalogFilterLayout.Content>\n <CatalogTable\n columns={columns}\n actions={actions}\n tableOptions={tableOptions}\n emptyContent={emptyContent}\n />\n </CatalogFilterLayout.Content>\n </CatalogFilterLayout>\n </Content>\n </EntityListProvider>\n </PageWithHeader>\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 React from 'react';\nimport { useOutlet } from 'react-router';\nimport {\n DefaultCatalogPage,\n DefaultCatalogPageProps,\n} from './DefaultCatalogPage';\n\nexport function CatalogPage(props: DefaultCatalogPageProps) {\n const outlet = useOutlet();\n\n return outlet || <DefaultCatalogPage {...props} />;\n}\n"],"sourceRoot":""}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[732],{732:function(b,r,e){e.r(r),e.d(r,{RelatedEntitiesCard:function(){return l},asComponentEntities:function(){return y},asResourceEntities:function(){return C},asSystemEntities:function(){return k},componentEntityColumns:function(){return m},componentEntityHelpLink:function(){return d},resourceEntityColumns:function(){return p},resourceEntityHelpLink:function(){return f},systemEntityColumns:function(){return E},systemEntityHelpLink:function(){return h}});var n=e(52322),u=e(90436),t=e(43297),M=e(2784),s=e(
|
|
1
|
+
"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[732],{732:function(b,r,e){e.r(r),e.d(r,{RelatedEntitiesCard:function(){return l},asComponentEntities:function(){return y},asResourceEntities:function(){return C},asSystemEntities:function(){return k},componentEntityColumns:function(){return m},componentEntityHelpLink:function(){return d},resourceEntityColumns:function(){return p},resourceEntityHelpLink:function(){return f},systemEntityColumns:function(){return E},systemEntityHelpLink:function(){return h}});var n=e(52322),u=e(90436),t=e(43297),M=e(2784),s=e(93414);function l(o){const{variant:c="gridItem",title:i,columns:g,entityKind:v,relationType:x,emptyMessage:j,emptyHelpLink:L,asRenderableEntities:R}=o,{entity:H}=(0,t.X2)(),{entities:S,loading:K,error:a}=(0,t.eK)(H,{type:x,kind:v});return K?(0,n.jsx)(s.rJ,{variant:c,title:i,children:(0,n.jsx)(s.Ex,{})}):a?(0,n.jsx)(s.rJ,{variant:c,title:i,children:(0,n.jsx)(s.Gk,{error:a})}):(0,n.jsx)(t.u3,{title:i,variant:c,emptyContent:(0,n.jsxs)("div",{style:{textAlign:"center"},children:[(0,n.jsx)(u.Z,{variant:"body1",children:j}),(0,n.jsx)(u.Z,{variant:"body2",children:(0,n.jsx)(s.rU,{to:L,children:"Learn how to change this."})})]}),columns:g,entities:R(S||[])})}const m=[t.u3.columns.createEntityRefColumn({defaultKind:"component"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createSpecTypeColumn(),t.u3.columns.createSpecLifecycleColumn(),t.u3.columns.createMetadataDescriptionColumn()],d="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component",y=o=>o,p=[t.u3.columns.createEntityRefColumn({defaultKind:"resource"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createSpecTypeColumn(),t.u3.columns.createSpecLifecycleColumn(),t.u3.columns.createMetadataDescriptionColumn()],f="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource",C=o=>o,E=[t.u3.columns.createEntityRefColumn({defaultKind:"system"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createMetadataDescriptionColumn()],h="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system",k=o=>o}}]);})();
|
|
2
2
|
|
|
3
|
-
//# sourceMappingURL=732.
|
|
3
|
+
//# sourceMappingURL=732.426f89e4.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/presets.ts"],"names":["RelatedEntitiesCard","props","variant","title","columns","entityKind","relationType","emptyMessage","emptyHelpLink","asRenderableEntities","entity","useEntity","entities","loading","error","useRelatedEntities","type","kind","InfoCard","Progress","ResponseErrorPanel","EntityTable","emptyContent","div","style","textAlign","Typography","Link","to","componentEntityColumns","defaultKind","componentEntityHelpLink","asComponentEntities","resourceEntityColumns","resourceEntityHelpLink","asResourceEntities","systemEntityColumns","systemEntityHelpLink","asSystemEntities"],"mappings":"6nBAyDO,SAASA,EACdC,EACA,CACA,KAAM,CACJC,UAAU,WACVC,QACAC,UACAC,aACAC,eACAC,eACAC,gBACAC,sBAAoB,EAClBR,EAEE,CAAES,QAAO,G,EAAIC,MAAU,EACvB,CAAEC,WAAUC,UAASC,OAAM,G,EAAIC,MAAmBL,EAAQ,CAC9DM,KAAMV,EACNW,KAAMZ,CACR,CAAC,EAED,OAAIQ,G,EAEA,OAACK,KAAQA,CAAChB,QAASA,EAASC,MAAOA,E,YACjC,OAACgB,KAAQA,G,GAKXL,G,EAEA,OAACI,KAAQA,CAAChB,QAASA,EAASC,MAAOA,E,YACjC,OAACiB,KAAkBA,CAACN,MAAOA,C,QAM/B,OAACO,KAAWA,CACVlB,MAAOA,EACPD,QAASA,EACToB,c,EACE,QAACC,OAAIC,MAAO,CAAEC,UAAW,QAAS,E,aAChC,OAACC,IAAUA,CAACxB,QAAQ,Q,SAASK,C,MAC7B,OAACmB,IAAUA,CAACxB,QAAQ,Q,YAClB,OAACyB,KAAIA,CAACC,GAAIpB,E,SAAe,2B,QAI/BJ,QAASA,EACTQ,SAAUH,EAAqBG,GAAY,CAAC,CAAC,C,EAGnD,CCrFO,MAAMiB,EAAyD,CACpER,mCAA0C,CAAES,YAAa,WAAY,CAAC,EACtET,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCU,EACX,uFACWC,EAAuBpB,GAClCA,EAEWqB,EAAuD,CAClEZ,mCAA0C,CAAES,YAAa,UAAW,CAAC,EACrET,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCa,EACX,sFACWC,EAAsBvB,GACjCA,EAEWwB,EAAmD,CAC9Df,mCAA0C,CAAES,YAAa,QAAS,CAAC,EACnET,+BAAsC,EACtCA,6CAAoD,C,EAEzCgB,EACX,oFACWC,EAAoB1B,GAC/BA,C","file":"static/732.
|
|
1
|
+
{"version":3,"sources":["webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/presets.ts"],"names":["RelatedEntitiesCard","props","variant","title","columns","entityKind","relationType","emptyMessage","emptyHelpLink","asRenderableEntities","entity","useEntity","entities","loading","error","useRelatedEntities","type","kind","InfoCard","Progress","ResponseErrorPanel","EntityTable","emptyContent","div","style","textAlign","Typography","Link","to","componentEntityColumns","defaultKind","componentEntityHelpLink","asComponentEntities","resourceEntityColumns","resourceEntityHelpLink","asResourceEntities","systemEntityColumns","systemEntityHelpLink","asSystemEntities"],"mappings":"6nBAyDO,SAASA,EACdC,EACA,CACA,KAAM,CACJC,UAAU,WACVC,QACAC,UACAC,aACAC,eACAC,eACAC,gBACAC,sBAAoB,EAClBR,EAEE,CAAES,QAAO,G,EAAIC,MAAU,EACvB,CAAEC,WAAUC,UAASC,OAAM,G,EAAIC,MAAmBL,EAAQ,CAC9DM,KAAMV,EACNW,KAAMZ,CACR,CAAC,EAED,OAAIQ,G,EAEA,OAACK,KAAQA,CAAChB,QAASA,EAASC,MAAOA,E,YACjC,OAACgB,KAAQA,G,GAKXL,G,EAEA,OAACI,KAAQA,CAAChB,QAASA,EAASC,MAAOA,E,YACjC,OAACiB,KAAkBA,CAACN,MAAOA,C,QAM/B,OAACO,KAAWA,CACVlB,MAAOA,EACPD,QAASA,EACToB,c,EACE,QAACC,OAAIC,MAAO,CAAEC,UAAW,QAAS,E,aAChC,OAACC,IAAUA,CAACxB,QAAQ,Q,SAASK,C,MAC7B,OAACmB,IAAUA,CAACxB,QAAQ,Q,YAClB,OAACyB,KAAIA,CAACC,GAAIpB,E,SAAe,2B,QAI/BJ,QAASA,EACTQ,SAAUH,EAAqBG,GAAY,CAAC,CAAC,C,EAGnD,CCrFO,MAAMiB,EAAyD,CACpER,mCAA0C,CAAES,YAAa,WAAY,CAAC,EACtET,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCU,EACX,uFACWC,EAAuBpB,GAClCA,EAEWqB,EAAuD,CAClEZ,mCAA0C,CAAES,YAAa,UAAW,CAAC,EACrET,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCa,EACX,sFACWC,EAAsBvB,GACjCA,EAEWwB,EAAmD,CAC9Df,mCAA0C,CAAES,YAAa,QAAS,CAAC,EACnET,+BAAsC,EACtCA,6CAAoD,C,EAEzCgB,EACX,oFACWC,EAAoB1B,GAC/BA,C","file":"static/732.426f89e4.chunk.js","sourcesContent":["/*\n * Copyright 2020 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 { Entity } from '@backstage/catalog-model';\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport {\n InfoCard,\n InfoCardVariants,\n Link,\n Progress,\n ResponseErrorPanel,\n TableColumn,\n} from '@backstage/core-components';\n\n/** @public */\nexport type RelatedEntitiesCardProps<T extends Entity> = {\n variant?: InfoCardVariants;\n title: string;\n columns: TableColumn<T>[];\n entityKind?: string;\n relationType: string;\n emptyMessage: string;\n emptyHelpLink: string;\n asRenderableEntities: (entities: Entity[]) => T[];\n};\n\n/**\n * A low level card component that can be used as a building block for more\n * specific cards.\n *\n * @remarks\n *\n * You probably want to make a dedicated component for your needs, which renders\n * this card as its implementation with some of the props set to the appropriate\n * values.\n *\n * @public\n */\nexport function RelatedEntitiesCard<T extends Entity>(\n props: RelatedEntitiesCardProps<T>,\n) {\n const {\n variant = 'gridItem',\n title,\n columns,\n entityKind,\n relationType,\n emptyMessage,\n emptyHelpLink,\n asRenderableEntities,\n } = props;\n\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: relationType,\n kind: entityKind,\n });\n\n if (loading) {\n return (\n <InfoCard variant={variant} title={title}>\n <Progress />\n </InfoCard>\n );\n }\n\n if (error) {\n return (\n <InfoCard variant={variant} title={title}>\n <ResponseErrorPanel error={error} />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title={title}\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">{emptyMessage}</Typography>\n <Typography variant=\"body2\">\n <Link to={emptyHelpLink}>Learn how to change this.</Link>\n </Typography>\n </div>\n }\n columns={columns}\n entities={asRenderableEntities(entities || [])}\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 */\nimport {\n ComponentEntity,\n Entity,\n ResourceEntity,\n SystemEntity,\n} from '@backstage/catalog-model';\nimport { EntityTable } from '@backstage/plugin-catalog-react';\nimport { TableColumn } from '@backstage/core-components';\n\nexport const componentEntityColumns: TableColumn<ComponentEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'component' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const componentEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component';\nexport const asComponentEntities = (entities: Entity[]): ComponentEntity[] =>\n entities as ComponentEntity[];\n\nexport const resourceEntityColumns: TableColumn<ResourceEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'resource' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const resourceEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource';\nexport const asResourceEntities = (entities: Entity[]): ResourceEntity[] =>\n entities as ResourceEntity[];\n\nexport const systemEntityColumns: TableColumn<SystemEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'system' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const systemEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system';\nexport const asSystemEntities = (entities: Entity[]): SystemEntity[] =>\n entities as SystemEntity[];\n"],"sourceRoot":""}
|