Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .yarn/plugins/@yarnpkg/plugin-backstage.cjs

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ nodeLinker: node-modules
npmRegistryServer: "https://registry.npmjs.org/"

plugins:
- checksum: b3b00465cee9a55ea92b7555876084a6dbfb4b9dd2ce7617a0bca1c138dec6b33befabdff7f4035b2a2ad70d59a05dad3a8faf3a34d3bec21fa7949a497fdf48
- checksum: 0cfdc882d3c1395592aa6d4690958e70ebbc3a8ee1d888d523dc9e3c74796de26f744c37df66a69212280634f422a88074ba625dce0f7886fbdf2a904a0c38a2
path: .yarn/plugins/@yarnpkg/plugin-backstage.cjs
spec: "https://versions.backstage.io/v1/releases/1.47.3/yarn-plugin"
spec: "https://versions.backstage.io/v1/releases/1.51.2/yarn-plugin"

pnpFallbackMode: none

Expand Down
2 changes: 1 addition & 1 deletion backstage.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "1.47.3"
"version": "1.51.2"
}
2 changes: 1 addition & 1 deletion packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@backstage/plugin-techdocs-react": "backstage:^",
"@backstage/plugin-user-settings": "backstage:^",
"@backstage/theme": "backstage:^",
"@backstage/ui": "^0.14.3",
"@backstage/ui": "backstage:^",
"@material-ui/core": "^4.12.2",
"@material-ui/icons": "^4.9.1",
"@pagerduty/backstage-plugin": "workspace:^",
Expand Down
41 changes: 20 additions & 21 deletions packages/app/src/components/catalog/EntityPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,17 +133,17 @@ const overviewContent = (
<Grid container spacing={3} alignItems="stretch">
{entityWarningContent}
<Grid item md={6}>
<EntityAboutCard variant="gridItem" />
<EntityAboutCard />
</Grid>
<Grid item md={6} xs={12}>
<EntityCatalogGraphCard variant="gridItem" height={400} />
<EntityCatalogGraphCard height={400} />
</Grid>

<Grid item md={4} xs={12}>
<EntityLinksCard />
</Grid>
<Grid item md={8} xs={12}>
<EntityHasSubcomponentsCard variant="gridItem" />
<EntityHasSubcomponentsCard />
</Grid>
<EntitySwitch>
<EntitySwitch.Case if={isPagerDutyAvailable}>
Expand Down Expand Up @@ -187,10 +187,10 @@ const serviceEntityPage = (
<EntityLayout.Route path="/dependencies" title="Dependencies">
<Grid container spacing={3} alignItems="stretch">
<Grid item md={6}>
<EntityDependsOnComponentsCard variant="gridItem" />
<EntityDependsOnComponentsCard />
</Grid>
<Grid item md={6}>
<EntityDependsOnResourcesCard variant="gridItem" />
<EntityDependsOnResourcesCard />
</Grid>
</Grid>
</EntityLayout.Route>
Expand Down Expand Up @@ -222,10 +222,10 @@ const websiteEntityPage = (
<EntityLayout.Route path="/dependencies" title="Dependencies">
<Grid container spacing={3} alignItems="stretch">
<Grid item md={6}>
<EntityDependsOnComponentsCard variant="gridItem" />
<EntityDependsOnComponentsCard />
</Grid>
<Grid item md={6}>
<EntityDependsOnResourcesCard variant="gridItem" />
<EntityDependsOnResourcesCard />
</Grid>
</Grid>
</EntityLayout.Route>
Expand Down Expand Up @@ -278,7 +278,7 @@ const apiPage = (
<EntityAboutCard />
</Grid>
<Grid item md={6} xs={12}>
<EntityCatalogGraphCard variant="gridItem" height={400} />
<EntityCatalogGraphCard height={400} />
</Grid>
<Grid item md={4} xs={12}>
<EntityLinksCard />
Expand Down Expand Up @@ -310,10 +310,10 @@ const userPage = (
<Grid container spacing={3}>
{entityWarningContent}
<Grid item xs={12} md={6}>
<EntityUserProfileCard variant="gridItem" />
<EntityUserProfileCard />
</Grid>
<Grid item xs={12} md={6}>
<EntityOwnershipCard variant="gridItem" />
<EntityOwnershipCard />
</Grid>
</Grid>
</EntityLayout.Route>
Expand All @@ -326,10 +326,10 @@ const groupPage = (
<Grid container spacing={3}>
{entityWarningContent}
<Grid item xs={12} md={6}>
<EntityGroupProfileCard variant="gridItem" />
<EntityGroupProfileCard />
</Grid>
<Grid item xs={12} md={6}>
<EntityOwnershipCard variant="gridItem" />
<EntityOwnershipCard />
</Grid>
<Grid item xs={12} md={6}>
<EntityMembersListCard />
Expand All @@ -348,28 +348,27 @@ const systemPage = (
<Grid container spacing={3} alignItems="stretch">
{entityWarningContent}
<Grid item md={6}>
<EntityAboutCard variant="gridItem" />
<EntityAboutCard />
</Grid>
<Grid item md={6} xs={12}>
<EntityCatalogGraphCard variant="gridItem" height={400} />
<EntityCatalogGraphCard height={400} />
</Grid>
<Grid item md={4} xs={12}>
<EntityLinksCard />
</Grid>
<Grid item md={8}>
<EntityHasComponentsCard variant="gridItem" />
<EntityHasComponentsCard />
</Grid>
<Grid item md={6}>
<EntityHasApisCard variant="gridItem" />
<EntityHasApisCard />
</Grid>
<Grid item md={6}>
<EntityHasResourcesCard variant="gridItem" />
<EntityHasResourcesCard />
</Grid>
</Grid>
</EntityLayout.Route>
<EntityLayout.Route path="/diagram" title="Diagram">
<EntityCatalogGraphCard
variant="gridItem"
direction={Direction.TOP_BOTTOM}
title="System Diagram"
height={700}
Expand All @@ -395,13 +394,13 @@ const domainPage = (
<Grid container spacing={3} alignItems="stretch">
{entityWarningContent}
<Grid item md={6}>
<EntityAboutCard variant="gridItem" />
<EntityAboutCard />
</Grid>
<Grid item md={6} xs={12}>
<EntityCatalogGraphCard variant="gridItem" height={400} />
<EntityCatalogGraphCard height={400} />
</Grid>
<Grid item md={6}>
<EntityHasSystemsCard variant="gridItem" />
<EntityHasSystemsCard />
</Grid>
</Grid>
</EntityLayout.Route>
Expand Down
1 change: 1 addition & 0 deletions packages/app/src/theme/tokens.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
:root {
--bui-bg-solid: #00a67e;
--bui-bg-solid-hover: #008f6d;
--bui-bg-solid-disabled: #1b5c49;
}
11 changes: 11 additions & 0 deletions plugins/backstage-plugin-backend/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @pagerduty/backstage-plugin-backend

## 0.14.0

### Minor Changes

- bee64f1: Release the service mappings feature

### Patch Changes

- Updated dependencies [bee64f1]
- @pagerduty/backstage-plugin-common@0.5.0

## 0.13.0

### Minor Changes
Expand Down
43 changes: 43 additions & 0 deletions plugins/backstage-plugin-backend/config.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,48 @@ export interface Config {
* @deepVisibility secret
*/
accounts?: PagerDutyAccountConfig[];
/**
* Optional retention and cleanup settings for custom field sync logs.
* @visibility backend
*/
customFieldsSyncLogs?: {
/**
* Number of days to keep sync logs before they are deleted. Defaults to 30.
* @visibility backend
*/
retentionDays?: number;
/**
* Maximum number of sync log rows to keep across all accounts; the
* oldest rows beyond this count are deleted. Defaults to 500000.
* @visibility backend
*/
maxRows?: number;
/**
* Settings for the scheduled cleanup task.
* @visibility backend
*/
cleanup?: {
/**
* Whether the scheduled cleanup task runs. Defaults to true.
* @visibility backend
*/
enabled?: boolean;
/**
* How often the cleanup task runs, in minutes. Defaults to 15.
* @visibility backend
*/
frequencyMinutes?: number;
/**
* Number of rows deleted per batch. Defaults to 10000.
* @visibility backend
*/
batchSize?: number;
/**
* Maximum number of delete batches per run. Defaults to 500.
* @visibility backend
*/
maxBatchesPerRun?: number;
};
};
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**
* @param { import("knex").Knex } knex
* @returns { Promise<void> }
*/


exports.up = async function up(knex) {
return knex.schema.createTable('pagerduty_custom_fields', table => {
table.increments('id').primary();
table.string('pagerdutyCustomFieldId').notNullable();
table.string('pagerdutyCustomFieldDisplayName').notNullable();
table.boolean('pagerdutyCustomFieldEnabled').notNullable().defaultTo(true);
table.string('backstageEntityMappingPath').notNullable();
table.string('pagerdutySubdomain').notNullable();
table.string('description');
table.index(['pagerdutyCustomFieldId'], 'pagerduty_custom_field_id_idx');
table.dateTime('updatedAt').defaultTo(knex.fn.now());
table.dateTime('createdAt').defaultTo(knex.fn.now());
});
};

/**
* @param { import("knex").Knex } knex
* @returns { Promise<void> }
*/
exports.down = async function down(knex) {
await knex.schema.alterTable('pagerduty_custom_fields', table => {
table.dropIndex([], 'pagerduty_custom_field_id_idx');
});
return knex.schema.dropTable('pagerduty_custom_fields');
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/**
* @param { import("knex").Knex } knex
* @returns { Promise<void> }
*/
exports.up = async function up(knex) {
await knex.schema.alterTable('pagerduty_custom_fields', table => {
table.unique(
['backstageEntityMappingPath', 'pagerdutySubdomain'],
{ indexName: 'pagerduty_cf_entitypath_subdomain_unique' },
);
table.unique(
['pagerdutyCustomFieldDisplayName', 'pagerdutySubdomain'],
{ indexName: 'pagerduty_cf_displayname_subdomain_unique' },
);
});
};

/**
* @param { import("knex").Knex } knex
* @returns { Promise<void> }
*/
exports.down = async function down(knex) {
await knex.schema.alterTable('pagerduty_custom_fields', table => {
table.dropUnique([], 'pagerduty_cf_entitypath_subdomain_unique');
table.dropUnique([], 'pagerduty_cf_displayname_subdomain_unique');
});
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/**
* @param { import("knex").Knex } knex
* @returns { Promise<void> }
*/
exports.up = async function up(knex) {
return knex.schema.createTable('pagerduty_custom_field_sync_logs', table => {
table.increments('id').primary();
table.dateTime('timestamp').notNullable().defaultTo(knex.fn.now());
table.string('errorCode').notNullable();
table.string('customFieldId').notNullable();
table.string('customFieldName').notNullable();
table.string('entityPath').notNullable();
table.string('serviceId').notNullable();
table.string('serviceName').notNullable();
table.text('errorMessage').notNullable();
table.string('subdomain').notNullable();
table.index(['subdomain', 'timestamp'], 'sync_logs_subdomain_timestamp_idx');
table.index(['serviceId'], 'sync_logs_service_id_idx');
});
};

/**
* @param { import("knex").Knex } knex
* @returns { Promise<void> }
*/
exports.down = async function down(knex) {
await knex.schema.alterTable('pagerduty_custom_field_sync_logs', table => {
table.dropIndex([], 'sync_logs_subdomain_timestamp_idx');
table.dropIndex([], 'sync_logs_service_id_idx');
});
return knex.schema.dropTable('pagerduty_custom_field_sync_logs');
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* @param { import("knex").Knex } knex
* @returns { Promise<void> }
*/
exports.up = async function up(knex) {
return knex.schema.alterTable('pagerduty_custom_field_sync_logs', table => {
table.index(['timestamp'], 'sync_logs_timestamp_idx');
});
};

/**
* @param { import("knex").Knex } knex
* @returns { Promise<void> }
*/
exports.down = async function down(knex) {
return knex.schema.alterTable('pagerduty_custom_field_sync_logs', table => {
table.dropIndex([], 'sync_logs_timestamp_idx');
});
};
2 changes: 1 addition & 1 deletion plugins/backstage-plugin-backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pagerduty/backstage-plugin-backend",
"version": "0.13.0",
"version": "0.14.0",
"main": "dist/index.cjs.js",
"types": "dist/index.d.ts",
"license": "Apache-2.0",
Expand Down
Loading
Loading