@spotify/backstage-plugin-soundcheck 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -0
- package/alpha/package.json +1 -1
- package/dist/alpha/pages.esm.js +1 -1
- package/dist/alpha.d.ts +1 -1
- package/dist/api.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/NoLevelBadge.esm.js +5 -1
- package/dist/components/Badges/PlaylistBadge.esm.js +1 -1
- package/dist/components/CampaignCreatePage/CampaignCreatePage.esm.js +2 -0
- package/dist/components/CampaignDetailsPage/CampaignChecks.esm.js +1 -1
- package/dist/components/CampaignDetailsPage/CampaignDetailRow.esm.js +1 -1
- package/dist/components/CampaignDetailsPage/CampaignDetails.esm.js +1 -1
- package/dist/components/CampaignDetailsPage/CampaignDetailsPage.esm.js +1 -1
- package/dist/components/CampaignDetailsPage/CampaignMilestones.esm.js +1 -1
- package/dist/components/CampaignDetailsPage/CampaignProgress.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/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/CampaignMilestonesStep.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/CampaignsPage/CampaignEmptyState.esm.js +1 -1
- package/dist/components/CampaignsPage/CampaignListPage/CampaignListPage.esm.js +1 -1
- package/dist/components/CampaignsPage/CampaignsPage.esm.js +1 -1
- package/dist/components/CampaignsPage/EditCampaignView.esm.js +1 -1
- package/dist/components/CertificationAccordion/CertificationAccordion.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/CertificationsPage/CertificationsPage.esm.js +1 -1
- package/dist/components/CheckCard/CheckCard.esm.js +1 -1
- package/dist/components/CheckCreatePage/CheckCreatePage.esm.js +2 -0
- package/dist/components/CheckDetails/ResultStateBox.esm.js +1 -1
- package/dist/components/CheckDryRun/CheckDryRun.esm.js +2 -0
- package/dist/components/CheckDryRun/CheckDryRunContext.esm.js +2 -0
- package/dist/components/CheckDryRun/CheckDryRunDetails.esm.js +2 -0
- package/dist/components/CheckDryRun/CheckDryRunDialog.esm.js +2 -0
- package/dist/components/CheckDryRun/CheckDryRunDialogButton.esm.js +2 -0
- package/dist/components/CheckDryRun/checkDryRunUtils.esm.js +2 -0
- 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 +2 -0
- 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 +2 -0
- package/dist/components/CheckForm/FormFields/RuleInput/Conditions/RuleConditionInput.esm.js +1 -1
- package/dist/components/CheckForm/FormFields/RuleInput/Conditions/ValueListContext.esm.js +2 -0
- package/dist/components/CheckForm/FormFields/RuleInput/Conditions/ValueListInput.esm.js +2 -0
- package/dist/components/CheckForm/FormFields/RuleInput/Conditions/styles.esm.js +1 -1
- package/dist/components/CheckForm/FormFields/RuleInput/Conditions/useRuleOptions.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/RuleInput/useRuleInputHandlers.esm.js +1 -1
- package/dist/components/CheckForm/FormFields/TeamDetailsInput/TeamDetailsInput.esm.js +1 -1
- package/dist/components/CheckForm/Steps/CheckDetailsStep.esm.js +1 -1
- package/dist/components/CheckForm/Steps/CheckReviewStep.esm.js +2 -0
- package/dist/components/CheckForm/Steps/CheckRulesStep.esm.js +1 -1
- package/dist/components/CheckForm/types/ExpressionType.esm.js +1 -1
- package/dist/components/CheckForm/useCheckForm.esm.js +1 -1
- package/dist/components/CheckForm/utils/checkFormUtils.esm.js +1 -1
- package/dist/components/CheckForm/utils/validation.esm.js +1 -1
- package/dist/components/CheckIcon/CheckIcon.esm.js +1 -1
- package/dist/components/CheckPage/CheckDetailsView.esm.js +1 -1
- package/dist/components/CheckPage/CheckEditView.esm.js +1 -1
- package/dist/components/CheckPage/CheckInsightsPage.esm.js +1 -1
- package/dist/components/CheckPage/CheckStatusBar.esm.js +1 -1
- package/dist/components/CheckPage/CheckStatusHistoryChart.esm.js +1 -1
- package/dist/components/CheckPage/FilterBar/FilterBar.esm.js +1 -1
- package/dist/components/CheckTemplatesPage/CheckTemplatesPage.esm.js +2 -0
- package/dist/components/CheckTemplatesPage/TemplateCategory.esm.js +2 -0
- package/dist/components/ChecksPage/CheckListPage/CheckListPage.esm.js +1 -1
- package/dist/components/ChecksPage/ChecksPage.esm.js +1 -1
- package/dist/components/ChecksTab/ChecksTab.esm.js +1 -1
- package/dist/components/CollectorPage/CollectorPage.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Common/CollectorOption.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/Common/FactCollectionConfig.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/Common/utils.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/Configurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/DataDog/DataDogConfigurator.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/DataDog/utils.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/Github/GithubConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Github/utils.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Jira/IssuesSearchFactDetailsComponent.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/Jira/JiraConfigurator.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/Jira/utils.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/Jira/validation.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/Kubernetes/KubernetesConfigurator.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/Kubernetes/utils.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/PagerDuty/IncidentsFactDetailsComponent.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/PagerDuty/PagerDutyConfigurator.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/PagerDuty/StatusesComponent.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/PagerDuty/utils.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/PagerDuty/validation.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/SCM/ExistsFactDetailsComponent.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/SCM/FactCollectionConfig.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/SCM/FactDetailsComponent.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/SCM/JsonFactDetailsComponent.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/SCM/RegexFactDetailsComponent.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/SCM/ScmConfigurator.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/SCM/utils.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/SCM/validation.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/SonarQube/MeasuresFactDetailsInput.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/SonarQube/MetricsInput.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/SonarQube/SonarQubeConfigurator.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/SonarQube/utils.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/SonarQube/validation.esm.js +2 -0
- package/dist/components/CollectorsPage/CollectorListPage/CollectorListPage.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/EntitySoundcheckCard/Card.esm.js +1 -1
- package/dist/components/ExpandableSection/ExpandableSection.esm.js +2 -0
- package/dist/components/FactExplorer/FactExplorer.esm.js +2 -0
- package/dist/components/FactExplorer/FactExplorerContext.esm.js +2 -0
- package/dist/components/FactExplorer/FactExplorerDialog.esm.js +2 -0
- package/dist/components/FactExplorer/useFactOptions.esm.js +2 -0
- package/dist/components/Filter/EntityAutocompletePicker.esm.js +1 -1
- package/dist/components/Filter/FilterPreviewTable/EntityTableToolbar.esm.js +1 -1
- package/dist/components/Filter/FilterPreviewTable/FilterPreviewTable.esm.js +1 -1
- package/dist/components/Filter/utils.esm.js +1 -1
- package/dist/components/FooterButtons/FooterButtons.esm.js +1 -1
- package/dist/components/FormControlledAutocomplete/ControlledAutocomplete.esm.js +2 -0
- package/dist/components/FormControlledAutocomplete/FormControlledAutocomplete.esm.js +2 -0
- package/dist/components/FormControlledAutocomplete/useLabelOptions.esm.js +2 -0
- package/dist/components/FormFieldLabel/FormFieldLabel.esm.js +2 -0
- package/dist/components/FormStepper/FormStepper.esm.js +1 -1
- package/dist/components/FormattedPreview/FormattedPreview.esm.js +4 -0
- package/dist/components/Frequency/FrequencyComponent.esm.js +1 -1
- package/dist/components/LevelCard/LevelCard.esm.js +1 -1
- package/dist/components/ListboxVirtualized/ListboxVirtualized.esm.js +2 -0
- package/dist/components/MultiSelectFilter/MultiSelectFilter.esm.js +1 -1
- package/dist/components/OverviewPage/CampaignBanner/CampaignBanner.esm.js +1 -1
- package/dist/components/OverviewPage/OverviewPageContent.esm.js +1 -1
- package/dist/components/OverviewTable/Cell/EntityRefCell.esm.js +1 -1
- package/dist/components/OverviewTable/Cell/HighestLevelBadge.esm.js +1 -1
- package/dist/components/OverviewTable/ResultsTableHeader.esm.js +1 -1
- package/dist/components/PassRateTable/PassRateTable.esm.js +3 -1
- package/dist/components/QuickstartPage/HowDoIListItem.esm.js +2 -0
- package/dist/components/QuickstartPage/QuickStartChecksCard.esm.js +2 -0
- package/dist/components/QuickstartPage/QuickstartCardBase.esm.js +2 -0
- package/dist/components/QuickstartPage/QuickstartCollectorConfigurationsCard.esm.js +2 -0
- package/dist/components/QuickstartPage/QuickstartPage.esm.js +2 -0
- package/dist/components/QuickstartPage/QuickstartTracksCard.esm.js +2 -0
- package/dist/components/QuickstartPage/WelcomeHelpSection.esm.js +7 -0
- package/dist/components/QuickstartPage/WelcomeModal.esm.js +2 -0
- package/dist/components/QuickstartPage/styles.esm.js +2 -0
- package/dist/components/RoutingPage/RoutingPage.esm.js +1 -1
- package/dist/components/SearchBar/SearchBar.esm.js +1 -1
- package/dist/components/SearchFilters/SearchFilters.esm.js +1 -1
- package/dist/components/SoundcheckDialog/SoundcheckDialog.esm.js +2 -0
- package/dist/components/SoundcheckHeader/Breadcrumbs.esm.js +2 -0
- package/dist/components/SoundcheckHeader/SoundcheckHeader.esm.js +2 -0
- package/dist/components/SoundcheckHeader/SoundcheckHeaderContext.esm.js +2 -0
- package/dist/components/SoundcheckHeader/headerUtil.esm.js +2 -0
- package/dist/components/SoundcheckHeader/useHeader.esm.js +2 -0
- package/dist/components/SummaryCard/SummaryCard.esm.js +1 -1
- package/dist/components/TechHealth/Filters/FacetFilter.esm.js +1 -1
- package/dist/components/TechHealth/TechHealth.esm.js +1 -1
- package/dist/components/TechHealthTabs/ActionColumn.esm.js +1 -1
- package/dist/components/TechHealthTabs/CheckResultsTab/CheckResultsTab.esm.js +1 -1
- package/dist/components/TrackCreatePage/TrackCreatePage.esm.js +2 -0
- package/dist/components/{EditTrackPage/EditTrackPage.esm.js → TrackEditPage/TrackEditPage.esm.js} +2 -2
- package/dist/components/TrackEditPage/TrackEditView.esm.js +2 -0
- package/dist/components/TrackForm/Steps/LevelsStep/ChecksSection/ChecksSection.esm.js +1 -1
- package/dist/components/TrackForm/Steps/TrackDetailsStep/TrackDescriptionInput/TrackDescriptionInput.esm.js +1 -1
- package/dist/components/TrackForm/Steps/TrackDetailsStep/TrackDocumentationUrlInput/TrackDocumentationUrlInput.esm.js +1 -1
- 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/trackFormUtils.esm.js +1 -1
- package/dist/components/TrackForm/utils/validation.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/utils.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/TracksPage/TrackListPage/TrackListPage.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/graphql/generated/index.esm.js +99 -33
- package/dist/hooks/catalog/useGetEntityRefs.esm.js +2 -0
- package/dist/hooks/checks/useCheckTemplates.esm.js +2 -0
- package/dist/hooks/checks/useExecuteCheck.esm.js +1 -1
- package/dist/hooks/checks/useGetChecks.esm.js +1 -1
- package/dist/hooks/collectors/useGetFactSchema.esm.js +1 -1
- package/dist/hooks/collectors/useUpdateCollectorConfig.esm.js +1 -1
- package/dist/hooks/graphqlKeys.esm.js +1 -1
- package/dist/hooks/useGetFact.esm.js +2 -0
- package/dist/hooks/useGetPathResolvers.esm.js +2 -0
- package/dist/images/gitlab-rgb.svg +1 -0
- package/dist/images/gitlab-white.svg +1 -0
- package/dist/images/jira-rgb.svg +25 -0
- package/dist/images/jira-white.svg +25 -0
- package/dist/images/sonarqube-rgb.svg +14 -0
- package/dist/images/sonarqube-white.svg +14 -0
- package/dist/index.d.ts +1 -1
- package/dist/plugin.esm.js +1 -1
- package/dist/routes.esm.js +1 -1
- package/dist/utils/export.esm.js +3 -3
- package/dist/utils/formStyles.esm.js +1 -1
- package/dist/utils/validation.esm.js +1 -1
- package/package.json +20 -17
- package/dist/components/CampaignForm/CampaignFormDescription.esm.js +0 -2
- package/dist/components/CampaignsPage/AddCampaignView.esm.js +0 -2
- package/dist/components/CheckForm/CheckFormDescription.esm.js +0 -2
- package/dist/components/CheckForm/FormFields/RuleInput/Conditions/ControlledAutocomplete.esm.js +0 -2
- package/dist/components/ChecksPage/AddCheckView.esm.js +0 -2
- package/dist/components/CollectorPage/Configurators/Github/FactCollectionConfig.esm.js +0 -2
- package/dist/components/EditTrackPage/EditTrackView.esm.js +0 -2
- package/dist/components/FormControlledSelect/FormControlledSelect.esm.js +0 -2
- package/dist/components/FullScreenDialog/FullScreenDialog.esm.js +0 -2
- package/dist/components/RoutingPage/Breadcrumbs.esm.js +0 -2
- package/dist/components/RoutingPage/utils.esm.js +0 -2
- package/dist/components/TracksPage/AddTrackView.esm.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,47 @@
|
|
|
1
1
|
# @spotify/backstage-plugin-soundcheck
|
|
2
2
|
|
|
3
|
+
## 0.14.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Upgraded Backstage to `v1.30.3`.
|
|
8
|
+
- Add check dry run feature to check form. This let's users test their checks. Requires latest version of soundcheck-backend and soundcheck-common.
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Add peerDependency on react-dom
|
|
13
|
+
- Fixes the 'View Detail' button to display a disabled view of the the link if the check is not defined in Soundcheck. This can happen if the check result is submitted directly through the API or directly added into the database.
|
|
14
|
+
- Fact Collectors can now return Collection Errors that will be visible on UI.
|
|
15
|
+
- Adds a 'Welcome Page' to Soundcheck to get users started.
|
|
16
|
+
- Added a tooltip to "NL" badges to clarify that they indicate the entity has not been certified at any level (i.e., Not Certified).
|
|
17
|
+
- Added No Code UI configuration option for SCM Fact Collector.
|
|
18
|
+
- Change: Move Campaign view page off of full screen dialog into its own page.
|
|
19
|
+
- Check Insights can now be used to view information about check results submitted to Soundcheck via it's REST API.
|
|
20
|
+
- Soundcheck forms for Check Tracks and Campaigns are now a regular page. Create pages now have a route, i.e. `/soundcheck/tracks/create`.
|
|
21
|
+
- Add NOT expression to rules input in check form.
|
|
22
|
+
- Added No Code UI configuration option for PagerDuty Fact Collector.
|
|
23
|
+
- Renamed Collectors tab to Integrations tab.
|
|
24
|
+
- New Feature: Add operator prefixes `all:, any:, none:` input to Check form.
|
|
25
|
+
- Misc minor tweaks.
|
|
26
|
+
- New Feature: Add Fact Explorer to Rule Input on Check Form.
|
|
27
|
+
- Added No Code UI configuration option for SonarQube Fact Collector.
|
|
28
|
+
- Update description texts on Form pages.
|
|
29
|
+
- Add support for check templates.
|
|
30
|
+
- Add Fact and List rule value inputs to Soundcheck Check form.
|
|
31
|
+
- Check Form owner select now autoselects the logged in user by default.
|
|
32
|
+
- Added No Code UI configuration option for Jira Fact Collector.
|
|
33
|
+
- Added No Code UI configuration option for Datadog Fact Collector.
|
|
34
|
+
- Soundcheck Page Headers are now dynamic based on the current page.
|
|
35
|
+
- Feat: Add json path selection to check form.
|
|
36
|
+
- Added No Code UI configuration option for Kubernetes Fact Collector.
|
|
37
|
+
- Minor naming updates for GitHub Fact Collector's No Code UI.
|
|
38
|
+
- Optimize and replace owner select on Track, Check, and Campaign forms with autocompletes.
|
|
39
|
+
- Portal: Fix check insight chart resizing.
|
|
40
|
+
- Add Check Result Details to Certifications page
|
|
41
|
+
- Updated dependencies
|
|
42
|
+
- @spotify/backstage-plugin-core@0.8.0
|
|
43
|
+
- @spotify/backstage-plugin-soundcheck-common@0.14.0
|
|
44
|
+
|
|
3
45
|
## 0.13.0
|
|
4
46
|
|
|
5
47
|
### Minor Changes
|
package/alpha/package.json
CHANGED
package/dist/alpha/pages.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{convertLegacyRouteRef as o,compatWrapper as t}from"@backstage/core-compat-api";import{createPageExtension as r}from"@backstage/frontend-plugin-api";import a from"react";import{rootRouteRef as n
|
|
1
|
+
import{convertLegacyRouteRef as o,compatWrapper as t}from"@backstage/core-compat-api";import{createPageExtension as r}from"@backstage/frontend-plugin-api";import a from"react";import{rootRouteRef as n}from"../routes.esm.js";const c=r({name:"SoundcheckRoutingPage",namespace:"soundcheck",routeRef:o(n),defaultPath:"/soundcheck",loader:()=>import("../components/RoutingPage/index.esm.js").then(e=>t(a.createElement(e.RoutingPage,null)))}),u=r({name:"overview",namespace:"soundcheck",routeRef:o(n),defaultPath:"/soundcheck",loader:()=>import("../components/OverviewPage/index.esm.js").then(e=>t(a.createElement(e.OverviewPage,null)))});export{u as soundcheckOverviewPage,c as soundcheckRoutingPage};
|
|
2
2
|
//# sourceMappingURL=pages.esm.js.map
|
package/dist/alpha.d.ts
CHANGED
|
@@ -5,6 +5,6 @@ import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api'
|
|
|
5
5
|
**
|
|
6
6
|
* The Soundcheck plugin for use within Backstage´s new frontend system
|
|
7
7
|
*/
|
|
8
|
-
declare const _default: _backstage_frontend_plugin_api.BackstagePlugin<{}, {}>;
|
|
8
|
+
declare const _default: _backstage_frontend_plugin_api.BackstagePlugin<{}, {}, {}>;
|
|
9
9
|
|
|
10
10
|
export { _default as default };
|
package/dist/api.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createApiRef as i}from"@backstage/core-plugin-api";import{GraphQLClient as c}from"graphql-request";import{getSdk as h}from"./graphql/generated/index.esm.js";const o=i({id:"plugin.soundcheck"}),u=r=>"response"in r&&"errors"in r.response,g=r=>"response"in r&&"message"in r.response;class y{#a;#s;#t;constructor(t){this.#a=t.fetchApi,this.#s=t.discoveryApi;const e=new c("/graphql",{fetch:async(a,s)=>{const n=`${await this.#s.getBaseUrl("soundcheck")}${a}`;return this.#a.fetch(n,s)}});this.#t=h(e)}#r=t=>u(t)?t.response?.errors?.[0].message??`${t}`:g(t)?t.response.message:`${t}`;#e=async t=>{try{return await t()}catch(e){throw new Error(`Error from Soundcheck backend: ${this.#r(e)}`)}};async getAllCertifications(t){return this.#e(async()=>{const{certifications:e}=await this.#t.getAllCertifications({entityRef:t});return e})}async getCertificationDetails(t){return this.#e(async()=>{const{certifications:e}=await this.#t.getCertificationDetails({entityRef:t});return e})}async getCertificationDetailsForTrack(t,e){return this.#e(async()=>{const{programCertification:a}=await this.#t.getCertificationDetailsForTrack({entityRef:t,programId:e});return a})}async getCheckResultDetails(t,e,a){return this.#e(async()=>{const{checkResult:s}=await this.#t.getCheckResultDetails({entityRef:t,programId:e,checkId:a});return s})}async getFacetsForOwner(t){return this.#e(async()=>{const{facetsForOwner:e}=await this.#t.getFacetsForOwner({ownerEntityRef:t});return e})}async getProgramOverviewForOwner(t,e,a,s){return this.#e(async()=>{const{programOverviewForOwner:n}=await this.#t.getProgramOverviewForOwner({ownerEntityRef:t,facet:e,first:a,after:s});return n})}async getTracks(t){return this.#e(async()=>{const{programs:e}=await this.#t.getTracks({filter:t});return e})}async createProgram(t){return this.#e(async()=>{const{program:e}=await this.#t.createProgram({input:t});return e})}async updateProgram(t){return this.#e(async()=>{const{program:e}=await this.#t.updateProgram({input:t});return e})}async deleteProgram(t){return this.#e(async()=>{const{programDeleted:e}=await this.#t.deleteProgram({programId:t});return e})}async getPlaylists(t){return this.#e(async()=>{const{playlists:e}=await this.#t.getPlaylists({entityRef:t});return e})}async getOperators(){return this.#e(async()=>{const{operators:t}=await this.#t.getOperators();return t})}async getChecks(t){return this.#e(async()=>{const{checkers:e}=await this.#t.getCheckers({filter:t});return e})}async createCheck(t){return this.#e(async()=>{const{check:e}=await this.#t.createCheck({input:t});return e})}async updateCheck(t){return this.#e(async()=>{const{check:e}=await this.#t.updateCheck({input:t});return e})}async deleteCheck(t){return this.#e(async()=>await this.#t.deleteChecker({checkerId:t}))}async executeCheck(t){return this.#e(async()=>{const{result:e}=await this.#t.executeCheck({input:t});return e})}async getCollectors(t){return this.#e(async()=>{const{collectors:e}=await this.#t.getCollectors({ids:t});return e})}async getFactSchema(t,e){if(!(!t||!e))return this.#e(async()=>{const{factSchema:a}=await this.#t.getFactSchemas({collectorId:t,factName:e});return a})}async updateCollectorConfig(t){return this.#e(async()=>{const{collector:e}=await this.#t.updateCollectorConfig({input:t});return e})}async getOverallCheckPassRates(t){return this.#e(async()=>await this.#t.getOverallCheckPassRates({filter:t}))}async getIndividualCheckPassRates(t){return this.#e(async()=>await this.#t.getIndividualCheckPassRates({filter:t}))}async getOverallTrackPassRate(t){return this.#e(async()=>await this.#t.getOverallTrackPassRate({filter:t}))}async getIndividualTrackPassRate(t){return this.#e(async()=>await this.#t.getIndividualTrackPassRate({filter:t}))}async getOverallEntityPassRates(t){return this.#e(async()=>await this.#t.getOverallEntityPassRates({filter:t}))}async getIndividualEntityPassRates(t){return this.#e(async()=>await this.#t.getIndividualEntityPassRates({input:t}))}async getOverallGroupPassRates(t){return this.#e(async()=>await this.#t.getOverallGroupPassRates({input:t}))}async getIndividualGroupPassRates(t){return this.#e(async()=>await this.#t.getIndividualGroupPassRates({input:t}))}async getEntityRefsForTechHealthFilter(t){return this.#e(async()=>await this.#t.getEntityRefsForTechHealthFilter({ownerEntityRef:t}))}async getTrackEntities(t){return this.#e(async()=>await this.#t.getTrackEntities({input:t}))}async getCampaigns(t){return this.#e(async()=>{const{campaigns:e}=await this.#t.getCampaigns({filter:t});return e})}async createCampaign(t){return this.#e(async()=>{const{campaign:e}=await this.#t.createCampaign({input:t});return e})}async updateCampaign(t){return this.#e(async()=>{const{campaign:e}=await this.#t.updateCampaign({input:t});return e})}async deleteCampaign(t){return this.#e(async()=>{const{campaignDeleted:e}=await this.#t.deleteCampaign({campaignId:t});return e})}async archiveCampaign(t){return this.#e(async()=>{const{campaignArchived:e}=await this.#t.archiveCampaign({campaignId:t});return e})}async getCampaignProgress(t,e,a){return this.#e(async()=>{const{campaignProgress:s}=await this.#t.getCampaignProgress({id:t,first:e,after:a});return s})}async getCampaignOwners(){return this.#e(async()=>{const{campaignOwners:t}=await this.#t.getCampaignOwners();return t})}async getCheckOwners(){return this.#e(async()=>{const{checkOwners:t}=await this.#t.getCheckOwners();return t})}async getTrackOwners(){return this.#e(async()=>{const{trackOwners:t}=await this.#t.getTrackOwners();return t})}async getCertificationStatus(t){return this.#e(async()=>this.#t.getCertificationStatus({input:t}))}async getCertificationStatusHistory(t){return this.#e(async()=>this.#t.getCertificationStatusHistory({input:t}))}async getCheckStatus(t){return this.#e(async()=>(await this.#t.getCheckStatus({input:t})).checkStatus)}async getCheckStatusHistory(t){return this.#e(async()=>(await this.#t.getCheckStatusHistory({input:t})).checkStatusHistory)}async getCheckEntities(t){return this.#e(async()=>await this.#t.getCheckEntities({input:t}))}}export{y as SoundcheckApi,o as soundcheckApiRef};
|
|
1
|
+
import{createApiRef as i}from"@backstage/core-plugin-api";import{GraphQLClient as c}from"graphql-request";import{getSdk as h}from"./graphql/generated/index.esm.js";const o=i({id:"plugin.soundcheck"}),u=r=>"response"in r&&"errors"in r.response,g=r=>"response"in r&&"message"in r.response;class y{#a;#s;#t;constructor(t){this.#a=t.fetchApi,this.#s=t.discoveryApi;const e=new c("/graphql",{fetch:async(a,s)=>{const n=`${await this.#s.getBaseUrl("soundcheck")}${a}`;return this.#a.fetch(n,s)}});this.#t=h(e)}#r=t=>u(t)?t.response?.errors?.[0].message??`${t}`:g(t)?t.response.message:`${t}`;#e=async t=>{try{return await t()}catch(e){throw new Error(`Error from Soundcheck backend: ${this.#r(e)}`)}};async getAllCertifications(t){return this.#e(async()=>{const{certifications:e}=await this.#t.getAllCertifications({entityRef:t});return e})}async getCertificationDetails(t){return this.#e(async()=>{const{certifications:e}=await this.#t.getCertificationDetails({entityRef:t});return e})}async getCertificationDetailsForTrack(t,e){return this.#e(async()=>{const{programCertification:a}=await this.#t.getCertificationDetailsForTrack({entityRef:t,programId:e});return a})}async getCheckResultDetails(t,e,a){return this.#e(async()=>{const{checkResult:s}=await this.#t.getCheckResultDetails({entityRef:t,programId:e,checkId:a});return s})}async getFacetsForOwner(t){return this.#e(async()=>{const{facetsForOwner:e}=await this.#t.getFacetsForOwner({ownerEntityRef:t});return e})}async getProgramOverviewForOwner(t,e,a,s){return this.#e(async()=>{const{programOverviewForOwner:n}=await this.#t.getProgramOverviewForOwner({ownerEntityRef:t,facet:e,first:a,after:s});return n})}async getTracks(t){return this.#e(async()=>{const{programs:e}=await this.#t.getTracks({filter:t});return e})}async createProgram(t){return this.#e(async()=>{const{program:e}=await this.#t.createProgram({input:t});return e})}async updateProgram(t){return this.#e(async()=>{const{program:e}=await this.#t.updateProgram({input:t});return e})}async deleteProgram(t){return this.#e(async()=>{const{programDeleted:e}=await this.#t.deleteProgram({programId:t});return e})}async getPlaylists(t){return this.#e(async()=>{const{playlists:e}=await this.#t.getPlaylists({entityRef:t});return e})}async getOperators(){return this.#e(async()=>{const{operators:t}=await this.#t.getOperators();return t})}async getChecks(t){return this.#e(async()=>{const{checkers:e}=await this.#t.getCheckers({filter:t});return e})}async createCheck(t){return this.#e(async()=>{const{check:e}=await this.#t.createCheck({input:t});return e})}async updateCheck(t){return this.#e(async()=>{const{check:e}=await this.#t.updateCheck({input:t});return e})}async deleteCheck(t){return this.#e(async()=>await this.#t.deleteChecker({checkerId:t}))}async executeCheck(t){return this.#e(async()=>{const{result:e}=await this.#t.executeCheck({input:t});return e})}async getCollectors(t){return this.#e(async()=>{const{collectors:e}=await this.#t.getCollectors({ids:t});return e})}async getFactSchema(t,e){if(!(!t||!e))return this.#e(async()=>{const{factSchema:a}=await this.#t.getFactSchemas({collectorId:t,factName:e});return a})}async updateCollectorConfig(t){return this.#e(async()=>{const{collector:e}=await this.#t.updateCollectorConfig({input:t});return e})}async getOverallCheckPassRates(t){return this.#e(async()=>await this.#t.getOverallCheckPassRates({filter:t}))}async getIndividualCheckPassRates(t){return this.#e(async()=>await this.#t.getIndividualCheckPassRates({filter:t}))}async getOverallTrackPassRate(t){return this.#e(async()=>await this.#t.getOverallTrackPassRate({filter:t}))}async getIndividualTrackPassRate(t){return this.#e(async()=>await this.#t.getIndividualTrackPassRate({filter:t}))}async getOverallEntityPassRates(t){return this.#e(async()=>await this.#t.getOverallEntityPassRates({filter:t}))}async getIndividualEntityPassRates(t){return this.#e(async()=>await this.#t.getIndividualEntityPassRates({input:t}))}async getOverallGroupPassRates(t){return this.#e(async()=>await this.#t.getOverallGroupPassRates({input:t}))}async getIndividualGroupPassRates(t){return this.#e(async()=>await this.#t.getIndividualGroupPassRates({input:t}))}async getEntityRefsForTechHealthFilter(t){return this.#e(async()=>await this.#t.getEntityRefsForTechHealthFilter({ownerEntityRef:t}))}async getTrackEntities(t){return this.#e(async()=>await this.#t.getTrackEntities({input:t}))}async getCampaigns(t){return this.#e(async()=>{const{campaigns:e}=await this.#t.getCampaigns({filter:t});return e})}async createCampaign(t){return this.#e(async()=>{const{campaign:e}=await this.#t.createCampaign({input:t});return e})}async updateCampaign(t){return this.#e(async()=>{const{campaign:e}=await this.#t.updateCampaign({input:t});return e})}async deleteCampaign(t){return this.#e(async()=>{const{campaignDeleted:e}=await this.#t.deleteCampaign({campaignId:t});return e})}async archiveCampaign(t){return this.#e(async()=>{const{campaignArchived:e}=await this.#t.archiveCampaign({campaignId:t});return e})}async getCampaignProgress(t,e,a){return this.#e(async()=>{const{campaignProgress:s}=await this.#t.getCampaignProgress({id:t,first:e,after:a});return s})}async getCampaignOwners(){return this.#e(async()=>{const{campaignOwners:t}=await this.#t.getCampaignOwners();return t})}async getCheckOwners(){return this.#e(async()=>{const{checkOwners:t}=await this.#t.getCheckOwners();return t})}async getTrackOwners(){return this.#e(async()=>{const{trackOwners:t}=await this.#t.getTrackOwners();return t})}async getCertificationStatus(t){return this.#e(async()=>this.#t.getCertificationStatus({input:t}))}async getCertificationStatusHistory(t){return this.#e(async()=>this.#t.getCertificationStatusHistory({input:t}))}async getCheckStatus(t){return this.#e(async()=>(await this.#t.getCheckStatus({input:t})).checkStatus)}async getCheckStatusHistory(t){return this.#e(async()=>(await this.#t.getCheckStatusHistory({input:t})).checkStatusHistory)}async getCheckEntities(t){return this.#e(async()=>await this.#t.getCheckEntities({input:t}))}async getPathResolvers(){return this.#e(async()=>{const{pathResolvers:t}=await this.#t.getPathResolvers();return t})}async getCheckTemplates(){return this.#e(async()=>{const{checkerTemplates:t}=await this.#t.getCheckTemplates();return t})}async getFact(t){return this.#e(async()=>{const{fact:e}=await this.#t.getFact(t);return e})}}export{y as SoundcheckApi,o as soundcheckApiRef};
|
|
2
2
|
//# sourceMappingURL=api.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{makeStyles as
|
|
1
|
+
import{makeStyles as m,Box as p,Tooltip as c}from"@material-ui/core";import d from"classnames";import l from"react";const a=24,f=11,t=e=>e==="small"?1:2,g=m({root:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:"50%",borderWidth:"2px",fontWeight:700,cursor:"default",width:({size:e})=>`${a*t(e)}px`,height:({size:e})=>`${a*t(e)}px`,fontSize:({size:e})=>`${f*t(e)}px`}}),x=({className:e,label:i,tooltip:o,size:s="small"})=>{const n=g({size:s}),r=l.createElement(p,{className:d(e,n.root),role:"img","aria-label":`${i} badge`},i);return o?l.createElement(c,{title:o},r):r};export{x as BaseBadge};
|
|
2
2
|
//# sourceMappingURL=BaseBadge.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{makeStyles as t}from"@material-ui/core";import m from"classnames";import a from"react";import{BaseBadge as
|
|
1
|
+
import{makeStyles as t}from"@material-ui/core";import m from"classnames";import a from"react";import{BaseBadge as s}from"./BaseBadge.esm.js";const l=t({root:{borderColor:"currentColor",borderStyle:"solid"}}),i=({className:o,size:r="small"})=>{const e=l();return a.createElement(s,{className:m(o,e.root),size:r,label:"C"})};export{i as CampaignBadge};
|
|
2
2
|
//# sourceMappingURL=CampaignBadge.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import t from"react";import{CampaignBadge as
|
|
1
|
+
import t from"react";import{CampaignBadge as l}from"./CampaignBadge.esm.js";import{LevelBadge as c}from"./LevelBadge.esm.js";import{NoLevelBadge as p}from"./NoLevelBadge.esm.js";const n=({badge:m,className:s,size:e="small",trackType:i,showTooltip:r})=>{const a=s||"";let o=t.createElement(p,{className:a,size:e,showTooltip:r});return i==="campaign"?o=t.createElement(l,{className:a,size:e}):m&&(o=t.createElement(c,{className:a,size:e,badge:m})),o};export{n as CertificationBadge};
|
|
2
2
|
//# sourceMappingURL=CertificationBadge.esm.js.map
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
import{makeStyles as
|
|
1
|
+
import{MarkdownContent as a}from"@backstage/core-components";import{makeStyles as s}from"@material-ui/core";import i from"classnames";import t from"react";import{BaseBadge as m}from"./BaseBadge.esm.js";const n=`
|
|
2
|
+
**No Level / Not Certified**
|
|
3
|
+
|
|
4
|
+
Pass all checks within a level to earn a certification badge.
|
|
5
|
+
`,d=s(e=>({root:{borderColor:e.palette.text.disabled,borderStyle:"dashed",color:e.palette.text.disabled}})),c=({className:e,showTooltip:o,size:l="small"})=>{const r=d();return t.createElement(m,{className:i(e,r.root),size:l,label:"NL",tooltip:o?t.createElement(a,{content:n}):null})};export{c as NoLevelBadge};
|
|
2
6
|
//# sourceMappingURL=NoLevelBadge.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{makeStyles as t}from"@material-ui/core";import
|
|
1
|
+
import{makeStyles as t}from"@material-ui/core";import s from"classnames";import l from"react";import{BaseBadge as m}from"./BaseBadge.esm.js";const a=t({root:{borderColor:"currentColor",borderStyle:"solid"}}),i=({className:o,size:r="small"})=>{const e=a();return l.createElement(m,{className:s(o,e.root),size:r,label:"\u25BA"})};export{i as PlaylistBadge};
|
|
2
2
|
//# sourceMappingURL=PlaylistBadge.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import t,{useEffect as s}from"react";import"../../contexts/TrackFormContext.esm.js";import"../../contexts/CheckFormContext.esm.js";import{CampaignFormProvider as r,useCampaignFormContext as c}from"../../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{useCreateCampaign as g}from"../../hooks/campaigns/useCreateCampaign.esm.js";import"../../hooks/useSoundcheckAlert.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{useNavigateBack as u}from"../../hooks/useNavigateBack.esm.js";import{campaignsPageRouteRef as l}from"../../routes.esm.js";import{CampaignForm as f}from"../CampaignForm/CampaignForm.esm.js";import"../SoundcheckHeader/SoundcheckHeader.esm.js";import"../SoundcheckHeader/SoundcheckHeaderContext.esm.js";import{useHeader as C}from"../SoundcheckHeader/useHeader.esm.js";const d=()=>{const{setIsLoading:e}=c(),{mutateAsync:m,isLoading:o}=g();s(()=>{e(o)},[e,o]);const[a,i]=u(l),n=async p=>{await m(p,{onSuccess:i})};return C({title:"Create a Campaign",description:"Create, monitor, and manage software updates or system transitions.",docLink:"https://backstage.spotify.com/docs/plugins/soundcheck/core-concepts/campaigns"}),t.createElement(r,null,t.createElement(f,{onSave:n,onCancel:a}))},E=()=>t.createElement(r,null,t.createElement(d,null));export{E as CampaignCreatePage};
|
|
2
|
+
//# sourceMappingURL=CampaignCreatePage.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Typography as
|
|
1
|
+
import{Typography as i}from"@material-ui/core";import{makeStyles as n}from"@material-ui/core/styles";import e from"react";import{DraggableChip as c}from"../DraggableChip/DraggableChip.esm.js";const l=n(t=>({sectionLabel:{marginBottom:t.spacing(2)},chipContainer:{display:"flex",flexDirection:"column",fontWeight:"bold",fontSize:t.typography.pxToRem(16),color:t.palette.grey[600],"& .Mui-disabled":{opacity:1}}})),m=({campaign:t})=>{const a=l(),o=t.track?.levels?.[0].checks??[];return e.createElement(e.Fragment,null,e.createElement(i,{color:"textPrimary",variant:"h5",className:a.sectionLabel},"Campaign Checks"),e.createElement("div",{className:a.chipContainer},o.length?o.map(r=>e.createElement(c,{key:r.id,chip:r,disabled:!0})):e.createElement(i,{variant:"body1",color:"textSecondary",style:{alignSelf:"center"}},"There are no checks for this campaign.")))};export{m as CampaignChecks};
|
|
2
2
|
//# sourceMappingURL=CampaignChecks.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Grid as
|
|
1
|
+
import{Grid as o,Typography as l}from"@material-ui/core";import{makeStyles as r}from"@material-ui/core/styles";import a from"react";const m=r(e=>({detailRow:{marginBottom:e.spacing(1),"&:last-child":{marginBottom:0}},label:{fontWeight:"bold",color:e.palette.text.primary},value:{marginLeft:e.spacing(1)}})),n=({label:e,value:i})=>{const t=m();return a.createElement(o,{item:!0,xs:12,container:!0,className:t.detailRow,alignItems:"center"},a.createElement(l,{variant:"subtitle2",className:t.label},e,":"),a.createElement(l,{variant:"body2",display:"inline",className:t.value},i))};export{n as CampaignDetailRow};
|
|
2
2
|
//# sourceMappingURL=CampaignDetailRow.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{EntityRefLink as g}from"@backstage/plugin-catalog-react";import{
|
|
1
|
+
import{EntityRefLink as g}from"@backstage/plugin-catalog-react";import{Grid as l}from"@material-ui/core";import{makeStyles as u}from"@material-ui/core/styles";import e from"react";import{CampaignDetailRow as n}from"./CampaignDetailRow.esm.js";const E=u(t=>({innerContainer:{padding:t.spacing(0,1),fontSize:t.typography.body2.fontSize},sectionLabel:{marginBottom:t.spacing(1)},ownerLink:{"& span":{"&:hover":{textDecoration:"underline"}}}})),a=t=>new Date(t).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}),d=({campaign:t})=>{const r=E(),{name:i,description:m,ownerEntityRef:c,startDate:p,targetCompletionDate:s,supportChannel:o}=t;return e.createElement(e.Fragment,null,e.createElement(l,{container:!0,className:r.innerContainer,spacing:2},e.createElement(l,{item:!0,container:!0,xs:12,spacing:0},e.createElement(n,{label:"Name",value:i}),e.createElement(n,{label:"Description",value:m}),e.createElement(n,{label:"Owner",value:e.createElement(g,{className:r.ownerLink,entityRef:c})}),o&&e.createElement(n,{label:"Support channel",value:o}),e.createElement(n,{label:"Start date",value:a(p)}),e.createElement(n,{label:"Target completion date",value:a(s)}))))};export{d as CampaignDetails,a as convertToReadableDate};
|
|
2
2
|
//# sourceMappingURL=CampaignDetails.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Grid as
|
|
1
|
+
import{Grid as n,Paper as m}from"@material-ui/core";import{makeStyles as c}from"@material-ui/core/styles";import e from"react";import{DndProvider as p}from"react-dnd";import{HTML5Backend as s}from"react-dnd-html5-backend";import{useParams as l}from"react-router-dom";import{useGetCampaign as g}from"../../hooks/campaigns/useGetCampaign.esm.js";import{EmptyCampaignState as d}from"../CampaignsPage/CampaignEmptyState.esm.js";import"../SoundcheckHeader/SoundcheckHeader.esm.js";import"../SoundcheckHeader/SoundcheckHeaderContext.esm.js";import{useHeader as E}from"../SoundcheckHeader/useHeader.esm.js";import{Loading as f}from"../TechHealth/Loading/Loading.esm.js";import{CampaignChecks as S}from"./CampaignChecks.esm.js";import{CampaignDetails as u}from"./CampaignDetails.esm.js";import{CampaignMilestones as C}from"./CampaignMilestones.esm.js";import{CampaignProgress as x}from"./CampaignProgress.esm.js";const N=c(t=>({root:{flexGrow:1,padding:t.spacing(2)},progressSection:{minHeight:350,fontSize:t.typography.body1.fontSize},contentSection:{overflow:"auto",padding:t.spacing(2)}})),v=()=>{const t=N(),{campaignId:r}=l(),{data:i,isLoading:o}=g(r??""),a=i?.edges?.[0]?.node;return E({title:a?.name??"View Campaign",description:a?.description}),o?e.createElement("div",{"data-testid":"loading-indicator"},e.createElement(f,null)):a?e.createElement("div",null,e.createElement(p,{backend:s},e.createElement(n,{container:!0,className:t.root,spacing:2,direction:"column"},e.createElement(n,{item:!0,xs:12},e.createElement(m,{className:t.contentSection},e.createElement(u,{campaign:a}))),e.createElement(n,{item:!0,xs:6},e.createElement(m,{className:t.contentSection},e.createElement(S,{campaign:a}))),e.createElement(n,{item:!0,xs:12,className:t.progressSection},e.createElement(m,{className:t.contentSection},e.createElement(x,{campaign:a}))),e.createElement(n,{item:!0,xs:12},e.createElement(m,{className:t.contentSection},e.createElement(C,{campaign:a})))))):e.createElement(d,null)};export{v as CampaignDetailsPage};
|
|
2
2
|
//# sourceMappingURL=CampaignDetailsPage.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Typography as
|
|
1
|
+
import{Typography as o,Grid as i,Divider as s}from"@material-ui/core";import{makeStyles as c}from"@material-ui/core/styles";import e from"react";import{CampaignDetailRow as l}from"./CampaignDetailRow.esm.js";const p=c(t=>({milestones:{flexGrow:1,padding:t.spacing(0,1)},sectionLabel:{marginBottom:t.spacing(2)},divider:{margin:`${t.spacing(2)}px 0`}})),g=({campaign:t})=>{const a=p(),n=t.milestones;return e.createElement(e.Fragment,null,e.createElement(o,{variant:"h5",className:a.sectionLabel,color:"textPrimary"},"Campaign Milestones"),e.createElement(i,{container:!0,className:a.milestones,spacing:2},n.length?n.map((r,m)=>e.createElement(i,{item:!0,container:!0,xs:12,key:m,spacing:2},e.createElement(i,{item:!0,xs:12},e.createElement(l,{label:"Name",value:r.name}),e.createElement(l,{label:"Description",value:r.description}),e.createElement(l,{label:"Goal pass rate",value:`${r.targetPercent}%`}),m<n.length-1&&e.createElement(s,{className:a.divider})))):e.createElement(o,{variant:"body1",color:"textSecondary"},"There are no milestones for this campaign.")))};export{g as CampaignMilestones};
|
|
2
2
|
//# sourceMappingURL=CampaignMilestones.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Typography as n}from"@material-ui/core";import{makeStyles as C}from"@material-ui/core/styles";import e from"react";import{useGetCampaignProgress as P}from"../../hooks/campaigns/useGetCampaignProgress.esm.js";import{OverviewTableSkeleton as f}from"../OverviewTable/OverviewTableSkeleton.esm.js";import"../Pagination/Pagination.esm.js";import{useCursorPagination as v,CursorPagination as b}from"../Pagination/CursorPagination.esm.js";import{CampaignResultsTable as S}from"./CampaignResultsTable.esm.js";const i=C(r=>({sectionLabel:{
|
|
1
|
+
import{Typography as n}from"@material-ui/core";import{makeStyles as C}from"@material-ui/core/styles";import e from"react";import{useGetCampaignProgress as P}from"../../hooks/campaigns/useGetCampaignProgress.esm.js";import{OverviewTableSkeleton as f}from"../OverviewTable/OverviewTableSkeleton.esm.js";import"../Pagination/Pagination.esm.js";import{useCursorPagination as v,CursorPagination as b}from"../Pagination/CursorPagination.esm.js";import{CampaignResultsTable as S}from"./CampaignResultsTable.esm.js";const i=C(r=>({sectionLabel:{marginBottom:r.spacing(2)},paginationContainer:{margin:r.spacing(0,0,0,-4)}})),o=25,t=()=>{const r=i();return e.createElement(n,{variant:"h5",className:r.sectionLabel,color:"textPrimary"},"Campaign Progress")},k=({campaign:r})=>{const m=i(),{cursor:s,pageSize:l,...c}=v({defaultPageSize:o,label:"entitiesPerPage"}),{data:a,isLoading:g,isError:p}=P(r.id,l,s);if(g)return e.createElement(e.Fragment,null,e.createElement(t,null),e.createElement("div",{"data-testid":"progress-indicator"},e.createElement(f,{checkCount:1,levelCount:1})));if(p)return e.createElement(e.Fragment,null,e.createElement(t,null),e.createElement(n,{color:"error"},"Failed to load campaign progress."));if(!a)return e.createElement(e.Fragment,null,e.createElement(t,null),e.createElement(n,null,"No campaign progress available."));const{totalCount:u,endCursor:E,prevCursor:d}=a;return e.createElement(e.Fragment,null,e.createElement(t,null),e.createElement(S,{results:a,campaignTrackId:r.track.id}),e.createElement("div",{className:m.paginationContainer},e.createElement(b,{...c,totalCount:u,defaultPageSize:o,endCursor:E,prevCursor:d,pageSize:l,rowsPerPageOptions:[o],labelRowsPerPage:"Entities per page:"})))};export{k as CampaignProgress};
|
|
2
2
|
//# sourceMappingURL=CampaignProgress.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Content as k}from"@backstage/core-components";import{Typography as y}from"@material-ui/core";import e from"react";import{Controller as v}from"react-hook-form";import"../../contexts/TrackFormContext.esm.js";import"../../contexts/CheckFormContext.esm.js";import{useCampaignFormContext as F}from"../../contexts/CampaignFormContext.esm.js";import"../../contexts/UserProvider.esm.js";import L from"../../hooks/useFeatureFlag.esm.js";import{formStyles as M}from"../../utils/formStyles.esm.js";import"@spotify/backstage-plugin-soundcheck-common";import{emptyFilters as A}from"../Filter/types.esm.js";import{FilterComponent as D}from"../Filter/FilterComponent.esm.js";import{FormStepper as N}from"../FormStepper/FormStepper.esm.js";import{useCampaignForm as O}from"./hooks/useCampaignForm.esm.js";import{CampaignDetailsStep as x}from"./Steps/CampaignDetailsStep/CampaignDetailsStep.esm.js";import{CampaignTrackStep as T}from"./Steps/CampaignTrackStep.esm.js";import{CampaignMilestonesStep as I}from"./Steps/CampaignMilestonesStep.esm.js";import{StepNameMapping as R}from"./types/CampaignFormTypes.esm.js";import{CAMPAIGN_FIELDS as V}from"./utils/campaignFormUtils.esm.js";var d=(t=>(t.Details="Enter campaign details",t.Checks="Add checks",t.Entities="Choose the affected entities (Optional)",t.Milestones="Set campaign milestones",t))(d||{});const B=({onSave:t,onCancel:g,selectedCampaign:i})=>{const n=M(),{isLoading:o,isReadOnly:f}=F(),{control:r,handleSubmit:m,errors:a,trigger:C,getValues:S,onSubmit:s,checkChips:h,checksLoading:b}=O(t,i),l=S(),u=l.detailsStep.startDate;L("debugMode")&&console.log(l);const p=[{label:"Enter campaign details",content:()=>e.createElement(x,{control:r,isLoading:o,disabled:!1,errors:a.detailsStep,startDate:u})},{label:"Add checks",content:()=>e.createElement(T,{control:r,isLoading:o||b,disabled:!1,errors:a.tracksStep,checkChips:h})},{label:"Choose the affected entities (Optional)",content:()=>e.createElement("div",{className:n.filters},e.createElement(y,{variant:"body2"},V.filter.description),e.createElement(v,{name:"filtersStep",control:r,render:({field:c})=>e.createElement(D,{value:c.value??A(),onChange:c.onChange})}))},{label:"Set campaign milestones",content:()=>e.createElement(I,{control:r,isLoading:o,disabled:!1,errors:a.milestonesStep})}],E=i?[...Array(p.length).keys()]:[0];return e.createElement(e.Fragment,null,e.createElement(k,{className:n.formWrapper},e.createElement("form",{onSubmit:m(s)},e.createElement(N,{onClose:g,handleSubmit:m,trigger:C,onSubmit:s,initialVisited:E,stepNameMap:R,steps:p,isLoading:o,isReadOnly:f,saveButtonText:"Save Campaign"}))))};export{B as CampaignForm,d as CampaignStepLabel};
|
|
2
2
|
//# sourceMappingURL=CampaignForm.esm.js.map
|
package/dist/components/CampaignForm/Steps/CampaignDetailsStep/CampaignDescriptionField.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{makeStyles as
|
|
1
|
+
import{makeStyles as m,Typography as s,TextField as p}from"@material-ui/core";import e from"react";import{Controller as d}from"react-hook-form";import{CAMPAIGN_FIELDS as c}from"../../utils/campaignFormUtils.esm.js";const g=m(t=>({helperText:{marginLeft:0},container:{marginBottom:t.spacing(2)}})),f=({control:t,errors:r,isLoading:n,disabled:a})=>{const i=g(),{description:o}=c.details;return e.createElement("div",{className:i.container},e.createElement(s,{variant:"subtitle2"},o.name),e.createElement(d,{name:"detailsStep.description",control:t,defaultValue:"",render:({field:l})=>e.createElement(p,{...l,FormHelperTextProps:{className:i.helperText},variant:"outlined",multiline:!0,minRows:4,fullWidth:!0,placeholder:o.placeholder,disabled:n||a,type:"text",margin:"dense",error:!!r?.description,helperText:r?.description?.message})}))};export{f as CampaignDescriptionField};
|
|
2
2
|
//# sourceMappingURL=CampaignDescriptionField.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{makeStyles as
|
|
1
|
+
import{makeStyles as i,Typography as s,TextField as p}from"@material-ui/core";import e from"react";import{Controller as d}from"react-hook-form";import{CAMPAIGN_FIELDS as c}from"../../utils/campaignFormUtils.esm.js";const g=i(t=>({helperText:{marginLeft:0},container:{marginBottom:t.spacing(2)}})),f=({control:t,errors:a,isLoading:n,disabled:o})=>{const l=g(),{name:r}=c.details;return e.createElement("div",{className:l.container},e.createElement(s,{variant:"subtitle2"},r.name),e.createElement(d,{name:"detailsStep.name",control:t,defaultValue:"",render:({field:m})=>e.createElement(p,{...m,FormHelperTextProps:{className:l.helperText},variant:"outlined",fullWidth:!0,placeholder:r.placeholder,disabled:n||o,type:"text",margin:"dense",error:!!a?.name,helperText:a?.name?.message??r.helperText})}))};export{f as CampaignNameField};
|
|
2
2
|
//# sourceMappingURL=CampaignNameField.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{makeStyles as
|
|
1
|
+
import{makeStyles as u,Typography as l}from"@material-ui/core";import{uniqBy as g}from"lodash";import e from"react";import"../../../../contexts/TrackFormContext.esm.js";import"../../../../contexts/CheckFormContext.esm.js";import"../../../../contexts/CampaignFormContext.esm.js";import{useLoggedInUser as E}from"../../../../contexts/UserProvider.esm.js";import{FormControlledAutocomplete as v}from"../../../FormControlledAutocomplete/FormControlledAutocomplete.esm.js";import{useLabelOptions as y}from"../../../FormControlledAutocomplete/useLabelOptions.esm.js";import"@material-ui/lab";import"../../../ListboxVirtualized/ListboxVirtualized.esm.js";import{useOptions as b}from"../../../GroupSelector/useOptions.esm.js";import{CAMPAIGN_FIELDS as h}from"../../utils/campaignFormUtils.esm.js";const w=u(t=>({helperText:{marginLeft:0},selectField:{display:"flex",flexDirection:"column",gap:t.spacing(1),marginBottom:t.spacing(2)},fieldContainer:{width:"250px"}})),x=({control:t,errors:m,isLoading:p,disabled:s})=>{const o=w(),{owner:i}=h.details,{options:c}=b(),{user:d,userEntityRef:a}=E();let r=g(c?.map(n=>({value:n.ref,label:n.name})),"value");const f=y(r);return a&&(r=[{value:a,label:d?.metadata.name},...r]),e.createElement("div",{className:o.selectField},e.createElement("header",null,e.createElement(l,{variant:"subtitle2"},i.name),e.createElement(l,{variant:"caption"},i.description)),e.createElement("div",{className:o.fieldContainer},e.createElement(v,{name:"detailsStep.ownerEntityRef",control:t,placeholder:"Owner",freeSolo:!1,disabled:s||p,helperText:m?.ownerEntityRef?.message??void 0,...f})))};export{x as CampaignOwnerField};
|
|
2
2
|
//# sourceMappingURL=CampaignOwnerField.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import h from"@date-io/luxon";import{makeStyles as N,Typography as m}from"@material-ui/core";import{KeyboardDatePicker as C}from"@material-ui/pickers/DatePicker";import{MuiPickersUtilsProvider as b}from"@material-ui/pickers/MuiPickersUtilsProvider";import e,{useState as i}from"react";import{Controller as D}from"react-hook-form";import{CAMPAIGN_FIELDS as k}from"../../utils/campaignFormUtils.esm.js";import{EndDateChips as F}from"./EndDateChips.esm.js";const S=N(t=>({helperText:{margin:t.spacing(.5,0)},selectFieldGroup:{display:"flex",flexDirection:"column",gap:t.spacing(2),marginBottom:t.spacing(2)},selectField:{display:"flex",flexDirection:"column",gap:t.spacing(1),padding:0},scheduleTitle:{fontWeight:"bold"},fieldContainer:{width:"250px"},select:{width:"100%",height:"100%",paddingRight:t.spacing(.5),"& button":{paddingTop:0,paddingBottom:0,"&:hover":{backgroundColor:"transparent"}}},dialog:{padding:0,"& [class*=MuiToolbar-root]":{backgroundColor:t.palette.background.paper,borderBottom:`1px solid ${t.palette.divider}`,"& [class*=MuiPickersToolbarText]":{color:t.palette.text.primary}},"& [class*=MuiDialogActions-root]":{borderTop:`1px solid ${t.palette.divider}`,padding:t.spacing(1),"& [class*=MuiButton-label]":{color:t.palette.text.primary}}}})),O=({control:t,errors:o,isLoading:n,disabled:s,startDate:x})=>{const a=S(),[v,d]=i(!1),[y,p]=i(!1),[E,T]=i(x),[P,g]=i(void 0),{startingDate:u,endingDate:f}=k.details;return e.createElement("div",{className:a.selectFieldGroup},e.createElement(m,{variant:"
|
|
1
|
+
import h from"@date-io/luxon";import{makeStyles as N,Typography as m}from"@material-ui/core";import{KeyboardDatePicker as C}from"@material-ui/pickers/DatePicker";import{MuiPickersUtilsProvider as b}from"@material-ui/pickers/MuiPickersUtilsProvider";import e,{useState as i}from"react";import{Controller as D}from"react-hook-form";import{CAMPAIGN_FIELDS as k}from"../../utils/campaignFormUtils.esm.js";import{EndDateChips as F}from"./EndDateChips.esm.js";const S=N(t=>({helperText:{margin:t.spacing(.5,0)},selectFieldGroup:{display:"flex",flexDirection:"column",gap:t.spacing(2),marginBottom:t.spacing(2)},selectField:{display:"flex",flexDirection:"column",gap:t.spacing(1),padding:0},scheduleTitle:{fontWeight:"bold"},fieldContainer:{width:"250px"},select:{width:"100%",height:"100%",paddingRight:t.spacing(.5),"& button":{paddingTop:0,paddingBottom:0,"&:hover":{backgroundColor:"transparent"}}},dialog:{padding:0,"& [class*=MuiToolbar-root]":{backgroundColor:t.palette.background.paper,borderBottom:`1px solid ${t.palette.divider}`,"& [class*=MuiPickersToolbarText]":{color:t.palette.text.primary}},"& [class*=MuiDialogActions-root]":{borderTop:`1px solid ${t.palette.divider}`,padding:t.spacing(1),"& [class*=MuiButton-label]":{color:t.palette.text.primary}}}})),O=({control:t,errors:o,isLoading:n,disabled:s,startDate:x})=>{const a=S(),[v,d]=i(!1),[y,p]=i(!1),[E,T]=i(x),[P,g]=i(void 0),{startingDate:u,endingDate:f}=k.details;return e.createElement("div",{className:a.selectFieldGroup},e.createElement(m,{variant:"subtitle1",className:a.scheduleTitle},"Campaign schedule"),e.createElement("div",{className:a.selectField},e.createElement(m,{variant:"subtitle2"},u.name),e.createElement("div",{className:a.fieldContainer},e.createElement(D,{control:t,name:"detailsStep.startDate",render:({field:r})=>{const{ref:M,...c}=r;return e.createElement(b,{utils:h},e.createElement(C,{inputRef:r.ref,...c,format:"MMMM dd, yyyy",autoOk:!0,FormHelperTextProps:{className:a.helperText},inputVariant:"outlined",className:a.select,error:!!o?.startDate,helperText:o?.startDate?.message??void 0,onChange:l=>{T(l),r.onChange(l)},open:v,disabled:n||s,DialogProps:{PaperProps:{className:a.dialog}},margin:"dense",size:"small",InputProps:{readOnly:!0,placeholder:u.placeholder,onClick:()=>d(!0),className:a.select},onOpen:()=>d(!0),onClose:()=>d(!1)}))}}))),e.createElement("div",{className:a.selectField},e.createElement(m,{variant:"subtitle2"},f.name),e.createElement("div",{className:a.fieldContainer},e.createElement(D,{name:"detailsStep.targetCompletionDate",control:t,render:({field:r})=>{const{ref:M,...c}=r;return e.createElement(b,{utils:h},e.createElement(C,{inputRef:r.ref,...c,disablePast:!0,format:"MMMM dd, yyyy",autoOk:!0,FormHelperTextProps:{className:a.helperText},inputVariant:"outlined",className:a.select,error:!!o?.targetCompletionDate,helperText:o?.targetCompletionDate?.message??void 0,onChange:l=>{r.onChange(l)},open:y,disabled:n||s,DialogProps:{PaperProps:{className:a.dialog}},InputProps:{readOnly:!0,placeholder:f.placeholder,onClick:()=>p(!0),className:a.select,margin:"dense"},margin:"dense",onOpen:()=>{g(void 0),p(!0)},onClose:()=>p(!1),ToolbarComponent:l=>e.createElement(F,{props:l,isLoading:n,disabled:!!s,startDate:E,selectedDuration:P,setSelectedDuration:g})}))}}))))};export{O as CampaignScheduleField};
|
|
2
2
|
//# sourceMappingURL=CampaignScheduleField.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{makeStyles as b,Divider as y,Grid as p,Typography as
|
|
1
|
+
import{makeStyles as b,Divider as y,Grid as p,Typography as m,TextField as E}from"@material-ui/core";import N from"@material-ui/icons/Remove";import e from"react";import{useFieldArray as C,Controller as u}from"react-hook-form";import{NoBorderButton as x}from"../../NoBorderButton/NoBorderButton.esm.js";import{CAMPAIGN_FIELDS as F}from"../utils/campaignFormUtils.esm.js";const S=b(a=>({milestoneHeader:{display:"flex",alignItems:"center",marginBottom:a.spacing(1)},divider:{margin:"20px 0"},helperText:{marginLeft:0},selectContainer:{width:"250px"},section:{marginBottom:a.spacing(2)}})),R=({control:a,errors:n,isLoading:s,disabled:l})=>{const r=S(),{name:o,description:d,passrate:c}=F.milestones,{fields:f,append:g,remove:h}=C({control:a,name:"milestonesStep.milestones"}),v=()=>g({name:"",description:"",passRate:"0"});return e.createElement(e.Fragment,null,f.map((T,t)=>e.createElement("div",{key:T.id},t!==0&&e.createElement(y,{className:r.divider}),e.createElement(p,{container:!0,spacing:1,className:r.milestoneHeader},e.createElement(p,{item:!0,xs:!0},e.createElement(m,{variant:"subtitle2"},o.name),e.createElement(u,{name:`milestonesStep.milestones.${t}.name`,control:a,defaultValue:"",render:({field:i})=>e.createElement(E,{...i,FormHelperTextProps:{className:r.helperText},variant:"outlined",fullWidth:!0,placeholder:o.placeholder,disabled:s||l,type:"text",margin:"dense",error:!!n?.milestones?.[t]?.name,helperText:n?.milestones?.[t]?.name?.message??o.helperText})})),t!==0&&!l&&e.createElement(p,{item:!0},e.createElement(x,{label:"Remove Milestone",startIcon:e.createElement(N,null),onClick:()=>h(t),disabled:l}))),e.createElement("div",{className:r.section},e.createElement(m,{variant:"subtitle2"},d.name),e.createElement(m,{variant:"caption"},d.description),e.createElement(u,{name:`milestonesStep.milestones.${t}.description`,control:a,defaultValue:"",render:({field:i})=>e.createElement(E,{...i,FormHelperTextProps:{className:r.helperText},variant:"outlined",multiline:!0,minRows:4,fullWidth:!0,placeholder:d.placeholder,disabled:s||l,type:"text",margin:"dense",error:!!n?.milestones?.[t]?.description,helperText:n?.milestones?.[t]?.description?.message})})),e.createElement("div",{className:r.section},e.createElement(m,{variant:"subtitle2"},c.name),e.createElement(m,{variant:"caption"},c.description),e.createElement("div",{className:r.selectContainer},e.createElement(u,{name:`milestonesStep.milestones.${t}.passRate`,control:a,defaultValue:"",render:({field:i})=>e.createElement(E,{...i,FormHelperTextProps:{className:r.helperText},variant:"outlined",fullWidth:!0,placeholder:c.placeholder,disabled:s||l,type:"number",margin:"dense",error:!!n?.milestones?.[t]?.passRate,helperText:n?.milestones?.[t]?.passRate?.message??void 0})}))))),e.createElement(x,{label:"Add Milestone",onClick:()=>v(),disabled:l}))};export{R as CampaignMilestonesStep};
|
|
2
2
|
//# sourceMappingURL=CampaignMilestonesStep.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{CAMPAIGN_NAME_MAX_LENGTH as e,MILESTONE_NAME_MAX_LENGTH as t}from"./validation.esm.js";const a={detailsStep:{name:"",description:"",ownerEntityRef:"",supportChannel:"",startDate:null,targetCompletionDate:null},tracksStep:{checks:[]},filtersStep:{selectedKinds:[],selectedTypes:[],selectedLifecycles:[],selectedOwners:[],selectedSystems:[],selectedTags:[]},milestonesStep:{milestones:[{name:"",description:"",passRate:"0"}]}},
|
|
1
|
+
import{CAMPAIGN_NAME_MAX_LENGTH as e,MILESTONE_NAME_MAX_LENGTH as t}from"./validation.esm.js";const a={detailsStep:{name:"",description:"",ownerEntityRef:"",supportChannel:"",startDate:null,targetCompletionDate:null},tracksStep:{checks:[]},filtersStep:{selectedKinds:[],selectedTypes:[],selectedLifecycles:[],selectedOwners:[],selectedSystems:[],selectedTags:[]},milestonesStep:{milestones:[{name:"",description:"",passRate:"0"}]}},s={details:{name:{name:"Campaign name",helperText:`Max ${e} characters`,placeholder:"Example: Check for latest version of javascript and Readme files"},description:{name:"Campaign description",placeholder:"Example: Check for the latest versions of JavaScript and README files to meet this quarter's quality standards."},owner:{name:"Campaign owner",description:"Add a team as the owner of this Campaign."},support:{name:"Support channel (Optional)",description:"Set up a Slack channel for notifications.",placeholder:"Channel name"},startingDate:{name:"Starting date",placeholder:"Starting date"},endingDate:{name:"Ending date",placeholder:"Ending date"}},milestones:{name:{name:"Milestone name",helperText:`Max ${t} characters`,placeholder:"Example: 80% pass rate"},description:{name:"Milestone description",description:"Provide a detailed description of this milestone, outlining its objectives.",placeholder:"Example: The track in my campaign expects a pass rate of 80% or above"},passrate:{name:"Milestone pass rate",description:"Enter the pass rate that your tracks have to meet.",placeholder:"Example: 80%"}},filter:{description:"Use the filters below to narrow the scope of the Campaign. Only Entities that match the selected filters will be monitored. For example, selecting 'Kind' as 'Component' will ensure that this Check only applies to Entities categorized as 'Component,' excluding others like Groups, Users, and APIs."}};export{s as CAMPAIGN_FIELDS,a as DEFAULT_FORM_VALUES};
|
|
2
2
|
//# sourceMappingURL=campaignFormUtils.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{TrackCheckSchema as o,CampaignDetailsSchema as
|
|
1
|
+
import{TrackCheckSchema as o,CampaignDetailsSchema as S}from"@spotify/backstage-plugin-soundcheck-common";import{z as t}from"zod";import{CHECK_IS_REQUIRED_MSG as p,FIELD_IS_REQUIRED_MSG as a,FiltersSchema as E}from"../../../utils/validation.esm.js";const i=0,r=100,_=100,s=100,c="Ending date must come after the Starting Date",l=t.strictObject({checks:t.array(o.extend({key:t.string().optional()})).min(1,p)}),g=t.strictObject({id:t.number().optional(),name:t.string().min(1,a).max(s,`Input must be less than ${s} characters`),description:t.string().min(1,a),passRate:t.coerce.number().min(i,`Minimum pass rate is ${i}%`).max(r,`Maximum pass rate is ${r}%`)}),D=t.strictObject({milestones:t.array(g).min(1,a)}),m=t.coerce.string().nullable().refine(e=>e!==null,{message:a}),M=t.strictObject({startDate:m,targetCompletionDate:m}),A=({startDate:e,targetCompletionDate:n})=>e&&n?new Date(e)<new Date(n):!0,T=S.merge(M),h=e=>e.refine(A,{message:c,path:["targetCompletionDate"]}),I=t.strictObject({detailsStep:h(T),tracksStep:l,filtersStep:E,milestonesStep:D});export{_ as CAMPAIGN_NAME_MAX_LENGTH,c as END_AFTER_START_DATE_MSG,r as MILESTONE_MAX_PASS_RATE,i as MILESTONE_MIN_PASS_RATE,s as MILESTONE_NAME_MAX_LENGTH,m as campaignDateTimeSchema,I as campaignFormSchema};
|
|
2
2
|
//# sourceMappingURL=validation.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{usePermission as
|
|
1
|
+
import{useRouteRef as m}from"@backstage/core-plugin-api";import{usePermission as n}from"@backstage/plugin-permission-react";import{Button as s}from"@material-ui/core";import{soundcheckCampaignCreatePermission as p}from"@spotify/backstage-plugin-soundcheck-common";import e from"react";import{useNavigate as c}from"react-router-dom";import l from"../../images/no-results.svg";import{campaignCreateRouteRef as g}from"../../routes.esm.js";import{EmptyState as d}from"../EmptyState/EmptyState.esm.js";var a=(t=>(t.title="Create a campaign",t.description="A soundcheck campaign allows you to define a tech health goal, assign it to a team and monitor progress.",t.callToAction="Get started",t))(a||{});const f=()=>{const{loading:t,allowed:o}=n({permission:p}),i=c(),r=m(g);return e.createElement(d,{title:"Create a campaign",description:"A soundcheck campaign allows you to define a tech health goal, assign it to a team and monitor progress.",imgSrc:l,action:!t&&e.createElement(s,{disabled:!o,variant:"contained",color:"primary",onClick:()=>i(r())},"Get started")})};export{a as CampaignEmptyState,f as EmptyCampaignState};
|
|
2
2
|
//# sourceMappingURL=CampaignEmptyState.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useApi as
|
|
1
|
+
import{useRouteRef as Y,useApi as $,featureFlagsApiRef as q}from"@backstage/core-plugin-api";import{usePermission as z}from"@backstage/plugin-permission-react";import{makeStyles as J,Grid as i,Button as K}from"@material-ui/core";import{soundcheckCampaignCreatePermission as Q}from"@spotify/backstage-plugin-soundcheck-common";import e,{useState as n,useEffect as U}from"react";import{useNavigate as V}from"react-router-dom";import X from"react-use/lib/useDebounce";import{useGetCampaignOwners as Z}from"../../../hooks/campaigns/useGetCampaignOwners.esm.js";import{useGetCampaigns as _}from"../../../hooks/campaigns/useGetCampaigns.esm.js";import{campaignCreateRouteRef as ee}from"../../../routes.esm.js";import{FilterDefault as p}from"../../../utils/filters.esm.js";import{EmptyCampaignState as ae}from"../CampaignEmptyState.esm.js";import{EmptyState as te}from"../../EmptyState/EmptyState.esm.js";import{Pagination as re}from"../../Pagination/Pagination.esm.js";import{SearchFilters as ne}from"../../SearchFilters/SearchFilters.esm.js";import{CampaignsOverviewSkeleton as ie}from"./CampaignsOverviewSkeleton.esm.js";import{CampaignSummaryCard as se}from"./CampaignSummaryCard.esm.js";import oe from"./useArchiveConfirmationModal.esm.js";var E=(a=>(a.title="No campaigns found",a.description="No campaigns matched your search. Consider changing search term and filters.",a))(E||{});const me=J(a=>({headerButtons:{display:"flex",gap:a.spacing(1),flexWrap:"nowrap",justifyContent:"end",alignItems:"end"},header:{padding:a.spacing(0,0,1)},container:{padding:a.spacing(3),gap:a.spacing(3)},createButton:{lineHeight:"1.25rem",paddingTop:a.spacing(1.5),paddingBottom:a.spacing(1.5)}})),le=({campaignsPerPage:a,currentCursor:v})=>{const s=me(),[d,N]=n(v),[m,y]=n(""),[S,w]=n(""),[u,x]=n(p.Alpha),[f,b]=n(p.Owner),[h,B]=n(p.Status),{data:A,isLoading:k}=Z();X(()=>{w(m)},500,[m]);const{loading:F,allowed:I}=z({permission:Q}),{data:r,isLoading:l}=_({ids:void 0,first:a,after:d,orderAlphabetical:u,searchByOwner:f,searchByName:S,searchByStatus:h}),R=V(),O=Y(ee),L=()=>R(O()),[c,G]=n(r),g=c?.edges.map(t=>t.node),[C,T]=n([]),P=$(q),D=!P.getRegisteredFlags().find(t=>t.name==="soundcheck-enable-campaigns")||P.isActive("soundcheck-enable-campaigns"),W=!I||!D,j=t=>{x(t.target.value)},H=t=>{b(t.target.value)},M=t=>{B(t.target.value)};if(U(()=>{r&&G(()=>({totalCount:r.totalCount,edges:r.edges,pageInfo:{startCursor:r.pageInfo.startCursor,endCursor:r.pageInfo.endCursor,hasNextPage:r?.pageInfo.hasNextPage??!1,hasPreviousPage:r?.pageInfo.hasPreviousPage??!1}}))},[r]),!l&&!g)return e.createElement(ae,null);let o;return l?o=e.createElement(ie,null):g?.length?o=g.map(t=>e.createElement(i,{key:t.id,xs:12,sm:12,md:6,lg:4,xl:3,item:!0,role:"listitem","aria-label":"result"},e.createElement(oe,null,e.createElement(se,{campaign:t})))):o=e.createElement(i,{xs:12,item:!0,role:"listitem","aria-label":"result"},e.createElement(te,{title:"No campaigns found",description:"No campaigns matched your search. Consider changing search term and filters."})),e.createElement(i,{container:!0,direction:"row",className:s.container},e.createElement(i,{container:!0,className:s.header},e.createElement(ne,{searchPlaceholder:"Search Available Campaigns",isLoading:l||k,searchTerm:m,setSearchTerm:y,filterAlpha:u,handleAlphabeticalFilterChange:j,filterOwner:f,handleOwnerFilterChange:H,filterStatus:h,handleStatusFilterChange:M,owners:A}),e.createElement(i,{item:!0,xs:2,className:s.headerButtons},!F&&e.createElement(K,{disabled:W,variant:"contained",color:"primary",onClick:L,className:s.createButton},"Create Campaign"))),e.createElement(i,{container:!0,spacing:4,role:"list","aria-label":"campaigns"},o),(c?.pageInfo.hasNextPage||C?.length>0)&&e.createElement(i,{item:!0,xs:12},e.createElement(re,{response:c,listingsPerPage:a,cursor:d,setCursor:N,prevCursors:C,setPrevCursors:T,labelPerPageDropdown:"Campaigns Per Page:",urlRoute:"campaigns?campaignsPerPage="})))};export{le as CampaignListPage,E as CampaignNoResults};
|
|
2
2
|
//# sourceMappingURL=CampaignListPage.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import r from"react";import{useSearchParams as a}from"react-router-dom";import"../../contexts/TrackFormContext.esm.js";import"../../contexts/CheckFormContext.esm.js";import{CampaignFormProvider as o}from"../../contexts/CampaignFormContext.esm.js";import"../../contexts/UserProvider.esm.js";import{RESULTS_PER_PAGE as i}from"../../utils/filters.esm.js";import"../SoundcheckHeader/SoundcheckHeader.esm.js";import"../SoundcheckHeader/SoundcheckHeaderContext.esm.js";import{useSetHeaderDefault as p}from"../SoundcheckHeader/useHeader.esm.js";import{CampaignListPage as n}from"./CampaignListPage/CampaignListPage.esm.js";import"./CampaignListPage/CampaignTypes.esm.js";const g=()=>{const[m]=a(),e=m.get("campaignsPerPage"),t=e?parseInt(e,10):i;return p(),r.createElement(o,null,r.createElement("div",null,r.createElement(n,{campaignsPerPage:t})))};export{g as CampaignsPage};
|
|
2
2
|
//# sourceMappingURL=CampaignsPage.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import t,{useEffect as d}from"react";import{useParams as g}from"react-router-dom";import"../../contexts/TrackFormContext.esm.js";import"../../contexts/CheckFormContext.esm.js";import{useCampaignFormContext as u}from"../../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"../../hooks/useSoundcheckAlert.esm.js";import{useUpdateCampaign as l}from"../../hooks/campaigns/useUpdateCampaign.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{useNavigateBack as f}from"../../hooks/useNavigateBack.esm.js";import{useGetCampaign as C}from"../../hooks/campaigns/useGetCampaign.esm.js";import{campaignsPageRouteRef as E}from"../../routes.esm.js";import{CampaignForm as y}from"../CampaignForm/CampaignForm.esm.js";import"../SoundcheckHeader/SoundcheckHeader.esm.js";import"../SoundcheckHeader/SoundcheckHeaderContext.esm.js";import{useHeader as L}from"../SoundcheckHeader/useHeader.esm.js";import{Loading as h}from"../TechHealth/Loading/Loading.esm.js";import{EmptyCampaignState as k}from"./CampaignEmptyState.esm.js";const F=()=>{L({title:"Update Campaign",description:"Update your campaign, including schedule, milestones, and other associated details.",docLink:"https://backstage.spotify.com/docs/plugins/soundcheck/core-concepts/campaigns"});const[i,r]=f(E),{campaignId:p}=g(),{setIsLoading:e}=u(),{mutateAsync:n,isLoading:o}=l(),{data:s,isLoading:m}=C(p??""),a=s?.edges?.[0]?.node;return d(()=>e(o),[e,o]),!m&&!a?t.createElement(k,null):t.createElement(t.Fragment,null,m?t.createElement(h,null):t.createElement(y,{onSave:async c=>{await n(c,{onSuccess:r})},onCancel:i,selectedCampaign:a}))};export{F as EditCampaignView};
|
|
2
2
|
//# sourceMappingURL=EditCampaignView.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useEntity as u}from"@backstage/plugin-catalog-react";import{styled as o,Accordion as f,AccordionSummary as E,AccordionDetails as b,makeStyles as y,Box as h}from"@material-ui/core";import R from"@material-ui/icons/ExpandMore";import e,{useRef as
|
|
1
|
+
import{useEntity as u}from"@backstage/plugin-catalog-react";import{styled as o,Accordion as f,AccordionSummary as E,AccordionDetails as b,makeStyles as y,Box as h}from"@material-ui/core";import R from"@material-ui/icons/ExpandMore";import e,{useRef as v}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{useCertificationDetailsForTrack as x}from"../../hooks/certifications/useCertificationDetailsForTrack.esm.js";import"../../hooks/useSoundcheckAlert.esm.js";import"../../hooks/useConfirmationModal.esm.js";import"react-router-dom";import{AlertPanel as k}from"../AlertPanel/AlertPanel.esm.js";import"../CertificationSidebar/CertificationSidebar.esm.js";import{CertificationSummary as T}from"../CertificationSidebar/CertificationSummary.esm.js";import{CertificationSidebarSkeleton as I}from"../CertificationSidebar/skeletons/CertificationSidebarSkeleton.esm.js";import"@material-ui/lab";import{CertificationLevel as L}from"../CertificationSidebar/CertificationLevel.esm.js";const C=o(f)(({theme:t})=>({margin:"0",border:`1px solid ${t.palette.divider}`,borderRadius:0,"&.Mui-expanded":{borderRadius:0},"&:first-child":{borderTopLeftRadius:0,borderTopRightRadius:0},"&:last-child":{borderBottomLeftRadius:0,borderBottomRightRadius:0},"&:not(:first-child)":{borderTop:`1px solid ${t.palette.divider}`},"&:not(:last-child)":{marginBottom:t.spacing(1)}})),S=o(({...t})=>e.createElement(E,{classes:{content:"content",expanded:"expanded"},...t}))(({theme:t})=>({borderRadius:0,paddingTop:0,paddingLeft:0,paddingRight:t.spacing(1),"& > .content":{margin:"0 !important",padding:"0 !important"},"& > .content.expanded":{margin:"0 !important",padding:"0 !important"}})),A=o(b)(()=>({margin:"0 !important",borderRadius:0,padding:0})),n=y(()=>({sidebar:{width:"100%"}})),B=({playlistId:t,trackId:i,checkId:d})=>{const m=n(),{entity:c}=u(),p=v(null),{data:r,isLoading:l,isError:s}=x(c,i);if(s)return e.createElement("div",null,e.createElement(h,{padding:2},e.createElement(k,{severity:"error",title:"Error loading certification"})));if(l||!i)return e.createElement(I,null);if(!r)return null;const g=r.program.type==="campaign";return e.createElement(C,{ref:p,defaultExpanded:!0,elevation:0},e.createElement(S,{expandIcon:e.createElement(R,null),"aria-controls":"certification-content",id:"certification-summary"},e.createElement(T,{name:r.program.name,badge:r.highestLevel?.badge,description:r.program.description,documentationUrl:r.program.documentationURL,trackType:r.program.type})),e.createElement(A,null,e.createElement("div",{className:m.sidebar},r?.levels.map(a=>e.createElement(L,{key:a.ordinal,level:a,checkId:d,trackId:i,playlistId:t,isCampaign:g})))))};export{B as CertificationAccordion,n as useStyles};
|
|
2
2
|
//# sourceMappingURL=CertificationAccordion.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{MarkdownContent as i,Link as l}from"@backstage/core-components";import{makeStyles as p,Typography as s}from"@material-ui/core";import e from"react";import{CertificationBadge as d}from"../Badges/CertificationBadge.esm.js";const o=p(t=>({description:{padding:0,margin:0,display:"block","& p":{margin:0}},root:{padding:t.spacing(2),margin:0,display:"grid",gridTemplateColumns:"min-content auto",gridGap:t.spacing(2)},title:{fontSize:t.typography.pxToRem(18),fontWeight:700,lineHeight:1.235,marginBottom:"6px"},level:{textTransform:"uppercase",color:t.palette.text.secondary,fontWeight:700,letterSpacing:"1px"}}));function g({description:t,documentationUrl:
|
|
1
|
+
import{MarkdownContent as i,Link as l}from"@backstage/core-components";import{makeStyles as p,Typography as s}from"@material-ui/core";import e from"react";import{CertificationBadge as d}from"../Badges/CertificationBadge.esm.js";const o=p(t=>({description:{padding:0,margin:0,display:"block","& p":{margin:0}},root:{padding:t.spacing(2),margin:0,display:"grid",gridTemplateColumns:"min-content auto",gridGap:t.spacing(2)},title:{fontSize:t.typography.pxToRem(18),fontWeight:700,lineHeight:1.235,marginBottom:"6px"},level:{textTransform:"uppercase",color:t.palette.text.secondary,fontWeight:700,letterSpacing:"1px"}}));function g({description:t,documentationUrl:r}){const n=o();return r?e.createElement("div",{className:n.description},e.createElement(i,{content:t}),e.createElement(l,{to:r},"Learn more")):e.createElement("div",{className:n.description},e.createElement(i,{content:t}))}const u=({name:t,badge:r,description:n,documentationUrl:c,trackType:m="standard"})=>{const a=o();return e.createElement("div",{className:a.root},e.createElement(d,{badge:r,trackType:m,size:"large",showTooltip:!0}),e.createElement("div",null,e.createElement(s,{className:a.title},t),n&&e.createElement(g,{description:n,documentationUrl:c})))};export{u as CertificationSummary,o as useStyles};
|
|
2
2
|
//# sourceMappingURL=CertificationSummary.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{stringifyEntityRef as
|
|
1
|
+
import{stringifyEntityRef as p}from"@backstage/catalog-model";import{useEntity as b}from"@backstage/plugin-catalog-react";import{makeStyles as v,Typography as z,Tooltip as I,IconButton as T,CircularProgress as x}from"@material-ui/core";import N from"@material-ui/icons/Refresh";import S from"classnames";import e,{useState as F,useMemo as L}from"react";import{Link as w}from"react-router-dom";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import{useGetChecks as A}from"../../hooks/checks/useGetChecks.esm.js";import"../../hooks/useSoundcheckAlert.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{useExecuteCheck as B}from"../../hooks/checks/useExecuteCheck.esm.js";import"../CheckDryRun/CheckDryRun.esm.js";import"../SoundcheckDialog/SoundcheckDialog.esm.js";import{CheckDryRunDialogButton as D}from"../CheckDryRun/CheckDryRunDialogButton.esm.js";import"../CheckDryRun/CheckDryRunDetails.esm.js";import"../CheckDryRun/CheckDryRunContext.esm.js";import{mapCheckToCheckInput as G}from"../CheckDryRun/checkDryRunUtils.esm.js";import{CheckIcon as $}from"../CheckIcon/CheckIcon.esm.js";import{RelativeTime as H}from"../RelativeTime/RelativeTime.esm.js";const d=v(t=>({root:{display:"grid",width:"100%",gridTemplateColumns:"auto 1fr auto auto auto",gridColumnGap:t.spacing(.5),padding:t.spacing(1),alignItems:"center","&.selected":{backgroundColor:t.palette.action.hover},"&:hover, &:active, &:focus":{backgroundColor:t.palette.action.hover}}})),M=({className:t,href:a,name:r,children:m})=>a?e.createElement(w,{"aria-label":`select check ${r}`,to:a,className:t},m):e.createElement("div",{className:t},m),P=({result:t,name:a,id:r,timestamp:m,hasChecker:h=!1,selected:f=!1,href:k})=>{const g=d(),E=S(g.root,{selected:f}),{entity:i}=b(),{mutateAsync:C,isLoading:l}=B(),[o,y]=F(),{data:n}=A({ids:r?[r]:[]},!!o),s=L(()=>{const c=n?.edges?.[0]?.node;return c?G(c):null},[n?.edges]),R=async()=>{if(!i||!r)return;const c=await C({checkerId:r,entityRef:p(i),shouldRefreshFacts:!0}).catch(j=>{});c&&y(c)},u=!i||!r||!h;return e.createElement(M,{href:k,className:E,name:a},e.createElement($,{result:t}),e.createElement(z,{variant:"body2"},a),m&&!l?e.createElement(H,{timestamp:m}):null,!l&&e.createElement(e.Fragment,null,e.createElement(I,{title:"Execute Check",disableHoverListener:u},e.createElement("span",null,e.createElement(T,{size:"small",color:"inherit",onClick:R,disabled:u,"aria-label":"Execute Check"},e.createElement(N,{fontSize:"small"})))),!!o&&!!s&&e.createElement(D,{entityRef:p(i),check:s,checkResult:{checkResult:o.result,notes:o.details?.notes?.data??""},facts:o.facts,ruleResults:o.ruleResults,size:"small"})),l&&e.createElement(x,{color:"inherit",size:"1em"}))};export{P as Check,d as useStyles};
|
|
2
2
|
//# sourceMappingURL=Check.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{stringifyEntityRef as u}from"@backstage/catalog-model";import{useEntity as v}from"@backstage/plugin-catalog-react";import{makeStyles as
|
|
1
|
+
import{stringifyEntityRef as u}from"@backstage/catalog-model";import{useEntity as v}from"@backstage/plugin-catalog-react";import{makeStyles as h,Paper as I,Divider as k}from"@material-ui/core";import e from"react";import{useParams as g}from"react-router-dom";import{useAllCertifications as C}from"../../hooks/certifications/useAllCertifications.esm.js";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import"../../hooks/useSoundcheckAlert.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{usePlaylists as P}from"../../hooks/playlists/usePlaylists.esm.js";import{AlertPanel as l}from"../AlertPanel/AlertPanel.esm.js";import{CertificationSidebar as b}from"../CertificationSidebar/CertificationSidebar.esm.js";import"../CertificationSidebar/CertificationSummary.esm.js";import"@material-ui/lab";import"../CertificationSidebar/Check.esm.js";import"../CertificationSidebar/LevelSummary.esm.js";import{isDarkTheme as R}from"../Charts/chartUtils.esm.js";import{CheckDetails as w}from"../CheckDetails/CheckDetails.esm.js";import"../CheckDryRun/CheckDryRun.esm.js";import"../SoundcheckDialog/SoundcheckDialog.esm.js";import"../CheckDryRun/CheckDryRunDetails.esm.js";import{CheckDryRunProvider as D}from"../CheckDryRun/CheckDryRunContext.esm.js";import"../CheckForm/utils/checkFormUtils.esm.js";import{NoCertifications as N}from"../EmptyState/EmptyState.esm.js";import{LevelUpParty as $}from"../LevelUpParty/LevelUpParty.esm.js";import{RefetchingIndicator as x}from"../RefetchingIndicator/RefetchingIndicator.esm.js";import{CertificationTabs as S}from"./CertificationTabs.esm.js";import{PlaylistComponent as T}from"./Playlist/PlaylistComponent.esm.js";const n=h(t=>({paper:{overflow:"hidden",position:"relative",border:R(t)?`1px solid ${t.palette.divider}`:void 0},view:{display:"grid",gridTemplateColumns:"1fr 2fr"},sidebar:{borderRight:`1px solid ${t.palette.divider}`}})),A=()=>{const{playlistId:t,trackId:r,checkId:a}=g(),m=n(),{entity:i}=v(),{isError:p,isFetched:s,data:c}=C(i),{isError:d,data:f}=P(i);if(p||d)return e.createElement(l,{severity:"error",title:"Error loading certifications"});const o=t&&f?.find(E=>E.id===t);if(t&&!o)return e.createElement(l,{severity:"error",title:"Playlist ${playlistId} not found."});if(s&&!c?.length)return e.createElement(N,null);const y=i?u(i):void 0;return e.createElement(D,null,e.createElement(I,{className:m.paper},e.createElement(x,null),e.createElement(S,{playlistId:t,trackId:r}),e.createElement(k,null),o&&e.createElement(T,{playlist:o,entityRef:y}),!o&&r&&e.createElement("div",{"data-testid":"soundcheck-certification-view",className:m.view},e.createElement("div",{className:m.sidebar},e.createElement(b,{trackId:r,checkId:a})),e.createElement(w,{programId:r,checkId:a}),e.createElement($,{programId:r}))))};export{A as CertificationsPage,n as useStyles};
|
|
2
2
|
//# sourceMappingURL=CertificationsPage.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{makeStyles as
|
|
1
|
+
import{makeStyles as B,useTheme as $,Box as a,Paper as P,Typography as I,Tooltip as O}from"@material-ui/core";import S from"@material-ui/lab/Skeleton";import{DateTime as T}from"luxon";import t from"react";import{CircularProgressbar as W,buildStyles as j}from"react-circular-progressbar";import{useCheckStatus as z}from"../../hooks/aggregations/useCheckStatus.esm.js";import{useCheckStatusHistory as A}from"../../hooks/aggregations/useCheckStatusHistory.esm.js";import{getChartFontColor as w,formatDate as G}from"../Charts/chartUtils.esm.js";import{getApplicableCheckCount as u}from"../TrackPage/TrackEntitiesTable/utils.esm.js";import{getProgressColor as E}from"../TrackPage/utils.esm.js";import{CheckHistoryChart as H}from"./CheckHistoryChart.esm.js";import{getCheckName as K}from"./utils.esm.js";const N=B(e=>({card:{display:"flex",flexDirection:"column",border:`1px solid ${e.palette.divider}`,width:"99%"},title:{fontWeight:"bold",fontSize:"0.9rem",cursor:"default",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},headerRow:{display:"flex",padding:e.spacing(1,1),borderBottom:`1px solid ${e.palette.divider}`,width:"100%"},headerSection:{display:"flex",flexDirection:"column",gap:e.spacing(.5),flexGrow:1,width:"100%"},contentRow:{padding:e.spacing(1,1,0),display:"flex"},leftSection:{width:"75px",minWidth:"75px"},summaryCard:{height:"100%",display:"flex",flexDirection:"column",justifyContent:"space-between"},chartSection:{flex:1,width:"100%",minWidth:"150px"},chartSkeletonSection:{flex:1,width:"100%",minWidth:"150px",padding:e.spacing(0,0,1,1)},overallSummaryBox:{display:"flex",flexDirection:"column",height:"100%",color:w(e),textAlign:"center",gap:e.spacing(2)}})),L=()=>{const e=N();return t.createElement(a,{className:e.contentRow},t.createElement(a,{className:e.leftSection},t.createElement(a,{className:e.summaryCard},t.createElement(S,{variant:"circle",height:75}))),t.createElement(a,{className:e.chartSkeletonSection},t.createElement(S,{variant:"rect",height:92})))};function M(e){if(!e)return[];const{history:r}=e,o=T.utc();return r.map((l,s)=>{const c=u(l);return{name:G(o,r.length-s-1),passRate:c?Math.round(l.passed/c*100):100}})}function q(e){if(!e)return 0;const{passed:r}=e,o=u(e);return o?Math.round(r/o*100):100}function F(e){if(!e)return{numerator:0,denominator:0};const{passed:r}=e,o=u(e);return{numerator:r,denominator:o}}const Q=({check:e,track:r,lifecycles:o,owners:l,types:s,systems:c})=>{const n=N(),m=$();let i={};o?.length&&(i["spec.lifecycle"]=o),l?.length&&(i["relations.ownedBy"]=l),s?.length&&(i["spec.type"]=s),c?.length&&(i["relations.partOf"]=c),Object.keys(i).length===0&&(i=void 0);const{data:d,isLoading:k}=z({checkId:e.id,trackId:r.id,filter:i}),{data:g,isLoading:v}=A({checkId:e.id,trackId:r.id,numberOfDays:30,filter:i}),b={dataKey:"passRate",name:"Pass rate"},D=g?.history?.length??0,R=M(g),p=q(d);let f;d?f=`${p}%`:f="No Data";let h;if(!d)h="No Data";else{const{numerator:x,denominator:C}=F(d);C>0?h=`${x} of ${C} entities passing`:h=`${x} entities passing`}const y=t.createElement(a,{className:n.overallSummaryBox},t.createElement(W,{value:p,text:f,styles:j({textColor:w(m),pathColor:E(m,p),trailColor:m.palette.divider,textSize:D?void 0:10})}));return t.createElement(P,{className:n.card,elevation:0},t.createElement(a,{className:n.headerRow},t.createElement(a,{className:n.headerSection},t.createElement(I,{className:n.title},K(r,e)))),v||k?t.createElement(L,null):t.createElement(O,{title:h},t.createElement(a,{className:n.contentRow},y&&t.createElement(a,{className:n.leftSection},t.createElement(a,{className:n.summaryCard},y)),t.createElement(a,{className:n.chartSection},t.createElement(H,{data:R,lineConfig:b,color:E(m,p)})))))};export{Q as CheckCard};
|
|
2
2
|
//# sourceMappingURL=CheckCard.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import t,{useEffect as n}from"react";import{v4 as u}from"uuid";import"../../contexts/TrackFormContext.esm.js";import{CheckFormProvider as d,useCheckFormContext as f}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"../../hooks/useSoundcheckAlert.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{useNavigateBack as g}from"../../hooks/useNavigateBack.esm.js";import{useCheckTemplates as h}from"../../hooks/checks/useCheckTemplates.esm.js";import{useCreateCheck as k}from"../../hooks/checks/useCreateCheck.esm.js";import{useSearchParam as C}from"../../hooks/useSearchParam.esm.js";import{checksPageRouteRef as y}from"../../routes.esm.js";import{CheckForm as E}from"../CheckForm/CheckForm.esm.js";import"../CheckForm/Steps/CheckDetailsStep.esm.js";import"../CheckForm/Steps/CheckRulesStep.esm.js";import{LoadingIndicator as I}from"../LoadingIndicator/LoadingIndicator.esm.js";import{PageWarningMessage as L}from"../PageWarningMessage/PageWarningMessage.esm.js";import"../SoundcheckHeader/SoundcheckHeader.esm.js";import"../SoundcheckHeader/SoundcheckHeaderContext.esm.js";import{useHeader as F}from"../SoundcheckHeader/useHeader.esm.js";const P=({template:e})=>{const{setIsLoading:o,selectedItem:m,setSelectedItem:r}=f(),{mutateAsync:i,isLoading:a}=k();n(()=>{r(e?{...e,id:u()}:null)},[e,r]),n(()=>{o(a)},[o,a]);const[c,s]=g(y),p=async l=>{await i(l,{onSuccess:s})};return F({title:"Create a Check",description:"Identify if your software meets organizational standards by setting up a check.",docLink:"https://backstage.spotify.com/docs/plugins/soundcheck/core-concepts/checks"}),e&&!m?null:t.createElement(E,{onSave:p,onClose:c})},v=()=>{const[[e]]=C("template"),{isLoading:o,data:m}=h(),r=e&&m?m.find(i=>i.id===e)??null:null;return t.createElement(t.Fragment,null,t.createElement(L,{entityName:"check template",entityId:e,showNotFound:!!e&&!o&&!r}),o&&t.createElement(I,null),t.createElement(d,null,!o&&(!e||r)&&t.createElement(P,{template:r})))};export{v as CheckCreatePage};
|
|
2
|
+
//# sourceMappingURL=CheckCreatePage.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{MarkdownContent as
|
|
1
|
+
import{MarkdownContent as l}from"@backstage/core-components";import{makeStyles as m,useTheme as s,Paper as c,Typography as d}from"@material-ui/core";import g from"@material-ui/icons/CheckCircleOutlined";import u from"@material-ui/icons/ErrorOutline";import n from"@material-ui/icons/InfoOutlined";import k from"@material-ui/icons/RemoveCircleOutline";import f from"@material-ui/icons/WarningOutlined";import a from"react";import{ResultState as e}from"../../graphql/generated/index.esm.js";const C=m(t=>({markdownContent:{"& :last-child":{marginBottom:0},"& pre":{background:`${t.palette.background.paper} !important`}},root:{padding:t.spacing(2),display:"flex",gap:t.spacing(1.5)},iconContainer:{marginTop:1},passed:{},failed:{},warning:{},notReported:{},notApplicable:{},error:{},icon:{}}),{name:"CheckResultStateBox"}),N={[e.Passed]:g,[e.Failed]:u,[e.Warning]:f,[e.NotReported]:n,[e.NotApplicable]:n,[e.Error]:k},b={[e.Passed]:"Check passed",[e.Failed]:"Check did not pass",[e.Warning]:"Check produced warning(s)",[e.NotReported]:"Check not reported",[e.NotApplicable]:"Check not applicable",[e.Error]:"Check encountered an error."},h={[e.Passed]:"passed",[e.Failed]:"failed",[e.Warning]:"warning",[e.NotReported]:"notReported",[e.NotApplicable]:"notApplicable",[e.Error]:"error"},E=(t,r)=>({[e.Passed]:r.palette.success.main,[e.Failed]:r.palette.error.main,[e.Warning]:r.palette.warning.main,[e.NotReported]:r.palette.text.primary,[e.NotApplicable]:r.palette.text.primary,[e.Error]:r.palette.error.main})[t],R=({state:t,notes:r})=>{const o=C(),i=s(),p=N[t]??n;return a.createElement(c,{variant:"outlined",className:`${o.root} ${o[h[t]]}`},a.createElement("div",{className:o.iconContainer},a.createElement(p,{className:o.icon,htmlColor:E(t,i)})),a.createElement("div",null,a.createElement(d,{variant:"subtitle1"},b[t]),r?a.createElement(l,{className:o.markdownContent,content:r}):null))};export{R as ResultStateBox};
|
|
2
2
|
//# sourceMappingURL=ResultStateBox.esm.js.map
|