Skip to content

Commit

Permalink
feat(dynamic-plugins): make mountpoints and layout declarative
Browse files Browse the repository at this point in the history
Signed-off-by: Tomas Coufal <tcoufal@redhat.com>
  • Loading branch information
tumido committed Nov 2, 2023
1 parent 9e606ed commit 0be8d5b
Show file tree
Hide file tree
Showing 35 changed files with 899 additions and 1,041 deletions.
332 changes: 331 additions & 1 deletion app-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -342,4 +342,334 @@ enabled:

dynamicPlugins:
rootDirectory: dynamic-plugins-root
frontend: {}
frontend:
backstage.plugin-azure-devops:
mountPoints:
- mountPoint: entity.page.ci/cards
module: AzureDevopsPlugin
importName: EntityAzurePipelinesContent
config:
layout:
gridColumn: "1 / -1"
if:
allOf:
- isAzureDevOpsAvailable
- mountPoint: entity.page.pull-requests/cards
module: AzureDevopsPlugin
importName: EntityAzurePullRequestsContent
config:
layout:
gridColumn: "1 / -1"
if:
allOf:
- isAzureDevOpsAvailable
backstage.plugin-dynatrace:
mountPoints:
- mountPoint: entity.page.monitoring/cards
module: DynatracePlugin
importName: DynatraceTab
config:
layout:
gridColumn: "1 / -1"
if:
allOf:
- isDynatraceAvailable
backstage.plugin-github-actions:
mountPoints:
- mountPoint: entity.page.ci/cards
module: GithubActionsPlugin
importName: EntityGithubActionsContent
config:
layout:
gridColumn: "1 / -1"
if:
allOf:
- isGithubActionsAvailable
backstage.plugin-github-issues:
mountPoints:
- mountPoint: entity.page.issues/cards
module: GithubIssuesPlugin
importName: GithubIssuesCard
config:
layout:
gridColumn: "1 / -1"
if:
allOf:
- hasAnnotation: github.com/project-slug
backstage.plugin-jenkins:
mountPoints:
- mountPoint: entity.page.ci/cards
module: JenkinsPlugin
importName: EntityJenkinsContent
config:
layout:
gridColumn: "1 / -1"
if:
allOf:
- isJenkinsAvailable
backstage.plugin-kubernetes:
mountPoints:
- mountPoint: entity.page.kubernetes/cards
module: KubernetesPlugin
importName: EntityKubernetesContent
config:
layout:
gridColumn: "1 / -1"
if:
anyOf:
- hasAnnotation: backstage.io/kubernetes-id
- hasAnnotation: backstage.io/kubernetes-namespace
backstage.plugin-lighthouse:
dynamicRoutes:
- path: /lighthouse
module: LighthousePlugin
importName: LighthousePage
menuItem:
icon: Assessment
text: Lighthouse
mountPoints:
- mountPoint: entity.page.overview/cards
module: LighthousePlugin
importName: EntityLastLighthouseAuditCard
config:
layout:
gridColumnEnd: "span 6"
if:
allOf:
- isLighthouseAvailable
backstage.plugin-pagerduty:
mountPoints:
- mountPoint: entity.page.overview/cards
module: PagerdutyPlugin
importName: EntityPagerDutyCard
config:
layout:
gridColumnEnd: "span 6"
if:
allOf:
- isPluginApplicableToEntity
backstage.plugin-sonarqube:
mountPoints:
- mountPoint: entity.page.overview/cards
module: SonarQubePlugin
importName: EntitySonarQubeCard
config:
layout:
gridColumnStart: "span 4"
gridRowEnd: "span 2"
if:
allOf:
- isSonarQubeAvailable
immobiliarelabs.backstage-plugin-gitlab:
mountPoints:
- mountPoint: entity.page.overview/cards
module: GitlabPlugin
importName: EntityGitlabMergeRequestStatsCard
config:
layout:
gridRowEnd: "span 2"
gridColumnStart: "span 4"
if:
allOf:
- isGitlabAvailable
- mountPoint: entity.page.ci/cards
module: GitlabPlugin
importName: EntityGitlabPipelinesTable
config:
layout:
gridColumn: "1 / -1"
if:
allOf:
- isGitlabAvailable
- mountPoint: entity.page.issues/cards
module: GitlabPlugin
importName: EntityGitlabIssuesTable
config:
layout:
gridColumn: "1 / -1"
if:
allOf:
- isGitlabAvailable
- mountPoint: entity.page.pull-requests/cards
module: GitlabPlugin
importName: EntityGitlabMergeRequestsTable
config:
layout:
gridColumn: "1 / -1"
if:
allOf:
- isGitlabAvailable
janus-idp.backstage-plugin-jfrog-artifactory:
mountPoints:
- mountPoint: entity.page.image-registry/cards
module: JfrogArtifactoryPlugin
importName: JfrogArtifactoryPage
config:
layout:
gridColumn: 1 / -1
if:
anyOf:
- isJfrogArtifactoryAvailable
janus-idp.backstage-plugin-nexus-repository-manager:
mountPoints:
- mountPoint: entity.page.image-registry/cards
module: NexusRepositoryManagerPlugin
importName: NexusRepositoryManagerPage
config:
layout:
gridColumn: 1 / -1
if:
anyOf:
- isNexusRepositoryManagerAvailable
janus-idp.backstage-plugin-ocm:
dynamicRoutes:
- path: /ocm
module: OcmPlugin
importName: OcmPage
menuItem:
icon: Storage
text: Clusters
mountPoints:
- mountPoint: entity.page.overview/context
module: OcmPlugin
importName: ClusterContextProvider
- mountPoint: entity.page.overview/cards
module: OcmPlugin
importName: ClusterAvailableResourceCard
config:
layout:
gridRowStart: 1
gridColumnStart: "span 1"
if:
anyOf:
- isKind: resource
- isType: kubernetes-cluster
- mountPoint: entity.page.overview/cards
importName: ClusterInfoCard
module: OcmPlugin
config:
if:
allOf:
- isKind: resource
- isType: kubernetes-cluster
janus-idp.backstage-plugin-quay:
mountPoints:
- mountPoint: entity.page.image-registry/cards
module: QuayPlugin
importName: QuayPage
config:
layout:
gridColumn: 1 / -1
if:
anyOf:
- isQuayAvailable
janus-idp.backstage-plugin-tekton:
mountPoints:
- mountPoint: entity.page.ci/cards
module: TektonPlugin
importName: TektonCI
config:
layout:
gridColumn: "1 / -1"
if:
allOf:
- isTektonCIAvailable
janus-idp.backstage-plugin-topology:
mountPoints:
- mountPoint: entity.page.topology/cards
module: TopologyPlugin
importName: TopologyPage
config:
layout:
gridColumn: "1 / -1"
if:
anyOf:
- hasAnnotation: backstage.io/kubernetes-id
- hasAnnotation: backstage.io/kubernetes-namespace
roadiehq.backstage-plugin-argo-cd:
mountPoints:
- mountPoint: entity.page.overview/cards
module: ArgocdPlugin
importName: EntityArgoCDOverviewCard
config:
layout:
gridColumn: "1 / span 8"
if:
allOf:
- isArgocdAvailable
- mountPoint: entity.page.cd/cards
module: ArgocdPlugin
importName: EntityArgoCDHistoryCard
config:
layout:
gridColumn: "1 / -1"
if:
allOf:
- isArgocdAvailable
roadiehq.backstage-plugin-datadog:
mountPoints:
- mountPoint: entity.page.monitoring/cards
module: DatadogPlugin
importName: EntityDatadogContent
config:
layout:
gridColumn: "1 / -1"
if:
allOf:
- isDatadogAvailable
roadiehq.backstage-plugin-github-insights:
mountPoints:
- mountPoint: entity.page.overview/cards
module: GithubInsightsPlugin
importName: EntityGithubInsightsComplianceCard
config:
layout:
gridRowEnd: "span 2"
gridColumnStart: "span 4"
if:
allOf:
- isGithubInsightsAvailable
roadiehq.backstage-plugin-github-pull-requests:
mountPoints:
- mountPoint: entity.page.overview/cards
module: GithubPullRequestsPlugin
importName: EntityGithubPullRequestsOverviewCard
config:
layout:
gridRow: "1 / span 2"
gridColumn: "5 / span 4"
if:
allOf:
- isGithubPullRequestsAvailable
- mountPoint: entity.page.pull-requests/cards
module: GithubPullRequestsPlugin
importName: EntityGithubPullRequestsContent
config:
layout:
gridColumn: "1 / -1"
if:
allOf:
- isGithubPullRequestsAvailable
roadiehq.backstage-plugin-jira:
mountPoints:
- mountPoint: entity.page.issues/cards
module: JiraPlugin
importName: EntityJiraOverviewCard
config:
layout:
gridColumn: "1 / -1"
if:
allOf:
- isJiraAvailable
roadiehq.backstage-plugin-security-insights:
mountPoints:
- mountPoint: entity.page.overview/cards
module: SecurityInsightsPlugin
importName: EntityDependabotAlertsCard
config:
layout:
gridRowEnd: "span 2"
gridColumnStart: "span 4"
if:
allOf:
- isSecurityInsightsAvailable
34 changes: 31 additions & 3 deletions packages/app/config.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export interface Config {
text: string;
};
})[];
routeBindings: {
routeBindings?: {
bindTarget: string;
bindMap: {
[key: string]: string;
Expand All @@ -74,8 +74,36 @@ export interface Config {
mountPoints: {
mountPoint: string;
module: string;
importName?: string;
}[];
importName: string;
config: {
layout?: {
[key: string]: string;
};
props?: {
[key: string]: string;
};
if?: {
allOf?: (
| {
[key: string]: string | string[];
}
| string
)[];
anyOf?: (
| {
[key: string]: string | string[];
}
| string
)[];
oneOf?: (
| {
[key: string]: string | string[];
}
| string
)[];
};
}[];
};
};
};
};
Expand Down
Loading

0 comments on commit 0be8d5b

Please sign in to comment.