@spotify/backstage-plugin-soundcheck 0.19.8 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/dist/alpha/entity-content.esm.js +1 -1
- package/dist/alpha.d.ts +3 -116
- package/dist/blueprints/IntegrationPageBlueprint.esm.js +1 -1
- package/dist/components/AreaChart/AreaChart.esm.js +1 -1
- package/dist/components/CampaignCreatePage/CampaignCreatePage.esm.js +1 -1
- package/dist/components/CampaignForm/CampaignForm.esm.js +1 -1
- package/dist/components/CampaignForm/Steps/CampaignMilestonesStep.esm.js +1 -1
- package/dist/components/CampaignForm/hooks/utils.esm.js +1 -1
- package/dist/components/CampaignForm/utils/campaignFormUtils.esm.js +2 -2
- package/dist/components/CampaignPage/CampaignPage.esm.js +1 -1
- package/dist/components/CampaignPage/CampaignPageBUI.esm.js +1 -1
- package/dist/components/CampaignPage/CampaignStatusBarBUI.esm.js +2 -0
- package/dist/components/CampaignPage/CampaignStatusCard.esm.js +2 -0
- package/dist/components/CampaignPage/CampaignStatusTableBUI.esm.js +2 -0
- package/dist/components/CampaignsPage/CampaignListPageBUI.esm.js +1 -1
- package/dist/components/CampaignsPage/CampaignsPage.esm.js +1 -1
- package/dist/components/CampaignsPage/EditCampaignView.esm.js +1 -1
- package/dist/components/Cards/HistoricalCheckStatusCard/HistoricalCheckStatusCard.esm.js +1 -1
- package/dist/components/Cards/TrackStatusCard/TrackStatusCard.esm.js +1 -1
- package/dist/components/CategoryBar/CategoryBar.esm.js +1 -1
- package/dist/components/Charts/chartUtils.esm.js +1 -1
- package/dist/components/CheckCreatePage/CheckCreatePage.esm.js +1 -1
- package/dist/components/CheckForm/CheckForm.esm.js +1 -1
- package/dist/components/CheckForm/FormFields/RuleInput/Conditions/RuleConditionInput.esm.js +1 -1
- package/dist/components/CheckForm/Steps/CheckApplicabilityStep.esm.js +1 -1
- package/dist/components/CheckForm/Steps/CheckReviewStep.esm.js +1 -1
- package/dist/components/CheckForm/utils/checkFormUtils.esm.js +2 -2
- package/dist/components/CheckForm/utils/validation.esm.js +1 -1
- package/dist/components/CheckPage/CheckEditPage.esm.js +1 -1
- package/dist/components/CheckPage/CheckEntitiesTable/CheckEntitiesTableBUI.esm.js +1 -1
- package/dist/components/CheckPage/CheckPage.esm.js +1 -1
- package/dist/components/CheckPage/CheckPageBUI.esm.js +1 -1
- package/dist/components/CheckPage/CheckStatusHistoryChartBUI.esm.js +1 -1
- package/dist/components/CheckPage/CheckStatusTableBUI.esm.js +1 -1
- package/dist/components/CheckPage/ExemptionsTableBUI.esm.js +1 -1
- package/dist/components/CheckPage/utils.esm.js +1 -1
- package/dist/components/CheckSelection/CheckSelection.esm.js +1 -1
- package/dist/components/CheckStatusBar/CheckStatusBar.esm.js +1 -1
- package/dist/components/CheckTemplatesPage/CheckTemplatesPage.esm.js +1 -1
- package/dist/components/CheckTemplatesPage/CheckTemplatesPageDeprecated.esm.js +1 -1
- package/dist/components/CheckTemplatesPage/TemplateCategory.esm.js +1 -1
- package/dist/components/ChecksPage/ChecksListPageBUI.esm.js +1 -1
- package/dist/components/ChecksPage/ChecksPage.esm.js +1 -1
- package/dist/components/ChecksTab/ChecksTab.esm.js +1 -1
- package/dist/components/ChecksTable/ChecksTable.esm.js +1 -1
- package/dist/components/CollapsablePanel/CollapsablePanel.esm.js +1 -1
- package/dist/components/CollectorPage/CollectorDetailsPage.esm.js +1 -1
- package/dist/components/CollectorPage/CollectorDetailsPageBUI.esm.js +1 -1
- package/dist/components/CollectorPage/CollectorDetailsPageDeprecated.esm.js +1 -1
- package/dist/components/CollectorPage/CollectorFactTable.esm.js +1 -1
- package/dist/components/CollectorPage/CollectorFactTableBUI.esm.js +1 -1
- package/dist/components/CollectorPage/CollectorPage.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/AzureDevOps/NumberOfWorkItemsComponent.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/BigQuery/QueryFactDetailsComponent.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Common/CollectorOption.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Common/FactCollectionConfig.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Common/utils.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/HTTP/HttpRequestComponent.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/SCM/JsonFactDetailsComponent.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/SCM/RegexFactDetailsComponent.esm.js +1 -1
- package/dist/components/CollectorsPage/CollectorListPage/CollectorListPageDeprecated.esm.js +1 -1
- package/dist/components/CollectorsPage/CollectorListPage/CollectorSummaryCard.esm.js +1 -1
- package/dist/components/CollectorsPage/CollectorsPage.esm.js +1 -1
- package/dist/components/CollectorsPage/IntegrationsListPageBUI.esm.js +1 -1
- package/dist/components/FactExplorer/FactExplorer.esm.js +1 -1
- package/dist/components/FactExplorer/FactExplorerContext.esm.js +1 -1
- package/dist/components/FactExplorer/FactExplorerDialogBUI.esm.js +1 -1
- package/dist/components/Filter/FilterComponent.esm.js +1 -1
- package/dist/components/Filter/FilterPreviewTable/FilterPreviewTable.esm.js +1 -1
- package/dist/components/Filter/KeyValueInputDialog.esm.js +1 -1
- package/dist/components/Filter/types.esm.js +1 -1
- package/dist/components/Filter/utils.esm.js +1 -1
- package/dist/components/FilterSidebar/FilterSidebar.esm.js +1 -1
- package/dist/components/FilterSidebar/StateFilter.esm.js +1 -1
- package/dist/components/FormControlledAutocomplete/ControlledAutocomplete.esm.js +1 -1
- package/dist/components/FormFilterSection/FormFilterSection.esm.js +1 -1
- package/dist/components/FormStepper/FormStepper.esm.js +1 -1
- package/dist/components/HierarchicalTechInsightsPage/visualizations/LoadingOverlay.esm.js +1 -1
- package/dist/components/HierarchicalTechInsightsPage/visualizations/NivoCirclePacking.esm.js +1 -1
- package/dist/components/HierarchicalTechInsightsPage/visualizations/NivoIcicle.esm.js +1 -1
- package/dist/components/HierarchicalTechInsightsPage/visualizations/NivoSunburst.esm.js +1 -1
- package/dist/components/HierarchicalTechInsightsPage/visualizations/NivoTreemap.esm.js +1 -1
- package/dist/components/HierarchicalTechInsightsPage/visualizations/VisualizationBreadcrumb.esm.js +1 -1
- package/dist/components/ImportExportPanel/ImportExportPanelBUI.esm.js +1 -1
- package/dist/components/ImportExportPanel/ImportExportPanelDeprecated.esm.js +1 -1
- package/dist/components/OverviewPage/OverviewPageContent.esm.js +1 -1
- package/dist/components/OverviewPage/OverviewPageHeader.esm.js +1 -1
- package/dist/components/Pagination/Pagination.esm.js +1 -1
- package/dist/components/RoutingPage/RoutingPage.esm.js +1 -1
- package/dist/components/RoutingPage/RoutingPageBUI.esm.js +1 -1
- package/dist/components/RoutingPage/RoutingPageWrapper.esm.js +1 -1
- package/dist/components/SoundcheckHeader/Breadcrumbs.esm.js +1 -1
- package/dist/components/SoundcheckHeader/SoundcheckHeader.esm.js +1 -1
- package/dist/components/SoundcheckHeader/SoundcheckHeaderBUI.esm.js +1 -1
- package/dist/components/SoundcheckHeader/useHeader.esm.js +1 -1
- package/dist/components/SummaryCard/SummaryCard.esm.js +1 -1
- package/dist/components/SummaryCard/SummaryCardActionsMenu.esm.js +1 -1
- package/dist/components/TableRowWithOwner/TableRowWithOwner.esm.js +1 -1
- package/dist/components/TechHealth/Filters/FacetFilter.esm.js +1 -1
- package/dist/components/TechHealth/Filters/FilterProvider.esm.js +1 -1
- package/dist/components/TechHealth/Filters/Filters.esm.js +1 -1
- package/dist/components/TechHealth/Filters/FiltersHeader.esm.js +1 -1
- package/dist/components/TechHealth/Filters/FiltersSection.esm.js +1 -1
- package/dist/components/TechHealth/Filters/NumberOfDaysFilter.esm.js +1 -1
- package/dist/components/TechHealth/Filters/types.esm.js +1 -1
- package/dist/components/TechHealth/Filters/utils.esm.js +1 -1
- package/dist/components/TechHealth/Loading/TechHealthLoading.esm.js +1 -1
- package/dist/components/TechInsights/TechInsightsPage.esm.js +1 -1
- package/dist/components/TechInsights/TechInsightsPageBUI.esm.js +1 -1
- package/dist/components/TechInsights/TechInsightsTableBUI.esm.js +1 -1
- package/dist/components/TechInsightsExplorerTable/TechInsightsExplorerTable.esm.js +1 -1
- package/dist/components/TechInsightsGroupSelector/TechInsightsGroupSelector.esm.js +1 -1
- package/dist/components/TopFailingChecksTable/TopFailingChecksTableBUI.esm.js +1 -1
- package/dist/components/TrackCreatePage/TrackCreatePage.esm.js +1 -1
- package/dist/components/TrackEditPage/TrackEditPage.esm.js +1 -1
- package/dist/components/TrackForm/Steps/LevelsStep/LevelsStepNew.esm.js +1 -1
- package/dist/components/TrackForm/TrackForm.esm.js +1 -1
- package/dist/components/TrackForm/utils/useTrackForm.esm.js +1 -1
- package/dist/components/TrackPage/TrackEntitiesTable/TrackEntitiesTableBUI.esm.js +1 -1
- package/dist/components/TrackPage/TrackEntitiesTable/utils.esm.js +1 -1
- package/dist/components/TrackPage/TrackPage.esm.js +1 -1
- package/dist/components/TrackPage/TrackPageBUI.esm.js +1 -1
- package/dist/components/TrackPage/TrackStatusTableBUI.esm.js +1 -1
- package/dist/components/TracksPage/TracksListPageBUI.esm.js +1 -1
- package/dist/components/TracksPage/TracksPage.esm.js +1 -1
- package/dist/components/TracksTab/TracksTab.esm.js +1 -1
- package/dist/hooks/aggregations/useCertificationStatus.esm.js +1 -1
- package/dist/hooks/aggregations/useCertificationStatusHistory.esm.js +1 -1
- package/dist/hooks/aggregations/useCheckStatus.esm.js +1 -1
- package/dist/hooks/aggregations/useCheckStatusHistory.esm.js +1 -1
- package/dist/hooks/aggregations/useCheckStatuses.esm.js +1 -1
- package/dist/hooks/campaigns/useGetCampaign.esm.js +1 -1
- package/dist/hooks/checks/useCheck.esm.js +1 -1
- package/dist/hooks/checks/useExecutableChecks.esm.js +1 -1
- package/dist/hooks/checks/useGetChecks.esm.js +1 -1
- package/dist/hooks/collectors/useGetCollectors.esm.js +1 -1
- package/dist/hooks/collectors/useGetFactSchema.esm.js +1 -1
- package/dist/hooks/collectors/useUpdateCollectorConfig.esm.js +1 -1
- package/dist/hooks/exemptions/useExemptions.esm.js +1 -1
- package/dist/hooks/facets/useFacetsForOwner.esm.js +1 -1
- package/dist/hooks/filters/useFilters.esm.js +1 -1
- package/dist/hooks/groups/useAllGroups.esm.js +1 -1
- package/dist/hooks/tracks/useGetTracksApplicableEntityCount.esm.js +1 -1
- package/dist/hooks/tracks/useTrack.esm.js +1 -1
- package/dist/hooks/useSortSearchParams.esm.js +2 -0
- package/dist/index.d.ts +11 -11
- package/dist/routes.esm.js +1 -1
- package/dist/utils/charts.esm.js +1 -1
- package/dist/utils/filters.esm.js +1 -1
- package/dist/utils/formStyles.esm.js +1 -1
- package/dist/utils/helpers.esm.js +1 -1
- package/dist/utils/json.esm.js +2 -0
- package/dist/utils/validation.esm.js +1 -1
- package/package.json +19 -19
- package/dist/components/CampaignPage/CampaignPageDeprecated.esm.js +0 -2
- package/dist/components/CampaignPage/CampaignStatusHistoryTile.esm.js +0 -2
- package/dist/components/CampaignPage/CampaignStatusTile.esm.js +0 -2
- package/dist/components/CampaignPage/DaysRemainingTile.esm.js +0 -2
- package/dist/components/CampaignsPage/CampaignListPage/CampaignListPageDeprecated.esm.js +0 -2
- package/dist/components/CampaignsPage/CampaignListPage/CampaignMetadata.esm.js +0 -2
- package/dist/components/CampaignsPage/CampaignListPage/CampaignSummaryCard.esm.js +0 -2
- package/dist/components/CampaignsPage/CampaignListPage/CampaignTypes.esm.js +0 -2
- package/dist/components/CampaignsPage/CampaignListPage/CampaignsOverviewSkeleton.esm.js +0 -2
- package/dist/components/Charts/BarChart/BarChart.esm.js +0 -2
- package/dist/components/Charts/BarChart/BarChartPlaceholder.esm.js +0 -2
- package/dist/components/Charts/BarChart/GroupPassRateHistoryBarChart.esm.js +0 -2
- package/dist/components/Charts/BarChart/TrackSummaryBarChart.esm.js +0 -2
- package/dist/components/Charts/ChartTypes.esm.js +0 -2
- package/dist/components/Charts/ChartWrapper/ChartWrapper.esm.js +0 -2
- package/dist/components/Charts/LineChart/EntityPassRateHistoryLineChart.esm.js +0 -2
- package/dist/components/Charts/LineChart/LineChart.esm.js +0 -2
- package/dist/components/Charts/LineChart/LineChartPlaceholder.esm.js +0 -2
- package/dist/components/Charts/LineChart/PassRateHistoryLineChart.esm.js +0 -2
- package/dist/components/Charts/LineChart/TableLineChart.esm.js +0 -2
- package/dist/components/Charts/LineChart/TrackPassRateHistoryLineChart.esm.js +0 -2
- package/dist/components/Charts/LoadingChart.esm.js +0 -2
- package/dist/components/CheckHistoryChartCard/CheckHistoryChartCard.esm.js +0 -2
- package/dist/components/CheckPage/CheckEntitiesTable/CheckEntitiesTable.esm.js +0 -2
- package/dist/components/CheckPage/CheckEntitiesTable/columns.esm.js +0 -2
- package/dist/components/CheckPage/CheckPageDeprecated.esm.js +0 -2
- package/dist/components/CheckPage/CheckStatusHistoryChart.esm.js +0 -2
- package/dist/components/CheckPage/CheckStatusTable.esm.js +0 -2
- package/dist/components/CheckPage/ExemptionsTable.esm.js +0 -2
- package/dist/components/ChecksPage/CheckListPage/CheckListPageDeprecated.esm.js +0 -2
- package/dist/components/ChecksPage/CheckListPage/CheckMetadata.esm.js +0 -2
- package/dist/components/ChecksPage/CheckListPage/CheckSummaryCard.esm.js +0 -2
- package/dist/components/ChecksPage/skeletons/ChecksOverviewSkeleton.esm.js +0 -2
- package/dist/components/CollectorsPage/CollectorListPage/CollectorListSkeleton.esm.js +0 -2
- package/dist/components/ColorChip/ColorChip.esm.js +0 -2
- package/dist/components/EntityPassRateCard/EntityPassRateCard.esm.js +0 -2
- package/dist/components/Expand/Expand.esm.js +0 -2
- package/dist/components/GroupHierarchySelector/GroupHierarchyCategorySelection.esm.js +0 -2
- package/dist/components/GroupHierarchySelector/GroupHierarchyChip.esm.js +0 -2
- package/dist/components/GroupHierarchySelector/GroupHierarchyGroupInfo.esm.js +0 -2
- package/dist/components/GroupHierarchySelector/GroupHierarchySelector.esm.js +0 -2
- package/dist/components/GroupHierarchySelector/GroupHierarchySelectorDialog.esm.js +0 -2
- package/dist/components/GroupPassRateCard/GroupPassRateCard.esm.js +0 -2
- package/dist/components/HierarchicalTechInsightsPage/ColorLegend.esm.js +0 -2
- package/dist/components/HierarchicalTechInsightsPage/HierarchicalTechInsightsPage.esm.js +0 -2
- package/dist/components/HierarchicalTechInsightsPage/HierarchyTable.esm.js +0 -2
- package/dist/components/HierarchicalTechInsightsPage/LowestPerformingTeams.esm.js +0 -2
- package/dist/components/HierarchicalTechInsightsPage/SelectedNodeSidebar.esm.js +0 -2
- package/dist/components/HierarchicalTechInsightsPage/TeamPerformanceCard.esm.js +0 -2
- package/dist/components/HierarchicalTechInsightsPage/TeamPerformanceListCard.esm.js +0 -2
- package/dist/components/HierarchicalTechInsightsPage/TopPerformingTeams.esm.js +0 -2
- package/dist/components/HierarchicalTechInsightsPage/visualizations/findNodePath.esm.js +0 -2
- package/dist/components/LevelsTable/CheckRowContent.esm.js +0 -2
- package/dist/components/LevelsTable/LevelsTable.esm.js +0 -2
- package/dist/components/OverviewChartCard/OverviewChartCard.esm.js +0 -2
- package/dist/components/OverviewChartCard/OverviewChartCardStyles.esm.js +0 -2
- package/dist/components/PassRateGrid/PassRateGrid.esm.js +0 -2
- package/dist/components/PassRateGrid/PassRateMetadata.esm.js +0 -2
- package/dist/components/PassRateGrid/types.esm.js +0 -2
- package/dist/components/PassRateTable/NewPassRateTable.esm.js +0 -2
- package/dist/components/PassRateTable/PassRateTable.esm.js +0 -4
- package/dist/components/PassRateTable/types.esm.js +0 -2
- package/dist/components/PassingPercentProgressbar/PassPercentageProgressbar.esm.js +0 -2
- package/dist/components/QuickstartPage/HowDoIListItem.esm.js +0 -2
- package/dist/components/QuickstartPage/QuickstartCardBase.esm.js +0 -2
- package/dist/components/QuickstartPage/QuickstartPage.esm.js +0 -3
- package/dist/components/QuickstartPage/WelcomeHelpSection.esm.js +0 -7
- package/dist/components/QuickstartPage/styles.esm.js +0 -2
- package/dist/components/RichTooltip/RichTooltip.esm.js +0 -2
- package/dist/components/RoutingPage/NewFeatureTab.esm.js +0 -2
- package/dist/components/RoutingPage/RoutingPageDeprecated.esm.js +0 -2
- package/dist/components/RoutingPage/RoutingPageWrapperDeprecated.esm.js +0 -2
- package/dist/components/SearchBar/SearchBar.esm.js +0 -2
- package/dist/components/SearchFilters/SearchFilters.esm.js +0 -2
- package/dist/components/SendCampaignNotificationDialog/SendCampaignNotificationDialog.esm.js +0 -2
- package/dist/components/SoundcheckEntityLink/SoundcheckEntityLink.esm.js +0 -2
- package/dist/components/SoundcheckHeader/headerUtil.esm.js +0 -2
- package/dist/components/TeamStatusBar/TeamStatusBar.esm.js +0 -2
- package/dist/components/TechHealth/Filters/useFacetOptions.esm.js +0 -2
- package/dist/components/TechHealth/TechHealth.esm.js +0 -2
- package/dist/components/TechHealthSummary/SummaryAggregationsProvider.esm.js +0 -2
- package/dist/components/TechHealthSummary/TechHealthSummary.esm.js +0 -2
- package/dist/components/TechHealthTabs/ActionColumn.esm.js +0 -2
- package/dist/components/TechHealthTabs/CampaignResultsTab/CampaignResultsTab.esm.js +0 -2
- package/dist/components/TechHealthTabs/CheckResultsTab/CheckResultsTab.esm.js +0 -2
- package/dist/components/TechHealthTabs/CheckResultsTab/CheckTrendColumn.esm.js +0 -2
- package/dist/components/TechHealthTabs/EntityResultsTab/EntityResultsTab.esm.js +0 -2
- package/dist/components/TechHealthTabs/EntityResultsTab/EntityTrendColumn.esm.js +0 -2
- package/dist/components/TechHealthTabs/GroupResultsTab/GroupResultsTab.esm.js +0 -2
- package/dist/components/TechHealthTabs/GroupResultsTab/GroupTrendColumn.esm.js +0 -2
- package/dist/components/TechHealthTabs/MostRecentColumn.esm.js +0 -2
- package/dist/components/TechHealthTabs/NameColumn.esm.js +0 -2
- package/dist/components/TechHealthTabs/OwnerColumn.esm.js +0 -2
- package/dist/components/TechHealthTabs/PassRateTabHeader.esm.js +0 -2
- package/dist/components/TechHealthTabs/PassRateTabStyles.esm.js +0 -2
- package/dist/components/TechHealthTabs/TechHealthExportFunctions.esm.js +0 -2
- package/dist/components/TechHealthTabs/TrackResultsTab/TrackLevelTrendColumn.esm.js +0 -2
- package/dist/components/TechHealthTabs/TrackResultsTab/TrackResultsTab.esm.js +0 -2
- package/dist/components/TechHealthTabs/techHealthTabUtils.esm.js +0 -2
- package/dist/components/TechInsights/FilterControls.esm.js +0 -2
- package/dist/components/TechInsights/SummaryTiles.esm.js +0 -2
- package/dist/components/TechInsights/TechInsightsPageDeprecated.esm.js +0 -2
- package/dist/components/TechInsights/TechInsightsTableView.esm.js +0 -2
- package/dist/components/TimePeriodBar/TimePeriodBar.esm.js +0 -2
- package/dist/components/TopFailingChecksTable/TopFailingChecksTable.esm.js +0 -2
- package/dist/components/TrackHistoryChartCard/TrackHistoryChartCard.esm.js +0 -2
- package/dist/components/TrackPage/TrackEntitiesTable/TrackEntitiesTable.esm.js +0 -2
- package/dist/components/TrackPage/TrackEntitiesTable/TrackStatusChip.esm.js +0 -2
- package/dist/components/TrackPage/TrackEntitiesTable/columns.esm.js +0 -2
- package/dist/components/TrackPage/TrackHistoryChart.esm.js +0 -2
- package/dist/components/TrackPage/TrackPageDeprecated.esm.js +0 -2
- package/dist/components/TrackPage/TrackProgressCard.esm.js +0 -2
- package/dist/components/TrackPage/TrackStatus.esm.js +0 -2
- package/dist/components/TrackPage/TrackStatusBar.esm.js +0 -2
- package/dist/components/TrackPage/TrackStatusTable.esm.js +0 -2
- package/dist/components/TrackPage/utils.esm.js +0 -2
- package/dist/components/TrackSelection/TrackSelection.esm.js +0 -2
- package/dist/components/TracksPage/TrackListPage/TrackEmptyState.esm.js +0 -2
- package/dist/components/TracksPage/TrackListPage/TrackListPageDeprecated.esm.js +0 -2
- package/dist/components/TracksPage/TrackListPage/TrackMetadata.esm.js +0 -2
- package/dist/components/TracksPage/TrackListPage/TrackSummaryCard.esm.js +0 -2
- package/dist/components/TracksPage/TrackListPage/TracksOverviewSkeleton.esm.js +0 -2
- package/dist/hooks/aggregations/useAggregatedCheckPassRateTrend.esm.js +0 -2
- package/dist/hooks/aggregations/useAggregatedEntityPassRateTrend.esm.js +0 -2
- package/dist/hooks/aggregations/useAggregatedGroupPassRateTrend.esm.js +0 -2
- package/dist/hooks/aggregations/useAggregatedTrackPassRateTrend.esm.js +0 -2
- package/dist/hooks/aggregations/useCheckPassRateTrend.esm.js +0 -2
- package/dist/hooks/aggregations/useEntityPassRateTrend.esm.js +0 -2
- package/dist/hooks/aggregations/useGroupPassRateTrend.esm.js +0 -2
- package/dist/hooks/aggregations/useTrackPassRateTrend.esm.js +0 -2
- package/dist/hooks/cache/useEntityCountCached.esm.js +0 -2
- package/dist/hooks/cache/useTrackCountCached.esm.js +0 -2
- package/dist/hooks/campaigns/useGetCampaignOwners.esm.js +0 -2
- package/dist/hooks/catalog/useGetEntityCount.esm.js +0 -2
- package/dist/hooks/checks/useGetCheckOwners.esm.js +0 -2
- package/dist/hooks/entities/useEntityRefsForUser.esm.js +0 -2
- package/dist/hooks/facets/useFacetFilters.esm.js +0 -2
- package/dist/hooks/heirarchy/useGroupTypeHierarchy.esm.js +0 -2
- package/dist/hooks/tracks/useGetTrackOwners.esm.js +0 -2
- package/dist/utils/colors.esm.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as a,jsxs as x,Fragment as
|
|
1
|
+
import{jsx as a,jsxs as x,Fragment as ut}from"react/jsx-runtime";import{useApi as gt,useRouteRef as X}from"@backstage/core-plugin-api";import{entityPresentationApiRef as ft}from"@backstage/plugin-catalog-react";import{Box as U,HeaderPage as ht,Flex as kt,SearchField as yt,Container as Tt}from"@backstage/ui";import{makeStyles as St,LinearProgress as Ct}from"@material-ui/core";import{isEmpty as Et}from"lodash";import{useState as _,useMemo as i,useCallback as wt,useEffect as Rt}from"react";import{useSearchParams as Lt,useNavigate as vt}from"react-router-dom";import bt from"react-use/lib/useDebounce";import"@backstage/catalog-model";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import"@spotify/backstage-plugin-soundcheck-common";import"../../hooks/useSoundcheckAlert.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{useSortTableLocalStorage as It}from"../../hooks/useSortTableLocalStorage.esm.js";import{useBatchedHierarchicalTrackStatuses as Pt}from"../../hooks/heirarchy/useBatchedHierarchicalTrackStatuses.esm.js";import{useGroupHierarchy as Bt}from"../../hooks/heirarchy/useGroupHierarchy.esm.js";import{useTracksApplicableToGroup as At}from"../../hooks/tracks/useTracksApplicableToGroup.esm.js";import{useLCPReporting as xt}from"../../hooks/useLCPReporting.esm.js";import{useLoadTimeReporting as Ut}from"../../hooks/useLoadTimeReporting.esm.js";import{trackExplorerRouteRef as Mt,campaignExplorerRouteRef as $t}from"../../routes.esm.js";import{getAllOwnedEntityCount as Gt}from"../../utils/getAllOwnedEntityCount.esm.js";import{getEntitiesBucket as Nt,getTracksBucket as Dt}from"../../utils/helpers.esm.js";import{showTrack as Ft}from"../../utils/tracks.esm.js";import"../EmptyState/EmptyState.esm.js";import{EmptyStateBUI as Ht}from"../EmptyState/EmptyStateBUI.esm.js";import"@backstage/plugin-permission-react";import"@remixicon/react";import{TechInsightsGroupSelector as Ot}from"../TechInsightsGroupSelector/TechInsightsGroupSelector.esm.js";import{SummaryTilesBUI as jt}from"./SummaryTilesBUI.esm.js";import{TechInsightsTableBUI as Vt}from"./TechInsightsTableBUI.esm.js";const zt=St(()=>({container:{marginBottom:"var(--bui-space-12)"}})),Wt=()=>{const Y=zt(),[y,Z]=Lt(),r=y.get("group")||"",[l,tt]=_(y.get("search")||""),[g,et]=_(""),M=i(()=>({routeName:"soundcheck-tech-insights",additionalAttributes:{group:r||"",tracksSearch:g||""}}),[r,g]),{reportContentLoaded:$}=Ut({...M,enabled:!!r}),{reporter:rt}=xt(M),G=vt(),T=gt(ft),{order:ot,orderBy:at,handleSort:it}=It({localStoragePrefix:"soundcheck-tech-insights",defaultSortBy:"entities",defaultDirection:"desc"});bt(()=>{et(l);const t=new URLSearchParams(y.toString());l?t.set("search",l):t.delete("search"),Z(t,{replace:!0})},500,[l]);const{tracks:S,campaigns:N,counts:C,isLoading:f,error:E,activeTrackCount:w}=At(r,{},{enabled:!!r}),p=S.filter(t=>t.type==="campaign"),R=S.filter(t=>t.type!=="campaign"),D=p.filter(t=>{const e=g.toLowerCase(),s=(t.ownerEntityRef?T.forEntity(t.ownerEntityRef):void 0)?.snapshot.primaryTitle?.toLowerCase()||"";return e===""||t.name.toLowerCase().includes(e)||t.ownerEntityRef?.toLowerCase().includes(e)||s.includes(e)}),F=R.filter(t=>{const e=g.toLowerCase(),s=(t.ownerEntityRef?T.forEntity(t.ownerEntityRef):void 0)?.snapshot.primaryTitle?.toLowerCase()||"";return e===""||t.name.toLowerCase().includes(e)||t.ownerEntityRef?.toLowerCase().includes(e)||s.includes(e)}),L=i(()=>[...D,...F],[D,F]),m=i(()=>[...p.map(t=>t.id),...R.map(t=>t.id)],[p,R]),{data:v,isLoading:nt,error:st,progress:o}=Pt({trackIds:m,groupRef:r||"",skip:!r||m.length===0}),{data:H,isLoading:h}=Bt(r,{includeParent:!0}),b=i(()=>{const t=new Map;return Array.isArray(v)&&v.forEach(e=>{e&&e.trackId&&t.set(e.trackId,e)}),t},[v]),ct=i(()=>{const t=new Map;return Array.isArray(C)&&C.forEach(e=>{e&&e.id&&t.set(e.id,e.applicableEntityCount)}),t},[C]),O=f&&!E&&!!r,j=E||st,I=m.length>0&&nt&&!j&&!!r,V=i(()=>({totalActiveTracksCampaigns:w}),[w]),z=i(()=>{if(I)return{numTeams:void 0,avgCompliance:void 0,totalCampaigns:void 0,totalTracks:void 0};let t=0,e=0,s=0,u=0;const n=new Set;return L.forEach(k=>{const c=b.get(k.id);if(c){c.status&&typeof c.status.allPassPercentage=="number"&&(t+=c.status.allPassPercentage,e++),c.groupRef&&n.add(c.groupRef);const B=[c];for(;B.length>0;){const dt=B.pop();for(const A of dt.children)n.has(A.groupRef)||(n.add(A.groupRef),B.push(A))}}Ft(c?.status)&&(k.type==="campaign"?s++:u++)}),{numTeams:n.size,avgCompliance:e>0?Math.round(t/e):0,totalCampaigns:s,totalTracks:u}},[L,b,I]),d=i(()=>{if(h)return{numEntities:void 0};const t=H?.[r];return{numEntities:Gt(t)}},[H,h,r]),mt=i(()=>({...V,...z,...d}),[V,z,d]),W=X(Mt),q=X($t),lt=wt(t=>{if(!r)return;const e=new URLSearchParams;e.set("group",r),e.set("node",r);const s=p.find(({id:n})=>n===t);let u=W({trackId:t});if(s){const n=N?.edges.find(({node:k})=>k.track.id===t)?.node.id;n&&(u=q({campaignId:n}))}G(`${u}?${e.toString()}`)},[r,G,p,N,q,W]),J=r?T.forEntity(r).snapshot.primaryTitle:void 0,P=i(()=>!o||o.totalTracks===0?0:o.loadedTracks/o.totalTracks*100,[o]),K=f&&r&&!E||I&&o&&o.totalTracks>0,Q=rt?.getLCPValue();Rt(()=>{if(!h&&!f&&(P===100||m.length===0)){const t=d.numEntities??0,e=m.length;$({lcp:Q,numberOfEntities:d.numEntities,entitiesBucket:Nt(t),numberOfTracks:m.length,tracksBucket:Dt(e)})}},[h,f,P,m.length,d.numEntities,$,Q]);const pt=a(jt,{summaryStats:mt,isLoading:O});return j?a(U,{mt:"6",children:a(Ht,{title:"No Tech Insights Data",body:"There was an error loading Tech Insights data."})}):x(ut,{children:[a(ht,{title:`${J?`${J}'s `:""}Tech Insights`,customActions:x(kt,{align:"center",gap:"3",children:[a(Ot,{hideSelected:!0}),a(yt,{isDisabled:Et(S),value:l,onChange:tt,placeholder:"Search tracks or campaigns",style:{minWidth:250},"aria-label":"Search"})]})}),x(Tt,{className:Y.container,children:[a(U,{style:{marginTop:0},children:pt}),K&&a(U,{style:{marginBottom:16},children:a(Ct,{variant:o&&o.totalTracks>0?"determinate":"indeterminate",value:o&&o.totalTracks>0?P:void 0,"data-testid":"batch-loading-indicator"})}),a(Vt,{tracks:L,trackStatusMap:b,trackCountsMap:ct,sortColumn:at,order:ot,handleSort:it,handleTrackClick:lt,isLoading:O||!!K,isSearch:!!l,activeTrackCount:w,hasGroupSelected:!!r})]})]})};export{Wt as TechInsightsPageBUI};
|
|
2
2
|
//# sourceMappingURL=TechInsightsPageBUI.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as r,jsxs as p,Fragment as A}from"react/jsx-runtime";import{useApi as $}from"@backstage/core-plugin-api";import{entityPresentationApiRef as j}from"@backstage/plugin-catalog-react";import{Table as D,TableHeader as F,Column as u,TableBody as H,Row as U,Flex as q,Box as
|
|
1
|
+
import{jsx as r,jsxs as p,Fragment as A}from"react/jsx-runtime";import{useApi as $}from"@backstage/core-plugin-api";import{entityPresentationApiRef as j}from"@backstage/plugin-catalog-react";import{Table as D,TableHeader as F,Column as u,TableBody as H,Row as U,Flex as q,Box as N,Text as G,CellText as x,CellProfile as O}from"@backstage/ui";import{makeStyles as Y}from"@material-ui/core";import{uniq as z,isEmpty as I,isNumber as v}from"lodash";import{useMemo as m}from"react";import{useProfileImages as J}from"../../hooks/catalog/useProfileImages.esm.js";import{getPercentage as y}from"../../utils/formatters.esm.js";import{showTrack as K}from"../../utils/tracks.esm.js";import{CustomCell as Q}from"../CustomCell/CustomCell.esm.js";import{DescriptionCell as V}from"../DescriptionCell/DescriptionCell.esm.js";import"../EmptyState/EmptyState.esm.js";import{EmptyStateBUI as W}from"../EmptyState/EmptyStateBUI.esm.js";import{EmptyStateNoTracks as B}from"../EmptyState/EmptyStateNoTracks.esm.js";import"@backstage/plugin-permission-react";import"@remixicon/react";import"@spotify/backstage-plugin-soundcheck-common";import"react-router-dom";import"../../routes.esm.js";import{LoadingTableSkeleton as L}from"../LoadingTableSkeleton/LoadingTableSkeleton.esm.js";import{StatusBar as X}from"../StatusBar/StatusBar.esm.js";const Z=Y(()=>({statusPercent:{width:"var(--bui-space-12)"},statusBar:{width:"100%"}})),_=({track:a,trackStatus:e,entitiesCount:h,handleTrackClick:w,profileImageMap:g})=>{const l=Z(),c=$(j).forEntity(a.ownerEntityRef),f=m(()=>a.levels.reduce((t,s)=>t+s.checks.length,0),[a.levels]),i=m(()=>(e?.passed??0)+(e?.failed??0)+(e?.warning??0)+(e?.error??0)+(e?.notReported??0)+(e?.exempt??0),[e]),k=m(()=>{let t;return e?.allPassPercentage!==null&&e?.allPassPercentage!==void 0?t=e.allPassPercentage:e&&(t=y(e.passed+e.exempt,i)),t},[e,i]),P=m(()=>y(e?.failed,i),[e,i]),C=m(()=>y(e?.warning,i),[e,i]),d=m(()=>y(e?.notReported,i),[e,i]),S=m(()=>y(e?.error,i),[e,i]),T=g[c.snapshot.entityRef];return p(U,{onAction:()=>{w(a.id)},children:[r(V,{title:a.name??a.id,description:a.description??"",onClick:()=>w(a.id)}),r(Q,{children:p(q,{align:"center",gap:"2",children:[r(N,{className:l.statusPercent,children:p(G,{children:[k,"%"]})}),r(N,{className:l.statusBar,children:r(X,{passedPercent:k,failedPercent:P,warningPercent:C,notReportedPercent:d,errorPercent:S})})]})}),r(x,{title:a.type==="campaign"?"Campaign":"Track"}),r(x,{title:v(f)?`${f} Check${f===1?"":"s"}`:"N/A"}),r(x,{title:v(h)?`${h} ${h===1?"Entity":"Entities"}`:"N/A"}),r(O,{name:c.snapshot.primaryTitle,src:T??c.snapshot.primaryTitle})]})},ee=({order:a,sortColumn:e,handleSort:h,handleTrackClick:w,tracks:g,trackStatusMap:l,trackCountsMap:c,isSearch:f,isLoading:i,activeTrackCount:k,hasGroupSelected:P})=>{const C=m(()=>[...g].filter(t=>K(l.get(t.id)?.status)).sort((t,s)=>{const b=l.get(t.id),M=l.get(s.id);let o,n;switch(e){case"name":o=t.name?.toLowerCase()||"",n=s.name?.toLowerCase()||"";break;case"type":o=t.type||"",n=s.type||"";break;case"owner":o=t.ownerEntityRef?.toLowerCase()||"",n=s.ownerEntityRef?.toLowerCase()||"";break;case"compliance":o=b?.status?.allPassPercentage??null,n=M?.status?.allPassPercentage??null;break;case"checks":o=t.levels.reduce((R,E)=>R+E.checks.length,0),n=s.levels.reduce((R,E)=>R+E.checks.length,0);break;case"entities":o=c.get(t.id)??0,n=c.get(s.id)??0;break;default:return 0}return typeof o=="number"&&typeof n=="number"?a==="asc"?o-n:n-o:typeof o=="number"&&n===null?-1:o===null&&typeof n=="number"?1:typeof o=="string"&&typeof n=="string"?a==="asc"?o.localeCompare(n):n.localeCompare(o):0}),[g,l,e,c,a]),d=m(()=>C.map(t=>{const s=l.get(t.id)?.status,b=c.get(t.id)??0;return{track:t,trackStatus:s,entitiesCount:b}}),[C,c,l]),S=z(d.map(t=>t.track.ownerEntityRef)),{profileImageMap:T}=J(S);return!i&&I(g)?P?f&&k>0?r(W,{title:"No tracks or campaigns found.",body:"Your current search term did not return any tracks or campaigns. Please try a different search term. "}):r(B,{title:k>0?"No applicable tracks found for the selected group":void 0}):r(B,{title:"Select a group or create a new track"}):p(A,{children:[p(D,{sortDescriptor:{column:e,direction:a==="asc"?"ascending":"descending"},onSortChange:t=>h(t.column),children:[p(F,{children:[r(u,{id:"name",allowsSorting:!0,isRowHeader:!0,style:{width:"43%"},children:"Name"}),r(u,{id:"compliance",allowsSorting:!0,style:{width:"12%"},children:"Compliance"}),r(u,{id:"type",allowsSorting:!0,style:{width:"10%"},children:"Type"}),r(u,{id:"checks",allowsSorting:!0,style:{width:"10%"},children:"Checks"}),r(u,{id:"entities",allowsSorting:!0,style:{width:"10%"},children:"Entities"}),r(u,{id:"owner",allowsSorting:!0,style:{width:"15%"},children:"Track Owner"})]}),r(H,{children:d.map(t=>r(_,{handleTrackClick:w,profileImageMap:T??{},...t},t.track.id))})]}),I(d)&&i&&r(L,{rowCount:10}),!I(d)&&i&&r(L,{rowCount:4})]})};export{ee as TechInsightsTableBUI};
|
|
2
2
|
//# sourceMappingURL=TechInsightsTableBUI.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as t,jsxs as m,Fragment as B}from"react/jsx-runtime";import{useRouteRef as P}from"@backstage/core-plugin-api";import{Table as
|
|
1
|
+
import{jsx as t,jsxs as m,Fragment as B}from"react/jsx-runtime";import{useRouteRef as P}from"@backstage/core-plugin-api";import{Table as E,TableHeader as k,Column as f,TableBody as v,TablePagination as C,Row as N,CellProfile as O,CellText as M,Flex as D,Box as w,Text as L}from"@backstage/ui";import{makeStyles as $}from"@material-ui/core";import{sortBy as j}from"lodash";import{useMemo as u}from"react";import{useNavigate as F,createSearchParams as H}from"react-router-dom";import"@backstage/catalog-model";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"@spotify/backstage-plugin-soundcheck-common";import"../../hooks/useSoundcheckAlert.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{useSearchName as z}from"../../hooks/useSearchName.esm.js";import{usePagination as A}from"../../hooks/usePagination.esm.js";import{useSortTableLocalStorage as G}from"../../hooks/useSortTableLocalStorage.esm.js";import{useProfileImages as Q}from"../../hooks/catalog/useProfileImages.esm.js";import{trackOverviewRouteRef as U,campaignOverviewRouteRef as V}from"../../routes.esm.js";import{CustomCell as W}from"../CustomCell/CustomCell.esm.js";import"../EmptyState/EmptyState.esm.js";import{EmptyStateBUI as X}from"../EmptyState/EmptyStateBUI.esm.js";import"@backstage/plugin-permission-react";import"@remixicon/react";import{LoadingTableSkeleton as q}from"../LoadingTableSkeleton/LoadingTableSkeleton.esm.js";import{StatusBar as J}from"../StatusBar/StatusBar.esm.js";const y=10,K=(e,s=[])=>{const o=[],i=r=>{!r.children||r.children.length===0?r.numberOfEntities>0&&o.push(r):(s.includes(r.entityRef)&&r.numberOfEntities>0&&o.push(r),r.children.forEach(c=>i(c)))};return i(e),o},Y=$(()=>({statusPercent:{width:"var(--bui-space-12)"},statusBar:{width:"100%"}})),Z=({row:e,profileImageMap:s,trackId:o,campaignId:i})=>{const r=Y(),c=P(U),l=P(V),n=F();return m(N,{onAction:()=>{o&&n({pathname:i?l({campaignId:i}):c({trackId:o}),search:`?${H({owners:[e.entityRef]})}`})},children:[t(O,{name:e.name,src:s[e.entityRef]??e.name}),t(M,{title:`${e.numberOfEntities} ${e.numberOfEntities===1?"entity":"entities"}`}),t(W,{children:m(D,{align:"center",gap:"2",children:[t(w,{className:r.statusPercent,children:m(L,{children:[e.passPercentage,"%"]})}),t(w,{className:r.statusBar,children:t(J,{passedPercent:e.passPercentage,failedPercent:e.failPercentage,warningPercent:e.warningPercentage,notReportedPercent:e.notReportedPercentage,errorPercent:e.errorPercentage})})]})})]})},_=({tableData:e,isLoading:s,trackId:o,selectedGroup:i,searchValue:r,campaignId:c})=>{const{order:l,orderBy:n,handleSort:S}=G({localStoragePrefix:"soundcheck-tech-insights-explorer",defaultSortBy:"entities",defaultDirection:"desc"}),p=u(()=>e?K(e,i?[i]:[]):[],[i,e]),h=z({items:p,searchTerm:r}),d=u(()=>{const a=j(h??[],g=>n==="name"?g.name:n==="passPercentage"?g.passPercentage:n==="entities"?g.numberOfEntities:0);return l==="desc"&&a.reverse(),a},[h,l,n]),b=u(()=>p.map(a=>a.entityRef),[p]),{paginatedItems:I,paginationProps:R}=A({pageParam:"perPage",defaultPageSize:y,items:d}),T=d.length>y,{profileImageMap:x}=Q(b);return s?t(q,{rowCount:10}):!s&&!d.length?t(X,{title:"No groups found",body:"No groups found for the current selection."}):m(B,{children:[m(E,{sortDescriptor:{column:n,direction:l==="asc"?"ascending":"descending"},onSortChange:a=>S(a.column),children:[m(k,{children:[t(f,{allowsSorting:!0,id:"name",isRowHeader:!0,style:{width:"75%"},children:"Name"}),t(f,{allowsSorting:!0,id:"entities",style:{width:"10%"},children:"Entities"}),t(f,{allowsSorting:!0,id:"passPercentage",style:{width:"15%"},children:"Compliance"})]}),t(v,{children:I.map(a=>t(Z,{profileImageMap:x??{},row:a,trackId:o,campaignId:c},a.entityRef))})]}),T&&t(C,{...R})]})};export{_ as TechInsightsExplorerTable};
|
|
2
2
|
//# sourceMappingURL=TechInsightsExplorerTable.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as g}from"react/jsx-runtime";import{useApi as d,configApiRef as h}from"@backstage/core-plugin-api";import{useMemo as S,useEffect as G,useCallback as R}from"react";import{useSearchParams as v}from"react-router-dom";import w from"react-use/lib/useLocalStorage";import{useGroupOptions as P}from"../../hooks/groups/useGroupOptions.esm.js";import{GroupSelectorBUI as k}from"../GroupSelectorBUI/GroupSelectorBUI.esm.js";import{usePreviousSelectedGroups as L}from"../GroupSelectorBUI/usePreviousSelectedGroups.esm.js";const U=({onChange:i})=>{const{options:r,isLoading:u}=P(),[t,p]=v(),[c,s]=w("soundcheck.overview.groupRef",null),n=t.get("group"),m=d(h).getOptionalString("soundcheck.overview.defaultSelectedGroupType"),{addGroup:a}=L(),o=S(()=>{if(!u&&r.length){if(n||c){const e=n??c;return r.find(f=>f.ref===e)??r[0]}else if(m)return r.find(e=>e.type===m)??r[0];return r[0]}return null},[m,u,r,n,c]);G(()=>{if(!u&&r.length&&!n&&o){const e=new URLSearchParams(t.toString());e.set("group",o.ref),p(e,{replace:!0}),s(o.ref),i?.(o.ref),a(o.ref)}},[u,r,n,o,t,p,s]);const l=R(e=>{const f=new URLSearchParams(t.toString());f.set("group",e),p(f),s(e),i?.(e),a(e)},[a,i,t,s,p]);return g(k,{selectedGroupRef:o?.ref,updateGroupRef:l})};export{U as TechInsightsGroupSelector};
|
|
2
2
|
//# sourceMappingURL=TechInsightsGroupSelector.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as i,jsxs as m,Fragment as O}from"react/jsx-runtime";import{useRouteRef as j}from"@backstage/core-plugin-api";import{Table as $,TableHeader as A,Column as f,TableBody as H,Row as M,CellText as h,TablePagination as U}from"@backstage/ui";import{makeStyles as V}from"@material-ui/core";import{sortBy as z}from"lodash";import{useState as S,useEffect as W,useCallback as q,useMemo as b}from"react";import{CircularProgressbar as G}from"react-circular-progressbar";import{useNavigate as J}from"react-router-dom";import"@backstage/catalog-model";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"@spotify/backstage-plugin-soundcheck-common";import"../../hooks/useSoundcheckAlert.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{usePagination as K}from"../../hooks/usePagination.esm.js";import"react-use/lib/useLocalStorage";import{useSortSearchParams as Q}from"../../hooks/useSortSearchParams.esm.js";import{trackCheckDetailsRouteRef as X}from"../../routes.esm.js";import{getPercentage as P}from"../../utils/formatters.esm.js";import"../EmptyState/EmptyState.esm.js";import{EmptyStateBUI as Y}from"../EmptyState/EmptyStateBUI.esm.js";import"@backstage/plugin-permission-react";import"@remixicon/react";import{LoadingTableSkeleton as Z}from"../LoadingTableSkeleton/LoadingTableSkeleton.esm.js";const _=V(()=>({customCell:{padding:"0 var(--bui-space-3)"},circularProgressBg:{color:"var(--bui-fg-secondary)",opacity:.25},circularProgressOverlay:{position:"absolute",left:0,color:"var(--bui-fg-danger)"},circularProgressbar:{width:"var(--bui-space-7)"}})),w=10,ee=["compliance","name","failures"],d=o=>ee.includes(o),re=({track:o,checkStatuses:n,certificationStatus:c,searchValue:u})=>{const y=_(),{updateSortParams:k,searchParams:a}=Q(),[p,v]=S(()=>{const e=a.get("sortDirection");return e==="ascending"||e==="descending"?e:"descending"}),[l,C]=S(()=>{const e=a.get("sort");return e&&d(e)?e:"compliance"}),T=j(X),I=J();W(()=>{const e=a.get("sortDirection");(e==="ascending"||e==="descending")&&v(e);const r=a.get("sort");r&&d(r)&&C(r)},[a]);const R=q(({direction:e,column:r})=>{const t=String(r);d(t)&&C(t),v(e),k({sort:d(t)?t:"compliance",sortDirection:e})},[k]),s=b(()=>!o.levels||!n?[]:o.levels.flatMap(e=>e.checks.map(r=>{const t=n.find(({id:N})=>N===r.id),F=t?t.numberOfEntities-t.notApplicable-t.exempt:0,L=t?.failed??0;return{check:r,failedCount:L,applicableCount:F}}).filter(({failedCount:r})=>r>0)),[o.levels,n]),g=b(()=>{if(!u?.length)return s;const e=u.toLowerCase();return s.filter(({check:r})=>r.name.toLowerCase().includes(e))},[s,u]),B=b(()=>{const e=z([...g],r=>l==="compliance"?P(r.failedCount,c?.numberOfEntities??0):l==="failures"?r.failedCount:r.check.name.toLowerCase());return p==="descending"&&e.reverse(),e},[g,p,l,c]),{paginatedItems:D,paginationProps:E}=K({pageParam:"perPage",defaultPageSize:w,items:B}),x=o.levels.length>w;return n===void 0||c===void 0?i(Z,{}):!s.length||!g.length?i(Y,{title:"No failing checks",body:"There are no failing checks found."}):m(O,{children:[m($,{onSortChange:R,sortDescriptor:{direction:p,column:l},children:[m(A,{children:[i(f,{id:"compliance",allowsSorting:!0,style:{width:"8%"},children:"Compliance"}),i(f,{id:"name",allowsSorting:!0,isRowHeader:!0,style:{width:"72%"},children:"Name"}),i(f,{id:"failures",allowsSorting:!0,style:{width:"20%"},children:"Failures"})]}),i(H,{children:D.map(({check:e,failedCount:r})=>{const t=P(r,c.numberOfEntities);return m(M,{onAction:()=>I(T({trackId:o.id,checkId:e.id})),children:[i(h,{leadingIcon:i("div",{className:y.circularProgressbar,title:`${t}%`,children:i(G,{value:t,strokeWidth:12,styles:{path:{stroke:"var(--bui-fg-danger)"},trail:{stroke:'rgba(var("--bui-fg-secondary"), 0.25)'}}})}),title:`${t}%`}),i(h,{title:e.name}),i(h,{title:`${new Intl.NumberFormat().format(r??0)} failing`})]},e.id)})})]}),x&&i(U,{...E})]})};export{re as TopFailingChecksTableBUI};
|
|
2
2
|
//# sourceMappingURL=TopFailingChecksTableBUI.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as
|
|
1
|
+
import{jsxs as p,Fragment as n,jsx as r}from"react/jsx-runtime";import{useRouteRef as f}from"@backstage/core-plugin-api";import{HeaderPage as u}from"@backstage/ui";import{useEffect as k}from"react";import{TrackFormProvider as d,useTrackFormContext as l}from"../../contexts/TrackFormContext.esm.js";import"../../contexts/CheckFormContext.esm.js";import"../../contexts/CampaignFormContext.esm.js";import"../../contexts/UserProvider.esm.js";import"@backstage/catalog-model";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"@spotify/backstage-plugin-soundcheck-common";import"../../hooks/useSoundcheckAlert.esm.js";import{useCreateTrack as g}from"../../hooks/tracks/useCreateTrack.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{useNavigateBack as T}from"../../hooks/useNavigateBack.esm.js";import"react-router-dom";import"react-use/lib/useLocalStorage";import{tracksPageRouteRef as e}from"../../routes.esm.js";import{DocLinkButton as h}from"../DocLinkButton/DocLinkButton.esm.js";import{TrackForm as C}from"../TrackForm/TrackForm.esm.js";const m=()=>{const{setIsLoading:o}=l(),{mutateAsync:i,isLoading:t}=g();k(()=>{o(t)},[o,t]);const[a,c]=T(e);return r(C,{handleClose:a,onSave:async s=>{await i(s,{onSuccess:c})}})},b=()=>{const o=f(e);return p(n,{children:[r(u,{title:"Create Track",breadcrumbs:[{label:"All Tracks",href:o()}],customActions:r(h,{href:"https://backstage.spotify.com/docs/plugins/soundcheck/core-concepts/tracks/"})}),r(d,{children:r(m,{})})]})};export{b as TrackCreatePage,m as TrackCreateView};
|
|
2
2
|
//# sourceMappingURL=TrackCreatePage.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as
|
|
1
|
+
import{jsxs as n,Fragment as d,jsx as r}from"react/jsx-runtime";import{useRouteRef as s}from"@backstage/core-plugin-api";import{usePermission as f}from"@backstage/plugin-permission-react";import{HeaderPage as k}from"@backstage/ui";import{soundcheckTrackUpdatePermission as l}from"@spotify/backstage-plugin-soundcheck-common";import{useParams as u}from"react-router-dom";import{TrackFormProvider as g}from"../../contexts/TrackFormContext.esm.js";import"../../contexts/CheckFormContext.esm.js";import"../../contexts/CampaignFormContext.esm.js";import"react";import"../../contexts/UserProvider.esm.js";import"@backstage/catalog-model";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"../../hooks/useSoundcheckAlert.esm.js";import{useTrack as h}from"../../hooks/tracks/useTrack.esm.js";import"../../hooks/useConfirmationModal.esm.js";import"react-use/lib/useLocalStorage";import{trackDetailsRouteRef as P,tracksPageRouteRef as R}from"../../routes.esm.js";import{DocLinkButton as T}from"../DocLinkButton/DocLinkButton.esm.js";import{LoadingIndicator as b}from"../LoadingIndicator/LoadingIndicator.esm.js";import{PageWarningMessage as E}from"../PageWarningMessage/PageWarningMessage.esm.js";import{TrackEditView as w}from"./TrackEditView.esm.js";const I=()=>{const{trackId:o}=u(),{data:t,isLoading:i}=h(o),{loading:e,allowed:m}=f({permission:l,resourceRef:o}),a=m&&t?.isEditable,c=s(P),p=s(R);return n(d,{children:[r(k,{title:`Edit ${t?.name??o??"Track"}`,breadcrumbs:[{label:"All Tracks",href:p()},{label:"Details",href:c({trackId:o??""})}],customActions:r(T,{href:"https://backstage.spotify.com/docs/plugins/soundcheck/core-concepts/tracks/"})}),r(E,{entityName:"track",entityId:o,showNotFound:!i&&!t,showCannotEdit:!e&&!a}),i||e?r(b,{}):t&&a&&r(g,{children:r(w,{track:t,canEdit:m})})]})};export{I as TrackEditPage};
|
|
2
2
|
//# sourceMappingURL=TrackEditPage.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as
|
|
1
|
+
import{jsxs as s,jsx as e}from"react/jsx-runtime";import{makeStyles as $,Box as c,Typography as F,Button as y}from"@material-ui/core";import{get as N}from"lodash";import{useMemo as A,useCallback as C}from"react";import{useFormContext as B,useFieldArray as w}from"react-hook-form";import{CheckSelection as T}from"../../../CheckSelection/CheckSelection.esm.js";import{CheckPreview as L}from"../../../CheckSelection/CheckPreview.esm.js";import{CheckPreviewProvider as P}from"../../../CheckSelection/CheckPreviewContext.esm.js";import{FormControlledTextField as b}from"../../../FormControlledTextField/FormControlledTextField.esm.js";import{FormFieldLabel as v}from"../../../FormFieldLabel/FormFieldLabel.esm.js";const W=$(t=>({levelStep:{display:"flex",gap:t.spacing(2),maxHeight:"80vh",marginBottom:t.spacing(2)},actionButton:{color:t.palette.text.primary,padding:t.spacing(.25,0),margin:t.spacing(0,.5)}})),j=({idx:t,allSelectedCheckIds:m,sectionCheckIds:r,updateAll:d})=>{const{control:f,watch:k,formState:{errors:u}}=B(),{append:n,remove:h}=w({control:f,name:`levelsStep.levels.${t}.checks`}),g=k(`levelsStep.levels.${t}.checks`),p=N(u,`levelsStep.levels.${t}.checks`),o=C(l=>{l&&!r.includes(l.id)&&(m.includes(l.id)&&d(l.id,t),n({id:l.id,name:l.name??"",description:l.description??""}))},[m,n,t,r,d]),i=C(l=>{const a=r.indexOf(l);a>-1&&h(a)},[h,r]);return s(c,{children:[e(v,{title:"Checks"}),e(T,{currentSectionCheckIds:r,selectedChecks:g,addCheckToSelection:o,removeCheck:i,error:!!p,helperText:p?.message,blankText:"Search checks to add them to this level. Checks used in another level will be automatically moved if selected."})]})},z=()=>{const t=W(),{watch:m,control:r,setValue:d}=B(),{insert:f,remove:k,fields:u}=w({control:r,name:"levelsStep.levels"}),n=m("levelsStep.levels"),h=A(()=>n.flatMap(o=>o.checks.map(i=>i.id)),[n]),g=o=>{f(o+1,{name:`Level ${o+2}`,description:"",checks:[]})},p=C((o,i)=>{let l=0;for(const a of n){const S=a.checks;if(S.findIndex(x=>x.id===o)>-1&&l!==i){const x=S.filter(I=>I.id!==o);d(`levelsStep.levels.${l}.checks`,x)}l++}},[d,n]);return s(c,{children:[e(c,{marginBottom:2,children:e(F,{variant:"body2",children:"Add the checks to your track by selecting them from the autocomplete. You can preview the checks to see its properties."})}),e(P,{children:s(c,{className:t.levelStep,children:[e(c,{flex:1,minWidth:300,display:"flex",flexDirection:"column",overflow:"auto",paddingRight:2,children:u.map((o,i)=>{const l=n[i].checks.map(a=>a.id);return s(c,{marginBottom:2,children:[s(c,{marginBottom:1,children:[e(v,{title:"Level Name"}),s(c,{display:"flex",alignItems:"center",children:[e(b,{control:r,name:`levelsStep.levels.${i}.name`,fullWidth:!0}),e(y,{className:t.actionButton,variant:"text",size:"small",onClick:()=>g(i),children:"Add"}),e(y,{className:t.actionButton,disabled:n.length<2,variant:"text",size:"small",onClick:()=>k(i),"data-testid":`remove-label-${i}`,children:"Remove"})]})]}),s(c,{marginBottom:1,children:[e(v,{title:"Description"}),e(c,{display:"flex",alignItems:"center",children:e(b,{control:r,name:`levelsStep.levels.${i}.description`,fullWidth:!0})})]}),e(j,{allSelectedCheckIds:h,sectionCheckIds:l,idx:i,updateAll:p})]},o.id)})}),s(c,{flex:1,marginBottom:2,children:[e(v,{title:"Check Preview"}),e(L,{})]})]})})]})};export{z as LevelsStepNew};
|
|
2
2
|
//# sourceMappingURL=LevelsStepNew.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{Content as d}from"@backstage/core-components";import{FormProvider as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{Content as d}from"@backstage/core-components";import{FormProvider as c}from"react-hook-form";import{useTrackFormContext as f}from"../../contexts/TrackFormContext.esm.js";import"../../contexts/CheckFormContext.esm.js";import"../../contexts/CampaignFormContext.esm.js";import"react";import"../../contexts/UserProvider.esm.js";import{formStyles as S}from"../../utils/formStyles.esm.js";import{FormFilterSection as u}from"../FormFilterSection/FormFilterSection.esm.js";import{FormStepper as h}from"../FormStepper/FormStepper.esm.js";import{LevelsStepNew as b}from"./Steps/LevelsStep/LevelsStepNew.esm.js";import{TrackDetailsStep as F}from"./Steps/TrackDetailsStep/TrackDetailsStep.esm.js";import{TrackStepNameMapping as g}from"./utils/types.esm.js";import"./utils/validation.esm.js";import{TRACK_FIELDS as k}from"./utils/trackFormUtils.esm.js";import{useTrackForm as T}from"./utils/useTrackForm.esm.js";const v=({onSave:m,handleClose:n})=>{const{selectedItem:l,isLoading:a,isReadOnly:r}=f(),p=S(),{formMethods:t,onSubmit:o}=T(m),i=[{label:"Enter track details",content:()=>e(F,{})},{label:"Add levels",content:()=>e(b,{})},{label:"Choose the affected entities (Optional)",content:()=>e(u,{includeFilterName:"filtersStep.include",excludeFilterName:"filtersStep.exclude",disabled:r,description:k.filter.description})}],s=l?[...Array(i.length).keys()]:[0];return e(d,{className:p.formWrapper,children:e(c,{...t,children:e("form",{onSubmit:t.handleSubmit(o),children:e(h,{onClose:n,handleSubmit:t.handleSubmit,trigger:t.trigger,onSubmit:o,initialVisited:s,stepNameMap:g,steps:i,isLoading:a,isReadOnly:r,saveButtonText:"Save Track"})})})})};export{v as TrackForm};
|
|
2
2
|
//# sourceMappingURL=TrackForm.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{zodResolver as
|
|
1
|
+
import{zodResolver as y}from"@hookform/resolvers/zod";import{useMemo as k,useEffect as R}from"react";import{useForm as T}from"react-hook-form";import{v4 as F}from"uuid";import{useTrackFormContext as g}from"../../../contexts/TrackFormContext.esm.js";import"../../../contexts/CheckFormContext.esm.js";import"../../../contexts/CampaignFormContext.esm.js";import"react/jsx-runtime";import{useLoggedInUser as h}from"../../../contexts/UserProvider.esm.js";import{BadgeVariant as E}from"../../../graphql/generated/index.esm.js";import"@backstage/catalog-model";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"../../../api.esm.js";import"../../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"@spotify/backstage-plugin-soundcheck-common";import"../../../hooks/useSoundcheckAlert.esm.js";import{useConfirmationModal as w}from"../../../hooks/useConfirmationModal.esm.js";import"react-router-dom";import"react-use/lib/useLocalStorage";import{useGetChecksMap as L}from"../../../hooks/tracks/useGetChecksMap.esm.js";import{mapInputFilterToFormFilters as l,mapFiltersToCatalogFilter as c}from"../../Filter/utils.esm.js";import"../../Filter/FilterComponent.esm.js";import{emptyFilters as f}from"../../Filter/types.esm.js";import{trackFormSchema as M}from"./validation.esm.js";const u={detailsStep:{name:"",description:"",ownerEntityRef:"",badgeType:"status",draft:!1},levelsStep:{levels:[{name:"Level 1",description:"",checks:[]}]},filtersStep:{include:[f()],exclude:[f()]}},S=({name:e,description:i,ownerEntityRef:a,filter:r,levels:n,documentationURL:t,badge:p,exclude:o,draft:s})=>({detailsStep:{name:e,ownerEntityRef:a,description:i??"",documentationURL:t??void 0,badgeType:p?.variant===E.Status?"status":"medal",draft:s??!1},levelsStep:{levels:n?.map(m=>({name:m.name??(m.ordinal?`Level ${m.ordinal}`:"Level 1"),description:m.description??"",checks:m.checks.map(d=>({id:d.id,name:d.name??d.id,description:d.description??""}))}))||[]},filtersStep:{include:l(r),exclude:l(o)}}),v=(e,i,a)=>({id:a?.id??F(),ownerEntityRef:e.detailsStep.ownerEntityRef,description:e.detailsStep.description,name:e.detailsStep.name,documentationURL:e.detailsStep.documentationURL??"",badgeType:e.detailsStep.badgeType,type:a?.type??"standard",levels:e.levelsStep.levels?.map((r,n)=>({ordinal:n+1,name:r.name??"",description:r.description??"",checks:r.checks.map(t=>{const p=i[t.id];if(p)return p;const o=a?.levels.flatMap(s=>s.checks).find(s=>s.id===t.id);return o?{id:o.id,name:o.name??t.name,description:o.description??t.description}:{id:t.id,name:t.name,description:t.description}})})),filter:c(e.filtersStep.include),exclude:c(e.filtersStep.exclude),draft:e.detailsStep.draft??!1}),x=e=>{const{selectedItem:i}=g(),a=k(()=>i?S(i):u,[i]),r=T({defaultValues:a,mode:"onChange",resolver:y(M)}),{userEntityRef:n}=h();R(()=>{!i&&n&&!r.getValues("detailsStep.ownerEntityRef")&&r.setValue("detailsStep.ownerEntityRef",n)},[i,n,r]);const{checksMap:t}=L(),{showModal:p}=w();return{formMethods:r,onSubmit:async o=>{if(!await p({title:"Save Track",message:`Are you sure you want to save track: ${o.detailsStep.name}?`,error:!1}))return;const s=v(o,t??{},i);e(s)}}};export{u as DEFAULT_TRACK_FORM_VALUES,v as mapTrackFormToInput,S as mapTrackToFormValues,x as useTrackForm};
|
|
2
2
|
//# sourceMappingURL=useTrackForm.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as t,jsxs as
|
|
1
|
+
import{jsx as t,jsxs as h,Fragment as pe}from"react/jsx-runtime";import{stringifyEntityRef as $,parseEntityRef as ge,RELATION_OWNED_BY as me,RELATION_PART_OF as ue}from"@backstage/catalog-model";import{useRouteRef as ye}from"@backstage/core-plugin-api";import{entityRouteRef as he,getEntityRelations as q,humanizeEntityRef as N}from"@backstage/plugin-catalog-react";import{Table as we,TableHeader as Se,Column as f,TableBody as ke,TablePagination as Pe,Row as Ie,Flex as J,CellText as T,Box as Q,Text as Re,CellProfile as Ee}from"@backstage/ui";import{makeStyles as Te}from"@material-ui/core";import{compact as Ce,uniq as Be}from"lodash";import{useState as z,useMemo as o,useEffect as W,useCallback as A}from"react";import{useNavigate as be}from"react-router-dom";import{TrackEntityField as c,Direction as l}from"../../../graphql/generated/index.esm.js";import{useEntitiesByRefs as ve}from"../../../hooks/catalog/useEntitiesByRefs.esm.js";import{useProfileImages as xe}from"../../../hooks/catalog/useProfileImages.esm.js";import{useTrackEntities as De}from"../../../hooks/entities/useTrackEntities.esm.js";import{useSortSearchParams as Ne}from"../../../hooks/useSortSearchParams.esm.js";import{getPercentage as P}from"../../../utils/formatters.esm.js";import{getTrackStatusTotal as ze}from"../../../utils/tracks.esm.js";import{CertificationBadge as Ae}from"../../Badges/CertificationBadge.esm.js";import{CustomCell as X}from"../../CustomCell/CustomCell.esm.js";import"../../EmptyState/EmptyState.esm.js";import{EmptyStateBUI as Le}from"../../EmptyState/EmptyStateBUI.esm.js";import"@backstage/plugin-permission-react";import"@remixicon/react";import"@spotify/backstage-plugin-soundcheck-common";import"../../../routes.esm.js";import{LoadingTableSkeleton as Oe}from"../../LoadingTableSkeleton/LoadingTableSkeleton.esm.js";import{StatusBar as Fe}from"../../StatusBar/StatusBar.esm.js";import{toTrackEntityRow as Ke}from"./utils.esm.js";const Y=10,Z=p=>{const{lifecycles:g,owners:m,types:u,systems:y}=p,w=g?.length?{"spec.lifecycle":g}:void 0,C=m?.length?{"relations.ownedBy":m}:void 0,I=u?.length?{"spec.type":u}:void 0,R=y?.length?{"relations.partOf":y}:void 0;return{...w,...C,...I,...R}},_e=Te(()=>({tableContainer:{display:"flex",flexDirection:"column",height:"100%"},statusPercent:{width:"var(--bui-space-12)"},statusBar:{width:"100%"}})),L={name:c.Name,owner:c.Owner,certificationLevel:c.CertificationLevel,checkPassRate:c.CheckPassRate,system:c.System,type:c.Type,lifecycle:c.Lifecycle},je=({track:p,lifecycles:g,owners:m,types:u,systems:y,certificationStatus:w,isCampaign:C})=>{const I=_e(),R=be(),{updateSortParams:O,searchParams:S}=Ne(),F=ye(he),[B,K]=z(()=>{const e=S.get("sortDirection");return e==="ascending"?l.Asc:e==="descending"?l.Desc:l.Asc}),[E,_]=z(()=>{const e=S.get("sort");return e&&L[e]?e:"name"}),G=B===l.Asc?"ascending":"descending",[r,b]=z({orderBy:{field:c.CheckPassRate,direction:l.Desc},filter:Z({lifecycles:g,owners:m,types:u,systems:y}),pageInfo:{page:0,pageSize:Y,direction:"forward",cursor:null}}),{data:d,isLoading:V}=De({trackId:p?.id??"",orderBy:r.orderBy,filter:r.filter,[r.pageInfo.direction==="forward"?"first":"last"]:r.pageInfo.pageSize,[r.pageInfo.direction==="forward"?"after":"before"]:r.pageInfo.cursor,certificationStatus:w}),k=o(()=>d?.trackEntities.edges??[],[d]),ee=o(()=>d?.trackEntities.totalCount??0,[d])>Y,te=k.map(e=>e.node.entityRef)??[],{data:v,isLoading:ie}=ve({entityRefs:te}),j=o(()=>!p||!k?.length||!v?.items?.length?[]:Ce(k.map(e=>{const i=v.items.find(n=>!!n&&$(n)===e.node.entityRef);return i?Ke({trackDetails:e.node,track:p,entity:i}):void 0})),[k,v?.items,p]),re=Be(j.flatMap(e=>e.entity.relations?.filter(({type:i,targetRef:n})=>i==="ownedBy"&&n).map(i=>i.targetRef)||[])),{profileImageMap:ne}=xe(re);W(()=>{const e=S.get("sortDirection");(e==="ascending"||e==="descending")&&K(e==="ascending"?l.Asc:l.Desc);const i=S.get("sort");i&&L[i]&&_(i)},[S]),W(()=>{let e;E?e={field:L[E]??c.Name,direction:B}:e=void 0,b(i=>({...i,pageInfo:{...i.pageInfo,page:0,cursor:null},orderBy:e,filter:Z({lifecycles:g,owners:m,types:u,systems:y}),certificationStatus:w}))},[b,E,B,w,g,m,y,u]);const ae=A(e=>{const i=ge($(e)),n=F(i);R(`${n}/soundcheck`)},[R,F]),x=A((e,i)=>{const n=e>r.pageInfo.page?"forward":"backward",D=n==="forward"?d?.trackEntities.pageInfo.endCursor??null:d?.trackEntities.pageInfo.startCursor??null;b({...r,pageInfo:{page:e,pageSize:i,direction:n,cursor:D}})},[d,r]),se=A(({direction:e,column:i})=>{_(String(i)),K(e==="ascending"?l.Desc:l.Asc),O({sort:String(i),sortDirection:e})},[O]),oe=({row:e})=>{const i=q(e.entity,me).map(s=>N(s,{defaultKind:s.kind})).join(", "),n=e.entity.relations?.find(({type:s})=>s==="ownedBy")?.targetRef,D=q(e.entity,ue,{kind:"system"}).map(s=>N(s,{defaultKind:"system"})).join(", ");let M;n&&(M=ne?.[n]);const H=N(e.entity,{defaultKind:e.entity.kind}),a=o(()=>ze(e.status),[e.status]),U=o(()=>{let s;return e.status?.allPassPercentage!==null&&e.status?.allPassPercentage!==void 0?s=e.status.allPassPercentage:e.status&&(s=P(e.status.passed+e.status.exempt,a)),s},[e.status,a]),ce=o(()=>P(e.status?.failed,a),[e.status,a]),le=o(()=>P(e.status?.warning,a),[e.status,a]),de=o(()=>P(e.status?.notReported,a),[e.status,a]),fe=o(()=>P(e.status?.error,a),[e.status,a]);return h(Ie,{onAction:()=>ae(e.entity),children:[t(X,{children:t(J,{children:t(Ae,{badge:e.badge,trackType:C?"campaign":void 0})})}),t(T,{title:H}),t(X,{children:h(J,{align:"center",gap:"2",children:[t(Q,{className:I.statusPercent,children:h(Re,{children:[U,"%"]})}),t(Q,{className:I.statusBar,children:t(Fe,{passedPercent:U,failedPercent:ce,warningPercent:le,notReportedPercent:de,errorPercent:fe})})]})}),t(T,{title:D}),t(T,{title:e.entity.spec?.type}),t(T,{title:e.entity.spec?.lifecycle}),t(Ee,{name:i,src:M??H})]},e.id)};return V||ie?t(Oe,{}):k.length?h(pe,{children:[h(we,{onSortChange:se,sortDescriptor:{direction:G,column:E},children:[h(Se,{children:[t(f,{id:"state",style:{width:"5%"}}),t(f,{id:"name",allowsSorting:!0,isRowHeader:!0,style:{width:"25%"},children:"Name"}),t(f,{id:"checkPassRate",style:{width:"15%"},children:"Checks"}),t(f,{id:"system",allowsSorting:!0,style:{width:"20%"},children:"System"}),t(f,{id:"type",allowsSorting:!0,style:{width:"10%"},children:"Type"}),t(f,{id:"lifecycle",allowsSorting:!0,style:{width:"10%"},children:"Lifecycle"}),t(f,{id:"owner",allowsSorting:!0,style:{width:"15%"},children:"Owner"})]}),t(ke,{children:j.map(e=>t(oe,{row:e},e.id))})]}),ee&&t(Pe,{showPageSizeOptions:!0,tabIndex:r.pageInfo.page,pageSize:r.pageInfo.pageSize,rowCount:d?.trackEntities.totalCount,offset:r.pageInfo.page*r.pageInfo.pageSize,onPreviousPage:()=>{const e=r.pageInfo.page-1;x(e,r.pageInfo.pageSize)},onNextPage:()=>{const e=r.pageInfo.page+1;x(e,r.pageInfo.pageSize)},onPageSizeChange:e=>{x(r.pageInfo.page,e)}})]}):t(Le,{title:"No track entities found",body:"There are no track entities found."})};export{je as TrackEntitiesTableBUI};
|
|
2
2
|
//# sourceMappingURL=TrackEntitiesTableBUI.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{RELATION_PART_OF as
|
|
1
|
+
import{RELATION_PART_OF as y,RELATION_OWNED_BY as f,stringifyEntityRef as l}from"@backstage/catalog-model";import{getEntityRelations as r,humanizeEntityRef as i}from"@backstage/plugin-catalog-react";import"lodash";function R(d){const{trackDetails:n,track:m,entity:t}=d,o=r(t,y,{kind:"system"}),a=r(t,f),s=l(t);return{id:s,entity:t,badge:n.badge??void 0,track:m,status:n.status,resolved:{name:i(t,{defaultKind:"Component"}),entityRef:s,ownedByRelationsTitle:a.map(e=>i(e,{defaultKind:"group"})).join(", "),ownedByRelations:a,partOfSystemRelationTitle:o.map(e=>i(e,{defaultKind:"system"})).join(", "),partOfSystemRelations:o}}}export{R as toTrackEntityRow};
|
|
2
2
|
//# sourceMappingURL=utils.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as r}from"react/jsx-runtime";import{
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{TrackPageBUI as o}from"./TrackPageBUI.esm.js";const a=()=>r(o,{});export{a as TrackPage};
|
|
2
2
|
//# sourceMappingURL=TrackPage.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as r,jsxs as a,Fragment as
|
|
1
|
+
import{jsx as r,jsxs as a,Fragment as he}from"react/jsx-runtime";import{parseEntityRef as ke}from"@backstage/catalog-model";import{useRouteRef as O}from"@backstage/core-plugin-api";import{usePermission as ge}from"@backstage/plugin-permission-react";import{Container as E,HeaderPage as Se,Box as u,Flex as U,Text as M}from"@backstage/ui";import{makeStyles as be}from"@material-ui/core";import{toEntityFilterQuery as Ee,soundcheckTrackReadPermission as ve}from"@spotify/backstage-plugin-soundcheck-common";import{useState as v,useMemo as C,useEffect as Y}from"react";import{useSearchParams as Ce,useParams as ye}from"react-router-dom";import Te from"react-use/lib/useDebounce";import Le from"react-use/lib/useLocalStorage";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"../../hooks/useSoundcheckAlert.esm.js";import{useTrack as Ie}from"../../hooks/tracks/useTrack.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{useCertificationStatus as we}from"../../hooks/aggregations/useCertificationStatus.esm.js";import{useCertificationStatusHistory as Re}from"../../hooks/aggregations/useCertificationStatusHistory.esm.js";import{useCheckStatuses as Ne}from"../../hooks/aggregations/useCheckStatuses.esm.js";import{useFilters as Be}from"../../hooks/filters/useFilters.esm.js";import{useLCPReporting as Fe}from"../../hooks/useLCPReporting.esm.js";import{useLoadTimeReporting as Oe}from"../../hooks/useLoadTimeReporting.esm.js";import{tracksPageRouteRef as Pe,trackOverviewRouteRef as _e,trackExplorerRouteRef as xe}from"../../routes.esm.js";import{getEntitiesBucket as He,getChecksBucket as Ae}from"../../utils/helpers.esm.js";import{DescriptionCard as Ve}from"../Cards/DescriptionCard/DescriptionCard.esm.js";import{HistoricalTrackStatusCard as je}from"../Cards/HistoricalTrackStatusCard/HistoricalTrackStatusCard.esm.js";import{TrackStatusCard as Ke}from"../Cards/TrackStatusCard/TrackStatusCard.esm.js";import{ChecksTable as De}from"../ChecksTable/ChecksTable.esm.js";import{ChipSelector as Ue}from"../ChipSelector/ChipSelector.esm.js";import"../EmptyState/EmptyState.esm.js";import{EmptyStateBUI as $}from"../EmptyState/EmptyStateBUI.esm.js";import"@remixicon/react";import"../FilterSidebar/FilterSidebar.esm.js";import"../FilterSidebar/StateFilter.esm.js";import{useTrackFilterSidebar as Me}from"../FilterSidebar/useTrackFilterSidebar.esm.js";import{toFilter as Ye}from"../FilterSidebar/util.esm.js";import{LoadingTableSkeleton as $e}from"../LoadingTableSkeleton/LoadingTableSkeleton.esm.js";import{SimpleMenu as qe}from"../Menus/SimpleMenu.esm.js";import"js-yaml";import"lodash";import{useTrackActions as Ge}from"../Menus/useTrackActions.esm.js";import"uuid";import"../CampaignsPage/CampaignListPage/useArchiveConfirmationModal.esm.js";import{PageCustomActions as Qe}from"../PageCustomActions/PageCustomActions.esm.js";import"../TechHealth/Filters/types.esm.js";import"../TechHealth/Filters/FacetFilter.esm.js";import"../TechHealth/Filters/FilterProvider.esm.js";import"../TechHealth/Filters/Filters.esm.js";import"../TechHealth/Filters/FiltersHeader.esm.js";import"../TechHealth/Filters/FiltersSection.esm.js";import"../../contexts/TrackFormContext.esm.js";import"../../contexts/CheckFormContext.esm.js";import"../../contexts/CampaignFormContext.esm.js";import"../../contexts/UserProvider.esm.js";import{parseNumberOfDays as Je}from"../TechHealth/Filters/utils.esm.js";import{TopFailingChecksTableBUI as We}from"../TopFailingChecksTable/TopFailingChecksTableBUI.esm.js";import{TrackEntitiesTableBUI as ze}from"./TrackEntitiesTable/TrackEntitiesTableBUI.esm.js";const Xe=be(()=>({container:{marginBottom:"var(--bui-space-12)"},cards:{margin:"0 0 var(--bui-space-12)",display:"flex",gridGap:"var(--bui-space-4)"},tableContent:{margin:"var(--bui-space-3) 0 0"},levelSection:{margin:"0 0 var(--bui-space-6)"},levelHeading:{padding:"var(--bui-space-3)",background:"var(--bui-bg-surface-2)"}})),n={CHECKS_BY_LEVELS:"Checks By Levels",TOP_FAILING_CHECKS:"Top Failing Checks",ENTITIES:"Entities"},Ze=()=>{const s=Xe(),[o,y]=Ce(),[P,q]=v(new Set([n.CHECKS_BY_LEVELS])),k=P.values().next().value??n.CHECKS_BY_LEVELS,[c,_]=v(o.get("search")||""),[x,G]=v(""),{trackId:i}=ye(),{data:t,isLoading:m,isError:Q}=Ie(i),J=O(Pe),H=Ge(t??void 0),A=t?.ownerEntityRef,W=A?ke(A).name:void 0,z=Array.from(new Set(t?.levels.flatMap(e=>e.checks).map(e=>e.id)??[])),{owners:l,lifecycles:p,types:d,systems:f}=Me(),T=C(()=>Ye({lifecycles:p,owners:l,types:d,systems:f}),[p,l,d,f]),L=C(()=>Je(o.get("numberOfDays")),[o]),[g,V]=v(!1),[I,w]=Le("track-overview-search-params","");Y(()=>{!g&&o?.toString()?(I!==o.toString()&&w(o.toString()),V(!0)):g?g&&I!==o.toString()&&w(o.toString()):V(!0)},[o,y,w,I,g]),Te(()=>{G(c);const e=new URLSearchParams(o.toString());c?e.set("search",c):e.delete("search"),y(e,{replace:!0})},300,[c]);const j=C(()=>({routeName:"soundcheck-track-insights",additionalAttributes:{trackId:i||"",filtersApplied:l.length+p.length+d.length+f.length,ownersFilter:l.join(",")||"",lifecyclesFilter:p.join(",")||"",typesFilter:d.join(",")||"",systemsFilter:f.join(",")||"",numberOfDays:L,tracksSearch:x||""}}),[i,l,p,d,f,L,x]),{reportContentLoaded:K}=Oe(j),{reporter:X}=Fe(j),Z=e=>{q(e),_(""),y({},{replace:!0})},{data:S,isLoading:R,isError:ee}=we({trackId:i,filter:T},!!i),{data:re,isLoading:N,isError:te}=Re({trackId:i,filter:T,numberOfDays:L},!!i),{data:b,isLoading:B}=Ne({trackId:i,checkIds:z,filter:T},!!t),ie=C(()=>Ee(t?.filter),[t]),F=Q||ee||te,{loading:oe,allowed:ae}=ge({permission:ve,resourceRef:i}),{filters:se,selected:ce,setSelected:ne,onRemoveTag:me,selectedTags:le}=Be({entityFilterQuery:ie}),pe=t?.levels.flatMap(e=>{const h=c?.trim().toLowerCase();return{...e,checks:h?e.checks.filter(({name:ue})=>ue.toLowerCase().includes(h)):e.checks}})??[],D=X?.getLCPValue();Y(()=>{if(!m&&!B&&!R&&!N){const e=S?.certificationStatus?.numberOfEntities??0,h=b?.length??0;K({lcp:D,numberOfEntities:e,entitiesBucket:He(e),numberOfChecks:h,checksBucket:Ae(h)})}},[m,B,R,N,b,S,K,D]);const de=O(_e),fe=O(xe);return m?r(E,{className:s.container,children:r($e,{})}):!m&&!t?r(E,{className:s.container,children:r($,{title:"Track not found",body:`There is no track with the requested id: ${i}.`})}):!oe&&!ae?r(E,{className:s.container,children:r($,{title:"Cannot view track",body:`No permission to view track with the requested id: ${i}.`})}):a(he,{children:[r(Se,{title:t?.name,customActions:r(qe,{label:"Track Actions",disabled:!H.length,placement:"left top",menuActions:H}),breadcrumbs:[{label:"Tracks",href:J()}],tabs:[{id:"overview",label:"Track Overview",href:i?de({trackId:i}):""},{id:"explorer",label:"Tech Insights Explorer",href:i?fe({trackId:i}):""}]}),a(E,{className:s.container,children:[a(u,{className:s.cards,children:[r(Ve,{description:t?.description??void 0,owner:W,isError:F,isLoading:m}),r(Ke,{track:t??void 0,status:S,isError:F,isLoading:R}),r(je,{track:t??void 0,history:re,isError:F,isLoading:N})]}),t&&a(u,{children:[a(U,{justify:"between",children:[r(u,{minWidth:"18rem",children:r(Ue,{options:Object.values(n),selected:P,ariaLabel:"Sections",onSelectionChange:Z})}),r(Qe,{searchValue:c,setSearchValue:e=>_(e),filters:se,selected:ce,setSelected:ne,onRemoveTag:me,selectedTags:le,showSearch:k!==n.ENTITIES})]}),a(u,{className:s.tableContent,children:[k===n.CHECKS_BY_LEVELS&&r(u,{mt:"3",children:pe.map(e=>a(u,{className:s.levelSection,children:[a(U,{align:"center",gap:"4",className:s.levelHeading,children:[a(M,{color:"secondary",children:["Level ",e.ordinal]})," ",r(M,{children:e.name})]}),r(De,{trackId:t.id,checks:e.checks,checkStatuses:b,isLoading:m||B,levelOrdinal:e.ordinal})]},e.ordinal))}),k===n.TOP_FAILING_CHECKS&&r(We,{track:t,checkStatuses:b,certificationStatus:S?.certificationStatus,searchValue:c}),k===n.ENTITIES&&r(ze,{track:t,lifecycles:p,owners:l,types:d,systems:f,searchValue:c})]})]})]})]})};export{Ze as TrackPageBUI};
|
|
2
2
|
//# sourceMappingURL=TrackPageBUI.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as a,jsxs as
|
|
1
|
+
import{jsx as a,jsxs as u}from"react/jsx-runtime";import{Text as f,Skeleton as g}from"@backstage/ui";import{makeStyles as w,createStyles as N,useTheme as S}from"@material-ui/core/styles";import{memo as T,useMemo as C,Fragment as I}from"react";import{compactNumberFormatter as b}from"../../utils/formatters.esm.js";import{getChartColors as L}from"../Charts/chartUtils.esm.js";const W=w(()=>N({container:{display:"grid",gridTemplateColumns:"3fr 2fr",gap:"var(--bui-space-1)",minWidth:0},item:{display:"flex",alignItems:"center",minWidth:0},legendDash:{width:"var(--bui-space-3)",height:"var(--bui-space-1_5)",borderRadius:"var(--bui-space-1)",marginRight:"var(--bui-space-2)"},category:{display:"flex",alignItems:"center",minWidth:0,flex:1},categoryText:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",minWidth:0,flex:1},valueCell:{justifyContent:"flex-end",whiteSpace:"nowrap"},percentage:{marginLeft:"var(--bui-space-1)"}})),j=T(({track:t,status:s})=>{const v=S(),e=W(),i=s?.certificationStatus.numberOfEntities??0,y=C(()=>{if(!t)return[{name:"",key:1,color:"var(--bui-fg-disabled)",value:0},{name:"",key:2,color:"var(--bui-fg-disabled)",value:0},{name:"",key:3,color:"var(--bui-fg-disabled)",value:0}];const o=L(v);let n=0,c=0;const l=t.levels.sort((d,r)=>r.ordinal-d.ordinal).map(({name:d,ordinal:r})=>{const h=s?.certificationStatus.statusByLevel.find(k=>k.ordinal===r)?.cumulativelyPassed??0,p=h-c,x={name:d??`Level ${r}`,key:r,color:o[r%o.length]||"var(--bui-fg-disabled)",value:p};return n+=p,c=h,x}).reverse();t.levels.reverse();const m=Math.max(0,i-n);return l.push({name:"No Level",key:-1,color:"var(--bui-fg-disabled)",value:m}),l},[v,t,s,i]);return a("div",{className:e.container,children:y.map(({name:o,key:n,color:c,value:l})=>{const m=i>0?Math.round(l/i*100):0;return u(I,{children:[a("div",{className:e.item,children:u("div",{className:e.category,children:[a("span",{className:e.legendDash,style:{backgroundColor:c}}),t?a(f,{className:e.categoryText,variant:"body-small",children:o}):a(g,{width:80,height:20})]})}),a("div",{className:`${e.item} ${e.valueCell}`,children:t&&s?u(f,{variant:"body-small",children:[b(l)," of"," ",b(i)," (",m,"%)"]}):a(g,{width:120,height:20})})]},n)})})});export{j as TrackStatusTableBUI};
|
|
2
2
|
//# sourceMappingURL=TrackStatusTableBUI.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as t,jsxs as p,Fragment as Y}from"react/jsx-runtime";import{useApi as B,useRouteRef as D}from"@backstage/core-plugin-api";import{entityPresentationApiRef as _}from"@backstage/plugin-catalog-react";import{usePermission as q}from"@backstage/plugin-permission-react";import{HeaderPage as X,Flex as Z,Container as ee,Table as te,TableHeader as re,Column as n,TableBody as oe,TablePagination as ie}from"@backstage/ui";import{makeStyles as ae}from"@material-ui/core";import{soundcheckTrackCreatePermission as se}from"@spotify/backstage-plugin-soundcheck-common";import{sortBy as ne,isEmpty as R}from"lodash";import{useState as P,useMemo as f,useEffect as me}from"react";import{useSearchParams as ce}from"react-router-dom";import le from"react-use/lib/useDebounce";import{soundcheckApiRef as pe}from"../../api.esm.js";import"@backstage/catalog-model";import"@tanstack/react-query";import"../../hooks/graphqlKeys.esm.js";import"../../hooks/useSoundcheckAlert.esm.js";import{useGetAllTracks as de}from"../../hooks/tracks/useGetAllTracks.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{usePagination as fe}from"../../hooks/usePagination.esm.js";import"react-use/lib/useLocalStorage";import{useProfileImages as ue}from"../../hooks/catalog/useProfileImages.esm.js";import{useImportTracks as ge}from"../../hooks/tracks/useImportTracks.esm.js";import{useLCPReporting as he}from"../../hooks/useLCPReporting.esm.js";import{useLoadTimeReporting as ye}from"../../hooks/useLoadTimeReporting.esm.js";import{useSearchNameOwner as ke}from"../../hooks/useSearchNameOwner.esm.js";import{trackCreateRouteRef as we,trackDetailsRouteRef as Re}from"../../routes.esm.js";import{exportTracks as Pe}from"../../utils/export.esm.js";import"../EmptyState/EmptyState.esm.js";import{EmptyStateBUI as Te}from"../EmptyState/EmptyStateBUI.esm.js";import{EmptyStateNoTracks as Se}from"../EmptyState/EmptyStateNoTracks.esm.js";import"@remixicon/react";import{ImportExportPanelBUI as Le}from"../ImportExportPanel/ImportExportPanelBUI.esm.js";import"../ImportExportPanel/ImportExportPanelDeprecated.esm.js";import{ListPageCustomActions as Ce}from"../ListPageCustomActions/ListPageCustomActions.esm.js";import{LoadingTableSkeleton as Ie}from"../LoadingTableSkeleton/LoadingTableSkeleton.esm.js";import"../Menus/SimpleMenu.esm.js";import{useTrackActions as ve}from"../Menus/useTrackActions.esm.js";import"uuid";import"../CampaignsPage/CampaignListPage/useArchiveConfirmationModal.esm.js";import{TableRowWithOwner as Ee}from"../TableRowWithOwner/TableRowWithOwner.esm.js";const N=10,Ae=["name","status","owner"],be=({track:r,profileImageMap:i})=>{const m=f(()=>r.levels.reduce((c,g)=>c+(g.checks?.length??0),0),[r.levels]),o=D(Re),u=ve(r);return t(Ee,{ownerEntityRef:r.ownerEntityRef,href:o({trackId:r.id}),menuActions:u,profileImageSrc:i[r.ownerEntityRef],name:r.name??r.id,description:r.description??"",documentationURL:r.documentationURL??void 0,cells:[{title:r.draft?"Draft":"Active"},{title:`${r.levels.length} Level${r.levels.length===1?"":"s"}`},{title:`${m} Check${m===1?"":"s"}`}]})},xe=ae(()=>({container:{marginBottom:"var(--bui-space-12)"}})),Ue=()=>{const r=xe(),[i,m]=ce(),[o,u]=P(()=>i.get("search")??""),[c,g]=P(()=>i.get("sortDirection")==="descending"?"descending":"ascending"),[l,H]=P(()=>{const e=i.get("sort");return e&&Ae.includes(e)?e:""}),T=f(()=>({routeName:"soundcheck-tracks"}),[]),{reportContentLoaded:S}=ye(T),{reporter:M}=he(T),{data:L,isLoading:a}=de({types:["standard","playlist"]}),h=f(()=>L?.edges?.map(e=>e.node)??[],[L?.edges]),{profileImageMap:$}=ue(h.map(e=>e.ownerEntityRef)),C=B(_),y=ke(h,o),I=f(()=>{if(!l)return y;const e=ne(y,s=>l==="owner"?C.forEntity(s.ownerEntityRef).snapshot.primaryTitle.toLowerCase():l==="status"?s.draft?"draft":"active":s.name.toLowerCase());return c==="descending"&&e.reverse(),e},[C,l,c,y]),{paginatedItems:k,reset:v,paginationProps:V}=fe({pageParam:"perPage",defaultPageSize:N,items:I});le(()=>{v();const e=new URLSearchParams(i.toString());o?e.set("search",o):e.delete("search"),m(e,{replace:!0})},300,[o]);const F=({direction:e,column:s})=>{const w=String(s);H(w),g(e),v();const d=new URLSearchParams(i);w?d.set("sort",w):d.delete("sort"),d.set("sortDirection",e),m(d,{replace:!0})},E=M?.getLCPValue();me(()=>{a||S({lcp:E})},[a,S,E]);const O=D(we),{loading:A,allowed:b}=q({permission:se}),j=B(pe),{mutateAsync:z}=ge(),G=async e=>z(e),W=async()=>{const e=await j.getTracks({orderAlphabetical:"asc"});return Pe(e.edges.map(s=>s.node))},J=!a&&!R(k),K=I.length>N,x=!a&&R(k),Q=a;let U=null;return x&&(U=o?t(Te,{title:"No tracks found",body:"Your current search term did not return any tracks. Please try a different search term."}):t(Se,{})),p(Y,{children:[t(X,{title:"Tracks",customActions:p(Z,{gap:"2",align:"center",children:[t(Le,{resourceType:"track",disableImport:!A&&!b,disableExport:a||R(h),onImport:G,onExport:W}),t(Ce,{searchValue:o,setSearchValue:u,canCreate:!A&&b,createHref:O()})]})}),p(ee,{className:r.container,children:[Q&&t(Ie,{rowCount:10}),x&&U,J&&p(te,{onSortChange:F,sortDescriptor:{direction:c,column:l},children:[p(re,{children:[t(n,{id:"name",allowsSorting:!0,isRowHeader:!0,style:{width:"
|
|
1
|
+
import{jsx as t,jsxs as p,Fragment as Y}from"react/jsx-runtime";import{useApi as B,useRouteRef as D}from"@backstage/core-plugin-api";import{entityPresentationApiRef as _}from"@backstage/plugin-catalog-react";import{usePermission as q}from"@backstage/plugin-permission-react";import{HeaderPage as X,Flex as Z,Container as ee,Table as te,TableHeader as re,Column as n,TableBody as oe,TablePagination as ie}from"@backstage/ui";import{makeStyles as ae}from"@material-ui/core";import{soundcheckTrackCreatePermission as se}from"@spotify/backstage-plugin-soundcheck-common";import{sortBy as ne,isEmpty as R}from"lodash";import{useState as P,useMemo as f,useEffect as me}from"react";import{useSearchParams as ce}from"react-router-dom";import le from"react-use/lib/useDebounce";import{soundcheckApiRef as pe}from"../../api.esm.js";import"@backstage/catalog-model";import"@tanstack/react-query";import"../../hooks/graphqlKeys.esm.js";import"../../hooks/useSoundcheckAlert.esm.js";import{useGetAllTracks as de}from"../../hooks/tracks/useGetAllTracks.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{usePagination as fe}from"../../hooks/usePagination.esm.js";import"react-use/lib/useLocalStorage";import{useProfileImages as ue}from"../../hooks/catalog/useProfileImages.esm.js";import{useImportTracks as ge}from"../../hooks/tracks/useImportTracks.esm.js";import{useLCPReporting as he}from"../../hooks/useLCPReporting.esm.js";import{useLoadTimeReporting as ye}from"../../hooks/useLoadTimeReporting.esm.js";import{useSearchNameOwner as ke}from"../../hooks/useSearchNameOwner.esm.js";import{trackCreateRouteRef as we,trackDetailsRouteRef as Re}from"../../routes.esm.js";import{exportTracks as Pe}from"../../utils/export.esm.js";import"../EmptyState/EmptyState.esm.js";import{EmptyStateBUI as Te}from"../EmptyState/EmptyStateBUI.esm.js";import{EmptyStateNoTracks as Se}from"../EmptyState/EmptyStateNoTracks.esm.js";import"@remixicon/react";import{ImportExportPanelBUI as Le}from"../ImportExportPanel/ImportExportPanelBUI.esm.js";import"../ImportExportPanel/ImportExportPanelDeprecated.esm.js";import{ListPageCustomActions as Ce}from"../ListPageCustomActions/ListPageCustomActions.esm.js";import{LoadingTableSkeleton as Ie}from"../LoadingTableSkeleton/LoadingTableSkeleton.esm.js";import"../Menus/SimpleMenu.esm.js";import{useTrackActions as ve}from"../Menus/useTrackActions.esm.js";import"uuid";import"../CampaignsPage/CampaignListPage/useArchiveConfirmationModal.esm.js";import{TableRowWithOwner as Ee}from"../TableRowWithOwner/TableRowWithOwner.esm.js";const N=10,Ae=["name","status","owner"],be=({track:r,profileImageMap:i})=>{const m=f(()=>r.levels.reduce((c,g)=>c+(g.checks?.length??0),0),[r.levels]),o=D(Re),u=ve(r);return t(Ee,{ownerEntityRef:r.ownerEntityRef,href:o({trackId:r.id}),menuActions:u,profileImageSrc:i[r.ownerEntityRef],name:r.name??r.id,description:r.description??"",documentationURL:r.documentationURL??void 0,cells:[{title:r.draft?"Draft":"Active"},{title:`${r.levels.length} Level${r.levels.length===1?"":"s"}`},{title:`${m} Check${m===1?"":"s"}`}]})},xe=ae(()=>({container:{marginBottom:"var(--bui-space-12)"}})),Ue=()=>{const r=xe(),[i,m]=ce(),[o,u]=P(()=>i.get("search")??""),[c,g]=P(()=>i.get("sortDirection")==="descending"?"descending":"ascending"),[l,H]=P(()=>{const e=i.get("sort");return e&&Ae.includes(e)?e:""}),T=f(()=>({routeName:"soundcheck-tracks"}),[]),{reportContentLoaded:S}=ye(T),{reporter:M}=he(T),{data:L,isLoading:a}=de({types:["standard","playlist"]}),h=f(()=>L?.edges?.map(e=>e.node)??[],[L?.edges]),{profileImageMap:$}=ue(h.map(e=>e.ownerEntityRef)),C=B(_),y=ke(h,o),I=f(()=>{if(!l)return y;const e=ne(y,s=>l==="owner"?C.forEntity(s.ownerEntityRef).snapshot.primaryTitle.toLowerCase():l==="status"?s.draft?"draft":"active":s.name.toLowerCase());return c==="descending"&&e.reverse(),e},[C,l,c,y]),{paginatedItems:k,reset:v,paginationProps:V}=fe({pageParam:"perPage",defaultPageSize:N,items:I});le(()=>{v();const e=new URLSearchParams(i.toString());o?e.set("search",o):e.delete("search"),m(e,{replace:!0})},300,[o]);const F=({direction:e,column:s})=>{const w=String(s);H(w),g(e),v();const d=new URLSearchParams(i);w?d.set("sort",w):d.delete("sort"),d.set("sortDirection",e),m(d,{replace:!0})},E=M?.getLCPValue();me(()=>{a||S({lcp:E})},[a,S,E]);const O=D(we),{loading:A,allowed:b}=q({permission:se}),j=B(pe),{mutateAsync:z}=ge(),G=async e=>z(e),W=async()=>{const e=await j.getTracks({orderAlphabetical:"asc"});return Pe(e.edges.map(s=>s.node))},J=!a&&!R(k),K=I.length>N,x=!a&&R(k),Q=a;let U=null;return x&&(U=o?t(Te,{title:"No tracks found",body:"Your current search term did not return any tracks. Please try a different search term."}):t(Se,{})),p(Y,{children:[t(X,{title:"Tracks",customActions:p(Z,{gap:"2",align:"center",children:[t(Le,{resourceType:"track",disableImport:!A&&!b,disableExport:a||R(h),onImport:G,onExport:W}),t(Ce,{searchValue:o,setSearchValue:u,canCreate:!A&&b,createHref:O()})]})}),p(ee,{className:r.container,children:[Q&&t(Ie,{rowCount:10}),x&&U,J&&p(te,{onSortChange:F,sortDescriptor:{direction:c,column:l},children:[p(re,{children:[t(n,{id:"name",allowsSorting:!0,isRowHeader:!0,style:{width:"50%"},children:"Track Name"}),t(n,{allowsSorting:!0,id:"status",style:{width:"10%"},children:"Status"}),t(n,{id:"levels",style:{width:"10%"},children:"Levels"}),t(n,{id:"checks",style:{width:"10%"},children:"Checks"}),t(n,{id:"owner",allowsSorting:!0,style:{width:"15%"},children:"Track Owner"}),t(n,{id:"actions",style:{width:"3%"}})]}),t(oe,{children:!a&&k.map(e=>t(be,{track:e,profileImageMap:$??{}},e.id))})]}),K&&t(ie,{...V})]})]})};export{Ue as TracksListPageBUI};
|
|
2
2
|
//# sourceMappingURL=TracksListPageBUI.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{TracksListPageBUI as o}from"./TracksListPageBUI.esm.js";const s=()=>r(o,{});export{s as TracksPage};
|
|
2
2
|
//# sourceMappingURL=TracksPage.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as r}from"react/jsx-runtime";import{TrackFormProvider as o}from"../../contexts/TrackFormContext.esm.js";import"../../contexts/CheckFormContext.esm.js";import"../../contexts/CampaignFormContext.esm.js";import"react";import"../../contexts/UserProvider.esm.js";import
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{TrackFormProvider as o}from"../../contexts/TrackFormContext.esm.js";import"../../contexts/CheckFormContext.esm.js";import"../../contexts/CampaignFormContext.esm.js";import"react";import"../../contexts/UserProvider.esm.js";import{TracksPage as m}from"../TracksPage/TracksPage.esm.js";const i=()=>r(o,{children:r(m,{})});export{i as TracksTab};
|
|
2
2
|
//# sourceMappingURL=TracksTab.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useApi as i}from"@backstage/core-plugin-api";import{useQuery as o}from"@tanstack/react-query";import{soundcheckApiRef as s}from"../../api.esm.js";import{QueryKeys as n}from"../graphqlKeys.esm.js";const c=(e,t)=>{const r=i(s);return o([n.CertificationStatus,e],async()=>r.getCertificationStatus(e),{enabled:t,staleTime:
|
|
1
|
+
import{useApi as i}from"@backstage/core-plugin-api";import{useQuery as o}from"@tanstack/react-query";import{soundcheckApiRef as s}from"../../api.esm.js";import{QueryKeys as n}from"../graphqlKeys.esm.js";const c=(e,t)=>{const r=i(s);return o([n.CertificationStatus,e],async()=>r.getCertificationStatus(e),{enabled:t,staleTime:600*1e3,refetchInterval:!1,refetchOnWindowFocus:!1})};export{c as useCertificationStatus};
|
|
2
2
|
//# sourceMappingURL=useCertificationStatus.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useApi as o}from"@backstage/core-plugin-api";import{useQuery as i}from"@tanstack/react-query";import{soundcheckApiRef as s}from"../../api.esm.js";import{QueryKeys as n}from"../graphqlKeys.esm.js";const c=(t,e)=>{const r=o(s);return i([n.CertificationStatusHistory,t],async()=>r.getCertificationStatusHistory(t),{enabled:e,staleTime:
|
|
1
|
+
import{useApi as o}from"@backstage/core-plugin-api";import{useQuery as i}from"@tanstack/react-query";import{soundcheckApiRef as s}from"../../api.esm.js";import{QueryKeys as n}from"../graphqlKeys.esm.js";const c=(t,e)=>{const r=o(s);return i([n.CertificationStatusHistory,t],async()=>r.getCertificationStatusHistory(t),{enabled:e,staleTime:3600*1e3,refetchInterval:!1,refetchOnWindowFocus:!1})};export{c as useCertificationStatusHistory};
|
|
2
2
|
//# sourceMappingURL=useCertificationStatusHistory.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useApi as u,useAnalytics as f}from"@backstage/core-plugin-api";import{useQuery as d}from"@tanstack/react-query";import{soundcheckApiRef as l}from"../../api.esm.js";import{QueryKeys as m}from"../graphqlKeys.esm.js";const h=(t,r=!0)=>{const i=u(l),n=f();return d([m.CheckStatus,t],async()=>{const{checkId:s,entityRefs:a,filter:c,trackId:o}=t,p={checkId:s,entityRefs:a,filter:c,trackId:o},e=await i.getCheckStatus(p);return e&&n.captureEvent("page_details","Check Status",{attributes:{id:e.id,error:e.error,exempt:e.exempt,failed:e.failed,notApplicable:e.notApplicable,notReported:e.notReported,numberOfEntities:e.numberOfEntities,passed:e.passed,warning:e.warning,filter:t.filter}}),e},{enabled:r,staleTime:
|
|
1
|
+
import{useApi as u,useAnalytics as f}from"@backstage/core-plugin-api";import{useQuery as d}from"@tanstack/react-query";import{soundcheckApiRef as l}from"../../api.esm.js";import{QueryKeys as m}from"../graphqlKeys.esm.js";const h=(t,r=!0)=>{const i=u(l),n=f();return d([m.CheckStatus,t],async()=>{const{checkId:s,entityRefs:a,filter:c,trackId:o}=t,p={checkId:s,entityRefs:a,filter:c,trackId:o},e=await i.getCheckStatus(p);return e&&n.captureEvent("page_details","Check Status",{attributes:{id:e.id,error:e.error,exempt:e.exempt,failed:e.failed,notApplicable:e.notApplicable,notReported:e.notReported,numberOfEntities:e.numberOfEntities,passed:e.passed,warning:e.warning,filter:t.filter}}),e},{enabled:r,staleTime:600*1e3,refetchInterval:!1,refetchOnWindowFocus:!1})};export{h as useCheckStatus};
|
|
2
2
|
//# sourceMappingURL=useCheckStatus.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useApi as o}from"@backstage/core-plugin-api";import{useQuery as s}from"@tanstack/react-query";import{soundcheckApiRef as c}from"../../api.esm.js";import{QueryKeys as i}from"../graphqlKeys.esm.js";const u=(e,t=!0)=>{const r=o(c);return s([i.CheckStatusHistory,e],async()=>r.getCheckStatusHistory(e),{enabled:t,staleTime:
|
|
1
|
+
import{useApi as o}from"@backstage/core-plugin-api";import{useQuery as s}from"@tanstack/react-query";import{soundcheckApiRef as c}from"../../api.esm.js";import{QueryKeys as i}from"../graphqlKeys.esm.js";const u=(e,t=!0)=>{const r=o(c);return s([i.CheckStatusHistory,e],async()=>r.getCheckStatusHistory(e),{enabled:t,staleTime:3600*1e3,refetchInterval:!1,refetchOnWindowFocus:!1})};export{u as useCheckStatusHistory};
|
|
2
2
|
//# sourceMappingURL=useCheckStatusHistory.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useApi as r}from"@backstage/core-plugin-api";import{useQuery as o}from"@tanstack/react-query";import{soundcheckApiRef as c}from"../../api.esm.js";import{QueryKeys as u}from"../graphqlKeys.esm.js";const m=(e,t=!0)=>{const s=r(c);return o([u.CheckStatuses,e],async()=>s.getCheckStatuses(e),{enabled:t,staleTime:
|
|
1
|
+
import{useApi as r}from"@backstage/core-plugin-api";import{useQuery as o}from"@tanstack/react-query";import{soundcheckApiRef as c}from"../../api.esm.js";import{QueryKeys as u}from"../graphqlKeys.esm.js";const m=(e,t=!0)=>{const s=r(c);return o([u.CheckStatuses,e],async()=>s.getCheckStatuses(e),{enabled:t,staleTime:600*1e3,refetchInterval:!1,refetchOnWindowFocus:!1})};export{m as useCheckStatuses};
|
|
2
2
|
//# sourceMappingURL=useCheckStatuses.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useApi as i}from"@backstage/core-plugin-api";import{useQuery as n}from"@tanstack/react-query";import{soundcheckApiRef as m}from"../../api.esm.js";import{QueryKeys as s}from"../graphqlKeys.esm.js";function a(r,o=!0){const t=i(m),e={ids:[r]};return n([s.GetCampaigns,e],async()=>t.getCampaigns(e),{staleTime:
|
|
1
|
+
import{useApi as i}from"@backstage/core-plugin-api";import{useQuery as n}from"@tanstack/react-query";import{soundcheckApiRef as m}from"../../api.esm.js";import{QueryKeys as s}from"../graphqlKeys.esm.js";function a(r,o=!0){const t=i(m),e={ids:[r]};return n([s.GetCampaigns,e],async()=>t.getCampaigns(e),{staleTime:300*1e3,refetchInterval:!1,refetchOnWindowFocus:!1,enabled:o})}export{a as useGetCampaign};
|
|
2
2
|
//# sourceMappingURL=useGetCampaign.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useApi as o}from"@backstage/core-plugin-api";import{useQuery as t}from"@tanstack/react-query";import{soundcheckApiRef as c}from"../../api.esm.js";import{QueryKeys as n}from"../graphqlKeys.esm.js";function i(e){const r=o(c);return t([n.Check,e],async()=>r.getCheck(e),{staleTime:
|
|
1
|
+
import{useApi as o}from"@backstage/core-plugin-api";import{useQuery as t}from"@tanstack/react-query";import{soundcheckApiRef as c}from"../../api.esm.js";import{QueryKeys as n}from"../graphqlKeys.esm.js";function i(e){const r=o(c);return t([n.Check,e],async()=>r.getCheck(e),{staleTime:300*1e3,refetchInterval:!1,refetchOnWindowFocus:!1,enabled:!!e})}export{i as useCheck};
|
|
2
2
|
//# sourceMappingURL=useCheck.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useApi as r}from"@backstage/core-plugin-api";import{useQuery as t}from"@tanstack/react-query";import{soundcheckApiRef as c}from"../../api.esm.js";import{QueryKeys as o}from"../graphqlKeys.esm.js";function s(){const e=r(c);return t([o.ExecutableChecks],async()=>e.getExecutableChecks(),{staleTime:
|
|
1
|
+
import{useApi as r}from"@backstage/core-plugin-api";import{useQuery as t}from"@tanstack/react-query";import{soundcheckApiRef as c}from"../../api.esm.js";import{QueryKeys as o}from"../graphqlKeys.esm.js";function s(){const e=r(c);return t([o.ExecutableChecks],async()=>e.getExecutableChecks(),{staleTime:300*1e3,refetchInterval:!1,refetchOnWindowFocus:!1})}export{s as useExecutableChecks};
|
|
2
2
|
//# sourceMappingURL=useExecutableChecks.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useApi as n}from"@backstage/core-plugin-api";import{useQueryClient as i,useQuery as u}from"@tanstack/react-query";import{useEffect as a}from"react";import{soundcheckApiRef as m}from"../../api.esm.js";import{QueryKeys as s}from"../graphqlKeys.esm.js";function d(t,c=!0){const f=n(m),o=i(),e=u([s.GetChecks,t],async()=>f.getChecks(t),{staleTime:
|
|
1
|
+
import{useApi as n}from"@backstage/core-plugin-api";import{useQueryClient as i,useQuery as u}from"@tanstack/react-query";import{useEffect as a}from"react";import{soundcheckApiRef as m}from"../../api.esm.js";import{QueryKeys as s}from"../graphqlKeys.esm.js";function d(t,c=!0){const f=n(m),o=i(),e=u([s.GetChecks,t],async()=>f.getChecks(t),{staleTime:300*1e3,refetchInterval:!1,refetchOnWindowFocus:!1,enabled:c});return a(()=>{if(e.data)for(const r of e.data.edges)o.setQueryData([s.Check,r.node.id],r.node)},[e.data,o]),e}export{d as useGetChecks};
|
|
2
2
|
//# sourceMappingURL=useGetChecks.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useApi as
|
|
1
|
+
import{useApi as o}from"@backstage/core-plugin-api";import{useQuery as t}from"@tanstack/react-query";import{soundcheckApiRef as s}from"../../api.esm.js";import{QueryKeys as c}from"../graphqlKeys.esm.js";function u(e){const r=o(s);return t({queryKey:[c.GetCollectors,e],queryFn:async()=>r.getCollectors(e),staleTime:300*1e3,refetchInterval:!1,refetchOnWindowFocus:!1})}export{u as useGetCollectors};
|
|
2
2
|
//# sourceMappingURL=useGetCollectors.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useApi as c}from"@backstage/core-plugin-api";import{useQuery as m}from"@tanstack/react-query";import{soundcheckApiRef as a}from"../../api.esm.js";import{QueryKeys as i}from"../graphqlKeys.esm.js";function n(e,t,o=!0){const r=c(a);return m([i.GetFactSchema,e,t],()=>r.getFactSchema(e,t),{enabled:o&&!!e&&!!t,staleTime:
|
|
1
|
+
import{useApi as c}from"@backstage/core-plugin-api";import{useQuery as m}from"@tanstack/react-query";import{soundcheckApiRef as a}from"../../api.esm.js";import{QueryKeys as i}from"../graphqlKeys.esm.js";function n(e,t,o=!0){const r=c(a);return m([i.GetFactSchema,e,t],()=>r.getFactSchema(e,t),{enabled:o&&!!e&&!!t,staleTime:300*1e3,refetchInterval:!1,refetchOnWindowFocus:!1})}export{n as useGetFactSchema};
|
|
2
2
|
//# sourceMappingURL=useGetFactSchema.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useApi as u,useAnalytics as a}from"@backstage/core-plugin-api";import{useQueryClient as l,useMutation as p}from"@tanstack/react-query";import{soundcheckApiRef as d}from"../../api.esm.js";import{MutationKeys as f,QueryKeys as g}from"../graphqlKeys.esm.js";import{useSoundcheckAlert as C}from"../useSoundcheckAlert.esm.js";const m="Error Configuring Integration";function y(){const c=u(d),i=l(),{showAlert:n}=C(),
|
|
1
|
+
import{useApi as u,useAnalytics as a}from"@backstage/core-plugin-api";import{useQueryClient as l,useMutation as p}from"@tanstack/react-query";import{soundcheckApiRef as d}from"../../api.esm.js";import{MutationKeys as f,QueryKeys as g}from"../graphqlKeys.esm.js";import{useSoundcheckAlert as C}from"../useSoundcheckAlert.esm.js";const m="Error Configuring Integration";function y(){const c=u(d),i=l(),{showAlert:n}=C(),t=a(),s=async e=>{const r=await c.updateCollectorConfig(e);if(!r)throw new Error("Failed to update integration configuration.");return r};return p([f.UpdateCollectorConfig],s,{onSuccess:e=>(t.captureEvent("resource_action","Update Collector Config",{attributes:{resourceType:"collector",resourceAction:"update",resourceId:e.id,success:"true"}}),i.invalidateQueries({queryKey:[g.GetCollectors],exact:!1})),onError:(e,r)=>{let o="Failed to update integration configuration.";e instanceof Error&&(o=e.message),n({severity:"error",title:m,message:o}),t.captureEvent("resource_action","Update Collector Config",{attributes:{resourceType:"collector",resourceAction:"update",resourceId:r.collectorId,success:"false"}}),t.captureEvent("error","Update Collector Config",{attributes:{errorMessage:o}})}})}export{y as useUpdateCollectorConfig};
|
|
2
2
|
//# sourceMappingURL=useUpdateCollectorConfig.esm.js.map
|