diff --git a/.changeset/violet-chicken-smell.md b/.changeset/violet-chicken-smell.md new file mode 100644 index 0000000000..d88c231e4b --- /dev/null +++ b/.changeset/violet-chicken-smell.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-azure-sites-backend': minor +--- + +Azure Sites list now hides the internal/microsoft only `hidden-` tags from the list of tags that are returned. Updated the log endpoint to /logstream-quickstart rather than just /logstream to stream logs in the Azure Portal UI. diff --git a/plugins/azure-sites-backend/src/api/AzureSitesApi.ts b/plugins/azure-sites-backend/src/api/AzureSitesApi.ts index b8660c5989..5f58ebdb3d 100644 --- a/plugins/azure-sites-backend/src/api/AzureSitesApi.ts +++ b/plugins/azure-sites-backend/src/api/AzureSitesApi.ts @@ -78,9 +78,17 @@ export class AzureSitesApi { subscriptions: this.config.subscriptions, }); for (const v of result.data) { + const tags = Object.fromEntries( + Object.entries(v.properties.tags ?? {}).filter( + ([k, _]) => !k.startsWith('hidden-'), + ), + ); + items.push({ href: `${this.baseHref(this.config.domain)}${v.id!}`, - logstreamHref: `${this.baseHref(this.config.domain)}${v.id!}/logStream`, + logstreamHref: `${this.baseHref( + this.config.domain, + )}${v.id!}/logStream-quickstart`, name: v.name!, kind: v.kind!, resourceGroup: v.resourceGroup!, @@ -90,7 +98,7 @@ export class AzureSitesApi { usageState: v.properties.usageState!, state: v.properties.state!, containerSize: v.properties.containerSize!, - tags: v.properties.tags!, + tags, }); } return { items: items };