@spotify/backstage-plugin-soundcheck 0.19.9 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/blueprints/IntegrationPageBlueprint.esm.js +1 -1
- package/dist/components/Charts/chartUtils.esm.js +1 -1
- package/dist/components/CollapsablePanel/CollapsablePanel.esm.js +1 -1
- package/dist/components/RoutingPage/RoutingPageBUI.esm.js +1 -1
- package/dist/components/SoundcheckHeader/SoundcheckHeaderBUI.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/TechHealth/Filters/FacetFilter.esm.js +1 -1
- package/dist/components/TechHealth/Filters/FilterProvider.esm.js +1 -1
- package/dist/components/TechHealth/Filters/Filters.esm.js +1 -1
- package/dist/components/TechHealth/Filters/FiltersHeader.esm.js +1 -1
- package/dist/components/TechHealth/Filters/FiltersSection.esm.js +1 -1
- package/dist/components/TechHealth/Filters/NumberOfDaysFilter.esm.js +1 -1
- package/dist/components/TechHealth/Filters/types.esm.js +1 -1
- package/dist/components/TechHealth/Filters/utils.esm.js +1 -1
- package/dist/components/TechHealth/Loading/TechHealthLoading.esm.js +1 -1
- package/dist/routes.esm.js +1 -1
- package/dist/utils/charts.esm.js +1 -1
- package/package.json +1 -1
- package/dist/components/Charts/BarChart/BarChart.esm.js +0 -2
- package/dist/components/Charts/BarChart/BarChartPlaceholder.esm.js +0 -2
- package/dist/components/Charts/BarChart/GroupPassRateHistoryBarChart.esm.js +0 -2
- package/dist/components/Charts/BarChart/TrackSummaryBarChart.esm.js +0 -2
- package/dist/components/Charts/ChartTypes.esm.js +0 -2
- package/dist/components/Charts/ChartWrapper/ChartWrapper.esm.js +0 -2
- package/dist/components/Charts/LineChart/EntityPassRateHistoryLineChart.esm.js +0 -2
- package/dist/components/Charts/LineChart/LineChart.esm.js +0 -2
- package/dist/components/Charts/LineChart/LineChartPlaceholder.esm.js +0 -2
- package/dist/components/Charts/LineChart/PassRateHistoryLineChart.esm.js +0 -2
- package/dist/components/Charts/LineChart/TableLineChart.esm.js +0 -2
- package/dist/components/Charts/LineChart/TrackPassRateHistoryLineChart.esm.js +0 -2
- package/dist/components/CheckHistoryChartCard/CheckHistoryChartCard.esm.js +0 -2
- package/dist/components/EntityPassRateCard/EntityPassRateCard.esm.js +0 -2
- package/dist/components/Expand/Expand.esm.js +0 -2
- package/dist/components/GroupPassRateCard/GroupPassRateCard.esm.js +0 -2
- package/dist/components/OverviewChartCard/OverviewChartCard.esm.js +0 -2
- package/dist/components/OverviewChartCard/OverviewChartCardStyles.esm.js +0 -2
- package/dist/components/PassRateGrid/PassRateGrid.esm.js +0 -2
- package/dist/components/PassRateGrid/PassRateMetadata.esm.js +0 -2
- package/dist/components/PassRateGrid/types.esm.js +0 -2
- package/dist/components/PassRateTable/NewPassRateTable.esm.js +0 -2
- package/dist/components/PassRateTable/PassRateTable.esm.js +0 -4
- package/dist/components/PassRateTable/types.esm.js +0 -2
- package/dist/components/SearchBar/SearchBar.esm.js +0 -2
- package/dist/components/TechHealth/Filters/useFacetOptions.esm.js +0 -2
- package/dist/components/TechHealth/TechHealth.esm.js +0 -2
- package/dist/components/TechHealthSummary/SummaryAggregationsProvider.esm.js +0 -2
- package/dist/components/TechHealthSummary/TechHealthSummary.esm.js +0 -2
- package/dist/components/TechHealthTabs/ActionColumn.esm.js +0 -2
- package/dist/components/TechHealthTabs/CampaignResultsTab/CampaignResultsTab.esm.js +0 -2
- package/dist/components/TechHealthTabs/CheckResultsTab/CheckResultsTab.esm.js +0 -2
- package/dist/components/TechHealthTabs/CheckResultsTab/CheckTrendColumn.esm.js +0 -2
- package/dist/components/TechHealthTabs/EntityResultsTab/EntityResultsTab.esm.js +0 -2
- package/dist/components/TechHealthTabs/EntityResultsTab/EntityTrendColumn.esm.js +0 -2
- package/dist/components/TechHealthTabs/GroupResultsTab/GroupResultsTab.esm.js +0 -2
- package/dist/components/TechHealthTabs/GroupResultsTab/GroupTrendColumn.esm.js +0 -2
- package/dist/components/TechHealthTabs/MostRecentColumn.esm.js +0 -2
- package/dist/components/TechHealthTabs/NameColumn.esm.js +0 -2
- package/dist/components/TechHealthTabs/OwnerColumn.esm.js +0 -2
- package/dist/components/TechHealthTabs/PassRateTabHeader.esm.js +0 -2
- package/dist/components/TechHealthTabs/PassRateTabStyles.esm.js +0 -2
- package/dist/components/TechHealthTabs/TechHealthExportFunctions.esm.js +0 -2
- package/dist/components/TechHealthTabs/TrackResultsTab/TrackLevelTrendColumn.esm.js +0 -2
- package/dist/components/TechHealthTabs/TrackResultsTab/TrackResultsTab.esm.js +0 -2
- package/dist/components/TechHealthTabs/techHealthTabUtils.esm.js +0 -2
- package/dist/components/TrackHistoryChartCard/TrackHistoryChartCard.esm.js +0 -2
- package/dist/hooks/aggregations/useAggregatedCheckPassRateTrend.esm.js +0 -2
- package/dist/hooks/aggregations/useAggregatedEntityPassRateTrend.esm.js +0 -2
- package/dist/hooks/aggregations/useAggregatedGroupPassRateTrend.esm.js +0 -2
- package/dist/hooks/aggregations/useAggregatedTrackPassRateTrend.esm.js +0 -2
- package/dist/hooks/aggregations/useCheckPassRateTrend.esm.js +0 -2
- package/dist/hooks/aggregations/useEntityPassRateTrend.esm.js +0 -2
- package/dist/hooks/aggregations/useGroupPassRateTrend.esm.js +0 -2
- package/dist/hooks/aggregations/useTrackPassRateTrend.esm.js +0 -2
- package/dist/hooks/cache/useEntityCountCached.esm.js +0 -2
- package/dist/hooks/cache/useTrackCountCached.esm.js +0 -2
- package/dist/hooks/catalog/useGetEntityCount.esm.js +0 -2
- package/dist/hooks/entities/useEntityRefsForUser.esm.js +0 -2
- package/dist/hooks/facets/useFacetFilters.esm.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as i}from"react/jsx-runtime";import{compatWrapper as u}from"@backstage/core-compat-api";import{createExtensionDataRef as c,createExtensionBlueprint as s,coreExtensionData as t,ExtensionBoundary as g}from"@backstage/frontend-plugin-api";import{lazy as l}from"react";import"@backstage/core-plugin-api";import"@backstage/plugin-permission-react";import"@backstage/ui";import"@spotify/backstage-plugin-soundcheck-common";import"react-helmet";import"react-router-dom";import"../routes.esm.js";import"../components/CampaignPage/CampaignPageBUI.esm.js";import"../components/CampaignPage/CampaignTechInsightsExplorerPage.esm.js";import"../components/CampaignsPage/CampaignListPage/useArchiveConfirmationModal.esm.js";import"../components/CampaignsPage/CampaignListPageBUI.esm.js";import"../contexts/TrackFormContext.esm.js";import"../contexts/CheckFormContext.esm.js";import"../contexts/CampaignFormContext.esm.js";import"../contexts/UserProvider.esm.js";import"@backstage/catalog-model";import"@tanstack/react-query";import"../api.esm.js";import"../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"../hooks/useSoundcheckAlert.esm.js";import"../hooks/useConfirmationModal.esm.js";import"react-use/lib/useLocalStorage";import"../components/CampaignForm/CampaignForm.esm.js";import"@remixicon/react";import"../components/SoundcheckHeader/SoundcheckHeader.esm.js";import"../components/SoundcheckHeader/SoundcheckHeaderContext.esm.js";import"../components/PageWarningMessage/PageWarningMessage.esm.js";import"../components/TechHealth/Loading/Loading.esm.js";import"../components/CampaignsPage/CampaignEmptyState.esm.js";import"uuid";import"@backstage/core-components";import"react-hook-form";import"../utils/formStyles.esm.js";import"@material-ui/core";import"@material-ui/icons/Search";import"../components/SoundcheckDialog/SoundcheckDialog.esm.js";import"../components/FactExplorer/FactExplorer.esm.js";import"../components/FactExplorer/FactExplorerContext.esm.js";import"../components/FormStepper/FormStepper.esm.js";import"../components/CheckForm/FormFields/CheckNameInput/CheckNameInput.esm.js";import"../components/CheckForm/FormFields/PassFailMessageInput/PassFailMessageInput.esm.js";import"../components/FormMarkdownInput/FormMarkdownInput.esm.js";import"../components/CheckForm/utils/checkFormUtils.esm.js";import"../components/CheckForm/FormFields/TeamDetailsInput/TeamDetailsInput.esm.js";import"../components/CheckForm/FormFields/RuleInput/AddMenuButton.esm.js";import"../components/CheckForm/FormFields/RuleInput/RuleInputBox.esm.js";import"../components/CheckForm/FormFields/RuleInput/Expressions/ExpressionBox.esm.js";import"../components/CheckForm/FormFields/RuleInput/Expressions/ExpressionTypeToggle.esm.js";import"@material-ui/icons/Close";import"@material-ui/icons/Delete";import"@material-ui/icons/List";import"../components/FormControlledAutocomplete/FormControlledAutocomplete.esm.js";import"../components/CheckForm/FormFields/RuleInput/Conditions/styles.esm.js";import"../components/CheckForm/FormFields/RuleInput/Conditions/ValueListInput.esm.js";import"../components/CheckForm/FormFields/RuleInput/Conditions/ConditionList.esm.js";import"../components/CheckForm/FormFields/CheckScheduleSection/ScheduleSection.esm.js";import"../components/CheckForm/FormFields/CheckPathResolverInput.esm.js";import"../components/CheckForm/Steps/CheckDetailsStep.esm.js";import"../components/CheckForm/Steps/CheckRulesStep.esm.js";import"../components/CheckForm/Steps/CheckApplicabilityStep.esm.js";import"../components/CheckForm/Steps/CheckReviewStep.esm.js";import"../components/CheckForm/types/ExpressionType.esm.js";import"../components/Frequency/types.esm.js";import"../components/Frequency/util.esm.js";import"../components/Frequency/FrequencyComponent.esm.js";import"../components/CheckForm/types/Path.esm.js";import"@hookform/resolvers/zod";import"../components/CheckForm/utils/validation.esm.js";import"../components/LoadingIndicator/LoadingIndicator.esm.js";import"../components/CheckPage/CheckPageBUI.esm.js";import"../components/ChecksPage/ChecksListPageBUI.esm.js";import"../components/CheckTemplatesPage/CheckTemplatesPageBUI.esm.js";import"../components/CheckTemplatesPage/CheckTemplatesPageDeprecated.esm.js";import"../components/CollectorPage/Configurators/AzureDevOps/AzureDevOpsConfigurator.esm.js";import"../components/CollectorPage/Configurators/BigQuery/BigQueryConfigurator.esm.js";import"../components/CollectorPage/Configurators/Catalog/CatalogConfigurator.esm.js";import"../components/CollectorPage/Configurators/DataDog/DataDogConfigurator.esm.js";import"../components/CollectorPage/Configurators/DataRegistry/DataRegistryConfigurator.esm.js";import"../components/CollectorPage/Configurators/Github/GithubConfigurator.esm.js";import"../components/CollectorPage/Configurators/Gitlab/GitlabConfigurator.esm.js";import"../components/CollectorPage/Configurators/HTTP/HttpConfigurator.esm.js";import"../components/CollectorPage/Configurators/Jira/JiraConfigurator.esm.js";import"../components/CollectorPage/Configurators/Kubernetes/KubernetesConfigurator.esm.js";import"../components/CollectorPage/Configurators/NewRelic/NewRelicConfigurator.esm.js";import"../components/CollectorPage/Configurators/PagerDuty/PagerDutyConfigurator.esm.js";import"../components/CollectorPage/Configurators/SCM/ScmConfigurator.esm.js";import"../components/CollectorPage/Configurators/SonarQube/SonarQubeConfigurator.esm.js";import"../components/CollectorPage/CollectorDetailsPageBUI.esm.js";import"../components/CollectorPage/CollectorDetailsPageDeprecated.esm.js";import"../components/CollectorsPage/IntegrationsListPageBUI.esm.js";import"../components/OverviewPage/OverviewPageContent.esm.js";import"../components/
|
|
1
|
+
import{jsx as i}from"react/jsx-runtime";import{compatWrapper as u}from"@backstage/core-compat-api";import{createExtensionDataRef as c,createExtensionBlueprint as s,coreExtensionData as t,ExtensionBoundary as g}from"@backstage/frontend-plugin-api";import{lazy as l}from"react";import"@backstage/core-plugin-api";import"@backstage/plugin-permission-react";import"@backstage/ui";import"@spotify/backstage-plugin-soundcheck-common";import"react-helmet";import"react-router-dom";import"../routes.esm.js";import"../components/CampaignPage/CampaignPageBUI.esm.js";import"../components/CampaignPage/CampaignTechInsightsExplorerPage.esm.js";import"../components/CampaignsPage/CampaignListPage/useArchiveConfirmationModal.esm.js";import"../components/CampaignsPage/CampaignListPageBUI.esm.js";import"../contexts/TrackFormContext.esm.js";import"../contexts/CheckFormContext.esm.js";import"../contexts/CampaignFormContext.esm.js";import"../contexts/UserProvider.esm.js";import"@backstage/catalog-model";import"@tanstack/react-query";import"../api.esm.js";import"../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"../hooks/useSoundcheckAlert.esm.js";import"../hooks/useConfirmationModal.esm.js";import"react-use/lib/useLocalStorage";import"../components/CampaignForm/CampaignForm.esm.js";import"@remixicon/react";import"../components/SoundcheckHeader/SoundcheckHeader.esm.js";import"../components/SoundcheckHeader/SoundcheckHeaderContext.esm.js";import"../components/PageWarningMessage/PageWarningMessage.esm.js";import"../components/TechHealth/Loading/Loading.esm.js";import"../components/CampaignsPage/CampaignEmptyState.esm.js";import"uuid";import"@backstage/core-components";import"react-hook-form";import"../utils/formStyles.esm.js";import"@material-ui/core";import"@material-ui/icons/Search";import"../components/SoundcheckDialog/SoundcheckDialog.esm.js";import"../components/FactExplorer/FactExplorer.esm.js";import"../components/FactExplorer/FactExplorerContext.esm.js";import"../components/FormStepper/FormStepper.esm.js";import"../components/CheckForm/FormFields/CheckNameInput/CheckNameInput.esm.js";import"../components/CheckForm/FormFields/PassFailMessageInput/PassFailMessageInput.esm.js";import"../components/FormMarkdownInput/FormMarkdownInput.esm.js";import"../components/CheckForm/utils/checkFormUtils.esm.js";import"../components/CheckForm/FormFields/TeamDetailsInput/TeamDetailsInput.esm.js";import"../components/CheckForm/FormFields/RuleInput/AddMenuButton.esm.js";import"../components/CheckForm/FormFields/RuleInput/RuleInputBox.esm.js";import"../components/CheckForm/FormFields/RuleInput/Expressions/ExpressionBox.esm.js";import"../components/CheckForm/FormFields/RuleInput/Expressions/ExpressionTypeToggle.esm.js";import"@material-ui/icons/Close";import"@material-ui/icons/Delete";import"@material-ui/icons/List";import"../components/FormControlledAutocomplete/FormControlledAutocomplete.esm.js";import"../components/CheckForm/FormFields/RuleInput/Conditions/styles.esm.js";import"../components/CheckForm/FormFields/RuleInput/Conditions/ValueListInput.esm.js";import"../components/CheckForm/FormFields/RuleInput/Conditions/ConditionList.esm.js";import"../components/CheckForm/FormFields/CheckScheduleSection/ScheduleSection.esm.js";import"../components/CheckForm/FormFields/CheckPathResolverInput.esm.js";import"../components/CheckForm/Steps/CheckDetailsStep.esm.js";import"../components/CheckForm/Steps/CheckRulesStep.esm.js";import"../components/CheckForm/Steps/CheckApplicabilityStep.esm.js";import"../components/CheckForm/Steps/CheckReviewStep.esm.js";import"../components/CheckForm/types/ExpressionType.esm.js";import"../components/Frequency/types.esm.js";import"../components/Frequency/util.esm.js";import"../components/Frequency/FrequencyComponent.esm.js";import"../components/CheckForm/types/Path.esm.js";import"@hookform/resolvers/zod";import"../components/CheckForm/utils/validation.esm.js";import"../components/LoadingIndicator/LoadingIndicator.esm.js";import"../components/CheckPage/CheckPageBUI.esm.js";import"../components/ChecksPage/ChecksListPageBUI.esm.js";import"../components/CheckTemplatesPage/CheckTemplatesPageBUI.esm.js";import"../components/CheckTemplatesPage/CheckTemplatesPageDeprecated.esm.js";import"../components/CollectorPage/Configurators/AzureDevOps/AzureDevOpsConfigurator.esm.js";import"../components/CollectorPage/Configurators/BigQuery/BigQueryConfigurator.esm.js";import"../components/CollectorPage/Configurators/Catalog/CatalogConfigurator.esm.js";import"../components/CollectorPage/Configurators/DataDog/DataDogConfigurator.esm.js";import"../components/CollectorPage/Configurators/DataRegistry/DataRegistryConfigurator.esm.js";import"../components/CollectorPage/Configurators/Github/GithubConfigurator.esm.js";import"../components/CollectorPage/Configurators/Gitlab/GitlabConfigurator.esm.js";import"../components/CollectorPage/Configurators/HTTP/HttpConfigurator.esm.js";import"../components/CollectorPage/Configurators/Jira/JiraConfigurator.esm.js";import"../components/CollectorPage/Configurators/Kubernetes/KubernetesConfigurator.esm.js";import"../components/CollectorPage/Configurators/NewRelic/NewRelicConfigurator.esm.js";import"../components/CollectorPage/Configurators/PagerDuty/PagerDutyConfigurator.esm.js";import"../components/CollectorPage/Configurators/SCM/ScmConfigurator.esm.js";import"../components/CollectorPage/Configurators/SonarQube/SonarQubeConfigurator.esm.js";import"../components/CollectorPage/CollectorDetailsPageBUI.esm.js";import"../components/CollectorPage/CollectorDetailsPageDeprecated.esm.js";import"../components/CollectorsPage/IntegrationsListPageBUI.esm.js";import"../components/OverviewPage/OverviewPageContent.esm.js";import"../components/TechInsights/TechInsightsPageBUI.esm.js";import"lodash";import"../components/Filter/FilterComponent.esm.js";import"../components/TrackForm/Steps/LevelsStep/LevelsStepNew.esm.js";import"../components/TrackForm/Steps/TrackDetailsStep/TrackDetailsStep.esm.js";import"../components/TrackForm/utils/validation.esm.js";import"../graphql/generated/index.esm.js";import"../components/TrackPage/TrackPageBUI.esm.js";import"../components/TrackPage/TrackTechInsightsExplorerPage.esm.js";import"../components/TracksPage/TracksListPageBUI.esm.js";import"@spotify/backstage-plugin-core";import"../components/SoundcheckQueryClientProvider/SoundcheckQueryClientProvider.esm.js";import{RoutingPageWrapper as f}from"../components/RoutingPage/RoutingPageWrapper.esm.js";const o=c().with({id:"soundcheck.integrationId"}),h=s({kind:"integration",attachTo:[{id:"page:soundcheck/SoundcheckRoutingPage",input:"integrations"},{id:"app/routes",input:"routes"}],output:[t.routePath,t.reactElement,t.routeRef.optional(),o],dataRefs:{integrationId:o},*factory({integrationId:r,loader:m,path:e,routeRef:p},{node:n}){const a=l(()=>m().then(d=>({default:()=>d})));yield t.routePath(e??`/soundcheck/integrations/${r}/edit`),yield t.reactElement(u(i(g,{node:n,children:i(f,{children:i(a,{})})}))),p&&(yield t.routeRef(p)),yield o(r)}});export{h as IntegrationPageBlueprint,o as integrationIdExtensionDataRef};
|
|
2
2
|
//# sourceMappingURL=IntegrationPageBlueprint.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{map as
|
|
1
|
+
import{map as p}from"lodash";import{DateTime as h}from"luxon";import{compactNumberFormatter as u}from"../../utils/formatters.esm.js";const D=["#59A0F6","#95C90D","#FFA42C","#C87DFF","#7358FF","#F036A4"],E=["#3B82F6","#10B981","#8B5CF6","#F59E0B","#6B7280","#06B6D4","#EC4899","#84CC16","#D946EF"];var l=(t=>(t.RED="red",t.GREEN="green",t))(l||{});const f=t=>t?t.palette.type:"",y=t=>f(t).toLowerCase()==="dark",T=t=>y(t)?E:D;function F(t,e){return(e?t.minus({days:e}):t).toFormat("MMM dd")}const v=(t,e)=>{if(typeof t=="number"){const r=e.certificationStatusHistory.numberOfEntities??0,s=r>0?Math.round(t/r*100):0;return`${u(t)} of ${u(r)} (${s}%)`}return t},B=t=>{const e=t?.certificationStatusHistory.history??[],r=t?.certificationStatusHistory.numberOfEntities??0,s=h.utc();return p(e,(n,C)=>{let o={name:F(s,e.length-C-1)},m=0,c=0;n.statusByLevel.sort((a,i)=>i.ordinal-a.ordinal).forEach(a=>{const i=a.cumulativelyPassed-c;o={...o,[`Level ${a.ordinal}`]:i},m+=i,c=a.cumulativelyPassed}),n.statusByLevel.reverse();const d=Math.max(0,r-m);return o={...o,"No Level":d},o})};export{l as TrendLineColor,F as formatDate,v as formatTrackHistoryChartTooltip,T as getChartColors,f as getThemeType,B as getTrackHistoryLineChartData,y as isDarkTheme};
|
|
2
2
|
//# sourceMappingURL=chartUtils.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"react/jsx-runtime";import{makeStyles as t}from"@material-ui/core";import"@material-ui/icons/ArrowDropDown";import"@material-ui/icons/ArrowDropUp";import"@material-ui/icons/HelpOutline";import"framer-motion";t(({palette:e})=>({header:{display:"flex",alignItems:"left",flexDirection:"row",cursor:"pointer",justifyContent:"space-between"},label:{display:"flex",alignItems:"center"},tooltipIcon:{display:"flex",alignItems:"center",justifyContent:"center",color:e.text.primary}}));
|
|
2
2
|
//# sourceMappingURL=CollapsablePanel.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e,jsxs as
|
|
1
|
+
import{jsx as e,jsxs as n,Fragment as m}from"react/jsx-runtime";import{useApi as w,featureFlagsApiRef as x,useRouteRef as p}from"@backstage/core-plugin-api";import{usePermission as s}from"@backstage/plugin-permission-react";import{Box as A}from"@backstage/ui";import{soundcheckCampaignCreatePermission as E,soundcheckCheckCreatePermission as B,soundcheckTrackCreatePermission as F}from"@spotify/backstage-plugin-soundcheck-common";import{Helmet as O}from"react-helmet";import{Routes as j,Route as t,useParams as h,Navigate as l}from"react-router-dom";import{trackOverviewRouteRef as U,campaignOverviewRouteRef as y,techInsightsPageRouteRef as D}from"../../routes.esm.js";import{CampaignPage as H}from"../CampaignPage/CampaignPage.esm.js";import{CampaignTechInsightsExplorerPage as N}from"../CampaignPage/CampaignTechInsightsExplorerPage.esm.js";import{CampaignsPage as S}from"../CampaignsPage/CampaignsPage.esm.js";import{CampaignCreatePage as V}from"../CampaignCreatePage/CampaignCreatePage.esm.js";import{EditCampaignView as W}from"../CampaignsPage/EditCampaignView.esm.js";import{CheckCreatePage as q}from"../CheckCreatePage/CheckCreatePage.esm.js";import{CheckEditPage as z}from"../CheckPage/CheckEditPage.esm.js";import{CheckPage as g}from"../CheckPage/CheckPage.esm.js";import{ChecksTab as G}from"../ChecksTab/ChecksTab.esm.js";import"../CheckTemplatesPage/CheckTemplatesPageBUI.esm.js";import{CheckTemplatesPage as J}from"../CheckTemplatesPage/CheckTemplatesPage.esm.js";import"../CheckTemplatesPage/CheckTemplatesPageDeprecated.esm.js";import{CollectorPage as K}from"../CollectorPage/CollectorPage.esm.js";import{CollectorDetailsPage as L}from"../CollectorPage/CollectorDetailsPage.esm.js";import"../CollectorPage/CollectorDetailsPageBUI.esm.js";import"../CollectorPage/CollectorDetailsPageDeprecated.esm.js";import{CollectorsPage as M}from"../CollectorsPage/CollectorsPage.esm.js";import{OverviewPageContent as Q}from"../OverviewPage/OverviewPageContent.esm.js";import{TechInsightsPage as X}from"../TechInsights/TechInsightsPage.esm.js";import{TrackCreatePage as Y}from"../TrackCreatePage/TrackCreatePage.esm.js";import{TrackEditPage as Z}from"../TrackEditPage/TrackEditPage.esm.js";import{TrackPage as _}from"../TrackPage/TrackPage.esm.js";import{TrackTechInsightsExplorerPage as $}from"../TrackPage/TrackTechInsightsExplorerPage.esm.js";import{TracksTab as ee}from"../TracksTab/TracksTab.esm.js";import{RoutingPageWrapperBUI as te}from"./RoutingPageWrapperBUI.esm.js";const ae=()=>{const{trackId:a}=h(),i=p(U);if(!a)return null;const r=i({trackId:a});return e(l,{to:r,replace:!0})},re=()=>{const{campaignId:a}=h(),i=p(y);if(!a)return null;const r=i({campaignId:a});return e(l,{to:r,replace:!0})},ie=()=>{const a=p(D)();return e(l,{to:a,replace:!0})},oe=({title:a="Soundcheck",integrations:i})=>{const r=w(x),c=r.getRegisteredFlags(),d=!c.find(o=>o.name==="soundcheck-enable-campaigns")||r.isActive("soundcheck-enable-campaigns"),{loading:k,allowed:f}=s({permission:E}),u=!k&&f,{loading:I,allowed:P}=s({permission:B}),C=!c.find(o=>o.name==="soundcheck-enable-check-creation")||r.isActive("soundcheck-enable-check-creation"),v=!I&&P&&C,{loading:R,allowed:T}=s({permission:F}),b=!c.find(o=>o.name==="soundcheck-enable-track-creation")||r.isActive("soundcheck-enable-track-creation");return e(te,{title:a,children:n(j,{children:[d&&n(m,{children:[e(t,{path:"/campaigns",element:e(S,{})}),e(t,{path:"/campaigns/:campaignId/edit",element:e(W,{})}),e(t,{path:"/campaigns/:campaignId",element:e(re,{})}),e(t,{path:"/campaigns/:campaignId/overview",element:e(H,{})}),e(t,{path:"/campaigns/:campaignId/explorer",element:e(N,{})}),u&&e(t,{path:"/campaigns/create",element:e(V,{})})]}),e(t,{path:"/tracks",element:e(ee,{})}),e(t,{path:"/tracks/:trackId/edit",element:e(Z,{})}),!R&&T&&b&&e(t,{path:"/tracks/create",element:e(Y,{})}),e(t,{path:"/tracks/:trackId",element:e(ae,{})}),e(t,{path:"/tracks/:trackId/overview",element:e(_,{})}),e(t,{path:"/tracks/:trackId/explorer",element:e($,{})}),e(t,{path:"/tracks/:trackId/checks/:checkId",element:e(g,{})}),e(t,{path:"/checks",element:e(G,{})}),e(t,{path:"/checks/:checkId",element:e(g,{})}),e(t,{path:"/checks/:checkId/edit",element:e(z,{})}),v&&n(m,{children:[e(t,{path:"/checks/create",element:e(q,{})}),e(t,{path:"/checks/templates",element:e(J,{})})]}),e(t,{path:"/integrations",element:e(M,{integrations:i})}),e(t,{path:"/integrations/:integrationId",element:e(L,{integrations:i})}),e(t,{path:"/integrations/:integrationId/edit",element:e(K,{})}),e(t,{path:"/tech-insights",element:n(m,{children:[e(O,{title:"Tech Insights"}),e(X,{})]})}),e(t,{path:"/overview",element:e(A,{style:{margin:"var(--bui-space-6) var(--bui-space-6)"},children:e(Q,{})})}),e(t,{path:"/",element:e(ie,{})})]})})};export{oe as RoutingPageBUI};
|
|
2
2
|
//# sourceMappingURL=RoutingPageBUI.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as t,Fragment as
|
|
1
|
+
import{jsx as t,Fragment as R}from"react/jsx-runtime";import{useRouteRef as e,useApi as k,featureFlagsApiRef as b}from"@backstage/core-plugin-api";import{usePermission as S}from"@backstage/plugin-permission-react";import{Header as v,ButtonLink as x}from"@backstage/ui";import{RiCheckDoubleLine as y,RiSettings2Line as P}from"@remixicon/react";import{soundcheckCollectorReadPermission as A}from"@spotify/backstage-plugin-soundcheck-common";import{rootRouteRef as C,tracksPageRouteRef as w,checksPageRouteRef as I,campaignsPageRouteRef as L,integrationsPageRouteRef as F,overviewRouteRef as B,techInsightsPageRouteRef as H}from"../../routes.esm.js";const T=()=>{const o=e(C)(),c=e(w)(),s=e(I)(),n=e(L)(),l=e(F)(),m=e(B)(),f=e(H)(),i=k(b),r=i.getRegisteredFlags(),h=!r.find(a=>a.name==="soundcheck-enable-campaigns")||i.isActive("soundcheck-enable-campaigns"),{loading:g,allowed:d}=S({permission:A}),u=(!r.find(a=>a.name==="soundcheck-enable-collectors")||i.isActive("soundcheck-enable-collectors"))&&!g&&d,p=[{id:"tech-insights",label:"Tech Insights",href:f,matchStrategy:"prefix"},{id:"checks",label:"Checks",href:s,matchStrategy:"prefix"},{id:"tracks",label:"Tracks",href:c,matchStrategy:"prefix"},...h?[{id:"campaigns",label:"Campaigns",href:n,matchStrategy:"prefix"}]:[],...u?[{id:"integrations",label:"Integrations",href:l,matchStrategy:"prefix"}]:[],{id:"classic-overview",label:"Classic Overview",href:m,matchStrategy:"exact"}];return t(v,{title:"Soundcheck",icon:t(y,{size:18}),titleLink:o,tabs:p,customActions:t(R,{children:t(x,{href:"/settings",variant:"secondary",iconStart:t(P,{})})})})};export{T as SoundcheckHeaderBUI};
|
|
2
2
|
//# sourceMappingURL=SoundcheckHeaderBUI.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"react/jsx-runtime";import{withStyles as t,Card as e,makeStyles as o}from"@material-ui/core";import{createStyles as r}from"@material-ui/core/styles";import"../SoundcheckMarkdownContent/SoundcheckMarkdownContentDeprecated.esm.js";import"@backstage/core-components";import"react";import"react-markdown";import"rehype-raw";import"remark-gfm";import"../SoundcheckMarkdownContent/SoundcheckMarkdownContentBUI.esm.js";import"./SummaryCardActionsMenu.esm.js";t(i=>r({root:{width:"100%",height:"100%",minHeight:"385px",display:"flex",flexDirection:"column",padding:i.spacing(2),position:"relative",justifyContent:"start"}}))(e),o(i=>({root:{position:"relative",height:"100%"},summaryName:{fontSize:i.typography.pxToRem(24),color:i.palette.text.primary,maxHeight:"250px",overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical","-webkit-box-orient":"vertical",wordBreak:"break-word"},summaryDescription:{color:i.palette.text.primary,padding:0,maxHeight:"175px",overflow:"auto",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical","-webkit-box-orient":"vertical",wordBreak:"break-word"},card:{paddingTop:i.spacing(1),paddingBottom:0,paddingLeft:i.spacing(1),paddingRight:i.spacing(1),borderColor:i.palette.divider},cardContent:{height:"100%",paddingTop:0},actionArea:{padding:i.spacing(1.5,2,1.5,4)},button:{minWidth:0,color:i.palette.text.primary,"&:disabled":{color:i.palette.text.disabled,opacity:1}}}));
|
|
2
2
|
//# sourceMappingURL=SummaryCard.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"react/jsx-runtime";import{makeStyles as o}from"@material-ui/core";import"@material-ui/icons/Archive";import"@material-ui/icons/Delete";import"@material-ui/icons/Edit";import"@material-ui/icons/MoreVert";import"@material-ui/icons/OpenInBrowser";import"@material-ui/icons/Refresh";import"@material-ui/icons/SaveAlt";import"react";o(t=>({menuList:{backgroundColor:t.palette.background.paper,color:t.palette.text.primary},menuIcon:{color:t.palette.text.primary},menuIconSize:{minWidth:t.spacing(4)}}));
|
|
2
2
|
//# sourceMappingURL=SummaryCardActionsMenu.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"react/jsx-runtime";import{makeStyles as i,alpha as r}from"@material-ui/core";import"@material-ui/icons/CheckBox";import"@material-ui/icons/CheckBoxOutlineBlank";import"@material-ui/lab";import"lodash";import"react";import"../../CollapsablePanel/CollapsablePanel.esm.js";import"../../ListboxVirtualized/ListboxVirtualized.esm.js";import"./FilterProvider.esm.js";import"./types.esm.js";i(({palette:o,spacing:t})=>({chip:{maxWidth:"45%",textOverflow:"ellipsis",margin:t(.5,.5,.5,0),overflow:"hidden","& svg":{color:r(o.common.white,.7),"&:hover":{color:o.common.white}},backgroundColor:o.action.disabledBackground},autoCompleteInput:{"&& input":{margin:t(1,0,0,0),padding:`${t(0,1,1,1)} !important`,width:"100%",display:"flex",alignItems:"center",justifyContent:"center"},"&& button":{"&:hover":{backgroundColor:"transparent"}}},autoComplete:{margin:t(.5,0,1,0)},selectionLabel:{lineHeight:"1em"}}));
|
|
2
2
|
//# sourceMappingURL=FacetFilter.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"react/jsx-runtime";import"@backstage/catalog-model";import"@backstage/plugin-catalog-react";import"@material-ui/lab/Autocomplete";import{createContext as t}from"react";import"react-use/lib/useLocalStorage";import"../../../contexts/UserProvider.esm.js";import"lodash";import"react-router-dom";import"./types.esm.js";import"./FacetFilter.esm.js";import"./Filters.esm.js";import"./FiltersHeader.esm.js";import"./FiltersSection.esm.js";import"../../../contexts/TrackFormContext.esm.js";import"../../../contexts/CheckFormContext.esm.js";import"../../../contexts/CampaignFormContext.esm.js";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"../../../api.esm.js";import"../../../hooks/graphqlKeys.esm.js";import"@spotify/backstage-plugin-soundcheck-common";import"../../../hooks/useSoundcheckAlert.esm.js";import"../../../hooks/useConfirmationModal.esm.js";import{emptyFacetFilters as e,DEFAULT_NUMBER_OF_DAYS as r}from"./utils.esm.js";import"../Loading/TechHealthLoading.esm.js";t({facetOptionsLoading:!1,getFacetOptions:()=>[],getFacetOptionLabel:()=>"",facetFilters:e(),clearAllFilters:()=>{},getSelectedFacetValues:()=>[],setSelectedFacetValues:()=>{},setManySelectedFacetValues:()=>{},numberOfDays:r,setNumberOfDays:()=>{},filter:{},loggedInUser:"Unknown"});
|
|
2
2
|
//# sourceMappingURL=FilterProvider.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"react/jsx-runtime";import{makeStyles as t}from"@material-ui/core";import"react-router-dom";import"./FacetFilter.esm.js";import"./FiltersHeader.esm.js";import"./FiltersSection.esm.js";import"./NumberOfDaysFilter.esm.js";import"./types.esm.js";t(r=>({filters:{maxWidth:"300px",width:"100%",backgroundColor:r.palette.background.paper}}));
|
|
2
2
|
//# sourceMappingURL=Filters.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"react/jsx-runtime";import{makeStyles as t}from"@material-ui/core";import"./FilterProvider.esm.js";import"./types.esm.js";t(i=>({root:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},clearButton:{lineHeight:i.typography.caption.lineHeight,fontSize:i.typography.caption.fontSize,padding:i.spacing(1),margin:i.spacing(2),marginBottom:i.spacing(2)-1},hidden:{visibility:"hidden"},headerText:{marginLeft:i.spacing(3)}}));
|
|
2
2
|
//# sourceMappingURL=FiltersHeader.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"react/jsx-runtime";import{makeStyles as t}from"@material-ui/core";t(({palette:i,spacing:e})=>({root:{padding:({size:o,isHeader:r})=>r?0:o==="small"?e(1.5,2):e(2),borderBottom:`1px solid ${i.divider}`}}));
|
|
2
2
|
//# sourceMappingURL=FiltersSection.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"react/jsx-runtime";import{makeStyles as t}from"@material-ui/core";import"react";import"./FilterProvider.esm.js";import"./types.esm.js";t(i=>({select:{width:"100%",margin:i.spacing(1,0)},chipPadding:{marginBottom:i.spacing(1)},chipSelected:{border:`1px solid ${i.palette.text.primary}`}}));
|
|
2
2
|
//# sourceMappingURL=NumberOfDaysFilter.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
1
|
+
var n=(t=>(t.Entity="Entity",t.Kind="Entity Kind",t.Type="Entity Type",t.EntityOwner="Entity Owner",t.Lifecycle="Entity Lifecycle",t.System="System",t.Track="Track",t.Level="Track Level",t.Check="Check",t.CheckOwner="Check Owner",t))(n||{});export{n as Facet};
|
|
2
2
|
//# sourceMappingURL=types.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Facet as
|
|
1
|
+
import{Facet as a}from"./types.esm.js";const r=30,s=2,_=90,n=e=>{if(e?.length){const t=parseInt(e,10);if(!isNaN(t)&&t>=s&&t<=_)return t}return r},F=e=>Object.fromEntries(Object.values(a).map(t=>[t,[]]));export{r as DEFAULT_NUMBER_OF_DAYS,_ as MAX_NUMBER_OF_DAYS,s as MIN_NUMBER_OF_DAYS,F as emptyFacetFilters,n as parseNumberOfDays};
|
|
2
2
|
//# sourceMappingURL=utils.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"react/jsx-runtime";import{makeStyles as r}from"@material-ui/core";import"react";import"@backstage/core-plugin-api";import"@backstage/plugin-catalog-react";import"@tanstack/react-query";import"../../../api.esm.js";import"../../../hooks/graphqlKeys.esm.js";import"./Loading.esm.js";r(o=>({container:{display:"flex",margin:"-24px",backgroundColor:o.palette.background.paper,borderTop:`1px solid ${o.palette.border}`,flex:1},fixedColumn:{width:"300px",flex:"none",borderRight:`1px solid ${o.palette.border}`},flexibleColumn:{display:"flex",flexDirection:"column",flex:1,backgroundColor:o.palette.background.default,height:"100%",maxWidth:"100%"},tabsPlaceholder:{height:"36.5px",backgroundColor:o.palette.background.paper}}));
|
|
2
2
|
//# sourceMappingURL=TechHealthLoading.esm.js.map
|
package/dist/routes.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRouteRef as a,createSubRouteRef as e}from"@backstage/core-plugin-api";const c=a({id:"soundcheck-entity"}),i=a({id:"soundcheck-group"}),r=e({id:"soundcheck-entity-certification-track-redirect",parent:c,path:"/tracks/:trackId"}),n=e({id:"soundcheck-entity-certification",parent:c,path:"/tracks/:trackId/checks/:checkId"}),
|
|
1
|
+
import{createRouteRef as a,createSubRouteRef as e}from"@backstage/core-plugin-api";const c=a({id:"soundcheck-entity"}),i=a({id:"soundcheck-group"}),r=e({id:"soundcheck-entity-certification-track-redirect",parent:c,path:"/tracks/:trackId"}),n=e({id:"soundcheck-entity-certification",parent:c,path:"/tracks/:trackId/checks/:checkId"}),s=e({id:"soundcheck-entity-playlist-redirect",parent:c,path:"/playlists/:playlistId"}),o=e({id:"soundcheck-entity-playlist-track-redirect",parent:c,path:"/playlists/:playlistId/tracks/:trackId"}),d=e({id:"soundcheck-entity-playlist-track-redirect",parent:c,path:"/playlists/:playlistId/tracks/:trackId/checks/:checkId"}),t=a({id:"soundcheck"});e({id:"soundcheck-quickstart",parent:t,path:"/quickstart"});const p=e({id:"soundcheck-checks",parent:t,path:"/checks"}),k=e({id:"soundcheck-check-details",parent:t,path:"/checks/:checkId"}),h=e({id:"soundcheck-check-edit",parent:t,path:"/checks/:checkId/edit"}),u=e({id:"soundcheck-check-create",parent:t,path:"/checks/create"}),R=e({id:"soundcheck-check-templates",parent:t,path:"/checks/templates"}),g=e({id:"soundcheck-tracks",parent:t,path:"/tracks"}),l=e({id:"soundcheck-track-details",parent:t,path:"/tracks/:trackId"}),f=e({id:"soundcheck-track-edit",parent:t,path:"/tracks/:trackId/edit"}),m=e({id:"soundcheck-track-create",parent:t,path:"/tracks/create"}),I=e({id:"soundcheck-track-check-details",parent:t,path:"/tracks/:trackId/checks/:checkId"}),y=e({id:"soundcheck-campaigns",parent:t,path:"/campaigns"}),v=e({id:"soundcheck-campaign-details",parent:t,path:"/campaigns/:campaignId"}),w=e({id:"soundcheck-campaign-edit",parent:t,path:"/campaigns/:campaignId/edit"}),P=e({id:"soundcheck-campaign-create",parent:t,path:"/campaigns/create"}),x=e({id:"soundcheck-tech-insights",parent:t,path:"/tech-insights"}),E=e({id:"soundcheck-integrations-page",parent:t,path:"/integrations"}),C=e({id:"soundcheck-integration-details",parent:t,path:"/integrations/:integrationId"}),D=e({id:"soundcheck-integration-edit",parent:t,path:"/integrations/:integrationId/edit"});e({id:"soundcheck-tech-insights-track",parent:t,path:"/tech-insights/track"});const T=e({id:"soundcheck-track-overview",parent:t,path:"/tracks/:trackId/overview"}),q=e({id:"soundcheck-track-explorer",parent:t,path:"/tracks/:trackId/explorer"}),O=e({id:"soundcheck-campaign-overview",parent:t,path:"/campaigns/:campaignId/overview"}),b=e({id:"soundcheck-campaign-explorer",parent:t,path:"/campaigns/:campaignId/explorer"}),S=e({id:"soundcheck-overview",parent:t,path:"/overview"});export{P as campaignCreateRouteRef,v as campaignDetailsRouteRef,w as campaignEditRouteRef,b as campaignExplorerRouteRef,O as campaignOverviewRouteRef,y as campaignsPageRouteRef,s as certificationPlaylistRouteRef,d as certificationPlaylistTrackCheckRouteRef,o as certificationPlaylistTrackRouteRef,n as certificationRouteRef,r as certificationTrackRouteRef,u as checkCreateRouteRef,k as checkDetailsRouteRef,h as checkEditRouteRef,R as checkTemplatesRouteRef,p as checksPageRouteRef,c as entityRootRouteRef,i as groupRootRouteRef,C as integrationDetailsRouteRef,D as integrationEditRouteRef,E as integrationsPageRouteRef,S as overviewRouteRef,t as rootRouteRef,x as techInsightsPageRouteRef,I as trackCheckDetailsRouteRef,m as trackCreateRouteRef,l as trackDetailsRouteRef,f as trackEditRouteRef,q as trackExplorerRouteRef,T as trackOverviewRouteRef,g as tracksPageRouteRef};
|
|
2
2
|
//# sourceMappingURL=routes.esm.js.map
|
package/dist/utils/charts.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{sum as
|
|
1
|
+
import{sum as f}from"lodash";const l=(t,e=2)=>{if(t.length===0)return[];const g=t.filter(r=>r>0),o=f(g);if(o===0)return t.map(()=>0);const n=t.map(r=>r>0?r/o*100:0),a=n.filter(r=>r>0&&r<e).length,u=a*e;if(a===0||u>=100)return n;const c=100-u,i=n.filter(r=>r>=e).reduce((r,d)=>r+d,0);return n.map(r=>r===0?0:r<e?e:i>0?r/i*c:r)},p=["Passed","Failed","Warning","Exempt","Error","Not Reported"];function s(t){return t==="Not Reported"?"notReported":t.toLowerCase()}function m(){return p.map(t=>s(t))}function h(t){return{passed:"rgb(76, 175, 80)",failed:"rgb(244, 67, 54)",warning:"rgb(255, 152, 0)",exempt:"rgb(33, 150, 243)",error:"rgb(246, 104, 94)",notReported:"rgb(97, 97, 97)"}[t]}export{l as calculateAdjustedBarWidths,p as chartStatuses,h as getChartStatusColor,s as getChartStatusKey,m as getChartStatusKeys};
|
|
2
2
|
//# sourceMappingURL=charts.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.20.0",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"homepage": "https://backstage.spotify.com",
|
|
7
7
|
"main": "./dist/index.esm.js",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as t,jsxs as I}from"react/jsx-runtime";import{makeStyles as g,useTheme as T}from"@material-ui/core";import{memo as u}from"react";import{BarChart as E,CartesianGrid as S,XAxis as f,YAxis as v,Tooltip as N,Legend as R,Bar as B,Cell as L}from"recharts";import{CARTESIAN_GRID_OPACITY as b,CHART_DATA_KEY as d,AXIS_DOMAIN as p,VERTICAL_Y_AXIS_WIDTH as O,HORIZONTAL_Y_AXIS_WIDTH as D,LEGEND_ICON_TYPE as x,LEGEND_ICON_SIZE as H}from"../ChartTypes.esm.js";import{getChartFontColor as m,getChartColors as K}from"../chartUtils.esm.js";import{ChartWrapper as Y}from"../ChartWrapper/ChartWrapper.esm.js";import{BarChartPlaceholder as k}from"./BarChartPlaceholder.esm.js";const z=g(a=>({legend:{color:m(a)}}));var s=(a=>(a.Horizontal="horizontal",a.Vertical="vertical",a))(s||{});const h=20,y=50;var C=(a=>(a.Category="category",a.Number="number",a))(C||{});const A={dataKey:"passRate",name:"Pass rate"},Z=u(({data:a,layout:l})=>{const r=l==="vertical",o=T(),n=K(o),c=m(o),_=z();return a.length?t(Y,{"aria-label":"Bar chart representing data points.",children:I(E,{data:a,layout:l,children:[t(S,{vertical:r,horizontal:!r,opacity:b}),t(f,{dataKey:r?void 0:d,type:r?"number":"category",domain:r?p:void 0,stroke:c}),t(v,{width:r?O:D,dataKey:r?d:void 0,type:r?"category":"number",domain:r?void 0:p,stroke:c}),t(N,{contentStyle:{backgroundColor:o.palette.background.paper},itemStyle:{color:m(o)},cursor:{fill:"transparent"}}),t(R,{iconType:x,iconSize:H,formatter:e=>t("span",{className:_.legend,children:e}),payload:a.map(({name:e},i)=>({id:e,value:e,color:n[i%n.length]}))}),t(B,{barSize:r?h:y,dataKey:A.dataKey,name:A.name,children:a.map(({name:e},i)=>t(L,{fill:n[i%n.length]},e))})]})}):t(k,{layout:l,theme:o})});export{C as AxisType,Z as BarChart,s as BarChartLayout,y as HORIZONTAL_BAR_SIZE,h as VERTICAL_BAR_SIZE};
|
|
2
|
-
//# sourceMappingURL=BarChart.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsxs as i,jsx as r}from"react/jsx-runtime";import{Typography as y}from"@material-ui/core";import{makeStyles as m}from"@material-ui/core/styles";import{BarChart as p,CartesianGrid as c,XAxis as h,YAxis as x,Bar as A}from"recharts";import{CARTESIAN_GRID_OPACITY as C,AXIS_DOMAIN as d,VERTICAL_Y_AXIS_WIDTH as I,HORIZONTAL_Y_AXIS_WIDTH as _}from"../ChartTypes.esm.js";import{ChartWrapper as f}from"../ChartWrapper/ChartWrapper.esm.js";import{BarChartLayout as g,AxisType as e,VERTICAL_BAR_SIZE as u,HORIZONTAL_BAR_SIZE as T}from"./BarChart.esm.js";const N=m(t=>({container:{position:"relative"},chartMessage:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",fontWeight:"bold",backgroundColor:t.palette.background.default,padding:t.spacing(1),borderRadius:"5px",textAlign:"center",width:"50%",zIndex:2}})),R=({layout:t,theme:n})=>{const a=t===g.Vertical,l=[{x:"A",y:25},{x:"B",y:50},{x:"C",y:75}],s=[{x:"A",y:100},{x:"B",y:90},{x:"C",y:80},{x:"C",y:70},{x:"C",y:60}],o=N();return i("div",{className:o.container,children:[r(f,{children:i(p,{data:a?s:l,margin:{left:0},layout:t,children:[r(c,{strokeDasharray:"3 3",vertical:a,horizontal:!a,opacity:C}),r(h,{dataKey:a?void 0:"x",type:a?e.Number:e.Category,domain:a?d:void 0,hide:!0}),r(x,{width:a?I:_,dataKey:a?"x":void 0,type:a?e.Category:e.Number,domain:a?void 0:d,hide:!0}),r(A,{dataKey:"y",fill:n.palette.divider,barSize:a?u:T})]})}),r(y,{className:o.chartMessage,children:"No Data"})]})};export{R as BarChartPlaceholder};
|
|
2
|
-
//# sourceMappingURL=BarChartPlaceholder.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{parseEntityRef as n}from"@backstage/catalog-model";import{useSummaryAggregationsContext as p}from"../../TechHealthSummary/SummaryAggregationsProvider.esm.js";import{BarChart as m,BarChartLayout as i}from"./BarChart.esm.js";const u=t=>t?.map(({node:a})=>{const{id:s,groupTitle:r,snapshotPassRate:o}=a;return{name:r??n(s).name,passRate:o}})??[],d=()=>{const{groupPassRatesOverviewTrends:{data:t}}=p(),a=t?.groupPassRates?.edges?.sort((r,o)=>o.node.snapshotPassRate-r.node.snapshotPassRate),s=u(a);return e(m,{data:s,layout:i.Vertical})};export{d as GroupPassRateHistoryBarChart};
|
|
2
|
-
//# sourceMappingURL=GroupPassRateHistoryBarChart.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import{Typography as e}from"@material-ui/core";import{useSummaryAggregationsContext as s}from"../../TechHealthSummary/SummaryAggregationsProvider.esm.js";import{BarChart as m,BarChartLayout as n}from"./BarChart.esm.js";const i=r=>r?.overallTrackPassRate?.map(({levelOrdinal:a,snapshotPassRate:t})=>({name:`Level ${a}`,passRate:t}))??[],l=()=>{const{trackPassRateOverviewTrend:{data:r,isError:a}}=s();if(a)return o(e,{color:"error",children:"Failed to load track data."});const t=i(r);return o(m,{data:t,layout:n.Horizontal})};export{l as TrackSummaryBarChart};
|
|
2
|
-
//# sourceMappingURL=TrackSummaryBarChart.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{DateTime as e}from"luxon";import{formatDate as n}from"./chartUtils.esm.js";function o(_){const I=e.utc();return _.map((t,a)=>({name:n(I,_.length-a-1),passRate:t}))}var T=(_=>(_.Bar="bar",_.Line="line",_))(T||{});const r=-25,A=[0,100],E=85,m=25,D="name",C=250,N=.5,O="circle",R=8,i="monotone";export{A as AXIS_DOMAIN,N as CARTESIAN_GRID_OPACITY,D as CHART_DATA_KEY,T as ChartType,m as HORIZONTAL_Y_AXIS_WIDTH,R as LEGEND_ICON_SIZE,O as LEGEND_ICON_TYPE,i as LINE_CHART_TYPE,C as MIN_CHART_HEIGHT,r as TOOLTIP_Y_OFFSET,E as VERTICAL_Y_AXIS_WIDTH,o as convertPassRateToDataPoints};
|
|
2
|
-
//# sourceMappingURL=ChartTypes.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as i}from"react/jsx-runtime";import{ResponsiveContainer as o}from"recharts";import{MIN_CHART_HEIGHT as t}from"../ChartTypes.esm.js";const h=({children:e,height:r})=>i(o,{height:r,minHeight:r??t,debounce:1,children:e});export{h as ChartWrapper};
|
|
2
|
-
//# sourceMappingURL=ChartWrapper.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as f}from"react/jsx-runtime";import{parseEntityRef as c}from"@backstage/catalog-model";import{DateTime as d}from"luxon";import{useSummaryAggregationsContext as u}from"../../TechHealthSummary/SummaryAggregationsProvider.esm.js";import{formatDate as y}from"../chartUtils.esm.js";import{LineChart as l}from"./LineChart.esm.js";const P=t=>{const r=t?.overallEntityPassRates||[];if(!r.length)return[];const a=d.utc();return r.reduce((e,{trendPassRates:o,id:i},p)=>{const m=o?.map((s,n)=>({name:y(a,o.length-n-1),[i]:s}))??[];return p===0?m:e.map((s,n)=>({...s,...m[n]}))},[])},R=()=>{const{entityPassRatesOverviewTrends:{data:t}}=u(),r=t?.overallEntityPassRates?.map(({id:e})=>({dataKey:e,name:c(e).name}))??[],a=P(t);return f(l,{data:a,lines:r})};export{R as EntityPassRateHistoryLineChart};
|
|
2
|
-
//# sourceMappingURL=EntityPassRateHistoryLineChart.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as t,jsxs as d}from"react/jsx-runtime";import{makeStyles as p,useTheme as C}from"@material-ui/core";import{LineChart as c,CartesianGrid as _,XAxis as T,YAxis as A,Tooltip as I,Legend as g,Line as E}from"recharts";import{CARTESIAN_GRID_OPACITY as L,CHART_DATA_KEY as y,HORIZONTAL_Y_AXIS_WIDTH as N,AXIS_DOMAIN as O,TOOLTIP_Y_OFFSET as f,LEGEND_ICON_TYPE as S,LEGEND_ICON_SIZE as k,LINE_CHART_TYPE as Y}from"../ChartTypes.esm.js";import{getChartFontColor as m,getChartColors as D}from"../chartUtils.esm.js";import{ChartWrapper as u}from"../ChartWrapper/ChartWrapper.esm.js";import{LineChartPlaceholder as x}from"./LineChartPlaceholder.esm.js";const K=p(r=>({legend:{color:m(r)}})),P=({data:r,lines:a,height:s})=>{const o=C(),i=D(o),n=m(o),h=K();return r.length?t(u,{height:s,children:d(c,{data:r,children:[t(_,{vertical:!1,opacity:L}),t(T,{dataKey:y,stroke:n}),t(A,{width:N,domain:O,stroke:n}),t(I,{position:{y:f},contentStyle:{backgroundColor:o.palette.background.paper}}),a.length>1&&t(g,{iconType:S,iconSize:k,formatter:e=>t("span",{className:h.legend,children:e})}),a.map((e,l)=>t(E,{dataKey:e.dataKey,stroke:i[l%i.length],strokeWidth:2,dot:!1,name:e.name,type:Y},e.dataKey))]})}):t(x,{})};export{P as LineChart};
|
|
2
|
-
//# sourceMappingURL=LineChart.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsxs as o,jsx as t}from"react/jsx-runtime";import{Typography as n}from"@material-ui/core";import{makeStyles as s}from"@material-ui/core/styles";import{LineChart as c,CartesianGrid as d,XAxis as h,YAxis as p,Line as l}from"recharts";import{CARTESIAN_GRID_OPACITY as m,AXIS_DOMAIN as x}from"../ChartTypes.esm.js";import{ChartWrapper as y}from"../ChartWrapper/ChartWrapper.esm.js";const g=s(e=>({container:{position:"relative"},chartMessage:{position:"absolute",top:"50%",left:"50%",fontWeight:"bold",transform:"translate(-50%, -50%)",backgroundColor:e.palette.background.default,padding:e.spacing(1),borderRadius:"5px",textAlign:"center",width:"50%",zIndex:2}})),f=({height:e,text:a})=>{const i=[{x:"A",y:0},{x:"B",y:50},{x:"C",y:100}],r=g();return o("div",{className:r.container,children:[t(y,{height:e,children:o(c,{data:i,children:[t(d,{strokeDasharray:"3 3",vertical:!1,opacity:m}),t(h,{dataKey:"x",stroke:"#ccc",hide:!0}),t(p,{domain:x,stroke:"#ccc",hide:!0}),t(l,{type:"monotone",dataKey:"y",stroke:"#ccc",dot:!1})]})}),t(n,{className:r.chartMessage,children:a??"No Data"})]})};export{f as LineChartPlaceholder};
|
|
2
|
-
//# sourceMappingURL=LineChartPlaceholder.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as r}from"react/jsx-runtime";import{LineChart as s}from"./LineChart.esm.js";import{TableLineChart as o}from"./TableLineChart.esm.js";const i=({chartData:t,tableChart:e})=>{const a=[{dataKey:"passRate",name:"Pass rate"}];return e?r(o,{data:t,lines:a}):r(s,{data:t,lines:a})};export{i as PassRateHistoryLineChart};
|
|
2
|
-
//# sourceMappingURL=PassRateHistoryLineChart.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as t,jsxs as m}from"react/jsx-runtime";import{useTheme as d}from"@material-ui/core";import{ResponsiveContainer as s,LineChart as h,XAxis as p,YAxis as A,Line as C}from"recharts";import{CHART_DATA_KEY as l,AXIS_DOMAIN as T,LINE_CHART_TYPE as f}from"../ChartTypes.esm.js";import{getChartColors as x}from"../chartUtils.esm.js";const y=({data:i,lines:r})=>{const o=d(),a=x(o);return t(s,{height:50,width:100,children:m(h,{data:i,children:[t(p,{hide:!0,dataKey:l}),t(A,{width:0,domain:T}),r.map((e,n)=>t(C,{dataKey:e.dataKey,stroke:a[n%a.length],strokeWidth:2,dot:!1,name:e.name,type:f},e.dataKey))]})})};export{y as TableLineChart};
|
|
2
|
-
//# sourceMappingURL=TableLineChart.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as i}from"react/jsx-runtime";import{Typography as p}from"@material-ui/core";import{DateTime as f}from"luxon";import{useSummaryAggregationsContext as u}from"../../TechHealthSummary/SummaryAggregationsProvider.esm.js";import{formatDate as v}from"../chartUtils.esm.js";import{LineChart as h}from"./LineChart.esm.js";const l=e=>{const t=e?.overallTrackPassRate||[];if(!t.length)return[];const a=f.utc();return t.reduce((o,{trendPassRates:r,levelOrdinal:c},d)=>{const m=r?.map((n,s)=>({name:v(a,r.length-s-1),[`Level${c}`]:n}))??[];return d===0?m:o.map((n,s)=>({...n,...m[s]}))},[])},g=()=>{const{trackPassRateOverviewTrend:{data:e,isError:t}}=u();if(t)return i(p,{color:"error",children:"Failed to load track data."});const a=l(e),o=e?.overallTrackPassRate?.map(({levelOrdinal:r})=>({dataKey:`Level${r}`,name:`Level ${r}`}))??[];return i(h,{data:a,lines:o})};export{g as TrackPassRateHistoryLineChart,l as formatLineChartData};
|
|
2
|
-
//# sourceMappingURL=TrackPassRateHistoryLineChart.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsxs as C,jsx as o}from"react/jsx-runtime";import{makeStyles as g,useTheme as y,Box as x,Typography as v}from"@material-ui/core";import{CircularProgressbar as d,buildStyles as f}from"react-circular-progressbar";import{checkPassRatesSummaryCsvFilename as u}from"../../utils/charts.esm.js";import"recharts";import{convertPassRateToDataPoints as R}from"../Charts/ChartTypes.esm.js";import"../Charts/LineChart/LineChart.esm.js";import{getChartFontColor as m,getChartColors as k}from"../Charts/chartUtils.esm.js";import{PassRateHistoryLineChart as P}from"../Charts/LineChart/PassRateHistoryLineChart.esm.js";import"luxon";import{useSummaryAggregationsContext as T}from"../TechHealthSummary/SummaryAggregationsProvider.esm.js";import"@backstage/catalog-model";import"../Charts/BarChart/BarChart.esm.js";import{OverviewChartCard as S}from"../OverviewChartCard/OverviewChartCard.esm.js";import"../OverviewChartCard/OverviewChartCardStyles.esm.js";import"react-circular-progressbar/dist/styles.css";import{overallCheckPassRateToCsv as D}from"../TechHealthTabs/TechHealthExportFunctions.esm.js";const b=g(e=>({chartHeader:{marginBottom:e.spacing(2)},overallSummaryBox:{display:"flex",flexDirection:"column",height:"100%",color:m(e),textAlign:"center",gap:e.spacing(2)},percentage:{fontSize:e.typography.pxToRem(65),lineHeight:`${e.typography.pxToRem(88)}px`,fontWeight:"bold"},summaryText:{fontSize:e.typography.pxToRem(14),lineHeight:`${e.typography.pxToRem(14)}px`}})),H=()=>{const e=y(),i=b(),{checkPassRateTrend:{data:t,isLoading:l,isError:p}}=T(),r=t?.overallCheckPassRates?.length??0,c=R(t?.overallCheckPassRates??[]),a=r?t?.overallCheckPassRates?.[r-1]:void 0;let s;a?s=`${a}%`:s="No Data";const n=C(x,{className:i.overallSummaryBox,children:[o(d,{value:a??0,text:s,styles:f({textColor:m(e),pathColor:k(e)[0],trailColor:e.palette.divider,textSize:r?void 0:8})}),o(v,{className:i.summaryText,children:"Current check pass rate"})]}),h=!t?.overallCheckPassRates||!r||l||p;return o(S,{title:"Check pass rate",subtitle:"Aggregate pass rate for checks",summaryCardContent:n,chartSectionContent:o(P,{chartData:c}),disableDataExport:h,csvFilename:u,csvData:D(t)})};export{H as CheckHistoryChartCard};
|
|
2
|
-
//# sourceMappingURL=CheckHistoryChartCard.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{entityPassRatesSummaryCsvFilename as o}from"../../utils/charts.esm.js";import"recharts";import"../Charts/ChartTypes.esm.js";import"../Charts/LineChart/LineChart.esm.js";import"@material-ui/core";import"../Charts/chartUtils.esm.js";import"luxon";import{useSummaryAggregationsContext as m}from"../TechHealthSummary/SummaryAggregationsProvider.esm.js";import{EntityPassRateHistoryLineChart as n}from"../Charts/LineChart/EntityPassRateHistoryLineChart.esm.js";import"../Charts/BarChart/BarChart.esm.js";import"@backstage/catalog-model";import{OverviewChartCard as p}from"../OverviewChartCard/OverviewChartCard.esm.js";import"../OverviewChartCard/OverviewChartCardStyles.esm.js";import{overallEntityPassRatesToCsv as l}from"../TechHealthTabs/TechHealthExportFunctions.esm.js";const y=()=>{const{entityPassRatesOverviewTrends:{data:t,isLoading:r,isError:s}}=m(),a=t?.overallEntityPassRates?.length,i=!t?.overallEntityPassRates||!a||r||s;return e(p,{title:"Entity pass rate",subtitle:"By default, this chart shows the top 5 entities by pass rate for all teams with which you are associated. To see a different set of entities, use the filters.",chartSectionContent:e(n,{}),disableDataExport:i,csvFilename:o,csvData:l(t)})};export{y as EntityPassRateCard};
|
|
2
|
-
//# sourceMappingURL=EntityPassRateCard.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{motion as a}from"framer-motion";const d={hidden:{height:0,opacity:0,overflow:"hidden"},visible:{height:"auto",opacity:1,overflow:"visible"}};function r({visible:o,onExpandDone:i,...e}){return t(a.div,{...e,animate:o?"visible":"hidden",initial:"hidden",variants:d,onAnimationComplete:n=>{n==="visible"&&i&&i()}})}export{r as default};
|
|
2
|
-
//# sourceMappingURL=Expand.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{groupPassRatesSummaryCsvFilename as m}from"../../utils/charts.esm.js";import"recharts";import"../Charts/ChartTypes.esm.js";import"../Charts/LineChart/LineChart.esm.js";import"@material-ui/core";import"../Charts/chartUtils.esm.js";import"luxon";import{useSummaryAggregationsContext as i}from"../TechHealthSummary/SummaryAggregationsProvider.esm.js";import"@backstage/catalog-model";import"../Charts/BarChart/BarChart.esm.js";import{GroupPassRateHistoryBarChart as p}from"../Charts/BarChart/GroupPassRateHistoryBarChart.esm.js";import{OverviewChartCard as g}from"../OverviewChartCard/OverviewChartCard.esm.js";import"../OverviewChartCard/OverviewChartCardStyles.esm.js";import{overallGroupPassRatesToCsv as n}from"../TechHealthTabs/TechHealthExportFunctions.esm.js";const u=()=>{const{groupPassRatesOverviewTrends:{data:r,isLoading:a,isError:o}}=i(),s=r?.groupPassRates?.edges.length,e=!r?.groupPassRates||!s||a||o;return t(g,{title:"Team pass rate",subtitle:"Compare the aggregate pass rate for teams",chartSectionContent:t(p,{}),disableDataExport:e,csvFilename:m,csvData:n(r)})};export{u as GroupPassRateCard};
|
|
2
|
-
//# sourceMappingURL=GroupPassRateCard.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsxs as t,jsx as e}from"react/jsx-runtime";import{Card as h,Box as r,Typography as n,Tooltip as p,Button as C}from"@material-ui/core";import N from"@material-ui/icons/GetApp";import{CSVLink as S}from"react-csv";import{useOverviewChartCardStyles as f}from"./OverviewChartCardStyles.esm.js";const v=({title:l,subtitle:o,summaryCardContent:i,chartSectionContent:s,disableDataExport:c,csvData:d,csvFilename:m})=>{const a=f();return t(h,{className:a.card,children:[t(r,{className:a.headerRow,children:[t(r,{className:a.headerSection,children:[e(n,{className:a.title,children:l}),e(n,{variant:"caption",children:o})]}),e(r,{className:a.headerExportSection,children:e(S,{data:d,filename:m,onClick:()=>!c,children:e(p,{title:"Export to CSV",children:e("span",{children:e(C,{disabled:c,children:e(N,{})})})})})})]}),t(r,{className:a.contentRow,children:[i&&e(r,{className:a.leftSection,children:e(r,{className:a.summaryCard,children:i})}),e(r,{className:a.chartSection,children:s})]})]})};export{v as OverviewChartCard};
|
|
2
|
-
//# sourceMappingURL=OverviewChartCard.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{makeStyles as t}from"@material-ui/core/styles";const i=t(e=>({card:{display:"flex",flexDirection:"column",gap:e.spacing(1),border:`1px solid ${e.palette.divider}`,boxShadow:"none",width:"99%"},title:{fontWeight:"bold",fontSize:e.typography.h5.fontSize,lineHeight:`${e.typography.h3.fontSize}px`},subtitle:{fontSize:e.typography.pxToRem(14),lineHeight:`${e.typography.h6.fontSize}px`,color:e.palette.grey[800]},headerRow:{display:"flex",padding:e.spacing(1,2),borderBottom:`1px solid ${e.palette.divider}`,gap:e.spacing(2)},headerSection:{display:"flex",flexDirection:"column",gap:e.spacing(.5)},headerExportSection:{display:"flex",alignItems:"center",marginLeft:"auto",marginRight:0},contentRow:{padding:e.spacing(2.5,2),display:"flex",gap:e.spacing(2)},leftSection:{width:"200px"},summaryCard:{height:"100%",display:"flex",flexDirection:"column",justifyContent:"space-between"},chartSection:{flex:1,width:"100%",minWidth:"200px"},chartDisplaySummary:{flex:1,display:"flex",flexDirection:"row",gap:e.spacing(1),alignItems:"center",justifyContent:"end"}}));export{i as useOverviewChartCardStyles};
|
|
2
|
-
//# sourceMappingURL=OverviewChartCardStyles.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsxs as i,jsx as e}from"react/jsx-runtime";import{Box as r,Grid as n,TablePagination as P}from"@material-ui/core";import{makeStyles as f}from"@material-ui/core/styles";import{useNavigate as C}from"react-router-dom";import"recharts";import"../Charts/ChartTypes.esm.js";import{LineChart as x}from"../Charts/LineChart/LineChart.esm.js";import"../Charts/chartUtils.esm.js";import"luxon";import"../TechHealthSummary/SummaryAggregationsProvider.esm.js";import"@backstage/catalog-model";import"../Charts/BarChart/BarChart.esm.js";import{SummaryCard as w}from"../SummaryCard/SummaryCard.esm.js";import{PassRateMetadata as u}from"./PassRateMetadata.esm.js";const R=f(t=>({root:{display:"flex",flexDirection:"column",width:"100%"},gridContainer:{flexGrow:1},cardContent:{display:"flex",flexDirection:"column",gap:t.spacing(1),height:"100%"},footer:{display:"flex",flexDirection:"column",gap:t.spacing(1),justifyContent:"end",marginTop:"auto"}})),y=({data:t,totalCount:s,rowsPerPage:m,page:l,onPageChange:p,onRowsPerPageChange:d})=>{const o=R(),g=C(),c=[{dataKey:"passRate",name:"Pass rate"}];return i(r,{className:o.root,children:[e(n,{container:!0,spacing:2,className:o.gridContainer,children:t.map((a,h)=>e(n,{item:!0,xs:12,sm:12,md:6,lg:4,xl:3,children:e(w,{title:a.name??a.id,description:a.description,children:e(r,{className:o.cardContent,children:i(r,{className:o.footer,children:[e(u,{ownerEntityRef:a.owner,passRates:a.lineChart.snapshotPassRates}),e(x,{data:a.lineChart.trendPassRates,lines:a.lineChart.lineConfigs??c,height:150})]})}),handleView:()=>a.navigateTo?g(a.navigateTo):void 0})},h))}),e(P,{rowsPerPageOptions:[10,25,50],component:"div",count:s,rowsPerPage:m,page:l,onPageChange:p,onRowsPerPageChange:d,labelRowsPerPage:"Items per page:"})]})};export{y as PassRateGrid};
|
|
2
|
-
//# sourceMappingURL=PassRateGrid.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsxs as i,jsx as t}from"react/jsx-runtime";import{EntityRefLink as f}from"@backstage/plugin-catalog-react";import{makeStyles as y,List as N,Typography as o,ListItem as a,Tooltip as l,ListItemIcon as m,ListItemText as c}from"@material-ui/core";import x from"@material-ui/icons/Group";import L from"@material-ui/icons/TrendingDown";import g from"@material-ui/icons/TrendingFlat";import T from"@material-ui/icons/TrendingUp";import{Trend as s}from"./types.esm.js";const R=y(r=>({cardSection:{marginBottom:r.spacing(2)},listItem:{padding:0},listItemText:{margin:0},listItemIcon:{marginRight:r.spacing(1),minWidth:0},ownerLink:{"& span":{"&:hover":{textDecoration:"underline"}}}})),S=({ownerEntityRef:r,passRates:d})=>{const e=R();return i(N,{dense:!0,disablePadding:!0,className:e.cardSection,children:[t(o,{variant:"overline",color:"textSecondary",children:"Details"}),r&&i(a,{disableGutters:!0,className:e.listItem,children:[t(l,{title:"Owner",children:t(m,{className:e.listItemIcon,children:t(x,{color:"inherit",fontSize:"small"})})}),t(c,{className:e.listItemText,primary:t(f,{className:e.ownerLink,entityRef:r??"No Owner",hideIcon:!0})})]}),d.map(({name:h,value:p,trend:n},I)=>i(a,{disableGutters:!0,className:e.listItem,children:[t(l,{title:"The most recent pass rate.",children:i(m,{className:e.listItemIcon,children:[n===s.UP&&t(T,{color:"inherit",fontSize:"small"}),n===s.DOWN&&t(L,{color:"inherit",fontSize:"small"}),n===s.FLAT&&t(g,{color:"inherit",fontSize:"small"})]})}),t(c,{className:e.listItemText,primary:i(o,{variant:"body2",color:"textPrimary",children:[h??"Latest Pass Rate",": ",i("b",{children:[Math.round(p),"%"]})]})})]},I))]})};export{S as PassRateMetadata};
|
|
2
|
-
//# sourceMappingURL=PassRateMetadata.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsxs as d,jsx as e}from"react/jsx-runtime";import{Paper as g,Table as m,TableHead as P,TableRow as i,TableCell as s,TableBody as C,TablePagination as w}from"@material-ui/core";import{makeStyles as T}from"@material-ui/core/styles";const u=T(r=>({paper:{width:"100%",boxShadow:"none",border:`1px solid ${r.palette.divider}`,borderRadius:r.shape.borderRadius},tableHeaderCell:{fontWeight:"bold"}})),R=({data:r,totalCount:t,columns:o,rowsPerPage:p,page:c,onPageChange:h,onRowsPerPageChange:b})=>{const n=u();return d(g,{className:n.paper,children:[d(m,{size:"small",children:[e(P,{children:e(i,{children:o.map(a=>e(s,{className:n.tableHeaderCell,children:a.label},`header-${a.id}`))})}),e(C,{children:r.map(a=>e(i,{children:o.map(l=>e(s,{children:l.renderCell?l.renderCell(a):a[l.id]},`cell-${l.id}`))},a.id))})]}),e(w,{rowsPerPageOptions:[10,25,50],count:t,component:"div",rowsPerPage:p,page:c,onPageChange:h,onRowsPerPageChange:b})]})};export{R as NewPassRateTable};
|
|
2
|
-
//# sourceMappingURL=NewPassRateTable.esm.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{jsx as r,jsxs as p}from"react/jsx-runtime";import{Paper as y,Table as R,TableHead as S,TableRow as h,TableCell as u,TableBody as $,TablePagination as H}from"@material-ui/core";import{makeStyles as N}from"@material-ui/core/styles";import{useState as b,useEffect as j}from"react";import"@backstage/catalog-model";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"@spotify/backstage-plugin-soundcheck-common";import{useGetChecks as L}from"../../hooks/checks/useGetChecks.esm.js";import"../../hooks/useSoundcheckAlert.esm.js";import"../../hooks/useConfirmationModal.esm.js";import"react-router-dom";import"react-use/lib/useLocalStorage";import{Loading as z}from"../TechHealth/Loading/Loading.esm.js";const B=N(o=>({paper:{width:"100%",boxShadow:"none",border:`1px solid ${o.palette.divider}`,borderRadius:o.shape.borderRadius},tableHeaderCell:{fontWeight:"bold"}})),D=({data:o,columns:d,showsCheckData:n})=>{const l=B(),[s,a]=b(0),[t,f]=b(10),{data:g,isLoading:C}=L({ids:n?o.map(e=>e.id):[]});if(j(()=>{a(0)},[o.length]),C)return r(z,{});const w=(e,i)=>{a(i)},P=e=>{f(+e.target.value),a(0)},m=s*t,T=m+t,k=e=>`Cannot view detail: Check exists in results data only. That is, a check
|
|
2
|
-
with the id '${e}' is not defined in any yaml files nor was such a
|
|
3
|
-
check created through Soundcheck's UI.`,v=(e,i)=>{if(!e.renderCell)return i[e.id];if(e.id==="action"&&n){const c=g?.edges.find(x=>x.node.id===i.id)!==void 0;return e.renderCell(i,!c,c?void 0:k(i.id))}return e.renderCell(i)};return p(y,{className:l.paper,children:[p(R,{size:"small",children:[r(S,{children:r(h,{children:d.map(e=>r(u,{className:l.tableHeaderCell,children:e.label},`header-${e.id}`))})}),r($,{children:o.slice(m,T).map(e=>r(h,{children:d.map(i=>r(u,{children:v(i,e)},`cell-${i.id}`))},e.id))})]}),r(H,{rowsPerPageOptions:[10,25,50],component:"div",count:o.length,rowsPerPage:t,page:s,onPageChange:w,onRowsPerPageChange:P})]})};export{D as PassRateTable};
|
|
4
|
-
//# sourceMappingURL=PassRateTable.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{makeStyles as h,TextField as u,InputAdornment as c,IconButton as f}from"@material-ui/core";import g from"@material-ui/icons/Close";import x from"@material-ui/icons/Search";import{useRef as B,useEffect as I}from"react";const y=h(r=>({searchIcon:{opacity:".5"},clearButton:{height:"36px",width:"36px"},searchBar:{color:r.palette.text.primary,paddingLeft:r.spacing(1)},iconWrapper:{marginLeft:0}})),N=({searchTerm:r,setSearchTerm:o,showClear:s=!0,placeholder:i="Search...",disabled:a,...l})=>{const t=y(),n=B(null);I(()=>{!a&&n.current&&n.current.focus()},[a]);const p=m=>{o(m.target.value)},d=()=>{o("")};return e(u,{...l,disabled:a,inputRef:n,fullWidth:!0,placeholder:i,value:r,onChange:p,InputProps:{className:t.searchBar,startAdornment:e(c,{className:t.iconWrapper,position:"start",children:e(x,{className:t.searchIcon,"data-testid":"search-icon"})}),endAdornment:s&&r?e(c,{position:"end",children:e(f,{edge:"end",onClick:d,className:t.clearButton,children:e(g,{})})}):null}})};export{N as SearchBar};
|
|
2
|
-
//# sourceMappingURL=SearchBar.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{parseEntityRef as T}from"@backstage/catalog-model";import C from"lodash";import{useState as $,useMemo as l,useEffect as A}from"react";import"../../../contexts/TrackFormContext.esm.js";import"../../../contexts/CheckFormContext.esm.js";import"../../../contexts/CampaignFormContext.esm.js";import"react/jsx-runtime";import{useLoggedInUser as S}from"../../../contexts/UserProvider.esm.js";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"../../../api.esm.js";import"../../../hooks/graphqlKeys.esm.js";import{useAllGroups as x}from"../../../hooks/groups/useAllGroups.esm.js";import"@backstage/plugin-catalog-react";import"@spotify/backstage-plugin-soundcheck-common";import{useGetChecks as U}from"../../../hooks/checks/useGetChecks.esm.js";import"../../../hooks/useSoundcheckAlert.esm.js";import{useGetAllTracks as q}from"../../../hooks/tracks/useGetAllTracks.esm.js";import"../../../hooks/useConfirmationModal.esm.js";import"react-router-dom";import"react-use/lib/useLocalStorage";import{useGetEntityFacets as f}from"../../../hooks/catalog/useGetEntityFacets.esm.js";import{useEntityRefsForUser as B}from"../../../hooks/entities/useEntityRefsForUser.esm.js";import{Facet as s}from"./types.esm.js";const I=(i,o)=>{const a=[];for(const r of i)a.push({label:r.name??r.id,value:r.id});const e=i.map(r=>r.id);for(const r of o)for(const m of r.levels??[])for(const n of m.checks??[])e.includes(n.id)||(e.push(n.id),a.push({label:n.name??n.id,value:n.id}));return a},K=i=>{const o=[];for(const a of i??[])for(const e of a.levels??[])o.includes(e.ordinal)||o.push(e.ordinal);return o.sort().map(a=>({label:`Level ${a}`,value:`${a}`}))},M=(i,o)=>{const a=new Set(i.filter(e=>e.ownerEntityRef).map(e=>e.ownerEntityRef));return Array.from(a).map(e=>({label:o[e]??e,value:e}))},d=i=>(i??[]).map(o=>({label:o,value:o})),V=()=>{const[i,o]=$(!1),{userEntityRef:a}=S(),{data:e,isLoading:r}=B(a),{data:m,isLoading:n}=x(),u=l(()=>C.mapValues(C.keyBy(m??[],"ref"),t=>t.name),[m]),{data:y,isLoading:g}=q({first:100}),p=l(()=>y?.edges.map(t=>t.node)??[],[y]),{data:L,isLoading:v}=U({first:100}),c=l(()=>L?.edges.map(t=>t.node)??[],[L]),{data:E,isLoading:b}=f("kind"),{data:h,isLoading:k}=f("spec.lifecycle"),{data:R,isLoading:w}=f("spec.type"),{data:F,isLoading:O}=f("spec.system"),G=l(()=>({[s.Kind]:d(E),[s.Lifecycle]:d(h),[s.Type]:d(R),[s.System]:d(F),[s.Entity]:e.map(t=>({label:T(t).name,value:t})),[s.EntityOwner]:m?.map(t=>({label:t.name,value:t.ref}))??[],[s.Track]:p.map(t=>({label:t.name,value:t.id})),[s.Level]:K(p),[s.Check]:I(c,p),[s.CheckOwner]:M(c,u)}),[E,h,R,e,m,u,p,c,F]);return A(()=>{o(b||k||w||r||n||g||v||O)},[b,k,w,r,n,g,v,O]),{facetOptions:G,isLoading:i}};export{V as useFacetOptions};
|
|
2
|
-
//# sourceMappingURL=useFacetOptions.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsxs as r,jsx as e}from"react/jsx-runtime";import{DismissableBanner as p,TabbedLayout as i}from"@backstage/core-components";import{useApi as m,featureFlagsApiRef as n}from"@backstage/core-plugin-api";import{makeStyles as s,Typography as c,Box as d}from"@material-ui/core";import{Routes as h,Route as u}from"react-router-dom";import{useLCPReporting as f}from"../../hooks/useLCPReporting.esm.js";import{TechHealthSummary as g}from"../TechHealthSummary/TechHealthSummary.esm.js";import"../SoundcheckMarkdownContent/SoundcheckMarkdownContentDeprecated.esm.js";import"react";import"react-markdown";import"rehype-raw";import"remark-gfm";import"../SoundcheckMarkdownContent/SoundcheckMarkdownContentBUI.esm.js";import"../TechHealthTabs/PassRateTabStyles.esm.js";import"../StyledTooltip/StyledTooltip.esm.js";import"../TechHealthTabs/OwnerColumn.esm.js";import{TrackResultsTab as b}from"../TechHealthTabs/TrackResultsTab/TrackResultsTab.esm.js";import{EntityResultsTab as x}from"../TechHealthTabs/EntityResultsTab/EntityResultsTab.esm.js";import{GroupResultsTab as R}from"../TechHealthTabs/GroupResultsTab/GroupResultsTab.esm.js";import{CampaignResultsTab as T}from"../TechHealthTabs/CampaignResultsTab/CampaignResultsTab.esm.js";import{CheckResultsTab as k}from"../TechHealthTabs/CheckResultsTab/CheckResultsTab.esm.js";import"./Filters/types.esm.js";import"./Filters/FacetFilter.esm.js";import{FilterProvider as y}from"./Filters/FilterProvider.esm.js";import{Filters as C}from"./Filters/Filters.esm.js";import"./Filters/FiltersHeader.esm.js";import"./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"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"@spotify/backstage-plugin-soundcheck-common";import"../../hooks/useSoundcheckAlert.esm.js";import"../../hooks/useConfirmationModal.esm.js";import"react-use/lib/useLocalStorage";const v=s(t=>({container:{display:"flex",margin:"-24px",backgroundColor:t.palette.background.paper,borderTop:`1px solid ${t.palette.border}`,flex:1},fixedColumn:{width:"300px",flex:"none",borderRight:`1px solid ${t.palette.divider}`},flexibleColumn:{display:"flex",flexDirection:"column",flex:1,backgroundColor:t.palette.background.paper,height:"100%",maxWidth:"100%"},pageLayout:{display:"flex",flexDirection:"column",flex:"1 1 0%",backgroundColor:t.palette.background.default,"& > article":{display:"flex",flexDirection:"column",flex:"1 1 auto",borderTop:`1px solid ${t.palette.border}`,padding:`${t.spacing(3)}px !important`}},warning:{margin:"0 -24px"}})),w=()=>{const t=v(),o=m(n),a=!o.getRegisteredFlags().find(l=>l.name==="soundcheck-enable-campaigns")||o.isActive("soundcheck-enable-campaigns");return f({routeName:"soundcheck-tech-health",additionalAttributes:{campaignsEnabled:a.toString()}}),r(y,{children:[e("div",{className:t.warning,children:e(p,{id:"sunset-tech-health-banner",variant:"warning",message:e(c,{variant:"body2",children:"The Tech Health page will be retired in an upcoming release. Please use the new Tech Insights page for continued visibility into health data."})})}),r("div",{className:t.container,children:[e("div",{className:t.fixedColumn,children:e(C,{})}),e("div",{className:t.flexibleColumn,children:e(d,{className:t.pageLayout,"aria-label":"tech health tabs",children:e(h,{children:e(u,{path:"/*",element:r(i,{children:[e(i.Route,{title:"Summary",path:"/",children:e(g,{})}),a&&e(i.Route,{title:"Campaigns",path:"/campaigns",children:e(T,{})}),e(i.Route,{title:"Checks",path:"/checks",children:e(k,{})}),e(i.Route,{title:"Tracks",path:"/tracks",children:e(b,{})}),e(i.Route,{title:"Entities",path:"/entities",children:e(x,{})}),e(i.Route,{title:"Teams",path:"/teams",children:e(R,{})})]})})})})})]})]})};export{w as TechHealth};
|
|
2
|
-
//# sourceMappingURL=TechHealth.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as s}from"react/jsx-runtime";import{createContext as n,useMemo as p,useContext as g}from"react";import"@backstage/catalog-model";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"@spotify/backstage-plugin-soundcheck-common";import"../../hooks/useSoundcheckAlert.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{useAggregatedCheckPassRateTrend as v}from"../../hooks/aggregations/useAggregatedCheckPassRateTrend.esm.js";import{useAggregatedTrackPassRateTrend as u}from"../../hooks/aggregations/useAggregatedTrackPassRateTrend.esm.js";import{useAggregatedEntityPassRateTrend as P}from"../../hooks/aggregations/useAggregatedEntityPassRateTrend.esm.js";import{useAggregatedGroupPassRateTrend as T}from"../../hooks/aggregations/useAggregatedGroupPassRateTrend.esm.js";import"react-router-dom";import"react-use/lib/useLocalStorage";import"../TechHealth/Filters/types.esm.js";import"../TechHealth/Filters/FacetFilter.esm.js";import{useFilterContext as c}from"../TechHealth/Filters/FilterProvider.esm.js";import"../TechHealth/Filters/Filters.esm.js";import"../TechHealth/Filters/FiltersHeader.esm.js";import"../TechHealth/Filters/FiltersSection.esm.js";import"lodash";import"../../contexts/TrackFormContext.esm.js";import"../../contexts/CheckFormContext.esm.js";import"../../contexts/CampaignFormContext.esm.js";import"../../contexts/UserProvider.esm.js";import{Loading as R}from"../TechHealth/Loading/Loading.esm.js";const a=n({checkPassRateTrend:{data:void 0,isLoading:!0,isError:!1},trackPassRateOverviewTrend:{data:void 0,isLoading:!0,isError:!1},entityPassRatesOverviewTrends:{data:void 0,isLoading:!0,isError:!1},groupPassRatesOverviewTrends:{data:void 0,isLoading:!0,isError:!1}}),f=()=>g(a),L=m=>{const{filter:r}=c(),t=v(r),e=u(r),i=P(r),o=T({filter:r,first:5}),d=p(()=>({checkPassRateTrend:t,trackPassRateOverviewTrend:e,entityPassRatesOverviewTrends:i,groupPassRatesOverviewTrends:o}),[t,e,i,o]);return t.isLoading||e.isLoading||i.isLoading||o.isLoading?s(R,{}):s(a.Provider,{...m,value:d})};export{L as SummaryAggregationsProvider,f as useSummaryAggregationsContext};
|
|
2
|
-
//# sourceMappingURL=SummaryAggregationsProvider.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as r,jsxs as t}from"react/jsx-runtime";import{Box as a}from"@material-ui/core";import{makeStyles as m}from"@material-ui/core/styles";import{CheckHistoryChartCard as e}from"../CheckHistoryChartCard/CheckHistoryChartCard.esm.js";import{EntityPassRateCard as i}from"../EntityPassRateCard/EntityPassRateCard.esm.js";import{GroupPassRateCard as s}from"../GroupPassRateCard/GroupPassRateCard.esm.js";import{TrackHistoryChartCard as c}from"../TrackHistoryChartCard/TrackHistoryChartCard.esm.js";import{SummaryAggregationsProvider as p}from"./SummaryAggregationsProvider.esm.js";const n=m(o=>({root:{display:"flex",flexDirection:"column",gap:o.spacing(2),flex:1,background:o.palette.background.default}})),f=()=>{const o=n();return r(a,{className:o.root,children:t(p,{children:[r(e,{}),r(c,{}),r(i,{}),r(s,{})]})})};export{f as TechHealthSummary};
|
|
2
|
-
//# sourceMappingURL=TechHealthSummary.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as t,Fragment as s}from"react/jsx-runtime";import{Button as r,Typography as n}from"@material-ui/core";import{useNavigate as c}from"react-router-dom";import{StyledTooltip as d}from"../StyledTooltip/StyledTooltip.esm.js";import{usePassRateTabStyles as m}from"./PassRateTabStyles.esm.js";const h=({navigateTo:o,disabled:e,toolTipText:a})=>{const i=m(),l=c();return o?a?t(d,{title:a,children:t("span",{children:t(r,{variant:"text",className:i.detailButton,onClick:()=>l(o),disabled:e,children:t(n,{style:e?{textDecoration:"line-through"}:{},className:i.ownerText,children:"View detail"})})})}):t(r,{variant:"text",className:i.detailButton,disabled:e,children:t(n,{style:e?{textDecoration:"line-through"}:{},className:i.ownerText,onClick:()=>l(o),children:"View detail"})}):t(s,{})};export{h as ActionColumn};
|
|
2
|
-
//# sourceMappingURL=ActionColumn.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as a,jsxs as G}from"react/jsx-runtime";import{useRouteRef as I}from"@backstage/core-plugin-api";import{Typography as T,Box as M,Grid as S}from"@material-ui/core";import{useState as i,useEffect as A,useMemo as B}from"react";import"@backstage/catalog-model";import"@tanstack/react-query";import"../../../api.esm.js";import"../../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"@spotify/backstage-plugin-soundcheck-common";import"../../../hooks/useSoundcheckAlert.esm.js";import{useGetCampaigns as D}from"../../../hooks/campaigns/useGetCampaigns.esm.js";import"../../../hooks/useConfirmationModal.esm.js";import{useTrackPassRateTrend as F}from"../../../hooks/aggregations/useTrackPassRateTrend.esm.js";import"react-router-dom";import"react-use/lib/useLocalStorage";import{campaignDetailsRouteRef as N}from"../../../routes.esm.js";import{campaignTrackPassRatesCsvFilename as j}from"../../../utils/charts.esm.js";import{PassRateGrid as V}from"../../PassRateGrid/PassRateGrid.esm.js";import"../../PassRateGrid/types.esm.js";import{PassRateTable as H}from"../../PassRateTable/PassRateTable.esm.js";import"../../PassRateTable/types.esm.js";import"../../TechHealth/Filters/types.esm.js";import"../../TechHealth/Filters/FacetFilter.esm.js";import{useFilterContext as q}from"../../TechHealth/Filters/FilterProvider.esm.js";import"../../TechHealth/Filters/Filters.esm.js";import"../../TechHealth/Filters/FiltersHeader.esm.js";import"../../TechHealth/Filters/FiltersSection.esm.js";import"lodash";import"../../../contexts/TrackFormContext.esm.js";import"../../../contexts/CheckFormContext.esm.js";import"../../../contexts/CampaignFormContext.esm.js";import"../../../contexts/UserProvider.esm.js";import{Loading as z}from"../../TechHealth/Loading/Loading.esm.js";import{PassRateTabHeader as J}from"../PassRateTabHeader.esm.js";import{usePassRateTabStyles as K}from"../PassRateTabStyles.esm.js";import{trackPassRatesToCsv as O}from"../TechHealthExportFunctions.esm.js";import{ViewMode as u,generateTrackPassRateGridData as Q}from"../techHealthTabUtils.esm.js";import{generateColumns as U}from"../TrackResultsTab/TrackResultsTab.esm.js";const W=()=>{const h=K(),{filter:g}=q(),m=I(N),{data:k}=D({orderAlphabetical:"default",searchByStatus:"active"}),t=k?.edges.map(r=>r.node)?.map(({id:r,track:f})=>({campaignId:r,trackId:f.id})),P=t?.map(({trackId:r})=>({trackId:r})),{data:s,isLoading:R,isError:v}=F({...g,tracks:P,trackTypes:{included:["campaign"]}}),[p,C]=i(u.TABLE),[e,w]=i(""),[c,n]=i(0),[d,b]=i(10);A(()=>{n(0)},[g,e]);const L=B(()=>U(s?.individualTrackPassRate??[],void 0,m,t),[s?.individualTrackPassRate,m,t]);if(R)return a(z,{});if(v)return a(T,{color:"error",children:"Failed to load campaign tracks"});const{individualTrackPassRate:l}=s;if(!l)return a(T,{color:"error",children:"No available campaign tracks"});const o=e.length?l.filter(({trackName:r})=>r?.toLowerCase()?.includes(e.toLowerCase())):l,y=async()=>O(o,t),x=(r,f)=>{n(()=>f)},E=r=>{b(+r.target.value),n(0)};return a(M,{className:h.root,children:G(S,{container:!0,direction:"row",children:[a(J,{viewMode:p,setViewMode:C,isLoading:R,searchTerm:e,setSearchTerm:w,searchPlaceholder:"Search Available Campaigns",fetchCsvData:y,csvFilename:j}),p===u.TABLE&&a(H,{data:o,columns:L}),p===u.GRID&&a(V,{data:Q(o.slice(c*d,(c+1)*d),void 0,m,t),totalCount:o?.length??0,page:c,rowsPerPage:d,onPageChange:x,onRowsPerPageChange:E})]})})};export{W as CampaignResultsTab};
|
|
2
|
-
//# sourceMappingURL=CampaignResultsTab.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as r,jsxs as L}from"react/jsx-runtime";import{useRouteRef as N}from"@backstage/core-plugin-api";import{Typography as R,Box as E,Grid as A}from"@material-ui/core";import{useState as m,useEffect as D}from"react";import"@backstage/catalog-model";import"@tanstack/react-query";import"../../../api.esm.js";import"../../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"@spotify/backstage-plugin-soundcheck-common";import"../../../hooks/useSoundcheckAlert.esm.js";import"../../../hooks/useConfirmationModal.esm.js";import{useCheckPassRateTrend as x}from"../../../hooks/aggregations/useCheckPassRateTrend.esm.js";import"react-router-dom";import"react-use/lib/useLocalStorage";import{checkDetailsRouteRef as y}from"../../../routes.esm.js";import{checkPassRatesCsvFilename as M}from"../../../utils/charts.esm.js";import{PassRateGrid as O}from"../../PassRateGrid/PassRateGrid.esm.js";import"../../PassRateGrid/types.esm.js";import{PassRateTable as S}from"../../PassRateTable/PassRateTable.esm.js";import"../../PassRateTable/types.esm.js";import"../../TechHealth/Filters/types.esm.js";import"../../TechHealth/Filters/FacetFilter.esm.js";import{useFilterContext as F}from"../../TechHealth/Filters/FilterProvider.esm.js";import"../../TechHealth/Filters/Filters.esm.js";import"../../TechHealth/Filters/FiltersHeader.esm.js";import"../../TechHealth/Filters/FiltersSection.esm.js";import"lodash";import"../../../contexts/TrackFormContext.esm.js";import"../../../contexts/CheckFormContext.esm.js";import"../../../contexts/CampaignFormContext.esm.js";import"../../../contexts/UserProvider.esm.js";import{Loading as G}from"../../TechHealth/Loading/Loading.esm.js";import{NameColumn as B}from"../NameColumn.esm.js";import{ActionColumn as I}from"../ActionColumn.esm.js";import{OwnerColumn as j}from"../OwnerColumn.esm.js";import{checkPassRatesToCsv as V}from"../TechHealthExportFunctions.esm.js";import{PassRateTabHeader as H}from"../PassRateTabHeader.esm.js";import{usePassRateTabStyles as J}from"../PassRateTabStyles.esm.js";import{ViewMode as C,generateCheckPassRateGridData as W}from"../techHealthTabUtils.esm.js";import"recharts";import"../../Charts/ChartTypes.esm.js";import"../../Charts/LineChart/LineChart.esm.js";import"../../Charts/chartUtils.esm.js";import"luxon";import"../../TechHealthSummary/SummaryAggregationsProvider.esm.js";import"../../Charts/BarChart/BarChart.esm.js";import"../../PassRateTable/NewPassRateTable.esm.js";import{MostRecentColumn as q}from"../MostRecentColumn.esm.js";import{CheckTrendColumn as z}from"./CheckTrendColumn.esm.js";function K(s){return[{label:"NAME",id:"checkName",renderCell:e=>r(B,{name:e.checkName??e.id,description:e.checkDescription})},{label:"LATEST",id:"snapshotPassRate",renderCell:e=>r(q,{snapshot:e.snapshotPassRate})},{label:"TREND",id:"trendPassRate",renderCell:e=>r(z,{row:e})},{label:"OWNER",id:"checkOwner",renderCell:e=>r(j,{ownerEntityRef:e.checkOwnerRef??void 0})},{label:"ACTION",id:"action",renderCell:(e,t,n)=>r(I,{navigateTo:s({checkId:e.id}),disabled:t,toolTipText:n})}]}const Q=()=>{const s=J(),{filter:e}=F(),t=N(y),{data:n,isLoading:u,isError:k}=x(e),[c,P]=m(C.TABLE),[o,T]=m(""),[l,p]=m(0),[d,w]=m(10);if(D(()=>{p(0)},[e,o]),u)return r(G,{});if(k)return r(R,{color:"error",children:"Failed to load checks"});const{individualCheckPassRates:h}=n;if(!h)return r(R,{color:"error",children:"No available checks"});const i=o.length?h.filter(({id:a,checkName:f})=>f?.toLowerCase()?.includes(o.toLowerCase())||a.toLowerCase().includes(o.toLowerCase())):h,g=async()=>V(i),b=(a,f)=>{p(()=>f)},v=a=>{w(+a.target.value),p(0)};return r(E,{className:s.root,children:L(A,{container:!0,direction:"row",children:[r(H,{viewMode:c,setViewMode:P,isLoading:u,searchTerm:o,setSearchTerm:T,searchPlaceholder:"Search for Available Checks",fetchCsvData:g,csvFilename:M}),c===C.TABLE&&r(S,{data:i,columns:K(t),showsCheckData:!0}),c===C.GRID&&r(O,{data:W(i.slice(l*d,(l+1)*d),t),totalCount:i?.length??0,page:l,rowsPerPage:d,onPageChange:b,onRowsPerPageChange:v})]})})};export{Q as CheckResultsTab};
|
|
2
|
-
//# sourceMappingURL=CheckResultsTab.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{Box as a}from"@material-ui/core";import"recharts";import{convertPassRateToDataPoints as s}from"../../Charts/ChartTypes.esm.js";import"../../Charts/LineChart/LineChart.esm.js";import"../../Charts/chartUtils.esm.js";import{PassRateHistoryLineChart as e}from"../../Charts/LineChart/PassRateHistoryLineChart.esm.js";import"luxon";import"../../TechHealthSummary/SummaryAggregationsProvider.esm.js";import"@backstage/catalog-model";import"../../Charts/BarChart/BarChart.esm.js";import{usePassRateTabStyles as i}from"../PassRateTabStyles.esm.js";const p=({row:o})=>{const r=i(),m=s(o.trendPassRates??[]);return t(a,{className:r.flexColumn,children:t(e,{chartData:m,tableChart:!0})})};export{p as CheckTrendColumn};
|
|
2
|
-
//# sourceMappingURL=CheckTrendColumn.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as t,jsxs as j}from"react/jsx-runtime";import{parseEntityRef as N}from"@backstage/catalog-model";import{useApi as V,useRouteRef as H}from"@backstage/core-plugin-api";import{entityRouteRef as W}from"@backstage/plugin-catalog-react";import{Typography as L,Box as $,Grid as q}from"@material-ui/core";import{useState as a,useEffect as A}from"react";import{soundcheckApiRef as z}from"../../../api.esm.js";import"@tanstack/react-query";import"../../../hooks/graphqlKeys.esm.js";import"@spotify/backstage-plugin-soundcheck-common";import"../../../hooks/useSoundcheckAlert.esm.js";import"../../../hooks/useConfirmationModal.esm.js";import{useEntityPassRateTrend as J}from"../../../hooks/aggregations/useEntityPassRateTrend.esm.js";import"react-router-dom";import"react-use/lib/useLocalStorage";import{entityPassRatesCsvFilename as K}from"../../../utils/charts.esm.js";import{PassRateGrid as Q}from"../../PassRateGrid/PassRateGrid.esm.js";import"../../PassRateGrid/types.esm.js";import{NewPassRateTable as U}from"../../PassRateTable/NewPassRateTable.esm.js";import"../../TechHealth/Filters/types.esm.js";import"../../TechHealth/Filters/FacetFilter.esm.js";import{useFilterContext as X}from"../../TechHealth/Filters/FilterProvider.esm.js";import"../../TechHealth/Filters/Filters.esm.js";import"../../TechHealth/Filters/FiltersHeader.esm.js";import"../../TechHealth/Filters/FiltersSection.esm.js";import"lodash";import"../../../contexts/TrackFormContext.esm.js";import"../../../contexts/CheckFormContext.esm.js";import"../../../contexts/CampaignFormContext.esm.js";import"../../../contexts/UserProvider.esm.js";import{Loading as Y}from"../../TechHealth/Loading/Loading.esm.js";import{ActionColumn as Z}from"../ActionColumn.esm.js";import{MostRecentColumn as _}from"../MostRecentColumn.esm.js";import{NameColumn as ee}from"../NameColumn.esm.js";import{OwnerColumn as te}from"../OwnerColumn.esm.js";import{PassRateTabHeader as oe}from"../PassRateTabHeader.esm.js";import{usePassRateTabStyles as re}from"../PassRateTabStyles.esm.js";import{entityPassRatesToCsv as ie}from"../TechHealthExportFunctions.esm.js";import{ViewMode as g,generateEntityPassRateGridData as ae}from"../techHealthTabUtils.esm.js";import{EntityTrendColumn as se}from"./EntityTrendColumn.esm.js";function ne(l){return[{label:"NAME",id:"entityName",renderCell:({id:o,entityDescription:s})=>t(ee,{name:N(o).name,description:s})},{label:"LATEST",id:"latest",renderCell:o=>t(_,{snapshot:o.snapshotPassRate})},{label:"TREND",id:"trend",renderCell:o=>t(se,{row:o})},{label:"OWNER",id:"entityOwnerRef",renderCell:({entityOwnerRef:o})=>t(te,{ownerEntityRef:o??void 0})},{label:"ACTION",id:"action",renderCell:({id:o})=>t(Z,{navigateTo:`${l(N(o))}/soundcheck`})}]}const de=()=>{const l=re(),o=V(z),{filter:s}=X(),c=H(W),[P,R]=a([]),[C,n]=a(void 0),[h,p]=a(0),[u,x]=a(10),{data:r,isLoading:y,isError:I}=J({filter:s,first:u,after:C}),[i,D]=a(r?.individualEntityPassRates),S=i?.edges?i?.edges[i?.edges.length-1]:{cursor:""};A(()=>{r&&D(()=>({totalCount:r.individualEntityPassRates.totalCount,edges:r.individualEntityPassRates.edges,pageInfo:{endCursor:r.individualEntityPassRates.pageInfo.endCursor,hasNextPage:r.individualEntityPassRates.pageInfo.hasNextPage??!1,hasPreviousPage:r.individualEntityPassRates.pageInfo.hasPreviousPage??!1}}))},[r]);const[f,F]=a(g.TABLE),[d,G]=a("");if(A(()=>{p(0),n("")},[s]),y)return t(Y,{});if(I)return t(L,{color:"error",children:"Failed to load entities"});if(!i?.edges?.length)return t(L,{color:"error",children:"No available entities"});const v=d.length?{...i,edges:i.edges.filter(({node:e})=>e.id.toLowerCase().includes(d.toLowerCase())),totalCount:i.edges.filter(({node:e})=>e.id.toLowerCase().includes(d.toLowerCase())).length}:i,E=v?.edges.map(({node:e})=>e)??[],w=v?.totalCount??0,M=async()=>{const{individualEntityPassRates:e}=await o.getIndividualEntityPassRates({filter:s});return ie(e.edges.map(({node:m})=>m))},O=()=>{R(e=>[...e,C]),n(S?.cursor)},B=()=>{n(P[P.length-1]),R(e=>e.slice(0,-1))},T=(e,m)=>{p(k=>(m>k?O():B(),m))},b=e=>{n(void 0),x(+e.target.value),p(0)};return t($,{className:l.root,children:j(q,{container:!0,direction:"row",children:[t(oe,{viewMode:f,setViewMode:F,isLoading:y,searchTerm:d,setSearchTerm:G,searchPlaceholder:"Search available entities",fetchCsvData:M,csvFilename:K}),f===g.TABLE&&t(U,{data:E,totalCount:w,page:h,rowsPerPage:u,columns:ne(c),onPageChange:T,onRowsPerPageChange:b}),f===g.GRID&&t(Q,{data:ae(E,c),totalCount:w,page:h,rowsPerPage:u,onPageChange:T,onRowsPerPageChange:b})]})})};export{de as EntityResultsTab};
|
|
2
|
-
//# sourceMappingURL=EntityResultsTab.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{Box as m}from"@material-ui/core";import"recharts";import{convertPassRateToDataPoints as s}from"../../Charts/ChartTypes.esm.js";import"../../Charts/LineChart/LineChart.esm.js";import"../../Charts/chartUtils.esm.js";import{PassRateHistoryLineChart as e}from"../../Charts/LineChart/PassRateHistoryLineChart.esm.js";import"luxon";import"../../TechHealthSummary/SummaryAggregationsProvider.esm.js";import"@backstage/catalog-model";import"../../Charts/BarChart/BarChart.esm.js";import{usePassRateTabStyles as i}from"../PassRateTabStyles.esm.js";const p=({row:{trendPassRates:r}})=>{const o=i(),a=s(r??[]);return t(m,{className:o.flexColumn,children:t(e,{chartData:a,tableChart:!0})})};export{p as EntityTrendColumn};
|
|
2
|
-
//# sourceMappingURL=EntityTrendColumn.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as o,jsxs as k}from"react/jsx-runtime";import{parseEntityRef as L}from"@backstage/catalog-model";import{useApi as H,useRouteRef as O}from"@backstage/core-plugin-api";import{entityRouteRef as q}from"@backstage/plugin-catalog-react";import{Typography as x,Box as z,Grid as J}from"@material-ui/core";import{useState as s,useEffect as A}from"react";import{soundcheckApiRef as K}from"../../../api.esm.js";import"@tanstack/react-query";import"../../../hooks/graphqlKeys.esm.js";import"@spotify/backstage-plugin-soundcheck-common";import"../../../hooks/useSoundcheckAlert.esm.js";import"../../../hooks/useConfirmationModal.esm.js";import{useGroupPassRateTrend as Q}from"../../../hooks/aggregations/useGroupPassRateTrend.esm.js";import"react-router-dom";import"react-use/lib/useLocalStorage";import{groupPassRatesCsvFilename as U}from"../../../utils/charts.esm.js";import{PassRateGrid as W}from"../../PassRateGrid/PassRateGrid.esm.js";import"../../PassRateGrid/types.esm.js";import{NewPassRateTable as X}from"../../PassRateTable/NewPassRateTable.esm.js";import"../../TechHealth/Filters/types.esm.js";import"../../TechHealth/Filters/FacetFilter.esm.js";import{useFilterContext as Y}from"../../TechHealth/Filters/FilterProvider.esm.js";import"../../TechHealth/Filters/Filters.esm.js";import"../../TechHealth/Filters/FiltersHeader.esm.js";import"../../TechHealth/Filters/FiltersSection.esm.js";import"lodash";import"../../../contexts/TrackFormContext.esm.js";import"../../../contexts/CheckFormContext.esm.js";import"../../../contexts/CampaignFormContext.esm.js";import"../../../contexts/UserProvider.esm.js";import{Loading as Z}from"../../TechHealth/Loading/Loading.esm.js";import{ActionColumn as _}from"../ActionColumn.esm.js";import{MostRecentColumn as $}from"../MostRecentColumn.esm.js";import{NameColumn as ee}from"../NameColumn.esm.js";import{PassRateTabHeader as oe}from"../PassRateTabHeader.esm.js";import{usePassRateTabStyles as re}from"../PassRateTabStyles.esm.js";import{groupPassRatesToCsv as te}from"../TechHealthExportFunctions.esm.js";import{ViewMode as f,generateGroupPassRateGridData as ae}from"../techHealthTabUtils.esm.js";import{GroupTrendColumn as se}from"./GroupTrendColumn.esm.js";function ie(l){return[{label:"NAME",id:"groupName",renderCell:({groupTitle:r,id:i})=>o(ee,{name:r??L(i).name})},{label:"LATEST",id:"latest",renderCell:r=>o($,{snapshot:r.snapshotPassRate})},{label:"TREND",id:"trend",renderCell:r=>o(se,{row:r})},{label:"ACTION",id:"action",renderCell:({id:r})=>o(_,{navigateTo:l(L(r))})}]}const ne=()=>{const l=re(),r=H(K),{filter:i}=Y();i.context=void 0;const c=O(q),[P,R]=s([]),[C,n]=s(void 0),[h,d]=s(0),[u,E]=s(10),{data:t,isLoading:T,isError:I}=Q({filter:i,first:u,after:C}),[a,y]=s(t?.groupPassRates),S=a?.edges?a?.edges[a?.edges.length-1]:{cursor:""};A(()=>{t&&y(()=>({totalCount:t.groupPassRates.totalCount,edges:t.groupPassRates.edges,pageInfo:{endCursor:t.groupPassRates.pageInfo.endCursor,hasNextPage:t.groupPassRates.pageInfo.hasNextPage??!1,hasPreviousPage:t.groupPassRates.pageInfo.hasPreviousPage??!1}}))},[t]);const[g,D]=s(f.TABLE),[m,F]=s("");if(A(()=>{d(0),n("")},[i]),T)return o(Z,{});if(I)return o(x,{color:"error",children:"Failed to load groups"});if(!a?.edges?.length)return o(x,{color:"error",children:"No available groups"});const v=m.length?{...a,edges:a.edges.filter(({node:e})=>e.groupTitle?.toLowerCase()?.includes(m.toLowerCase())||e.id.toLowerCase().includes(m.toLowerCase()))}:a,w=v?.edges.map(({node:e})=>e)??[],b=v?.totalCount??0,M=async()=>{const{groupPassRates:e}=await r.getIndividualGroupPassRates({filter:i});return te(e.edges.map(({node:p})=>p))},B=()=>{R(e=>[...e,C]),n(S?.cursor)},V=()=>{n(P[P.length-1]),R(e=>e.slice(0,-1))},N=(e,p)=>{d(j=>(p>j?B():V(),p))},G=e=>{n(void 0),E(+e.target.value),d(0)};return o(z,{className:l.root,children:k(J,{container:!0,direction:"row",children:[o(oe,{viewMode:g,setViewMode:D,isLoading:T,searchTerm:m,setSearchTerm:F,searchPlaceholder:"Search available teams",csvFilename:U,fetchCsvData:M}),g===f.TABLE&&o(X,{data:w,totalCount:b,page:h,rowsPerPage:u,columns:ie(c),onPageChange:N,onRowsPerPageChange:G}),g===f.GRID&&o(W,{data:ae(w,c),totalCount:b,page:h,rowsPerPage:u,onPageChange:N,onRowsPerPageChange:G})]})})};export{ne as GroupResultsTab};
|
|
2
|
-
//# sourceMappingURL=GroupResultsTab.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as r}from"react/jsx-runtime";import{Box as a,Typography as e}from"@material-ui/core";import"recharts";import{convertPassRateToDataPoints as s}from"../../Charts/ChartTypes.esm.js";import"../../Charts/LineChart/LineChart.esm.js";import"../../Charts/chartUtils.esm.js";import{PassRateHistoryLineChart as i}from"../../Charts/LineChart/PassRateHistoryLineChart.esm.js";import"luxon";import"../../TechHealthSummary/SummaryAggregationsProvider.esm.js";import"@backstage/catalog-model";import"../../Charts/BarChart/BarChart.esm.js";import{usePassRateTabStyles as p}from"../PassRateTabStyles.esm.js";const n=({row:{trendPassRates:m}})=>{const t=p(),o=s(m??[]);return o.length?r(a,{className:t.flexColumn,children:r(i,{chartData:o,tableChart:!0})}):r(a,{className:t.flexColumn,children:r(e,{children:"No data"})})};export{n as GroupTrendColumn};
|
|
2
|
-
//# sourceMappingURL=GroupTrendColumn.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as r,jsxs as t}from"react/jsx-runtime";import{Box as e,Typography as n}from"@material-ui/core";import{usePassRateTabStyles as m}from"./PassRateTabStyles.esm.js";const a=({snapshot:o})=>{const s=m();return r(e,{className:s.flexColumn,children:t(n,{children:[Math.round(o),"%"]})})};export{a as MostRecentColumn};
|
|
2
|
-
//# sourceMappingURL=MostRecentColumn.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsxs as m,jsx as t}from"react/jsx-runtime";import{Box as s,Typography as i}from"@material-ui/core";import{SoundcheckMarkdownContentDeprecated as n}from"../SoundcheckMarkdownContent/SoundcheckMarkdownContentDeprecated.esm.js";import"@backstage/core-components";import"react";import"react-markdown";import"rehype-raw";import"remark-gfm";import"../SoundcheckMarkdownContent/SoundcheckMarkdownContentBUI.esm.js";import{usePassRateTabStyles as p}from"./PassRateTabStyles.esm.js";const a=({name:r="",description:e=""})=>{const o=p();return m(s,{className:o.flexColumn,children:[t(i,{className:o.boldText,children:r}),t(n,{className:o.descriptionText,content:e??""})]})};export{a as NameColumn};
|
|
2
|
-
//# sourceMappingURL=NameColumn.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as n}from"react/jsx-runtime";import{stringifyEntityRef as a,parseEntityRef as l}from"@backstage/catalog-model";import{EntityRefLink as f}from"@backstage/plugin-catalog-react";import{makeStyles as m,Tooltip as p,Typography as y}from"@material-ui/core";import{useEntityByRef as s}from"../../hooks/catalog/useEntityByRef.esm.js";const d=e=>e?.kind==="Group",c=e=>e?.kind==="User",u=m(e=>({ownerLink:{"& span":{"&:hover":{textDecoration:"underline"}},fontSize:e.typography.body1.fontSize}})),h=({ownerEntityRef:e})=>{const{data:t,error:o}=s(e??void 0),i=u();if(t){let r;return d(t)||c(t)?r=t.metadata.title??t.spec.profile?.displayName:r=t.metadata.name,n(f,{entityRef:a(t),title:r,className:i.ownerLink})}else if(o&&e)return n(p,{title:"Unable to pull owner reference from Catalog API",children:n(y,{style:{color:"red"},variant:"body2",children:(()=>{try{return l(e).name}catch{return e}})()})});return null};export{h as OwnerColumn};
|
|
2
|
-
//# sourceMappingURL=OwnerColumn.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsxs as o,jsx as e}from"react/jsx-runtime";import{Grid as s,Button as I,Menu as w,MenuItem as z,ListItemIcon as M,ListItemText as N}from"@material-ui/core";import{makeStyles as E}from"@material-ui/core/styles";import G from"@material-ui/icons/Apps";import P from"@material-ui/icons/GridOn";import V from"@material-ui/icons/KeyboardArrowDown";import j from"@material-ui/icons/Reorder";import{ToggleButtonGroup as R,ToggleButton as h}from"@material-ui/lab";import{useRef as A,useState as u,useEffect as D}from"react";import{CSVLink as O}from"react-csv";import{SearchBar as W}from"../SearchBar/SearchBar.esm.js";import{ViewMode as g}from"./techHealthTabUtils.esm.js";const _=E(r=>({header:{padding:r.spacing(0,0,1),display:"flex"},headerButtons:{display:"flex",gap:r.spacing(1),flexWrap:"nowrap",justifyContent:"end",alignItems:"end"},exportButton:{height:"40px",width:"112px"},csvLink:{display:"none"},menuIconSize:{minWidth:r.spacing(4),color:r.palette.text.primary},menuList:{backgroundColor:r.palette.background.paper,color:r.palette.text.primary}})),F=({viewMode:r,setViewMode:f,isLoading:c,searchTerm:x,setSearchTerm:v,searchPlaceholder:b,fetchCsvData:S,csvFilename:k})=>{const t=_(),m=A(),B=(i,p)=>{p!==null&&f(p)},[d,n]=u(null),[a,C]=u([]),l=!!d,L=i=>{n(i.currentTarget)},T=()=>{n(null)},y=async()=>{n(null);const i=await S();C(i)};return D(()=>{a.length&&m?.current?.link.click()},[a]),o(s,{container:!0,spacing:2,className:t.header,children:[e(s,{item:!0,xs:6,children:e(W,{searchTerm:x,setSearchTerm:v,disabled:c,placeholder:b||"Search",variant:"outlined",size:"small"})}),o(s,{item:!0,xs:6,className:t.headerButtons,children:[e(I,{id:"export-button",className:t.exportButton,disabled:c,variant:"contained",color:"primary","aria-controls":l?"export-menu":void 0,"aria-haspopup":"true","aria-expanded":l?"true":void 0,onClick:L,endIcon:e(V,{}),children:"Export"}),e(O,{data:a,filename:k,className:t.csvLink,ref:m,target:"_blank"}),e(w,{id:"export-menu",anchorEl:d,getContentAnchorEl:null,open:l,onClose:T,MenuListProps:{"aria-labelledby":"export-button",disablePadding:!0,className:t.menuList},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:o(z,{onClick:y,children:[e(M,{color:"inherit",className:t.menuIconSize,children:e(P,{fontSize:"small"})}),e(N,{children:"CSV"})]})}),o(R,{size:"small",value:r,exclusive:!0,onChange:B,children:[e(h,{value:g.TABLE,title:"Table view",children:e(j,{color:"inherit"})}),e(h,{value:g.GRID,title:"Grid view",children:e(G,{color:"inherit"})})]})]})]})};export{F as PassRateTabHeader};
|
|
2
|
-
//# sourceMappingURL=PassRateTabHeader.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{makeStyles as t}from"@material-ui/core/styles";const o=t(e=>({root:{display:"flex",flexDirection:"column",flex:1,background:e.palette.background.default},ownerText:{fontWeight:500,color:e.palette.text.primary},flexColumn:{display:"flex",flexDirection:"column",gap:e.spacing(.5)},boldText:{fontWeight:"bold"},descriptionText:{maxWidth:400,color:e.palette.text.primary,fontSize:e.typography.subtitle2.fontSize,lineHeight:e.typography.subtitle1.fontSize},detailButton:{textTransform:"none",backgroundColor:"transparent",padding:0,textAlign:"left","&:hover":{textDecoration:"underline",transform:"scale(1)"}}}));export{o as usePassRateTabStyles};
|
|
2
|
-
//# sourceMappingURL=PassRateTabStyles.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{parseEntityRef as c}from"@backstage/catalog-model";import{DateTime as h}from"luxon";function s(a,t){const e=a;if(t){const n=h.utc();for(let o=t-1;o>=0;o--)e.push(n.minus({day:o}).toISODate())}return e}function r(a){if(!a)return 0;const t=a.map(e=>e.trendPassRates?.length??1);return Math.max(1,...t)}function u(a){const t=[];return t.push(s(["check_id","check_name","check_owner_ref"],r(a))),a?.length&&a.map(e=>{t.push([e.id,e.checkName,e.checkOwnerRef,...e.trendPassRates??[e.snapshotPassRate]])}),t}function p(a){const t=[];if(t.push(s(["entity_ref","entity_name","entity_owner_ref"],r(a))),a?.length)for(const e of a){const n=e.trendPassRates?.length?e.trendPassRates:[e.snapshotPassRate];t.push([e.id,c(e.id).name,e.entityOwnerRef??"",...n])}return t}function m(a){const t=[];return t.push(s(["team_ref","team_name"],r(a))),a?.length&&a.map(e=>{t.push([e.id,e.groupTitle??c(e.id).name,...e.trendPassRates??[e.snapshotPassRate]])}),t}function R(a,t,e){return e?[e.find(({trackId:n})=>n===a.id)?.campaignId??"",a.trackName,a.trackOwnerRef]:[a.id,a.trackName,a.trackOwnerRef,t.levelOrdinal,t.levelName??`Level ${t.levelOrdinal}`,...t.trendPassRates??[t.snapshotPassRate]]}function d(a,t){const e=[],n=a?.length?Math.max(...a.map(l=>r(l.levels))):0,o=t?["campaign_id","campaign_name","campaign_owner"]:["track_id","track_name","track_owner_ref","level_ordinal","level_name"];return e.push(s(o,n)),a?.length&&a.map(l=>{l.levels?.map(i=>{e.push(R(l,i,t))})}),e}function v(a){const t=[];return t.push(s(["name"],a?.overallCheckPassRates?.length??0)),a?.overallCheckPassRates?.length&&t.push(["Check Pass Rate",...a.overallCheckPassRates]),t}function P(a){const t=[];return t.push(s(["level_ordinal","level_name"],r(a?.overallTrackPassRate))),a?.overallTrackPassRate?.length&&a.overallTrackPassRate.map(e=>{t.push([e.levelOrdinal,`Level ${e.levelOrdinal}`,...e.trendPassRates??[e.snapshotPassRate]])}),t}function f(a){const t=[];return t.push(s(["entity_ref","entity_name"],r(a?.overallEntityPassRates))),a?.overallEntityPassRates?.length&&a.overallEntityPassRates.map(e=>{t.push([e.id,c(e.id).name,...e.trendPassRates??[0]])}),t}function g(a){const t=[];return t.push(s(["team_ref","team_name"],1)),a?.groupPassRates?.edges.length&&a?.groupPassRates?.edges.map(({node:e})=>{t.push([e.id,e.groupTitle??c(e.id).name,e.snapshotPassRate])}),t}export{u as checkPassRatesToCsv,p as entityPassRatesToCsv,s as getHeaderRowWithDates,r as getHistoryLength,m as groupPassRatesToCsv,v as overallCheckPassRateToCsv,f as overallEntityPassRatesToCsv,g as overallGroupPassRatesToCsv,P as overallTrackPassRatesToCsv,d as trackPassRatesToCsv};
|
|
2
|
-
//# sourceMappingURL=TechHealthExportFunctions.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsxs as t,jsx as m}from"react/jsx-runtime";import{Box as e,Typography as i}from"@material-ui/core";import"recharts";import{convertPassRateToDataPoints as p}from"../../Charts/ChartTypes.esm.js";import"../../Charts/LineChart/LineChart.esm.js";import"../../Charts/chartUtils.esm.js";import{PassRateHistoryLineChart as n}from"../../Charts/LineChart/PassRateHistoryLineChart.esm.js";import"luxon";import"../../TechHealthSummary/SummaryAggregationsProvider.esm.js";import"@backstage/catalog-model";import"../../Charts/BarChart/BarChart.esm.js";import{usePassRateTabStyles as c}from"../PassRateTabStyles.esm.js";const h=({row:{trendPassRates:r,snapshotPassRate:o}})=>{const a=c(),s=p(r??[]);return t(e,{className:a.flexColumn,children:[t(i,{children:[Math.round(o),"%"]}),m(n,{chartData:s,tableChart:!0})]})};export{h as TrackTrendColumn};
|
|
2
|
-
//# sourceMappingURL=TrackLevelTrendColumn.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as e,jsxs as N,Fragment as O}from"react/jsx-runtime";import{useRouteRef as A}from"@backstage/core-plugin-api";import{Typography as k,Box as x,Grid as y}from"@material-ui/core";import{useState as d,useEffect as D,useMemo as S}from"react";import"@backstage/catalog-model";import"@tanstack/react-query";import"../../../api.esm.js";import"../../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"@spotify/backstage-plugin-soundcheck-common";import"../../../hooks/useSoundcheckAlert.esm.js";import"../../../hooks/useConfirmationModal.esm.js";import{useTrackPassRateTrend as F}from"../../../hooks/aggregations/useTrackPassRateTrend.esm.js";import"react-router-dom";import"react-use/lib/useLocalStorage";import{trackDetailsRouteRef as G}from"../../../routes.esm.js";import{trackPassRatesCsvFilename as B}from"../../../utils/charts.esm.js";import{PassRateGrid as V}from"../../PassRateGrid/PassRateGrid.esm.js";import"../../PassRateGrid/types.esm.js";import{PassRateTable as j}from"../../PassRateTable/PassRateTable.esm.js";import"../../PassRateTable/types.esm.js";import"../../TechHealth/Filters/types.esm.js";import"../../TechHealth/Filters/FacetFilter.esm.js";import{useFilterContext as I}from"../../TechHealth/Filters/FilterProvider.esm.js";import"../../TechHealth/Filters/Filters.esm.js";import"../../TechHealth/Filters/FiltersHeader.esm.js";import"../../TechHealth/Filters/FiltersSection.esm.js";import"lodash";import"../../../contexts/TrackFormContext.esm.js";import"../../../contexts/CheckFormContext.esm.js";import"../../../contexts/CampaignFormContext.esm.js";import"../../../contexts/UserProvider.esm.js";import{Loading as $}from"../../TechHealth/Loading/Loading.esm.js";import{trackPassRatesToCsv as H}from"../TechHealthExportFunctions.esm.js";import{ActionColumn as W}from"../ActionColumn.esm.js";import{NameColumn as q}from"../NameColumn.esm.js";import{OwnerColumn as z}from"../OwnerColumn.esm.js";import{PassRateTabHeader as J}from"../PassRateTabHeader.esm.js";import{usePassRateTabStyles as K}from"../PassRateTabStyles.esm.js";import{ViewMode as h,generateTrackPassRateGridData as Q,getDetailsRoute as U}from"../techHealthTabUtils.esm.js";import{TrackTrendColumn as X}from"./TrackLevelTrendColumn.esm.js";const v=(m,s,o)=>{const i=Math.min(5,s-m+1);return Array.from({length:i}).map((n,l)=>{const a=m+l;return{label:o?"PROGRESS":`LEVEL ${a}`,id:`levels-${l}`,renderCell:r=>{const t=r.levels?.find(({levelOrdinal:f})=>f===a);return t?e(X,{row:t}):e(O,{})}}})},P=(m,s,o,i)=>{const n=m.flatMap(r=>r.levels?.map(t=>t.levelOrdinal)||[]),l=Math.min(...n),a=Math.max(...n);return[{label:"NAME",id:"trackName",renderCell:r=>e(q,{name:r.trackName??r.id,description:r.trackDescription})},...v(l,a,!!o),{label:"OWNER",id:"trackOwnerRef",renderCell:r=>e(z,{ownerEntityRef:r.trackOwnerRef??void 0})},{label:"ACTION",id:"action",renderCell:({id:r})=>e(W,{navigateTo:U(r,s,o,i)})}]},Y=()=>{const m=K(),{filter:s}=I(),o=A(G),{data:i,isLoading:n,isError:l}=F(s),[a,r]=d(h.TABLE),[t,f]=d(""),[u,R]=d(0),[T,w]=d(10);D(()=>{R(0)},[s,t]);const b=S(()=>P(i?.individualTrackPassRate??[],o),[i?.individualTrackPassRate,o]);if(n)return e($,{});if(l)return e(k,{color:"error",children:"Failed to load tracks"});const{individualTrackPassRate:C}=i;if(!C)return e(k,{color:"error",children:"No available tracks"});const c=t.length?C.filter(({id:p,trackName:g})=>g?.toLowerCase()?.includes(t.toLowerCase())||p.toLowerCase().includes(t.toLowerCase())):C,E=async()=>H(c),L=(p,g)=>{R(()=>g)},M=p=>{w(+p.target.value),R(0)};return e(x,{className:m.root,children:N(y,{container:!0,direction:"row",children:[e(J,{viewMode:a,setViewMode:r,isLoading:n,searchTerm:t,setSearchTerm:f,searchPlaceholder:"Search Available Tracks",fetchCsvData:E,csvFilename:B}),a===h.TABLE&&e(j,{data:c,columns:b}),a===h.GRID&&e(V,{data:Q(c.slice(u*T,(u+1)*T),o),totalCount:c?.length??0,page:u,rowsPerPage:T,onPageChange:L,onRowsPerPageChange:M})]})})};export{Y as TrackResultsTab,P as generateColumns,v as generateTrendColumns};
|
|
2
|
-
//# sourceMappingURL=TrackResultsTab.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{parseEntityRef as p}from"@backstage/catalog-model";import"react/jsx-runtime";import"recharts";import{convertPassRateToDataPoints as l}from"../Charts/ChartTypes.esm.js";import"../Charts/LineChart/LineChart.esm.js";import"@material-ui/core";import"../Charts/chartUtils.esm.js";import{formatLineChartData as P}from"../Charts/LineChart/TrackPassRateHistoryLineChart.esm.js";import"luxon";import"../TechHealthSummary/SummaryAggregationsProvider.esm.js";import"../Charts/BarChart/BarChart.esm.js";import"../PassRateGrid/PassRateGrid.esm.js";import{Trend as n}from"../PassRateGrid/types.esm.js";var m=(e=>(e[e.TABLE=0]="TABLE",e[e.GRID=1]="GRID",e))(m||{});function i(e){if(!e||!e.length)return n.FLAT;if(e.length===1)return e[0]>0?n.UP:n.FLAT;const t=e[e.length-1]-e[0];return t<0?n.DOWN:t>0?n.UP:n.FLAT}function u(e,t){return e.map(a=>({id:a.id,name:a.checkName??a.id,description:a.checkDescription??void 0,lineChart:{snapshotPassRates:[{value:a.snapshotPassRate,trend:i(a.trendPassRates??[])}],trendPassRates:l(a.trendPassRates??[])},owner:a.checkOwnerRef??void 0,navigateTo:t({checkId:a.id})}))}function h(e,t){return e.map(a=>({id:a.id,name:p(a.id).name,description:a.entityDescription??void 0,lineChart:{snapshotPassRates:[{value:a.snapshotPassRate,trend:i(a.trendPassRates??[])}],trendPassRates:l(a.trendPassRates??[])},owner:a.entityOwnerRef??void 0,navigateTo:`${t(p(a.id))}/soundcheck`}))}function f(e,t){return e.map(a=>({id:a.id,name:a.groupTitle??p(a.id).name,lineChart:{snapshotPassRates:[{value:a.snapshotPassRate,trend:i(a.trendPassRates??[])}],trendPassRates:l(a.trendPassRates??[])},navigateTo:t(p(a.id))}))}const c=(e,t,a,o)=>{if(t)return t({trackId:e});if(a&&o){const s=o.find(({trackId:r})=>r===e)?.campaignId;if(s)return a({campaignId:s})}};function g(e,t,a,o){return e.map(s=>({id:s.id,name:s.trackName??s.id,description:s.trackDescription??void 0,lineChart:{snapshotPassRates:s.levels?.map(({levelOrdinal:r,levelName:d,snapshotPassRate:R,trendPassRates:v})=>({name:d?`Level ${r} (${d})`:`Level ${r}`,value:R,trend:i(v??[])}))??[],trendPassRates:P({overallTrackPassRate:s.levels}),lineConfigs:s.levels?.map(({levelOrdinal:r,levelName:d})=>({dataKey:`Level${r}`,name:d??`Level ${r}`}))??[]},owner:s.trackOwnerRef??void 0,navigateTo:c(s.id,t,a,o)}))}export{m as ViewMode,i as calculateTrend,u as generateCheckPassRateGridData,h as generateEntityPassRateGridData,f as generateGroupPassRateGridData,g as generateTrackPassRateGridData,c as getDetailsRoute};
|
|
2
|
-
//# sourceMappingURL=techHealthTabUtils.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{trackPassRatesSummaryCsvFilename as m}from"../../utils/charts.esm.js";import"recharts";import"../Charts/ChartTypes.esm.js";import"../Charts/LineChart/LineChart.esm.js";import"@material-ui/core";import"../Charts/chartUtils.esm.js";import{TrackPassRateHistoryLineChart as i}from"../Charts/LineChart/TrackPassRateHistoryLineChart.esm.js";import"@backstage/catalog-model";import"luxon";import{useSummaryAggregationsContext as p}from"../TechHealthSummary/SummaryAggregationsProvider.esm.js";import"../Charts/BarChart/BarChart.esm.js";import{TrackSummaryBarChart as c}from"../Charts/BarChart/TrackSummaryBarChart.esm.js";import{OverviewChartCard as n}from"../OverviewChartCard/OverviewChartCard.esm.js";import"../OverviewChartCard/OverviewChartCardStyles.esm.js";import{overallTrackPassRatesToCsv as l}from"../TechHealthTabs/TechHealthExportFunctions.esm.js";const C=()=>{const{trackPassRateOverviewTrend:{data:r,isLoading:a,isError:o}}=p(),e=r?.overallTrackPassRate?.length,s=!r?.overallTrackPassRate||!e||a||o;return t(n,{title:"Track pass rate",subtitle:"Aggregate pass rate for tracks",summaryCardContent:t(c,{}),chartSectionContent:t(i,{}),disableDataExport:s,csvFilename:m,csvData:l(r)})};export{C as TrackHistoryChartCard};
|
|
2
|
-
//# sourceMappingURL=TrackHistoryChartCard.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{useApi as s}from"@backstage/core-plugin-api";import{useQuery as t}from"@tanstack/react-query";import{soundcheckApiRef as o}from"../../api.esm.js";import{QueryKeys as a}from"../graphqlKeys.esm.js";const c=e=>{const r=s(o);return t([a.GetOverallCheckPassRateTrends,e],async()=>r.getOverallCheckPassRates(e),{staleTime:720*60*1e3,refetchInterval:!1,refetchOnWindowFocus:!1})};export{c as useAggregatedCheckPassRateTrend};
|
|
2
|
-
//# sourceMappingURL=useAggregatedCheckPassRateTrend.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{useApi as r}from"@backstage/core-plugin-api";import{useQuery as s}from"@tanstack/react-query";import{soundcheckApiRef as o}from"../../api.esm.js";import{QueryKeys as n}from"../graphqlKeys.esm.js";const a=e=>{const t=r(o);return s([n.GetOverallEntityPassRateTrends,e],async()=>t.getOverallEntityPassRates(e),{staleTime:720*60*1e3,refetchInterval:!1,refetchOnWindowFocus:!1})};export{a as useAggregatedEntityPassRateTrend};
|
|
2
|
-
//# sourceMappingURL=useAggregatedEntityPassRateTrend.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{useApi as s}from"@backstage/core-plugin-api";import{useQuery as t}from"@tanstack/react-query";import{soundcheckApiRef as o}from"../../api.esm.js";import{QueryKeys as a}from"../graphqlKeys.esm.js";const u=e=>{const r=s(o);return t([a.GetOverallGroupPassRateTrends,e],async()=>r.getOverallGroupPassRates(e),{staleTime:720*60*1e3,refetchInterval:!1,refetchOnWindowFocus:!1})};export{u as useAggregatedGroupPassRateTrend};
|
|
2
|
-
//# sourceMappingURL=useAggregatedGroupPassRateTrend.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{useApi as t}from"@backstage/core-plugin-api";import{useQuery as s}from"@tanstack/react-query";import{soundcheckApiRef as a}from"../../api.esm.js";import{QueryKeys as o}from"../graphqlKeys.esm.js";const c=(e,n)=>{const r=t(a);return s([o.GetOverallTrackPassRateTrends,e],async()=>r.getOverallTrackPassRate(e),{staleTime:720*60*1e3,refetchInterval:!1,refetchOnWindowFocus:!1,enabled:!0})};export{c as useAggregatedTrackPassRateTrend};
|
|
2
|
-
//# sourceMappingURL=useAggregatedTrackPassRateTrend.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{useApi as s}from"@backstage/core-plugin-api";import{useQuery as t}from"@tanstack/react-query";import{soundcheckApiRef as o}from"../../api.esm.js";import{QueryKeys as i}from"../graphqlKeys.esm.js";const n=e=>{const r=s(o);return t([i.GetIndividualCheckPassRateTrends,e],async()=>r.getIndividualCheckPassRates(e),{staleTime:720*60*1e3,refetchInterval:!1,refetchOnWindowFocus:!1})};export{n as useCheckPassRateTrend};
|
|
2
|
-
//# sourceMappingURL=useCheckPassRateTrend.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{useApi as s}from"@backstage/core-plugin-api";import{useQuery as r}from"@tanstack/react-query";import{soundcheckApiRef as i}from"../../api.esm.js";import{QueryKeys as n}from"../graphqlKeys.esm.js";const o=e=>{const t=s(i);return r([n.GetIndividualEntityPassRateTrends,e],async()=>t.getIndividualEntityPassRates(e),{staleTime:720*60*1e3,refetchInterval:!1,refetchOnWindowFocus:!1})};export{o as useEntityPassRateTrend};
|
|
2
|
-
//# sourceMappingURL=useEntityPassRateTrend.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{useApi as s}from"@backstage/core-plugin-api";import{useQuery as o}from"@tanstack/react-query";import{soundcheckApiRef as t}from"../../api.esm.js";import{QueryKeys as u}from"../graphqlKeys.esm.js";const i=e=>{const r=s(t);return o([u.GetIndividualGroupPassRateTrends,e],async()=>r.getIndividualGroupPassRates(e),{staleTime:720*60*1e3,refetchInterval:!1,refetchOnWindowFocus:!1})};export{i as useGroupPassRateTrend};
|
|
2
|
-
//# sourceMappingURL=useGroupPassRateTrend.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{useApi as s}from"@backstage/core-plugin-api";import{useQuery as t}from"@tanstack/react-query";import{soundcheckApiRef as a}from"../../api.esm.js";import{QueryKeys as o}from"../graphqlKeys.esm.js";const i=e=>{const r=s(a);return t([o.GetIndividualTrackPassRateTrends,e],async()=>r.getIndividualTrackPassRate(e),{staleTime:720*60*1e3,refetchInterval:!1,refetchOnWindowFocus:!1})};export{i as useTrackPassRateTrend};
|
|
2
|
-
//# sourceMappingURL=useTrackPassRateTrend.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{useState as a,useEffect as r}from"react";import{useGetEntityCount as s}from"../catalog/useGetEntityCount.esm.js";let t=null,o=null;const d=900*1e3;function c(){const[i,l]=a(t===null),e=t===null||(o?Date.now()-o>d:!0),{data:n,isLoading:u}=s(e);return r(()=>{!u&&n!==void 0&&(t=n,o=Date.now()),l(!1)},[n,u,e]),{entityCount:t,loading:i}}export{c as useEntityCountCached};
|
|
2
|
-
//# sourceMappingURL=useEntityCountCached.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{useState as r,useEffect as s}from"react";import{useGetAllTracks as c}from"../tracks/useGetAllTracks.esm.js";let t=null,o=null;const i=900*1e3;function d(){const[a,u]=r(t===null),e=t===null||(o?Date.now()-o>i:!0),{data:n,isLoading:l}=c({},{enabled:e});return s(()=>{!l&&n!==void 0&&(t=n.totalCount,o=Date.now()),u(!1)},[n,l,e]),{trackCount:t,loading:a}}export{d as useTrackCountCached};
|
|
2
|
-
//# sourceMappingURL=useTrackCountCached.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{useApi as i}from"@backstage/core-plugin-api";import{catalogApiRef as s}from"@backstage/plugin-catalog-react";import{useQuery as m}from"@tanstack/react-query";import{useState as u}from"react";const a=(t=!1)=>{const r=i(s),[o,n]=u(0);return m(["GetEntityCount"],async()=>{if(!t)return o;const e=await r.queryEntities({limit:0});return n(e.totalItems),e.totalItems},{enabled:t,refetchOnWindowFocus:!1,refetchInterval:!1,staleTime:900*1e3})};export{a as useGetEntityCount};
|
|
2
|
-
//# sourceMappingURL=useGetEntityCount.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{useApi as s}from"@backstage/core-plugin-api";import{useQuery as a}from"@tanstack/react-query";import{useState as f}from"react";import{soundcheckApiRef as u}from"../../api.esm.js";import{QueryKeys as l}from"../graphqlKeys.esm.js";function m(e){const t=s(u),[o,i]=f(null),n=async()=>(await t.getEntityRefsForTechHealthFilter(e)).entityRefsForTechHealthFilter,r=a([l.GetSoftwareEntityRefsForUser,e],n,{retry:!1,onError:i,enabled:e!==null,staleTime:300*1e3,refetchInterval:!1,refetchOnWindowFocus:!1});return{data:r.data??[],isLoading:r.isLoading,error:o}}export{m as useEntityRefsForUser};
|
|
2
|
-
//# sourceMappingURL=useEntityRefsForUser.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{camelCase as p}from"lodash";import{useCallback as E,useEffect as y,useLayoutEffect as M}from"react";import{useSearchParams as v,useLocation as A,useNavigate as $}from"react-router-dom";import O from"react-use/lib/useLocalStorage";import{Facet as l}from"../../components/TechHealth/Filters/types.esm.js";import"../../components/TechHealth/Filters/FacetFilter.esm.js";import"../../components/TechHealth/Filters/FilterProvider.esm.js";import"../../components/TechHealth/Filters/Filters.esm.js";import"../../components/TechHealth/Filters/FiltersHeader.esm.js";import"../../components/TechHealth/Filters/FiltersSection.esm.js";import"@backstage/catalog-model";import"../../contexts/TrackFormContext.esm.js";import"../../contexts/CheckFormContext.esm.js";import"../../contexts/CampaignFormContext.esm.js";import"react/jsx-runtime";import"../../contexts/UserProvider.esm.js";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"../../api.esm.js";import"../graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"@spotify/backstage-plugin-soundcheck-common";import"../useSoundcheckAlert.esm.js";import"../useConfirmationModal.esm.js";import{emptyFacetFilters as h,DEFAULT_NUMBER_OF_DAYS as f,MIN_NUMBER_OF_DAYS as U,MAX_NUMBER_OF_DAYS as k}from"../../components/TechHealth/Filters/utils.esm.js";const B=(d,_)=>{const[a]=v(),c=A(),i=$(),g=_??d[l.EntityOwner][0]?.value,[r=h(g),n]=O("soundcheck.techHealth.facetFilters",h(g));r&&Object.values(l).forEach(t=>{r[t]||(r[t]=[])});const[m=f,u]=O("soundcheck.techHealth.numberOfDays",f),b=t=>!isNaN(t)&&t>=U&&t<=k,N=E((t,e)=>{const o={...r??h()};o[t]=e,n(o)},[r,n]);y(()=>{const t=a.get("days");if(t&&t!==m.toString()){const e=parseInt(t,10);u(b(e)?e:f)}},[]),y(()=>{const t=a.get("days");(!t||t!==m.toString())&&(a.set("days",m.toString()),i({pathname:c.pathname,search:`?${a.toString()}`}))},[m,a,c,i]),M(()=>{let t=!0;const e=r;Object.values(l).forEach(o=>{const s=a.get(p(o));s?(t=!1,e[o]=s.split(",")):e[o]=[]}),t||n(e)},[]),y(()=>{Object.values(l).forEach(t=>{const e=r[t].join(","),o=p(t);e.length&&a.get(o)!==e&&(a.set(o,e),i({pathname:c.pathname,search:`?${a.toString()}`}))})},[r,a,c,i,g]);const D=(t,e)=>{N(t,e);const o=p(t);if(e.length){const s=e.join(",");a.get(o)!==s&&a.set(o,s)}else a.delete(o);i({pathname:c.pathname,search:`?${a.toString()}`})},j=E((t,e)=>{const o={...r??h()};for(let s=0;s<t.length;s++)o[t[s]]=e[s];n(o)},[r,n]);return{setFacetFilter:D,setManyFacetFilters:(t,e)=>{j(t,e);for(let o=0;o<t.length;o++){const s=t[o],F=p(s);if(e[o].length){const S=e[o].join(",");a.get(F)!==S&&a.set(F,S)}else a.delete(F)}i({pathname:c.pathname,search:`?${a.toString()}`})},getFacetFilter:t=>r?r[t]:[],clearFacetFilters:()=>{u(f),n(h()),a.delete("days"),Object.values(l).forEach(t=>{a.delete(p(t))}),i({pathname:c.pathname,search:`?${a.toString()}`})},facetFilters:r,numberOfDays:m,setNumberOfDays:u}};export{B as useFacetFilters};
|
|
2
|
-
//# sourceMappingURL=useFacetFilters.esm.js.map
|