Refactored route names
Signed-off-by: Andre Wanlin <awanlin@rapidrtc.com>
This commit is contained in:
@@ -7,17 +7,11 @@
|
||||
|
||||
import { BackstagePlugin } from '@backstage/core-plugin-api';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { RouteRef } from '@backstage/core-plugin-api';
|
||||
|
||||
// Warning: (ae-missing-release-tag) "azureDevOpsPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export const azureDevOpsPlugin: BackstagePlugin<
|
||||
{
|
||||
entityContent: RouteRef<undefined>;
|
||||
},
|
||||
{}
|
||||
>;
|
||||
export const azureDevOpsPlugin: BackstagePlugin<{}, {}>;
|
||||
|
||||
// Warning: (ae-missing-release-tag) "EntityAzurePipelinesContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
|
||||
@@ -14,6 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
azurePipelinesEntityContentRouteRef,
|
||||
azurePullRequestsEntityContentRouteRef,
|
||||
} from './routes';
|
||||
import {
|
||||
createApiFactory,
|
||||
createPlugin,
|
||||
@@ -26,7 +30,6 @@ import { AZURE_DEVOPS_ANNOTATION } from './constants';
|
||||
import { AzureDevOpsClient } from './api/AzureDevOpsClient';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { azureDevOpsApiRef } from './api/AzureDevOpsApi';
|
||||
import { azureDevOpsRouteRef } from './routes';
|
||||
|
||||
export const isAzureDevOpsAvailable = (entity: Entity) =>
|
||||
Boolean(entity.metadata.annotations?.[AZURE_DEVOPS_ANNOTATION]);
|
||||
@@ -41,9 +44,6 @@ export const azureDevOpsPlugin = createPlugin({
|
||||
new AzureDevOpsClient({ discoveryApi, identityApi }),
|
||||
}),
|
||||
],
|
||||
routes: {
|
||||
entityContent: azureDevOpsRouteRef,
|
||||
},
|
||||
});
|
||||
|
||||
export const EntityAzurePipelinesContent = azureDevOpsPlugin.provide(
|
||||
@@ -53,7 +53,7 @@ export const EntityAzurePipelinesContent = azureDevOpsPlugin.provide(
|
||||
import('./components/EntityPageAzurePipelines').then(
|
||||
m => m.EntityPageAzurePipelines,
|
||||
),
|
||||
mountPoint: azureDevOpsRouteRef,
|
||||
mountPoint: azurePipelinesEntityContentRouteRef,
|
||||
}),
|
||||
);
|
||||
|
||||
@@ -64,6 +64,6 @@ export const EntityAzurePullRequestsContent = azureDevOpsPlugin.provide(
|
||||
import('./components/EntityPageAzurePullRequests').then(
|
||||
m => m.EntityPageAzurePullRequests,
|
||||
),
|
||||
mountPoint: azureDevOpsRouteRef,
|
||||
mountPoint: azurePullRequestsEntityContentRouteRef,
|
||||
}),
|
||||
);
|
||||
|
||||
@@ -13,8 +13,13 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createRouteRef } from '@backstage/core-plugin-api';
|
||||
|
||||
export const azureDevOpsRouteRef = createRouteRef({
|
||||
title: 'azure-devops',
|
||||
export const azurePipelinesEntityContentRouteRef = createRouteRef({
|
||||
title: 'Azure Pipelines Entity Content',
|
||||
});
|
||||
|
||||
export const azurePullRequestsEntityContentRouteRef = createRouteRef({
|
||||
title: 'Azure Pull Requests Entity Content',
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user