@spotify/backstage-plugin-soundcheck 0.19.2 → 0.19.3
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 +34 -0
- package/config.d.ts +54 -1
- package/dist/api.esm.js +1 -1
- package/dist/components/CampaignCreatePage/CampaignCreatePage.esm.js +1 -1
- package/dist/components/CampaignForm/Steps/CampaignDetailsStep/CampaignOwnerField.esm.js +1 -1
- package/dist/components/CampaignPage/CampaignPage.esm.js +2 -0
- package/dist/components/CampaignPage/CampaignPageBUI.esm.js +2 -0
- package/dist/components/CampaignPage/CampaignPageDeprecated.esm.js +2 -0
- package/dist/components/{CampaignInsightsPage → CampaignPage}/CampaignStatusTile.esm.js +1 -1
- package/dist/components/CampaignsPage/CampaignListPage/CampaignListPageDeprecated.esm.js +2 -0
- package/dist/components/CampaignsPage/CampaignListPageBUI.esm.js +2 -0
- package/dist/components/CampaignsPage/CampaignsPage.esm.js +1 -1
- package/dist/components/Cards/CurrentStatusCard/CurrentStatusCard.esm.js +2 -0
- package/dist/components/Cards/CurrentStatusCard/CurrentStatusCardRow.esm.js +2 -0
- package/dist/components/Cards/DescriptionCard/DescriptionCard.esm.js +2 -0
- package/dist/components/CertificationsPage/CertificationTabs.esm.js +1 -1
- package/dist/components/CertificationsPage/CertificationsPage.esm.js +1 -1
- package/dist/components/CertificationsPage/Playlist/PlaylistComponent.esm.js +1 -1
- package/dist/components/CheckCreatePage/CheckCreatePage.esm.js +1 -1
- package/dist/components/CheckDetails/CheckDetails.esm.js +1 -1
- package/dist/components/CheckForm/FormFields/CheckPathResolverInput.esm.js +1 -1
- package/dist/components/CheckForm/FormFields/RuleInput/Conditions/RuleConditionInput.esm.js +1 -1
- package/dist/components/CheckForm/FormFields/TeamDetailsInput/TeamDetailsInput.esm.js +1 -1
- package/dist/components/CheckPage/CheckEditView.esm.js +1 -1
- package/dist/components/CheckPage/CheckInsightsPage.esm.js +1 -1
- package/dist/components/CheckPage/CheckStatusHistoryChart.esm.js +1 -1
- package/dist/components/CheckPage/CheckStatusTable.esm.js +1 -1
- package/dist/components/CheckPage/utils.esm.js +1 -1
- package/dist/components/CheckStatusBar/CheckStatusBar.esm.js +1 -1
- package/dist/components/CheckStatusBar/CheckStatusBarBUI.esm.js +2 -0
- package/dist/components/CheckStatusBar/CheckStatusBarCell.esm.js +2 -0
- package/dist/components/CheckTemplatesPage/CheckTemplatesPage.esm.js +1 -1
- package/dist/components/ChecksPage/CheckListPage/CheckListPageDeprecated.esm.js +2 -0
- package/dist/components/ChecksPage/ChecksListPageBUI.esm.js +2 -0
- package/dist/components/ChecksPage/ChecksPage.esm.js +1 -1
- package/dist/components/ChecksTable/ChecksTable.esm.js +2 -0
- package/dist/components/ChipSelector/ChipSelector.esm.js +2 -0
- package/dist/components/CollectorPage/CollectorDetailsPage.esm.js +1 -1
- package/dist/components/CollectorPage/CollectorFactTable.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/BigQuery/BigQueryConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Catalog/CatalogConfigurator.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/CodeScanningAlertsFactDetails.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Github/GithubConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Github/SecretScanningAlertsFactDetails.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Github/SecurityAdvisoriesFactDetails.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/Jira/IssuesFactDetailsComponent.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/Jira/JiraConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Jira/utils.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Jira/validation.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/CollectorListPage/CollectorListPage.esm.js +1 -1
- package/dist/components/CollectorsPage/CollectorsPage.esm.js +1 -1
- package/dist/components/CustomCell/CustomCell.esm.js +2 -0
- package/dist/components/EmptyState/EmptyStateBUI.esm.js +2 -0
- package/dist/components/EmptyState/EmptyStateNoCampaigns.esm.js +2 -0
- package/dist/components/EmptyState/EmptyStateNoChecks.esm.js +2 -0
- package/dist/components/EmptyState/EmptyStateNoTracks.esm.js +2 -0
- package/dist/components/EntitiesAutocompletePicker/EntitiesAutocompletePicker.esm.js +1 -1
- package/dist/components/EntitySoundcheckCard/Card.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/Filter/FilterPreviewTable/FilterPreviewTable.esm.js +1 -1
- package/dist/components/Filter/KeyValueInputDialog.esm.js +1 -1
- package/dist/components/FilterSidebar/FilterSidebar.esm.js +1 -1
- package/dist/components/FilterSidebar/StateFilter.esm.js +1 -1
- package/dist/components/FilterSidebar/useTrackFilterSidebar.esm.js +1 -1
- package/dist/components/FilterSidebar/util.esm.js +1 -1
- package/dist/components/FormControlledAutocomplete/FormControlledAutocomplete.esm.js +1 -1
- package/dist/components/FormControlledAutocomplete/useLabelValueOptions.esm.js +2 -0
- package/dist/components/GroupHierarchySelector/GroupHierarchySelector.esm.js +1 -1
- package/dist/components/HierarchicalTechInsightsPage/HierarchicalTechInsightsPage.esm.js +1 -1
- package/dist/components/HierarchicalTechInsightsPage/SelectedNodeSidebar.esm.js +1 -1
- package/dist/components/LevelUpParty/LevelUpParty.esm.js +1 -1
- package/dist/components/LevelsTable/CheckRowContent.esm.js +1 -1
- package/dist/components/LevelsTable/LevelsTable.esm.js +1 -1
- package/dist/components/ListPageCustomActions/ListPageCustomActions.esm.js +2 -0
- package/dist/components/LoadingTableSkeleton/LoadingTableSkeleton.esm.js +2 -0
- package/dist/components/OverviewPage/OverviewPage.esm.js +1 -1
- package/dist/components/OverviewPage/OverviewPageContent.esm.js +1 -1
- package/dist/components/OverviewTable/OverviewTable.esm.js +1 -1
- package/dist/components/OverviewTable/ResultsTable.esm.js +1 -1
- package/dist/components/PageCustomActions/PageCustomActions.esm.js +2 -0
- package/dist/components/QuickstartPage/QuickstartPage.esm.js +2 -2
- package/dist/components/Router.esm.js +1 -1
- package/dist/components/RoutingPage/RoutingPage.esm.js +1 -1
- package/dist/components/SearchFilters/SearchFilters.esm.js +1 -1
- package/dist/components/SummaryCard/SummaryCard.esm.js +1 -1
- package/dist/components/SummaryCard/SummaryCardActionsMenu.esm.js +1 -1
- package/dist/components/TableRowWithOwner/TableRowWithOwner.esm.js +2 -0
- package/dist/components/TeamStatusBar/TeamStatusBar.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/TechInsightsPage.esm.js +1 -1
- package/dist/components/TechInsights/TechInsightsTableBUI.esm.js +2 -0
- package/dist/components/TechInsights/TechInsightsTableView.esm.js +1 -1
- package/dist/components/TechInsightsGroupSelector/TechInsightsGroupSelector.esm.js +1 -1
- package/dist/components/TimePeriodBar/TimePeriodBar.esm.js +1 -1
- package/dist/components/TopFailingChecksTable/TopFailingChecksTableBUI.esm.js +2 -0
- package/dist/components/TrackCreatePage/TrackCreatePage.esm.js +1 -1
- package/dist/components/TrackEditPage/TrackEditView.esm.js +1 -1
- package/dist/components/TrackForm/Steps/TrackDetailsStep/TrackBadgeTypeSelect/TrackBadgeTypeSelect.esm.js +1 -1
- package/dist/components/TrackForm/Steps/TrackDetailsStep/TrackOwnerSelect/TrackOwnerSelect.esm.js +1 -1
- package/dist/components/TrackPage/TrackEntitiesTable/TrackEntitiesTable.esm.js +1 -1
- package/dist/components/TrackPage/TrackEntitiesTable/TrackEntitiesTableBUI.esm.js +2 -0
- package/dist/components/TrackPage/TrackHistoryChart.esm.js +1 -1
- package/dist/components/TrackPage/TrackPage.esm.js +1 -1
- package/dist/components/TrackPage/TrackPageBUI.esm.js +2 -0
- package/dist/components/TrackPage/TrackPageDeprecated.esm.js +2 -0
- package/dist/components/TracksPage/TrackListPage/TrackListPageDeprecated.esm.js +2 -0
- package/dist/components/TracksPage/TrackListPage/TrackSummaryCard.esm.js +1 -1
- package/dist/components/TracksPage/TracksListPageBUI.esm.js +2 -0
- package/dist/components/TracksPage/TracksPage.esm.js +1 -1
- package/dist/graphql/generated/index.esm.js +125 -117
- package/dist/hooks/aggregations/useCheckStatus.esm.js +1 -1
- package/dist/hooks/catalog/useGetEntityRefs.esm.js +1 -1
- package/dist/hooks/catalog/useGetLimitedEntityRefs.esm.js +1 -1
- package/dist/hooks/catalog/useProfileImages.esm.js +2 -0
- package/dist/hooks/checks/useCheckDetails.esm.js +1 -1
- package/dist/hooks/checks/useCheckStatusTotals.esm.js +2 -0
- package/dist/hooks/entities/useTrackEntities.esm.js +1 -1
- package/dist/hooks/graphqlKeys.esm.js +1 -1
- package/dist/hooks/groups/useAllGroups.esm.js +1 -1
- package/dist/hooks/groups/useGroupOptions.esm.js +1 -1
- package/dist/hooks/groups/useUsersGroupClaims.esm.js +1 -1
- package/dist/hooks/heirarchy/useBatchedHierarchicalTrackStatuses.esm.js +1 -1
- package/dist/hooks/tracks/useRecertifyTrack.esm.js +2 -0
- package/dist/hooks/tracks/useTracksApplicableToGroup.esm.js +1 -1
- package/dist/hooks/useConfirmationModal.esm.js +1 -1
- package/dist/hooks/useLoadTimeReporting.esm.js +2 -0
- package/dist/hooks/usePagination.esm.js +2 -0
- package/dist/hooks/useSearchName.esm.js +2 -0
- package/dist/utils/checks.esm.js +2 -0
- package/dist/utils/formatters.esm.js +1 -1
- package/dist/utils/helpers.esm.js +1 -1
- package/dist/utils/lcpReporting.esm.js +1 -1
- package/package.json +18 -27
- package/dist/components/CampaignInsightsPage/CampaignInsightsPage.esm.js +0 -2
- package/dist/components/CampaignsPage/CampaignListPage/CampaignListPage.esm.js +0 -2
- package/dist/components/ChecksPage/CheckListPage/CheckListPage.esm.js +0 -2
- package/dist/components/CollectorPage/Configurators/Jira/IssuesSearchFactDetailsComponent.esm.js +0 -2
- package/dist/components/TechInsights/TechInsightsCardsView.esm.js +0 -2
- package/dist/components/TechInsights/TrackStatusCard.esm.js +0 -2
- package/dist/components/TechInsights/ViewModeControls.esm.js +0 -2
- package/dist/components/TechInsights/convertToCommonTrackStatus.esm.js +0 -2
- package/dist/components/TracksPage/TrackListPage/TrackListPage.esm.js +0 -2
- /package/dist/components/{CampaignInsightsPage → CampaignPage}/CampaignStatusHistoryTile.esm.js +0 -0
- /package/dist/components/{CampaignInsightsPage → CampaignPage}/DaysRemainingTile.esm.js +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useApi as
|
|
1
|
+
import{useApi as u,useAnalytics as f}from"@backstage/core-plugin-api";import{useQuery as d}from"@tanstack/react-query";import{soundcheckApiRef as l}from"../../api.esm.js";import{QueryKeys as m}from"../graphqlKeys.esm.js";const h=(t,r=!0)=>{const i=u(l),n=f();return d([m.CheckStatus,t],async()=>{const{checkId:s,entityRefs:a,filter:c,trackId:o}=t,p={checkId:s,entityRefs:a,filter:c,trackId:o},e=await i.getCheckStatus(p);return e&&n.captureEvent("page_details","Check Status",{attributes:{id:e.id,error:e.error,exempt:e.exempt,failed:e.failed,notApplicable:e.notApplicable,notReported:e.notReported,numberOfEntities:e.numberOfEntities,passed:e.passed,warning:e.warning,filter:t.filter}}),e},{enabled:r,staleTime:10*60*1e3,refetchInterval:!1,refetchOnWindowFocus:!1})};export{h as useCheckStatus};
|
|
2
2
|
//# sourceMappingURL=useCheckStatus.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{useApi as t,alertApiRef as s}from"@backstage/core-plugin-api";import{catalogApiRef as n}from"@backstage/plugin-catalog-react";import{useQuery as m}from"@tanstack/react-query";import{QueryKeys as f}from"../graphqlKeys.esm.js";const p=(e,i,r=!0)=>{const a=t(s),o=t(n);return m([f.GetEntityRefs,e],async()=>o.getEntities({filter:e,limit:i,fields:["kind","metadata.name","metadata.description","metadata.namespace"]}),{enabled:r,refetchOnWindowFocus:!1,onError:()=>{a.post({message:"Failed to load entities",severity:"error"})}})};export{p as useGetEntityRefs};
|
|
2
2
|
//# sourceMappingURL=useGetEntityRefs.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{uniq as
|
|
1
|
+
import{stringifyEntityRef as m}from"@backstage/catalog-model";import{uniq as k}from"lodash";import{useMemo as E}from"react";import{useGetEntityRefs as s}from"./useGetEntityRefs.esm.js";const A=(t=500,e=!0,n=[])=>{const{data:y,isLoading:a}=s({kind:["Component"]},t,e&&!n.includes("Component")),o=y?.items.map(i=>m(i)),{data:g,isLoading:d}=s({kind:["System"]},t,e&&!n.includes("System")),r=g?.items.map(i=>m(i)),{data:L,isLoading:p}=s({kind:["Resource"]},t,e&&!n.includes("Resource")),u=L?.items.map(i=>m(i)),{data:R,isLoading:f}=s({kind:["API"]},t,e&&!n.includes("API")),c=R?.items.map(i=>m(i)),l=E(()=>k([...o??[],...r??[],...u??[],...c??[]]),[c,o,u,r]);return{allLoading:a&&d&&p&&f,anyLoading:a||d||p||f,entityRefs:l}};export{A as useGetLimitedEntityRefs};
|
|
2
2
|
//# sourceMappingURL=useGetLimitedEntityRefs.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{isUserEntity as o,isGroupEntity as a,stringifyEntityRef as p}from"@backstage/catalog-model";import{isEmpty as n}from"lodash";import{useMemo as f}from"react";import{useEntitiesByRefs as c}from"./useEntitiesByRefs.esm.js";const d=s=>{const{data:i,isLoading:r}=c({entityRefs:s,fields:["kind","metadata.name","metadata.namespace","spec.profile.picture"]}),m=f(()=>n(i?.items)?{}:i?.items.reduce((e,t)=>(t&&(o(t)||a(t))&&(e[p(t)]=t?.spec?.profile?.picture),e),{}),[i?.items]);return{isLoading:r,profileImageMap:m}};export{d as useProfileImages};
|
|
2
|
+
//# sourceMappingURL=useProfileImages.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{stringifyEntityRef as s}from"@backstage/catalog-model";import{useApi as m}from"@backstage/core-plugin-api";import{useQuery as f}from"@tanstack/react-query";import{soundcheckApiRef as n}from"../../api.esm.js";import{QueryKeys as u}from"../graphqlKeys.esm.js";function c(
|
|
1
|
+
import{stringifyEntityRef as s}from"@backstage/catalog-model";import{useApi as m}from"@backstage/core-plugin-api";import{useQuery as f}from"@tanstack/react-query";import{soundcheckApiRef as n}from"../../api.esm.js";import{QueryKeys as u}from"../graphqlKeys.esm.js";function c(o,e,r){const t=m(n),i=s(o);return f([u.CheckDetails,i,e,r],async()=>t.getCheckResultDetails(i,e,r),{enabled:!!e&&!!r})}export{c as useCheckDetails};
|
|
2
2
|
//# sourceMappingURL=useCheckDetails.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function o(t){const a=(t??[]).reduce((e,{passed:s,failed:i,warning:d})=>(e.passed+=s,e.failed+=i,e.warning+=d,e),{passed:0,failed:0,warning:0}),r=t?.length??0,n=e=>Math.round(e/r*100)/100;return{passedPercent:n(a.passed),failedPercent:n(a.failed),warningPercent:n(a.warning),passedTotal:a.passed,failedTotal:a.failed,warningTotal:a.warning,total:new Intl.NumberFormat("en",{notation:"compact",compactDisplay:"short"}).format(r)}}export{o as useCheckStatusTotals};
|
|
2
|
+
//# sourceMappingURL=useCheckStatusTotals.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useApi as t}from"@backstage/core-plugin-api";import{useQuery as i}from"@tanstack/react-query";import{soundcheckApiRef as o}from"../../api.esm.js";import{QueryKeys as n}from"../graphqlKeys.esm.js";function s(r){const e=t(o);return i([n.TrackEntities,r],async()=>e.getTrackEntities(r),
|
|
1
|
+
import{useApi as t}from"@backstage/core-plugin-api";import{useQuery as i}from"@tanstack/react-query";import{soundcheckApiRef as o}from"../../api.esm.js";import{QueryKeys as n}from"../graphqlKeys.esm.js";function s(r){const e=t(o);return i({queryKey:[n.TrackEntities,r],queryFn:async()=>e.getTrackEntities(r),refetchOnWindowFocus:!1})}export{s as useTrackEntities};
|
|
2
2
|
//# sourceMappingURL=useTrackEntities.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.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};
|
|
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.RecertifyTrack="soundcheck/recertifyTrack",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{stringifyEntityRef as m}from"@backstage/catalog-model";import{useApi as t,configApiRef as n}from"@backstage/core-plugin-api";import{catalogApiRef as s}from"@backstage/plugin-catalog-react";import{getGroupFilterFromConfig as
|
|
1
|
+
import{stringifyEntityRef as m}from"@backstage/catalog-model";import{useApi as t,configApiRef as n}from"@backstage/core-plugin-api";import{catalogApiRef as s}from"@backstage/plugin-catalog-react";import{getGroupFilterFromConfig as c,combineEntityFilterQueries as f}from"@spotify/backstage-plugin-soundcheck-common";import{useQuery as d}from"@tanstack/react-query";function l(){const i=t(s),a=t(n);return d(["soundcheck/all-groups"],async()=>{const r=c(a),o=f({kind:"Group"},r),{items:p}=await i.getEntities({filter:o,fields:["spec.profile.displayName","metadata.title","metadata.name","metadata.description","metadata.namespace","kind","spec.type"]});return p.filter(e=>e?.kind==="Group").map(e=>({name:e.spec?.profile?.displayName??e.metadata.title??e.metadata.name,description:e.metadata.description,ref:m(e),type:e.spec?.type}))},{staleTime:5*60*1e3,refetchInterval:!1,refetchOnWindowFocus:!1})}export{l as useAllGroups};
|
|
2
2
|
//# sourceMappingURL=useAllGroups.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useMemo as
|
|
1
|
+
import{useMemo as c}from"react";import"@backstage/catalog-model";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"../../api.esm.js";import"../graphqlKeys.esm.js";import{useAllGroups as d}from"./useAllGroups.esm.js";import{useUsersGroupClaims as f}from"./useUsersGroupClaims.esm.js";import"../useSoundcheckAlert.esm.js";import"../useConfirmationModal.esm.js";import"react-router-dom";const y=()=>{const{data:e,isLoading:m,isError:n}=f(),{data:i,isLoading:a,isError:u}=d();return{options:c(()=>{const o=new Map;return e&&e.forEach(({name:t,description:s,ref:r,type:p})=>{o.set(`${r}`,{name:t,description:s,ref:r,type:p,key:"My Groups"})}),i&&i.forEach(({name:t,description:s,ref:r,type:p})=>{o.has(`${r}`)||o.set(`${r}`,{name:t,description:s,ref:r,type:p,key:"All Groups"})}),[...o.values()]},[e,i]),isLoading:m||a,isError:n||u}};export{y as useGroupOptions};
|
|
2
2
|
//# sourceMappingURL=useGroupOptions.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{stringifyEntityRef as n}from"@backstage/catalog-model";import{useApi as t,identityApiRef as p,configApiRef as
|
|
1
|
+
import{stringifyEntityRef as n}from"@backstage/catalog-model";import{useApi as t,identityApiRef as p,configApiRef as m}from"@backstage/core-plugin-api";import{catalogApiRef as f}from"@backstage/plugin-catalog-react";import{getGroupFilterFromConfig as c}from"@spotify/backstage-plugin-soundcheck-common";import{useQuery as u}from"@tanstack/react-query";function y(){const i=t(p),r=t(f),o=t(m);return u(["soundcheck/user-groups-claims"],async()=>{const{ownershipEntityRefs:s}=await i.getBackstageIdentity(),a=c(o);return(await r.getEntitiesByRefs({entityRefs:s,filter:a})).items.filter(e=>e?.kind==="Group").map(e=>({name:e.spec?.profile?.displayName??e.metadata.title??e.metadata.name,description:e.metadata.description,ref:n(e),type:e.spec?.type}))})}export{y as useUsersGroupClaims};
|
|
2
2
|
//# sourceMappingURL=useUsersGroupClaims.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
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};
|
|
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
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{useApi as u}from"@backstage/core-plugin-api";import{useQueryClient as m,useMutation as f}from"@tanstack/react-query";import{soundcheckApiRef as y}from"../../api.esm.js";import"../../contexts/TrackFormContext.esm.js";import"../../contexts/CheckFormContext.esm.js";import"../../contexts/CampaignFormContext.esm.js";import"react/jsx-runtime";import"react";import{useLoggedInUser as p}from"../../contexts/UserProvider.esm.js";import{MutationKeys as l,QueryKeys as i}from"../graphqlKeys.esm.js";import{useSoundcheckAlert as d}from"../useSoundcheckAlert.esm.js";const k="Error Recertifying Track";function T(){const o=u(y),s=m(),{showAlert:a}=d(),{userEntityRef:n}=p(),c=async r=>{const{trackId:e,numberOfDays:t}=r;return await o.recertifyTrack(e,t,n)};return f([l.RecertifyTrack],c,{onSuccess:()=>{const r=[i.CertificationStatus,i.CertificationStatusHistory,i.GetOverallTrackPassRateTrends,i.GetIndividualTrackPassRateTrends];return Promise.all(r.map(e=>s.invalidateQueries({queryKey:[e]})))},onError:(r,e)=>{let t=`Failed to recertify track ${e}`;r instanceof Error&&(t=r.message),a({severity:"error",title:k,message:t})}})}export{T as useRecertifyTrack};
|
|
2
|
+
//# sourceMappingURL=useRecertifyTrack.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{parseEntityRef as G}from"@backstage/catalog-model";import{useMemo as o}from"react";import{useGetCampaigns as
|
|
1
|
+
import{parseEntityRef as G}from"@backstage/catalog-model";import{useMemo as o}from"react";import{useGetCampaigns as T}from"../campaigns/useGetCampaigns.esm.js";import{useGetAllTracks as y}from"./useGetAllTracks.esm.js";import{useGetTracksApplicableEntityCount as E}from"./useGetTracksApplicableEntityCount.esm.js";function v(r){if(!r||r.trim()==="")return!1;try{return G(r).kind.toLowerCase()==="group"}catch{return!1}}function A(r,b={},h){const n=v(r)&&(h?.enabled??!0),{data:d,isLoading:s,error:c}=y(b,{enabled:n}),{data:p,isLoading:l,error:m}=T({},n),u=o(()=>p?.edges?new Set(p.edges.filter(({node:e})=>e.archived).map(({node:e})=>e.track.id)):new Set,[p]),i=o(()=>d?.edges?d.edges.map(({node:e})=>e).filter(e=>!u.has(e.id)).filter(e=>!e.draft).sort((e,a)=>e.id.localeCompare(a.id)):[],[d,u]),{data:t,isLoading:g,error:f}=E(r,{ids:i.map(e=>e.id)},{enabled:n&&i.length>0&&!s&&!l}),k=o(()=>t?new Map(t.map(e=>[e.id,e.applicableEntityCount])):new Map,[t]),C=o(()=>t?i.filter(e=>{const a=k.get(e.id);return a!==void 0&&a>0}):[],[i,k,t]),L=o(()=>s||l||g||!!r&&!t&&i.length>0,[s,l,g,r,t,i.length]),w=o(()=>c||m||f,[c,m,f]);return{tracks:C??[],counts:t,isLoading:L,error:w,activeTrackCount:i?.length}}export{A as useTracksApplicableToGroup};
|
|
2
2
|
//# sourceMappingURL=useTracksApplicableToGroup.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as n,jsx as o}from"react/jsx-runtime";import{makeStyles as v,Modal as k,Box as B,Typography as s,Button as c}from"@material-ui/core";import{createContext as N,useState as m,useRef as M,useCallback as l,useContext as w}from"react";const T=v(e=>({modalContent:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",backgroundColor:e.palette.background.paper},modalButtons:{display:"flex",justifyContent:"flex-end","& button":{width:"40%",maxWidth:"185px"},padding:e.spacing(2,3),borderTop:`1px solid ${e.palette.divider}`},modalMessage:{margin:"15px 0 35px"},modalText:{padding:e.spacing(2,3,0,3)},cancelButton:{color:e.palette.text.primary}})),p=N({}),j=e=>{const a=T(),[u,i]=m(!1),[t,
|
|
1
|
+
import{jsxs as n,jsx as o}from"react/jsx-runtime";import{makeStyles as v,Modal as k,Box as B,Typography as s,Button as c}from"@material-ui/core";import{createContext as N,useState as m,useRef as M,useCallback as l,useContext as w}from"react";const T=v(e=>({modalContent:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",backgroundColor:e.palette.background.paper,maxWidth:"650px"},modalButtons:{display:"flex",justifyContent:"flex-end","& button":{width:"40%",maxWidth:"185px"},padding:e.spacing(2,3),borderTop:`1px solid ${e.palette.divider}`},modalMessage:{margin:"15px 0 35px"},modalText:{padding:e.spacing(2,3,0,3)},cancelButton:{color:e.palette.text.primary}})),p=N({}),j=e=>{const a=T(),[u,i]=m(!1),[t,x]=m(),r=M(),f=l(({title:C,message:b,error:g})=>(x({title:C,message:b,error:g}),i(!0),new Promise(y=>{r.current=y})),[]),h=l(()=>{r.current&&r.current(!0),i(!1)},[]),d=l(()=>{r.current&&r.current(!1),i(!1)},[]);return n(p.Provider,{value:{showModal:f},children:[e.children,t&&o(k,{open:u,onClose:d,"aria-labelledby":"confirmation-modal-title","aria-describedby":"confirmation-modal-description",children:n(B,{className:a.modalContent,children:[n("div",{className:a.modalText,children:[o(s,{id:"confirmation-modal-title",variant:"h6",children:t.title}),o(s,{className:a.modalMessage,id:"confirmation-modal-description",variant:"body1",children:t.message})]}),n("div",{className:a.modalButtons,children:[!t.error&&o(c,{onClick:d,variant:"text","aria-label":"cancel",className:a.cancelButton,children:"Cancel"}),o(c,{color:"primary",onClick:h,variant:"contained","aria-label":"confirm",children:t.error?"Ok":"Confirm"})]})]})})]})},S=()=>w(p);export{j as default,S as useConfirmationModal};
|
|
2
2
|
//# sourceMappingURL=useConfirmationModal.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{useApi as k,useAnalytics as b}from"@backstage/core-plugin-api";import{useRef as v,useEffect as y,useCallback as $}from"react";import{useLocation as A}from"react-router-dom";import{soundcheckApiRef as E}from"../api.esm.js";import{useFeatureFlag as L}from"./useFeatureFlag.esm.js";function T(g={}){const t=L("enable-load-time-reporting"),{enabled:a=!0,routeName:n,additionalAttributes:m}=g,r=A(),e=v(""),p=k(E),f=b();return y(()=>{if(!a||!t)return;const c=n||r.pathname;return e.current=`loading-started-for-${c}`,performance.mark(e.current),document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&(performance.clearMarks(e.current),performance.clearMeasures(`time-since-${e.current}`))}),()=>{e.current&&(performance.clearMarks(e.current),performance.clearMeasures(`time-since-${e.current}`))}},[a,t,n,m,r.pathname]),{reportContentLoaded:$(c=>{if(!a||!t||!e.current)return;const s=n||r.pathname;if(!e.current.includes(s)){performance.clearMarks(e.current),performance.clearMeasures(`time-since-${e.current}`);return}const o=`loading-ended-for-${r.pathname}`,i=`time-since-${e.current}`;try{performance.mark(o),performance.measure(i,e.current,o);const u=performance.getEntriesByName(i);if(u.length>0){const M=u[u.length-1],l=Math.round(M.duration),d=l/1e3;if(d>1e3*60*60){performance.clearMarks(o),performance.clearMeasures(i);return}const h={pathname:r.pathname,refresh:!!c?.lcp,...m,...c};p.recordLoadTime({metricType:"navigation",routeName:s,loadTimeMs:l,additionalAttributes:h}).catch(N=>{}),f.captureEvent("performance","navigation",{attributes:{metricType:"navigation",value:d,route:s,timestamp:Date.now().toString(),...h}})}}catch{}finally{performance.clearMarks(o),performance.clearMeasures(i)}},[a,t,n,m,r.pathname,p,f])}}export{T as useLoadTimeReporting};
|
|
2
|
+
//# sourceMappingURL=useLoadTimeReporting.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{useState as S,useCallback as s,useMemo as h}from"react";import{useSearchParams as z}from"react-router-dom";const C=({pageParam:g,defaultPageSize:n=10,items:t})=>{const[m,i]=z(),r=m.get(g),a=r?parseInt(r,10):n,[e,o]=S(0),p=s(()=>{e!==0&&o(0)},[e]),u=h(()=>t.length>a?t.slice(e,e+a):t,[t,e,a]),P=s(()=>{o(e+a)},[a,e]),c=s(()=>{o(e-a)},[a,e]),f=s(l=>{o(0),i(`${g}=${l}`)},[g,i]);return{paginationProps:{pageSize:a,rowCount:t.length,offset:e,onNextPage:P,onPreviousPage:c,onPageSizeChange:f},paginatedItems:u,reset:p}};export{C as usePagination};
|
|
2
|
+
//# sourceMappingURL=usePagination.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{useMemo as a}from"react";const i=({items:t,searchTerm:o})=>a(()=>{let r=t;const s=o?.toLowerCase().trim()??"";return o&&o.length>1?r=t.filter(e=>e.name?e.name.toLowerCase().includes(s):e.id.toLowerCase().includes(s)):r=t.filter(e=>e.name?e.name.toLowerCase().startsWith(s):e.id.toLowerCase().startsWith(s)),r},[t,o]);export{i as useSearchName};
|
|
2
|
+
//# sourceMappingURL=useSearchName.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const o=Intl.NumberFormat("en",{notation:"compact"}),
|
|
1
|
+
const o=Intl.NumberFormat("en",{notation:"compact"}),r=t=>o.format(t);function e(t,n){return n<=0?0:Math.round((t??0)/n*100)}export{r as compactNumberFormatter,e as getPercentage};
|
|
2
2
|
//# sourceMappingURL=formatters.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const
|
|
1
|
+
const k=e=>{const{lifecycles:t,owners:s,types:c,systems:i}=e,n=t?.length?{"spec.lifecycle":t}:void 0,o=s?.length?{"relations.ownedBy":s}:void 0,l=c?.length?{"spec.type":c}:void 0,r=i?.length?{"relations.partOf":i}:void 0;if(n||o||l||r)return{...n,...o,...l,...r}},g=e=>e<1e4?"<10k":e<1e5?"[10k-100k)":e<1e6?"[100k-1M)":">=1M",p=e=>e<5?"<5":e<10?"[5-10)":e<50?"[10-50)":">=50",y=e=>e<10?"<10":e<50?"[10-50)":e<100?"[50-100)":">=100";export{y as getChecksBucket,g as getEntitiesBucket,p as getTracksBucket,k as toFilter};
|
|
2
2
|
//# sourceMappingURL=helpers.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
class
|
|
1
|
+
class n{#n;#e;#i;#s;#t=null;#r;constructor(t){this.#n=t.analytics,this.#e=t.routeName,this.#i=t.additionalAttributes||{},this.#s=t.soundcheckApi,this.#r=0}getLCPValue(){return this.#r}startMeasuring(){if("PerformanceObserver"in window){try{this.#t=new PerformanceObserver(t=>{const e=t.getEntries(),i=e[e.length-1];i&&i.renderTime!==void 0&&this.#o({value:i.renderTime,entry:i})}),this.#t.observe({type:"largest-contentful-paint"})}catch{}document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&this.stopMeasuring()})}}#o(t){this.#r=t.value;const e=t.value/1e3,i=this.#c(e);this.#s.recordLoadTime({metricType:"lcp",routeName:this.#e||"unknown",loadTimeMs:t.value,additionalAttributes:this.#i}).catch(o=>{}),this.#a(e,i)}#a(t,e){this.#n.captureEvent("performance","lcp",{attributes:{metricType:"lcp",value:t,rating:e,route:this.#e||"unknown",timestamp:Date.now().toString(),...this.#i}})}#c(t){return t<=2.5?"good":t<=4?"needs-improvement":"poor"}stopMeasuring(){this.#t&&(this.#t.disconnect(),this.#t=null)}}function s(r){return new n(r)}export{n as LCPReporter,s as createLCPReporter};
|
|
2
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.19.
|
|
4
|
+
"version": "0.19.3",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"homepage": "https://backstage.spotify.com",
|
|
7
7
|
"main": "./dist/index.esm.js",
|
|
@@ -58,17 +58,18 @@
|
|
|
58
58
|
"prepare": "yarn generate"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@backstage/catalog-client": "^1.
|
|
61
|
+
"@backstage/catalog-client": "^1.12.0",
|
|
62
62
|
"@backstage/catalog-model": "^1.7.5",
|
|
63
63
|
"@backstage/config": "^1.3.3",
|
|
64
|
-
"@backstage/core-compat-api": "^0.5.
|
|
65
|
-
"@backstage/core-components": "^0.
|
|
66
|
-
"@backstage/core-plugin-api": "^1.
|
|
67
|
-
"@backstage/frontend-plugin-api": "^0.
|
|
68
|
-
"@backstage/plugin-catalog-react": "^1.
|
|
64
|
+
"@backstage/core-compat-api": "^0.5.2",
|
|
65
|
+
"@backstage/core-components": "^0.18.0",
|
|
66
|
+
"@backstage/core-plugin-api": "^1.11.0",
|
|
67
|
+
"@backstage/frontend-plugin-api": "^0.12.0",
|
|
68
|
+
"@backstage/plugin-catalog-react": "^1.21.0",
|
|
69
69
|
"@backstage/plugin-permission-react": "^0.4.36",
|
|
70
|
-
"@backstage/plugin-scaffolder-react": "^1.19.
|
|
71
|
-
"@backstage/types": "^1.2.
|
|
70
|
+
"@backstage/plugin-scaffolder-react": "^1.19.1",
|
|
71
|
+
"@backstage/types": "^1.2.2",
|
|
72
|
+
"@backstage/ui": "^0.7.1",
|
|
72
73
|
"@date-io/luxon": "^1.0.0",
|
|
73
74
|
"@hookform/resolvers": "^4.0.0",
|
|
74
75
|
"@material-ui/core": "^4.12.2",
|
|
@@ -78,37 +79,31 @@
|
|
|
78
79
|
"@mui/styles": "^5.14.7",
|
|
79
80
|
"@nivo/circle-packing": "^0.99.0",
|
|
80
81
|
"@nivo/colors": "^0.99.0",
|
|
81
|
-
"@nivo/core": "^0.99.0",
|
|
82
82
|
"@nivo/heatmap": "^0.99.0",
|
|
83
83
|
"@nivo/icicle": "^0.99.0",
|
|
84
84
|
"@nivo/sunburst": "^0.99.0",
|
|
85
85
|
"@nivo/treemap": "^0.99.0",
|
|
86
86
|
"@remixicon/react": "^4.6.0",
|
|
87
87
|
"@spotify/backstage-plugin-core": "^0.8.10",
|
|
88
|
-
"@spotify/backstage-plugin-soundcheck-common": "^0.19.
|
|
88
|
+
"@spotify/backstage-plugin-soundcheck-common": "^0.19.1",
|
|
89
89
|
"@tanstack/react-query": "^4.6.1",
|
|
90
|
-
"@tanstack/react-virtual": "^3.13.9",
|
|
91
|
-
"@types/react-csv": "^1.1.6",
|
|
92
90
|
"@uiw/react-md-editor": "3.20.10",
|
|
93
91
|
"classnames": "^2.3.2",
|
|
94
92
|
"copy-to-clipboard": "^3.3.3",
|
|
95
93
|
"cron-validate": "^1.4.5",
|
|
96
94
|
"cronstrue": "^2.28.0",
|
|
97
95
|
"d3-color": "^3.1.0",
|
|
98
|
-
"d3-hierarchy": "^3.1.2",
|
|
99
96
|
"d3-interpolate": "^3.0.1",
|
|
100
97
|
"d3-scale": "^4.0.2",
|
|
101
98
|
"d3-scale-chromatic": "^3.0.0",
|
|
102
|
-
"d3-shape": "^3.2.0",
|
|
103
99
|
"framer-motion": "^6.0.0",
|
|
104
100
|
"git-url-parse": "^16.0.0",
|
|
105
101
|
"graphql-request": "6.1.0",
|
|
106
|
-
"immer": "^10.1.1",
|
|
107
102
|
"js-yaml": "^4.1.0",
|
|
108
103
|
"lodash": "^4.17.21",
|
|
109
|
-
"lodash.debounce": "^4.0.8",
|
|
110
104
|
"luxon": "^3.1.1",
|
|
111
105
|
"prismjs": "^1.27.0",
|
|
106
|
+
"react-aria-components": "^1.10.1",
|
|
112
107
|
"react-circular-progressbar": "^2.1.0",
|
|
113
108
|
"react-confetti": "^6.1.0",
|
|
114
109
|
"react-csv": "^2.2.2",
|
|
@@ -117,14 +112,11 @@
|
|
|
117
112
|
"react-markdown": "^10.1.0",
|
|
118
113
|
"react-simple-code-editor": "^0.14.1",
|
|
119
114
|
"react-use": "^17.2.4",
|
|
120
|
-
"react-virtuoso": "^4.0.0",
|
|
121
115
|
"react-window": "^1.8.8",
|
|
122
116
|
"recharts": "^2.8.0",
|
|
123
117
|
"rehype-raw": "^7.0.0",
|
|
124
118
|
"remark-gfm": "^4.0.0",
|
|
125
|
-
"slate": "^0.117.0",
|
|
126
119
|
"use-immer": "^0.11.0",
|
|
127
|
-
"use-resize-observer": "^9.1.0",
|
|
128
120
|
"uuid": "^11.0.0",
|
|
129
121
|
"zod": "^3.20.0"
|
|
130
122
|
},
|
|
@@ -134,11 +126,11 @@
|
|
|
134
126
|
"react-router-dom": "6.0.0-beta.0 || ^6.3.0"
|
|
135
127
|
},
|
|
136
128
|
"devDependencies": {
|
|
137
|
-
"@backstage/cli": "^0.34.
|
|
138
|
-
"@backstage/core-app-api": "^1.
|
|
139
|
-
"@backstage/dev-utils": "^1.1.
|
|
129
|
+
"@backstage/cli": "^0.34.3",
|
|
130
|
+
"@backstage/core-app-api": "^1.19.0",
|
|
131
|
+
"@backstage/dev-utils": "^1.1.14",
|
|
140
132
|
"@backstage/e2e-test-utils": "^0.1.1",
|
|
141
|
-
"@backstage/frontend-test-utils": "^0.3.
|
|
133
|
+
"@backstage/frontend-test-utils": "^0.3.6",
|
|
142
134
|
"@backstage/plugin-permission-common": "^0.9.1",
|
|
143
135
|
"@backstage/test-utils": "^1.7.11",
|
|
144
136
|
"@graphql-codegen/cli": "^5.0.0",
|
|
@@ -148,20 +140,19 @@
|
|
|
148
140
|
"@playwright/test": "^1.32.3",
|
|
149
141
|
"@sp4b-dev/test-utils": "^0.0.13",
|
|
150
142
|
"@spotify/backstage-plugin-core-common": "^0.6.9",
|
|
151
|
-
"@spotify/backstage-plugin-soundcheck-node": "^0.10.
|
|
143
|
+
"@spotify/backstage-plugin-soundcheck-node": "^0.10.1",
|
|
152
144
|
"@testing-library/jest-dom": "^6.0.0",
|
|
153
145
|
"@testing-library/react": "^14.0.0",
|
|
154
146
|
"@testing-library/user-event": "^14.0.0",
|
|
155
147
|
"@types/d3-color": "^3.1.0",
|
|
156
|
-
"@types/d3-hierarchy": "^3",
|
|
157
148
|
"@types/d3-interpolate": "^3",
|
|
158
149
|
"@types/d3-scale": "^4",
|
|
159
150
|
"@types/d3-scale-chromatic": "^3.0.0",
|
|
160
|
-
"@types/d3-shape": "^3",
|
|
161
151
|
"@types/git-url-parse": "^16.0.0",
|
|
162
152
|
"@types/jest": "^30.0.0",
|
|
163
153
|
"@types/luxon": "^3.0.1",
|
|
164
154
|
"@types/node": "^22.0.0",
|
|
155
|
+
"@types/react-csv": "^1.1.6",
|
|
165
156
|
"@types/react-window": "^1.8.5",
|
|
166
157
|
"cross-fetch": "^4.0.0",
|
|
167
158
|
"msw": "^1.0.0"
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as i,jsxs as o,Fragment as X}from"react/jsx-runtime";import{useRouteRef as Y,useApi as Z,configApiRef as ee}from"@backstage/core-plugin-api";import{EntityRefLink as ie}from"@backstage/plugin-catalog-react";import{usePermission as u}from"@backstage/plugin-permission-react";import{makeStyles as te,Button as ae,Box as n,Typography as N,Divider as oe,Tabs as ne,Tab as y}from"@material-ui/core";import{soundcheckCampaignReadPermission as re,soundcheckCampaignUpdatePermission as se,soundcheckCampaignNotificationsCreatePermission as ce,toEntityFilterQuery as le}from"@spotify/backstage-plugin-soundcheck-common";import{useMemo as s,useState as me,useCallback as pe}from"react";import{useParams as de,useNavigate as ge}from"react-router-dom";import"@backstage/catalog-model";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import"../../hooks/useSoundcheckAlert.esm.js";import{useGetCampaigns as fe}from"../../hooks/campaigns/useGetCampaigns.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{useCertificationStatus as he}from"../../hooks/aggregations/useCertificationStatus.esm.js";import{useCheckStatuses as ue}from"../../hooks/aggregations/useCheckStatuses.esm.js";import{useLCPReporting as ye}from"../../hooks/useLCPReporting.esm.js";import{campaignEditRouteRef as ke}from"../../routes.esm.js";import{FilterSidebar as Ce}from"../FilterSidebar/FilterSidebar.esm.js";import"../FilterSidebar/StateFilter.esm.js";import{useTrackFilterSidebar as Se}from"../FilterSidebar/useTrackFilterSidebar.esm.js";import{toFilter as be}from"../FilterSidebar/util.esm.js";import{LevelsTable as Te}from"../LevelsTable/LevelsTable.esm.js";import{LoadingIndicator as we}from"../LoadingIndicator/LoadingIndicator.esm.js";import{PageWarningMessage as ve}from"../PageWarningMessage/PageWarningMessage.esm.js";import{SendCampaignNotificationDialog as xe}from"../SendCampaignNotificationDialog/SendCampaignNotificationDialog.esm.js";import"../SoundcheckHeader/SoundcheckHeader.esm.js";import"../SoundcheckHeader/SoundcheckHeaderContext.esm.js";import{useHeader as Ne}from"../SoundcheckHeader/useHeader.esm.js";import{SoundcheckMarkdownContent as Re}from"../SoundcheckMarkdownContent/SoundcheckMarkdownContent.esm.js";import"@backstage/core-components";import"react-markdown";import"rehype-raw";import"remark-gfm";import{TopFailingChecksTable as Fe}from"../TopFailingChecksTable/TopFailingChecksTable.esm.js";import{TrackEntitiesTable as Le}from"../TrackPage/TrackEntitiesTable/TrackEntitiesTable.esm.js";import{CampaignStatusHistoryTile as Be}from"./CampaignStatusHistoryTile.esm.js";import{CampaignStatusTile as Ae}from"./CampaignStatusTile.esm.js";import{DaysRemainingTile as Ee}from"./DaysRemainingTile.esm.js";const De=te(e=>({root:{height:"100%",background:e.palette.background.default,display:"flex",width:"100%",borderTop:`1px solid ${e.palette.divider}`},progressContainer:{flex:1,borderBottom:`1px solid ${e.palette.divider}`,padding:e.spacing(2)},campaignContainerContent:{paddingTop:e.spacing(1),paddingBottom:e.spacing(1),backgroundColor:e.palette.background.paper},editButton:{marginLeft:"auto"},notificationButton:{marginRight:e.spacing(1)},checksContainer:{},entitiesContainer:{marginTop:e.spacing(3)},headerDescription:{fontSize:e.typography.body2.fontSize,margin:e.spacing(.5,0,0),"& p":{margin:0},"& a":{color:"inherit",textDecoration:"underline"}},content:{paddingTop:0,flex:1},ownerLink:{"& span":{color:"inherit","&:hover":{textDecoration:"underline"}}},sectionTitle:{paddingBottom:e.spacing(1)},chartSection:{flex:1,flexBasis:"auto",minWidth:320,display:"flex",flexDirection:"column",height:"100%"},title:{fontWeight:"bold",fontSize:"1.1rem",lineHeight:`${e.typography.h5.fontSize}px`,cursor:"default",marginBottom:e.spacing(2)},divider:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},tabs:{padding:e.spacing(2,2,0,2)},contentArea:{flex:1,padding:e.spacing(0,2)},tableArea:{margin:e.spacing(1,0,2)}})),Ie=()=>{const e=De(),{owners:c,lifecycles:l,types:m,systems:p,stagedLifecycles:R,setStagedLifecycles:F,stagedOwners:L,setStagedOwners:B,stagedTypes:A,setStagedTypes:E,stagedSystems:D,setStagedSystems:I,hasFilterChanges:P,handleApplyFilters:j,handleClearFilters:O}=Se(),d=s(()=>be({lifecycles:l,owners:c,types:m,systems:p}),[l,c,m,p]),[g,z]=me("checks"),H=pe((f,K)=>{z(K)},[]),{campaignId:r}=de();ye({routeName:"soundcheck-campaign-details",additionalAttributes:{campaignId:r??"",owners:c?.join(",")??"",lifecycles:l?.join(",")??"",types:m?.join(",")??"",systems:p?.join(",")??""}});const{data:M,isLoading:h}=fe({ids:[r],first:1}),a=M?.edges?.[0]?.node,t=a?.track,{loading:W,allowed:$}=u({permission:re,resourceRef:r}),{loading:k,allowed:C}=u({permission:se,resourceRef:r}),G=Array.from(new Set(t?.levels.flatMap(f=>f.checks).map(f=>f.id)??[])),{data:S,isLoading:Q}=ue({trackId:t?.id,checkIds:G,filter:d},!!t),b=ge(),T=Y(ke),U=s(()=>t?.ownerEntityRef?i(ie,{color:"inherit",entityRef:t.ownerEntityRef,className:e.ownerLink}):null,[t?.ownerEntityRef,e.ownerLink]),w=Z(ee).getOptionalBoolean("soundcheck.notifications.enabled"),{loading:v,allowed:x}=u({permission:ce}),{data:V}=he({trackId:t?.id??"",filter:d},!!a),q=s(()=>o(X,{children:[w&&!v&&x&&a&&i(xe,{campaign:a,buttonClass:e.notificationButton}),!k&&C&&t?.isEditable?i(ae,{className:e.editButton,variant:"contained",color:"primary",onClick:()=>{b(T({campaignId:r}))},children:"Edit Campaign"}):null]}),[w,v,x,a,e.notificationButton,e.editButton,k,C,t?.isEditable,b,T,r]),J=s(()=>t?.description?i(Re,{className:e.headerDescription,content:t.description}):null,[e.headerDescription,t?.description]);Ne({title:t?.name,description:J,customSubtitle:U,sectionRight:q});const _=s(()=>le(t?.filter),[t]);return o("div",{children:[i(ve,{entityName:"track",entityId:r,showNotFound:!h&&!a,showCannotView:!W&&!$}),h&&i(we,{}),t&&o("div",{className:e.root,children:[i(n,{children:i(Ce,{trackFilter:_,stagedTypes:A,stagedLifecycles:R,stagedOwners:L,stagedSystems:D,onTypesChange:E,onLifecyclesChange:F,onOwnersChange:B,onSystemsChange:I,onApplyFilters:j,onClearFilters:O,hasFilterChanges:P})}),o(n,{className:e.content,children:[i("div",{className:e.progressContainer,children:o(n,{display:"flex",marginTop:2,children:[o(n,{display:"flex",flexDirection:"column",marginRight:3,minWidth:320,children:[i(N,{className:e.title,children:"Current Status"}),i(Ae,{campaign:a,filter:d}),i(oe,{className:e.divider}),i(Ee,{campaign:a})]}),o(n,{className:e.chartSection,children:[i(N,{className:e.title,children:"Historical Status"}),i(Be,{campaign:a,filter:d})]})]})}),i(n,{className:e.tabs,children:o(ne,{value:g,onChange:H,indicatorColor:"primary",textColor:"primary",children:[i(y,{label:"Checks",value:"checks"}),i(y,{label:"Top Failing Checks",value:"topFailingChecks"}),i(y,{label:"Entities",value:"entities"})]})}),o(n,{className:e.contentArea,children:[g==="checks"&&i("div",{className:e.tableArea,children:i(Te,{track:t,checkStatuses:S,isLoading:h||Q,hideLevel:!0})}),g==="entities"&&i(n,{marginTop:1,children:i(Le,{track:t,lifecycles:l,owners:c,types:m,systems:p})}),g==="topFailingChecks"&&i("div",{className:e.tableArea,children:i(Fe,{track:t,checkStatuses:S,certificationStatus:V?.certificationStatus,hideLevel:!0})})]})]})]})]})};export{Ie as CampaignInsightsPage};
|
|
2
|
-
//# sourceMappingURL=CampaignInsightsPage.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as a,jsxs as y}from"react/jsx-runtime";import{useRouteRef as M,useApi as X,featureFlagsApiRef as q}from"@backstage/core-plugin-api";import{usePermission as z}from"@backstage/plugin-permission-react";import{makeStyles as J,Grid as i,Button as K}from"@material-ui/core";import{soundcheckCampaignCreatePermission as Q}from"@spotify/backstage-plugin-soundcheck-common";import{useState as t,useEffect as U}from"react";import{useNavigate as V}from"react-router-dom";import Y from"react-use/lib/useDebounce";import{useGetCampaignOwners as Z}from"../../../hooks/campaigns/useGetCampaignOwners.esm.js";import{useGetCampaigns as _}from"../../../hooks/campaigns/useGetCampaigns.esm.js";import{campaignCreateRouteRef as $}from"../../../routes.esm.js";import{FilterDefault as p}from"../../../utils/filters.esm.js";import{EmptyCampaignState as ee}from"../CampaignEmptyState.esm.js";import{EmptyState as ae}from"../../EmptyState/EmptyState.esm.js";import{Pagination as re}from"../../Pagination/Pagination.esm.js";import{SearchFilters as ie}from"../../SearchFilters/SearchFilters.esm.js";import{CampaignsOverviewSkeleton as te}from"./CampaignsOverviewSkeleton.esm.js";import{CampaignSummaryCard as ne}from"./CampaignSummaryCard.esm.js";import se from"./useArchiveConfirmationModal.esm.js";var N=(e=>(e.title="No campaigns found",e.description="No campaigns matched your search. Consider changing search term and filters.",e))(N||{});const oe=J(e=>({headerButtons:{display:"flex",gap:e.spacing(1),flexWrap:"nowrap",justifyContent:"end",alignItems:"end"},header:{padding:e.spacing(0,0,1)},container:{padding:e.spacing(3),gap:e.spacing(3)},createButton:{lineHeight:"1.25rem",paddingTop:e.spacing(1.5),paddingBottom:e.spacing(1.5)}})),me=({campaignsPerPage:e,currentCursor:x})=>{const n=oe(),[g,d]=t(x),[o,w]=t(""),[h,b]=t(""),[u,B]=t(p.Alpha),[f,A]=t(p.Owner),[C,R]=t(p.Status),{data:F,isLoading:k}=Z();Y(()=>{b(o)},500,[o]);const{loading:O,allowed:L}=z({permission:Q}),{data:m,isLoading:l}=_({ids:void 0,first:e,after:g,orderAlphabetical:u,searchByOwner:f,searchByName:h,searchByStatus:C}),E=V(),G=M($),T=()=>E(G()),c=m?.edges.map(r=>r.node),[P,v]=t([]);U(()=>{d(void 0),v([])},[h]);const S=X(q),j=!S.getRegisteredFlags().find(r=>r.name==="soundcheck-enable-campaigns")||S.isActive("soundcheck-enable-campaigns"),D=!L||!j,I=r=>{B(r.target.value)},H=r=>{A(r.target.value)},W=r=>{R(r.target.value)};if(!l&&!c)return a(ee,{});let s;return l?s=a(te,{}):c?.length?s=c.map(r=>a(i,{xs:12,sm:12,md:6,lg:4,xl:3,item:!0,role:"listitem","aria-label":"result",children:a(se,{children:a(ne,{campaign:r})})},r.id)):s=a(i,{xs:12,item:!0,role:"listitem","aria-label":"result",children:a(ae,{title:"No campaigns found",description:"No campaigns matched your search. Consider changing search term and filters."})}),y(i,{container:!0,direction:"row",className:n.container,children:[y(i,{container:!0,className:n.header,children:[a(ie,{searchPlaceholder:"Search Available Campaigns",isLoading:l||k,searchTerm:o,setSearchTerm:w,filterAlpha:u,handleAlphabeticalFilterChange:I,filterOwner:f,handleOwnerFilterChange:H,filterStatus:C,handleStatusFilterChange:W,owners:F}),a(i,{item:!0,xs:4,className:n.headerButtons,children:!O&&a(K,{disabled:D,variant:"contained",color:"primary",onClick:T,className:n.createButton,children:"Create Campaign"})})]}),a(i,{container:!0,spacing:4,role:"list","aria-label":"campaigns",children:s}),(m?.pageInfo.hasNextPage||P?.length>0)&&a(i,{item:!0,xs:12,children:a(re,{response:m,listingsPerPage:e,cursor:g,setCursor:d,prevCursors:P,setPrevCursors:v,labelPerPageDropdown:"Campaigns Per Page:",urlRoute:"campaigns?campaignsPerPage="})})]})};export{me as CampaignListPage,N as CampaignNoResults};
|
|
2
|
-
//# sourceMappingURL=CampaignListPage.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as t,jsxs as u}from"react/jsx-runtime";import{useApi as w,featureFlagsApiRef as Y,useRouteRef as Z}from"@backstage/core-plugin-api";import{usePermission as _}from"@backstage/plugin-permission-react";import{makeStyles as ee,Button as A,Grid as o}from"@material-ui/core";import{soundcheckCheckCreatePermission as re}from"@spotify/backstage-plugin-soundcheck-common";import{useState as i,useEffect as N}from"react";import{useNavigate as te}from"react-router-dom";import ae from"react-use/lib/useDebounce";import{soundcheckApiRef as oe}from"../../../api.esm.js";import"@backstage/catalog-model";import"@tanstack/react-query";import"../../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import{useGetChecks as ie}from"../../../hooks/checks/useGetChecks.esm.js";import"../../../hooks/useSoundcheckAlert.esm.js";import"../../../hooks/useConfirmationModal.esm.js";import{useGetCheckOwners as se}from"../../../hooks/checks/useGetCheckOwners.esm.js";import{useImportChecks as ce}from"../../../hooks/checks/useImportChecks.esm.js";import ne from"../../../images/no-results.svg";import{checkTemplatesRouteRef as me}from"../../../routes.esm.js";import{exportChecks as le}from"../../../utils/export.esm.js";import{FilterDefault as I}from"../../../utils/filters.esm.js";import{EmptyState as S}from"../../EmptyState/EmptyState.esm.js";import{ImportExportPanel as pe}from"../../ImportExportPanel/ImportExportPanel.esm.js";import{Pagination as de}from"../../Pagination/Pagination.esm.js";import{SearchFilters as he}from"../../SearchFilters/SearchFilters.esm.js";import{ChecksOverviewSkeleton as ge}from"../skeletons/ChecksOverviewSkeleton.esm.js";import{CheckSummaryCard as ue}from"./CheckSummaryCard.esm.js";var B=(e=>(e.title="Create a check",e.description="A check is a comparison between a defined acceptable outcome and the actual outcome of a given process.",e.callToAction="Get started",e))(B||{}),R=(e=>(e.title="No checks found",e.description="No checks matched your search. Consider changing search term and filters.",e))(R||{});const fe=ee(e=>({headerButtons:{display:"flex",gap:e.spacing(1),flexWrap:"nowrap",justifyContent:"end",alignItems:"end"},header:{padding:e.spacing(0,0,1)},container:{padding:e.spacing(3),gap:e.spacing(3)},createButton:{lineHeight:"1.25rem",paddingTop:e.spacing(1.5),paddingBottom:e.spacing(1.5)}})),ke=({checksPerPage:e,currentCursor:E})=>{const s=fe(),[f,k]=i(E),[l,F]=i(""),[p,O]=i(I.Alpha),[d,T]=i(I.Owner),[C,G]=i(""),{data:L,isLoading:j}=se();ae(()=>{G(l)},500,[l]);const{loading:P,allowed:D}=_({permission:re}),{data:a,isLoading:c}=ie({ids:void 0,first:e,after:f,orderAlphabetical:p,searchByOwner:d,searchByName:C}),[h,H]=i(a),n=h?.edges?.map(r=>r.node),[b,v]=i([]);N(()=>{k(void 0),v([])},[C,p,d]);const x=w(Y),W=!x.getRegisteredFlags().find(r=>r.name==="soundcheck-enable-check-creation")||x.isActive("soundcheck-enable-check-creation"),g=!D||!W,$=r=>{O(r.target.value)},q=r=>{T(r.target.value)};N(()=>{a&&H(()=>({totalCount:a.totalCount,edges:a.edges,pageInfo:{startCursor:a.pageInfo.startCursor,endCursor:a.pageInfo.endCursor,hasNextPage:a?.pageInfo.hasNextPage??!1,hasPreviousPage:a?.pageInfo.hasPreviousPage??!1}}))},[a]);const z=te(),J=Z(me),y=()=>z(J()),M=w(oe),{mutateAsync:Q}=ce(),V=async r=>Q(r),X=async()=>{const r=await M.getChecks({orderAlphabetical:"asc"});return le(r.edges.map(U=>U.node))};if(!c&&!n)return t(S,{title:"Create a check",description:"A check is a comparison between a defined acceptable outcome and the actual outcome of a given process.",imgSrc:ne,action:!P&&t(A,{disabled:g,variant:"contained",color:"primary",onClick:y,children:"Get started"})});let m;c?m=t(ge,{}):n?.length?m=n?.map(r=>t(o,{xs:12,sm:12,md:6,lg:4,xl:3,item:!0,role:"listitem","aria-label":`check card ${r.id}`,children:t(ue,{check:r})},r.id)):m=t(o,{xs:12,item:!0,role:"listitem","aria-label":"result",children:t(S,{title:"No checks found",description:"No checks matched your search. Consider changing search term and filters."})});const K=h?.pageInfo.hasNextPage||b?.length>0;return u(o,{container:!0,direction:"row",className:s.container,children:[u(o,{container:!0,className:s.header,children:[t(he,{searchPlaceholder:"Search Available Checks",isLoading:c||j,searchTerm:l,setSearchTerm:F,filterAlpha:p,handleAlphabeticalFilterChange:$,filterOwner:d,handleOwnerFilterChange:q,owners:L}),u(o,{item:!0,xs:4,className:s.headerButtons,children:[t(pe,{resourceType:"check",disableImport:g,disableExport:c||!n?.length,onImport:V,onExport:X}),!P&&t(A,{disabled:g,variant:"contained",color:"primary",onClick:y,className:s.createButton,children:"Create Check"})]})]}),t(o,{container:!0,spacing:4,role:"list","aria-label":"checks",children:m}),K&&t(o,{item:!0,xs:12,children:t(de,{response:h,listingsPerPage:e,cursor:f,setCursor:k,prevCursors:b,setPrevCursors:v,labelPerPageDropdown:"Checks Per Page:",urlRoute:"checks?checksPerPage="})})]})};export{B as CheckEmptyState,ke as CheckListPage,R as CheckNoResults};
|
|
2
|
-
//# sourceMappingURL=CheckListPage.esm.js.map
|
package/dist/components/CollectorPage/Configurators/Jira/IssuesSearchFactDetailsComponent.esm.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsxs as i,jsx as e}from"react/jsx-runtime";import{makeStyles as h,Grid as s,Typography as d,TextField as c}from"@material-ui/core";import{useFormContext as T,Controller as x}from"react-hook-form";import{JIRA_COLLECTOR_FIELDS as f}from"./utils.esm.js";const u=h(a=>({root:{paddingTop:a.spacing(1)},textInput:{marginTop:0,width:"500px"},helperText:{marginLeft:0}})),g=({name:a,disabled:m})=>{const t=u(),{factName:l,jql:o}=f.factDetails,{control:p}=T();return i(s,{container:!0,spacing:1,direction:"column",className:t.root,children:[i(s,{item:!0,children:[e(d,{variant:"subtitle2",children:l.name}),e(x,{name:`${a}.factName`,control:p,render:({field:n,fieldState:{error:r}})=>e(c,{...n,type:"text",variant:"outlined",margin:"dense",placeholder:l.placeholder,className:t.textInput,disabled:m,error:!!r,helperText:r?.message??l.helperText,FormHelperTextProps:{className:t.helperText}})})]}),i(s,{item:!0,children:[e(d,{variant:"subtitle2",children:o.name}),e(x,{name:`${a}.jql`,control:p,render:({field:n,fieldState:{error:r}})=>e(c,{...n,type:"text",variant:"outlined",margin:"dense",placeholder:o.placeholder,className:t.textInput,disabled:m,error:!!r,helperText:r?.message??o.helperText,FormHelperTextProps:{className:t.helperText}})})]})]})};export{g as IssuesSearchFactDetailsComponent};
|
|
2
|
-
//# sourceMappingURL=IssuesSearchFactDetailsComponent.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsxs as p,Fragment as P,jsx as e}from"react/jsx-runtime";import{Box as r,Typography as d,Divider as T}from"@material-ui/core";import{useCallback as x,useMemo as k}from"react";import"../Badges/LevelBadge.esm.js";import"../Badges/NoLevelBadge.esm.js";import{CampaignBadge as w}from"../Badges/CampaignBadge.esm.js";import{StatusBadge as G}from"../Badges/StatusBadge.esm.js";const I=({filteredCampaigns:g,filteredTracks:u,campaignTracks:B,TrackCard:h,classes:n,isTracksLoading:b,trackStatusMap:i,trackCountsMap:f})=>{const s=x(t=>i?[...t].sort((a,c)=>{const N=i.get(a.id),v=i.get(c.id),m=N?.status?.allPassPercentage,l=v?.status?.allPassPercentage;return typeof m=="number"&&typeof l=="number"?m-l:typeof m=="number"&&typeof l!="number"?-1:typeof m!="number"&&typeof l=="number"?1:0}):t,[i]),o=x(t=>{const a=i?.get(t.id)?.status,c=(a?.passed??0)+(a?.failed??0)+(a?.warning??0)+(a?.error??0)+(a?.notReported??0)+(a?.exempt??0);return!a||c>0},[i]),y=k(()=>s(g.filter(o)),[o,g,s]),C=k(()=>s(u.filter(o)),[o,u,s]);return b?null:p(P,{children:[p(r,{display:"flex",alignItems:"center",className:n.sectionHeader,marginBottom:.5,marginTop:4,gridGap:12,children:[e(w,{}),e(d,{variant:"h5",style:{marginBottom:0},children:"Campaigns"})]}),e(T,{style:{marginBottom:16}}),y.length>0?e(r,{className:n.gridContainer,style:{marginTop:0},children:e(r,{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(300px, 1fr))",style:{gap:24},children:y.map(t=>e(h,{track:t,entityCount:f?.get(t.id)},t.id))})}):e(r,{className:n.emptyState,children:e(d,{variant:"h6",children:B.length>0?"No active campaigns matching the current filters":"No active campaigns."})}),C.length>0&&p(r,{className:n.gridContainer,children:[p(r,{display:"flex",alignItems:"center",className:n.sectionHeader,marginBottom:.5,gridGap:12,children:[e(G,{hideTooltip:!0,status:{passed:10,failed:10,error:0,exempt:0,notApplicable:0,notReported:10,passPercentage:50,warning:0},size:"small"}),e(d,{variant:"h5",style:{marginBottom:0},children:"Tracks"})]}),e(T,{style:{marginBottom:16}}),e(r,{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(300px, 1fr))",gridGap:24,marginBottom:.5,children:C.map(t=>e(h,{track:t,entityCount:f?.get(t.id)},t.id))})]})]})};export{I as TechInsightsCardsView};
|
|
2
|
-
//# sourceMappingURL=TechInsightsCardsView.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsxs as a,jsx as t}from"react/jsx-runtime";import{useApi as x}from"@backstage/core-plugin-api";import{entityPresentationApiRef as u}from"@backstage/plugin-catalog-react";import{useTheme as v,Paper as N,Box as r,Typography as n}from"@material-ui/core";import{makeStyles as w}from"@material-ui/core/styles";import{Skeleton as h}from"@material-ui/lab";import{interpolateRgb as S}from"d3-interpolate";import{scaleLinear as b}from"d3-scale";import{TeamStatusBar as k}from"../TeamStatusBar/TeamStatusBar.esm.js";import{convertToCommonTrackStatus as T}from"./convertToCommonTrackStatus.esm.js";const B=w(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",flex:1},categoryBarContainer:{width:"100%",height:e.spacing(1),marginBottom:e.spacing(1),cursor:"pointer"},cardHeader:{lineHeight:1.2}})),C=(e,o)=>b().domain([0,50,100]).range([e.palette.error.main,e.palette.warning.main,e.palette.success.main]).interpolate(S.gamma(2.2))(o),D=({track:e,trackStatus:o,entityCount:l})=>{const p=v(),f=x(u),i=B(),s=e.ownerEntityRef?f.forEntity(e.ownerEntityRef):null,c=o?.allPassPercentage??0,m=!o,d=e.levels.reduce((g,y)=>g+y.checks.length,0);return a(N,{className:i.card,children:[a(r,{display:"flex",flexDirection:"column",alignItems:"flex-start",mb:1,children:[t(n,{variant:"h6",className:i.cardHeader,children:e.name}),s&&t(n,{variant:"caption",color:"textSecondary",children:s.snapshot.primaryTitle})]}),a(r,{display:"flex",flexDirection:"column",alignItems:"flex-start",mb:1,children:[a(n,{variant:"caption",color:"textSecondary",children:[d," check",d!==1?"s":""]}),l!==void 0&&a(n,{variant:"caption",color:"textSecondary",children:[new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1}).format(l)," ","entit",l!==1?"ies":"y"]})]}),m&&t(r,{className:i.content,children:a(r,{width:"100%",children:[t(r,{mb:2,children:t(h,{variant:"text",width:"60%",height:48})}),t(r,{className:i.categoryBarContainer,children:t(h,{variant:"rect",width:"100%",height:8})})]})}),!m&&isNaN(c)&&t(r,{margin:"auto",children:t(n,{variant:"body2",children:"No Data"})}),!m&&!isNaN(c)&&t(r,{className:i.content,children:a(r,{width:"100%",children:[t(r,{mb:2,children:t(n,{variant:"h3",style:{color:C(p,Math.floor(c))},children:`${Math.floor(c)}%`})}),t(r,{className:i.categoryBarContainer,children:t(k,{status:T(o)})})]})})]})};export{D as TrackStatusCard};
|
|
2
|
-
//# sourceMappingURL=TrackStatusCard.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsxs as s,jsx as t}from"react/jsx-runtime";import{Box as l,Button as r}from"@material-ui/core";import{makeStyles as d}from"@material-ui/core/styles";import c from"@material-ui/icons/ViewList";import m from"@material-ui/icons/ViewModule";const C=d(()=>({viewModeButton:{marginRight:8},viewModeButtonLast:{marginRight:16}})),e={Cards:"cards",Table:"table"},o={Contained:"contained",Outlined:"outlined"},u=({viewMode:n,onViewModeChange:i})=>{const a=C();return s(l,{display:"flex",alignItems:"center",children:[t(r,{variant:n===e.Table?o.Contained:o.Outlined,startIcon:t(c,{}),onClick:()=>i(e.Table),size:"small",className:a.viewModeButton,children:"Table"}),t(r,{variant:n===e.Cards?o.Contained:o.Outlined,startIcon:t(m,{}),onClick:()=>i(e.Cards),size:"small",className:a.viewModeButton,children:"Cards"})]})};export{e as TECH_INSIGHTS_VIEW_MODE,u as ViewModeControls};
|
|
2
|
-
//# sourceMappingURL=ViewModeControls.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const a=e=>({passed:e.passed,failed:e.failed,warning:e.warning,error:e.error,exempt:e.exempt,notApplicable:e.notApplicable,notReported:e.notReported,allPassPercentage:e.allPassPercentage??0,statusByLevel:(e.statusByLevel||[]).map(t=>({ordinal:t.ordinal,passed:t.passed,failed:t.failed,warning:t.warning,error:t.error,notApplicable:t.notApplicable,notReported:t.notReported,passPercentage:t.passPercentage??0,exempt:t.exempt}))});export{a as convertToCommonTrackStatus};
|
|
2
|
-
//# sourceMappingURL=convertToCommonTrackStatus.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as r,jsxs as d}from"react/jsx-runtime";import{useRouteRef as K,useApi as C,featureFlagsApiRef as Q}from"@backstage/core-plugin-api";import{usePermission as U}from"@backstage/plugin-permission-react";import{makeStyles as Y,Button as v,Grid as a}from"@material-ui/core";import{soundcheckTrackCreatePermission as Z}from"@spotify/backstage-plugin-soundcheck-common";import{useState as i,useEffect as _}from"react";import{useNavigate as ee}from"react-router-dom";import re from"react-use/lib/useDebounce";import{soundcheckApiRef as te}from"../../../api.esm.js";import"@backstage/catalog-model";import"@tanstack/react-query";import"../../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"../../../hooks/useSoundcheckAlert.esm.js";import{useGetAllTracks as ae}from"../../../hooks/tracks/useGetAllTracks.esm.js";import"../../../hooks/useConfirmationModal.esm.js";import{useGetTrackOwners as ie}from"../../../hooks/tracks/useGetTrackOwners.esm.js";import{useImportTracks as oe}from"../../../hooks/tracks/useImportTracks.esm.js";import se from"../../../images/no-results.svg";import{trackCreateRouteRef as ne}from"../../../routes.esm.js";import{exportTracks as ce}from"../../../utils/export.esm.js";import{FilterDefault as w}from"../../../utils/filters.esm.js";import{EmptyState as S}from"../../EmptyState/EmptyState.esm.js";import{ImportExportPanel as le}from"../../ImportExportPanel/ImportExportPanel.esm.js";import{Pagination as me}from"../../Pagination/Pagination.esm.js";import{SearchFilters as pe}from"../../SearchFilters/SearchFilters.esm.js";import{TrackEmptyState as g,TrackNoResults as B}from"./TrackEmptyState.esm.js";import{TracksOverviewSkeleton as de}from"./TracksOverviewSkeleton.esm.js";import{TrackSummaryCard as ge}from"./TrackSummaryCard.esm.js";const ue=Y(t=>({headerButtons:{display:"flex",gap:t.spacing(1),flexWrap:"nowrap",justifyContent:"end",alignItems:"end"},header:{padding:t.spacing(0,0,1)},container:{padding:t.spacing(3),gap:t.spacing(3)},createButton:{lineHeight:"1.25rem",paddingTop:t.spacing(1.5),paddingBottom:t.spacing(1.5)}})),fe=({tracksPerPage:t,currentCursor:N})=>{const o=ue(),[u,f]=i(N),[l,R]=i(""),[h,F]=i(w.Alpha),[k,I]=i(w.Owner),[T,O]=i(""),{data:E,isLoading:L}=ie();re(()=>{O(l)},500,[l]);const{loading:P,allowed:j}=U({permission:Z}),G=ee(),D=K(ne),y=()=>G(D()),{data:m,isLoading:s}=ae({ids:void 0,types:["standard","playlist"],first:t,after:u,orderAlphabetical:h,searchByOwner:k,searchByName:T}),n=m?.edges?.map(e=>e.node),[b,x]=i([]);_(()=>{f(void 0),x([])},[T]);const A=C(Q),H=!A.getRegisteredFlags().find(e=>e.name==="soundcheck-enable-track-creation")||A.isActive("soundcheck-enable-track-creation"),p=!j||!H,W=e=>{F(e.target.value)},$=e=>{I(e.target.value)},q=C(te),{mutateAsync:z}=oe(),J=async e=>z(e),M=async()=>{const e=await q.getTracks({orderAlphabetical:"asc"});return ce(e.edges.map(X=>X.node))};if(!s&&!n)return r(S,{title:g.title,description:g.description,imgSrc:se,action:!P&&r(v,{disabled:p,variant:"contained",color:"primary",onClick:y,children:g.callToAction})});let c;s?c=r(de,{}):n?.length?c=n?.map(e=>r(a,{xs:12,sm:12,md:6,lg:4,xl:3,item:!0,role:"listitem","aria-label":`track card ${e.id}`,children:r(ge,{summary:e})},e.id)):c=r(a,{xs:12,item:!0,role:"listitem","aria-label":"result",children:r(S,{title:B.title,description:B.description})});const V=m?.pageInfo.hasNextPage||b?.length>0;return d(a,{container:!0,direction:"row",className:o.container,children:[d(a,{container:!0,className:o.header,children:[r(pe,{searchPlaceholder:"Search Available Tracks",isLoading:s||L,searchTerm:l,setSearchTerm:R,filterAlpha:h,handleAlphabeticalFilterChange:W,filterOwner:k,handleOwnerFilterChange:$,owners:E}),d(a,{item:!0,xs:4,className:o.headerButtons,children:[r(le,{resourceType:"track",disableImport:p,disableExport:s||!n?.length,onImport:J,onExport:M}),!P&&r(v,{disabled:p,variant:"contained",color:"primary",onClick:y,className:o.createButton,children:"Create Track"})]})]}),r(a,{container:!0,spacing:4,role:"list","aria-label":"tracks",children:c}),V&&r(a,{item:!0,xs:12,children:r(me,{response:m,listingsPerPage:t,cursor:u,setCursor:f,prevCursors:b,setPrevCursors:x,labelPerPageDropdown:"Tracks Per Page:",urlRoute:"tracks?tracksPerPage="})})]})};export{fe as TrackListPage};
|
|
2
|
-
//# sourceMappingURL=TrackListPage.esm.js.map
|
/package/dist/components/{CampaignInsightsPage → CampaignPage}/CampaignStatusHistoryTile.esm.js
RENAMED
|
File without changes
|
|
File without changes
|