@spotify/backstage-plugin-soundcheck 0.16.0 → 0.16.2
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 +67 -0
- package/dist/alpha/entity-content.esm.js +1 -1
- package/dist/alpha/pages.esm.js +1 -1
- package/dist/alpha.d.ts +62 -47
- package/dist/api.esm.js +1 -1
- package/dist/components/AlertPanel/AlertPanel.esm.js +1 -1
- package/dist/components/AreaChart/AreaChart.esm.js +1 -1
- package/dist/components/AreaChart/ChartTooltip.esm.js +1 -1
- package/dist/components/AreaChart/Legend.esm.js +1 -1
- package/dist/components/AreaChart/LegendItem.esm.js +1 -1
- package/dist/components/Badges/BaseBadge.esm.js +1 -1
- package/dist/components/Badges/CampaignBadge.esm.js +1 -1
- package/dist/components/Badges/CertificationBadge.esm.js +1 -1
- package/dist/components/Badges/LevelBadge.esm.js +1 -1
- package/dist/components/Badges/NoLevelBadge.esm.js +2 -2
- package/dist/components/Badges/PlaylistBadge.esm.js +1 -1
- package/dist/components/Badges/StatusBadge.esm.js +1 -1
- package/dist/components/CacheConfig/CacheConfigComponent.esm.js +1 -1
- package/dist/components/CampaignCreatePage/CampaignCreatePage.esm.js +1 -1
- package/dist/components/CampaignForm/CampaignForm.esm.js +1 -1
- package/dist/components/CampaignForm/Steps/CampaignDetailsStep/CampaignDescriptionField.esm.js +1 -1
- package/dist/components/CampaignForm/Steps/CampaignDetailsStep/CampaignDetailsStep.esm.js +1 -1
- package/dist/components/CampaignForm/Steps/CampaignDetailsStep/CampaignDraftField.esm.js +2 -0
- package/dist/components/CampaignForm/Steps/CampaignDetailsStep/CampaignNameField.esm.js +1 -1
- package/dist/components/CampaignForm/Steps/CampaignDetailsStep/CampaignOwnerField.esm.js +1 -1
- package/dist/components/CampaignForm/Steps/CampaignDetailsStep/CampaignScheduleField.esm.js +1 -1
- package/dist/components/CampaignForm/Steps/CampaignDetailsStep/CampaignSupportChannelField.esm.js +1 -1
- package/dist/components/CampaignForm/Steps/CampaignDetailsStep/EndDateChips.esm.js +1 -1
- package/dist/components/CampaignForm/Steps/CampaignMilestonesStep.esm.js +1 -1
- package/dist/components/CampaignForm/Steps/CampaignTrackStepNew.esm.js +2 -0
- package/dist/components/CampaignForm/hooks/useCampaignForm.esm.js +1 -1
- package/dist/components/CampaignForm/hooks/utils.esm.js +1 -1
- package/dist/components/CampaignForm/utils/campaignFormUtils.esm.js +1 -1
- package/dist/components/CampaignForm/utils/validation.esm.js +1 -1
- package/dist/components/CampaignInsightsPage/CampaignInsightsPage.esm.js +1 -1
- package/dist/components/CampaignInsightsPage/CampaignStatusHistoryTile.esm.js +1 -1
- package/dist/components/CampaignInsightsPage/CampaignStatusTile.esm.js +1 -1
- package/dist/components/CampaignInsightsPage/DaysRemainingTile.esm.js +1 -1
- package/dist/components/CampaignsPage/CampaignEmptyState.esm.js +1 -1
- package/dist/components/CampaignsPage/CampaignListPage/CampaignListPage.esm.js +1 -1
- package/dist/components/CampaignsPage/CampaignListPage/CampaignMetadata.esm.js +1 -1
- package/dist/components/CampaignsPage/CampaignListPage/CampaignSummaryCard.esm.js +1 -1
- package/dist/components/CampaignsPage/CampaignListPage/CampaignsOverviewSkeleton.esm.js +1 -1
- package/dist/components/CampaignsPage/CampaignListPage/useArchiveConfirmationModal.esm.js +1 -1
- package/dist/components/CampaignsPage/CampaignsPage.esm.js +1 -1
- package/dist/components/CampaignsPage/EditCampaignView.esm.js +1 -1
- package/dist/components/CategoryBar/CategoryBar.esm.js +1 -1
- package/dist/components/CertificationAccordion/CertificationAccordion.esm.js +1 -1
- package/dist/components/CertificationSidebar/CertificationLevel.esm.js +1 -1
- package/dist/components/CertificationSidebar/CertificationSidebar.esm.js +1 -1
- package/dist/components/CertificationSidebar/CertificationSummary.esm.js +1 -1
- package/dist/components/CertificationSidebar/Check.esm.js +1 -1
- package/dist/components/CertificationSidebar/CheckResultInputPopup.esm.js +2 -0
- package/dist/components/CertificationSidebar/CheckResultSummaryList.esm.js +1 -1
- package/dist/components/CertificationSidebar/ExemptionJustificationDialog.esm.js +2 -0
- package/dist/components/CertificationSidebar/LevelSummary.esm.js +1 -1
- package/dist/components/CertificationSidebar/StatusDetails.esm.js +1 -1
- package/dist/components/CertificationSidebar/skeletons/CertificationSidebarSkeleton.esm.js +1 -1
- package/dist/components/CertificationSidebar/skeletons/CertificationSummarySkeleton.esm.js +1 -1
- package/dist/components/CertificationSidebar/skeletons/CheckSkeleton.esm.js +1 -1
- package/dist/components/CertificationSidebar/skeletons/LevelSummarySkeleton.esm.js +1 -1
- package/dist/components/CertificationsPage/CertificationTab.esm.js +1 -1
- package/dist/components/CertificationsPage/CertificationTabs.esm.js +1 -1
- package/dist/components/CertificationsPage/CertificationsPage.esm.js +1 -1
- package/dist/components/CertificationsPage/Playlist/PlaylistComponent.esm.js +1 -1
- package/dist/components/CertificationsPage/Playlist/PlaylistContext.esm.js +1 -1
- package/dist/components/CertificationsPage/Playlist/PlaylistProgress.esm.js +1 -1
- package/dist/components/CertificationsPage/Playlist/PlaylistSummary.esm.js +1 -1
- package/dist/components/CertificationsPage/PlaylistCertificationTab.esm.js +1 -1
- package/dist/components/CertificationsPage/skeletons/CertificationTabSkeleton.esm.js +1 -1
- package/dist/components/CertificationsPage/skeletons/CertificationTabsSkeleton.esm.js +1 -1
- package/dist/components/Charts/BarChart/BarChart.esm.js +1 -1
- package/dist/components/Charts/BarChart/BarChartPlaceholder.esm.js +1 -1
- package/dist/components/Charts/BarChart/GroupPassRateHistoryBarChart.esm.js +1 -1
- package/dist/components/Charts/BarChart/TrackSummaryBarChart.esm.js +1 -1
- package/dist/components/Charts/ChartWrapper/ChartWrapper.esm.js +1 -1
- package/dist/components/Charts/LineChart/EntityPassRateHistoryLineChart.esm.js +1 -1
- package/dist/components/Charts/LineChart/LineChart.esm.js +1 -1
- package/dist/components/Charts/LineChart/LineChartPlaceholder.esm.js +1 -1
- package/dist/components/Charts/LineChart/PassRateHistoryLineChart.esm.js +1 -1
- package/dist/components/Charts/LineChart/TableLineChart.esm.js +1 -1
- package/dist/components/Charts/LineChart/TrackPassRateHistoryLineChart.esm.js +1 -1
- package/dist/components/Charts/LoadingChart.esm.js +2 -0
- package/dist/components/Charts/chartUtils.esm.js +1 -1
- package/dist/components/CheckCard/CheckCard.esm.js +1 -1
- package/dist/components/CheckCard/CheckHistoryChart.esm.js +1 -1
- package/dist/components/CheckCreatePage/CheckCreatePage.esm.js +1 -1
- package/dist/components/CheckDetails/CheckDetails.esm.js +1 -1
- package/dist/components/CheckDetails/CheckResultDetails.esm.js +1 -1
- package/dist/components/CheckDetails/CollapseRow.esm.js +1 -1
- package/dist/components/CheckDetails/FactTable.esm.js +1 -1
- package/dist/components/CheckDetails/FixMeDialog.esm.js +1 -1
- package/dist/components/CheckDetails/JustificationDetails.esm.js +2 -0
- package/dist/components/CheckDetails/OngoingTaskComponent.esm.js +1 -1
- package/dist/components/CheckDetails/ResolvedValueTable.esm.js +1 -1
- package/dist/components/CheckDetails/ResultStateBox.esm.js +1 -1
- package/dist/components/CheckDetails/ReviewStateComponent.esm.js +1 -1
- package/dist/components/CheckDetails/SelectedValueContext.esm.js +1 -1
- package/dist/components/CheckDetails/skeletons/CheckDetailsSkeleton.esm.js +1 -1
- package/dist/components/CheckDryRun/CheckDryRun.esm.js +1 -1
- package/dist/components/CheckDryRun/CheckDryRunContext.esm.js +1 -1
- package/dist/components/CheckDryRun/CheckDryRunDetails.esm.js +1 -1
- package/dist/components/CheckDryRun/CheckDryRunDialog.esm.js +1 -1
- package/dist/components/CheckDryRun/CheckDryRunDialogButton.esm.js +1 -1
- package/dist/components/CheckForm/CheckForm.esm.js +1 -1
- package/dist/components/CheckForm/FormFields/CheckDescriptionInput/CheckDescriptionInput.esm.js +1 -1
- package/dist/components/CheckForm/FormFields/CheckNameInput/CheckNameInput.esm.js +1 -1
- package/dist/components/CheckForm/FormFields/CheckPathResolverInput.esm.js +1 -1
- package/dist/components/CheckForm/FormFields/CheckScheduleSection/ScheduleSection.esm.js +1 -1
- package/dist/components/CheckForm/FormFields/CheckTypeInput/CheckTypeInput.esm.js +2 -0
- package/dist/components/CheckForm/FormFields/PassFailMessageInput/PassFailMessageInput.esm.js +1 -1
- package/dist/components/CheckForm/FormFields/RuleInput/AddMenuButton.esm.js +1 -1
- package/dist/components/CheckForm/FormFields/RuleInput/Conditions/ConditionList.esm.js +1 -1
- package/dist/components/CheckForm/FormFields/RuleInput/Conditions/FactValueDisplay.esm.js +1 -1
- package/dist/components/CheckForm/FormFields/RuleInput/Conditions/RuleConditionInput.esm.js +1 -1
- package/dist/components/CheckForm/FormFields/RuleInput/Conditions/ValueListContext.esm.js +1 -1
- package/dist/components/CheckForm/FormFields/RuleInput/Conditions/ValueListInput.esm.js +1 -1
- package/dist/components/CheckForm/FormFields/RuleInput/Expressions/ExpressionBox.esm.js +1 -1
- package/dist/components/CheckForm/FormFields/RuleInput/Expressions/ExpressionTypeToggle.esm.js +1 -1
- package/dist/components/CheckForm/FormFields/RuleInput/RuleInputBox.esm.js +1 -1
- package/dist/components/CheckForm/FormFields/TeamDetailsInput/TeamDetailsInput.esm.js +1 -1
- package/dist/components/CheckForm/Steps/CheckApplicabilityStep.esm.js +2 -0
- package/dist/components/CheckForm/Steps/CheckDetailsStep.esm.js +1 -1
- package/dist/components/CheckForm/Steps/CheckReviewStep.esm.js +1 -1
- package/dist/components/CheckForm/Steps/CheckRulesStep.esm.js +1 -1
- package/dist/components/CheckForm/useCheckForm.esm.js +1 -1
- package/dist/components/CheckForm/utils/checkFormUtils.esm.js +2 -2
- package/dist/components/CheckForm/utils/validation.esm.js +1 -1
- package/dist/components/CheckHistoryChartCard/CheckHistoryChartCard.esm.js +1 -1
- package/dist/components/CheckIcon/CheckIcon.esm.js +1 -1
- package/dist/components/CheckPage/CheckEditPage.esm.js +1 -1
- package/dist/components/CheckPage/CheckEditView.esm.js +1 -1
- package/dist/components/CheckPage/CheckEntitiesTable/CheckEntitiesTable.esm.js +1 -1
- package/dist/components/CheckPage/CheckEntitiesTable/columns.esm.js +1 -1
- package/dist/components/CheckPage/CheckInsightsPage.esm.js +1 -1
- package/dist/components/CheckPage/CheckStatusHistoryChart.esm.js +1 -1
- package/dist/components/CheckPage/CheckStatusTable.esm.js +1 -1
- package/dist/components/CheckSelection/CheckPreview.esm.js +2 -0
- package/dist/components/CheckSelection/CheckPreviewContext.esm.js +2 -0
- package/dist/components/CheckSelection/CheckSelection.esm.js +2 -0
- package/dist/components/CheckStatusBar/CheckStatusBar.esm.js +2 -0
- package/dist/components/CheckTemplatesPage/CheckTemplatesPage.esm.js +1 -1
- package/dist/components/CheckTemplatesPage/TemplateCategory.esm.js +1 -1
- package/dist/components/ChecksPage/CheckListPage/CheckListPage.esm.js +1 -1
- package/dist/components/ChecksPage/CheckListPage/CheckMetadata.esm.js +1 -1
- package/dist/components/ChecksPage/CheckListPage/CheckSummaryCard.esm.js +1 -1
- package/dist/components/ChecksPage/ChecksPage.esm.js +1 -1
- package/dist/components/ChecksPage/skeletons/ChecksOverviewSkeleton.esm.js +1 -1
- package/dist/components/ChecksTab/ChecksTab.esm.js +1 -1
- package/dist/components/CollectorPage/CollectorPage.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/AzureDevOps/AzureDevOpsConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/AzureDevOps/NumberOfDaysComponent.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/AzureDevOps/NumberOfWorkItemsComponent.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/AzureDevOps/validation.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/BigQuery/BigQueryConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/BigQuery/QueryFactDetailsComponent.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/BigQuery/validation.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Catalog/CatalogConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Common/CollectorSchedulingOptions.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Common/FactCollectionConfig.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Common/utils.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Configurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/DataDog/DataDogConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/DataRegistry/DataRegistryConfigurator.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/DataRegistry/utils.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/Github/CodeScanningAlertsFactDetails.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/Github/DependabotAlertsFactDetails.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/Github/GithubConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Github/SecretScanningAlertsFactDetails.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/Github/SecurityAdvisoriesFactDetails.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/Github/types.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/Github/utils.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Github/validation.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/Gitlab/GitlabConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/HTTP/HttpConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/HTTP/HttpRequestComponent.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/HTTP/HttpResponseComponent.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/HTTP/HttpRetriesComponent.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/HTTP/HttpStatusesInput.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/HTTP/RequestFactDetailsComponent.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/HTTP/validation.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Jira/IssuesSearchFactDetailsComponent.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Jira/JiraConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Jira/validation.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Kubernetes/KubernetesConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Kubernetes/KubernetesFactDetails.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Kubernetes/validation.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/NewRelic/NewRelicConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/PagerDuty/IncidentsFactDetailsComponent.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/PagerDuty/PagerDutyConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/PagerDuty/StatusesComponent.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/PagerDuty/validation.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/SCM/ExistsFactDetailsComponent.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/SCM/FactDetailsComponent.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/SCM/JsonFactDetailsComponent.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/SCM/RegexFactDetailsComponent.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/SCM/ScmConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/SCM/utils.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/SCM/validation.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/SonarQube/IssuesFactDetailsInput.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/SonarQube/MeasuresFactDetailsInput.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/SonarQube/MetricsInput.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/SonarQube/SonarQubeConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/SonarQube/utils.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/SonarQube/validation.esm.js +1 -1
- package/dist/components/CollectorsPage/CollectorListPage/CollectorListPage.esm.js +1 -1
- package/dist/components/CollectorsPage/CollectorListPage/CollectorListSkeleton.esm.js +1 -1
- package/dist/components/CollectorsPage/CollectorListPage/CollectorLogo.esm.js +1 -1
- package/dist/components/CollectorsPage/CollectorListPage/CollectorSummaryCard.esm.js +1 -1
- package/dist/components/CollectorsPage/CollectorsPage.esm.js +1 -1
- package/dist/components/EmptyState/EmptyState.esm.js +1 -1
- package/dist/components/EntitiesAutocompletePicker/EntitiesAutocompletePicker.esm.js +2 -0
- package/dist/components/EntityChip/EntityChip.esm.js +1 -1
- package/dist/components/EntityContent/EntityContent.esm.js +1 -1
- package/dist/components/EntityPassRateCard/EntityPassRateCard.esm.js +1 -1
- package/dist/components/EntitySoundcheckCard/Card.esm.js +1 -1
- package/dist/components/EntitySoundcheckCard/EntitySoundcheckCard.esm.js +1 -1
- package/dist/components/EntitySoundcheckCard/skeletons/CardSkeleton.esm.js +1 -1
- package/dist/components/EntitySoundcheckContent.esm.js +1 -1
- package/dist/components/Expand/Expand.esm.js +1 -1
- package/dist/components/ExpandableSection/ExpandableSection.esm.js +1 -1
- package/dist/components/FactExplorer/FactExplorer.esm.js +1 -1
- package/dist/components/FactExplorer/FactExplorerContext.esm.js +1 -1
- package/dist/components/FactExplorer/FactExplorerDialog.esm.js +1 -1
- package/dist/components/FadeIn/FadeIn.esm.js +1 -1
- package/dist/components/Filter/EntityAutocompletePicker.esm.js +1 -1
- package/dist/components/Filter/FilterComponent.esm.js +1 -1
- package/dist/components/Filter/FilterKeyValueInput.esm.js +1 -1
- package/dist/components/Filter/FilterPreviewTable/EntityTableColumns.esm.js +1 -1
- package/dist/components/Filter/FilterPreviewTable/FilterPreviewTable.esm.js +1 -1
- package/dist/components/Filter/KeyValueInputDialog.esm.js +1 -1
- package/dist/components/FilterSidebar/FilterSidebar.esm.js +2 -0
- package/dist/components/FilterSidebar/StateFilter.esm.js +2 -0
- package/dist/components/FooterButtons/FooterButtons.esm.js +1 -1
- package/dist/components/FormControlledAutocomplete/ControlledAutocomplete.esm.js +1 -1
- package/dist/components/FormControlledAutocomplete/FormControlledAutocomplete.esm.js +1 -1
- package/dist/components/FormControlledAutocomplete/FormControlledMultipleAutocomplete.esm.js +2 -0
- package/dist/components/FormControlledSelect/FormControlledSelect.esm.js +1 -1
- package/dist/components/FormControlledTextField/FormControlledTextField.esm.js +1 -1
- package/dist/components/FormFieldLabel/FormFieldLabel.esm.js +1 -1
- package/dist/components/FormFilterSection/FormFilterSection.esm.js +1 -1
- package/dist/components/FormMarkdownInput/FormMarkdownInput.esm.js +1 -1
- package/dist/components/FormStepper/FormStepper.esm.js +1 -1
- package/dist/components/FormTextInput/FormTextInput.esm.js +1 -1
- package/dist/components/FormattedPreview/FormattedPreview.esm.js +2 -2
- package/dist/components/Frequency/FrequencyComponent.esm.js +1 -1
- package/dist/components/GroupPassRateCard/GroupPassRateCard.esm.js +1 -1
- package/dist/components/GroupSelector/GroupSelector.esm.js +1 -1
- package/dist/components/LevelUpParty/LevelUpParty.esm.js +1 -1
- package/dist/components/LevelsTable/CheckRowContent.esm.js +2 -0
- package/dist/components/LevelsTable/LevelsTable.esm.js +2 -0
- package/dist/components/ListboxVirtualized/ListboxVirtualized.esm.js +1 -1
- package/dist/components/LoadingIndicator/LoadingIndicator.esm.js +1 -1
- package/dist/components/MultiSelectFilter/MultiSelectFilter.esm.js +1 -1
- package/dist/components/NoBorderButton/NoBorderButton.esm.js +1 -1
- package/dist/components/OrgHealth/OrgHealthPage.esm.js +2 -0
- package/dist/components/OverviewChartCard/OverviewChartCard.esm.js +1 -1
- package/dist/components/OverviewPage/FixedGroupOverviewPage.esm.js +1 -1
- package/dist/components/OverviewPage/OverviewPage.esm.js +1 -1
- package/dist/components/OverviewPage/OverviewPageContent.esm.js +1 -1
- package/dist/components/OverviewPage/OverviewPageHeader.esm.js +1 -1
- package/dist/components/OverviewTable/Cell/CheckCell.esm.js +1 -1
- package/dist/components/OverviewTable/Cell/CheckCellTooltip.esm.js +1 -1
- package/dist/components/OverviewTable/Cell/CheckLabelCell.esm.js +1 -1
- package/dist/components/OverviewTable/Cell/CheckNameCell.esm.js +1 -1
- package/dist/components/OverviewTable/Cell/EntityRefCell.esm.js +1 -1
- package/dist/components/OverviewTable/Cell/TrackBadgeCell.esm.js +1 -1
- package/dist/components/OverviewTable/Cell/TrackCheckIndicator.esm.js +1 -1
- package/dist/components/OverviewTable/Cell/TrackLevelHeaderCell.esm.js +1 -1
- package/dist/components/OverviewTable/Cell/TrackTitleCell.esm.js +1 -1
- package/dist/components/OverviewTable/Cell/cellRenderer.esm.js +1 -1
- package/dist/components/OverviewTable/OverviewTable.esm.js +1 -1
- package/dist/components/OverviewTable/OverviewTableContent.esm.js +1 -1
- package/dist/components/OverviewTable/OverviewTableSkeleton.esm.js +1 -1
- package/dist/components/OverviewTable/ResultsTable.esm.js +1 -1
- package/dist/components/OverviewTable/ResultsTableHeader.esm.js +1 -1
- package/dist/components/OverviewTable/ResultsTableRow.esm.js +1 -1
- package/dist/components/PageWarningMessage/PageWarningMessage.esm.js +1 -1
- package/dist/components/Pagination/CursorPagination.esm.js +1 -1
- package/dist/components/Pagination/Pagination.esm.js +1 -1
- package/dist/components/PassRateGrid/PassRateGrid.esm.js +1 -1
- package/dist/components/PassRateGrid/PassRateMetadata.esm.js +1 -1
- package/dist/components/PassRateTable/NewPassRateTable.esm.js +1 -1
- package/dist/components/PassRateTable/PassRateTable.esm.js +2 -2
- package/dist/components/QuickstartPage/HowDoIListItem.esm.js +1 -1
- package/dist/components/QuickstartPage/QuickStartChecksCard.esm.js +1 -1
- package/dist/components/QuickstartPage/QuickstartCardBase.esm.js +1 -1
- package/dist/components/QuickstartPage/QuickstartCollectorConfigurationsCard.esm.js +1 -1
- package/dist/components/QuickstartPage/QuickstartPage.esm.js +1 -1
- package/dist/components/QuickstartPage/QuickstartTracksCard.esm.js +1 -1
- package/dist/components/QuickstartPage/WelcomeHelpSection.esm.js +6 -6
- package/dist/components/QuickstartPage/WelcomeModal.esm.js +1 -1
- package/dist/components/RefetchingIndicator/RefetchingIndicator.esm.js +1 -1
- package/dist/components/RelativeTime/RelativeTime.esm.js +1 -1
- package/dist/components/RichTooltip/RichTooltip.esm.js +1 -1
- package/dist/components/Router.esm.js +1 -1
- package/dist/components/RoutingPage/RoutingPage.esm.js +1 -1
- package/dist/components/RuleResult/BranchResultComponent.esm.js +1 -1
- package/dist/components/RuleResult/ConditionResultComponent.esm.js +1 -1
- package/dist/components/RuleResult/RuleResultComponent.esm.js +1 -1
- package/dist/components/SearchBar/SearchBar.esm.js +1 -1
- package/dist/components/SearchFilters/SearchFilters.esm.js +1 -1
- package/dist/components/SoundcheckDialog/SoundcheckDialog.esm.js +1 -1
- package/dist/components/SoundcheckHeader/Breadcrumbs.esm.js +1 -1
- package/dist/components/SoundcheckHeader/SoundcheckHeader.esm.js +1 -1
- package/dist/components/SoundcheckHeader/SoundcheckHeaderContext.esm.js +1 -1
- package/dist/components/SoundcheckHeader/headerUtil.esm.js +1 -1
- package/dist/components/SoundcheckMarkdownContent/ComponentRenders.esm.js +2 -0
- package/dist/components/SoundcheckMarkdownContent/SoundcheckMarkdownContent.esm.js +2 -0
- package/dist/components/SoundcheckQueryClientProvider/SoundcheckQueryClientProvider.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/useFacetOptions.esm.js +1 -1
- package/dist/components/TechHealth/Loading/Emoji.esm.js +1 -1
- package/dist/components/TechHealth/Loading/EmojiFountain.esm.js +1 -1
- package/dist/components/TechHealth/Loading/Loading.esm.js +1 -1
- package/dist/components/TechHealth/Loading/TechHealthLoading.esm.js +1 -1
- package/dist/components/TechHealth/TechHealth.esm.js +1 -1
- package/dist/components/TechHealthSummary/SummaryAggregationsProvider.esm.js +1 -1
- package/dist/components/TechHealthSummary/TechHealthSummary.esm.js +1 -1
- package/dist/components/TechHealthTabs/ActionColumn.esm.js +1 -1
- package/dist/components/TechHealthTabs/CampaignResultsTab/CampaignResultsTab.esm.js +1 -1
- package/dist/components/TechHealthTabs/CheckResultsTab/CheckResultsTab.esm.js +1 -1
- package/dist/components/TechHealthTabs/CheckResultsTab/CheckTrendColumn.esm.js +1 -1
- package/dist/components/TechHealthTabs/EntityResultsTab/EntityResultsTab.esm.js +1 -1
- package/dist/components/TechHealthTabs/EntityResultsTab/EntityTrendColumn.esm.js +1 -1
- package/dist/components/TechHealthTabs/GroupResultsTab/GroupResultsTab.esm.js +1 -1
- package/dist/components/TechHealthTabs/GroupResultsTab/GroupTrendColumn.esm.js +1 -1
- package/dist/components/TechHealthTabs/MostRecentColumn.esm.js +1 -1
- package/dist/components/TechHealthTabs/NameColumn.esm.js +1 -1
- package/dist/components/TechHealthTabs/OwnerColumn.esm.js +1 -1
- package/dist/components/TechHealthTabs/PassRateTabHeader.esm.js +1 -1
- package/dist/components/TechHealthTabs/TrackResultsTab/TrackLevelTrendColumn.esm.js +1 -1
- package/dist/components/TechHealthTabs/TrackResultsTab/TrackResultsTab.esm.js +1 -1
- package/dist/components/TechHealthTabs/techHealthTabUtils.esm.js +1 -1
- package/dist/components/TopFailingChecksTable/TopFailingChecksTable.esm.js +2 -0
- package/dist/components/TrackCreatePage/TrackCreatePage.esm.js +1 -1
- package/dist/components/TrackEditPage/TrackEditPage.esm.js +1 -1
- package/dist/components/TrackEditPage/TrackEditView.esm.js +1 -1
- package/dist/components/TrackForm/Steps/LevelsStep/LevelsStepNew.esm.js +2 -0
- package/dist/components/TrackForm/Steps/TrackDetailsStep/TrackBadgeTypeSelect/TrackBadgeTypeSelect.esm.js +1 -1
- package/dist/components/TrackForm/Steps/TrackDetailsStep/TrackDescriptionInput/TrackDescriptionInput.esm.js +1 -1
- package/dist/components/TrackForm/Steps/TrackDetailsStep/TrackDetailsStep.esm.js +1 -1
- package/dist/components/TrackForm/Steps/TrackDetailsStep/TrackDocumentationUrlInput/TrackDocumentationUrlInput.esm.js +1 -1
- package/dist/components/TrackForm/Steps/TrackDetailsStep/TrackDraftInput/TrackDraftInput.esm.js +2 -0
- package/dist/components/TrackForm/Steps/TrackDetailsStep/TrackNameInput/TrackNameInput.esm.js +1 -1
- package/dist/components/TrackForm/Steps/TrackDetailsStep/TrackOwnerSelect/TrackOwnerSelect.esm.js +1 -1
- package/dist/components/TrackForm/TrackForm.esm.js +1 -1
- package/dist/components/TrackForm/utils/useTrackForm.esm.js +1 -1
- package/dist/components/TrackHistoryChartCard/TrackHistoryChartCard.esm.js +1 -1
- package/dist/components/TrackPage/FilterBar/FilterBar.esm.js +1 -1
- package/dist/components/TrackPage/TrackEntitiesTable/TrackEntitiesTable.esm.js +1 -1
- package/dist/components/TrackPage/TrackEntitiesTable/TrackStatusChip.esm.js +1 -1
- package/dist/components/TrackPage/TrackEntitiesTable/columns.esm.js +1 -1
- package/dist/components/TrackPage/TrackEntitiesTable/utils.esm.js +1 -1
- package/dist/components/TrackPage/TrackHistoryChart.esm.js +1 -1
- package/dist/components/TrackPage/TrackPage.esm.js +1 -1
- package/dist/components/TrackPage/TrackProgressCard.esm.js +1 -1
- package/dist/components/TrackPage/TrackStatus.esm.js +2 -0
- package/dist/components/TrackPage/TrackStatusBar.esm.js +2 -0
- package/dist/components/TrackPage/TrackStatusTable.esm.js +2 -0
- package/dist/components/TracksPage/TrackListPage/TrackListPage.esm.js +1 -1
- package/dist/components/TracksPage/TrackListPage/TrackMetadata.esm.js +1 -1
- package/dist/components/TracksPage/TrackListPage/TrackSummaryCard.esm.js +1 -1
- package/dist/components/TracksPage/TrackListPage/TracksOverviewSkeleton.esm.js +1 -1
- package/dist/components/TracksPage/TracksPage.esm.js +1 -1
- package/dist/components/TracksTab/TracksTab.esm.js +1 -1
- package/dist/contexts/GenericFormContext.esm.js +1 -1
- package/dist/contexts/UserProvider.esm.js +1 -1
- package/dist/graphql/generated/index.esm.js +152 -65
- package/dist/hooks/aggregations/useCertificationStatus.esm.js +1 -1
- package/dist/hooks/aggregations/useCheckStatus.esm.js +1 -1
- package/dist/hooks/aggregations/useCheckStatuses.esm.js +1 -1
- package/dist/hooks/catalog/useGetEntityFacets.esm.js +1 -1
- package/dist/hooks/catalog/useGetEntityRefs.esm.js +1 -1
- package/dist/hooks/certifications/useAllCertifications.esm.js +1 -1
- package/dist/hooks/certifications/useCertificationDetails.esm.js +1 -1
- package/dist/hooks/certifications/useCertificationDetailsForTrack.esm.js +1 -1
- package/dist/hooks/checks/useCheck.esm.js +2 -0
- package/dist/hooks/checks/useDeleteCheck.esm.js +1 -1
- package/dist/hooks/checks/useGetChecks.esm.js +1 -1
- package/dist/hooks/checks/useSetManualResult.esm.js +2 -0
- package/dist/hooks/checks/useUpdateCheck.esm.js +1 -1
- package/dist/hooks/exemptions/useDeleteExemption.esm.js +2 -0
- package/dist/hooks/exemptions/useExemptCheckIds.esm.js +2 -0
- package/dist/hooks/exemptions/useGetExemption.esm.js +2 -0
- package/dist/hooks/exemptions/useSetEntityExempt.esm.js +2 -0
- package/dist/hooks/facets/useFacetFilters.esm.js +1 -1
- package/dist/hooks/graphqlKeys.esm.js +1 -1
- package/dist/hooks/tracks/useGetAllTracks.esm.js +1 -1
- package/dist/hooks/tracks/useTrack.esm.js +2 -0
- package/dist/hooks/tracks/useUpdateTrack.esm.js +1 -1
- package/dist/hooks/useConfirmationModal.esm.js +1 -1
- package/dist/hooks/useSoundcheckAlert.esm.js +1 -1
- package/dist/images/data-registry-blk.svg +36 -0
- package/dist/images/data-registry-wht.svg +36 -0
- package/dist/index.d.ts +4 -5
- package/dist/index.esm.js +1 -1
- package/dist/routes.esm.js +1 -1
- package/dist/utils/colors.esm.js +2 -0
- package/dist/utils/export.esm.js +3 -3
- package/dist/utils/formatters.esm.js +2 -0
- package/dist/utils/validation.esm.js +1 -1
- package/package.json +30 -26
- package/dist/components/Badges/badge.esm.js +0 -2
- package/dist/components/CampaignForm/Steps/CampaignTrackStep.esm.js +0 -2
- package/dist/components/CheckDetails/ExemptionDetails.esm.js +0 -2
- package/dist/components/CheckDryRun/checkDryRunUtils.esm.js +0 -2
- package/dist/components/CheckPage/CheckStatusBar.esm.js +0 -2
- package/dist/components/CheckPage/FilterBar/FilterBar.esm.js +0 -2
- package/dist/components/CheckPage/StatusRow.esm.js +0 -2
- package/dist/components/ChecksErrors/ChecksErrors.esm.js +0 -2
- package/dist/components/ContextMenu/ContextMenu.esm.js +0 -2
- package/dist/components/DraggableChip/DraggableChip.esm.js +0 -2
- package/dist/components/DraggableChip/chipStyles.esm.js +0 -2
- package/dist/components/DroppableInput/DroppableInput.esm.js +0 -2
- package/dist/components/LevelCard/LevelCard.esm.js +0 -2
- package/dist/components/LevelCard/LevelTooltip.esm.js +0 -2
- package/dist/components/TrackForm/Steps/LevelsStep/ChecksSection/ChecksSection.esm.js +0 -2
- package/dist/components/TrackForm/Steps/LevelsStep/LevelsSection/LevelChipsSection.esm.js +0 -2
- package/dist/components/TrackForm/Steps/LevelsStep/LevelsSection/LevelsSection.esm.js +0 -2
- package/dist/components/TrackForm/Steps/LevelsStep/LevelsStep.esm.js +0 -2
- package/dist/components/TrackPage/TrackLevelsChart.esm.js +0 -2
- package/dist/hooks/useContextMenu.esm.js +0 -2
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{FrequencySchema as
|
|
2
|
-
For example, selecting an include filter of 'Kind' as 'Component' and an exclude filter of 'Type' as 'Service' will select all entities with kind Component where type is NOT Service.`},schedule:{description:"Checks are automatically triggered whenever a dependent fact is updated. When collectors are scheduled, there is generally no need to schedule checks.",checkboxLabel:"Schedule check"}};export{K as CHECK_FIELDS,q as DEFAULT_FORM_VALUES,c as generateJsonPaths,V as mapCheckerToFormValues,
|
|
1
|
+
import{FrequencySchema as A}from"@spotify/backstage-plugin-soundcheck-common";import{isObject as C}from"lodash";import{v4 as R}from"uuid";import{mapInputFilterToFormFilters as x,mapCatalogFilterToFormKeyValueFilters as g,mapFiltersToCatalogFilter as m}from"../../Filter/utils.esm.js";import"../../Filter/FilterComponent.esm.js";import{emptyFilters as v,emptyKeyValueFilters as b}from"../../Filter/types.esm.js";import{TimeUnit as F}from"../../Frequency/types.esm.js";import{isTimeUnit as M}from"../../Frequency/util.esm.js";import"../../Frequency/FrequencyComponent.esm.js";import{ExpressionType as l}from"../types/ExpressionType.esm.js";import{defaultSchedule as O}from"../types/Schedule.esm.js";import"../types/Path.esm.js";import{CHECK_NAME_MAX_LENGTH as P}from"./validation.esm.js";const w=e=>{if(C(e)&&"frequency"in e){const r=A.safeParse(e.frequency);if(r.success){const t=r.data;if("cron"in t)return{enabled:!0,frequency:{type:"cron",unit:F.Hours,value:1,cron:t.cron}};const i=Object.keys(t);if(i.length){const s=i[0];if(M(s))return{enabled:!0,frequency:{type:"HumanDuration",unit:s,value:t[s]??1,cron:""}}}}}return{enabled:!1,frequency:{type:"HumanDuration",unit:F.Hours,value:1,cron:""}}},E=(e,r)=>{const{enabled:t,frequency:i}=e;if(t){const{cron:s,type:o,unit:a,value:u}=i;return o==="HumanDuration"?{frequency:{[a]:u},filter:m(r)}:{frequency:{cron:s}}}},y=e=>{if(Array.isArray(e))return e.map(r=>y(r));if(typeof e=="string"){if(e==="true")return!0;if(e==="false")return!1;const r=Number(e);if(!isNaN(r))return r}return e},p=e=>{if(!e)return{};if(e.expressionType){const r={[e.expressionType]:e.conditions?.map(t=>({factRef:t.factRef,path:t.path,operator:t.operatorPrefix?`${t.operatorPrefix}:${t.operator}`:t.operator,value:y(t.value)}))};return e.expressions&&e.expressions.forEach(t=>{r[e.expressionType]?.push(p(t))}),r}if(e.expressions)return e.expressions.map(p);if(e.conditions&&e.conditions.length===1){const r=e.conditions[0];return{factRef:r.factRef,path:r.path,operator:r.operatorPrefix?`${r.operatorPrefix}:${r.operator}`:r.operator,value:y(r.value)}}return{}},k=e=>{if(e?.match(/.:./)){const r=e.split(":");if(["all","any","none"].includes(r[0]))return{operator:r[1],operatorPrefix:r[0]}}return{}},f=(e,r=!0)=>{if(!e)return{conditions:[]};const t=Object.keys(e);let i=t.includes("all")||r&&!t.includes("any")?l.AllOf:l.AnyOf;if(t.includes("not")&&(i=l.Not),t.includes(i)||r){const a=e[i]||[e],u=[],d=[];return a.forEach(n=>{const h=Object.keys(n);if(h.includes("all")||h.includes("any")||h.includes("not"))d.push(f(n,!1));else{const{operator:T,operatorPrefix:S}=k(n.operator);u.push({factRef:n.factRef,path:n.path,operator:T??n.operator,value:n.value,operatorPrefix:S})}}),{expressions:d.length>0?d:void 0,conditions:u,expressionType:i}}const{operator:s,operatorPrefix:o}=k(e.operator);return{expressionType:l.AllOf,conditions:[{factRef:e.factRef,path:e.path,operator:s??e.operator,value:e.value,operatorPrefix:o}]}},V=e=>({detailsStep:{name:e.name??"",description:e.description??"",ownerEntityRef:e.ownerEntityRef??"",type:e.type??"default"},rulesStep:{pathResolver:e.pathResolver??"jsonpath",expressions:f(e.rule),passedMessage:e.passedMessage??void 0,failedMessage:e.failedMessage??void 0,warning:e.warning??!1},filtersStep:{filter:x(e.filter),keyValueFilter:g(e.filter),excludeFilter:x(e.exclude),excludeKeyValueFilter:g(e.exclude),applicabilityExpressions:f(e.applicable),notApplicableMessage:e.notApplicableMessage??void 0},scheduleStep:{schedule:w(e.schedule)}}),N=(e,r)=>{const{detailsStep:t,rulesStep:i,filtersStep:s,scheduleStep:o}=e;return{id:r?r.id:R(),ownerEntityRef:t.ownerEntityRef??void 0,name:t.name,description:t.description,pathResolver:i.pathResolver,passedMessage:i.passedMessage??void 0,failedMessage:i.failedMessage??void 0,rule:t.type==="manual"?void 0:p(i.expressions),warning:i.warning??!1,filter:s.filter||s.keyValueFilter?m(s.filter,s.keyValueFilter):void 0,exclude:s.excludeFilter||s.excludeKeyValueFilter?m(s.excludeFilter,s.excludeKeyValueFilter):void 0,applicable:t.type!=="manual"&&s.applicabilityExpressions?.conditions?.length?p(s.applicabilityExpressions):void 0,notApplicableMessage:s.notApplicableMessage&&t.type!=="manual"&&s.applicabilityExpressions?.conditions?.length?s.notApplicableMessage:void 0,schedule:E(o.schedule,s.filter),type:t.type}},c=(e,r="$")=>{const t=[];if(e.type==="object"&&e.properties){const i=e.properties;for(const s in i)if(i.hasOwnProperty(s)){const o=`${r}.${s}`;t.push(o);const a=i[s];t.push(...c(a,o))}}if(e.type==="array"&&e.items){const i=`${r}[*]`;t.push(i);const s=Array.isArray(e.items)?e.items:[e.items];for(const o of s)t.push(...c(o,i))}if(e.oneOf){const i=Array.isArray(e.oneOf)?e.oneOf:[e.oneOf];for(const s of i)t.push(...c(s,r))}if(e.allOf){const i=Array.isArray(e.allOf)?e.allOf:[e.allOf];for(const s of i)t.push(...c(s,r))}return[...new Set(t)]},q={detailsStep:{name:"",description:"",ownerEntityRef:"",type:"default"},rulesStep:{pathResolver:"jsonpath",expressions:{expressionType:l.AllOf,expressions:void 0,conditions:[{factRef:"",path:"",operator:"",operatorPrefix:"",value:"",conditions:[]}]},warning:!1},filtersStep:{filter:v(),keyValueFilter:b(),excludeFilter:v(),excludeKeyValueFilter:b()},scheduleStep:{schedule:O()}},K={details:{name:{name:"Check name",helperText:`Max ${P} characters`,placeholder:"Name your check (e.g., 'Code Coverage\u2019)"},description:{name:"Check description",placeholder:"Describe your check clearly so others understand its purpose. e.g., 'Ensure code coverage meets the minimum threshold.'"},owner:{name:"Check owner",selectLabel:"Assign an owner"},type:{name:"Check Type",selectLabel:"Choose the type of check."}},rulesStep:{rules:{name:"Check rules",description:"Define the rules the check will verify."},messages:{name:"Pass/Fail messages (Optional)",description:"Add the messages for check success and failure.",passMessagePlaceholder:"Enter pass message...",failMessagePlaceholder:"Enter fail message...",passedTabName:"Passed Message",failedTabName:"Failed Message"},warnings:{name:"Enable warnings",description:"Enable to classify failures as warnings, so they don\u2019t impact certification.",label:"Warning"}},filter:{description:`Use the filters below to narrow the scope of the Check. Only Entities that match the selected include and exclude filters will be applicable to the Check. Exclude filters must be used with with an include filter.
|
|
2
|
+
For example, selecting an include filter of 'Kind' as 'Component' and an exclude filter of 'Type' as 'Service' will select all entities with kind Component where type is NOT Service.`},schedule:{description:"Checks are automatically triggered whenever a dependent fact is updated. When collectors are scheduled, there is generally no need to schedule checks.",checkboxLabel:"Schedule check"}};export{K as CHECK_FIELDS,q as DEFAULT_FORM_VALUES,c as generateJsonPaths,V as mapCheckerToFormValues,p as mapExpressionToRule,w as mapInputScheduleToSchedule,f as mapRuleToExpression,E as mapScheduleToInputSchedule,N as mapToCheckerInput};
|
|
3
3
|
//# sourceMappingURL=checkFormUtils.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{CheckMessagingSchema as
|
|
1
|
+
import{CheckMessagingSchema as p,DefaultCheckDetailsSchema as m,ManualCheckDetailsSchema as f,parseFactRef as u}from"@spotify/backstage-plugin-soundcheck-common";import{z as e}from"zod";import{baseFiltersSchema as d,refineFilters as h,FrequencySchema as b}from"../../../utils/validation.esm.js";import{ExpressionType as r}from"../types/ExpressionType.esm.js";import"../../Frequency/types.esm.js";import"../../Frequency/util.esm.js";import"../../Frequency/FrequencyComponent.esm.js";import"../types/Path.esm.js";const a=t=>{try{return u(t),!0}catch{return"Invalid fact reference. [source]:[scope]/[name]."}},y=100,n=async t=>{if(!await a(t))throw new Error("Fact reference validation failed");return t},o=e.union([e.string().min(1,"Required"),e.number(),e.boolean()]),s=e.lazy(()=>e.strictObject({factRef:e.string().refine(n,{message:"Valid format: [source]:[scope]/[name]"}),path:e.string().min(1,"Required"),operator:e.string().min(1,"Required"),operatorPrefix:e.string().optional().nullable(),value:o.or(e.array(o).min(1,"Required")).or(e.strictObject({factRef:e.string().refine(n,{message:"Valid format: [source]:[scope]/[name]"}),path:e.string().min(1,"Required")})),conditions:e.array(s).optional()})),i=e.lazy(()=>e.strictObject({expressionType:e.enum([r.AllOf,r.AnyOf,r.Not]).optional(),expressions:e.array(i).optional(),conditions:e.array(s).optional()})),g=e.strictObject({expressions:i,pathResolver:e.string().optional()}).merge(p),c=e.lazy(()=>e.strictObject({applicabilityExpressions:i.optional(),notApplicableMessage:e.string().optional()}).merge(d).refine(h,"Cannot have an exclude filter without an include filter.")),S=e.strictObject({enabled:e.boolean(),frequency:b}),l=e.strictObject({schedule:S.optional()}),O=e.strictObject({detailsStep:m,rulesStep:g,filtersStep:c,scheduleStep:l}),R=e.strictObject({detailsStep:f,rulesStep:e.any(),filtersStep:c,scheduleStep:l});export{y as CHECK_NAME_MAX_LENGTH,O as defaultCheckFormSchema,R as manualCheckFormSchema,a as validateFactRef};
|
|
2
2
|
//# sourceMappingURL=validation.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
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
2
|
//# sourceMappingURL=CheckHistoryChartCard.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{withStyles as
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{withStyles as l,Tooltip as c}from"@material-ui/core";import n from"@material-ui/icons/Check";import s from"@material-ui/icons/Close";import d from"@material-ui/icons/HelpOutline";import f from"@material-ui/icons/NotInterested";import m from"@material-ui/icons/RemoveCircleOutline";import x from"@material-ui/icons/ReportProblemOutlined";import{ResultState as p}from"../../graphql/generated/index.esm.js";import{resultToText as r}from"../../text.esm.js";const h=l(o=>({root:{color:o.palette.success.main}}))(n),u=l(o=>({root:{color:o.palette.error.main}}))(s),b=l(o=>({root:{color:o.palette.warning.main}}))(x),N=l(o=>({root:{color:o.palette.text.primary}}))(d),T=l(o=>({root:{color:o.palette.text.disabled}}))(m),g=l(o=>({root:{color:o.palette.text.disabled}}))(f),I=l(o=>({root:{color:o.palette.error.main}}))(m),i=({icon:o,tooltip:a})=>t(c,{title:a,children:o}),R=({result:o,className:a})=>{const e={className:a,"aria-label":r(o),"aria-hidden":!1};return o===p.Passed?t(i,{icon:t(h,{...e}),tooltip:r(o)}):o===p.NotReported?t(i,{icon:t(N,{...e}),tooltip:r(o)}):o===p.Failed?t(i,{icon:t(u,{...e}),tooltip:r(o)}):o===p.Warning?t(i,{icon:t(b,{...e}),tooltip:r(o)}):o===p.NotApplicable?t(i,{icon:t(T,{...e}),tooltip:r(o)}):o===p.Exempt?t(i,{icon:t(g,{...e}),tooltip:r(o)}):o===p.Error?t(i,{icon:t(I,{...e}),tooltip:r(o)}):null};export{R as CheckIcon,i as IconWithTooltip};
|
|
2
2
|
//# sourceMappingURL=CheckIcon.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{usePermission as
|
|
1
|
+
import{jsxs as n,Fragment as c,jsx as i}from"react/jsx-runtime";import{usePermission as a}from"@backstage/plugin-permission-react";import{soundcheckCheckUpdatePermission as d}from"@spotify/backstage-plugin-soundcheck-common";import{useParams as h}from"react-router-dom";import"../../contexts/TrackFormContext.esm.js";import{CheckFormProvider as f}from"../../contexts/CheckFormContext.esm.js";import"../../contexts/CampaignFormContext.esm.js";import"react";import"../../contexts/UserProvider.esm.js";import"@backstage/catalog-model";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import{useCheck as k}from"../../hooks/checks/useCheck.esm.js";import"../../hooks/useSoundcheckAlert.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{LoadingIndicator as g}from"../LoadingIndicator/LoadingIndicator.esm.js";import{PageWarningMessage as u}from"../PageWarningMessage/PageWarningMessage.esm.js";import{CheckEditView as l}from"./CheckEditView.esm.js";const C=()=>{const{checkId:t}=h(),{data:o,isLoading:e}=k(t),{loading:p,allowed:s}=a({permission:d,resourceRef:t}),r=p||e,m=s&&o?.isEditable;return n(c,{children:[i(u,{entityName:"check",entityId:t,showCannotEdit:!r&&!m,showNotFound:!r&&!o}),r&&i(g,{}),i(f,{children:!r&&!!o&&m&&i(l,{check:o})})]})};export{C as CheckEditPage};
|
|
2
2
|
//# sourceMappingURL=CheckEditPage.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import d
|
|
1
|
+
import{jsx as d}from"react/jsx-runtime";import{useEffect as i}from"react";import"../../contexts/TrackFormContext.esm.js";import{useCheckFormContext as m}from"../../contexts/CheckFormContext.esm.js";import"../../contexts/CampaignFormContext.esm.js";import"../../contexts/UserProvider.esm.js";import"@backstage/catalog-model";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"@spotify/backstage-plugin-soundcheck-common";import"../../hooks/useSoundcheckAlert.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{useNavigateBack as u}from"../../hooks/useNavigateBack.esm.js";import{useUpdateCheck as f}from"../../hooks/checks/useUpdateCheck.esm.js";import{checksPageRouteRef as h}from"../../routes.esm.js";import{CheckForm as g}from"../CheckForm/CheckForm.esm.js";import"../CheckForm/Steps/CheckDetailsStep.esm.js";import"../CheckForm/Steps/CheckRulesStep.esm.js";import"../SoundcheckHeader/SoundcheckHeader.esm.js";import"../SoundcheckHeader/SoundcheckHeaderContext.esm.js";import{useHeader as l}from"../SoundcheckHeader/useHeader.esm.js";const C=({check:t})=>{const{selectedItem:c,setSelectedItem:o}=m(),{setIsLoading:e}=m(),{mutateAsync:s,isLoading:r}=f();i(()=>{e(r)},[e,r]),i(()=>{o(t)},[t,o]);const[p,a]=u(h),n=async k=>{await s(k,{onSuccess:a})};return l({title:"Edit a Check",description:"Make changes to your check\u2019s facts, rules and other details.",docLink:"https://backstage.spotify.com/docs/plugins/soundcheck/core-concepts/checks"}),c&&d(g,{onClose:p,onSave:n})};export{C as CheckEditView};
|
|
2
2
|
//# sourceMappingURL=CheckEditView.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{stringifyEntityRef as
|
|
1
|
+
import{jsx as p}from"react/jsx-runtime";import{stringifyEntityRef as x}from"@backstage/catalog-model";import{Table as R}from"@backstage/core-components";import{makeStyles as v}from"@material-ui/core";import z from"lodash";import{useState as L,useEffect as B,useCallback as d}from"react";import{CheckEntityField as r,Direction as f}from"../../../graphql/generated/index.esm.js";import{useEntitiesByRefs as T}from"../../../hooks/catalog/useEntitiesByRefs.esm.js";import{useCheckEntities as D}from"../../../hooks/entities/useCheckEntities.esm.js";import{toResultState as m}from"../utils.esm.js";import{columnFactories as n}from"./columns.esm.js";import{toCheckEntityRow as N}from"./utils.esm.js";const O=10,P=["kind","metadata.name","metadata.namespace","relations","spec.lifecycle","spec.type"],F=[n.createStateColumn(),n.createNameColumn(),n.createSystemColumn(),n.createOwnerColumn(),n.createSpecTypeColumn(),n.createSpecLifecycleColumn()],A=[r.State,r.Name,r.System,r.Owner,r.Type,r.Lifecycle],j=v({tableContainer:{display:"flex",flexDirection:"column",width:"100%",overflowX:"auto","& table":{boxSizing:"border-box","& th:first-child, & td:first-child":{paddingLeft:"6px"},"& th:last-child, & td:last-child":{paddingRight:"6px !important"}}}}),Q=({checkId:g,trackId:u,filter:s,states:c})=>{const h=j(),[e,l]=L({orderBy:void 0,filter:s,states:c?.map(m).filter(t=>t!==void 0),pageInfo:{page:0,pageSize:O,direction:"forward",cursor:null}});B(()=>{l(t=>({...t,pageInfo:{...t.pageInfo,page:0,cursor:null},filter:s,states:c?.map(m).filter(i=>i!==void 0)}))},[s,c]);const{data:a,isLoading:y}=D({checkId:g,trackId:u,orderBy:e.orderBy,filter:e.filter,states:e.states?.length?e.states:void 0,[e.pageInfo.direction==="forward"?"first":"last"]:e.pageInfo.pageSize,[e.pageInfo.direction==="forward"?"after":"before"]:e.pageInfo.cursor}),C=d((t,i)=>{let o;t===-1?o=void 0:o={field:A[t],direction:i==="asc"?f.Asc:f.Desc},l({...e,orderBy:o,pageInfo:{...e.pageInfo,page:0,cursor:null}})},[e]),I=d((t,i)=>{const o=t>e.pageInfo.page?"forward":"backward",E=o==="forward"?a?.checkEntities.pageInfo.endCursor??null:a?.checkEntities.pageInfo.startCursor??null;l({...e,pageInfo:{page:t,pageSize:i,direction:o,cursor:E}})},[a,e]),k=a?.checkEntities.edges.map(t=>t.node.entityRef)??[],{data:S,isLoading:w}=T({entityRefs:k,fields:P}),b=z.compact(a?.checkEntities.edges.map(t=>{const i=S?.items.find(o=>!!o&&x(o)===t.node.entityRef);return i?N({checkDetails:t.node,entity:i}):void 0}))??[];return p("div",{className:h.tableContainer,children:p(R,{title:"Entities",style:{width:"100%",border:"none",margin:0},columns:F,data:b,options:{paging:!0,showFirstLastPageButtons:!1,paginationPosition:"bottom",emptyRowsWhenPaging:!0,pageSizeOptions:[10,25,50],pageSize:e.pageInfo.pageSize,search:!1,showTitle:!0,padding:"dense"},onOrderChange:C,onPageChange:I,page:e.pageInfo.page,totalCount:a?.checkEntities.totalCount??0,isLoading:y||w,components:{Toolbar:()=>null}})})};export{Q as CheckEntitiesTable};
|
|
2
2
|
//# sourceMappingURL=CheckEntitiesTable.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{OverflowTooltip as
|
|
1
|
+
import{jsx as r,Fragment as o}from"react/jsx-runtime";import{OverflowTooltip as m}from"@backstage/core-components";import{EntityRefLink as u,EntityRefLinks as s}from"@backstage/plugin-catalog-react";import{makeStyles as c,Chip as d}from"@material-ui/core";import{CheckIcon as p}from"../../CheckIcon/CheckIcon.esm.js";const l=c(()=>({linkHover:{"& span":{"&:hover":{textDecoration:"underline"}}}})),f=Object.freeze({createStateColumn(){return{title:"",field:"state",render:({state:e})=>r(p,{result:e}),width:"auto",align:"center",sorting:!1}},createNameColumn(e){return{title:"Name",field:"resolved.entityRef",highlight:!0,customSort(t,n){return 0},render:({entity:t})=>{const n=l();return r(u,{entityRef:t,defaultKind:e?.defaultKind||"Component",className:n.linkHover})}}},createSystemColumn(){return{title:"System",field:"resolved.partOfSystemRelationTitle",customSort(e,t){return 0},render:({resolved:e})=>{const t=l();return r(s,{entityRefs:e.partOfSystemRelations,defaultKind:"system",className:t.linkHover})}}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",customSort(e,t){return 0},render:({resolved:e})=>{const t=l();return r(s,{entityRefs:e.ownedByRelations,defaultKind:"group",className:t.linkHover})}}},createSpecTypeColumn(){return{title:"Type",field:"entity.spec.type",customSort(e,t){return 0}}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"entity.spec.lifecycle",customSort(e,t){return 0},width:"auto"}},createMetadataDescriptionColumn(){return{title:"Description",field:"entity.metadata.description",customSort(e,t){return 0},render:({entity:e})=>r(m,{text:e.metadata.description,placement:"bottom-start"}),width:"auto"}},createTagsColumn(){return{title:"Tags",field:"entity.metadata.tags",cellStyle:{padding:"0px 16px 0px 20px"},render:({entity:e})=>r(o,{children:e.metadata.tags&&e.metadata.tags.map(t=>r(d,{label:t,size:"small",variant:"outlined",style:{marginBottom:"0px"}},t))}),width:"auto",sorting:!1}},createTitleColumn(e){return{title:"Title",field:"entity.metadata.title",customSort(t,n){return 0},hidden:e?.hidden,searchable:!0}},createLabelColumn(e,t){return{title:t?.title||"Label",field:"entity.metadata.labels",customSort(n,a){return 0},cellStyle:{padding:"0px 16px 0px 20px"},render:({entity:n})=>{const a=n.metadata?.labels,i=a&&a[e]||t?.defaultValue;return r(o,{children:i&&r(d,{label:i,size:"small",variant:"outlined"},i)})},width:"auto",sorting:!1}},createNamespaceColumn(){return{title:"Namespace",field:"entity.metadata.namespace",customSort(e,t){return 0},width:"auto"}}});export{f as columnFactories};
|
|
2
2
|
//# sourceMappingURL=columns.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsx as i,jsxs as f}from"react/jsx-runtime";import{useRouteRef as Z}from"@backstage/core-plugin-api";import{EntityRefLink as _}from"@backstage/plugin-catalog-react";import{usePermission as $}from"@backstage/plugin-permission-react";import{makeStyles as ee,useTheme as te,Button as ie,Typography as B}from"@material-ui/core";import{soundcheckCheckReadPermission as se,soundcheckCheckUpdatePermission as oe,toEntityFilterQuery as A,combineEntityFilterQueries as re}from"@spotify/backstage-plugin-soundcheck-common";import x from"lodash/isEqual";import{useMemo as h,useState as v,useEffect as ne,useCallback as j}from"react";import{useSearchParams as ae,useParams as le,useNavigate as ce}from"react-router-dom";import"@backstage/catalog-model";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import{useCheck as de}from"../../hooks/checks/useCheck.esm.js";import"../../hooks/useSoundcheckAlert.esm.js";import{useTrack as me}from"../../hooks/tracks/useTrack.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{useCheckStatus as pe}from"../../hooks/aggregations/useCheckStatus.esm.js";import{checkEditRouteRef as he}from"../../routes.esm.js";import{CheckStatusBar as fe}from"../CheckStatusBar/CheckStatusBar.esm.js";import{FilterSidebar as ue}from"../FilterSidebar/FilterSidebar.esm.js";import{StateFilter as ge}from"../FilterSidebar/StateFilter.esm.js";import{LoadingIndicator as ye}from"../LoadingIndicator/LoadingIndicator.esm.js";import{PageWarningMessage as z}from"../PageWarningMessage/PageWarningMessage.esm.js";import"../SoundcheckHeader/SoundcheckHeader.esm.js";import"../SoundcheckHeader/SoundcheckHeaderContext.esm.js";import{useHeader as ke}from"../SoundcheckHeader/useHeader.esm.js";import{SoundcheckMarkdownContent as Se}from"../SoundcheckMarkdownContent/SoundcheckMarkdownContent.esm.js";import"@backstage/core-components";import"react-markdown";import"rehype-raw";import"remark-gfm";import{CheckEntitiesTable as Ce}from"./CheckEntitiesTable/CheckEntitiesTable.esm.js";import{CheckStatusHistoryChart as we}from"./CheckStatusHistoryChart.esm.js";import{CheckStatusTable as xe}from"./CheckStatusTable.esm.js";const ve=e=>{const{lifecycles:s,owners:c,types:a,systems:r}=e,n=s?.length?{"spec.lifecycle":s}:void 0,d=c?.length?{"relations.ownedBy":c}:void 0,m=a?.length?{"spec.type":a}:void 0,p=r?.length?{"relations.partOf":r}:void 0;if(n||d||m||p)return{...n,...d,...m,...p}};function Ee(e,s){for(const c of e.levels)for(const a of c.checks)if(a.id===s)return a;return null}const Ne=ee(e=>({root:{height:"100%"},pageContent:{display:"flex",minHeight:`calc(100vh - ${e.spacing(15)}px)`,borderTop:`1px solid ${e.palette.divider}`,height:"100%"},mainContentArea:{flex:1,display:"flex",flexDirection:"column",minWidth:0},editButton:{marginLeft:"auto"},statusContainer:{borderBottom:`1px solid ${e.palette.divider}`,padding:e.spacing(3,0,2,3)},statusCards:{display:"flex",gap:e.spacing(2)},currentStatusSection:{width:"325px",minWidth:"325px",flex:0,display:"flex",flexDirection:"column"},historicalStatusSection:{flex:1,flexShrink:1,flexGrow:1,flexBasis:"auto",minWidth:"150px",display:"flex",flexDirection:"column"},statusTitle:{fontWeight:"bold",fontSize:"1.1rem",lineHeight:`${e.typography.h5.fontSize}px`,cursor:"default",marginBottom:e.spacing(2)},headerDescription:{fontSize:e.typography.body2.fontSize,margin:e.spacing(.5,0,0),"& p":{margin:0},"& a":{color:"inherit",textDecoration:"underline"}},entitiesContainer:{padding:e.spacing(2,3,3,3)},ownerLink:{"& span":{color:"inherit","&:hover":{textDecoration:"underline"}}}})),Re=()=>{const e=Ne(),[s,c]=ae(),{trackId:a,checkId:r}=le(),n=h(()=>s.getAll("states"),[s]),d=h(()=>s.getAll("owners"),[s]),m=h(()=>s.getAll("lifecycles"),[s]),p=h(()=>s.getAll("types"),[s]),u=h(()=>s.getAll("systems"),[s]),[g,E]=v(m),[y,N]=v(d),[k,R]=v(p),[S,I]=v(u),[C,b]=v(n);ne(()=>{N(d),E(m),R(p),I(u),b(n)},[d,m,p,u,n]);const M=h(()=>{const t={owners:!x(y,d),lifecycles:!x(g,m),types:!x(k,p),systems:!x(S,u),states:!x(C,n)};return Object.values(t).some(Boolean)},[y,d,g,m,k,p,S,u,C,n]),Q=j(()=>{const t=new URLSearchParams(s);t.delete("lifecycles"),t.delete("owners"),t.delete("types"),t.delete("systems"),t.delete("states"),g.length>0&&g.forEach(l=>t.append("lifecycles",l)),y.length>0&&y.forEach(l=>t.append("owners",l)),k.length>0&&k.forEach(l=>t.append("types",l)),S.length>0&&S.forEach(l=>t.append("systems",l)),C.length>0&&C.forEach(l=>t.append("states",l)),c(t)},[s,g,y,k,S,C,c]),U=j(()=>{E([]),N([]),R([]),I([]),b([]);const t=new URLSearchParams(s);t.delete("lifecycles"),t.delete("owners"),t.delete("types"),t.delete("systems"),t.delete("states"),c(t)},[s,c]),L=ve({lifecycles:m,owners:d,types:p,systems:u}),{data:w,isLoading:G}=me(a),{data:o,isLoading:T}=de(r),{loading:V,allowed:q}=$({permission:se,resourceRef:r}),{loading:D,allowed:P}=$({permission:oe,resourceRef:r}),H=ce(),O=Z(he),J=te();let F;if(r)if(w){const t=A(w.filter),l=A(Ee(w,r)?.filter);F=re(t,l)}else o&&(F=A(o.filter));const{data:W}=pe({checkId:r,trackId:a,filter:L,states:n?.length?n:void 0},!!r),K=h(()=>o?.ownerEntityRef?i(_,{color:"inherit",entityRef:o.ownerEntityRef,className:e.ownerLink}):null,[o?.ownerEntityRef,e.ownerLink]),X=h(()=>!D&&P&&o?.isEditable?i(ie,{className:e.editButton,variant:"contained",color:"primary",onClick:()=>{H(O({checkId:o.id}))},children:"Edit Check"}):null,[P,o?.id,o?.isEditable,e.editButton,O,D,H]),Y=h(()=>o?.description?i(Se,{className:e.headerDescription,content:o.description}):null,[e.headerDescription,o?.description]);return ke({title:o?.name??r??"Soundcheck",description:Y,customSubtitle:K,sectionRight:X}),f("div",{children:[i(z,{entityName:"track",entityId:a,showNotFound:!!a&&!G&&!w}),i(z,{entityName:"check",entityId:r,showNotFound:!T&&!o,showCannotView:!!o&&!V&&!q}),T&&i(ye,{}),!T&&!!o&&i("div",{className:e.root,children:f("div",{className:e.pageContent,children:[i(ue,{trackFilter:F,stagedTypes:k,stagedLifecycles:g,stagedOwners:y,stagedSystems:S,onTypesChange:R,onLifecyclesChange:E,onOwnersChange:N,onSystemsChange:I,onApplyFilters:Q,onClearFilters:U,hasFilterChanges:M,children:i(ge,{states:n,stagedStates:C,onStagedStatesChange:b})}),f("div",{className:e.mainContentArea,children:[i("div",{className:e.statusContainer,children:f("div",{className:e.statusCards,children:[f("div",{className:e.currentStatusSection,children:[i(B,{className:e.statusTitle,children:"Current Status"}),i("div",{style:{width:"100%",height:30,display:"flex",alignItems:"flex-start",marginBottom:J.spacing(2)},children:i(fe,{status:W})}),i("div",{children:i(xe,{checkStatus:W})})]}),f("div",{className:e.historicalStatusSection,children:[i(B,{className:e.statusTitle,children:"Historical Status"}),i("div",{style:{height:"100%"},children:i(we,{checkId:r,trackId:a,filter:L,states:n})})]})]})}),f("div",{className:e.entitiesContainer,children:[i(B,{className:e.statusTitle,children:"Entities"}),i(Ce,{checkId:r,trackId:w?.id,filter:L,states:n})]})]})]})})]})};export{Re as CheckInsightsPage};
|
|
2
2
|
//# sourceMappingURL=CheckInsightsPage.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsx as e,jsxs as f}from"react/jsx-runtime";import{makeStyles as u,useTheme as x}from"@material-ui/core";import{DateTime as A}from"luxon";import{ResponsiveContainer as v,LineChart as g,CartesianGrid as I,XAxis as L,YAxis as c,Tooltip as b,Line as n}from"recharts";import{useCheckStatusHistory as C}from"../../hooks/aggregations/useCheckStatusHistory.esm.js";import{getCheckStatusColor as o}from"../../utils/colors.esm.js";import{compactNumberFormatter as D}from"../../utils/formatters.esm.js";import{LoadingChart as W}from"../Charts/LoadingChart.esm.js";const K=u({root:{height:250,width:"100%",position:"relative",borderRadius:"4px"}}),S=({checkId:d,trackId:m,filter:p,states:l})=>{const t=x(),k=K(),{data:s,isLoading:h}=C({checkId:d,trackId:m,filter:p,states:l,numberOfDays:30},!!d);if(h)return e(W,{type:"line",numLines:3});const r=i=>s?.history.some(y=>y[i]>0)??!1,a={stroke:t.palette.background.paper,strokeWidth:1,r:5};return e("div",{className:k.root,children:e(v,{height:250,debounce:1,children:f(g,{data:s?.history??[],margin:{top:0,right:0,bottom:0,left:0},children:[e(I,{stroke:t.palette.divider,strokeWidth:1,horizontal:!0,vertical:!1}),e(L,{dataKey:"date",tickFormatter:i=>A.fromISO(i).toFormat("MMM d"),tickLine:!1,axisLine:!1}),e(c,{yAxisId:"percentage",domain:[0,100],axisLine:!1,tickLine:!1,tickFormatter:i=>`${i}%`,ticks:[0,25,50,75,100]}),e(c,{yAxisId:"count",orientation:"right",domain:[0,s?.numberOfEntities??0],axisLine:!1,tickLine:!1,tickFormatter:i=>D(i)}),e(b,{contentStyle:{backgroundColor:t.palette.background.paper,color:t.palette.text.primary,border:`1px solid ${t.palette.divider}`},cursor:{stroke:t.palette.divider,strokeWidth:1}}),r("passed")&&e(n,{type:"monotone",dataKey:"passed",stroke:o(t,"passed"),yAxisId:"count",strokeWidth:2,dot:!1,isAnimationActive:!1,activeDot:{fill:o(t,"passed"),...a}}),r("failed")&&e(n,{type:"monotone",dataKey:"failed",stroke:o(t,"failed"),yAxisId:"count",strokeWidth:2,dot:!1,isAnimationActive:!1,activeDot:{fill:o(t,"failed"),...a}}),r("warning")&&e(n,{type:"monotone",dataKey:"warning",stroke:o(t,"warning"),yAxisId:"count",strokeWidth:2,dot:!1,isAnimationActive:!1,activeDot:{fill:o(t,"warning"),...a}}),r("error")&&e(n,{type:"monotone",dataKey:"error",stroke:o(t,"error"),yAxisId:"count",strokeWidth:2,dot:!1,isAnimationActive:!1,activeDot:{fill:o(t,"error"),...a}}),r("exempt")&&e(n,{type:"monotone",dataKey:"exempt",stroke:o(t,"exempt"),yAxisId:"count",strokeWidth:2,dot:!1,isAnimationActive:!1,activeDot:{fill:o(t,"exempt"),...a}}),r("notReported")&&e(n,{type:"monotone",dataKey:"notReported",stroke:o(t,"not-reported"),yAxisId:"count",strokeWidth:2,dot:!1,isAnimationActive:!1,activeDot:{fill:o(t,"not-reported"),...a}})]})})})};export{S as CheckStatusHistoryChart};
|
|
2
2
|
//# sourceMappingURL=CheckStatusHistoryChart.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useTheme as
|
|
1
|
+
import{jsx as a,jsxs as n}from"react/jsx-runtime";import{useTheme as y,Typography as s}from"@material-ui/core";import{makeStyles as u,createStyles as x}from"@material-ui/core/styles";import{Skeleton as k}from"@material-ui/lab";import{memo as N,useMemo as S,Fragment as v}from"react";import{getCheckStatusColor as o}from"../../utils/colors.esm.js";import{compactNumberFormatter as c}from"../../utils/formatters.esm.js";const w=u(e=>x({container:{display:"grid",gridTemplateColumns:"3fr 2fr",gap:e.spacing(1),minWidth:0},item:{display:"flex",alignItems:"center",fontSize:"0.875rem",minWidth:0},legendDash:{width:e.spacing(2),height:e.spacing(.75),borderRadius:e.spacing(.375),marginRight:e.spacing(1)},category:{display:"flex",alignItems:"center",fontSize:"0.875rem",minWidth:0,flex:1},categoryText:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",fontSize:"0.875rem",minWidth:0,flex:1},value:{fontSize:"0.875rem",color:e.palette.text.primary},valueCell:{justifyContent:"flex-end",whiteSpace:"nowrap"},percentage:{color:e.palette.text.secondary,marginLeft:e.spacing(1)},skeleton:{backgroundColor:e.palette.action.hover}})),b=N(({checkStatus:e})=>{const r=y(),t=w(),p=S(()=>[{name:"Passed",key:"passed",color:o(r,"passed")},{name:"Failed",key:"failed",color:o(r,"failed")},{name:"Warning",key:"warning",color:o(r,"warning")},{name:"Exempt",key:"exempt",color:o(r,"exempt")},{name:"Error",key:"error",color:o(r,"error")},{name:"Not Reported",key:"notReported",color:o(r,"not-reported")}],[r]),d=e?.numberOfEntities??0,i=e?e.numberOfEntities-e.notApplicable-e.exempt:-1;return a("div",{className:t.container,children:p.map(({name:g,key:l,color:h})=>{const m=Number(e?.[l]??0),f=d>0?Math.round(m/i*100):0;return n(v,{children:[a("div",{className:t.item,children:n("div",{className:t.category,children:[a("span",{className:t.legendDash,style:{backgroundColor:h}}),a(s,{className:t.categoryText,children:g})]})}),a("div",{className:`${t.item} ${t.valueCell}`,children:e?n(s,{className:t.value,children:[c(m)," of"," ",c(i),n("span",{className:t.percentage,children:["(",f,"%)"]})]}):a(k,{width:120,height:20,className:t.skeleton})})]},l)})})});export{b as CheckStatusTable};
|
|
2
2
|
//# sourceMappingURL=CheckStatusTable.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsxs as a,jsx as e}from"react/jsx-runtime";import{EntityRefLink as c}from"@backstage/plugin-catalog-react";import{makeStyles as o,Box as i,Typography as n}from"@material-ui/core";import{dump as l}from"js-yaml";import{useContext as d}from"react";import{SoundcheckMarkdownContent as m}from"../SoundcheckMarkdownContent/SoundcheckMarkdownContent.esm.js";import"@backstage/core-components";import"react-markdown";import"rehype-raw";import"remark-gfm";import{CheckPreviewContext as s}from"./CheckPreviewContext.esm.js";const h=o(r=>({checkPreview:{padding:r.spacing(1,2),border:`1px solid ${r.palette.divider}`,borderRadius:r.spacing(1),height:"99%",overflow:"auto"},markdownArea:{border:`1px solid ${r.palette.divider}`,borderRadius:r.spacing(1),padding:r.spacing(0,1.5),"& p":{margin:r.spacing(1,0)},maxHeight:300,overflow:"auto"},yamlArea:{margin:r.spacing(.5,0),marginLeft:r.spacing(1)}})),p=()=>{const r=h(),{check:t}=d(s);return a(i,{className:r.checkPreview,children:[t&&a(i,{children:[e(i,{marginBottom:1,children:e(n,{variant:"subtitle1",children:t.name})}),a(i,{marginBottom:2,children:[e(n,{variant:"subtitle2",children:"Id"}),e(n,{variant:"body2",children:t.id})]}),a(i,{marginBottom:2,children:[e(n,{variant:"subtitle2",children:"Description"}),e(m,{className:r.markdownArea,content:t.description??"N/A"})]}),t.ownerEntityRef&&a(i,{marginBottom:2,children:[e(n,{variant:"subtitle2",children:"Owner"}),e(i,{children:e(c,{target:"_blank",rel:"noreferrer",entityRef:t.ownerEntityRef})})]}),a(i,{marginBottom:2,children:[e(n,{variant:"subtitle2",children:"Type"}),e(i,{children:e(n,{variant:"body2",children:t.type??"default"})})]}),a(i,{marginBottom:2,children:[e(n,{variant:"subtitle2",children:"Check Rule"}),e(i,{children:e("pre",{className:r.yamlArea,children:l(t.rule)})})]}),t.filter&&a(i,{marginBottom:2,children:[e(n,{variant:"subtitle2",children:"Inclusion Filters"}),e(i,{children:e("pre",{className:r.yamlArea,children:l(t.filter)})})]}),t.exclude&&a(i,{marginBottom:2,children:[e(n,{variant:"subtitle2",children:"Exclusion Filters"}),e(i,{children:e("pre",{className:r.yamlArea,children:l(t.exclude)})})]}),t.applicable&&a(i,{marginBottom:2,children:[e(n,{variant:"subtitle2",children:"Applicability Rule"}),e(i,{children:e("pre",{className:r.yamlArea,children:l(t.applicable)})})]})]}),!t&&e(i,{textAlign:"center",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",children:e(n,{children:"Click a check to view it's properties."})})]})};export{p as CheckPreview};
|
|
2
|
+
//# sourceMappingURL=CheckPreview.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{createContext as i,useState as h}from"react";const e=i({updateCheck:()=>{}}),n=({children:r})=>{const[t,c]=h();return o(e.Provider,{value:{check:t,updateCheck:c},children:r})};export{e as CheckPreviewContext,n as CheckPreviewProvider};
|
|
2
|
+
//# sourceMappingURL=CheckPreviewContext.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsxs as n,Fragment as w,jsx as o}from"react/jsx-runtime";import{makeStyles as I,Box as c,Checkbox as $,Typography as B,FormHelperText as N,Button as T}from"@material-ui/core";import L from"@material-ui/icons/CheckCircleOutlined";import{isEmpty as O,last as A,difference as R}from"lodash";import{useContext as f,useMemo as u}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 z}from"../../hooks/checks/useGetChecks.esm.js";import"../../hooks/useSoundcheckAlert.esm.js";import"../../hooks/useConfirmationModal.esm.js";import"react-router-dom";import"../FormControlledAutocomplete/FormControlledAutocomplete.esm.js";import"@material-ui/icons/CheckBox";import"@material-ui/icons/CheckBoxOutlineBlank";import"@material-ui/lab";import"react-hook-form";import"../ListboxVirtualized/ListboxVirtualized.esm.js";import{ControlledAutocomplete as E}from"../FormControlledAutocomplete/ControlledAutocomplete.esm.js";import{CheckPreviewContext as x}from"./CheckPreviewContext.esm.js";const C=I(e=>({checkSelectCard:{padding:e.spacing(1,2),border:`1px solid ${e.palette.divider}`,borderRadius:e.spacing(.25),"&:hover":{cursor:"pointer"},display:"flex",alignItems:"center",background:e.palette.background.default,minWidth:200},selectedCard:{border:`1px solid ${e.palette.border}`},selectedIcon:{color:e.palette.text.secondary},checkCardInfo:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},selectArea:{display:"flex",flexDirection:"column",gap:e.spacing(.75)},removeButton:{margin:0,marginLeft:e.spacing(1),padding:0,color:e.palette.text.primary},wrapper:{padding:e.spacing(1),border:`1px solid ${e.palette.divider}`,borderRadius:e.spacing(1)},wrapperError:{border:`1px solid ${e.palette.error.main}`},checkSearch:{background:e.palette.background.paper}})),j=({check:e,removeCheck:h})=>{const i=C(),{updateCheck:d,check:p}=f(x),m=e&&p?.id===e.id;return e?n(c,{className:`${i.checkSelectCard} ${m?i.selectedCard:""}`,onClick:()=>d(e),children:[o(L,{className:m?i.selectedIcon:"",fontSize:"small"}),o(c,{className:i.checkCardInfo,flex:1,marginLeft:2,children:e.name}),o(T,{onClick:()=>{h(e.id)},className:i.removeButton,variant:"text",size:"small","aria-label":`remove check ${e.id}`,children:"Remove"})]}):null},F=({currentSectionCheckIds:e,addCheckToSelection:h,removeCheck:i,error:d,helperText:p,blankText:m})=>{const s=C(),{data:k,isLoading:b}=z({ids:void 0}),{updateCheck:v}=f(x),a=u(()=>k?.edges.map(r=>r.node)??[],[k]),S=u(()=>a.map(r=>r.id)??[],[a]),y=r=>{if(r.length>e.length){const t=A(r),l=a.find(g=>g.id===t);h(l),l&&v(l)}if(r.length<e.length){const t=R(e,r)?.[0];t&&i(t)}};return n(w,{children:[n(c,{className:`${s.wrapper} ${d?s.wrapperError:""}`,children:[o(c,{className:s.checkSearch,marginBottom:1,children:o(E,{multiple:!0,disableCloseOnSelect:!0,options:S,renderOption:(r,{selected:t})=>{const l=a.find(g=>g.id===r);return n(c,{display:"flex",alignItems:"center",gridGap:4,children:[o($,{checked:t,size:"small",color:"primary"}),o(c,{children:l?l.name:r})]})},getOptionLabel:r=>a.find(t=>t.id===r)?.name??r,multipleValue:e,onChange:y,isLoading:b,placeholder:"Check Search",autoSelect:!1,testId:"check-search",getOptionSelected:(r,t)=>t.includes(r)})}),n(c,{className:s.selectArea,children:[O(e)&&o(c,{marginTop:1,marginBottom:1,textAlign:"center",children:o(B,{children:m??"Select checks from the dropdown above."})}),e.map(r=>o(j,{removeCheck:i,check:a.find(t=>t.id===r)},r))]})]}),p&&o(N,{error:d,children:p})]})};export{F as CheckSelection};
|
|
2
|
+
//# sourceMappingURL=CheckSelection.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as a}from"react/jsx-runtime";import{useTheme as l,Box as d}from"@material-ui/core";import{makeStyles as g}from"@material-ui/core/styles";import{useMemo as s,useCallback as u}from"react";import{getCheckStatusColor as t}from"../../utils/colors.esm.js";import{CategoryBar as f}from"../CategoryBar/CategoryBar.esm.js";const h=g(e=>({categoryBar:{"& .MuiBox-root > div":{height:"8px"}}})),x=({status:e,className:p})=>{const i=h(),r=l(),n=s(()=>({passed:e?.passed??0,failed:e?.failed??0,warning:e?.warning??0,error:e?.error??0,exempt:e?.exempt??0,notReported:e?.notReported??0}),[e]),m=u(o=>{switch(o){case"notApplicable":return"Not Applicable";case"notReported":return"Not Reported";default:return o.charAt(0).toUpperCase()+o.slice(1)}},[]),c=s(()=>({passed:t(r,"passed"),failed:t(r,"failed"),warning:t(r,"warning"),error:t(r,"error"),exempt:t(r,"exempt"),notReported:t(r,"not-reported")}),[r]);return a(d,{className:p,style:{width:"100%"},children:a(f,{className:i.categoryBar,data:n,categories:["passed","failed","warning","error","exempt","notReported"],categoryColors:c,showTooltip:!0,valueFormatter:o=>o.toString(),categoryFormatter:m})})};export{x as CheckStatusBar};
|
|
2
|
+
//# sourceMappingURL=CheckStatusBar.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Content as
|
|
1
|
+
import{jsxs as c,jsx as e}from"react/jsx-runtime";import{Content as l,ItemCardGrid as p}from"@backstage/core-components";import{useRouteRef as d}from"@backstage/core-plugin-api";import{Typography as i,Box as a,Card as h,CardContent as f}from"@material-ui/core";import{makeStyles as g}from"@material-ui/core/styles";import u from"lodash";import{useMemo as k}from"react";import{Link as C}from"react-router-dom";import{useCheckTemplates as y}from"../../hooks/checks/useCheckTemplates.esm.js";import{checkCreateRouteRef as b}from"../../routes.esm.js";import{LoadingIndicator as x}from"../LoadingIndicator/LoadingIndicator.esm.js";import"../SoundcheckHeader/SoundcheckHeader.esm.js";import"../SoundcheckHeader/SoundcheckHeaderContext.esm.js";import{useHeader as L}from"../SoundcheckHeader/useHeader.esm.js";import{TemplateCategory as v}from"./TemplateCategory.esm.js";const N=g(t=>({content:{display:"flex",flexDirection:"column",gap:t.spacing(2)},grid:{marginLeft:t.spacing(2)},cardContent:{"&:hover":{backgroundColor:t.palette.action.hover}},docsLink:{color:t.palette.text.primary},link:{textDecoration:"none"}})),R=()=>{const t=N(),m=d(b),{data:o,isLoading:s}=y(),n=k(()=>u.groupBy(o??[],"category"),[o]);return L({title:"What would you like to check?",docLink:"https://backstage.spotify.com/docs/plugins/soundcheck/core-concepts/checks"}),c("div",{children:[s&&e(x,{}),o&&o.length===0&&e(i,{children:"No check templates."}),o&&o.length&&c(l,{className:t.content,children:[e(a,{className:t.grid,children:e(p,{children:e(C,{to:m(),className:t.link,children:e(h,{children:c(f,{className:t.cardContent,children:[e(a,{mb:1,children:e(i,{variant:"subtitle1",style:{fontWeight:"bold"},component:"div",children:"Custom Check"})}),e(i,{variant:"body1",children:"Create a custom check using the facts collected about your entities."})]})})})})}),Object.keys(n).sort().map(r=>e(v,{name:r,templates:n[r]},r))]})]})};export{R as CheckTemplatesPage};
|
|
2
2
|
//# sourceMappingURL=CheckTemplatesPage.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ItemCardGrid as
|
|
1
|
+
import{jsxs as i,Fragment as l,jsx as t}from"react/jsx-runtime";import{ItemCardGrid as d}from"@backstage/core-components";import{useRouteRef as s}from"@backstage/core-plugin-api";import{Typography as n,Box as a,Card as h,CardContent as p}from"@material-ui/core";import{makeStyles as f}from"@material-ui/core/styles";import y from"lodash";import{Link as C}from"react-router-dom";import{checkCreateRouteRef as g}from"../../routes.esm.js";const u=f(e=>({content:{marginLeft:e.spacing(2)},link:{textDecoration:"none"},cardContent:{"&:hover":{backgroundColor:e.palette.action.hover}}})),k=({name:e,templates:m})=>{const o=u(),c=s(g);return i(l,{children:[t(n,{variant:"h6",children:e}),t(a,{className:o.content,children:t(d,{children:y.sortBy(m,"title").map(r=>t(C,{to:`${c()}?template=${r.id}`,className:o.link,children:t(h,{style:{height:"100%"},children:i(p,{className:o.cardContent,children:[t(a,{mb:1,children:t(n,{variant:"subtitle1",style:{fontWeight:"bold"},component:"div",children:r.title})}),t(n,{variant:"body1",children:r.summary})]})})},r.id))})})]})};export{k as TemplateCategory};
|
|
2
2
|
//# sourceMappingURL=TemplateCategory.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useApi as
|
|
1
|
+
import{jsx as r,jsxs as w}from"react/jsx-runtime";import{useApi as _,featureFlagsApiRef as q,useRouteRef as z}from"@backstage/core-plugin-api";import{usePermission as J}from"@backstage/plugin-permission-react";import{makeStyles as K,Button as x,Grid as o}from"@material-ui/core";import{soundcheckCheckCreatePermission as U}from"@spotify/backstage-plugin-soundcheck-common";import{useState as i,useEffect as y}from"react";import{useNavigate as V}from"react-router-dom";import X from"react-use/lib/useDebounce";import"@backstage/catalog-model";import"@tanstack/react-query";import"../../../api.esm.js";import"../../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import{useGetChecks as Y}from"../../../hooks/checks/useGetChecks.esm.js";import"../../../hooks/useSoundcheckAlert.esm.js";import"../../../hooks/useConfirmationModal.esm.js";import{useGetCheckOwners as ee}from"../../../hooks/checks/useGetCheckOwners.esm.js";import re from"../../../images/no-results.svg";import{checkTemplatesRouteRef as te}from"../../../routes.esm.js";import{FilterDefault as A}from"../../../utils/filters.esm.js";import{EmptyState as S}from"../../EmptyState/EmptyState.esm.js";import{Pagination as ae}from"../../Pagination/Pagination.esm.js";import{SearchFilters as oe}from"../../SearchFilters/SearchFilters.esm.js";import{ChecksOverviewSkeleton as ie}from"../skeletons/ChecksOverviewSkeleton.esm.js";import{CheckSummaryCard as se}from"./CheckSummaryCard.esm.js";var B=(e=>(e.title="Create a check",e.description="A check is a comparison between a defined acceptable outcome and the actual outcome of a given process.",e.callToAction="Get started",e))(B||{}),I=(e=>(e.title="No checks found",e.description="No checks matched your search. Consider changing search term and filters.",e))(I||{});const ce=K(e=>({headerButtons:{display:"flex",gap:e.spacing(1),flexWrap:"nowrap",justifyContent:"end",alignItems:"end"},header:{padding:e.spacing(0,0,1)},container:{padding:e.spacing(3),gap:e.spacing(3)},createButton:{lineHeight:"1.25rem",paddingTop:e.spacing(1.5),paddingBottom:e.spacing(1.5)}})),ne=({checksPerPage:e,currentCursor:R})=>{const s=ce(),[h,p]=i(R),[n,F]=i(""),[g,O]=i(A.Alpha),[u,T]=i(A.Owner),[f,G]=i(""),{data:L,isLoading:E}=ee();X(()=>{G(n)},500,[n]);const{loading:k,allowed:j}=J({permission:U}),{data:a,isLoading:l}=Y({ids:void 0,first:e,after:h,orderAlphabetical:g,searchByOwner:u,searchByName:f}),[m,D]=i(a),d=m?.edges?.map(t=>t.node),[C,P]=i([]);y(()=>{p(void 0),P([])},[f]);const v=_(q),H=!v.getRegisteredFlags().find(t=>t.name==="soundcheck-enable-check-creation")||v.isActive("soundcheck-enable-check-creation"),b=!j||!H,W=t=>{O(t.target.value)},$=t=>{T(t.target.value)};y(()=>{a&&D(()=>({totalCount:a.totalCount,edges:a.edges,pageInfo:{startCursor:a.pageInfo.startCursor,endCursor:a.pageInfo.endCursor,hasNextPage:a?.pageInfo.hasNextPage??!1,hasPreviousPage:a?.pageInfo.hasPreviousPage??!1}}))},[a]);const M=V(),Q=z(te),N=()=>M(Q());if(!l&&!d)return r(S,{title:"Create a check",description:"A check is a comparison between a defined acceptable outcome and the actual outcome of a given process.",imgSrc:re,action:!k&&r(x,{disabled:b,variant:"contained",color:"primary",onClick:N,children:"Get started"})});let c;l?c=r(ie,{}):d?.length?c=d?.map(t=>r(o,{xs:12,sm:12,md:6,lg:4,xl:3,item:!0,role:"listitem","aria-label":`check card ${t.id}`,children:r(se,{check:t})},t.id)):c=r(o,{xs:12,item:!0,role:"listitem","aria-label":"result",children:r(S,{title:"No checks found",description:"No checks matched your search. Consider changing search term and filters."})});const Z=m?.pageInfo.hasNextPage||C?.length>0;return w(o,{container:!0,direction:"row",className:s.container,children:[w(o,{container:!0,className:s.header,children:[r(oe,{searchPlaceholder:"Search Available Checks",isLoading:l||E,searchTerm:n,setSearchTerm:F,filterAlpha:g,handleAlphabeticalFilterChange:W,filterOwner:u,handleOwnerFilterChange:$,owners:L}),r(o,{item:!0,xs:2,className:s.headerButtons,children:!k&&r(x,{disabled:b,variant:"contained",color:"primary",onClick:N,className:s.createButton,children:"Create Check"})})]}),r(o,{container:!0,spacing:4,role:"list","aria-label":"checks",children:c}),Z&&r(o,{item:!0,xs:12,children:r(ae,{response:m,listingsPerPage:e,cursor:h,setCursor:p,prevCursors:C,setPrevCursors:P,labelPerPageDropdown:"Checks Per Page:",urlRoute:"checks?checksPerPage="})})]})};export{B as CheckEmptyState,ne as CheckListPage,I as CheckNoResults};
|
|
2
2
|
//# sourceMappingURL=CheckListPage.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{EntityRefLink as
|
|
1
|
+
import{jsxs as n,jsx as t}from"react/jsx-runtime";import{EntityRefLink as o}from"@backstage/plugin-catalog-react";import{makeStyles as r,List as a,Typography as s,ListItem as c,Tooltip as l,ListItemIcon as m,ListItemText as d}from"@material-ui/core";import h from"@material-ui/icons/Group";const p=r(i=>({root:{position:"relative",height:"100%"},cardSection:{marginBottom:i.spacing(2)},listItem:{padding:0},listItemText:{margin:0},iconContainer:{minWidth:"auto",paddingRight:i.spacing(1)},ownerLink:{"& span":{"&:hover":{textDecoration:"underline"}}}})),g=({check:i})=>{const e=p();return n(a,{dense:!0,disablePadding:!0,className:e.cardSection,children:[t(s,{variant:"overline",color:"textSecondary",children:"Check Details"}),n(c,{disableGutters:!0,className:e.listItem,children:[t(l,{title:"Owner",children:t(m,{className:e.iconContainer,children:t(h,{color:"inherit",fontSize:"small"})})}),t(d,{className:e.listItemText,primary:t(o,{entityRef:i.ownerEntityRef??"No Owner",hideIcon:!0,className:e.ownerLink})})]})]})};export{g as CheckMetadata};
|
|
2
2
|
//# sourceMappingURL=CheckMetadata.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useRouteRef as
|
|
1
|
+
import{jsx as n}from"react/jsx-runtime";import{useRouteRef as p}from"@backstage/core-plugin-api";import{usePermission as l}from"@backstage/plugin-permission-react";import{soundcheckCheckUpdatePermission as E,soundcheckCheckDeletePermission as P}from"@spotify/backstage-plugin-soundcheck-common";import{useCallback as t}from"react";import{useNavigate as v}from"react-router-dom";import"@backstage/catalog-model";import"@tanstack/react-query";import"../../../api.esm.js";import"../../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"../../../hooks/useSoundcheckAlert.esm.js";import{useConfirmationModal as x}from"../../../hooks/useConfirmationModal.esm.js";import{useDeleteCheck as I}from"../../../hooks/checks/useDeleteCheck.esm.js";import{checkDetailsRouteRef as M,checkEditRouteRef as b}from"../../../routes.esm.js";import{exportCheck as A}from"../../../utils/export.esm.js";import{SummaryCard as N}from"../../SummaryCard/SummaryCard.esm.js";import{CheckMetadata as S}from"./CheckMetadata.esm.js";const j=({check:o})=>{const{id:e,name:i,description:h,isEditable:m,ownerEntityRef:u}=o,r=v(),c=p(M),a=p(b),{loading:f,allowed:k}=l({permission:E,resourceRef:e}),{loading:C,allowed:R}=l({permission:P,resourceRef:e}),{showModal:s}=x(),{mutate:d}=I(),w=t(async()=>{await s({title:"Delete Check",message:`Are you sure you want to delete the check '${i??e}'?`})&&d(e)},[s,i,d,e]),y=t(()=>{r(c({checkId:e}))},[c,e,r]),D=t(()=>{r(a({checkId:e}))},[a,e,r]),g=t(()=>{A(o)},[o]);return n(N,{title:i??e,description:h,children:u&&n(S,{check:o}),handleView:y,handleEdit:m&&!f&&k?D:void 0,handleDelete:m&&!C&&R?w:void 0,handleExport:g,viewIsPrimaryAction:!0})};export{j as CheckSummaryCard};
|
|
2
2
|
//# sourceMappingURL=CheckSummaryCard.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import r
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{useSearchParams as s}from"react-router-dom";import{RESULTS_PER_PAGE as t}from"../../utils/filters.esm.js";import{CheckListPage as m}from"./CheckListPage/CheckListPage.esm.js";const P=()=>{const[c]=s(),e=c.get("checksPerPage"),o=e?parseInt(e,10):t;return r("div",{children:r(m,{checksPerPage:o})})};export{P as ChecksPage};
|
|
2
2
|
//# sourceMappingURL=ChecksPage.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Grid as t}from"@material-ui/core";import{Skeleton as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{Grid as t}from"@material-ui/core";import{Skeleton as i}from"@material-ui/lab";const o=()=>e(t,{item:!0,container:!0,"data-testid":"checks-skeleton",children:Array.from({length:10},(m,r)=>e(t,{xs:12,sm:12,md:6,lg:4,xl:3,item:!0,role:"listitem",children:e(i,{variant:"rect",height:385})},`loading-${r}`))});export{o as ChecksOverviewSkeleton};
|
|
2
2
|
//# sourceMappingURL=ChecksOverviewSkeleton.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import"../../contexts/TrackFormContext.esm.js";import{CheckFormProvider as o}from"../../contexts/CheckFormContext.esm.js";import"../../contexts/CampaignFormContext.esm.js";import"react";import"../../contexts/UserProvider.esm.js";import{ChecksPage as m}from"../ChecksPage/ChecksPage.esm.js";import"../SoundcheckHeader/SoundcheckHeader.esm.js";import"../SoundcheckHeader/SoundcheckHeaderContext.esm.js";import{useSetHeaderDefault as t}from"../SoundcheckHeader/useHeader.esm.js";const e=()=>(t(),r(o,{children:r(m,{})}));export{e as ChecksTab};
|
|
2
2
|
//# sourceMappingURL=ChecksTab.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Content as l}from"@backstage/core-components";import{usePermission as
|
|
1
|
+
import{jsxs as d,jsx as r}from"react/jsx-runtime";import{Content as l}from"@backstage/core-components";import{usePermission as p}from"@backstage/plugin-permission-react";import{soundcheckCollectorUpdatePermission as c}from"@spotify/backstage-plugin-soundcheck-common";import{useParams as f}from"react-router-dom";import{useGetCollectors as g}from"../../hooks/collectors/useGetCollectors.esm.js";import{LoadingIndicator as u}from"../LoadingIndicator/LoadingIndicator.esm.js";import{PageWarningMessage as C}from"../PageWarningMessage/PageWarningMessage.esm.js";import{Configurator as P}from"./Configurators/Configurator.esm.js";const h=()=>{const{integrationId:i}=f(),{data:n,isLoading:s}=g([i??""]),{loading:m,allowed:a}=p({permission:c}),o=n?.[0],t=s||m,e=a&&o?.isEditable;return d(l,{children:[t&&r(u,{}),r(C,{entityName:"Integration",entityId:i,showNotFound:!t&&!o,showCannotEdit:!t&&!e}),o&&e&&r(P,{selectedCollector:o})]})};export{h as CollectorPage};
|
|
2
2
|
//# sourceMappingURL=CollectorPage.esm.js.map
|
package/dist/components/CollectorPage/Configurators/AzureDevOps/AzureDevOpsConfigurator.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{zodResolver as
|
|
1
|
+
import{jsxs as p,Fragment as S,jsx as e}from"react/jsx-runtime";import{zodResolver as k}from"@hookform/resolvers/zod";import{makeStyles as B,Paper as A,Divider as n}from"@material-ui/core";import{useCallback as F}from"react";import{useForm as N,FormProvider as R}from"react-hook-form";import"@backstage/catalog-model";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"../../../../api.esm.js";import"../../../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"@spotify/backstage-plugin-soundcheck-common";import"../../../../hooks/useSoundcheckAlert.esm.js";import{useConfirmationModal as I}from"../../../../hooks/useConfirmationModal.esm.js";import{useNavigateBack as W}from"../../../../hooks/useNavigateBack.esm.js";import{useUpdateCollectorConfig as q}from"../../../../hooks/collectors/useUpdateCollectorConfig.esm.js";import{integrationsPageRouteRef as z}from"../../../../routes.esm.js";import{FooterButtons as w}from"../../../FooterButtons/FooterButtons.esm.js";import"../../../SoundcheckHeader/SoundcheckHeader.esm.js";import"../../../SoundcheckHeader/SoundcheckHeaderContext.esm.js";import{useHeader as x}from"../../../SoundcheckHeader/useHeader.esm.js";import{FactCollectionConfig as r}from"../Common/FactCollectionConfig.esm.js";import{defaultCollectorOption as l}from"../Common/CollectorOption.esm.js";import{collectorHeaderContent as j,confirmationModalContent as M}from"../Common/utils.esm.js";import{NumberOfDaysComponent as b}from"./NumberOfDaysComponent.esm.js";import{NumberOfWorkItemsComponent as T}from"./NumberOfWorkItemsComponent.esm.js";import{mapConfigToAzureDevOpsCollectorConfig as H,defaultAzureDevOpsConfig as U,numberOfDaysCollectorConfig as d,numberOfWorkItemsCollectorConfig as V,mapAzureDevOpsCollectorConfigToConfig as L}from"./utils.esm.js";import{azureDevOpsCollectorFormSchema as E}from"./validation.esm.js";const G=B(t=>({spacer:{height:t.spacing(8),width:"100%"},section:{marginBottom:t.spacing(2)}})),J=({disabled:t,selectedCollector:i})=>{const C=F(async(o,...s)=>{const a={enabled:!1,collectors:[]},P={repositoryDetails:o.repositoryDetails.enabled?o.repositoryDetails:l(),branchPolicies:o.branchPolicies.enabled?o.branchPolicies:l(),branchStatus:o.branchStatus.enabled?o.branchStatus:l(),numberOfBranches:o.numberOfBranches.enabled?o.numberOfBranches:a,numberOfActivePullRequests:o.numberOfActivePullRequests.enabled?o.numberOfActivePullRequests:a,numberOfWorkItems:o.numberOfWorkItems.enabled?o.numberOfWorkItems:a};return k(E)(P,...s)},[]),m=N({defaultValues:i?H(i.config):U(),mode:"onChange",resolver:C}),{formState:{isValid:h},handleSubmit:c}=m,f=G(),g=!h,{mutateAsync:O}=q(),[y,v]=W(z),{showModal:D}=I(),u=async o=>{if(!await D(M(i)))return;const s=L(o);await O({collectorId:i.id,config:s})&&v()};return x(j(i)),p(S,{children:[e(A,{className:f.section,children:e(R,{...m,children:p("form",{onSubmit:c(u),children:[e(r,{name:"repositoryDetails",label:"Repository Details",description:"Collects details about an entity's repository.",disabled:t}),e(n,{}),e(r,{name:"branchPolicies",label:"Branch Policies",description:"Collects branch policies information from an entity's repository.",disabled:t}),e(n,{}),e(r,{name:"branchStatus",label:"Branch Status",description:"Collects the latest branch status information from an entity's repository.",disabled:t}),e(n,{}),e(r,{name:"numberOfBranches",label:"Number Of Branches",description:"Collects the number of branches from an entity's repository.",disabled:t,FactDetailsComponent:b,multipleCollectors:{enable:!0,defaultConfig:d()}}),e(n,{}),e(r,{name:"numberOfActivePullRequests",label:"Number Of Active Pull Requests",description:"Collects the number of active pull requests from an entity's repository.",disabled:t,FactDetailsComponent:b,multipleCollectors:{enable:!0,defaultConfig:d()}}),e(n,{}),e(r,{name:"numberOfWorkItems",label:"Number Of Work Items",description:"Collects the number of work items from an entity's project.",disabled:t,FactDetailsComponent:T,multipleCollectors:{enable:!0,defaultConfig:V()}})]})})}),e("div",{className:f.section,children:e(w,{onCancel:y,saveButtonText:"Save",isLoading:!1,onSave:c(u),disableSave:g})})]})};export{J as AzureDevOpsConfigurator};
|
|
2
2
|
//# sourceMappingURL=AzureDevOpsConfigurator.esm.js.map
|
package/dist/components/CollectorPage/Configurators/AzureDevOps/NumberOfDaysComponent.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{makeStyles as u,Grid as
|
|
1
|
+
import{jsxs as l,jsx as r}from"react/jsx-runtime";import{makeStyles as u,Grid as s,Typography as p,TextField as c}from"@material-ui/core";import{useFormContext as g,Controller as d}from"react-hook-form";const f=u(e=>({root:{paddingTop:e.spacing(1)},textInput:{marginTop:0,width:"450px"},helperText:{marginLeft:0}})),x=({name:e,disabled:i})=>{const a=f(),{control:m}=g();return l(s,{container:!0,className:a.root,spacing:0,direction:"column",children:[r(d,{name:`${e}.factName`,control:m,render:({field:n,fieldState:{error:o}})=>l(s,{item:!0,children:[r(p,{variant:"subtitle2",children:"Fact Name"}),r(c,{...n,type:"text",variant:"outlined",margin:"dense",placeholder:"Fact Name",className:a.textInput,disabled:i,error:!!o,helperText:o?.message??"Fact name must be unique",FormHelperTextProps:{className:a.helperText}})]})}),r(d,{name:`${e}.numberOfDays`,control:m,render:({field:n,fieldState:{error:o}})=>l(s,{item:!0,children:[r(p,{variant:"subtitle2",children:e.startsWith("numberOfBranches")?"Last Commit More Than X Days Ago (Optional)":"Created More Than X Days Ago (Optional)"}),r(c,{...n,onChange:t=>{if(t.target.value){const h=parseInt(t.target.value,10)??null;n.onChange({...t,target:{...t.target,value:h}})}else n.onChange({...t,target:{...t.target,value:null}})},type:"number",variant:"outlined",margin:"dense",placeholder:"Number Of Days",className:a.textInput,disabled:i,error:!!o,helperText:o?.message??(e.startsWith("numberOfBranches")?"If not provided collects a total number of branches in the entity's repository":"If not provided collects a total number of active pull requests that target the default branch in the entity's repository"),FormHelperTextProps:{className:a.helperText}})]})})]})};export{x as NumberOfDaysComponent};
|
|
2
2
|
//# sourceMappingURL=NumberOfDaysComponent.esm.js.map
|
package/dist/components/CollectorPage/Configurators/AzureDevOps/NumberOfWorkItemsComponent.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{makeStyles as
|
|
1
|
+
import{jsxs as a,jsx as e,Fragment as y}from"react/jsx-runtime";import{makeStyles as I,Box as T,Grid as n,Typography as d,TextField as h,FormHelperText as v,IconButton as x}from"@material-ui/core";import N from"@material-ui/icons/Add";import q from"@material-ui/icons/Remove";import C from"classnames";import{highlight as F,languages as L}from"prismjs";import"prismjs/components/prism-sql";import{useFormContext as S,useFieldArray as k,Controller as c}from"react-hook-form";import $ from"react-simple-code-editor";import{FormFieldLabel as w}from"../../../FormFieldLabel/FormFieldLabel.esm.js";import*as E from"../Common/css/prism-dark-sql.css.esm.js";import{numberOfWorkItemsDataConfig as H}from"./utils.esm.js";const W=I(r=>({...E,root:{paddingTop:r.spacing(1)},factNameInput:{marginTop:0,width:"450px"},labelInput:{marginTop:0,width:"255px"},labelInputArea:{height:"40px"},queryInput:{marginTop:0,width:"420px",minHeight:"40px",maxHeight:"300px",overflowY:"scroll",outline:`1px solid ${r.palette.action.disabled}`,borderRadius:"4px",display:"grid","&:hover":{outlineColor:r.palette.textContrast}},queryInputError:{outlineColor:r.palette.error.main,"&:hover":{outlineColor:r.palette.error.main}},queryTextarea:{outline:"none"},helperText:{marginLeft:0},caption:{margin:r.spacing(2,0)}})),z=({name:r,disabled:l})=>{const t=W(),{control:m}=S(),{fields:u,insert:g,remove:f}=k({control:m,name:`${r}.data`});return a(T,{className:t.root,children:[e(c,{name:`${r}.factName`,control:m,render:({field:p,fieldState:{error:i}})=>a(n,{item:!0,children:[e(d,{variant:"subtitle2",children:"Fact Name"}),e(h,{...p,type:"text",variant:"outlined",margin:"dense",placeholder:"Fact Name",className:t.factNameInput,disabled:l,error:!!i,helperText:i?.message??"Fact name must be unique",FormHelperTextProps:{className:t.helperText}})]})}),a("div",{className:t.caption,children:[e(d,{variant:"subtitle1",children:"Queries"}),e(d,{variant:"caption",children:"List the WIQL syntax queries to filter work items by"})]}),e(n,{container:!0,spacing:0,direction:"column",children:u.map((p,i)=>a(n,{item:!0,container:!0,spacing:2,children:[a(n,{item:!0,children:[e(d,{variant:"subtitle2",children:"Label"}),e(c,{name:`${r}.data.${i}.name`,control:m,render:({field:s,fieldState:{error:o}})=>e(h,{...s,type:"text",variant:"outlined",margin:"dense",placeholder:"Label",className:t.labelInput,disabled:l,error:!!o,helperText:o?.message??" ",InputProps:{className:t.labelInputArea},FormHelperTextProps:{className:t.helperText}})})]}),a(n,{item:!0,children:[e(w,{title:"WIQL Query",docLink:"https://learn.microsoft.com/en-us/azure/devops/boards/queries/wiql-syntax?view=azure-devops"}),e(c,{name:`${r}.data.${i}.query`,control:m,render:({field:s,fieldState:{error:o}})=>a(y,{children:[e("div",{className:C(t.queryInput,o?t.queryInputError:void 0),children:e($,{...s,highlight:b=>F(b,L.sql,"sql"),onValueChange:s.onChange,padding:10,disabled:l,placeholder:"Example: SELECT [System.Id] FROM WorkItem",textareaClassName:t.queryTextarea})}),e(v,{className:t.helperText,error:!!o,children:o?.message??" "})]})})]}),a(n,{item:!0,alignContent:"center",children:[e(x,{onClick:()=>f(i),disabled:l||u.length===1,children:e(q,{fontSize:"small"})}),e(x,{onClick:()=>g(i+1,H()),disabled:l,children:e(N,{fontSize:"small"})})]})]},p.id))})]})};export{z as NumberOfWorkItemsComponent};
|
|
2
2
|
//# sourceMappingURL=NumberOfWorkItemsComponent.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{validNameRegex as
|
|
1
|
+
import{validFactNameRegex as d,invalidFactNameErrorMessage as b,validNameRegex as E,invalidNameErrorMessage as _}from"@spotify/backstage-plugin-soundcheck-common";import{z as e}from"zod";import{FIELD_IS_REQUIRED_MSG as m}from"../../../../utils/validation.esm.js";import{CollectorOptionSchema as l,BaseCollectorSchema as I}from"../Common/CollectorOption.esm.js";import{REPOSITORY_DETAILS_COLLECTOR_TYPE as N,BRANCH_POLICIES_COLLECTOR_TYPE as p,BRANCH_STATUS_COLLECTOR_TYPE as C}from"./utils.esm.js";const r="Fact name is not unique",i="Max 100 characters",u=e.object({factName:e.string().min(1,m).max(100,i).regex(d,b)}),O=u.merge(e.object({numberOfDays:e.number().min(0).optional().nullable()})).strict(),R=u.merge(e.object({data:e.array(e.strictObject({name:e.string().min(1,m).max(100,i).regex(E,_),query:e.string().min(1,m)})).min(1)})).strict(),n=a=>e.strictObject({enabled:e.boolean().optional(),collectors:e.array(I.extend({factDetails:a}))}),h=e.strictObject({repositoryDetails:l,branchPolicies:l,branchStatus:l,numberOfBranches:n(O),numberOfActivePullRequests:n(O),numberOfWorkItems:n(R)}).superRefine((a,o)=>{const f=[N,p,C,...a.numberOfBranches.collectors.map(t=>t.factDetails.factName),...a.numberOfActivePullRequests.collectors.map(t=>t.factDetails.factName),...a.numberOfWorkItems.collectors.map(t=>t.factDetails.factName)],s=f.filter((t,c)=>f.indexOf(t)!==c);s.length&&(a.numberOfBranches.collectors.forEach((t,c)=>{s.includes(t.factDetails.factName)&&o.addIssue({code:e.ZodIssueCode.custom,message:r,path:["numberOfBranches","collectors",c,"factDetails","factName"]})}),a.numberOfActivePullRequests.collectors.forEach((t,c)=>{s.includes(t.factDetails.factName)&&o.addIssue({code:e.ZodIssueCode.custom,message:r,path:["numberOfActivePullRequests","collectors",c,"factDetails","factName"]})}),a.numberOfWorkItems.collectors.forEach((t,c)=>{s.includes(t.factDetails.factName)&&o.addIssue({code:e.ZodIssueCode.custom,message:r,path:["numberOfWorkItems","collectors",c,"factDetails","factName"]})}))});export{r as FACT_NAME_IS_NOT_UNIQUE_MSG,i as MAX_100_CHARACTERS_MSG,h as azureDevOpsCollectorFormSchema};
|
|
2
2
|
//# sourceMappingURL=validation.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsxs as h,Fragment as b,jsx as o}from"react/jsx-runtime";import{zodResolver as v}from"@hookform/resolvers/zod";import{makeStyles as B,Paper as F}from"@material-ui/core";import{useCallback as Q}from"react";import{useForm as S,FormProvider as q}from"react-hook-form";import"@backstage/catalog-model";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"../../../../api.esm.js";import"../../../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"@spotify/backstage-plugin-soundcheck-common";import"../../../../hooks/useSoundcheckAlert.esm.js";import{useConfirmationModal as w}from"../../../../hooks/useConfirmationModal.esm.js";import{useNavigateBack as x}from"../../../../hooks/useNavigateBack.esm.js";import{useUpdateCollectorConfig as N}from"../../../../hooks/collectors/useUpdateCollectorConfig.esm.js";import{integrationsPageRouteRef as k}from"../../../../routes.esm.js";import{FooterButtons as M}from"../../../FooterButtons/FooterButtons.esm.js";import"../../../SoundcheckHeader/SoundcheckHeader.esm.js";import"../../../SoundcheckHeader/SoundcheckHeaderContext.esm.js";import{useHeader as P}from"../../../SoundcheckHeader/useHeader.esm.js";import{FactCollectionConfig as R}from"../Common/FactCollectionConfig.esm.js";import{collectorHeaderContent as T,confirmationModalContent as j}from"../Common/utils.esm.js";import{QueryFactDetailsComponent as A}from"./QueryFactDetailsComponent.esm.js";import{mapConfigToBigQueryCollectorConfig as D,defaultBigQueryConfig as H,queryCollectorConfig as V,mapBigQueryCollectorConfigToConfig as z}from"./utils.esm.js";import{bigQueryCollectorFormSchema as I}from"./validation.esm.js";const L=B(r=>({spacer:{height:r.spacing(8),width:"100%"},section:{marginBottom:r.spacing(2)}})),U=({disabled:r,selectedCollector:e})=>{const c=Q(async(t,...i)=>{const C={enabled:!1,collectors:[]},y={query:t.query.enabled?t.query:C};return v(I)(y,...i)},[]),a=S({defaultValues:e?D(e.config):H(),mode:"onChange",resolver:c}),{formState:{isValid:s},handleSubmit:m}=a,n=L(),f=!s,{mutateAsync:p}=N(),[d,u]=x(k),{showModal:g}=w(),l=async t=>{if(!await g(j(e)))return;const i=z(t);await p({collectorId:e.id,config:i})&&u()};return P(T(e)),h(b,{children:[o(F,{className:n.section,children:o(q,{...a,children:o("form",{onSubmit:m(l),children:o(R,{name:"query",label:"Query",description:"Collects data from BigQuery.",disabled:r,FactDetailsComponent:A,multipleCollectors:{enable:!0,defaultConfig:V()}})})})}),o("div",{className:n.section,children:o(M,{onCancel:d,saveButtonText:"Save",isLoading:!1,onSave:m(l),disableSave:f})})]})};export{U as BigQueryConfigurator};
|
|
2
2
|
//# sourceMappingURL=BigQueryConfigurator.esm.js.map
|