Skip to content

Commit a240846

Browse files
authored
docs: add SBOM url to metadata state in connector documentation (#44386)
1 parent 9603c3c commit a240846

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

docusaurus/src/components/ConnectorRegistry.jsx

+8
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ export default function ConnectorRegistry({ type }) {
5555
<th>OSS</th>
5656
<th>Cloud</th>
5757
<th>Docker Image</th>
58+
<th>SBOM</th>
5859
</tr>
5960
</thead>
6061
<tbody>
@@ -99,6 +100,13 @@ export default function ConnectorRegistry({ type }) {
99100
</code>
100101
</small>
101102
</td>
103+
<td>
104+
<small>
105+
{connector.generated_oss?.sbomUrl ? (
106+
<a target="_blank" href={connector.generated_oss.sbomUrl}>SPDX JSON</a>
107+
) : "No SBOM"}
108+
</small>
109+
</td>
102110
</tr>
103111
);
104112
})}

docusaurus/src/components/HeaderDecoration.jsx

+11
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ const ConnectorMetadataCallout = ({
236236
syncSuccessRate,
237237
usageRate,
238238
lastUpdated,
239+
sbomUrl,
239240
}) => (
240241
<Callout className={styles.connectorMetadataCallout}>
241242
<dl className={styles.connectorMetadata}>
@@ -281,6 +282,7 @@ const ConnectorMetadataCallout = ({
281282
lastUpdated
282283
).fromNow()})`}</span>
283284
)}
285+
284286
</MetadataStat>
285287
)}
286288
{cdkVersion && (
@@ -293,6 +295,13 @@ const ConnectorMetadataCallout = ({
293295
)}
294296
</MetadataStat>
295297
)}
298+
{sbomUrl && (
299+
<MetadataStat label="SBOM">
300+
<a target="_blank" href={sbomUrl}>
301+
SPDX JSON
302+
</a>
303+
</MetadataStat>
304+
)}
296305
{syncSuccessRate && (
297306
<MetadataStat label="Sync Success Rate">
298307
<MetricIcon iconComponent={SUCCESS_ICON} level={syncSuccessRate} />
@@ -339,6 +348,7 @@ export const HeaderDecoration = ({
339348
syncSuccessRate,
340349
usageRate,
341350
lastUpdated,
351+
sbomUrl,
342352
}) => {
343353
const isOss = boolStringToBool(isOssString);
344354
const isCloud = boolStringToBool(isCloudString);
@@ -369,6 +379,7 @@ export const HeaderDecoration = ({
369379
syncSuccessRate={syncSuccessRate}
370380
usageRate={usageRate}
371381
lastUpdated={lastUpdated}
382+
sbomUrl={sbomUrl}
372383
/>
373384
</>
374385
);

docusaurus/src/remark/docsHeaderDecoration.js

+6
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ const plugin = () => {
4848
"generated_[oss|cloud].source_file_info.metadata_last_modified"
4949
);
5050

51+
const sbomUrl = getFromPaths(
52+
registryEntry,
53+
"generated_[oss|cloud].sbomUrl"
54+
)
55+
5156
const { version, isLatest, url } = parseCDKVersion(
5257
rawCDKVersion,
5358
latestPythonCdkVersion
@@ -70,6 +75,7 @@ const plugin = () => {
7075
syncSuccessRate,
7176
usageRate,
7277
lastUpdated,
78+
sbomUrl,
7379
};
7480

7581
firstHeading = false;

0 commit comments

Comments
 (0)