@spotify/backstage-plugin-soundcheck 0.18.1 → 0.19.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 +40 -0
- package/config.d.ts +21 -0
- package/dist/alpha/apis.esm.js +1 -1
- package/dist/alpha/entity-content.esm.js +1 -1
- package/dist/alpha/pages.esm.js +1 -1
- package/dist/alpha/plugin.esm.js +1 -1
- package/dist/alpha.d.ts +83 -77
- package/dist/api.esm.js +1 -1
- package/dist/components/Badges/CampaignBadge.esm.js +1 -1
- package/dist/components/Badges/StatusBadge.esm.js +1 -1
- package/dist/components/CacheConfig/CacheConfigComponent.esm.js +1 -1
- package/dist/components/CampaignForm/CampaignForm.esm.js +1 -1
- package/dist/components/CampaignForm/Steps/CampaignTrackStepNew.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/CampaignForm/utils/validation.esm.js +1 -1
- package/dist/components/CampaignInsightsPage/CampaignInsightsPage.esm.js +1 -1
- package/dist/components/CampaignInsightsPage/CampaignStatusHistoryTile.esm.js +1 -1
- package/dist/components/CampaignInsightsPage/CampaignStatusTile.esm.js +1 -1
- package/dist/components/CampaignInsightsPage/DaysRemainingTile.esm.js +1 -1
- package/dist/components/CampaignsPage/CampaignListPage/CampaignListPage.esm.js +1 -1
- package/dist/components/CampaignsPage/CampaignsPage.esm.js +1 -1
- package/dist/components/CategoryBar/CategoryBar.esm.js +1 -1
- package/dist/components/CertificationSidebar/Check.esm.js +1 -1
- package/dist/components/CertificationsPage/CertificationTabs.esm.js +1 -1
- package/dist/components/CheckDetails/FixMeDialog.esm.js +1 -1
- package/dist/components/CheckForm/FormFields/RuleInput/AddMenuButton.esm.js +1 -1
- package/dist/components/CheckForm/FormFields/RuleInput/Conditions/RuleConditionInput.esm.js +1 -1
- package/dist/components/CheckForm/utils/checkFormUtils.esm.js +2 -2
- package/dist/components/CheckIcon/CheckIcon.esm.js +1 -1
- package/dist/components/CheckPage/CheckEntitiesTable/CheckEntitiesTable.esm.js +1 -1
- package/dist/components/CheckPage/CheckEntitiesTable/columns.esm.js +1 -1
- package/dist/components/CheckPage/CheckInsightsPage.esm.js +1 -1
- package/dist/components/CheckPage/CheckStatusTable.esm.js +1 -1
- package/dist/components/CheckTemplatesPage/CheckTemplatesPage.esm.js +1 -1
- package/dist/components/ChecksPage/CheckListPage/CheckListPage.esm.js +1 -1
- package/dist/components/ChecksPage/ChecksPage.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/CollectorPage.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/AzureDevOps/AzureDevOpsConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/AzureDevOps/NumberOfWorkItemsComponent.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/BigQuery/BigQueryConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/BigQuery/QueryFactDetailsComponent.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Catalog/CatalogConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Common/CollectorConfigAlert.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/Common/PortalConfigAlert.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/Common/utils.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/DataDog/DataDogConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/DataRegistry/DataRegistryConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Github/GithubConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Gitlab/GitlabConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/HTTP/HttpConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/HTTP/HttpRequestComponent.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/HTTP/HttpStatusesInput.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Jira/JiraConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Kubernetes/KubernetesConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/NewRelic/NewRelicConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/PagerDuty/PagerDutyConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/SCM/ScmConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/SonarQube/SonarQubeConfigurator.esm.js +1 -1
- package/dist/components/CollectorsPage/CollectorsPage.esm.js +1 -1
- package/dist/components/ColorChip/ColorChip.esm.js +1 -1
- package/dist/components/EmptyState/EmptyState.esm.js +1 -1
- package/dist/components/EntitiesAutocompletePicker/EntitiesAutocompletePicker.esm.js +1 -1
- package/dist/components/ExpandableSection/ExpandableSection.esm.js +1 -1
- package/dist/components/FactExplorer/FactExplorer.esm.js +1 -1
- package/dist/components/Filter/EntityAutocompletePicker.esm.js +1 -1
- package/dist/components/FilterSidebar/StateFilter.esm.js +1 -1
- package/dist/components/FilterSidebar/useTrackFilterSidebar.esm.js +2 -0
- package/dist/components/Frequency/FrequencyComponent.esm.js +1 -1
- package/dist/components/Frequency/util.esm.js +1 -1
- package/dist/components/GroupHierarchySelector/GroupHierarchyChip.esm.js +1 -1
- package/dist/components/GroupHierarchySelector/GroupHierarchyGroupInfo.esm.js +1 -1
- package/dist/components/GroupHierarchySelector/GroupHierarchySelector.esm.js +1 -1
- package/dist/components/GroupHierarchySelector/GroupHierarchySelectorDialog.esm.js +1 -1
- package/dist/components/GroupHierarchySelector/getAllOwnedEntityCount.esm.js +2 -0
- package/dist/components/{TechInsights → HierarchicalTechInsightsPage}/ColorLegend.esm.js +1 -1
- package/dist/components/HierarchicalTechInsightsPage/HierarchicalTechInsightsPage.esm.js +2 -0
- package/dist/components/HierarchicalTechInsightsPage/HierarchyTable.esm.js +2 -0
- package/dist/components/HierarchicalTechInsightsPage/LowestPerformingTeams.esm.js +2 -0
- package/dist/components/HierarchicalTechInsightsPage/SelectedNodeSidebar.esm.js +2 -0
- package/dist/components/HierarchicalTechInsightsPage/TeamPerformanceCard.esm.js +2 -0
- package/dist/components/HierarchicalTechInsightsPage/TopPerformingTeams.esm.js +2 -0
- package/dist/components/HierarchicalTechInsightsPage/getLeafNodes.esm.js +2 -0
- package/dist/components/HierarchicalTechInsightsPage/visualizations/LoadingOverlay.esm.js +2 -0
- package/dist/components/HierarchicalTechInsightsPage/visualizations/NivoCirclePacking.esm.js +2 -0
- package/dist/components/HierarchicalTechInsightsPage/visualizations/NivoHeatmap.esm.js +2 -0
- package/dist/components/HierarchicalTechInsightsPage/visualizations/NivoIcicle.esm.js +2 -0
- package/dist/components/HierarchicalTechInsightsPage/visualizations/NivoSunburst.esm.js +2 -0
- package/dist/components/HierarchicalTechInsightsPage/visualizations/NivoTreemap.esm.js +2 -0
- package/dist/components/HierarchicalTechInsightsPage/visualizations/VisualizationBreadcrumb.esm.js +2 -0
- package/dist/components/HierarchicalTechInsightsPage/visualizations/findNodePath.esm.js +2 -0
- package/dist/components/HierarchicalTechInsightsPage/visualizations/hierarchyToNivo.esm.js +2 -0
- package/dist/components/ImportExportPanel/ImportExportPanel.esm.js +1 -1
- package/dist/components/LevelsTable/LevelsTable.esm.js +1 -1
- package/dist/components/OverviewPage/OverviewPage.esm.js +1 -1
- package/dist/components/OverviewPage/OverviewPageContent.esm.js +1 -1
- package/dist/components/PassRateGrid/PassRateMetadata.esm.js +1 -1
- package/dist/components/QuickstartPage/QuickstartPage.esm.js +2 -2
- package/dist/components/QuickstartPage/styles.esm.js +1 -1
- package/dist/components/RoutingPage/NewFeatureTab.esm.js +2 -0
- package/dist/components/RoutingPage/RoutingPage.esm.js +1 -1
- package/dist/components/SearchBar/SearchBar.esm.js +1 -1
- package/dist/components/SoundcheckEntityLink/SoundcheckEntityLink.esm.js +2 -0
- package/dist/components/SoundcheckHeader/headerUtil.esm.js +1 -1
- package/dist/components/TechHealth/Filters/FacetFilter.esm.js +1 -1
- package/dist/components/TechHealth/TechHealth.esm.js +1 -1
- package/dist/components/TechHealthTabs/PassRateTabHeader.esm.js +1 -1
- package/dist/components/TechInsights/FilterControls.esm.js +1 -1
- package/dist/components/TechInsights/SummaryTiles.esm.js +1 -1
- package/dist/components/TechInsights/TechInsightsCardsView.esm.js +1 -1
- package/dist/components/TechInsights/TechInsightsPage.esm.js +2 -0
- package/dist/components/TechInsights/TechInsightsTableView.esm.js +1 -1
- package/dist/components/TechInsights/TrackStatusCard.esm.js +2 -0
- package/dist/components/TechInsights/ViewModeControls.esm.js +1 -1
- package/dist/components/TechInsights/convertToCommonTrackStatus.esm.js +2 -0
- package/dist/components/TopFailingChecksTable/TopFailingChecksTable.esm.js +1 -1
- package/dist/components/TrackPage/TrackEntitiesTable/TrackEntitiesTable.esm.js +1 -1
- package/dist/components/TrackPage/TrackEntitiesTable/columns.esm.js +1 -1
- package/dist/components/TrackPage/TrackHistoryChart.esm.js +1 -1
- package/dist/components/TrackPage/TrackPage.esm.js +1 -1
- package/dist/components/TrackPage/TrackStatusBar.esm.js +1 -1
- package/dist/components/TrackPage/TrackStatusTable.esm.js +1 -1
- package/dist/components/TrackSelection/TrackSelection.esm.js +1 -1
- package/dist/components/TracksPage/TrackListPage/TrackListPage.esm.js +1 -1
- package/dist/components/TracksPage/TracksPage.esm.js +1 -1
- package/dist/graphql/generated/index.esm.js +113 -115
- package/dist/hooks/campaigns/useCreateCampaign.esm.js +1 -1
- package/dist/hooks/campaigns/useGetCampaigns.esm.js +1 -1
- package/dist/hooks/catalog/useGetLimitedEntityRefs.esm.js +2 -0
- package/dist/hooks/collectors/useDeleteCollectorConfig.esm.js +2 -0
- package/dist/hooks/graphqlKeys.esm.js +1 -1
- package/dist/hooks/heirarchy/useBatchedHierarchicalTrackStatuses.esm.js +1 -1
- package/dist/hooks/heirarchy/useGroupHierarchy.esm.js +1 -1
- package/dist/hooks/heirarchy/useGroupTypeHierarchy.esm.js +1 -1
- package/dist/hooks/heirarchy/useHierarchicalTrackStatus.esm.js +1 -1
- package/dist/hooks/tracks/useCreateTrack.esm.js +1 -1
- package/dist/hooks/tracks/useGetAllTracks.esm.js +1 -1
- package/dist/hooks/useFeatureFlag.esm.js +1 -1
- package/dist/hooks/useLCPReporting.esm.js +2 -0
- package/dist/index.d.ts +2 -3
- package/dist/index.esm.js +1 -1
- package/dist/utils/colors.esm.js +1 -1
- package/dist/utils/lcpReporting.esm.js +2 -0
- package/package.json +17 -15
- package/dist/components/CheckCard/CheckCard.esm.js +0 -2
- package/dist/components/CheckCard/CheckHistoryChart.esm.js +0 -2
- package/dist/components/CheckCard/utils.esm.js +0 -2
- package/dist/components/MultiSelectFilter/MultiSelectFilter.esm.js +0 -2
- package/dist/components/QuickstartPage/WelcomeModal.esm.js +0 -2
- package/dist/components/TechInsights/ColorSchemeSelector.esm.js +0 -2
- package/dist/components/TechInsights/HierarchicalTechInsightsPage.esm.js +0 -2
- package/dist/components/TechInsights/HierarchyTable.esm.js +0 -2
- package/dist/components/TechInsights/LoadingOverlay.esm.js +0 -2
- package/dist/components/TechInsights/LowestPerformingTeams.esm.js +0 -2
- package/dist/components/TechInsights/NivoCirclePacking.esm.js +0 -2
- package/dist/components/TechInsights/NivoIcicle.esm.js +0 -2
- package/dist/components/TechInsights/NivoSunburst.esm.js +0 -2
- package/dist/components/TechInsights/NivoTreemap.esm.js +0 -2
- package/dist/components/TechInsights/SelectedNodeSidebar.esm.js +0 -2
- package/dist/components/TechInsights/TeamComparison/FailingComponentsTable.esm.js +0 -2
- package/dist/components/TechInsights/TeamComparison/MultiCheckStatusHistoryChart.esm.js +0 -2
- package/dist/components/TechInsights/TeamPerformanceCard.esm.js +0 -2
- package/dist/components/TechInsights/TechInsightsChartView.esm.js +0 -2
- package/dist/components/TechInsights/TechInsightsPage2.esm.js +0 -2
- package/dist/components/TechInsights/TechInsightsViewSelector.esm.js +0 -2
- package/dist/components/TechInsights/Tiles/TileUtils.esm.js +0 -2
- package/dist/components/TechInsights/Tiles/TrackStatusCard.esm.js +0 -2
- package/dist/components/TechInsights/TopPerformingTeams.esm.js +0 -2
- package/dist/components/TechInsights/VisualizationBreadcrumb.esm.js +0 -2
- package/dist/components/TechInsights/colorContrast.esm.js +0 -2
- package/dist/components/TechInsights/findNodePath.esm.js +0 -2
- package/dist/components/TechInsights/hierarchy/GroupNode.esm.js +0 -2
- package/dist/components/TechInsights/hierarchy/Hierarchy.esm.js +0 -2
- package/dist/components/TechInsights/hierarchyToNivo.esm.js +0 -2
- package/dist/components/TechInsights/persistence/FavoriteViews.esm.js +0 -2
- package/dist/components/TechInsights/styles.esm.js +0 -2
- package/dist/components/TrackPage/FilterBar/FilterBar.esm.js +0 -2
- package/dist/hooks/aggregations/useCheckStatusHistories.esm.js +0 -2
- package/dist/hooks/heirarchy/useGetDescendentsOfGroups.esm.js +0 -2
- /package/dist/components/{TrackPage/FilterBar → FilterSidebar}/util.esm.js +0 -0
- /package/dist/components/{TechInsights → HierarchicalTechInsightsPage}/TeamPerformanceListCard.esm.js +0 -0
- /package/dist/components/{TechInsights → TeamStatusBar}/TeamStatusBar.esm.js +0 -0
- /package/dist/components/{TechInsights → TechInsightsGroupSelector}/TechInsightsGroupSelector.esm.js +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useApi as u,useAnalytics as m}from"@backstage/core-plugin-api";import{useQueryClient as p,useMutation as g}from"@tanstack/react-query";import{soundcheckApiRef as C}from"../../api.esm.js";import{MutationKeys as y,QueryKeys as i}from"../graphqlKeys.esm.js";import{useSoundcheckAlert as l}from"../useSoundcheckAlert.esm.js";const f="Error Creating Campaign",s="Failed to create campaign.";function d(){const o=u(C),a=p(),{showAlert:n}=l(),t=m(),c=async e=>{const r=await o.createCampaign(e);if(!r)throw new Error(s);return r};return g([y.CreateCampaign],c,{onSuccess:e=>(t.captureEvent("resource_action","Create Campaign",{attributes:{resourceType:"campaign",resourceAction:"create",resourceId:e.id,success:"true"}}),Promise.all([a.invalidateQueries({queryKey:[i.GetCampaigns]}),a.invalidateQueries({queryKey:[i.GetCampaignOwners]})])),onError:e=>{let r=s;e instanceof Error&&(r=e.message),n({severity:"error",title:f,message:r}),t.captureEvent("resource_action","Create Campaign",{attributes:{resourceType:"campaign",resourceAction:"create",success:"false"}}),t.captureEvent("error","Create Campaign",{attributes:{errorMessage:r}})}})}export{d as useCreateCampaign};
|
|
1
|
+
import{useApi as u,useAnalytics as m}from"@backstage/core-plugin-api";import{useQueryClient as p,useMutation as g}from"@tanstack/react-query";import{soundcheckApiRef as C}from"../../api.esm.js";import{MutationKeys as y,QueryKeys as i}from"../graphqlKeys.esm.js";import{useSoundcheckAlert as l}from"../useSoundcheckAlert.esm.js";const f="Error Creating Campaign",s="Failed to create campaign.";function d(){const o=u(C),a=p(),{showAlert:n}=l(),t=m(),c=async e=>{const r=await o.createCampaign(e);if(!r)throw new Error(s);return r};return g([y.CreateCampaign],c,{onSuccess:e=>(t.captureEvent("resource_action","Create Campaign",{attributes:{resourceType:"campaign",resourceAction:"create",resourceId:e.id,success:"true"}}),Promise.all([a.invalidateQueries({queryKey:[i.GetCampaigns],exact:!1}),a.invalidateQueries({queryKey:[i.GetCampaignOwners],exact:!1})])),onError:e=>{let r=s;e instanceof Error&&(r=e.message),n({severity:"error",title:f,message:r}),t.captureEvent("resource_action","Create Campaign",{attributes:{resourceType:"campaign",resourceAction:"create",success:"false"}}),t.captureEvent("error","Create Campaign",{attributes:{errorMessage:r}})}})}export{d as useCreateCampaign};
|
|
2
2
|
//# sourceMappingURL=useCreateCampaign.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useApi as o}from"@backstage/core-plugin-api";import{useQuery as
|
|
1
|
+
import{useApi as o}from"@backstage/core-plugin-api";import{useQuery as c}from"@tanstack/react-query";import{soundcheckApiRef as i}from"../../api.esm.js";import{QueryKeys as m}from"../graphqlKeys.esm.js";function s(e,n,t){const r=o(i);return c([m.GetCampaigns,e],async()=>r.getCampaigns(e,t),{staleTime:1e3*60*15,cacheTime:1e3*60*60,refetchOnWindowFocus:!1,refetchOnMount:!0,refetchOnReconnect:!1,refetchInterval:!1,enabled:n})}export{s as useGetCampaigns};
|
|
2
2
|
//# sourceMappingURL=useGetCampaigns.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{uniq as y}from"lodash";import{useMemo as L}from"react";import{useGetEntityRefs as t}from"./useGetEntityRefs.esm.js";const g=(i=500,e=!0,n=[])=>{const{data:s,isLoading:d}=t({kind:["Component"]},i,e&&!n.includes("Component")),{data:o,isLoading:a}=t({kind:["System"]},i,e&&!n.includes("System")),{data:m,isLoading:r}=t({kind:["Resource"]},i,e&&!n.includes("Resource")),{data:u,isLoading:c}=t({kind:["API"]},i,e&&!n.includes("API")),f=L(()=>y([...s??[],...o??[],...m??[],...u??[]]),[u,s,m,o]);return{allLoading:d&&a&&r&&c,anyLoading:d||a||r||c,entityRefs:f}};export{g as useGetLimitedEntityRefs};
|
|
2
|
+
//# sourceMappingURL=useGetLimitedEntityRefs.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{useApi as l}from"@backstage/core-plugin-api";import{useQueryClient as c,useMutation as u}from"@tanstack/react-query";import{soundcheckApiRef as a}from"../../api.esm.js";import{MutationKeys as f,QueryKeys as m}from"../graphqlKeys.esm.js";import{useSoundcheckAlert as g}from"../useSoundcheckAlert.esm.js";const C=o=>{const t=l(a),i=c(),{showAlert:n}=g(),s=async()=>{const e=o?await t.deleteCollectorConfig(o):!1;if(!e)throw new Error("Failed to delete integration configuration.");return e};return u([f.DeleteCollectorConfig],s,{onSuccess:()=>i.invalidateQueries({queryKey:[m.GetCollectors]}),onError:e=>{let r=`Failed to delete config for integration: ${o}`;e instanceof Error&&(r=e.message),n({severity:"error",title:"Error Deleting Config",message:r})}})};export{C as useDeleteCollectorConfig};
|
|
2
|
+
//# sourceMappingURL=useDeleteCollectorConfig.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var t=(e=>(e.GetTrack="soundcheck/track",e.GetAllTracks="soundcheck/tracks",e.GetTracksApplicableEntityCount="soundcheck/tracks/applicableEntities",e.GetChecks="soundcheck/checks",e.GetCollectors="soundcheck/collectors",e.GetFactSchema="soundcheck/collectors/schema",e.GetEntityFacets="soundcheck/catalog/facets",e.GetSoftwareEntityRefsForUser="soundcheck/entities/softwareEntityRefsForUser",e.GetEntityRefs="soundcheck/catalog/entityRefs",e.ExecutableChecks="soundcheck/executableChecks",e.GetCampaigns="soundcheck/campaigns",e.GetOverallCheckPassRateTrends="soundcheck/charts/overallCheckPassRateTrends",e.GetIndividualCheckPassRateTrends="soundcheck/charts/getIndividualCheckPassRateTrends",e.GetOverallTrackPassRateTrends="soundcheck/charts/overallTrackPassRateTrends",e.GetIndividualTrackPassRateTrends="soundcheck/charts/individualTrackPassRateTrends",e.GetOverallEntityPassRateTrends="soundcheck/charts/overallEntityPassRateTrends",e.GetIndividualEntityPassRateTrends="soundcheck/charts/individualEntityPassRateTrends",e.GetOverallGroupPassRateTrends="soundcheck/charts/overallGroupPassRateTrends",e.GetIndividualGroupPassRateTrends="soundcheck/charts/individualGroupPassRateTrends",e.EntityByRef="soundcheck/catalog/entityByRef",e.EntitiesByRefs="soundcheck/catalog/entitiesByRef",e.TrackEntities="soundcheck/track/entities",e.CheckEntities="soundcheck/check/entities",e.CertificationStatus="soundcheck/certificationStatus",e.CertificationStatuses="soundcheck/certificationStatuses",e.MultipleTrackStatuses="soundcheck/multipleTrackStatuses",e.CertificationStatusHistory="soundcheck/certificationStatusHistory",e.CertificationStatusHistories="soundcheck/certificationStatusHistories",e.CheckStatus="soundcheck/checkStatus",e.CheckStatuses="soundcheck/checkStatuses",e.SavedViews="soundcheck/savedViews",e.CheckStatusHistory="soundcheck/checkStatusHistory",e.CheckStatusHistories="soundcheck/checkStatusHistories",e.CheckStatusHistoriesMultiFilter="soundcheck/checkStatusHistoriesMultiFilter",e.TrackStatusHistory="soundcheck/trackStatusHistory",e.TrackStatusHistories="soundcheck/trackStatusHistories",e.Check="soundcheck/check",e.CheckDetails="soundcheck/checkDetails",e.Certifications="soundcheck/certifications",e.CertificationDetails="soundcheck/certificationDetails",e.GetCheckOwners="soundcheck/checks/getOwners",e.GetTrackOwners="soundcheck/tracks/getOwners",e.GetCampaignOwners="soundcheck/campaigns/getOwners",e.GetTrackRelatedGroups="soundcheck/track/getTrackRelatedGroups",e.CheckTemplates="soundcheck/checkTemplates",e.GetFacetsForOwner="soundcheck/facets-for-owner",e.GetTrackOverviewForOwner="soundcheck/track-overview-for-owner",e.GetExemption="soundcheck/getExemption",e.GetExemptions="soundcheck/getExemptions",e.GetExemptCheckIds="soundcheck/getExemptCheckIds",e))(t||{}),s=(e=>(e.DeleteCheck="soundcheck/deleteCheck",e.CreateCheck="soundcheck/createCheck",e.UpdateCheck="soundcheck/updateCheck",e.ExecuteCheck="soundcheck/executeCheck",e.ImportChecks="soundcheck/importChecks",e.SetResult="soundcheck/setResult",e.CreateExemption="soundcheck/createExemption",e.UpdateExemption="soundcheck/updateExemption",e.DeleteExemption="soundcheck/deleteExemption",e.SaveView="soundcheck/saveView",e.DeleteTrack="soundcheck/deleteTrack",e.CreateTrack="soundcheck/createTrack",e.UpdateTrack="soundcheck/updateTrack",e.ImportTracks="soundcheck/importTracks",e.UpdateCollectorConfig="soundcheck/updateCollectorConfig",e.CreateCampaign="soundcheck/createCampaign",e.UpdateCampaign="soundcheck/updateCampaign",e.DeleteCampaign="soundcheck/deleteCampaign",e.ArchiveCampaign="soundcheck/archiveCampaign",e.SendCampaignNotification="soundcheck/sendCampaignNotification",e))(s||{});export{s as MutationKeys,t as QueryKeys};
|
|
1
|
+
var t=(e=>(e.GetTrack="soundcheck/track",e.GetAllTracks="soundcheck/tracks",e.GetTracksApplicableEntityCount="soundcheck/tracks/applicableEntities",e.GetChecks="soundcheck/checks",e.GetCollectors="soundcheck/collectors",e.GetFactSchema="soundcheck/collectors/schema",e.GetEntityFacets="soundcheck/catalog/facets",e.GetSoftwareEntityRefsForUser="soundcheck/entities/softwareEntityRefsForUser",e.GetEntityRefs="soundcheck/catalog/entityRefs",e.ExecutableChecks="soundcheck/executableChecks",e.GetCampaigns="soundcheck/campaigns",e.GetOverallCheckPassRateTrends="soundcheck/charts/overallCheckPassRateTrends",e.GetIndividualCheckPassRateTrends="soundcheck/charts/getIndividualCheckPassRateTrends",e.GetOverallTrackPassRateTrends="soundcheck/charts/overallTrackPassRateTrends",e.GetIndividualTrackPassRateTrends="soundcheck/charts/individualTrackPassRateTrends",e.GetOverallEntityPassRateTrends="soundcheck/charts/overallEntityPassRateTrends",e.GetIndividualEntityPassRateTrends="soundcheck/charts/individualEntityPassRateTrends",e.GetOverallGroupPassRateTrends="soundcheck/charts/overallGroupPassRateTrends",e.GetIndividualGroupPassRateTrends="soundcheck/charts/individualGroupPassRateTrends",e.EntityByRef="soundcheck/catalog/entityByRef",e.EntitiesByRefs="soundcheck/catalog/entitiesByRef",e.TrackEntities="soundcheck/track/entities",e.CheckEntities="soundcheck/check/entities",e.CertificationStatus="soundcheck/certificationStatus",e.CertificationStatuses="soundcheck/certificationStatuses",e.MultipleTrackStatuses="soundcheck/multipleTrackStatuses",e.CertificationStatusHistory="soundcheck/certificationStatusHistory",e.CertificationStatusHistories="soundcheck/certificationStatusHistories",e.CheckStatus="soundcheck/checkStatus",e.CheckStatuses="soundcheck/checkStatuses",e.SavedViews="soundcheck/savedViews",e.CheckStatusHistory="soundcheck/checkStatusHistory",e.CheckStatusHistories="soundcheck/checkStatusHistories",e.CheckStatusHistoriesMultiFilter="soundcheck/checkStatusHistoriesMultiFilter",e.TrackStatusHistory="soundcheck/trackStatusHistory",e.TrackStatusHistories="soundcheck/trackStatusHistories",e.Check="soundcheck/check",e.CheckDetails="soundcheck/checkDetails",e.Certifications="soundcheck/certifications",e.CertificationDetails="soundcheck/certificationDetails",e.GetCheckOwners="soundcheck/checks/getOwners",e.GetTrackOwners="soundcheck/tracks/getOwners",e.GetCampaignOwners="soundcheck/campaigns/getOwners",e.GetTrackRelatedGroups="soundcheck/track/getTrackRelatedGroups",e.CheckTemplates="soundcheck/checkTemplates",e.GetFacetsForOwner="soundcheck/facets-for-owner",e.GetTrackOverviewForOwner="soundcheck/track-overview-for-owner",e.GetExemption="soundcheck/getExemption",e.GetExemptions="soundcheck/getExemptions",e.GetExemptCheckIds="soundcheck/getExemptCheckIds",e))(t||{}),s=(e=>(e.DeleteCheck="soundcheck/deleteCheck",e.CreateCheck="soundcheck/createCheck",e.UpdateCheck="soundcheck/updateCheck",e.ExecuteCheck="soundcheck/executeCheck",e.ImportChecks="soundcheck/importChecks",e.SetResult="soundcheck/setResult",e.CreateExemption="soundcheck/createExemption",e.UpdateExemption="soundcheck/updateExemption",e.DeleteExemption="soundcheck/deleteExemption",e.SaveView="soundcheck/saveView",e.DeleteTrack="soundcheck/deleteTrack",e.CreateTrack="soundcheck/createTrack",e.UpdateTrack="soundcheck/updateTrack",e.ImportTracks="soundcheck/importTracks",e.UpdateCollectorConfig="soundcheck/updateCollectorConfig",e.DeleteCollectorConfig="soundcheck/deleteCollectorConfig",e.CreateCampaign="soundcheck/createCampaign",e.UpdateCampaign="soundcheck/updateCampaign",e.DeleteCampaign="soundcheck/deleteCampaign",e.ArchiveCampaign="soundcheck/archiveCampaign",e.SendCampaignNotification="soundcheck/sendCampaignNotification",e))(s||{});export{s as MutationKeys,t as QueryKeys};
|
|
2
2
|
//# sourceMappingURL=graphqlKeys.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useApi as
|
|
1
|
+
import{useApi as T}from"@backstage/core-plugin-api";import{useQueryClient as A,useQueries as L}from"@tanstack/react-query";import{useMemo as c,useState as S,useEffect as k}from"react";import{soundcheckApiRef as q}from"../../api.esm.js";const I=({trackIds:d,groupRef:o,batchSize:n=4,skip:u})=>{const h=T(q),f=A(),s=c(()=>[...d].sort(),[d]),g=c(()=>{const r=[];for(let a=0;a<s.length;a+=n)r.push(s.slice(a,a+n));return r},[s,n]),y=c(()=>g.map((r,a)=>({queryKey:["hierarchicalTrackStatuses",r,o,a],queryFn:async()=>await h.getHierarchicalTrackStatuses(r,o),enabled:!u&&r.length>0,staleTime:1e3*60*60,cacheTime:1e3*60*60*4,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1,refetchInterval:0})),[g,o,u,h]),t=L({queries:y}),[i,p]=S({loadedTracks:0,totalTracks:s.length,isLoading:!1,error:null}),m=c(()=>t.map(r=>[r.isLoading,r.error,Array.isArray(r.data)?r.data.length:0].join(":")).join("|"),[t]);return k(()=>{let r=0,a=!1,l=null;for(const e of t)e.isLoading&&(a=!0),e.error&&(l=e.error),e.data&&Array.isArray(e.data)&&(r+=e.data.length);p(e=>e.loadedTracks===r&&e.totalTracks===s.length&&e.isLoading===a&&e.error===l?e:{loadedTracks:r,totalTracks:s.length,isLoading:a,error:l})},[t,m,s.length]),k(()=>{for(const r of t)if(r.data&&Array.isArray(r.data))for(const a of r.data)f.setQueryData(["hierarchicalTrackStatus",a.trackId,o],a)},[t,f,o]),{data:c(()=>{if(t.length===0)return[];const r=[];for(const a of t)a.data&&Array.isArray(a.data)&&r.push(...a.data);return r},[t]),isLoading:i.isLoading,progress:i,error:i.error}};export{I as useBatchedHierarchicalTrackStatuses};
|
|
2
2
|
//# sourceMappingURL=useBatchedHierarchicalTrackStatuses.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useApi as
|
|
1
|
+
import{useApi as n}from"@backstage/core-plugin-api";import{useQuery as i}from"@tanstack/react-query";import{soundcheckApiRef as c}from"../../api.esm.js";const o=(r,e)=>{const t=n(c);return i({queryKey:["groupHierarchy",r,e?.ownedEntitiesFilter,!!e?.includeParent],queryFn:async()=>(await t.getGroupHierarchy(r,e?.ownedEntitiesFilter,e?.includeParent)).hierarchy,staleTime:1e3*60*60,cacheTime:1e3*60*60*4,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1,refetchInterval:!1})};export{o as useGroupHierarchy};
|
|
2
2
|
//# sourceMappingURL=useGroupHierarchy.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useApi as r}from"@backstage/core-plugin-api";import{useQuery as c}from"@tanstack/react-query";import{soundcheckApiRef as o}from"../../api.esm.js";const t=()=>{const e=r(o);return c({queryKey:["groupTypeHierarchy"],queryFn:async()=>(await e.getGroupTypeHierarchy()).hierarchy,staleTime:1e3*60*60,cacheTime:1e3*60*60*4,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1})};export{t as useGroupTypeHierarchy};
|
|
1
|
+
import{useApi as r}from"@backstage/core-plugin-api";import{useQuery as c}from"@tanstack/react-query";import{soundcheckApiRef as o}from"../../api.esm.js";const t=()=>{const e=r(o);return c({queryKey:["groupTypeHierarchy"],queryFn:async()=>(await e.getGroupTypeHierarchy()).hierarchy,staleTime:1e3*60*60,cacheTime:1e3*60*60*4,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1,refetchInterval:!1})};export{t as useGroupTypeHierarchy};
|
|
2
2
|
//# sourceMappingURL=useGroupTypeHierarchy.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useApi as a}from"@backstage/core-plugin-api";import{useQuery as i}from"@tanstack/react-query";import{soundcheckApiRef as n}from"../../api.esm.js";const o=({trackId:e,groupRef:r,skip:
|
|
1
|
+
import{useApi as a}from"@backstage/core-plugin-api";import{useQuery as i}from"@tanstack/react-query";import{soundcheckApiRef as n}from"../../api.esm.js";const o=({trackId:e,groupRef:r,skip:t})=>{const c=a(n);return i({queryKey:["hierarchicalTrackStatus",e,r],queryFn:async()=>!e||!r?null:await c.getHierarchicalTrackStatus(e,r),enabled:!t,staleTime:1e3*60*60,cacheTime:1e3*60*60*4,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1,refetchInterval:!1})};export{o as useHierarchicalTrackStatus};
|
|
2
2
|
//# sourceMappingURL=useHierarchicalTrackStatus.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useApi as i,useAnalytics as k}from"@backstage/core-plugin-api";import{useQueryClient as l,useMutation as T}from"@tanstack/react-query";import{soundcheckApiRef as m}from"../../api.esm.js";import{MutationKeys as p,QueryKeys as t}from"../graphqlKeys.esm.js";import{useSoundcheckAlert as d}from"../useSoundcheckAlert.esm.js";const y="Error Creating Track";function f(){const c=i(m),s=l(),{showAlert:o}=d(),a=k(),n=async r=>{const e=await c.createTrack(r);if(!e)throw new Error("Failed to create track.");return e};return T([p.CreateTrack],n,{onSuccess:r=>{a.captureEvent("resource_action","Create Track",{attributes:{resourceType:"track",resourceAction:"create",resourceId:r.id,success:"true"}});const e=[t.GetAllTracks,t.GetOverallTrackPassRateTrends,t.GetIndividualTrackPassRateTrends,t.GetTrackOwners,t.GetFacetsForOwner,t.GetTrackOverviewForOwner];return Promise.all(e.map(u=>s.invalidateQueries({queryKey:[u]})))},onError:r=>{let e="Failed to create track.";r instanceof Error&&(e=r.message),o({severity:"error",title:y,message:e}),a.captureEvent("resource_action","Create Track",{attributes:{resourceType:"track",resourceAction:"create",success:"false"}}),a.captureEvent("error","Create Track",{attributes:{errorMessage:e}})}})}export{f as useCreateTrack};
|
|
1
|
+
import{useApi as i,useAnalytics as k}from"@backstage/core-plugin-api";import{useQueryClient as l,useMutation as T}from"@tanstack/react-query";import{soundcheckApiRef as m}from"../../api.esm.js";import{MutationKeys as p,QueryKeys as t}from"../graphqlKeys.esm.js";import{useSoundcheckAlert as d}from"../useSoundcheckAlert.esm.js";const y="Error Creating Track";function f(){const c=i(m),s=l(),{showAlert:o}=d(),a=k(),n=async r=>{const e=await c.createTrack(r);if(!e)throw new Error("Failed to create track.");return e};return T([p.CreateTrack],n,{onSuccess:r=>{a.captureEvent("resource_action","Create Track",{attributes:{resourceType:"track",resourceAction:"create",resourceId:r.id,success:"true"}});const e=[t.GetAllTracks,t.GetOverallTrackPassRateTrends,t.GetIndividualTrackPassRateTrends,t.GetTrackOwners,t.GetFacetsForOwner,t.GetTrackOverviewForOwner];return Promise.all(e.map(u=>s.invalidateQueries({queryKey:[u],exact:!1})))},onError:r=>{let e="Failed to create track.";r instanceof Error&&(e=r.message),o({severity:"error",title:y,message:e}),a.captureEvent("resource_action","Create Track",{attributes:{resourceType:"track",resourceAction:"create",success:"false"}}),a.captureEvent("error","Create Track",{attributes:{errorMessage:e}})}})}export{f as useCreateTrack};
|
|
2
2
|
//# sourceMappingURL=useCreateTrack.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useApi as s}from"@backstage/core-plugin-api";import{useQueryClient as f,useQuery as i}from"@tanstack/react-query";import{useEffect as u}from"react";import{soundcheckApiRef as m}from"../../api.esm.js";import{QueryKeys as c}from"../graphqlKeys.esm.js";function d(r,n){const a=s(m),t=f(),e=i([c.GetAllTracks,r],async()=>a.getTracks(r),{staleTime:1e3*60*15,cacheTime:1e3*60*60,refetchOnWindowFocus:!1,refetchOnMount:!
|
|
1
|
+
import{useApi as s}from"@backstage/core-plugin-api";import{useQueryClient as f,useQuery as i}from"@tanstack/react-query";import{useEffect as u}from"react";import{soundcheckApiRef as m}from"../../api.esm.js";import{QueryKeys as c}from"../graphqlKeys.esm.js";function d(r,n){const a=s(m),t=f(),e=i([c.GetAllTracks,r],async()=>a.getTracks(r),{staleTime:1e3*60*15,cacheTime:1e3*60*60,refetchOnWindowFocus:!1,refetchOnMount:!0,refetchOnReconnect:!1,refetchInterval:!1,enabled:n?.enabled??!0});return u(()=>{if(e.data)for(const o of e.data.edges)t.setQueryData([c.GetTrack,o.node.id],o.node)},[e.data,t]),e}export{d as useGetAllTracks};
|
|
2
2
|
//# sourceMappingURL=useGetAllTracks.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useApi as
|
|
1
|
+
import{useApi as i,configApiRef as o}from"@backstage/core-plugin-api";const r=e=>(i(o).getOptionalStringArray("soundcheck.flags")||[]).includes(e);export{r as useFeatureFlag};
|
|
2
2
|
//# sourceMappingURL=useFeatureFlag.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{useAnalytics as s,useApi as p}from"@backstage/core-plugin-api";import{useRef as m,useEffect as f}from"react";import{useLocation as l}from"react-router-dom";import{soundcheckApiRef as h}from"../api.esm.js";import{createLCPReporter as d}from"../utils/lcpReporting.esm.js";function A(c={}){const{enabled:n=!0,routeName:u,additionalAttributes:o}=c,t=s(),e=l(),r=m(null),a=p(h);return f(()=>{if(!n||!t)return;const i=u||e.pathname;return r.current&&(r.current.stopMeasuring(),r.current=null),performance.clearResourceTimings(),r.current=d({analytics:t,routeName:i,additionalAttributes:{pathname:e.pathname,search:e.search,...o},soundcheckApi:a}),r.current.startMeasuring(),()=>{r.current&&(r.current.stopMeasuring(),r.current=null)}},[n,t,e.pathname,e.search,u,o,a]),{reporter:r.current}}export{A as useLCPReporting};
|
|
2
|
+
//# sourceMappingURL=useLCPReporting.esm.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -79,16 +79,15 @@ declare const SoundcheckRoutingPage: (props: OverviewPageProps) => JSX.Element;
|
|
|
79
79
|
*/
|
|
80
80
|
declare const IntegrationPageBlueprint: _backstage_frontend_plugin_api.ExtensionBlueprint<{
|
|
81
81
|
kind: "integration";
|
|
82
|
-
name: undefined;
|
|
83
82
|
params: {
|
|
84
83
|
integrationId: string;
|
|
85
84
|
loader: () => Promise<JSX.Element>;
|
|
86
85
|
path?: string;
|
|
87
86
|
routeRef?: RouteRef;
|
|
88
87
|
};
|
|
89
|
-
output: _backstage_frontend_plugin_api.
|
|
88
|
+
output: _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
|
|
90
89
|
optional: true;
|
|
91
|
-
}>;
|
|
90
|
+
}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "soundcheck.integrationId", {}>;
|
|
92
91
|
inputs: {};
|
|
93
92
|
config: {};
|
|
94
93
|
configInput: {};
|
package/dist/index.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{EntitySoundcheckCard as
|
|
1
|
+
import{EntitySoundcheckCard as d,EntitySoundcheckContent as g,GroupSoundcheckContent as a,SoundcheckOverviewPage as h,SoundcheckRoutingPage as k,soundcheckPlugin as l}from"./plugin.esm.js";import"react/jsx-runtime";import"./components/SoundcheckQueryClientProvider/SoundcheckQueryClientProvider.esm.js";import"./components/EntitySoundcheckCard/Card.esm.js";import{IntegrationPageBlueprint as f}from"./blueprints/IntegrationPageBlueprint.esm.js";import{useGetCollectors as s}from"./hooks/collectors/useGetCollectors.esm.js";import{useUpdateCollectorConfig as P}from"./hooks/collectors/useUpdateCollectorConfig.esm.js";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"./api.esm.js";import"./hooks/graphqlKeys.esm.js";import"./hooks/useSoundcheckAlert.esm.js";export{d as EntitySoundcheckCard,g as EntitySoundcheckContent,a as GroupSoundcheckContent,f as IntegrationPageBlueprint,h as SoundcheckOverviewPage,k as SoundcheckRoutingPage,l as soundcheckPlugin,s as useGetCollectors,P as useUpdateCollectorConfig};
|
|
2
2
|
//# sourceMappingURL=index.esm.js.map
|
package/dist/utils/colors.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{lighten as
|
|
1
|
+
import{lighten as x}from"@material-ui/core";import{sequentialColorInterpolators as n}from"@nivo/colors";import{rgb as p}from"d3-color";import{interpolateRgb as b}from"d3-interpolate";import{scaleLinear as w}from"d3-scale";const h=(e,t)=>w().domain([0,50,100]).range([e.palette.error.main,e.palette.warning.main,e.palette.success.main]).interpolate(b.gamma(2.2))(t),k=(e,t)=>{switch(t){case"passed":return e.palette.success.main;case"failed":return e.palette.error.main;case"warning":return e.palette.warning.main;case"error":return x(e.palette.error.main,.2);case"exempt":return e.palette.info.main;case"not-applicable":return e.palette.grey[500];case"not-reported":return e.palette.grey[700];default:return"inherit"}},v=e=>{const t=p(e.formatHex());if(!t)return 0;const r=i=>{const l=i/255;return l<=.03928?l/12.92:Math.pow((l+.055)/1.055,2.4)},a=r(t.r),o=r(t.g),c=r(t.b);return .2126*a+.7152*o+.0722*c},d=(e,t)=>{const r=v(p(e))+.05,a=v(p(t))+.05;return r>a?r/a:a/r},D=(e,t=4.5,r=10,a=.5)=>{const o=p(e);if(!o)return"#222";const c=v(o)>.5;let i=o,l={color:o.formatHex(),ratio:0};for(let s=1;s<=r;s++){i=c?o.darker(s*a):o.brighter(s*a);const f=i.formatHex(),g=d(e,f);if(g>l.ratio&&(l={color:f,ratio:g}),g>=t)return f}const u=d(e,"#000"),m=d(e,"#fff");return u>=t&&u>m?"#000":m>=t&&m>u?"#fff":l.color},C=e=>[{label:"Default",value:"default",interpolator:t=>b(e.palette.error.main,e.palette.success.main)(t)},{label:"Black Green",value:"black_green",interpolator:t=>b("#000000","#1DB954")(t)},{label:"Stoplight",value:"stoplight",interpolator:t=>h(e,t*100)},{label:"Viridis",value:"viridis",interpolator:n.viridis},{label:"Inferno",value:"inferno",interpolator:n.inferno},{label:"Plasma",value:"plasma",interpolator:n.plasma},{label:"Cividis",value:"cividis",interpolator:n.cividis},{label:"Warm",value:"warm",interpolator:n.warm},{label:"Cool",value:"cool",interpolator:n.cool},{label:"Cubehelix Default",value:"cubehelix_default",interpolator:n.cubehelixDefault}],I=(e,t)=>C(e).find(r=>r.value===t)?.interpolator??(r=>"#ccc");export{k as getCheckStatusColor,I as getColorInterpolator,C as getColorInterpolators,D as getContrastTextColor,h as getPercentageColor};
|
|
2
2
|
//# sourceMappingURL=colors.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
class r{#n;#e;#i;#r;#t=null;constructor(t){this.#n=t.analytics,this.#e=t.routeName,this.#i=t.additionalAttributes||{},this.#r=t.soundcheckApi}startMeasuring(){if("PerformanceObserver"in window){try{this.#t=new PerformanceObserver(t=>{const n=t.getEntries(),e=n[n.length-1];e&&e.renderTime!==void 0&&this.#s({value:e.renderTime,id:e.name||"unknown",delta:e.renderTime,entries:[e]})}),this.#t.observe({type:"largest-contentful-paint"})}catch{}document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&this.stopMeasuring()})}}#s(t){const n=t.value/1e3,e=this.#a(n);console.log(`[LCPReporter] LCP: ${n}s, Rating: ${e}, Route: ${this.#e||"unknown"}`),this.#r.recordLoadTime({routeName:this.#e||"unknown",loadTimeMs:t.value}).then(o=>{}),this.#o(n,e)}#o(t,n){this.#n.captureEvent("performance_metric","LCP Measurement",{attributes:{metricType:"lcp",value:t.toString(),rating:n,route:this.#e||"unknown",timestamp:Date.now().toString(),...this.#i}})}#a(t){return t<=2.5?"good":t<=4?"needs-improvement":"poor"}stopMeasuring(){this.#t&&(this.#t.disconnect(),this.#t=null)}}function s(i){return new r(i)}export{r as LCPReporter,s as createLCPReporter};
|
|
2
|
+
//# sourceMappingURL=lcpReporting.esm.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spotify/backstage-plugin-soundcheck",
|
|
3
3
|
"description": "Ensure quality, reliability and alignment of software development with codified checks and guidance.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.19.0",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"homepage": "https://backstage.spotify.com",
|
|
7
7
|
"main": "./dist/index.esm.js",
|
|
@@ -58,16 +58,16 @@
|
|
|
58
58
|
"prepare": "yarn generate"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@backstage/catalog-client": "^1.
|
|
61
|
+
"@backstage/catalog-client": "^1.11.0",
|
|
62
62
|
"@backstage/catalog-model": "^1.7.5",
|
|
63
63
|
"@backstage/config": "^1.3.3",
|
|
64
|
-
"@backstage/core-compat-api": "^0.
|
|
65
|
-
"@backstage/core-components": "^0.17.
|
|
64
|
+
"@backstage/core-compat-api": "^0.5.0",
|
|
65
|
+
"@backstage/core-components": "^0.17.5",
|
|
66
66
|
"@backstage/core-plugin-api": "^1.10.9",
|
|
67
|
-
"@backstage/frontend-plugin-api": "^0.
|
|
68
|
-
"@backstage/plugin-catalog-react": "^1.
|
|
67
|
+
"@backstage/frontend-plugin-api": "^0.11.0",
|
|
68
|
+
"@backstage/plugin-catalog-react": "^1.20.0",
|
|
69
69
|
"@backstage/plugin-permission-react": "^0.4.36",
|
|
70
|
-
"@backstage/plugin-scaffolder-react": "^1.
|
|
70
|
+
"@backstage/plugin-scaffolder-react": "^1.19.0",
|
|
71
71
|
"@backstage/types": "^1.2.1",
|
|
72
72
|
"@date-io/luxon": "^1.0.0",
|
|
73
73
|
"@hookform/resolvers": "^4.0.0",
|
|
@@ -83,8 +83,9 @@
|
|
|
83
83
|
"@nivo/icicle": "^0.99.0",
|
|
84
84
|
"@nivo/sunburst": "^0.99.0",
|
|
85
85
|
"@nivo/treemap": "^0.99.0",
|
|
86
|
-
"@
|
|
87
|
-
"@spotify/backstage-plugin-
|
|
86
|
+
"@remixicon/react": "^4.6.0",
|
|
87
|
+
"@spotify/backstage-plugin-core": "^0.8.10",
|
|
88
|
+
"@spotify/backstage-plugin-soundcheck-common": "^0.19.0",
|
|
88
89
|
"@tanstack/react-query": "^4.6.1",
|
|
89
90
|
"@tanstack/react-virtual": "^3.13.9",
|
|
90
91
|
"@types/react-csv": "^1.1.6",
|
|
@@ -111,6 +112,7 @@
|
|
|
111
112
|
"react-circular-progressbar": "^2.1.0",
|
|
112
113
|
"react-confetti": "^6.1.0",
|
|
113
114
|
"react-csv": "^2.2.2",
|
|
115
|
+
"react-helmet": "^6.1.0",
|
|
114
116
|
"react-hook-form": "^7.51.5",
|
|
115
117
|
"react-markdown": "^10.1.0",
|
|
116
118
|
"react-simple-code-editor": "^0.14.1",
|
|
@@ -132,21 +134,21 @@
|
|
|
132
134
|
"react-router-dom": "6.0.0-beta.0 || ^6.3.0"
|
|
133
135
|
},
|
|
134
136
|
"devDependencies": {
|
|
135
|
-
"@backstage/cli": "^0.
|
|
137
|
+
"@backstage/cli": "^0.34.0",
|
|
136
138
|
"@backstage/core-app-api": "^1.18.0",
|
|
137
|
-
"@backstage/dev-utils": "^1.1.
|
|
139
|
+
"@backstage/dev-utils": "^1.1.13",
|
|
138
140
|
"@backstage/e2e-test-utils": "^0.1.1",
|
|
139
|
-
"@backstage/frontend-test-utils": "^0.3.
|
|
141
|
+
"@backstage/frontend-test-utils": "^0.3.5",
|
|
140
142
|
"@backstage/plugin-permission-common": "^0.9.1",
|
|
141
|
-
"@backstage/test-utils": "^1.7.
|
|
143
|
+
"@backstage/test-utils": "^1.7.11",
|
|
142
144
|
"@graphql-codegen/cli": "^5.0.0",
|
|
143
145
|
"@graphql-codegen/typescript": "^4.0.0",
|
|
144
146
|
"@graphql-codegen/typescript-graphql-request": "^6.0.0",
|
|
145
147
|
"@graphql-codegen/typescript-operations": "^4.0.0",
|
|
146
148
|
"@playwright/test": "^1.32.3",
|
|
147
149
|
"@sp4b-dev/test-utils": "^0.0.13",
|
|
148
|
-
"@spotify/backstage-plugin-core-common": "^0.6.
|
|
149
|
-
"@spotify/backstage-plugin-soundcheck-node": "^0.
|
|
150
|
+
"@spotify/backstage-plugin-core-common": "^0.6.9",
|
|
151
|
+
"@spotify/backstage-plugin-soundcheck-node": "^0.10.0",
|
|
150
152
|
"@testing-library/jest-dom": "^6.0.0",
|
|
151
153
|
"@testing-library/react": "^14.0.0",
|
|
152
154
|
"@testing-library/user-event": "^14.0.0",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as t,jsxs as p}from"react/jsx-runtime";import{makeStyles as b,useTheme as v,Box as a,Paper as k,Typography as D,Tooltip as R}from"@material-ui/core";import u from"@material-ui/lab/Skeleton";import{DateTime as A}from"luxon";import{CircularProgressbar as $,buildStyles as B}from"react-circular-progressbar";import{getChartFontColor as x,formatDate as O}from"../Charts/chartUtils.esm.js";import{getApplicableCheckCount as P}from"../TrackPage/TrackEntitiesTable/utils.esm.js";import{getProgressColor as g}from"../TrackPage/utils.esm.js";import{CheckHistoryChart as T}from"./CheckHistoryChart.esm.js";import{getCheckName as W}from"./utils.esm.js";const y=b(e=>({card:{display:"flex",flexDirection:"column",border:`1px solid ${e.palette.divider}`,width:"99%"},title:{fontWeight:"bold",fontSize:"0.9rem",cursor:"default",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},headerRow:{display:"flex",padding:e.spacing(1.5,2),borderBottom:`1px solid ${e.palette.divider}`,width:"100%"},headerSection:{display:"flex",flexDirection:"column",gap:e.spacing(.5),flexGrow:1,width:"100%"},contentRow:{padding:e.spacing(1.5,2,.5),display:"flex"},leftSection:{width:"75px",minWidth:"75px"},summaryCard:{height:"100%",display:"flex",flexDirection:"column",justifyContent:"space-between"},chartSection:{flex:1,width:"100%",minWidth:"150px"},chartSkeletonSection:{flex:1,width:"100%",minWidth:"150px",padding:e.spacing(0,0,1,1)},overallSummaryBox:{display:"flex",flexDirection:"column",height:"100%",color:x(e),textAlign:"center",gap:e.spacing(2)}})),j=()=>{const e=y();return p(a,{className:e.contentRow,children:[t(a,{className:e.leftSection,children:t(a,{className:e.summaryCard,children:t(u,{variant:"circle",height:75})})}),t(a,{className:e.chartSkeletonSection,children:t(u,{variant:"rect",height:92})})]})};function z(e){if(!e)return[];const{history:n}=e,r=A.utc();return n.map((i,o)=>{const l=P(i);return{name:O(r,n.length-o-1),passRate:l?Math.round(i.passed/l*100):0}})}function E(e){if(!e)return 0;const{passed:n,exempt:r}=e,i=e.numberOfEntities-e.notApplicable-e.exempt;return i?Math.round((n+r)/i*100):0}function H(e){if(!e)return{numerator:0,denominator:0};const{passed:n,exempt:r}=e,i=e.numberOfEntities-e.notApplicable-e.exempt;return{numerator:n+r,denominator:i}}const M=({check:e,track:n,status:r,history:i})=>{const o=y(),l=v(),C={dataKey:"passRate",name:"Pass rate"},S=i?.history?.length??0,N=z(i),s=E(r);let m;r?m=`${s}%`:m="No Data";let d=!1,c;if(!r)c="No Data";else{const{numerator:w,denominator:f}=H(r);f>0?(d=!0,c=`${w} of ${f} entities passing`):c="No Applicable Entities"}const h=d?t(a,{className:o.overallSummaryBox,children:t($,{value:s,text:m,styles:B({textColor:x(l),pathColor:g(l,s),trailColor:l.palette.divider,textSize:S?void 0:10})})}):null;return p(k,{className:o.card,elevation:0,children:[t(a,{className:o.headerRow,children:t(a,{className:o.headerSection,children:t(D,{className:o.title,children:W(n,e)})})}),!r||!i?t(j,{}):t(R,{title:c,children:p(a,{className:o.contentRow,children:[h&&t(a,{className:o.leftSection,children:t(a,{className:o.summaryCard,children:h})}),t(a,{className:o.chartSection,children:t(T,{data:d?N:[],lineConfig:C,color:g(l,s)})})]})})]})};export{M as CheckCard};
|
|
2
|
-
//# sourceMappingURL=CheckCard.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as t,jsxs as m}from"react/jsx-runtime";import{useTheme as n}from"@material-ui/core";import{ResponsiveContainer as s,AreaChart as d,CartesianGrid as h,XAxis as p,YAxis as A,Area as l}from"recharts";import{CARTESIAN_GRID_OPACITY as C,CHART_DATA_KEY as c,HORIZONTAL_Y_AXIS_WIDTH as f,AXIS_DOMAIN as y}from"../Charts/ChartTypes.esm.js";import"../Charts/LineChart/LineChart.esm.js";import{getChartFontColor as I}from"../Charts/chartUtils.esm.js";import"luxon";import"../TechHealthSummary/SummaryAggregationsProvider.esm.js";import"@backstage/catalog-model";import"../Charts/BarChart/BarChart.esm.js";import{LineChartPlaceholder as _}from"../Charts/LineChart/LineChartPlaceholder.esm.js";const T=({data:o,lineConfig:e,color:r})=>{const a=n(),i=I(a);return o.length?t(s,{minHeight:100,debounce:1,children:m(d,{data:o,children:[t(h,{vertical:!1,opacity:C}),t(p,{dataKey:c,stroke:i,style:{fontSize:"0.7rem"}}),t(A,{width:f,domain:y,stroke:i,style:{fontSize:"0.7rem"}}),t(l,{dataKey:e.dataKey,name:e.name,stackId:"1",type:"monotone",stroke:r,strokeWidth:1.2,fill:r},e.dataKey)]})}):t(_,{height:100})};export{T as CheckHistoryChart};
|
|
2
|
-
//# sourceMappingURL=CheckHistoryChart.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsxs as p,Fragment as s,jsx as r}from"react/jsx-runtime";import{withStyles as w,Button as C,makeStyles as S,Popover as P,TextField as I,Checkbox as O}from"@material-ui/core";import T from"@material-ui/icons/ArrowDropDown";import{Autocomplete as z}from"@material-ui/lab";import{useState as F}from"react";import{ListboxVirtualized as L}from"../ListboxVirtualized/ListboxVirtualized.esm.js";const d=w(o=>({root:{color:o.palette.text.primary,paddingLeft:o.spacing(1),paddingRight:o.spacing(1),textTransform:"initial",fontSize:o.typography.body1.fontSize}}))(C),$=S(o=>({root:{borderBottom:`1px solid ${o.palette.grey.A100}`,padding:o.spacing(1.5),backgroundColor:o.palette.background.paper},popper:{width:300,height:400,overflow:"hidden"},paper:{boxShadow:"none",margin:0},popperDisablePortal:{width:"100% !important"},listbox:{border:"none",height:400},option:{padding:`${o.spacing(.5)}px !important`,'&[data-selected="true"]':{background:"inherit"}},chips:{display:"flex",flexWrap:"wrap"},chip:{margin:1}})),B=({name:o,options:c,label:l,icon:m,filters:h,setFilters:u,disabled:g,customRenderOption:f})=>{const t=$(),[n,a]=F(null),b=e=>{a(e.currentTarget)},x=()=>{a(null)},v=(e,i)=>{u(i)},y=e=>r(I,{...e,name:"filter",variant:"outlined",placeholder:"Filter",fullWidth:!0}),k=(e,{selected:i})=>p(s,{children:[r(O,{value:e,checked:i,color:"primary"}),e]});return p(s,{children:[r(d,{startIcon:m,endIcon:r(T,{}),onClick:b,disabled:g,children:l}),r(P,{id:`${l}-filter-popover`,open:!!n,anchorEl:n,onClose:x,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},PaperProps:{elevation:4,className:t.popper},children:r(z,{multiple:!0,disablePortal:!0,classes:{root:t.root,paper:t.paper,popperDisablePortal:t.popperDisablePortal,listbox:t.listbox,option:t.option},ListboxComponent:L,renderOption:f??k,id:`multi-select-filter-${o}--select`,value:h,options:c,limitTags:3,onChange:v,getOptionSelected:(e,i)=>e.toLowerCase()===i.toLowerCase(),renderInput:y,renderTags:()=>null,closeIcon:null,popupIcon:null,handleHomeEndKeys:!0,clearOnEscape:!0,open:!0})})]})};export{d as QuickFilterButton,B as default};
|
|
2
|
-
//# sourceMappingURL=MultiSelectFilter.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as o,jsxs as n}from"react/jsx-runtime";import{Dialog as s,Box as i,Typography as r,Link as a,Button as d}from"@material-ui/core";import{useState as m,useEffect as h}from"react";import{getQuickstartStyles as u}from"./styles.esm.js";const k=()=>{const e=u(),[l,t]=m(!1),c=()=>{t(!1)};return h(()=>{localStorage.getItem("hasSeenSoundcheckWelcomeModal")||(t(!0),localStorage.setItem("hasSeenSoundcheckWelcomeModal","true"))},[]),o(s,{open:l,onClose:c,"aria-labelledby":"modal-title","aria-describedby":"modal-description",children:n(i,{className:e.modal,children:[o(r,{id:"modal-title",variant:"h4",component:"div",className:e.headers,children:"Welcome to Soundcheck"}),n(r,{variant:"body1",component:"div",className:e.page,children:["You\u2019ll find default"," ",o(a,{href:"/soundcheck/tracks",className:e.link,target:"_blank",rel:"noopener noreferrer",children:"tracks"}),", ",o(a,{href:"/soundcheck/checks",className:e.link,target:"_blank",rel:"noopener noreferrer",children:"checks"}),", ","and"," ",o(a,{href:"/soundcheck/integrations",className:e.link,target:"_blank",rel:"noopener noreferrer",children:"integrations"})," ","to get you started. If you want, you can change and delete these at any time."]}),n(r,{variant:"body1",component:"div",className:e.page,children:["Check out our"," ",o(a,{href:"https://backstage.spotify.com/docs/plugins/soundcheck/",className:e.link,target:"_blank",rel:"noopener noreferrer",children:"documentation"})," ","to learn more about Soundcheck."]}),o("div",{className:e.modalButtonContainer,children:o(d,{onClick:c,variant:"contained",children:"Got it"})})]})})};export{k as WelcomeModal};
|
|
2
|
-
//# sourceMappingURL=WelcomeModal.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import"react/jsx-runtime";import{makeStyles as i}from"@material-ui/core";import{sequentialColorInterpolators as t}from"@nivo/colors";import{interpolateRgb as o}from"d3-interpolate";import"react-router-dom";import{getPercentageColor as n}from"../../utils/colors.esm.js";i(e=>({colorSwatch:{borderRadius:4},colorSwatchContainer:{width:90,height:20},colorSwatchMenuItem:{width:90,height:20},selectorContainer:{minWidth:80},renderValueContainer:{display:"flex",alignItems:"center",paddingRight:e.spacing(3)},menuItemContainer:{display:"flex",alignItems:"center"}}));const r=e=>[{label:"Default",value:"default",interpolator:l=>o(e.palette.error.main,e.palette.success.main)(l)},{label:"Black Green",value:"black_green",interpolator:l=>o("#000000","#1DB954")(l)},{label:"Stoplight",value:"stoplight",interpolator:l=>n(e,l*100)},{label:"Viridis",value:"viridis",interpolator:t.viridis},{label:"Inferno",value:"inferno",interpolator:t.inferno},{label:"Plasma",value:"plasma",interpolator:t.plasma},{label:"Cividis",value:"cividis",interpolator:t.cividis},{label:"Warm",value:"warm",interpolator:t.warm},{label:"Cool",value:"cool",interpolator:t.cool},{label:"Cubehelix Default",value:"cubehelix_default",interpolator:t.cubehelixDefault}],p=(e,l)=>r(e).find(a=>a.value===l)?.interpolator??(a=>"#ccc");export{p as getColorInterpolator,r as getColorInterpolators};
|
|
2
|
-
//# sourceMappingURL=ColorSchemeSelector.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as r,jsxs as s,Fragment as Te}from"react/jsx-runtime";import{useApi as re,useRouteRef as we,configApiRef as Le}from"@backstage/core-plugin-api";import{entityPresentationApiRef as Ie}from"@backstage/plugin-catalog-react";import{useTheme as ze,Box as a,Select as ne,MenuItem as T,CircularProgress as De,Typography as ae,Tabs as Pe,Tab as le}from"@material-ui/core";import{makeStyles as We}from"@material-ui/core/styles";import{sequentialColorInterpolators as N}from"@nivo/colors";import{interpolateRgb as oe}from"d3-interpolate";import{useState as w,useMemo as ce,useCallback as E,useEffect as L,useRef as se}from"react";import{useSearchParams as $e,useNavigate as Be}from"react-router-dom";import He from"react-use/lib/useLocalStorage";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{useGetAllTracks as Ee}from"../../hooks/tracks/useGetAllTracks.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{useGroupOptions as Ge}from"../../hooks/groups/useGroupOptions.esm.js";import{useHierarchicalTrackStatus as Ae}from"../../hooks/heirarchy/useHierarchicalTrackStatus.esm.js";import{useGroupHierarchy as Ue}from"../../hooks/heirarchy/useGroupHierarchy.esm.js";import{trackDetailsRouteRef as je}from"../../routes.esm.js";import{getPercentageColor as Fe}from"../../utils/colors.esm.js";import{FormFieldLabel as K}from"../FormFieldLabel/FormFieldLabel.esm.js";import"../SoundcheckHeader/SoundcheckHeader.esm.js";import"../SoundcheckHeader/SoundcheckHeaderContext.esm.js";import{useHeader as Me}from"../SoundcheckHeader/useHeader.esm.js";import{TrackEntitiesTable as Oe}from"../TrackPage/TrackEntitiesTable/TrackEntitiesTable.esm.js";import{TrackSelection as Ve}from"../TrackSelection/TrackSelection.esm.js";import _e from"./ColorLegend.esm.js";import{HierarchyTable as Ze}from"./HierarchyTable.esm.js";import{hierarchyToNivo as G}from"./hierarchyToNivo.esm.js";import qe from"./LowestPerformingTeams.esm.js";import me from"./NivoCirclePacking.esm.js";import Ke from"./NivoIcicle.esm.js";import Qe from"./NivoSunburst.esm.js";import Ye from"./NivoTreemap.esm.js";import{SelectedNodeSidebar as Je}from"./SelectedNodeSidebar.esm.js";import{TechInsightsGroupSelector as Xe}from"./TechInsightsGroupSelector.esm.js";import et from"./TopPerformingTeams.esm.js";import{VisualizationBreadcrumb as tt}from"./VisualizationBreadcrumb.esm.js";const de=We(i=>({root:{display:"flex",flexDirection:"column",height:"100%",padding:i.spacing(2)},mainContent:{flex:1,display:"flex",flexDirection:"column",minHeight:0},controlsContainer:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:i.spacing(2)},leftControls:{display:"flex",gap:i.spacing(2),alignItems:"flex-end"},rightControls:{display:"flex",gap:i.spacing(2),alignItems:"center"},trackSelect:{minWidth:200},visualizationSelect:{minWidth:120},colorSchemeSelect:{minWidth:80},visualizationContainer:{flex:1,minHeight:400,display:"flex",flexDirection:"column",gap:i.spacing(.5),width:"100%"},visualizationHeader:{display:"flex",justifyContent:"flex-end",alignItems:"center",marginBottom:i.spacing(2)},visualizationBox:{flex:1,minHeight:500},visualizationWrapper:{display:"flex",flexDirection:"row",height:"calc(100% - 56px)"},colorLegendContainer:{marginLeft:i.spacing(2),display:"flex",alignItems:"center"},colorLegendWrapper:{width:300},visualizationContent:{flex:1},loadingContainer:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%",minHeight:500,backgroundColor:i.palette.background.default,borderRadius:i.shape.borderRadius},loadingSpinner:{marginBottom:i.spacing(2)},loadingText:{color:i.palette.text.secondary,fontSize:"1.1rem",fontWeight:500,textAlign:"center"},loadingSubtext:{color:i.palette.text.secondary,fontSize:"0.875rem",opacity:.8,textAlign:"center",marginTop:i.spacing(1)},summaryContainer:{display:"flex",flexDirection:"row",width:"100%",minHeight:300,padding:24},summaryBox:{flex:1,minWidth:0,display:"flex",flexDirection:"column"},summaryBoxLeft:{marginRight:i.spacing(1)},summaryBoxRight:{marginLeft:i.spacing(1)},entitiesContainer:{padding:24},tabsContainer:{width:"100%",marginTop:24},layoutContainer:{display:"flex",height:"100%"},mainLayout:{flex:3,display:"flex",flexDirection:"column",minWidth:0},mainLayoutTable:{flex:1,display:"flex",flexDirection:"column",minWidth:0},sidebarContainer:{flex:1,minWidth:320,marginLeft:24,borderLeft:`1px solid ${i.palette.divider}`,paddingLeft:24},breadcrumbContainer:{flex:1,marginRight:16}}));function ue({interpolator:i,width:S=100,height:p=16,steps:l=40,style:m={}}){const x=`linear-gradient(to right, ${Array.from({length:l},(f,W)=>{const n=W/(l-1);return i(n)}).join(",")})`;return r(a,{style:{width:S,height:p,background:x,borderRadius:4,...m}})}function pe(i){const{children:S,value:p,index:l,...m}=i,x=de();return r("div",{role:"tabpanel",hidden:p!==l,id:`tabpanel-${l}`,"aria-labelledby":`tab-${l}`,className:x.mainContent,...m,children:p===l&&S})}const it=()=>{const i=de(),S=ze(),p=re(Ie),[l,m]=$e(),x=l.get("track")||"",[f,W]=w(x),n=l.get("group"),I=l.get("node"),[Q,Y]=w(null),[A,fe]=w(0),he=Be(),ge=we(je),[ye,h]=w(null),[d,v]=w(null),[J,$]=w(!1);Me({title:"Tech Insights"});const{data:ve}=Ee({}),c=ve?.edges.find(e=>e.node.id===f)?.node,{data:g,isLoading:be}=Ue(n||void 0,{enabled:!!n&&!!f&&!!c,ownedEntitiesFilter:c?.filter??void 0}),{data:u}=Ae({trackId:f,groupRef:n||"",skip:!f||!n}),xe=ce(()=>c?.levels?c.levels.flatMap(e=>e.checks.map(t=>t.id)):[],[c]),C=l.get("visualization")||"treemap",X=l.get("colors")||"default",U=E((e,t)=>{if(e.entityRef===t)return e;if(e.children)for(const o of e.children){const R=U(o,t);if(R)return R}return null},[]);L(()=>{if(I&&g&&n&&u&&c){const e=g[n];if(e){const t=G(e,u||null,()=>"#ccc",p,void 0);if(t){const o=U(t,I);o&&(v(o),h(o))}}}},[I,g,n,u,c,U,p]),L(()=>{if(!d&&!I&&!J&&g&&n&&u&&c){const e=g[n];if(e){const t=G(e,u||null,()=>"#ccc",p,void 0);if(t)if(C==="table"){const o=(R=>{const D=[],P=y=>{!y.children||y.children.length===0?y.numberOfEntities>0&&D.push(y):y.children.forEach(q=>P(q))};return P(R),D})(t);o.length>0?(v(o[0]),h(o[0])):(v(t),h(t))}else v(t),h(t)}}},[d,I,J,g,n,u,c,p,C]);const j=E(e=>{v(e),h(e),e===null&&d!==null?$(!0):e!==null&&$(!1);const t=new URLSearchParams(l.toString());e&&e.entityRef!==n?t.set("node",e.entityRef):t.delete("node"),m(t,{replace:!0})},[l,m,n,d]),{options:b,isLoading:B}=Ge(),[F,M]=He("soundcheck.overview.groupRef",null),z=n,O=re(Le).getOptionalString("soundcheck.overview.defaultSelectedGroupType"),H=ce(()=>{if(!B&&b.length){if(z||F){const e=z??F;return b.find(t=>t.ref===e)??b[0]}else if(O)return b.find(e=>e.type===O)??b[0];return b[0]}return null},[O,B,b,z,F]);L(()=>{if(!B&&b.length&&!z&&H){const e=new URLSearchParams(l.toString());e.set("group",H.ref),m(e,{replace:!0}),M(H.ref)}},[B,b,z,H,l,m,M]);const Ce=E(e=>{W(e);const t=new URLSearchParams(l.toString());t.set("track",e),n&&t.delete("group"),t.delete("node"),m(t),v(null),h(null)},[l,n,m]),ee=se(null),te=E(()=>{v(null),h(null),$(!1);const e=new URLSearchParams(l.toString());e.delete("node"),m(e,{replace:!0})},[l,m]),V=se(null);L(()=>{if(V.current&&V.current!==C&&g&&n&&u&&c){const e=g[n];if(e){const t=G(e,u||null,()=>"#ccc",p,void 0);if(t)if(C==="table"){const o=(R=>{const D=[],P=y=>{!y.children||y.children.length===0?y.numberOfEntities>0&&D.push(y):y.children.forEach(q=>P(q))};return P(R),D})(t);o.length>0&&(v(o[0]),h(o[0]))}else v(t),h(t)}}V.current=C},[C,g,n,u,c,p]),L(()=>{n&&n!==ee.current&&te(),ee.current=n},[n,te]),L(()=>{f!==x&&W(x)},[x]);const Se=e=>{const t=e.target.value;if(t!==null){const o=new URLSearchParams(l.toString());o.set("visualization",t),m(o),Y(null),$(!1)}},ke=e=>{const t=new URLSearchParams(l.toString());t.set("colors",e.target.value),m(t)},Ne=(e,t)=>{fe(t)},_=e=>{if(!f)return;const t=ge({trackId:f});he(`${t}?owners=${encodeURIComponent(e)}`,{replace:!0})},Z=[{label:"Default",value:"default",interpolator:e=>oe(S.palette.error.main,S.palette.success.main)(e)},{label:"Black Green",value:"black_green",interpolator:e=>oe("#000000","#1DB954")(e)},{label:"Stoplight",value:"stoplight",interpolator:e=>Fe(S,e*100)},{label:"Viridis",value:"viridis",interpolator:N.viridis},{label:"Inferno",value:"inferno",interpolator:N.inferno},{label:"Plasma",value:"plasma",interpolator:N.plasma},{label:"Cividis",value:"cividis",interpolator:N.cividis},{label:"Warm",value:"warm",interpolator:N.warm},{label:"Cool",value:"cool",interpolator:N.cool},{label:"Cubehelix Default",value:"cubehelix_default",interpolator:N.cubehelixDefault}],ie=Z.find(e=>e.value===X)?.interpolator??(e=>"#ccc"),k=e=>ie(e/100),Re=()=>{if(!n||!f||!c)return null;const e={trackId:f,groupRef:n,track:c,hierarchyData:g,trackStatus:u,getColor:k,onZoomChange:Y,onNodeHover:t=>h(t),hoveredNode:ye,selectedNode:d,onNodeSelect:j};switch(C){case"treemap":return r(Ye,{...e});case"icicle":return r(Ke,{...e});case"sunburst":return r(Qe,{...e});case"circlepack":return r(me,{...e});case"table":{const t=g?.[n];if(!t)return null;const o=G(t,u||null,k,p,void 0);return r(Ze,{hierarchyData:o??null,track:c,getColor:k,onTeamClick:_,selectedNode:d,onNodeSelect:j,trackStatus:u})}default:return r(me,{...e})}};return r(a,{className:i.root,children:s(a,{className:i.layoutContainer,children:[r(a,{className:i.mainLayout,children:s(a,{className:i.mainContent,children:[s(a,{className:i.controlsContainer,children:[s(a,{className:i.leftControls,children:[r(Xe,{onChange:e=>{v(null),h(null),M(e)}}),s(a,{minWidth:240,children:[r(K,{title:"Select Track"}),r(Ve,{selectedTrackId:f,selectTrack:Ce,selectedGroupRef:n??""})]})]}),s(a,{className:i.rightControls,children:[s(a,{className:i.visualizationSelect,children:[r(K,{title:"Visualization"}),s(ne,{value:C,onChange:Se,displayEmpty:!0,fullWidth:!0,margin:"dense",children:[r(T,{value:"circlepack",children:"Circle Pack"}),r(T,{value:"icicle",children:"Icicle"}),r(T,{value:"sunburst",children:"Sunburst"}),r(T,{value:"treemap",children:"Treemap"}),r(T,{value:"table",children:"Table"})]})]}),s(a,{className:i.colorSchemeSelect,children:[r(K,{title:"Color Scheme"}),r(ne,{value:X,fullWidth:!0,onChange:ke,margin:"dense",renderValue:e=>{const t=Z.find(o=>o.value===e)?.interpolator;return r(a,{display:"flex",alignItems:"center",pr:3,children:typeof t=="function"&&r(ue,{interpolator:t,width:90,height:20})})},children:Z.map(e=>r(T,{value:e.value,children:r(a,{display:"flex",alignItems:"center",children:e.interpolator&&r(ue,{interpolator:e.interpolator,width:90,height:20})})},e.value))})]})]})]}),f&&n&&s(Te,{children:[s(a,{className:i.visualizationContainer,children:[s(a,{mb:.5,display:"flex",alignItems:"center",children:[r(a,{className:i.breadcrumbContainer,children:r(tt,{node:d,onNodeClick:e=>{j(e)}})}),r(a,{className:i.colorLegendWrapper,children:r(_e,{interpolator:ie,orientation:"horizontal",height:24,width:"100%",markerValue:d?d.passPercentage:void 0})})]}),r(a,{className:i.visualizationContent,children:be?s(a,{className:i.loadingContainer,children:[r(De,{className:i.loadingSpinner,size:48}),r(ae,{className:i.loadingText,children:"Loading organization hierarchy..."}),r(ae,{className:i.loadingSubtext,children:"This may take a few moments while we gather data about your organization."})]}):Re()})]}),s(a,{className:i.tabsContainer,children:[s(Pe,{value:A,onChange:Ne,indicatorColor:"primary",textColor:"primary",children:[r(le,{label:"Summary"}),r(le,{label:"Entities"})]}),r(pe,{value:A,index:0,children:s(a,{className:i.summaryContainer,children:[r(a,{className:`${i.summaryBox} ${i.summaryBoxLeft}`,children:r(qe,{trackStatus:u||null,getColor:k,onTeamClick:_})}),r(a,{className:`${i.summaryBox} ${i.summaryBoxRight}`,children:r(et,{trackStatus:u||null,getColor:k,onTeamClick:_})})]})}),r(pe,{value:A,index:1,children:r(a,{className:i.entitiesContainer,children:c&&r(Oe,{track:c,initialPageSize:10,owners:d&&d.entityRef!==n?[d.entityRef]:Q?[Q]:[n],getColor:k})})})]})]})]})}),r(a,{className:i.sidebarContainer,children:d&&r(Je,{node:d,checkIds:xe,track:c,getColor:k})})]})})};export{it as HierarchicalTechInsightsPage};
|
|
2
|
-
//# sourceMappingURL=HierarchicalTechInsightsPage.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsxs as h,jsx as t}from"react/jsx-runtime";import{EntityRefLink as U}from"@backstage/plugin-catalog-react";import{makeStyles as V,Typography as w,TableContainer as K,Paper as W,Table as $,TableHead as q,TableRow as I,TableCell as l,TableBody as F,Box as G,TablePagination as J}from"@material-ui/core";import N from"@material-ui/icons/ArrowDownward";import P from"@material-ui/icons/ArrowUpward";import Q from"@material-ui/icons/ChevronRight";import{useState as g,useEffect as X,useMemo as E}from"react";import{useSearchParams as Y}from"react-router-dom";import{ColorChip as Z}from"../ColorChip/ColorChip.esm.js";import{TeamStatusBar as _}from"./TeamStatusBar.esm.js";const ee=V(r=>({tableContainer:{display:"flex",flexDirection:"column",height:"100%"},selectedRow:{backgroundColor:r.palette.action.selected,"&:hover":{backgroundColor:r.palette.action.hover}},table:{"& tbody tr":{cursor:"pointer","&:hover":{backgroundColor:r.palette.action.hover}},"& tbody tr.selected":{backgroundColor:r.palette.action.selected,"&:hover":{backgroundColor:r.palette.action.selected}}},headerCell:{cursor:"pointer"},headerContent:{display:"flex",alignItems:"center"},sortIconContainer:{width:"24px",display:"flex",justifyContent:"center"},sortIcon:{fontSize:"20px"},tableContainerPaper:{boxShadow:"none"},title:{padding:"16px 0 8px 0"},chevronIcon:{fontSize:"20px"},chevronCell:{verticalAlign:"middle",padding:"8px 4px",lineHeight:1},placeholderDiv:{width:"20px",height:"20px",display:"inline-block"},statusColumnHeader:{width:"300px"},statusColumnCell:{width:"100%"}})),te=r=>{const m=[],p=o=>{!o.children||o.children.length===0?o.numberOfEntities>0&&m.push(o):o.children.forEach(u=>p(u))};return p(r),m},T=(r,m)=>{if(!r||typeof r!="object")return null;if(r.groupRef===m)return r.status;if(r.children&&Array.isArray(r.children))for(const p of r.children){const o=T(p,m);if(o)return o}return null},ne=({hierarchyData:r,getColor:m,onTeamClick:p,selectedNode:o,onNodeSelect:u,trackStatus:S})=>{const n=ee(),[f,x]=Y(),[y,R]=g(0),[C,O]=g(10),B=f.get("sortBy"),H=f.get("direction"),[d,L]=g(B||"passPercentage"),[s,D]=g(H||"desc");X(()=>{const e=new URLSearchParams(f.toString());e.set("sortBy",d),e.set("direction",s),x(e,{replace:!0})},[d,s,f,x]);const b=E(()=>r?te(r):[],[r]),k=E(()=>b.map(e=>({id:e.entityRef,name:e.name,entityRef:e.entityRef,passPercentage:e.passPercentage,numberOfEntities:e.numberOfEntities})).sort((e,c)=>{let a,i;switch(d){case"name":a=e.name.toLowerCase(),i=c.name.toLowerCase();break;case"passPercentage":a=e.passPercentage,i=c.passPercentage;break;case"numberOfEntities":a=e.numberOfEntities,i=c.numberOfEntities;break;default:return 0}return typeof a=="number"&&typeof i=="number"?s==="asc"?a-i:i-a:typeof a=="string"&&typeof i=="string"?s==="asc"?a.localeCompare(i):i.localeCompare(a):s==="asc"?a<i?-1:a>i?1:0:a>i?-1:a<i?1:0}),[b,d,s]);if(!r)return null;const j=e=>{if(u)if(o&&e.entityRef===o.entityRef)u(null);else{const c=b.find(a=>a.entityRef===e.entityRef);u(c||null)}},z=(e,c)=>{R(c)},A=e=>{O(parseInt(e.target.value,10)),R(0)},v=e=>{D(d===e&&s==="asc"?"desc":"asc"),L(e)},M=k.slice(y*C,y*C+C);return h("div",{className:n.tableContainer,children:[t(w,{variant:"h6",className:n.title,children:"Teams"}),t(K,{component:W,className:n.tableContainerPaper,children:h($,{children:[t(q,{children:h(I,{children:[t(l,{width:"32px"}),t(l,{className:n.headerCell,onClick:()=>v("name"),children:h("div",{className:n.headerContent,children:["Team",t("div",{className:n.sortIconContainer,children:d==="name"&&(s==="asc"?t(P,{className:n.sortIcon}):t(N,{className:n.sortIcon}))})]})}),t(l,{className:n.headerCell,onClick:()=>v("numberOfEntities"),children:h("div",{className:n.headerContent,children:["Entities",t("div",{className:n.sortIconContainer,children:d==="numberOfEntities"&&(s==="asc"?t(P,{className:n.sortIcon}):t(N,{className:n.sortIcon}))})]})}),t(l,{className:n.headerCell,onClick:()=>v("passPercentage"),children:h("div",{className:n.headerContent,children:["Compliance",t("div",{className:n.sortIconContainer,children:d==="passPercentage"&&(s==="asc"?t(P,{className:n.sortIcon}):t(N,{className:n.sortIcon}))})]})}),t(l,{className:n.statusColumnHeader})]})}),t(F,{children:M.map(e=>{const c=o&&e.entityRef===o.entityRef;return h(I,{hover:!0,onClick:()=>j(e),style:{cursor:"pointer"},children:[t(l,{width:"32px",align:"center",className:n.chevronCell,children:c?t(Q,{color:"primary",className:n.chevronIcon}):t("div",{className:n.placeholderDiv})}),t(l,{children:t(U,{entityRef:e.entityRef,defaultKind:"group",onClick:a=>{a.stopPropagation(),p?.(e.entityRef)}})}),t(l,{children:t(w,{variant:"body2",children:e.numberOfEntities.toLocaleString()})}),t(l,{children:t(Z,{value:`${Math.round(e.passPercentage)}%`,getColor:m,numericValue:e.passPercentage,size:"medium"})}),t(l,{children:t(G,{className:n.statusColumnCell,children:t(_,{status:T(S||null,e.entityRef)})})})]},e.id)})})]})}),t(J,{rowsPerPageOptions:[10,25,50],component:"div",count:k.length,rowsPerPage:C,page:y,onPageChange:z,onRowsPerPageChange:A})]})};export{ne as HierarchyTable};
|
|
2
|
-
//# sourceMappingURL=HierarchyTable.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as g,jsxs as u}from"react/jsx-runtime";import{makeStyles as f,Box as h,Typography as d}from"@material-ui/core";const p=f(e=>({overlay:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.7)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},messageContainer:{textAlign:"center",padding:e.spacing(2)},mainMessage:{color:e.palette.common.white,fontSize:"1.5rem",marginBottom:e.spacing(2)},statsMessage:{color:e.palette.common.white,fontSize:"0.875rem",opacity:.8}})),l=e=>new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1}).format(e),m=(e,a,s)=>e===1?a:s;function y(e,a){if(!e)return{teams:0,entities:0,checks:0};let s=0,t=0;const n=i=>{s+=1,t+=i.ownedEntityRefs?.length||0,Object.values(i.children||{}).forEach(c=>{n(c)})},o=Object.values(e)[0];o&&n(o);const r=a?.levels?.reduce((i,c)=>i+(c.checks?.length||0),0)||0;return{teams:s,entities:t,results:r*t}}const x=({isLoading:e,hierarchyData:a,track:s})=>{const t=p();if(!e)return null;const{teams:n,entities:o,results:r}=y(a,s);return g(h,{className:t.overlay,children:u(h,{className:t.messageContainer,children:[g(d,{className:t.mainMessage,children:"Calculating..."}),u(d,{className:t.statsMessage,children:["Aggregating the statuses for ",l(n||0)," ",m(n||0,"team","teams")," owning"," ",l(o||0)," ",m(o||0,"entity","entities")," across"," ",l(r||0)," check"," ",m(r||0,"result","results")]})]})})};export{x as default};
|
|
2
|
-
//# sourceMappingURL=LoadingOverlay.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import{useApi as g}from"@backstage/core-plugin-api";import{entityPresentationApiRef as u}from"@backstage/plugin-catalog-react";import{useTheme as c}from"@material-ui/core";import{TeamPerformanceListCard as i}from"./TeamPerformanceListCard.esm.js";const f=({trackStatus:e,getColor:a,limit:n=3,onTeamClick:r})=>{const s=c(),m=g(u);if(!e)return o(i,{title:"Teams Needing Attention",titleColor:s.palette.error.main,teams:[],getColor:a,onTeamClick:r,emptyMessage:"Loading team performance data..."});const l=(e.children||[]).filter(t=>t.status.passed+t.status.failed+t.status.warning+t.status.error+t.status.notReported>0&&(t.status.allPassPercentage??0)<50&&!t.children?.length).sort((t,p)=>(t.status.allPassPercentage??0)-(p.status.allPassPercentage??0)).slice(0,n).map(t=>({groupRef:t.groupRef,teamName:m.forEntity(t.groupRef).snapshot.primaryTitle,passPercentage:t.status.allPassPercentage??0}));return o(i,{title:"Teams Needing Attention",titleColor:s.palette.error.main,teams:l,getColor:a,onTeamClick:r,emptyMessage:"Every team is performing above 50%! \u{1F389}"})};export{f as default};
|
|
2
|
-
//# sourceMappingURL=LowestPerformingTeams.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsxs as I,jsx as n,Fragment as S}from"react/jsx-runtime";import{useApi as w}from"@backstage/core-plugin-api";import{entityPresentationApiRef as E}from"@backstage/plugin-catalog-react";import{useTheme as P}from"@material-ui/core";import{makeStyles as T}from"@material-ui/core/styles";import{ResponsiveCirclePacking as j}from"@nivo/circle-packing";import{useState as z,useEffect as L,useMemo as M}from"react";import{getContrastTextColor as b}from"./colorContrast.esm.js";import{findNodePath as C}from"./findNodePath.esm.js";import{hierarchyToNivo as A}from"./hierarchyToNivo.esm.js";import D from"./LoadingOverlay.esm.js";const F=T(e=>({root:{position:"relative",width:"100%",height:"100%"},nivoContainer:{width:"100%",height:"100%"},tooltip:{position:"absolute",pointerEvents:"none",zIndex:1e3},tooltipContent:{backgroundColor:e.palette.background.paper,padding:e.spacing(1),borderRadius:e.shape.borderRadius,boxShadow:e.shadows[1]},loadingOverlay:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.7)",zIndex:1e3,"& > *":{color:e.palette.common.white}}})),G=({groupRef:e,hierarchyData:r,trackStatus:l,getColor:m,onZoomChange:v,track:k,onNodeHover:c,selectedNode:d,onNodeSelect:x})=>{const[t,p]=z(null),f=F(),y=P(),u=w(E);L(()=>{p(d?d.id:null)},[d]);const a=M(()=>{if(!r||!e)return null;const o=r[e];return o?A(o,l||null,m,u,void 0):null},[r,l,e,m,u]),N=o=>{if(t===o.data.id)return;const i=t===o.data.id?null:o.data.id;p(i),v?.(o.data.entityRef),x?.(o.data)};if(!a)return null;const s=!l,h=y.palette.text.disabled,R=b(h);return I("div",{className:f.root,children:[n("div",{className:f.nivoContainer,children:n(j,{data:a,margin:{top:20,right:20,bottom:20,left:20},borderWidth:1,borderColor:{from:"color",modifiers:[["darker",1.25]]},colors:o=>s?h:o.data.color,childColor:{from:"color"},enableLabels:!0,label:o=>{if(!t)return o.data.name;const i=C(a,o.data.id),g=C(a,t);return!i||!g?"":i.length>=g.length?o.data.name:""},labelsSkipRadius:14,labelTextColor:o=>s?R:b(o.data.color||"#fff"),zoomedId:t,motionConfig:"default",isInteractive:!0,tooltip:()=>n(S,{}),onClick:N,onMouseEnter:o=>c?.(o.data),onMouseLeave:()=>c?.(null)})}),n(D,{isLoading:s,hierarchyData:r,track:k})]})};export{G as default};
|
|
2
|
-
//# sourceMappingURL=NivoCirclePacking.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsxs as T,jsx as a,Fragment as M}from"react/jsx-runtime";import{useApi as j}from"@backstage/core-plugin-api";import{entityPresentationApiRef as E}from"@backstage/plugin-catalog-react";import{useTheme as L}from"@material-ui/core";import{makeStyles as W}from"@material-ui/core/styles";import{ResponsiveIcicle as z}from"@nivo/icicle";import{useState as A,useEffect as D,useMemo as H}from"react";import{getContrastTextColor as k}from"./colorContrast.esm.js";import{hierarchyToNivo as O}from"./hierarchyToNivo.esm.js";import P from"./LoadingOverlay.esm.js";const F=W(e=>({root:{position:"relative",width:"100%",height:"100%"},nivoContainer:{width:"100%",height:"100%"},tooltip:{position:"absolute",pointerEvents:"none",zIndex:1e3},tooltipContent:{backgroundColor:e.palette.background.paper,padding:e.spacing(1),borderRadius:e.shape.borderRadius,boxShadow:e.shadows[1]},loadingOverlay:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.7)",zIndex:1e3,"& > *":{color:e.palette.common.white}}})),Z=({groupRef:e,hierarchyData:r,trackStatus:l,getColor:c,onZoomChange:x,track:y,onNodeHover:m,selectedNode:s,onNodeSelect:S})=>{const[i,u]=A(null),p=F(),R=L(),f=j(E);D(()=>{u(s?s.id:null)},[s]);const h=H(()=>{if(!r||!e)return null;const o=r[e];if(!o)return null;const t=O(o,l||null,c,f,void 0);if(i&&t){const g=(n,v)=>{if(n.id===v)return n;if(n.children)for(const N of n.children){const C=g(N,v);if(C)return C}return null};return g(t,i)||t}return t},[r,l,e,c,f,i]),w=o=>{const t=i===o.data.id?null:o.data.id;u(t),x?.(o.data.entityRef),S?.(o.data)};if(!h)return null;const d=!l,b=R.palette.text.disabled,I=k(b);return T("div",{className:p.root,children:[a("div",{className:p.nivoContainer,children:a(z,{data:h,margin:{top:20,right:20,bottom:20,left:20},borderWidth:1,borderColor:{from:"color",modifiers:[["darker",1.25]]},animateOnMount:!1,colors:o=>d?b:o.data.color,enableLabels:!0,label:o=>o.data.name,labelRotation:270,labelSkipWidth:12,labelSkipHeight:32,labelTextColor:o=>d?I:k(o.data.color||"#fff"),motionConfig:"default",isInteractive:!0,tooltip:()=>a(M,{}),onClick:w,onMouseEnter:o=>m?.(o.data),onMouseLeave:()=>m?.(null)})}),a(P,{isLoading:d,hierarchyData:r,track:y})]})};export{Z as default};
|
|
2
|
-
//# sourceMappingURL=NivoIcicle.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsxs as g,jsx as r,Fragment as C}from"react/jsx-runtime";import{useApi as v}from"@backstage/core-plugin-api";import{entityPresentationApiRef as k}from"@backstage/plugin-catalog-react";import{useTheme as x}from"@material-ui/core";import{makeStyles as y}from"@material-ui/core/styles";import{ResponsiveSunburst as L}from"@nivo/sunburst";import{useMemo as S}from"react";import{getContrastTextColor as p}from"./colorContrast.esm.js";import{hierarchyToNivo as w}from"./hierarchyToNivo.esm.js";import N from"./LoadingOverlay.esm.js";const R=y(t=>({root:{position:"relative",width:"100%",height:"100%"},nivoContainer:{width:"100%",height:"100%"},tooltip:{position:"absolute",pointerEvents:"none",zIndex:1e3},tooltipContent:{backgroundColor:t.palette.background.paper,padding:t.spacing(1),borderRadius:t.shape.borderRadius,boxShadow:t.shadows[1]},loadingOverlay:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.7)",zIndex:1e3,"& > *":{color:t.palette.common.white}}})),T=({groupRef:t,hierarchyData:e,trackStatus:a,getColor:n,track:u,onNodeHover:l,onNodeSelect:f})=>{const s=R(),h=x(),d=v(k),m=S(()=>{if(!e||!t)return null;const o=e[t];return o?w(o,a||null,n,d,void 0):null},[e,a,t,n,d]);if(!m)return null;const i=!a,c=h.palette.text.disabled,b=p(c);return g("div",{className:s.root,children:[r("div",{className:s.nivoContainer,children:r(L,{data:m,margin:{top:20,right:20,bottom:20,left:20},borderWidth:1,borderColor:{from:"color",modifiers:[["darker",1.25]]},colors:o=>i?c:o.data.color,childColor:{from:"color"},animate:!1,enableArcLabels:!0,arcLabel:o=>o.data.name,arcLabelsTextColor:o=>i?b:p(o.data.color||"#fff"),motionConfig:"default",isInteractive:!0,tooltip:()=>r(C,{}),arcLabelsSkipAngle:20,onMouseEnter:o=>l?.(o.data),onMouseLeave:()=>l?.(null),onClick:o=>f?.(o.data)})}),r(N,{isLoading:i,hierarchyData:e,track:u})]})};export{T as default};
|
|
2
|
-
//# sourceMappingURL=NivoSunburst.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsxs as y,jsx as a,Fragment as S}from"react/jsx-runtime";import{useApi as N}from"@backstage/core-plugin-api";import{entityPresentationApiRef as R}from"@backstage/plugin-catalog-react";import{useTheme as T}from"@material-ui/core";import{makeStyles as w}from"@material-ui/core/styles";import{ResponsiveTreeMap as L}from"@nivo/treemap";import{useState as M,useMemo as I}from"react";import{getContrastTextColor as i}from"./colorContrast.esm.js";import{hierarchyToNivo as j}from"./hierarchyToNivo.esm.js";import z from"./LoadingOverlay.esm.js";const A=w(t=>({root:{position:"relative",width:"100%",height:"100%"},nivoContainer:{width:"100%",height:"100%"},tooltip:{position:"absolute",pointerEvents:"none",zIndex:1e3},tooltipContent:{backgroundColor:t.palette.background.paper,padding:t.spacing(1),borderRadius:t.shape.borderRadius,boxShadow:t.shadows[1]},loadingOverlay:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.7)",zIndex:1e3,"& > *":{color:t.palette.common.white}}})),D=({groupRef:t,hierarchyData:e,trackStatus:n,getColor:l,onZoomChange:f,track:h,onNodeHover:d,onNodeSelect:b})=>{const[g,C]=M(null),s=A(),v=T(),p=N(R),m=I(()=>{if(!e||!t)return null;const o=e[t];return o?j(o,n||null,l,p,void 0):null},[e,n,t,l,p]),k=o=>{const x=g===o.data.id?null:o.data.id;C(x),f?.(o.data.entityRef),b?.(o.data)};if(!m)return null;const r=!n,c=v.palette.text.disabled,u=i(c);return y("div",{className:s.root,children:[a("div",{className:s.nivoContainer,children:a(L,{data:m,label:o=>o.data.name,margin:{top:20,right:20,bottom:20,left:20},labelSkipSize:24,labelTextColor:o=>r?u:i(o.data.color||"#fff"),nodeOpacity:1,parentLabel:o=>o.data.name,parentLabelPosition:"top",parentLabelTextColor:o=>r?u:i(o.data.color||"#fff"),colors:o=>r?c:o.data.color,borderColor:{from:"color",modifiers:[["darker",1.25]]},isInteractive:!0,animate:!1,tooltip:()=>a(S,{}),onClick:k,onMouseEnter:o=>d?.(o.data),onMouseLeave:()=>d?.(null)})}),a(z,{isLoading:r,hierarchyData:e,track:h})]})};export{D as default};
|
|
2
|
-
//# sourceMappingURL=NivoTreemap.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsxs as r,jsx as t}from"react/jsx-runtime";import{Link as M}from"@backstage/core-components";import{useApi as $,useRouteRef as V}from"@backstage/core-plugin-api";import{entityPresentationApiRef as U,EntityRefLink as F}from"@backstage/plugin-catalog-react";import{makeStyles as G,useTheme as K,Box as n,Typography as l,Chip as Q,CircularProgress as z,IconButton as Y,Tooltip as q}from"@material-ui/core";import J from"@material-ui/icons/ExpandLess";import X from"@material-ui/icons/ExpandMore";import{useState as Z,useEffect as _,useCallback as ee}from"react";import{useSearchParams as te}from"react-router-dom";import{useCheckStatuses as oe}from"../../hooks/aggregations/useCheckStatuses.esm.js";import{trackCheckDetailsRouteRef as ae}from"../../routes.esm.js";import{getCheckStatusColor as ie}from"../../utils/colors.esm.js";import{ColorChip as R}from"../ColorChip/ColorChip.esm.js";import{getContrastTextColor as T}from"./colorContrast.esm.js";const ne=G(e=>({checkLinkText:{color:"inherit",textDecoration:"none"},emptyStateIcon:{fontSize:e.typography.h3.fontSize,color:e.palette.text.secondary,opacity:.4,marginBottom:12},emptyStateText:{color:e.palette.text.secondary,textAlign:"center"},checksContainer:{flex:1,overflowY:"auto",minHeight:0},checksTitle:{fontWeight:"bold",marginBottom:4},levelHeader:{display:"flex",alignItems:"center",cursor:"pointer"},levelLabel:{fontWeight:"bold",letterSpacing:1,color:e.palette.text.secondary,marginBottom:2,flex:1},expandIcon:{fontSize:e.typography.body2.fontSize,color:e.palette.text.secondary},progressContainer:{display:"flex",alignItems:"center",justifyContent:"flex-start",marginBottom:16},progressWrapper:{position:"relative",display:"inline-flex"},progressBackground:{position:"absolute",color:e.palette.divider},progressText:{position:"absolute",top:0,left:0,bottom:0,right:0,display:"flex",alignItems:"center",justifyContent:"center",fontSize:e.typography.body1.fontSize,fontWeight:"bold"},checkName:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","&:hover":{textDecoration:"underline"}},checkMessage:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},statusChip:{fontSize:e.typography.caption.fontSize,height:22,borderRadius:12,marginLeft:8},secondaryTitle:{display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",marginBottom:8,marginTop:2,lineHeight:1.4,paddingBottom:4},entityCount:{fontSize:e.typography.caption.fontSize},entityLabel:{fontSize:e.typography.caption.fontSize},entityContainer:{display:"flex",alignItems:"center",marginBottom:16},titleContainer:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:.5},titleContent:{display:"flex",alignItems:"center",minWidth:0},titleIcon:{display:"flex",alignItems:"center",marginRight:8},titleText:{minWidth:0,fontWeight:"bold"},emptyStateContainer:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",marginTop:2,marginBottom:1},tooltip:{color:e.palette.text.primary,fontSize:e.typography.caption.fontSize,borderRadius:e.shape.borderRadius,padding:e.spacing(1)},tooltipItem:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:e.spacing(.5)},tooltipCategory:{display:"flex",alignItems:"center",flex:1,fontSize:e.typography.body2.fontSize,marginRight:e.spacing(2)},tooltipValue:{fontSize:e.typography.body2.fontSize,color:e.palette.text.primary}})),B=e=>new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1}).format(e);function re({node:e,checkIds:h,track:s,getColor:k}){const f=K(),o=ne(),W=$(U),S=V(ae),[L]=te(),[A,N]=Z(()=>s?.levels?new Set(s.levels.map(a=>a.ordinal)):new Set),y=e?W.forEntity(e.entityRef):void 0;_(()=>{if(s?.levels){const a=new Set(s.levels.map(m=>m.ordinal));N(a)}},[s?.levels]);const P=a=>{N(m=>{const i=new Set(m);return i.has(a)?i.delete(a):i.add(a),i})},E=a=>a<50?{label:"Needs Attention",color:f.palette.error.main,textColor:T(f.palette.error.main)}:a<80?null:{label:"Healthy",color:f.palette.success.main,textColor:T(f.palette.success.main)},O=ee(a=>{switch(a){case"not-applicable":case"notApplicable":return"Not Applicable";case"not-reported":case"notReported":return"Not Reported";default:return a.charAt(0).toUpperCase()+a.slice(1)}},[]),j=(a,m)=>{const i=a.numberOfEntities-a.notApplicable-a.exempt,g=a.passed,u=a.failed,b=a.warning,d=a.error,c=a.notReported,C=[{name:"passed",value:g},{name:"failed",value:u},{name:"warning",value:b},{name:"error",value:d},{name:"not-reported",value:c}].filter(p=>p.value>0);return r("div",{className:o.tooltip,children:[t(l,{variant:"caption",style:{fontWeight:"bold",marginBottom:8,display:"block"},children:m.name}),C.map((p,x)=>r("div",{className:o.tooltipItem,children:[r("div",{className:o.tooltipCategory,children:[t("span",{style:{width:12,height:4,borderRadius:2,backgroundColor:ie(f,p.name),marginRight:8}}),t(l,{variant:"caption",children:O(p.name)})]}),t("div",{className:o.tooltipValue,children:r(l,{variant:"caption",children:[p.value," of ",B(i)," (",Math.round(p.value/i*100),"%)"]})})]},x))]})},I=oe(e&&h&&h.length?{checkIds:h,trackId:s?.id,filter:{"relations.ownedBy":[e.entityRef]}}:{checkIds:[]},!!(e&&h&&h.length)),v=E(e.passPercentage),D=()=>{if(!s?.levels||h.length===0)return t(n,{mt:2,children:t(l,{variant:"body2",color:"textSecondary",children:"No checks found for this entity."})});const a=s.levels,m=(I.data||[]).reduce((i,g)=>(i[g.id]=g,i),{});return r(n,{mt:2,className:o.checksContainer,children:[t(l,{variant:"subtitle2",className:o.checksTitle,children:"Checks"}),a.map(i=>{const g=i.name??`Level ${i.ordinal}`,u=i.ordinal,b=A.has(u);return r(n,{mb:1,children:[r(n,{className:o.levelHeader,onClick:()=>P(u),children:[t(l,{variant:"overline",className:o.levelLabel,children:g}),t(Y,{size:"small",className:o.expandIcon,children:b?t(J,{}):t(X,{})})]}),b&&i.checks.map(d=>{const c=m[d.id],C=c?c.numberOfEntities-c.notApplicable-c.exempt:0,p=c&&C>0?Math.round(c.passed/C*100):0;let x;if(s&&S&&e){const H=S({trackId:s.id,checkId:d.id}),w=new URLSearchParams(L.toString());w.set("owners",e.entityRef),x=`${H}?${w.toString()}`}return r(n,{display:"flex",alignItems:"center",mb:.5,children:[t(n,{mr:1,display:"flex",children:I.isLoading?t(R,{value:"",getColor:()=>f.palette.divider,numericValue:0,size:"small"}):t(q,{title:c?j(c,d):"",placement:"top",arrow:!0,classes:{tooltip:o.tooltip},children:t(n,{children:t(R,{value:`${p}%`,getColor:k,numericValue:p,size:"small"})})})}),t(n,{flex:1,minWidth:0,children:x?t(M,{to:x,style:{color:"inherit",textDecoration:"none"},className:o.checkLinkText,children:t(l,{variant:"body2",className:o.checkName,children:d.name})}):t(l,{variant:"body2",className:o.checkName,children:d.name})})]},d.id)})]},u)})]})};return r(n,{children:[r(n,{className:o.titleContainer,children:[r(n,{className:o.titleContent,children:[y?.snapshot.Icon&&t(n,{component:"span",className:o.titleIcon,children:t(y.snapshot.Icon,{fontSize:"small"})}),t(l,{variant:"h6",noWrap:!0,className:o.titleText,children:t(F,{entityRef:e.entityRef,defaultKind:"Group",children:y?.snapshot.primaryTitle||e.name})})]}),v&&t(Q,{label:v.label,style:{background:v.color,color:v.textColor},className:o.statusChip,size:"small"})]}),y?.snapshot.secondaryTitle&&t(l,{variant:"caption",color:"textSecondary",className:o.secondaryTitle,children:y.snapshot.secondaryTitle}),t(n,{className:o.entityContainer,children:r(l,{variant:"body2",color:"textSecondary",className:o.entityLabel,children:["Entities:"," ",t("span",{className:o.entityCount,children:B(e.numberOfEntities)})]})}),t(n,{className:o.progressContainer,children:r(n,{className:o.progressWrapper,children:[t(z,{variant:"determinate",value:100,size:80,thickness:6,className:o.progressBackground}),t(z,{variant:"determinate",value:e.passPercentage,size:80,thickness:6,style:{color:k(e.passPercentage)}}),r(l,{className:o.progressText,children:[Math.round(e.passPercentage),"%"]})]})}),D()]})}export{re as SelectedNodeSidebar};
|
|
2
|
-
//# sourceMappingURL=SelectedNodeSidebar.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import"react/jsx-runtime";import{makeStyles as t}from"@material-ui/core";import"react";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"../../../api.esm.js";import"../../../hooks/graphqlKeys.esm.js";import"../../PassingPercentProgressbar/PassPercentageProgressbar.esm.js";t(o=>({tableContainer:{width:"100%",minWidth:300,margin:"auto",marginTop:o.spacing(2),marginBottom:o.spacing(2),borderRadius:o.shape.borderRadius},headerCell:{color:o.palette.common.white,fontWeight:"bold",borderBottom:`2px solid ${o.palette.primary.dark}`},sortLabel:{color:o.palette.common.white,"&.MuiTableSortLabel-active":{color:o.palette.secondary.light},"& .MuiTableSortLabel-icon":{color:o.palette.common.white}},tableRow:{cursor:"default","&:hover":{backgroundColor:o.palette.action.hover,cursor:"default"}},progressCircle:{display:"flex",alignItems:"center",gap:o.spacing(1),minWidth:"fit-content"}}));
|
|
2
|
-
//# sourceMappingURL=FailingComponentsTable.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import"react/jsx-runtime";import{makeStyles as i}from"@material-ui/core";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"../../../api.esm.js";import"../../../hooks/graphqlKeys.esm.js";import"@material-ui/icons/Timer";import"react";import"recharts";import"../../Charts/ChartTypes.esm.js";import"luxon";i({root:{height:250,width:"100%",position:"relative",borderRadius:"4px"}});
|
|
2
|
-
//# sourceMappingURL=MultiCheckStatusHistoryChart.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsxs as s,jsx as o}from"react/jsx-runtime";import{useApi as g}from"@backstage/core-plugin-api";import{entityPresentationApiRef as y}from"@backstage/plugin-catalog-react";import{makeStyles as x,Box as n,Typography as p}from"@material-ui/core";import{useTheme as C}from"@material-ui/core/styles";import{ColorChip as u}from"../ColorChip/ColorChip.esm.js";import{getContrastTextColor as b}from"./colorContrast.esm.js";const T=x(t=>({card:{display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:t.palette.background.paper,borderRadius:8,padding:t.spacing(1,2),marginBottom:0,boxShadow:"none",width:"100%",cursor:"pointer"},cardContent:{flex:1,minWidth:0},titleRow:{display:"flex",alignItems:"center"},icon:{display:"flex",alignItems:"center",marginRight:t.spacing(1)},title:{fontWeight:"bold"},secondaryTitle:{display:"block",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},chipContainer:{marginLeft:t.spacing(2),flexShrink:0}})),w=({teamName:t,passPercentage:i,getColor:l,entityRef:c,onClick:a})=>{const d=C(),e=T(),m=g(y),h=l(i),f=b(d.palette.background.paper),r=m.forEntity(c);return s(n,{className:e.card,style:{color:f,border:`1px solid ${h}`,cursor:a?"pointer":void 0},onClick:a?()=>a(c):void 0,tabIndex:a?0:-1,children:[s(n,{className:e.cardContent,children:[s(n,{className:e.titleRow,children:[r?.snapshot.Icon&&o(n,{component:"span",className:e.icon,children:o(r.snapshot.Icon,{})}),o(p,{variant:"subtitle1",className:e.title,children:r?.snapshot.primaryTitle||t})]}),r?.snapshot.secondaryTitle&&o(p,{variant:"caption",color:"textSecondary",className:e.secondaryTitle,children:r.snapshot.secondaryTitle})]}),o(n,{className:e.chipContainer,children:o(u,{value:`${i}%`,getColor:l,numericValue:i})})]})};export{w as TeamPerformanceCard};
|
|
2
|
-
//# sourceMappingURL=TeamPerformanceCard.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as a,jsxs as r,Fragment as w}from"react/jsx-runtime";import{Box as c,Divider as T,Button as S,FormControl as C,InputLabel as v,Select as x,MenuItem as m,Typography as A}from"@material-ui/core";import{ResponsiveContainer as P,BarChart as B,CartesianGrid as L,XAxis as N,YAxis as z,Bar as M,RadarChart as $,PolarGrid as D,PolarAngleAxis as K,PolarRadiusAxis as U,Radar as W}from"recharts";const j=({filteredCampaignTracks:p,filteredNonCampaignTracks:g,trackStatusMap:s,chartType:o,showRadar:R,searchParams:n,setSearchParams:d,handleTrackClick:u,theme:i,classes:h})=>{const I=e=>{e&&e.trackId&&u(e.trackId)};return a(c,{className:h.chartContainer,children:r(c,{className:h.chartSection,children:[a(T,{style:{marginBottom:16}}),p.length>0||g.length>0?r(c,{className:h.barChart,children:[r(c,{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2,children:[a(c,{display:"flex",style:{gap:8},children:R&&r(w,{children:[a(S,{variant:o==="bar"?"contained":"outlined",size:"small",onClick:()=>{const e=new URLSearchParams(n.toString());e.set("chartType","bar"),d(e,{replace:!0})},children:"Bar"}),a(S,{variant:o==="radar"?"contained":"outlined",size:"small",onClick:()=>{const e=new URLSearchParams(n.toString());e.set("chartType","radar"),d(e,{replace:!0})},children:"Radar"})]})}),o==="bar"&&r(c,{display:"flex",style:{gap:16},children:[r(C,{size:"small",style:{minWidth:120},children:[a(v,{children:"Sort By"}),r(x,{value:n.get("chartSort")?.split("-")[0]||"value",onChange:e=>{const t=new URLSearchParams(n.toString()),l=n.get("chartSort")?.split("-")[1]||"asc";t.set("chartSort",`${e.target.value}-${l}`),d(t,{replace:!0})},children:[a(m,{value:"name",children:"Name"}),a(m,{value:"value",children:"Compliance"})]})]}),r(C,{size:"small",style:{minWidth:120},children:[a(v,{children:"Direction"}),r(x,{value:n.get("chartSort")?.split("-")[1]||"asc",onChange:e=>{const t=new URLSearchParams(n.toString()),l=n.get("chartSort")?.split("-")[0]||"name";t.set("chartSort",`${l}-${e.target.value}`),d(t,{replace:!0})},children:[a(m,{value:"asc",children:"Ascending"}),a(m,{value:"desc",children:"Descending"})]})]})]})]}),o==="bar"?a(P,{width:"100%",height:500,children:r(B,{data:[...p.map(e=>{const t=s.get(e.id)?.status?.allPassPercentage??0;return{name:e.name,compliance:Math.round(t),trackId:e.id,type:"campaign"}}),...g.map(e=>{const t=s.get(e.id)?.status?.allPassPercentage??0;return{name:e.name,compliance:Math.round(t),trackId:e.id,type:"track"}})].sort((e,t)=>{const l=n.get("chartSort")||"value-asc",[b,y]=l.split("-");if(b==="value"){const f=t.compliance-e.compliance;return y==="desc"?f:-f}const k=e.name.localeCompare(t.name);return y==="desc"?-k:k}),margin:{top:20,right:30,left:20,bottom:20},children:[a(L,{strokeDasharray:"0",strokeWidth:.5,vertical:!1}),a(N,{dataKey:"name",angle:-45,textAnchor:"end",height:80,interval:0,tick:{fontSize:12,fill:i.palette.text.primary},axisLine:!1}),a(z,{domain:[0,100],tickFormatter:e=>`${e}%`,tick:{fontSize:12,fill:i.palette.text.primary},axisLine:!1}),a(M,{dataKey:"compliance",fill:i.palette.info.main,onClick:e=>u(e.trackId),style:{cursor:"pointer"}})]})}):a(P,{width:"100%",height:500,children:r($,{cx:"50%",cy:"50%",outerRadius:"80%",data:[...p.map(e=>{const t=s.get(e.id)?.status?.allPassPercentage??0;return{name:e.name,compliance:Math.round(t),trackId:e.id,type:"campaign"}}),...g.map(e=>{const t=s.get(e.id)?.status?.allPassPercentage??0;return{name:e.name,compliance:Math.round(t),trackId:e.id,type:"track"}})],children:[a(D,{strokeWidth:.5}),a(K,{dataKey:"name",tick:{fill:i.palette.text.primary}}),a(U,{angle:30,domain:[0,100],tick:{fill:i.palette.text.primary}}),a(W,{name:"Compliance",dataKey:"compliance",stroke:i.palette.info.main,fill:i.palette.info.main,fillOpacity:.6,onClick:I,style:{cursor:"pointer"}})]})})]}):a(c,{className:h.emptyState,children:a(A,{variant:"h6",children:"No tracks or campaigns matching the current filters."})})]})})};export{j as TechInsightsChartView};
|
|
2
|
-
//# sourceMappingURL=TechInsightsChartView.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as r,jsxs as z}from"react/jsx-runtime";import{useApi as re,useRouteRef as ae}from"@backstage/core-plugin-api";import{entityPresentationApiRef as se}from"@backstage/plugin-catalog-react";import{makeStyles as ie,Box as d,Typography as F,CircularProgress as ne}from"@material-ui/core";import{useTheme as oe}from"@material-ui/core/styles";import{useState as v,useMemo as u,useEffect as ce,useCallback as P}from"react";import{useNavigate as le,useSearchParams as me}from"react-router-dom";import de from"react-use/lib/useDebounce";import"@tanstack/react-query";import"../../api.esm.js";import{useBatchedHierarchicalTrackStatuses as pe}from"../../hooks/heirarchy/useBatchedHierarchicalTrackStatuses.esm.js";import{useTracksApplicableToGroup as ge}from"../../hooks/tracks/useTracksApplicableToGroup.esm.js";import{techInsightsTrackRouteRef as he}from"../../routes.esm.js";import{FilterControls as fe}from"./FilterControls.esm.js";import{SummaryTiles as ue}from"./SummaryTiles.esm.js";import{TechInsightsCardsView as Te}from"./TechInsightsCardsView.esm.js";import{TechInsightsChartView as ke}from"./TechInsightsChartView.esm.js";import{TechInsightsGroupSelector as ye}from"./TechInsightsGroupSelector.esm.js";import{TechInsightsTableView as Ce}from"./TechInsightsTableView.esm.js";import{TrackStatusCard as we}from"./Tiles/TrackStatusCard.esm.js";import{ViewModeControls as Se}from"./ViewModeControls.esm.js";const Re=ie(a=>({container:{padding:a.spacing(3)},gridContainer:{marginTop:a.spacing(3)},gridItem:{cursor:"pointer","&:hover":{transform:"scale(1.02)",transition:"transform 0.2s ease-in-out"}},emptyState:{textAlign:"center",padding:a.spacing(4)},errorState:{textAlign:"center",padding:a.spacing(4)},headerControls:{display:"flex",alignItems:"center"}})),Ie=()=>{const a=Re(),E=oe(),b=le(),[i,p]=me(),l=i.get("group")||"",[S,H]=v(""),[T,O]=v([]),N=re(se),g=i.get("view")||"cards",Z=i.get("sortBy"),q=i.get("direction"),x=Z||"name",A=q||"asc",[M,J]=v("");de(()=>J(S),300,[S]);const K=e=>{const t=x===e&&A==="asc"?"desc":"asc",s=new URLSearchParams(i.toString());s.set("sortBy",e),s.set("direction",t),p(s,{replace:!0})},{tracks:C,isLoading:B,error:Q}=ge(l,{},{enabled:!!l}),h=C.filter(e=>e.type==="campaign"),k=C.filter(e=>e.type!=="campaign"),W=u(()=>[...h,...k].map(e=>({id:e.id,name:e.name})),[h,k]),o=h.filter(e=>{const t=M.toLowerCase(),s=(e.ownerEntityRef?N.forEntity(e.ownerEntityRef):void 0)?.snapshot.primaryTitle?.toLowerCase()||"",y=t===""||e.name.toLowerCase().includes(t)||e.description?.toLowerCase().includes(t)||e.ownerEntityRef?.toLowerCase().includes(t)||s.includes(t),n=T.length===0||T.includes(e.id);return y&&n}),c=k.filter(e=>{const t=M.toLowerCase(),s=(e.ownerEntityRef?N.forEntity(e.ownerEntityRef):void 0)?.snapshot.primaryTitle?.toLowerCase()||"",y=t===""||e.name.toLowerCase().includes(t)||e.description?.toLowerCase().includes(t)||e.ownerEntityRef?.toLowerCase().includes(t)||s.includes(t),n=T.length===0||T.includes(e.id);return y&&n});ce(()=>{if(g==="chart"){const e=i.get("chartType"),t=o.length+c.length;if(e==="radar"&&t<3){const s=new URLSearchParams(i.toString());s.set("chartType","bar"),p(s,{replace:!0})}}},[g,i,p,o.length,c.length]);const R=u(()=>[...h.map(e=>e.id),...k.map(e=>e.id)],[h,k]),{data:I,isLoading:X,error:Y}=pe({trackIds:R,groupRef:l||"",skip:!l||R.length===0}),m=u(()=>{const e=new Map;return Array.isArray(I)&&I.forEach(t=>{t&&t.trackId&&e.set(t.trackId,t)}),e},[I]),L=R.length>0?X:!1,V=B||L,_=Q||Y,U=u(()=>({totalCampaigns:o.length,totalTracks:c.length}),[o.length,c.length]),j=u(()=>{if(L||m.size===0)return{numTeams:void 0,avgCompliance:void 0};let e=0,t=0;const s=new Set;return[...o,...c].forEach(y=>{const n=m.get(y.id);n&&(n.status&&typeof n.status.allPassPercentage=="number"&&(e+=n.status.allPassPercentage,t++),n.groupRef&&s.add(n.groupRef),Array.isArray(n.children)&&n.children.forEach(G=>{G.groupRef&&s.add(G.groupRef)}))}),{numTeams:s.size,avgCompliance:t>0?Math.round(e/t):0}},[o,c,m,L]),D=u(()=>({...U,...j}),[U,j]),$=ae(he),w=P(e=>{if(!l)return;const t=new URLSearchParams;t.set("group",l),t.set("track",e),t.set("node",l),b(`${$()}?${t.toString()}`)},[l,b,$]),ee=P(({track:e})=>{const t=m.get(e.id);return r(d,{className:a.gridItem,onClick:()=>w(e.id),children:r(we,{track:e,trackStatus:t})})},[a.gridItem,w,m]),te=P(e=>{const t=new URLSearchParams(i.toString());t.set("view",e),p(t,{replace:!0})},[i,p]);if(_)return r(d,{className:a.container,children:r(F,{variant:"h4",className:a.errorState,children:"Error loading tech insights data"})});let f;if(V)f=r(d,{className:a.gridContainer,children:r(ne,{})});else if(C.length===0)f=r(d,{className:a.emptyState,children:r(F,{variant:"h6",children:l?"No applicable tracks found for the selected group":"Please select a group to view applicable tracks"})});else if(g==="cards")f=r(Te,{filteredCampaignTracks:o,filteredNonCampaignTracks:c,campaignTracks:h,TrackCard:ee,classes:a});else if(g==="table")f=r(Ce,{tracks:[...o,...c],trackStatusMap:m,orderBy:x,order:A,handleSort:K,handleTrackClick:w,theme:E,classes:a});else if(g==="chart"){const e=i.get("chartType")||"bar",t=o.length+c.length>=3;f=r(ke,{filteredCampaignTracks:o,filteredNonCampaignTracks:c,trackStatusMap:m,chartType:e,showRadar:t,searchParams:i,setSearchParams:p,handleTrackClick:w,theme:E,classes:a})}return z(d,{className:a.container,children:[z(d,{display:"flex",justifyContent:"space-between",alignItems:"center",style:{marginBottom:24},children:[r(ye,{}),r(Se,{viewMode:g,onViewModeChange:te})]}),r(d,{style:{marginTop:0},children:r(ue,{summaryStats:D,colorInterpolator:"viridis",isLoading:B})}),r(fe,{searchText:S,onSearchTextChange:H,selectedTrackIds:T,onSelectedTrackIdsChange:O,trackOptions:W,applicableTracks:C,isLoading:V}),f]})};export{Ie as TechInsightsPage2};
|
|
2
|
-
//# sourceMappingURL=TechInsightsPage2.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import"react/jsx-runtime";import{makeStyles as r,alpha as t}from"@material-ui/core";import"react-router-dom";r(o=>({root:{width:"100%",minWidth:250},textField:{"& $notchedOutline":{borderColor:t(o.page.fontColor,.25)},"&:hover $notchedOutline":{borderColor:o.page.fontColor}},input:{backgroundColor:"transparent",color:o.page.fontColor},clearIndicator:{color:o.page.fontColor},popupIndicator:{color:o.page.fontColor},notchedOutline:{}}),{name:"SoundcheckTechInsightsViewSelector"});
|
|
2
|
-
//# sourceMappingURL=TechInsightsViewSelector.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import"react/jsx-runtime";import"@material-ui/core";import{makeStyles as t}from"@material-ui/core/styles";import{interpolateRgb as a}from"d3-interpolate";import{scaleLinear as n}from"d3-scale";t(e=>({card:{display:"flex",flexDirection:"column",border:`1px solid ${e.palette.divider}`,height:"100%",maxWidth:"280px",padding:e.spacing(2),cursor:"pointer"},content:{display:"flex"},item:{display:"flex",justifyContent:"space-between",alignItems:"center"},legendDash:{width:e.spacing(2),height:e.spacing(1),borderRadius:e.spacing(.375),marginRight:e.spacing(1)},category:{display:"flex",alignItems:"center",flex:1,marginRight:e.spacing(2)},categoryBarContainer:{width:"100%",height:e.spacing(1),marginBottom:e.spacing(1),cursor:"pointer"}}));const o=(e,i)=>n().domain([0,50,100]).range([e.palette.error.main,e.palette.warning.main,e.palette.success.main]).interpolate(a.gamma(2.2))(i);export{o as getPercentageColor};
|
|
2
|
-
//# sourceMappingURL=TileUtils.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsxs as n,jsx as e}from"react/jsx-runtime";import{useApi as f}from"@backstage/core-plugin-api";import{entityPresentationApiRef as y}from"@backstage/plugin-catalog-react";import{useTheme as x,Paper as u,Box as r,Typography as c}from"@material-ui/core";import{makeStyles as N}from"@material-ui/core/styles";import{Skeleton as m}from"@material-ui/lab";import{CategoryBar as w}from"../../CategoryBar/CategoryBar.esm.js";import{getPercentageColor as v}from"./TileUtils.esm.js";const C=N(t=>({card:{display:"flex",flexDirection:"column",border:`1px solid ${t.palette.divider}`,height:"100%",maxWidth:"280px",padding:t.spacing(2),cursor:"pointer"},content:{display:"flex"},categoryBarContainer:{width:"100%",height:t.spacing(1),marginBottom:t.spacing(1),cursor:"pointer"}})),b=t=>t.toLocaleString(),B=({track:t,trackStatus:l})=>{const i=x(),h=f(y),a=C(),d=t.ownerEntityRef?h.forEntity(t.ownerEntityRef):null,o=l?.allPassPercentage??0,s=!l;return n(u,{className:a.card,children:[n(r,{display:"flex",flexDirection:"column",alignItems:"flex-start",mb:1,children:[e(c,{variant:"h6",children:t.name}),d&&e(c,{variant:"caption",color:"textSecondary",children:d.snapshot.primaryTitle})]}),s&&e(r,{className:a.content,children:n(r,{width:"100%",children:[e(r,{mb:2,children:e(m,{variant:"text",width:"60%",height:48})}),e(r,{className:a.categoryBarContainer,children:e(m,{variant:"rect",width:"100%",height:8})})]})}),!s&&isNaN(o)&&e(r,{margin:"auto",children:e(c,{variant:"body2",children:"No Data"})}),!s&&!isNaN(o)&&e(r,{className:a.content,children:n(r,{width:"100%",children:[e(r,{mb:2,children:e(c,{variant:"h3",style:{color:v(i,Math.floor(o))},children:`${Math.floor(o)}%`})}),e(r,{className:a.categoryBarContainer,children:e(w,{data:l,valueFormatter:b,categories:["passed","failed","notReported"],categoryFormatter:p=>p.replace(/\b\w/g,g=>g.toUpperCase()),colors:[i.palette.success.main,i.palette.error.main,i.palette.text.disabled]})})]})})]})};export{B as TrackStatusCard};
|
|
2
|
-
//# sourceMappingURL=TrackStatusCard.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import{useApi as c}from"@backstage/core-plugin-api";import{entityPresentationApiRef as u}from"@backstage/plugin-catalog-react";import{useTheme as g}from"@material-ui/core";import{TeamPerformanceListCard as m}from"./TeamPerformanceListCard.esm.js";const f=({trackStatus:t,getColor:s,limit:i=3,onTeamClick:a})=>{const r=g(),l=c(u);if(!t)return o(m,{title:"Top Performing Teams",titleColor:r.palette.success.main,teams:[],getColor:s,onTeamClick:a,emptyMessage:"Loading team performance data..."});const n=(t.children||[]).filter(e=>e.status.passed+e.status.failed+e.status.warning+e.status.error+e.status.notReported>0&&(e.status.allPassPercentage??0)>=80&&!e.children?.length).sort((e,p)=>(p.status.allPassPercentage??0)-(e.status.allPassPercentage??0)).slice(0,i).map(e=>({groupRef:e.groupRef,teamName:l.forEntity(e.groupRef).snapshot.primaryTitle,passPercentage:e.status.allPassPercentage??0}));return o(m,{title:"Top Performing Teams",titleColor:r.palette.success.main,teams:n,getColor:s,onTeamClick:a,emptyMessage:"No teams have reached the 80% mark yet, keep pushing!"})};export{f as default};
|
|
2
|
-
//# sourceMappingURL=TopPerformingTeams.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as a,jsxs as l}from"react/jsx-runtime";import{makeStyles as m,Box as d,Link as s,Typography as p}from"@material-ui/core";import b from"@material-ui/icons/ChevronRight";import{Fragment as h}from"react";const u=m(e=>({breadcrumbContainer:{display:"flex",alignItems:"center",height:24},chevronIcon:{color:e.palette.text.secondary,marginLeft:4,marginRight:4},breadcrumbLink:{color:e.palette.text.secondary,fontWeight:400,cursor:"pointer",background:"none",border:"none",padding:0,font:"inherit",textDecoration:"none","&:hover":{textDecoration:"underline"},"&.active":{color:e.palette.text.primary,fontWeight:600},"&.disabled":{cursor:"default","&:hover":{textDecoration:"none"}}},breadcrumbText:{color:"inherit",fontWeight:"inherit"}})),f=({node:e,onNodeClick:i})=>{const n=u();if(!e)return null;const c=(r=>{const t=[r];let o=r.parent;for(;o;)t.unshift(o),o=o.parent;return t})(e);return a(d,{className:n.breadcrumbContainer,children:c.map((r,t)=>l(h,{children:[t>0&&a(b,{fontSize:"small",className:n.chevronIcon}),a(s,{component:"button",variant:"body2",onClick:()=>i?.(r),className:`${n.breadcrumbLink} ${r===e?"active":""} ${i?"":"disabled"}`,children:a(p,{variant:"body2",component:"span",className:n.breadcrumbText,children:r.name})})]},r.id))})};export{f as VisualizationBreadcrumb};
|
|
2
|
-
//# sourceMappingURL=VisualizationBreadcrumb.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{rgb as a}from"d3-color";function x(o){const r=a(o.formatHex());if(!r)return 0;const t=c=>{const f=c/255;return f<=.03928?f/12.92:Math.pow((f+.055)/1.055,2.4)},e=t(r.r),n=t(r.g),u=t(r.b);return .2126*e+.7152*n+.0722*u}function b(o,r){const t=x(a(o))+.05,e=x(a(r))+.05;return t>e?t/e:e/t}function p(o,r=4.5,t=10,e=.5){const n=a(o);if(!n)return"#222";const u=x(n)>.5;let c=n,f={color:n.formatHex(),ratio:0};for(let i=1;i<=t;i++){c=u?n.darker(i*e):n.brighter(i*e);const m=c.formatHex(),g=b(o,m);if(g>f.ratio&&(f={color:m,ratio:g}),g>=r)return m}const s=b(o,"#000"),l=b(o,"#fff");return s>=r&&s>l?"#000":l>=r&&l>s?"#fff":f.color}export{p as getContrastTextColor};
|
|
2
|
-
//# sourceMappingURL=colorContrast.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsxs as h,jsx as t}from"react/jsx-runtime";import{useApi as L}from"@backstage/core-plugin-api";import{entityPresentationApiRef as b}from"@backstage/plugin-catalog-react";import{makeStyles as w,Box as m,IconButton as z}from"@material-ui/core";import A from"@material-ui/icons/ArrowDropDown";import B from"@material-ui/icons/ArrowDropUp";import{forwardRef as G,useState as N,useEffect as a}from"react";import{useDescendantsOfGroups as $}from"../../../hooks/heirarchy/useGetDescendentsOfGroups.esm.js";const j=w(e=>({nodeRow:{display:"flex",alignItems:"center",marginBottom:e.spacing(.5)},loading:{fontStyle:"italic",color:e.palette.text.secondary}})),u=G(({group:e,level:l=0,selected:p,onSelect:d,onExpandChange:o,selectedRoots:y},x)=>{const g=j(),S=Array.from(y||[]),[n,f]=N(!1),k=L(b),r=S.some(i=>i.entityRef===e.entityRef);a(()=>{f(r)},[r]),a(()=>{f(r)},[r]);const{data:c,isLoading:s}=$([e.entityRef],n),C=()=>{f(i=>!i)};a(()=>{o&&o()},[n,s,c,o]),a(()=>{!s&&n&&o&&o()},[n,s,o]);const v=i=>{d(e.entityRef,i.target.checked)},E={marginLeft:`${l*20}px`};return h("div",{ref:x,"data-group-id":e.entityRef,children:[h(m,{className:g.nodeRow,style:E,children:[t(z,{size:"small",onClick:C,children:n?t(B,{fontSize:"small"}):t(A,{fontSize:"small"})}),t("input",{type:"checkbox",checked:p.has(e.entityRef),onChange:v}),t("label",{children:k.forEntity(e.entityRef).snapshot.primaryTitle})]}),n&&s&&t(m,{className:g.loading,style:{marginLeft:`${(l+1)*20}px`},children:"Loading..."}),n&&c&&c.map(({group:i,subGroups:I})=>t(m,{children:I.map(R=>t(u,{group:R,level:l+1,selected:p,onSelect:d,onExpandChange:o,selectedRoots:y},R.entityRef))},i.entityRef))]})});export{u as GroupNode};
|
|
2
|
-
//# sourceMappingURL=GroupNode.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import"react/jsx-runtime";import{makeStyles as t}from"@material-ui/core";import"@tanstack/react-virtual";import"react";import"react-router-dom";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"../../../api.esm.js";import"../../CollapsablePanel/CollapsablePanel.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"@backstage/catalog-model";import"lodash";import"../../../contexts/TrackFormContext.esm.js";import"../../../contexts/CheckFormContext.esm.js";import"../../../contexts/CampaignFormContext.esm.js";import"../../../contexts/UserProvider.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"./GroupNode.esm.js";t(i=>({root:{display:"flex",flexDirection:"column",height:"100%"},searchField:{margin:i.spacing(.5,0,1,0),"&& input":{margin:i.spacing(1,0,0,0),padding:`${i.spacing(0,1,1,1)} !important`,width:"100%",display:"flex",alignItems:"center",justifyContent:"center"}},scrollPane:{maxHeight:300,overflowY:"auto",marginTop:i.spacing(1),position:"relative"},virtualRow:{margin:0,padding:0,boxSizing:"border-box"}}));
|
|
2
|
-
//# sourceMappingURL=Hierarchy.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const d=(e,r)=>{if(!e||typeof e!="object")return null;if(e.groupRef===r)return e.status;if(e.children&&Array.isArray(e.children))for(const s of e.children){const l=d(s,r);if(l)return l}return null},h=(e,r,s,l,c)=>{const a=l.forEntity(e.entityRef).snapshot.primaryTitle,o=e.entityRef,n=r?d(r,o):null,p=s(n?.allPassPercentage||0),f=e.ownedEntityRefs?.length||0;if(!e.children||Object.keys(e.children).length===0){if(f===0)return;const i=Math.log(f+1);if(i===0)return;const u={id:a,name:a,entityRef:o,value:i,numberOfEntities:f,color:p,passPercentage:n?.allPassPercentage||0,children:[]};return c&&(u.parent=c),u}const g=Object.values(e.children),t={id:a,name:a,entityRef:o,numberOfEntities:0,color:"",passPercentage:0,children:[]};c&&(t.parent=c);const y=g.map(i=>h(i,r,s,l,t)).filter(i=>i!==void 0);return t.children=y,t.numberOfEntities=(n?.passed||0)+(n?.failed||0)+(n?.warning||0)+(n?.error||0)+(n?.notReported||0),t.color=s(n?.allPassPercentage||0),t.passPercentage=n?.allPassPercentage||0,t};export{h as hierarchyToNivo};
|
|
2
|
-
//# sourceMappingURL=hierarchyToNivo.esm.js.map
|